// Copyright (c) 2012- PPSSPP Project. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, version 2.0 or later versions. // 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 2.0 for more details. // A copy of the GPL 2.0 should have been included with the program. // If not, see http://www.gnu.org/licenses/ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #pragma once #include "Common/CommonWindows.h" #include "Globals.h" #include "Windows/resource.h" #include "Windows/W32Util/DialogManager.h" #include "Windows/W32Util/TabControl.h" #include "Windows/GEDebugger/SimpleGLWindow.h" enum { WM_GEDBG_BREAK_CMD = WM_USER + 200, WM_GEDBG_BREAK_DRAW, WM_GEDBG_STEPDISPLAYLIST, WM_GEDBG_TOGGLEPCBREAKPOINT, WM_GEDBG_RUNTOWPARAM }; class CtrlDisplayListView; class TabDisplayLists; class TabStateFlags; class TabStateLighting; class TabStateTexture; class TabStateSettings; class CGEDebugger : public Dialog { public: CGEDebugger(HINSTANCE _hInstance, HWND _hParent); ~CGEDebugger(); static void Init(); static bool IsAddressBreakPoint(u32 pc); static bool IsOpBreakPoint(u32 op); static bool IsTextureBreakPoint(u32 op); // Separate so the UI can just show op break points separately. static bool IsOpOrTextureBreakPoint(u32 op); protected: BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); private: void SetupPreviews(); void UpdatePreviews(); void UpdateSize(WORD width, WORD height); void SavePosition(); enum PrimaryDisplayType { PRIMARY_FRAMEBUF, PRIMARY_DEPTHBUF, PRIMARY_STENCILBUF, }; PrimaryDisplayType primaryDisplay; CtrlDisplayListView *displayList; TabDisplayLists *lists; TabStateFlags *flags; TabStateLighting *lighting; TabStateTexture *textureState; TabStateSettings *settings; SimpleGLWindow *frameWindow; SimpleGLWindow *texWindow; TabControl *tabs; int minWidth,minHeight; };