mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Splitscreen mod hacks: handle screen tinting from both players.
Of course, it still affects the whole screen. Handles pain and lizard spit. git-svn-id: https://svn.eduke32.com/eduke32@2886 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8039db5ff2
commit
b93deba4c2
1 changed files with 16 additions and 3 deletions
|
@ -2594,8 +2594,8 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
palette_t tempFade = { 0, 0, 0, 0 };
|
||||
palette_t tempTint = { 0, 0, 0, 0 };
|
||||
|
||||
DukePlayer_t *pp = g_player[screenpeek].ps;
|
||||
walltype *wal;
|
||||
DukePlayer_t *const pp = g_player[screenpeek].ps;
|
||||
DukePlayer_t *const pp2 = g_fakeMultiMode && ud.multimode==2 ? g_player[1].ps : NULL;
|
||||
int32_t cposx, cposy, cang;
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
|
@ -2631,6 +2631,12 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
g_restorePalette = -1; // JBF 20040101; PK: reset tinting (-1)
|
||||
applyTint = 1;
|
||||
}
|
||||
else if (pp2 && pp2->pals.f > 0 && pp2->loogcnt == 0)
|
||||
{
|
||||
Bmemcpy(&tempFade, &pp2->pals, sizeof(palette_t));
|
||||
g_restorePalette = -1;
|
||||
applyTint = 1;
|
||||
}
|
||||
// lastpalsf = pp->pals.f;
|
||||
// }
|
||||
// reset a normal palette
|
||||
|
@ -2657,6 +2663,12 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
Bmemcpy(&tempFade, &lp, sizeof(palette_t));
|
||||
applyTint = 1;
|
||||
}
|
||||
else if (pp2 && pp2->pals.f==0 && pp2->loogcnt > 0)
|
||||
{
|
||||
palette_t lp = { 0, 64, 0, pp2->loogcnt>>1 };
|
||||
Bmemcpy(&tempFade, &lp, sizeof(palette_t));
|
||||
applyTint = 1;
|
||||
}
|
||||
|
||||
if (tempFade.f > 0 /*tempTint.f*/)
|
||||
Bmemcpy(&tempTint, &tempFade, sizeof(palette_t));
|
||||
|
@ -2694,8 +2706,9 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
i = pp->cursectnum;
|
||||
if (i > -1)
|
||||
{
|
||||
const walltype *wal = &wall[sector[i].wallptr];
|
||||
|
||||
show2dsector[i>>3] |= (1<<(i&7));
|
||||
wal = &wall[sector[i].wallptr];
|
||||
for (j=sector[i].wallnum; j>0; j--,wal++)
|
||||
{
|
||||
i = wal->nextsector;
|
||||
|
|
Loading…
Reference in a new issue