Yup, I'm still at it. This thing is getting way too addictive IMO, just can't stop working on Cxbx, especially when making significant progress such as this. Just a few minor additions and discoveries. Here's the latest... Rewrote my implementation of IDirect3DDevice8_GetTexture2@4. Since it kept causing a crash in there and IDirect3DResource8_Release, I had to write a dirty (and yet sloppy) hack to fix it. What I did:
- Get a copy of the currently active texture (without allocating any memory).
- Return the copy without increasing the reference count.
- Added a special flag in the X_D3DResource::Data field to represent that this texture is a clone.
- When IDirect3DResource8_Release is called, don't release the texture if it's a clone.
Now that I've taken a closer look, it looks as if that 3D does work! The textures look buggy when viewing Pandora's Box. You can't see it in game because there's a black quad covering the entire scene. The above fix allows you to stay in game a little longer, but there's yet another missing Direct3D API. This time, I have no leads on what it is.
One last issue. Microsoft must have had Cxbx in mind when they released XDK 4721. That stupid and totally useless piece of crap IDirectSoundBuffer8_Pause function is giving me trouble (it's another problem on Robotech: BattleCry). I'll need a break to my brain can rest after putting so much energy into this... good night.