mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Polymer: handle floor/ceiling translucency.
Assigns the right alpha value to floor/ceiling planes if their translucency bits are set and make sure that changing the cstat now triggers an update of the material for editing purposes. This doesn't do anything by itself, but will be needed to correctly draw floor/ceiling masks. git-svn-id: https://svn.eduke32.com/eduke32@1977 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e7fc03ed33
commit
5b379decc6
1 changed files with 21 additions and 2 deletions
|
@ -2261,8 +2261,6 @@ static int32_t polymer_updatesector(int16_t sectnum)
|
||||||
wal = &wall[sec->wallptr + i];
|
wal = &wall[sec->wallptr + i];
|
||||||
}
|
}
|
||||||
|
|
||||||
s->floorstat = sec->floorstat;
|
|
||||||
s->ceilingstat = sec->ceilingstat;
|
|
||||||
s->floorxpanning = sec->floorxpanning;
|
s->floorxpanning = sec->floorxpanning;
|
||||||
s->ceilingxpanning = sec->ceilingxpanning;
|
s->ceilingxpanning = sec->ceilingxpanning;
|
||||||
s->floorypanning = sec->floorypanning;
|
s->floorypanning = sec->floorypanning;
|
||||||
|
@ -2281,6 +2279,8 @@ attributes:
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!s->flags.empty) && (!s->flags.invalidtex) &&
|
if ((!s->flags.empty) && (!s->flags.invalidtex) &&
|
||||||
|
(sec->floorstat == s->floorstat) &&
|
||||||
|
(sec->ceilingstat == s->ceilingstat) &&
|
||||||
(sec->floorshade == s->floorshade) &&
|
(sec->floorshade == s->floorshade) &&
|
||||||
(sec->ceilingshade == s->ceilingshade) &&
|
(sec->ceilingshade == s->ceilingshade) &&
|
||||||
(sec->floorpal == s->floorpal) &&
|
(sec->floorpal == s->floorpal) &&
|
||||||
|
@ -2290,10 +2290,29 @@ attributes:
|
||||||
goto finish;
|
goto finish;
|
||||||
|
|
||||||
polymer_getbuildmaterial(&s->floor.material, floorpicnum, sec->floorpal, sec->floorshade, 0);
|
polymer_getbuildmaterial(&s->floor.material, floorpicnum, sec->floorpal, sec->floorshade, 0);
|
||||||
|
|
||||||
|
if (s->floorstat & 256) {
|
||||||
|
if (s->floorstat & 128) {
|
||||||
|
s->floor.material.diffusemodulation[3] = 0x55;
|
||||||
|
} else {
|
||||||
|
s->floor.material.diffusemodulation[3] = 0xAA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
polymer_getbuildmaterial(&s->ceil.material, ceilingpicnum, sec->ceilingpal, sec->ceilingshade, 0);
|
polymer_getbuildmaterial(&s->ceil.material, ceilingpicnum, sec->ceilingpal, sec->ceilingshade, 0);
|
||||||
|
|
||||||
|
if (s->ceilingstat & 256) {
|
||||||
|
if (s->ceilingstat & 128) {
|
||||||
|
s->ceil.material.diffusemodulation[3] = 0x55;
|
||||||
|
} else {
|
||||||
|
s->ceil.material.diffusemodulation[3] = 0xAA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
s->flags.invalidtex = 0;
|
s->flags.invalidtex = 0;
|
||||||
|
|
||||||
|
s->floorstat = sec->floorstat;
|
||||||
|
s->ceilingstat = sec->ceilingstat;
|
||||||
s->floorshade = sec->floorshade;
|
s->floorshade = sec->floorshade;
|
||||||
s->ceilingshade = sec->ceilingshade;
|
s->ceilingshade = sec->ceilingshade;
|
||||||
s->floorpal = sec->floorpal;
|
s->floorpal = sec->floorpal;
|
||||||
|
|
Loading…
Reference in a new issue