| ... | ... |
@@ -1,8 +1,7 @@ |
| 1 | 1 |
// SNES SPC-700 APU emulator |
| 2 | 2 |
|
| 3 | 3 |
// snes_spc 0.9.0 |
| 4 |
-#ifndef SNES_SPC_H |
|
| 5 |
-#define SNES_SPC_H |
|
| 4 |
+#pragma once |
|
| 6 | 5 |
|
| 7 | 6 |
#include "SPC_DSP.h" |
| 8 | 7 |
#include "blargg_endian.h" |
| ... | ... |
@@ -235,5 +234,3 @@ inline void SNES_SPC::mute_voices(int mask) { this->dsp.mute_voices(mask); }
|
| 235 | 234 |
inline void SNES_SPC::disable_surround(bool disable) { this->dsp.disable_surround(disable); }
|
| 236 | 235 |
|
| 237 | 236 |
inline void SNES_SPC::spc_allow_time_overflow(bool allow) { this->allow_time_overflow = allow; }
|
| 238 |
- |
|
| 239 |
-#endif |
| ... | ... |
@@ -11,6 +11,8 @@ details. You should have received a copy of the GNU Lesser General Public |
| 11 | 11 |
License along with this module; if not, write to the Free Software Foundation, |
| 12 | 12 |
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ |
| 13 | 13 |
|
| 14 |
+#pragma once |
|
| 15 |
+ |
|
| 14 | 16 |
//// Memory access |
| 15 | 17 |
|
| 16 | 18 |
// TODO: remove non-wrapping versions? |
| ... | ... |
@@ -1,8 +1,7 @@ |
| 1 | 1 |
// Highly accurate SNES SPC-700 DSP emulator |
| 2 | 2 |
|
| 3 | 3 |
// snes_spc 0.9.0 |
| 4 |
-#ifndef SPC_DSP_H |
|
| 5 |
-#define SPC_DSP_H |
|
| 4 |
+#pragma once |
|
| 6 | 5 |
|
| 7 | 6 |
#include "blargg_common.h" |
| 8 | 7 |
|
| ... | ... |
@@ -284,5 +283,3 @@ inline void SPC_DSP::write(int addr, int data) |
| 284 | 283 |
} |
| 285 | 284 |
|
| 286 | 285 |
inline void SPC_DSP::mute_voices(int mask) { this->m.mute_mask = mask; }
|
| 287 |
- |
|
| 288 |
-#endif |
| ... | ... |
@@ -175,8 +175,7 @@ |
| 175 | 175 |
Nintendo Co., Limited and its subsidiary companies. |
| 176 | 176 |
***********************************************************************************/ |
| 177 | 177 |
|
| 178 |
-#ifndef _APU_H_ |
|
| 179 |
-#define _APU_H_ |
|
| 178 |
+#pragma once |
|
| 180 | 179 |
|
| 181 | 180 |
#include "../snes9x.h" |
| 182 | 181 |
#include "SNES_SPC.h" |
| ... | ... |
@@ -199,5 +198,3 @@ int S9xGetSampleCount(); |
| 199 | 198 |
void S9xSetSoundControl(uint8_t); |
| 200 | 199 |
void S9xSetSoundMute(bool); |
| 201 | 200 |
bool S9xMixSamples(uint8_t *, int); |
| 202 |
- |
|
| 203 |
-#endif |
| ... | ... |
@@ -2,19 +2,14 @@ |
| 2 | 2 |
// To change configuration options, modify blargg_config.h, not this file. |
| 3 | 3 |
|
| 4 | 4 |
// snes_spc 0.9.0 |
| 5 |
-#ifndef BLARGG_COMMON_H |
|
| 6 |
-#define BLARGG_COMMON_H |
|
| 5 |
+#pragma once |
|
| 7 | 6 |
|
| 8 | 7 |
#include <cstddef> |
| 9 | 8 |
#include <cstdlib> |
| 10 | 9 |
#include <cassert> |
| 11 | 10 |
#include <climits> |
| 12 | 11 |
|
| 13 |
-#undef BLARGG_COMMON_H |
|
| 14 |
-// allow blargg_config.h to #include blargg_common.h |
|
| 15 | 12 |
#include "blargg_config.h" |
| 16 |
-#ifndef BLARGG_COMMON_H |
|
| 17 |
-#define BLARGG_COMMON_H |
|
| 18 | 13 |
|
| 19 | 14 |
// BLARGG_COMPILER_HAS_BOOL: If 0, provides bool support for old compiler. If 1, |
| 20 | 15 |
// compiler is assumed to support bool. If undefined, availability is determined. |
| ... | ... |
@@ -41,6 +36,3 @@ const bool false = 0; |
| 41 | 36 |
#endif |
| 42 | 37 |
|
| 43 | 38 |
#include <cstdint> |
| 44 |
- |
|
| 45 |
-#endif |
|
| 46 |
-#endif |
| ... | ... |
@@ -1,13 +1,10 @@ |
| 1 | 1 |
// snes_spc 0.9.0 user configuration file. Don't replace when updating library. |
| 2 | 2 |
|
| 3 | 3 |
// snes_spc 0.9.0 |
| 4 |
-#ifndef BLARGG_CONFIG_H |
|
| 5 |
-#define BLARGG_CONFIG_H |
|
| 4 |
+#pragma once |
|
| 6 | 5 |
|
| 7 | 6 |
// Uncomment if automatic byte-order determination doesn't work |
| 8 | 7 |
//#define BLARGG_BIG_ENDIAN 1 |
| 9 | 8 |
|
| 10 | 9 |
// Uncomment if you get errors in the bool section of blargg_common.h |
| 11 | 10 |
//#define BLARGG_COMPILER_HAS_BOOL 1 |
| 12 |
- |
|
| 13 |
-#endif |
| ... | ... |
@@ -1,8 +1,7 @@ |
| 1 | 1 |
// CPU Byte Order Utilities |
| 2 | 2 |
|
| 3 | 3 |
// snes_spc 0.9.0 |
| 4 |
-#ifndef BLARGG_ENDIAN |
|
| 5 |
-#define BLARGG_ENDIAN |
|
| 4 |
+#pragma once |
|
| 6 | 5 |
|
| 7 | 6 |
#include "blargg_common.h" |
| 8 | 7 |
|
| ... | ... |
@@ -64,5 +63,3 @@ inline void set_le16(uint8_t *p, unsigned n) |
| 64 | 63 |
p[1] = static_cast<unsigned char>(n >> 8); |
| 65 | 64 |
p[0] = static_cast<unsigned char>(n); |
| 66 | 65 |
} |
| 67 |
- |
|
| 68 |
-#endif |
| ... | ... |
@@ -1,7 +1,6 @@ |
| 1 | 1 |
/* Simple resampler based on bsnes's ruby audio library */ |
| 2 | 2 |
|
| 3 |
-#ifndef __BSPLINE_RESAMPLER_H |
|
| 4 |
-#define __BSPLINE_RESAMPLER_H |
|
| 3 |
+#pragma once |
|
| 5 | 4 |
|
| 6 | 5 |
#include <cmath> |
| 7 | 6 |
#include "resampler.h" |
| ... | ... |
@@ -124,5 +123,3 @@ public: |
| 124 | 123 |
return static_cast<int>(std::floor(((this->size >> 2) - this->r_frac) / this->r_step) * 2); |
| 125 | 124 |
} |
| 126 | 125 |
}; |
| 127 |
- |
|
| 128 |
-#endif /* __BSPLINE_RESAMPLER_H */ |
| ... | ... |
@@ -1,7 +1,6 @@ |
| 1 | 1 |
/* Simple resampler based on bsnes's ruby audio library */ |
| 2 | 2 |
|
| 3 |
-#ifndef __HERMITE_RESAMPLER_H |
|
| 4 |
-#define __HERMITE_RESAMPLER_H |
|
| 3 |
+#pragma once |
|
| 5 | 4 |
|
| 6 | 5 |
#include <cmath> |
| 7 | 6 |
#include "resampler.h" |
| ... | ... |
@@ -129,5 +128,3 @@ public: |
| 129 | 128 |
return static_cast<int>(std::floor(((this->size >> 2) - this->r_frac) / this->r_step) * 2); |
| 130 | 129 |
} |
| 131 | 130 |
}; |
| 132 |
- |
|
| 133 |
-#endif /* __HERMITE_RESAMPLER_H */ |
| ... | ... |
@@ -1,7 +1,6 @@ |
| 1 | 1 |
/* Simple fixed-point linear resampler by BearOso*/ |
| 2 | 2 |
|
| 3 |
-#ifndef __LINEAR_RESAMPLER_H |
|
| 4 |
-#define __LINEAR_RESAMPLER_H |
|
| 3 |
+#pragma once |
|
| 5 | 4 |
|
| 6 | 5 |
#include "resampler.h" |
| 7 | 6 |
|
| ... | ... |
@@ -98,5 +97,3 @@ public: |
| 98 | 97 |
return (((this->size >> 2) * this->f__inv_r_step) - ((this->f__r_frac * this->f__inv_r_step) >> f_prec)) >> (f_prec - 1); |
| 99 | 98 |
} |
| 100 | 99 |
}; |
| 101 |
- |
|
| 102 |
-#endif /* __LINEAR_RESAMPLER_H */ |
| ... | ... |
@@ -1,7 +1,6 @@ |
| 1 | 1 |
/* Simple resampler based on bsnes's ruby audio library */ |
| 2 | 2 |
|
| 3 |
-#ifndef __OSCULATING_RESAMPLER_H |
|
| 4 |
-#define __OSCULATING_RESAMPLER_H |
|
| 3 |
+#pragma once |
|
| 5 | 4 |
|
| 6 | 5 |
#include <cmath> |
| 7 | 6 |
#include "resampler.h" |
| ... | ... |
@@ -125,5 +124,3 @@ public: |
| 125 | 124 |
return static_cast<int>(std::floor(((this->size >> 2) - this->r_frac) / this->r_step) * 2); |
| 126 | 125 |
} |
| 127 | 126 |
}; |
| 128 |
- |
|
| 129 |
-#endif /* __OSCULATING_RESAMPLER_H */ |
| ... | ... |
@@ -1,7 +1,6 @@ |
| 1 | 1 |
/* Simple resampler based on bsnes's ruby audio library */ |
| 2 | 2 |
|
| 3 |
-#ifndef __RESAMPLER_H |
|
| 4 |
-#define __RESAMPLER_H |
|
| 3 |
+#pragma once |
|
| 5 | 4 |
|
| 6 | 5 |
#include "ring_buffer.h" |
| 7 | 6 |
|
| ... | ... |
@@ -41,5 +40,3 @@ public: |
| 41 | 40 |
ring_buffer::resize(num_samples << 1); |
| 42 | 41 |
} |
| 43 | 42 |
}; |
| 44 |
- |
|
| 45 |
-#endif /* __RESAMPLER_H */ |
| ... | ... |
@@ -1,7 +1,6 @@ |
| 1 | 1 |
/* Simple byte-based ring buffer. Licensed under public domain (C) BearOso. */ |
| 2 | 2 |
|
| 3 |
-#ifndef __RING_BUFFER_H |
|
| 4 |
-#define __RING_BUFFER_H |
|
| 3 |
+#pragma once |
|
| 5 | 4 |
|
| 6 | 5 |
#include <algorithm> |
| 7 | 6 |
#include <cstring> |
| ... | ... |
@@ -69,5 +68,3 @@ public: |
| 69 | 68 |
this->clear(); |
| 70 | 69 |
} |
| 71 | 70 |
}; |
| 72 |
- |
|
| 73 |
-#endif |
| ... | ... |
@@ -1,7 +1,6 @@ |
| 1 | 1 |
/* Simple resampler based on bsnes's ruby audio library */ |
| 2 | 2 |
|
| 3 |
-#ifndef __SINC_RESAMPLER_H |
|
| 4 |
-#define __SINC_RESAMPLER_H |
|
| 3 |
+#pragma once |
|
| 5 | 4 |
|
| 6 | 5 |
#include <algorithm> |
| 7 | 6 |
#define _USE_MATH_DEFINES |
| ... | ... |
@@ -151,5 +150,3 @@ public: |
| 151 | 150 |
return static_cast<int>(std::floor(((this->size >> 2) - this->r_frac) / this->r_step) * 2); |
| 152 | 151 |
} |
| 153 | 152 |
}; |
| 154 |
- |
|
| 155 |
-#endif /* __SINC_RESAMPLER_H */ |