Refactor/make game vars extern (#451)
* Remove GameVariables pointer for callbacks * Make game_vars a global * move declaration of game vars in header * Move g_game_vars location
This commit is contained in:
+1
-1
@@ -121,7 +121,7 @@ typedef struct ContainedHandTypes
|
||||
} ContainedHandTypes;
|
||||
// clang-format on
|
||||
|
||||
typedef void (*GameStateCallback)(GameVariables* gs);
|
||||
typedef void (*GameStateCallback)();
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
@@ -17,4 +17,6 @@ typedef struct
|
||||
|
||||
} GameVariables;
|
||||
|
||||
extern GameVariables g_game_vars;
|
||||
|
||||
#endif // GAME_VARIABLES_H
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
#ifndef SPLASH_SCREEN_H
|
||||
#define SPLASH_SCREEN_H
|
||||
|
||||
#include "game.h"
|
||||
|
||||
#include <tonc.h>
|
||||
|
||||
/** @name Splash screen timing variables
|
||||
@@ -25,16 +23,16 @@
|
||||
/**
|
||||
* @brief Initialize the splash screen by printing the splash screen text.
|
||||
*/
|
||||
void splash_screen_on_init(GameVariables* vars);
|
||||
void splash_screen_on_init(void);
|
||||
|
||||
/**
|
||||
* @brief Update splash screen timers and print the remaining time accordingly.
|
||||
*/
|
||||
void splash_screen_on_update(GameVariables* vars);
|
||||
void splash_screen_on_update(void);
|
||||
|
||||
/**
|
||||
* @brief Exit the splash screen
|
||||
*/
|
||||
void splash_screen_on_exit(GameVariables* vars);
|
||||
void splash_screen_on_exit(void);
|
||||
|
||||
#endif // SPLASH_SCREEN_H
|
||||
|
||||
Reference in New Issue
Block a user