2009-07-28 21:32:10 +00:00
|
|
|
// Copyright (C) 2003 Dolphin Project.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
// 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.
|
|
|
|
|
|
|
|
// 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 SVN repository and contact information can be found at
|
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
|
|
|
#ifndef __ISOPROPERTIES_h__
|
|
|
|
#define __ISOPROPERTIES_h__
|
|
|
|
|
|
|
|
#include <wx/wx.h>
|
|
|
|
#include <wx/sizer.h>
|
|
|
|
#include <wx/filepicker.h>
|
|
|
|
#include <wx/statbmp.h>
|
|
|
|
#include <wx/imaglist.h>
|
2009-12-28 19:34:19 +00:00
|
|
|
#include <wx/fontmap.h>
|
2008-12-08 04:46:09 +00:00
|
|
|
#include <wx/treectrl.h>
|
|
|
|
#include <wx/gbsizer.h>
|
|
|
|
#include <wx/notebook.h>
|
|
|
|
#include <wx/mimetype.h>
|
|
|
|
#include <string>
|
|
|
|
|
2009-02-14 17:32:03 +00:00
|
|
|
#include "ISOFile.h"
|
2008-12-08 04:46:09 +00:00
|
|
|
#include "Filesystem.h"
|
|
|
|
#include "IniFile.h"
|
|
|
|
#include "PatchEngine.h"
|
2008-12-17 04:14:24 +00:00
|
|
|
#include "ActionReplay.h"
|
2010-07-22 01:48:48 +00:00
|
|
|
#include "GeckoCodeDiag.h"
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
class CISOProperties : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2008-12-17 04:14:24 +00:00
|
|
|
CISOProperties(const std::string fileName,
|
|
|
|
wxWindow* parent,
|
|
|
|
wxWindowID id = 1,
|
|
|
|
const wxString& title = wxT("Properties"),
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
2009-02-14 17:32:03 +00:00
|
|
|
long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER);
|
2008-12-08 04:46:09 +00:00
|
|
|
virtual ~CISOProperties();
|
|
|
|
|
|
|
|
bool bRefreshList;
|
|
|
|
|
2010-07-18 04:13:16 +00:00
|
|
|
void ActionReplayList_Load();
|
|
|
|
bool SaveGameConfig();
|
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE();
|
|
|
|
|
2009-03-24 23:10:43 +00:00
|
|
|
wxStaticBoxSizer *sbGameConfig;
|
2008-12-08 04:46:09 +00:00
|
|
|
wxStaticBoxSizer *sbCoreOverrides;
|
2009-03-24 23:10:43 +00:00
|
|
|
wxStaticBoxSizer *sbWiiOverrides;
|
|
|
|
wxStaticBoxSizer *sbVideoOverrides;
|
2008-12-08 04:46:09 +00:00
|
|
|
wxBoxSizer *sEmuState;
|
|
|
|
wxBoxSizer *sPatches;
|
|
|
|
wxBoxSizer *sPatchButtons;
|
|
|
|
wxBoxSizer *sCheats;
|
|
|
|
wxBoxSizer *sCheatButtons;
|
|
|
|
wxStaticBoxSizer *sbISODetails;
|
|
|
|
wxGridBagSizer *sISODetails;
|
|
|
|
wxStaticBoxSizer *sbBannerDetails;
|
|
|
|
wxGridBagSizer *sBannerDetails;
|
|
|
|
|
|
|
|
wxButton *m_Close;
|
|
|
|
|
|
|
|
wxNotebook *m_Notebook;
|
|
|
|
wxPanel *m_GameConfig;
|
|
|
|
wxPanel *m_PatchPage;
|
|
|
|
wxPanel *m_CheatPage;
|
|
|
|
wxPanel *m_Information;
|
|
|
|
wxPanel *m_Filesystem;
|
|
|
|
|
|
|
|
wxStaticText *OverrideText;
|
2009-03-24 23:10:43 +00:00
|
|
|
// Core
|
2010-07-30 17:12:59 +00:00
|
|
|
wxCheckBox *CPUThread, *SkipIdle, *MMU, *SMC, *TLBHack;
|
2009-03-24 23:10:43 +00:00
|
|
|
// Wii
|
|
|
|
wxCheckBox *EnableProgressiveScan, *EnableWideScreen;
|
|
|
|
// Video
|
2009-05-13 13:28:49 +00:00
|
|
|
wxCheckBox *ForceFiltering,
|
2009-09-06 15:39:06 +00:00
|
|
|
*EFBCopyDisable, *EFBToTextureEnable,
|
2010-08-05 18:41:02 +00:00
|
|
|
*SafeTextureCache, *DstAlphaPass, *UseXFB, *UseZTPSpeedupHack;
|
2009-05-11 21:20:27 +00:00
|
|
|
wxStaticText *Hacktext;
|
|
|
|
wxArrayString arrayStringFor_Hack;
|
|
|
|
wxChoice *Hack;
|
2010-07-18 15:47:28 +00:00
|
|
|
wxStaticText *WMTightnessText;
|
|
|
|
wxTextCtrl *WMTightness;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
wxButton *EditConfig;
|
|
|
|
wxStaticText *EmuStateText;
|
|
|
|
wxArrayString arrayStringFor_EmuState;
|
|
|
|
wxChoice *EmuState;
|
2009-02-21 14:40:34 +00:00
|
|
|
wxTextCtrl *EmuIssues;
|
2008-12-08 04:46:09 +00:00
|
|
|
wxArrayString arrayStringFor_Patches;
|
|
|
|
wxCheckListBox *Patches;
|
|
|
|
wxButton *EditPatch;
|
|
|
|
wxButton *AddPatch;
|
|
|
|
wxButton *RemovePatch;
|
|
|
|
wxArrayString arrayStringFor_Cheats;
|
|
|
|
wxCheckListBox *Cheats;
|
|
|
|
wxButton *EditCheat;
|
|
|
|
wxButton *AddCheat;
|
|
|
|
wxButton *RemoveCheat;
|
|
|
|
wxArrayString arrayStringFor_Speedhacks;
|
|
|
|
wxCheckListBox *Speedhacks;
|
|
|
|
wxButton *EditSpeedhack;
|
|
|
|
wxButton *AddSpeedhack;
|
|
|
|
wxButton *RemoveSpeedhack;
|
|
|
|
|
|
|
|
wxStaticText *m_NameText;
|
|
|
|
wxStaticText *m_GameIDText;
|
|
|
|
wxStaticText *m_CountryText;
|
|
|
|
wxStaticText *m_MakerIDText;
|
|
|
|
wxStaticText *m_DateText;
|
|
|
|
wxStaticText *m_FSTText;
|
|
|
|
wxStaticText *m_LangText;
|
|
|
|
wxStaticText *m_ShortText;
|
|
|
|
wxStaticText *m_MakerText;
|
|
|
|
wxStaticText *m_CommentText;
|
|
|
|
wxStaticText *m_BannerText;
|
|
|
|
wxTextCtrl *m_Name;
|
|
|
|
wxTextCtrl *m_GameID;
|
|
|
|
wxTextCtrl *m_Country;
|
|
|
|
wxTextCtrl *m_MakerID;
|
|
|
|
wxTextCtrl *m_Date;
|
|
|
|
wxTextCtrl *m_FST;
|
|
|
|
wxArrayString arrayStringFor_Lang;
|
|
|
|
wxChoice *m_Lang;
|
|
|
|
wxTextCtrl *m_ShortName;
|
|
|
|
wxTextCtrl *m_Maker;
|
|
|
|
wxTextCtrl *m_Comment;
|
|
|
|
wxStaticBitmap *m_Banner;
|
|
|
|
|
|
|
|
wxTreeCtrl *m_Treectrl;
|
|
|
|
wxTreeItemId RootId;
|
2009-09-13 22:03:18 +00:00
|
|
|
wxImageList *m_iconList;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2010-07-22 01:48:48 +00:00
|
|
|
Gecko::CodeConfigPanel *m_geckocode_panel;
|
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
ID_CLOSE = 1000,
|
|
|
|
ID_TREECTRL,
|
|
|
|
|
|
|
|
ID_NOTEBOOK,
|
|
|
|
ID_GAMECONFIG,
|
|
|
|
ID_PATCH_PAGE,
|
|
|
|
ID_ARCODE_PAGE,
|
|
|
|
ID_SPEEDHACK_PAGE,
|
|
|
|
ID_INFORMATION,
|
|
|
|
ID_FILESYSTEM,
|
|
|
|
|
|
|
|
ID_OVERRIDE_TEXT,
|
|
|
|
ID_USEDUALCORE,
|
|
|
|
ID_IDLESKIP,
|
2010-07-29 12:17:47 +00:00
|
|
|
ID_MMU,
|
2009-03-04 16:56:49 +00:00
|
|
|
ID_TLBHACK,
|
2010-07-30 17:12:59 +00:00
|
|
|
ID_SMC,
|
2009-03-22 21:24:38 +00:00
|
|
|
ID_FORCEFILTERING,
|
|
|
|
ID_EFBCOPYDISABLE,
|
|
|
|
ID_EFBTOTEXTUREENABLE,
|
|
|
|
ID_SAFETEXTURECACHE,
|
|
|
|
ID_DSTALPHAPASS,
|
|
|
|
ID_USEXFB,
|
2010-08-05 18:41:02 +00:00
|
|
|
ID_ZTP_SPEEDUP,
|
2009-05-11 21:20:27 +00:00
|
|
|
ID_HACK_TEXT,
|
|
|
|
ID_HACK,
|
2010-07-18 15:47:28 +00:00
|
|
|
ID_WMTIGHTNESS_TEXT,
|
|
|
|
ID_WMTIGHTNESS,
|
2008-12-08 04:46:09 +00:00
|
|
|
ID_ENABLEPROGRESSIVESCAN,
|
|
|
|
ID_ENABLEWIDESCREEN,
|
|
|
|
ID_EDITCONFIG,
|
|
|
|
ID_EMUSTATE_TEXT,
|
|
|
|
ID_EMUSTATE,
|
2009-02-21 14:40:34 +00:00
|
|
|
ID_EMUISSUES_TEXT,
|
|
|
|
ID_EMU_ISSUES,
|
2008-12-08 04:46:09 +00:00
|
|
|
ID_PATCHES_LIST,
|
|
|
|
ID_EDITPATCH,
|
|
|
|
ID_ADDPATCH,
|
|
|
|
ID_REMOVEPATCH,
|
|
|
|
ID_CHEATS_LIST,
|
|
|
|
ID_EDITCHEAT,
|
|
|
|
ID_ADDCHEAT,
|
|
|
|
ID_REMOVECHEAT,
|
|
|
|
|
|
|
|
ID_NAME_TEXT,
|
|
|
|
ID_GAMEID_TEXT,
|
|
|
|
ID_COUNTRY_TEXT,
|
|
|
|
ID_MAKERID_TEXT,
|
|
|
|
ID_DATE_TEXT,
|
|
|
|
ID_FST_TEXT,
|
|
|
|
ID_VERSION_TEXT,
|
|
|
|
ID_LANG_TEXT,
|
|
|
|
ID_SHORTNAME_TEXT,
|
|
|
|
ID_LONGNAME_TEXT,
|
|
|
|
ID_MAKER_TEXT,
|
|
|
|
ID_COMMENT_TEXT,
|
|
|
|
ID_BANNER_TEXT,
|
|
|
|
|
|
|
|
ID_NAME,
|
|
|
|
ID_GAMEID,
|
|
|
|
ID_COUNTRY,
|
|
|
|
ID_MAKERID,
|
|
|
|
ID_DATE,
|
|
|
|
ID_FST,
|
|
|
|
ID_VERSION,
|
|
|
|
ID_LANG,
|
|
|
|
ID_SHORTNAME,
|
|
|
|
ID_LONGNAME,
|
|
|
|
ID_MAKER,
|
|
|
|
ID_COMMENT,
|
|
|
|
ID_BANNER,
|
|
|
|
IDM_EXTRACTDIR,
|
2009-09-13 22:03:18 +00:00
|
|
|
IDM_EXTRACTALL,
|
2008-12-08 04:46:09 +00:00
|
|
|
IDM_EXTRACTFILE,
|
2009-12-29 13:59:38 +00:00
|
|
|
IDM_EXTRACTAPPLOADER,
|
|
|
|
IDM_EXTRACTDOL,
|
2008-12-08 04:46:09 +00:00
|
|
|
IDM_BNRSAVEAS
|
|
|
|
};
|
|
|
|
|
2009-06-07 02:54:07 +00:00
|
|
|
void CreateGUIControls(bool);
|
2008-12-08 04:46:09 +00:00
|
|
|
void OnClose(wxCloseEvent& event);
|
|
|
|
void OnCloseClick(wxCommandEvent& event);
|
|
|
|
void OnEditConfig(wxCommandEvent& event);
|
|
|
|
void ListSelectionChanged(wxCommandEvent& event);
|
|
|
|
void PatchButtonClicked(wxCommandEvent& event);
|
|
|
|
void ActionReplayButtonClicked(wxCommandEvent& event);
|
|
|
|
void RightClickOnBanner(wxMouseEvent& event);
|
|
|
|
void OnBannerImageSave(wxCommandEvent& event);
|
|
|
|
void OnRightClickOnTree(wxTreeEvent& event);
|
|
|
|
void OnExtractFile(wxCommandEvent& event);
|
|
|
|
void OnExtractDir(wxCommandEvent& event);
|
2009-12-29 13:59:38 +00:00
|
|
|
void OnExtractDataFromHeader(wxCommandEvent& event);
|
2008-12-08 04:46:09 +00:00
|
|
|
void SetRefresh(wxCommandEvent& event);
|
2009-02-14 17:32:03 +00:00
|
|
|
void OnChangeBannerLang(wxCommandEvent& event);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2009-02-14 17:32:03 +00:00
|
|
|
GameListItem *OpenGameListItem;
|
2009-03-10 17:19:30 +00:00
|
|
|
|
|
|
|
std::vector<const DiscIO::SFileInfo *> GCFiles;
|
2008-12-08 04:46:09 +00:00
|
|
|
typedef std::vector<const DiscIO::SFileInfo *>::iterator fileIter;
|
|
|
|
|
2009-09-13 22:03:18 +00:00
|
|
|
size_t CreateDirectoryTree(wxTreeItemId& parent,
|
|
|
|
std::vector<const DiscIO::SFileInfo*> fileInfos,
|
|
|
|
const size_t _FirstIndex,
|
|
|
|
const size_t _LastIndex);
|
|
|
|
void ExportDir(const char* _rFullPath, const char* _rExportFilename,
|
|
|
|
const int partitionNum = 0);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
IniFile GameIni;
|
|
|
|
std::string GameIniFile;
|
|
|
|
|
|
|
|
void LoadGameConfig();
|
|
|
|
void PatchList_Load();
|
|
|
|
void PatchList_Save();
|
|
|
|
void ActionReplayList_Save();
|
2009-02-14 17:32:03 +00:00
|
|
|
void ChangeBannerDetails(int lang);
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|
|
|
|
#endif
|