From 0a00bac258bef13de446453ad9d8e4b7976626bb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 27 Nov 2012 04:44:20 +0100 Subject: [PATCH] (GBA) Patches --- Makefile | 1 + mednafen/gba/GBA.cpp | 3 +-- mednafen/gba/GBA.h | 1 - mednafen/gba/RTC.cpp | 1 - mednafen/gba/Sound.cpp | 1 - mednafen/gba/bios.cpp | 1 - mednafen/gba/eeprom.cpp | 1 - mednafen/gba/flash.cpp | 2 -- mednafen/gba/flash.h | 4 ++-- scrc32.h | 8 ++++++++ 10 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 08bfe52a..bd5bd8ff 100644 --- a/Makefile +++ b/Makefile @@ -146,6 +146,7 @@ else ifeq ($(core), gba) NEED_BPP = 32 NEED_BLIP = 1 NEED_STEREO_SOUND = 1 + NEED_CRC32 = 1 CORE_DEFINE := -DWANT_GBA_EMU CORE_DIR := $(MEDNAFEN_DIR)/gba diff --git a/mednafen/gba/GBA.cpp b/mednafen/gba/GBA.cpp index cad6b447..dc6d2fd8 100644 --- a/mednafen/gba/GBA.cpp +++ b/mednafen/gba/GBA.cpp @@ -35,13 +35,12 @@ #include "arm.h" #include "thumb.h" -#include #include #include #include #include -#include "../../scrc32.cpp" +#include "../../scrc32.h" namespace MDFN_IEN_GBA { diff --git a/mednafen/gba/GBA.h b/mednafen/gba/GBA.h index a8ce2e44..90223f2d 100644 --- a/mednafen/gba/GBA.h +++ b/mednafen/gba/GBA.h @@ -21,7 +21,6 @@ #define VBA_GBA_H #include "../mednafen.h" -#include namespace MDFN_IEN_GBA { diff --git a/mednafen/gba/RTC.cpp b/mednafen/gba/RTC.cpp index 96414cdc..3dfa22c1 100644 --- a/mednafen/gba/RTC.cpp +++ b/mednafen/gba/RTC.cpp @@ -22,7 +22,6 @@ #include "Port.h" #include -#include namespace MDFN_IEN_GBA { diff --git a/mednafen/gba/Sound.cpp b/mednafen/gba/Sound.cpp index 40965b8f..b12e14e0 100644 --- a/mednafen/gba/Sound.cpp +++ b/mednafen/gba/Sound.cpp @@ -21,7 +21,6 @@ #include "Sound.h" #include "Port.h" -#include #include #include diff --git a/mednafen/gba/bios.cpp b/mednafen/gba/bios.cpp index d3bd293c..86d09544 100644 --- a/mednafen/gba/bios.cpp +++ b/mednafen/gba/bios.cpp @@ -22,7 +22,6 @@ #include "Globals.h" #include -#include namespace MDFN_IEN_GBA { diff --git a/mednafen/gba/eeprom.cpp b/mednafen/gba/eeprom.cpp index 8c9ed47a..6a15d089 100644 --- a/mednafen/gba/eeprom.cpp +++ b/mednafen/gba/eeprom.cpp @@ -17,7 +17,6 @@ // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "GBA.h" -#include #include "eeprom.h" namespace MDFN_IEN_GBA diff --git a/mednafen/gba/flash.cpp b/mednafen/gba/flash.cpp index f128b1f3..cc8dcc4f 100644 --- a/mednafen/gba/flash.cpp +++ b/mednafen/gba/flash.cpp @@ -21,8 +21,6 @@ #include "flash.h" #include "sram.h" -#include - namespace MDFN_IEN_GBA { diff --git a/mednafen/gba/flash.h b/mednafen/gba/flash.h index b23789e6..7406b440 100644 --- a/mednafen/gba/flash.h +++ b/mednafen/gba/flash.h @@ -27,8 +27,8 @@ bool GBA_Flash_Init(void); void GBA_Flash_Kill(void); void GBA_Flash_Reset(void); -extern void flashSaveGame(gzFile gzFile); -extern void flashReadGame(gzFile gzFile, int version); +extern void flashSaveGame(FILE *file); +extern void flashReadGame(FILE *file, int version); extern uint8 flashRead(uint32 address); extern void flashWrite(uint32 address, uint8 byte); extern uint8 *flashSaveMemory; diff --git a/scrc32.h b/scrc32.h index 2432c78b..bfa76146 100644 --- a/scrc32.h +++ b/scrc32.h @@ -1,6 +1,14 @@ #ifndef _S_CRC32_H #define _S_CRC32_H +#ifdef __cplusplus +extern "C" { +#endif + unsigned long crc32(unsigned long crc, const unsigned char *buf, unsigned int len); +#ifdef __cplusplus +} +#endif + #endif