69 lines
1.2 KiB
C
69 lines
1.2 KiB
C
#pragma once
|
|
#include <windows.h>
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
typedef int8_t i8;
|
|
typedef int16_t i16;
|
|
typedef int32_t i32;
|
|
typedef int64_t i64;
|
|
|
|
typedef uint8_t u8;
|
|
typedef uint16_t u16;
|
|
typedef uint32_t u32;
|
|
typedef uint64_t u64;
|
|
|
|
typedef intptr_t intptr;
|
|
typedef uintptr_t uintptr;
|
|
|
|
#if defined ( _WIN64 )
|
|
typedef int64_t isize;
|
|
typedef uint64_t usize;
|
|
#elif defined ( _WIN32 )
|
|
typedef int32_t isize;
|
|
typedef uint32_t usize;
|
|
#endif
|
|
|
|
typedef float f32;
|
|
typedef double f64;
|
|
|
|
typedef uint8_t b8;
|
|
typedef uint32_t b32;
|
|
|
|
typedef void * rawptr;
|
|
|
|
typedef struct
|
|
{
|
|
i32 lib;
|
|
} Library;
|
|
|
|
typedef struct
|
|
{
|
|
i32 win;
|
|
} Window;
|
|
|
|
typedef struct
|
|
{
|
|
i32 fn;
|
|
} Function;
|
|
|
|
b32 _LoadLib(const char *name, Library *out_lib);
|
|
b32 _LoadFn(const char *name, Library *lib, Function *out_fn);
|
|
|
|
b32 _InitPlatform();
|
|
rawptr _MemAlloc(isize size);
|
|
rawptr _MemAllocZeroed(isize size);
|
|
isize _GetPageSize();
|
|
|
|
i32 _EPrint(void const *str);
|
|
i32 _Printf(const char *fmt, ...);
|
|
i32 _Printfln(const char *fmt, ...);
|
|
i32 _EPrintf(const char *fmt, ...);
|
|
|
|
b32 _CreateWindow();
|
|
Window *_GetWindow();
|
|
b32 _GetWindowEvent(WindowEvent *event);
|
|
void _WaitForWindowEvent(WindowEvent *event);
|
|
WindowSize _GetWindowSize();
|