2016-01-27 09:11:59 +00:00
|
|
|
#pragma once
|
2016-04-13 07:34:19 +00:00
|
|
|
#include <Project64/Settings/UISettings.h>
|
2016-01-27 09:11:59 +00:00
|
|
|
|
|
|
|
enum MainMenuID
|
|
|
|
{
|
2021-03-17 08:35:20 +00:00
|
|
|
// File menu
|
2019-08-22 11:44:30 +00:00
|
|
|
ID_FILE_OPEN_ROM = 4000, ID_FILE_OPEN_COMBO, ID_FILE_ROM_INFO, ID_FILE_STARTEMULATION, ID_FILE_ENDEMULATION,
|
2016-01-27 09:11:59 +00:00
|
|
|
ID_FILE_ROMDIRECTORY, ID_FILE_REFRESHROMLIST, ID_FILE_EXIT,
|
|
|
|
|
2021-03-17 08:35:20 +00:00
|
|
|
// Language
|
2016-01-27 09:11:59 +00:00
|
|
|
ID_LANG_START, ID_LANG_END = ID_LANG_START + 100,
|
|
|
|
|
2021-03-17 08:35:20 +00:00
|
|
|
// Recent files
|
2016-01-27 09:11:59 +00:00
|
|
|
ID_RECENT_ROM_START, ID_RECENT_ROM_END = ID_RECENT_ROM_START + 20,
|
|
|
|
|
2021-03-17 08:35:20 +00:00
|
|
|
// Recent directory
|
2016-01-27 09:11:59 +00:00
|
|
|
ID_RECENT_DIR_START, ID_RECENT_DIR_END = ID_RECENT_DIR_START + 20,
|
|
|
|
|
2021-03-17 08:35:20 +00:00
|
|
|
// System menu
|
2016-01-27 09:11:59 +00:00
|
|
|
ID_SYSTEM_RESET_SOFT, ID_SYSTEM_RESET_HARD, ID_SYSTEM_PAUSE, ID_SYSTEM_BITMAP,
|
2016-05-25 02:06:10 +00:00
|
|
|
ID_SYSTEM_LIMITFPS, ID_SYSTEM_SWAPDISK, ID_SYSTEM_RESTORE, ID_SYSTEM_LOAD, ID_SYSTEM_SAVE,
|
2021-02-02 02:52:47 +00:00
|
|
|
ID_SYSTEM_SAVEAS, ID_SYSTEM_ENHANCEMENT, ID_SYSTEM_CHEAT, ID_SYSTEM_GSBUTTON,
|
2016-01-27 09:11:59 +00:00
|
|
|
|
2021-03-17 08:35:20 +00:00
|
|
|
//Current save slot
|
2016-01-27 09:11:59 +00:00
|
|
|
ID_CURRENT_SAVE_1, ID_CURRENT_SAVE_2, ID_CURRENT_SAVE_3, ID_CURRENT_SAVE_4, ID_CURRENT_SAVE_5,
|
|
|
|
ID_CURRENT_SAVE_6, ID_CURRENT_SAVE_7, ID_CURRENT_SAVE_8, ID_CURRENT_SAVE_9, ID_CURRENT_SAVE_10,
|
|
|
|
ID_CURRENT_SAVE_DEFAULT,
|
|
|
|
|
2021-03-17 08:35:20 +00:00
|
|
|
// Option menu
|
2016-01-27 09:11:59 +00:00
|
|
|
ID_OPTIONS_FULLSCREEN, ID_OPTIONS_FULLSCREEN2, ID_OPTIONS_ALWAYSONTOP, ID_OPTIONS_CONFIG_GFX,
|
|
|
|
ID_OPTIONS_CONFIG_AUDIO, ID_OPTIONS_CONFIG_CONT, ID_OPTIONS_CONFIG_RSP, ID_OPTIONS_CPU_USAGE,
|
|
|
|
ID_OPTIONS_SETTINGS, ID_OPTIONS_DISPLAY_FR, ID_OPTIONS_CHANGE_FR, ID_OPTIONS_INCREASE_SPEED,
|
|
|
|
ID_OPTIONS_DECREASE_SPEED,
|
|
|
|
|
2021-03-17 08:35:20 +00:00
|
|
|
// Debugger menu
|
2022-08-01 02:13:17 +00:00
|
|
|
ID_DEBUG_END_ON_PERM_LOOP, ID_DEBUG_STEP_ON_BREAK_OPCODE,
|
2022-08-01 01:08:12 +00:00
|
|
|
ID_DEBUG_BREAK_ON_UNHANDLED_MEM, ID_DEBUG_BREAK_ON_ADDRESS_ERROR, ID_DEBUG_SHOW_PIF_ERRORS,
|
2016-01-27 09:11:59 +00:00
|
|
|
ID_DEBUG_SHOW_DLIST_COUNT, ID_DEBUG_SHOW_RECOMP_MEM_SIZE, ID_DEBUG_SHOW_DIV_BY_ZERO,
|
2016-12-12 19:11:47 +00:00
|
|
|
ID_DEBUG_RECORD_RECOMPILER_ASM, ID_DEBUG_DISABLE_GAMEFIX, ID_DEBUG_LANGUAGE,
|
2016-01-27 09:11:59 +00:00
|
|
|
ID_DEBUGGER_LOGOPTIONS, ID_DEBUGGER_GENERATELOG, ID_DEBUGGER_DUMPMEMORY, ID_DEBUGGER_SEARCHMEMORY,
|
|
|
|
ID_DEBUGGER_TLBENTRIES, ID_DEBUGGER_BREAKPOINTS, ID_DEBUGGER_MEMORY, ID_DEBUGGER_R4300REGISTERS,
|
|
|
|
ID_DEBUGGER_INTERRUPT_SP, ID_DEBUGGER_INTERRUPT_SI, ID_DEBUGGER_INTERRUPT_AI, ID_DEBUGGER_INTERRUPT_VI,
|
2017-08-18 05:08:22 +00:00
|
|
|
ID_DEBUGGER_INTERRUPT_PI, ID_DEBUGGER_INTERRUPT_DP, ID_DEBUGGER_SCRIPTS, ID_DEBUGGER_SYMBOLS, ID_DEBUGGER_DMALOG,
|
2021-01-17 03:17:58 +00:00
|
|
|
ID_DEBUGGER_EXCBREAKPOINTS, ID_DEBUGGER_CPULOG, ID_DEBUGGER_STACKTRACE, ID_DEBUGGER_STACKVIEW,
|
2016-01-27 09:11:59 +00:00
|
|
|
|
|
|
|
// App logging
|
|
|
|
ID_DEBUGGER_APPLOG_FLUSH, ID_DEBUGGER_TRACE_MD5, ID_DEBUGGER_TRACE_SETTINGS, ID_DEBUGGER_TRACE_UNKNOWN, ID_DEBUGGER_TRACE_APPINIT,
|
|
|
|
ID_DEBUGGER_TRACE_APPCLEANUP, ID_DEBUGGER_TRACE_N64SYSTEM, ID_DEBUGGER_TRACE_PLUGINS, ID_DEBUGGER_TRACE_GFXPLUGIN,
|
|
|
|
ID_DEBUGGER_TRACE_AUDIOPLUGIN, ID_DEBUGGER_TRACE_CONTROLLERPLUGIN, ID_DEBUGGER_TRACE_RSPPLUGIN, ID_DEBUGGER_TRACE_RSP,
|
|
|
|
ID_DEBUGGER_TRACE_AUDIO, ID_DEBUGGER_TRACE_REGISTERCACHE, ID_DEBUGGER_TRACE_RECOMPILER, ID_DEBUGGER_TRACE_TLB,
|
|
|
|
ID_DEBUGGER_TRACE_PROTECTEDMEM, ID_DEBUGGER_TRACE_USERINTERFACE,
|
|
|
|
|
2021-03-17 08:35:20 +00:00
|
|
|
// Profile menu
|
2016-01-27 09:11:59 +00:00
|
|
|
ID_PROFILE_PROFILE, ID_PROFILE_RESETCOUNTER, ID_PROFILE_GENERATELOG,
|
|
|
|
|
2021-03-17 08:35:20 +00:00
|
|
|
// Help menu
|
2020-11-09 09:12:30 +00:00
|
|
|
ID_HELP_SUPPORT_PROJECT64, ID_HELP_DISCORD, ID_HELP_WEBSITE, ID_HELP_ABOUT,
|
2016-01-27 09:11:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CMainMenu :
|
|
|
|
public CBaseMenu,
|
|
|
|
private CDebugSettings
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CMainMenu(CMainGui * Window);
|
|
|
|
~CMainMenu();
|
|
|
|
|
2021-04-26 10:48:20 +00:00
|
|
|
int ProcessAccelerator(HWND hWnd, void * lpMsg);
|
|
|
|
bool ProcessMessage(HWND hWnd, DWORD wNotifyCode, DWORD wID);
|
|
|
|
void ResetMenu(void);
|
|
|
|
void ResetAccelerators(void) { m_ResetAccelerators = true; }
|
2016-01-27 09:11:59 +00:00
|
|
|
|
|
|
|
private:
|
2021-04-13 00:07:11 +00:00
|
|
|
CMainMenu();
|
|
|
|
CMainMenu(const CMainMenu&);
|
|
|
|
CMainMenu& operator=(const CMainMenu&);
|
2016-01-27 09:11:59 +00:00
|
|
|
|
2016-09-17 06:25:49 +00:00
|
|
|
void OnOpenRom(HWND hWnd);
|
2019-08-22 11:44:30 +00:00
|
|
|
void OnOpenCombo(HWND hWnd);
|
2016-09-17 06:33:05 +00:00
|
|
|
void OnRomInfo(HWND hWnd);
|
|
|
|
void OnEndEmulation(void);
|
2016-09-17 06:43:27 +00:00
|
|
|
void OnScreenShot(void);
|
|
|
|
void OnSaveAs(HWND hWnd);
|
|
|
|
void OnLodState(HWND hWnd);
|
2021-02-02 02:52:47 +00:00
|
|
|
void OnEnhancements(HWND hWnd);
|
2016-09-17 06:43:27 +00:00
|
|
|
void OnCheats(HWND hWnd);
|
2016-09-17 10:28:42 +00:00
|
|
|
void OnSettings(HWND hWnd);
|
2020-10-22 02:11:19 +00:00
|
|
|
void OnSupportProject64(HWND hWnd);
|
2016-09-17 10:28:42 +00:00
|
|
|
|
2016-01-27 09:11:59 +00:00
|
|
|
void FillOutMenu(HMENU hMenu);
|
|
|
|
std::wstring GetSaveSlotString(int Slot);
|
2016-06-04 06:58:42 +00:00
|
|
|
stdstr GetFileLastMod(const CPath & FileName);
|
2016-01-27 09:11:59 +00:00
|
|
|
void RebuildAccelerators(void);
|
2017-01-20 23:31:09 +00:00
|
|
|
std::string ChooseFileToOpen(HWND hParent);
|
2019-08-22 11:44:30 +00:00
|
|
|
std::string ChooseROMFileToOpen(HWND hParent);
|
|
|
|
std::string ChooseDiskFileToOpen(HWND hParent);
|
2016-01-27 09:11:59 +00:00
|
|
|
void SetTraceModuleSetttings(SettingID Type);
|
2021-04-26 10:48:20 +00:00
|
|
|
void ShortCutsChanged(void);
|
2016-01-27 09:11:59 +00:00
|
|
|
|
|
|
|
static void SettingsChanged(CMainMenu * _this);
|
2021-04-26 10:48:20 +00:00
|
|
|
static void stShortCutsChanged(CMainMenu * _this) { return _this->ShortCutsChanged(); }
|
2016-01-27 09:11:59 +00:00
|
|
|
|
|
|
|
typedef std::list<SettingID> SettingList;
|
2016-04-13 07:34:19 +00:00
|
|
|
typedef std::list<UISettingID> UISettingList;
|
2016-01-27 09:11:59 +00:00
|
|
|
|
2020-10-22 02:11:19 +00:00
|
|
|
CMainGui * m_Gui;
|
2016-01-27 09:11:59 +00:00
|
|
|
|
2020-10-22 02:11:19 +00:00
|
|
|
void * m_AccelTable;
|
|
|
|
bool m_ResetAccelerators;
|
|
|
|
CShortCuts m_ShortCuts;
|
|
|
|
SettingList m_ChangeSettingList;
|
2016-04-13 07:34:19 +00:00
|
|
|
UISettingList m_ChangeUISettingList;
|
2016-01-27 09:11:59 +00:00
|
|
|
CriticalSection m_CS;
|
|
|
|
};
|