Remove core.h, SDL2->SDL3, Makefile cleanup, ansi C, 80 char.

This commit is contained in:
2026-08-04 04:52:46 -07:00
parent a829ac8647
commit 14d87eac10
162 changed files with 57434 additions and 31335 deletions
+23 -24
View File
@@ -1,43 +1,42 @@
#ifndef SDL_HANDMADE_H
#define SDL_HANDMADE_H
#include <SDL.h>
#include <SDL3/SDL.h>
#include "core.h"
#include "handmade.h"
struct sdl_border_size {
int Top;
int Bottom;
int Left;
int Right;
int top;
int bottom;
int left;
int right;
};
struct sdl_window_size {
int Width;
int Height;
int width;
int height;
};
struct sdl_window_position {
int X;
int Y;
int x;
int y;
};
struct offscreen_buffer {
/* Pixels are always 32-bit and have the bytes in BGRX (little-endian). */
SDL_Texture *Texture;
void *Memory;
int Width;
int Height;
int Pitch;
SDL_Texture *texture;
void *memory;
int width;
int height;
int pitch;
};
struct sdl_sound_output {
int SamplesPerSecond;
int BytesPerSample;
int SecondaryBufferSize;
int LatencySampleCount;
void *Samples;
int samples_per_second;
int bytes_per_sample;
int secondary_buffer_size;
int latency_sample_count;
void *samples;
};
/* TODO: We choose 1024 only because MacOS's MAXPATHLEN says such a value.
@@ -45,11 +44,11 @@ struct sdl_sound_output {
#define SDL_STATE_PATH_SIZE 1024
struct sdl_state {
unsigned long long TotalSize;
void *GameMmemoryBlock;
unsigned long long total_size;
void *game_memory_block;
char EXEDirPath[SDL_STATE_PATH_SIZE];
char DLLPath[SDL_STATE_PATH_SIZE];
char exe_dir_path[SDL_STATE_PATH_SIZE];
char dll_path[SDL_STATE_PATH_SIZE];
};
#endif