mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
Only use TEXT_GAMETEXTNUMHACK on internal gametext calls that benefit from it.
git-svn-id: https://svn.eduke32.com/eduke32@6211 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
611031d9e8
commit
cd792277d3
5 changed files with 19 additions and 17 deletions
|
@ -883,12 +883,12 @@ nextdemo_nomenu:
|
||||||
{
|
{
|
||||||
char buf[32];
|
char buf[32];
|
||||||
Bsprintf(buf, "RC:%4d TC:%5d", ud.reccnt, g_demo_cnt);
|
Bsprintf(buf, "RC:%4d TC:%5d", ud.reccnt, g_demo_cnt);
|
||||||
gametext_center(100, buf);
|
gametext_center_number(100, buf);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
j=g_demo_cnt/REALGAMETICSPERSEC;
|
j=g_demo_cnt/REALGAMETICSPERSEC;
|
||||||
Bsprintf(buf, "%02d:%02d", j/60, j%60);
|
Bsprintf(buf, "%02d:%02d", j/60, j%60);
|
||||||
gametext_bits(18, 16, buf, 1024);
|
gametext_widenumber(18, 16, buf);
|
||||||
|
|
||||||
rotatesprite(60<<16,16<<16,32768,0,SLIDEBAR,0,0,2+8+16+1024,0,0,(xdim*95)/320,ydim-1);
|
rotatesprite(60<<16,16<<16,32768,0,SLIDEBAR,0,0,2+8+16+1024,0,0,(xdim*95)/320,ydim-1);
|
||||||
rotatesprite(90<<16,16<<16,32768,0,SLIDEBAR,0,0,2+8+16+1024,(xdim*95)/320,0,(xdim*125)/320,ydim-1);
|
rotatesprite(90<<16,16<<16,32768,0,SLIDEBAR,0,0,2+8+16+1024,(xdim*95)/320,0,(xdim*125)/320,ydim-1);
|
||||||
|
@ -900,7 +900,7 @@ nextdemo_nomenu:
|
||||||
|
|
||||||
j=(g_demo_totalCnt-g_demo_cnt)/REALGAMETICSPERSEC;
|
j=(g_demo_totalCnt-g_demo_cnt)/REALGAMETICSPERSEC;
|
||||||
Bsprintf(buf, "-%02d:%02d%s", j/60, j%60, g_demo_paused?" ^15PAUSED":"");
|
Bsprintf(buf, "-%02d:%02d%s", j/60, j%60, g_demo_paused?" ^15PAUSED":"");
|
||||||
gametext_bits(194, 16, buf, 1024);
|
gametext_widenumber(194, 16, buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -358,7 +358,7 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef EDUKE32_TOUCH_DEVICES
|
#ifndef EDUKE32_TOUCH_DEVICES
|
||||||
if (statustext) gametext_center(180, statustext);
|
if (statustext) gametext_center_number(180, statustext);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (percent != -1)
|
if (percent != -1)
|
||||||
|
@ -404,7 +404,7 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent)
|
||||||
}
|
}
|
||||||
|
|
||||||
menutext_center(105,"Loading...");
|
menutext_center(105,"Loading...");
|
||||||
if (statustext) gametext_center(180, statustext);
|
if (statustext) gametext_center_number(180, statustext);
|
||||||
VM_OnEventWithReturn(EVENT_DISPLAYLOADINGSCREEN, g_player[screenpeek].ps->i, screenpeek, percent);
|
VM_OnEventWithReturn(EVENT_DISPLAYLOADINGSCREEN, g_player[screenpeek].ps->i, screenpeek, percent);
|
||||||
nextpage();
|
nextpage();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2312,7 +2312,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
if (g_player[myconnectindex].ps->player_par > 0)
|
if (g_player[myconnectindex].ps->player_par > 0)
|
||||||
{
|
{
|
||||||
G_PrintYourTime();
|
G_PrintYourTime();
|
||||||
gametext((320>>2)+71, yy+9, tempbuf);
|
gametext_number((320>>2)+71, yy+9, tempbuf);
|
||||||
if (g_player[myconnectindex].ps->player_par < ud.playerbest)
|
if (g_player[myconnectindex].ps->player_par < ud.playerbest)
|
||||||
gametext((320>>2)+89+(clockpad*24), yy+9, "New record!");
|
gametext((320>>2)+89+(clockpad*24), yy+9, "New record!");
|
||||||
}
|
}
|
||||||
|
@ -2325,13 +2325,13 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
if (g_mapInfo[G_LastMapInfoIndex()].partime)
|
if (g_mapInfo[G_LastMapInfoIndex()].partime)
|
||||||
{
|
{
|
||||||
G_PrintParTime();
|
G_PrintParTime();
|
||||||
gametext((320>>2)+71, yy+9, tempbuf);
|
gametext_number((320>>2)+71, yy+9, tempbuf);
|
||||||
yy+=10;
|
yy+=10;
|
||||||
}
|
}
|
||||||
if (!NAM_WW2GI && !DUKEBETA && g_mapInfo[G_LastMapInfoIndex()].designertime)
|
if (!NAM_WW2GI && !DUKEBETA && g_mapInfo[G_LastMapInfoIndex()].designertime)
|
||||||
{
|
{
|
||||||
G_PrintDesignerTime();
|
G_PrintDesignerTime();
|
||||||
gametext((320>>2)+71, yy+9, tempbuf);
|
gametext_number((320>>2)+71, yy+9, tempbuf);
|
||||||
yy+=10;
|
yy+=10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2339,7 +2339,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
if (ud.playerbest > 0)
|
if (ud.playerbest > 0)
|
||||||
{
|
{
|
||||||
G_PrintBestTime();
|
G_PrintBestTime();
|
||||||
gametext((320>>2)+71, yy+9, tempbuf);
|
gametext_number((320>>2)+71, yy+9, tempbuf);
|
||||||
yy+=10;
|
yy+=10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2369,7 +2369,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
S_PlaySound(PIPEBOMB_EXPLODE);
|
S_PlaySound(PIPEBOMB_EXPLODE);
|
||||||
}
|
}
|
||||||
Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->actors_killed);
|
Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->actors_killed);
|
||||||
gametext((320>>2)+70, yy+9, tempbuf);
|
gametext_number((320>>2)+70, yy+9, tempbuf);
|
||||||
yy += 10;
|
yy += 10;
|
||||||
if (ud.player_skill > 3)
|
if (ud.player_skill > 3)
|
||||||
{
|
{
|
||||||
|
@ -2381,7 +2381,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
if ((g_player[myconnectindex].ps->max_actors_killed-g_player[myconnectindex].ps->actors_killed) < 0)
|
if ((g_player[myconnectindex].ps->max_actors_killed-g_player[myconnectindex].ps->actors_killed) < 0)
|
||||||
Bsprintf(tempbuf, "%-3d", 0);
|
Bsprintf(tempbuf, "%-3d", 0);
|
||||||
else Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->max_actors_killed-g_player[myconnectindex].ps->actors_killed);
|
else Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->max_actors_killed-g_player[myconnectindex].ps->actors_killed);
|
||||||
gametext((320>>2)+70, yy+9, tempbuf);
|
gametext_number((320>>2)+70, yy+9, tempbuf);
|
||||||
yy += 10;
|
yy += 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2405,7 +2405,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
S_PlaySound(PIPEBOMB_EXPLODE);
|
S_PlaySound(PIPEBOMB_EXPLODE);
|
||||||
}
|
}
|
||||||
Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->secret_rooms);
|
Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->secret_rooms);
|
||||||
gametext((320>>2)+70, yy+9, tempbuf);
|
gametext_number((320>>2)+70, yy+9, tempbuf);
|
||||||
yy += 10;
|
yy += 10;
|
||||||
#if 0
|
#if 0
|
||||||
// Always overwritten.
|
// Always overwritten.
|
||||||
|
@ -2413,7 +2413,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
Bsprintf(tempbuf, "%-3d%%", (100*g_player[myconnectindex].ps->secret_rooms/g_player[myconnectindex].ps->max_secret_rooms));
|
Bsprintf(tempbuf, "%-3d%%", (100*g_player[myconnectindex].ps->secret_rooms/g_player[myconnectindex].ps->max_secret_rooms));
|
||||||
#endif
|
#endif
|
||||||
Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->max_secret_rooms-g_player[myconnectindex].ps->secret_rooms);
|
Bsprintf(tempbuf, "%-3d", g_player[myconnectindex].ps->max_secret_rooms-g_player[myconnectindex].ps->secret_rooms);
|
||||||
gametext((320>>2)+70, yy+9, tempbuf);
|
gametext_number((320>>2)+70, yy+9, tempbuf);
|
||||||
yy += 10;
|
yy += 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -924,11 +924,11 @@ void G_PrintGameText(int32_t tile, int32_t x, int32_t y, const char *t,
|
||||||
|
|
||||||
void gametext_(int32_t x, int32_t y, int32_t z, const char *t, int32_t s, int32_t p, int32_t o, int32_t a, int32_t f)
|
void gametext_(int32_t x, int32_t y, int32_t z, const char *t, int32_t s, int32_t p, int32_t o, int32_t a, int32_t f)
|
||||||
{
|
{
|
||||||
G_ScreenText(STARTALPHANUM, x, y, z, 0, 0, t, s, p, o|2|8|16|ROTATESPRITE_FULL16, a, 5<<16, 8<<16, 0, 0, f|TEXT_GAMETEXTNUMHACK, 0, 0, xdim-1, ydim-1);
|
G_ScreenText(STARTALPHANUM, x, y, z, 0, 0, t, s, p, o|2|8|16|ROTATESPRITE_FULL16, a, 5<<16, 8<<16, 0, 0, f, 0, 0, xdim-1, ydim-1);
|
||||||
}
|
}
|
||||||
void gametext_simple(int32_t x, int32_t y, const char *t)
|
void gametext_simple(int32_t x, int32_t y, const char *t)
|
||||||
{
|
{
|
||||||
G_ScreenText(STARTALPHANUM, x, y, 65536, 0, 0, t, 0, 0, 2|8|16|ROTATESPRITE_FULL16, 0, 5<<16, 8<<16, 0, 0, TEXT_GAMETEXTNUMHACK, 0, 0, xdim-1, ydim-1);
|
G_ScreenText(STARTALPHANUM, x, y, 65536, 0, 0, t, 0, 0, 2|8|16|ROTATESPRITE_FULL16, 0, 5<<16, 8<<16, 0, 0, 0, 0, 0, xdim-1, ydim-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t G_GameTextLen(int32_t x, const char *t)
|
int32_t G_GameTextLen(int32_t x, const char *t)
|
||||||
|
@ -938,7 +938,7 @@ int32_t G_GameTextLen(int32_t x, const char *t)
|
||||||
if (t == NULL)
|
if (t == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
dim = G_ScreenTextSize(STARTALPHANUM, x, 0, textsc(65536L), 0, t, 2, 5, 8, 0, 0, TEXT_GAMETEXTNUMHACK, 0, 0, xdim-1, ydim-1);
|
dim = G_ScreenTextSize(STARTALPHANUM, x, 0, textsc(65536L), 0, t, 2, 5, 8, 0, 0, 0, 0, 0, xdim-1, ydim-1);
|
||||||
|
|
||||||
x += dim.x;
|
x += dim.x;
|
||||||
|
|
||||||
|
|
|
@ -69,9 +69,11 @@ extern int32_t textsc(int32_t sc);
|
||||||
#define menutext(x, y, t) menutext_((x), (y), 0, (t), 10|16, 0)
|
#define menutext(x, y, t) menutext_((x), (y), 0, (t), 10|16, 0)
|
||||||
#define menutext_center(y, t) menutext_(160<<16, (y)<<16, 0, (t), 10|16, TEXT_XCENTER)
|
#define menutext_center(y, t) menutext_(160<<16, (y)<<16, 0, (t), 10|16, TEXT_XCENTER)
|
||||||
#define gametext(x, y, t) gametext_simple((x)<<16, (y)<<16, (t))
|
#define gametext(x, y, t) gametext_simple((x)<<16, (y)<<16, (t))
|
||||||
#define gametext_bits(x, y, t, o) gametext_((x)<<16, (y)<<16, 65536, (t), 0, 0, (o), 0, 0)
|
#define gametext_widenumber(x, y, t) gametext_((x)<<16, (y)<<16, 65536, (t), 0, 0, 1024, 0, TEXT_GAMETEXTNUMHACK)
|
||||||
|
#define gametext_number(x, y, t) gametext_((x)<<16, (y)<<16, 65536, (t), 0, 0, 0, 0, TEXT_GAMETEXTNUMHACK)
|
||||||
#define gametext_pal(x, y, t, p) gametext_((x)<<16, (y)<<16, 65536, (t), 0, (p), 0, 0, 0)
|
#define gametext_pal(x, y, t, p) gametext_((x)<<16, (y)<<16, 65536, (t), 0, (p), 0, 0, 0)
|
||||||
#define gametext_center(y, t) gametext_(160<<16, (y)<<16, 65536, (t), 0, 0, 0, 0, TEXT_XCENTER)
|
#define gametext_center(y, t) gametext_(160<<16, (y)<<16, 65536, (t), 0, 0, 0, 0, TEXT_XCENTER)
|
||||||
|
#define gametext_center_number(y, t) gametext_(160<<16, (y)<<16, 65536, (t), 0, 0, 0, 0, TEXT_XCENTER|TEXT_GAMETEXTNUMHACK)
|
||||||
#define gametext_center_shade(y, t, s) gametext_(160<<16, (y)<<16, 65536, (t), (s), 0, 0, 0, TEXT_XCENTER)
|
#define gametext_center_shade(y, t, s) gametext_(160<<16, (y)<<16, 65536, (t), (s), 0, 0, 0, TEXT_XCENTER)
|
||||||
#define gametext_center_shade_pal(y, t, s, p) gametext_(160<<16, (y)<<16, 65536, (t), (s), (p), 0, 0, TEXT_XCENTER)
|
#define gametext_center_shade_pal(y, t, s, p) gametext_(160<<16, (y)<<16, 65536, (t), (s), (p), 0, 0, TEXT_XCENTER)
|
||||||
#define gametext_center_shade_pal_alpha(y, t, s, p, a) gametext_(160<<16, (y)<<16, 65536, (t), (s), (p), 0, (a), TEXT_XCENTER)
|
#define gametext_center_shade_pal_alpha(y, t, s, p, a) gametext_(160<<16, (y)<<16, 65536, (t), (s), (p), 0, (a), TEXT_XCENTER)
|
||||||
|
|
Loading…
Reference in a new issue