From c92f97b4f6e40367855184d66c47488f4db8ee25 Mon Sep 17 00:00:00 2001 From: dborth Date: Thu, 9 Oct 2008 22:36:22 +0000 Subject: [PATCH] rename ROMSize to SNESROMSize (ROMSize name already in use!) --- source/ngc/filesel.cpp | 10 +++++----- source/ngc/filesel.h | 2 +- source/ngc/menu.cpp | 2 +- source/ngc/snes9xGX.cpp | 14 +++++++------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/source/ngc/filesel.cpp b/source/ngc/filesel.cpp index 11a3908..e5f0e23 100644 --- a/source/ngc/filesel.cpp +++ b/source/ngc/filesel.cpp @@ -45,7 +45,7 @@ int selection; char currentdir[MAXPATHLEN]; int maxfiles; extern int screenheight; -unsigned long ROMSize = 0; +unsigned long SNESROMSize = 0; int havedir = -1; extern u64 dvddir; @@ -387,21 +387,21 @@ int FileSelector (int method) { case METHOD_SD: case METHOD_USB: - ROMSize = LoadFATFile ((char *)Memory.ROM, 0); + SNESROMSize = LoadFATFile ((char *)Memory.ROM, 0); break; case METHOD_DVD: dvddir = filelist[selection].offset; dvddirlength = filelist[selection].length; - ROMSize = LoadDVDFile (Memory.ROM, 0); + SNESROMSize = LoadDVDFile (Memory.ROM, 0); break; case METHOD_SMB: - ROMSize = LoadSMBFile ((char *)Memory.ROM, 0); + SNESROMSize = LoadSMBFile ((char *)Memory.ROM, 0); break; } - if (ROMSize > 0) + if (SNESROMSize > 0) { Memory.LoadROM ("BLANK.SMC"); Memory.LoadSRAM ("BLANK"); diff --git a/source/ngc/filesel.h b/source/ngc/filesel.h index a98f418..02a22ec 100644 --- a/source/ngc/filesel.h +++ b/source/ngc/filesel.h @@ -36,7 +36,7 @@ extern int offset; extern int selection; extern char currentdir[MAXPATHLEN]; extern int maxfiles; -extern unsigned long ROMSize; +extern unsigned long SNESROMSize; void AllocSaveBuffer(); void FreeSaveBuffer(); diff --git a/source/ngc/menu.cpp b/source/ngc/menu.cpp index ab4d8e9..1b1649a 100644 --- a/source/ngc/menu.cpp +++ b/source/ngc/menu.cpp @@ -1051,7 +1051,7 @@ MainMenu (int selectedMenu) int ret; // disable game-specific menu items if a ROM isn't loaded - if (ROMSize == 0) + if (SNESROMSize == 0) menuitems[2][0] = '\0'; else sprintf (menuitems[2], "Game Menu"); diff --git a/source/ngc/snes9xGX.cpp b/source/ngc/snes9xGX.cpp index 2af1955..f2552f3 100644 --- a/source/ngc/snes9xGX.cpp +++ b/source/ngc/snes9xGX.cpp @@ -235,16 +235,16 @@ main () if (memcmp ((char *) romptr, "SNESROM0", 8) == 0) { - ROMSize = romptr[2]; + SNESROMSize = romptr[2]; - if(ROMSize > (1024*128) && ROMSize < (1024*1024*8)) + if(SNESROMSize > (1024*128) && SNESROMSize < (1024*1024*8)) { romptr = (int *) 0x81000020; - ARAMPut ((char *) romptr, (char *) AR_SNESROM, ROMSize); + ARAMPut ((char *) romptr, (char *) AR_SNESROM, SNESROMSize); } else // not a valid ROM size { - ROMSize = 0; + SNESROMSize = 0; } } #endif @@ -311,16 +311,16 @@ main () // from ARAM into main memory #ifdef HW_DOL - if(ROMSize > 0) + if(SNESROMSize > 0) { - ARAMFetchSlow( (char *)Memory.ROM, (char *)AR_SNESROM, ROMSize); + ARAMFetchSlow( (char *)Memory.ROM, (char *)AR_SNESROM, SNESROMSize); Memory.LoadROM ("BLANK.SMC"); Memory.LoadSRAM ("BLANK"); } #endif // Get the user to load a ROM - while (ROMSize <= 0) + while (SNESROMSize <= 0) { MainMenu (selectedMenu); }