Opened 20 years ago
Closed 20 years ago
Last modified 5 years ago
#8174 closed patch
CMI: Possible SO_ROOM_SATURATION implementation
|Reported by:||eriktorbjorn||Owned by:||fingolfin|
|Cc:||Game:||Monkey Island 3|
This is an attempt at implementing what SO_ROOM_SATURATION might be meant to do. Fingolfin already guessed that it is similar to darkenPalette() in that it takes three scaling parameters and a palette range, but apparently wasn't sure how the scaling was done. Neither am I, but I'm guessing that it's the colour's hue, saturation and value (HSV) that are to be scaled.
CMI uses this opcode when Guybrush walks off the beach towards the swamp to make him sort of fade into the background mists.
It's not meant to be a definitive implementation. The result doesn't look quite like the original, and it uses floating-point math because I didn't want to stray too far from the description I had of the algorithm until I was more certain that I was using the right algorithm at all. I'll look into simplifying it later.
Ticket imported from: #686427. Ticket imported from: patches/279.
Change History (6)
by , 20 years ago
comment:1 by , 20 years ago
I recally endy gave me the disasm for this function... I am not sure, but it didn't really look like HSV operations. Might be wrong, though, but in any case this code should first be analyzed before we think of commiting this patch.
by , 20 years ago
Patch against a February 19 CVS snapshot
comment:2 by , 20 years ago
Since I'm not in any position to study, let alone understand, the original code, here's another experimental patch. This time I use Hue, Saturation and Lightness instead of Hue, Saturation and Value. The result is close enough to the original that I couldn't tell the difference just by looking at the resulting pictures.
As with the previous patch it's written to follow the algorithm description I found, so it's not in any way optimized. This is very much paint-by-numbers programming.
comment:3 by , 20 years ago
|Status:||new → closed|
comment:4 by , 5 years ago
|Component:||→ Engine: SCUMM|
|Game:||→ Monkey Island 3|
Patch against a February 12 CVS snapshot