mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-14 00:21:38 +00:00
- removed the last uses of the original rotatesprite function.
This commit is contained in:
parent
2a3f7a48c9
commit
a4a26ef6bc
3 changed files with 15 additions and 44 deletions
|
@ -42,7 +42,6 @@ enum
|
||||||
|
|
||||||
|
|
||||||
int movesprite(short spritenum, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask);
|
int movesprite(short spritenum, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask);
|
||||||
void overwritesprite(int thex, int they, short tilenum, signed char shade, char stat, char dapalnum, int basepal = 0);
|
|
||||||
void precache();
|
void precache();
|
||||||
void resettiming();
|
void resettiming();
|
||||||
|
|
||||||
|
|
|
@ -27,33 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
||||||
|
|
||||||
void overwritesprite(int thex, int they, short tilenum, signed char shade, char stat, char dapalnum, int basepal)
|
|
||||||
{
|
|
||||||
// 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 += tileLeftOffset(tilenum);
|
|
||||||
else
|
|
||||||
offx -= tileLeftOffset(tilenum);
|
|
||||||
offy -= (tilesiz[tilenum].y>>1)+tileTopOffset(tilenum);
|
|
||||||
}
|
|
||||||
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,
|
|
||||||
16 + (stat & 2) + ((stat & 4) >> 2) + (((stat & 16) >> 2) ^ ((stat & 8) >> 1)),
|
|
||||||
windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y, nullptr, basepal);
|
|
||||||
picanm[tilenum].sf = animbak;
|
|
||||||
}
|
|
||||||
|
|
||||||
void resettiming()
|
void resettiming()
|
||||||
{
|
{
|
||||||
numframes = 0L;
|
numframes = 0L;
|
||||||
|
|
|
@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
|
#include "glbackend/glbackend.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
|
@ -373,7 +374,7 @@ void seq_DrawPilotLightSeq(int xOffset, int yOffset)
|
||||||
int x = ChunkXpos[nFrameBase] + (160 + xOffset);
|
int x = ChunkXpos[nFrameBase] + (160 + xOffset);
|
||||||
int y = ChunkYpos[nFrameBase] + (100 + yOffset);
|
int y = ChunkYpos[nFrameBase] + (100 + yOffset);
|
||||||
|
|
||||||
rotatesprite(x << 16, y << 16, 0x10000, (-2 * fix16_to_int(nPlayerDAng)) & kAngleMask, nTile, -127, 1, 2, windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y);
|
hud_drawsprite(x, y, 65536, (-2 * fix16_to_int(nPlayerDAng)) & kAngleMask, nTile, 0, 0, 1);
|
||||||
nFrameBase++;
|
nFrameBase++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -388,10 +389,10 @@ void seq_DrawPilotLightSeq(int xOffset, int yOffset)
|
||||||
|
|
||||||
int seq_DrawGunSequence(int nSeqOffset, short dx, int xOffs, int yOffs, int nShade, int nPal)
|
int seq_DrawGunSequence(int nSeqOffset, short dx, int xOffs, int yOffs, int nShade, int nPal)
|
||||||
{
|
{
|
||||||
short nFrame = SeqBase[nSeqOffset] + dx;
|
int nFrame = SeqBase[nSeqOffset] + dx;
|
||||||
short nFrameBase = FrameBase[nFrame];
|
int nFrameBase = FrameBase[nFrame];
|
||||||
short nFrameSize = FrameSize[nFrame];
|
int nFrameSize = FrameSize[nFrame];
|
||||||
short frameFlag = FrameFlag[nFrame];
|
int frameFlag = FrameFlag[nFrame];
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
@ -399,29 +400,27 @@ int seq_DrawGunSequence(int nSeqOffset, short dx, int xOffs, int yOffs, int nSha
|
||||||
if (nFrameSize < 0)
|
if (nFrameSize < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
uint8_t nStat = 3;
|
|
||||||
int x = ChunkXpos[nFrameBase] + 160;
|
int x = ChunkXpos[nFrameBase] + 160;
|
||||||
int y = ChunkYpos[nFrameBase] + 100;
|
int y = ChunkYpos[nFrameBase] + 100;
|
||||||
|
|
||||||
if (ChunkFlag[nFrameBase] & 1) {
|
int stat = 0;
|
||||||
nStat = 11;
|
if (ChunkFlag[nFrameBase] & 1)
|
||||||
}
|
stat |= RS_XFLIPHUD;
|
||||||
|
|
||||||
if (ChunkFlag[nFrameBase] & 2) {
|
if (ChunkFlag[nFrameBase] & 2)
|
||||||
nStat |= 0x10;
|
stat |= RS_YFLIPHUD;
|
||||||
}
|
|
||||||
|
|
||||||
short nTile = ChunkPict[nFrameBase];
|
short nTile = ChunkPict[nFrameBase];
|
||||||
|
|
||||||
if (frameFlag & 4) {
|
if (frameFlag & 4)
|
||||||
nShade = -100;
|
nShade = -100;
|
||||||
}
|
|
||||||
|
|
||||||
|
double alpha = 1;
|
||||||
if (nPlayerInvisible[nLocalPlayer]) {
|
if (nPlayerInvisible[nLocalPlayer]) {
|
||||||
nStat |= 0x4;
|
alpha = 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
overwritesprite(x + xOffs, y + yOffs, nTile, nShade, nStat, nPal);
|
hud_drawsprite(x + xOffs, y + yOffs, 65536, 0, nTile, nShade, nPal, stat, alpha);
|
||||||
nFrameBase++;
|
nFrameBase++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue