Aaron Giles on Nostr: Mystery solved on the missing X-Wing/TIE cursors, but still need to figure out how to ...
Mystery solved on the missing X-Wing/TIE cursors, but still need to figure out how to make it work.
So I've been running the GOG editions of these games because they were handy. But the GOG versions are a bit hacked up, for example to use ogg-compressed files instead of CD audio track.
In addition, the GOG versions ship with a custom ddraw.dll. I never really looked into this before, but it turns out that this custom ddraw seemingly reimplements DirectDraw entirely using OpenGL.
For example, instead of changing video modes, they leave the video mode alone and just scale the original-resolution video up using OpenGL primitives.
Now in DREAMM, if someone references ddraw.dll, I implement all the interfaces internally, so there's no opportunity for this custom ddraw.dll to ever be seen. (Which is good because I ain't gonna implement OpenGL as well!)
But! Since the custom ddraw.dll upscales the screen, it has to fake any mouse cursors to make it look like cursor coordinates are relative to the upscaled version. To do this, they hack the original EXE to change the cursor shape to blank (so the real cursor never shows), and then draw their own cursor over the screen just before page flipping.
So I'm basically going to have to heuristically detect this case and swap a proper cursor back in. Oof.
Published at
2023-05-31 21:52:07Event JSON
{
"id": "5efa1ff579d22ee4d954de19fe979bf92116075bf66bc321ef5c5bbea00a11fc",
"pubkey": "b26dd3f57c56ad6cfdbe6f9be766b3f626d66ee52b7ba215b1c80bf6581d0a33",
"created_at": 1685569927,
"kind": 1,
"tags": [
[
"mostr",
"https://corteximplant.com/users/aaronsgiles/statuses/110465510763452460"
]
],
"content": "Mystery solved on the missing X-Wing/TIE cursors, but still need to figure out how to make it work.\n\nSo I've been running the GOG editions of these games because they were handy. But the GOG versions are a bit hacked up, for example to use ogg-compressed files instead of CD audio track.\n\nIn addition, the GOG versions ship with a custom ddraw.dll. I never really looked into this before, but it turns out that this custom ddraw seemingly reimplements DirectDraw entirely using OpenGL.\n\nFor example, instead of changing video modes, they leave the video mode alone and just scale the original-resolution video up using OpenGL primitives.\n\nNow in DREAMM, if someone references ddraw.dll, I implement all the interfaces internally, so there's no opportunity for this custom ddraw.dll to ever be seen. (Which is good because I ain't gonna implement OpenGL as well!)\n\nBut! Since the custom ddraw.dll upscales the screen, it has to fake any mouse cursors to make it look like cursor coordinates are relative to the upscaled version. To do this, they hack the original EXE to change the cursor shape to blank (so the real cursor never shows), and then draw their own cursor over the screen just before page flipping.\n\nSo I'm basically going to have to heuristically detect this case and swap a proper cursor back in. Oof.",
"sig": "3077946528c705d998ddd2775e85ed81ef0e024eea60e1dbe84d37e94a2e27c2e1566d8a42b02bc6465fde229bd82e1ad54f55be14f991b88080927b96ac5e14"
}