This commit is contained in:
Aaron Robinson 2004-04-15 02:08:30 +00:00
parent e2dd257aa1
commit 0b57f61923
8 changed files with 680 additions and 2374 deletions

BIN
Cxbx.opt

Binary file not shown.

View File

@ -116,6 +116,11 @@ HRESULT WINAPI EmuIDirect3DDevice8_GetVisibilityTestResult
ULONGLONG *pTimeStamp
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetBackBufferScale
// ******************************************************************
VOID WINAPI EmuIDirect3DDevice8_SetBackBufferScale(FLOAT x, FLOAT y);
// ******************************************************************
// * func: EmuIDirect3DDevice8_LoadVertexShader
// ******************************************************************

View File

@ -46,12 +46,30 @@ typedef DWORD X_D3DBLENDOP;
typedef DWORD X_D3DBLEND;
typedef DWORD X_D3DCMPFUNC;
typedef DWORD X_D3DFILLMODE;
typedef DWORD X_D3DPRIMITIVETYPE;
typedef DWORD X_D3DTEXTURESTAGESTATETYPE;
// TODO: these enumerations are not equivalent when > 7!
typedef D3DRESOURCETYPE X_D3DRESOURCETYPE;
// Primitives supported by draw-primitive API
typedef enum _X_D3DPRIMITIVETYPE
{
X_D3DPT_POINTLIST = 1,
X_D3DPT_LINELIST = 2,
X_D3DPT_LINELOOP = 3, // Xbox only
X_D3DPT_LINESTRIP = 4,
X_D3DPT_TRIANGLELIST = 5,
X_D3DPT_TRIANGLESTRIP = 6,
X_D3DPT_TRIANGLEFAN = 7,
X_D3DPT_QUADLIST = 8, // Xbox only
X_D3DPT_QUADSTRIP = 9, // Xbox only
X_D3DPT_POLYGON = 10, // Xbox only
X_D3DPT_MAX = 11,
X_D3DPT_INVALID = 0x7fffffff, /* force 32-bit size enum */
}
X_D3DPRIMITIVETYPE;
typedef struct _X_D3DDISPLAYMODE
{
UINT Width;

View File

@ -1148,6 +1148,27 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_EndVisibilityTest
return D3D_OK;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetBackBufferScale
// ******************************************************************
VOID WINAPI XTL::EmuIDirect3DDevice8_SetBackBufferScale(FLOAT x, FLOAT y)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetBackBufferScale\n"
"(\n"
" x : %f\n"
" y : %f\n"
");\n",
GetCurrentThreadId(), x, y);
EmuWarning("SetBackBufferScale ignored");
EmuSwapFS(); // XBox FS
return;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_GetVisibilityTestResult
// ******************************************************************
@ -3108,7 +3129,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_Begin
");\n",
GetCurrentThreadId(), PrimitiveType);
if((PrimitiveType != 7) && (PrimitiveType != 9))
if((PrimitiveType != X_D3DPT_TRIANGLEFAN) && (PrimitiveType != X_D3DPT_QUADSTRIP) && (PrimitiveType != X_D3DPT_QUADLIST))
EmuCleanup("EmuIDirect3DDevice8_Begin does not support primitive : %d", PrimitiveType);
g_IVBPrimitiveType = PrimitiveType;
@ -3628,6 +3649,7 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
// Swizzled 32 Bit
dwWidth = 1 << ((pPixelContainer->Format & X_D3DFORMAT_USIZE_MASK) >> X_D3DFORMAT_USIZE_SHIFT);
dwHeight = 1 << ((pPixelContainer->Format & X_D3DFORMAT_VSIZE_MASK) >> X_D3DFORMAT_VSIZE_SHIFT);
dwMipMapLevels = (pPixelContainer->Format & X_D3DFORMAT_MIPMAP_MASK) >> X_D3DFORMAT_MIPMAP_SHIFT;
dwDepth = 1;// HACK? 1 << ((pPixelContainer->Format & X_D3DFORMAT_PSIZE_MASK) >> X_D3DFORMAT_PSIZE_SHIFT);
dwPitch = dwWidth*4;
dwBPP = 4;
@ -3641,6 +3663,7 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
// Swizzled 16 Bit
dwWidth = 1 << ((pPixelContainer->Format & X_D3DFORMAT_USIZE_MASK) >> X_D3DFORMAT_USIZE_SHIFT);
dwHeight = 1 << ((pPixelContainer->Format & X_D3DFORMAT_VSIZE_MASK) >> X_D3DFORMAT_VSIZE_SHIFT);
dwMipMapLevels = (pPixelContainer->Format & X_D3DFORMAT_MIPMAP_MASK) >> X_D3DFORMAT_MIPMAP_SHIFT;
dwDepth = 1;// HACK? 1 << ((pPixelContainer->Format & X_D3DFORMAT_PSIZE_MASK) >> X_D3DFORMAT_PSIZE_SHIFT);
dwPitch = dwWidth*2;
dwBPP = 2;
@ -3652,6 +3675,7 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
// Swizzled 8 Bit
dwWidth = 1 << ((pPixelContainer->Format & X_D3DFORMAT_USIZE_MASK) >> X_D3DFORMAT_USIZE_SHIFT);
dwHeight = 1 << ((pPixelContainer->Format & X_D3DFORMAT_VSIZE_MASK) >> X_D3DFORMAT_VSIZE_SHIFT);
dwMipMapLevels = (pPixelContainer->Format & X_D3DFORMAT_MIPMAP_MASK) >> X_D3DFORMAT_MIPMAP_SHIFT;
dwDepth = 1;// HACK? 1 << ((pPixelContainer->Format & X_D3DFORMAT_PSIZE_MASK) >> X_D3DFORMAT_PSIZE_SHIFT);
dwPitch = dwWidth;
dwBPP = 1;
@ -3680,20 +3704,34 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
dwWidth = 1 << ((pPixelContainer->Format & X_D3DFORMAT_USIZE_MASK) >> X_D3DFORMAT_USIZE_SHIFT);
dwHeight = 1 << ((pPixelContainer->Format & X_D3DFORMAT_VSIZE_MASK) >> X_D3DFORMAT_VSIZE_SHIFT);
dwDepth = 1 << ((pPixelContainer->Format & X_D3DFORMAT_PSIZE_MASK) >> X_D3DFORMAT_PSIZE_SHIFT);
dwMipMapLevels = (pPixelContainer->Format & X_D3DFORMAT_MIPMAP_MASK) >> X_D3DFORMAT_MIPMAP_SHIFT;
// D3DFMT_DXT2->D3DFMT_DXT5 : 128bits per block/per 16 texels
// D3DFMT_DXT2...D3DFMT_DXT5 : 128bits per block/per 16 texels
dwCompressedSize = dwWidth*dwHeight;
if(X_Format == 0x0C) // D3DFMT_DXT1 : 64bits per block/per 16 texels
dwCompressedSize /= 2;
dwMipMapLevels = (pPixelContainer->Format & X_D3DFORMAT_MIPMAP_MASK) >> X_D3DFORMAT_MIPMAP_SHIFT;
}
else
{
EmuCleanup("0x%.08X is not a supported format!\n", X_Format);
}
if(bSwizzled || bCompressed)
{
uint32 w = dwWidth;
uint32 h = dwHeight;
for(uint32 v=0;v<dwMipMapLevels;v++)
{
if( ((1u << v) >= w) || ((1u << v) >= h))
{
dwMipMapLevels = v + 1;
break;
}
}
}
// create the happy little texture
if(dwCommonType == X_D3DCOMMON_TYPE_SURFACE)
{
@ -3766,6 +3804,11 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
// as we iterate through mipmap levels, we'll adjust the source resource offset
DWORD dwCompressedOffset = 0;
DWORD dwMipOffs = 0;
DWORD dwMipWidth = dwWidth;
DWORD dwMipHeight = dwHeight;
DWORD dwMipPitch = dwPitch;
// iterate through the number of mipmap levels
for(uint level=0;level<dwMipMapLevels;level++)
{
@ -3797,21 +3840,18 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
// TODO: handle this horrible situation
BYTE *pDest = (BYTE*)LockedRect.pBits;
for(DWORD v=0;v<dwHeight;v++)
for(DWORD v=0;v<dwMipHeight;v++)
{
memset(pDest, 0, dwWidth*dwBPP);
memset(pDest, 0, dwMipWidth*dwBPP);
pDest += LockedRect.Pitch;
pSrc += dwPitch;
pSrc += dwMipPitch;
}
}
else
{
if(bSwizzled)
{
// for now, we have no logic for uncompressed mip map levels
if(level == 0)
{
if((DWORD)pSrc == 0x80000000)
{
// TODO: Fix or handle this situation..?
@ -3820,12 +3860,11 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
{
XTL::EmuXGUnswizzleRect
(
pSrc, dwWidth, dwHeight, dwDepth, LockedRect.pBits,
pSrc + dwMipOffs, dwMipWidth, dwMipHeight, dwDepth, LockedRect.pBits,
LockedRect.Pitch, iRect, iPoint, dwBPP
);
}
}
}
else if(bCompressed)
{
// NOTE: compressed size is (dwWidth/2)*(dwHeight/2)/2, so each level divides by 4
@ -3836,22 +3875,18 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
}
else
{
// for now, we have no logic for uncompressed mipmap levels
if(level == 0)
{
BYTE *pDest = (BYTE*)LockedRect.pBits;
if((DWORD)LockedRect.Pitch == dwPitch && dwPitch == dwWidth*dwBPP)
memcpy(pDest, pSrc, dwWidth*dwHeight*dwBPP);
if((DWORD)LockedRect.Pitch == dwMipPitch && dwMipPitch == dwMipWidth*dwBPP)
memcpy(pDest, pSrc + dwMipOffs, dwMipWidth*dwMipHeight*dwBPP);
else
{
for(DWORD v=0;v<dwHeight;v++)
for(DWORD v=0;v<dwMipHeight;v++)
{
memcpy(pDest, pSrc, dwWidth*dwBPP);
memcpy(pDest, pSrc + dwMipOffs, dwMipWidth*dwBPP);
pDest += LockedRect.Pitch;
pSrc += dwPitch;
}
pSrc += dwMipPitch;
}
}
}
@ -3866,6 +3901,12 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
else
pResource->EmuTexture8->UnlockRect(level);
}
dwMipOffs += dwMipWidth*dwMipHeight*dwBPP;
dwMipWidth /= 2;
dwMipHeight /= 2;
dwMipPitch /= 2;
}
}
@ -6184,7 +6225,7 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_DrawVertices
EmuUpdateDeferredStates();
if((DWORD)PrimitiveType == 0x09 || (DWORD)PrimitiveType == 0x10)
if( (PrimitiveType == X_D3DPT_QUADSTRIP) || (PrimitiveType == X_D3DPT_POLYGON) )
EmuWarning("Unsupported PrimitiveType! (%d)", (DWORD)PrimitiveType);
UINT PrimitiveCount = EmuD3DVertex2PrimitiveCount(PrimitiveType, VertexCount);
@ -6264,7 +6305,7 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_DrawVerticesUP
EmuUpdateDeferredStates();
if((DWORD)PrimitiveType == 0x09 || (DWORD)PrimitiveType == 0x10)
if( (PrimitiveType == X_D3DPT_QUADSTRIP) || (PrimitiveType == X_D3DPT_POLYGON) )
EmuCleanup("Unsupported PrimitiveType! (%d)", (DWORD)PrimitiveType);
/*
@ -6428,7 +6469,7 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_DrawIndexedVertices
EmuUpdateDeferredStates();
if((DWORD)PrimitiveType == 0x08 || (DWORD)PrimitiveType == 0x09 || (DWORD)PrimitiveType == 0x10)
if( (PrimitiveType == X_D3DPT_QUADLIST) || (PrimitiveType == X_D3DPT_QUADSTRIP) || (PrimitiveType == X_D3DPT_POLYGON) )
EmuWarning("Unsupported PrimitiveType! (%d)", (DWORD)PrimitiveType);
UINT PrimitiveCount = EmuD3DVertex2PrimitiveCount(PrimitiveType, VertexCount);
@ -6560,7 +6601,7 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_DrawIndexedVerticesUP
EmuUpdateDeferredStates();
if((DWORD)PrimitiveType == 0x08 || (DWORD)PrimitiveType == 0x09 || (DWORD)PrimitiveType == 0x10)
if( (PrimitiveType == X_D3DPT_QUADLIST) || (PrimitiveType == X_D3DPT_QUADSTRIP) || (PrimitiveType == X_D3DPT_POLYGON) )
EmuWarning("Unsupported PrimitiveType! (%d)", (DWORD)PrimitiveType);
UINT PrimitiveCount = EmuD3DVertex2PrimitiveCount(PrimitiveType, VertexCount);

View File

@ -60,7 +60,7 @@ void XTL::EmuExecutePushBuffer
DWORD *pdwPushData = (DWORD*)pPushBuffer->Data;
D3DPRIMITIVETYPE PCPrimitiveType = (D3DPRIMITIVETYPE)-1;
X_D3DPRIMITIVETYPE XBPrimitiveType = -1;
X_D3DPRIMITIVETYPE XBPrimitiveType = X_D3DPT_INVALID;
// TODO: This technically should be enabled
XTL::EmuUpdateDeferredStates();
@ -125,7 +125,7 @@ void XTL::EmuExecutePushBuffer
}
#endif
XBPrimitiveType = *pdwPushData;
XBPrimitiveType = (X_D3DPRIMITIVETYPE)*pdwPushData;
PCPrimitiveType = EmuPrimitiveType(XBPrimitiveType);
}
}
@ -157,7 +157,7 @@ void XTL::EmuExecutePushBuffer
WORD *pwVal = (WORD*)pIndexData;
for(uint s=0;s<dwCount/2;s++)
for(uint s=0;s<dwCount;s++)
{
if(s%8 == 0) printf("\n ");
@ -228,7 +228,7 @@ void XTL::EmuExecutePushBuffer
}
if(FAILED(hRet))
EmuCleanup("Unable to create index buffer for PushBuffer emulation (dwCount : %d)");
EmuCleanup("Unable to create index buffer for PushBuffer emulation (0x1800, dwCount : %d)", dwCount);
// copy index data
{

View File

@ -46,7 +46,7 @@
// inline vertex buffer emulation
XTL::DWORD *XTL::g_pIVBVertexBuffer = 0;
XTL::X_D3DPRIMITIVETYPE XTL::g_IVBPrimitiveType = 0;
XTL::X_D3DPRIMITIVETYPE XTL::g_IVBPrimitiveType = XTL::X_D3DPT_INVALID;
UINT XTL::g_IVBTblOffs = 0;
struct XTL::_D3DIVB *XTL::g_IVBTable = 0;
@ -689,7 +689,7 @@ bool XTL::VertexPatcher::PatchPrimitive(VertexPatchDesc *pPatchDesc,
{
PATCHEDSTREAM *pStream = &m_pStreams[uiStream];
// only quad and listloop are currently supported
if((pPatchDesc->PrimitiveType != 8) && (pPatchDesc->PrimitiveType != 3))
if((pPatchDesc->PrimitiveType != X_D3DPT_QUADLIST) && (pPatchDesc->PrimitiveType != X_D3DPT_LINELOOP))
return false;
if(pPatchDesc->pVertexStreamZeroData && uiStream > 0)
@ -716,8 +716,7 @@ bool XTL::VertexPatcher::PatchPrimitive(VertexPatchDesc *pPatchDesc,
g_pD3DDevice8->GetStreamSource(0, &pStream->pOriginalStream, &pStream->uiOrigStride);
pStream->uiNewStride = pStream->uiOrigStride; // The stride is still the same
// Quad
if(pPatchDesc->PrimitiveType == 8)
if(pPatchDesc->PrimitiveType == X_D3DPT_QUADLIST)
{
pPatchDesc->dwPrimitiveCount *= 2;
@ -726,7 +725,7 @@ bool XTL::VertexPatcher::PatchPrimitive(VertexPatchDesc *pPatchDesc,
dwNewSize = pPatchDesc->dwPrimitiveCount * pStream->uiOrigStride * 3;
}
// LineLoop
else if(pPatchDesc->PrimitiveType == 3)
else if(pPatchDesc->PrimitiveType == X_D3DPT_LINELOOP)
{
pPatchDesc->dwPrimitiveCount += 1;
@ -768,7 +767,7 @@ bool XTL::VertexPatcher::PatchPrimitive(VertexPatchDesc *pPatchDesc,
{
pStream->uiOrigStride = pPatchDesc->uiVertexStreamZeroStride;
if(pPatchDesc->PrimitiveType == 8) // Quad
if(pPatchDesc->PrimitiveType == X_D3DPT_QUADLIST)
{
pPatchDesc->dwPrimitiveCount *= 2;
@ -776,7 +775,7 @@ bool XTL::VertexPatcher::PatchPrimitive(VertexPatchDesc *pPatchDesc,
dwOriginalSize = pPatchDesc->dwPrimitiveCount * pStream->uiOrigStride * 2;
dwNewSize = pPatchDesc->dwPrimitiveCount * pStream->uiOrigStride * 3;
}
else if(pPatchDesc->PrimitiveType == 3) // LineLoop
else if(pPatchDesc->PrimitiveType == X_D3DPT_LINELOOP) // LineLoop
{
pPatchDesc->dwPrimitiveCount += 1;
@ -804,7 +803,7 @@ bool XTL::VertexPatcher::PatchPrimitive(VertexPatchDesc *pPatchDesc,
dwOriginalSizeWR - pPatchDesc->dwOffset - dwOriginalSize);
// Quad
if(pPatchDesc->PrimitiveType == 8)
if(pPatchDesc->PrimitiveType == X_D3DPT_QUADLIST)
{
uint08 *pPatch1 = &pPatchedVertexData[pPatchDesc->dwOffset * pStream->uiOrigStride];
uint08 *pPatch2 = &pPatchedVertexData[pPatchDesc->dwOffset + 3 * pStream->uiOrigStride];
@ -844,7 +843,7 @@ bool XTL::VertexPatcher::PatchPrimitive(VertexPatchDesc *pPatchDesc,
}
}
// LineLoop
else if(pPatchDesc->PrimitiveType == 3)
else if(pPatchDesc->PrimitiveType == X_D3DPT_LINELOOP)
{
memcpy(&pPatchedVertexData[pPatchDesc->dwOffset], &pOrigVertexData[pPatchDesc->dwOffset], dwOriginalSize);
memcpy(&pPatchedVertexData[pPatchDesc->dwOffset + dwOriginalSize], &pOrigVertexData[pPatchDesc->dwOffset], pStream->uiOrigStride);
@ -938,7 +937,7 @@ bool XTL::VertexPatcher::Restore()
VOID XTL::EmuFlushIVB()
{
if(g_IVBPrimitiveType == 9 && g_IVBTblOffs == 4)
if((g_IVBPrimitiveType == X_D3DPT_QUADSTRIP) && (g_IVBTblOffs == 4))
{
DWORD dwShader = -1;
DWORD *pdwVB = g_pIVBVertexBuffer;

View File

@ -32,6 +32,28 @@
// *
// ******************************************************************
// ******************************************************************
// * IDirect3DDevice8_SetBackBufferScale
// ******************************************************************
SOOVPA<7> IDirect3DDevice8_SetBackBufferScale_1_0_5849 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x1E, 0x24 },
{ 0x3E, 0x06 },
{ 0x62, 0xD9 },
{ 0x7E, 0xC4 },
{ 0x9E, 0x81 },
{ 0xBE, 0xFF },
{ 0xDE, 0xC0 },
}
};
// ******************************************************************
// * IDirect3DDevice8_GetCreationParameters
// ******************************************************************
@ -54,6 +76,29 @@ SOOVPA<7> IDirect3DDevice8_GetCreationParameters_1_0_5849 =
}
};
// ******************************************************************
// * IDirect3DDevice8_Clear
// ******************************************************************
LOOVPA<8> IDirect3DDevice8_Clear_1_0_5849 =
{
1, // Large == 1
8, // Count == 8
-1, // XRef Not Saved
0, // XRef Not Used
{
{ 0x1D, 0x8A },
{ 0x3C, 0x8B },
{ 0x5B, 0x00 },
{ 0x7A, 0xFD },
{ 0x99, 0x25 },
{ 0xB8, 0x00 },
{ 0xD7, 0x75 },
{ 0xF6, 0xFF },
}
};
// ******************************************************************
// * IDirect3DDevice8_GetBackBuffer2
// ******************************************************************
@ -170,6 +215,28 @@ SOOVPA<8> IDirect3DDevice8_CreatePixelShader_1_0_5849 =
}
};
// ******************************************************************
// * IDirect3DDevice8_SetPixelShader
// ******************************************************************
SOOVPA<7> IDirect3DDevice8_SetPixelShader_1_0_5849 =
{
0, // Large == 0
7, // Count == 7
-1, // XRef Not Saved
0, // XRef Not Used
{
{ 0x1E, 0x75 },
{ 0x3E, 0x0D },
{ 0x60, 0x8B },
{ 0x7E, 0x04 },
{ 0x9E, 0x20 },
{ 0xBE, 0x08 },
{ 0xE1, 0xF6 },
}
};
// ******************************************************************
// * IDirect3DDevice8_SetRenderState_CullMode
// ******************************************************************
@ -205,6 +272,28 @@ SOOVPA<13> IDirect3DDevice8_SetRenderState_CullMode_1_0_5849 =
}
};
// ******************************************************************
// * IDirect3DDevice8_SetRenderState_TextureFactor
// ******************************************************************
SOOVPA<7> IDirect3DDevice8_SetRenderState_TextureFactor_1_0_5849 =
{
0, // Large == 0
7, // Count == 7
-1, // XRef Not Saved
0, // XRef Not Used
{
{ 0x09, 0x84 },
{ 0x14, 0x46 },
{ 0x1F, 0x24 },
{ 0x2A, 0xBA },
{ 0x35, 0x4A },
{ 0x40, 0x5E },
{ 0x4D, 0x5E },
}
};
// ******************************************************************
// * IDirect3DDevice8_SetRenderState_ZEnable
// ******************************************************************
@ -228,6 +317,140 @@ SOOVPA<8> IDirect3DDevice8_SetRenderState_ZEnable_1_0_5849 =
}
};
// ******************************************************************
// * IDirect3DDevice8_SetRenderState_StencilEnable
// ******************************************************************
SOOVPA<8> IDirect3DDevice8_SetRenderState_StencilEnable_1_0_5849 =
{
0, // Large == 0
8, // Count == 8
-1, // XRef Not Saved
0, // XRef Not Used
{
{ 0x12, 0x8B },
{ 0x24, 0x33 },
{ 0x37, 0x74 },
{ 0x4A, 0x1E },
{ 0x5D, 0x74 },
{ 0x70, 0xB9 },
{ 0x83, 0x40 },
{ 0x96, 0x04 },
}
};
// ******************************************************************
// * IDirect3DDevice8_SetVertexShader
// ******************************************************************
SOOVPA<8> IDirect3DDevice8_SetVertexShader_1_0_5849 =
{
0, // Large == 0
8, // Count == 8
-1, // XRef Not Saved
0, // XRef Not Used
{
{ 0x1E, 0x89 },
{ 0x3E, 0x5F },
{ 0x61, 0x3B },
{ 0x81, 0x00 },
{ 0x9E, 0x00 },
{ 0xBE, 0x8B },
{ 0xDE, 0x04 },
{ 0xFE, 0xC1 },
}
};
// ******************************************************************
// * IDirect3DDevice8_SetIndices
// ******************************************************************
SOOVPA<7> IDirect3DDevice8_SetIndices_1_0_5849 =
{
0, // Large == 0
7, // Count == 7
-1, // XRef Not Saved
0, // XRef Not Used
{
{ 0x0F, 0x10 },
{ 0x20, 0xC7 },
{ 0x31, 0xC0 },
{ 0x42, 0x78 },
{ 0x53, 0xBE },
{ 0x64, 0x89 },
{ 0x75, 0x10 },
}
};
// ******************************************************************
// * IDirect3DDevice8_SetTexture
// ******************************************************************
SOOVPA<8> IDirect3DDevice8_SetTexture_1_0_5849 =
{
0, // Large == 0
8, // Count == 8
-1, // XRef Not Saved
0, // XRef Not Used
{
{ 0x1E, 0x44 },
{ 0x3E, 0xE8 },
{ 0x5F, 0x8B },
{ 0x7E, 0x00 },
{ 0x9E, 0x00 },
{ 0xBE, 0x89 },
{ 0xDE, 0xFF },
{ 0xFE, 0xE2 },
}
};
// ******************************************************************
// * IDirect3DDevice8_Begin
// ******************************************************************
SOOVPA<7> IDirect3DDevice8_Begin_1_0_5849 =
{
0, // Large == 0
7, // Count == 7
-1, // XRef Not Saved
0, // XRef Not Used
{
{ 0x07, 0xE8 },
{ 0x0C, 0x8B },
{ 0x13, 0xE8 },
{ 0x1A, 0x24 },
{ 0x21, 0x00 },
{ 0x28, 0x89 },
{ 0x2F, 0x00 },
}
};
// ******************************************************************
// * IDirect3DDevice8_Swap
// ******************************************************************
SOOVPA<7> IDirect3DDevice8_Swap_1_0_5849 =
{
0, // Large == 0
7, // Count == 7
-1, // XRef Not Saved
0, // XRef Not Used
{
{ 0x1B, 0xE8 },
{ 0x38, 0xC3 },
{ 0x55, 0xC0 },
{ 0x72, 0x3F },
{ 0x8F, 0x8E },
{ 0xAC, 0xC6 },
{ 0xC9, 0xC0 },
}
};
// ******************************************************************
// * IDirect3DDevice8_SetTransform
// ******************************************************************
@ -251,6 +474,29 @@ SOOVPA<8> IDirect3DDevice8_SetTransform_1_0_5849 =
}
};
// ******************************************************************
// * IDirect3DDevice8_DrawIndexedVertices
// ******************************************************************
SOOVPA<8> IDirect3DDevice8_DrawIndexedVertices_1_0_5849 =
{
0, // Large == 0
8, // Count == 8
-1, // XRef Not Saved
0, // XRef Not Used
{
{ 0x1E, 0x5E },
{ 0x3E, 0x17 },
{ 0x5E, 0x00 },
{ 0x7E, 0x8B },
{ 0x9E, 0x89 },
{ 0xBE, 0x2B },
{ 0xDE, 0x00 },
{ 0xFE, 0x04 },
}
};
// ******************************************************************
// * IDirect3DDevice8_SetMaterial
// ******************************************************************
@ -290,6 +536,16 @@ OOVPATable D3D8_1_0_5849[] =
"EmuIDirect3D8_CreateDevice"
#endif
},
// IDirect3DDevice8::SetBackBufferScale
{
(OOVPA*)&IDirect3DDevice8_SetBackBufferScale_1_0_5849,
XTL::EmuIDirect3DDevice8_SetBackBufferScale,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetBackBufferScale"
#endif
},
// IDirect3DDevice8::GetCreationParameters
{
(OOVPA*)&IDirect3DDevice8_GetCreationParameters_1_0_5849,
@ -300,6 +556,26 @@ OOVPATable D3D8_1_0_5849[] =
"EmuIDirect3DDevice8_GetCreationParameters"
#endif
},
// IDirect3DDevice8::Clear
{
(OOVPA*)&IDirect3DDevice8_Clear_1_0_5849,
XTL::EmuIDirect3DDevice8_Clear,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_Clear"
#endif
},
// IDirect3DDevice8::Swap
{
(OOVPA*)&IDirect3DDevice8_Swap_1_0_5849,
XTL::EmuIDirect3DDevice8_Swap,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_Swap"
#endif
},
// IDirect3DDevice8::GetBackBuffer2
{
(OOVPA*)&IDirect3DDevice8_GetBackBuffer2_1_0_5849,
@ -340,6 +616,16 @@ OOVPATable D3D8_1_0_5849[] =
"EmuIDirect3DDevice8_CreatePixelShader"
#endif
},
// IDirect3DDevice8::SetPixelShader
{
(OOVPA*)&IDirect3DDevice8_SetPixelShader_1_0_5849,
XTL::EmuIDirect3DDevice8_SetPixelShader,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetPixelShader"
#endif
},
// IDirect3DDevice8::GetDisplayMode (* unchanged since 4627 *)
{
(OOVPA*)&IDirect3DDevice8_GetDisplayMode_1_0_4627,
@ -410,6 +696,16 @@ OOVPATable D3D8_1_0_5849[] =
"EmuIDirect3DDevice8_SetRenderState_CullMode"
#endif
},
// IDirect3DDevice8::SetRenderState_TextureFactor
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_TextureFactor_1_0_5849,
XTL::EmuIDirect3DDevice8_SetRenderState_TextureFactor,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_TextureFactor"
#endif
},
// IDirect3DDevice8::SetRenderState_NormalizeNormals (* unchanged since 4432 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_NormalizeNormals_1_0_4432,
@ -480,6 +776,16 @@ OOVPATable D3D8_1_0_5849[] =
"EmuIDirect3DDevice8_SetRenderState_ZEnable"
#endif
},
// IDirect3DDevice8::SetRenderState_StencilEnable
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilEnable_1_0_5849,
XTL::EmuIDirect3DDevice8_SetRenderState_StencilEnable,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_StencilEnable"
#endif
},
// IDirect3DDevice8::SetRenderState_OcclusionCullEnable (* unchanged since 4432 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_OcclusionCullEnable_1_0_4432,
@ -520,6 +826,46 @@ OOVPATable D3D8_1_0_5849[] =
"EmuIDirect3DDevice8_SetRenderState_YuvEnable"
#endif
},
// IDirect3DDevice8::SetVertexShader
{
(OOVPA*)&IDirect3DDevice8_SetVertexShader_1_0_5849,
XTL::EmuIDirect3DDevice8_SetVertexShader,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetVertexShader"
#endif
},
// IDirect3DDevice8::SetIndices
{
(OOVPA*)&IDirect3DDevice8_SetIndices_1_0_5849,
XTL::EmuIDirect3DDevice8_SetIndices,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetIndices"
#endif
},
// IDirect3DDevice8::SetTexture
{
(OOVPA*)&IDirect3DDevice8_SetTexture_1_0_5849,
XTL::EmuIDirect3DDevice8_SetTexture,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetTexture"
#endif
},
// IDirect3DDevice8::Begin
{
(OOVPA*)&IDirect3DDevice8_Begin_1_0_5849,
XTL::EmuIDirect3DDevice8_Begin,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_Begin"
#endif
},
// IDirect3DDevice8::GetTransform (* unchanged since 4361 *)
{
(OOVPA*)&IDirect3DDevice8_GetTransform_1_0_4361,
@ -540,6 +886,16 @@ OOVPATable D3D8_1_0_5849[] =
"EmuIDirect3DDevice8_SetTransform"
#endif
},
// IDirect3DDevice8::DrawIndexedVertices
{
(OOVPA*)&IDirect3DDevice8_DrawIndexedVertices_1_0_5849,
XTL::EmuIDirect3DDevice8_DrawIndexedVertices,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_DrawIndexedVertices"
#endif
},
// IDirect3DDevice8::SetMaterial
{
(OOVPA*)&IDirect3DDevice8_SetMaterial_1_0_5849,

File diff suppressed because it is too large Load Diff