mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
rotatesprite(..., windowx1,windowy1,windowx2,windowy2) --> rotatesprite_win
git-svn-id: https://svn.eduke32.com/eduke32@2318 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
43c5fc2f34
commit
103ee7a40b
4 changed files with 48 additions and 46 deletions
|
@ -602,6 +602,11 @@ static inline void rotatesprite_fs(int32_t sx, int32_t sy, int32_t z, int16_t a,
|
|||
rotatesprite(sx, sy, z, a, picnum, dashade, dapalnum, dastat, 0,0,xdim-1,ydim-1);
|
||||
}
|
||||
|
||||
static inline void rotatesprite_win(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum, int8_t dashade, char dapalnum, int32_t dastat)
|
||||
{
|
||||
rotatesprite(sx, sy, z, a, picnum, dashade, dapalnum, dastat, windowx1,windowy1,windowx2,windowy2);
|
||||
}
|
||||
|
||||
void bfirst_search_init(int16_t *list, uint8_t *bitmap, int32_t *eltnumptr, int32_t maxnum, int16_t firstelt);
|
||||
void bfirst_search_try(int16_t *list, uint8_t *bitmap, int32_t *eltnumptr, int16_t elt);
|
||||
|
||||
|
|
|
@ -9518,9 +9518,7 @@ static void m32_osdsetfunctions(void)
|
|||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
#endif // defined DUKEOSD
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -679,8 +679,8 @@ void G_DrawTile(int32_t x, int32_t y, int32_t tilenum, int32_t shade, int32_t or
|
|||
if (orientation&4)
|
||||
a = 1024;
|
||||
|
||||
rotatesprite((orientation&ROTATESPRITE_MAX)?x:(x<<16),(orientation&ROTATESPRITE_MAX)?y:(y<<16),
|
||||
65536L,a,tilenum,shade,p,2|orientation,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win((orientation&ROTATESPRITE_MAX)?x:(x<<16),(orientation&ROTATESPRITE_MAX)?y:(y<<16),
|
||||
65536L,a,tilenum,shade,p,2|orientation);
|
||||
}
|
||||
|
||||
void G_DrawTilePal(int32_t x, int32_t y, int32_t tilenum, int32_t shade, int32_t orientation, int32_t p)
|
||||
|
@ -690,8 +690,8 @@ void G_DrawTilePal(int32_t x, int32_t y, int32_t tilenum, int32_t shade, int32_t
|
|||
if (orientation&4)
|
||||
a = 1024;
|
||||
|
||||
rotatesprite((orientation&ROTATESPRITE_MAX)?x:(x<<16),(orientation&ROTATESPRITE_MAX)?y:(y<<16),
|
||||
65536L,a,tilenum,shade,p,2|orientation,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win((orientation&ROTATESPRITE_MAX)?x:(x<<16),(orientation&ROTATESPRITE_MAX)?y:(y<<16),
|
||||
65536L,a,tilenum,shade,p,2|orientation);
|
||||
}
|
||||
|
||||
void G_DrawTileSmall(int32_t x, int32_t y, int32_t tilenum, int32_t shade, int32_t orientation)
|
||||
|
@ -701,8 +701,8 @@ void G_DrawTileSmall(int32_t x, int32_t y, int32_t tilenum, int32_t shade, int32
|
|||
if (orientation&4)
|
||||
a = 1024;
|
||||
|
||||
rotatesprite((orientation&ROTATESPRITE_MAX)?x:(x<<16),(orientation&ROTATESPRITE_MAX)?y:(y<<16),
|
||||
32768L,a,tilenum,shade,p,2|orientation,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win((orientation&ROTATESPRITE_MAX)?x:(x<<16),(orientation&ROTATESPRITE_MAX)?y:(y<<16),
|
||||
32768L,a,tilenum,shade,p,2|orientation);
|
||||
}
|
||||
|
||||
void G_DrawTilePalSmall(int32_t x, int32_t y, int32_t tilenum, int32_t shade, int32_t orientation, int32_t p)
|
||||
|
@ -712,8 +712,8 @@ void G_DrawTilePalSmall(int32_t x, int32_t y, int32_t tilenum, int32_t shade, in
|
|||
if (orientation&4)
|
||||
a = 1024;
|
||||
|
||||
rotatesprite((orientation&ROTATESPRITE_MAX)?x:(x<<16),(orientation&ROTATESPRITE_MAX)?y:(y<<16),
|
||||
32768L,a,tilenum,shade,p,2|orientation,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win((orientation&ROTATESPRITE_MAX)?x:(x<<16),(orientation&ROTATESPRITE_MAX)?y:(y<<16),
|
||||
32768L,a,tilenum,shade,p,2|orientation);
|
||||
}
|
||||
|
||||
#define POLYMOSTTRANS (1)
|
||||
|
@ -1044,32 +1044,32 @@ static void G_DrawInventory(DukePlayer_t *p)
|
|||
switch (n&(1<<j))
|
||||
{
|
||||
case 1:
|
||||
rotatesprite(xoff<<16,y<<16,65536L,0,FIRSTAID_ICON,0,0,2+16,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win(xoff<<16,y<<16,65536L,0,FIRSTAID_ICON,0,0,2+16);
|
||||
break;
|
||||
case 2:
|
||||
rotatesprite((xoff+1)<<16,y<<16,65536L,0,STEROIDS_ICON,0,0,2+16,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win((xoff+1)<<16,y<<16,65536L,0,STEROIDS_ICON,0,0,2+16);
|
||||
break;
|
||||
case 4:
|
||||
rotatesprite((xoff+2)<<16,y<<16,65536L,0,HOLODUKE_ICON,0,0,2+16,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win((xoff+2)<<16,y<<16,65536L,0,HOLODUKE_ICON,0,0,2+16);
|
||||
break;
|
||||
case 8:
|
||||
rotatesprite(xoff<<16,y<<16,65536L,0,JETPACK_ICON,0,0,2+16,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win(xoff<<16,y<<16,65536L,0,JETPACK_ICON,0,0,2+16);
|
||||
break;
|
||||
case 16:
|
||||
rotatesprite(xoff<<16,y<<16,65536L,0,HEAT_ICON,0,0,2+16,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win(xoff<<16,y<<16,65536L,0,HEAT_ICON,0,0,2+16);
|
||||
break;
|
||||
case 32:
|
||||
rotatesprite(xoff<<16,y<<16,65536L,0,AIRTANK_ICON,0,0,2+16,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win(xoff<<16,y<<16,65536L,0,AIRTANK_ICON,0,0,2+16);
|
||||
break;
|
||||
case 64:
|
||||
rotatesprite(xoff<<16,(y-1)<<16,65536L,0,BOOT_ICON,0,0,2+16,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win(xoff<<16,(y-1)<<16,65536L,0,BOOT_ICON,0,0,2+16);
|
||||
break;
|
||||
}
|
||||
|
||||
xoff += 22;
|
||||
|
||||
if (p->inven_icon == j+1)
|
||||
rotatesprite((xoff-2)<<16,(y+19)<<16,65536L,1024,ARROW,-32,0,2+16,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win((xoff-2)<<16,(y+19)<<16,65536L,1024,ARROW,-32,0,2+16);
|
||||
}
|
||||
|
||||
j++;
|
||||
|
@ -2449,9 +2449,8 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
|||
if (j < 22000) j = 22000;
|
||||
else if (j > (65536<<1)) j = (65536<<1);
|
||||
|
||||
rotatesprite((x1<<4)+(xdim<<15),(y1<<4)+(ydim<<15),j,daang,i,sprite[g_player[p].ps->i].shade,
|
||||
(g_player[p].ps->cursectnum > -1)?sector[g_player[p].ps->cursectnum].floorpal:0,
|
||||
0,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win((x1<<4)+(xdim<<15),(y1<<4)+(ydim<<15),j,daang,i,sprite[g_player[p].ps->i].shade,
|
||||
(g_player[p].ps->cursectnum > -1)?sector[g_player[p].ps->cursectnum].floorpal:0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2865,8 +2864,8 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
if (apScriptGameEvent[EVENT_DISPLAYCROSSHAIR])
|
||||
VM_OnEvent(EVENT_DISPLAYCROSSHAIR, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||
if (aGameVars[g_iReturnVarID].val.lValue == 0)
|
||||
rotatesprite((160L-(g_player[myconnectindex].ps->look_ang>>1))<<16,100L<<16,scale(65536,ud.crosshairscale,100),
|
||||
0,CROSSHAIR,0,CROSSHAIR_PAL,2+1,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win((160L-(g_player[myconnectindex].ps->look_ang>>1))<<16,100L<<16,scale(65536,ud.crosshairscale,100),
|
||||
0,CROSSHAIR,0, CROSSHAIR_PAL,2+1);
|
||||
}
|
||||
#if 0
|
||||
if (GametypeFlags[ud.coop] & GAMETYPE_TDM)
|
||||
|
@ -2877,7 +2876,7 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
{
|
||||
j = min(max((G_GetAngleDelta(getangle(g_player[i].ps->pos.x-g_player[myconnectindex].ps->pos.x,
|
||||
g_player[i].ps->pos.y-g_player[myconnectindex].ps->pos.y),g_player[myconnectindex].ps->ang))>>1,-160),160);
|
||||
rotatesprite((160-j)<<16,100L<<16,65536L,0,DUKEICON,0,0,2+1,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win((160-j)<<16,100L<<16,65536L,0,DUKEICON,0,0,2+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3673,7 +3672,7 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
|
|||
i = sintable[i+512]*8 + sintable[i]*5;
|
||||
if ((1-ud.detail) == 0) i >>= 1;
|
||||
i>>=(tiltcs-1); // JBF 20030807
|
||||
rotatesprite(160<<16,100<<16,i,tang+512,TILE_TILT,0,0,4+2+64,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win(160<<16,100<<16,i,tang+512,TILE_TILT,0,0,4+2+64);
|
||||
walock[TILE_TILT] = 199;
|
||||
}
|
||||
}
|
||||
|
@ -11673,19 +11672,19 @@ static void G_DrawCameraText(int16_t i)
|
|||
|
||||
if (!T1)
|
||||
{
|
||||
rotatesprite(24<<16,33<<16,65536L,0,CAMCORNER,0,0,2,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite((320-26)<<16,34<<16,65536L,0,CAMCORNER+1,0,0,2,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite(22<<16,163<<16,65536L,512,CAMCORNER+1,0,0,2+4,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite((310-10)<<16,163<<16,65536L,512,CAMCORNER+1,0,0,2,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win(24<<16,33<<16,65536L,0,CAMCORNER,0,0,2);
|
||||
rotatesprite_win((320-26)<<16,34<<16,65536L,0,CAMCORNER+1,0,0,2);
|
||||
rotatesprite_win(22<<16,163<<16,65536L,512,CAMCORNER+1,0,0,2+4);
|
||||
rotatesprite_win((310-10)<<16,163<<16,65536L,512,CAMCORNER+1,0,0,2);
|
||||
if (totalclock&16)
|
||||
rotatesprite(46<<16,32<<16,65536L,0,CAMLIGHT,0,0,2,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win(46<<16,32<<16,65536L,0,CAMLIGHT,0,0,2);
|
||||
}
|
||||
else
|
||||
{
|
||||
flipbits = (totalclock<<1)&48;
|
||||
for (x=0; x<394; x+=64)
|
||||
for (y=0; y<200; y+=64)
|
||||
rotatesprite(x<<16,y<<16,65536L,0,STATIC,0,0,2+flipbits,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win(x<<16,y<<16,65536L,0,STATIC,0,0,2+flipbits);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2016,9 +2016,9 @@ static void G_DrawTileScaled(int32_t x, int32_t y, int32_t tilenum, int32_t shad
|
|||
if (getrendermode() >= 3 && usemodels && md_tilehasmodel(tilenum,p) > 0)
|
||||
y += (224-weapsc(224));
|
||||
#endif
|
||||
rotatesprite(weapsc((orientation&1024)?x:(x<<16))+((xoff-weapsc(xoff))<<16),
|
||||
rotatesprite_win(weapsc((orientation&1024)?x:(x<<16))+((xoff-weapsc(xoff))<<16),
|
||||
weapsc((orientation&1024)?y:(y<<16))+((200-weapsc(200))<<16),
|
||||
weapsc(65536L),a,tilenum,shade,p,(2|orientation),windowx1,windowy1,windowx2,windowy2);
|
||||
weapsc(65536L),a,tilenum,shade,p,(2|orientation));
|
||||
}
|
||||
|
||||
static void G_DrawWeaponTile(int32_t x, int32_t y, int32_t tilenum, int32_t shade, int32_t orientation, int32_t p, uint8_t slot)
|
||||
|
@ -2067,9 +2067,9 @@ static void G_DrawWeaponTile(int32_t x, int32_t y, int32_t tilenum, int32_t shad
|
|||
case HANDREMOTE_WEAPON:
|
||||
case HANDBOMB_WEAPON:
|
||||
case SHOTGUN_WEAPON:
|
||||
rotatesprite(160<<16,(180+(g_player[screenpeek].ps->weapon_pos*g_player[screenpeek].ps->weapon_pos))<<16,
|
||||
rotatesprite_win(160<<16,(180+(g_player[screenpeek].ps->weapon_pos*g_player[screenpeek].ps->weapon_pos))<<16,
|
||||
scale(65536,ud.statusbarscale,100),0,g_currentweapon==GROW_WEAPON?GROWSPRITEICON:WeaponPickupSprites[g_currentweapon],
|
||||
0,0,2,windowx1,windowy1,windowx2,windowy2);
|
||||
0,0,2);
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
|
@ -2225,8 +2225,8 @@ void P_DisplayScuba(int32_t snum)
|
|||
|
||||
if (g_player[snum].ps->scuba_on)
|
||||
{
|
||||
rotatesprite(43<<16,(200-tilesizy[SCUBAMASK])<<16,65536,0,SCUBAMASK,0,p,2+16,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite((320-43)<<16,(200-tilesizy[SCUBAMASK])<<16,65536,1024,SCUBAMASK,0,p,2+4+16,windowx1,windowy1,windowx2,windowy2);
|
||||
rotatesprite_win(43<<16,(200-tilesizy[SCUBAMASK])<<16,65536,0,SCUBAMASK,0,p,2+16);
|
||||
rotatesprite_win((320-43)<<16,(200-tilesizy[SCUBAMASK])<<16,65536,1024,SCUBAMASK,0,p,2+4+16);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue