Browse Source

update episode 23

tags/day-25
Ledda 2 months ago
parent
commit
9ffb5088f5
2 changed files with 3 additions and 2 deletions
  1. +1
    -0
      .gitignore
  2. +2
    -2
      src/win32_handmade.cpp

+ 1
- 0
.gitignore View File

@@ -1,3 +1,4 @@
/build /build
/.vs /.vs
HidCerberus.Lib.log HidCerberus.Lib.log
replay.ipt

+ 2
- 2
src/win32_handmade.cpp View File

@@ -362,7 +362,7 @@ internal void win32FillSoundBuffer(Win32SoundOutput *soundOutput, DWORD byteToLo


internal void win32BeginRecordingInput(Win32State *win32State, int inputRecordingIndex) { internal void win32BeginRecordingInput(Win32State *win32State, int inputRecordingIndex) {
win32State->inputRecordingIndex = inputRecordingIndex; win32State->inputRecordingIndex = inputRecordingIndex;
char *filename = "recording.hmi";
char *filename = "replay.ipt";
win32State->recordingHandle = CreateFileA(filename, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, NULL, NULL); win32State->recordingHandle = CreateFileA(filename, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, NULL, NULL);
DWORD bytesToWrite = (DWORD)win32State->gameMemoryTotalSize; DWORD bytesToWrite = (DWORD)win32State->gameMemoryTotalSize;
Assert(bytesToWrite < 0xFFFFFFFF); Assert(bytesToWrite < 0xFFFFFFFF);
@@ -382,7 +382,7 @@ internal void win32RecordInput(Win32State *win32State, GameInput *newInput) {


internal void win32BeginInputPlayback(Win32State *win32State, int inputPlayingIndex) { internal void win32BeginInputPlayback(Win32State *win32State, int inputPlayingIndex) {
win32State->inputPlayingIndex = inputPlayingIndex; win32State->inputPlayingIndex = inputPlayingIndex;
char *filename = "recording.hmi";
char *filename = "replay.ipt";
win32State->playbackHandle = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, NULL, NULL); win32State->playbackHandle = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, NULL, NULL);
DWORD bytesToRead = (DWORD)win32State->gameMemoryTotalSize; DWORD bytesToRead = (DWORD)win32State->gameMemoryTotalSize;
Assert(bytesToRead < 0xFFFFFFFF); Assert(bytesToRead < 0xFFFFFFFF);


Loading…
Cancel
Save