Opened 3 years ago
Last modified 12 months ago
#12984 new defect
SCUMM: LOOM: Mac version font centering is inaccurate
Reported by: | ATMcashpoint | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | scumm, loom, macintosh, mac | |
Cc: | ATMcashpoint | Game: | Loom |
Description
I'm excited to see that ScummVM has added support for the high-res fonts and cursors used in the Macintosh (English) version of LOOM, if the original executable is in the game directory.
However, on the original hardware, in Practice mode there's an added feature that isn't in the PC version: the window which displays the last draft heard can be moved around the screen, even on top of the gameplay window and animation. The Practice window moves smoothly in vertical motion (at 640x400 resolution, with the game window beneath it scaled up to 2X in the original), but in horizontal motion, it's restricted to the 8-pixel chunks used for screen scrolling. (This also creates the quirk that it can't be moved back to its original position once it is dragged around the screen.) ScummVM does not replicate this feature as yet.
Additionally, in ScummVM the centering of the high-resolution fonts on screen appears to be inaccurate compared to the original hardware.
Tested on Windows 10 version 21H1 (build 19043.1237) using ScummVM 2.5.0 (October 1, 2021).
Attachments (10)
Change History (20)
by , 3 years ago
Attachment: | loommacoriginalpracticebardefault.png added |
---|
by , 3 years ago
Attachment: | loommacoriginalpracticebarmove1.png added |
---|
by , 3 years ago
Attachment: | loommacoriginalpracticebarmove2.png added |
---|
by , 3 years ago
Attachment: | loommacoriginalpracticebarmove3.png added |
---|
by , 3 years ago
Attachment: | loommacoriginaltextcentering.png added |
---|
by , 3 years ago
Attachment: | loommacoriginaltextcentering1.png added |
---|
by , 3 years ago
Attachment: | loommacscummvm.png added |
---|
by , 3 years ago
Attachment: | loommacscummvmtextcentering.png added |
---|
by , 3 years ago
Attachment: | loommacscummvmtextcentering1.png added |
---|
comment:1 by , 3 years ago
comment:2 by , 3 years ago
The centered text would be nice to fix. I'm just not sure yet what to do about it. Looks like it's not enough to simply add an offset to the X coordinate, since the two lines in your example aren't offset by the same amount as far as I can tell?
Again, there was a lot of guesswork in the implementation. (I'm so glad there at least wasn't any kerning, because the way ScummVM does things the text is drawn one character at a time!)
(By the way, Indy 3's text boxes aren't pixel perfect either, but there I think there is more spacing than necessary between the lines.)
comment:3 by , 3 years ago
I did find an issue with how ScummVM calculates the string width: Each character width is divided by two (to convert it to width on the low resolution screen) before it's added to the width.
If I change it to add the real width and divide the result by two instead, it almost works. I have to do some more experimenting to see if I can figure out the remaining discrepancies.
comment:4 by , 3 years ago
I haven't been able to figure out the remaining discrepancies, but you can see the current status in https://github.com/scummvm/scummvm/pull/3417
(It's a pull request because I'm a bit uncertain about the approach I'm using.)
I think we can at least agree that it's an improvement.
comment:5 by , 3 years ago
Interesting! Thank you!
According to LucasArts' Adventurer number 3 newsletter, the moveable Practice box was implemented so that it could fit on the screens of monitors using 512x384 resolution displays.
by , 3 years ago
Attachment: | loom-bw-lowres.png added |
---|
comment:6 by , 3 years ago
I found a scan of that article [1], and you're right. Though as you say, it seems that they found a good default spot for it because this is what it looks like when I run it in Mini vMac:
ScummVM supports rendering the game in black and white (though ScummVM's implementation is different since it honors palette changes, e.g. the dragon's shadow in Loom and lightning in Indy 3), and playing what I believe is a lower-quality version of the music used on low-end Macs. But it doesn't support cropping the image to 512x342 pixels.
[1] http://lucasartsadventurer.blogspot.com/2011/09/adventurer-issue-no-3-fall-1991.html
comment:7 by , 3 years ago
With the merge of https://github.com/scummvm/scummvm/pull/3417 things should be a little better, though Loom is not perfect and I have no idea how to fix it.
The practice box has not been fixed, and I do not personally have any plans for it at this time.
comment:8 by , 12 months ago
The movable practice box will be implemented once https://github.com/scummvm/scummvm/pull/5411 is merged.
I still have no idea what's causing the inaccuracies of text centering. If I fix it in one case, I invariably break it in others. But there seems to be an increased interest in these Mac versions lately, so maybe someone else will be able to figure it out.
Edit: I forgot to mention that ScummVM does try to implement the janky movement of the practice box, but if enhancements are enabled for the game it will allow you to move it freely. (Almost. You can't move it into the area occupied by the menu bar, since ScummVM currently activates that on mouse-over. So it'll still not be 100% accurate, but I think it will be good enough to consider this aspect of the bug report fixed. It can always be improved on later.)
comment:9 by , 12 months ago
The pull request has been merged. Thanks to everyone involved!
This bug report is now only about the text centering inaccuracies.
comment:10 by , 12 months ago
Summary: | LOOM: Mac version font centering is inaccurate, and Practice window can't be moved around screen → SCUMM: LOOM: Mac version font centering is inaccurate |
---|
I wasn't aware that you could move the practice window around like that, but trying it in a Mac emulator confirms it.
In the DOS version, the box is handled by the game scripts, but in the Mac version it appears to be hard-coded. My implementation of it was based on guesswork and what I could observe.
Implementing it as a movable window seems like a lot of work for a tiny benefit, but I appreciate you telling me about it.
(I haven't had the time to look at the other items yet.)