narzoul / DDrawCompat

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

cannot find input file detours.lib #192

Closed BEENNath58 closed 1 year ago

BEENNath58 commented 1 year ago

I am trying to compile a 3 year old version of DDrawCompat (I am searching for the build DDrawCompat fixed D3D Ramp). After copying the detours.h file to the Include folder of Windows Kits, I removed one problem, but now VC wants detours.lib

Where do I get the file?

narzoul commented 1 year ago

Detours has to be built separately. That will provide the lib file. This was written in old versions of the readme, e.g. in v0.2.1: https://github.com/narzoul/DDrawCompat/blob/v0.2.1/README.md

Ramp device was never fixed, it's just replaced by RGB: https://github.com/narzoul/DDrawCompat/commit/3cc5a47156691a1d8588deb3687fc9bd62358318 Some more info here: https://github.com/narzoul/DDrawCompat/issues/22#issuecomment-616197074

If I remember right, you can still use the (broken) Ramp device with the SoftwareDevice=app setting in v0.4.0.

BEENNath58 commented 1 year ago

I will try to build Detours, thanks.

Previously testing I was copying both ddraw.dll and d3dim.dll and it wasn't working; but now removing ddraw.dll the game works fine.

I am not sure if Ramp was removed, because most applications still run using Ramp without the old d3dim.dll file. Some apps such as Shadows of the Empire fail on Ramp (I am yet to test old d3dim.dll here). At least the ones using Direct3D Retained Mode (check dx6 and dx7 sdk) through Ramp device work natively.

Apps on Ramp, at least the ones using d3drm, look almost the same texture-wise, such as: twist3d

narzoul commented 1 year ago

Yes, that's exactly what broken Ramp looks like. Here's what it should look like (taken from an XP VM): twist

Yes, the apps still "work", if you can call it that. But I haven't seen any that render correctly. If you find one, let me know.

Just compare the debug symbols (function names) e.g. with IDA and you'll see what I mean. All the Ramp_TexRead_* functions have been removed. Only a handful of the _Ramp_Spans_* functions are left, and those aren't even referenced anymore, etc. It looks pretty gutted to me, and I doubt it's left in a functional/recoverable state. Perhaps only the texturing part is removed, but that's more than enough...

BEENNath58 commented 1 year ago

Ok I managed to find an IDA Pro only to check this one. There is a significant difference in the list of functions between the two files. I doubt they will ever come back, so I should just keep on using the old file, until the day it stops working (maybe by then DDrawComppor dgVoodoo2 will be mature enough?)