aboutsummaryrefslogtreecommitdiff
path: root/source/memmap.c
diff options
context:
space:
mode:
authoraliaspider2014-10-29 06:47:46 +0100
committeraliaspider2014-10-29 06:47:46 +0100
commit761d752569b9bad6bdb755e91ca9e345cfb2788d (patch)
tree5eaa11c172c08039757d6bee1a3641e051462d3a /source/memmap.c
parenta6dc7abc9b8cc3986eda5a84141da7dc9e4e8f1a (diff)
downloadsnesemu-761d752569b9bad6bdb755e91ca9e345cfb2788d.tar.gz
snesemu-761d752569b9bad6bdb755e91ca9e345cfb2788d.tar.bz2
snesemu-761d752569b9bad6bdb755e91ca9e345cfb2788d.zip
C++ cleanups. (in progress)
Diffstat (limited to 'source/memmap.c')
-rw-r--r--source/memmap.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/memmap.c b/source/memmap.c
index c102128..2fb0dbc 100644
--- a/source/memmap.c
+++ b/source/memmap.c
@@ -125,9 +125,7 @@
#include "fxemu.h"
extern struct FxInit_s SuperFX;
#else
-START_EXTERN_C
extern uint8 *SFXPlotTable;
-END_EXTERN_C
#endif
#ifndef SET_UI_COLOR
@@ -4237,7 +4235,7 @@ static long ReadInt (FILE *f, unsigned nbytes)
#define IPS_EOF 0x00454F46l
void CMemory::CheckForIPSPatch (const char *rom_filename, bool8 header,
- int32 &rom_size)
+ int32* rom_size)
{
char dir [_MAX_DIR + 1];
char drive [_MAX_DRIVE + 1];
@@ -4297,8 +4295,8 @@ void CMemory::CheckForIPSPatch (const char *rom_filename, bool8 header,
goto err_eof;
ROM [ofs++] = (uint8) rchar;
}
- if (ofs > rom_size)
- rom_size = ofs;
+ if (ofs > *rom_size)
+ *rom_size = ofs;
}
else
{
@@ -4316,17 +4314,17 @@ void CMemory::CheckForIPSPatch (const char *rom_filename, bool8 header,
while (rlen--)
ROM [ofs++] = (uint8) rchar;
- if (ofs > rom_size)
- rom_size = ofs;
+ if (ofs > *rom_size)
+ *rom_size = ofs;
}
}
// Check if ROM image needs to be truncated
ofs = ReadInt (patch_file, 3);
- if (ofs != -1 && ofs - offset < rom_size)
+ if (ofs != -1 && ofs - offset < *rom_size)
{
// Need to truncate ROM image
- rom_size = ofs - offset;
+ *rom_size = ofs - offset;
}
fclose (patch_file);
return;