diff options
author | twinaphex | 2016-08-08 03:51:26 +0200 |
---|---|---|
committer | twinaphex | 2016-08-08 03:51:26 +0200 |
commit | 53311c57c4eb1ef7f91dfe87f62323c81d610f7e (patch) | |
tree | 3c9833e2d0f3a84ea6fdf594d804bbc7b448496a /source | |
parent | c2e0540fecb7ce6ac11362cc77cf12aa60656516 (diff) | |
download | snes9x2005-53311c57c4eb1ef7f91dfe87f62323c81d610f7e.tar.gz snes9x2005-53311c57c4eb1ef7f91dfe87f62323c81d610f7e.tar.bz2 snes9x2005-53311c57c4eb1ef7f91dfe87f62323c81d610f7e.zip |
Cleanups
Diffstat (limited to 'source')
-rw-r--r-- | source/apu.h | 4 | ||||
-rw-r--r-- | source/cpuexec.h | 10 | ||||
-rw-r--r-- | source/gfx.c | 2 | ||||
-rw-r--r-- | source/port.h | 9 | ||||
-rw-r--r-- | source/sa1.h | 6 | ||||
-rw-r--r-- | source/soundux.c | 2 |
6 files changed, 13 insertions, 20 deletions
diff --git a/source/apu.h b/source/apu.h index 023c1fe..5ea6bb2 100644 --- a/source/apu.h +++ b/source/apu.h @@ -134,14 +134,14 @@ typedef struct SAPU APU; SIAPU IAPU; -STATIC inline void S9xAPUUnpackStatus() +static inline void S9xAPUUnpackStatus(void) { IAPU._Zero = ((IAPU.Registers.P & Zero) == 0) | (IAPU.Registers.P & Negative); IAPU._Carry = (IAPU.Registers.P & Carry); IAPU._Overflow = (IAPU.Registers.P & Overflow) >> 6; } -STATIC inline void S9xAPUPackStatus() +static inline void S9xAPUPackStatus(void) { IAPU.Registers.P &= ~(Zero | Negative | Carry | Overflow); IAPU.Registers.P |= IAPU._Carry | ((IAPU._Zero == 0) << 1) | diff --git a/source/cpuexec.h b/source/cpuexec.h index 531531d..87428f9 100644 --- a/source/cpuexec.h +++ b/source/cpuexec.h @@ -145,7 +145,7 @@ extern SOpcodes S9xOpcodesM0X0 [256]; extern SICPU ICPU; -STATIC inline void S9xUnpackStatus() +static inline void S9xUnpackStatus() { ICPU._Zero = (ICPU.Registers.PL & Zero) == 0; ICPU._Negative = (ICPU.Registers.PL & Negative); @@ -153,21 +153,21 @@ STATIC inline void S9xUnpackStatus() ICPU._Overflow = (ICPU.Registers.PL & Overflow) >> 6; } -STATIC inline void S9xPackStatus() +static inline void S9xPackStatus() { 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() { if (CheckEmulation()) ICPU.S9xOpcodes = S9xOpcodesE1; @@ -187,7 +187,7 @@ STATIC inline void S9xFixCycles() } } -STATIC inline void S9xReschedule() +static inline void S9xReschedule() { uint8_t which; long max; diff --git a/source/gfx.c b/source/gfx.c index 2bdedfa..add2621 100644 --- a/source/gfx.c +++ b/source/gfx.c @@ -3114,7 +3114,7 @@ static void DrawBGMode7Background16Sub1_2(uint8_t* Screen, int bg) } \ } -STATIC uint32_t Q_INTERPOLATE(uint32_t A, uint32_t B, uint32_t C, uint32_t D) +static uint32_t Q_INTERPOLATE(uint32_t A, uint32_t B, uint32_t C, uint32_t D) { register uint32_t x = ((A >> 2) & HIGH_BITS_SHIFTED_TWO_MASK) + ((B >> 2) & HIGH_BITS_SHIFTED_TWO_MASK) + diff --git a/source/port.h b/source/port.h index cf03cee..9884091 100644 --- a/source/port.h +++ b/source/port.h @@ -157,7 +157,7 @@ void _splitpath(const char* path, char* drive, char* dir, char* fname, #define strncasecmp strnicmp #endif -void S9xGenerateSound(); +void S9xGenerateSound(void); #ifdef __DJGPP #define SLASH_STR "/" @@ -167,11 +167,6 @@ void S9xGenerateSound(); #define SLASH_CHAR '/' #endif -/* If including signal.h, do it before snes9.h and port.h to avoid clashes. */ -#ifndef SIG_PF -#define SIG_PF void(*)(int) -#endif - #if defined(__i386__) || defined(__i486__) || defined(__i586__) || \ defined(__WIN32__) || defined(__alpha__) #define FAST_LSB_WORD_ACCESS @@ -184,8 +179,6 @@ void S9xGenerateSound(); //#define FAST_LSB_WORD_ACCESS #endif -#define STATIC static - #include <libretro.h> #endif diff --git a/source/sa1.h b/source/sa1.h index 92345df..5f3bad1 100644 --- a/source/sa1.h +++ b/source/sa1.h @@ -185,7 +185,7 @@ void S9xSA1ExecuteDuringSleep(); #define TIMER_IRQ_SOURCE (1 << 6) #define DMA_IRQ_SOURCE (1 << 5) -STATIC inline void S9xSA1UnpackStatus() +static inline void S9xSA1UnpackStatus(void) { SA1._Zero = (SA1.Registers.PL & Zero) == 0; SA1._Negative = (SA1.Registers.PL & Negative); @@ -193,14 +193,14 @@ STATIC inline void S9xSA1UnpackStatus() SA1._Overflow = (SA1.Registers.PL & Overflow) >> 6; } -STATIC inline void S9xSA1PackStatus() +static inline void S9xSA1PackStatus(void) { SA1.Registers.PL &= ~(Zero | Negative | Carry | Overflow); SA1.Registers.PL |= SA1._Carry | ((SA1._Zero == 0) << 1) | (SA1._Negative & 0x80) | (SA1._Overflow << 6); } -STATIC inline void S9xSA1FixCycles() +static inline void S9xSA1FixCycles(void) { if (SA1CheckEmulation()) SA1.S9xOpcodes = S9xSA1OpcodesM1X1; diff --git a/source/soundux.c b/source/soundux.c index 131f7d2..c10abf5 100644 --- a/source/soundux.c +++ b/source/soundux.c @@ -181,7 +181,7 @@ void S9xSetEightBitConsoleSound(bool Enabled) } } -STATIC inline uint8_t* S9xGetSampleAddress(int sample_number) +static inline uint8_t* S9xGetSampleAddress(int sample_number) { uint32_t addr = (((APU.DSP[APU_DIR] << 8) + (sample_number << 2)) & 0xffff); return (IAPU.RAM + addr); |