From 8d924c58f28e73561d83d8404baee17d5f58b31c Mon Sep 17 00:00:00 2001 From: KiritoDv Date: Mon, 9 Oct 2023 22:47:18 -0600 Subject: [PATCH] Removed audio table files to allow multiversion support --- include/banks_table.h | 129 ---- include/samples_table.h | 717 --------------------- include/sequences_table.h | 119 ---- src/audio/internal.h | 3 +- src/audio/load.c | 5 +- src/audio/seqplayer.c | 3 +- src/port/Engine.cpp | 58 +- src/port/Engine.h | 7 +- src/port/importer/AudioBankFactory.cpp | 4 +- src/port/importer/AudioSequenceFactory.cpp | 7 +- src/port/importer/types/AudioBank.h | 2 +- src/port/importer/types/AudioSequence.h | 1 + 12 files changed, 66 insertions(+), 989 deletions(-) delete mode 100644 include/banks_table.h delete mode 100644 include/samples_table.h delete mode 100644 include/sequences_table.h diff --git a/include/banks_table.h b/include/banks_table.h deleted file mode 100644 index b1a3bad5..00000000 --- a/include/banks_table.h +++ /dev/null @@ -1,129 +0,0 @@ -#pragma once -#include "align_asset_macro.h" - -#define dgBank00 "__OTR__sound/banks/00_bank" -static const ALIGN_ASSET(2) char gBank00[] = dgBank00; - -#define dgBank01 "__OTR__sound/banks/01_bank" -static const ALIGN_ASSET(2) char gBank01[] = dgBank01; - -#define dgBank02 "__OTR__sound/banks/02_bank" -static const ALIGN_ASSET(2) char gBank02[] = dgBank02; - -#define dgBank03 "__OTR__sound/banks/03_bank" -static const ALIGN_ASSET(2) char gBank03[] = dgBank03; - -#define dgBank04 "__OTR__sound/banks/04_bank" -static const ALIGN_ASSET(2) char gBank04[] = dgBank04; - -#define dgBank05 "__OTR__sound/banks/05_bank" -static const ALIGN_ASSET(2) char gBank05[] = dgBank05; - -#define dgBank06 "__OTR__sound/banks/06_bank" -static const ALIGN_ASSET(2) char gBank06[] = dgBank06; - -#define dgBank07 "__OTR__sound/banks/07_bank" -static const ALIGN_ASSET(2) char gBank07[] = dgBank07; - -#define dgBank08 "__OTR__sound/banks/08_bank" -static const ALIGN_ASSET(2) char gBank08[] = dgBank08; - -#define dgBank09 "__OTR__sound/banks/09_bank" -static const ALIGN_ASSET(2) char gBank09[] = dgBank09; - -#define dgBank0A "__OTR__sound/banks/0A_bank" -static const ALIGN_ASSET(2) char gBank0A[] = dgBank0A; - -#define dgBank0B "__OTR__sound/banks/0B_bank" -static const ALIGN_ASSET(2) char gBank0B[] = dgBank0B; - -#define dgBank0C "__OTR__sound/banks/0C_bank" -static const ALIGN_ASSET(2) char gBank0C[] = dgBank0C; - -#define dgBank0D "__OTR__sound/banks/0D_bank" -static const ALIGN_ASSET(2) char gBank0D[] = dgBank0D; - -#define dgBank0E "__OTR__sound/banks/0E_bank" -static const ALIGN_ASSET(2) char gBank0E[] = dgBank0E; - -#define dgBank0F "__OTR__sound/banks/0F_bank" -static const ALIGN_ASSET(2) char gBank0F[] = dgBank0F; - -#define dgBank10 "__OTR__sound/banks/10_bank" -static const ALIGN_ASSET(2) char gBank10[] = dgBank10; - -#define dgBank11 "__OTR__sound/banks/11_bank" -static const ALIGN_ASSET(2) char gBank11[] = dgBank11; - -#define dgBank12 "__OTR__sound/banks/12_bank" -static const ALIGN_ASSET(2) char gBank12[] = dgBank12; - -#define dgBank13 "__OTR__sound/banks/13_bank" -static const ALIGN_ASSET(2) char gBank13[] = dgBank13; - -#define dgBank14 "__OTR__sound/banks/14_bank" -static const ALIGN_ASSET(2) char gBank14[] = dgBank14; - -#define dgBank15 "__OTR__sound/banks/15_bank" -static const ALIGN_ASSET(2) char gBank15[] = dgBank15; - -#define dgBank16 "__OTR__sound/banks/16_bank" -static const ALIGN_ASSET(2) char gBank16[] = dgBank16; - -#define dgBank17 "__OTR__sound/banks/17_bank" -static const ALIGN_ASSET(2) char gBank17[] = dgBank17; - -#define dgBank18 "__OTR__sound/banks/18_bank" -static const ALIGN_ASSET(2) char gBank18[] = dgBank18; - -#define dgBank19 "__OTR__sound/banks/19_bank" -static const ALIGN_ASSET(2) char gBank19[] = dgBank19; - -#define dgBank1A "__OTR__sound/banks/1A_bank" -static const ALIGN_ASSET(2) char gBank1A[] = dgBank1A; - -#define dgBank1B "__OTR__sound/banks/1B_bank" -static const ALIGN_ASSET(2) char gBank1B[] = dgBank1B; - -#define dgBank1C "__OTR__sound/banks/1C_bank" -static const ALIGN_ASSET(2) char gBank1C[] = dgBank1C; - -#define dgBank1D "__OTR__sound/banks/1D_bank" -static const ALIGN_ASSET(2) char gBank1D[] = dgBank1D; - -#define dgBank1E "__OTR__sound/banks/1E_bank" -static const ALIGN_ASSET(2) char gBank1E[] = dgBank1E; - -#define dgBank1F "__OTR__sound/banks/1F_bank" -static const ALIGN_ASSET(2) char gBank1F[] = dgBank1F; - -#define dgBank20 "__OTR__sound/banks/20_bank" -static const ALIGN_ASSET(2) char gBank20[] = dgBank20; - -#define dgBank21 "__OTR__sound/banks/21_bank" -static const ALIGN_ASSET(2) char gBank21[] = dgBank21; - -#define dgBank22 "__OTR__sound/banks/22_bank" -static const ALIGN_ASSET(2) char gBank22[] = dgBank22; - -#define dgBank23 "__OTR__sound/banks/23_bank" -static const ALIGN_ASSET(2) char gBank23[] = dgBank23; - -#define dgBank24 "__OTR__sound/banks/24_bank" -static const ALIGN_ASSET(2) char gBank24[] = dgBank24; - -#define dgBank25 "__OTR__sound/banks/25_bank" -static const ALIGN_ASSET(2) char gBank25[] = dgBank25; - -static const char* gBankTable[] = { - gBank00, gBank01, gBank02, gBank03, - gBank04, gBank05, gBank06, gBank07, - gBank08, gBank09, gBank0A, gBank0B, - gBank0C, gBank0D, gBank0E, gBank0F, - gBank10, gBank11, gBank12, gBank13, - gBank14, gBank15, gBank16, gBank17, - gBank18, gBank19, gBank1A, gBank1B, - gBank1C, gBank1D, gBank1E, gBank1F, - gBank20, gBank21, gBank22, gBank23, - gBank24, gBank25, -}; diff --git a/include/samples_table.h b/include/samples_table.h deleted file mode 100644 index 5f1a3aeb..00000000 --- a/include/samples_table.h +++ /dev/null @@ -1,717 +0,0 @@ -#pragma once -#include "align_asset_macro.h" - -#define dgSample00 "__OTR__sound/samples/sfx_1/00_twirl" -static const ALIGN_ASSET(2) char gSample00[] = dgSample00; - -#define dgSample01 "__OTR__sound/samples/sfx_1/01_brushing" -static const ALIGN_ASSET(2) char gSample01[] = dgSample01; - -#define dgSample02 "__OTR__sound/samples/sfx_1/02_hand_touch" -static const ALIGN_ASSET(2) char gSample02[] = dgSample02; - -#define dgSample03 "__OTR__sound/samples/sfx_1/03_yoshi" -static const ALIGN_ASSET(2) char gSample03[] = dgSample03; - -#define dgSample04 "__OTR__sound/samples/sfx_1/04_plop" -static const ALIGN_ASSET(2) char gSample04[] = dgSample04; - -#define dgSample05 "__OTR__sound/samples/sfx_1/05_heavy_landing" -static const ALIGN_ASSET(2) char gSample05[] = dgSample05; - -#define dgSample06 "__OTR__sound/samples/sfx_terrain/00_step_default" -static const ALIGN_ASSET(2) char gSample06[] = dgSample06; - -#define dgSample07 "__OTR__sound/samples/sfx_terrain/01_step_grass" -static const ALIGN_ASSET(2) char gSample07[] = dgSample07; - -#define dgSample08 "__OTR__sound/samples/sfx_terrain/02_step_stone" -static const ALIGN_ASSET(2) char gSample08[] = dgSample08; - -#define dgSample09 "__OTR__sound/samples/sfx_terrain/03_step_spooky" -static const ALIGN_ASSET(2) char gSample09[] = dgSample09; - -#define dgSample0A "__OTR__sound/samples/sfx_terrain/04_step_snow" -static const ALIGN_ASSET(2) char gSample0A[] = dgSample0A; - -#define dgSample0B "__OTR__sound/samples/sfx_terrain/05_step_ice" -static const ALIGN_ASSET(2) char gSample0B[] = dgSample0B; - -#define dgSample0C "__OTR__sound/samples/sfx_terrain/06_step_metal" -static const ALIGN_ASSET(2) char gSample0C[] = dgSample0C; - -#define dgSample0D "__OTR__sound/samples/sfx_terrain/07_step_sand" -static const ALIGN_ASSET(2) char gSample0D[] = dgSample0D; - -#define dgSample0E "__OTR__sound/samples/sfx_water/00_plunge" -static const ALIGN_ASSET(2) char gSample0E[] = dgSample0E; - -#define dgSample0F "__OTR__sound/samples/sfx_water/01_splash" -static const ALIGN_ASSET(2) char gSample0F[] = dgSample0F; - -#define dgSample10 "__OTR__sound/samples/sfx_water/02_swim" -static const ALIGN_ASSET(2) char gSample10[] = dgSample10; - -#define dgSample11 "__OTR__sound/samples/sfx_4/00" -static const ALIGN_ASSET(2) char gSample11[] = dgSample11; - -#define dgSample12 "__OTR__sound/samples/sfx_4/01" -static const ALIGN_ASSET(2) char gSample12[] = dgSample12; - -#define dgSample13 "__OTR__sound/samples/sfx_4/02" -static const ALIGN_ASSET(2) char gSample13[] = dgSample13; - -#define dgSample14 "__OTR__sound/samples/sfx_4/03" -static const ALIGN_ASSET(2) char gSample14[] = dgSample14; - -#define dgSample15 "__OTR__sound/samples/sfx_4/04" -static const ALIGN_ASSET(2) char gSample15[] = dgSample15; - -#define dgSample16 "__OTR__sound/samples/sfx_4/05" -static const ALIGN_ASSET(2) char gSample16[] = dgSample16; - -#define dgSample17 "__OTR__sound/samples/sfx_4/06" -static const ALIGN_ASSET(2) char gSample17[] = dgSample17; - -#define dgSample18 "__OTR__sound/samples/sfx_4/07" -static const ALIGN_ASSET(2) char gSample18[] = dgSample18; - -#define dgSample19 "__OTR__sound/samples/sfx_4/08" -static const ALIGN_ASSET(2) char gSample19[] = dgSample19; - -#define dgSample1A "__OTR__sound/samples/sfx_4/09" -static const ALIGN_ASSET(2) char gSample1A[] = dgSample1A; - -#define dgSample1B "__OTR__sound/samples/sfx_5/00" -static const ALIGN_ASSET(2) char gSample1B[] = dgSample1B; - -#define dgSample1C "__OTR__sound/samples/sfx_5/01" -static const ALIGN_ASSET(2) char gSample1C[] = dgSample1C; - -#define dgSample1D "__OTR__sound/samples/sfx_5/02" -static const ALIGN_ASSET(2) char gSample1D[] = dgSample1D; - -#define dgSample1E "__OTR__sound/samples/sfx_5/03" -static const ALIGN_ASSET(2) char gSample1E[] = dgSample1E; - -#define dgSample1F "__OTR__sound/samples/sfx_5/04" -static const ALIGN_ASSET(2) char gSample1F[] = dgSample1F; - -#define dgSample20 "__OTR__sound/samples/sfx_5/05" -static const ALIGN_ASSET(2) char gSample20[] = dgSample20; - -#define dgSample21 "__OTR__sound/samples/sfx_5/06" -static const ALIGN_ASSET(2) char gSample21[] = dgSample21; - -#define dgSample22 "__OTR__sound/samples/sfx_5/07" -static const ALIGN_ASSET(2) char gSample22[] = dgSample22; - -#define dgSample23 "__OTR__sound/samples/sfx_5/08" -static const ALIGN_ASSET(2) char gSample23[] = dgSample23; - -#define dgSample24 "__OTR__sound/samples/sfx_5/09" -static const ALIGN_ASSET(2) char gSample24[] = dgSample24; - -#define dgSample25 "__OTR__sound/samples/sfx_5/0A" -static const ALIGN_ASSET(2) char gSample25[] = dgSample25; - -#define dgSample26 "__OTR__sound/samples/sfx_5/0B" -static const ALIGN_ASSET(2) char gSample26[] = dgSample26; - -#define dgSample27 "__OTR__sound/samples/sfx_5/0C" -static const ALIGN_ASSET(2) char gSample27[] = dgSample27; - -#define dgSample28 "__OTR__sound/samples/sfx_5/0D" -static const ALIGN_ASSET(2) char gSample28[] = dgSample28; - -#define dgSample29 "__OTR__sound/samples/sfx_5/0E" -static const ALIGN_ASSET(2) char gSample29[] = dgSample29; - -#define dgSample2A "__OTR__sound/samples/sfx_5/0F" -static const ALIGN_ASSET(2) char gSample2A[] = dgSample2A; - -#define dgSample2B "__OTR__sound/samples/sfx_5/10" -static const ALIGN_ASSET(2) char gSample2B[] = dgSample2B; - -#define dgSample2C "__OTR__sound/samples/sfx_5/11" -static const ALIGN_ASSET(2) char gSample2C[] = dgSample2C; - -#define dgSample2D "__OTR__sound/samples/sfx_5/12" -static const ALIGN_ASSET(2) char gSample2D[] = dgSample2D; - -#define dgSample2E "__OTR__sound/samples/sfx_5/13" -static const ALIGN_ASSET(2) char gSample2E[] = dgSample2E; - -#define dgSample2F "__OTR__sound/samples/sfx_5/14" -static const ALIGN_ASSET(2) char gSample2F[] = dgSample2F; - -#define dgSample30 "__OTR__sound/samples/sfx_5/15" -static const ALIGN_ASSET(2) char gSample30[] = dgSample30; - -#define dgSample31 "__OTR__sound/samples/sfx_5/16" -static const ALIGN_ASSET(2) char gSample31[] = dgSample31; - -#define dgSample32 "__OTR__sound/samples/sfx_5/17" -static const ALIGN_ASSET(2) char gSample32[] = dgSample32; - -#define dgSample33 "__OTR__sound/samples/sfx_5/18" -static const ALIGN_ASSET(2) char gSample33[] = dgSample33; - -#define dgSample34 "__OTR__sound/samples/sfx_5/19" -static const ALIGN_ASSET(2) char gSample34[] = dgSample34; - -#define dgSample35 "__OTR__sound/samples/sfx_5/1A" -static const ALIGN_ASSET(2) char gSample35[] = dgSample35; - -#define dgSample36 "__OTR__sound/samples/sfx_5/1B" -static const ALIGN_ASSET(2) char gSample36[] = dgSample36; - -#define dgSample37 "__OTR__sound/samples/sfx_5/1C" -static const ALIGN_ASSET(2) char gSample37[] = dgSample37; - -#define dgSample38 "__OTR__sound/samples/sfx_6/00" -static const ALIGN_ASSET(2) char gSample38[] = dgSample38; - -#define dgSample39 "__OTR__sound/samples/sfx_6/01" -static const ALIGN_ASSET(2) char gSample39[] = dgSample39; - -#define dgSample3A "__OTR__sound/samples/sfx_6/02" -static const ALIGN_ASSET(2) char gSample3A[] = dgSample3A; - -#define dgSample3B "__OTR__sound/samples/sfx_6/03" -static const ALIGN_ASSET(2) char gSample3B[] = dgSample3B; - -#define dgSample3C "__OTR__sound/samples/sfx_6/04" -static const ALIGN_ASSET(2) char gSample3C[] = dgSample3C; - -#define dgSample3D "__OTR__sound/samples/sfx_6/05" -static const ALIGN_ASSET(2) char gSample3D[] = dgSample3D; - -#define dgSample3E "__OTR__sound/samples/sfx_6/06" -static const ALIGN_ASSET(2) char gSample3E[] = dgSample3E; - -#define dgSample3F "__OTR__sound/samples/sfx_6/07" -static const ALIGN_ASSET(2) char gSample3F[] = dgSample3F; - -#define dgSample40 "__OTR__sound/samples/sfx_6/08" -static const ALIGN_ASSET(2) char gSample40[] = dgSample40; - -#define dgSample41 "__OTR__sound/samples/sfx_6/09" -static const ALIGN_ASSET(2) char gSample41[] = dgSample41; - -#define dgSample42 "__OTR__sound/samples/sfx_6/0A" -static const ALIGN_ASSET(2) char gSample42[] = dgSample42; - -#define dgSample43 "__OTR__sound/samples/sfx_6/0B" -static const ALIGN_ASSET(2) char gSample43[] = dgSample43; - -#define dgSample44 "__OTR__sound/samples/sfx_6/0C" -static const ALIGN_ASSET(2) char gSample44[] = dgSample44; - -#define dgSample45 "__OTR__sound/samples/sfx_6/0D" -static const ALIGN_ASSET(2) char gSample45[] = dgSample45; - -#define dgSample46 "__OTR__sound/samples/sfx_7/00" -static const ALIGN_ASSET(2) char gSample46[] = dgSample46; - -#define dgSample47 "__OTR__sound/samples/sfx_7/01" -static const ALIGN_ASSET(2) char gSample47[] = dgSample47; - -#define dgSample48 "__OTR__sound/samples/sfx_7/02" -static const ALIGN_ASSET(2) char gSample48[] = dgSample48; - -#define dgSample49 "__OTR__sound/samples/sfx_7/03" -static const ALIGN_ASSET(2) char gSample49[] = dgSample49; - -#define dgSample4A "__OTR__sound/samples/sfx_7/04" -static const ALIGN_ASSET(2) char gSample4A[] = dgSample4A; - -#define dgSample4B "__OTR__sound/samples/sfx_7/05" -static const ALIGN_ASSET(2) char gSample4B[] = dgSample4B; - -#define dgSample4C "__OTR__sound/samples/sfx_7/06" -static const ALIGN_ASSET(2) char gSample4C[] = dgSample4C; - -#define dgSample4D "__OTR__sound/samples/sfx_7/07" -static const ALIGN_ASSET(2) char gSample4D[] = dgSample4D; - -#define dgSample4E "__OTR__sound/samples/sfx_7/08" -static const ALIGN_ASSET(2) char gSample4E[] = dgSample4E; - -#define dgSample4F "__OTR__sound/samples/sfx_7/09" -static const ALIGN_ASSET(2) char gSample4F[] = dgSample4F; - -#define dgSample50 "__OTR__sound/samples/sfx_7/0A" -static const ALIGN_ASSET(2) char gSample50[] = dgSample50; - -#define dgSample51 "__OTR__sound/samples/sfx_7/0B" -static const ALIGN_ASSET(2) char gSample51[] = dgSample51; - -#define dgSample52 "__OTR__sound/samples/sfx_7/0C" -static const ALIGN_ASSET(2) char gSample52[] = dgSample52; - -#define dgSample53 "__OTR__sound/samples/sfx_7/0D_chain_chomp_bark" -static const ALIGN_ASSET(2) char gSample53[] = dgSample53; - -#define dgSample54 "__OTR__sound/samples/sfx_mario/00_mario_jump_hoo" -static const ALIGN_ASSET(2) char gSample54[] = dgSample54; - -#define dgSample55 "__OTR__sound/samples/sfx_mario/01_mario_jump_wah" -static const ALIGN_ASSET(2) char gSample55[] = dgSample55; - -#define dgSample56 "__OTR__sound/samples/sfx_mario/02_mario_yah" -static const ALIGN_ASSET(2) char gSample56[] = dgSample56; - -#define dgSample57 "__OTR__sound/samples/sfx_mario/03_mario_haha" -static const ALIGN_ASSET(2) char gSample57[] = dgSample57; - -#define dgSample58 "__OTR__sound/samples/sfx_mario/04_mario_yahoo" -static const ALIGN_ASSET(2) char gSample58[] = dgSample58; - -#define dgSample59 "__OTR__sound/samples/sfx_mario/05_mario_uh" -static const ALIGN_ASSET(2) char gSample59[] = dgSample59; - -#define dgSample5A "__OTR__sound/samples/sfx_mario/06_mario_hrmm" -static const ALIGN_ASSET(2) char gSample5A[] = dgSample5A; - -#define dgSample5B "__OTR__sound/samples/sfx_mario/07_mario_wah2" -static const ALIGN_ASSET(2) char gSample5B[] = dgSample5B; - -#define dgSample5C "__OTR__sound/samples/sfx_mario/08_mario_whoa" -static const ALIGN_ASSET(2) char gSample5C[] = dgSample5C; - -#define dgSample5D "__OTR__sound/samples/sfx_mario/09_mario_eeuh" -static const ALIGN_ASSET(2) char gSample5D[] = dgSample5D; - -#define dgSample5E "__OTR__sound/samples/sfx_mario/0A_mario_attacked" -static const ALIGN_ASSET(2) char gSample5E[] = dgSample5E; - -#define dgSample5F "__OTR__sound/samples/sfx_mario/0B_mario_ooof" -static const ALIGN_ASSET(2) char gSample5F[] = dgSample5F; - -#define dgSample60 "__OTR__sound/samples/sfx_mario/0C_mario_here_we_go" -static const ALIGN_ASSET(2) char gSample60[] = dgSample60; - -#define dgSample61 "__OTR__sound/samples/sfx_mario/0D_mario_yawning" -static const ALIGN_ASSET(2) char gSample61[] = dgSample61; - -#define dgSample62 "__OTR__sound/samples/sfx_mario/0E_mario_snoring1" -static const ALIGN_ASSET(2) char gSample62[] = dgSample62; - -#define dgSample63 "__OTR__sound/samples/sfx_mario/0F_mario_snoring2" -static const ALIGN_ASSET(2) char gSample63[] = dgSample63; - -#define dgSample64 "__OTR__sound/samples/sfx_mario/10_mario_doh" -static const ALIGN_ASSET(2) char gSample64[] = dgSample64; - -#define dgSample65 "__OTR__sound/samples/sfx_mario/11_mario_game_over" -static const ALIGN_ASSET(2) char gSample65[] = dgSample65; - -#define dgSample66 "__OTR__sound/samples/sfx_mario/12_mario_hello" -static const ALIGN_ASSET(2) char gSample66[] = dgSample66; - -#define dgSample67 "__OTR__sound/samples/sfx_mario/13_mario_press_start_to_play" -static const ALIGN_ASSET(2) char gSample67[] = dgSample67; - -#define dgSample68 "__OTR__sound/samples/sfx_mario/14_mario_twirl_bounce" -static const ALIGN_ASSET(2) char gSample68[] = dgSample68; - -#define dgSample69 "__OTR__sound/samples/sfx_mario/15_mario_snoring3" -static const ALIGN_ASSET(2) char gSample69[] = dgSample69; - -#define dgSample6A "__OTR__sound/samples/sfx_mario/16_mario_so_longa_bowser" -static const ALIGN_ASSET(2) char gSample6A[] = dgSample6A; - -#define dgSample6B "__OTR__sound/samples/sfx_mario/17_mario_ima_tired" -static const ALIGN_ASSET(2) char gSample6B[] = dgSample6B; - -#define dgSample6C "__OTR__sound/samples/sfx_mario/18_mario_waha" -static const ALIGN_ASSET(2) char gSample6C[] = dgSample6C; - -#define dgSample6D "__OTR__sound/samples/sfx_mario/19_mario_yippee" -static const ALIGN_ASSET(2) char gSample6D[] = dgSample6D; - -#define dgSample6E "__OTR__sound/samples/sfx_mario/1A_mario_lets_a_go" -static const ALIGN_ASSET(2) char gSample6E[] = dgSample6E; - -#define dgSample6F "__OTR__sound/samples/sfx_9/00" -static const ALIGN_ASSET(2) char gSample6F[] = dgSample6F; - -#define dgSample70 "__OTR__sound/samples/sfx_9/01" -static const ALIGN_ASSET(2) char gSample70[] = dgSample70; - -#define dgSample71 "__OTR__sound/samples/sfx_9/02" -static const ALIGN_ASSET(2) char gSample71[] = dgSample71; - -#define dgSample72 "__OTR__sound/samples/sfx_9/03" -static const ALIGN_ASSET(2) char gSample72[] = dgSample72; - -#define dgSample73 "__OTR__sound/samples/sfx_9/04_camera_buzz" -static const ALIGN_ASSET(2) char gSample73[] = dgSample73; - -#define dgSample74 "__OTR__sound/samples/sfx_9/05_camera_shutter" -static const ALIGN_ASSET(2) char gSample74[] = dgSample74; - -#define dgSample75 "__OTR__sound/samples/sfx_9/06" -static const ALIGN_ASSET(2) char gSample75[] = dgSample75; - -#define dgSample76 "__OTR__sound/samples/sfx_mario_peach/00_mario_waaaooow" -static const ALIGN_ASSET(2) char gSample76[] = dgSample76; - -#define dgSample77 "__OTR__sound/samples/sfx_mario_peach/01_mario_hoohoo" -static const ALIGN_ASSET(2) char gSample77[] = dgSample77; - -#define dgSample78 "__OTR__sound/samples/sfx_mario_peach/02_mario_panting" -static const ALIGN_ASSET(2) char gSample78[] = dgSample78; - -#define dgSample79 "__OTR__sound/samples/sfx_mario_peach/03_mario_dying" -static const ALIGN_ASSET(2) char gSample79[] = dgSample79; - -#define dgSample7A "__OTR__sound/samples/sfx_mario_peach/04_mario_on_fire" -static const ALIGN_ASSET(2) char gSample7A[] = dgSample7A; - -#define dgSample7B "__OTR__sound/samples/sfx_mario_peach/05_mario_uh2" -static const ALIGN_ASSET(2) char gSample7B[] = dgSample7B; - -#define dgSample7C "__OTR__sound/samples/sfx_mario_peach/06_mario_coughing" -static const ALIGN_ASSET(2) char gSample7C[] = dgSample7C; - -#define dgSample7D "__OTR__sound/samples/sfx_mario_peach/07_mario_its_a_me_mario" -static const ALIGN_ASSET(2) char gSample7D[] = dgSample7D; - -#define dgSample7E "__OTR__sound/samples/sfx_mario_peach/08_mario_punch_yah" -static const ALIGN_ASSET(2) char gSample7E[] = dgSample7E; - -#define dgSample7F "__OTR__sound/samples/sfx_mario_peach/09_mario_punch_hoo" -static const ALIGN_ASSET(2) char gSample7F[] = dgSample7F; - -#define dgSample80 "__OTR__sound/samples/sfx_mario_peach/0A_mario_mama_mia" -static const ALIGN_ASSET(2) char gSample80[] = dgSample80; - -#define dgSample81 "__OTR__sound/samples/sfx_mario_peach/0B_mario_okey_dokey" -static const ALIGN_ASSET(2) char gSample81[] = dgSample81; - -#define dgSample82 "__OTR__sound/samples/sfx_mario_peach/0C_mario_drowning" -static const ALIGN_ASSET(2) char gSample82[] = dgSample82; - -#define dgSample83 "__OTR__sound/samples/sfx_mario_peach/0D_mario_thank_you_playing_my_game" -static const ALIGN_ASSET(2) char gSample83[] = dgSample83; - -#define dgSample84 "__OTR__sound/samples/sfx_mario_peach/0E_peach_dear_mario" -static const ALIGN_ASSET(2) char gSample84[] = dgSample84; - -#define dgSample85 "__OTR__sound/samples/sfx_mario_peach/0F_peach_mario" -static const ALIGN_ASSET(2) char gSample85[] = dgSample85; - -#define dgSample86 "__OTR__sound/samples/sfx_mario_peach/10_peach_power_of_the_stars" -static const ALIGN_ASSET(2) char gSample86[] = dgSample86; - -#define dgSample87 "__OTR__sound/samples/sfx_mario_peach/11_peach_thanks_to_you" -static const ALIGN_ASSET(2) char gSample87[] = dgSample87; - -#define dgSample88 "__OTR__sound/samples/sfx_mario_peach/12_peach_thank_you_mario" -static const ALIGN_ASSET(2) char gSample88[] = dgSample88; - -#define dgSample89 "__OTR__sound/samples/sfx_mario_peach/13_peach_something_special" -static const ALIGN_ASSET(2) char gSample89[] = dgSample89; - -#define dgSample8A "__OTR__sound/samples/sfx_mario_peach/14_peach_bake_a_cake" -static const ALIGN_ASSET(2) char gSample8A[] = dgSample8A; - -#define dgSample8B "__OTR__sound/samples/sfx_mario_peach/15_peach_for_mario" -static const ALIGN_ASSET(2) char gSample8B[] = dgSample8B; - -#define dgSample8C "__OTR__sound/samples/sfx_mario_peach/16_peach_mario2" -static const ALIGN_ASSET(2) char gSample8C[] = dgSample8C; - -#define dgSample8D "__OTR__sound/samples/instruments/00" -static const ALIGN_ASSET(2) char gSample8D[] = dgSample8D; - -#define dgSample8E "__OTR__sound/samples/instruments/01_banjo_1" -static const ALIGN_ASSET(2) char gSample8E[] = dgSample8E; - -#define dgSample8F "__OTR__sound/samples/instruments/02" -static const ALIGN_ASSET(2) char gSample8F[] = dgSample8F; - -#define dgSample90 "__OTR__sound/samples/instruments/03_human_whistle" -static const ALIGN_ASSET(2) char gSample90[] = dgSample90; - -#define dgSample91 "__OTR__sound/samples/instruments/04_bright_piano" -static const ALIGN_ASSET(2) char gSample91[] = dgSample91; - -#define dgSample92 "__OTR__sound/samples/instruments/05_acoustic_bass" -static const ALIGN_ASSET(2) char gSample92[] = dgSample92; - -#define dgSample93 "__OTR__sound/samples/instruments/06_kick_drum_1" -static const ALIGN_ASSET(2) char gSample93[] = dgSample93; - -#define dgSample94 "__OTR__sound/samples/instruments/07_rimshot" -static const ALIGN_ASSET(2) char gSample94[] = dgSample94; - -#define dgSample95 "__OTR__sound/samples/instruments/08" -static const ALIGN_ASSET(2) char gSample95[] = dgSample95; - -#define dgSample96 "__OTR__sound/samples/instruments/09" -static const ALIGN_ASSET(2) char gSample96[] = dgSample96; - -#define dgSample97 "__OTR__sound/samples/instruments/0A_tambourine" -static const ALIGN_ASSET(2) char gSample97[] = dgSample97; - -#define dgSample98 "__OTR__sound/samples/instruments/0B" -static const ALIGN_ASSET(2) char gSample98[] = dgSample98; - -#define dgSample99 "__OTR__sound/samples/instruments/0C_conga_stick" -static const ALIGN_ASSET(2) char gSample99[] = dgSample99; - -#define dgSample9A "__OTR__sound/samples/instruments/0D_clave" -static const ALIGN_ASSET(2) char gSample9A[] = dgSample9A; - -#define dgSample9B "__OTR__sound/samples/instruments/0E_hihat_closed" -static const ALIGN_ASSET(2) char gSample9B[] = dgSample9B; - -#define dgSample9C "__OTR__sound/samples/instruments/0F_hihat_open" -static const ALIGN_ASSET(2) char gSample9C[] = dgSample9C; - -#define dgSample9D "__OTR__sound/samples/instruments/10_cymbal_bell" -static const ALIGN_ASSET(2) char gSample9D[] = dgSample9D; - -#define dgSample9E "__OTR__sound/samples/instruments/11_splash_cymbal" -static const ALIGN_ASSET(2) char gSample9E[] = dgSample9E; - -#define dgSample9F "__OTR__sound/samples/instruments/12_snare_drum_1" -static const ALIGN_ASSET(2) char gSample9F[] = dgSample9F; - -#define dgSampleA0 "__OTR__sound/samples/instruments/13_snare_drum_2" -static const ALIGN_ASSET(2) char gSampleA0[] = dgSampleA0; - -#define dgSampleA1 "__OTR__sound/samples/instruments/14_strings_5" -static const ALIGN_ASSET(2) char gSampleA1[] = dgSampleA1; - -#define dgSampleA2 "__OTR__sound/samples/instruments/15_strings_4" -static const ALIGN_ASSET(2) char gSampleA2[] = dgSampleA2; - -#define dgSampleA3 "__OTR__sound/samples/instruments/16_french_horns" -static const ALIGN_ASSET(2) char gSampleA3[] = dgSampleA3; - -#define dgSampleA4 "__OTR__sound/samples/instruments/17_trumpet" -static const ALIGN_ASSET(2) char gSampleA4[] = dgSampleA4; - -#define dgSampleA5 "__OTR__sound/samples/instruments/18_timpani" -static const ALIGN_ASSET(2) char gSampleA5[] = dgSampleA5; - -#define dgSampleA6 "__OTR__sound/samples/instruments/19_brass" -static const ALIGN_ASSET(2) char gSampleA6[] = dgSampleA6; - -#define dgSampleA7 "__OTR__sound/samples/instruments/1A_slap_bass" -static const ALIGN_ASSET(2) char gSampleA7[] = dgSampleA7; - -#define dgSampleA8 "__OTR__sound/samples/instruments/1B_organ_2" -static const ALIGN_ASSET(2) char gSampleA8[] = dgSampleA8; - -#define dgSampleA9 "__OTR__sound/samples/instruments/1C" -static const ALIGN_ASSET(2) char gSampleA9[] = dgSampleA9; - -#define dgSampleAA "__OTR__sound/samples/instruments/1D" -static const ALIGN_ASSET(2) char gSampleAA[] = dgSampleAA; - -#define dgSampleAB "__OTR__sound/samples/instruments/1E_closed_triangle" -static const ALIGN_ASSET(2) char gSampleAB[] = dgSampleAB; - -#define dgSampleAC "__OTR__sound/samples/instruments/1F_open_triangle" -static const ALIGN_ASSET(2) char gSampleAC[] = dgSampleAC; - -#define dgSampleAD "__OTR__sound/samples/instruments/20_cabasa" -static const ALIGN_ASSET(2) char gSampleAD[] = dgSampleAD; - -#define dgSampleAE "__OTR__sound/samples/instruments/21_sine_bass" -static const ALIGN_ASSET(2) char gSampleAE[] = dgSampleAE; - -#define dgSampleAF "__OTR__sound/samples/instruments/22_boys_choir" -static const ALIGN_ASSET(2) char gSampleAF[] = dgSampleAF; - -#define dgSampleB0 "__OTR__sound/samples/instruments/23_strings_1" -static const ALIGN_ASSET(2) char gSampleB0[] = dgSampleB0; - -#define dgSampleB1 "__OTR__sound/samples/instruments/24_strings_2" -static const ALIGN_ASSET(2) char gSampleB1[] = dgSampleB1; - -#define dgSampleB2 "__OTR__sound/samples/instruments/25_strings_3" -static const ALIGN_ASSET(2) char gSampleB2[] = dgSampleB2; - -#define dgSampleB3 "__OTR__sound/samples/instruments/26_crystal_rhodes" -static const ALIGN_ASSET(2) char gSampleB3[] = dgSampleB3; - -#define dgSampleB4 "__OTR__sound/samples/instruments/27_harpsichord" -static const ALIGN_ASSET(2) char gSampleB4[] = dgSampleB4; - -#define dgSampleB5 "__OTR__sound/samples/instruments/28_sitar_1" -static const ALIGN_ASSET(2) char gSampleB5[] = dgSampleB5; - -#define dgSampleB6 "__OTR__sound/samples/instruments/29_orchestra_hit" -static const ALIGN_ASSET(2) char gSampleB6[] = dgSampleB6; - -#define dgSampleB7 "__OTR__sound/samples/instruments/2A" -static const ALIGN_ASSET(2) char gSampleB7[] = dgSampleB7; - -#define dgSampleB8 "__OTR__sound/samples/instruments/2B" -static const ALIGN_ASSET(2) char gSampleB8[] = dgSampleB8; - -#define dgSampleB9 "__OTR__sound/samples/instruments/2C" -static const ALIGN_ASSET(2) char gSampleB9[] = dgSampleB9; - -#define dgSampleBA "__OTR__sound/samples/instruments/2D_trombone" -static const ALIGN_ASSET(2) char gSampleBA[] = dgSampleBA; - -#define dgSampleBB "__OTR__sound/samples/instruments/2E_accordion" -static const ALIGN_ASSET(2) char gSampleBB[] = dgSampleBB; - -#define dgSampleBC "__OTR__sound/samples/instruments/2F_sleigh_bells" -static const ALIGN_ASSET(2) char gSampleBC[] = dgSampleBC; - -#define dgSampleBD "__OTR__sound/samples/instruments/30_rarefaction-lahna" -static const ALIGN_ASSET(2) char gSampleBD[] = dgSampleBD; - -#define dgSampleBE "__OTR__sound/samples/instruments/31_rarefaction-convolution" -static const ALIGN_ASSET(2) char gSampleBE[] = dgSampleBE; - -#define dgSampleBF "__OTR__sound/samples/instruments/32_metal_rimshot" -static const ALIGN_ASSET(2) char gSampleBF[] = dgSampleBF; - -#define dgSampleC0 "__OTR__sound/samples/instruments/33_kick_drum_2" -static const ALIGN_ASSET(2) char gSampleC0[] = dgSampleC0; - -#define dgSampleC1 "__OTR__sound/samples/instruments/34_alto_flute" -static const ALIGN_ASSET(2) char gSampleC1[] = dgSampleC1; - -#define dgSampleC2 "__OTR__sound/samples/instruments/35_gospel_organ" -static const ALIGN_ASSET(2) char gSampleC2[] = dgSampleC2; - -#define dgSampleC3 "__OTR__sound/samples/instruments/36_sawtooth_synth" -static const ALIGN_ASSET(2) char gSampleC3[] = dgSampleC3; - -#define dgSampleC4 "__OTR__sound/samples/instruments/37_square_synth" -static const ALIGN_ASSET(2) char gSampleC4[] = dgSampleC4; - -#define dgSampleC5 "__OTR__sound/samples/instruments/38_electric_kick_drum" -static const ALIGN_ASSET(2) char gSampleC5[] = dgSampleC5; - -#define dgSampleC6 "__OTR__sound/samples/instruments/39_sitar_2" -static const ALIGN_ASSET(2) char gSampleC6[] = dgSampleC6; - -#define dgSampleC7 "__OTR__sound/samples/instruments/3A_music_box" -static const ALIGN_ASSET(2) char gSampleC7[] = dgSampleC7; - -#define dgSampleC8 "__OTR__sound/samples/instruments/3B_banjo_2" -static const ALIGN_ASSET(2) char gSampleC8[] = dgSampleC8; - -#define dgSampleC9 "__OTR__sound/samples/instruments/3C_acoustic_guitar" -static const ALIGN_ASSET(2) char gSampleC9[] = dgSampleC9; - -#define dgSampleCA "__OTR__sound/samples/instruments/3D" -static const ALIGN_ASSET(2) char gSampleCA[] = dgSampleCA; - -#define dgSampleCB "__OTR__sound/samples/instruments/3E_monk_choir" -static const ALIGN_ASSET(2) char gSampleCB[] = dgSampleCB; - -#define dgSampleCC "__OTR__sound/samples/instruments/3F" -static const ALIGN_ASSET(2) char gSampleCC[] = dgSampleCC; - -#define dgSampleCD "__OTR__sound/samples/instruments/40_bell" -static const ALIGN_ASSET(2) char gSampleCD[] = dgSampleCD; - -#define dgSampleCE "__OTR__sound/samples/instruments/41_pan_flute" -static const ALIGN_ASSET(2) char gSampleCE[] = dgSampleCE; - -#define dgSampleCF "__OTR__sound/samples/instruments/42_vibraphone" -static const ALIGN_ASSET(2) char gSampleCF[] = dgSampleCF; - -#define dgSampleD0 "__OTR__sound/samples/instruments/43_harmonica" -static const ALIGN_ASSET(2) char gSampleD0[] = dgSampleD0; - -#define dgSampleD1 "__OTR__sound/samples/instruments/44_grand_piano" -static const ALIGN_ASSET(2) char gSampleD1[] = dgSampleD1; - -#define dgSampleD2 "__OTR__sound/samples/instruments/45_french_horns_lq" -static const ALIGN_ASSET(2) char gSampleD2[] = dgSampleD2; - -#define dgSampleD3 "__OTR__sound/samples/instruments/46_pizzicato_strings_1" -static const ALIGN_ASSET(2) char gSampleD3[] = dgSampleD3; - -#define dgSampleD4 "__OTR__sound/samples/instruments/47_pizzicato_strings_2" -static const ALIGN_ASSET(2) char gSampleD4[] = dgSampleD4; - -#define dgSampleD5 "__OTR__sound/samples/instruments/48_steel_drum" -static const ALIGN_ASSET(2) char gSampleD5[] = dgSampleD5; - -#define dgSampleD6 "__OTR__sound/samples/piranha_music_box/00_music_box" -static const ALIGN_ASSET(2) char gSampleD6[] = dgSampleD6; - -#define dgSampleD7 "__OTR__sound/samples/course_start/00_la" -static const ALIGN_ASSET(2) char gSampleD7[] = dgSampleD7; - -#define dgSampleD8 "__OTR__sound/samples/bowser_organ/00_organ_1" -static const ALIGN_ASSET(2) char gSampleD8[] = dgSampleD8; - -#define dgSampleD9 "__OTR__sound/samples/bowser_organ/01_organ_1_lq" -static const ALIGN_ASSET(2) char gSampleD9[] = dgSampleD9; - -#define dgSampleDA "__OTR__sound/samples/bowser_organ/02_boys_choir" -static const ALIGN_ASSET(2) char gSampleDA[] = dgSampleDA; - -static const char* gSampleTable[] = { - gSample00, gSample01, gSample02, gSample03, - gSample04, gSample05, gSample06, gSample07, - gSample08, gSample09, gSample0A, gSample0B, - gSample0C, gSample0D, gSample0E, gSample0F, - gSample10, gSample11, gSample12, gSample13, - gSample14, gSample15, gSample16, gSample17, - gSample18, gSample19, gSample1A, gSample1B, - gSample1C, gSample1D, gSample1E, gSample1F, - gSample20, gSample21, gSample22, gSample23, - gSample24, gSample25, gSample26, gSample27, - gSample28, gSample29, gSample2A, gSample2B, - gSample2C, gSample2D, gSample2E, gSample2F, - gSample30, gSample31, gSample32, gSample33, - gSample34, gSample35, gSample36, gSample37, - gSample38, gSample39, gSample3A, gSample3B, - gSample3C, gSample3D, gSample3E, gSample3F, - gSample40, gSample41, gSample42, gSample43, - gSample44, gSample45, gSample46, gSample47, - gSample48, gSample49, gSample4A, gSample4B, - gSample4C, gSample4D, gSample4E, gSample4F, - gSample50, gSample51, gSample52, gSample53, - gSample54, gSample55, gSample56, gSample57, - gSample58, gSample59, gSample5A, gSample5B, - gSample5C, gSample5D, gSample5E, gSample5F, - gSample60, gSample61, gSample62, gSample63, - gSample64, gSample65, gSample66, gSample67, - gSample68, gSample69, gSample6A, gSample6B, - gSample6C, gSample6D, gSample6E, gSample6F, - gSample70, gSample71, gSample72, gSample73, - gSample74, gSample75, gSample76, gSample77, - gSample78, gSample79, gSample7A, gSample7B, - gSample7C, gSample7D, gSample7E, gSample7F, - gSample80, gSample81, gSample82, gSample83, - gSample84, gSample85, gSample86, gSample87, - gSample88, gSample89, gSample8A, gSample8B, - gSample8C, gSample8D, gSample8E, gSample8F, - gSample90, gSample91, gSample92, gSample93, - gSample94, gSample95, gSample96, gSample97, - gSample98, gSample99, gSample9A, gSample9B, - gSample9C, gSample9D, gSample9E, gSample9F, - gSampleA0, gSampleA1, gSampleA2, gSampleA3, - gSampleA4, gSampleA5, gSampleA6, gSampleA7, - gSampleA8, gSampleA9, gSampleAA, gSampleAB, - gSampleAC, gSampleAD, gSampleAE, gSampleAF, - gSampleB0, gSampleB1, gSampleB2, gSampleB3, - gSampleB4, gSampleB5, gSampleB6, gSampleB7, - gSampleB8, gSampleB9, gSampleBA, gSampleBB, - gSampleBC, gSampleBD, gSampleBE, gSampleBF, - gSampleC0, gSampleC1, gSampleC2, gSampleC3, - gSampleC4, gSampleC5, gSampleC6, gSampleC7, - gSampleC8, gSampleC9, gSampleCA, gSampleCB, - gSampleCC, gSampleCD, gSampleCE, gSampleCF, - gSampleD0, gSampleD1, gSampleD2, gSampleD3, - gSampleD4, gSampleD5, gSampleD6, gSampleD7, - gSampleD8, gSampleD9, gSampleDA, -}; diff --git a/include/sequences_table.h b/include/sequences_table.h deleted file mode 100644 index 5572b8f1..00000000 --- a/include/sequences_table.h +++ /dev/null @@ -1,119 +0,0 @@ -#pragma once -#include "align_asset_macro.h" - -#define dgSequence00 "__OTR__sound/sequences/00_sound_player" -static const ALIGN_ASSET(2) char gSequence00[] = dgSequence00; - -#define dgSequence01 "__OTR__sound/sequences/01_cutscene_collect_star" -static const ALIGN_ASSET(2) char gSequence01[] = dgSequence01; - -#define dgSequence02 "__OTR__sound/sequences/02_menu_title_screen" -static const ALIGN_ASSET(2) char gSequence02[] = dgSequence02; - -#define dgSequence03 "__OTR__sound/sequences/03_level_grass" -static const ALIGN_ASSET(2) char gSequence03[] = dgSequence03; - -#define dgSequence04 "__OTR__sound/sequences/04_level_inside_castle" -static const ALIGN_ASSET(2) char gSequence04[] = dgSequence04; - -#define dgSequence05 "__OTR__sound/sequences/05_level_water" -static const ALIGN_ASSET(2) char gSequence05[] = dgSequence05; - -#define dgSequence06 "__OTR__sound/sequences/06_level_hot" -static const ALIGN_ASSET(2) char gSequence06[] = dgSequence06; - -#define dgSequence07 "__OTR__sound/sequences/07_level_boss_koopa" -static const ALIGN_ASSET(2) char gSequence07[] = dgSequence07; - -#define dgSequence08 "__OTR__sound/sequences/08_level_snow" -static const ALIGN_ASSET(2) char gSequence08[] = dgSequence08; - -#define dgSequence09 "__OTR__sound/sequences/09_level_slide" -static const ALIGN_ASSET(2) char gSequence09[] = dgSequence09; - -#define dgSequence0A "__OTR__sound/sequences/0A_level_spooky" -static const ALIGN_ASSET(2) char gSequence0A[] = dgSequence0A; - -#define dgSequence0B "__OTR__sound/sequences/0B_event_piranha_plant" -static const ALIGN_ASSET(2) char gSequence0B[] = dgSequence0B; - -#define dgSequence0C "__OTR__sound/sequences/0C_level_underground" -static const ALIGN_ASSET(2) char gSequence0C[] = dgSequence0C; - -#define dgSequence0D "__OTR__sound/sequences/0D_menu_star_select" -static const ALIGN_ASSET(2) char gSequence0D[] = dgSequence0D; - -#define dgSequence0E "__OTR__sound/sequences/0E_event_powerup" -static const ALIGN_ASSET(2) char gSequence0E[] = dgSequence0E; - -#define dgSequence0F "__OTR__sound/sequences/0F_event_metal_cap" -static const ALIGN_ASSET(2) char gSequence0F[] = dgSequence0F; - -#define dgSequence10 "__OTR__sound/sequences/10_event_koopa_message" -static const ALIGN_ASSET(2) char gSequence10[] = dgSequence10; - -#define dgSequence11 "__OTR__sound/sequences/11_level_koopa_road" -static const ALIGN_ASSET(2) char gSequence11[] = dgSequence11; - -#define dgSequence12 "__OTR__sound/sequences/12_event_high_score" -static const ALIGN_ASSET(2) char gSequence12[] = dgSequence12; - -#define dgSequence13 "__OTR__sound/sequences/13_event_merry_go_round" -static const ALIGN_ASSET(2) char gSequence13[] = dgSequence13; - -#define dgSequence14 "__OTR__sound/sequences/14_event_race" -static const ALIGN_ASSET(2) char gSequence14[] = dgSequence14; - -#define dgSequence15 "__OTR__sound/sequences/15_cutscene_star_spawn" -static const ALIGN_ASSET(2) char gSequence15[] = dgSequence15; - -#define dgSequence16 "__OTR__sound/sequences/16_event_boss" -static const ALIGN_ASSET(2) char gSequence16[] = dgSequence16; - -#define dgSequence17 "__OTR__sound/sequences/17_cutscene_collect_key" -static const ALIGN_ASSET(2) char gSequence17[] = dgSequence17; - -#define dgSequence18 "__OTR__sound/sequences/18_event_endless_stairs" -static const ALIGN_ASSET(2) char gSequence18[] = dgSequence18; - -#define dgSequence19 "__OTR__sound/sequences/19_level_boss_koopa_final" -static const ALIGN_ASSET(2) char gSequence19[] = dgSequence19; - -#define dgSequence1A "__OTR__sound/sequences/1A_cutscene_credits" -static const ALIGN_ASSET(2) char gSequence1A[] = dgSequence1A; - -#define dgSequence1B "__OTR__sound/sequences/1B_event_solve_puzzle" -static const ALIGN_ASSET(2) char gSequence1B[] = dgSequence1B; - -#define dgSequence1C "__OTR__sound/sequences/1C_event_toad_message" -static const ALIGN_ASSET(2) char gSequence1C[] = dgSequence1C; - -#define dgSequence1D "__OTR__sound/sequences/1D_event_peach_message" -static const ALIGN_ASSET(2) char gSequence1D[] = dgSequence1D; - -#define dgSequence1E "__OTR__sound/sequences/1E_cutscene_intro" -static const ALIGN_ASSET(2) char gSequence1E[] = dgSequence1E; - -#define dgSequence1F "__OTR__sound/sequences/1F_cutscene_victory" -static const ALIGN_ASSET(2) char gSequence1F[] = dgSequence1F; - -#define dgSequence20 "__OTR__sound/sequences/20_cutscene_ending" -static const ALIGN_ASSET(2) char gSequence20[] = dgSequence20; - -#define dgSequence21 "__OTR__sound/sequences/21_menu_file_select" -static const ALIGN_ASSET(2) char gSequence21[] = dgSequence21; - -#define dgSequence22 "__OTR__sound/sequences/22_cutscene_lakitu" -static const ALIGN_ASSET(2) char gSequence22[] = dgSequence22; - -static const char* gSequenceTable[] = { - gSequence00, gSequence01, gSequence02, gSequence03, - gSequence04, gSequence05, gSequence06, gSequence07, - gSequence08, gSequence09, gSequence0A, gSequence0B, - gSequence0C, gSequence0D, gSequence0E, gSequence0F, - gSequence10, gSequence11, gSequence12, gSequence13, - gSequence14, gSequence15, gSequence16, gSequence17, - gSequence18, gSequence19, gSequence1A, gSequence1B, - gSequence1C, gSequence1D, gSequence1E, gSequence1F, - gSequence20, gSequence21, gSequence22, -}; diff --git a/src/audio/internal.h b/src/audio/internal.h index fc742066..617e7587 100644 --- a/src/audio/internal.h +++ b/src/audio/internal.h @@ -222,7 +222,7 @@ struct AudioBank { struct CtlEntry { #ifndef VERSION_SH - u8 unused; + u8 bankId; #endif u8 numInstruments; u8 numDrums; @@ -238,6 +238,7 @@ struct AudioSequenceData { u32 bankCount; u8* banks; u8* data; + u8 id; }; struct M64ScriptState { diff --git a/src/audio/load.c b/src/audio/load.c index a67ab03f..131932e9 100644 --- a/src/audio/load.c +++ b/src/audio/load.c @@ -8,7 +8,6 @@ #include "load.h" #include "seqplayer.h" #include "sound/sound_data.h" -#include "sequences_table.h" #include #include @@ -393,7 +392,7 @@ uint8_t* load_sequence_immediate(s32 seqId, s32 arg1) { struct CtlEntry* load_banks_immediate(s32 seqId, u8 *outDefaultBank) { u32 bankId; - struct AudioSequenceData *seqData = ResourceGetDataByName(gSequenceTable[seqId]); + struct AudioSequenceData *seqData = GameEngine_LoadSequence(seqId); struct CtlEntry *output; for(size_t i = 0; i < seqData->bankCount; i++) { output = GameEngine_LoadBank(bankId = seqData->banks[i]); @@ -538,7 +537,7 @@ void audio_init() { #endif // Load headers for sounds and sequences - gSequenceCount = sizeof(gSequenceTable) / sizeof(gSequenceTable[0]); + gSequenceCount = GameEngine_GetSequenceCount(); init_sequence_players(); gAudioLoadLock = AUDIO_LOCK_NOT_LOADING; diff --git a/src/audio/seqplayer.c b/src/audio/seqplayer.c index b9d33c8b..90e29a85 100644 --- a/src/audio/seqplayer.c +++ b/src/audio/seqplayer.c @@ -954,7 +954,6 @@ u8 audioString107[] = "Error: Your assignchannel is stolen.\n"; #else // US/JP version with macros to simulate inlining by copt. Edit if you dare. #include "copt/seq_channel_layer_process_script_copt.inc.c" -#include "sequences_table.h" #endif @@ -1784,7 +1783,7 @@ void sequence_channel_process_script(struct SequenceChannel *seqChannel) { loBits = *(sp38 + gAlBankSets); cmd = gAlBankSets[(s32)sp38 + loBits - cmd]; #else - struct AudioSequenceData *sequence = ResourceGetDataByName(gSequenceTable[seqPlayer->seqId]); + struct AudioSequenceData *sequence = GameEngine_LoadSequence(seqPlayer->seqId); cmd = sequence->banks[cmd]; #endif #ifdef VERSION_SH diff --git a/src/port/Engine.cpp b/src/port/Engine.cpp index 61b3b634..625e027d 100644 --- a/src/port/Engine.cpp +++ b/src/port/Engine.cpp @@ -4,8 +4,6 @@ #include "port/importer/AudioBankFactory.h" #include "port/importer/AudioSampleFactory.h" #include "port/importer/AudioSequenceFactory.h" -#include "banks_table.h" -#include "sequences_table.h" #include "audio/GameAudio.h" #include "ZAPDUtils/Utils/StringHelper.h" #include "texts_table.h" @@ -53,13 +51,13 @@ GameEngine::GameEngine(){ this->context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::Sequence, "Sequence", std::make_shared()); this->context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SDialog, "Dialog", std::make_shared()); this->context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::Dictionary, "Dictionary", std::make_shared()); - GameEngine::AudioInit(); - this->LoadDictionary(); } void GameEngine::Create(){ - GameEngine::Instance = new GameEngine(); + auto instance = GameEngine::Instance = new GameEngine(); GameUI::SetupGuiElements(); + instance->AudioInit(); + instance->LoadDictionary(); } void GameEngine::Destroy(){ @@ -160,7 +158,23 @@ void GameEngine::EndAudioFrame(){ } void GameEngine::AudioInit() { - LUS::Context::GetInstance()->GetResourceManager()->LoadDirectory("sound"); + auto resourceMgr = LUS::Context::GetInstance()->GetResourceManager(); + resourceMgr->LoadDirectory("sound"); + auto banksFiles = resourceMgr->GetArchive()->ListFiles("sound/banks/*"); + + for(auto& bank : *banksFiles){ + auto path = "__OTR__" + bank; + auto ctl = static_cast(ResourceGetDataByName(path.c_str())); + this->bankMapTable[bank] = ctl->bankId; + } + + auto sequencesFiles = resourceMgr->GetArchive()->ListFiles("sound/sequences/*"); + + for(auto& sequence : *sequencesFiles){ + auto path = "__OTR__" + sequence; + auto seq = static_cast(ResourceGetDataByName(path.c_str())); + this->sequencesMapTable[seq->id] = path; + } if (!audio.running) { audio.running = true; @@ -183,6 +197,14 @@ void GameEngine::LoadDictionary() { this->dictionary = static_cast> *>(ResourceGetDataByName("__OTR__texts/strings/global")); } +uint8_t GameEngine::GetBankIdByName(const std::string& name) { + auto engine = GameEngine::Instance; + if(engine->bankMapTable.contains(name)){ + return engine->bankMapTable[name]; + } + return 0; +} + extern "C" uint32_t GameEngine_GetInterpolatedFPS() { return GameEngine::GetInterpolationFPS(); } @@ -212,15 +234,20 @@ extern "C" float GameEngine_GetAspectRatio() { extern "C" CtlEntry* GameEngine_LoadBank(uint8_t bankId) { auto engine = GameEngine::Instance; - if(bankId > (sizeof(gBankTable) / sizeof(gBankTable[0])) - 1){ + if(bankId >= engine->bankMapTable.size()){ return nullptr; } if(engine->banks.contains(bankId)){ return engine->banks[bankId]; } - auto ctl = static_cast(ResourceGetDataByName(gBankTable[bankId])); - engine->banks[bankId] = ctl; - return ctl; + for(auto& bank : engine->bankMapTable){ + if(bank.second == bankId){ + auto ctl = static_cast(ResourceGetDataByName(("__OTR__" + bank.first).c_str())); + engine->banks[bankId] = ctl; + return ctl; + } + } + return nullptr; } extern "C" uint8_t GameEngine_IsBankLoaded(uint8_t bankId) { @@ -238,17 +265,24 @@ extern "C" void GameEngine_UnloadBank(uint8_t bankId) { extern "C" AudioSequenceData* GameEngine_LoadSequence(uint8_t seqId) { auto engine = GameEngine::Instance; - if(seqId > (sizeof(gSequenceTable) / sizeof(gSequenceTable[0])) - 1){ + if(!engine->sequencesMapTable.contains(seqId)){ return nullptr; } + if(engine->sequences.contains(seqId)){ return engine->sequences[seqId]; } - auto sequences = static_cast(ResourceGetDataByName(gSequenceTable[seqId])); + + auto sequences = static_cast(ResourceGetDataByName(engine->sequencesMapTable[seqId].c_str())); engine->sequences[seqId] = sequences; return sequences; } +extern "C" uint32_t GameEngine_GetSequenceCount(){ + auto engine = GameEngine::Instance; + return engine->sequencesMapTable.size(); +} + extern "C" uint8_t GameEngine_IsSequenceLoaded(uint8_t seqId) { auto engine = GameEngine::Instance; GameEngine_LoadSequence(seqId); diff --git a/src/port/Engine.h b/src/port/Engine.h index f9b75072..735a3e08 100644 --- a/src/port/Engine.h +++ b/src/port/Engine.h @@ -22,10 +22,13 @@ class GameEngine { std::shared_ptr context; std::unordered_map banks; std::unordered_map sequences; + std::unordered_map bankMapTable; + std::unordered_map sequencesMapTable; std::unordered_map>* dictionary; GameEngine(); static void Create(); + void AudioInit(); void StartFrame() const; static void RunCommands(Gfx* Commands); void ProcessFrame(void (*run_one_game_iter)()) const; @@ -33,14 +36,13 @@ class GameEngine { static void HandleAudioThread(); static void StartAudioFrame(); static void EndAudioFrame(); - static void AudioInit(); static void AudioExit(); + static uint8_t GetBankIdByName(const std::string& name); void LoadDictionary(); void Destroy(); }; #else - uint32_t GameEngine_GetInterpolatedFPS(); uint32_t GameEngine_GetSampleRate(); uint32_t GameEngine_GetSamplesPerFrame(); @@ -49,6 +51,7 @@ struct CtlEntry* GameEngine_LoadBank(uint8_t bankId); uint8_t GameEngine_IsBankLoaded(uint8_t bankId); void GameEngine_UnloadBank(uint8_t bankId); struct AudioSequenceData* GameEngine_LoadSequence(uint8_t seqId); +uint32_t GameEngine_GetSequenceCount(); uint8_t GameEngine_IsSequenceLoaded(uint8_t seqId); void GameEngine_UnloadSequence(uint8_t seqId); uint32_t GameEngine_GetGameVersion(); diff --git a/src/port/importer/AudioBankFactory.cpp b/src/port/importer/AudioBankFactory.cpp index 10931d4a..cbd79cf1 100644 --- a/src/port/importer/AudioBankFactory.cpp +++ b/src/port/importer/AudioBankFactory.cpp @@ -30,11 +30,11 @@ void CubeOS::AudioBankFactoryV0::ParseFileBinary(std::shared_ptrReadUInt32(); uint32_t instrumentCount = reader->ReadUInt32(); for(size_t i = 0; i < instrumentCount; i++){ auto* instrument = new Instrument(); -// memset(instrument, 0, sizeof(Instrument)); bool valid = reader->ReadUByte(); if(!valid){ bank->instruments.push_back(nullptr); @@ -104,7 +104,7 @@ void CubeOS::AudioBankFactoryV0::ParseFileBinary(std::shared_ptrdrums.push_back(drum); } - bank->mData.unused = 1; + bank->mData.bankId = bankId; bank->mData.numInstruments = instrumentCount; bank->mData.numDrums = drumCount; bank->mData.instruments = bank->instruments.data(); diff --git a/src/port/importer/AudioSequenceFactory.cpp b/src/port/importer/AudioSequenceFactory.cpp index 88496bf8..f260617c 100644 --- a/src/port/importer/AudioSequenceFactory.cpp +++ b/src/port/importer/AudioSequenceFactory.cpp @@ -1,6 +1,8 @@ #include "AudioSequenceFactory.h" #include "port/importer/types/AudioSequence.h" #include "spdlog/spdlog.h" +#include "port/Engine.h" +#include "port/importer/types/AudioBank.h" std::shared_ptr CubeOS::AudioSequenceFactory::ReadResource(std::shared_ptr initData, std::shared_ptr reader) { auto resource = std::make_shared(initData); @@ -27,9 +29,11 @@ void CubeOS::AudioSequenceFactoryV0::ParseFileBinary(std::shared_ptrReadUInt32(); size_t bankCount = reader->ReadUInt32(); for(size_t i = 0; i < bankCount; i++){ - bank->banks.push_back(reader->ReadUByte()); + std::string bankName = reader->ReadString(); + bank->banks.push_back(GameEngine::GetBankIdByName(bankName)); } size_t sampleSize = reader->ReadUInt32(); @@ -40,4 +44,5 @@ void CubeOS::AudioSequenceFactoryV0::ParseFileBinary(std::shared_ptrmData.bankCount = bankCount; bank->mData.banks = bank->banks.data(); bank->mData.data = bank->sampleData.data(); + bank->mData.id = id; } \ No newline at end of file diff --git a/src/port/importer/types/AudioBank.h b/src/port/importer/types/AudioBank.h index fbb24d11..bb3c965c 100644 --- a/src/port/importer/types/AudioBank.h +++ b/src/port/importer/types/AudioBank.h @@ -34,7 +34,7 @@ struct Drum { }; struct CtlEntry { - uint8_t unused; + uint8_t bankId; uint8_t numInstruments; uint8_t numDrums; struct Instrument **instruments; diff --git a/src/port/importer/types/AudioSequence.h b/src/port/importer/types/AudioSequence.h index 8f29c92b..5001e60b 100644 --- a/src/port/importer/types/AudioSequence.h +++ b/src/port/importer/types/AudioSequence.h @@ -7,6 +7,7 @@ struct AudioSequenceData { uint32_t bankCount; uint8_t* banks; uint8_t* data; + uint8_t id; }; namespace CubeOS {