#9171 closed patch
MYST: Fix drawing partial subimages
Reported by: | bgK | Owned by: | SF/mthreepwood |
---|---|---|---|
Priority: | normal | Component: | Engine: Mohawk |
Version: | Keywords: | ||
Cc: | Game: | Myst |
Description
Source rects for subimages are stored in bitmap coordinates (upside down compared to screen coordinates). This patch implements the proper transformation from bitmap to screen coordinates. The change can easily be seen on the selection buttons of the imager on Myst.
Ticket imported from: #2988976. Ticket imported from: patches/1276.
Attachments (4)
Change History (16)
comment:1 by , 15 years ago
Owner: | set to |
---|
comment:2 by , 15 years ago
comment:3 by , 15 years ago
Indeed, there is a one pixel offset in some cases. However it happens as well without the patch. (And I haven't fount how to fix it.)
comment:4 by , 15 years ago
I've been doing more tests, and the 1 pixel shift happens as well with the original engine, at least with Myst ME. The fix for partial subimages seems good.
by , 15 years ago
Attachment: | myst_safe_original.png added |
---|
Screenshot of Cabin Safe in original game
comment:5 by , 15 years ago
You are right in that the horizontal pixel shift is in the original engine, but not the vertical one. See these two screenshots.
Also, the image for the clock tower controls button is broken.
comment:6 by , 15 years ago
Please look at the attachment to understand the origin of the 1 pixel offset bug. The original engine does not draw the first line of the background. That is to say the vertical resolution used is 332px, not 333px. If you want more proof, just put a breakpoint on the StretchBlt call in the blitting function, and check the arguments.
comment:7 by , 15 years ago
I'm not doubting that the original engine did that, but the patch doesn't handle this. Nor does it handle some images (ie. the button on the clock tower controls) correctly still.
comment:8 by , 15 years ago
This patch was never meant to be a panacea. There are lots of things to fix in the Myst engine (the variables system is completely wrong, thus lots of opcodes). I guess the right way is one at a time.
comment:9 by , 15 years ago
I never said it was, but I don't want to commit a patch with only a partial fix for an issue.
comment:10 by , 14 years ago
Committed in r54297
I've applied the patch because Bastien is working on other parts of the code and it is an improvement over the previous code.
comment:11 by , 14 years ago
Status: | new → closed |
---|
comment:12 by , 6 years ago
Component: | → Engine: Mohawk |
---|---|
Game: | → Myst |
Thank you for the patch.
While this patch does indeed a step in the right direction, it currently draws subimages shifted one pixel to the right and up.
For reference, take a look at these cards where the problem is clearly visible: myst 4100 - the safe image myst 4006 - the clock tower controls