mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-26 00:40:56 +00:00
Hopefully fix overwritesprite issues
This commit is contained in:
parent
664596e369
commit
3b40420b84
4 changed files with 24 additions and 18 deletions
|
@ -15,10 +15,29 @@ void overwritesprite(int thex, int they, short tilenum, signed char shade, char
|
||||||
(char)(((flags & 1 ^ 1) << 4) + (flags & 2) + ((flags & 4) >> 2) + ((flags & 16) >> 2) ^ ((flags & 8) >> 1)),
|
(char)(((flags & 1 ^ 1) << 4) + (flags & 2) + ((flags & 4) >> 2) + ((flags & 16) >> 2) ^ ((flags & 8) >> 1)),
|
||||||
windowx1, windowy1, windowx2, windowy2);
|
windowx1, windowy1, windowx2, windowy2);
|
||||||
#endif
|
#endif
|
||||||
|
// no animation
|
||||||
|
uint8_t animbak = picanm[tilenum].sf;
|
||||||
|
picanm[tilenum].sf = 0;
|
||||||
|
int offx = 0, offy = 0;
|
||||||
|
if (stat & 1)
|
||||||
|
{
|
||||||
|
offx -= tilesiz[tilenum].x>>1;
|
||||||
|
if (stat & 8)
|
||||||
|
offx += picanm[tilenum].xofs;
|
||||||
|
else
|
||||||
|
offx -= picanm[tilenum].xofs;
|
||||||
|
offy -= (tilesiz[tilenum].y>>1)+picanm[tilenum].yofs;
|
||||||
|
}
|
||||||
|
if (stat&8)
|
||||||
|
offx += tilesiz[tilenum].x;
|
||||||
|
if (stat&16)
|
||||||
|
offy += tilesiz[tilenum].y;
|
||||||
|
thex += offx;
|
||||||
|
they += offy;
|
||||||
rotatesprite(thex << 16, they << 16, 65536L, (stat & 8) << 7, tilenum, shade, dapalnum,
|
rotatesprite(thex << 16, they << 16, 65536L, (stat & 8) << 7, tilenum, shade, dapalnum,
|
||||||
(((stat & 1) ^ 1) << 4) + (stat & 2) + ((stat & 4) >> 2) + (((stat & 16) >> 2) ^ ((stat & 8) >> 1)),
|
16 + (stat & 2) + ((stat & 4) >> 2) + (((stat & 16) >> 2) ^ ((stat & 8) >> 1)),
|
||||||
windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y);
|
windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y);
|
||||||
|
picanm[tilenum].sf = animbak;
|
||||||
}
|
}
|
||||||
|
|
||||||
void permanentwritesprite(int thex, int they, short tilenum, signed char shade, int cx1, int cy1, int cx2, int cy2, char dapalnum)
|
void permanentwritesprite(int thex, int they, short tilenum, signed char shade, int cx1, int cy1, int cx2, int cy2, char dapalnum)
|
||||||
|
|
|
@ -703,9 +703,9 @@ void faketimerhandler()
|
||||||
{
|
{
|
||||||
if ((totalclock < ototalclock + 1) || bInMove)
|
if ((totalclock < ototalclock + 1) || bInMove)
|
||||||
return;
|
return;
|
||||||
ototalclock += 1;
|
ototalclock++;
|
||||||
|
|
||||||
if (moveframes < 4)
|
if (!(ototalclock&3) && moveframes < 4)
|
||||||
moveframes++;
|
moveframes++;
|
||||||
|
|
||||||
PlayerInterruptKeys();
|
PlayerInterruptKeys();
|
||||||
|
|
|
@ -513,7 +513,7 @@ void menu_DoPlasma()
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw the fire urn/lamp thingies
|
// draw the fire urn/lamp thingies
|
||||||
int dword_9AB5F = ((totalclock - ((totalclock >> 31) + 16 * (totalclock >> 31))) >> 4) & 3;
|
int dword_9AB5F = (totalclock/16) & 3;
|
||||||
|
|
||||||
overwritesprite(50, 150, kTile3512 + dword_9AB5F, 0, 3, kPalNormal);
|
overwritesprite(50, 150, kTile3512 + dword_9AB5F, 0, 3, kPalNormal);
|
||||||
overwritesprite(270, 150, kTile3512 + ((dword_9AB5F + 2) & 3), 0, 3, kPalNormal);
|
overwritesprite(270, 150, kTile3512 + ((dword_9AB5F + 2) & 3), 0, 3, kPalNormal);
|
||||||
|
|
|
@ -343,19 +343,6 @@ void seq_DrawStatusSequence(short nSequence, uint16_t edx, short ebx)
|
||||||
laststatusx = ChunkXpos[nFrameBase] + 160;
|
laststatusx = ChunkXpos[nFrameBase] + 160;
|
||||||
laststatusy = ChunkYpos[nFrameBase] + 100 + ebx;
|
laststatusy = ChunkYpos[nFrameBase] + 100 + ebx;
|
||||||
|
|
||||||
int thex = laststatusx;
|
|
||||||
int they = laststatusy;
|
|
||||||
|
|
||||||
if (laststatusx >= 155 && laststatusx <= 162) {
|
|
||||||
laststatusx = 159;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TEMP
|
|
||||||
if (laststatusy == 188 && laststatusx == 159)
|
|
||||||
laststatusy = 189;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
short chunkFlag = ChunkFlag[nFrameBase];
|
short chunkFlag = ChunkFlag[nFrameBase];
|
||||||
|
|
||||||
if (chunkFlag & 1) {
|
if (chunkFlag & 1) {
|
||||||
|
|
Loading…
Reference in a new issue