I am getting warnings (treated as errors with compiler settings) for conversions from uint64 to size_t anywhere that 'TotalSize' (in the win32_state struct) is used, and for a signed/unsigned mismatch when evaluating the int/size_t comparisons during the for loops within CatStrings()
The code in question are the lines:
1
2
3
4
5
6
7
8
9
10
11
12 | CopyMemory (ReplayBuffer->MemoryBlock,
State->GameMemoryBlock,
State->TotalSize);
CopyMemory (State->GameMemoryBlock,
ReplayBuffer->MemoryBlock,
State->TotalSize);
ReplayBuffer->MemoryBlock = MapViewOfFile
(ReplayBuffer->MemoryMap,
FILE_MAP_ALL_ACCESS, 0, 0,
Win32State.TotalSize);
|
and then
| CatStrings (size_t SourceACount, char *SourceA,
size_t SourceBCount, char *SourceB,
size_t DestCount, char *Dest)
{
for(int Index = 0;
Index < SourceACount;
..
|
I have verified that my code is correct, and also downloaded the source code to compile an unedited version of Casey's .cpp and .h files, which produce the same result.
I tried using casting, for example:
| Index < (int) SourceACount;
|
and
| CopyMemory (ReplayBuffer->MemoryBlock,
State->GameMemoryBlock,
(size_t) State->TotalSize);
|
which allowed me to successfully build the executable, which in turn successfully built the .dll, _temp.dll and all four .hmi files, which are the correct file size, however the looping behaviour does not seem to work.
Pressing L does not activate the recording feature, which is evident as further presses do not restore the state and activate the 'loop'
I have tested all other functionality which works as usual, and the looping
was working previously (after Episode 24) when the function was writing to disk. I am confused as to why this is happening, especially after directly compiling the downloaded source, and can't seem to figure it out; is anybody more experienced than myself able to shed any light?
My system has an Intel Core i7 4820k, with 16gb RAM and is running Windows 7 64bit. I am compiling with cl via batch file, using the correct VS. The only variation is that I code with Sublime 3 instead of emacs, but I can't see that making any difference. Any help would be appreciated!