mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Fake multi: fix display of item percentage and on/off states.
git-svn-id: https://svn.eduke32.com/eduke32@2935 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
5e6642df2a
commit
dc3a523eed
4 changed files with 18 additions and 13 deletions
|
@ -150,8 +150,12 @@ void yax_drawrooms(void (*SpriteAnimFunc)(int32_t,int32_t,int32_t,int32_t),
|
|||
// max x/y val (= max editorgridextent in Mapster32)
|
||||
#define BXY_MAX 524288
|
||||
|
||||
// ROTATESPRITE_MAX-1 is the mask of all externally available orientation bits
|
||||
#define ROTATESPRITE_MAX 2048
|
||||
enum {
|
||||
// ROTATESPRITE_MAX-1 is the mask of all externally available orientation bits
|
||||
ROTATESPRITE_MAX = 2048,
|
||||
|
||||
RS_CENTERORIGIN = (1<<30),
|
||||
};
|
||||
|
||||
//Make all variables in BUILD.H defined in the ENGINE,
|
||||
//and externed in GAME
|
||||
|
|
|
@ -6918,7 +6918,7 @@ void dorotspr_handle_bit2(int32_t *sxptr, int32_t *syptr, int32_t *z, int32_t da
|
|||
else if ((dastat & 256) == 0)
|
||||
sx += (oxdim-xdim)<<15;
|
||||
|
||||
if (dastat&(1<<29))
|
||||
if (dastat&RS_CENTERORIGIN)
|
||||
sx += oxdim<<15;
|
||||
|
||||
zoomsc = scale(xdim, ouryxaspect, 320);
|
||||
|
@ -13635,7 +13635,7 @@ void rotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum,
|
|||
if ((tilesizx[picnum] <= 0) || (tilesizy[picnum] <= 0)) return;
|
||||
|
||||
// Experimental / development bits. ONLY FOR INTERNAL USE!
|
||||
// bit (1<<29): see dorotspr_handle_bit2
|
||||
// bit RS_CENTERORIGIN: see dorotspr_handle_bit2
|
||||
////////////////////
|
||||
|
||||
if (((dastat&128) == 0) || (numpages < 2) || (beforedrawrooms != 0))
|
||||
|
|
|
@ -493,7 +493,7 @@ int32_t minitext_(int32_t x,int32_t y,const char *t,int32_t s,int32_t p,int32_t
|
|||
char ch, cmode;
|
||||
|
||||
cmode = (sb&ROTATESPRITE_MAX)!=0;
|
||||
sb &= ROTATESPRITE_MAX-1;
|
||||
sb &= (ROTATESPRITE_MAX-1)|RS_CENTERORIGIN;
|
||||
|
||||
if (t == NULL)
|
||||
{
|
||||
|
@ -1335,16 +1335,17 @@ static void G_DrawStatusBar(int32_t snum)
|
|||
else
|
||||
{
|
||||
// ORIGINAL MINI STATUS BAR
|
||||
int32_t orient = 10+16+256 + (g_fakeMultiMode && snum==1)*(1<<29);
|
||||
int32_t orient = 2+8+16+256 + (g_fakeMultiMode && snum==1)*RS_CENTERORIGIN;
|
||||
|
||||
rotatesprite_fs(sbarx(5),sbary(200-28),sb16,0,HEALTHBOX,0,21,orient);
|
||||
if (p->inven_icon)
|
||||
rotatesprite_fs(sbarx(69),sbary(200-30),sb16,0,INVENTORYBOX,0,21,orient);
|
||||
|
||||
// health
|
||||
if (sprite[p->i].pal == 1 && p->last_extra < 2) // frozen
|
||||
G_DrawDigiNum(20,200-17,1,-16,orient);
|
||||
else G_DrawDigiNum(20,200-17,p->last_extra,-16,orient);
|
||||
{
|
||||
int32_t health = (sprite[p->i].pal == 1 && p->last_extra < 2) ? 1 : p->last_extra;
|
||||
G_DrawDigiNum(20, 200-17, health, -16, orient);
|
||||
}
|
||||
|
||||
rotatesprite_fs(sbarx(37),sbary(200-28),sb16,0,AMMOBOX,0,21,orient);
|
||||
|
||||
|
@ -1356,13 +1357,13 @@ static void G_DrawStatusBar(int32_t snum)
|
|||
permbit = 0;
|
||||
if (p->inven_icon)
|
||||
{
|
||||
// orient += permbit;
|
||||
// orient |= permbit;
|
||||
|
||||
i = ((unsigned)p->inven_icon < 8) ? item_icons[p->inven_icon] : -1;
|
||||
if (i >= 0)
|
||||
rotatesprite_fs(sbarx(231-o),sbary(200-21),sb16,0,i,0,0, orient);
|
||||
|
||||
if (!g_fakeMultiMode)
|
||||
// scale by status bar size
|
||||
orient |= ROTATESPRITE_MAX;
|
||||
|
||||
minitext(292-30-o,190,"%",6, orient);
|
||||
|
|
|
@ -2598,7 +2598,7 @@ nullquote:
|
|||
OSD_Printf(CON_ERROR "null quote %d\n",g_errorLineNum,keyw[g_tw],q);
|
||||
continue;
|
||||
}
|
||||
minitextshade(x,y,ScriptQuotes[q],shade,pal,26);
|
||||
minitextshade(x,y,ScriptQuotes[q],shade,pal, 2+8+16);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue