This commit is contained in:
2024-07-08 22:41:44 +01:00
parent 715f86763c
commit 82ddd12239
6 changed files with 114 additions and 65 deletions

44
src/handmade.h Normal file
View File

@@ -0,0 +1,44 @@
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <math.h>
#include <windows.h>
#pragma once
#define internal static // for functions
#define local_persist static // for static variables in a scope
#define global static // for global variables
typedef uint8_t uint8;
typedef uint16_t uint16;
typedef uint32_t uint32;
typedef uint64_t uint64;
typedef int8_t int8;
typedef int16_t int16;
typedef int32_t int32;
typedef int64_t int64;
typedef float real32;
typedef double real64;
typedef int32_t bool32;
void debug_printf(wchar_t* format, ...);
// Game to platform layer services
struct GameInput {
int xOffset;
int yOffset;
};
struct GameOffscreenBuffer {
void *memory;
int width;
int height;
};
void gameUpdateAndRender();
// Platform to game services