Skip to content

Commit

Permalink
Cleanup|All Games: Wrong formatting in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 1, 2019
1 parent b8805a5 commit 46fba9a
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 32 deletions.
4 changes: 2 additions & 2 deletions doomsday/libs/gamekit/libs/doom/src/d_api.cpp
Expand Up @@ -351,7 +351,7 @@ static void DP_Unload(void)
Plug_RemoveHook(HOOK_VIEWPORT_RESHAPE, R_UpdateViewport);
}

void G_PreInit(char const *gameId)
static void G_PreInit(char const *gameId)
{
/// \todo Refactor me away.
{ size_t i;
Expand All @@ -363,7 +363,7 @@ void G_PreInit(char const *gameId)
break;
}
if(i == NUM_GAME_MODES)
Con_Error("Failed gamemode lookup for id %i.", gameId);
Con_Error("Failed gamemode lookup for ID %s", gameId);
}

D_PreInit();
Expand Down
12 changes: 6 additions & 6 deletions doomsday/libs/gamekit/libs/doom64/include/d_main.h
Expand Up @@ -46,27 +46,27 @@ extern "C" {
* Pre Game Initialization routine.
* All game-specific actions that should take place at this time go here.
*/
void D_PreInit(void);
void D64_PreInit(void);

/**
* Post Game Initialization routine.
* All game-specific actions that should take place at this time go here.
*/
void D_PostInit(void);
void D64_PostInit(void);

void D_Shutdown(void);
void D64_Shutdown(void);

void D_EndFrame(void);
void D64_EndFrame(void);

/**
* Get a 32-bit integer value.
*/
int D_GetInteger(int id);
int D64_GetInteger(int id);

/**
* Get a pointer to the value of a named variable/constant.
*/
void *D_GetVariable(int id);
void *D64_GetVariable(int id);

#ifdef __cplusplus
} // extern "C"
Expand Down
4 changes: 2 additions & 2 deletions doomsday/libs/gamekit/libs/doom64/include/d_refresh.h
Expand Up @@ -41,8 +41,8 @@ void G_RendPlayerView(int player);
void G_RendSpecialFilter(int player, RectRaw const *region);

void D_DrawViewPort(int port, const RectRaw* portGeometry, const RectRaw* windowGeometry, int player, int layer);
void D_DrawWindow(const Size2Raw* windowSize);
void D_EndFrame(void);
void D64_DrawWindow(const Size2Raw* windowSize);
void D64_EndFrame(void);

void R_DrawSpecialFilter(int pnum);
void R_DrawMapTitle(void);
Expand Down
18 changes: 9 additions & 9 deletions doomsday/libs/gamekit/libs/doom64/src/d64_api.cpp
Expand Up @@ -108,7 +108,7 @@ static void DP_Unload(void)
Plug_RemoveHook(HOOK_VIEWPORT_RESHAPE, R_UpdateViewport);
}

void G_PreInit(char const *gameId)
static void G_PreInit(char const *gameId)
{
/// \todo Refactor me away.
{ size_t i;
Expand All @@ -120,10 +120,10 @@ void G_PreInit(char const *gameId)
break;
}
if(i == NUM_GAME_MODES)
Con_Error("Failed gamemode lookup for id %i.", gameId);
Con_Error("Failed gamemode lookup for ID %s", gameId);
}

D_PreInit();
D64_PreInit();
}

/**
Expand All @@ -145,13 +145,13 @@ static void *GetGameAPI(char const *name)
#define HASH_ENTRY(Name, Func) std::make_pair(Name, de::function_cast<void *>(Func))
static const Hash<String, void *> funcs(
{
HASH_ENTRY("DrawWindow", D_DrawWindow),
HASH_ENTRY("EndFrame", D_EndFrame),
HASH_ENTRY("GetInteger", D_GetInteger),
HASH_ENTRY("GetPointer", D_GetVariable),
HASH_ENTRY("PostInit", D_PostInit),
HASH_ENTRY("DrawWindow", D64_DrawWindow),
HASH_ENTRY("EndFrame", D64_EndFrame),
HASH_ENTRY("GetInteger", D64_GetInteger),
HASH_ENTRY("GetPointer", D64_GetVariable),
HASH_ENTRY("PostInit", D64_PostInit),
HASH_ENTRY("PreInit", G_PreInit),
HASH_ENTRY("Shutdown", D_Shutdown),
HASH_ENTRY("Shutdown", D64_Shutdown),
HASH_ENTRY("TryShutdown", G_TryShutdown),
});
#undef HASH_ENTRY
Expand Down
10 changes: 5 additions & 5 deletions doomsday/libs/gamekit/libs/doom64/src/d_main.cpp
Expand Up @@ -61,12 +61,12 @@ char const *borderGraphics[] = {
"BRDR_BL" // Bottom left.
};

int D_GetInteger(int id)
int D64_GetInteger(int id)
{
return Common_GetInteger(id);
}

void *D_GetVariable(int id)
void *D64_GetVariable(int id)
{
static float bob[2];

Expand Down Expand Up @@ -119,7 +119,7 @@ void *D_GetVariable(int id)
return 0;
}

void D_PreInit()
void D64_PreInit()
{
// Config defaults. The real settings are read from the .cfg files
// but these will be used no such files are found.
Expand Down Expand Up @@ -310,7 +310,7 @@ void D_PreInit()
G_CommonPreInit();
}

void D_PostInit()
void D64_PostInit()
{
CommandLine &cmdLine = DE_APP->commandLine();

Expand Down Expand Up @@ -384,7 +384,7 @@ void D_PostInit()
G_AutoStartOrBeginTitleLoop();
}

void D_Shutdown()
void D64_Shutdown()
{
P_ShutdownInventory();
G_CommonShutdown();
Expand Down
4 changes: 2 additions & 2 deletions doomsday/libs/gamekit/libs/doom64/src/d_refresh.cpp
Expand Up @@ -212,7 +212,7 @@ void G_RendPlayerView(int player)
R_RenderPlayerView(player);
}

void D_DrawWindow(Size2Raw const * /*windowSize*/)
void D64_DrawWindow(Size2Raw const * /*windowSize*/)
{
if(G_GameState() == GS_INTERMISSION)
{
Expand All @@ -228,7 +228,7 @@ void D_DrawWindow(Size2Raw const * /*windowSize*/)
}
}

void D_EndFrame()
void D64_EndFrame()
{
if(G_GameState() != GS_MAP) return;

Expand Down
10 changes: 6 additions & 4 deletions doomsday/libs/gamekit/libs/heretic/src/h_api.cpp
Expand Up @@ -157,21 +157,23 @@ static void DP_Unload(void)
Plug_RemoveHook(HOOK_VIEWPORT_RESHAPE, R_UpdateViewport);
}

void G_PreInit(char const *gameId)
static void G_PreInit(char const *gameId)
{
/// \todo Refactor me away.
{ size_t i;
size_t i;
for(i = 0; i < NUM_GAME_MODES; ++i)
{
if(!strcmp(gameIds[i], gameId))
{
gameMode = (gamemode_t) i;
gameModeBits = 1 << gameMode;
break;
}
}
if(i == NUM_GAME_MODES)
Con_Error("Failed gamemode lookup for id %i.", gameId);
{
Con_Error("Failed gamemode lookup for ID %s", gameId);
}

H_PreInit();
}

Expand Down
4 changes: 2 additions & 2 deletions doomsday/libs/gamekit/libs/hexen/src/x_api.cpp
Expand Up @@ -186,7 +186,7 @@ static void DP_Unload(void)
Plug_RemoveHook(HOOK_VIEWPORT_RESHAPE, R_UpdateViewport);
}

void G_PreInit(char const *gameId)
static void G_PreInit(char const *gameId)
{
/// \todo Refactor me away.
{ size_t i;
Expand All @@ -198,7 +198,7 @@ void G_PreInit(char const *gameId)
break;
}
if(i == NUM_GAME_MODES)
Con_Error("Failed gamemode lookup for id %i.", gameId);
Con_Error("Failed gamemode lookup for ID %s", gameId);
}

X_PreInit();
Expand Down

0 comments on commit 46fba9a

Please sign in to comment.