Rework implementation as per the new specification

The new specification is more flexible, and allows assigning additive 
colors to individual parts of a sector (walls, sprites, flats) and even 
individual parts of a side (top, middle, bottom)

Add AdditiveColors arrays to sector_t and side_t::part
Initialize AdditiveColors arrays to 0
Export AdditiveColors to ZScript
Save AdditiveColors in saved game files
Use colors from AdditiveColors arrays when setting the additive color 
for the render state
Add code to parse the new UDMF additive color properties
Remove additive color slot from sector color/part enum
Add SetAdditiveColor to sector_t and side_t
Add GetAdditiveColor to side_t
Export new methods and additive color arrays to ZScript
This commit is contained in:
Kevin Caccamo 2018-12-20 19:03:52 -05:00 committed by Christoph Oelckers
commit 0773e6a98e
10 changed files with 123 additions and 16 deletions

View file

@ -108,6 +108,7 @@ FSerializer &Serialize(FSerializer &arc, const char *key, side_t::part &part, si
("flags", part.flags, def->flags)
("color1", part.SpecialColors[0], def->SpecialColors[0])
("color2", part.SpecialColors[1], def->SpecialColors[1])
("addcolor", part.AdditiveColor, def->AdditiveColor)
.EndObject();
}
return arc;
@ -293,7 +294,8 @@ FSerializer &Serialize(FSerializer &arc, const char *key, sector_t &p, sector_t
("linked_floor", p.e->Linked.Floor.Sectors)
("linked_ceiling", p.e->Linked.Ceiling.Sectors)
("colormap", p.Colormap, def->Colormap)
.Array("specialcolors", p.SpecialColors, def->SpecialColors, 6, true)
.Array("specialcolors", p.SpecialColors, def->SpecialColors, 5, true)
.Array("additivecolors", p.AdditiveColors, def->AdditiveColors, 5, true)
("gravity", p.gravity, def->gravity)
.Terrain("floorterrain", p.terrainnum[0], &def->terrainnum[0])
.Terrain("ceilingterrain", p.terrainnum[1], &def->terrainnum[1])