Clean up.

This commit is contained in:
2026-07-14 13:21:04 -07:00
parent 943ed21776
commit ffc4310646
12 changed files with 1445 additions and 955 deletions
+28 -28
View File
@@ -6,50 +6,50 @@
#include "core.h"
#include "handmade.h"
typedef struct sdl_border_size {
S32 Top;
S32 Bottom;
S32 Left;
S32 Right;
} sdl_border_size;
struct sdl_border_size {
int Top;
int Bottom;
int Left;
int Right;
};
typedef struct sdl_window_size {
S32 Width;
S32 Height;
} sdl_window_size;
struct sdl_window_size {
int Width;
int Height;
};
typedef struct sdl_window_position {
S32 X;
S32 Y;
} sdl_window_position;
struct sdl_window_position {
int X;
int Y;
};
typedef struct offscreen_buffer {
struct offscreen_buffer {
/* Pixels are always 32-bit and have the bytes in BGRX (little-endian). */
SDL_Texture *Texture;
void *Memory;
S32 Width;
S32 Height;
S32 Pitch;
} offscreen_buffer;
int Width;
int Height;
int Pitch;
};
typedef struct sdl_sound_output {
S32 SamplesPerSecond;
S32 BytesPerSample;
S32 SecondaryBufferSize;
S32 LatencySampleCount;
struct sdl_sound_output {
int SamplesPerSecond;
int BytesPerSample;
int SecondaryBufferSize;
int LatencySampleCount;
void *Samples;
} sdl_sound_output;
};
/* TODO: We choose 1024 only because MacOS's MAXPATHLEN says such a value.
* For example, linux/limits.h PATH_MAX says 4096. Windows has MAX_PATH. */
#define SDL_STATE_PATH_SIZE 1024
typedef struct sdl_state {
U64 TotalSize;
struct sdl_state {
unsigned long long TotalSize;
void *GameMmemoryBlock;
char EXEDirPath[SDL_STATE_PATH_SIZE];
char DLLPath[SDL_STATE_PATH_SIZE];
} sdl_state;
};
#endif