From 2f77b7d13340c3b4d86b20352910be928973a53b Mon Sep 17 00:00:00 2001 From: danij Date: Tue, 25 Feb 2014 20:53:44 +0000 Subject: [PATCH] Fixed|libheretic: Compiler warnings/errors (dup time symbol, missing initializers) --- doomsday/plugins/common/src/p_xgline.cpp | 2 +- doomsday/plugins/doom/src/m_cheat.cpp | 2 +- doomsday/plugins/heretic/src/h_refresh.cpp | 2 +- doomsday/plugins/heretic/src/in_lude.cpp | 21 +++++++-------------- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/doomsday/plugins/common/src/p_xgline.cpp b/doomsday/plugins/common/src/p_xgline.cpp index 34d3d29bad..8a959b5e49 100644 --- a/doomsday/plugins/common/src/p_xgline.cpp +++ b/doomsday/plugins/common/src/p_xgline.cpp @@ -1943,7 +1943,7 @@ int XLTrav_LineTeleport(Line *newLine, dd_bool /*ceiling*/, void *context, side = 1; // Make sure we are on correct side of exit line. - while(Line_PointOnSide(newLine, newPos) < 0 != side && --fudge >= 0) + while((Line_PointOnSide(newLine, newPos) < 0) != side && --fudge >= 0) { if(fabs(newLineDelta[0]) > fabs(newLineDelta[1])) newPos[VY] -= FIX2FLT(((newLineDelta[0] < 0) != side)? -1 : 1); diff --git a/doomsday/plugins/doom/src/m_cheat.cpp b/doomsday/plugins/doom/src/m_cheat.cpp index 9c36a6c8a9..b7933e8af7 100644 --- a/doomsday/plugins/doom/src/m_cheat.cpp +++ b/doomsday/plugins/doom/src/m_cheat.cpp @@ -381,7 +381,7 @@ D_CMD(CheatSuicide) D_CMD(CheatReveal) { - DENG2_UNUSED(argc); + DENG2_UNUSED2(src, argc); int option, i; diff --git a/doomsday/plugins/heretic/src/h_refresh.cpp b/doomsday/plugins/heretic/src/h_refresh.cpp index 75f2cba980..ef0f212889 100644 --- a/doomsday/plugins/heretic/src/h_refresh.cpp +++ b/doomsday/plugins/heretic/src/h_refresh.cpp @@ -171,7 +171,7 @@ void G_RendPlayerView(int player) R_RenderPlayerView(player); } -void H_DrawWindow(Size2Raw const *windowSize) +void H_DrawWindow(Size2Raw const * /*windowSize*/) { if(G_GameState() == GS_INTERMISSION) { diff --git a/doomsday/plugins/heretic/src/in_lude.cpp b/doomsday/plugins/heretic/src/in_lude.cpp index 8ee778483c..68b3c30dbf 100644 --- a/doomsday/plugins/heretic/src/in_lude.cpp +++ b/doomsday/plugins/heretic/src/in_lude.cpp @@ -69,7 +69,6 @@ static gametype_t gameType; static int cnt; -static int time; static int hours; static int minutes; static int seconds; @@ -92,7 +91,7 @@ static patchid_t dpFaceDead[NUMTEAMS]; static fixed_t dSlideX[NUMTEAMS]; static fixed_t dSlideY[NUMTEAMS]; -static char* killersText[] = { "K", "I", "L", "L", "E", "R", "S" }; +static char const *killersText = "KILLERS"; static Point2Raw YAHspot[3][9] = { { @@ -132,12 +131,8 @@ static Point2Raw YAHspot[3][9] = { void WI_Register(void) { - cvartemplate_t cvars[] = { - { "inlude-stretch", 0, CVT_BYTE, &cfg.inludeScaleMode, SCALEMODE_FIRST, SCALEMODE_LAST }, - { "inlude-patch-replacement", 0, CVT_INT, &cfg.inludePatchReplaceMode, PRM_FIRST, PRM_LAST }, - { NULL } - }; - Con_AddVariableList(cvars); + C_VAR_BYTE("inlude-stretch", &cfg.inludeScaleMode, 0, SCALEMODE_FIRST, SCALEMODE_LAST); + C_VAR_INT ("inlude-patch-replacement", &cfg.inludePatchReplaceMode, 0, PRM_FIRST, PRM_LAST); } void IN_DrawTime(int x, int y, int h, int m, int s, float r, float g, float b, float a) @@ -264,11 +259,9 @@ void IN_InitStats(void) } } - time = mapTime / 35; - hours = time / 3600; - time -= hours * 3600; - minutes = time / 60; - time -= minutes * 60; + int time = mapTime / 35; + hours = time / 3600; time -= hours * 3600; + minutes = time / 60; time -= minutes * 60; seconds = time; if(!IS_NETGAME) @@ -979,7 +972,7 @@ void IN_DrawDMStats(void) for(i = 0; i < 7; ++i) { - FR_DrawTextXY3(killersText[i], 10, 80 + 9 * i, ALIGN_TOPLEFT, DTF_ONLY_SHADOW); + FR_DrawCharXY3(killersText[i], 10, 80 + 9 * i, ALIGN_TOPLEFT, DTF_ONLY_SHADOW); } DGL_Disable(DGL_TEXTURE_2D);