Add a tab for texture-related settings to GE dbg.

This commit is contained in:
Unknown W. Brackets 2013-09-30 08:18:28 -07:00
parent 99b449661c
commit 97de7a6fbd
4 changed files with 30 additions and 1 deletions

View File

@ -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();
}

View File

@ -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;

View File

@ -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) {
}

View File

@ -68,3 +68,8 @@ class TabStateSettings : public TabStateValues {
public:
TabStateSettings(HINSTANCE _hInstance, HWND _hParent);
};
class TabStateTexture : public TabStateValues {
public:
TabStateTexture(HINSTANCE _hInstance, HWND _hParent);
};