re indentation to follow emulators code rules in some files I'm modifying

This commit is contained in:
Rodolfo Bogado 2013-08-15 15:16:32 -03:00
parent 8e9bbdeb2f
commit 08a6b8920b
3 changed files with 631 additions and 625 deletions

View File

@ -255,10 +255,16 @@ bool VertexShaderCache::InsertByteCode(const VertexShaderUid &uid, const u8 *byt
return false;
}
float VSConstantbuffer[4*C_VENVCONST_END];
void Renderer::SetVSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
{
const float f[4] = { f1, f2, f3, f4 };
DX9::D3D::dev->SetVertexShaderConstantF(const_number, f, 1);
float* VSConstantbuffer_pointer = &VSConstantbuffer[const_number];
VSConstantbuffer_pointer[0] = f1;
VSConstantbuffer_pointer[1] = f2;
VSConstantbuffer_pointer[2] = f3;
VSConstantbuffer_pointer[3] = f4;
DX9::D3D::dev->SetVertexShaderConstantF(const_number, VSConstantbuffer_pointer, 1);
}
void Renderer::SetVSConstant4fv(unsigned int const_number, const float *f)
@ -268,15 +274,15 @@ void Renderer::SetVSConstant4fv(unsigned int const_number, const float *f)
void Renderer::SetMultiVSConstant3fv(unsigned int const_number, unsigned int count, const float *f)
{
float buf[4*C_VENVCONST_END];
float* VSConstantbuffer_pointer = &VSConstantbuffer[const_number];
for (unsigned int i = 0; i < count; i++)
{
buf[4*i ] = *f++;
buf[4*i+1] = *f++;
buf[4*i+2] = *f++;
buf[4*i+3] = 0.f;
*VSConstantbuffer_pointer++ = *f++;
*VSConstantbuffer_pointer++ = *f++;
*VSConstantbuffer_pointer++ = *f++;
*VSConstantbuffer_pointer++ = 0.f;
}
DX9::D3D::dev->SetVertexShaderConstantF(const_number, buf, count);
DX9::D3D::dev->SetVertexShaderConstantF(const_number, &VSConstantbuffer[const_number], count);
}
void Renderer::SetMultiVSConstant4fv(unsigned int const_number, unsigned int count, const float *f)

View File

@ -50,8 +50,8 @@
namespace DX9
{
unsigned int VideoBackend::PeekMessages()
{
unsigned int VideoBackend::PeekMessages()
{
MSG msg;
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
{
@ -61,27 +61,27 @@ unsigned int VideoBackend::PeekMessages()
DispatchMessage(&msg);
}
return TRUE;
}
}
void VideoBackend::UpdateFPSDisplay(const char *text)
{
void VideoBackend::UpdateFPSDisplay(const char *text)
{
TCHAR temp[512];
swprintf_s(temp, sizeof(temp)/sizeof(TCHAR), _T("%hs | DX9 | %hs"), scm_rev_str, text);
EmuWindow::SetWindowText(temp);
}
}
std::string VideoBackend::GetName()
{
std::string VideoBackend::GetName()
{
return "DX9";
}
}
std::string VideoBackend::GetDisplayName()
{
std::string VideoBackend::GetDisplayName()
{
return "Direct3D9 (deprecated)";
}
}
void InitBackendInfo()
{
void InitBackendInfo()
{
DX9::D3D::Init();
D3DCAPS9 device_caps = DX9::D3D::GetCaps();
const int shaderModel = ((device_caps.PixelShaderVersion >> 8) & 0xFF);
@ -90,7 +90,7 @@ void InitBackendInfo()
g_Config.backend_info.bUseRGBATextures = false;
g_Config.backend_info.bUseMinimalMipCount = true;
g_Config.backend_info.bSupports3DVision = true;
g_Config.backend_info.bSupportsPrimitiveRestart = false; // TODO: figure out if it does
g_Config.backend_info.bSupportsPrimitiveRestart = false; // D3D9 does not support primitive restart
g_Config.backend_info.bSupportsSeparateAlphaFunction = device_caps.PrimitiveMiscCaps & D3DPMISCCAPS_SEPARATEALPHABLEND;
// Dual source blend disabled by default until a proper method to test for support is found
g_Config.backend_info.bSupports3DVision = true;
@ -131,19 +131,19 @@ void InitBackendInfo()
g_Config.backend_info.PPShaders.clear();
DX9::D3D::Shutdown();
}
}
void VideoBackend::ShowConfig(void* parent)
{
void VideoBackend::ShowConfig(void* parent)
{
#if defined(HAVE_WX) && HAVE_WX
InitBackendInfo();
VideoConfigDiag diag((wxWindow*)parent, _trans("Direct3D9"), "gfx_dx9");
diag.ShowModal();
#endif
}
}
bool VideoBackend::Initialize(void *&window_handle)
{
bool VideoBackend::Initialize(void *&window_handle)
{
InitializeShared();
InitBackendInfo();
@ -173,10 +173,10 @@ bool VideoBackend::Initialize(void *&window_handle)
s_BackendInitialized = true;
return true;
}
}
void VideoBackend::Video_Prepare()
{
void VideoBackend::Video_Prepare()
{
// Better be safe...
s_efbAccessRequested = FALSE;
s_FifoShuttingDown = FALSE;
@ -200,10 +200,10 @@ void VideoBackend::Video_Prepare()
DLCache::Init();
// Notify the core that the video backend is ready
Host_Message(WM_USER_CREATE);
}
}
void VideoBackend::Shutdown()
{
void VideoBackend::Shutdown()
{
s_BackendInitialized = false;
// TODO: should be in Video_Cleanup
@ -233,9 +233,9 @@ void VideoBackend::Shutdown()
g_texture_cache = NULL;
}
D3D::Shutdown();
}
}
void VideoBackend::Video_Cleanup() {
}
void VideoBackend::Video_Cleanup() {
}
}