pushbuff,state,4432,...
This commit is contained in:
parent
c25862b27e
commit
f61cc82479
|
@ -229,6 +229,10 @@ SOURCE=.\Include\Win32\CxbxKrnl\EmuD3D8\PushBuffer.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\Include\Win32\CxbxKrnl\EmuD3D8\State.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\Include\Win32\CxbxKrnl\EmuD3D8\VertexBuffer.h
|
SOURCE=.\Include\Win32\CxbxKrnl\EmuD3D8\VertexBuffer.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
@ -469,6 +473,10 @@ SOURCE=.\Source\Win32\CxbxKrnl\EmuD3D8\PushBuffer.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\Source\Win32\CxbxKrnl\EmuD3D8\State.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\Source\Win32\CxbxKrnl\EmuD3D8\VertexBuffer.cpp
|
SOURCE=.\Source\Win32\CxbxKrnl\EmuD3D8\VertexBuffer.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
|
@ -54,12 +54,6 @@ extern GUID hRefGUID_bTexIsLinear;
|
||||||
// EmuD3DTileCache (8 tiles maximum)
|
// EmuD3DTileCache (8 tiles maximum)
|
||||||
extern X_D3DTILE EmuD3DTileCache[0x08];
|
extern X_D3DTILE EmuD3DTileCache[0x08];
|
||||||
|
|
||||||
// EmuD3DDeferredRenderState
|
|
||||||
extern DWORD *EmuD3DDeferredRenderState;
|
|
||||||
|
|
||||||
// EmuD3DDeferredTextureState
|
|
||||||
extern DWORD *EmuD3DDeferredTextureState;
|
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * func: EmuIDirect3D8_CreateDevice
|
// * func: EmuIDirect3D8_CreateDevice
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
@ -155,9 +149,9 @@ HRESULT WINAPI EmuIDirect3D8_EnumAdapterModes
|
||||||
VOID WINAPI EmuIDirect3D8_KickOffAndWaitForIdle();
|
VOID WINAPI EmuIDirect3D8_KickOffAndWaitForIdle();
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * func: EmuIDirect3D8_SetGammaRamp
|
// * func: EmuIDirect3DDevice8_SetGammaRamp
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
VOID WINAPI EmuIDirect3D8_SetGammaRamp
|
VOID WINAPI EmuIDirect3DDevice8_SetGammaRamp
|
||||||
(
|
(
|
||||||
DWORD dwFlags,
|
DWORD dwFlags,
|
||||||
CONST X_D3DGAMMARAMP *pRamp
|
CONST X_D3DGAMMARAMP *pRamp
|
||||||
|
|
|
@ -41,4 +41,7 @@ extern void EmuExecutePushBuffer
|
||||||
PVOID pFixup
|
PVOID pFixup
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// push buffer debugging
|
||||||
|
extern bool g_bStepPush;
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -0,0 +1,45 @@
|
||||||
|
// ******************************************************************
|
||||||
|
// *
|
||||||
|
// * .,-::::: .,:: .::::::::. .,:: .:
|
||||||
|
// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;;
|
||||||
|
// * [[[ '[[,,[[' [[[__[[\. '[[,,[['
|
||||||
|
// * $$$ Y$$$P $$""""Y$$ Y$$$P
|
||||||
|
// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo,
|
||||||
|
// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm,
|
||||||
|
// *
|
||||||
|
// * Cxbx->Win32->CxbxKrnl->EmuD3D8->State.h
|
||||||
|
// *
|
||||||
|
// * This file is part of the Cxbx project.
|
||||||
|
// *
|
||||||
|
// * Cxbx and Cxbe are free software; you can redistribute them
|
||||||
|
// * and/or modify them under the terms of the GNU General Public
|
||||||
|
// * License as published by the Free Software Foundation; either
|
||||||
|
// * version 2 of the license, or (at your option) any later version.
|
||||||
|
// *
|
||||||
|
// * This program is distributed in the hope that it will be useful,
|
||||||
|
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// * GNU General Public License for more details.
|
||||||
|
// *
|
||||||
|
// * You should have recieved a copy of the GNU General Public License
|
||||||
|
// * along with this program; see the file COPYING.
|
||||||
|
// * If not, write to the Free Software Foundation, Inc.,
|
||||||
|
// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA.
|
||||||
|
// *
|
||||||
|
// * (c) 2002-2004 Aaron Robinson <caustik@caustik.com>
|
||||||
|
// *
|
||||||
|
// * All rights reserved
|
||||||
|
// *
|
||||||
|
// ******************************************************************
|
||||||
|
#ifndef STATE_H
|
||||||
|
#define STATE_H
|
||||||
|
|
||||||
|
// EmuD3DDeferredRenderState
|
||||||
|
extern DWORD *EmuD3DDeferredRenderState;
|
||||||
|
|
||||||
|
// EmuD3DDeferredTextureState
|
||||||
|
extern DWORD *EmuD3DDeferredTextureState;
|
||||||
|
|
||||||
|
extern void EmuUpdateDeferredStates();
|
||||||
|
|
||||||
|
#endif
|
|
@ -40,6 +40,7 @@
|
||||||
#include "EmuD3D8\VertexBuffer.h"
|
#include "EmuD3D8\VertexBuffer.h"
|
||||||
#include "EmuD3D8\PushBuffer.h"
|
#include "EmuD3D8\PushBuffer.h"
|
||||||
#include "EmuD3D8\VertexShader.h"
|
#include "EmuD3D8\VertexShader.h"
|
||||||
|
#include "EmuD3D8\State.h"
|
||||||
#include "EmuDInput.h"
|
#include "EmuDInput.h"
|
||||||
#include "EmuDSound.h"
|
#include "EmuDSound.h"
|
||||||
#include "EmuXOnline.h"
|
#include "EmuXOnline.h"
|
||||||
|
|
|
@ -70,7 +70,6 @@ static LRESULT WINAPI EmuMsgProc(HWND hWnd, UINT msg, WPARAM wPara
|
||||||
static DWORD WINAPI EmuUpdateTickCount(LPVOID);
|
static DWORD WINAPI EmuUpdateTickCount(LPVOID);
|
||||||
static inline void EmuVerifyResourceIsRegistered(XTL::X_D3DResource *pResource);
|
static inline void EmuVerifyResourceIsRegistered(XTL::X_D3DResource *pResource);
|
||||||
static void EmuAdjustPower2(UINT *dwWidth, UINT *dwHeight);
|
static void EmuAdjustPower2(UINT *dwWidth, UINT *dwHeight);
|
||||||
static void EmuUpdateDeferredStates();
|
|
||||||
|
|
||||||
//typedef BOOL (WINAPI *pfGetMonitorInfo)(HMONITOR hMonitor, LPMONITORINFO lpmi);
|
//typedef BOOL (WINAPI *pfGetMonitorInfo)(HMONITOR hMonitor, LPMONITORINFO lpmi);
|
||||||
//static pfGetMonitorInfo GetMonitorInfo = (pfGetMonitorInfo)GetProcAddress(LoadLibrary("user32.dll"), "GetMonitorInfoA");
|
//static pfGetMonitorInfo GetMonitorInfo = (pfGetMonitorInfo)GetProcAddress(LoadLibrary("user32.dll"), "GetMonitorInfoA");
|
||||||
|
@ -135,10 +134,6 @@ static DWORD g_dwVertexShaderUsage = 0;
|
||||||
// cached Direct3D tiles
|
// cached Direct3D tiles
|
||||||
XTL::X_D3DTILE XTL::EmuD3DTileCache[0x08] = {0};
|
XTL::X_D3DTILE XTL::EmuD3DTileCache[0x08] = {0};
|
||||||
|
|
||||||
// deferred state lookup tables
|
|
||||||
DWORD *XTL::EmuD3DDeferredRenderState;
|
|
||||||
DWORD *XTL::EmuD3DDeferredTextureState;
|
|
||||||
|
|
||||||
// information passed to the create device proxy thread
|
// information passed to the create device proxy thread
|
||||||
struct EmuD3D8CreateDeviceProxyData
|
struct EmuD3D8CreateDeviceProxyData
|
||||||
{
|
{
|
||||||
|
@ -403,6 +398,10 @@ static LRESULT WINAPI EmuMsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar
|
||||||
if(g_iWireframe++ == 2)
|
if(g_iWireframe++ == 2)
|
||||||
g_iWireframe = 0;
|
g_iWireframe = 0;
|
||||||
}
|
}
|
||||||
|
else if(wParam == VK_F12)
|
||||||
|
{
|
||||||
|
XTL::g_bStepPush = !XTL::g_bStepPush;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1281,9 +1280,9 @@ VOID WINAPI XTL::EmuIDirect3D8_KickOffAndWaitForIdle()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * func: EmuIDirect3D8_SetGammaRamp
|
// * func: EmuIDirect3DDevice8_SetGammaRamp
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
VOID WINAPI XTL::EmuIDirect3D8_SetGammaRamp
|
VOID WINAPI XTL::EmuIDirect3DDevice8_SetGammaRamp
|
||||||
(
|
(
|
||||||
DWORD dwFlags,
|
DWORD dwFlags,
|
||||||
CONST X_D3DGAMMARAMP *pRamp
|
CONST X_D3DGAMMARAMP *pRamp
|
||||||
|
@ -1294,7 +1293,7 @@ VOID WINAPI XTL::EmuIDirect3D8_SetGammaRamp
|
||||||
// debug trace
|
// debug trace
|
||||||
#ifdef _DEBUG_TRACE
|
#ifdef _DEBUG_TRACE
|
||||||
{
|
{
|
||||||
printf("EmuD3D8 (0x%X): EmuIDirect3D8_SetGammaRamp\n"
|
printf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetGammaRamp\n"
|
||||||
"(\n"
|
"(\n"
|
||||||
" dwFlags : 0x%.08X\n"
|
" dwFlags : 0x%.08X\n"
|
||||||
" pRamp : 0x%.08X\n"
|
" pRamp : 0x%.08X\n"
|
||||||
|
@ -2935,7 +2934,7 @@ static void EmuFlushD3DIVB()
|
||||||
}
|
}
|
||||||
//*/
|
//*/
|
||||||
|
|
||||||
EmuUpdateDeferredStates();
|
XTL::EmuUpdateDeferredStates();
|
||||||
|
|
||||||
// XTL::EmuD3DDeferredRenderState
|
// XTL::EmuD3DDeferredRenderState
|
||||||
// HACK: TODO: Halo apparently has different values for D3DCULL_CW...i believe
|
// HACK: TODO: Halo apparently has different values for D3DCULL_CW...i believe
|
||||||
|
@ -5458,25 +5457,39 @@ VOID __fastcall XTL::EmuIDirect3DDevice8_SetRenderState_Simple
|
||||||
Value |= D3DCOLORWRITEENABLE_BLUE;
|
Value |= D3DCOLORWRITEENABLE_BLUE;
|
||||||
if(OrigValue & (1L<<24))
|
if(OrigValue & (1L<<24))
|
||||||
Value |= D3DCOLORWRITEENABLE_ALPHA;
|
Value |= D3DCOLORWRITEENABLE_ALPHA;
|
||||||
|
|
||||||
|
DbgPrintf("D3DRS_COLORWRITEENABLE := 0x%.08X\n", Value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case D3DRS_SHADEMODE:
|
case D3DRS_SHADEMODE:
|
||||||
Value = Value & 0x03;
|
Value = Value & 0x03;
|
||||||
|
DbgPrintf("D3DRS_SHADEMODE := 0x%.08X\n", Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case D3DRS_BLENDOP:
|
case D3DRS_BLENDOP:
|
||||||
Value = EmuXB2PC_D3DBLENDOP(Value);
|
Value = EmuXB2PC_D3DBLENDOP(Value);
|
||||||
|
DbgPrintf("D3DRS_BLENDOP := 0x%.08X\n", Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case D3DRS_SRCBLEND:
|
case D3DRS_SRCBLEND:
|
||||||
|
Value = EmuXB2PC_D3DBLEND(Value);
|
||||||
|
DbgPrintf("D3DRS_SRCBLEND := 0x%.08X\n", Value);
|
||||||
|
break;
|
||||||
|
|
||||||
case D3DRS_DESTBLEND:
|
case D3DRS_DESTBLEND:
|
||||||
Value = EmuXB2PC_D3DBLEND(Value);
|
Value = EmuXB2PC_D3DBLEND(Value);
|
||||||
|
DbgPrintf("D3DRS_DESTBLEND := 0x%.08X\n", Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case D3DRS_ZFUNC:
|
case D3DRS_ZFUNC:
|
||||||
|
Value = EmuXB2PC_D3DCMPFUNC(Value);
|
||||||
|
DbgPrintf("D3DRS_ZFUNC := 0x%.08X\n", Value);
|
||||||
|
break;
|
||||||
|
|
||||||
case D3DRS_ALPHAFUNC:
|
case D3DRS_ALPHAFUNC:
|
||||||
Value = EmuXB2PC_D3DCMPFUNC(Value);
|
Value = EmuXB2PC_D3DCMPFUNC(Value);
|
||||||
|
DbgPrintf("D3DRS_ALPHAFUNC := 0x%.08X\n", Value);
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6249,263 +6262,6 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetVertexShader
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ******************************************************************
|
|
||||||
// * func: EmuUpdateDeferredStates
|
|
||||||
// ******************************************************************
|
|
||||||
static void EmuUpdateDeferredStates()
|
|
||||||
{
|
|
||||||
using namespace XTL;
|
|
||||||
|
|
||||||
// Certain D3DRS values need to be checked on each Draw[Indexed]Vertices
|
|
||||||
if(EmuD3DDeferredRenderState != 0)
|
|
||||||
{
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[0] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_FOGENABLE, XTL::EmuD3DDeferredRenderState[0]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[1] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_FOGTABLEMODE, XTL::EmuD3DDeferredRenderState[1]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[2] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_FOGSTART, XTL::EmuD3DDeferredRenderState[2]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[3] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_FOGEND, XTL::EmuD3DDeferredRenderState[3]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[6] != X_D3DRS_UNK)
|
|
||||||
{
|
|
||||||
::DWORD dwConv = 0;
|
|
||||||
|
|
||||||
dwConv |= (XTL::EmuD3DDeferredRenderState[6] & 0x00000010) ? D3DWRAP_U : 0;
|
|
||||||
dwConv |= (XTL::EmuD3DDeferredRenderState[6] & 0x00001000) ? D3DWRAP_V : 0;
|
|
||||||
dwConv |= (XTL::EmuD3DDeferredRenderState[6] & 0x00100000) ? D3DWRAP_W : 0;
|
|
||||||
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_WRAP0, dwConv);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[10] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_LIGHTING, XTL::EmuD3DDeferredRenderState[10]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[11] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_SPECULARENABLE, XTL::EmuD3DDeferredRenderState[11]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[13] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_COLORVERTEX, XTL::EmuD3DDeferredRenderState[13]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[20] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_AMBIENTMATERIALSOURCE, XTL::EmuD3DDeferredRenderState[20]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[23] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_AMBIENT, XTL::EmuD3DDeferredRenderState[23]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[24] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSIZE, XTL::EmuD3DDeferredRenderState[24]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[25] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSIZE_MIN, XTL::EmuD3DDeferredRenderState[25]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[26] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSPRITEENABLE, XTL::EmuD3DDeferredRenderState[26]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[27] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSCALEENABLE, XTL::EmuD3DDeferredRenderState[27]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[28] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSCALE_A, XTL::EmuD3DDeferredRenderState[28]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[29] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSCALE_B, XTL::EmuD3DDeferredRenderState[29]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[30] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSCALE_C, XTL::EmuD3DDeferredRenderState[30]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[31] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSIZE_MAX, XTL::EmuD3DDeferredRenderState[31]);
|
|
||||||
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[33] != X_D3DRS_UNK)
|
|
||||||
g_pD3DDevice8->SetRenderState(D3DRS_PATCHSEGMENTS, XTL::EmuD3DDeferredRenderState[33]);
|
|
||||||
|
|
||||||
/** To check for unhandled RenderStates
|
|
||||||
for(int v=0;v<117-82;v++)
|
|
||||||
{
|
|
||||||
if(XTL::EmuD3DDeferredRenderState[v] != X_D3DRS_UNK)
|
|
||||||
{
|
|
||||||
if(v != 0 && v != 1 && v != 2 && v != 3 && v != 6 && v != 10 && v != 11 && v != 13
|
|
||||||
&& v != 20 && v != 23 && v != 24 && v != 25 && v != 26 && v != 27 && v != 28 && v != 29
|
|
||||||
&& v != 30 && v != 31 && v != 33)
|
|
||||||
EmuWarning("Unhandled RenderState Change @ %d (%d)", v, v + 82);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//**/
|
|
||||||
}
|
|
||||||
|
|
||||||
// Certain D3DTS values need to be checked on each Draw[Indexed]Vertices
|
|
||||||
if(EmuD3DDeferredTextureState != 0)
|
|
||||||
{
|
|
||||||
for(int v=0;v<4;v++)
|
|
||||||
{
|
|
||||||
::DWORD *pCur = &EmuD3DDeferredTextureState[v*32];
|
|
||||||
|
|
||||||
if(pCur[0] != X_D3DTSS_UNK)
|
|
||||||
{
|
|
||||||
if(pCur[0] == 5)
|
|
||||||
EmuCleanup("ClampToEdge is unsupported (temporarily)");
|
|
||||||
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ADDRESSU, pCur[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pCur[1] != X_D3DTSS_UNK)
|
|
||||||
{
|
|
||||||
if(pCur[1] == 5)
|
|
||||||
EmuCleanup("ClampToEdge is unsupported (temporarily)");
|
|
||||||
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ADDRESSV, pCur[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pCur[2] != X_D3DTSS_UNK)
|
|
||||||
{
|
|
||||||
if(pCur[2] == 5)
|
|
||||||
EmuCleanup("ClampToEdge is unsupported (temporarily)");
|
|
||||||
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ADDRESSW, pCur[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pCur[3] != X_D3DTSS_UNK)
|
|
||||||
{
|
|
||||||
if(pCur[3] == 4)
|
|
||||||
EmuCleanup("QuinCunx is unsupported (temporarily)");
|
|
||||||
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAGFILTER, pCur[3]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pCur[4] != X_D3DTSS_UNK)
|
|
||||||
{
|
|
||||||
if(pCur[4] == 4)
|
|
||||||
EmuCleanup("QuinCunx is unsupported (temporarily)");
|
|
||||||
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MINFILTER, pCur[4]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pCur[5] != X_D3DTSS_UNK)
|
|
||||||
{
|
|
||||||
if(pCur[5] == 4)
|
|
||||||
EmuCleanup("QuinCunx is unsupported (temporarily)");
|
|
||||||
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MIPFILTER, pCur[5]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pCur[6] != X_D3DTSS_UNK)
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MIPMAPLODBIAS, pCur[6]);
|
|
||||||
|
|
||||||
if(pCur[7] != X_D3DTSS_UNK)
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAXMIPLEVEL, pCur[7]);
|
|
||||||
|
|
||||||
if(pCur[8] != X_D3DTSS_UNK)
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAXANISOTROPY, pCur[8]);
|
|
||||||
|
|
||||||
// TODO: Use a lookup table, this is not always a 1:1 map
|
|
||||||
if(pCur[12] != X_D3DTSS_UNK)
|
|
||||||
{
|
|
||||||
if(pCur[12] > 12)
|
|
||||||
EmuCleanup("(Temporarily) Unsupported D3DTSS_ALPHAOP Value (%d)", pCur[12]);
|
|
||||||
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, pCur[12]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pCur[13] != X_D3DTSS_UNK)
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG0, pCur[13]);
|
|
||||||
|
|
||||||
if(pCur[14] != X_D3DTSS_UNK)
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG1, pCur[14]);
|
|
||||||
|
|
||||||
if(pCur[15] != X_D3DTSS_UNK)
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG2, pCur[15]);
|
|
||||||
|
|
||||||
// TODO: Use a lookup table, this is not always a 1:1 map (same as D3DTSS_COLOROP)
|
|
||||||
if(pCur[16] != X_D3DTSS_UNK)
|
|
||||||
{
|
|
||||||
if(pCur[16] > 12)
|
|
||||||
EmuCleanup("(Temporarily) Unsupported D3DTSS_ALPHAOP Value (%d)", pCur[16]);
|
|
||||||
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAOP, pCur[16]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pCur[17] != X_D3DTSS_UNK)
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG0, pCur[17]);
|
|
||||||
|
|
||||||
if(pCur[18] != X_D3DTSS_UNK)
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG1, pCur[18]);
|
|
||||||
|
|
||||||
if(pCur[19] != X_D3DTSS_UNK)
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG2, pCur[19]);
|
|
||||||
|
|
||||||
if(pCur[20] != X_D3DTSS_UNK)
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_RESULTARG, pCur[20]);
|
|
||||||
|
|
||||||
if(pCur[21] != X_D3DTSS_UNK)
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_TEXTURETRANSFORMFLAGS, pCur[21]);
|
|
||||||
|
|
||||||
if(pCur[29] != X_D3DTSS_UNK)
|
|
||||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_BORDERCOLOR, pCur[29]);
|
|
||||||
|
|
||||||
/** To check for unhandled texture stage state changes
|
|
||||||
for(int r=0;r<32;r++)
|
|
||||||
{
|
|
||||||
static const int unchecked[] =
|
|
||||||
{
|
|
||||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 29, 30, 31
|
|
||||||
};
|
|
||||||
|
|
||||||
if(pCur[r] != X_D3DTSS_UNK)
|
|
||||||
{
|
|
||||||
bool pass = true;
|
|
||||||
|
|
||||||
for(int q=0;q<sizeof(unchecked)/sizeof(int);q++)
|
|
||||||
{
|
|
||||||
if(r == unchecked[q])
|
|
||||||
{
|
|
||||||
pass = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pass)
|
|
||||||
EmuWarning("Unhandled TextureState Change @ %d->%d", v, r);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//**/
|
|
||||||
}
|
|
||||||
|
|
||||||
// if point sprites are enabled, copy stage 3 over to 0
|
|
||||||
if(EmuD3DDeferredRenderState[26] == TRUE)
|
|
||||||
{
|
|
||||||
// pCur = Texture Stage 3 States
|
|
||||||
::DWORD *pCur = &EmuD3DDeferredTextureState[2*32];
|
|
||||||
|
|
||||||
IDirect3DBaseTexture8 *pTexture;
|
|
||||||
|
|
||||||
// set the point sprites texture
|
|
||||||
g_pD3DDevice8->GetTexture(3, &pTexture);
|
|
||||||
g_pD3DDevice8->SetTexture(0, pTexture);
|
|
||||||
|
|
||||||
// disable all other stages
|
|
||||||
g_pD3DDevice8->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
|
||||||
g_pD3DDevice8->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
|
||||||
|
|
||||||
// in that case we have to copy over the stage by hand
|
|
||||||
for(int v=0;v<30;v++)
|
|
||||||
{
|
|
||||||
if(pCur[v] != X_D3DTSS_UNK)
|
|
||||||
{
|
|
||||||
::DWORD dwValue;
|
|
||||||
|
|
||||||
g_pD3DDevice8->GetTextureStageState(3, (D3DTEXTURESTAGESTATETYPE)v, &dwValue);
|
|
||||||
g_pD3DDevice8->SetTextureStageState(0, (D3DTEXTURESTAGESTATETYPE)v, dwValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * func: EmuIDirect3DDevice8_DrawVertices
|
// * func: EmuIDirect3DDevice8_DrawVertices
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
|
|
@ -26,7 +26,8 @@
|
||||||
// * If not, write to the Free Software Foundation, Inc.,
|
// * If not, write to the Free Software Foundation, Inc.,
|
||||||
// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA.
|
// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA.
|
||||||
// *
|
// *
|
||||||
// * (c) 2002-2003 Aaron Robinson <caustik@caustik.com>
|
// * (c) 2002-2004 Aaron Robinson <caustik@caustik.com>
|
||||||
|
// * Kingofc <kingofc@freenet.de>
|
||||||
// *
|
// *
|
||||||
// * All rights reserved
|
// * All rights reserved
|
||||||
// *
|
// *
|
||||||
|
|
|
@ -44,6 +44,8 @@ namespace XTL
|
||||||
|
|
||||||
extern XTL::LPDIRECT3DDEVICE8 g_pD3DDevice8; // Direct3D8 Device
|
extern XTL::LPDIRECT3DDEVICE8 g_pD3DDevice8; // Direct3D8 Device
|
||||||
|
|
||||||
|
bool XTL::g_bStepPush = FALSE;
|
||||||
|
|
||||||
// pushbuffer execution emulation
|
// pushbuffer execution emulation
|
||||||
void XTL::EmuExecutePushBuffer
|
void XTL::EmuExecutePushBuffer
|
||||||
(
|
(
|
||||||
|
@ -56,6 +58,11 @@ void XTL::EmuExecutePushBuffer
|
||||||
D3DPRIMITIVETYPE PCPrimitiveType = (D3DPRIMITIVETYPE)-1;
|
D3DPRIMITIVETYPE PCPrimitiveType = (D3DPRIMITIVETYPE)-1;
|
||||||
X_D3DPRIMITIVETYPE XBPrimitiveType = -1;
|
X_D3DPRIMITIVETYPE XBPrimitiveType = -1;
|
||||||
|
|
||||||
|
// TODO: This technically should be enabled
|
||||||
|
//XTL::EmuUpdateDeferredStates();
|
||||||
|
|
||||||
|
// NOTE: I believe 0x1808 is actually a seperate command, but I need to verify this.
|
||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
DWORD dwCount = (*pdwPushData >> 18);
|
DWORD dwCount = (*pdwPushData >> 18);
|
||||||
|
@ -123,6 +130,13 @@ void XTL::EmuExecutePushBuffer
|
||||||
(
|
(
|
||||||
PCPrimitiveType, 0, dwCount*2, 0, EmuD3DVertex2PrimitiveCount(XBPrimitiveType, dwCount*2)
|
PCPrimitiveType, 0, dwCount*2, 0, EmuD3DVertex2PrimitiveCount(XBPrimitiveType, dwCount*2)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if(g_bStepPush)
|
||||||
|
{
|
||||||
|
printf("dwCount := 0x%.08X\n", dwCount);
|
||||||
|
Sleep(100);
|
||||||
|
g_pD3DDevice8->Present(0,0,0,0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// cleanup
|
// cleanup
|
||||||
|
|
|
@ -0,0 +1,306 @@
|
||||||
|
// ******************************************************************
|
||||||
|
// *
|
||||||
|
// * .,-::::: .,:: .::::::::. .,:: .:
|
||||||
|
// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;;
|
||||||
|
// * [[[ '[[,,[[' [[[__[[\. '[[,,[['
|
||||||
|
// * $$$ Y$$$P $$""""Y$$ Y$$$P
|
||||||
|
// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo,
|
||||||
|
// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm,
|
||||||
|
// *
|
||||||
|
// * Cxbx->Win32->CxbxKrnl->EmuD3D->State.cpp
|
||||||
|
// *
|
||||||
|
// * This file is part of the Cxbx project.
|
||||||
|
// *
|
||||||
|
// * Cxbx and Cxbe are free software; you can redistribute them
|
||||||
|
// * and/or modify them under the terms of the GNU General Public
|
||||||
|
// * License as published by the Free Software Foundation; either
|
||||||
|
// * version 2 of the license, or (at your option) any later version.
|
||||||
|
// *
|
||||||
|
// * This program is distributed in the hope that it will be useful,
|
||||||
|
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// * GNU General Public License for more details.
|
||||||
|
// *
|
||||||
|
// * You should have recieved a copy of the GNU General Public License
|
||||||
|
// * along with this program; see the file COPYING.
|
||||||
|
// * If not, write to the Free Software Foundation, Inc.,
|
||||||
|
// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA.
|
||||||
|
// *
|
||||||
|
// * (c) 2002-2003 Aaron Robinson <caustik@caustik.com>
|
||||||
|
// *
|
||||||
|
// * All rights reserved
|
||||||
|
// *
|
||||||
|
// ******************************************************************
|
||||||
|
#define _CXBXKRNL_INTERNAL
|
||||||
|
#define _XBOXKRNL_DEFEXTRN_
|
||||||
|
|
||||||
|
#include "Emu.h"
|
||||||
|
|
||||||
|
// prevent name collisions
|
||||||
|
namespace XTL
|
||||||
|
{
|
||||||
|
#include "EmuXTL.h"
|
||||||
|
};
|
||||||
|
|
||||||
|
extern XTL::LPDIRECT3DDEVICE8 g_pD3DDevice8; // Direct3D8 Device
|
||||||
|
|
||||||
|
// deferred state lookup tables
|
||||||
|
DWORD *XTL::EmuD3DDeferredRenderState;
|
||||||
|
DWORD *XTL::EmuD3DDeferredTextureState;
|
||||||
|
|
||||||
|
// ******************************************************************
|
||||||
|
// * func: EmuUpdateDeferredStates
|
||||||
|
// ******************************************************************
|
||||||
|
void XTL::EmuUpdateDeferredStates()
|
||||||
|
{
|
||||||
|
using namespace XTL;
|
||||||
|
|
||||||
|
// Certain D3DRS values need to be checked on each Draw[Indexed]Vertices
|
||||||
|
if(EmuD3DDeferredRenderState != 0)
|
||||||
|
{
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[0] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_FOGENABLE, XTL::EmuD3DDeferredRenderState[0]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[1] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_FOGTABLEMODE, XTL::EmuD3DDeferredRenderState[1]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[2] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_FOGSTART, XTL::EmuD3DDeferredRenderState[2]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[3] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_FOGEND, XTL::EmuD3DDeferredRenderState[3]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[6] != X_D3DRS_UNK)
|
||||||
|
{
|
||||||
|
::DWORD dwConv = 0;
|
||||||
|
|
||||||
|
dwConv |= (XTL::EmuD3DDeferredRenderState[6] & 0x00000010) ? D3DWRAP_U : 0;
|
||||||
|
dwConv |= (XTL::EmuD3DDeferredRenderState[6] & 0x00001000) ? D3DWRAP_V : 0;
|
||||||
|
dwConv |= (XTL::EmuD3DDeferredRenderState[6] & 0x00100000) ? D3DWRAP_W : 0;
|
||||||
|
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_WRAP0, dwConv);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[10] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_LIGHTING, XTL::EmuD3DDeferredRenderState[10]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[11] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_SPECULARENABLE, XTL::EmuD3DDeferredRenderState[11]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[13] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_COLORVERTEX, XTL::EmuD3DDeferredRenderState[13]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[20] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_AMBIENTMATERIALSOURCE, XTL::EmuD3DDeferredRenderState[20]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[23] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_AMBIENT, XTL::EmuD3DDeferredRenderState[23]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[24] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_POINTSIZE, XTL::EmuD3DDeferredRenderState[24]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[25] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_POINTSIZE_MIN, XTL::EmuD3DDeferredRenderState[25]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[26] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_POINTSPRITEENABLE, XTL::EmuD3DDeferredRenderState[26]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[27] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_POINTSCALEENABLE, XTL::EmuD3DDeferredRenderState[27]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[28] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_POINTSCALE_A, XTL::EmuD3DDeferredRenderState[28]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[29] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_POINTSCALE_B, XTL::EmuD3DDeferredRenderState[29]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[30] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_POINTSCALE_C, XTL::EmuD3DDeferredRenderState[30]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[31] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_POINTSIZE_MAX, XTL::EmuD3DDeferredRenderState[31]);
|
||||||
|
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[33] != X_D3DRS_UNK)
|
||||||
|
g_pD3DDevice8->SetRenderState(D3DRS_PATCHSEGMENTS, XTL::EmuD3DDeferredRenderState[33]);
|
||||||
|
|
||||||
|
/** To check for unhandled RenderStates
|
||||||
|
for(int v=0;v<117-82;v++)
|
||||||
|
{
|
||||||
|
if(XTL::EmuD3DDeferredRenderState[v] != X_D3DRS_UNK)
|
||||||
|
{
|
||||||
|
if(v != 0 && v != 1 && v != 2 && v != 3 && v != 6 && v != 10 && v != 11 && v != 13
|
||||||
|
&& v != 20 && v != 23 && v != 24 && v != 25 && v != 26 && v != 27 && v != 28 && v != 29
|
||||||
|
&& v != 30 && v != 31 && v != 33)
|
||||||
|
EmuWarning("Unhandled RenderState Change @ %d (%d)", v, v + 82);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//**/
|
||||||
|
}
|
||||||
|
|
||||||
|
// Certain D3DTS values need to be checked on each Draw[Indexed]Vertices
|
||||||
|
if(EmuD3DDeferredTextureState != 0)
|
||||||
|
{
|
||||||
|
for(int v=0;v<4;v++)
|
||||||
|
{
|
||||||
|
::DWORD *pCur = &EmuD3DDeferredTextureState[v*32];
|
||||||
|
|
||||||
|
if(pCur[0] != X_D3DTSS_UNK)
|
||||||
|
{
|
||||||
|
if(pCur[0] == 5)
|
||||||
|
EmuCleanup("ClampToEdge is unsupported (temporarily)");
|
||||||
|
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ADDRESSU, pCur[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pCur[1] != X_D3DTSS_UNK)
|
||||||
|
{
|
||||||
|
if(pCur[1] == 5)
|
||||||
|
EmuCleanup("ClampToEdge is unsupported (temporarily)");
|
||||||
|
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ADDRESSV, pCur[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pCur[2] != X_D3DTSS_UNK)
|
||||||
|
{
|
||||||
|
if(pCur[2] == 5)
|
||||||
|
EmuCleanup("ClampToEdge is unsupported (temporarily)");
|
||||||
|
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ADDRESSW, pCur[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pCur[3] != X_D3DTSS_UNK)
|
||||||
|
{
|
||||||
|
if(pCur[3] == 4)
|
||||||
|
EmuCleanup("QuinCunx is unsupported (temporarily)");
|
||||||
|
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAGFILTER, pCur[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pCur[4] != X_D3DTSS_UNK)
|
||||||
|
{
|
||||||
|
if(pCur[4] == 4)
|
||||||
|
EmuCleanup("QuinCunx is unsupported (temporarily)");
|
||||||
|
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MINFILTER, pCur[4]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pCur[5] != X_D3DTSS_UNK)
|
||||||
|
{
|
||||||
|
if(pCur[5] == 4)
|
||||||
|
EmuCleanup("QuinCunx is unsupported (temporarily)");
|
||||||
|
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MIPFILTER, pCur[5]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pCur[6] != X_D3DTSS_UNK)
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MIPMAPLODBIAS, pCur[6]);
|
||||||
|
|
||||||
|
if(pCur[7] != X_D3DTSS_UNK)
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAXMIPLEVEL, pCur[7]);
|
||||||
|
|
||||||
|
if(pCur[8] != X_D3DTSS_UNK)
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAXANISOTROPY, pCur[8]);
|
||||||
|
|
||||||
|
// TODO: Use a lookup table, this is not always a 1:1 map
|
||||||
|
if(pCur[12] != X_D3DTSS_UNK)
|
||||||
|
{
|
||||||
|
if(pCur[12] > 12)
|
||||||
|
EmuCleanup("(Temporarily) Unsupported D3DTSS_ALPHAOP Value (%d)", pCur[12]);
|
||||||
|
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, pCur[12]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pCur[13] != X_D3DTSS_UNK)
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG0, pCur[13]);
|
||||||
|
|
||||||
|
if(pCur[14] != X_D3DTSS_UNK)
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG1, pCur[14]);
|
||||||
|
|
||||||
|
if(pCur[15] != X_D3DTSS_UNK)
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG2, pCur[15]);
|
||||||
|
|
||||||
|
// TODO: Use a lookup table, this is not always a 1:1 map (same as D3DTSS_COLOROP)
|
||||||
|
if(pCur[16] != X_D3DTSS_UNK)
|
||||||
|
{
|
||||||
|
if(pCur[16] > 12)
|
||||||
|
EmuCleanup("(Temporarily) Unsupported D3DTSS_ALPHAOP Value (%d)", pCur[16]);
|
||||||
|
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAOP, pCur[16]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pCur[17] != X_D3DTSS_UNK)
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG0, pCur[17]);
|
||||||
|
|
||||||
|
if(pCur[18] != X_D3DTSS_UNK)
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG1, pCur[18]);
|
||||||
|
|
||||||
|
if(pCur[19] != X_D3DTSS_UNK)
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG2, pCur[19]);
|
||||||
|
|
||||||
|
if(pCur[20] != X_D3DTSS_UNK)
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_RESULTARG, pCur[20]);
|
||||||
|
|
||||||
|
if(pCur[21] != X_D3DTSS_UNK)
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_TEXTURETRANSFORMFLAGS, pCur[21]);
|
||||||
|
|
||||||
|
if(pCur[29] != X_D3DTSS_UNK)
|
||||||
|
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_BORDERCOLOR, pCur[29]);
|
||||||
|
|
||||||
|
/** To check for unhandled texture stage state changes
|
||||||
|
for(int r=0;r<32;r++)
|
||||||
|
{
|
||||||
|
static const int unchecked[] =
|
||||||
|
{
|
||||||
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 29, 30, 31
|
||||||
|
};
|
||||||
|
|
||||||
|
if(pCur[r] != X_D3DTSS_UNK)
|
||||||
|
{
|
||||||
|
bool pass = true;
|
||||||
|
|
||||||
|
for(int q=0;q<sizeof(unchecked)/sizeof(int);q++)
|
||||||
|
{
|
||||||
|
if(r == unchecked[q])
|
||||||
|
{
|
||||||
|
pass = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pass)
|
||||||
|
EmuWarning("Unhandled TextureState Change @ %d->%d", v, r);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//**/
|
||||||
|
}
|
||||||
|
|
||||||
|
// if point sprites are enabled, copy stage 3 over to 0
|
||||||
|
if(EmuD3DDeferredRenderState[26] == TRUE)
|
||||||
|
{
|
||||||
|
// pCur = Texture Stage 3 States
|
||||||
|
::DWORD *pCur = &EmuD3DDeferredTextureState[2*32];
|
||||||
|
|
||||||
|
IDirect3DBaseTexture8 *pTexture;
|
||||||
|
|
||||||
|
// set the point sprites texture
|
||||||
|
g_pD3DDevice8->GetTexture(3, &pTexture);
|
||||||
|
g_pD3DDevice8->SetTexture(0, pTexture);
|
||||||
|
|
||||||
|
// disable all other stages
|
||||||
|
g_pD3DDevice8->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||||
|
g_pD3DDevice8->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
||||||
|
|
||||||
|
// in that case we have to copy over the stage by hand
|
||||||
|
for(int v=0;v<30;v++)
|
||||||
|
{
|
||||||
|
if(pCur[v] != X_D3DTSS_UNK)
|
||||||
|
{
|
||||||
|
::DWORD dwValue;
|
||||||
|
|
||||||
|
g_pD3DDevice8->GetTextureStageState(3, (D3DTEXTURESTAGESTATETYPE)v, &dwValue);
|
||||||
|
g_pD3DDevice8->SetTextureStageState(0, (D3DTEXTURESTAGESTATETYPE)v, dwValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -26,7 +26,8 @@
|
||||||
// * If not, write to the Free Software Foundation, Inc.,
|
// * If not, write to the Free Software Foundation, Inc.,
|
||||||
// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA.
|
// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA.
|
||||||
// *
|
// *
|
||||||
// * (c) 2002-2003 Aaron Robinson <caustik@caustik.com>
|
// * (c) 2002-2004 Aaron Robinson <caustik@caustik.com>
|
||||||
|
// * Kingofc <kingofc@freenet.de>
|
||||||
// *
|
// *
|
||||||
// * All rights reserved
|
// * All rights reserved
|
||||||
// *
|
// *
|
||||||
|
|
|
@ -26,7 +26,8 @@
|
||||||
// * If not, write to the Free Software Foundation, Inc.,
|
// * If not, write to the Free Software Foundation, Inc.,
|
||||||
// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA.
|
// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA.
|
||||||
// *
|
// *
|
||||||
// * (c) 2002-2003 Aaron Robinson <caustik@caustik.com>
|
// * (c) 2002-2004 Aaron Robinson <caustik@caustik.com>
|
||||||
|
// * Kingofc <kingofc@freenet.de>
|
||||||
// *
|
// *
|
||||||
// * All rights reserved
|
// * All rights reserved
|
||||||
// *
|
// *
|
||||||
|
|
|
@ -345,9 +345,9 @@ SOOVPA<10> IDirect3D_RecordStateBlock_1_0_4361 =
|
||||||
};
|
};
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * IDirect3D_SetGammaRamp
|
// * IDirect3DDevice8_SetGammaRamp
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
SOOVPA<9> IDirect3D_SetGammaRamp_1_0_4361 =
|
SOOVPA<9> IDirect3DDevice8_SetGammaRamp_1_0_4361 =
|
||||||
{
|
{
|
||||||
0, // Large == 0
|
0, // Large == 0
|
||||||
9, // Count == 9
|
9, // Count == 9
|
||||||
|
@ -356,17 +356,17 @@ SOOVPA<9> IDirect3D_SetGammaRamp_1_0_4361 =
|
||||||
0, // XRef Not Used
|
0, // XRef Not Used
|
||||||
|
|
||||||
{
|
{
|
||||||
// IDirect3D_SetGammaRamp+0x11 : and eax, 1; push ebx
|
// IDirect3DDevice8_SetGammaRamp+0x11 : and eax, 1; push ebx
|
||||||
{ 0x11, 0x83 }, // (Offset,Value)-Pair #1
|
{ 0x11, 0x83 }, // (Offset,Value)-Pair #1
|
||||||
{ 0x12, 0xE0 }, // (Offset,Value)-Pair #2
|
{ 0x12, 0xE0 }, // (Offset,Value)-Pair #2
|
||||||
{ 0x13, 0x01 }, // (Offset,Value)-Pair #3
|
{ 0x13, 0x01 }, // (Offset,Value)-Pair #3
|
||||||
{ 0x14, 0x53 }, // (Offset,Value)-Pair #4
|
{ 0x14, 0x53 }, // (Offset,Value)-Pair #4
|
||||||
|
|
||||||
// IDirect3D_SetGammaRamp+0x2F : rep movsd
|
// IDirect3DDevice8_SetGammaRamp+0x2F : rep movsd
|
||||||
{ 0x2F, 0xF3 }, // (Offset,Value)-Pair #5
|
{ 0x2F, 0xF3 }, // (Offset,Value)-Pair #5
|
||||||
{ 0x30, 0xA5 }, // (Offset,Value)-Pair #6
|
{ 0x30, 0xA5 }, // (Offset,Value)-Pair #6
|
||||||
|
|
||||||
// IDirect3D_SetGammaRamp+0x3E : push ebx; mov ecx, edx
|
// IDirect3DDevice8_SetGammaRamp+0x3E : push ebx; mov ecx, edx
|
||||||
{ 0x3E, 0x53 }, // (Offset,Value)-Pair #7
|
{ 0x3E, 0x53 }, // (Offset,Value)-Pair #7
|
||||||
{ 0x3F, 0x8B }, // (Offset,Value)-Pair #8
|
{ 0x3F, 0x8B }, // (Offset,Value)-Pair #8
|
||||||
{ 0x40, 0xCA }, // (Offset,Value)-Pair #9
|
{ 0x40, 0xCA }, // (Offset,Value)-Pair #9
|
||||||
|
@ -2106,14 +2106,14 @@ OOVPATable D3D8_1_0_4361[] =
|
||||||
"EmuIDirect3D_ClearStateBlockFlags (XREF)"
|
"EmuIDirect3D_ClearStateBlockFlags (XREF)"
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
// IDirect3D::SetGammaRamp
|
// IDirect3DDevice8::SetGammaRamp
|
||||||
{
|
{
|
||||||
(OOVPA*)&IDirect3D_SetGammaRamp_1_0_4361,
|
(OOVPA*)&IDirect3DDevice8_SetGammaRamp_1_0_4361,
|
||||||
|
|
||||||
XTL::EmuIDirect3D8_SetGammaRamp,
|
XTL::EmuIDirect3DDevice8_SetGammaRamp,
|
||||||
|
|
||||||
#ifdef _DEBUG_TRACE
|
#ifdef _DEBUG_TRACE
|
||||||
"EmuIDirect3D_SetGammaRamp"
|
"EmuIDirect3DDevice8_SetGammaRamp"
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
// IDirect3D::RecordStateBlock
|
// IDirect3D::RecordStateBlock
|
||||||
|
|
|
@ -32,6 +32,74 @@
|
||||||
// *
|
// *
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
|
||||||
|
// ******************************************************************
|
||||||
|
// * CDirectSound::SetI3DL2Listener
|
||||||
|
// ******************************************************************
|
||||||
|
SOOVPA<11> CDirectSound_SetI3DL2Listener_1_0_4432 =
|
||||||
|
{
|
||||||
|
0, // Large == 0
|
||||||
|
11, // Count == 12
|
||||||
|
|
||||||
|
XREF_DSSETI3DL2LISTENER, // XRef Is Saved
|
||||||
|
0, // XRef Not Used
|
||||||
|
|
||||||
|
{
|
||||||
|
// CDirectSound_SetI3DL2Listener+0x3A : mov edi, 0x88780032
|
||||||
|
{ 0x3A, 0xBF }, // (Offset,Value)-Pair #1
|
||||||
|
{ 0x3B, 0x32 }, // (Offset,Value)-Pair #2
|
||||||
|
{ 0x3C, 0x00 }, // (Offset,Value)-Pair #3
|
||||||
|
{ 0x3D, 0x78 }, // (Offset,Value)-Pair #4
|
||||||
|
{ 0x3E, 0x88 }, // (Offset,Value)-Pair #5
|
||||||
|
|
||||||
|
// CDirectSound_SetI3DL2Listener+0xA2 : fstp dword ptr[edx+0x94]
|
||||||
|
{ 0xA2, 0xD9 }, // (Offset,Value)-Pair #6
|
||||||
|
{ 0xA3, 0x9A }, // (Offset,Value)-Pair #7
|
||||||
|
{ 0xA4, 0x94 }, // (Offset,Value)-Pair #8
|
||||||
|
|
||||||
|
// CDirectSound_SetI3DL2Listener+0xA8 : fld dword ptr[ecx+0x24]
|
||||||
|
{ 0xA8, 0xD9 }, // (Offset,Value)-Pair #9
|
||||||
|
{ 0xA9, 0x41 }, // (Offset,Value)-Pair #10
|
||||||
|
{ 0xAA, 0x24 }, // (Offset,Value)-Pair #11
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ******************************************************************
|
||||||
|
// * IDirectSound8_SetI3DL2Listener
|
||||||
|
// ******************************************************************
|
||||||
|
SOOVPA<12> IDirectSound8_SetI3DL2Listener_1_0_4432 =
|
||||||
|
{
|
||||||
|
0, // Large == 0
|
||||||
|
12, // Count == 12
|
||||||
|
|
||||||
|
-1, // XRef Not Saved
|
||||||
|
1, // XRef Is Used
|
||||||
|
|
||||||
|
{
|
||||||
|
// IDirectSound8_SetI3DL2Listener+0x19 : call [CDirectSound::SetI3DL2Listener]
|
||||||
|
{ 0x19, XREF_DSSETI3DL2LISTENER }, // (Offset,Value)-Pair #1
|
||||||
|
|
||||||
|
// IDirectSound8_SetI3DL2Listener+0x04 : push [esp+0x0C]
|
||||||
|
{ 0x04, 0xFF }, // (Offset,Value)-Pair #2
|
||||||
|
{ 0x05, 0x74 }, // (Offset,Value)-Pair #3
|
||||||
|
{ 0x06, 0x24 }, // (Offset,Value)-Pair #4
|
||||||
|
{ 0x07, 0x0C }, // (Offset,Value)-Pair #5
|
||||||
|
|
||||||
|
// IDirectSound8_SetI3DL2Listener+0x0E : add eax, 0xFFFFFFF8
|
||||||
|
{ 0x0E, 0x83 }, // (Offset,Value)-Pair #6
|
||||||
|
{ 0x0F, 0xC0 }, // (Offset,Value)-Pair #7
|
||||||
|
{ 0x10, 0xF8 }, // (Offset,Value)-Pair #8
|
||||||
|
|
||||||
|
// IDirectSound8_SetI3DL2Listener+0x13 : sbb ecx, ecx
|
||||||
|
{ 0x13, 0x1B }, // (Offset,Value)-Pair #9
|
||||||
|
{ 0x14, 0xC9 }, // (Offset,Value)-Pair #10
|
||||||
|
|
||||||
|
// IDirectSound8_SetI3DL2Listener+0x15 : and ecx, eax
|
||||||
|
{ 0x15, 0x23 }, // (Offset,Value)-Pair #11
|
||||||
|
{ 0x16, 0xC8 }, // (Offset,Value)-Pair #12
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * CDirectSound::SetDistanceFactorA
|
// * CDirectSound::SetDistanceFactorA
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
@ -113,6 +181,96 @@ OOVPATable DSound_1_0_4432[] =
|
||||||
"EmuDirectSoundCreate"
|
"EmuDirectSoundCreate"
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
|
// IDirectSound8::CreateSoundBuffer (* unchanged since 4361 *)
|
||||||
|
{
|
||||||
|
(OOVPA*)&IDirectSound8_CreateSoundBuffer_1_0_4361,
|
||||||
|
|
||||||
|
XTL::EmuIDirectSound8_CreateSoundBuffer,
|
||||||
|
|
||||||
|
#ifdef _DEBUG_TRACE
|
||||||
|
"EmuIDirectSound8_CreateSoundBuffer"
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
// IDirectSoundBuffer8::SetLoopRegion (* unchanged since 4361 *)
|
||||||
|
{
|
||||||
|
(OOVPA*)&IDirectSoundBuffer8_SetLoopRegion_1_0_4361,
|
||||||
|
|
||||||
|
XTL::EmuIDirectSoundBuffer8_SetLoopRegion,
|
||||||
|
|
||||||
|
#ifdef _DEBUG_TRACE
|
||||||
|
"EmuIDirectSoundBuffer8_SetLoopRegion"
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
// CMcpxBuffer::SetBufferData (* unchanged since 4361 *)
|
||||||
|
{
|
||||||
|
(OOVPA*)&CMcpxBuffer_SetBufferData_1_0_4361, 0,
|
||||||
|
|
||||||
|
#ifdef _DEBUG_TRACE
|
||||||
|
"CMcpxBuffer_SetBufferData (XREF)"
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
// CDirectSoundBuffer::SetBufferData (* unchanged since 4361 *)
|
||||||
|
{
|
||||||
|
(OOVPA*)&CDirectSoundBuffer_SetBufferData_1_0_4361, 0,
|
||||||
|
|
||||||
|
#ifdef _DEBUG_TRACE
|
||||||
|
"CDirectSoundBuffer_SetBufferData (XREF)"
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
// IDirectSoundBuffer8::SetBufferData (* unchanged since 4361 *)
|
||||||
|
{
|
||||||
|
(OOVPA*)&IDirectSoundBuffer8_SetBufferData_1_0_4361,
|
||||||
|
|
||||||
|
XTL::EmuIDirectSoundBuffer8_SetBufferData,
|
||||||
|
|
||||||
|
#ifdef _DEBUG_TRACE
|
||||||
|
"IDirectSoundBuffer8_SetBufferData"
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
// CMcpxBuffer::SetCurrentPosition (* unchanged since 4361 *)
|
||||||
|
{
|
||||||
|
(OOVPA*)&CMcpxBuffer_SetCurrentPosition_1_0_4361, 0,
|
||||||
|
|
||||||
|
#ifdef _DEBUG_TRACE
|
||||||
|
"CMcpxBuffer_SetCurrentPosition (XREF)"
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
// CDirectSoundBuffer::SetCurrentPosition (* unchanged since 4361 *)
|
||||||
|
{
|
||||||
|
(OOVPA*)&CDirectSoundBuffer_SetCurrentPosition_1_0_4361, 0,
|
||||||
|
|
||||||
|
#ifdef _DEBUG_TRACE
|
||||||
|
"CDirectSoundBuffer_SetCurrentPosition (XREF)"
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
// IDirectSoundBuffer8::SetCurrentPosition (* unchanged since 4361 *)
|
||||||
|
{
|
||||||
|
(OOVPA*)&IDirectSoundBuffer8_SetCurrentPosition_1_0_4361,
|
||||||
|
|
||||||
|
XTL::EmuIDirectSoundBuffer8_SetCurrentPosition,
|
||||||
|
|
||||||
|
#ifdef _DEBUG_TRACE
|
||||||
|
"IDirectSoundBuffer8_SetCurrentPosition"
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
// CDirectSound_SetI3DL2Listener
|
||||||
|
{
|
||||||
|
(OOVPA*)&CDirectSound_SetI3DL2Listener_1_0_4432, 0,
|
||||||
|
|
||||||
|
#ifdef _DEBUG_TRACE
|
||||||
|
"CDirectSound::SetI3DL2Listener (XREF)"
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
// IDirectSound8_SetI3DL2Listener
|
||||||
|
{
|
||||||
|
(OOVPA*)&IDirectSound8_SetI3DL2Listener_1_0_4432,
|
||||||
|
|
||||||
|
XTL::EmuIDirectSound8_SetI3DL2Listener,
|
||||||
|
|
||||||
|
#ifdef _DEBUG_TRACE
|
||||||
|
"EmuIDirectSound8_SetI3DL2Listener"
|
||||||
|
#endif
|
||||||
|
},
|
||||||
// CDirectSound::SetDistanceFactorA (XREF)
|
// CDirectSound::SetDistanceFactorA (XREF)
|
||||||
{
|
{
|
||||||
(OOVPA*)&CDirectSound_SetDistanceFactorA_1_0_4432, 0,
|
(OOVPA*)&CDirectSound_SetDistanceFactorA_1_0_4432, 0,
|
||||||
|
|
|
@ -68,40 +68,6 @@ SOOVPA<14> CDirectSound_CreateSoundBuffer_1_0_4627 =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// ******************************************************************
|
|
||||||
// * CDirectSound::SetI3DL2Listener
|
|
||||||
// ******************************************************************
|
|
||||||
SOOVPA<12> CDirectSound_SetI3DL2Listener_1_0_4627 =
|
|
||||||
{
|
|
||||||
0, // Large == 0
|
|
||||||
12, // Count == 12
|
|
||||||
|
|
||||||
XREF_DSSETI3DL2LISTENER, // XRef Is Saved
|
|
||||||
0, // XRef Not Used
|
|
||||||
|
|
||||||
{
|
|
||||||
// CDirectSound_SetI3DL2Listener+0x3A : mov edi, 0x88780032
|
|
||||||
{ 0x3A, 0xBF }, // (Offset,Value)-Pair #1
|
|
||||||
{ 0x3B, 0x32 }, // (Offset,Value)-Pair #2
|
|
||||||
{ 0x3C, 0x00 }, // (Offset,Value)-Pair #3
|
|
||||||
{ 0x3D, 0x78 }, // (Offset,Value)-Pair #4
|
|
||||||
{ 0x3E, 0x88 }, // (Offset,Value)-Pair #5
|
|
||||||
|
|
||||||
// CDirectSound_SetI3DL2Listener+0xA2 : fstp dword ptr[edx+0x94]
|
|
||||||
{ 0xA2, 0xD9 }, // (Offset,Value)-Pair #6
|
|
||||||
{ 0xA3, 0x9A }, // (Offset,Value)-Pair #7
|
|
||||||
{ 0xA4, 0x94 }, // (Offset,Value)-Pair #8
|
|
||||||
|
|
||||||
// CDirectSound_SetI3DL2Listener+0xDC : jnz +0x06
|
|
||||||
{ 0xDC, 0x75 }, // (Offset,Value)-Pair #9
|
|
||||||
{ 0xDD, 0x06 }, // (Offset,Value)-Pair #10
|
|
||||||
|
|
||||||
// CDirectSound_SetI3DL2Listener+0xF7 : retn 0x0C
|
|
||||||
{ 0xF7, 0xC2 }, // (Offset,Value)-Pair #11
|
|
||||||
{ 0xF8, 0x0C }, // (Offset,Value)-Pair #12
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * CDirectSound::SetMixBinHeadroom
|
// * CDirectSound::SetMixBinHeadroom
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
@ -584,42 +550,6 @@ SOOVPA<12> DirectSoundCreateBuffer_1_0_4627 =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// ******************************************************************
|
|
||||||
// * IDirectSound8_SetI3DL2Listener
|
|
||||||
// ******************************************************************
|
|
||||||
SOOVPA<12> IDirectSound8_SetI3DL2Listener_1_0_4627 =
|
|
||||||
{
|
|
||||||
0, // Large == 0
|
|
||||||
12, // Count == 12
|
|
||||||
|
|
||||||
-1, // XRef Not Saved
|
|
||||||
1, // XRef Is Used
|
|
||||||
|
|
||||||
{
|
|
||||||
// IDirectSound8_SetI3DL2Listener+0x19 : call [CDirectSound::SetI3DL2Listener]
|
|
||||||
{ 0x19, XREF_DSSETI3DL2LISTENER }, // (Offset,Value)-Pair #1
|
|
||||||
|
|
||||||
// IDirectSound8_SetI3DL2Listener+0x04 : push [esp+0x0C]
|
|
||||||
{ 0x04, 0xFF }, // (Offset,Value)-Pair #2
|
|
||||||
{ 0x05, 0x74 }, // (Offset,Value)-Pair #3
|
|
||||||
{ 0x06, 0x24 }, // (Offset,Value)-Pair #4
|
|
||||||
{ 0x07, 0x0C }, // (Offset,Value)-Pair #5
|
|
||||||
|
|
||||||
// IDirectSound8_SetI3DL2Listener+0x0E : add eax, 0xFFFFFFF8
|
|
||||||
{ 0x0E, 0x83 }, // (Offset,Value)-Pair #6
|
|
||||||
{ 0x0F, 0xC0 }, // (Offset,Value)-Pair #7
|
|
||||||
{ 0x10, 0xF8 }, // (Offset,Value)-Pair #8
|
|
||||||
|
|
||||||
// IDirectSound8_SetI3DL2Listener+0x13 : sbb ecx, ecx
|
|
||||||
{ 0x13, 0x1B }, // (Offset,Value)-Pair #9
|
|
||||||
{ 0x14, 0xC9 }, // (Offset,Value)-Pair #10
|
|
||||||
|
|
||||||
// IDirectSound8_SetI3DL2Listener+0x15 : and ecx, eax
|
|
||||||
{ 0x15, 0x23 }, // (Offset,Value)-Pair #11
|
|
||||||
{ 0x16, 0xC8 }, // (Offset,Value)-Pair #12
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * IDirectSound8_CreateSoundBuffer
|
// * IDirectSound8_CreateSoundBuffer
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
@ -2260,14 +2190,24 @@ OOVPATable DSound_1_0_4627[] =
|
||||||
"EmuIDirectSoundBuffer8_SetLoopRegion"
|
"EmuIDirectSoundBuffer8_SetLoopRegion"
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
// CDirectSound_SetI3DL2Listener
|
// CDirectSound_SetI3DL2Listener (* unchanged since 4432 *)
|
||||||
{
|
{
|
||||||
(OOVPA*)&CDirectSound_SetI3DL2Listener_1_0_4627, 0,
|
(OOVPA*)&CDirectSound_SetI3DL2Listener_1_0_4432, 0,
|
||||||
|
|
||||||
#ifdef _DEBUG_TRACE
|
#ifdef _DEBUG_TRACE
|
||||||
"CDirectSound::SetI3DL2Listener (XREF)"
|
"CDirectSound::SetI3DL2Listener (XREF)"
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
|
// IDirectSound8_SetI3DL2Listener (* unchanged since 4432 *)
|
||||||
|
{
|
||||||
|
(OOVPA*)&IDirectSound8_SetI3DL2Listener_1_0_4432,
|
||||||
|
|
||||||
|
XTL::EmuIDirectSound8_SetI3DL2Listener,
|
||||||
|
|
||||||
|
#ifdef _DEBUG_TRACE
|
||||||
|
"EmuIDirectSound8_SetI3DL2Listener"
|
||||||
|
#endif
|
||||||
|
},
|
||||||
// CDirectSound_SetMixBinHeadroom
|
// CDirectSound_SetMixBinHeadroom
|
||||||
{
|
{
|
||||||
(OOVPA*)&CDirectSound_SetMixBinHeadroom_1_0_4627, 0,
|
(OOVPA*)&CDirectSound_SetMixBinHeadroom_1_0_4627, 0,
|
||||||
|
@ -2410,16 +2350,6 @@ OOVPATable DSound_1_0_4627[] =
|
||||||
"EmuIDirectSound8_CreateSoundBuffer"
|
"EmuIDirectSound8_CreateSoundBuffer"
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
// IDirectSound8_SetI3DL2Listener
|
|
||||||
{
|
|
||||||
(OOVPA*)&IDirectSound8_SetI3DL2Listener_1_0_4627,
|
|
||||||
|
|
||||||
XTL::EmuIDirectSound8_SetI3DL2Listener,
|
|
||||||
|
|
||||||
#ifdef _DEBUG_TRACE
|
|
||||||
"EmuIDirectSound8_SetI3DL2Listener"
|
|
||||||
#endif
|
|
||||||
},
|
|
||||||
// CDirectSoundVoice::SetFrequency (XREF)
|
// CDirectSoundVoice::SetFrequency (XREF)
|
||||||
{
|
{
|
||||||
(OOVPA*)&CDirectSoundVoice_SetFrequency_1_0_4627, 0,
|
(OOVPA*)&CDirectSoundVoice_SetFrequency_1_0_4627, 0,
|
||||||
|
|
Loading…
Reference in New Issue