stuff for halo

This commit is contained in:
Aaron Robinson 2003-08-29 05:32:47 +00:00
parent 9f0f475543
commit 4584566989
4 changed files with 478 additions and 19 deletions

View File

@ -660,9 +660,9 @@ VOID WINAPI EmuIDirect3DDevice8_GetBackBuffer
);
// ******************************************************************
// * func: EmuIDirect3D8_SetViewport
// * func: EmuIDirect3DDevice8_SetViewport
// ******************************************************************
HRESULT WINAPI EmuIDirect3D8_SetViewport
HRESULT WINAPI EmuIDirect3DDevice8_SetViewport
(
CONST D3DVIEWPORT8 *pViewport
);
@ -831,10 +831,22 @@ HRESULT WINAPI EmuIDirect3DDevice8_CreateCubeTexture
X_D3DCubeTexture **ppCubeTexture
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_CreateIndexBuffer
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_CreateIndexBuffer
(
UINT Length,
DWORD Usage,
D3DFORMAT Format,
D3DPOOL Pool,
X_D3DIndexBuffer **ppIndexBuffer
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetIndices
// ******************************************************************
VOID WINAPI EmuIDirect3DDevice8_SetIndices
HRESULT WINAPI EmuIDirect3DDevice8_SetIndices
(
X_D3DIndexBuffer *pIndexData,
UINT BaseVertexIndex
@ -1348,6 +1360,15 @@ HRESULT WINAPI EmuIDirect3DDevice8_CreatePalette
X_D3DPalette **ppPalette
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetRenderTarget
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_SetRenderTarget
(
X_D3DSurface *pRenderTarget,
X_D3DSurface *pNewZStencil
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetPalette
// ******************************************************************

View File

@ -62,6 +62,196 @@ SOOVPA<8> IDirect3D8_CreateDevice_1_0_3925 =
}
};
// ******************************************************************
// * IDirect3DDevice8_SetRenderTarget
// ******************************************************************
SOOVPA<11> IDirect3DDevice8_SetRenderTarget_1_0_3925 =
{
0, // Large == 0
11, // Count == 11
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetRenderTarget+0x00 : sub esp, 0x20
{ 0x00, 0x83 }, // (Offset,Value)-Pair #1
{ 0x01, 0xEC }, // (Offset,Value)-Pair #2
{ 0x02, 0x20 }, // (Offset,Value)-Pair #3
// IDirect3DDevice8_SetRenderTarget+0x32 : mov [esp+0x34], ebx
{ 0x32, 0x89 }, // (Offset,Value)-Pair #4
{ 0x33, 0x5C }, // (Offset,Value)-Pair #5
{ 0x34, 0x24 }, // (Offset,Value)-Pair #6
{ 0x35, 0x34 }, // (Offset,Value)-Pair #7
// IDirect3DDevice8_SetRenderTarget+0x55 : and ecx, 0x0F
{ 0x55, 0x83 }, // (Offset,Value)-Pair #8
{ 0x56, 0xE1 }, // (Offset,Value)-Pair #9
{ 0x57, 0x0F }, // (Offset,Value)-Pair #10
// IDirect3DDevice8_SetRenderTarget+0xDC : push edx
{ 0xDC, 0x52 }, // (Offset,Value)-Pair #11
}
};
// ******************************************************************
// * IDirect3DDevice8_SetStreamSource
// ******************************************************************
SOOVPA<12> IDirect3DDevice8_SetStreamSource_1_0_3925 =
{
0, // Large == 0
12, // Count == 12
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetStreamSource+0x39 : add edx, 0xFFF80000
{ 0x39, 0x81 }, // (Offset,Value)-Pair #1
{ 0x3A, 0xC2 }, // (Offset,Value)-Pair #2
{ 0x3B, 0x00 }, // (Offset,Value)-Pair #3
{ 0x3C, 0x00 }, // (Offset,Value)-Pair #4
{ 0x3D, 0xF8 }, // (Offset,Value)-Pair #5
{ 0x3E, 0xFF }, // (Offset,Value)-Pair #6
// IDirect3DDevice8_SetStreamSource+0x49 : jnz +0x06
{ 0x49, 0x75 }, // (Offset,Value)-Pair #7
{ 0x4A, 0x06 }, // (Offset,Value)-Pair #8
// IDirect3DDevice8_SetStreamSource+0x6A : or ecx, 0x280
{ 0x6A, 0x81 }, // (Offset,Value)-Pair #9
{ 0x6B, 0xC9 }, // (Offset,Value)-Pair #10
{ 0x6C, 0x80 }, // (Offset,Value)-Pair #11
{ 0x6D, 0x02 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * IDirect3DDevice8_SetIndices
// ******************************************************************
SOOVPA<11> IDirect3DDevice8_SetIndices_1_0_3925 =
{
0, // Large == 0
11, // Count == 11
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetIndices+0x0E : jz +0x10
{ 0x0E, 0x74 }, // (Offset,Value)-Pair #1
{ 0x0F, 0x10 }, // (Offset,Value)-Pair #2
// IDirect3DDevice8_SetIndices+0x3E : test ecx, 0x78FFFF
{ 0x3E, 0xF7 }, // (Offset,Value)-Pair #3
{ 0x3F, 0xC1 }, // (Offset,Value)-Pair #4
{ 0x40, 0xFF }, // (Offset,Value)-Pair #5
{ 0x41, 0xFF }, // (Offset,Value)-Pair #6
{ 0x42, 0x78 }, // (Offset,Value)-Pair #7
// IDirect3DDevice8_SetIndices+0x67 : mov [esi+0x047C], edi
{ 0x67, 0x89 }, // (Offset,Value)-Pair #8
{ 0x68, 0xBE }, // (Offset,Value)-Pair #9
{ 0x69, 0x7C }, // (Offset,Value)-Pair #10
{ 0x6A, 0x04 }, // (Offset,Value)-Pair #11
}
};
// ******************************************************************
// * IDirect3DDevice8_SetViewport
// ******************************************************************
SOOVPA<10> IDirect3DDevice8_SetViewport_1_0_3925 =
{
0, // Large == 0
10, // Count == 10
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetViewport+0x00 : sub esp, 0x08
{ 0x00, 0x83 }, // (Offset,Value)-Pair #1
{ 0x01, 0xEC }, // (Offset,Value)-Pair #2
{ 0x02, 0x08 }, // (Offset,Value)-Pair #3
// IDirect3DDevice8_SetViewport+0x2F : mov ebx, [esp+0x1C]
{ 0x2F, 0x8B }, // (Offset,Value)-Pair #4
{ 0x30, 0x5C }, // (Offset,Value)-Pair #5
{ 0x31, 0x24 }, // (Offset,Value)-Pair #6
{ 0x32, 0x1C }, // (Offset,Value)-Pair #7
// IDirect3DDevice8_SetViewport+0x55 : jnz +0x12
{ 0x55, 0x75 }, // (Offset,Value)-Pair #8
{ 0x56, 0x12 }, // (Offset,Value)-Pair #9
// IDirect3DDevice8_SetViewport+0x9D : inc edx
{ 0x9D, 0x42 }, // (Offset,Value)-Pair #10
}
};
// ******************************************************************
// * IDirect3DDevice8_SetTexture
// ******************************************************************
SOOVPA<12> IDirect3DDevice8_SetTexture_1_0_3925 =
{
0, // Large == 0
12, // Count == 12
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetTexture+0x0E : sub esp, 0x08
{ 0x0E, 0x8B }, // (Offset,Value)-Pair #1
{ 0x0F, 0x84 }, // (Offset,Value)-Pair #2
{ 0x10, 0x9F }, // (Offset,Value)-Pair #3
{ 0x11, 0xA0 }, // (Offset,Value)-Pair #4
{ 0x12, 0x0B }, // (Offset,Value)-Pair #5
{ 0x13, 0x00 }, // (Offset,Value)-Pair #6
{ 0x14, 0x00 }, // (Offset,Value)-Pair #7
// IDirect3DDevice8_SetTexture+0x57 : shl edx, 6
{ 0x57, 0xC1 }, // (Offset,Value)-Pair #8
{ 0x58, 0xE2 }, // (Offset,Value)-Pair #9
{ 0x59, 0x06 }, // (Offset,Value)-Pair #10
// IDirect3DDevice8_SetTexture+0x7D : retn 0x08
{ 0x7D, 0xC2 }, // (Offset,Value)-Pair #11
{ 0x7E, 0x08 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * IDirect3DDevice8_Clear
// ******************************************************************
SOOVPA<10> IDirect3DDevice8_Clear_1_0_3925 =
{
0, // Large == 0
10, // Count == 10
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_Clear+0x00 : sub esp, 0x38
{ 0x00, 0x83 }, // (Offset,Value)-Pair #1
{ 0x01, 0xEC }, // (Offset,Value)-Pair #2
{ 0x02, 0x38 }, // (Offset,Value)-Pair #3
// IDirect3DDevice8_Clear+0x25 : test cl, 1
{ 0x25, 0xF6 }, // (Offset,Value)-Pair #4
{ 0x26, 0xC1 }, // (Offset,Value)-Pair #5
{ 0x27, 0x01 }, // (Offset,Value)-Pair #6
// IDirect3DDevice8_Clear+0x5D : mov [esi], eax; xor ebp, ebp
{ 0x5D, 0x89 }, // (Offset,Value)-Pair #7
{ 0x5E, 0x06 }, // (Offset,Value)-Pair #8
{ 0x5F, 0x33 }, // (Offset,Value)-Pair #9
{ 0x60, 0xED }, // (Offset,Value)-Pair #10
}
};
// ******************************************************************
// * IDirect3DDevice8_CreatePalette
// ******************************************************************
@ -254,6 +444,39 @@ SOOVPA<15> IDirect3DDevice8_CreateCubeTexture_1_0_3925 =
}
};
// ******************************************************************
// * IDirect3DDevice8_CreateIndexBuffer
// ******************************************************************
SOOVPA<13> IDirect3DDevice8_CreateIndexBuffer_1_0_3925 =
{
0, // Large == 0
13, // Count == 13
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_CreateIndexBuffer+0x13 : mov eax, 0x8007000E
{ 0x13, 0xB8 }, // (Offset,Value)-Pair #1
{ 0x14, 0x0E }, // (Offset,Value)-Pair #2
{ 0x15, 0x00 }, // (Offset,Value)-Pair #3
{ 0x16, 0x07 }, // (Offset,Value)-Pair #4
{ 0x17, 0x80 }, // (Offset,Value)-Pair #5
// IDirect3DDevice8_CreateIndexBuffer+0x18 : retn 0x14
{ 0x18, 0xC2 }, // (Offset,Value)-Pair #6
{ 0x19, 0x14 }, // (Offset,Value)-Pair #7
// IDirect3DDevice8_CreateIndexBuffer+0x2E : mov dword ptr [eax], 0x1010001
{ 0x2E, 0xC7 }, // (Offset,Value)-Pair #8
{ 0x2F, 0x00 }, // (Offset,Value)-Pair #9
{ 0x30, 0x01 }, // (Offset,Value)-Pair #10
{ 0x31, 0x00 }, // (Offset,Value)-Pair #11
{ 0x32, 0x01 }, // (Offset,Value)-Pair #12
{ 0x33, 0x01 }, // (Offset,Value)-Pair #13
}
};
// ******************************************************************
// * IDirect3DDevice8_SetVertexShaderConstant
// ******************************************************************
@ -451,6 +674,37 @@ SOOVPA<11> IDirect3DDevice8_SetRenderState_FogColor_1_0_3925 =
}
};
// ******************************************************************
// * IDirect3DDevice8_SetRenderState_FillMode
// ******************************************************************
SOOVPA<11> IDirect3DDevice8_SetRenderState_FillMode_1_0_3925 =
{
0, // Large == 0
11, // Count == 11
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetRenderState_FillMode+0x23 : mov dword ptr [eax], 0x8038C
{ 0x23, 0xC7 }, // (Offset,Value)-Pair #1
{ 0x24, 0x00 }, // (Offset,Value)-Pair #2
{ 0x25, 0x8C }, // (Offset,Value)-Pair #3
{ 0x26, 0x03 }, // (Offset,Value)-Pair #4
{ 0x27, 0x08 }, // (Offset,Value)-Pair #5
{ 0x28, 0x00 }, // (Offset,Value)-Pair #6
// IDirect3DDevice8_SetRenderState_FillMode+0x2F : add eax, 0x0C
{ 0x2F, 0x83 }, // (Offset,Value)-Pair #7
{ 0x30, 0xC0 }, // (Offset,Value)-Pair #8
{ 0x31, 0x0C }, // (Offset,Value)-Pair #9
// IDirect3DDevice8_SetRenderState_FillMode+0x3B : retn 0x04
{ 0x3B, 0xC2 }, // (Offset,Value)-Pair #10
{ 0x3C, 0x04 }, // (Offset,Value)-Pair #11
}
};
// ******************************************************************
// * IDirect3DDevice8_SetRenderState_StencilEnable
// ******************************************************************
@ -1017,6 +1271,66 @@ OOVPATable D3D8_1_0_3925[] =
"EmuIDirect3DDevice8_Release"
#endif
},
// IDirect3DDevice8::SetRenderTarget
{
(OOVPA*)&IDirect3DDevice8_SetRenderTarget_1_0_3925,
XTL::EmuIDirect3DDevice8_SetRenderTarget,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderTarget"
#endif
},
// IDirect3DDevice8::SetStreamSource
{
(OOVPA*)&IDirect3DDevice8_SetStreamSource_1_0_3925,
XTL::EmuIDirect3DDevice8_SetStreamSource,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetStreamSource"
#endif
},
// IDirect3DDevice8::SetIndices
{
(OOVPA*)&IDirect3DDevice8_SetIndices_1_0_3925,
XTL::EmuIDirect3DDevice8_SetIndices,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetIndices"
#endif
},
// IDirect3DDevice8::SetViewport
{
(OOVPA*)&IDirect3DDevice8_SetViewport_1_0_3925,
XTL::EmuIDirect3DDevice8_SetViewport,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetViewport"
#endif
},
// IDirect3DDevice8::SetTexture
{
(OOVPA*)&IDirect3DDevice8_SetTexture_1_0_3925,
XTL::EmuIDirect3DDevice8_SetTexture,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetTexture"
#endif
},
// IDirect3DDevice8::Clear
{
(OOVPA*)&IDirect3DDevice8_Clear_1_0_3925,
XTL::EmuIDirect3DDevice8_Clear,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_Clear"
#endif
},
// IDirect3DDevice8::CreatePalette
{
(OOVPA*)&IDirect3DDevice8_CreatePalette_1_0_3925,
@ -1067,6 +1381,16 @@ OOVPATable D3D8_1_0_3925[] =
"EmuIDirect3DDevice8_CreateCubeTexture"
#endif
},
// IDirect3DDevice8::CreateIndexBuffer
{
(OOVPA*)&IDirect3DDevice8_CreateIndexBuffer_1_0_3925,
XTL::EmuIDirect3DDevice8_CreateIndexBuffer,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_CreateIndexBuffer"
#endif
},
// IDirect3DDevice8::SetVertexShaderConstant
{
(OOVPA*)&IDirect3DDevice8_SetVertexShaderConstant_1_0_3925,
@ -1127,6 +1451,16 @@ OOVPATable D3D8_1_0_3925[] =
"EmuIDirect3DDevice8_SetRenderState_FogColor"
#endif
},
// IDirect3DDevice8::SetRenderState_FillMode
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_FillMode_1_0_3925,
XTL::EmuIDirect3DDevice8_SetRenderState_FillMode,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_FillMode"
#endif
},
// IDirect3DDevice8::SetRenderState_StencilEnable
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilEnable_1_0_3925,

View File

@ -163,9 +163,9 @@ SOOVPA<9> IDirect3D8_KickOffAndWaitForIdle_1_0_4627 =
};
// ******************************************************************
// * IDirect3D8_SetViewport
// * IDirect3DDevice8_SetViewport
// ******************************************************************
SOOVPA<9> IDirect3D8_SetViewport_1_0_4627 =
SOOVPA<9> IDirect3DDevice8_SetViewport_1_0_4627 =
{
0, // Large == 0
9, // Count == 9
@ -174,17 +174,17 @@ SOOVPA<9> IDirect3D8_SetViewport_1_0_4627 =
0, // XRef Not Used
{
// IDirect3D8_SetViewport+0x0A : mov eax, [esi+0x21B4]
// IDirect3DDevice8_SetViewport+0x0A : mov eax, [esi+0x21B4]
{ 0x0A, 0x8B }, // (Offset,Value)-Pair #1
{ 0x0B, 0x86 }, // (Offset,Value)-Pair #2
{ 0x0C, 0xB4 }, // (Offset,Value)-Pair #3
{ 0x0D, 0x21 }, // (Offset,Value)-Pair #4
// IDirect3D8_SetViewport+0x63 : shl edi, cl
// IDirect3DDevice8_SetViewport+0x63 : shl edi, cl
{ 0x63, 0xD3 }, // (Offset,Value)-Pair #5
{ 0x64, 0xE7 }, // (Offset,Value)-Pair #6
// IDirect3D8_SetViewport+0xDF : and ecx, 0x0F
// IDirect3DDevice8_SetViewport+0xDF : and ecx, 0x0F
{ 0xDF, 0x83 }, // (Offset,Value)-Pair #7
{ 0xE0, 0xE1 }, // (Offset,Value)-Pair #8
{ 0xE1, 0x0F }, // (Offset,Value)-Pair #9
@ -1497,12 +1497,12 @@ OOVPATable D3D8_1_0_4627[] =
},
// IDirect3DDevice8::SetViewport
{
(OOVPA*)&IDirect3D8_SetViewport_1_0_4627,
(OOVPA*)&IDirect3DDevice8_SetViewport_1_0_4627,
XTL::EmuIDirect3D8_SetViewport,
XTL::EmuIDirect3DDevice8_SetViewport,
#ifdef _DEBUG_TRACE
"EmuIDirect3D8_SetViewport"
"EmuIDirect3DDevice8_SetViewport"
#endif
},
// IDirect3DDevice8::SetShaderConstantMode

View File

@ -1189,9 +1189,9 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_GetBackBuffer
}
// ******************************************************************
// * func: EmuIDirect3D8_SetViewport
// * func: EmuIDirect3DDevice8_SetViewport
// ******************************************************************
HRESULT WINAPI XTL::EmuIDirect3D8_SetViewport
HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetViewport
(
CONST D3DVIEWPORT8 *pViewport
)
@ -1203,7 +1203,7 @@ HRESULT WINAPI XTL::EmuIDirect3D8_SetViewport
// ******************************************************************
#ifdef _DEBUG_TRACE
{
printf("EmuD3D8 (0x%X): EmuIDirect3D8_SetViewport\n"
printf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetViewport\n"
"(\n"
" pViewport : 0x%.08X\n"
");\n",
@ -1988,10 +1988,59 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateCubeTexture
return hRet;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_CreateIndexBuffer
// ******************************************************************
HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateIndexBuffer
(
UINT Length,
DWORD Usage,
D3DFORMAT Format,
D3DPOOL Pool,
X_D3DIndexBuffer **ppIndexBuffer
)
{
EmuSwapFS(); // Win2k/XP FS
// ******************************************************************
// * debug trace
// ******************************************************************
#ifdef _DEBUG_TRACE
{
printf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CreateIndexBuffer\n"
"(\n"
" Length : 0x%.08X\n"
" Usage : 0x%.08X\n"
" Format : 0x%.08X\n"
" Pool : 0x%.08X\n"
" ppIndexBuffer : 0x%.08X\n"
");\n",
GetCurrentThreadId(), Length, Usage, Format, Pool, ppIndexBuffer);
}
#endif
*ppIndexBuffer = new X_D3DIndexBuffer();
// ******************************************************************
// * redirect to windows d3d
// ******************************************************************
HRESULT hRet = g_pD3DDevice8->CreateIndexBuffer
(
Length, D3DUSAGE_DYNAMIC, D3DFMT_INDEX16, D3DPOOL_MANAGED, &((*ppIndexBuffer)->EmuIndexBuffer8)
);
if(FAILED(hRet))
printf("*Warning* CreateIndexBuffer FAILED\n");
EmuSwapFS(); // XBox FS
return hRet;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetIndices
// ******************************************************************
VOID WINAPI XTL::EmuIDirect3DDevice8_SetIndices
HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetIndices
(
X_D3DIndexBuffer *pIndexData,
UINT BaseVertexIndex
@ -2013,15 +2062,20 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetIndices
}
#endif
IDirect3DIndexBuffer8 *pIndexBuffer = 0;
if(pIndexData != 0)
{
EmuVerifyResourceIsRegistered(pIndexData);
IDirect3DIndexBuffer8 *pIndexBuffer = pIndexData->EmuIndexBuffer8;
pIndexBuffer = pIndexData->EmuIndexBuffer8;
}
g_pD3DDevice8->SetIndices(pIndexBuffer, BaseVertexIndex);
HRESULT hRet = g_pD3DDevice8->SetIndices(pIndexBuffer, BaseVertexIndex);
EmuSwapFS(); // XBox FS
return;
return hRet;
}
// ******************************************************************
@ -5126,6 +5180,56 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_LightEnable
return hRet;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetRenderTarget
// ******************************************************************
HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetRenderTarget
(
X_D3DSurface *pRenderTarget,
X_D3DSurface *pNewZStencil
)
{
EmuSwapFS(); // Win2k/XP FS
// ******************************************************************
// * debug trace
// ******************************************************************
#ifdef _DEBUG_TRACE
{
printf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderTarget\n"
"(\n"
" pRenderTarget : 0x%.08X\n"
" pNewZStencil : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pRenderTarget, pNewZStencil);
}
#endif
IDirect3DSurface8 *pPCRenderTarget = 0;
IDirect3DSurface8 *pPCNewZStencil = 0;
if(pRenderTarget != 0)
{
EmuVerifyResourceIsRegistered(pRenderTarget);
pPCRenderTarget = pRenderTarget->EmuSurface8;
}
if(pNewZStencil != 0)
{
EmuVerifyResourceIsRegistered(pNewZStencil);
pPCNewZStencil = pNewZStencil->EmuSurface8;
}
HRESULT hRet = g_pD3DDevice8->SetRenderTarget(pPCRenderTarget, pPCNewZStencil);
EmuSwapFS(); // XBox FS
if(FAILED(hRet))
EmuWarning("SetRenderTarget Failed! (0x%.08X)", hRet);
return hRet;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_CreatePalette
// ******************************************************************