Shall not pass 80 characters in width.

This commit is contained in:
2026-03-22 11:34:06 -07:00
parent 8af1c59bb6
commit b6f7e027b6
5 changed files with 589 additions and 229 deletions
+21 -11
View File
@@ -14,7 +14,8 @@ typedef struct debug_read_file_result {
} debug_read_file_result;
debug_read_file_result DEBUGPlatformReadEntireFile(const char *Filename);
B32 DEBUGPlatformWriteEntireFile(const char *Filename, U32 MemorySize, void *Memory);
B32 DEBUGPlatformWriteEntireFile(const char *Filename, U32 MemorySize,
void *Memory);
void DEBUGPlatformFreeFileMemory(void *Memory);
#endif
@@ -23,7 +24,8 @@ void DEBUGPlatformFreeFileMemory(void *Memory);
/* --------------------------------------------------------------------- */
typedef struct game_offscreen_buffer {
/* Pixels are always 32-bit and have the bytes in BGRX (little-endian). */
/* Pixels are always 32-bit and have the bytes in BGRX
* (little-endian). */
void *Memory;
S32 Width;
S32 Height;
@@ -70,8 +72,8 @@ typedef struct game_controller_input {
/* NOTE: All buttons must be added above this line. */
game_button_state Terminator;
};
};
} buttons;
} u;
} game_controller_input;
typedef struct game_input {
@@ -81,8 +83,10 @@ typedef struct game_input {
game_controller_input *GetController(game_input *Input, S32 ControllerIndex)
{
game_controller_input *Result;
Assert((U32)ControllerIndex < ARRAY_SIZE(Input->Controllers));
game_controller_input *Result = &(Input->Controllers[ControllerIndex]);
Result = &(Input->Controllers[ControllerIndex]);
return Result;
}
@@ -90,10 +94,14 @@ typedef struct game_memory {
B32 IsInitialized;
U64 PermanentStorageSize;
void *PermanentStorage; /* WARNING: This memory is REQUIRED to be zero initialized!!! (Done by the OS layer.) */
void *PermanentStorage; /* WARNING: This memory is REQUIRED to be zero
initialized!!! (Done by the OS
layer.) */
U64 TransientStorageSize;
void *TransientStorage; /* WARNING: This memory is REQUIRED to be zero initialized!!! (Done by the OS layer.) */
void *TransientStorage; /* WARNING: This memory is REQUIRED to be zero
initialized!!! (Done by the OS
layer.) */
#if BUILD_INTERNAL
debug_read_file_result (*DEBUGPlatformReadEntireFile)(const char *);
@@ -107,11 +115,13 @@ typedef struct game_memory {
F32 SecondsElapsed;
} game_clocks;*/
void UpdateAndRender(game_memory *Memory, game_input *Input, game_offscreen_buffer *Buffer, game_sound_output_buffer *SoundBuffer);
void UpdateAndRender(game_memory *Memory, game_input *Input,
game_offscreen_buffer *Buffer,
game_sound_output_buffer *SoundBuffer);
/**/
/**/
/**/
/*
*
*/
typedef struct game_state {
S32 ToneHz;