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
1 2 3 4 5 6 7 8 | 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:
1 | Index < (int) SourceACount; |
and
1 2 3 | 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!