From 0e59b999fa976de2d00490f552a1ff0a27d40f63 Mon Sep 17 00:00:00 2001 From: João Silva Date: Sun, 29 Jan 2017 04:55:23 +0000 Subject: Converted most types to stdint-style (fixing a few in the process). --- source/apu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/apu.c') diff --git a/source/apu.c b/source/apu.c index 1ac4c06..a28469d 100644 --- a/source/apu.c +++ b/source/apu.c @@ -27,7 +27,7 @@ void S9xDeinitAPU() { if (IAPU.RAM) { - free((char*) IAPU.RAM); + free(IAPU.RAM); IAPU.RAM = NULL; } } @@ -36,7 +36,7 @@ uint8_t APUROM [64]; void S9xResetAPU() { - int i, j; + int32_t i, j; Settings.APUEnabled = true; @@ -104,7 +104,7 @@ void S9xSetAPUDSP(uint8_t byte) uint8_t reg = IAPU.RAM [0xf2]; static uint8_t KeyOn; static uint8_t KeyOnPrev; - int i; + int32_t i; switch (reg) { @@ -133,11 +133,11 @@ void S9xSetAPUDSP(uint8_t byte) case APU_NON: if (byte != APU.DSP [APU_NON]) { - int c; + int32_t c; uint8_t mask = 1; for (c = 0; c < 8; c++, mask <<= 1) { - int type; + int32_t type; if (byte & mask) type = SOUND_NOISE; @@ -169,7 +169,7 @@ void S9xSetAPUDSP(uint8_t byte) break; case APU_KOFF: { - int c; + int32_t c; uint8_t mask = 1; for (c = 0; c < 8; c++, mask <<= 1) { @@ -199,7 +199,7 @@ void S9xSetAPUDSP(uint8_t byte) case APU_KON: if (byte) { - int c; + int32_t c; uint8_t mask = 1; for (c = 0; c < 8; c++, mask <<= 1) { @@ -327,7 +327,7 @@ void S9xSetAPUDSP(uint8_t byte) APU.DSP [reg] = byte; } -void S9xFixEnvelope(int channel, uint8_t gain, uint8_t adsr1, uint8_t adsr2) +void S9xFixEnvelope(int32_t channel, uint8_t gain, uint8_t adsr1, uint8_t adsr2) { if (adsr1 & 0x80) // ADSR mode { -- cgit v1.2.3