Updated vs decomp

This commit is contained in:
KiritoDv
2024-12-24 23:25:42 -06:00
committed by Lywx
parent d5ac40a4de
commit f40105e778
73 changed files with 1850 additions and 1205 deletions
+2 -2
View File
@@ -920,8 +920,8 @@ D_102A010:
D_102A098:
{ type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x102A098, symbol: D_102A098 }
aRadarMarkKaSaucererDL:
{ type: GFX, offset: 0x102A8A0, symbol: aRadarMarkKaSaucererDL }
aBallDL:
{ type: GFX, offset: 0x102A8A0, symbol: aBallDL }
D_102A928:
{ type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x102A928, symbol: D_102A928 }
+18 -18
View File
@@ -29,21 +29,21 @@ f7475fb11e7e6830f82883412638e8390791ab87:
- include/sf64event.h
- include/sf64player.h
d064229a32cc05ab85e2381ce07744eb3ffaf530:
name: Star Fox 64 (JP) (V1.0)
path: assets/yaml/jp/rev0
config:
gbi: F3DEX
sort: OFFSET
output:
binary: mods/sf64jp.otr
code: src/assets
headers: include/assets
modding: src/assets
enums:
- include/sf64object.h
- include/sf64level.h
- include/sf64mesg.h
- include/sf64audio_external.h
- include/sf64event.h
- include/sf64player.h
# d064229a32cc05ab85e2381ce07744eb3ffaf530:
# name: Star Fox 64 (JP) (V1.0)
# path: assets/yaml/jp/rev0
# config:
# gbi: F3DEX
# sort: OFFSET
# output:
# binary: starship.otr
# code: src/assets
# headers: include/assets
# modding: src/assets
# enums:
# - include/sf64object.h
# - include/sf64level.h
# - include/sf64mesg.h
# - include/sf64audio_external.h
# - include/sf64event.h
# - include/sf64player.h
+1 -1
View File
@@ -787,7 +787,7 @@ static const ALIGN_ASSET(2) char ast_common_seg1_vtx_2A068[] = "__OTR__ast_commo
static const ALIGN_ASSET(2) char D_102A098[] = "__OTR__ast_common/D_102A098";
static const ALIGN_ASSET(2) char aRadarMarkKaSaucererDL[] = "__OTR__ast_common/aRadarMarkKaSaucererDL";
static const ALIGN_ASSET(2) char aBallDL[] = "__OTR__ast_common/aBallDL";
static const ALIGN_ASSET(2) char ast_common_seg1_vtx_2A8F8[] = "__OTR__ast_common/ast_common_seg1_vtx_2A8F8";
+6
View File
@@ -81,7 +81,12 @@ typedef enum BgmSeqIds {
/* 63 */ SEQ_ID_TRAINING,
/* 64 */ SEQ_ID_VE_CLEAR,
/* 65 */ SEQ_ID_BOSS_RESUME,
#ifdef VERSION_EU
/* 66 */ SEQ_ID_VOICE_LYLAT,
/* 67 */ SEQ_ID_MAX,
#else
/* 66 */ SEQ_ID_MAX,
#endif
/* -1 */ SEQ_ID_NONE = 0xFFFF,
} BgmSeqIds;
@@ -89,6 +94,7 @@ typedef enum BgmSeqIds {
#define NA_BGM_SE (SEQ_ID_SFX)
#define NA_BGM_VO (SEQ_ID_VOICE)
#define NA_BGM_VO_LYLAT (SEQ_ID_VOICE_LYLAT)
#define NA_BGM_STAGE_CO (SEQ_ID_CORNERIA | SEQ_FLAG)
#define NA_BGM_STAGE_ME (SEQ_ID_METEO | SEQ_FLAG)
#define NA_BGM_STAGE_TI (SEQ_ID_TITANIA | SEQ_FLAG)
+15 -9
View File
@@ -57,19 +57,25 @@ typedef enum OptionId {
/* 1000 */ OPTION_MAIN_MENU = 1000,
/* 2000 */ OPTION_VERSUS_STAGE = 2000,
/* 0 */ OPTION_MAP = 0,
/* 1 */ OPTION_TRAINING = 1,
/* 2 */ OPTION_VERSUS = 2,
/* 3 */ OPTION_RANKING = 3,
/* 4 */ OPTION_SOUND = 4,
/* 5 */ OPTION_DATA = 5,
/* 6 */ OPTION_EXPERT_SOUND = 6,
/* 1 */ OPTION_TRAINING,
/* 2 */ OPTION_VERSUS,
/* 3 */ OPTION_RANKING,
/* 4 */ OPTION_SOUND,
#ifdef VERSION_EU
/* 5 */ OPTION_LANGUAGE,
/* 6 */ OPTION_DATA,
/* 7 */ OPTION_EXPERT_SOUND,
#else
/* 5 */ OPTION_DATA,
/* 6 */ OPTION_EXPERT_SOUND,
#endif
/* 10 */ OPTION_POINT_MATCH = 10, // Point Match
/* 20 */ OPTION_BR_MATCH = 20, // Battle Royal Match
/* 30 */ OPTION_TT_MATCH = 30, // Time Trial Match
/* 200 */ OPTION_NAME_ENTRY = 200,
/* 300 */ OPTION_SCORE = 300,
/* 400 */ OPTION_INVOICE = 400,
/* 401 */ OPTION_MAX,
/* 401 */ OPTION_MAX
} OptionId;
extern u8* gBSSMapPlanetTextures[9];
@@ -196,8 +202,8 @@ void Option_SetMenuLightPos(f32, f32, f32, f32*, f32*, f32*);
void Option_CardLightning_Update(void);
void Option_CardLightning_Draw(void);
void Option_DrawCardLabel(OptionCardTexture tex);
bool Option_Input_MoveCursor_Y(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 controllerNum,
StickInput* stickY);
bool Option_Input_MoveCursor_Y(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6,
s32 controllerNum, StickInput* stickY);
s32 Option_Input_DataSelect_X(s32*);
bool Option_Input_Sound_X(f32* arg0, f32 arg1, f32 arg2, StickInput* arg3);
void Option_Color_FlashRed(f32*);
+2 -2
View File
@@ -403,7 +403,7 @@ s32 HUD_8008CB8C(void);
void HUD_VS_ShieldGaugeTex_Draw(f32, f32, f32, f32, f32);
void HUD_DrawBossHealth(void);
void HUD_DrawCountdown(s32* , f32);
void HUD_Shield_GoldRings_HitPoints(f32, f32);
void HUD_Shield_GoldRings_Score(f32, f32);
void HUD_BombCounter_Draw(f32, f32);
void HUD_Draw(void);
void FoBase_Draw(Boss*);
@@ -424,7 +424,7 @@ void Aquas_AqRock_Setup(Actor*, s32);
void Aquas_CsLevelComplete(Player*);
void Aquas_Effect363_Update(Effect*);
void Aquas_Effect363_Draw(Effect*);
void HUD_Hitpoints_Draw(f32, f32);
void HUD_Score_Draw(f32, f32);
void Venom1_LevelStart2(Player* player);
// fox_col1
+1 -1
View File
@@ -37,7 +37,7 @@ void Titania_TiDelphorHead_Init(Actor *);
void Titania_TiCactus_Init(Sprite *);
void Titania_TiPillar_Init(Scenery *);
void Titania_TiGoras_Init(Boss *);
void Titania_801990DC(Boss *);
void Titania_TiGoras_Dying(Boss *);
void Macbeth_InitLevel(void);
void Macbeth_Train_Init(Actor *);
void Macbeth_MaMaRailroadSwitch_Init(Actor *);
+4
View File
@@ -12,6 +12,10 @@
#define TIME_IN_SECONDS(x) (x * 30);
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))
#define RAND_FLOAT(max) (Rand_ZeroOne()*(max))
#define RAND_INT(max) ((s32)(Rand_ZeroOne()*(max)))
#define RAND_FLOAT_CENTERED(width) ((Rand_ZeroOne()-0.5f)*(width))
+3 -3
View File
@@ -1,7 +1,7 @@
#ifndef PREVENT_CONTEXT_REORDERING_H
#define PREVENT_CONTEXT_REORDERING_H
// extern int Dummyhalf;
extern int Dummyhalf;
// struct Dummy0 {int x;};
// struct Dummy1 {int x;};
// struct Dummy2 {int x;};
@@ -17,8 +17,8 @@
// struct Dummy12 {int x;};
// struct Dummy13 {int x;};
// struct Dummy14 {int x;};
struct Dummy15 {int x;};
struct Dummy16 {int x;};
// struct Dummy15 {int x;};
// struct Dummy16 {int x;};
struct Dummy17 {int x;};
struct Dummy18 {int x;};
struct Dummy19 {int x;};
+6 -6
View File
@@ -52,7 +52,7 @@ typedef void (*AudioCustomUpdateFunction)(void);
// Samples are processed in groups of 16 called a "frame"
#define SAMPLES_PER_FRAME ADPCMFSIZE
// The length of one left/right channel is 13 frames
// The length of one left/right channel is 12 frames
#define DMEM_1CH_SIZE (12 * SAMPLES_PER_FRAME * SAMPLE_SIZE)
// Both left and right channels
#define DMEM_2CH_SIZE (2 * DMEM_1CH_SIZE)
@@ -1059,20 +1059,20 @@ void AudioLoad_DiscardSeqFonts(s32 seqId);
s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status);
// audio_playback
TunedSample* Audio_GetInstrumentTunedSample(Instrument* instrument, s32 arg1);
TunedSample* Audio_GetInstrumentTunedSample(Instrument* instrument, s32 semitone);
Instrument* Audio_GetInstrument(s32, s32);
Drum* Audio_GetDrum(s32, s32);
void func_80011F4C(Note* note);
void Audio_NoteDisable(Note* note);
void Audio_ProcessNotes(void);
void Audio_SeqLayerNoteDecay(SequenceLayer* layer);
void Audio_InitSyntheticWave(Note* note, SequenceLayer* layer);
void Audio_InitNoteLists(NotePool* pool);
void func_800128B4(void);
void Audio_InitNoteFreeList(void);
void Audio_NotePoolClear(NotePool* pool);
void Audio_NotePoolFill(NotePool* pool, s32);
void func_80012C40(Note* note);
void Audio_AudioListRemove(Note* note);
Note* Audio_AllocNote(SequenceLayer* layer);
void func_800132E8(void);
void Audio_NoteInitAll(void);
// audio_seqplayer
void AudioSeq_SequenceChannelDisable(SequenceChannel* channel);
+42 -32
View File
@@ -8,6 +8,16 @@
#define HITBOX_SHADOW 300000.0f
#define HITBOX_WHOOSH 400000.0f
#define TEAM_FACE (14)
typedef enum ActorCSTeamFace {
/* 0 */ FACE_NONE,
/* 1 */ FACE_FOX,
/* 2 */ FACE_FALCO,
/* 3 */ FACE_SLIPPY,
/* 4 */ FACE_PEPPY
} ActorCSTeamFace;
typedef struct {
/* 0x0 */ f32 offset;
/* 0x4 */ f32 size;
@@ -488,7 +498,7 @@ typedef enum ObjectId {
/* 179 */ OBJ_ACTOR_CO_GARUDA_DESTROY,
/* 180 */ OBJ_ACTOR_ME_MOLAR_ROCK,
/* 181 */ OBJ_ACTOR_ME_METEOR_1,
/* 182 */ OBJ_ACTOR_ME_METEOR_2, // Smaller than Meteor 1
/* 182 */ OBJ_ACTOR_ME_METEOR_2, // Smaller than Meteor 1, used in Meteo intro cutscene.
/* 183 */ OBJ_ACTOR_ME_METEOR_SHOWER_1,
/* 184 */ OBJ_ACTOR_ME_METEOR_SHOWER_2,
/* 185 */ OBJ_ACTOR_ME_METEOR_SHOWER_3,
@@ -496,8 +506,8 @@ typedef enum ObjectId {
/* 187 */ OBJ_ACTOR_ME_LASER_CANNON_2,
/* 188 */ OBJ_ACTOR_AQ_UNK_188, // Unimplemented actor.
/* 189 */ OBJ_ACTOR_DEBRIS,
/* 190 */ OBJ_MISSILE_SEEK_TEAM,
/* 191 */ OBJ_MISSILE_SEEK_PLAYER,
/* 190 */ OBJ_ACTOR_MISSILE_SEEK_TEAM,
/* 191 */ OBJ_ACTOR_MISSILE_SEEK_PLAYER,
/* 192 */ OBJ_ACTOR_CO_SKIBOT,
/* 193 */ OBJ_ACTOR_CO_RADAR,
/* 194 */ OBJ_ACTOR_ME_MORA,
@@ -561,7 +571,7 @@ typedef enum ObjectId {
/* 252 */ OBJ_ACTOR_ZO_RADARBUOY, // Zoness searchlight.
/* 253 */ OBJ_ACTOR_ZO_SUPPLYCRANE,
/* 254 */ OBJ_ACTOR_ZO_SEARCHLIGHT,
/* 255 */ OBJ_ACTOR_255,
/* 255 */ OBJ_ACTOR_255, // OBJ_ACTOR_AQ_SANADA (Named after from SFX_ID)
/* 256 */ OBJ_ACTOR_256,
/* 257 */ OBJ_ACTOR_257,
/* 258 */ OBJ_ACTOR_AQ_PEARL,
@@ -780,34 +790,34 @@ typedef enum AllRangeAi {
} AllRangeAi;
typedef enum ActorCutsceneModels {
/* 0 */ ACTOR_CS_TEAM_ARWING,
/* 1 */ ACTOR_CS_GREAT_FOX,
/* 10 */ ACTOR_CS_ME_CORNERIA_BG = 10, // Planet Corneria in the background of level start CS.
/* 11 */ ACTOR_CS_FO_EXPLOSION, // Fortuna explosion in a mission complete ending.
/* 20 */ ACTOR_CS_COMMANDER = 20,
/* 24 */ ACTOR_CS_KATT = 24,
/* 25 */ ACTOR_CS_SZ_SPACE_JUNK,
/* 26 */ ACTOR_CS_SZ_INVADER,
/* 28 */ ACTOR_CS_COMMANDER_GLOW = 28, // Commander with Engine Glow.
/* 30 */ ACTOR_CS_30 = 30, // Related to LEVEL_BOLSE
/* 31 */ ACTOR_CS_31,
/* 32 */ ACTOR_CS_32,
/* 33 */ ACTOR_CS_CORNERIAN_FIGHTER, // Bill's ship when actor->index is 3.
/* 34 */ ACTOR_CS_KA_ENEMY,
/* 35 */ ACTOR_CS_SY_SHIP_1_SHRINK, // Scale Matrix by 1/8.
/* 36 */ ACTOR_CS_SY_SHIP_2,
/* 37 */ ACTOR_CS_37,
/* 38 */ ACTOR_CS_38, // Related to Sector Y
/* 39 */ ACTOR_CS_SY_SHIP_1 = 39,
/* 40 */ ACTOR_CS_40,
/* 41 */ ACTOR_CS_AQ_FISHGROUP,
/* 42 */ ACTOR_CS_42, // Related to Sector Y
/* 43 */ ACTOR_CS_43, // Related to Sector Y
/* 44 */ ACTOR_CS_AQ_SEAWEED,
/* 45 */ ACTOR_CS_AQ_BUMP_2,
/* 46 */ ACTOR_CS_AQ_CORAL_REEF_2,
/* 47 */ ACTOR_CS_AQ_ROCK,
/* 1000 */ ACTOR_CS_1000 = 1000 // James? Is that you?
/* 0 */ ACTOR_CS_TEAM_ARWING,
/* 1 */ ACTOR_CS_GREAT_FOX,
/* 10 */ ACTOR_CS_ME_CORNERIA_BG = 10, // Planet Corneria in the background of level start CS.
/* 11 */ ACTOR_CS_FO_EXPLOSION, // Fortuna explosion in a mission complete ending.
/* 20 */ ACTOR_CS_COMMANDER = 20,
/* 24 */ ACTOR_CS_KATT = 24,
/* 25 */ ACTOR_CS_SZ_SPACE_JUNK,
/* 26 */ ACTOR_CS_SZ_INVADER,
/* 28 */ ACTOR_CS_COMMANDER_GLOW = 28, // Commander with Engine Glow.
/* 30 */ ACTOR_CS_30 = 30, // Related to LEVEL_BOLSE
/* 31 */ ACTOR_CS_31,
/* 32 */ ACTOR_CS_32,
/* 33 */ ACTOR_CS_CORNERIAN_FIGHTER, // Bill's ship when actor->index is 3.
/* 34 */ ACTOR_CS_KA_ENEMY,
/* 35 */ ACTOR_CS_SY_SHIP_1_SHRINK, // Scale Matrix by 1/8.
/* 36 */ ACTOR_CS_SY_SHIP_2,
/* 37 */ ACTOR_CS_37,
/* 38 */ ACTOR_CS_SY_ROBOT,
/* 39 */ ACTOR_CS_SY_SHIP_1 = 39,
/* 40 */ ACTOR_CS_40,
/* 41 */ ACTOR_CS_AQ_FISHGROUP,
/* 42 */ ACTOR_CS_42, // Related to Sector Y
/* 43 */ ACTOR_CS_43, // Related to Sector Y
/* 44 */ ACTOR_CS_AQ_SEAWEED,
/* 45 */ ACTOR_CS_AQ_BUMP_2,
/* 46 */ ACTOR_CS_AQ_CORAL_REEF_2,
/* 47 */ ACTOR_CS_AQ_ROCK,
/* 1000 */ ACTOR_CS_JAMES_ARWING = 1000 // James McCloud Arwing seen for the last time in the ending CS.
} ActorCutsceneModels;
Actor* Game_SpawnActor(ObjectId);
+18 -18
View File
@@ -65,23 +65,23 @@ typedef enum LevelMode {
/* 3 */ LEVELMODE_MAX,
} LevelMode;
typedef enum PlayerState1C8 {
/* 0 */ PLAYERSTATE_1C8_STANDBY,
/* 1 */ PLAYERSTATE_1C8_INIT,
/* 2 */ PLAYERSTATE_1C8_LEVEL_INTRO,
/* 3 */ PLAYERSTATE_1C8_ACTIVE,
/* 4 */ PLAYERSTATE_1C8_DOWN,
/* 5 */ PLAYERSTATE_1C8_U_TURN,
/* 6 */ PLAYERSTATE_1C8_NEXT,
/* 7 */ PLAYERSTATE_1C8_LEVEL_COMPLETE,
/* 8 */ PLAYERSTATE_1C8_ENTER_WARP_ZONE,
/* 9 */ PLAYERSTATE_1C8_START_360,
/* 10 */ PLAYERSTATE_1C8_GFOX_REPAIR,
/* 11 */ PLAYERSTATE_1C8_ANDROSS_MOUTH,
/* 12 */ PLAYERSTATE_1C8_12,
/* 13 */ PLAYERSTATE_1C8_VS_STANDBY,
/* 14 */ PLAYERSTATE_1C8_MAX,
} PlayerState1C8;
typedef enum PlayerState {
/* 0 */ PLAYERSTATE_STANDBY,
/* 1 */ PLAYERSTATE_INIT,
/* 2 */ PLAYERSTATE_LEVEL_INTRO,
/* 3 */ PLAYERSTATE_ACTIVE,
/* 4 */ PLAYERSTATE_DOWN,
/* 5 */ PLAYERSTATE_U_TURN,
/* 6 */ PLAYERSTATE_NEXT,
/* 7 */ PLAYERSTATE_LEVEL_COMPLETE,
/* 8 */ PLAYERSTATE_ENTER_WARP_ZONE,
/* 9 */ PLAYERSTATE_START_360,
/* 10 */ PLAYERSTATE_GFOX_REPAIR,
/* 11 */ PLAYERSTATE_ANDROSS_MOUTH,
/* 12 */ PLAYERSTATE_UNK_12,
/* 13 */ PLAYERSTATE_VS_STANDBY,
/* 14 */ PLAYERSTATE_MAX,
} PlayerState;
typedef enum PlayerShotStatus {
/* 0 */ SHOT_FREE,
@@ -259,7 +259,7 @@ typedef struct Player {
/* 0x1BC */ s32 turretRecoil;
/* 0x1C0 */ s32 turretLockOnCount;
/* 0x1C4 */ s32 num;
/* 0x1C8 */ PlayerState1C8 state_1C8;
/* 0x1C8 */ PlayerState state;
/* 0x1CC */ PlayerForm form;
/* 0x1D0 */ s32 csState;
/* 0x1D4 */ bool grounded;
+12 -7
View File
@@ -24,11 +24,15 @@ typedef struct {
typedef struct PlanetStats {
/* bit 0 */ u16 hitCount : 8;
/* bit 8 */ u16 planetId : 4;
/* bit C */ u16 unk_C : 1; // hitCount related
/* bit C */ u16 hitCountOver256 : 1;
/* bit D */ u16 peppyAlive : 1;
/* bit E */ u16 falcoAlive : 1;
/* bit F */ u16 slippyAlive : 1;
} PlanetStats; // size = 0x10
} PlanetStats; // size = 0x2
#define PLANET_STATS(hitCount, planetId, peppyAlive, falcoAlive, slippyAlive) \
(hitCount > 255 ? hitCount - 256 : hitCount), \
((planetId << 4) | ((hitCount > 255 ? 1 : 0) << 3) | (peppyAlive << 2) | (falcoAlive << 1) | (slippyAlive))
typedef struct SaveData {
/* 0x00 */ PlanetData planet[16];
@@ -38,13 +42,14 @@ typedef struct SaveData {
/* 0x16 */ u8 voiceVolume;
/* 0x17 */ u8 sfxVolume;
/* 0x18 */ u8 rankNameEntry[RANKING_MAX][ENTRY_MAX]; // Name entries in the ranking
/* 0x36 */ u8 rankingRoute[RANKING_MAX]; // Maximum number of planets played in the current record
/* 0x40 */ u8 rankingLives[RANKING_MAX]; // Player lives left in the current record
/* 0x4A */ u16 rankingMedal[RANKING_MAX]; // Medals obtained in the current record
/* 0x36 */ u8 rankingRoute[RANKING_MAX]; // Maximum number of planets played in the current record
/* 0x40 */ u8 rankingLives[RANKING_MAX]; // Player lives left in the current record
/* 0x4A */ u16 rankingMedal[RANKING_MAX]; // Medals obtained in the current record
/* 0x5E */ PlanetStats stats[RANKING_MAX][ROUTE_MAX];
/* 0xEA */ u8 unk_EA;
/* 0xEB */ char padEB[0x3];
/* 0xEE */ char padEE[0x10];
/* 0xEB */ u8 textLanguage; // EU Only text language selection
/* 0xEC */ u8 voiceLanguage; // EU Only voice language selection
/* 0xED */ char padEE[0x11];
} SaveData; // size = 0xFE
typedef struct {
+1 -1
View File
@@ -155,7 +155,7 @@ extern s32 gCallTimer;
extern s32 D_hud_80161704;
extern s32 D_hud_80161708;
extern s32 D_hud_8016170C;
extern s32 D_hud_80161710;
extern s32 gRadarMissileAlarmTimer;
extern s32 gTotalHits; // 0x80161714 gTotalGameScore
extern f32 D_hud_80161720[3];
extern s32 gDisplayedHitCount;
@@ -0,0 +1 @@
OvlI1_CallFunction = 0x8017E7A0;//segment:ovl_i1
+3 -2
View File
@@ -64,7 +64,7 @@ void Audio_SequencePlayerProcessSound(SequencePlayer* seqplayer) {
if (seqplayer->recalculateVolume) {
seqplayer->appliedFadeVolume = seqplayer->fadeVolume * seqplayer->fadeVolumeMod;
}
for (i = 0; i < 16; i++) {
for (i = 0; i < SEQ_NUM_CHANNELS; i++) {
if ((IS_SEQUENCE_CHANNEL_VALID(seqplayer->channels[i]) == 1) && (seqplayer->channels[i]->enabled == 1)) {
Audio_SequenceChannelProcessSound(seqplayer->channels[i], seqplayer->recalculateVolume);
}
@@ -216,7 +216,8 @@ f32 Audio_AdsrUpdate(AdsrState* adsr) {
break;
default:
if (adsr->delay >= 4) {
adsr->delay = (adsr->delay * gAudioBufferParams.ticksPerUpdate / gAudioBufferParams.numBuffers) / 4;
adsr->delay =
(adsr->delay * gAudioBufferParams.ticksPerUpdate / gAudioBufferParams.numBuffers) / 4;
}
if (adsr->delay == 0) {
adsr->delay = 1;
+5 -5
View File
@@ -2688,8 +2688,8 @@ void Audio_PlaySequenceDistorted(u8 seqPlayId, u16 seqId, u16 distortion, u8 fad
}
void Audio_PlaySoundTestTrack(u8 trackNumber) {
u16 sp26;
u8 sp25;
u16 seqId;
u8 bgmParam;
if ((trackNumber >= 45) && (trackNumber < 50)) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
@@ -2701,10 +2701,10 @@ void Audio_PlaySoundTestTrack(u8 trackNumber) {
AUDIO_PLAY_SFX(NA_SE_ERROR, gDefaultSfxSource, 4);
} else {
sPlaylistIndex = 0xFF;
sp26 = sSoundTestTracks[trackNumber].seqId & 0xFF;
sp25 = sSoundTestTracks[trackNumber].bgmParam;
seqId = sSoundTestTracks[trackNumber].seqId & 0xFF;
bgmParam = sSoundTestTracks[trackNumber].bgmParam;
SEQCMD_STOP_SEQUENCE(D_800C5E70 ^ 1, 5);
Audio_PlaySequence(D_800C5E70, sp26, 0, sp25);
Audio_PlaySequence(D_800C5E70, seqId, 0, bgmParam);
D_800C5E70 ^= 1;
}
}
+4 -7
View File
@@ -99,8 +99,8 @@ void AudioHeap_DiscardFont(s32 fontId) {
note->playbackState.parentLayer->enabled = false;
note->playbackState.parentLayer->finished = true;
}
func_80011F4C(note);
func_80012C40(note);
Audio_NoteDisable(note);
Audio_AudioListRemove(note);
AudioSeq_AudioListPushBack(&gNoteFreeLists.disabled, &note->listItem);
}
}
@@ -663,7 +663,6 @@ void AudioHeap_Init(void) {
gAudioBufferParams.maxAiBufferLength *= gAudioBufferParams.numBuffers;
gAudioBufferParams.minAiBufferLength *= gAudioBufferParams.numBuffers;
gAudioBufferParams.ticksPerUpdate *= gAudioBufferParams.numBuffers;
if (gAudioBufferParams.numBuffers >= 2) {
gAudioBufferParams.maxAiBufferLength -= 0x10;
}
@@ -700,10 +699,8 @@ void AudioHeap_Init(void) {
AudioHeap_ResetLoadStatus();
gNotes = AudioHeap_AllocZeroed(&gMiscPool, gNumNotes * sizeof(Note));
func_800132E8();
func_800128B4();
Audio_NoteInitAll();
Audio_InitNoteFreeList();
gNoteSubsEu = AudioHeap_AllocZeroed(&gMiscPool, gAudioBufferParams.ticksPerUpdate * gNumNotes * sizeof(NoteSubEu));
for (i = 0; i != 2; i++) {
+5 -4
View File
@@ -135,8 +135,8 @@ void* AudioLoad_DmaSampleData(uintptr_t devAddr, u32 size, u32 arg2, u8* dmaInde
dma->ttl = 2;
dma->devAddr = dmaDevAddr;
dma->sizeUnused = dma->size;
AudioLoad_Dma(&gCurAudioFrameDmaIoMsgBuf[gCurAudioFrameDmaCount++], 0, 0, dmaDevAddr, dma->ramAddr, dma->size,
&gCurAudioFrameDmaQueue, medium, "SUPERDMA");
AudioLoad_Dma(&gCurAudioFrameDmaIoMsgBuf[gCurAudioFrameDmaCount++], OS_MESG_PRI_NORMAL, OS_READ, dmaDevAddr,
dma->ramAddr, dma->size, &gCurAudioFrameDmaQueue, medium, "SUPERDMA");
*dmaIndexRef = sp38;
return devAddr - dmaDevAddr + dma->ramAddr;
}
@@ -220,7 +220,7 @@ void AudioLoad_InitSampleDmaBuffers(s32 numNotes) {
gSampleDmaReuseQueue2WrPos = gSampleDmaCount - gSampleDmaListSize1;
}
// Updates the audiotable entries with their absolute ROM addresses
// Updates the audiotable entries with their relative ROM addresses
void AudioLoad_InitTable(AudioTable* table, u8* romAddr, u16 unkMediumParam) {
s32 i;
@@ -634,7 +634,8 @@ void AudioLoad_SyncDma(uintptr_t devAddr, u8* ramAddr, u32 size, s32 medium) {
}
if (size != 0) {
AudioLoad_Dma(&gSyncDmaIoMsg, 1, 0, devAddr, ramAddr, size, &gSyncDmaQueue, medium, "FastCopy");
AudioLoad_Dma(&gSyncDmaIoMsg, OS_MESG_PRI_HIGH, OS_READ, devAddr, ramAddr, size, &gSyncDmaQueue, medium,
"FastCopy");
MQ_WAIT_FOR_MESG(&gSyncDmaQueue, NULL);
}
}
+153 -153
View File
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More