aboutsummaryrefslogtreecommitdiff
path: root/source/apu.c
diff options
context:
space:
mode:
authoraliaspider2014-10-29 06:47:46 +0100
committeraliaspider2014-10-29 06:47:46 +0100
commit761d752569b9bad6bdb755e91ca9e345cfb2788d (patch)
tree5eaa11c172c08039757d6bee1a3641e051462d3a /source/apu.c
parenta6dc7abc9b8cc3986eda5a84141da7dc9e4e8f1a (diff)
downloadsnes9x2005-761d752569b9bad6bdb755e91ca9e345cfb2788d.tar.gz
snes9x2005-761d752569b9bad6bdb755e91ca9e345cfb2788d.tar.bz2
snes9x2005-761d752569b9bad6bdb755e91ca9e345cfb2788d.zip
C++ cleanups. (in progress)
Diffstat (limited to 'source/apu.c')
-rw-r--r--source/apu.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/apu.c b/source/apu.c
index ee41096..e117bd8 100644
--- a/source/apu.c
+++ b/source/apu.c
@@ -101,7 +101,7 @@
/* For note-triggered SPC dump support */
#include "snapshot.h"
-extern "C" {const char *S9xGetFilenameInc (const char *);}
+const char *S9xGetFilenameInc (const char *);
int spc_is_dumping=0;
int spc_is_dumping_temp;
@@ -133,12 +133,12 @@ void S9xDeinitAPU ()
}
}
-EXTERN_C uint8 APUROM [64];
+uint8 APUROM [64];
void S9xResetAPU ()
{
- int i;
+ int i,j;
Settings.APUEnabled = Settings.NextAPUEnabled;
@@ -186,7 +186,7 @@ void S9xResetAPU ()
APU.TimerTarget [i] = 0;
APU.Timer [i] = 0;
}
- for (int j = 0; j < 0x80; j++)
+ for (j = 0; j < 0x80; j++)
APU.DSP [j] = 0;
IAPU.TwoCycles = IAPU.OneCycle * 2;
@@ -248,8 +248,9 @@ void S9xSetAPUDSP (uint8 byte)
case APU_NON:
if (byte != APU.DSP [APU_NON])
{
+ int c;
uint8 mask = 1;
- for (int c = 0; c < 8; c++, mask <<= 1)
+ for (c = 0; c < 8; c++, mask <<= 1)
{
int type;
@@ -297,8 +298,9 @@ void S9xSetAPUDSP (uint8 byte)
case APU_KOFF:
// if (byte)
{
+ int c;
uint8 mask = 1;
- for (int c = 0; c < 8; c++, mask <<= 1)
+ for (c = 0; c < 8; c++, mask <<= 1)
{
if ((byte & mask) != 0)
{
@@ -340,8 +342,9 @@ void S9xSetAPUDSP (uint8 byte)
}
if (byte)
{
+ int c;
uint8 mask = 1;
- for (int c = 0; c < 8; c++, mask <<= 1)
+ for (c = 0; c < 8; c++, mask <<= 1)
{
if ((byte & mask) != 0)
{