Introduce the game variables struct (#338)

Co-authored-by: emiyl <me@emiyl.com>

* Introduce the game variables struct

* Fix clang format

* Move game variables into their own file
This commit is contained in:
Rickey
2026-03-29 14:32:21 -07:00
committed by GitHub
co-authored by emiyl
parent 34fb0b22db
commit 835e44e4db
5 changed files with 73 additions and 45 deletions
+7 -3
View File
@@ -1,6 +1,8 @@
#ifndef GAME_H
#define GAME_H
#include "game_variables.h"
#include <tonc.h>
#define MAX_HAND_SIZE 16
@@ -129,12 +131,14 @@ typedef struct ContainedHandTypes
} ContainedHandTypes;
// clang-format on
typedef void (*GameStateCallback)(GameVariables* gs);
typedef struct
{
int substate;
void (*on_init)();
void (*on_update)();
void (*on_exit)();
GameStateCallback on_init;
GameStateCallback on_update;
GameStateCallback on_exit;
} StateInfo;
// Game functions