aboutsummaryrefslogtreecommitdiff
path: root/source/snes9x.h
diff options
context:
space:
mode:
authoraliaspider2014-10-29 10:11:16 +0100
committeraliaspider2014-10-29 10:11:16 +0100
commit4fb67d24cdde1e085d09a699ed2f5d68c306f534 (patch)
tree92fbe54e835ca1c799f15b250241929681a26a99 /source/snes9x.h
parent9c8d36087b5b35c35c7ff9276a15d400ce45f519 (diff)
downloadsnes9x2005-4fb67d24cdde1e085d09a699ed2f5d68c306f534.tar.gz
snes9x2005-4fb67d24cdde1e085d09a699ed2f5d68c306f534.tar.bz2
snes9x2005-4fb67d24cdde1e085d09a699ed2f5d68c306f534.zip
get rid of all remaining C++ code.
Diffstat (limited to 'source/snes9x.h')
-rw-r--r--source/snes9x.h28
1 files changed, 9 insertions, 19 deletions
diff --git a/source/snes9x.h b/source/snes9x.h
index 1747389..5590349 100644
--- a/source/snes9x.h
+++ b/source/snes9x.h
@@ -95,16 +95,6 @@
#include <stdlib.h>
#include <stdint.h>
-#if defined(_MSC_VER) && !defined(SN_TARGET_PS3)
-/* Hack applied for MSVC when compiling in C89 mode
- * as it isn't C99-compliant. */
-#define bool unsigned char
-#define true 1
-#define false 0
-#else
-#include <stdbool.h>
-#endif
-
//#include "fs_api.h"
//#include "ds2_malloc.h"
@@ -219,7 +209,7 @@ enum {
#define DELAYED_NMI_FLAG2 (1 << 10)
#define IRQ_PENDING_FLAG (1 << 11)
-struct SCPUState{
+typedef struct {
uint32 Flags;
bool8 BranchSkip;
bool8 NMIActive;
@@ -248,7 +238,7 @@ struct SCPUState{
#ifdef DEBUG_MAXCOUNT
unsigned long GlobalLoopCount;
#endif
-};
+}SCPUState;
#define HBLANK_START_EVENT 0
#define HBLANK_END_EVENT 1
@@ -256,7 +246,7 @@ struct SCPUState{
#define HTIMER_AFTER_EVENT 3
#define NO_EVENT 4
-struct SSettings{
+typedef struct {
/* CPU options */
bool8 APUEnabled;
bool8 Shutdown;
@@ -384,9 +374,9 @@ struct SSettings{
#ifdef DEBUG_MAXCOUNT
unsigned int MaxCount;
#endif
-};
+}SSettings;
-struct SSNESGameFixes
+typedef struct
{
uint8 alienVSpredetorFix;
uint8 APU_OutPorts_ReturnValueFix;
@@ -394,11 +384,11 @@ struct SSNESGameFixes
uint8 SRAMInitialValue;
uint8 Uniracers;
bool8 EchoOnlyOutput;
-};
+}SSNESGameFixes;
-extern struct SSettings Settings;
-extern struct SCPUState CPU;
-extern struct SSNESGameFixes SNESGameFixes;
+extern SSettings Settings;
+extern SCPUState CPU;
+extern SSNESGameFixes SNESGameFixes;
extern char String [513];
void S9xExit ();