Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement MxDisplaySurface::VTable0x34 #1264

Merged
merged 5 commits into from
Dec 23, 2024

Conversation

madebr
Copy link
Contributor

@madebr madebr commented Dec 23, 2024

Accuracy is an embarrassing 34.91%.

Here's some stack information to get you started:

Stack depth is 0x84, DDSURFACEDESC surfaceDesc is at ESP+0x18
The arguments are at:
p_pixels: ESP+0x88
p_bpp: ESP+0x8c
p_width: ESP+0x90
p_height: ESP+0x94
p_x: ESP+0x98
p_y: ESP+0x9c

(It's a "RawBlitAt" function)

@foxtacles
Copy link
Member

Matched it to 100%. Since the function exists in the BETA at address 0x10141191 it's much easier to use this as a reference.

}
case 16: {
if (p_bpp == 16) {
MxU8* dst = (MxU8*) surfaceDesc.lpSurface + p_y * surfaceDesc.lPitch + p_x;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct if both dest and src contain 16-bit pixels?
Shouldn't it be + 2 * p_x?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think you are right. It looks like a bug. The function is never called in the game

@Ramen2X
Copy link
Member

Ramen2X commented Dec 23, 2024

I was here! Thanks everyone. 🎉

@foxtacles foxtacles merged commit 938a5d7 into isledecomp:master Dec 23, 2024
12 checks passed
@madebr madebr deleted the MxDisplaySurface-VTable0x34 branch December 23, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants