narzoul / DDrawCompat

DirectDraw and Direct3D 1-7 compatibility, performance and visual enhancements for Windows Vista, 7, 8, 10 and 11
BSD Zero Clause License
880 stars 67 forks source link

Dark Earth screen transition effect #260

Closed KainXVIII closed 2 months ago

KainXVIII commented 7 months ago

Is there any way to emulate it properly, like on this video https://youtu.be/rDOeZmh1ao8?t=257 (with timestamp) With DDrawCompat its just turn to black and that's it.

narzoul commented 7 months ago

The problem is that the game keeps the primary surface locked during the entire transition effect, and just keeps updating it via the CPU while it's locked. This may have worked on GPUs available at the time, but even then it was undefined behavior, not really supported by DirectDraw.

I'm not sure what's the best way to support this. It's not the only game doing "bad" things like this. For now, I just put together a quick hack to make it work: ddraw.zip (diff.txt compared to v0.5.1)

KainXVIII commented 7 months ago

The problem is that the game keeps the primary surface locked during the entire transition effect, and just keeps updating it via the CPU while it's locked. This may have worked on GPUs available at the time, but even then it was undefined behavior, not really supported by DirectDraw.

I'm not sure what's the best way to support this. It's not the only game doing "bad" things like this. For now, I just put together a quick hack to make it work: ddraw.zip (diff.txt compared to v0.5.1)

Amazing work anyway (even if its "just" a hack)!

narzoul commented 2 months ago

Fixed in v0.5.2.