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:
+7
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user