48 lines
829 B
C
48 lines
829 B
C
|
/* date = May 7th 2023 9:54 am */
|
||
|
|
||
|
#ifndef WIN32_MAIN_H
|
||
|
#define WIN32_MAIN_H
|
||
|
|
||
|
struct win32_memory_block
|
||
|
{
|
||
|
platform_memory_block Block;
|
||
|
win32_memory_block *Next;
|
||
|
win32_memory_block *Prev;
|
||
|
u64 Padding[2];
|
||
|
};
|
||
|
|
||
|
CTAssert(sizeof(win32_memory_block) == 64);
|
||
|
|
||
|
struct win32_state
|
||
|
{
|
||
|
win32_memory_block MemorySentinel;
|
||
|
ticket_mutex MemoryMutex;
|
||
|
|
||
|
u64 PerformanceFrequency;
|
||
|
b32 SleepIsGranular;
|
||
|
|
||
|
HWND Window;
|
||
|
|
||
|
memory_arena EventArena;
|
||
|
temporary_memory EventArenaTemp;
|
||
|
platform_event_list EventList;
|
||
|
|
||
|
char EXEPath[512];
|
||
|
char DLLPath[512];
|
||
|
char TempDLLPath[512];
|
||
|
|
||
|
platform_cursor Cursor;
|
||
|
};
|
||
|
|
||
|
struct win32_loaded_code
|
||
|
{
|
||
|
HMODULE DLL;
|
||
|
FILETIME LastWriteTime;
|
||
|
|
||
|
vn_update_and_render *UpdateAndRender;
|
||
|
|
||
|
b32 IsValid;
|
||
|
};
|
||
|
|
||
|
#endif //WIN32_MAIN_H
|