merge master

This commit is contained in:
engineer124
2023-06-22 14:24:08 +10:00
284 changed files with 2432 additions and 1786 deletions
+24 -24
View File
@@ -1,28 +1,28 @@
<Root>
<File Name="schedule_dma_static_yar.unarchive" Segment="7">
<Blob Name="schedule_dma_static_yar_Blob_000000" Size="0x0800" Offset="0x0" />
<Blob Name="schedule_dma_static_yar_Blob_000800" Size="0x0800" Offset="0x800" />
<Blob Name="schedule_dma_static_yar_Blob_001000" Size="0x0800" Offset="0x1000" />
<Blob Name="schedule_dma_static_yar_Blob_001800" Size="0x0800" Offset="0x1800" />
<Blob Name="schedule_dma_static_yar_Blob_002000" Size="0x0800" Offset="0x2000" />
<Blob Name="schedule_dma_static_yar_Blob_002800" Size="0x0800" Offset="0x2800" />
<Blob Name="schedule_dma_static_yar_Blob_003000" Size="0x0800" Offset="0x3000" />
<Blob Name="schedule_dma_static_yar_Blob_003800" Size="0x0800" Offset="0x3800" />
<Blob Name="schedule_dma_static_yar_Blob_004000" Size="0x0800" Offset="0x4000" />
<Blob Name="schedule_dma_static_yar_Blob_004800" Size="0x0800" Offset="0x4800" />
<Blob Name="schedule_dma_static_yar_Blob_005000" Size="0x0800" Offset="0x5000" />
<Blob Name="schedule_dma_static_yar_Blob_005800" Size="0x0800" Offset="0x5800" />
<Blob Name="schedule_dma_static_yar_Blob_006000" Size="0x0800" Offset="0x6000" />
<Blob Name="schedule_dma_static_yar_Blob_006800" Size="0x0800" Offset="0x6800" />
<Blob Name="schedule_dma_static_yar_Blob_007000" Size="0x0800" Offset="0x7000" />
<Blob Name="schedule_dma_static_yar_Blob_007800" Size="0x0800" Offset="0x7800" />
<Blob Name="schedule_dma_static_yar_Blob_008000" Size="0x0800" Offset="0x8000" />
<Blob Name="schedule_dma_static_yar_Blob_008800" Size="0x0800" Offset="0x8800" />
<Blob Name="schedule_dma_static_yar_Blob_009000" Size="0x0800" Offset="0x9000" />
<Blob Name="schedule_dma_static_yar_Blob_009800" Size="0x0800" Offset="0x9800" />
<Blob Name="schedule_dma_static_yar_Blob_00A000" Size="0x0800" Offset="0xA000" />
<Blob Name="schedule_dma_static_yar_Blob_00A800" Size="0x0400" Offset="0xA800" />
<Blob Name="schedule_dma_static_yar_Blob_00AC00" Size="0x02A0" Offset="0xAC00" />
<Blob Name="schedule_dma_static_yar_Blob_00AEA0" Size="0x0380" Offset="0xAEA0" />
<Texture Name="gBombersNotebookPhotoAnjuTex" OutName="bombers_notebook_photo_anju" Format="rgba16" Width="32" Height="32" Offset="0x0" />
<Texture Name="gBombersNotebookPhotoKafeiTex" OutName="bombers_notebook_photo_kafei" Format="rgba16" Width="32" Height="32" Offset="0x800" />
<Texture Name="gBombersNotebookPhotoCuriosityShopManTex" OutName="bombers_notebook_photo_curiosity_shop_man" Format="rgba16" Width="32" Height="32" Offset="0x1000" />
<Texture Name="gBombersNotebookPhotoBombShopLadyTex" OutName="bombers_notebook_photo_bomb_shop_lady" Format="rgba16" Width="32" Height="32" Offset="0x1800" />
<Texture Name="gBombersNotebookPhotoRomaniTex" OutName="bombers_notebook_photo_romani" Format="rgba16" Width="32" Height="32" Offset="0x2000" />
<Texture Name="gBombersNotebookPhotoCremiaTex" OutName="bombers_notebook_photo_cremia" Format="rgba16" Width="32" Height="32" Offset="0x2800" />
<Texture Name="gBombersNotebookPhotoMayorDotourTex" OutName="bombers_notebook_photo_mayor_dotour" Format="rgba16" Width="32" Height="32" Offset="0x3000" />
<Texture Name="gBombersNotebookPhotoMadameAromaTex" OutName="bombers_notebook_photo_madame_aroma" Format="rgba16" Width="32" Height="32" Offset="0x3800" />
<Texture Name="gBombersNotebookPhotoTotoTex" OutName="bombers_notebook_photo_toto" Format="rgba16" Width="32" Height="32" Offset="0x4000" />
<Texture Name="gBombersNotebookPhotoGormanTex" OutName="bombers_notebook_photo_gorman" Format="rgba16" Width="32" Height="32" Offset="0x4800" />
<Texture Name="gBombersNotebookPhotoPostmanTex" OutName="bombers_notebook_photo_postman" Format="rgba16" Width="32" Height="32" Offset="0x5000" />
<Texture Name="gBombersNotebookPhotoRosaSistersTex" OutName="bombers_notebook_photo_rosa_sisters" Format="rgba16" Width="32" Height="32" Offset="0x5800" />
<Texture Name="gBombersNotebookPhotoToiletHandTex" OutName="bombers_notebook_photo_toilet_hand" Format="rgba16" Width="32" Height="32" Offset="0x6000" />
<Texture Name="gBombersNotebookPhotoAnjusGrandmotherTex" OutName="bombers_notebook_photo_anjus_grandmother" Format="rgba16" Width="32" Height="32" Offset="0x6800" />
<Texture Name="gBombersNotebookPhotoKamaroTex" OutName="bombers_notebook_photo_kamaro" Format="rgba16" Width="32" Height="32" Offset="0x7000" />
<Texture Name="gBombersNotebookPhotoGrogTex" OutName="bombers_notebook_photo_grog" Format="rgba16" Width="32" Height="32" Offset="0x7800" />
<Texture Name="gBombersNotebookPhotoGormanBrothersTex" OutName="bombers_notebook_photo_gorman_brothers" Format="rgba16" Width="32" Height="32" Offset="0x8000" />
<Texture Name="gBombersNotebookPhotoShiroTex" OutName="bombers_notebook_photo_shiro" Format="rgba16" Width="32" Height="32" Offset="0x8800" />
<Texture Name="gBombersNotebookPhotoGuruGuruTex" OutName="bombers_notebook_photo_guru_guru" Format="rgba16" Width="32" Height="32" Offset="0x9000" />
<Texture Name="gBombersNotebookPhotoBombersTex" OutName="bombers_notebook_photo_bombers" Format="rgba16" Width="32" Height="32" Offset="0x9800" />
<Texture Name="gBombersNotebookPhotoMadameAromaBrightTex" OutName="bombers_notebook_photo_madame_aroma_bright" Format="rgba16" Width="32" Height="32" Offset="0xA000" /> <!-- Unused, slightly different pose to the used one -->
<Texture Name="gBombersNotebookEntryIconExclamationPointLargeTex" OutName="bombers_notebook_entry_icon_exclamation_point_large" Format="ia8" Width="32" Height="32" Offset="0xA800" /> <!-- Unused -->
<Texture Name="gBombersNotebookEntryIconMaskTex" OutName="bombers_notebook_entry_icon_mask" Format="ia8" Width="24" Height="28" Offset="0xAC00" />
<Texture Name="gBombersNotebookEntryIconRibbonTex" OutName="bombers_notebook_entry_icon_ribbon" Format="ia8" Width="32" Height="28" Offset="0xAEA0" />
</File>
</Root>
+3 -3
View File
@@ -79,11 +79,11 @@
<Texture Name="gSwampGuideMouthTex" OutName="swamp_guide_mouth" Format="ci8" Width="16" Height="32" Offset="0xCA98" />
<!-- Burly Guy Animations -->
<Animation Name="gSwampShootingGalleryManHeadScratchEndAnim" Offset="0xD2F8" /> <!-- Original name is "shn_w02TOw01" ("wait02 to wait01"?) -->
<Animation Name="gBurlyGuyHeadScratchEndAnim" Offset="0xD2F8" /> <!-- Original name is "shn_w02TOw01" ("wait02 to wait01"?) -->
<Animation Name="gBurlyGuyEmptyAnim" Offset="0xD3AC" /> <!-- Original name is "shn_wait". Unused and one frame long -->
<Animation Name="gBurlyGuyHandsOnTableAnim" Offset="0xD9D0" /> <!-- Original name is "shn_wait01" -->
<Animation Name="gSwampShootingGalleryManHeadScratchLoopAnim" Offset="0xDFEC" /> <!-- Original name is "shn_wait02" -->
<Animation Name="gSwampGuideChinScratchAnim" Offset="0xE6C4" /><!-- Original name is "shn_wait03" -->
<Animation Name="gBurlyGuyHeadScratchLoopAnim" Offset="0xDFEC" /> <!-- Original name is "shn_wait02" -->
<Animation Name="gBurlyGuyChinScratchAnim" Offset="0xE6C4" /><!-- Original name is "shn_wait03" -->
<!-- Burly Guy Limbs -->
<Limb Name="gBurlyGuyWaistLimb" Type="Standard" EnumName="BURLY_GUY_LIMB_WAIST" Offset="0xE6E0" />
+14 -10
View File
@@ -1,14 +1,18 @@
<Root>
<File Name="object_tro" Segment="6">
<Animation Name="object_tro_Anim_0000A0" Offset="0xA0" />
<DList Name="object_tro_DL_0006B0" Offset="0x6B0" />
<Texture Name="object_tro_TLUT_000AE0" OutName="tlut_000AE0" Format="rgba16" Width="16" Height="16" Offset="0xAE0" />
<Texture Name="object_tro_TLUT_000CE0" OutName="tlut_000CE0" Format="rgba16" Width="16" Height="16" Offset="0xCE0" />
<Texture Name="object_tro_Tex_000EE0" OutName="tex_000EE0" Format="rgba16" Width="2" Height="8" Offset="0xEE0" />
<Texture Name="object_tro_Tex_000F00" OutName="tex_000F00" Format="ci8" Width="16" Height="8" Offset="0xF00" />
<Texture Name="object_tro_Tex_000F80" OutName="tex_000F80" Format="rgba16" Width="16" Height="8" Offset="0xF80" />
<Texture Name="object_tro_Tex_001080" OutName="tex_001080" Format="rgba16" Width="8" Height="8" Offset="0x1080" />
<Texture Name="object_tro_Tex_001100" OutName="tex_001100" Format="ci8" Width="8" Height="8" Offset="0x1100" />
<!-- <Blob Name="object_tro_Blob_001140" Size="0x1820" Offset="0x1140" /> -->
<Animation Name="gKioskKoumeHeadMoving" Offset="0xA0" />
<DList Name="gKioskKoumeDL" Offset="0x6B0" />
<Texture Name="gKioskKoumeNoseTLUT" OutName="kiosk_koume_nose_tlut" Format="rgba16" Width="16" Height="16" Offset="0xAE0" />
<Texture Name="gKioskKoumeNostrilsTLUT" OutName="kiosk_koume_nostrils_tlut" Format="rgba16" Width="16" Height="16" Offset="0xCE0" />
<Texture Name="gKioskKoumeShadowedSkinTex" OutName="kiosk_koume_shadowed_skin" Format="rgba16" Width="2" Height="8" Offset="0xEE0" />
<Texture Name="gKioskKoumeNoseTex" OutName="kiosk_koume_nose" Format="ci8" Width="16" Height="8" Offset="0xF00" />
<Texture Name="gKioskKoumeJewelHolderTex" OutName="kiosk_koume_jewel_holder" Format="rgba16" Width="16" Height="8" Offset="0xF80" />
<Texture Name="gKioskKoumeJewelTex" OutName="kiosk_koume_jewel" Format="rgba16" Width="8" Height="8" Offset="0x1080" />
<Texture Name="gKioskKoumeNostrilsTex" OutName="kiosk_koume_nostrils" Format="ci8" Width="8" Height="8" Offset="0x1100" />
<Texture Name="gKioskKoumeEyeOpenTex" OutName="kiosk_koume_eye_open" Format="rgba16" Width="32" Height="32" Offset="0x1140"/>
<Texture Name="gKioskKoumeEyeHalfTex" OutName="kiosk_koume_eye_half" Format="rgba16" Width="32" Height="32" Offset="0x1940"/>
<Texture Name="gKioskKoumeEyeClosedTex" OutName="kiosk_koume_eye_closed" Format="rgba16" Width="32" Height="32" Offset="0x2140"/>
<Limb Name="gKioskKoumeHeadLimb" Type="Standard" EnumName="KIOSK_KOUME_LIMB_HEAD" Offset="0x2940" />
<Skeleton Name="gKioskKoumeSkeleton" Type="Normal" LimbType="Standard" LimbNone="KIOSK_KOUME_LIMB_NONE" LimbMax="KIOSK_KOUME_LIMB_MAX" EnumName="KioskKoumeLimb" Offset="0x2950" />
</File>
</Root>
+39 -39
View File
@@ -181,23 +181,23 @@ void func_809527F8(EnMs* this, PlayState* play) {
if (temp_v0_2 != 1) {
}
func_8019F230();
Audio_PlaySfx_MessageCancel();
Message_ContinueTextbox(play, 0x934U);
// Duplicate return node #17. Try simplifying control flow for better match
return;
}
Message_CloseTextbox(play);
if ((s32) gSaveContext.save.saveInfo.playerData.rupees < 0xA) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x935U);
return;
}
if ((s32) gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x937U);
return;
}
func_8019F208();
Audio_PlaySfx_MessageDecide();
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
Rupees_ChangeBy(-0xA);
this->actionFunc = func_809529AC;
@@ -277,24 +277,24 @@ block_11:
if ((s32) gSaveContext.save.saveInfo.playerData.rupees >= 0xA) {
goto block_13;
}
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x935U);
return;
block_13:
if ((s32) gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] < 0x14) {
goto block_15;
}
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x937U);
return;
block_15:
func_8019F208();
Audio_PlaySfx_MessageDecide();
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
Rupees_ChangeBy(-0xA);
this->actionFunc = func_809529AC;
return;
block_16:
func_8019F230();
Audio_PlaySfx_MessageCancel();
Message_ContinueTextbox(play, 0x934U);
block_17:
return;
@@ -315,17 +315,17 @@ The simplest sort of block label to eliminate is one that is only used once, and
if ((s32) gSaveContext.save.saveInfo.playerData.rupees >= 0xA) {
goto block_13;
}
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x935U);
return;
block_13:
```
Currently, this says to jump over the code block `play_sound...` if the condition in the if is satisfied. In non-goto terms, this means that the block should be run if the condition is *not* satisfied. This also illustrates a general property of goto-only mode: you have to reverse the senses of all of the ifs. Therefore the appropriate approach is to swap the if round, put the code block inside, and remove the goto and the label:
Currently, this says to jump over the code block `Audio_PlaySfx...` if the condition in the if is satisfied. In non-goto terms, this means that the block should be run if the condition is *not* satisfied. This also illustrates a general property of goto-only mode: you have to reverse the senses of all of the ifs. Therefore the appropriate approach is to swap the if round, put the code block inside, and remove the goto and the label:
```C
if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x935U);
return;
}
@@ -379,23 +379,23 @@ block_11:
Message_CloseTextbox(play);
if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x935U);
return;
}
if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x937U);
return;
}
func_8019F208();
Audio_PlaySfx_MessageDecide();
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
Rupees_ChangeBy(-0xA);
this->actionFunc = func_809529AC;
return;
block_16:
func_8019F230();
Audio_PlaySfx_MessageCancel();
Message_ContinueTextbox(play, 0x934U);
block_17:
return;
@@ -448,23 +448,23 @@ block_11:
Message_CloseTextbox(play);
if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x935U);
return;
}
if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x937U);
return;
}
func_8019F208();
Audio_PlaySfx_MessageDecide();
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
Rupees_ChangeBy(-0xA);
this->actionFunc = func_809529AC;
return;
block_16:
func_8019F230();
Audio_PlaySfx_MessageCancel();
Message_ContinueTextbox(play, 0x934U);
}
```
@@ -498,17 +498,17 @@ So let us rewrite the entire second half as a switch:
Message_CloseTextbox(play);
if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x935U);
return;
}
if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x937U);
return;
}
func_8019F208();
Audio_PlaySfx_MessageDecide();
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
Rupees_ChangeBy(-0xA);
this->actionFunc = func_809529AC;
@@ -517,7 +517,7 @@ So let us rewrite the entire second half as a switch:
case 1:
default:
func_8019F230();
Audio_PlaySfx_MessageCancel();
Message_ContinueTextbox(play, 0x934U);
break;
}
@@ -534,13 +534,13 @@ There's a couple of other obvious things here:
Message_CloseTextbox(play);
if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x935U);
} else if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x937U);
} else {
func_8019F208();
Audio_PlaySfx_MessageDecide();
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
Rupees_ChangeBy(-0xA);
this->actionFunc = func_809529AC;
@@ -549,7 +549,7 @@ There's a couple of other obvious things here:
case 1:
default:
func_8019F230();
Audio_PlaySfx_MessageCancel();
Message_ContinueTextbox(play, 0x934U);
break;
}
@@ -599,13 +599,13 @@ block_7:
Message_CloseTextbox(play);
if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x935U);
} else if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x937U);
} else {
func_8019F208();
Audio_PlaySfx_MessageDecide();
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
Rupees_ChangeBy(-0xA);
this->actionFunc = func_809529AC;
@@ -614,7 +614,7 @@ block_7:
case 1:
default:
func_8019F230();
Audio_PlaySfx_MessageCancel();
Message_ContinueTextbox(play, 0x934U);
break;
}
@@ -664,13 +664,13 @@ void func_809527F8(EnMs* this, PlayState* play) {
Message_CloseTextbox(play);
if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x935U);
} else if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x937U);
} else {
func_8019F208();
Audio_PlaySfx_MessageDecide();
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
Rupees_ChangeBy(-0xA);
this->actionFunc = func_809529AC;
@@ -679,7 +679,7 @@ void func_809527F8(EnMs* this, PlayState* play) {
case 1:
default:
func_8019F230();
Audio_PlaySfx_MessageCancel();
Message_ContinueTextbox(play, 0x934U);
break;
}
@@ -716,13 +716,13 @@ void func_809527F8(EnMs* this, PlayState* play) {
Message_CloseTextbox(play);
if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x935U);
} else if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) {
play_sound(0x4806U);
Audio_PlaySfx(0x4806U);
Message_ContinueTextbox(play, 0x937U);
} else {
func_8019F208();
Audio_PlaySfx_MessageDecide();
Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f);
Rupees_ChangeBy(-0xA);
this->actionFunc = func_809529AC;
@@ -731,7 +731,7 @@ void func_809527F8(EnMs* this, PlayState* play) {
case 1:
default:
func_8019F230();
Audio_PlaySfx_MessageCancel();
Message_ContinueTextbox(play, 0x934U);
break;
}
+29
View File
@@ -0,0 +1,29 @@
#ifndef AUDIOMGR_H
#define AUDIOMGR_H
#include "ultra64.h"
#include "unk.h"
#include "irqmgr.h"
#include "scheduler.h"
#include "z64audio.h"
typedef struct {
/* 0x000 */ IrqMgr* irqMgr;
/* 0x004 */ SchedContext* sched;
/* 0x008 */ OSScTask audioTask;
/* 0x060 */ AudioTask* rspTask;
/* 0x064 */ OSMesgQueue interruptQueue;
/* 0x07C */ OSMesg interruptMsgBuf[30];
/* 0x0F4 */ OSMesgQueue cmdQueue;
/* 0x10C */ OSMesg cmdMsgBuf[1];
/* 0x110 */ OSMesgQueue lockQueue;
/* 0x128 */ OSMesg lockMsgBuf[1];
/* 0x12C */ UNK_TYPE1 pad_12C[0x4];
/* 0x130 */ OSThread thread;
} AudioMgr; // size = 0x2E0
void AudioMgr_StopAllSfxExceptSystem(void);
void AudioMgr_Unlock(AudioMgr* audioMgr);
void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedContext* sched, IrqMgr* irqMgr);
#endif
+12 -70
View File
@@ -510,7 +510,7 @@ void EffectSsEnIce_Spawn(PlayState* play, Vec3f* pos, f32 scale, Vec3f* velocity
void EffectSsFireTail_SpawnFlameOnPlayer(PlayState* play, f32 scale, s16 bodyPart, f32 colorIntensity);
void EffectSsEnFire_SpawnVec3f(PlayState* play, Actor* actor, Vec3f* pos, s16 scale, s16 params, s16 flags, s16 bodyPart);
// void EffectSsEnFire_SpawnVec3s(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
void EffectSsExtra_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scoreIdx);
void EffectSsExtra_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scoreIndex);
void EffectSsDeadDb_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* prim, Color_RGBA8* env, s16 scale, s16 scaleStep, s32 life);
void func_800B3030(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s32 colorIndex);
void EffectSsDeadDd_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* prim, Color_RGBA8* env, s16 scale, s16 scaleStep, s16 alphaStep, s32 life);
@@ -649,14 +649,14 @@ void func_800B8DD4(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4,
void func_800B8E1C(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4);
void Player_PlaySfx(Player* player, u16 sfxId);
void Actor_PlaySfx(Actor* actor, u16 sfxId);
void func_800B8EF4(PlayState* play, Actor* actor);
void func_800B8F98(Actor* actor, u16 sfxId);
void func_800B8FC0(Actor* actor, u16 sfxId);
void func_800B8FE8(Actor* actor, u16 sfxId);
void func_800B9010(Actor* actor, u16 sfxId);
void func_800B9038(Actor* actor, s32 timer);
void func_800B9084(Actor* actor);
void func_800B9098(Actor* actor);
void Actor_PlaySfx_SurfaceBomb(PlayState* play, Actor* actor);
void Actor_PlaySfx_FlaggedCentered1(Actor* actor, u16 sfxId);
void Actor_PlaySfx_FlaggedCentered2(Actor* actor, u16 sfxId);
void Actor_PlaySfx_FlaggedCentered3(Actor* actor, u16 sfxId);
void Actor_PlaySfx_Flagged(Actor* actor, u16 sfxId);
void Actor_PlaySfx_FlaggedTimer(Actor* actor, s32 timer);
void Actor_PlaySeq_FlaggedKamaroDance(Actor* actor);
void Actor_PlaySeq_FlaggedMusicBoxHouse(Actor* actor);
s32 func_800B90AC(PlayState* play, Actor* actor, CollisionPoly* polygon, s32 bgId, Vec3f* arg4);
void Actor_DeactivateLens(PlayState* play);
void Actor_InitHalfDaysBit(ActorContext* actorCtx);
@@ -900,9 +900,9 @@ void* Lib_MemSet(void* buffer, s32 value, size_t size);
void func_800FF3A0(f32* distOut, s16* angleOut, Input* input);
void Actor_ProcessInitChain(Actor* actor, InitChainEntry* ichain);
void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src);
void func_801000A4(u16 sfxId);
void func_801000CC(u16 sfxId);
void Lib_PlaySfxAtPos(Vec3f* pos, u16 sfxId);
void Lib_PlaySfx(u16 sfxId);
void Lib_PlaySfx_2(u16 sfxId);
void Lib_PlaySfx_AtPos(Vec3f* pos, u16 sfxId);
void Lib_Vec3f_TranslateAndRotateY(Vec3f* translation, s16 rotAngle, Vec3f* src, Vec3f* dst);
void Lib_LerpRGB(Color_RGB8* a, Color_RGB8* b, f32 t, Color_RGB8* dst);
void Lib_Nop801004FC(void);
@@ -1490,14 +1490,6 @@ void func_801720C4(PreRender* this);
void func_801720FC(PreRenderParams* params, Gfx** gfxp);
void Prerender_DrawBackground2D(Gfx** gfxp, void* timg, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tt, u16 arg8, f32 x, f32 y, f32 xScale, f32 yScale, u32 flags);
void AudioMgr_StopAllSfxExceptSystem(void);
void func_80172C30(AudioMgr* audioMgr);
void AudioMgr_HandleRetrace(AudioMgr* audioMgr);
void AudioMgr_HandlePRENMI(AudioMgr* audioMgr);
void AudioMgr_ThreadEntry(void* arg);
void AudioMgr_Unlock(AudioMgr* audioMgr);
void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedContext* sched, IrqMgr* irqMgr);
void GameAlloc_Log(GameAlloc* this);
void* GameAlloc_Malloc(GameAlloc* this, size_t size);
void GameAlloc_Free(GameAlloc* this, void* data);
@@ -1873,53 +1865,12 @@ void AudioOcarina_PlayLongScarecrowSong(void);
void Audio_Update(void);
void AudioSfx_SetProperties(u8 bankId, u8 entryIndex, u8 channelIndex);
void play_sound(u16 sfxId);
void func_8019F128(u16 sfxId);
void func_8019F170(Vec3f* pos, u16 sfxId);
void Audio_PlaySfxAtPos(Vec3f* pos, u16 sfxId);
void func_8019F208(void); // decide sfx
void func_8019F230(void); // cancel sfx
void func_8019F420(Vec3f* pos, u16 sfxId);
void func_8019F4AC(Vec3f* pos, u16 sfxId);
void func_8019F540(s8 arg0);
void AudioSfx_LowerSfxSettingsReverb(Vec3f* pos, s8 isReverbLowered);
f32 func_8019F5AC(f32 arg0);
void func_8019F638(Vec3f* arg0, u16 sfxId, f32 arg2);
void func_8019F780(Vec3f* arg0, u16 sfxId, f32 arg2);
// void func_8019F7D8(void);
void func_8019F830(Vec3f* arg0, u16 arg1);
void func_8019F88C(Vec3f* arg0, u16 sfxId, UNK_TYPE arg2);
void func_8019F900(Vec3f* pos, u8 chargeLevel);
// void func_8019FA18(void);
void func_8019FAD8(Vec3f* param_1, u16 sfxId, f32 param_3);
void func_8019FB0C(Vec3f* arg0, u16 sfxId, f32 arg2, s32 arg3);
void func_8019FC20(Vec3f* pos, u16 sfxId);
void func_8019FCB8(Vec3f* arg0, u16 arg1, f32 arg2);
void func_8019FD90(s8 arg0, s8 arg1);
void func_8019FDC8(UNK_PTR arg0, u16 sfxId, UNK_TYPE arg2);
// void func_8019FE1C(void);
void func_8019FE74(f32* arg0, f32 arg1, s32 arg2);
// void func_8019FEDC(void);
// void func_8019FF38(void);
void Audio_PlaySfxForRiver(Vec3f* pos, f32 freqScale);
// void Audio_PlaySfxForWaterfall(void);
// void Audio_StepFreqLerp(void);
void func_801A0124(Vec3f* pos, u8 arg1);
void Audio_SetBgmVolumeOff(void);
void Audio_SetBgmVolumeOn(void);
void func_801A0204(s8 seqId);
void Audio_SetMainBgmVolume(u8 targetVolume, u8 volumeFadeTimer);
// void Audio_SetGanonsTowerBgmVolumeLevel(void);
// void Audio_SetGanonsTowerBgmVolume(void);
// void Audio_UpdateRiverSoundVolumes(void);
// void func_801A0554(void);
// void func_801A05F0(void);
void AudioSfx_SetChannelIO(Vec3f* pos, u16 sfxId, u8 ioData);
void func_801A0810(Vec3f* arg0, u16 sfxId, u8 arg2);
void func_801A0868(Vec3f* pos, u16 sfxId, u8 val);
// void func_801A09D4(void);
// void Audio_SplitBgmChannels(void);
// void func_801A0E44(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_801A1290(void);
// void func_801A1348(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_801A13BC(void);
@@ -1958,7 +1909,6 @@ u8 func_801A3950(s32 playerIndex, s32 isChannelIOSet);
u8 func_801A39F8(void);
void func_801A3A7C(s32 arg0);
// void func_801A3AC0(void);
void func_801A3AEC(s32 arg0);
void func_801A3B48(UNK_TYPE arg0);
// void func_801A3B90(void);
void func_801A3CD8(s8 param_1);
@@ -1967,23 +1917,15 @@ void func_801A3D98(s8 audioSetting);
void func_801A3E38(u8 arg0);
void func_801A3EC0(u8 arg0);
void Audio_SetCutsceneFlag(s8 flag);
// void func_801A3F6C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_801A3FB4(void);
// void func_801A3FFC(UNK_TYPE1 param_1);
void Audio_SetSpec(u32 specId);
void func_801A4058(UNK_TYPE arg0);
void func_801A41C8(s32 arg0);
void func_801A41F8(UNK_TYPE arg0);
// void func_801A429C(void);
// void func_801A42C8(void);
// void func_801A4324(void);
// void func_801A4348(void);
void Audio_SetSfxVolumeExceptSystemAndOcarinaBanks(u8 arg0);
void func_801A4428(u8 reverbIndex);
void Audio_PreNMI(void);
s32 func_801A46F8(void);
void func_801A4748(Vec3f* pos, u16 sfxId);
void func_801A479C(Vec3f* arg0, u16 sfxId, s32 arg2);
void Audio_SetAmbienceChannelIO(u8 channelIndexRange, u8 ioPort, u8 ioData);
void Audio_PlayAmbience(u8 ambienceId);
void Audio_Init(void);
+42
View File
@@ -1,6 +1,8 @@
#ifndef SFX_H
#define SFX_H
#include "z64math.h"
/**
* With `SFX_FLAG` on, play the entire sfx audio clip.
* Requesting the sfx while playing will restart the sfx from the beginning.
@@ -2354,4 +2356,44 @@ typedef enum {
#undef DEFINE_SFX
*/
typedef enum SfxPauseMenu {
/* 0 */ SFX_PAUSE_MENU_CLOSE,
/* 1 */ SFX_PAUSE_MENU_OPEN
} SfxPauseMenu;
// Various wrappers to AudioSfx_PlaySfx
void Audio_PlaySfx(u16 sfxId);
void Audio_PlaySfx_2(u16 sfxId);
void Audio_PlaySfx_AtPosWithPresetLowFreqAndHighReverb(Vec3f* pos, u16 sfxId);
void Audio_PlaySfx_AtPos(Vec3f* pos, u16 sfxId);
void Audio_PlaySfx_MessageDecide(void);
void Audio_PlaySfx_MessageCancel(void);
void Audio_PlaySfx_Underwater(Vec3f* pos, u16 sfxId);
void Audio_PlaySfx_WithSfxSettingsReverb(Vec3f* pos, u16 sfxId);
void Audio_PlaySfx_AtPosForMetalEffectsWithSyncedFreqAndVolume(Vec3f* pos, u16 sfxId, f32 freqVolParam);
void Audio_PlaySfx_AtPosWithSyncedFreqAndVolume(Vec3f* pos, u16 sfxId, f32 freqVolParam);
void Audio_PlaySfx_GiantsMask(Vec3f* pos, u16 sfxId);
void Audio_PlaySfx_Randomized(Vec3f* pos, u16 baseSfxId, u8 randLim);
void Audio_PlaySfx_SwordCharge(Vec3f* pos, u8 chargeLevel);
void Audio_PlaySfx_AtPosWithFreq(Vec3f* pos, u16 sfxId, f32 freqScale);
void Audio_PlaySfx_AtPosWithFreqAndChannelIO(Vec3f* pos, u16 sfxId, f32 freqScale, u8 arg3);
void Audio_PlaySfx_WaterWheel(Vec3f* pos, u16 sfxId);
void Audio_PlaySfx_AtPosWithTimer(Vec3f* pos, u16 sfxId, f32 timerShiftedLerp);
void Audio_PlaySfx_AtPosWithReverb(Vec3f* pos, u16 sfxId, s8 reverbAdd);
void Audio_PlaySfx_AtPosWithVolume(Vec3f* pos, u16 sfxId, f32 volume);
void Audio_PlaySfx_River(Vec3f* pos, f32 freqScale);
void Audio_PlaySfx_BigBells(Vec3f* pos, u8 volumeIndex);
void Audio_PlaySfx_AtPosWithChannelIO(Vec3f* pos, u16 sfxId, u8 ioData);
void Audio_PlaySfx_AtPosWithAllChannelsIO(Vec3f* pos, u16 sfxId, u8 ioData);
void Audio_PlaySfx_PauseMenuOpenOrClose(u8 pauseMenuOpenOrClose);
void Audio_PlaySfx_IfNotInCutscene(u16 sfxId);
void Audio_PlaySfx_AtFixedPos(Vec3f* pos, u16 sfxId);
void Audio_PlaySfx_AtPosWithVolumeTransition(Vec3f* pos, u16 sfxId, u16 duration);
// Sfx helper functions
void Audio_SetSfxUnderwaterReverb(s8 isUnderwaterReverbActivated);
void Audio_SetSfxTimerLerpInterval(s8 timerLerpRange1, s8 timerLerpRange2);
void Audio_SetSfxVolumeTransition(f32* volume, f32 volumeTarget, u16 duration);
void Audio_SetSfxReverbIndexExceptOcarinaBank(u8 reverbIndex);
#endif
+20 -20
View File
@@ -9,23 +9,23 @@
* - Argument 4: Message id for the event meeting this person
* - Argument 5: WeekEventFlag for the event meeting this person
*/
/* 0x00 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_BOMBERS, schedule_dma_static_yar_Blob_009800, 0x21DD, BOMBERS_NOTEBOOK_EVENT_MET_BOMBERS, 0x2147, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_BOMBERS)
/* 0x01 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ANJU, schedule_dma_static_yar_Blob_000000, 0x21CA, BOMBERS_NOTEBOOK_EVENT_MET_ANJU, 0x2134, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ANJU)
/* 0x02 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_KAFEI, schedule_dma_static_yar_Blob_000800, 0x21CB, BOMBERS_NOTEBOOK_EVENT_MET_KAFEI, 0x2135, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_KAFEI)
/* 0x03 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_CURIOSITY_SHOP_MAN, schedule_dma_static_yar_Blob_001000, 0x21CC, BOMBERS_NOTEBOOK_EVENT_MET_CURIOSITY_SHOP_MAN, 0x2136, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_CURIOSITY_SHOP_MAN)
/* 0x04 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_BOMB_SHOP_LADY, schedule_dma_static_yar_Blob_001800, 0x21CD, BOMBERS_NOTEBOOK_EVENT_MET_BOMB_SHOP_LADY, 0x2137, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_BOMB_SHOP_LADY)
/* 0x05 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ROMANI, schedule_dma_static_yar_Blob_002000, 0x21CE, BOMBERS_NOTEBOOK_EVENT_MET_ROMANI, 0x2138, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ROMANI)
/* 0x06 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_CREMIA, schedule_dma_static_yar_Blob_002800, 0x21CF, BOMBERS_NOTEBOOK_EVENT_MET_CREMIA, 0x2139, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_CREMIA)
/* 0x07 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_MAYOR_DOTOUR, schedule_dma_static_yar_Blob_003000, 0x21D0, BOMBERS_NOTEBOOK_EVENT_MET_MAYOR_DOTOUR, 0x213A, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_MAYOR_DOTOUR)
/* 0x08 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_MADAME_AROMA, schedule_dma_static_yar_Blob_003800, 0x21D1, BOMBERS_NOTEBOOK_EVENT_MET_MADAME_AROMA, 0x213B, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_MADAME_AROMA)
/* 0x09 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_TOTO, schedule_dma_static_yar_Blob_004000, 0x21D2, BOMBERS_NOTEBOOK_EVENT_MET_TOTO, 0x213C, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_TOTO)
/* 0x0A */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GORMAN, schedule_dma_static_yar_Blob_004800, 0x21D3, BOMBERS_NOTEBOOK_EVENT_MET_GORMAN, 0x213D, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GORMAN)
/* 0x0B */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_POSTMAN, schedule_dma_static_yar_Blob_005000, 0x21D4, BOMBERS_NOTEBOOK_EVENT_MET_POSTMAN, 0x213E, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_POSTMAN)
/* 0x0C */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ROSA_SISTERS, schedule_dma_static_yar_Blob_005800, 0x21D5, BOMBERS_NOTEBOOK_EVENT_MET_ROSA_SISTERS, 0x213F, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ROSA_SISTERS)
/* 0x0D */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_TOILET_HAND, schedule_dma_static_yar_Blob_006000, 0x21D6, BOMBERS_NOTEBOOK_EVENT_MET_TOLIET_HAND, 0x2140, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_TOILET_HAND)
/* 0x0E */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ANJUS_GRANDMOTHER, schedule_dma_static_yar_Blob_006800, 0x21D7, BOMBERS_NOTEBOOK_EVENT_MET_ANJUS_GRANDMOTHER, 0x2141, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ANJUS_GRANDMOTHER)
/* 0x0F */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_KAMARO, schedule_dma_static_yar_Blob_007000, 0x21D8, BOMBERS_NOTEBOOK_EVENT_MET_KAMARO, 0x2142, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_KAMARO)
/* 0x10 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GROG, schedule_dma_static_yar_Blob_007800, 0x21D9, BOMBERS_NOTEBOOK_EVENT_MET_GROG, 0x2143, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GROG)
/* 0x11 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GORMAN_BROTHERS, schedule_dma_static_yar_Blob_008000, 0x21DA, BOMBERS_NOTEBOOK_EVENT_MET_GORMAN_BROTHERS, 0x2144, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GORMAN_BROTHERS)
/* 0x12 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_SHIRO, schedule_dma_static_yar_Blob_008800, 0x21DB, BOMBERS_NOTEBOOK_EVENT_MET_SHIRO, 0x2145, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_SHIRO)
/* 0x13 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GURU_GURU, schedule_dma_static_yar_Blob_009000, 0x21DC, BOMBERS_NOTEBOOK_EVENT_MET_GURU_GURU, 0x2146, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GURU_GURU)
/* 0x00 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_BOMBERS, gBombersNotebookPhotoBombersTex, 0x21DD, BOMBERS_NOTEBOOK_EVENT_MET_BOMBERS, 0x2147, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_BOMBERS)
/* 0x01 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ANJU, gBombersNotebookPhotoAnjuTex, 0x21CA, BOMBERS_NOTEBOOK_EVENT_MET_ANJU, 0x2134, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ANJU)
/* 0x02 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_KAFEI, gBombersNotebookPhotoKafeiTex, 0x21CB, BOMBERS_NOTEBOOK_EVENT_MET_KAFEI, 0x2135, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_KAFEI)
/* 0x03 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_CURIOSITY_SHOP_MAN, gBombersNotebookPhotoCuriosityShopManTex, 0x21CC, BOMBERS_NOTEBOOK_EVENT_MET_CURIOSITY_SHOP_MAN, 0x2136, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_CURIOSITY_SHOP_MAN)
/* 0x04 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_BOMB_SHOP_LADY, gBombersNotebookPhotoBombShopLadyTex, 0x21CD, BOMBERS_NOTEBOOK_EVENT_MET_BOMB_SHOP_LADY, 0x2137, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_BOMB_SHOP_LADY)
/* 0x05 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ROMANI, gBombersNotebookPhotoRomaniTex, 0x21CE, BOMBERS_NOTEBOOK_EVENT_MET_ROMANI, 0x2138, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ROMANI)
/* 0x06 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_CREMIA, gBombersNotebookPhotoCremiaTex, 0x21CF, BOMBERS_NOTEBOOK_EVENT_MET_CREMIA, 0x2139, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_CREMIA)
/* 0x07 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_MAYOR_DOTOUR, gBombersNotebookPhotoMayorDotourTex, 0x21D0, BOMBERS_NOTEBOOK_EVENT_MET_MAYOR_DOTOUR, 0x213A, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_MAYOR_DOTOUR)
/* 0x08 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_MADAME_AROMA, gBombersNotebookPhotoMadameAromaTex, 0x21D1, BOMBERS_NOTEBOOK_EVENT_MET_MADAME_AROMA, 0x213B, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_MADAME_AROMA)
/* 0x09 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_TOTO, gBombersNotebookPhotoTotoTex, 0x21D2, BOMBERS_NOTEBOOK_EVENT_MET_TOTO, 0x213C, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_TOTO)
/* 0x0A */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GORMAN, gBombersNotebookPhotoGormanTex, 0x21D3, BOMBERS_NOTEBOOK_EVENT_MET_GORMAN, 0x213D, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GORMAN)
/* 0x0B */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_POSTMAN, gBombersNotebookPhotoPostmanTex, 0x21D4, BOMBERS_NOTEBOOK_EVENT_MET_POSTMAN, 0x213E, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_POSTMAN)
/* 0x0C */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ROSA_SISTERS, gBombersNotebookPhotoRosaSistersTex, 0x21D5, BOMBERS_NOTEBOOK_EVENT_MET_ROSA_SISTERS, 0x213F, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ROSA_SISTERS)
/* 0x0D */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_TOILET_HAND, gBombersNotebookPhotoToiletHandTex, 0x21D6, BOMBERS_NOTEBOOK_EVENT_MET_TOLIET_HAND, 0x2140, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_TOILET_HAND)
/* 0x0E */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ANJUS_GRANDMOTHER, gBombersNotebookPhotoAnjusGrandmotherTex, 0x21D7, BOMBERS_NOTEBOOK_EVENT_MET_ANJUS_GRANDMOTHER, 0x2141, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ANJUS_GRANDMOTHER)
/* 0x0F */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_KAMARO, gBombersNotebookPhotoKamaroTex, 0x21D8, BOMBERS_NOTEBOOK_EVENT_MET_KAMARO, 0x2142, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_KAMARO)
/* 0x10 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GROG, gBombersNotebookPhotoGrogTex, 0x21D9, BOMBERS_NOTEBOOK_EVENT_MET_GROG, 0x2143, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GROG)
/* 0x11 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GORMAN_BROTHERS, gBombersNotebookPhotoGormanBrothersTex, 0x21DA, BOMBERS_NOTEBOOK_EVENT_MET_GORMAN_BROTHERS, 0x2144, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GORMAN_BROTHERS)
/* 0x12 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_SHIRO, gBombersNotebookPhotoShiroTex, 0x21DB, BOMBERS_NOTEBOOK_EVENT_MET_SHIRO, 0x2145, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_SHIRO)
/* 0x13 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GURU_GURU, gBombersNotebookPhotoGuruGuruTex, 0x21DC, BOMBERS_NOTEBOOK_EVENT_MET_GURU_GURU, 0x2146, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GURU_GURU)
-1
View File
@@ -658,7 +658,6 @@ extern s32 gDbgCamEnabled;
extern Input* D_801D0D60;
// extern UNK_TYPE2 sPlayerCsIdToCsCamId;
// extern UNK_TYPE1 D_801D0D7A;
// extern UNK_TYPE4 D_801D14F0;
extern u32 retryCount;
extern u32 cfbIdx[3];
-15
View File
@@ -348,21 +348,6 @@ typedef struct {
struct PlayState;
typedef struct {
/* 0x000 */ IrqMgr* irqMgr;
/* 0x004 */ SchedContext* sched;
/* 0x008 */ OSScTask audioTask;
/* 0x060 */ AudioTask* rspTask;
/* 0x064 */ OSMesgQueue interruptMsgQ;
/* 0x07C */ OSMesg interruptMsgBuf[30];
/* 0x0F4 */ OSMesgQueue cmdQ;
/* 0x10C */ OSMesg cmdMsgBuf[1];
/* 0x110 */ OSMesgQueue lockMsgQ;
/* 0x128 */ OSMesg lockMsgBuf[1];
/* 0x12C */ UNK_TYPE1 pad_12C[0x4];
/* 0x130 */ OSThread thread;
} AudioMgr; // size = 0x2E0
typedef struct {
/* 0x0 */ u8 seqId;
/* 0x1 */ u8 ambienceId;
+4 -4
View File
@@ -845,8 +845,8 @@ typedef enum {
#define WEEKEVENTREG_31_80 PACK_WEEKEVENTREG_FLAG(31, 0x80)
#define WEEKEVENTREG_32_01 PACK_WEEKEVENTREG_FLAG(32, 0x01)
#define WEEKEVENTREG_32_02 PACK_WEEKEVENTREG_FLAG(32, 0x02)
#define WEEKEVENTREG_32_04 PACK_WEEKEVENTREG_FLAG(32, 0x04)
#define WEEKEVENTREG_RECEIVED_SWAMP_SHOOTING_GALLERY_HEART_PIECE PACK_WEEKEVENTREG_FLAG(32, 0x02)
#define WEEKEVENTREG_RECEIVED_TOWN_SHOOTING_GALLERY_HEART_PIECE PACK_WEEKEVENTREG_FLAG(32, 0x04)
#define WEEKEVENTREG_32_08 PACK_WEEKEVENTREG_FLAG(32, 0x08)
#define WEEKEVENTREG_32_10 PACK_WEEKEVENTREG_FLAG(32, 0x10)
#define WEEKEVENTREG_32_20 PACK_WEEKEVENTREG_FLAG(32, 0x20)
@@ -1042,8 +1042,8 @@ typedef enum {
#define WEEKEVENTREG_59_04 PACK_WEEKEVENTREG_FLAG(59, 0x04)
#define WEEKEVENTREG_59_08 PACK_WEEKEVENTREG_FLAG(59, 0x08)
#define WEEKEVENTREG_59_10 PACK_WEEKEVENTREG_FLAG(59, 0x10)
#define WEEKEVENTREG_59_20 PACK_WEEKEVENTREG_FLAG(59, 0x20)
#define WEEKEVENTREG_RECEIVED_SWAMP_SHOOTING_GALLERY_QUIVER_UPGRADE PACK_WEEKEVENTREG_FLAG(59, 0x10)
#define WEEKEVENTREG_RECEIVED_TOWN_SHOOTING_GALLERY_QUIVER_UPGRADE PACK_WEEKEVENTREG_FLAG(59, 0x20)
#define WEEKEVENTREG_59_40 PACK_WEEKEVENTREG_FLAG(59, 0x40)
#define WEEKEVENTREG_59_80 PACK_WEEKEVENTREG_FLAG(59, 0x80)
#define WEEKEVENTREG_60_01 PACK_WEEKEVENTREG_FLAG(60, 0x01)
+1 -2
View File
@@ -2738,8 +2738,7 @@ beginseg
name "ovl_En_Dnh"
compress
include "build/src/overlays/actors/ovl_En_Dnh/z_en_dnh.o"
include "build/data/ovl_En_Dnh/ovl_En_Dnh.data.o"
include "build/data/ovl_En_Dnh/ovl_En_Dnh.reloc.o"
include "build/src/overlays/actors/ovl_En_Dnh/ovl_En_Dnh_reloc.o"
endseg
beginseg
+426 -55
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -198,7 +198,7 @@ void AudioSfx_RemoveMatchingRequests(u8 aspect, SfxBankEntry* entry) {
}
if (remove) {
req->sfxId = 0;
req->sfxId = NA_SE_NONE;
}
}
}
@@ -214,7 +214,7 @@ void AudioSfx_ProcessRequest(void) {
u8 evictImportance;
u8 evictIndex = 0x80;
if (req->sfxId == 0) {
if (req->sfxId == NA_SE_NONE) {
return;
}
+27 -22
View File
@@ -1,6 +1,7 @@
#include "global.h"
#include "audiomgr.h"
void func_80172C30(AudioMgr* audioMgr) {
void AudioMgr_NotifyTaskDone(AudioMgr* audioMgr) {
AudioTask* task = audioMgr->rspTask;
if (audioMgr->rspTask->taskQueue != NULL) {
@@ -9,7 +10,7 @@ void func_80172C30(AudioMgr* audioMgr) {
}
void AudioMgr_HandleRetrace(AudioMgr* audioMgr) {
static s32 retryCount = 10;
static s32 sRetryCount = 10;
AudioTask* rspTask;
s32 timerMsgVal = 666;
OSTimer timer;
@@ -19,8 +20,8 @@ void AudioMgr_HandleRetrace(AudioMgr* audioMgr) {
audioMgr->rspTask = NULL;
}
while (audioMgr->cmdQ.validCount != 0) {
osRecvMesg(&audioMgr->cmdQ, NULL, OS_MESG_NOBLOCK);
while (!MQ_IS_EMPTY(&audioMgr->cmdQueue)) {
osRecvMesg(&audioMgr->cmdQueue, NULL, OS_MESG_NOBLOCK);
}
if (audioMgr->rspTask != NULL) {
@@ -29,7 +30,7 @@ void AudioMgr_HandleRetrace(AudioMgr* audioMgr) {
audioMgr->audioTask.framebuffer = NULL;
audioMgr->audioTask.list = audioMgr->rspTask->task;
audioMgr->audioTask.msgQ = &audioMgr->cmdQ;
audioMgr->audioTask.msgQ = &audioMgr->cmdQueue;
audioMgr->audioTask.msg = NULL;
osSendMesg(&audioMgr->sched->cmdQ, &audioMgr->audioTask, OS_MESG_BLOCK);
@@ -44,13 +45,13 @@ void AudioMgr_HandleRetrace(AudioMgr* audioMgr) {
if (audioMgr->rspTask != NULL) {
while (true) {
osSetTimer(&timer, OS_USEC_TO_CYCLES(32000), 0, &audioMgr->cmdQ, (OSMesg)timerMsgVal);
osRecvMesg(&audioMgr->cmdQ, (OSMesg*)&msg, OS_MESG_BLOCK);
osSetTimer(&timer, OS_USEC_TO_CYCLES(32000), 0, &audioMgr->cmdQueue, (OSMesg)timerMsgVal);
osRecvMesg(&audioMgr->cmdQueue, (OSMesg*)&msg, OS_MESG_BLOCK);
osStopTimer(&timer);
if (msg == timerMsgVal) {
osSyncPrintf("AUDIO SP TIMEOUT %08x %08x\n", audioMgr->rspTask, audioMgr->rspTask->task);
if (retryCount >= 0) {
retryCount--;
if (sRetryCount >= 0) {
sRetryCount--;
Sched_SendAudioCancelMsg(audioMgr->sched);
} else {
osSyncPrintf("audioMgr.c:もうダメ!死ぬ!\n");
@@ -62,13 +63,13 @@ void AudioMgr_HandleRetrace(AudioMgr* audioMgr) {
}
}
func_80172C30(audioMgr);
AudioMgr_NotifyTaskDone(audioMgr);
}
audioMgr->rspTask = rspTask;
}
void AudioMgr_HandlePRENMI(AudioMgr* audioMgr) {
void AudioMgr_HandlePreNMI(AudioMgr* audioMgr) {
Audio_PreNMI();
}
@@ -81,32 +82,36 @@ void AudioMgr_ThreadEntry(void* arg) {
Audio_Init();
AudioLoad_SetDmaHandler(DmaMgr_DmaHandler);
Audio_InitSound();
osSendMesg(&audioMgr->lockMsgQ, NULL, OS_MESG_BLOCK);
IrqMgr_AddClient(audioMgr->irqMgr, &irqClient, &audioMgr->interruptMsgQ);
osSendMesg(&audioMgr->lockQueue, NULL, OS_MESG_BLOCK);
IrqMgr_AddClient(audioMgr->irqMgr, &irqClient, &audioMgr->interruptQueue);
exit = false;
while (!exit) {
osRecvMesg(&audioMgr->interruptMsgQ, (OSMesg*)&msg, OS_MESG_BLOCK);
osRecvMesg(&audioMgr->interruptQueue, (OSMesg*)&msg, OS_MESG_BLOCK);
switch (*msg) {
case OS_SC_RETRACE_MSG:
AudioMgr_HandleRetrace(audioMgr);
while (audioMgr->interruptMsgQ.validCount != 0) {
osRecvMesg(&audioMgr->interruptMsgQ, (OSMesg*)&msg, OS_MESG_BLOCK);
while (!MQ_IS_EMPTY(&audioMgr->interruptQueue)) {
osRecvMesg(&audioMgr->interruptQueue, (OSMesg*)&msg, OS_MESG_BLOCK);
switch (*msg) {
case OS_SC_RETRACE_MSG:
break;
case OS_SC_PRE_NMI_MSG:
AudioMgr_HandlePRENMI(audioMgr);
AudioMgr_HandlePreNMI(audioMgr);
break;
case OS_SC_NMI_MSG:
exit = true;
break;
}
}
break;
case OS_SC_PRE_NMI_MSG:
AudioMgr_HandlePRENMI(audioMgr);
AudioMgr_HandlePreNMI(audioMgr);
break;
case OS_SC_NMI_MSG:
exit = true;
break;
@@ -117,7 +122,7 @@ void AudioMgr_ThreadEntry(void* arg) {
}
void AudioMgr_Unlock(AudioMgr* audioMgr) {
osRecvMesg(&audioMgr->lockMsgQ, NULL, OS_MESG_BLOCK);
osRecvMesg(&audioMgr->lockQueue, NULL, OS_MESG_BLOCK);
}
void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedContext* sched, IrqMgr* irqMgr) {
@@ -127,9 +132,9 @@ void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedCon
audioMgr->irqMgr = irqMgr;
audioMgr->rspTask = NULL;
osCreateMesgQueue(&audioMgr->cmdQ, audioMgr->cmdMsgBuf, ARRAY_COUNT(audioMgr->cmdMsgBuf));
osCreateMesgQueue(&audioMgr->interruptMsgQ, audioMgr->interruptMsgBuf, ARRAY_COUNT(audioMgr->interruptMsgBuf));
osCreateMesgQueue(&audioMgr->lockMsgQ, audioMgr->lockMsgBuf, ARRAY_COUNT(audioMgr->lockMsgBuf));
osCreateMesgQueue(&audioMgr->cmdQueue, audioMgr->cmdMsgBuf, ARRAY_COUNT(audioMgr->cmdMsgBuf));
osCreateMesgQueue(&audioMgr->interruptQueue, audioMgr->interruptMsgBuf, ARRAY_COUNT(audioMgr->interruptMsgBuf));
osCreateMesgQueue(&audioMgr->lockQueue, audioMgr->lockMsgBuf, ARRAY_COUNT(audioMgr->lockMsgBuf));
osCreateThread(&audioMgr->thread, id, AudioMgr_ThreadEntry, audioMgr, stack, pri);
osStartThread(&audioMgr->thread);
+1
View File
@@ -1,4 +1,5 @@
#include "global.h"
#include "audiomgr.h"
#include "system_malloc.h"
#include "z64debug_text.h"
#include "z64rumble.h"
+2 -1
View File
@@ -5,6 +5,7 @@
*/
#include "global.h"
#include "audiomgr.h"
#include "buffers.h"
#include "stack.h"
#include "stackcheck.h"
@@ -80,7 +81,7 @@ void Main(void* arg) {
while (!exit) {
msg = NULL;
osRecvMesg(&irqMgrMsgQ, (OSMesg)&msg, OS_MESG_BLOCK);
osRecvMesg(&irqMgrMsgQ, (OSMesg*)&msg, OS_MESG_BLOCK);
if (msg == NULL) {
break;
}
+72 -45
View File
@@ -32,6 +32,20 @@ extern s16 D_801ED8DC; // 2 funcs
extern Mtx D_801ED8E0; // 1 func
extern Actor* D_801ED920; // 2 funcs. 1 out of z_actor
#define ACTOR_AUDIO_FLAG_SFX_ACTOR_POS (1 << 0)
#define ACTOR_AUDIO_FLAG_SFX_CENTERED_1 (1 << 1)
#define ACTOR_AUDIO_FLAG_SFX_CENTERED_2 (1 << 2)
#define ACTOR_AUDIO_FLAG_SFX_CENTERED_3 (1 << 3)
#define ACTOR_AUDIO_FLAG_SFX_TIMER (1 << 4)
#define ACTOR_AUDIO_FLAG_SEQ_KAMARO_DANCE (1 << 5)
#define ACTOR_AUDIO_FLAG_SEQ_MUSIC_BOX_HOUSE (1 << 6)
#define ACTOR_AUDIO_FLAG_SFX_ALL \
(ACTOR_AUDIO_FLAG_SFX_TIMER | ACTOR_AUDIO_FLAG_SFX_CENTERED_3 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 | \
ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_AUDIO_FLAG_SFX_ACTOR_POS)
#define ACTOR_AUDIO_FLAG_SEQ_ALL (ACTOR_AUDIO_FLAG_SEQ_MUSIC_BOX_HOUSE | ACTOR_AUDIO_FLAG_SEQ_KAMARO_DANCE)
#define ACTOR_AUDIO_FLAG_ALL (ACTOR_AUDIO_FLAG_SFX_ALL | ACTOR_AUDIO_FLAG_SEQ_ALL)
// Internal forward declarations
void Actor_KillAllOnHalfDayChange(PlayState* play, ActorContext* actorCtx);
Actor* Actor_SpawnEntry(ActorContext* actorCtx, ActorEntry* actorEntry, PlayState* play);
@@ -663,7 +677,7 @@ void func_800B5814(TargetContext* targetCtx, Player* player, Actor* actor, GameS
sfxId =
CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_4 | ACTOR_FLAG_1) ? NA_SE_SY_LOCK_ON : NA_SE_SY_LOCK_ON_HUMAN;
play_sound(sfxId);
Audio_PlaySfx(sfxId);
}
targetCtx->targetCenterPos.x = actor->world.pos.x;
@@ -2164,7 +2178,7 @@ void func_800B8E1C(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4)
*/
void Player_PlaySfx(Player* player, u16 sfxId) {
if (player->currentMask == PLAYER_MASK_GIANT) {
func_8019F170(&player->actor.projectedPos, sfxId);
Audio_PlaySfx_AtPosWithPresetLowFreqAndHighReverb(&player->actor.projectedPos, sfxId);
} else {
AudioSfx_PlaySfx(sfxId, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@@ -2175,10 +2189,10 @@ void Player_PlaySfx(Player* player, u16 sfxId) {
* Play a sound effect at the actor's position
*/
void Actor_PlaySfx(Actor* actor, u16 sfxId) {
Audio_PlaySfxAtPos(&actor->projectedPos, sfxId);
Audio_PlaySfx_AtPos(&actor->projectedPos, sfxId);
}
void func_800B8EF4(PlayState* play, Actor* actor) {
void Actor_PlaySfx_SurfaceBomb(PlayState* play, Actor* actor) {
SurfaceSfxOffset surfaceSfxOffset;
if (actor->bgCheckFlags & BGCHECKFLAG_WATER) {
@@ -2191,41 +2205,53 @@ void func_800B8EF4(PlayState* play, Actor* actor) {
surfaceSfxOffset = SurfaceType_GetSfxOffset(&play->colCtx, actor->floorPoly, actor->floorBgId);
}
Audio_PlaySfxAtPos(&actor->projectedPos, NA_SE_EV_BOMB_BOUND);
Audio_PlaySfxAtPos(&actor->projectedPos, NA_SE_PL_WALK_GROUND + surfaceSfxOffset);
Audio_PlaySfx_AtPos(&actor->projectedPos, NA_SE_EV_BOMB_BOUND);
Audio_PlaySfx_AtPos(&actor->projectedPos, NA_SE_PL_WALK_GROUND + surfaceSfxOffset);
}
void func_800B8F98(Actor* actor, u16 sfxId) {
/**
* Play a sfx at the center of the screen using the shared audioFlag system
*/
void Actor_PlaySfx_FlaggedCentered1(Actor* actor, u16 sfxId) {
actor->sfxId = sfxId;
actor->audioFlags &= ~(0x10 | 0x08 | 0x04 | 0x02 | 0x01);
actor->audioFlags |= 0x02;
actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL;
actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_1;
}
void func_800B8FC0(Actor* actor, u16 sfxId) {
/**
* Play a sfx at the center of the screen using the shared audioFlag system
*/
void Actor_PlaySfx_FlaggedCentered2(Actor* actor, u16 sfxId) {
actor->sfxId = sfxId;
actor->audioFlags &= ~(0x10 | 0x08 | 0x04 | 0x02 | 0x01);
actor->audioFlags |= 4;
actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL;
actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_2;
}
void func_800B8FE8(Actor* actor, u16 sfxId) {
/**
* Play a sfx at the center of the screen using the shared audioFlag system
*/
void Actor_PlaySfx_FlaggedCentered3(Actor* actor, u16 sfxId) {
actor->sfxId = sfxId;
actor->audioFlags &= ~(0x10 | 0x08 | 0x04 | 0x02 | 0x01);
actor->audioFlags |= 0x08;
actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL;
actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_3;
}
void func_800B9010(Actor* actor, u16 sfxId) {
/**
* Play a sfx at the actor's position using the shared audioFlag system
*/
void Actor_PlaySfx_Flagged(Actor* actor, u16 sfxId) {
actor->sfxId = sfxId;
actor->audioFlags &= ~(0x10 | 0x08 | 0x04 | 0x02 | 0x01);
actor->audioFlags |= 0x01;
actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL;
actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_ACTOR_POS;
}
void func_800B9038(Actor* actor, s32 timer) {
actor->audioFlags &= ~(0x10 | 0x08 | 0x04 | 0x02 | 0x01);
actor->audioFlags |= 0x10;
void Actor_PlaySfx_FlaggedTimer(Actor* actor, s32 timer) {
actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL;
actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_TIMER;
// The sfxId here are not actually sound effects, but instead this is data that gets sent into
// the io ports of the music macro language (func_801A0810 / Audio_PlaySfxAtPosWithSoundScriptIO is
// the function that it's used for)
// the io ports of the music macro language (Audio_PlaySfx_AtPosWithChannelIO / Audio_PlaySfxAtPosWithSoundScriptIO
// is the function that it's used for)
if (timer < 40) {
actor->sfxId = 3;
} else if (timer < 100) {
@@ -2235,12 +2261,12 @@ void func_800B9038(Actor* actor, s32 timer) {
}
}
void func_800B9084(Actor* actor) {
actor->audioFlags |= 0x20;
void Actor_PlaySeq_FlaggedKamaroDance(Actor* actor) {
actor->audioFlags |= ACTOR_AUDIO_FLAG_SEQ_KAMARO_DANCE;
}
void func_800B9098(Actor* actor) {
actor->audioFlags |= 0x40;
void Actor_PlaySeq_FlaggedMusicBoxHouse(Actor* actor) {
actor->audioFlags |= ACTOR_AUDIO_FLAG_SEQ_MUSIC_BOX_HOUSE;
}
s32 func_800B90AC(PlayState* play, Actor* actor, CollisionPoly* polygon, s32 bgId, Vec3f* arg4) {
@@ -2368,7 +2394,7 @@ Actor* Actor_UpdateActor(UpdateActor_Params* params) {
}
actor->sfxId = 0;
actor->audioFlags &= ~0x7F;
actor->audioFlags &= ~ACTOR_AUDIO_FLAG_ALL;
if (actor->init != NULL) {
if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
@@ -2545,7 +2571,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
actor = NULL;
if (actorCtx->targetContext.unk4B != 0) {
actorCtx->targetContext.unk4B = 0;
play_sound(NA_SE_SY_LOCK_OFF);
Audio_PlaySfx(NA_SE_SY_LOCK_OFF);
}
}
@@ -2630,31 +2656,32 @@ void Actor_Draw(PlayState* play, Actor* actor) {
CLOSE_DISPS(play->state.gfxCtx);
}
void func_800B9D1C(Actor* actor) {
void Actor_UpdateFlaggedAudio(Actor* actor) {
s32 sfxId = actor->sfxId;
if (sfxId != 0) {
if (actor->audioFlags & 2) {
if (sfxId != NA_SE_NONE) {
if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_1) {
AudioSfx_PlaySfx(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else if (actor->audioFlags & 4) {
play_sound(sfxId);
} else if (actor->audioFlags & 8) {
func_8019F128(sfxId);
} else if (actor->audioFlags & 0x10) {
func_801A0810(&gSfxDefaultPos, NA_SE_SY_TIMER - SFX_FLAG, (sfxId - 1));
} else if (actor->audioFlags & 1) {
Audio_PlaySfxAtPos(&actor->projectedPos, sfxId);
} else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_2) {
Audio_PlaySfx(sfxId);
} else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_3) {
Audio_PlaySfx_2(sfxId);
} else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_TIMER) {
Audio_PlaySfx_AtPosWithChannelIO(&gSfxDefaultPos, NA_SE_SY_TIMER - SFX_FLAG, (sfxId - 1));
} else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_ACTOR_POS) {
Audio_PlaySfx_AtPos(&actor->projectedPos, sfxId);
}
}
if (sfxId) {}
//! FAKE:
if (sfxId != NA_SE_NONE) {}
if (actor->audioFlags & 0x40) {
if (actor->audioFlags & ACTOR_AUDIO_FLAG_SEQ_MUSIC_BOX_HOUSE) {
func_801A1FB4(SEQ_PLAYER_BGM_SUB, &actor->projectedPos, NA_BGM_MUSIC_BOX_HOUSE, 1500.0f);
}
if (actor->audioFlags & 0x20) {
if (actor->audioFlags & ACTOR_AUDIO_FLAG_SEQ_KAMARO_DANCE) {
func_801A1FB4(SEQ_PLAYER_BGM_MAIN, &actor->projectedPos, NA_BGM_KAMARO_DANCE, 900.0f);
}
}
@@ -2866,8 +2893,8 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &actor->world.pos, &actor->projectedPos,
&actor->projectedW);
if (actor->audioFlags & 0x7F) {
func_800B9D1C(actor);
if (actor->audioFlags & ACTOR_AUDIO_FLAG_ALL) {
Actor_UpdateFlaggedAudio(actor);
}
if (func_800BA2D8(play, actor)) {
+6 -6
View File
@@ -7403,7 +7403,7 @@ void Camera_EarthquakeDay3(Camera* camera) {
if (sEarthquakeTimer != 0) {
sEarthquakeTimer--;
func_8019F128(NA_SE_SY_EARTHQUAKE_OUTDOOR - SFX_FLAG);
Audio_PlaySfx_2(NA_SE_SY_EARTHQUAKE_OUTDOOR - SFX_FLAG);
}
}
}
@@ -7869,24 +7869,24 @@ s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 forceChange) {
if (camera->status == CAM_STATUS_ACTIVE) {
switch (sModeChangeFlags) {
case CAM_CHANGE_MODE_0:
play_sound(0);
Audio_PlaySfx(0);
break;
case CAM_CHANGE_MODE_1:
if (camera->play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_1) {
play_sound(NA_SE_SY_ATTENTION_URGENCY);
Audio_PlaySfx(NA_SE_SY_ATTENTION_URGENCY);
} else {
play_sound(NA_SE_SY_ATTENTION_ON);
Audio_PlaySfx(NA_SE_SY_ATTENTION_ON);
}
break;
case CAM_CHANGE_MODE_BATTLE:
play_sound(NA_SE_SY_ATTENTION_URGENCY);
Audio_PlaySfx(NA_SE_SY_ATTENTION_URGENCY);
break;
case CAM_CHANGE_MODE_FOLLOW_TARGET:
play_sound(NA_SE_SY_ATTENTION_ON);
Audio_PlaySfx(NA_SE_SY_ATTENTION_ON);
break;
default:
+16 -16
View File
@@ -1534,9 +1534,9 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
if ((flags == TOUCH_SFX_NORMAL) && (collider->colType != COLTYPE_METAL)) {
EffectSsHitmark_SpawnFixedScale(play, 0, hitPos);
if (collider->actor == NULL) {
play_sound(NA_SE_IT_SHIELD_BOUND);
Audio_PlaySfx(NA_SE_IT_SHIELD_BOUND);
} else {
Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
Audio_PlaySfx_AtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
} else if (flags == TOUCH_SFX_NORMAL) {
EffectSsHitmark_SpawnFixedScale(play, 3, hitPos);
@@ -1548,16 +1548,16 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
} else if (flags == TOUCH_SFX_HARD) {
EffectSsHitmark_SpawnFixedScale(play, 0, hitPos);
if (collider->actor == NULL) {
play_sound(NA_SE_IT_SHIELD_BOUND);
Audio_PlaySfx(NA_SE_IT_SHIELD_BOUND);
} else {
Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
Audio_PlaySfx_AtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
} else if (flags == TOUCH_SFX_WOOD) {
EffectSsHitmark_SpawnFixedScale(play, 1, hitPos);
if (collider->actor == NULL) {
play_sound(NA_SE_IT_REFLECTION_WOOD);
Audio_PlaySfx(NA_SE_IT_REFLECTION_WOOD);
} else {
Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_REFLECTION_WOOD);
Audio_PlaySfx_AtPos(&collider->actor->projectedPos, NA_SE_IT_REFLECTION_WOOD);
}
}
}
@@ -1568,13 +1568,13 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderInfo* acInfo) {
if ((at->actor != NULL) && (at->actor->category == ACTORCAT_PLAYER)) {
if (acInfo->elemType == ELEMTYPE_UNK0) {
Audio_PlaySfxAtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE);
Audio_PlaySfx_AtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE);
} else if (acInfo->elemType == ELEMTYPE_UNK1) {
Audio_PlaySfxAtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE_HARD);
Audio_PlaySfx_AtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE_HARD);
} else if (acInfo->elemType == ELEMTYPE_UNK2) {
Audio_PlaySfxAtPos(&at->actor->projectedPos, 0);
Audio_PlaySfx_AtPos(&at->actor->projectedPos, 0);
} else if (acInfo->elemType == ELEMTYPE_UNK3) {
Audio_PlaySfxAtPos(&at->actor->projectedPos, 0);
Audio_PlaySfx_AtPos(&at->actor->projectedPos, 0);
}
}
return 1;
@@ -1614,7 +1614,7 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atIn
} else if (sHitInfo[ac->colType].effect == HIT_WOOD) {
if (at->actor == NULL) {
CollisionCheck_SpawnShieldParticles(play, hitPos);
play_sound(NA_SE_IT_REFLECTION_WOOD);
Audio_PlaySfx(NA_SE_IT_REFLECTION_WOOD);
} else {
CollisionCheck_SpawnShieldParticlesWood(play, hitPos, &at->actor->projectedPos);
}
@@ -1627,9 +1627,9 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atIn
} else {
EffectSsHitmark_SpawnFixedScale(play, 0, hitPos);
if (ac->actor == NULL) {
play_sound(NA_SE_IT_SHIELD_BOUND);
Audio_PlaySfx(NA_SE_IT_SHIELD_BOUND);
} else {
Audio_PlaySfxAtPos(&ac->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
Audio_PlaySfx_AtPos(&ac->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
}
}
@@ -3873,7 +3873,7 @@ void CollisionCheck_SpawnShieldParticles(PlayState* play, Vec3f* v) {
*/
void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
CollisionCheck_SpawnShieldParticles(play, v);
play_sound(NA_SE_IT_SHIELD_REFLECT_SW);
Audio_PlaySfx(NA_SE_IT_SHIELD_REFLECT_SW);
}
/**
@@ -3881,7 +3881,7 @@ void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
*/
void CollisionCheck_SpawnShieldParticlesMetalSound(PlayState* play, Vec3f* v, Vec3f* pos) {
CollisionCheck_SpawnShieldParticles(play, v);
Audio_PlaySfxAtPos(pos, NA_SE_IT_SHIELD_REFLECT_SW);
Audio_PlaySfx_AtPos(pos, NA_SE_IT_SHIELD_REFLECT_SW);
}
/**
@@ -3921,7 +3921,7 @@ void CollisionCheck_SpawnShieldParticlesWood(PlayState* play, Vec3f* v, Vec3f* p
shieldParticleInitWood.lightPoint.z = shieldParticleInitWood.position.z;
Effect_Add(play, &effectIndex, EFFECT_SHIELD_PARTICLE, 0, 1, &shieldParticleInitWood);
Audio_PlaySfxAtPos(pos, NA_SE_IT_REFLECTION_WOOD);
Audio_PlaySfx_AtPos(pos, NA_SE_IT_REFLECTION_WOOD);
}
/**

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