Moved program icon drawing into handmade layer.
This commit is contained in:
+10
-6
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "core.h"
|
||||
#include "handmade_tile.h"
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
/* NOTE: Servcies that the platform layer provides to the game. */
|
||||
/* --------------------------------------------------------------------- */
|
||||
@@ -23,13 +22,15 @@ B32 DEBUGPlatformWriteEntireFile(thread_context *Thread, const char *Filename, U
|
||||
void DEBUGPlatformFreeFileMemory(thread_context *Thread, void *Memory);
|
||||
#endif
|
||||
|
||||
typedef struct game_offscreen_buffer game_offscreen_buffer;
|
||||
void SetProgramIcon(game_offscreen_buffer *ProgramIcon);
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
/* NOTE: Servcies that the game provides to the platform layer. */
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
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;
|
||||
@@ -112,6 +113,7 @@ typedef struct game_memory {
|
||||
debug_read_file_result (*DEBUGPlatformReadEntireFile)(thread_context *Thread,const char *);
|
||||
B32 (*DEBUGPlatformWriteEntireFile)(thread_context *Thread, const char *, U32, void *);
|
||||
void (*DEBUGPlatformFreeFileMemory)(thread_context *Thread, void *);
|
||||
void (*SetProgramIcon)(game_offscreen_buffer *ProgramIcon);
|
||||
#endif
|
||||
} game_memory;
|
||||
|
||||
@@ -123,9 +125,7 @@ typedef struct game_memory {
|
||||
#if OS_WINDOWS
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
void UpdateAndRender(thread_context *Thread, game_memory *Memory,
|
||||
game_input *Input, game_offscreen_buffer *Buffer,
|
||||
game_sound_output_buffer *SoundBuffer);
|
||||
void UpdateAndRender(thread_context *Thread, game_memory *Memory, game_input *Input, game_offscreen_buffer *Buffer, game_sound_output_buffer *SoundBuffer);
|
||||
|
||||
/*
|
||||
*
|
||||
@@ -177,6 +177,9 @@ typedef struct hero_bitmaps {
|
||||
} hero_bitmaps;
|
||||
|
||||
typedef struct game_state {
|
||||
game_offscreen_buffer ProgramIcon;
|
||||
loaded_bitmap ProgramIconBMP;
|
||||
|
||||
memory_arena WorldArena;
|
||||
world *World;
|
||||
|
||||
@@ -184,6 +187,7 @@ typedef struct game_state {
|
||||
tile_map_position PlayerP;
|
||||
v2 dPlayerP; // velocity
|
||||
|
||||
|
||||
loaded_bitmap Backdrop;
|
||||
|
||||
U32 FacingDirection;
|
||||
|
||||
Reference in New Issue
Block a user