From b9c74ceb1352c8f433cf6bf2c446ae07457c5267 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 11 Aug 2017 17:43:00 +0200 Subject: Start making this suitable for MSVC and C89 --- source/cpuexec.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'source/cpuexec.h') diff --git a/source/cpuexec.h b/source/cpuexec.h index 7d4008c..9654d86 100644 --- a/source/cpuexec.h +++ b/source/cpuexec.h @@ -6,15 +6,16 @@ typedef struct { #ifdef __WIN32__ - void (__cdecl* S9xOpcode)(); + void (__cdecl* S9xOpcode)(void); #else - void (*S9xOpcode)(); + void (*S9xOpcode)(void); #endif } SOpcodes; #include "ppu.h" #include "memmap.h" #include "65c816.h" +#include #define DO_HBLANK_CHECK_SFX() \ if (CPU.Cycles >= CPU.NextEvent) \ @@ -57,7 +58,7 @@ extern SOpcodes S9xOpcodesM0X0 [256]; extern SICPU ICPU; -static inline void S9xUnpackStatus() +static INLINE void S9xUnpackStatus(void) { ICPU._Zero = (ICPU.Registers.PL & Zero) == 0; ICPU._Negative = (ICPU.Registers.PL & Negative); @@ -65,20 +66,20 @@ static inline void S9xUnpackStatus() ICPU._Overflow = (ICPU.Registers.PL & Overflow) >> 6; } -static inline void S9xPackStatus() +static INLINE void S9xPackStatus(void) { ICPU.Registers.PL &= ~(Zero | Negative | Carry | Overflow); ICPU.Registers.PL |= ICPU._Carry | ((ICPU._Zero == 0) << 1) | (ICPU._Negative & 0x80) | (ICPU._Overflow << 6); } -static inline void CLEAR_IRQ_SOURCE(uint32_t M) +static INLINE void CLEAR_IRQ_SOURCE(uint32_t M) { CPU.IRQActive &= ~M; if (!CPU.IRQActive) CPU.Flags &= ~IRQ_PENDING_FLAG; } -static inline void S9xFixCycles() +static INLINE void S9xFixCycles(void) { if (CheckEmulation()) ICPU.S9xOpcodes = S9xOpcodesE1; @@ -98,7 +99,7 @@ static inline void S9xFixCycles() } } -static inline void S9xReschedule() +static INLINE void S9xReschedule(void) { uint8_t which; int32_t max; -- cgit v1.2.3