synchronise with the template

- use the version of audio management which doesn't crash the
application if something goes wrong
- include colour32
- update error management to be more reflective of the one defined in
the template
- modify the renderer functions to be more reflective of the template
- modify the game functions to be more reflective of the template (& use
a more failproof method of initializing)
- add gametime
- remove set_gamestatus logic and just use a run boolean in gamedata
- remove emscripten preprocessors as those haven't really been used
This commit is contained in:
2025-03-22 15:29:42 +01:00
parent 7fb624311f
commit 60ae11de10
17 changed files with 416 additions and 265 deletions

View File

@@ -30,12 +30,10 @@ enum gamestatus {
};
typedef int8_t gamestatus;
void set_gamestatus(gamestatus); // sets the current status of the game
gamestatus get_gamestatus(void); // gets the current status of the game
void debug(char const*, ...); // prints a debug message to stdout if the DEBUG environment variable is set, otherwise the call is ignored.
void info(char const*, ...); // prints an info message to stdout
void warn(char const*, ...); // prints a warning message to stderr
void error(char const*, ...); // prints an warning message to stderr
__attribute__((format(printf, 1, 2))) void debug(char const*, ...); // prints a debug message to stdout if the DEBUG environment variable is set, otherwise the call is ignored.
__attribute__((format(printf, 1, 2))) void info(char const*, ...); // prints an info message to stdout
__attribute__((format(printf, 1, 2))) void warn(char const*, ...); // prints a warning message to stderr
__attribute__((format(printf, 1, 2))) void error(char const*, ...); // prints an warning message to stderr
// prints an error message to stderr before exiting
noreturn void fatal(gamestatus, char const* fmt, ...);
__attribute__((format(printf, 4, 5))) noreturn void fatal(gamestatus, char const* file_name, uint32_t line, char const* fmt, ...);