- render Blood's choking hands in the 3D view.

This may not be faithful but it looks a lot less buggy than placing these on top of the entire HUD.
This commit is contained in:
Christoph Oelckers 2020-08-14 21:08:28 +02:00
parent 66cb7f61a4
commit 19635c7bdf
6 changed files with 17 additions and 14 deletions

View file

@ -67,7 +67,9 @@ void CChoke::sub_84110(int x, int y, int basepal)
atc = at8->at10;
int vdi = at8->at10-atc;
at8->Play(vdi-vd, vdi, -1, NULL);
at8->Draw(&twodpsp, vdi, 10, 0, 0, basepal, false);
// This originally overlaid the HUD but that simply doesn't work right with the HUD being a genuine overlay.
// It also never adjusted for a reduced 3D view
at8->Draw(vdi, 10, 0, 0, basepal, true);
gFrameClock = v4;
}

View file

@ -112,13 +112,13 @@ void CGameMenuItemQAV::Draw(void)
int backX = data->x;
for (int i = 0; i < nCount; i++)
{
data->Draw(twod, data->at10 - at2c, 10 + kQavOrientationLeft, 0, 0, 0, false);
data->Draw(data->at10 - at2c, 10 + kQavOrientationLeft, 0, 0, 0, false);
data->x += 320;
}
data->x = backX;
}
else
data->Draw(twod, data->at10 - at2c, 10, 0, 0, 0, false);
data->Draw(data->at10 - at2c, 10, 0, 0, 0, false);
windowxy1.x = wx1;
windowxy1.y = wy1;

View file

@ -4813,12 +4813,13 @@ void playerQavSceneDraw(PLAYER* pPlayer, int a2, double a3, double a4, int a5, i
if (!(pSprite->flags & kModernTypeFlag1)) {
pQAV->x = int(a3); pQAV->y = int(a4);
pQAV->Draw(&twodpsp, a3, a4, v4, flags, a2, a5, basepal, true);
pQAV->Draw(a3, a4, v4, flags, a2, a5, basepal, true);
// draw fullscreen (currently 4:3 only)
} else {
// What an awful hack... :?
pQAV->Draw(&twodpsp, v4, flags, a2, a5, basepal, false);
// What an awful hack. This throws proper ordering out of the window, but there is no way to reproduce this better with strict layering of elements.
// From the above commit it seems to be incomplete anyway...
pQAV->Draw(v4, flags, a2, a5, basepal, false);
}
}

View file

@ -46,7 +46,7 @@ int qavRegisterClient(void(*pClient)(int, void *))
return nClients++;
}
void DrawFrame(F2DDrawer *twod, double x, double y, TILE_FRAME *pTile, int stat, int shade, int palnum, int basepal, bool to3dview)
void DrawFrame(double x, double y, TILE_FRAME *pTile, int stat, int shade, int palnum, int basepal, bool to3dview)
{
stat |= pTile->stat;
x += pTile->x;
@ -83,7 +83,7 @@ void DrawFrame(F2DDrawer *twod, double x, double y, TILE_FRAME *pTile, int stat,
}
}
void QAV::Draw(F2DDrawer* twod, double x, double y, int ticks, int stat, int shade, int palnum, int basepal, bool to3dview)
void QAV::Draw(double x, double y, int ticks, int stat, int shade, int palnum, int basepal, bool to3dview)
{
dassert(ticksPerFrame > 0);
int nFrame = ticks / ticksPerFrame;
@ -92,13 +92,13 @@ void QAV::Draw(F2DDrawer* twod, double x, double y, int ticks, int stat, int sha
for (int i = 0; i < 8; i++)
{
if (pFrame->tiles[i].picnum > 0)
DrawFrame(twod, x, y, &pFrame->tiles[i], stat, shade, palnum, basepal, to3dview);
DrawFrame(x, y, &pFrame->tiles[i], stat, shade, palnum, basepal, to3dview);
}
}
void QAV::Draw(F2DDrawer* twod, int ticks, int stat, int shade, int palnum, int basepal, bool to3dview)
void QAV::Draw(int ticks, int stat, int shade, int palnum, int basepal, bool to3dview)
{
Draw(twod, x, y, ticks, stat, shade, palnum, basepal, to3dview);
Draw(x, y, ticks, stat, shade, palnum, basepal, to3dview);
}

View file

@ -81,8 +81,8 @@ struct QAV
//SPRITE *pSprite; // 1c
char pad3[4]; // 20
FRAMEINFO frames[1]; // 24
void Draw(F2DDrawer *twod, int ticks, int stat, int shade, int palnum, int basepal, bool inviewport);
void Draw(F2DDrawer* twod, double x, double y, int ticks, int stat, int shade, int palnum, int basepal, bool inviewport);
void Draw(int ticks, int stat, int shade, int palnum, int basepal, bool inviewport);
void Draw(double x, double y, int ticks, int stat, int shade, int palnum, int basepal, bool inviewport);
void Play(int, int, int, void *);
void Preload(void);
void Precache(void);

View file

@ -252,7 +252,7 @@ void WeaponDraw(PLAYER *pPlayer, int a2, double a3, double a4, int a5, int basep
a2 = -128;
flags |= 1;
}
pQAV->Draw(&twodpsp, a3, a4, v4, flags, a2, a5, basepal, true);
pQAV->Draw(a3, a4, v4, flags, a2, a5, basepal, true);
}
void WeaponPlay(PLAYER *pPlayer)