Merge pull request #144 from notyourav/pr

Implement audio mus/sfx enum
This commit is contained in:
notyourav 2021-03-22 01:31:55 -07:00 committed by GitHub
commit 8e3bebad00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 149 additions and 110 deletions

View File

@ -1,6 +1,8 @@
#ifndef AUDIO_H
#define AUDIO_H
typedef enum {
NONE,
SFX_NONE,
BGM_CASTLE_TOURNAMENT,
BGM_VAATI_MOTIF,
BGM_TITLE_SCREEN,
@ -210,6 +212,8 @@ typedef enum {
SFX_PLY_SHRINKING = 0x16F,
SFX_PLY_GROW,
SFX_EZLO_UI = 0x173,
SFX_LAVA_TILE_STEP = 0x17B,
SFX_LAVA_TILE_WOBBLE,
SFX_LAVA_TILE_SINK,
@ -240,4 +244,18 @@ typedef enum {
SFX_VO_CUCCO3,
SFX_VO_CUCCO4,
SFX_VO_CUCCO5,
} Sound;
SND_STOP_ALL = 0x80010000,
SONG_VOL_ZERO = 0x80020000,
SND_VOL_RESET_ALL = 0x80030000,
SND_VSYNC_OFF = 0x80040000,
SONG_STOP = 0x80050000,
SND_VSYNC_ON = 0x80060000,
SONG_VOL_FADE_OUT = 0x80080000,
SONG_VOL_RESET = 0x800B0000,
SONG_VOL_CHAN1_SILENT = 0x800D0000,
SONG_VOL_CHAN1_RESET = 0x800E0000,
SONG_RESET_UNK = 0x80100000,
} Sound;
#endif // AUDIO_H

View File

@ -1,6 +1,7 @@
#ifndef FILESELECT_H
#define FILESELECT_H
#include "audio.h"
#include "global.h"
#include "save.h"

View File

@ -29,7 +29,7 @@ extern u32 gGlobalFlags;
extern u32 gRoomFlags;
enum {
NONE,
FLAG_NONE,
/*0x01*/ LV0_CLEAR, /* */
/*0x02*/ LV1_CLEAR, /* */
/*0x03*/ LV2_CLEAR, /* */

View File

@ -63,13 +63,13 @@ typedef struct {
// Packets used to store which entities to load in a room
typedef struct {
u8 type : 4;
u8 kind : 4;
u8 layer : 4;
u8 flags : 4;
u8 unk : 4;
u8 subtype;
u8 form;
u32 parameter;
u8 id;
u8 type;
u32 type2;
u16 xPos;
u16 yPos;
u32 spritePtr;

View File

@ -163,12 +163,12 @@ void sub_0804696C(Entity* this) {
this->speed = 0x100;
this->spriteOrientation.flipY = 3;
this->spriteRendering.b3 = 3;
SoundReq(0x2e);
SoundReq(BGM_BOSS_THEME);
}
if (this->actionDelay) {
if (gRoomControls.roomOriginY + 0x258 > this->y.HALF.HI) {
this->actionDelay = 0;
SoundReq(0xf7);
SoundReq(SFX_APPARATE);
}
}
}

View File

@ -1,3 +1,4 @@
#include "audio.h"
#include "global.h"
#include "functions.h"
#include "textbox.h"
@ -23,8 +24,6 @@ typedef struct {
u8 unk13;
} Element;
///////////////////////////////////////////////////////////////
extern void sub_0805ECEC(u32, u32, u32, u32);
extern void sub_0801CAD0(Element*);
@ -98,7 +97,7 @@ void sub_0801CF18(Element* arg0) {
arg0->unk4 = 2;
arg0->unk1 = 8;
gUnk_0200AF00.ezloNagFuncIndex = 3;
SoundReq(0x173);
SoundReq(SFX_EZLO_UI);
}
}

View File

@ -223,7 +223,7 @@ static void HandleFileScreenEnter(void) {
gScreen.controls.alphaBlend = BLDALPHA_BLEND(15, 10);
gUnk_02024490.unk0 = 1;
gMain.funcIndex = 1;
SoundReq(0x7);
SoundReq(BGM_FILE_SELECT);
DoFade(4, 8);
}
@ -445,14 +445,14 @@ void sub_08050940(void) {
if (gUnk_02032EC0.lastState != mode) {
SetFileSelectState(mode);
SoundReq(0x6A);
SoundReq(SFX_TEXTBOX_SELECT);
}
row_idx = (row_idx + num_rows) % num_rows;
if (gUnk_02019EE0.unk6 != row_idx) {
gUnk_02019EE0.unk6 = row_idx;
sub_08050AFC(row_idx);
SoundReq(0x69);
SoundReq(SFX_TEXTBOX_CHOICE);
}
if (gUnk_02019EE0.saveStatus[gUnk_02019EE0.unk6] == SAVE_VALID) {
@ -596,14 +596,14 @@ void sub_08050C54(void) {
case A_BUTTON:
case START_BUTTON:
if (column_idx == 0) {
SoundReq(0x80080000);
SoundReq(SONG_VOL_FADE_OUT);
}
gMenu.transitionTimer = 0xf;
sub_080A7114(1);
SoundReq(0x6a);
SoundReq(SFX_TEXTBOX_SELECT);
break;
case B_BUTTON:
SoundReq(0x6c);
SoundReq(SFX_MENU_CANCEL);
SetFileSelectState(STATE_NONE);
break;
case DPAD_LEFT:
@ -621,7 +621,7 @@ void sub_08050C54(void) {
}
if (gMenu.column_idx != column_idx) {
gMenu.column_idx = column_idx;
SoundReq(0x69);
SoundReq(SFX_TEXTBOX_CHOICE);
}
}
@ -674,7 +674,7 @@ void sub_08050DE4(void) {
break;
case A_BUTTON:
case START_BUTTON:
SoundReq(0x6a);
SoundReq(SFX_TEXTBOX_SELECT);
if (gMenu.field_0x4 != row_idx) {
sub_080A7114(2);
CreateDialogBox(8, 0);
@ -685,7 +685,7 @@ void sub_08050DE4(void) {
case B_BUTTON:
row_idx = gMenu.field_0x4;
gUnk_02000000->gameLanguage = gMenu.field_0x4;
SoundReq(0x6c);
SoundReq(SFX_MENU_CANCEL);
SetFileSelectState(STATE_NONE);
break;
}
@ -699,7 +699,7 @@ void sub_08050DE4(void) {
}
if (gUnk_02000000->gameLanguage != row_idx) {
gUnk_02000000->gameLanguage = row_idx;
SoundReq(0x69);
SoundReq(SFX_TEXTBOX_CHOICE);
}
}
@ -772,13 +772,13 @@ NONMATCH("asm/non_matching/fileScreen/sub_08050EF4.inc", void sub_08050EF4(void)
case 3:
gUnk_02019EE0.saves[gUnk_02019EE0.unk6].messageSpeed = gUnk_02019EE0.unk4;
gUnk_02019EE0.saves[gUnk_02019EE0.unk6].brightnessPref = gUnk_02019EE0.unk5;
SoundReq(0x6c);
SoundReq(SFX_MENU_CANCEL);
sub_080A7114(mode);
SetActiveSave(gUnk_02019EE0.unk6);
break;
case 2:
CreateDialogBox(8, 0);
SoundReq(0x6a);
SoundReq(SFX_TEXTBOX_SELECT);
default:
case 1:
sub_080A7114(mode);
@ -787,11 +787,11 @@ NONMATCH("asm/non_matching/fileScreen/sub_08050EF4.inc", void sub_08050EF4(void)
case 0:
if (gMenu.column_idx != column_idx) {
gMenu.column_idx = column_idx;
SoundReq(0x69);
SoundReq(SFX_TEXTBOX_CHOICE);
} else if (option != *p_option) {
*p_option = option;
LoadOptionsFromSave(gUnk_02019EE0.unk6);
SoundReq(0x69);
SoundReq(SFX_TEXTBOX_CHOICE);
}
break;
}
@ -849,7 +849,7 @@ void sub_08051358(void) {
if (gMenu.focusCoords[0] != 0x0b || gMenu.focusCoords[1] != 0x5) {
gMenu.focusCoords[1] = 0x5;
gMenu.focusCoords[0] = 0xb;
SoundReq(0x67);
SoundReq(SFX_TEXTBOX_NEXT);
}
}
@ -926,7 +926,7 @@ void sub_08051480(u32 c) {
gMenu.unk13 = idx + 1;
gSave.playerName[idx] = c;
sub_08051574(0x6b);
sub_08051574(SFX_6B);
}
u32 sub_080514BC(u32 a1) {
@ -946,9 +946,8 @@ u32 sub_080514BC(u32 a1) {
}
idx = gMenu.unk13;
if (idx == 0) {
if (idx == 0)
return 0;
}
c = gSave.playerName[idx - 1];
if (c - 0xa4 < 0x29) {
@ -962,11 +961,10 @@ u32 sub_080514BC(u32 a1) {
case 0xE:
return c;
case 0xF:
if (c < 0xc3) {
if (c < 0xc3)
return 0;
} else {
else
return c + 10;
}
default:
return c;
}
@ -990,9 +988,8 @@ u32 sub_080514BC(u32 a1) {
case 0xe:
return c - 0x33;
case 0xf:
if (c > 0xf5) {
if (c > 0xf5)
return c - 0x29;
}
}
}
@ -1031,10 +1028,10 @@ void sub_080515D4(void) {
if (column_idx == 1) {
CreateDialogBox(4, 0);
sub_080A7114(2);
SoundReq(0x6a);
SoundReq(SFX_TEXTBOX_SELECT);
} else {
SetFileSelectState(0);
SoundReq(0x6c);
SoundReq(SFX_MENU_CANCEL);
}
break;
case DPAD_LEFT:
@ -1047,7 +1044,7 @@ void sub_080515D4(void) {
if (gMenu.column_idx != column_idx) {
gMenu.column_idx = column_idx;
SoundReq(0x69);
SoundReq(SFX_TEXTBOX_CHOICE);
}
}
@ -1128,20 +1125,20 @@ void sub_080517EC(void) {
if (gUnk_02019EE0.unk7 < 3) {
CreateDialogBox(2, 0);
sub_080A7114(2);
SoundReq(0x6a);
SoundReq(SFX_TEXTBOX_SELECT);
break;
}
// fallthrough
case B_BUTTON:
gUnk_02019EE0.unk7 = 4;
SoundReq(0x6c);
SoundReq(SFX_MENU_CANCEL);
SetFileSelectState(0);
break;
}
temp = sub_080517B4(delta);
if (temp != gUnk_02019EE0.unk7) {
gUnk_02019EE0.unk7 = temp;
SoundReq(0x69);
SoundReq(SFX_TEXTBOX_CHOICE);
}
}

View File

@ -105,13 +105,13 @@ void sub_080521A0(void) {
}
gMenu.transitionTimer = 0x3c;
sub_080A7114(temp2);
SoundReq(0x6a);
SoundReq(SFX_TEXTBOX_SELECT);
break;
}
if (gMenu.field_0x3 != temp) {
gMenu.field_0x3 = temp;
sub_08052418(0, temp);
SoundReq(0x69);
SoundReq(SFX_TEXTBOX_CHOICE);
}
break;
}
@ -170,7 +170,7 @@ void sub_080522F4(void) {
break;
case 0x1:
sub_080A7114(2);
SoundReq(0x6a);
SoundReq(SFX_TEXTBOX_SELECT);
if (temp == 0) {
DoFade(5, 8);
} else {
@ -181,7 +181,7 @@ void sub_080522F4(void) {
if (gMenu.field_0x3 != temp) {
gMenu.field_0x3 = temp;
sub_08052418(1, temp);
SoundReq(0x69);
SoundReq(SFX_TEXTBOX_CHOICE);
}
}
break;

View File

@ -1,3 +1,4 @@
#include "audio.h"
#include "global.h"
#include "main.h"
#include "entity.h"
@ -158,7 +159,7 @@ static void HandleTitlescreen(void) {
UpdateSwordBgAffineData();
}
sub_080A3210();
SoundReq(3); // fanfare
SoundReq(BGM_TITLE_SCREEN);
DoFade(6, 8);
break;
case 1:
@ -182,12 +183,12 @@ static void HandleTitlescreen(void) {
advance = GetAdvanceState();
if (advance != ADVANCE_NONE) {
if (advance == ADVANCE_KEY_PRESSED) {
SoundReq(0x6a);
SoundReq(SFX_TEXTBOX_SELECT);
} else {
advance = ADVANCE_NONE;
}
AdvanceIntroSequence(advance);
SoundReq(0x80080000);
SoundReq(SONG_VOL_FADE_OUT);
}
UpdatePressStartIcon();
if ((gIntroState.timer & 0x20) == 0) {
@ -241,7 +242,7 @@ static void HandleJapaneseTitlescreenAnimationIntro(void) {
gScreen.bg.bg1Control = 0xc09;
gFadeControl.field_0x4 = 0x40;
DoFade(6, 0x10);
SoundReq(0xf8);
SoundReq(SFX_F8);
}
}
break;
@ -271,7 +272,7 @@ static void HandleTitlescreenAnimationIntro(void) {
if (!gFadeControl.active) {
gIntroState.subState = 1;
gScreen.lcd.displayControl |= DISPCNT_BG2_ON;
SoundReq(0xF6);
SoundReq(SFX_EVAPORATE);
}
break;
case 1:
@ -290,7 +291,7 @@ static void HandleTitlescreenAnimationIntro(void) {
gIntroState.subState++;
CreateObject(0xBD, 0, 0);
DoFade(6, 16);
SoundReq(0xF8);
SoundReq(SFX_F8);
}
break;
default:

View File

@ -1,4 +1,5 @@
#include "entity.h"
#include "audio.h"
#include "functions.h"
#include "player.h"
#include "room.h"
@ -30,7 +31,7 @@ void sub_0805FBE8(Entity* this) {
sub_0801766C(this);
sub_0806F69C(this);
sub_0805FC74(this);
SoundReq(0x13f);
SoundReq(SFX_ITEM_SWORD_BEAM);
}
void sub_0805FC74(Entity* this) {
@ -39,7 +40,7 @@ void sub_0805FC74(Entity* this) {
if (--*(int*)&this->field_0x6c != -1) {
GetNextFrame(this);
sub_0806F69C(this);
++this->actionDelay;
this->actionDelay++;
if (this->type2 == 0) {
sub_0800451C(this);
}

View File

@ -51,7 +51,7 @@ void sub_0804B058(EntityData* dat) {
if ((dat != NULL) && *(u8*)dat != 0xff) {
uVar2 = 0;
do {
if ((uVar2 < 0x20) && ((dat->type) == 3)) {
if ((uVar2 < 0x20) && ((dat->kind) == 3)) {
if (sub_08049D1C(uVar2) != 0) {
ent = LoadRoomEntity(dat);
if ((ent != NULL) && (ent->kind == 3)) {

View File

@ -1,3 +1,4 @@
#include "audio.h"
#include "global.h"
#include "functions.h"
#include "structures.h"
@ -205,7 +206,7 @@ u32 sub_08056134(void) {
}
void InitDMA() {
SoundReq(0x80040000);
SoundReq(SND_VSYNC_OFF);
gScreen._6d = gScreen._6c;
gScreen._6c = 0;
@ -218,7 +219,7 @@ void InitDMA() {
}
void sub_08056208() {
SoundReq(0x80060000);
SoundReq(SND_VSYNC_ON);
gScreen._6c = gScreen._6d;
gScreen._6d = 0;
}

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "flags.h"
#include "screen.h"
#include "manager.h"
@ -80,7 +81,7 @@ void sub_0805A370(Manager15* this) {
if (this->manager.unk_0d) {
LoadRoomEntityList((EntityData*)&gUnk_080E4C08);
this->manager.action = 3;
SoundReq(0x80100000);
SoundReq(SONG_RESET_UNK);
}
}

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "flags.h"
#include "functions.h"
@ -41,7 +42,7 @@ void sub_0805C894(Entity* this) {
if (sub_0805C920(this)) {
this->action = 2;
this->actionDelay = 1;
SoundReq(0x11a);
SoundReq(SFX_EM_ARMOS_ON);
}
}
@ -57,7 +58,7 @@ void sub_0805C8B4(Entity* this) {
}
LoadPaletteGroup(gUnk_08108D20[this->field_0xf]);
if (this->field_0xf == 0) {
SoundReq(0x11a);
SoundReq(SFX_EM_ARMOS_ON);
}
}
if (sub_0805C920(this) == 0) {

View File

@ -85,10 +85,10 @@ u32 Manager28_FindMatchingEntities(Manager28* this) {
EntityData* tmp = GetCurrentRoomProperty(this->manager.unk_0b);
if (!tmp)
return 0;
for (; *((u8*)tmp) != 0xFF && !(tmp->type == 9 && tmp->subtype == 0x28); tmp++) {
for (; *((u8*)tmp) != 0xFF && !(tmp->kind == 9 && tmp->id == 0x28); tmp++) {
Entity* tmp2;
u32 i;
if (tmp->type != 3)
if (tmp->kind != 3)
continue;
tmp2 = Manager28_FindMatchingEntity(tmp);
if (!tmp2)
@ -114,7 +114,7 @@ Entity* Manager28_FindMatchingEntity(EntityData* unk1) {
y = unk1->yPos + gRoomControls.roomOriginY;
tmp = &gUnk_03003D90;
for (i = tmp->first; (u32)i != (u32)tmp; i = i->next) {
if (x == i->x.HALF.HI && y == i->y.HALF.HI && unk1->subtype == i->id && 3 == i->kind && unk1->form == i->type) {
if (x == i->x.HALF.HI && y == i->y.HALF.HI && unk1->id == i->id && 3 == i->kind && unk1->type == i->type) {
return i;
}
}

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "manager.h"
#include "flags.h"
#include "functions.h"
@ -46,13 +47,13 @@ void Manager30_Main(Manager30* this) {
case 0x317:
// stepped on a red tile again
this->manager.action = FAILED;
SoundReq(0x6d);
SoundReq(SFX_MENU_ERROR);
break;
case 0x318:
// stepped on a blue tile
// turn the tile into a red tile
sub_0807B7D8(0x317, this->player_current_tile, this->manager.unk_0b);
SoundReq(0x6b);
SoundReq(SFX_6B);
// decrease the number of remaining tiles and check if we're done
if (--this->manager.unk_0e == 0) {
this->manager.action = SUCCEEDED;
@ -87,7 +88,7 @@ void Manager30_Main(Manager30* this) {
SetFlag(this->flag_succeeded);
}
} else {
SoundReq(0x72);
SoundReq(SFX_SECRET);
}
}
}

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "manager.h"
#include "flags.h"
#include "functions.h"
@ -69,14 +70,14 @@ void sub_08057BA4(Manager5* this) {
sub_08057CA4(this, this->unk_28, this->unk_2a);
sub_0807B7D8(this->unk_30, this->unk_38 | (this->unk_3a << 6), this->unk_3c);
this->manager.unk_0f++;
SoundReq(0x71);
SoundReq(SFX_HEART_GET);
} else {
if (!this->manager.unk_0f)
return;
sub_0807BA8C(this->unk_38 | (this->unk_3a << 6), this->unk_3c);
sub_08057CA4(this, this->unk_2c, this->unk_2e);
this->manager.unk_0f--;
SoundReq(0x71);
SoundReq(SFX_HEART_GET);
}
}
@ -93,10 +94,10 @@ void sub_08057C28(Manager5* this) {
sub_08057CA4(this, this->unk_28, this->unk_2a);
sub_0807B7D8(this->unk_30, this->unk_38 | (this->unk_3a << 6), this->unk_3c);
this->manager.unk_0f++;
SoundReq(0x71);
SoundReq(SFX_HEART_GET);
} else {
if (this->unk_30 != 0x323) {
SoundReq(0x72);
SoundReq(SFX_SECRET);
}
DeleteManager(&this->manager);
}

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "manager.h"
#include "flags.h"
#include "structures.h"
@ -96,7 +97,7 @@ void sub_080588F8(ManagerC* this) {
case 0xf0:
this->unk_28 = this->unk_24.HALF.HI;
this->manager.unk_0f = 0x2D;
SoundReq(0x8c);
SoundReq(SFX_BARREL_ROLL_STOP);
}
}
} else {
@ -119,7 +120,7 @@ void sub_080588F8(ManagerC* this) {
}
if (ABS_DIFF_GT(this->unk_2c, this->unk_24.WORD, 0x100000)) {
this->unk_2c = this->unk_24.WORD;
SoundReq(0x8b);
SoundReq(SFX_BARREL_ROLL);
}
}
}
@ -209,7 +210,7 @@ void sub_08058B5C(ManagerC* this, u32 unk1) {
gScreenTransition.playerStartPos.HALF.x = gUnk_081082E8[unk1 * 3];
gScreenTransition.playerStartPos.HALF.y = gUnk_081082E8[unk1 * 3 + 1];
gSave.unk7 = gUnk_081082E8[unk1 * 3 + 2];
SoundReq(0x121);
SoundReq(SFX_STAIRS);
}
void sub_08058BC8(ManagerC* this) {

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "player.h"
#include "random.h"
@ -210,7 +211,7 @@ void sub_0806924C(Entity* ent) {
Cow_ShowDialogue(ent);
sub_080791D0();
}
SoundReq(212);
SoundReq(SFX_VO_COW);
ent->interactType = 0;
}
}

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "textbox.h"
#include "player.h"
@ -84,7 +85,7 @@ void sub_08065AA4(Entity* this) {
sub_08065A50(this);
sub_080791D0();
}
SoundReq(0xD3);
SoundReq(SFX_VO_EPONA);
this->interactType = 0;
}
}

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "functions.h"
#include "room.h"
@ -32,7 +33,7 @@ void sub_0806C224(void) {
void Simon_CreateChest(Entity* this) {
CreateObjectWithParent(this, 0xf, 0x43, 0);
SetTileType(0x73, COORD_TO_TILE(this), this->collisionLayer);
SoundReq(0x73);
SoundReq(SFX_SECRET_BIG);
}
void sub_0806C280(void) {

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "functions.h"
#include "room.h"
@ -130,7 +131,7 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
context->unk_18++;
this->field_0x20 = 0x20000;
this->frames.all &= 0xFE;
SoundReq(0x7C);
SoundReq(SFX_PLY_JUMP);
}
break;
case 2:

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "flags.h"
#include "save.h"
@ -96,7 +97,7 @@ void sub_0809D0AC(Entity* this) {
this->height.WORD = 0;
this->collisionLayer = 1;
SetLocalFlag(0x45);
SoundReq(0x72);
SoundReq(SFX_SECRET);
fx = CreateFx(this, 0x11, 0);
if (fx != NULL) {
sub_0806FAD8(this, fx);

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "room.h"
#include "player.h"
@ -58,7 +59,7 @@ void sub_0809F548(Entity* this) {
void sub_0809F5B0(Entity* this) {
if (--this->actionDelay == 0) {
SoundReq(115);
SoundReq(SFX_SECRET_BIG);
SetGlobalFlag(KUMOTATSUMAKI);
LoadRoomEntityList((EntityData*)&gUnk_080DD750);
DeleteThisEntity();
@ -111,7 +112,7 @@ void sub_0809F69C(Entity* this) {
this->actionDelay = 30;
this->action = 4;
gRoomControls.cameraTarget = &gPlayerEntity;
SoundReq(115);
SoundReq(SFX_SECRET_BIG);
}
}

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "room.h"
#include "screen.h"
@ -216,7 +217,7 @@ void GreatFairy_MiniRisingUpdate(Entity* this) {
this->height.WORD -= 0x8000;
if (this->height.HALF.HI == -20) {
this->action = 2;
SoundReq(321);
SoundReq(SFX_HEART_CONTAINER_SPAWN);
} else {
if (((this->height.HALF.HI == -10) && (this->field_0xf == 0)) &&
(target = GreatFairy_CreateForm(this, DROPLET, 0), target != NULL)) {
@ -283,7 +284,7 @@ void GreatFairy_DropletInit(Entity* this) {
this->spriteSettings.b.draw = 1;
this->height.HALF.HI = 0;
this->spritePriority.b0 = 5;
SoundReq(320);
SoundReq(SFX_140);
}
void GreatFairy_DropletUpdate(Entity* this) {
@ -322,7 +323,7 @@ void GreatFairy_BigRippleInit(Entity* this) {
this->actionDelay = 120;
this->spriteSettings.b.draw = 1;
this->spritePriority.b0 = 5;
SoundReq(249);
SoundReq(SFX_TELEPORTER);
}
void GreatFairy_BigRippleUpdate(Entity* this) {
@ -501,7 +502,7 @@ void sub_080873D0(Entity* this) {
void sub_080873FC(void) {
Entity* ent;
SoundReq(0xf7);
SoundReq(SFX_APPARATE);
gRoomControls.cameraTarget = NULL;
while (ent = FindEntityByID(0x6, 0x1b, 0x6), ent != NULL) {

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "flags.h"
#include "functions.h"
@ -51,7 +52,7 @@ static void sub_0808E714(Entity* this) {
this->action = 3;
this->field_0x3c |= 0x10;
sub_0805EC60(this);
SoundReq(0x141);
SoundReq(SFX_HEART_CONTAINER_SPAWN);
}
sub_08080CB4(this);
}

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "flags.h"
#include "functions.h"

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "functions.h"
#include "room.h"
@ -84,7 +85,7 @@ void sub_080917DC(Entity* this) {
gPlayerEntity.flags &= 0x7f;
ResetPlayer();
sub_0807A108();
SoundReq(0x7c);
SoundReq(SFX_PLY_JUMP);
}
} else {
this->actionDelay = 0;
@ -152,7 +153,7 @@ void sub_080919AC(Entity* this) {
}
if (--this->field_0xf == 0xff) {
SoundReq(0x7b);
SoundReq(SFX_PLY_VO7);
this->field_0xf = 0x3c;
}
@ -181,7 +182,7 @@ void sub_080919AC(Entity* this) {
gPlayerEntity.flags |= 0x80;
sub_08004168(this);
InitAnimationForceUpdate(this, this->animationState + 0xc);
SoundReq(0x78);
SoundReq(SFX_PLY_VO4);
SoundReq(0x139);
return;
case 0x67:

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "functions.h"
#include "coord.h"
@ -58,7 +59,7 @@ static void sub_0808F14C(Entity* this) {
sub_0808F2B0(this);
if (sub_08003FC4(this, 0x2000) == 0) {
this->action++;
SoundReq(0x84);
SoundReq(SFX_WATER_SPLASH);
}
}

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "flags.h"
#include "player.h"
@ -60,7 +61,7 @@ void sub_0809E8EC(Entity* this) {
if (--this->actionDelay == 0) {
SetFlag(this->field_0x86.HWORD);
sub_08078A90(0);
SoundReq(0x73);
SoundReq(SFX_SECRET_BIG);
DeleteThisEntity();
}
}

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "save.h"
#include "script.h"
@ -22,7 +23,7 @@ void sub_080A2124(Entity* this) {
}
void Windcrest_Unlock(Entity* this) {
SoundReq(0x72);
SoundReq(SFX_SECRET);
gSave.windcrests = gSave.windcrests | 1 << (this->type2 + 0x18);
CreateFx(this, 0x46, 0);
}

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "player.h"
#include "textbox.h"
@ -141,8 +142,8 @@ void sub_08070C3C(Entity* this) {
this->spritePriority.b1 = 0;
ResetPlayer();
sub_0807A108();
SoundReq(0x7b);
SoundReq(0x85);
SoundReq(SFX_PLY_VO7);
SoundReq(SFX_FALL_HOLE);
}
void sub_08070CB4(Entity* this) {
@ -379,8 +380,8 @@ void sub_080710A8(Entity* this) {
this->speed = 256;
sub_0807A108();
SoundReq(0x7c);
SoundReq(0x78);
SoundReq(SFX_PLY_JUMP);
SoundReq(SFX_PLY_VO4);
}
void sub_08071130(Entity* this) {
@ -436,7 +437,7 @@ void sub_08071130(Entity* this) {
this->subAction++;
sub_08078F60();
this->field_0x42 = 0;
SoundReq(0x7d);
SoundReq(SFX_PLY_LAND);
}
void sub_08071208(Entity* this) {

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "area.h"
#include "room.h"
@ -2240,7 +2241,7 @@ void sub_0804CD48(void) {
if (CheckGlobalFlag(LV1_CLEAR)) {
LoadRoomEntityList(&gUnk_080DF94C);
} else {
SoundReq(0x80100000);
SoundReq(SONG_RESET_UNK);
gArea.musicIndex = gArea.pMusicIndex;
}
}
@ -2428,7 +2429,7 @@ void sub_0804CED8(void) {
sub_0807AABC(&gPlayerEntity);
LoadRoomEntityList(&gUnk_080E1814);
} else {
SoundReq(0x80100000);
SoundReq(SONG_RESET_UNK);
gArea.musicIndex = gArea.pMusicIndex;
}
}
@ -2522,10 +2523,10 @@ void sub_0804CFB0(void) {
if (!CheckFlags(0x31)) {
if (gScreenTransition.field_0x38 == 0) {
SoundReq(0x80100000);
SoundReq(SONG_RESET_UNK);
} else {
if (gScreenTransition.field_0x39 == 0) {
SoundReq(0x80050000);
SoundReq(SONG_STOP);
sub_08078A90(3);
}
}
@ -2756,12 +2757,11 @@ u32 sub_0804D13C() {
extern EntityData gUnk_080E49F4;
void sub_0804D140(void) {
sub_0805308C(0x100);
if (CheckGlobalFlag(LV4_CLEAR)) {
LoadRoomEntityList(&gUnk_080E49F4);
} else {
SoundReq(0x80100000);
SoundReq(SONG_RESET_UNK);
gArea.musicIndex = gArea.pMusicIndex;
}
}
@ -3090,7 +3090,7 @@ void sub_0804D384(void) {
sub_08078A90(3);
LoadRoomEntityList(&gUnk_080E72E4);
gArea.musicIndex = gArea.pMusicIndex;
SoundReq(0x80100000);
SoundReq(SONG_RESET_UNK);
}
}
}
@ -3498,7 +3498,7 @@ u32 sub_0804D6C4() {
}
void sub_0804D6C8(void) {
SoundReq(0x80100000);
SoundReq(SONG_RESET_UNK);
gArea.musicIndex = gArea.pMusicIndex;
}
@ -4506,7 +4506,7 @@ void sub_0804E3C4() {
index = 0xE;
}
sub_0804B3C4(&gUnk_080F0E1C[index]);
SoundReq(0x80100000);
SoundReq(SONG_RESET_UNK);
}
u32 sub_0804E45C() {
@ -4714,7 +4714,7 @@ extern EntityData gUnk_080F2E2C;
void sub_0804E6E8(void) {
if (!CheckGlobalFlag(OUTDOOR)) {
gArea.musicIndex = gArea.pMusicIndex;
SoundReq(0x800b0036);
SoundReq(SONG_VOL_RESET | BGM_MINISH_CAP);
}
if (!CheckGlobalFlag(START)) {
LoadRoomEntityList(&gUnk_080F2E2C);
@ -4731,7 +4731,7 @@ extern EntityData gUnk_080F2EC4;
void sub_0804E72C(void) {
if (!CheckGlobalFlag(OUTDOOR)) {
gArea.musicIndex = gArea.pMusicIndex;
SoundReq(0x800b0036);
SoundReq(SONG_VOL_RESET | BGM_MINISH_CAP);
}
if (!CheckGlobalFlag(START)) {
LoadRoomEntityList(&gUnk_080F2E94);
@ -4783,7 +4783,7 @@ void sub_0804E7DC(void) {
}
if (!CheckGlobalFlag(OUTDOOR)) {
gArea.musicIndex = gArea.pMusicIndex;
SoundReq(0x800b0036);
SoundReq(SONG_VOL_RESET | BGM_MINISH_CAP);
}
if ((gPlayerState.flags.all & 8) == 0) {
LoadRoomEntityList(&gUnk_080F31D8);

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "flags.h"
#include "entity.h"
#include "area.h"
@ -1466,7 +1467,7 @@ void ScriptCommand_SoundReq3(Entity* entity, ScriptExecutionContext* context) {
}
void ScriptCommand_SoundReq0x80100000(Entity* entity, ScriptExecutionContext* context) {
SoundReq(0x80100000);
SoundReq(SONG_RESET_UNK);
}
void ScriptCommand_ModRupees(Entity* entity, ScriptExecutionContext* context) {

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "audio.h"
#include "room.h"
#include "entity.h"
#include "utils.h"
@ -185,7 +186,7 @@ u32 sub_080565B4(void) {
gUnk_02022780._89 = 1;
gUnk_02022780._99 = 1;
sub_08056F88(gUnk_02022780._3[0], gUnk_02022780._53);
SoundReq(0x65);
SoundReq(SFX_TEXTBOX_OPEN);
}
if (sub_08056CC0(1)) {
@ -200,7 +201,7 @@ u32 sub_080565F8(void) {
gUnk_02022780._89 = 1;
gUnk_02022780._99 = 3;
sub_08056BDC(0);
SoundReq(0x66);
SoundReq(SFX_TEXTBOX_CLOSE);
}
if (sub_08056CC0(-1)) {