[Project64] Add gamesharks to enhancements
This commit is contained in:
parent
afa4619bc0
commit
ce03386007
|
@ -4,3 +4,12 @@ Enhancement0_AO=1
|
|||
Enhancement0_N=
|
||||
Enhancement0_OVER=1
|
||||
Enhancement0_OVERV=7
|
||||
|
||||
[3E5055B6-2E92DA52-C:45]
|
||||
Enhancement0=(debug) 4 Players start from P1 controller
|
||||
Enhancement0_AO=0
|
||||
Enhancement0_GS=1
|
||||
Enhancement0_GSC=8018EDE9 0001,8018EDEA 0001,8018EDEB 0001
|
||||
Enhancement0_N=Makes testing MP modes quicker than setting up more controllers.
|
||||
Enhancement0_OVER=0
|
||||
Enhancement0_OVERV=0
|
||||
|
|
|
@ -48,12 +48,6 @@ bool CCheats::LoadCode(const stdstr & CheatEntry, SettingID ExtensionSetting, in
|
|||
return false;
|
||||
}
|
||||
|
||||
stdstr Extension;
|
||||
if (!g_Settings->LoadStringIndex(ExtensionSetting, ExtensionIndex, Extension))
|
||||
{
|
||||
Extension.clear();
|
||||
}
|
||||
|
||||
const char * ReadPos = CheatString;
|
||||
CODES Code;
|
||||
while (ReadPos)
|
||||
|
@ -67,19 +61,31 @@ bool CCheats::LoadCode(const stdstr & CheatEntry, SettingID ExtensionSetting, in
|
|||
|
||||
if (strncmp(ReadPos, "????", 4) == 0)
|
||||
{
|
||||
if (Extension.length() == 0) { return false; }
|
||||
stdstr Extension;
|
||||
if (!g_Settings->LoadStringIndex(ExtensionSetting, ExtensionIndex, Extension) || Extension.length() == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
CodeEntry.Value = Extension[0] == '$' ? (uint16_t)strtoul(&Extension[1], 0, 16) : (uint16_t)atol(Extension.c_str());
|
||||
}
|
||||
else if (strncmp(ReadPos, "??", 2) == 0)
|
||||
{
|
||||
if (Extension.length() == 0) { return false; }
|
||||
CodeEntry.Value = (uint8_t)(strtoul(ReadPos, 0, 16));
|
||||
stdstr Extension;
|
||||
if (!g_Settings->LoadStringIndex(ExtensionSetting, ExtensionIndex, Extension) || Extension.length() == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
CodeEntry.Value = (uint8_t)(strtoul(ReadPos, 0, 16));
|
||||
CodeEntry.Value |= (Extension[0] == '$' ? (uint8_t)strtoul(&Extension[1], 0, 16) : (uint8_t)atol(Extension.c_str())) << 16;
|
||||
}
|
||||
else if (strncmp(&ReadPos[2], "??", 2) == 0)
|
||||
{
|
||||
if (Extension.length() == 0) { return false; }
|
||||
CodeEntry.Value = (uint16_t)(strtoul(ReadPos, 0, 16) << 16);
|
||||
stdstr Extension;
|
||||
if (!g_Settings->LoadStringIndex(ExtensionSetting, ExtensionIndex, Extension) || Extension.length() == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
CodeEntry.Value = (uint16_t)(strtoul(ReadPos, 0, 16) << 16);
|
||||
CodeEntry.Value |= Extension[0] == '$' ? (uint8_t)strtoul(&Extension[1], 0, 16) : (uint8_t)atol(Extension.c_str());
|
||||
}
|
||||
else
|
||||
|
@ -104,30 +110,48 @@ bool CCheats::LoadCode(const stdstr & CheatEntry, SettingID ExtensionSetting, in
|
|||
return true;
|
||||
}
|
||||
|
||||
void CCheats::LoadEnhancements(void)
|
||||
{
|
||||
for (int i = 0; i < CCheats::MaxCheats; i++)
|
||||
{
|
||||
std::string Name = g_Settings->LoadStringIndex(Enhancement_Name, i);
|
||||
if (Name.length() == 0) { break; }
|
||||
|
||||
if (!g_Settings->LoadBoolIndex(Enhancement_Gameshark, i))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
std::string entry = g_Settings->LoadStringIndex(Enhancement_GamesharkCode, i);
|
||||
stdstr_f CheatEntry("\"Enhancement%d\",%s", i, entry.c_str());
|
||||
LoadCode(CheatEntry.c_str(), Default_None, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CCheats::LoadPermCheats(CPlugins * Plugins)
|
||||
{
|
||||
if (g_Settings->LoadBool(Debugger_DisableGameFixes))
|
||||
{
|
||||
return;
|
||||
}
|
||||
for (int CheatNo = 0; CheatNo < MaxCheats; CheatNo++)
|
||||
for (int i = 0; i < MaxCheats; i++)
|
||||
{
|
||||
stdstr LineEntry;
|
||||
if (!g_Settings->LoadStringIndex(Rdb_GameCheatFix, CheatNo, LineEntry) || LineEntry.empty())
|
||||
if (!g_Settings->LoadStringIndex(Rdb_GameCheatFix, i, LineEntry) || LineEntry.empty())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
stdstr CheatPlugins;
|
||||
bool LoadEntry = true;
|
||||
if (g_Settings->LoadStringIndex(Rdb_GameCheatFixPlugin, CheatNo, CheatPlugins) && !CheatPlugins.empty())
|
||||
if (g_Settings->LoadStringIndex(Rdb_GameCheatFixPlugin, i, CheatPlugins) && !CheatPlugins.empty())
|
||||
{
|
||||
LoadEntry = false;
|
||||
|
||||
strvector PluginList = CheatPlugins.Tokenize(',');
|
||||
for (size_t i = 0, n = PluginList.size(); i < n; i++)
|
||||
for (size_t p = 0, n = PluginList.size(); p < n; p++)
|
||||
{
|
||||
stdstr PluginName = PluginList[i].Trim();
|
||||
stdstr PluginName = PluginList[p].Trim();
|
||||
if (Plugins->Gfx() != NULL && strstr(Plugins->Gfx()->PluginName(), PluginName.c_str()) != NULL)
|
||||
{
|
||||
LoadEntry = true;
|
||||
|
@ -153,7 +177,8 @@ void CCheats::LoadPermCheats(CPlugins * Plugins)
|
|||
|
||||
if (LoadEntry)
|
||||
{
|
||||
LoadCode(LineEntry.c_str(), Default_None, CheatNo);
|
||||
stdstr_f CheatEntry("\"PermCheat%d\",%s", i, LineEntry.c_str());
|
||||
LoadCode(CheatEntry.c_str(), Default_None, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -162,6 +187,7 @@ void CCheats::LoadCheats(bool DisableSelected, CPlugins * Plugins)
|
|||
{
|
||||
ResetCodes();
|
||||
LoadPermCheats(Plugins);
|
||||
LoadEnhancements();
|
||||
|
||||
for (int CheatNo = 0; CheatNo < MaxCheats; CheatNo++)
|
||||
{
|
||||
|
|
|
@ -55,8 +55,9 @@ private:
|
|||
typedef std::map<uint32_t, MEM_VALUE16> ORIGINAL_VALUES16;
|
||||
typedef std::map<uint32_t, MEM_VALUE8> ORIGINAL_VALUES8;
|
||||
|
||||
void LoadPermCheats(CPlugins * Plugins);
|
||||
int32_t EntrySize(const CODES & CodeEntry, int32_t CurrentEntry);
|
||||
void LoadPermCheats(CPlugins * Plugins);
|
||||
void LoadEnhancements(void);
|
||||
int32_t EntrySize(const CODES & CodeEntry, int32_t CurrentEntry);
|
||||
|
||||
CMipsMemoryVM & m_MMU;
|
||||
CODES_ARRAY m_Codes;
|
||||
|
|
|
@ -438,6 +438,8 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
|||
AddHandler(Enhancement_OnByDefault, new CSettingTypeEnhancements("_AO"));
|
||||
AddHandler(Enhancement_Overclock, new CSettingTypeEnhancements("_OVER"));
|
||||
AddHandler(Enhancement_OverclockValue, new CSettingTypeEnhancements("_OVERV"));
|
||||
AddHandler(Enhancement_Gameshark, new CSettingTypeEnhancements("_GS"));
|
||||
AddHandler(Enhancement_GamesharkCode, new CSettingTypeEnhancements("_GSC"));
|
||||
AddHandler(Enhancement_Notes, new CSettingTypeEnhancements("_N"));
|
||||
WriteTrace(TraceAppInit, TraceDebug, "Done");
|
||||
}
|
||||
|
|
|
@ -334,6 +334,8 @@ enum SettingID
|
|||
Enhancement_OnByDefault,
|
||||
Enhancement_Overclock,
|
||||
Enhancement_OverclockValue,
|
||||
Enhancement_Gameshark,
|
||||
Enhancement_GamesharkCode,
|
||||
Enhancement_Notes,
|
||||
|
||||
FirstUISettings, LastUISettings = FirstUISettings + MaxPluginSetting,
|
||||
|
|
|
@ -7,6 +7,7 @@ class CEditEnhancement :
|
|||
public:
|
||||
BEGIN_MSG_MAP_EX(CEditEnhancement)
|
||||
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
||||
COMMAND_ID_HANDLER(IDC_BTN_GAMESHARK, OnEditGameshark)
|
||||
COMMAND_ID_HANDLER(IDOK, OnOkCmd)
|
||||
COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
|
||||
END_MSG_MAP()
|
||||
|
@ -19,6 +20,7 @@ public:
|
|||
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
|
||||
LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
|
||||
LRESULT OnOkCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
|
||||
LRESULT OnEditGameshark(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
|
||||
|
||||
private:
|
||||
CEditEnhancement(void); // Disable default constructor
|
||||
|
@ -30,6 +32,38 @@ private:
|
|||
int m_EditItem;
|
||||
};
|
||||
|
||||
class CEditGS :
|
||||
public CDialogImpl < CEditGS >
|
||||
{
|
||||
public:
|
||||
BEGIN_MSG_MAP_EX(CEditEnhancement)
|
||||
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
||||
COMMAND_HANDLER(IDC_CHEAT_CODES, EN_CHANGE, OnCheatChanged)
|
||||
COMMAND_ID_HANDLER(IDOK, OnOkCmd)
|
||||
COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
|
||||
END_MSG_MAP()
|
||||
|
||||
enum { IDD = IDD_Enhancement_GS };
|
||||
|
||||
CEditGS(int EditItem);
|
||||
|
||||
void Display(HWND ParentWindow);
|
||||
|
||||
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
|
||||
LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
|
||||
LRESULT OnOkCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
|
||||
LRESULT OnCheatChanged(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
||||
|
||||
private:
|
||||
CEditGS(void); // Disable default constructor
|
||||
CEditGS(const CEditGS&); // Disable copy constructor
|
||||
CEditGS& operator=(const CEditGS&); // Disable assignment
|
||||
|
||||
bool CheatCode(std::string & Code);
|
||||
|
||||
int m_EditItem;
|
||||
};
|
||||
|
||||
CEnhancementConfig::CEnhancementConfig(void) :
|
||||
m_hSelectedItem(NULL)
|
||||
{
|
||||
|
@ -220,7 +254,7 @@ LRESULT CEnhancementConfig::OnEnhancementListSelChanged(NMHDR * /*pNMHDR*/)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT CEnhancementConfig::OnEditItem(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
LRESULT CEnhancementConfig::OnEditItem(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
if (m_hSelectedItem != NULL)
|
||||
{
|
||||
|
@ -236,7 +270,7 @@ LRESULT CEnhancementConfig::OnEditItem(WORD /*wNotifyCode*/, WORD wID, HWND /*hW
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT CEnhancementConfig::OnDeleteItem(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
LRESULT CEnhancementConfig::OnDeleteItem(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
if (m_hSelectedItem == NULL)
|
||||
{
|
||||
|
@ -261,9 +295,20 @@ LRESULT CEnhancementConfig::OnDeleteItem(WORD /*wNotifyCode*/, WORD wID, HWND /*
|
|||
g_Settings->DeleteSettingIndex(Enhancement_Notes, i);
|
||||
g_Settings->DeleteSettingIndex(Enhancement_Overclock, i);
|
||||
g_Settings->DeleteSettingIndex(Enhancement_OverclockValue, i);
|
||||
g_Settings->DeleteSettingIndex(Enhancement_Gameshark, i);
|
||||
g_Settings->DeleteSettingIndex(Enhancement_GamesharkCode, i);
|
||||
break;
|
||||
}
|
||||
stdstr Value;
|
||||
if (g_Settings->LoadStringIndex(Enhancement_Gameshark, i + 1, Value))
|
||||
{
|
||||
g_Settings->SaveStringIndex(Enhancement_Gameshark, i, Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_Settings->DeleteSettingIndex(Enhancement_Gameshark, i);
|
||||
}
|
||||
|
||||
if (g_Settings->LoadStringIndex(Enhancement_Notes, i + 1, Value))
|
||||
{
|
||||
g_Settings->SaveStringIndex(Enhancement_Notes, i, Value);
|
||||
|
@ -301,6 +346,15 @@ LRESULT CEnhancementConfig::OnDeleteItem(WORD /*wNotifyCode*/, WORD wID, HWND /*
|
|||
g_Settings->DeleteSettingIndex(Enhancement_Overclock, i);
|
||||
}
|
||||
|
||||
if (g_Settings->LoadBoolIndex(Enhancement_Gameshark, i + 1, bValue))
|
||||
{
|
||||
g_Settings->SaveBoolIndex(Enhancement_Gameshark, i, bValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_Settings->DeleteSettingIndex(Enhancement_Gameshark, i);
|
||||
}
|
||||
|
||||
uint32_t dwValue;
|
||||
if (g_Settings->LoadDwordIndex(Enhancement_OverclockValue, i + 1, dwValue))
|
||||
{
|
||||
|
@ -485,10 +539,17 @@ LRESULT CEditEnhancement::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM
|
|||
GetDlgItem(IDC_NOTES).SetWindowTextA(m_EditItem >= 0 ? g_Settings->LoadStringIndex(Enhancement_Notes, m_EditItem).c_str() : "");
|
||||
CButton(GetDlgItem(IDC_AUTOON)).SetCheck(g_Settings->LoadBoolIndex(Enhancement_OnByDefault, m_EditItem) ? BST_CHECKED : BST_UNCHECKED);
|
||||
CButton(GetDlgItem(IDC_OVERCLOCK)).SetCheck(g_Settings->LoadBoolIndex(Enhancement_Overclock, m_EditItem) ? BST_CHECKED : BST_UNCHECKED);
|
||||
CButton(GetDlgItem(IDC_GAMESHARK)).SetCheck(g_Settings->LoadBoolIndex(Enhancement_Gameshark, m_EditItem) ? BST_CHECKED : BST_UNCHECKED);
|
||||
GetDlgItem(IDC_OVER_CLOCK_MODIFIER).SetWindowTextA(m_EditItem >= 0 ? stdstr_f("%d", g_Settings->LoadDwordIndex(Enhancement_OverclockValue, m_EditItem)).c_str() : "");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT CEditEnhancement::OnEditGameshark(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
CEditGS(m_EditItem).Display(m_hWnd);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT CEditEnhancement::OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
EndDialog(wID);
|
||||
|
@ -531,6 +592,7 @@ LRESULT CEditEnhancement::OnOkCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl
|
|||
g_Settings->SaveBoolIndex(Enhancement_OnByDefault, m_EditItem, CButton(GetDlgItem(IDC_AUTOON)).GetCheck() == 1);
|
||||
g_Settings->SaveBoolIndex(Enhancement_Overclock, m_EditItem, CButton(GetDlgItem(IDC_OVERCLOCK)).GetCheck() == 1);
|
||||
g_Settings->SaveDwordIndex(Enhancement_OverclockValue, m_EditItem, atoi(GetDlgItemStr(IDC_OVER_CLOCK_MODIFIER).c_str()));
|
||||
g_Settings->SaveBoolIndex(Enhancement_Gameshark, m_EditItem, CButton(GetDlgItem(IDC_GAMESHARK)).GetCheck() == 1);
|
||||
CSettingTypeEnhancements::FlushChanges();
|
||||
EndDialog(wID);
|
||||
return TRUE;
|
||||
|
@ -551,3 +613,133 @@ std::string CEditEnhancement::GetDlgItemStr(int nIDDlgItem)
|
|||
DlgItem.GetWindowText((char *)Result.c_str(), Result.length());
|
||||
return Result;
|
||||
}
|
||||
|
||||
CEditGS::CEditGS(int EditItem) :
|
||||
m_EditItem(EditItem)
|
||||
{
|
||||
}
|
||||
|
||||
void CEditGS::Display(HWND ParentWindow)
|
||||
{
|
||||
BOOL result = m_thunk.Init(NULL, NULL);
|
||||
if (result)
|
||||
{
|
||||
_AtlWinModule.AddCreateWndData(&m_thunk.cd, this);
|
||||
#ifdef _DEBUG
|
||||
m_bModal = true;
|
||||
#endif //_DEBUG
|
||||
::DialogBoxParamW(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCEW(IDD), (HWND)ParentWindow, StartDialogProc, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
LRESULT CEditGS::OnCheatChanged(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
std::string code;
|
||||
GetDlgItem(IDOK).EnableWindow(CheatCode(code));
|
||||
return true;
|
||||
}
|
||||
|
||||
LRESULT CEditGS::OnOkCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
std::string code;
|
||||
if (CheatCode(code))
|
||||
{
|
||||
if (code.empty())
|
||||
{
|
||||
g_Settings->DeleteSettingIndex(Enhancement_GamesharkCode, m_EditItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_Settings->SaveStringIndex(Enhancement_GamesharkCode, m_EditItem, code.c_str());
|
||||
}
|
||||
}
|
||||
EndDialog(wID);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT CEditGS::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
std::string entry = g_Settings->LoadStringIndex(Enhancement_GamesharkCode, m_EditItem);
|
||||
std::string Buffer;
|
||||
const char * ReadPos = entry.c_str();
|
||||
do
|
||||
{
|
||||
const char * End = strchr(ReadPos, ',');
|
||||
if (End)
|
||||
{
|
||||
Buffer.append(ReadPos, End - ReadPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
Buffer.append(ReadPos);
|
||||
}
|
||||
|
||||
ReadPos = strchr(ReadPos, ',');
|
||||
if (ReadPos != NULL)
|
||||
{
|
||||
Buffer.append("\r\n");
|
||||
ReadPos += 1;
|
||||
}
|
||||
} while (ReadPos);
|
||||
CWindow Code = GetDlgItem(IDC_CHEAT_CODES);
|
||||
Code.SetWindowText(Buffer.c_str());
|
||||
Code.SetFocus();
|
||||
Code.PostMessage(EM_SETSEL, (WPARAM)-1, 0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
LRESULT CEditGS::OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
EndDialog(wID);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool CEditGS::CheatCode(std::string & Code)
|
||||
{
|
||||
Code.clear();
|
||||
|
||||
bool ValidCode = true;
|
||||
uint32_t numlines = SendDlgItemMessage(IDC_CHEAT_CODES, EM_GETLINECOUNT, 0, 0);
|
||||
|
||||
for (uint32_t line = 0; line < numlines; line++) //read line after line (bypassing limitation GetDlgItemText)
|
||||
{
|
||||
char tempformat[128] = { 0 }, str[128] = { 0 };
|
||||
const char * formatnormal = "XXXXXXXX XXXX";
|
||||
|
||||
*(LPWORD)str = sizeof(str);
|
||||
uint32_t len = SendDlgItemMessage(IDC_CHEAT_CODES, EM_GETLINE, (WPARAM)line, (LPARAM)(const char *)str);
|
||||
str[len] = 0;
|
||||
|
||||
if (len <= 0) { continue; }
|
||||
|
||||
for (uint32_t i = 0; i < sizeof(tempformat); i++)
|
||||
{
|
||||
if (isxdigit(str[i]))
|
||||
{
|
||||
tempformat[i] = 'X';
|
||||
}
|
||||
if (str[i] == ' ')
|
||||
{
|
||||
tempformat[i] = str[i];
|
||||
}
|
||||
if (str[i] == 0) { break; }
|
||||
}
|
||||
|
||||
if (strcmp(tempformat, formatnormal) == 0)
|
||||
{
|
||||
if (!Code.empty())
|
||||
{
|
||||
Code += ",";
|
||||
}
|
||||
Code += str;
|
||||
}
|
||||
else
|
||||
{
|
||||
ValidCode = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ValidCode;
|
||||
}
|
||||
|
||||
|
|
|
@ -1294,9 +1294,11 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
|||
BEGIN
|
||||
LTEXT "Name:",IDC_NAME,7,9,25,10
|
||||
EDITTEXT IDC_CODE_NAME,37,7,162,12,ES_AUTOHSCROLL
|
||||
CONTROL "Overclock Modifier:",IDC_OVERCLOCK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,20,74,10
|
||||
EDITTEXT IDC_OVER_CLOCK_MODIFIER,90,20,109,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "On by default",IDC_AUTOON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,31,74,10
|
||||
CONTROL "Game Shark Code",IDC_GAMESHARK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,20,74,10
|
||||
PUSHBUTTON "Edit",IDC_BTN_GAMESHARK,90,20,51,10
|
||||
CONTROL "Overclock Modifier:",IDC_OVERCLOCK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,31,74,10
|
||||
EDITTEXT IDC_OVER_CLOCK_MODIFIER,90,31,109,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "On by default",IDC_AUTOON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,42,74,10
|
||||
GROUPBOX "Notes",IDC_ENHANCEMENTNOTES,7,139,192,43
|
||||
EDITTEXT IDC_NOTES,11,148,186,30,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
|
||||
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,8,186,190,1
|
||||
|
@ -1319,6 +1321,17 @@ BEGIN
|
|||
PUSHBUTTON "Export",IDC_BTN_EXPORT,360,7,56,13
|
||||
END
|
||||
|
||||
IDD_Enhancement_GS DIALOGEX 0, 0, 123, 133
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Edit Gameshark"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Code:",IDC_CODE,7,7,25,8
|
||||
EDITTEXT IDC_CHEAT_CODES,7,17,108,90,ES_MULTILINE | ES_UPPERCASE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,7,114,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,65,114,50,14
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -1765,6 +1778,13 @@ BEGIN
|
|||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 260
|
||||
END
|
||||
|
||||
IDD_Enhancement_GS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 128
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
@ -1991,6 +2011,16 @@ BEGIN
|
|||
0
|
||||
END
|
||||
|
||||
IDD_Cheats_Add AFX_DIALOG_LAYOUT
|
||||
BEGIN
|
||||
0
|
||||
END
|
||||
|
||||
IDD_Enhancement_GS AFX_DIALOG_LAYOUT
|
||||
BEGIN
|
||||
0
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
|
@ -2,11 +2,7 @@
|
|||
// Microsoft Visual C++ generated include file.
|
||||
// Used by UIResources.rc
|
||||
//
|
||||
#define VERSION_REVISION 0
|
||||
#define VER_VER_DEBUG 0
|
||||
#define VERSION_MAJOR 2
|
||||
#define IDAPPLY 3
|
||||
#define VERSION_MINOR 4
|
||||
#define IDI_PJ64_Icon 101
|
||||
#define IDD_Rom_Information 104
|
||||
#define IDD_Key_Prompt 108
|
||||
|
@ -81,7 +77,7 @@
|
|||
#define IDD_Enhancement_Config 202
|
||||
#define IDD_Enhancement_Edit 203
|
||||
#define IDD_Debugger_CPULog 204
|
||||
#define VERSION_BUILD 781
|
||||
#define IDD_Enhancement_GS 205
|
||||
#define IDC_MENU_ITEM_TEXT 1000
|
||||
#define IDC_CLOSE_BUTTON 1001
|
||||
#define IDC_LIST2 1003
|
||||
|
@ -619,10 +615,12 @@
|
|||
#define IDC_AUTOON 1452
|
||||
#define IDC_ENHANCEMENTNOTES 1453
|
||||
#define IDC_CPU_LIST 1454
|
||||
#define IDC_GAMESHARK 1454
|
||||
#define IDC_CHK_ENABLE 1455
|
||||
#define IDC_BUFFSIZE_EDIT 1457
|
||||
#define IDC_REGSTATES_GRP 1458
|
||||
#define IDC_BTN_EXPORT 1461
|
||||
#define IDC_BTN_GAMESHARK 1462
|
||||
#define ID_POPUP_SHOWINMEMORYVIEWER 40005
|
||||
#define ID_POPUPMENU_PLAYGAMEWITHDISK 40008
|
||||
#define ID_POPUPMENU_ADDSYMBOL 40013
|
||||
|
@ -660,9 +658,9 @@
|
|||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 206
|
||||
#define _APS_NEXT_RESOURCE_VALUE 207
|
||||
#define _APS_NEXT_COMMAND_VALUE 40043
|
||||
#define _APS_NEXT_CONTROL_VALUE 1462
|
||||
#define _APS_NEXT_CONTROL_VALUE 1463
|
||||
#define _APS_NEXT_SYMED_VALUE 102
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue