Following and expanding Ian's considerations about the different Model Step revision behavior I've compiled a list of fixed shaded polygon "states" that modify the "x" value, as summarized below:
- Code: Select all
// for Step 2.x
1) Illuminated
a) AmbientLight >= 0.5
b) AmbientLight < 0.5
2) Self-Illuminated
a) AmbientLight >= 0.5
b) AmbientLight < 0.5
// for Step 1.5
// Model 3 Step 1.5 doesn't seem to use TranslatorMap.
1) Illuminated
a) AmbientLight >= 0.5
b) AmbientLight < 0.5
2) Self-Illuminated // Seems to always use the same value independent of AmbientLIght
// for Step 1.0
// Model 3 Step 1.0 doesn't seem to use Fixed Shading at all.
// VF3, VF3TB actually set the FS bit and transparency level > 32 for
// a lot of discarded polygons. Probably junk polys anyway.
As you'll see in my code, my "brute-force-like" approach is to check every state combination before i try to simplify it's logic. Someone smarter than me can see something in that "kabala" of numbers. Anyway, as it is, it just works. I'll post later some comparative screenshots.
Note to Ian:
- I've used an horrible hack (global variable) to pass the ambient light value to the fixed shading check condition, It's not meant to remain like this.
- I've slightly changed the polygon color assignment function to check for translatorMap after the first check for "direct RGB" / "color index", so is no more only a sub-type of direct RGB.
- I've double checked everything, but testing is needed to definitely confirm those values.
*WARNING* ugly code ahead...
UPDATE #1:
uploaded new patch with a quick fix for Magical Truck Adventure