Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while(running)
- {
- // This should always happen before you do any work inside of the dll
- #if INTERNAL
- GameMemory.ExecuteableReloaded = false;
- FILETIME NewDLLWriteTime = Win32GetLastWriteTime(SourceGameCodeDLLFullPath);
- if(CompareFileTime(&NewDLLWriteTime, &Game.DLLLastWriteTime) != 0)
- {
- Win32UnloadGameCode(&Game);
- Game = Win32LoadGameCode(SourceGameCodeDLLFullPath,
- TempGameCodeDLLFullPath,
- GameCodeLockFullPath);
- }
- #endif
- // Do Stuff . . .
- RewindRenderBuffer(&RenderBuffer);
- if(Game.GameUpdateAndRender)
- {
- Game.GameUpdateAndRender(&GameMemory, &RenderBuffer);
- }
- EndRenderBuffer(&RenderBuffer);
- if(Win32Audio.AudioEnabled)
- {
- if(Game.GameGenerateAudioSamples)
- {
- // Do work....
- Game.GameGenerateAudioSamples(&AudioBuffer);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement