From 536ccbc8949333600cc3fc8f47f4d216a02e9209 Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 03:15:37 -0500 Subject: [PATCH] Update LanguageClass.cpp Fix comments, add a TODO, fix and update a ton of the UI text, add newline --- .../Multilanguage/LanguageClass.cpp | 210 +++++++++--------- 1 file changed, 99 insertions(+), 111 deletions(-) diff --git a/Source/Project64-core/Multilanguage/LanguageClass.cpp b/Source/Project64-core/Multilanguage/LanguageClass.cpp index e43268fd0..4351ac08a 100644 --- a/Source/Project64-core/Multilanguage/LanguageClass.cpp +++ b/Source/Project64-core/Multilanguage/LanguageClass.cpp @@ -11,16 +11,15 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(EMPTY_STRING, ""); - /********************************************************************************* - * Meta Information * - *********************************************************************************/ - //About DLL + // Meta information + + // About DLL DEF_STR(LANGUAGE_NAME, ""); DEF_STR(LANGUAGE_AUTHOR, ""); DEF_STR(LANGUAGE_VERSION, ""); DEF_STR(LANGUAGE_DATE, ""); - //About DLL Dialog + // About DLL dialog DEF_STR(INI_CURRENT_LANG, "Current Language"); DEF_STR(INI_AUTHOR, "Author"); DEF_STR(INI_VERSION, "Version"); @@ -30,12 +29,11 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(INI_CURRENT_CHT, "Cheat Code File (.CHT)"); DEF_STR(INI_CURRENT_RDX, "Extended ROM Info (.RDX)"); - //About INI title + // About INI title DEF_STR(INI_TITLE, "About Config Files"); - /********************************************************************************* - * Numbers * - *********************************************************************************/ + // Numbers + DEF_STR(NUMBER_0, "0"); DEF_STR(NUMBER_1, "1"); DEF_STR(NUMBER_2, "2"); @@ -47,10 +45,9 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(NUMBER_8, "8"); DEF_STR(NUMBER_9, "9"); - /********************************************************************************* - * Menu * - *********************************************************************************/ - //File Menu + // Menu + + // File menu DEF_STR(MENU_FILE, "&File"); DEF_STR(MENU_OPEN, "&Open ROM"); DEF_STR(MENU_ROM_INFO, "ROM &Info...."); @@ -63,7 +60,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(MENU_EXIT, "E&xit"); DEF_STR(MENU_OPEN_COMBO, "Open &Combo"); - //System Menu + // System menu DEF_STR(MENU_SYSTEM, "&System"); DEF_STR(MENU_RESET, "&Reset"); DEF_STR(MENU_PAUSE, "&Pause"); @@ -82,7 +79,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(MENU_SWAPDISK, "Swap &Disk"); DEF_STR(MENU_ENHANCEMENT, "Enhancement..."); - //Options Menu + // Options menu DEF_STR(MENU_OPTIONS, "&Options"); DEF_STR(MENU_FULL_SCREEN, "&Full Screen"); DEF_STR(MENU_ON_TOP, "&Always on &Top"); @@ -93,20 +90,20 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(MENU_SHOW_CPU, "Show CPU Usage"); DEF_STR(MENU_SETTINGS, "&Settings..."); - //Debugger Menu + // Debugger menu DEF_STR(MENU_DEBUGGER, "&Debugger"); - //Language Menu + // Language menu DEF_STR(MENU_LANGUAGE, "&Language"); - //Help Menu + // Help menu DEF_STR(MENU_HELP, "&Help"); DEF_STR(MENU_ABOUT_PJ64, "&About Project64"); DEF_STR(MENU_WEBSITE, "&Website"); DEF_STR(MENU_SUPPORT_PROJECT64, "&Support Project64"); DEF_STR(MENU_DISCORD, "&Discord"); - //Current Save Slot menu + // Current save slot menu DEF_STR(MENU_SLOT_DEFAULT, "Default"); DEF_STR(MENU_SLOT_1, "Slot 1"); DEF_STR(MENU_SLOT_2, "Slot 2"); @@ -120,7 +117,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(MENU_SLOT_10, "Slot 10"); DEF_STR(MENU_SLOT_SAVE, "Save slot (%s) selected"); - //Pop up Menu + // Pop-up menu DEF_STR(POPUP_PLAY, "Play Game"); DEF_STR(POPUP_INFO, "ROM Information"); DEF_STR(POPUP_SETTINGS, "Edit Game Settings"); @@ -129,7 +126,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(POPUP_PLAYDISK, "Play Game with Disk"); DEF_STR(POPUP_ENHANCEMENTS, "Choose Enhancement"); - //Alternate Name to save Slot + // Alternate name to save slot DEF_STR(SAVE_SLOT_DEFAULT, "Save Slot - Default"); DEF_STR(SAVE_SLOT_1, "Save Slot - 1"); DEF_STR(SAVE_SLOT_2, "Save Slot - 2"); @@ -142,10 +139,9 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(SAVE_SLOT_9, "Save Slot - 9"); DEF_STR(SAVE_SLOT_10, "Save Slot - 10"); - /********************************************************************************* - * ROM Browser * - *********************************************************************************/ - //ROM Browser Fields + // ROM browser + + // ROM browser fields DEF_STR(RB_FILENAME, "File Name"); DEF_STR(RB_INTERNALNAME, "Internal Name"); DEF_STR(RB_GOODNAME, "Good Name"); @@ -168,19 +164,18 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(RB_FORCE_FEEDBACK, "Force Feedback"); DEF_STR(RB_FILE_FORMAT, "File Format"); - //Select ROM + // Select ROM DEF_STR(SELECT_ROM_DIR, "Select current ROM directory"); - //Messages + // Messages (TODO: GoodN64 is no longer maintained and perhaps should be replaced with references to something else?) DEF_STR(RB_NOT_GOOD_FILE, "Bad ROM? Use GoodN64 & check that the RDB is up-to-date."); - /********************************************************************************* - * Options * - *********************************************************************************/ - //Options Title + // Options + + // Options title DEF_STR(OPTIONS_TITLE, "Settings"); - //Tabs + // Tabs DEF_STR(TAB_PLUGIN, "Plugins"); DEF_STR(TAB_DIRECTORY, "Directories"); DEF_STR(TAB_OPTIONS, "Options"); @@ -196,7 +191,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(TAB_DISKDRIVE, "64DD"); DEF_STR(TAB_DISKSETTINGS, "64DD"); - //Plugin Dialog + // Plugin dialog DEF_STR(PLUG_ABOUT, "About"); DEF_STR(PLUG_RSP, " RSP (Reality Signal Processor) plugin: "); DEF_STR(PLUG_GFX, " Video (graphics) plugin: "); @@ -206,7 +201,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(PLUG_HLE_AUDIO, "Audio HLE"); DEF_STR(PLUG_DEFAULT, "** Use System Plugin **"); - //Directory Dialog + // Directory dialog DEF_STR(DIR_PLUGIN, " Plugin directory: "); DEF_STR(DIR_ROM, " ROM directory: "); DEF_STR(DIR_AUTO_SAVE, " N64 native saves directory: "); @@ -221,7 +216,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(DIR_TEXTURE, " Texture pack directory: "); DEF_STR(DIR_SELECT_TEXTURE, "Select texture pack directory"); - //Options (general) Tab + // Options (general) tab DEF_STR(OPTION_AUTO_SLEEP, "Pause emulation when window is not active"); DEF_STR(OPTION_AUTO_FULLSCREEN, "Enter full-screen mode when loading a ROM"); DEF_STR(OPTION_BASIC_MODE, "Hide advanced settings"); @@ -239,7 +234,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(OPTION_SHOW_STATUS_BAR, "Show Status Bar"); DEF_STR(OPTION_EXIT_FULLSCREEN_ON_LOSE_FOCUS, "Exit full screen on lose focus"); - //ROM Browser Tab + // ROM browser tab DEF_STR(RB_MAX_ROMS, "Max # of ROMs remembered (0-10):"); DEF_STR(RB_ROMS, "ROMs"); DEF_STR(RB_MAX_DIRS, "Max # of ROM dirs remembered (0-10):"); @@ -255,7 +250,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(RB_DOWN, "Down"); DEF_STR(RB_REFRESH, "Automatically refresh browser"); - //Advanced Options + // Advanced options DEF_STR(ADVANCE_INFO, "Most of these changes will not take effect until a new ROM is opened or current ROM is reset."); DEF_STR(ADVANCE_DEFAULTS, "Core Defaults"); DEF_STR(ADVANCE_CPU_STYLE, "CPU core style:"); @@ -272,7 +267,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(ADVANCE_SMM_PROTECT, "Protect memory"); DEF_STR(ADVANCE_SMM_TLB, "TLB unmapping"); - //ROM Options + // ROM options DEF_STR(ROM_CPU_STYLE, "CPU core style:"); DEF_STR(ROM_VIREFRESH, "VI refresh rate:"); DEF_STR(ROM_MEM_SIZE, "Memory size:"); @@ -301,12 +296,12 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(ROM_DISK_SEEK_TIMING_TURBO, "Turbo"); DEF_STR(ROM_DISK_SEEK_TIMING_SLOW, "Slow"); - //Core Styles + // Core styles DEF_STR(CORE_INTERPTER, "Interpreter"); DEF_STR(CORE_RECOMPILER, "Recompiler"); DEF_STR(CORE_SYNC, "Synchronize cores"); - //Self Mod Methods + // Self-mod methods DEF_STR(SMCM_NONE, "None"); DEF_STR(SMCM_CACHE, "Cache"); DEF_STR(SMCM_PROECTED, "Protect memory"); @@ -315,35 +310,35 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(SMCM_CHECK_ADV, "Check memory advance"); DEF_STR(SMCM_CACHE2, "Clear code on cache"); - //Function Lookup method + // Function lookup method DEF_STR(FLM_PLOOKUP, "Physical lookup table"); DEF_STR(FLM_VLOOKUP, "Virtual lookup table"); DEF_STR(FLM_CHANGEMEM, "Change memory"); - //RDRAM Size + // RDRAM size DEF_STR(RDRAM_4MB, "4 MB"); DEF_STR(RDRAM_8MB, "8 MB"); - //Advanced Block Linking + // Advanced block linking DEF_STR(ABL_ON, "On"); DEF_STR(ABL_OFF, "Off"); - //Save Type + // Save type DEF_STR(SAVE_FIRST_USED, "Use first-used save type"); DEF_STR(SAVE_4K_EEPROM, "4-kbit EEPROM"); DEF_STR(SAVE_16K_EEPROM, "16-kbit EEPROM"); DEF_STR(SAVE_SRAM, "SRAM"); DEF_STR(SAVE_FLASHRAM, "Flash RAM"); - //Shell Integration Tab + // Shell integration tab DEF_STR(SHELL_TEXT, "File extension association:"); - //ROM Notes + // ROM notes DEF_STR(NOTE_STATUS, "ROM status:"); DEF_STR(NOTE_CORE, "Core note:"); DEF_STR(NOTE_PLUGIN, "Plugin note:"); - // Accelerator Selector + // Accelerator selector DEF_STR(ACCEL_CPUSTATE_TITLE, "CPU state:"); DEF_STR(ACCEL_MENUITEM_TITLE, "Menu item:"); DEF_STR(ACCEL_CURRENTKEYS_TITLE, "Current keys:"); @@ -358,7 +353,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(ACCEL_CPUSTATE_4, "Game playing (full-screen)"); DEF_STR(ACCEL_DETECTKEY, "Detect Key"); - // Frame Rate Option + // Frame rate option DEF_STR(STR_FR_VIS, "Vertical interrupts per second"); DEF_STR(STR_FR_DLS, "Display lists per second"); DEF_STR(STR_FR_PERCENT, "Percentage of full speed"); @@ -368,23 +363,22 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(STR_INSREASE_SPEED, "Increase Game Speed"); DEF_STR(STR_DECREASE_SPEED, "Decrease Game Speed"); - //Bottom page buttons + // Bottom page buttons DEF_STR(BOTTOM_RESET_PAGE, "Reset Page"); DEF_STR(BOTTOM_RESET_ALL, "Reset All"); DEF_STR(BOTTOM_APPLY, "Apply"); DEF_STR(BOTTOM_CLOSE, "Close"); - //Disk Save Type + // Disk save type DEF_STR(DISKSAVE_SHADOW, "Full Disk Copy"); DEF_STR(DISKSAVE_RAM, "Save Area Only"); - /********************************************************************************* - * ROM Information * - *********************************************************************************/ - //ROM Info Title + // ROM Information + + // ROM info title DEF_STR(INFO_TITLE, "ROM Information"); - //ROM Info Text + // ROM info text DEF_STR(INFO_ROM_NAME_TEXT, "ROM name:"); DEF_STR(INFO_FILE_NAME_TEXT, "File name:"); DEF_STR(INFO_LOCATION_TEXT, "Location:"); @@ -397,17 +391,16 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(INFO_CIC_CHIP_TEXT, "CIC chip:"); DEF_STR(INFO_MD5_TEXT, "MD5:"); - /********************************************************************************* - * Cheats * - *********************************************************************************/ - //Cheat List + // Cheats + + // Cheat list DEF_STR(CHEAT_TITLE, "Cheats"); DEF_STR(CHEAT_LIST_FRAME, "Cheats:"); DEF_STR(CHEAT_NOTES_FRAME, " Notes: "); DEF_STR(CHEAT_MARK_ALL, "Mark All"); DEF_STR(CHEAT_MARK_NONE, "Unmark All"); - //Add Cheat + // Add cheat DEF_STR(CHEAT_ADDCHEAT_FRAME, "Add Cheat"); DEF_STR(CHEAT_ADDCHEAT_NAME, "Name:"); DEF_STR(CHEAT_ADDCHEAT_CODE, "Code:"); @@ -416,13 +409,13 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(CHEAT_ADDCHEAT_NOTES, " Cheat Notes: "); DEF_STR(CHEAT_ADD_TO_DB, "Add to DB"); - //Code extension + // Code extension DEF_STR(CHEAT_CODE_EXT_TITLE, "Code Extensions"); DEF_STR(CHEAT_CODE_EXT_TXT, "Please choose a value to be used for:"); DEF_STR(CHEAT_OK, "OK"); DEF_STR(CHEAT_CANCEL, "Cancel"); - //Digital Value + // Digital value DEF_STR(CHEAT_QUANTITY_TITLE, "Quantity Digit"); DEF_STR(CHEAT_CHOOSE_VALUE, "Please choose a value for:"); DEF_STR(CHEAT_VALUE, "&Value"); @@ -435,60 +428,56 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(CHEAT_ADDCHEAT_OPT, "Options:"); DEF_STR(CHEAT_ADDCHEAT_OPTDES, "