[Bug 24928] WoW 4.x D3D: Water Detail and Sunshafts cannot be enabled fully in d3d9

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Mar 14 13:58:06 CDT 2012


Maarten Lankhorst <m.b.lankhorst at gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |m.b.lankhorst at gmail.com

--- Comment #50 from Maarten Lankhorst <m.b.lankhorst at gmail.com> 2012-03-14 13:58:06 CDT ---
If you care enough about warcraft, you could write your own dumb nvapi dll and
get things to work.

nvapi is implemented as a static library that calls the real nvapi dynmically.

Each function is implemented roughly as this:

nvapi_status __cdecl function(args...) {
    if (!nvapi_getprocaddr)
        return error;

    nvapi_status ret = nvapi_getprocaddr(....,0xHASHHASH, &ptr);
    if (ret != ok)
        return ret;
    return ptr(args...);

If you want the hash, you need a mingw objdump. Download  the lib at
http://developer.nvidia.com/nvapi and objdump -d x86/nvapi.lib

For example _NvAPI_EnumLogicalGPUs has this as body:
     e1f:       68 59 ea b3 48          push   $0x48b3ea59
     e24:       ff 15 00 00 00 00       call   *0x0

This means the hash 0x48b3ea59 corresponds to NvAPI_EnumLogicalGPUs

I may be wrong in some details here, especially function pointers, but this is
roughly how nvidia implemented nvapi.dll, the header is nice for prototypes but
the specific one used by WoW is completely undocumented, but things can still
work if it fails. You need a specific hack in wined3d though, there is a
fixme:wined3d of something that's not supposed to work, and if you let it pass
instead of failing, things will work.

It's been a long time since I worked on this and I lost the hack, I can
honestly not remember everything since I stopped playing a month after the game
was released and only came back a bit to see if i could get it working. I was
so disappointed at the 'ultra' water detail and 'high' sunshafts that I never
saw a reason to pursue it further, especially since some other games crashed on
the presence of nvapi.

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list