From 97de7a6fbd27b0c859f8bf46da13c12e9ecac9f8 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 30 Sep 2013 08:18:28 -0700 Subject: [PATCH] Add a tab for texture-related settings to GE dbg. --- Windows/GEDebugger/GEDebugger.cpp | 5 +++++ Windows/GEDebugger/GEDebugger.h | 2 ++ Windows/GEDebugger/TabState.cpp | 17 +++++++++++++++++ Windows/GEDebugger/TabState.h | 7 ++++++- 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Windows/GEDebugger/GEDebugger.cpp b/Windows/GEDebugger/GEDebugger.cpp index 14901cbff..015c4a491 100644 --- a/Windows/GEDebugger/GEDebugger.cpp +++ b/Windows/GEDebugger/GEDebugger.cpp @@ -137,6 +137,9 @@ CGEDebugger::CGEDebugger(HINSTANCE _hInstance, HWND _hParent) lighting = new TabStateLighting(_hInstance, m_hDlg); tabs->AddTabDialog(lighting, L"Lighting"); + textureState = new TabStateTexture(_hInstance, m_hDlg); + tabs->AddTabDialog(textureState, L"Texture"); + settings = new TabStateSettings(_hInstance, m_hDlg); tabs->AddTabDialog(settings, L"Settings"); @@ -159,6 +162,7 @@ CGEDebugger::~CGEDebugger() { delete flags; delete lighting; + delete textureState; delete settings; delete lists; delete tabs; @@ -211,6 +215,7 @@ void CGEDebugger::UpdatePreviews() { flags->Update(); lighting->Update(); + textureState->Update(); settings->Update(); lists->Update(); } diff --git a/Windows/GEDebugger/GEDebugger.h b/Windows/GEDebugger/GEDebugger.h index 8b65e438a..25f4faedf 100644 --- a/Windows/GEDebugger/GEDebugger.h +++ b/Windows/GEDebugger/GEDebugger.h @@ -34,6 +34,7 @@ class CtrlDisplayListView; class TabDisplayLists; class TabStateFlags; class TabStateLighting; +class TabStateTexture; class TabStateSettings; class CGEDebugger : public Dialog { @@ -55,6 +56,7 @@ private: TabDisplayLists *lists; TabStateFlags *flags; TabStateLighting *lighting; + TabStateTexture *textureState; TabStateSettings *settings; SimpleGLWindow *frameWindow; SimpleGLWindow *texWindow; diff --git a/Windows/GEDebugger/TabState.cpp b/Windows/GEDebugger/TabState.cpp index a2b099948..3eeb962fb 100644 --- a/Windows/GEDebugger/TabState.cpp +++ b/Windows/GEDebugger/TabState.cpp @@ -78,6 +78,19 @@ static const TabStateRow stateLightingRows[] = { // TODO: Others... }; +static const TabStateRow stateTextureRows[] = { + { L"CLUT", GE_CMD_CLUTADDR, CMD_FMT_PTRWIDTH, GE_CMD_TEXTUREMAPENABLE, GE_CMD_CLUTADDRUPPER }, + { L"Texture L0 addr", GE_CMD_TEXADDR0, CMD_FMT_PTRWIDTH, GE_CMD_TEXTUREMAPENABLE, GE_CMD_TEXBUFWIDTH0 }, + { L"Texture L1 addr", GE_CMD_TEXADDR1, CMD_FMT_PTRWIDTH, GE_CMD_TEXTUREMAPENABLE, GE_CMD_TEXBUFWIDTH1 }, + { L"Texture L2 addr", GE_CMD_TEXADDR2, CMD_FMT_PTRWIDTH, GE_CMD_TEXTUREMAPENABLE, GE_CMD_TEXBUFWIDTH2 }, + { L"Texture L3 addr", GE_CMD_TEXADDR3, CMD_FMT_PTRWIDTH, GE_CMD_TEXTUREMAPENABLE, GE_CMD_TEXBUFWIDTH3 }, + { L"Texture L4 addr", GE_CMD_TEXADDR4, CMD_FMT_PTRWIDTH, GE_CMD_TEXTUREMAPENABLE, GE_CMD_TEXBUFWIDTH4 }, + { L"Texture L5 addr", GE_CMD_TEXADDR5, CMD_FMT_PTRWIDTH, GE_CMD_TEXTUREMAPENABLE, GE_CMD_TEXBUFWIDTH5 }, + { L"Texture L6 addr", GE_CMD_TEXADDR6, CMD_FMT_PTRWIDTH, GE_CMD_TEXTUREMAPENABLE, GE_CMD_TEXBUFWIDTH6 }, + { L"Texture L7 addr", GE_CMD_TEXADDR7, CMD_FMT_PTRWIDTH, GE_CMD_TEXTUREMAPENABLE, GE_CMD_TEXBUFWIDTH7 }, + // TODO: Others... +}; + static const TabStateRow stateSettingsRows[] = { { L"Framebuffer", GE_CMD_FRAMEBUFPTR, CMD_FMT_PTRWIDTH, 0, GE_CMD_FRAMEBUFWIDTH }, { L"Framebuffer format", GE_CMD_FRAMEBUFPIXFORMAT, CMD_FMT_NUM }, @@ -228,3 +241,7 @@ TabStateLighting::TabStateLighting(HINSTANCE _hInstance, HWND _hParent) TabStateSettings::TabStateSettings(HINSTANCE _hInstance, HWND _hParent) : TabStateValues(stateSettingsRows, ARRAY_SIZE(stateSettingsRows), (LPCSTR)IDD_GEDBG_TAB_VALUES, _hInstance, _hParent) { } + +TabStateTexture::TabStateTexture(HINSTANCE _hInstance, HWND _hParent) + : TabStateValues(stateTextureRows, ARRAY_SIZE(stateTextureRows), (LPCSTR)IDD_GEDBG_TAB_VALUES, _hInstance, _hParent) { +} diff --git a/Windows/GEDebugger/TabState.h b/Windows/GEDebugger/TabState.h index 40c835927..e86b69319 100644 --- a/Windows/GEDebugger/TabState.h +++ b/Windows/GEDebugger/TabState.h @@ -67,4 +67,9 @@ public: class TabStateSettings : public TabStateValues { public: TabStateSettings(HINSTANCE _hInstance, HWND _hParent); -}; \ No newline at end of file +}; + +class TabStateTexture : public TabStateValues { +public: + TabStateTexture(HINSTANCE _hInstance, HWND _hParent); +};