mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
- use the backend's GameTicRate in the scripts where applicable.
This should replace TICRATE globally as it is the backend's actual ticking speed (still locked to 35, though.)
This commit is contained in:
parent
aa16fefd88
commit
e0d8241a50
9 changed files with 15 additions and 13 deletions
|
@ -1011,6 +1011,7 @@ CCMD(undocolorpic)
|
|||
DEFINE_GLOBAL(menuactive)
|
||||
DEFINE_GLOBAL(BackbuttonTime)
|
||||
DEFINE_GLOBAL(BackbuttonAlpha)
|
||||
DEFINE_GLOBAL(GameTicRate)
|
||||
|
||||
DEFINE_FIELD(DMenu, mParentMenu)
|
||||
DEFINE_FIELD(DMenu, mMouseCapture);
|
||||
|
|
|
@ -49,6 +49,7 @@ struct _ native // These are the global variables, the struct is only here to av
|
|||
native int LocalViewPitch;
|
||||
native readonly @MusPlayingInfo musplaying;
|
||||
native readonly bool generic_ui;
|
||||
native readonly int GameTicRate;
|
||||
|
||||
// sandbox state in multi-level setups:
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ class Menu : Object native ui version("2.4")
|
|||
}
|
||||
else if (ev.type == UIEvent.Type_MouseMove)
|
||||
{
|
||||
BackbuttonTime = 4*Thinker.TICRATE;
|
||||
BackbuttonTime = 4*GameTicRate;
|
||||
if (mMouseCapture || m_use_mouse == 1)
|
||||
{
|
||||
res = MouseEventBack(MOUSE_Move, ev.MouseX, y);
|
||||
|
|
|
@ -74,7 +74,7 @@ class ReadThisMenu : GenericMenu
|
|||
}
|
||||
|
||||
screen.Dim(0, 1.0, 0,0, screen.GetWidth(), screen.GetHeight());
|
||||
alpha = MIN((gametic - mInfoTic) * (3. / Thinker.TICRATE), 1.);
|
||||
alpha = MIN((gametic - mInfoTic) * (3. / GameTicRate), 1.);
|
||||
if (alpha < 1. && prevpic.IsValid())
|
||||
{
|
||||
screen.DrawTexture (prevpic, false, 0, 0, DTA_Fullscreen, true);
|
||||
|
|
|
@ -633,7 +633,7 @@ class StatusScreen abstract play version("2.5")
|
|||
|
||||
bool autoSkip()
|
||||
{
|
||||
return wi_autoadvance > 0 && bcnt > (wi_autoadvance * Thinker.TICRATE);
|
||||
return wi_autoadvance > 0 && bcnt > (wi_autoadvance * GameTicRate);
|
||||
}
|
||||
|
||||
//====================================================================
|
||||
|
@ -703,7 +703,7 @@ class StatusScreen abstract play version("2.5")
|
|||
|
||||
CurState = ShowNextLoc;
|
||||
acceleratestage = 0;
|
||||
cnt = SHOWNEXTLOCDELAY * Thinker.TICRATE;
|
||||
cnt = SHOWNEXTLOCDELAY * GameTicRate;
|
||||
noautostartmap = bg.LoadBackground(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class CoopStatusScreen : StatusScreen
|
|||
FontScale = max(screen.GetHeight() / 400, 1);
|
||||
RowHeight = int(max((displayFont.GetHeight() + 1) * FontScale, 1));
|
||||
|
||||
cnt_pause = Thinker.TICRATE;
|
||||
cnt_pause = GameTicRate;
|
||||
|
||||
for (int i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
|
@ -236,7 +236,7 @@ class CoopStatusScreen : StatusScreen
|
|||
if (!--cnt_pause)
|
||||
{
|
||||
ng_state++;
|
||||
cnt_pause = Thinker.TICRATE;
|
||||
cnt_pause = GameTicRate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ class DeathmatchStatusScreen : StatusScreen
|
|||
total_deaths = 0;
|
||||
|
||||
ng_state = 1;
|
||||
cnt_pause = Thinker.TICRATE;
|
||||
cnt_pause = GameTicRate;
|
||||
|
||||
for (i=0 ; i<MAXPLAYERS ; i++)
|
||||
{
|
||||
|
@ -144,7 +144,7 @@ class DeathmatchStatusScreen : StatusScreen
|
|||
if (!--cnt_pause)
|
||||
{
|
||||
ng_state++;
|
||||
cnt_pause = Thinker.TICRATE;
|
||||
cnt_pause = GameTicRate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ class DoomStatusScreen : StatusScreen
|
|||
sp_state = 1;
|
||||
cnt_kills[0] = cnt_items[0] = cnt_secret[0] = -1;
|
||||
cnt_time = cnt_par = -1;
|
||||
cnt_pause = Thinker.TICRATE;
|
||||
cnt_pause = GameTicRate;
|
||||
|
||||
cnt_total_time = -1;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class DoomStatusScreen : StatusScreen
|
|||
cnt_items[0] = Plrs[me].sitems;
|
||||
cnt_secret[0] = Plrs[me].ssecret;
|
||||
cnt_time = Thinker.Tics2Seconds(Plrs[me].stime);
|
||||
cnt_par = wbs.partime / Thinker.TICRATE;
|
||||
cnt_par = wbs.partime / GameTicRate;
|
||||
cnt_total_time = Thinker.Tics2Seconds(wbs.totaltime);
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ class DoomStatusScreen : StatusScreen
|
|||
if (!intermissioncounter || cnt_total_time >= tsec)
|
||||
cnt_total_time = tsec;
|
||||
|
||||
int psec = wbs.partime / Thinker.TICRATE;
|
||||
int psec = wbs.partime / GameTicRate;
|
||||
if (!intermissioncounter || cnt_par >= psec)
|
||||
{
|
||||
cnt_par = psec;
|
||||
|
@ -126,7 +126,7 @@ class DoomStatusScreen : StatusScreen
|
|||
if (!--cnt_pause)
|
||||
{
|
||||
sp_state++;
|
||||
cnt_pause = Thinker.TICRATE;
|
||||
cnt_pause = GameTicRate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -800,7 +800,7 @@ class AltHud ui
|
|||
|
||||
if (showMillis)
|
||||
{
|
||||
int millis = (Level.time % Thinker.TICRATE) * (1000 / Thinker.TICRATE);
|
||||
int millis = (Level.time % GameTicRate) * 1000 / GameTicRate;
|
||||
timeString = String.Format("%02i:%02i:%02i.%03i", hours, minutes, seconds, millis);
|
||||
}
|
||||
else if (showSeconds)
|
||||
|
|
Loading…
Reference in a new issue