Files
handmadehero/sdl_handmade.h
T

44 lines
822 B
C

#ifndef SDL_HANDMADE_H
#define SDL_HANDMADE_H
#include <SDL.h>
#include "core.h"
#include "handmade.h"
typedef struct sdl_window_dimension {
S32 Width;
S32 Height;
} sdl_window_dimension;
typedef 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;
typedef struct sdl_sound_output {
S32 SamplesPerSecond;
S32 BytesPerSample;
S32 SecondaryBufferSize;
F32 tSine;
S32 LatencySampleCount;
void *Samples;
} sdl_sound_output;
typedef struct sdl_state {
U64 TotalSize;
void *GameMmemoryBlock;
S32 RecordingHandle;
S32 InputRecordingIndex;
S32 PlaybackHandle;
S32 InputPlayingIndex;
} sdl_state;
#endif