aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-05-20 22:18:28 +0200
committerBad Diode <bd@badd10de.dev>2021-05-20 22:18:28 +0200
commitab6fdd0347920cdcda9c4c3c9c3f01996adc48db (patch)
tree02f714fdf9a10be96e1eb82b5ebc5834d04c9259 /src/common.h
parent1d6395f1b6aafce4e2e05bcf60f335bec0a8d4b3 (diff)
downloaduxngba-ab6fdd0347920cdcda9c4c3c9c3f01996adc48db.tar.gz
uxngba-ab6fdd0347920cdcda9c4c3c9c3f01996adc48db.zip
Apply asie's first performance patch
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common.h b/src/common.h
index 2859b11..e293770 100644
--- a/src/common.h
+++ b/src/common.h
@@ -666,7 +666,7 @@ typedef enum {
666 NOTE_C_8 666 NOTE_C_8
667} Note; 667} Note;
668 668
669const char * note_names[] = { 669static const char * note_names[] = {
670 "C2", "C#2", "D2", "D#2", "E2", "F2", "F#2", "G2", "G#2", "A2", "A#2", "B2", 670 "C2", "C#2", "D2", "D#2", "E2", "F2", "F#2", "G2", "G#2", "A2", "A#2", "B2",
671 "C3", "C#3", "D3", "D#3", "E3", "F3", "F#3", "G3", "G#3", "A3", "A#3", "B3", 671 "C3", "C#3", "D3", "D#3", "E3", "F3", "F#3", "G3", "G#3", "A3", "A#3", "B3",
672 "C4", "C#4", "D4", "D#4", "E4", "F4", "F#4", "G4", "G#4", "A4", "A#4", "B4", 672 "C4", "C#4", "D4", "D#4", "E4", "F4", "F#4", "G4", "G#4", "A4", "A#4", "B4",
@@ -676,7 +676,7 @@ const char * note_names[] = {
676 "C8" 676 "C8"
677}; 677};
678 678
679const u32 sound_rates[] = { 679static const u32 sound_rates[] = {
680 44 , 156 , 262 , 363 , 457 , 547 , 631 , 710 , 785 , 856 , 923 , 986 , 680 44 , 156 , 262 , 363 , 457 , 547 , 631 , 710 , 785 , 856 , 923 , 986 ,
681 1046, 1102, 1155, 1205, 1252, 1297, 1339, 1379, 1416, 1452, 1485, 1517, 681 1046, 1102, 1155, 1205, 1252, 1297, 1339, 1379, 1416, 1452, 1485, 1517,
682 1547, 1575, 1601, 1626, 1650, 1672, 1693, 1713, 1732, 1750, 1766, 1782, 682 1547, 1575, 1601, 1626, 1650, 1672, 1693, 1713, 1732, 1750, 1766, 1782,
@@ -704,4 +704,10 @@ wait_vsync(void) {
704#define MAX(A, B) ((A) >= (B) ? (A) : (B)) 704#define MAX(A, B) ((A) >= (B) ? (A) : (B))
705#define CLAMP(X, MIN, MAX) ((X) <= (MIN) ? (MIN) : (X) > (MAX) ? (MAX): (X)) 705#define CLAMP(X, MIN, MAX) ((X) <= (MIN) ? (MIN) : (X) > (MAX) ? (MAX): (X))
706 706
707// IWRAM allocation macros for devkitARM.
708#define IWRAM_CODE __attribute__((section(".iwram"), long_call, target("arm")))
709#define IWRAM_DATA __attribute__((section(".iwram")))
710#define EWRAM_DATA __attribute__((section(".ewram")))
711#define EWRAM_BSS __attribute__((section(".sbss")))
712
707#endif // GBAEXP_COMMON_H 713#endif // GBAEXP_COMMON_H