mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-14 00:21:38 +00:00
- cleanup
This commit is contained in:
parent
1e24c4a22c
commit
a3a8286857
4 changed files with 14 additions and 14 deletions
|
@ -565,13 +565,14 @@ void drawoverheadmap(int cposx, int cposy, int czoom, int cang)
|
||||||
// calculate size of 3D viewport.
|
// calculate size of 3D viewport.
|
||||||
// Fixme: this needs to be adjusted to the new status bar code,
|
// Fixme: this needs to be adjusted to the new status bar code,
|
||||||
// once the status bar is a persistent queriable object
|
// once the status bar is a persistent queriable object
|
||||||
|
// (it should also be moved out of the game code then.
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void updateviewport(void)
|
void updateviewport(void)
|
||||||
{
|
{
|
||||||
ud.screen_size = clamp(ud.screen_size, 0, 64);
|
ud.screen_size = clamp(ud.screen_size, 0, 64);
|
||||||
const int32_t ss = std::max(ud.screen_size - 8, 0);
|
int ss = std::max(ud.screen_size - 8, 0);
|
||||||
|
|
||||||
int x1 = scale(ss, xdim, 160);
|
int x1 = scale(ss, xdim, 160);
|
||||||
int x2 = xdim - x1;
|
int x2 = xdim - x1;
|
||||||
|
|
|
@ -34,7 +34,7 @@ int G_FindLevelByFile(const char *fileName);
|
||||||
void G_CacheMapData(void);
|
void G_CacheMapData(void);
|
||||||
void G_NewGame(int volumeNum, int levelNum, int skillNum);
|
void G_NewGame(int volumeNum, int levelNum, int skillNum);
|
||||||
void G_ResetTimers(uint8_t keepgtics);
|
void G_ResetTimers(uint8_t keepgtics);
|
||||||
void G_UpdateScreenArea(void);
|
void updateviewport(void);
|
||||||
void pickrandomspot(int playerNum);
|
void pickrandomspot(int playerNum);
|
||||||
void resetinventory(int playerNum);
|
void resetinventory(int playerNum);
|
||||||
void P_ResetPlayer(int playerNum);
|
void P_ResetPlayer(int playerNum);
|
||||||
|
@ -43,7 +43,6 @@ void resetweapons(int playerNum);
|
||||||
void resetprestat(int snum, int g);
|
void resetprestat(int snum, int g);
|
||||||
void G_ClearFIFO(void);
|
void G_ClearFIFO(void);
|
||||||
void G_ResetInterpolations(void);
|
void G_ResetInterpolations(void);
|
||||||
extern int32_t fragbarheight(void);
|
|
||||||
void setmapfog(int fogtype);
|
void setmapfog(int fogtype);
|
||||||
void G_InitRRRASkies(void);
|
void G_InitRRRASkies(void);
|
||||||
void prelevel_common(int g);
|
void prelevel_common(int g);
|
||||||
|
|
|
@ -1219,14 +1219,14 @@ void GameInterface::set_hud_layout(int layout)
|
||||||
ud.screen_size = RR? screen_size_vals_rr[layout] : screen_size_vals[layout];
|
ud.screen_size = RR? screen_size_vals_rr[layout] : screen_size_vals[layout];
|
||||||
ud.statusbarmode = layout >= 8;
|
ud.statusbarmode = layout >= 8;
|
||||||
ud.althud = layout >= 10;
|
ud.althud = layout >= 10;
|
||||||
G_UpdateScreenArea();
|
updateviewport();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameInterface::set_hud_scale(int scale)
|
void GameInterface::set_hud_scale(int scale)
|
||||||
{
|
{
|
||||||
ud.statusbarscale = clamp(scale, 36, 100);
|
ud.statusbarscale = clamp(scale, 36, 100);
|
||||||
G_UpdateScreenArea();
|
updateviewport();
|
||||||
}
|
}
|
||||||
|
|
||||||
void G_HandleLocalKeys(void)
|
void G_HandleLocalKeys(void)
|
||||||
|
@ -1257,7 +1257,7 @@ void G_HandleLocalKeys(void)
|
||||||
hud_scale = hud_scale + 4;
|
hud_scale = hud_scale + 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
G_UpdateScreenArea();
|
updateviewport();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buttonMap.ButtonDown(gamefunc_Shrink_Screen))
|
if (buttonMap.ButtonDown(gamefunc_Shrink_Screen))
|
||||||
|
@ -1276,7 +1276,7 @@ void G_HandleLocalKeys(void)
|
||||||
hud_scale = hud_scale - 4;
|
hud_scale = hud_scale - 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
G_UpdateScreenArea();
|
updateviewport();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1394,7 +1394,7 @@ void G_HandleLocalKeys(void)
|
||||||
ud.last_overhead = ud.overhead_on;
|
ud.last_overhead = ud.overhead_on;
|
||||||
ud.overhead_on = 0;
|
ud.overhead_on = 0;
|
||||||
ud.scrollmode = 0;
|
ud.scrollmode = 0;
|
||||||
G_UpdateScreenArea();
|
updateviewport();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1414,7 +1414,7 @@ void G_HandleLocalKeys(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
restorepalette = 1;
|
restorepalette = 1;
|
||||||
G_UpdateScreenArea();
|
updateviewport();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1631,7 +1631,7 @@ static int G_EndOfLevel(void)
|
||||||
{
|
{
|
||||||
int32_t i = ud.screen_size;
|
int32_t i = ud.screen_size;
|
||||||
ud.screen_size = 0;
|
ud.screen_size = 0;
|
||||||
G_UpdateScreenArea();
|
updateviewport();
|
||||||
ud.screen_size = i;
|
ud.screen_size = i;
|
||||||
|
|
||||||
G_BonusScreen(0);
|
G_BonusScreen(0);
|
||||||
|
@ -1968,7 +1968,7 @@ MAIN_LOOP_RESTART:
|
||||||
goto MAIN_LOOP_RESTART;
|
goto MAIN_LOOP_RESTART;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else G_UpdateScreenArea();
|
else updateviewport();
|
||||||
|
|
||||||
// G_GameExit(" "); ///
|
// G_GameExit(" "); ///
|
||||||
|
|
||||||
|
@ -2217,7 +2217,7 @@ void GameInterface::FreeGameData()
|
||||||
|
|
||||||
void GameInterface::UpdateScreenSize()
|
void GameInterface::UpdateScreenSize()
|
||||||
{
|
{
|
||||||
G_UpdateScreenArea();
|
updateviewport();
|
||||||
}
|
}
|
||||||
|
|
||||||
::GameInterface* CreateInterface()
|
::GameInterface* CreateInterface()
|
||||||
|
|
|
@ -384,8 +384,8 @@ int G_EnterLevel(int gameMode)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
G_DoLoadScreen(msg, -1);
|
G_DoLoadScreen(msg, -1);
|
||||||
G_UpdateScreenArea();
|
|
||||||
*/
|
*/
|
||||||
|
updateviewport();
|
||||||
int res = LoadTheMap(mi, pPlayer, gameMode);
|
int res = LoadTheMap(mi, pPlayer, gameMode);
|
||||||
if (res != 0) return res;
|
if (res != 0) return res;
|
||||||
|
|
||||||
|
@ -482,7 +482,7 @@ int G_EnterLevel(int gameMode)
|
||||||
|
|
||||||
restorepalette = -1;
|
restorepalette = -1;
|
||||||
|
|
||||||
G_UpdateScreenArea();
|
updateviewport();
|
||||||
videoClearViewableArea(0L);
|
videoClearViewableArea(0L);
|
||||||
drawbackground();
|
drawbackground();
|
||||||
G_DrawRooms(myconnectindex,65536);
|
G_DrawRooms(myconnectindex,65536);
|
||||||
|
|
Loading…
Reference in a new issue