mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 11:40:44 +00:00
Replace the drawing code for the level stats with nearly equivalent code that can be much more easily reproduced in CON.
git-svn-id: https://svn.eduke32.com/eduke32@5054 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
30669ab8ce
commit
92afedcb11
2 changed files with 16 additions and 21 deletions
|
@ -285,6 +285,10 @@ int32_t textsc(int32_t sc)
|
||||||
else if (xdim <= 1024) return scale(sc,min(350,ud.textscale),100);
|
else if (xdim <= 1024) return scale(sc,min(350,ud.textscale),100);
|
||||||
return scale(sc,ud.textscale,100);
|
return scale(sc,ud.textscale,100);
|
||||||
}
|
}
|
||||||
|
static int32_t gtextsc(int32_t sc)
|
||||||
|
{
|
||||||
|
return scale(sc,ud.textscale,400);
|
||||||
|
}
|
||||||
|
|
||||||
static void G_PatchStatusBar(int32_t x1, int32_t y1, int32_t x2, int32_t y2)
|
static void G_PatchStatusBar(int32_t x1, int32_t y1, int32_t x2, int32_t y2)
|
||||||
{
|
{
|
||||||
|
@ -3841,31 +3845,26 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
G_PrintFPS();
|
G_PrintFPS();
|
||||||
|
|
||||||
// JBF 20040124: display level stats in screen corner
|
// JBF 20040124: display level stats in screen corner
|
||||||
if ((ud.overhead_on != 2 && ud.levelstats) && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0 && VM_OnEvent(EVENT_DISPLAYLEVELSTATS, g_player[myconnectindex].ps->i, myconnectindex) == 0)
|
if (ud.overhead_on != 2 && ud.levelstats && VM_OnEvent(EVENT_DISPLAYLEVELSTATS, g_player[myconnectindex].ps->i, myconnectindex) == 0)
|
||||||
{
|
{
|
||||||
DukePlayer_t const * const myps = g_player[myconnectindex].ps;
|
DukePlayer_t const * const myps = g_player[myconnectindex].ps;
|
||||||
|
|
||||||
|
i = 198<<16;
|
||||||
|
|
||||||
if (ud.screen_size == 4)
|
if (ud.screen_size == 4)
|
||||||
{
|
{
|
||||||
if (ud.althud == 2)
|
if (ud.althud != 2)
|
||||||
i = 2;
|
i -= sbarsc(ud.althud ? (tilesiz[BIGALPHANUM].y+8)<<16 : tilesiz[INVENTORYBOX].y<<16);
|
||||||
else i = sbarsc(ud.althud ? tilesiz[BIGALPHANUM].y+10 : tilesiz[INVENTORYBOX].y+2);
|
}
|
||||||
}
|
|
||||||
else if (ud.screen_size > 2)
|
else if (ud.screen_size > 2)
|
||||||
i = sbarsc(tilesiz[BOTTOMSTATUSBAR].y+1);
|
i -= sbarsc(tilesiz[BOTTOMSTATUSBAR].y<<16);
|
||||||
else
|
|
||||||
i = 2;
|
|
||||||
|
|
||||||
j = scale(2,ud.config.ScreenWidth,320);
|
|
||||||
|
|
||||||
|
|
||||||
Bsprintf(tempbuf,"T:^15%d:%02d.%02d",
|
Bsprintf(tempbuf,"T:^15%d:%02d.%02d",
|
||||||
(myps->player_par/(REALGAMETICSPERSEC*60)),
|
(myps->player_par/(REALGAMETICSPERSEC*60)),
|
||||||
(myps->player_par/REALGAMETICSPERSEC)%60,
|
(myps->player_par/REALGAMETICSPERSEC)%60,
|
||||||
((myps->player_par%REALGAMETICSPERSEC)*33)/10
|
((myps->player_par%REALGAMETICSPERSEC)*33)/10
|
||||||
);
|
);
|
||||||
G_PrintGameText(8+4+1,STARTALPHANUM, j,scale(200-i,ud.config.ScreenHeight,200)-textsc(21),
|
G_ScreenText(STARTALPHANUM, 2<<16, i-gtextsc(21<<16), gtextsc(65536), 0, 0, tempbuf, 0, 10, 2|8|16|256|ROTATESPRITE_FULL16, 0, 5<<16, 8<<16, 8<<16, 0, TEXT_XOFFSETZERO|TEXT_GAMETEXTNUMHACK, 0, 0, xdim-1, ydim-1);
|
||||||
tempbuf,0,10,26,0, 0, xdim-1, ydim-1, 65536, 0);
|
|
||||||
|
|
||||||
if (ud.player_skill > 3 || ((g_netServer || ud.multimode > 1) && !GTFLAGS(GAMETYPE_PLAYERSFRIENDLY)))
|
if (ud.player_skill > 3 || ((g_netServer || ud.multimode > 1) && !GTFLAGS(GAMETYPE_PLAYERSFRIENDLY)))
|
||||||
Bsprintf(tempbuf,"K:^15%d",(ud.multimode>1 &&!GTFLAGS(GAMETYPE_PLAYERSFRIENDLY))?
|
Bsprintf(tempbuf,"K:^15%d",(ud.multimode>1 &&!GTFLAGS(GAMETYPE_PLAYERSFRIENDLY))?
|
||||||
|
@ -3881,16 +3880,12 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
myps->max_actors_killed>myps->actors_killed?
|
myps->max_actors_killed>myps->actors_killed?
|
||||||
myps->max_actors_killed:myps->actors_killed);
|
myps->max_actors_killed:myps->actors_killed);
|
||||||
}
|
}
|
||||||
|
G_ScreenText(STARTALPHANUM, 2<<16, i-gtextsc(14<<16), gtextsc(65536), 0, 0, tempbuf, 0, 10, 2|8|16|256|ROTATESPRITE_FULL16, 0, 5<<16, 8<<16, 8<<16, 0, TEXT_XOFFSETZERO|TEXT_GAMETEXTNUMHACK, 0, 0, xdim-1, ydim-1);
|
||||||
G_PrintGameText(8+4+1,STARTALPHANUM, j,scale(200-i,ud.config.ScreenHeight,200)-textsc(14),
|
|
||||||
tempbuf,0,10,26,0, 0, xdim-1, ydim-1, 65536, 0);
|
|
||||||
|
|
||||||
if (myps->secret_rooms == myps->max_secret_rooms)
|
if (myps->secret_rooms == myps->max_secret_rooms)
|
||||||
Bsprintf(tempbuf,"S:%d/%d", myps->secret_rooms, myps->max_secret_rooms);
|
Bsprintf(tempbuf,"S:%d/%d", myps->secret_rooms, myps->max_secret_rooms);
|
||||||
else Bsprintf(tempbuf,"S:^15%d/%d", myps->secret_rooms, myps->max_secret_rooms);
|
else Bsprintf(tempbuf,"S:^15%d/%d", myps->secret_rooms, myps->max_secret_rooms);
|
||||||
|
G_ScreenText(STARTALPHANUM, 2<<16, i-gtextsc(7<<16), gtextsc(65536), 0, 0, tempbuf, 0, 10, 2|8|16|256|ROTATESPRITE_FULL16, 0, 5<<16, 8<<16, 8<<16, 0, TEXT_XOFFSETZERO|TEXT_GAMETEXTNUMHACK, 0, 0, xdim-1, ydim-1);
|
||||||
G_PrintGameText(8+4+1,STARTALPHANUM, j,scale(200-i,ud.config.ScreenHeight,200)-textsc(7),
|
|
||||||
tempbuf,0,10,26,0, 0, xdim-1, ydim-1, 65536, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_player[myconnectindex].gotvote == 0 && voting != -1 && voting != myconnectindex)
|
if (g_player[myconnectindex].gotvote == 0 && voting != -1 && voting != myconnectindex)
|
||||||
|
|
|
@ -495,7 +495,7 @@ static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( "Size:", &MF_R
|
||||||
static int32_t vpsize;
|
static int32_t vpsize;
|
||||||
static MenuRangeInt32_t MEO_SCREENSETUP_SCREENSIZE = MAKE_MENURANGE( &vpsize, &MF_Redfont, 12, 0, 0, 4, EnforceIntervals );
|
static MenuRangeInt32_t MEO_SCREENSETUP_SCREENSIZE = MAKE_MENURANGE( &vpsize, &MF_Redfont, 12, 0, 0, 4, EnforceIntervals );
|
||||||
static MenuEntry_t ME_SCREENSETUP_SCREENSIZE = MAKE_MENUENTRY( "Screen size:", &MF_Redfont, &MEF_BigOptions, &MEO_SCREENSETUP_SCREENSIZE, RangeInt32 );
|
static MenuEntry_t ME_SCREENSETUP_SCREENSIZE = MAKE_MENUENTRY( "Screen size:", &MF_Redfont, &MEF_BigOptions, &MEO_SCREENSETUP_SCREENSIZE, RangeInt32 );
|
||||||
static MenuRangeInt32_t MEO_SCREENSETUP_TEXTSIZE = MAKE_MENURANGE( &ud.textscale, &MF_Redfont, 100, 400, 0, 7, 2 );
|
static MenuRangeInt32_t MEO_SCREENSETUP_TEXTSIZE = MAKE_MENURANGE( &ud.textscale, &MF_Redfont, 100, 400, 0, 16, 2 );
|
||||||
static MenuEntry_t ME_SCREENSETUP_TEXTSIZE = MAKE_MENUENTRY( "Size:", &MF_Redfont, &MEF_BigOptions, &MEO_SCREENSETUP_TEXTSIZE, RangeInt32 );
|
static MenuEntry_t ME_SCREENSETUP_TEXTSIZE = MAKE_MENUENTRY( "Size:", &MF_Redfont, &MEF_BigOptions, &MEO_SCREENSETUP_TEXTSIZE, RangeInt32 );
|
||||||
static MenuOption_t MEO_SCREENSETUP_LEVELSTATS = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.levelstats);
|
static MenuOption_t MEO_SCREENSETUP_LEVELSTATS = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.levelstats);
|
||||||
static MenuEntry_t ME_SCREENSETUP_LEVELSTATS = MAKE_MENUENTRY( "Level stats:", &MF_Redfont, &MEF_BigOptions, &MEO_SCREENSETUP_LEVELSTATS, Option );
|
static MenuEntry_t ME_SCREENSETUP_LEVELSTATS = MAKE_MENUENTRY( "Level stats:", &MF_Redfont, &MEF_BigOptions, &MEO_SCREENSETUP_LEVELSTATS, Option );
|
||||||
|
|
Loading…
Reference in a new issue