aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authortwinaphex2016-08-06 04:18:56 +0200
committertwinaphex2016-08-06 04:18:56 +0200
commit8c6630706cc7737f5c507fd41ea74ec83d4e0ca4 (patch)
tree65cf7e39bceaa92fc635f29967a8b5b57e80ec4d /source
parent111959dd794349e641ea819f99bf65fe84ee3919 (diff)
downloadsnes9x2005-8c6630706cc7737f5c507fd41ea74ec83d4e0ca4.tar.gz
snes9x2005-8c6630706cc7737f5c507fd41ea74ec83d4e0ca4.tar.bz2
snes9x2005-8c6630706cc7737f5c507fd41ea74ec83d4e0ca4.zip
Another buildfix pt. 2
Diffstat (limited to 'source')
-rw-r--r--source/memmap.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/source/memmap.c b/source/memmap.c
index e4e86d9..9ca41fc 100644
--- a/source/memmap.c
+++ b/source/memmap.c
@@ -574,6 +574,21 @@ void FreeSDD1Data()
}
#ifndef LOAD_FROM_MEMORY_TEST
+
+/* Read variable size MSB int from a file */
+static long ReadInt(FILE* f, unsigned nbytes)
+{
+ long v = 0;
+ while (nbytes--)
+ {
+ int c = fgetc(f);
+ if (c == EOF)
+ return -1;
+ v = (v << 8) | (c & 0xFF);
+ }
+ return (v);
+}
+
#define IPS_EOF 0x00454F46l
static void CheckForIPSPatch(const char* rom_filename, bool header,
@@ -4127,19 +4142,6 @@ void ApplyROMFixes()
//BNE
}
-// Read variable size MSB int from a file
-static long ReadInt(FILE* f, unsigned nbytes)
-{
- long v = 0;
- while (nbytes--)
- {
- int c = fgetc(f);
- if (c == EOF)
- return -1;
- v = (v << 8) | (c & 0xFF);
- }
- return (v);
-}
int is_bsx(unsigned char* p)