mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Add TROR rendering
# Conflicts: # source/blood/src/mapedit.cpp # source/build/include/editor.h # source/build/include/polymer.h # source/build/src/build.cpp # source/build/src/polymer.cpp
This commit is contained in:
parent
1fe344d273
commit
107a630883
15 changed files with 91 additions and 50 deletions
|
@ -1273,7 +1273,8 @@ int dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef YAX_ENABLE
|
#ifdef YAX_ENABLE
|
||||||
yax_update(numyaxbunches > 0 ? 2 : 1);
|
// NUKE-TODO: Should be updated for new map format only
|
||||||
|
yax_update(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_loadedMapVersion = 7;
|
g_loadedMapVersion = 7;
|
||||||
|
|
|
@ -340,7 +340,7 @@ void sub_557C4(int x, int y, int interpolation)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawMirrors(int x, int y, int z, fix16_t a, fix16_t horiz)
|
void DrawMirrors(int x, int y, int z, fix16_t a, fix16_t horiz, int smooth)
|
||||||
{
|
{
|
||||||
if (videoGetRenderMode() == REND_POLYMER)
|
if (videoGetRenderMode() == REND_POLYMER)
|
||||||
return;
|
return;
|
||||||
|
@ -384,8 +384,14 @@ void DrawMirrors(int x, int y, int z, fix16_t a, fix16_t horiz)
|
||||||
{
|
{
|
||||||
renderPrepareMirror(x,y,z,a,horiz,nWall,&cx,&cy,&ca);
|
renderPrepareMirror(x,y,z,a,horiz,nWall,&cx,&cy,&ca);
|
||||||
}
|
}
|
||||||
renderDrawRoomsQ16(cx, cy, z, ca,horiz,mirrorsector|MAXSECTORS);
|
#ifdef POLYMER
|
||||||
viewProcessSprites(cx,cy,z);
|
if (videoGetRenderMode() == REND_POLYMER)
|
||||||
|
polymer_setanimatesprites(viewProcessSprites, cx, cy, z, fix16_to_int(ca), smooth);
|
||||||
|
#endif
|
||||||
|
yax_preparedrawrooms();
|
||||||
|
int32_t didmirror = renderDrawRoomsQ16(cx, cy, z, ca,horiz,mirrorsector|MAXSECTORS);
|
||||||
|
yax_drawrooms(viewProcessSprites, mirrorsector, didmirror, smooth);
|
||||||
|
viewProcessSprites(cx,cy,z,fix16_to_int(ca),smooth);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
if (GetWallType(nWall) != 501)
|
if (GetWallType(nWall) != 501)
|
||||||
renderCompleteMirror();
|
renderCompleteMirror();
|
||||||
|
@ -401,8 +407,14 @@ void DrawMirrors(int x, int y, int z, fix16_t a, fix16_t horiz)
|
||||||
r_rorphase = 1;
|
r_rorphase = 1;
|
||||||
#endif
|
#endif
|
||||||
int nSector = mirror[i].at4;
|
int nSector = mirror[i].at4;
|
||||||
|
#ifdef POLYMER
|
||||||
|
if (videoGetRenderMode() == REND_POLYMER)
|
||||||
|
polymer_setanimatesprites(viewProcessSprites, x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10, fix16_to_int(a), smooth);
|
||||||
|
#endif
|
||||||
|
yax_preparedrawrooms();
|
||||||
renderDrawRoomsQ16(x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10, a, horiz, nSector|MAXSECTORS);
|
renderDrawRoomsQ16(x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10, a, horiz, nSector|MAXSECTORS);
|
||||||
viewProcessSprites(x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10);
|
yax_drawrooms(viewProcessSprites, nSector, 0, smooth);
|
||||||
|
viewProcessSprites(x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10, fix16_to_int(a), smooth);
|
||||||
short fstat = sector[nSector].floorstat;
|
short fstat = sector[nSector].floorstat;
|
||||||
sector[nSector].floorstat |= 1;
|
sector[nSector].floorstat |= 1;
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
|
@ -420,8 +432,14 @@ void DrawMirrors(int x, int y, int z, fix16_t a, fix16_t horiz)
|
||||||
r_rorphase = 1;
|
r_rorphase = 1;
|
||||||
#endif
|
#endif
|
||||||
int nSector = mirror[i].at4;
|
int nSector = mirror[i].at4;
|
||||||
|
#ifdef POLYMER
|
||||||
|
if (videoGetRenderMode() == REND_POLYMER)
|
||||||
|
polymer_setanimatesprites(viewProcessSprites, x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10, fix16_to_int(a), smooth);
|
||||||
|
#endif
|
||||||
|
yax_preparedrawrooms();
|
||||||
renderDrawRoomsQ16(x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10, a, horiz, nSector|MAXSECTORS);
|
renderDrawRoomsQ16(x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10, a, horiz, nSector|MAXSECTORS);
|
||||||
viewProcessSprites(x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10);
|
yax_drawrooms(viewProcessSprites, nSector, 0, smooth);
|
||||||
|
viewProcessSprites(x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10, fix16_to_int(a), smooth);
|
||||||
short cstat = sector[nSector].ceilingstat;
|
short cstat = sector[nSector].ceilingstat;
|
||||||
sector[nSector].ceilingstat |= 1;
|
sector[nSector].ceilingstat |= 1;
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
|
|
|
@ -25,4 +25,4 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
void InitMirrors(void);
|
void InitMirrors(void);
|
||||||
void sub_5571C(char mode);
|
void sub_5571C(char mode);
|
||||||
void sub_557C4(int x, int y, int interpolation);
|
void sub_557C4(int x, int y, int interpolation);
|
||||||
void DrawMirrors(int x, int y, int z, fix16_t a, fix16_t horiz);
|
void DrawMirrors(int x, int y, int z, fix16_t a, fix16_t horiz, int smooth);
|
||||||
|
|
|
@ -2019,8 +2019,10 @@ uspritetype *viewAddEffect(int nTSprite, VIEW_EFFECT nViewEffect)
|
||||||
|
|
||||||
LOCATION gPrevSpriteLoc[kMaxSprites];
|
LOCATION gPrevSpriteLoc[kMaxSprites];
|
||||||
|
|
||||||
void viewProcessSprites(int cX, int cY, int cZ)
|
void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t smooth)
|
||||||
{
|
{
|
||||||
|
UNREFERENCED_PARAMETER(cA);
|
||||||
|
UNREFERENCED_PARAMETER(smooth);
|
||||||
dassert(spritesortcnt <= kMaxViewSprites);
|
dassert(spritesortcnt <= kMaxViewSprites);
|
||||||
int nViewSprites = spritesortcnt;
|
int nViewSprites = spritesortcnt;
|
||||||
for (int nTSprite = nViewSprites-1; nTSprite >= 0; nTSprite--)
|
for (int nTSprite = nViewSprites-1; nTSprite >= 0; nTSprite--)
|
||||||
|
@ -3169,21 +3171,27 @@ void viewDrawScreen(void)
|
||||||
vd0 = vc8+(8<<4);
|
vd0 = vc8+(8<<4);
|
||||||
}
|
}
|
||||||
v54 = ClipRange(v54, -200, 200);
|
v54 = ClipRange(v54, -200, 200);
|
||||||
|
#if 0
|
||||||
RORHACKOTHER:
|
RORHACKOTHER:
|
||||||
int ror_status[16];
|
int ror_status[16];
|
||||||
for (int i = 0; i < 16; i++)
|
for (int i = 0; i < 16; i++)
|
||||||
ror_status[i] = TestBitString(gotpic, 4080 + i);
|
ror_status[i] = TestBitString(gotpic, 4080 + i);
|
||||||
DrawMirrors(vd8, vd4, vd0, fix16_from_int(v50), fix16_from_int(v54 + defaultHoriz));
|
#endif
|
||||||
|
yax_preparedrawrooms();
|
||||||
|
DrawMirrors(vd8, vd4, vd0, fix16_from_int(v50), fix16_from_int(v54 + defaultHoriz), gInterpolate);
|
||||||
drawrooms(vd8, vd4, vd0, v50, v54 + defaultHoriz, vcc);
|
drawrooms(vd8, vd4, vd0, v50, v54 + defaultHoriz, vcc);
|
||||||
|
yax_drawrooms(viewProcessSprites, vcc, 0, gInterpolate);
|
||||||
|
#if 0
|
||||||
bool do_ror_hack = false;
|
bool do_ror_hack = false;
|
||||||
for (int i = 0; i < 16; i++)
|
for (int i = 0; i < 16; i++)
|
||||||
if (!ror_status[i] && TestBitString(gotpic, 4080 + i))
|
if (!ror_status[i] && TestBitString(gotpic, 4080 + i))
|
||||||
do_ror_hack = true;
|
do_ror_hack = true;
|
||||||
if (do_ror_hack)
|
if (do_ror_hack)
|
||||||
goto RORHACKOTHER;
|
goto RORHACKOTHER;
|
||||||
|
#endif
|
||||||
memcpy(otherMirrorGotpic, gotpic+510, 2);
|
memcpy(otherMirrorGotpic, gotpic+510, 2);
|
||||||
memcpy(gotpic+510, bakMirrorGotpic, 2);
|
memcpy(gotpic+510, bakMirrorGotpic, 2);
|
||||||
viewProcessSprites(vd8, vd4, vd0);
|
viewProcessSprites(vd8, vd4, vd0, v50, gInterpolate);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
renderRestoreTarget();
|
renderRestoreTarget();
|
||||||
}
|
}
|
||||||
|
@ -3243,12 +3251,14 @@ RORHACKOTHER:
|
||||||
cZ = vfc+(8<<8);
|
cZ = vfc+(8<<8);
|
||||||
}
|
}
|
||||||
q16horiz = ClipRange(q16horiz, F16(-200), F16(200));
|
q16horiz = ClipRange(q16horiz, F16(-200), F16(200));
|
||||||
|
#if 0
|
||||||
RORHACK:
|
RORHACK:
|
||||||
int ror_status[16];
|
int ror_status[16];
|
||||||
for (int i = 0; i < 16; i++)
|
for (int i = 0; i < 16; i++)
|
||||||
ror_status[i] = TestBitString(gotpic, 4080+i);
|
ror_status[i] = TestBitString(gotpic, 4080+i);
|
||||||
|
#endif
|
||||||
fix16_t deliriumPitchI = interpolate(fix16_from_int(deliriumPitchO), fix16_from_int(deliriumPitch), gInterpolate);
|
fix16_t deliriumPitchI = interpolate(fix16_from_int(deliriumPitchO), fix16_from_int(deliriumPitch), gInterpolate);
|
||||||
DrawMirrors(cX, cY, cZ, cA, q16horiz + fix16_from_int(defaultHoriz) + deliriumPitchI);
|
DrawMirrors(cX, cY, cZ, cA, q16horiz + fix16_from_int(defaultHoriz) + deliriumPitchI, gInterpolate);
|
||||||
int bakCstat = gView->pSprite->cstat;
|
int bakCstat = gView->pSprite->cstat;
|
||||||
if (gViewPos == 0)
|
if (gViewPos == 0)
|
||||||
{
|
{
|
||||||
|
@ -3258,7 +3268,15 @@ RORHACK:
|
||||||
{
|
{
|
||||||
gView->pSprite->cstat |= 514;
|
gView->pSprite->cstat |= 514;
|
||||||
}
|
}
|
||||||
|
#ifdef POLYMER
|
||||||
|
if (videoGetRenderMode() == REND_POLYMER)
|
||||||
|
polymer_setanimatesprites(viewProcessSprites, cX, cY, cZ, fix16_to_int(cA), gInterpolate);
|
||||||
|
#endif
|
||||||
|
yax_preparedrawrooms();
|
||||||
renderDrawRoomsQ16(cX, cY, cZ, cA, q16horiz + fix16_from_int(defaultHoriz) + deliriumPitchI, nSectnum);
|
renderDrawRoomsQ16(cX, cY, cZ, cA, q16horiz + fix16_from_int(defaultHoriz) + deliriumPitchI, nSectnum);
|
||||||
|
yax_drawrooms(viewProcessSprites, nSectnum, 0, gInterpolate);
|
||||||
|
viewProcessSprites(cX, cY, cZ, fix16_to_int(cA), gInterpolate);
|
||||||
|
#if 0
|
||||||
bool do_ror_hack = false;
|
bool do_ror_hack = false;
|
||||||
for (int i = 0; i < 16; i++)
|
for (int i = 0; i < 16; i++)
|
||||||
if (!ror_status[i] && TestBitString(gotpic, 4080+i))
|
if (!ror_status[i] && TestBitString(gotpic, 4080+i))
|
||||||
|
@ -3268,11 +3286,13 @@ RORHACK:
|
||||||
gView->pSprite->cstat = bakCstat;
|
gView->pSprite->cstat = bakCstat;
|
||||||
goto RORHACK;
|
goto RORHACK;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
viewProcessSprites(cX, cY, cZ);
|
if (videoGetRenderMode() == REND_CLASSIC)
|
||||||
|
{
|
||||||
sub_5571C(1);
|
sub_5571C(1);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
sub_5571C(0);
|
sub_5571C(0);
|
||||||
|
}
|
||||||
sub_557C4(cX, cY, gInterpolate);
|
sub_557C4(cX, cY, gInterpolate);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
gView->pSprite->cstat = bakCstat;
|
gView->pSprite->cstat = bakCstat;
|
||||||
|
|
|
@ -138,7 +138,7 @@ void UpdateFrame(void);
|
||||||
void viewDrawInterface(int arg);
|
void viewDrawInterface(int arg);
|
||||||
uspritetype *viewInsertTSprite(int nSector, int nStatnum, uspritetype *pSprite);
|
uspritetype *viewInsertTSprite(int nSector, int nStatnum, uspritetype *pSprite);
|
||||||
uspritetype *viewAddEffect(int nTSprite, VIEW_EFFECT nViewEffect);
|
uspritetype *viewAddEffect(int nTSprite, VIEW_EFFECT nViewEffect);
|
||||||
void viewProcessSprites(int cX, int cY, int cZ);
|
void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t smooth);
|
||||||
void CalcOtherPosition(spritetype *pSprite, int *pX, int *pY, int *pZ, int *vsectnum, int nAng, int zm);
|
void CalcOtherPosition(spritetype *pSprite, int *pX, int *pY, int *pZ, int *vsectnum, int nAng, int zm);
|
||||||
void CalcPosition(spritetype *pSprite, int *pX, int *pY, int *pZ, int *vsectnum, int nAng, int zm);
|
void CalcPosition(spritetype *pSprite, int *pX, int *pY, int *pZ, int *vsectnum, int nAng, int zm);
|
||||||
void viewSetMessage(const char *pMessage);
|
void viewSetMessage(const char *pMessage);
|
||||||
|
|
|
@ -220,7 +220,7 @@ static FORCE_INLINE CONSTEXPR int32_t yax_waltosecmask(int32_t const walclipmask
|
||||||
return ((walclipmask&1)<<9) | ((walclipmask&64)<<5);
|
return ((walclipmask&1)<<9) | ((walclipmask&64)<<5);
|
||||||
}
|
}
|
||||||
void yax_preparedrawrooms(void);
|
void yax_preparedrawrooms(void);
|
||||||
void yax_drawrooms(void (*SpriteAnimFunc)(int32_t,int32_t,int32_t,int32_t),
|
void yax_drawrooms(void (*SpriteAnimFunc)(int32_t,int32_t,int32_t,int32_t,int32_t),
|
||||||
int16_t sectnum, int32_t didmirror, int32_t smoothr);
|
int16_t sectnum, int32_t didmirror, int32_t smoothr);
|
||||||
# define YAX_SKIPSECTOR(i) if (graysectbitmap[(i)>>3]&pow2char[(i)&7]) continue
|
# define YAX_SKIPSECTOR(i) if (graysectbitmap[(i)>>3]&pow2char[(i)&7]) continue
|
||||||
# define YAX_SKIPWALL(i) if (graywallbitmap[(i)>>3]&pow2char[(i)&7]) continue
|
# define YAX_SKIPWALL(i) if (graywallbitmap[(i)>>3]&pow2char[(i)&7]) continue
|
||||||
|
|
|
@ -864,7 +864,7 @@ void yax_preparedrawrooms(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void yax_drawrooms(void (*SpriteAnimFunc)(int32_t,int32_t,int32_t,int32_t),
|
void yax_drawrooms(void (*SpriteAnimFunc)(int32_t,int32_t,int32_t,int32_t,int32_t),
|
||||||
int16_t sectnum, int32_t didmirror, int32_t smoothr)
|
int16_t sectnum, int32_t didmirror, int32_t smoothr)
|
||||||
{
|
{
|
||||||
static uint8_t havebunch[(YAX_MAXBUNCHES+7)>>3];
|
static uint8_t havebunch[(YAX_MAXBUNCHES+7)>>3];
|
||||||
|
@ -1085,7 +1085,7 @@ void yax_drawrooms(void (*SpriteAnimFunc)(int32_t,int32_t,int32_t,int32_t),
|
||||||
yax_globallev-YAX_MAXDRAWS, j, k, spritesortcnt,
|
yax_globallev-YAX_MAXDRAWS, j, k, spritesortcnt,
|
||||||
(double)(1000*(timerGetTicksU64()-t))/u64tickspersec);
|
(double)(1000*(timerGetTicksU64()-t))/u64tickspersec);
|
||||||
|
|
||||||
SpriteAnimFunc(globalposx, globalposy, globalang, smoothr);
|
SpriteAnimFunc(globalposx, globalposy, globalposz, globalang, smoothr);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2225,7 +2225,7 @@ static void ExtSE40Draw(int32_t spnum,int32_t x,int32_t y,int32_t z,int16_t a,in
|
||||||
}
|
}
|
||||||
|
|
||||||
drawrooms(x+offx,y+offy,z+offz,a,h,sprite[floor2].sectnum);
|
drawrooms(x+offx,y+offy,z+offz,a,h,sprite[floor2].sectnum);
|
||||||
ExtAnalyzeSprites(0,0,0,0);
|
ExtAnalyzeSprites(0,0,0,0,0);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
M32_ResetFakeRORTiles();
|
M32_ResetFakeRORTiles();
|
||||||
|
|
||||||
|
@ -2251,7 +2251,7 @@ static void ExtSE40Draw(int32_t spnum,int32_t x,int32_t y,int32_t z,int16_t a,in
|
||||||
|
|
||||||
// Now re-draw
|
// Now re-draw
|
||||||
drawrooms(x+offx,y+offy,z+offz,a,h,sprite[floor2].sectnum);
|
drawrooms(x+offx,y+offy,z+offz,a,h,sprite[floor2].sectnum);
|
||||||
ExtAnalyzeSprites(0,0,0,0);
|
ExtAnalyzeSprites(0,0,0,0,0);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
M32_ResetFakeRORTiles();
|
M32_ResetFakeRORTiles();
|
||||||
}
|
}
|
||||||
|
@ -10500,7 +10500,7 @@ void ExtPreCheckKeys(void) // just before drawrooms
|
||||||
videoEndDrawing(); //}}}
|
videoEndDrawing(); //}}}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExtAnalyzeSprites(int32_t ourx, int32_t oury, int32_t oura, int32_t smoothr)
|
void ExtAnalyzeSprites(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura, int32_t smoothr)
|
||||||
{
|
{
|
||||||
int32_t i, k;
|
int32_t i, k;
|
||||||
uspritetype *tspr;
|
uspritetype *tspr;
|
||||||
|
|
|
@ -543,7 +543,7 @@ static void G_SE40(int32_t smoothratio)
|
||||||
|
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
if (videoGetRenderMode() == REND_POLYMER)
|
if (videoGetRenderMode() == REND_POLYMER)
|
||||||
polymer_setanimatesprites(G_DoSpriteAnimations, CAMERA(pos.x), CAMERA(pos.y), fix16_to_int(CAMERA(q16ang)), smoothratio);
|
polymer_setanimatesprites(G_DoSpriteAnimations, CAMERA(pos.x), CAMERA(pos.y), CAMERA(pos.z), fix16_to_int(CAMERA(q16ang)), smoothratio);
|
||||||
#endif
|
#endif
|
||||||
renderDrawRoomsQ16(sprite[sprite2].x + x, sprite[sprite2].y + y,
|
renderDrawRoomsQ16(sprite[sprite2].x + x, sprite[sprite2].y + y,
|
||||||
z + renderz, CAMERA(q16ang), CAMERA(q16horiz), sect);
|
z + renderz, CAMERA(q16ang), CAMERA(q16horiz), sect);
|
||||||
|
@ -552,7 +552,7 @@ static void G_SE40(int32_t smoothratio)
|
||||||
if (drawing_ror == 2) // viewing from top
|
if (drawing_ror == 2) // viewing from top
|
||||||
G_OROR_DupeSprites(sp);
|
G_OROR_DupeSprites(sp);
|
||||||
|
|
||||||
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),fix16_to_int(CAMERA(q16ang)),smoothratio);
|
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),CAMERA(pos.z),fix16_to_int(CAMERA(q16ang)),smoothratio);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
if (level)
|
if (level)
|
||||||
|
@ -685,7 +685,7 @@ void G_HandleMirror(int32_t x, int32_t y, int32_t z, fix16_t a, fix16_t q16horiz
|
||||||
// XXX: Sprites don't get drawn with TROR/Polymost
|
// XXX: Sprites don't get drawn with TROR/Polymost
|
||||||
#endif
|
#endif
|
||||||
display_mirror = 1;
|
display_mirror = 1;
|
||||||
G_DoSpriteAnimations(tposx,tposy,fix16_to_int(tang),smoothratio);
|
G_DoSpriteAnimations(tposx,tposy,z,fix16_to_int(tang),smoothratio);
|
||||||
display_mirror = 0;
|
display_mirror = 0;
|
||||||
|
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
|
@ -820,12 +820,12 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
||||||
#endif
|
#endif
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
if (videoGetRenderMode() == REND_POLYMER)
|
if (videoGetRenderMode() == REND_POLYMER)
|
||||||
polymer_setanimatesprites(G_DoSpriteAnimations, pSprite->x, pSprite->y, fix16_to_int(CAMERA(q16ang)), smoothRatio);
|
polymer_setanimatesprites(G_DoSpriteAnimations, pSprite->x, pSprite->y, pSprite->z, fix16_to_int(CAMERA(q16ang)), smoothRatio);
|
||||||
#endif
|
#endif
|
||||||
yax_preparedrawrooms();
|
yax_preparedrawrooms();
|
||||||
renderDrawRoomsQ16(pSprite->x, pSprite->y, pSprite->z - ZOFFSET6, CAMERA(q16ang), fix16_from_int(pSprite->yvel), pSprite->sectnum);
|
renderDrawRoomsQ16(pSprite->x, pSprite->y, pSprite->z - ZOFFSET6, CAMERA(q16ang), fix16_from_int(pSprite->yvel), pSprite->sectnum);
|
||||||
yax_drawrooms(G_DoSpriteAnimations, pSprite->sectnum, 0, smoothRatio);
|
yax_drawrooms(G_DoSpriteAnimations, pSprite->sectnum, 0, smoothRatio);
|
||||||
G_DoSpriteAnimations(pSprite->x, pSprite->y, fix16_to_int(CAMERA(q16ang)), smoothRatio);
|
G_DoSpriteAnimations(pSprite->x, pSprite->y, pSprite->z, fix16_to_int(CAMERA(q16ang)), smoothRatio);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1083,7 +1083,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
||||||
#endif
|
#endif
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
if (videoGetRenderMode() == REND_POLYMER)
|
if (videoGetRenderMode() == REND_POLYMER)
|
||||||
polymer_setanimatesprites(G_DoSpriteAnimations, CAMERA(pos.x),CAMERA(pos.y),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
polymer_setanimatesprites(G_DoSpriteAnimations, CAMERA(pos.x),CAMERA(pos.y),CAMERA(pos.z),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
||||||
#endif
|
#endif
|
||||||
// for G_PrintCoords
|
// for G_PrintCoords
|
||||||
dr_viewingrange = viewingrange;
|
dr_viewingrange = viewingrange;
|
||||||
|
@ -1098,7 +1098,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
||||||
if ((unsigned)ror_sprite < MAXSPRITES && drawing_ror == 1) // viewing from bottom
|
if ((unsigned)ror_sprite < MAXSPRITES && drawing_ror == 1) // viewing from bottom
|
||||||
G_OROR_DupeSprites(&sprite[ror_sprite]);
|
G_OROR_DupeSprites(&sprite[ror_sprite]);
|
||||||
#endif
|
#endif
|
||||||
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),CAMERA(pos.z),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
||||||
#ifdef LEGACY_ROR
|
#ifdef LEGACY_ROR
|
||||||
drawing_ror = 0;
|
drawing_ror = 0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -3604,8 +3604,9 @@ static inline void G_DoEventAnimSprites(int tspriteNum)
|
||||||
spriteext[tsprOwner].tspr = NULL;
|
spriteext[tsprOwner].tspr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoothratio)
|
void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura, int32_t smoothratio)
|
||||||
{
|
{
|
||||||
|
UNREFERENCED_PARAMETER(ourz);
|
||||||
int32_t j, frameOffset, playerNum;
|
int32_t j, frameOffset, playerNum;
|
||||||
intptr_t l;
|
intptr_t l;
|
||||||
|
|
||||||
|
|
|
@ -389,7 +389,7 @@ const char* G_PrintBestTime(void);
|
||||||
void G_BonusScreen(int32_t bonusonly);
|
void G_BonusScreen(int32_t bonusonly);
|
||||||
//void G_CheatGetInv(void);
|
//void G_CheatGetInv(void);
|
||||||
void G_DisplayRest(int32_t smoothratio);
|
void G_DisplayRest(int32_t smoothratio);
|
||||||
void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoothratio);
|
void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura, int32_t smoothratio);
|
||||||
void G_DrawBackground(void);
|
void G_DrawBackground(void);
|
||||||
void G_DrawFrags(void);
|
void G_DrawFrags(void);
|
||||||
void G_HandleMirror(int32_t x, int32_t y, int32_t z, fix16_t a, fix16_t horiz, int32_t smoothratio);
|
void G_HandleMirror(int32_t x, int32_t y, int32_t z, fix16_t a, fix16_t horiz, int32_t smoothratio);
|
||||||
|
|
|
@ -1203,14 +1203,14 @@ LUNATIC_EXTERN void G_ShowView(vec3_t vec, fix16_t a, fix16_t horiz, int sect, i
|
||||||
G_HandleMirror(vec.x, vec.y, vec.z, a, horiz, smoothratio);
|
G_HandleMirror(vec.x, vec.y, vec.z, a, horiz, smoothratio);
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
if (videoGetRenderMode() == REND_POLYMER)
|
if (videoGetRenderMode() == REND_POLYMER)
|
||||||
polymer_setanimatesprites(G_DoSpriteAnimations, vec.x, vec.y, fix16_to_int(a), smoothratio);
|
polymer_setanimatesprites(G_DoSpriteAnimations, vec.x, vec.y, vec.z, fix16_to_int(a), smoothratio);
|
||||||
#endif
|
#endif
|
||||||
yax_preparedrawrooms();
|
yax_preparedrawrooms();
|
||||||
renderDrawRoomsQ16(vec.x, vec.y, vec.z, a, horiz, sect);
|
renderDrawRoomsQ16(vec.x, vec.y, vec.z, a, horiz, sect);
|
||||||
yax_drawrooms(G_DoSpriteAnimations, sect, 0, smoothratio);
|
yax_drawrooms(G_DoSpriteAnimations, sect, 0, smoothratio);
|
||||||
|
|
||||||
display_mirror = 2;
|
display_mirror = 2;
|
||||||
G_DoSpriteAnimations(vec.x, vec.y, fix16_to_int(a), smoothratio);
|
G_DoSpriteAnimations(vec.x, vec.y, vec.z, fix16_to_int(a), smoothratio);
|
||||||
display_mirror = 0;
|
display_mirror = 0;
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
G_RestoreInterpolations();
|
G_RestoreInterpolations();
|
||||||
|
|
|
@ -399,7 +399,7 @@ static void G_SetupCamTile(int spriteNum, int tileNum, int smoothRatio)
|
||||||
yax_drawrooms(G_DoSpriteAnimations, SECT(spriteNum), 0, smoothRatio);
|
yax_drawrooms(G_DoSpriteAnimations, SECT(spriteNum), 0, smoothRatio);
|
||||||
|
|
||||||
display_mirror = 3;
|
display_mirror = 3;
|
||||||
G_DoSpriteAnimations(camera.x, camera.y, SA(spriteNum), smoothRatio);
|
G_DoSpriteAnimations(camera.x, camera.y, camera.z, SA(spriteNum), smoothRatio);
|
||||||
display_mirror = saveMirror;
|
display_mirror = saveMirror;
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
|
|
|
@ -608,11 +608,11 @@ static void G_SE150_Draw(int32_t spnum, int32_t x, int32_t y, int32_t z, int32_t
|
||||||
i = floor2;
|
i = floor2;
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
if (videoGetRenderMode() == REND_POLYMER)
|
if (videoGetRenderMode() == REND_POLYMER)
|
||||||
polymer_setanimatesprites(G_DoSpriteAnimations, offx + sprite[i].x, offy + sprite[i].y, fix16_to_int(a), smoothratio);
|
polymer_setanimatesprites(G_DoSpriteAnimations, offx + sprite[i].x, offy + sprite[i].y, z, fix16_to_int(a), smoothratio);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
renderDrawRoomsQ16(offx + sprite[i].x, offy + sprite[i].y, z, a, h, sprite[i].sectnum);
|
renderDrawRoomsQ16(offx + sprite[i].x, offy + sprite[i].y, z, a, h, sprite[i].sectnum);
|
||||||
G_DoSpriteAnimations(offx + sprite[i].x, offy + sprite[i].y, fix16_to_int(a), smoothratio);
|
G_DoSpriteAnimations(offx + sprite[i].x, offy + sprite[i].y, z, fix16_to_int(a), smoothratio);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
for (j = 0; j < MAXSPRITES; j++) // restore ceiling or floor
|
for (j = 0; j < MAXSPRITES; j++) // restore ceiling or floor
|
||||||
|
@ -775,7 +775,7 @@ static void G_SE40(int32_t smoothratio)
|
||||||
|
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
if (videoGetRenderMode() == REND_POLYMER)
|
if (videoGetRenderMode() == REND_POLYMER)
|
||||||
polymer_setanimatesprites(G_DoSpriteAnimations, CAMERA(pos.x), CAMERA(pos.y), fix16_to_int(CAMERA(q16ang)), smoothratio);
|
polymer_setanimatesprites(G_DoSpriteAnimations, CAMERA(pos.x), CAMERA(pos.y), CAMERA(pos.z), fix16_to_int(CAMERA(q16ang)), smoothratio);
|
||||||
#endif
|
#endif
|
||||||
renderDrawRoomsQ16(sprite[sprite2].x + x, sprite[sprite2].y + y,
|
renderDrawRoomsQ16(sprite[sprite2].x + x, sprite[sprite2].y + y,
|
||||||
z + renderz, CAMERA(q16ang), CAMERA(q16horiz), sect);
|
z + renderz, CAMERA(q16ang), CAMERA(q16horiz), sect);
|
||||||
|
@ -784,7 +784,7 @@ static void G_SE40(int32_t smoothratio)
|
||||||
if (drawing_ror == 2) // viewing from top
|
if (drawing_ror == 2) // viewing from top
|
||||||
G_OROR_DupeSprites(sp);
|
G_OROR_DupeSprites(sp);
|
||||||
|
|
||||||
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),fix16_to_int(CAMERA(q16ang)),smoothratio);
|
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),CAMERA(pos.z),fix16_to_int(CAMERA(q16ang)),smoothratio);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
if (level)
|
if (level)
|
||||||
|
@ -884,7 +884,7 @@ void G_HandleMirror(int32_t x, int32_t y, int32_t z, fix16_t a, fix16_t q16horiz
|
||||||
// XXX: Sprites don't get drawn with TROR/Polymost
|
// XXX: Sprites don't get drawn with TROR/Polymost
|
||||||
#endif
|
#endif
|
||||||
display_mirror = 1;
|
display_mirror = 1;
|
||||||
G_DoSpriteAnimations(tposx,tposy,fix16_to_int(tang),smoothratio);
|
G_DoSpriteAnimations(tposx,tposy,z,fix16_to_int(tang),smoothratio);
|
||||||
display_mirror = 0;
|
display_mirror = 0;
|
||||||
|
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
|
@ -1009,12 +1009,12 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
||||||
#endif
|
#endif
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
if (videoGetRenderMode() == REND_POLYMER)
|
if (videoGetRenderMode() == REND_POLYMER)
|
||||||
polymer_setanimatesprites(G_DoSpriteAnimations, pSprite->x, pSprite->y, fix16_to_int(CAMERA(q16ang)), smoothRatio);
|
polymer_setanimatesprites(G_DoSpriteAnimations, pSprite->x, pSprite->y, pSprite->z, fix16_to_int(CAMERA(q16ang)), smoothRatio);
|
||||||
#endif
|
#endif
|
||||||
yax_preparedrawrooms();
|
yax_preparedrawrooms();
|
||||||
renderDrawRoomsQ16(pSprite->x, pSprite->y, pSprite->z - ZOFFSET6, CAMERA(q16ang), fix16_from_int(pSprite->yvel), pSprite->sectnum);
|
renderDrawRoomsQ16(pSprite->x, pSprite->y, pSprite->z - ZOFFSET6, CAMERA(q16ang), fix16_from_int(pSprite->yvel), pSprite->sectnum);
|
||||||
yax_drawrooms(G_DoSpriteAnimations, pSprite->sectnum, 0, smoothRatio);
|
yax_drawrooms(G_DoSpriteAnimations, pSprite->sectnum, 0, smoothRatio);
|
||||||
G_DoSpriteAnimations(pSprite->x, pSprite->y, fix16_to_int(CAMERA(q16ang)), smoothRatio);
|
G_DoSpriteAnimations(pSprite->x, pSprite->y, pSprite->z, fix16_to_int(CAMERA(q16ang)), smoothRatio);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1363,7 +1363,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
||||||
G_SE150(CAMERA(pos.x), CAMERA(pos.y), CAMERA(pos.z), CAMERA(q16ang), CAMERA(q16horiz), smoothRatio);
|
G_SE150(CAMERA(pos.x), CAMERA(pos.y), CAMERA(pos.z), CAMERA(q16ang), CAMERA(q16horiz), smoothRatio);
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
if (videoGetRenderMode() == REND_POLYMER)
|
if (videoGetRenderMode() == REND_POLYMER)
|
||||||
polymer_setanimatesprites(G_DoSpriteAnimations, CAMERA(pos.x),CAMERA(pos.y),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
polymer_setanimatesprites(G_DoSpriteAnimations, CAMERA(pos.x),CAMERA(pos.y),CAMERA(pos.z),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
||||||
#endif
|
#endif
|
||||||
// for G_PrintCoords
|
// for G_PrintCoords
|
||||||
dr_viewingrange = viewingrange;
|
dr_viewingrange = viewingrange;
|
||||||
|
@ -1377,7 +1377,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
||||||
renderDrawRoomsQ16(CAMERA(pos.x),CAMERA(pos.y),CAMERA(pos.z),CAMERA(q16ang),CAMERA(q16horiz),CAMERA(sect));
|
renderDrawRoomsQ16(CAMERA(pos.x),CAMERA(pos.y),CAMERA(pos.z),CAMERA(q16ang),CAMERA(q16horiz),CAMERA(sect));
|
||||||
yax_drawrooms(G_DoSpriteAnimations, CAMERA(sect), 0, smoothRatio);
|
yax_drawrooms(G_DoSpriteAnimations, CAMERA(sect), 0, smoothRatio);
|
||||||
|
|
||||||
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),CAMERA(pos.z),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
||||||
|
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
|
@ -1421,7 +1421,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),CAMERA(pos.z),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
||||||
|
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
|
@ -1463,7 +1463,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),CAMERA(pos.z),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
||||||
|
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
}
|
}
|
||||||
|
@ -1476,7 +1476,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
||||||
if (!RR && (unsigned)ror_sprite < MAXSPRITES && drawing_ror == 1) // viewing from bottom
|
if (!RR && (unsigned)ror_sprite < MAXSPRITES && drawing_ror == 1) // viewing from bottom
|
||||||
G_OROR_DupeSprites(&sprite[ror_sprite]);
|
G_OROR_DupeSprites(&sprite[ror_sprite]);
|
||||||
#endif
|
#endif
|
||||||
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
G_DoSpriteAnimations(CAMERA(pos.x),CAMERA(pos.y),CAMERA(pos.z),fix16_to_int(CAMERA(q16ang)),smoothRatio);
|
||||||
}
|
}
|
||||||
#ifdef LEGACY_ROR
|
#ifdef LEGACY_ROR
|
||||||
drawing_ror = 0;
|
drawing_ror = 0;
|
||||||
|
@ -4736,8 +4736,9 @@ static int G_CheckAdultTile(int tileNum)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoothratio)
|
void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura, int32_t smoothratio)
|
||||||
{
|
{
|
||||||
|
UNREFERENCED_PARAMETER(ourz);
|
||||||
int32_t j, frameOffset, playerNum;
|
int32_t j, frameOffset, playerNum;
|
||||||
intptr_t l;
|
intptr_t l;
|
||||||
|
|
||||||
|
|
|
@ -350,7 +350,7 @@ void G_BonusScreen(int32_t bonusonly);
|
||||||
void G_BonusScreenRRRA(int32_t bonusonly);
|
void G_BonusScreenRRRA(int32_t bonusonly);
|
||||||
//void G_CheatGetInv(void);
|
//void G_CheatGetInv(void);
|
||||||
void G_DisplayRest(int32_t smoothratio);
|
void G_DisplayRest(int32_t smoothratio);
|
||||||
void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoothratio);
|
void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura, int32_t smoothratio);
|
||||||
void G_DrawBackground(void);
|
void G_DrawBackground(void);
|
||||||
void G_DrawFrags(void);
|
void G_DrawFrags(void);
|
||||||
void G_HandleMirror(int32_t x, int32_t y, int32_t z, fix16_t a, fix16_t horiz, int32_t smoothratio);
|
void G_HandleMirror(int32_t x, int32_t y, int32_t z, fix16_t a, fix16_t horiz, int32_t smoothratio);
|
||||||
|
|
|
@ -507,7 +507,7 @@ static void G_SetupCamTile(int spriteNum, int tileNum, int smoothRatio)
|
||||||
yax_drawrooms(G_DoSpriteAnimations, SECT(spriteNum), 0, smoothRatio);
|
yax_drawrooms(G_DoSpriteAnimations, SECT(spriteNum), 0, smoothRatio);
|
||||||
|
|
||||||
display_mirror = 3;
|
display_mirror = 3;
|
||||||
G_DoSpriteAnimations(camera.x, camera.y, SA(spriteNum), smoothRatio);
|
G_DoSpriteAnimations(camera.x, camera.y, camera.z, SA(spriteNum), smoothRatio);
|
||||||
display_mirror = saveMirror;
|
display_mirror = saveMirror;
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue