mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 14:05:45 +01:00
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:
12
src/error.h
12
src/error.h
@@ -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, ...);
|
||||
|
||||
Reference in New Issue
Block a user