XPR working much better :]
This commit is contained in:
parent
1bbc694d01
commit
ae2f5bf673
|
@ -1,5 +1,7 @@
|
|||
Cxbx Todo (* denotes high priority, + denotes medium priority)
|
||||
|
||||
* XPR MipMap levels are likely inline, causing graphical glitches
|
||||
|
||||
* Push Buffer Size is stored in a global. This may be important (hard to tell)
|
||||
|
||||
* PointSprite demo mip mapping has some bug (maybe related to the Register()
|
||||
|
|
|
@ -61,7 +61,7 @@ typedef signed long sint32;
|
|||
// ******************************************************************
|
||||
// * Define this to trace intercepted function calls
|
||||
// ******************************************************************
|
||||
//#define _DEBUG_TRACE
|
||||
#define _DEBUG_TRACE
|
||||
|
||||
// ******************************************************************
|
||||
// * Version information
|
||||
|
|
|
@ -1556,10 +1556,6 @@ HRESULT WINAPI xdirectx::EmuIDirect3DResource8_Register
|
|||
}
|
||||
#endif
|
||||
|
||||
_asm int 3
|
||||
|
||||
pBase = (PVOID)((DWORD)pBase + (DWORD)pThis->Data);
|
||||
|
||||
HRESULT hRet;
|
||||
|
||||
X_D3DResource *pResource = (X_D3DResource*)pThis;
|
||||
|
@ -1647,6 +1643,9 @@ HRESULT WINAPI xdirectx::EmuIDirect3DResource8_Register
|
|||
EmuCleanup("X_D3DCOMMON_TYPE_SURFACE temporarily unsupported");
|
||||
case X_D3DCOMMON_TYPE_TEXTURE:
|
||||
{
|
||||
// TODO: Find out why this only seems to be safe with textures (for now)
|
||||
pBase = (PVOID)((DWORD)pBase + (DWORD)pThis->Data);
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
printf("EmuIDirect3DResource8_Register :-> Texture...\n");
|
||||
#endif
|
||||
|
@ -3023,7 +3022,7 @@ static void EmuUpdateDeferredStates()
|
|||
EmuCleanup("QuinCunx is unsupported (temporarily)");
|
||||
|
||||
// TODO: Figure out wtf is wrong with this!
|
||||
// g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MIPFILTER, pCur[5]);
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MIPFILTER, pCur[5]);
|
||||
}
|
||||
|
||||
// TODO: Use a lookup table, this is not always a 1:1 map
|
||||
|
@ -3129,6 +3128,8 @@ uint32 EmuQuadHackA(uint32 PrimitiveCount, xdirectx::IDirect3DVertexBuffer8 *&pO
|
|||
BYTE *pOrigVertexData = 0;
|
||||
BYTE *pHackVertexData = 0;
|
||||
|
||||
if(pOrigVertexBuffer8 != 0 && pHackVertexBuffer8 != 0)
|
||||
{
|
||||
pOrigVertexBuffer8->Lock(0, 0, &pOrigVertexData, 0);
|
||||
pHackVertexBuffer8->Lock(0, 0, &pHackVertexData, 0);
|
||||
|
||||
|
@ -3157,6 +3158,7 @@ uint32 EmuQuadHackA(uint32 PrimitiveCount, xdirectx::IDirect3DVertexBuffer8 *&pO
|
|||
pHackVertexBuffer8->Unlock();
|
||||
|
||||
g_pD3DDevice8->SetStreamSource(0, pHackVertexBuffer8, nStride);
|
||||
}
|
||||
|
||||
return nStride;
|
||||
}
|
||||
|
@ -3166,9 +3168,12 @@ uint32 EmuQuadHackA(uint32 PrimitiveCount, xdirectx::IDirect3DVertexBuffer8 *&pO
|
|||
// ******************************************************************
|
||||
VOID EmuQuadHackB(uint32 nStride, xdirectx::IDirect3DVertexBuffer8 *&pOrigVertexBuffer8, xdirectx::IDirect3DVertexBuffer8 *&pHackVertexBuffer8)
|
||||
{
|
||||
if(pOrigVertexBuffer8 != 0 && pHackVertexBuffer8 != 0)
|
||||
g_pD3DDevice8->SetStreamSource(0, pOrigVertexBuffer8, nStride);
|
||||
|
||||
if(pOrigVertexBuffer8 != 0)
|
||||
pOrigVertexBuffer8->Release();
|
||||
if(pHackVertexBuffer8 != 0)
|
||||
pHackVertexBuffer8->Release();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue