mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 02:56:43 +01:00
utils: move GetGameName to internal
This commit is contained in:
parent
e5cf17a1a6
commit
52da2d53e4
4 changed files with 9 additions and 10 deletions
|
@ -557,3 +557,11 @@ SYMBOL_INTERNAL void ResumeExecution(struct Game* game) {
|
|||
game->_priv.paused = false;
|
||||
PrintConsole(game, "DEBUG: game execution resumed.");
|
||||
}
|
||||
|
||||
SYMBOL_INTERNAL char* GetGameName(struct Game* game, const char* format) {
|
||||
char* result = malloc(sizeof(char) * 255);
|
||||
SUPPRESS_WARNING("-Wformat-nonliteral")
|
||||
snprintf(result, 255, format, game->name);
|
||||
SUPPRESS_END
|
||||
return AddGarbage(game, result);
|
||||
}
|
||||
|
|
|
@ -95,5 +95,6 @@ void PauseExecution(struct Game* game);
|
|||
void ResumeExecution(struct Game* game);
|
||||
void ReloadShaders(struct Game* game, bool force);
|
||||
void DestroyShaders(struct Game* game);
|
||||
char* GetGameName(struct Game* game, const char* format);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -317,14 +317,6 @@ static void TestPath(const char* filename, const char* subpath, char** result) {
|
|||
al_destroy_path(path);
|
||||
}
|
||||
|
||||
SYMBOL_EXPORT char* GetGameName(struct Game* game, const char* format) {
|
||||
char* result = malloc(sizeof(char) * 255);
|
||||
SUPPRESS_WARNING("-Wformat-nonliteral")
|
||||
snprintf(result, 255, format, game->name);
|
||||
SUPPRESS_END
|
||||
return AddGarbage(game, result);
|
||||
}
|
||||
|
||||
static char* TestDataFilePath(struct Game* game, const char* filename) {
|
||||
char* result = NULL;
|
||||
|
||||
|
|
|
@ -67,8 +67,6 @@ ALLEGRO_BITMAP* LoadScaledBitmap(struct Game* game, char* filename, int width, i
|
|||
/*! \brief Finds path for data file. */
|
||||
char* GetDataFilePath(struct Game* game, const char* filename);
|
||||
|
||||
char* GetGameName(struct Game* game, const char* format);
|
||||
|
||||
/*! \brief Print some message on game console.
|
||||
*
|
||||
* Draws message on console bitmap, so it'll be displayed when calling DrawConsole.
|
||||
|
|
Loading…
Reference in a new issue