diff --git a/README.md b/README.md index 1d64675ab..efee03834 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ We use semantic versioning for Project64. For the versions available, see the [t * **Smiff** - *Previous contributor* - Smiff * **Gent** - *Previous contributor* - Gent -See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project. +See also the list of [contributors](https://github.com/project64/project64/contributors) who participated in this project. ## License diff --git a/Source/Project64-core/3rdParty/7zip.cpp b/Source/Project64-core/3rdParty/7zip.cpp index b9b51f95e..1f7ab00b0 100644 --- a/Source/Project64-core/3rdParty/7zip.cpp +++ b/Source/Project64-core/3rdParty/7zip.cpp @@ -36,7 +36,7 @@ m_Opened(false) InFile_Open(&m_archiveStream.file, FileName); if (m_archiveStream.file.handle == INVALID_HANDLE_VALUE) { - //PrintError("can not open input file"); + //PrintError("Can not open input file"); return; } m_FileSize = GetFileSize(m_archiveStream.file.handle, NULL); @@ -58,7 +58,7 @@ m_Opened(false) } else { - //SzArEx_Open will delete the passed db if it fails + // SzArEx_Open will delete the passed database if it fails m_db = NULL; } } @@ -227,16 +227,16 @@ std::wstring C7zip::FileNameIndex(int index) std::wstring filename; if (m_db == NULL || m_db->FileNameOffsets == 0) { - /* no filename */ + // No filename return filename; } int namelen = SzArEx_GetFileNameUtf16(m_db, index, NULL); if (namelen <= 0) { - /* no filename */ + // No filename return filename; } filename.resize(namelen); SzArEx_GetFileNameUtf16(m_db, index, (UInt16 *)filename.c_str()); return filename; -} \ No newline at end of file +} diff --git a/Source/Project64-core/3rdParty/7zip.h b/Source/Project64-core/3rdParty/7zip.h index 6f64673a1..22b179d7b 100644 --- a/Source/Project64-core/3rdParty/7zip.h +++ b/Source/Project64-core/3rdParty/7zip.h @@ -55,13 +55,13 @@ private: int m_CurrentFile; bool m_Opened; - //Used for extraction - UInt32 m_blockIndex; // it can have any value before first call (if outBuffer = 0) - Byte * m_outBuffer; // it must be 0 before first call for each new archive. - size_t m_outBufferSize; // it can have any value before first call (if outBuffer = 0) + // Used for extraction + UInt32 m_blockIndex; // It can have any value before first call (if outBuffer = 0) + Byte * m_outBuffer; // It must be 0 before first call for each new archive + size_t m_outBufferSize; // It can have any value before first call (if outBuffer = 0) static void * AllocAllocImp(void *p, size_t size); - static void AllocFreeImp(void *p, void *address); /* address can be 0 */ + static void AllocFreeImp(void *p, void *address); // Address can be 0 static SRes SzFileReadImp(void *object, void *buffer, size_t *processedSize); static SRes SzFileSeekImp(void *p, Int64 *pos, ESzSeek origin); diff --git a/Source/Project64-core/Logging.cpp b/Source/Project64-core/Logging.cpp index 71dac4fd5..bb4b5b8be 100644 --- a/Source/Project64-core/Logging.cpp +++ b/Source/Project64-core/Logging.cpp @@ -271,7 +271,7 @@ void CLogging::Log_LW(uint32_t PC, uint32_t VAddr) return; } g_MMU->LW_VAddr(VAddr, Value); - LogMessage("%08X: read word from Pif Ram at 0x%X (%08X)", PC, VAddr - 0xBFC007C0, Value); + LogMessage("%08X: read word from PIF RAM at 0x%X (%08X)", PC, VAddr - 0xBFC007C0, Value); return; } if (VAddr >= 0xB0000040 && ((VAddr - 0xB0000000) < g_Rom->GetRomSize())) @@ -288,12 +288,12 @@ void CLogging::Log_LW(uint32_t PC, uint32_t VAddr) g_MMU->LW_VAddr(VAddr, Value); switch (VAddr) { - case 0xB0000004: LogMessage("%08X: read from Rom Clock Rate (%08X)", PC, Value); break; - case 0xB0000008: LogMessage("%08X: read from Rom Boot address offset (%08X)", PC, Value); break; - case 0xB000000C: LogMessage("%08X: read from Rom Release offset (%08X)", PC, Value); break; - case 0xB0000010: LogMessage("%08X: read from Rom CRC1 (%08X)", PC, Value); break; - case 0xB0000014: LogMessage("%08X: read from Rom CRC2 (%08X)", PC, Value); break; - default: LogMessage("%08X: read from Rom header 0x%X (%08X)", PC, VAddr & 0xFF, Value); break; + case 0xB0000004: LogMessage("%08X: read from ROM clock rate (%08X)", PC, Value); break; + case 0xB0000008: LogMessage("%08X: read from ROM boot address offset (%08X)", PC, Value); break; + case 0xB000000C: LogMessage("%08X: read from ROM release offset (%08X)", PC, Value); break; + case 0xB0000010: LogMessage("%08X: read from ROM CRC1 (%08X)", PC, Value); break; + case 0xB0000014: LogMessage("%08X: read from ROM CRC2 (%08X)", PC, Value); break; + default: LogMessage("%08X: read from ROM header 0x%X (%08X)", PC, VAddr & 0xFF, Value); break; } return; } @@ -524,7 +524,7 @@ void CLogging::Log_SW(uint32_t PC, uint32_t VAddr, uint32_t Value) { if (LogPRDMAOperations()) { - LogMessage("%08X: A DMA transfer from the PIF ram has occured", PC); + LogMessage("%08X: A DMA transfer from the PIF RAM has occurred", PC); } if (!LogSerialInterface()) { @@ -536,7 +536,7 @@ void CLogging::Log_SW(uint32_t PC, uint32_t VAddr, uint32_t Value) { if (LogPRDMAOperations()) { - LogMessage("%08X: A DMA transfer to the PIF ram has occured", PC); + LogMessage("%08X: A DMA transfer to the PIF RAM has occurred", PC); } if (!LogSerialInterface()) { @@ -559,7 +559,7 @@ void CLogging::Log_SW(uint32_t PC, uint32_t VAddr, uint32_t Value) { return; } - LogMessage("%08X: Writing 0x%08X to Pif Ram at 0x%X", PC, Value, VAddr - 0xBFC007C0); + LogMessage("%08X: Writing 0x%08X to PIF RAM at 0x%X", PC, Value, VAddr - 0xBFC007C0); return; } if (!LogUnknown()) @@ -615,4 +615,4 @@ void CLogging::StopLog(void) delete m_hLogFile; m_hLogFile = NULL; } -} \ No newline at end of file +} diff --git a/Source/Project64-core/Logging.h b/Source/Project64-core/Logging.h index 54236f6c7..8bf81fe1c 100644 --- a/Source/Project64-core/Logging.h +++ b/Source/Project64-core/Logging.h @@ -15,4 +15,4 @@ public: private: static CFile * m_hLogFile; -}; \ No newline at end of file +}; diff --git a/Source/Project64-core/MemoryExceptionFilter.cpp b/Source/Project64-core/MemoryExceptionFilter.cpp index 73bf39245..edb2b624e 100644 --- a/Source/Project64-core/MemoryExceptionFilter.cpp +++ b/Source/Project64-core/MemoryExceptionFilter.cpp @@ -27,7 +27,7 @@ bool CMipsMemoryVM::FilterX86Exception(uint32_t MemAddress, X86_CONTEXT & contex if ((int32_t)(MemAddress) < 0 || MemAddress > 0x1FFFFFFF) { - WriteTrace(TraceExceptionHandler, TraceError, "Invalid memory adderess: %X", MemAddress); + WriteTrace(TraceExceptionHandler, TraceError, "Invalid memory address: %X", MemAddress); if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); @@ -445,7 +445,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context { if ((int32_t)(MemAddress) < 0 || MemAddress > 0x1FFFFFFF) { - WriteTrace(TraceExceptionHandler, TraceError, "Invalid memory adderess: %X", MemAddress); + WriteTrace(TraceExceptionHandler, TraceError, "Invalid memory address: %X", MemAddress); DumpArmExceptionInfo(MemAddress, context); g_Notify->BreakPoint(__FILE__, __LINE__); return false; @@ -488,7 +488,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->imm2.opcode == 0xF84 && OpCode32->imm2.Opcode2 == 0) { - //42 f8 03 c0 str.w ip, [r2, r3] + // 42 f8 03 c0 str.w ip, [r2, r3] if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode32->imm2.rt])) { if (ShowUnhandledMemory()) @@ -502,7 +502,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->imm12.opcode == 0xF8C) { - //c9 f8 00 b0 str.w r11, [r9] + // c9 f8 00 b0 str.w r11, [r9] if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode32->imm2.rt])) { if (ShowUnhandledMemory()) @@ -516,7 +516,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->imm12.opcode == 0xF8D) { - //dc f8 70 70 ldr.w r7, [ip, #112] + // dc f8 70 70 ldr.w r7, [ip, #112] if (!g_MMU->LW_NonMemory(MemAddress, ArmRegisters[OpCode32->imm12.rt])) { if (ShowUnhandledMemory()) @@ -530,8 +530,8 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm5.opcode == 3 && OpCode32->reg_cond_imm5.opcode1 == 0 && OpCode32->reg_cond_imm5.opcode2 == 0 && OpCode32->reg_cond_imm5.opcode3 == 0) { - //17847001 strne r7, [r4, r1] - //e789300c str r3, [r9, ip] + // 17847001 strne r7, [r4, r1] + // e789300c str r3, [r9, ip] if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond_imm5.rt])) { if (ShowUnhandledMemory()) @@ -543,7 +543,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context return true; } - if (OpCode->Reg.opcode == 0x2A) //STRB + if (OpCode->Reg.opcode == 0x2A) // STRB { if (!g_MMU->SB_NonMemory(MemAddress, *ArmRegisters[OpCode->Reg.rt])) { @@ -558,7 +558,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm5.opcode == 3 && OpCode32->reg_cond_imm5.opcode1 == 1 && OpCode32->reg_cond_imm5.opcode2 == 0 && OpCode32->reg_cond_imm5.opcode3 == 0) { - //17c32001 strbne r2, [r3, r1] + // 17c32001 strbne r2, [r3, r1] if (!g_MMU->SB_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond_imm5.rt])) { if (ShowUnhandledMemory()) @@ -572,7 +572,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm8.opcode == 0 && OpCode32->reg_cond_imm8.opcode1 == 1 && OpCode32->reg_cond_imm8.opcode2 == 0 && OpCode32->reg_cond_imm8.opcode3 == 0xB) { - //11c020b0 strhne r2, [r0] + // 11c020b0 strhne r2, [r0] if (!g_MMU->SH_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond_imm8.rt])) { if (ShowUnhandledMemory()) @@ -614,7 +614,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode->Imm5.opcode == 0xC) { - //2e 60 str r6, [r5, #0] + // 2e 60 str r6, [r5, #0] if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode->Imm5.rt])) { if (ShowUnhandledMemory()) @@ -628,7 +628,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode->Imm5.opcode == 0xD) { - //3F 68 ldr r7, [r7, #0] + // 3F 68 ldr r7, [r7, #0] if (!g_MMU->LW_NonMemory(MemAddress, ArmRegisters[OpCode->Imm5.rt])) { if (ShowUnhandledMemory()) @@ -642,7 +642,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode->Imm5.opcode == 0xE) { - //b8 70 strb r0, [r7, #2] + // b8 70 strb r0, [r7, #2] if (!g_MMU->SB_NonMemory(MemAddress, *ArmRegisters[OpCode->Imm5.rt])) { if (ShowUnhandledMemory()) @@ -656,7 +656,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond.opcode == 0 && OpCode32->reg_cond.opcode1 == 0 && OpCode32->reg_cond.opcode2 == 0 && OpCode32->reg_cond.opcode3 == 0xB) { - //118320b1 strhne r2, [r3, r1] + // 118320b1 strhne r2, [r3, r1] if (!g_MMU->SH_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond.rt])) { if (ShowUnhandledMemory()) @@ -670,7 +670,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm12.opcode == 2 && OpCode32->reg_cond_imm12.opcode1 == 0 && OpCode32->reg_cond_imm12.opcode2 == 0) { - //e48a1004 str r1, [sl], #4 + // e48a1004 str r1, [sl], #4 if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond_imm12.rt])) { if (ShowUnhandledMemory()) @@ -684,7 +684,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->uint16.opcode == ArmLDRH_W) { - //f833 c001 ldrh.w ip, [r3, r1] + // f833 c001 ldrh.w ip, [r3, r1] if (!g_MMU->LH_NonMemory(MemAddress, ArmRegisters[OpCode32->uint16.rt], false)) { if (ShowUnhandledMemory()) @@ -698,7 +698,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->uint32.opcode == ArmLDRH_Reg && OpCode32->uint32.opcode2 == 0xB) { - //e19a20b2 ldrh r2, [sl, r2] + // e19a20b2 ldrh r2, [sl, r2] if (!g_MMU->LH_NonMemory(MemAddress, ArmRegisters[OpCode32->uint32.rt], false)) { if (ShowUnhandledMemory()) @@ -712,8 +712,8 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond.opcode == 0 && OpCode32->reg_cond.opcode1 == 0 && OpCode32->reg_cond.opcode2 == 1 && OpCode32->reg_cond.opcode3 == 0xB) { - //119330b1 ldrhne r3, [r3, r1] - //11d000b0 ldrhne r0, [r0] + // 119330b1 ldrhne r3, [r3, r1] + // 11d000b0 ldrhne r0, [r0] if (!g_MMU->LH_NonMemory(MemAddress, ArmRegisters[OpCode32->reg_cond.rt], false)) { if (ShowUnhandledMemory()) @@ -727,7 +727,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm5.opcode == 3 && OpCode32->reg_cond_imm5.opcode1 == 0 && OpCode32->reg_cond_imm5.opcode2 == 1 && OpCode32->reg_cond_imm5.opcode3 == 0) { - //1790a001 ldrne sl, [r0, r1] + // 1790a001 ldrne sl, [r0, r1] if (!g_MMU->LW_NonMemory(MemAddress, ArmRegisters[OpCode32->reg_cond_imm5.rt])) { if (ShowUnhandledMemory()) @@ -741,7 +741,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->imm2.opcode == 0xF85 && OpCode32->imm2.Opcode2 == 0) { - //52 f8 21 30 ldr.w r3, [r2, r1, lsl #2] + // 52 f8 21 30 ldr.w r3, [r2, r1, lsl #2] if (!g_MMU->LW_NonMemory(MemAddress, ArmRegisters[OpCode32->imm2.rt])) { if (ShowUnhandledMemory()) @@ -771,7 +771,7 @@ void CMipsMemoryVM::segv_handler(int signal, siginfo_t *siginfo, void *sigcontex { ucontext_t *ucontext = (ucontext_t*)sigcontext; - WriteTrace(TraceExceptionHandler, TraceNotice, "Segmentation Fault!"); + WriteTrace(TraceExceptionHandler, TraceNotice, "Segmentation fault!"); WriteTrace(TraceExceptionHandler, TraceNotice, "info.si_signo = %d", signal); WriteTrace(TraceExceptionHandler, TraceNotice, "info.si_errno = %d", siginfo->si_errno); WriteTrace(TraceExceptionHandler, TraceNotice, "info.si_code = %d", siginfo->si_code); @@ -818,8 +818,8 @@ void CMipsMemoryVM::segv_handler(int signal, siginfo_t *siginfo, void *sigcontex return; } #endif - WriteTrace(TraceExceptionHandler, TraceError, "Failed quiting now"); - exit(0); //can't return to main, it's where the segfault occured. + WriteTrace(TraceExceptionHandler, TraceError, "Failed! Quitting now..."); + exit(0); // Can't return to main, this is where the segmentation fault occurred } #else @@ -834,7 +834,7 @@ int32_t CMipsMemoryVM::MemoryFilter(uint32_t dwExptCode, void * lpExceptionPoint } } - //convert the pointer since we are not having win32 structures in headers + // Convert the pointer since we are not having win32 structures in headers LPEXCEPTION_POINTERS lpEP = (LPEXCEPTION_POINTERS)lpExceptionPointer; uint32_t MemAddress = (char *)lpEP->ExceptionRecord->ExceptionInformation[1] - (char *)g_MMU->Rdram(); @@ -859,4 +859,4 @@ int32_t CMipsMemoryVM::MemoryFilter(uint32_t dwExptCode, void * lpExceptionPoint return EXCEPTION_EXECUTE_HANDLER; #endif } -#endif \ No newline at end of file +#endif diff --git a/Source/Project64-core/Multilanguage.h b/Source/Project64-core/Multilanguage.h index 21c90a06c..50d9571c7 100644 --- a/Source/Project64-core/Multilanguage.h +++ b/Source/Project64-core/Multilanguage.h @@ -4,16 +4,15 @@ enum LanguageStringID { EMPTY_STRING = 0, - /********************************************************************************* - * Meta Information * - *********************************************************************************/ - //About DLL + // Meta Information + + // About DLL LANGUAGE_NAME = 1, LANGUAGE_AUTHOR = 2, LANGUAGE_VERSION = 3, LANGUAGE_DATE = 4, - //About DLL Dialog + // About DLL dialog INI_CURRENT_LANG = 5, INI_AUTHOR = 6, INI_VERSION = 7, @@ -23,12 +22,11 @@ enum LanguageStringID INI_CURRENT_CHT = 11, INI_CURRENT_RDX = 12, - //About INI title + // About INI title INI_TITLE = 20, - /********************************************************************************* - * Numbers * - *********************************************************************************/ + // Numbers + NUMBER_0 = 50, NUMBER_1 = 51, NUMBER_2 = 52, @@ -40,10 +38,9 @@ enum LanguageStringID NUMBER_8 = 58, NUMBER_9 = 59, - /********************************************************************************* - * Menu * - *********************************************************************************/ - //File Menu + // Menu + + // File menu MENU_FILE = 100, MENU_OPEN = 101, MENU_ROM_INFO = 102, @@ -56,7 +53,7 @@ enum LanguageStringID MENU_EXIT = 109, MENU_OPEN_COMBO = 110, - //System Menu + // System menu MENU_SYSTEM = 120, MENU_RESET = 121, MENU_PAUSE = 122, @@ -75,7 +72,7 @@ enum LanguageStringID MENU_SWAPDISK = 135, MENU_ENHANCEMENT = 136, - //Options Menu + // Options menu MENU_OPTIONS = 140, MENU_FULL_SCREEN = 141, MENU_ON_TOP = 142, @@ -86,20 +83,20 @@ enum LanguageStringID MENU_SHOW_CPU = 147, MENU_SETTINGS = 148, - //Debugger Menu + // Debugger menu MENU_DEBUGGER = 160, - //Language Menu + // Language menu MENU_LANGUAGE = 175, - //Help Menu + // Help menu MENU_HELP = 180, MENU_ABOUT_PJ64 = 182, MENU_WEBSITE = 184, MENU_SUPPORT_PROJECT64 = 185, MENU_DISCORD = 186, - //Current Save Slot menu + // Current save slot menu MENU_SLOT_DEFAULT = 190, MENU_SLOT_1 = 191, MENU_SLOT_2 = 192, @@ -113,7 +110,7 @@ enum LanguageStringID MENU_SLOT_10 = 200, MENU_SLOT_SAVE = 201, - //Pop up Menu + // Pop up menu POPUP_PLAY = 210, POPUP_INFO = 211, POPUP_SETTINGS = 212, @@ -122,7 +119,7 @@ enum LanguageStringID POPUP_PLAYDISK = 215, POPUP_ENHANCEMENTS = 216, - //selecting save slot + // Selecting save slot SAVE_SLOT_DEFAULT = 220, SAVE_SLOT_1 = 221, SAVE_SLOT_2 = 222, @@ -135,7 +132,7 @@ enum LanguageStringID SAVE_SLOT_9 = 229, SAVE_SLOT_10 = 230, - // Menu Descriptions (TODO: unused ? implement or remove) + // Menu descriptions (TODO: Unused? Implement or remove) MENUDES_OPEN = 250, MENUDES_ROM_INFO = 251, MENUDES_START = 252, @@ -174,10 +171,10 @@ enum LanguageStringID MENUDES_GAME_SETTINGS = 285, MENUDES_GAME_CHEATS = 286, - /********************************************************************************* - * Rom Browser * - *********************************************************************************/ - //Rom Browser Fields + + // ROM browser + + // ROM browser fields RB_FILENAME = 300, RB_INTERNALNAME = 301, RB_GOODNAME = 302, @@ -201,19 +198,18 @@ enum LanguageStringID RB_NAME = 321, - //Select Rom + // Select ROM SELECT_ROM_DIR = 320, - //Messages + // Messages RB_NOT_GOOD_FILE = 340, - /********************************************************************************* - * Options * - *********************************************************************************/ - //Options Title + // Options + + // Options title OPTIONS_TITLE = 400, - //Tabs + // Tabs TAB_PLUGIN = 401, TAB_DIRECTORY = 402, TAB_OPTIONS = 403, @@ -229,7 +225,7 @@ enum LanguageStringID TAB_DISKDRIVE = 413, TAB_DISKSETTINGS = 414, - //Plugin Dialog + // Plugin dialog PLUG_ABOUT = 420, PLUG_RSP = 421, PLUG_GFX = 422, @@ -239,7 +235,7 @@ enum LanguageStringID PLUG_HLE_AUDIO = 426, PLUG_DEFAULT = 427, - //Directory Dialog + // Directory dialog DIR_PLUGIN = 440, DIR_ROM = 441, DIR_AUTO_SAVE = 442, @@ -254,7 +250,7 @@ enum LanguageStringID DIR_TEXTURE = 451, DIR_SELECT_TEXTURE = 452, - //Options (general) Tab + // Options (general) tab OPTION_AUTO_SLEEP = 460, OPTION_AUTO_FULLSCREEN = 461, OPTION_BASIC_MODE = 462, @@ -273,7 +269,7 @@ enum LanguageStringID OPTION_SHOW_STATUS_BAR = 474, OPTION_EXIT_FULLSCREEN_ON_LOSE_FOCUS = 475, - //Rom Browser Tab + // ROM browser tab RB_MAX_ROMS = 480, RB_ROMS = 481, RB_MAX_DIRS = 482, @@ -289,7 +285,7 @@ enum LanguageStringID RB_REFRESH = 492, RB_FILEEXT = 493, - //Advanced Options + // Advanced options ADVANCE_INFO = 500, ADVANCE_DEFAULTS = 501, ADVANCE_CPU_STYLE = 502, @@ -306,7 +302,7 @@ enum LanguageStringID ADVANCE_SMM_PROTECT = 513, ADVANCE_SMM_TLB = 514, - //Rom Options + // ROM options ROM_CPU_STYLE = 520, ROM_VIREFRESH = 521, ROM_MEM_SIZE = 522, @@ -335,12 +331,12 @@ enum LanguageStringID ROM_DISK_SEEK_TIMING_TURBO = 5441, ROM_DISK_SEEK_TIMING_SLOW = 5442, - //Core Styles + // Core styles CORE_INTERPTER = 540, CORE_RECOMPILER = 541, CORE_SYNC = 542, - //Self Mod Methods + // Self-mod methods SMCM_NONE = 560, SMCM_CACHE = 561, SMCM_PROECTED = 562, @@ -349,35 +345,35 @@ enum LanguageStringID SMCM_CHECK_ADV = 565, SMCM_CACHE2 = 566, - //Function Lookup memthod + // Function lookup method FLM_PLOOKUP = 570, FLM_VLOOKUP = 571, FLM_CHANGEMEM = 572, - //RDRAM Size + // RDRAM size RDRAM_4MB = 580, RDRAM_8MB = 581, - //Advanced Block Linking + // Advanced block linking ABL_ON = 600, ABL_OFF = 601, - //Save Type + // Save type SAVE_FIRST_USED = 620, SAVE_4K_EEPROM = 621, SAVE_16K_EEPROM = 622, SAVE_SRAM = 623, SAVE_FLASHRAM = 624, - //Shell Integration Tab + // Shell integration tab SHELL_TEXT = 640, - //Rom Notes + // ROM notes NOTE_STATUS = 660, NOTE_CORE = 661, NOTE_PLUGIN = 662, - // Accelerator Selector + // Accelerator selector ACCEL_CPUSTATE_TITLE = 680, ACCEL_MENUITEM_TITLE = 681, ACCEL_CURRENTKEYS_TITLE = 682, @@ -392,7 +388,7 @@ enum LanguageStringID ACCEL_CPUSTATE_4 = 691, ACCEL_DETECTKEY = 692, - // Frame Rate Option + // Frame rate option STR_FR_VIS = 700, STR_FR_DLS = 701, STR_FR_PERCENT = 702, @@ -403,23 +399,22 @@ enum LanguageStringID STR_INSREASE_SPEED = 710, STR_DECREASE_SPEED = 711, - //Bottom page buttons + // Bottom page buttons BOTTOM_RESET_PAGE = 720, BOTTOM_RESET_ALL = 721, BOTTOM_APPLY = 722, BOTTOM_CLOSE = 723, - //Disk Save Type + // Disk save type DISKSAVE_SHADOW = 730, DISKSAVE_RAM = 731, - /********************************************************************************* - * ROM Information * - *********************************************************************************/ - //Rom Info Title Title + // ROM information + + // ROM info title INFO_TITLE = 800, - //Rom Info Text + // ROM info text INFO_ROM_NAME_TEXT = 801, INFO_FILE_NAME_TEXT = 802, INFO_LOCATION_TEXT = 803, @@ -432,17 +427,16 @@ enum LanguageStringID INFO_CIC_CHIP_TEXT = 810, INFO_MD5_TEXT = 811, - /********************************************************************************* - * Cheats * - *********************************************************************************/ - //Cheat List + // Cheats + + // Cheat list CHEAT_TITLE = 1000, CHEAT_LIST_FRAME = 1001, CHEAT_NOTES_FRAME = 1002, CHEAT_MARK_ALL = 1003, CHEAT_MARK_NONE = 1004, - //Add Cheat + // Add cheat CHEAT_ADDCHEAT_FRAME = 1005, CHEAT_ADDCHEAT_NAME = 1006, CHEAT_ADDCHEAT_CODE = 1007, @@ -451,13 +445,13 @@ enum LanguageStringID CHEAT_ADDCHEAT_NOTES = 1010, CHEAT_ADD_TO_DB = 1011, - //Code extension + // Code extension CHEAT_CODE_EXT_TITLE = 1012, CHEAT_CODE_EXT_TXT = 1013, CHEAT_OK = 1014, CHEAT_CANCEL = 1015, - //Digital Value + // Digital value CHEAT_QUANTITY_TITLE = 1016, CHEAT_CHOOSE_VALUE = 1017, CHEAT_VALUE = 1018, @@ -470,18 +464,18 @@ enum LanguageStringID CHEAT_ADDCHEAT_OPT = 1025, CHEAT_ADDCHEAT_OPTDES = 1026, - //Edit Cheat + // Edit cheat CHEAT_EDITCHEAT_WINDOW = 1027, CHEAT_EDITCHEAT_UPDATE = 1028, CHEAT_CHANGED_MSG = 1029, CHEAT_CHANGED_TITLE = 1030, - //Cheat Popup Menu + // Cheat popup menu CHEAT_ADDNEW = 1040, CHEAT_EDIT = 1041, CHEAT_DELETE = 1042, - // short cut editor + // Short cut editor STR_SHORTCUT_RESET_TITLE = 1100, STR_SHORTCUT_RESET_TEXT = 1101, STR_SHORTCUT_FILEMENU = 1102, @@ -489,9 +483,8 @@ enum LanguageStringID STR_SHORTCUT_OPTIONS = 1104, STR_SHORTCUT_SAVESLOT = 1105, - /********************************************************************************* - * Support Window * - *********************************************************************************/ + // Support window + MSG_SUPPORT_TITLE = 1200, MSG_SUPPORT_INFO = 1201, MSG_SUPPORT_ENTER_CODE = 1202, @@ -508,14 +501,12 @@ enum LanguageStringID MSG_SUPPORT_REQUESTCODE_SUCCESS = 1213, MSG_SUPPORT_REQUESTCODE_FAIL = 1214, - /********************************************************************************* - * Enhancements * - *********************************************************************************/ + // Enhancements + ENHANCEMENT_TITLE = 1300, - /********************************************************************************* - * Messages * - *********************************************************************************/ + // Messages + MSG_CPU_PAUSED = 2000, MSG_CPU_RESUMED = 2001, MSG_PERM_LOOP = 2002, @@ -582,9 +573,8 @@ enum LanguageStringID MSG_CHEAT_INVALID_MSG = 2063, MSG_CHEAT_INVALID_TITLE = 2064, - /********************************************************************************* - * Android * - *********************************************************************************/ + // Android + ANDROID_SETTINGS = 3000, ANDROID_FORUM = 3001, ANDROID_REPORT_BUG = 3002, @@ -610,7 +600,7 @@ enum LanguageStringID ANDROID_SUPPORT_PJ64 = 3022, ANDROID_REVIEW_PJ64 = 3023, - //In game menu + // In-game menu ANDROID_MENU_SETTINGS = 3100, ANDROID_MENU_SAVESTATE = 3101, ANDROID_MENU_LOADSTATE = 3102, @@ -626,7 +616,7 @@ enum LanguageStringID ANDROID_MENU_RESETFUNCTIONTIMES = 3112, ANDROID_MENU_DUMPFUNCTIONTIMES = 3113, - //Video plugin + // Video plugin ANDROID_VIDEO_NATIVE_RES = 3200, }; 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, "