mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-11 09:20:17 +00:00
[Audio 8/?] Check-in handwritten sequences, build sequences, automate various sfx arrays (#2137)
* [Audio 8/?] Check-in handwritten sequences, build sequences, automate various sfx arrays * Fix whitespace in aseq.h * Fix sequence 0 sfx id generator * Suggested changes, adjust some MML syntax and add more instruction descriptions * Correct some formatting in aseq.h * Add the dir of the input .seq file to the list of includes to sequence assembling so that assembler-level includes like .include or .incbin work intuitively * aseq.h tweaks * MM review suggestions, aseq.h adjustments
This commit is contained in:
parent
03a1502706
commit
dbbeb656f8
34 changed files with 22983 additions and 1657 deletions
|
@ -79,7 +79,31 @@ typedef struct OcarinaStick {
|
|||
s8 y;
|
||||
} OcarinaStick;
|
||||
|
||||
u8 gIsLargeSfxBank[7] = { 0, 0, 0, 1, 0, 0, 0 };
|
||||
#define DEFINE_SFX(_0, _1, _2, _3, _4, _5) 1 +
|
||||
u8 gIsLargeSfxBank[7] = {
|
||||
(
|
||||
#include "tables/sfx/playerbank_table.h"
|
||||
0) > UINT8_MAX,
|
||||
(
|
||||
#include "tables/sfx/itembank_table.h"
|
||||
0) > UINT8_MAX,
|
||||
(
|
||||
#include "tables/sfx/environmentbank_table.h"
|
||||
0) > UINT8_MAX,
|
||||
(
|
||||
#include "tables/sfx/enemybank_table.h"
|
||||
0) > UINT8_MAX,
|
||||
(
|
||||
#include "tables/sfx/systembank_table.h"
|
||||
0) > UINT8_MAX,
|
||||
(
|
||||
#include "tables/sfx/ocarinabank_table.h"
|
||||
0) > UINT8_MAX,
|
||||
(
|
||||
#include "tables/sfx/voicebank_table.h"
|
||||
0) > UINT8_MAX,
|
||||
};
|
||||
#undef DEFINE_SFX
|
||||
|
||||
// Only the first row of these is supported by sequence 0. (gSfxChannelLayout is always 0.)
|
||||
u8 gChannelsPerBank[4][7] = {
|
||||
|
@ -168,122 +192,13 @@ u8 sSeqModeInput = 0;
|
|||
#define SEQ_FLAG_SKIP_HARP_INTRO (1 << 6)
|
||||
#define SEQ_FLAG_NO_AMBIENCE (1 << 7)
|
||||
|
||||
#define DEFINE_SEQUENCE(name, seqId, storageMedium, cachePolicy, seqFlags) seqFlags,
|
||||
#define DEFINE_SEQUENCE_PTR(seqIdReal, seqId, storageMediumReal, cachePolicyReal, seqFlags) seqFlags,
|
||||
u8 sSeqFlags[] = {
|
||||
#if PLATFORM_N64
|
||||
SEQ_FLAG_FANFARE | SEQ_FLAG_ENEMY, // NA_BGM_GENERAL_SFX
|
||||
#else
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_GENERAL_SFX
|
||||
#endif
|
||||
SEQ_FLAG_ENEMY, // NA_BGM_NATURE_BACKGROUND
|
||||
0, // NA_BGM_FIELD_LOGIC
|
||||
0, // NA_BGM_FIELD_INIT
|
||||
0, // NA_BGM_FIELD_DEFAULT_1
|
||||
0, // NA_BGM_FIELD_DEFAULT_2
|
||||
0, // NA_BGM_FIELD_DEFAULT_3
|
||||
0, // NA_BGM_FIELD_DEFAULT_4
|
||||
0, // NA_BGM_FIELD_DEFAULT_5
|
||||
0, // NA_BGM_FIELD_DEFAULT_6
|
||||
0, // NA_BGM_FIELD_DEFAULT_7
|
||||
0, // NA_BGM_FIELD_DEFAULT_8
|
||||
0, // NA_BGM_FIELD_DEFAULT_9
|
||||
0, // NA_BGM_FIELD_DEFAULT_A
|
||||
0, // NA_BGM_FIELD_DEFAULT_B
|
||||
0, // NA_BGM_FIELD_ENEMY_INIT
|
||||
0, // NA_BGM_FIELD_ENEMY_1
|
||||
0, // NA_BGM_FIELD_ENEMY_2
|
||||
0, // NA_BGM_FIELD_ENEMY_3
|
||||
0, // NA_BGM_FIELD_ENEMY_4
|
||||
0, // NA_BGM_FIELD_STILL_1
|
||||
0, // NA_BGM_FIELD_STILL_2
|
||||
0, // NA_BGM_FIELD_STILL_3
|
||||
0, // NA_BGM_FIELD_STILL_4
|
||||
SEQ_FLAG_RESUME_PREV | SEQ_FLAG_ENEMY, // NA_BGM_DUNGEON
|
||||
SEQ_FLAG_RESUME, // NA_BGM_KAKARIKO_ADULT
|
||||
0, // NA_BGM_ENEMY
|
||||
SEQ_FLAG_NO_AMBIENCE | SEQ_FLAG_RESTORE, // NA_BGM_BOSS
|
||||
SEQ_FLAG_ENEMY, // NA_BGM_INSIDE_DEKU_TREE
|
||||
0, // NA_BGM_MARKET
|
||||
0, // NA_BGM_TITLE
|
||||
SEQ_FLAG_RESUME_PREV, // NA_BGM_LINK_HOUSE
|
||||
0, // NA_BGM_GAME_OVER
|
||||
0, // NA_BGM_BOSS_CLEAR
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_ITEM_GET
|
||||
SEQ_FLAG_FANFARE_GANON, // NA_BGM_OPENING_GANON
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_HEART_GET
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OCA_LIGHT
|
||||
SEQ_FLAG_ENEMY, // NA_BGM_JABU_JABU
|
||||
SEQ_FLAG_RESUME, // NA_BGM_KAKARIKO_KID
|
||||
0, // NA_BGM_GREAT_FAIRY
|
||||
0, // NA_BGM_ZELDA_THEME
|
||||
SEQ_FLAG_ENEMY, // NA_BGM_FIRE_TEMPLE
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OPEN_TRE_BOX
|
||||
SEQ_FLAG_ENEMY, // NA_BGM_FOREST_TEMPLE
|
||||
0, // NA_BGM_COURTYARD
|
||||
SEQ_FLAG_NO_AMBIENCE, // NA_BGM_GANON_TOWER
|
||||
0, // NA_BGM_LONLON
|
||||
SEQ_FLAG_NO_AMBIENCE, // NA_BGM_GORON_CITY
|
||||
0, // NA_BGM_FIELD_MORNING
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_SPIRITUAL_STONE
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OCA_BOLERO
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OCA_MINUET
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OCA_SERENADE
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OCA_REQUIEM
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OCA_NOCTURNE
|
||||
SEQ_FLAG_NO_AMBIENCE | SEQ_FLAG_RESTORE, // NA_BGM_MINI_BOSS
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_SMALL_ITEM_GET
|
||||
0, // NA_BGM_TEMPLE_OF_TIME
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_EVENT_CLEAR
|
||||
SEQ_FLAG_RESUME | SEQ_FLAG_ENEMY, // NA_BGM_KOKIRI
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OCA_FAIRY_GET
|
||||
SEQ_FLAG_ENEMY, // NA_BGM_SARIA_THEME
|
||||
SEQ_FLAG_ENEMY, // NA_BGM_SPIRIT_TEMPLE
|
||||
0, // NA_BGM_HORSE
|
||||
0, // NA_BGM_HORSE_GOAL
|
||||
0, // NA_BGM_INGO
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_MEDALLION_GET
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OCA_SARIA
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OCA_EPONA
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OCA_ZELDA
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OCA_SUNS
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OCA_TIME
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OCA_STORM
|
||||
0, // NA_BGM_NAVI_OPENING
|
||||
0, // NA_BGM_DEKU_TREE_CS
|
||||
0, // NA_BGM_WINDMILL
|
||||
0, // NA_BGM_HYRULE_CS
|
||||
SEQ_FLAG_RESUME_PREV, // NA_BGM_MINI_GAME
|
||||
0, // NA_BGM_SHEIK
|
||||
SEQ_FLAG_RESUME, // NA_BGM_ZORA_DOMAIN
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_APPEAR
|
||||
0, // NA_BGM_ADULT_LINK
|
||||
0, // NA_BGM_MASTER_SWORD
|
||||
SEQ_FLAG_FANFARE_GANON, // NA_BGM_INTRO_GANON
|
||||
SEQ_FLAG_RESUME_PREV, // NA_BGM_SHOP
|
||||
SEQ_FLAG_SKIP_HARP_INTRO, // NA_BGM_CHAMBER_OF_SAGES
|
||||
SEQ_FLAG_SKIP_HARP_INTRO, // NA_BGM_FILE_SELECT
|
||||
SEQ_FLAG_ENEMY, // NA_BGM_ICE_CAVERN
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_DOOR_OF_TIME
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_OWL
|
||||
SEQ_FLAG_ENEMY, // NA_BGM_SHADOW_TEMPLE
|
||||
SEQ_FLAG_ENEMY, // NA_BGM_WATER_TEMPLE
|
||||
SEQ_FLAG_FANFARE, // NA_BGM_BRIDGE_TO_GANONS
|
||||
0, // NA_BGM_OCARINA_OF_TIME
|
||||
SEQ_FLAG_RESUME | SEQ_FLAG_ENEMY, // NA_BGM_GERUDO_VALLEY
|
||||
0, // NA_BGM_POTION_SHOP
|
||||
0, // NA_BGM_KOTAKE_KOUME
|
||||
SEQ_FLAG_NO_AMBIENCE, // NA_BGM_ESCAPE
|
||||
0, // NA_BGM_UNDERGROUND
|
||||
SEQ_FLAG_NO_AMBIENCE, // NA_BGM_GANON_BATTLE_1
|
||||
SEQ_FLAG_NO_AMBIENCE, // NA_BGM_GANON_BATTLE_2
|
||||
0, // NA_BGM_END_DEMO
|
||||
0, // NA_BGM_STAFF_1
|
||||
0, // NA_BGM_STAFF_2
|
||||
0, // NA_BGM_STAFF_3
|
||||
0, // NA_BGM_STAFF_4
|
||||
0, // NA_BGM_FIRE_BOSS
|
||||
SEQ_FLAG_RESTORE, // NA_BGM_TIMED_MINI_GAME
|
||||
0, // NA_BGM_CUTSCENE_EFFECTS
|
||||
#include "tables/sequence_table.h"
|
||||
};
|
||||
#undef DEFINE_SEQUENCE
|
||||
#undef DEFINE_SEQUENCE_PTR
|
||||
|
||||
s8 sSpecReverbs[20] = { 0, 0, 0, 0, 0, 0, 0, 40, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
#define DEFINE_SFX(_0, importance, distParam, randParam, flags) \
|
||||
#define DEFINE_SFX(_0, _1, importance, distParam, randParam, flags) \
|
||||
{ importance, ((((distParam) << SFX_PARAM_01_SHIFT) & SFX_PARAM_01_MASK) | \
|
||||
(((randParam) << SFX_PARAM_67_SHIFT) & SFX_PARAM_67_MASK) | (flags)) },
|
||||
|
||||
|
|
51
src/audio/tables/sequence_table.c
Normal file
51
src/audio/tables/sequence_table.c
Normal file
|
@ -0,0 +1,51 @@
|
|||
#include "attributes.h"
|
||||
#include "z64audio.h"
|
||||
|
||||
// Symbol definition
|
||||
|
||||
extern AudioTable gSequenceTable;
|
||||
#pragma weak gSequenceTable = sSequenceTableHeader
|
||||
|
||||
// Externs for table
|
||||
|
||||
#define DEFINE_SEQUENCE(name, seqId, storageMedium, cachePolicy, seqFlags) \
|
||||
extern u8 name##_Start[]; \
|
||||
extern u8 name##_Size[];
|
||||
#define DEFINE_SEQUENCE_PTR(seqIdReal, seqId, storageMediumReal, cachePolicyReal, seqFlags) /*empty*/
|
||||
|
||||
#include "tables/sequence_table.h"
|
||||
|
||||
#undef DEFINE_SEQUENCE
|
||||
#undef DEFINE_SEQUENCE_PTR
|
||||
|
||||
// Table header
|
||||
|
||||
NO_REORDER AudioTableHeader sSequenceTableHeader = {
|
||||
// The table contains the number of sequences, count them with the preprocessor
|
||||
#define DEFINE_SEQUENCE(name, seqId, storageMedium, cachePolicy, seqFlags) 1 +
|
||||
#define DEFINE_SEQUENCE_PTR(seqIdReal, seqId, storageMediumReal, cachePolicyReal, seqFlags) 1 +
|
||||
|
||||
#include "tables/sequence_table.h"
|
||||
|
||||
#undef DEFINE_SEQUENCE
|
||||
#undef DEFINE_SEQUENCE_PTR
|
||||
0,
|
||||
|
||||
0,
|
||||
0x00000000,
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
};
|
||||
|
||||
// Table body
|
||||
|
||||
NO_REORDER AudioTableEntry sSequenceTableEntries[] = {
|
||||
#define DEFINE_SEQUENCE(name, seqId, storageMedium, cachePolicy, seqFlags) \
|
||||
{ (u32)name##_Start, (u32)name##_Size, (storageMedium), (cachePolicy), 0, 0, 0 },
|
||||
#define DEFINE_SEQUENCE_PTR(seqIdReal, seqId, storageMediumReal, cachePolicyReal, seqFlags) \
|
||||
{ (seqIdReal), 0, (storageMediumReal), (cachePolicyReal), 0, 0, 0 },
|
||||
|
||||
#include "tables/sequence_table.h"
|
||||
|
||||
#undef DEFINE_SEQUENCE
|
||||
#undef DEFINE_SEQUENCE_PTR
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue