segaGT2002

This commit is contained in:
Aaron Robinson 2004-02-26 03:36:57 +00:00
parent f65042c7c5
commit 76009c018c
5 changed files with 129 additions and 17 deletions

BIN
Cxbx.opt

Binary file not shown.

View File

@ -37,7 +37,7 @@
#include "OOVPA.h"
extern SOOVPA<10> IDirect3DDevice8_SetTextureState_TexCoordIndex_1_0_4134;
extern SOOVPA<13> IDirect3DDevice8_SetRenderState_CullMode_1_0_4134;
extern SOOVPA<14> IDirect3DDevice8_SetRenderState_CullMode_1_0_4134;
extern OOVPATable D3D8_1_0_4134[];
extern uint32 D3D8_1_0_4134_SIZE;

View File

@ -2327,7 +2327,20 @@ XTL::X_D3DResource * WINAPI XTL::EmuIDirect3DDevice8_CreateTexture2
{
X_D3DTexture *pTexture;
EmuIDirect3DDevice8_CreateTexture(Width, Height, Levels, Usage, Format, D3DPOOL_MANAGED, &pTexture);
switch(D3DResource)
{
case 3: /*D3DRTYPE_TEXTURE*/
EmuIDirect3DDevice8_CreateTexture(Width, Height, Levels, Usage, Format, D3DPOOL_MANAGED, &pTexture);
break;
case 4: /*D3DRTYPE_VOLUMETEXTURE*/
EmuIDirect3DDevice8_CreateVolumeTexture(Width, Height, Depth, Levels, Usage, Format, D3DPOOL_MANAGED, (X_D3DVolumeTexture**)&pTexture);
break;
case 5: /*D3DRTYPE_CUBETEXTURE*/
EmuCleanup("Cube textures temporarily not supported!");
break;
default:
EmuCleanup("D3DResource = %d is not supported!", D3DResource);
}
return pTexture;
}

View File

@ -67,35 +67,38 @@ SOOVPA<10> IDirect3DDevice8_SetTextureState_TexCoordIndex_1_0_4134 =
// ******************************************************************
// * IDirect3DDevice8_SetRenderState_CullMode
// ******************************************************************
SOOVPA<13> IDirect3DDevice8_SetRenderState_CullMode_1_0_4134 =
SOOVPA<14> IDirect3DDevice8_SetRenderState_CullMode_1_0_4134 =
{
0, // Large == 0
13, // Count == 13
14, // Count == 14
XREF_DXSRSCULLMODE, // XRef Is Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetRenderState_CullMode+0x00 : push esi
{ 0x00, 0x56 }, // (Offset,Value)-Pair #1
// IDirect3DDevice8_SetRenderState_CullMode+0x19 : mov dword ptr [eax], 0x40308
{ 0x19, 0xC7 }, // (Offset,Value)-Pair #1
{ 0x1B, 0x08 }, // (Offset,Value)-Pair #2
{ 0x1C, 0x03 }, // (Offset,Value)-Pair #3
{ 0x1D, 0x04 }, // (Offset,Value)-Pair #4
{ 0x19, 0xC7 }, // (Offset,Value)-Pair #2
{ 0x1B, 0x08 }, // (Offset,Value)-Pair #3
{ 0x1C, 0x03 }, // (Offset,Value)-Pair #4
{ 0x1D, 0x04 }, // (Offset,Value)-Pair #5
// IDirect3DDevice8_SetRenderState_CullMode+0x24 : add eax, 8
{ 0x24, 0x83 }, // (Offset,Value)-Pair #5
{ 0x25, 0xC0 }, // (Offset,Value)-Pair #6
{ 0x26, 0x08 }, // (Offset,Value)-Pair #7
{ 0x24, 0x83 }, // (Offset,Value)-Pair #6
{ 0x25, 0xC0 }, // (Offset,Value)-Pair #7
{ 0x26, 0x08 }, // (Offset,Value)-Pair #8
// IDirect3DDevice8_SetRenderState_CullMode+0x30 : retn 4
{ 0x30, 0xC2 }, // (Offset,Value)-Pair #8
{ 0x31, 0x04 }, // (Offset,Value)-Pair #9
{ 0x30, 0xC2 }, // (Offset,Value)-Pair #9
{ 0x31, 0x04 }, // (Offset,Value)-Pair #10
// IDirect3DDevice8_SetRenderState_CullMode+0x53 : add edx, 0x404
{ 0x53, 0x81 }, // (Offset,Value)-Pair #10
{ 0x54, 0xC2 }, // (Offset,Value)-Pair #11
{ 0x55, 0x04 }, // (Offset,Value)-Pair #12
{ 0x56, 0x04 }, // (Offset,Value)-Pair #13
{ 0x53, 0x81 }, // (Offset,Value)-Pair #11
{ 0x54, 0xC2 }, // (Offset,Value)-Pair #12
{ 0x55, 0x04 }, // (Offset,Value)-Pair #13
{ 0x56, 0x04 }, // (Offset,Value)-Pair #14
}
};

View File

@ -1235,6 +1235,41 @@ SOOVPA<10> IDirect3DDevice8_SetTextureState_TexCoordIndex_1_0_4627 =
}
};
// ******************************************************************
// * IDirect3DDevice8_SetRenderState_CullModeB
// ******************************************************************
SOOVPA<13> IDirect3DDevice8_SetRenderState_CullModeB_1_0_4627 =
{
0, // Large == 0
13, // Count == 13
XREF_DXSRSCULLMODE, // XRef Is Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetRenderState_CullModeB+0x22 : mov dword ptr [eax], 0x40308
{ 0x22, 0xC7 }, // (Offset,Value)-Pair #1
{ 0x24, 0x08 }, // (Offset,Value)-Pair #2
{ 0x25, 0x03 }, // (Offset,Value)-Pair #3
{ 0x26, 0x04 }, // (Offset,Value)-Pair #4
// IDirect3DDevice8_SetRenderState_CullModeB+0x2D : add eax, 8
{ 0x2D, 0x83 }, // (Offset,Value)-Pair #5
{ 0x2E, 0xC0 }, // (Offset,Value)-Pair #6
{ 0x2F, 0x08 }, // (Offset,Value)-Pair #7
// IDirect3DDevice8_SetRenderState_CullModeB+0x39 : retn 4
{ 0x39, 0xC2 }, // (Offset,Value)-Pair #8
{ 0x3A, 0x04 }, // (Offset,Value)-Pair #9
// IDirect3DDevice8_SetRenderState_CullModeB+0x5C : add edx, 0x404
{ 0x5C, 0x81 }, // (Offset,Value)-Pair #10
{ 0x5D, 0xC2 }, // (Offset,Value)-Pair #11
{ 0x5E, 0x04 }, // (Offset,Value)-Pair #12
{ 0x5F, 0x04 }, // (Offset,Value)-Pair #13
}
};
// ******************************************************************
// * IDirect3DDevice8_SetRenderState_NormalizeNormalsB
// ******************************************************************
@ -1598,6 +1633,47 @@ SOOVPA<11> IDirect3DResource8_ReleaseB_1_0_4627 =
}
};
// ******************************************************************
// * IDirect3DTexture8_LockRectB
// ******************************************************************
SOOVPA<15> IDirect3DTexture8_LockRectB_1_0_4627 =
{
0, // Large == 0
15, // Count == 15
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DTexture8_LockRectB+0x00 : mov eax, [esp+0x14]
{ 0x00, 0x8B }, // (Offset,Value)-Pair #1
{ 0x01, 0x44 }, // (Offset,Value)-Pair #2
{ 0x02, 0x24 }, // (Offset,Value)-Pair #3
{ 0x03, 0x14 }, // (Offset,Value)-Pair #4
// IDirect3DTexture8_LockRectB+0x04 : mov ecx, [esp+0x10]
{ 0x04, 0x8B }, // (Offset,Value)-Pair #5
{ 0x05, 0x4C }, // (Offset,Value)-Pair #6
{ 0x06, 0x24 }, // (Offset,Value)-Pair #7
{ 0x07, 0x0C }, // (Offset,Value)-Pair #8
// IDirect3DTexture8_LockRectB+0x0C : push eax
{ 0x0C, 0x50 }, // (Offset,Value)-Pair #9
// IDirect3DTexture8_LockRectB+0x11 : push ecx; push edx; push eax
{ 0x11, 0x51 }, // (Offset,Value)-Pair #10
{ 0x12, 0x52 }, // (Offset,Value)-Pair #11
{ 0x13, 0x50 }, // (Offset,Value)-Pair #12
// IDirect3DTexture8_LockRectB+0x18 : call [addr]
{ 0x18, 0xE8 }, // (Offset,Value)-Pair #13
// IDirect3DTexture8_LockRectB+0x1D : retn 0x14
{ 0x1D, 0xC2 }, // (Offset,Value)-Pair #14
{ 0x1E, 0x14 }, // (Offset,Value)-Pair #15
}
};
// ******************************************************************
// * IDirect3DSurface8_LockRectB
// ******************************************************************
@ -2299,6 +2375,16 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetTextureState_BorderColor"
#endif
},
// IDirect3DDevice8::SetRenderState_CullModeB
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_CullModeB_1_0_4627,
XTL::EmuIDirect3DDevice8_SetRenderState_CullMode,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_CullModeB"
#endif
},
// IDirect3DDevice8::SetRenderState_CullMode (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_CullMode_1_0_4134,
@ -2737,6 +2823,16 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DTexture8_LockRect"
#endif
},
// IDirect3DTexture8::LockRectB
{
(OOVPA*)&IDirect3DTexture8_LockRectB_1_0_4627,
XTL::EmuIDirect3DTexture8_LockRect,
#ifdef _DEBUG_TRACE
"EmuIDirect3DTexture8_LockRectB"
#endif
},
};
// ******************************************************************