Move the ZTP hack to the game properties (reverted all changes from r6057 to the...
[dolphin.git] / Source / Core / DolphinWX / Src / ISOProperties.h
blob96043ce3d16562778e79c5bea393bc067924a084
1 // Copyright (C) 2003 Dolphin Project.
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, version 2.0.
7 // This program is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 // GNU General Public License 2.0 for more details.
12 // A copy of the GPL 2.0 should have been included with the program.
13 // If not, see http://www.gnu.org/licenses/
15 // Official SVN repository and contact information can be found at
16 // http://code.google.com/p/dolphin-emu/
18 #ifndef __ISOPROPERTIES_h__
19 #define __ISOPROPERTIES_h__
21 #include <wx/wx.h>
22 #include <wx/sizer.h>
23 #include <wx/filepicker.h>
24 #include <wx/statbmp.h>
25 #include <wx/imaglist.h>
26 #include <wx/fontmap.h>
27 #include <wx/treectrl.h>
28 #include <wx/gbsizer.h>
29 #include <wx/notebook.h>
30 #include <wx/mimetype.h>
31 #include <string>
33 #include "ISOFile.h"
34 #include "Filesystem.h"
35 #include "IniFile.h"
36 #include "PatchEngine.h"
37 #include "ActionReplay.h"
38 #include "GeckoCodeDiag.h"
40 class CISOProperties : public wxDialog
42 public:
44 CISOProperties(const std::string fileName,
45 wxWindow* parent,
46 wxWindowID id = 1,
47 const wxString& title = wxT("Properties"),
48 const wxPoint& pos = wxDefaultPosition,
49 const wxSize& size = wxDefaultSize,
50 long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER);
51 virtual ~CISOProperties();
53 bool bRefreshList;
55 void ActionReplayList_Load();
56 bool SaveGameConfig();
58 private:
60 DECLARE_EVENT_TABLE();
62 wxStaticBoxSizer *sbGameConfig;
63 wxStaticBoxSizer *sbCoreOverrides;
64 wxStaticBoxSizer *sbWiiOverrides;
65 wxStaticBoxSizer *sbVideoOverrides;
66 wxBoxSizer *sEmuState;
67 wxBoxSizer *sPatches;
68 wxBoxSizer *sPatchButtons;
69 wxBoxSizer *sCheats;
70 wxBoxSizer *sCheatButtons;
71 wxStaticBoxSizer *sbISODetails;
72 wxGridBagSizer *sISODetails;
73 wxStaticBoxSizer *sbBannerDetails;
74 wxGridBagSizer *sBannerDetails;
76 wxButton *m_Close;
78 wxNotebook *m_Notebook;
79 wxPanel *m_GameConfig;
80 wxPanel *m_PatchPage;
81 wxPanel *m_CheatPage;
82 wxPanel *m_Information;
83 wxPanel *m_Filesystem;
85 wxStaticText *OverrideText;
86 // Core
87 wxCheckBox *CPUThread, *SkipIdle, *MMU, *SMC, *TLBHack;
88 // Wii
89 wxCheckBox *EnableProgressiveScan, *EnableWideScreen;
90 // Video
91 wxCheckBox *ForceFiltering,
92 *EFBCopyDisable, *EFBToTextureEnable,
93 *SafeTextureCache, *DstAlphaPass, *UseXFB, *UseZTPSpeedupHack;
94 wxStaticText *Hacktext;
95 wxArrayString arrayStringFor_Hack;
96 wxChoice *Hack;
97 wxStaticText *WMTightnessText;
98 wxTextCtrl *WMTightness;
100 wxButton *EditConfig;
101 wxStaticText *EmuStateText;
102 wxArrayString arrayStringFor_EmuState;
103 wxChoice *EmuState;
104 wxTextCtrl *EmuIssues;
105 wxArrayString arrayStringFor_Patches;
106 wxCheckListBox *Patches;
107 wxButton *EditPatch;
108 wxButton *AddPatch;
109 wxButton *RemovePatch;
110 wxArrayString arrayStringFor_Cheats;
111 wxCheckListBox *Cheats;
112 wxButton *EditCheat;
113 wxButton *AddCheat;
114 wxButton *RemoveCheat;
115 wxArrayString arrayStringFor_Speedhacks;
116 wxCheckListBox *Speedhacks;
117 wxButton *EditSpeedhack;
118 wxButton *AddSpeedhack;
119 wxButton *RemoveSpeedhack;
121 wxStaticText *m_NameText;
122 wxStaticText *m_GameIDText;
123 wxStaticText *m_CountryText;
124 wxStaticText *m_MakerIDText;
125 wxStaticText *m_DateText;
126 wxStaticText *m_FSTText;
127 wxStaticText *m_LangText;
128 wxStaticText *m_ShortText;
129 wxStaticText *m_MakerText;
130 wxStaticText *m_CommentText;
131 wxStaticText *m_BannerText;
132 wxTextCtrl *m_Name;
133 wxTextCtrl *m_GameID;
134 wxTextCtrl *m_Country;
135 wxTextCtrl *m_MakerID;
136 wxTextCtrl *m_Date;
137 wxTextCtrl *m_FST;
138 wxArrayString arrayStringFor_Lang;
139 wxChoice *m_Lang;
140 wxTextCtrl *m_ShortName;
141 wxTextCtrl *m_Maker;
142 wxTextCtrl *m_Comment;
143 wxStaticBitmap *m_Banner;
145 wxTreeCtrl *m_Treectrl;
146 wxTreeItemId RootId;
147 wxImageList *m_iconList;
149 Gecko::CodeConfigPanel *m_geckocode_panel;
151 enum
153 ID_CLOSE = 1000,
154 ID_TREECTRL,
156 ID_NOTEBOOK,
157 ID_GAMECONFIG,
158 ID_PATCH_PAGE,
159 ID_ARCODE_PAGE,
160 ID_SPEEDHACK_PAGE,
161 ID_INFORMATION,
162 ID_FILESYSTEM,
164 ID_OVERRIDE_TEXT,
165 ID_USEDUALCORE,
166 ID_IDLESKIP,
167 ID_MMU,
168 ID_TLBHACK,
169 ID_SMC,
170 ID_FORCEFILTERING,
171 ID_EFBCOPYDISABLE,
172 ID_EFBTOTEXTUREENABLE,
173 ID_SAFETEXTURECACHE,
174 ID_DSTALPHAPASS,
175 ID_USEXFB,
176 ID_ZTP_SPEEDUP,
177 ID_HACK_TEXT,
178 ID_HACK,
179 ID_WMTIGHTNESS_TEXT,
180 ID_WMTIGHTNESS,
181 ID_ENABLEPROGRESSIVESCAN,
182 ID_ENABLEWIDESCREEN,
183 ID_EDITCONFIG,
184 ID_EMUSTATE_TEXT,
185 ID_EMUSTATE,
186 ID_EMUISSUES_TEXT,
187 ID_EMU_ISSUES,
188 ID_PATCHES_LIST,
189 ID_EDITPATCH,
190 ID_ADDPATCH,
191 ID_REMOVEPATCH,
192 ID_CHEATS_LIST,
193 ID_EDITCHEAT,
194 ID_ADDCHEAT,
195 ID_REMOVECHEAT,
197 ID_NAME_TEXT,
198 ID_GAMEID_TEXT,
199 ID_COUNTRY_TEXT,
200 ID_MAKERID_TEXT,
201 ID_DATE_TEXT,
202 ID_FST_TEXT,
203 ID_VERSION_TEXT,
204 ID_LANG_TEXT,
205 ID_SHORTNAME_TEXT,
206 ID_LONGNAME_TEXT,
207 ID_MAKER_TEXT,
208 ID_COMMENT_TEXT,
209 ID_BANNER_TEXT,
211 ID_NAME,
212 ID_GAMEID,
213 ID_COUNTRY,
214 ID_MAKERID,
215 ID_DATE,
216 ID_FST,
217 ID_VERSION,
218 ID_LANG,
219 ID_SHORTNAME,
220 ID_LONGNAME,
221 ID_MAKER,
222 ID_COMMENT,
223 ID_BANNER,
224 IDM_EXTRACTDIR,
225 IDM_EXTRACTALL,
226 IDM_EXTRACTFILE,
227 IDM_EXTRACTAPPLOADER,
228 IDM_EXTRACTDOL,
229 IDM_BNRSAVEAS
232 void CreateGUIControls(bool);
233 void OnClose(wxCloseEvent& event);
234 void OnCloseClick(wxCommandEvent& event);
235 void OnEditConfig(wxCommandEvent& event);
236 void ListSelectionChanged(wxCommandEvent& event);
237 void PatchButtonClicked(wxCommandEvent& event);
238 void ActionReplayButtonClicked(wxCommandEvent& event);
239 void RightClickOnBanner(wxMouseEvent& event);
240 void OnBannerImageSave(wxCommandEvent& event);
241 void OnRightClickOnTree(wxTreeEvent& event);
242 void OnExtractFile(wxCommandEvent& event);
243 void OnExtractDir(wxCommandEvent& event);
244 void OnExtractDataFromHeader(wxCommandEvent& event);
245 void SetRefresh(wxCommandEvent& event);
246 void OnChangeBannerLang(wxCommandEvent& event);
248 GameListItem *OpenGameListItem;
250 std::vector<const DiscIO::SFileInfo *> GCFiles;
251 typedef std::vector<const DiscIO::SFileInfo *>::iterator fileIter;
253 size_t CreateDirectoryTree(wxTreeItemId& parent,
254 std::vector<const DiscIO::SFileInfo*> fileInfos,
255 const size_t _FirstIndex,
256 const size_t _LastIndex);
257 void ExportDir(const char* _rFullPath, const char* _rExportFilename,
258 const int partitionNum = 0);
260 IniFile GameIni;
261 std::string GameIniFile;
263 void LoadGameConfig();
264 void PatchList_Load();
265 void PatchList_Save();
266 void ActionReplayList_Save();
267 void ChangeBannerDetails(int lang);
269 #endif