Initial commit

This commit is contained in:
Quinn
2024-12-02 10:37:52 +01:00
committed by GitHub
commit 8bdf6bf2d2
15 changed files with 515 additions and 0 deletions

11
src/game/game.c Normal file
View File

@@ -0,0 +1,11 @@
#include "game.h"
#include "../main.h"
// called every time the game's state is updated
void game_update(GameData game_data, const Uint8* keys) {
if (keys[SDL_SCANCODE_ESCAPE]) {
stop();
}
}

9
src/game/game.h Normal file
View File

@@ -0,0 +1,9 @@
#pragma once
#include <SDL2/SDL.h>
// stores the data used in the game
typedef struct {
} GameData;
// updates the game's state
void game_update(GameData game_data, const Uint8* keys);