Add Macintosh black-and-white mode for Mac Loom and Indy3 #3146
This adds a black-and-white mode for Mac Loom and Indy3. This feature was actually requested several years ago . I don't know if that guy is still around, but maybe others want it as well.
Each color is dithered to a 2x2 pattern. I don't know if the actual patterns were some sort of standard, or if LucasArts came up with them themselves. But I believe that the result is pixel-perfect compared to the originals. I have put these, along with the Mac "EGA" palette, in a new header file, graphics/macega.h in case they can be reused elsewhere. When I did it, I was mainly thinking about the Mac AGI games, though looking closer at screenshots I suspect they used 3x2 dither patterns instead. Oh well.
Text is rendered as black or white (I think all of the in-game text is white), except for dark gray which is rendered using a checkerboard pattern. This is used for disabled notes in Loom, and for the replacement verb GUI in Indy3. The Loom notes appear to be pixel perfect, except I still can't figure out exactly if/when/how the notes used shadowed text. Oh well, that'll have to be good enough.
When running in 16 colors, the games use the shadow palette to remap colors. This makes no sense when you only have two colors, so these color changes are handled by the renderer, and any change to the shadow palette triggers a full redraw of the screen. This is used for the lightning flashes around Castle Brunwald in Indy3, and for the scene in Loom where the dragon finds Rusty asleep. (If there are other scenes, I'm not aware of them.)
I have replayed all of Loom, because that's the one where I was the most worried about text color. In Indy3, most text is drawn using a separate functions (for the text boxes) that only knows how to draw white text.
I still need to add code for drawing disabled text for the Loom notes and Indy 3 verbs.
I just need to test Loom a bit more. Indy 3 should be pretty safe, since most of the text is printed in text boxes, which never use shaded text.
It turns out that LucasArts didn't implement the palette changes in their interpreter:
The image is small because I was emulating a 9" Mac screen since that's seemed like the most likely use case back then. This is how it currently looks in ScummVM:
Which I think is an improvement. I'll check Indy 3 next.
You could argue that Rusty is quite nicely shaded in the Mini vMac screenshot, without the palette change, but for the Indy 3 castle exterior I think there's no contest. The original image is nice but pretty static:
In ScummVM, the lightning makes the scene look much more dramatic, even degraded to black and white:
In Macintosh b/w mode, there really is no such thing as palette manipulation. Any color changes have to be handled by the renderer. Instead of marking the palette as dirty, changes to the shadow palette trigger a full redraw of the screen. At the time of writing, I'm only aware of two things that use this: The lightning flashes at Castle Brunwald in Indiana Jones and the Last Crusade, and the scene where the dragon finds Rusty in Loom. I have verified that both of these seem to work correctly.
@pmaciel I didn't know you were still around. I'm glad you got to see the results!
I was actually a bit skeptical about the whole thing, but I figured that if (as it turned out) the dithering was just a simple matter of replacing each color with a 2x2 dithering pattern, then it would be a pretty small addition since the graphics already had to be upscaled to accommodate for the high-resolution font. That part was a bit of work, but others had already figured out how to handle Mac resources and render the fonts.
(I briefly toyed with the idea of adding a Macintosh black-and-white mode for the Sierra AGI games as well, but it seems different versions use different dithering methods. So no, I'll happily leave that to someone else. :-)
Please let me know if you run into issues, other than the known ones:
That's all I can think of at the moment.