Merge branch 'master' of github.com:sonicdcer/sf64

This commit is contained in:
Alejandro Javier Asenjo Nitti 2024-05-14 15:04:09 -03:00
commit a22cecf151
13 changed files with 446 additions and 535 deletions

View File

@ -18,189 +18,154 @@ bool Message_DisplayText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, s32 len)
void Message_DisplayScrollingText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, s32 yRangeHi, s32 yRangeLo, s32 len);
bool Message_IsPrintingChar(u16* msgPtr, s32 charPos);
// Id + 1 gives the other frame of the animation
typedef enum RadioCharacterId {
RCID_FOX = 0,
RCID_FOX_OPEN,
RCID_STATIC = 2,
RCID_STATIC_FLIP,
RCID_FOX_RED = 5,
RCID_FOX_RED_OPEN,
RCID_FALCO = 10,
RCID_FALCO_OPEN,
RCID_FALCO_RED = 15,
RCID_FALCO_RED_OPEN,
RCID_SLIPPY = 20,
RCID_SLIPPY_OPEN,
RCID_SLIPPY_RED = 25,
RCID_SLIPPY_RED_OPEN,
RCID_PEPPY = 30,
RCID_PEPPY_OPEN,
RCID_PEPPY_RED = 35,
RCID_PEPPY_RED_OPEN,
RCID_KATT = 40,
RCID_KATT_OPEN,
RCID_ANDROSS = 50,
RCID_ANDROSS_OPEN,
RCID_ANDROSS_RED = 55,
RCID_ANDROSS_RED_OPEN,
RCID_JAMES = 60,
RCID_JAMES_OPEN,
RCID_GEN_PEPPER = 70,
RCID_GEN_PEPPER_OPEN,
RCID_BOSS_CORNERIA = 80,
RCID_BOSS_CORNERIA_OPEN,
RCID_ROB64 = 90,
RCID_ROB64_OPEN,
RCID_ROB64_RED = 95,
RCID_ROB64_RED_OPEN,
RCID_BOSS_METEO = 100,
RCID_BOSS_METEO_OPEN,
RCID_BOSS_CORNERIA2 = 110,
RCID_BOSS_CORNERIA2_OPEN,
RCID_BOSS_AREA6 = 120,
RCID_BOSS_AREA6_OPEN,
RCID_BOSS_ZONESS = 130,
RCID_BOSS_ZONESS_OPEN,
RCID_ROB64_2 = 140,
RCID_ROB64_2_OPEN,
RCID_BOSS_SECTORX = 150,
RCID_BOSS_SECTORX_OPEN,
RCID_BOSS_SECTORY = 160,
RCID_BOSS_SECTORY_OPEN,
RCID_BILL = 170,
RCID_BILL_OPEN,
RCID_CAIMAN_AREA6 = 180,
RCID_CAIMAN_AREA6_OPEN,
RCID_BOSS_MACBETH = 190,
RCID_BOSS_MACBETH_OPEN,
RCID_WOLF = 200,
RCID_WOLF_OPEN,
RCID_PIGMA = 210,
RCID_PIGMA_OPEN,
RCID_LEON = 220,
RCID_LEON_OPEN,
RCID_ANDREW = 230,
RCID_ANDREW_OPEN,
RCID_WOLF_2 = 240,
RCID_WOLF_2_OPEN,
RCID_PIGMA_2 = 250,
RCID_PIGMA_2_OPEN,
RCID_LEON_2 = 260,
RCID_LEON_2_OPEN,
RCID_ANDREW_2 = 270,
RCID_ANDREW_2_OPEN,
RCID_ROB64_TITLE = 300,
RCID_ROB64_TITLE_OPEN,
RCID_GEN_PEPPER_TITLE = 310,
RCID_GEN_PEPPER_TITLE_OPEN,
RCID_TR = 350,
RCID_TR_OPEN,
RCID_FOX_EXPERT = 400,
RCID_FOX_EXPERT_OPEN,
RCID_1000 = 1000,
} RadioCharacterId;
void Radio_PlayMessage(u16*, enum RadioCharacterId);
void Radio_PlayMessage(u16*, RadioCharacterId);
void func_radio_800BB388(void);
void Radio_Draw(void);
typedef enum {
MSGCHAR_END,
MSGCHAR_NWL,
MSGCHAR_NP2,
MSGCHAR_NP3,
MSGCHAR_NP4,
MSGCHAR_NP5,
MSGCHAR_NP6,
MSGCHAR_NP7,
MSGCHAR_PRI0,
MSGCHAR_PRI1,
MSGCHAR_PRI2,
MSGCHAR_PRI3,
MSGCHAR_SPC,
MSGCHAR_QSP,
MSGCHAR_HSP,
MSGCHAR_NXT,
MSGCHAR_CLF,
MSGCHAR_CUP,
MSGCHAR_CRT,
MSGCHAR_CDN,
MSGCHAR_AUP,
MSGCHAR_ALF,
MSGCHAR_ADN,
MSGCHAR_ART,
MSGCHAR_A,
MSGCHAR_B,
MSGCHAR_C,
MSGCHAR_D,
MSGCHAR_E,
MSGCHAR_F,
MSGCHAR_G,
MSGCHAR_H,
MSGCHAR_I,
MSGCHAR_J,
MSGCHAR_K,
MSGCHAR_L,
MSGCHAR_M,
MSGCHAR_N,
MSGCHAR_O,
MSGCHAR_P,
MSGCHAR_Q,
MSGCHAR_R,
MSGCHAR_S,
MSGCHAR_T,
MSGCHAR_U,
MSGCHAR_V,
MSGCHAR_W,
MSGCHAR_X,
MSGCHAR_Y,
MSGCHAR_Z,
MSGCHAR_a,
MSGCHAR_b,
MSGCHAR_c,
MSGCHAR_d,
MSGCHAR_e,
MSGCHAR_f,
MSGCHAR_g,
MSGCHAR_h,
MSGCHAR_i,
MSGCHAR_j,
MSGCHAR_k,
MSGCHAR_l,
MSGCHAR_m,
MSGCHAR_n,
MSGCHAR_o,
MSGCHAR_p,
MSGCHAR_q,
MSGCHAR_r,
MSGCHAR_s,
MSGCHAR_t,
MSGCHAR_u,
MSGCHAR_v,
MSGCHAR_w,
MSGCHAR_x,
MSGCHAR_y,
MSGCHAR_z,
MSGCHAR_EXM,
MSGCHAR_QST,
MSGCHAR_DSH,
MSGCHAR_CMA,
MSGCHAR_PRD,
MSGCHAR_0,
MSGCHAR_1,
MSGCHAR_2,
MSGCHAR_3,
MSGCHAR_4,
MSGCHAR_5,
MSGCHAR_6,
MSGCHAR_7,
MSGCHAR_8,
MSGCHAR_9,
MSGCHAR_APS,
MSGCHAR_LPR,
MSGCHAR_RPR,
MSGCHAR_CLN,
MSGCHAR_PIP,
typedef enum MsgCharCode {
// Non-printing and whitespace
MSGCHAR_END, // End message
MSGCHAR_NWL, // New line
MSGCHAR_NP2, // No effect
MSGCHAR_NP3, // No effect
MSGCHAR_NP4, // No effect
MSGCHAR_NP5, // No effect
MSGCHAR_NP6, // No effect
MSGCHAR_NP7, // No effect
MSGCHAR_PRI0, // Set message priority
MSGCHAR_PRI1, // Set message priority
MSGCHAR_PRI2, // Set message priority
MSGCHAR_PRI3, // Set message priority
MSGCHAR_SPC, // Space
MSGCHAR_QSP, // Quarter space
MSGCHAR_HSP, // Half Space
MSGCHAR_NXT, // Next text box
// printing characters
MSGCHAR_CLF, // C-Left
MSGCHAR_CUP, // C-Up
MSGCHAR_CRT, // C-Right
MSGCHAR_CDN, // C-Down
MSGCHAR_AUP, // Up arrow
MSGCHAR_ALF, // Left arrow
MSGCHAR_ADN, // Down arrow
MSGCHAR_ART, // Right arrow
MSGCHAR_A, // A
MSGCHAR_B, // B
MSGCHAR_C, // C
MSGCHAR_D, // D
MSGCHAR_E, // E
MSGCHAR_F, // F
MSGCHAR_G, // G
MSGCHAR_H, // H
MSGCHAR_I, // I
MSGCHAR_J, // J
MSGCHAR_K, // K
MSGCHAR_L, // L
MSGCHAR_M, // M
MSGCHAR_N, // N
MSGCHAR_O, // O
MSGCHAR_P, // P
MSGCHAR_Q, // Q
MSGCHAR_R, // R
MSGCHAR_S, // S
MSGCHAR_T, // T
MSGCHAR_U, // U
MSGCHAR_V, // V
MSGCHAR_W, // W
MSGCHAR_X, // X
MSGCHAR_Y, // Y
MSGCHAR_Z, // Z
MSGCHAR_a, // a
MSGCHAR_b, // b
MSGCHAR_c, // c
MSGCHAR_d, // d
MSGCHAR_e, // e
MSGCHAR_f, // f
MSGCHAR_g, // g
MSGCHAR_h, // h
MSGCHAR_i, // i
MSGCHAR_j, // j
MSGCHAR_k, // k
MSGCHAR_l, // l
MSGCHAR_m, // m
MSGCHAR_n, // n
MSGCHAR_o, // o
MSGCHAR_p, // p
MSGCHAR_q, // q
MSGCHAR_r, // r
MSGCHAR_s, // s
MSGCHAR_t, // t
MSGCHAR_u, // u
MSGCHAR_v, // v
MSGCHAR_w, // w
MSGCHAR_x, // x
MSGCHAR_y, // y
MSGCHAR_z, // z
MSGCHAR_EXM, // !
MSGCHAR_QST, // ?
MSGCHAR_DSH, // -
MSGCHAR_CMA, // ,
MSGCHAR_PRD, // .
MSGCHAR_0, // 0
MSGCHAR_1, // 1
MSGCHAR_2, // 2
MSGCHAR_3, // 3
MSGCHAR_4, // 4
MSGCHAR_5, // 5
MSGCHAR_6, // 6
MSGCHAR_7, // 7
MSGCHAR_8, // 8
MSGCHAR_9, // 9
MSGCHAR_APS, // '
MSGCHAR_LPR, // (
MSGCHAR_RPR, // )
MSGCHAR_CLN, // :
MSGCHAR_PIP, // |
} MsgCharCode;
#endif

View File

@ -13,7 +13,7 @@ extern s32 gAllRangeSpawnEvent;
extern u16 gStarColors[16];
// fox_boss
extern s32 D_boss_800C9E90[];
extern s32 gBossBgms[];
// fox_tank
extern Vec3f D_tank_800C9F2C;

View File

@ -68,7 +68,7 @@ D_display_800CA26C = 0x800CA26C;//size:0x20
D_800CA260 = 0x800CA260;//size:0xC
D_display_801613E0 = 0x801613E0;//size:0x18
gObjectInfo = 0x800CC124;//type:u8
D_boss_800C9E90 = 0x800C9E90;//size:0x70
gBossBgms = 0x800C9E90;//size:0x70
gLeveLClearStatus = 0x800D3180; // size:0x20
gRcpSetupDLs = 0x800D31B0; // size:0x18C0

View File

@ -402,7 +402,7 @@ gArwingSpeed = 0x80161A54;
D_play_80161A5C = 0x80161A5C;
gScreenFlashTimer = 0x80161A60;
gDropHitCountItem = 0x80161A62;
sPlayWingSplash = 0x80161A64;
sPlayWingSplashSfx = 0x80161A64;
sEnvironment = 0x80161A68;
gVenomHardClear = 0x800D2F68; //type:u8

View File

@ -2,14 +2,14 @@
s32 gBossFrameCount;
s32 D_boss_800C9E90[] = {
s32 gBossBgms[] = {
NA_BGM_BOSS_CO, NA_BGM_BOSS_ME, NA_BGM_BOSS_SX, NA_BGM_BOSS_A6, NA_BGM_BOSS_SB, NA_BGM_BOSS_SY, NA_BGM_BOSS_VE,
NA_BGM_BOSS_SO, NA_BGM_BOSS_ZO, NA_BGM_BOSS_VE, NA_BGM_BOSS_CO, NA_BGM_BOSS_MA, NA_BGM_BOSS_TI, NA_BGM_BOSS_AQ,
};
s32 PAD_boss_C9EC4[14] = { 0 };
const f32 D_boss_800D55D0[] = { 6000.0f, 18000.0f, -6000.0f, -18000.0f };
const f32 D_boss_800D55D0[] = { 6000.0f, 18000.0f, -6000.0f, -18000.0f }; // unused?
void Boss_AwardBonus(Boss* boss) {
s32 bonus;

View File

@ -19,97 +19,6 @@
#include "assets/ast_katina.h"
#include "assets/ast_allies.h"
static Vec3f D_demo_800C9F60[] = {
{ 2000.0f, 2000.0f, 2000.0f },
{ -2000.0f, 2000.0f, 2000.0f },
{ 0.0f, -3000.0f, 3000.0f },
{ 5000.0f, -3000.0f, -3000.0f },
};
static f32 D_demo_800C9F90[] = { 75.0f, -80.0f, 85.0f, 0.0f };
static Vec3f D_demo_800C9FA0[] = {
{ 200.0f, -10.0f, 200.0f },
{ -200.0f, 20.0f, 200.0f },
{ 0.0f, 50.0f, 400.0f },
{ -2000.0f, -1000.0f, 0.0f },
};
static f32 D_demo_800C9FD0[] = { -1200.0f, 1200.0f, 0.0f, 0.0f };
static f32 D_demo_800C9FE0[] = { 0.0f, 0.0f, 600.0f, 2000.0f };
static f32 D_demo_800C9FF0[] = { -100.0f, 0.0f, 100.0f, 500.0f };
static f32 D_demo_800CA000[] = { -150.0f, 150.0f, 0.0f, 0.0f };
static f32 D_demo_800CA010[] = { 0.0f, 0.0f, 80.0f, 1000.0f };
static f32 D_demo_800CA020[] = { 45.0f, -45.0f, 10.0f, 0.0f };
static s32 D_demo_800CA030[] = { 0, 0, 0, 1 };
static s32 D_demo_800CA040[] = { 0, 0, 0, 0 };
static f32 D_demo_800CA050[] = { 210.0f, -210.0f, 0.0f };
static f32 D_demo_800CA05C[] = { -60.0f, -60.0f, -120.0f };
static f32 D_demo_800CA068[] = { -150.0f, -150.0f, -300.0f };
static f32 D_demo_800CA074[] = { 360.0f, -360.0f, 0.0f };
static f32 D_demo_800CA080[] = { -400.0f, 0.0f, 400.0f };
static f32 D_demo_800CA08C[] = { 0.0f, 200.0f, 0.0f };
static f32 D_demo_800CA098[] = { 1.0f, -0.9f, 0.7f };
static f32 D_demo_800CA0A4[] = { 150.0f, 100.0f, 200.0f };
static f32 D_demo_800CA0B0[] = { 200.0f, 300.0f, 500.0f };
static Vec3f D_demo_800CA0BC[] = {
{ -1373.0, 484.0, -374.0 },
{ 1373.0, 484.0, -374.0 },
{ -1373.0, -704.0, -374.0 },
{ 1373.0, -704.0, -374.0 },
};
static Vec3f D_demo_800CA0EC[] = {
{ 0.0, 40.0, -2278.0 },
{ 295.0, -92.0, -1301.0 },
{ -295.0, -92.0, -1301.0 },
};
static Vec3f D_demo_800CA110[8] = {
{ 170.0f, -35.0f, -380.0f }, { -170.0f, -40.0f, -380.0f }, { 170.0f, -130.0f, -380.0f },
{ -170.0f, -140.0f, -380.0f }, { 140.0f, 40.0f, -250.0f }, { -150.0f, 40.0f, -250.0f },
{ 140.0f, 0.0f, -250.0f }, { -150.0f, 0.0f, -250.0f },
};
static f32 D_demo_800CA170[] = {
0.15f, 0.45f, 0.75f, 1.3f, 0.75f, 0.45f, 0.15f, 0.0f,
};
static f32 D_demo_800CA190[] = { 5.0f, 5.2f };
static f32 D_demo_800CA198[] = {
0.5f, 1.5f, 2.5f, 1.5f, 0.5f, 0.2f, 0.2f,
};
static f32 D_demo_800CA1B4[] = {
-30.0f, -60.0f, -90.0f, -120.0f, -150.0f, -180.0f, -200.0, -210.0,
};
static f32 D_demo_800CA1D4[] = {
1.5f, 0.87f, 0.83f, 0.75f, 0.7f, 0.6f, 0.4f, 0.1f,
};
static Animation* D_demo_800CA1F4[] = {
&D_SY_60265B4, &D_SY_602B8DC, &D_SY_60034C4, &D_SY_602A2CC, &D_SY_602CEB4, &D_SY_602B778, &D_SY_601F3B8,
};
void func_demo_80048AC0(TeamId teamId) {
s32 teamShield;
@ -162,6 +71,14 @@ void func_demo_80048AC0(TeamId teamId) {
}
}
static Vec3f D_demo_800C9F60[] = {
{ 2000.0f, 2000.0f, 2000.0f },
{ -2000.0f, 2000.0f, 2000.0f },
{ 0.0f, -3000.0f, 3000.0f },
{ 5000.0f, -3000.0f, -3000.0f },
};
static f32 D_demo_800C9F90[] = { 75.0f, -80.0f, 85.0f, 0.0f };
void func_demo_80048CC4(Actor* actor, s32 arg1) {
Actor_Initialize(actor);
actor->obj.status = OBJ_INIT;
@ -338,6 +255,13 @@ void Cutscene_WarpZoneComplete(Player* player) {
player->rockAngle = SIN_DEG(player->rockPhase);
}
static Vec3f D_demo_800C9FA0[] = {
{ 200.0f, -10.0f, 200.0f },
{ -200.0f, 20.0f, 200.0f },
{ 0.0f, 50.0f, 400.0f },
{ -2000.0f, -1000.0f, 0.0f },
};
void func_demo_80049630(ActorCutscene* this) {
Vec3f sp3C;
Vec3f sp30;
@ -395,6 +319,15 @@ void func_demo_8004990C(Player* player) {
player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll;
}
static f32 D_demo_800C9FD0[] = { -1200.0f, 1200.0f, 0.0f, 0.0f };
static f32 D_demo_800C9FE0[] = { 0.0f, 0.0f, 600.0f, 2000.0f };
static f32 D_demo_800C9FF0[] = { -100.0f, 0.0f, 100.0f, 500.0f };
static f32 D_demo_800CA000[] = { -150.0f, 150.0f, 0.0f, 0.0f };
static f32 D_demo_800CA010[] = { 0.0f, 0.0f, 80.0f, 1000.0f };
static f32 D_demo_800CA020[] = { 45.0f, -45.0f, 10.0f, 0.0f };
static s32 D_demo_800CA030[] = { 0, 0, 0, 1 };
static s32 D_demo_800CA040[] = { 0, 0, 0, 0 };
void func_demo_80049968(Actor* actor, s32 arg1) {
Actor_Initialize(actor);
actor->obj.status = OBJ_INIT;
@ -721,6 +654,11 @@ void Cutscene_LevelStart(Player* player) {
}
}
static f32 D_demo_800CA050[] = { 210.0f, -210.0f, 0.0f };
static f32 D_demo_800CA05C[] = { -60.0f, -60.0f, -120.0f };
static f32 D_demo_800CA068[] = { -150.0f, -150.0f, -300.0f };
static f32 D_demo_800CA074[] = { 360.0f, -360.0f, 0.0f };
void func_demo_8004A700(Actor* actor, s32 arg1) {
Actor_Initialize(actor);
actor->obj.status = OBJ_INIT;
@ -795,6 +733,9 @@ void func_demo_8004AA84(void) {
}
}
static f32 D_demo_800CA080[] = { -400.0f, 0.0f, 400.0f };
static f32 D_demo_800CA08C[] = { 0.0f, 200.0f, 0.0f };
void Cutscene_AllRangeMode(Player* player) {
s32 pad;
Vec3f sp70;
@ -817,9 +758,9 @@ void Cutscene_AllRangeMode(Player* player) {
} else if (gCurrentLevel != LEVEL_TRAINING) {
Radio_PlayMessage(gMsg_ID_20180, RCID_FOX);
if (gCurrentLevel == LEVEL_SECTOR_Y) {
Audio_PlaySequence(SEQ_PLAYER_BGM, D_boss_800C9E90[gCurrentLevel], 0, 2);
Audio_PlaySequence(SEQ_PLAYER_BGM, gBossBgms[gCurrentLevel], 0, 2);
} else {
AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]);
AUDIO_PLAY_BGM(gBossBgms[gCurrentLevel]);
}
}
}
@ -1923,6 +1864,10 @@ void Cutscene_PlayerDown(Player* player) {
}
}
static f32 D_demo_800CA098[] = { 1.0f, -0.9f, 0.7f };
static f32 D_demo_800CA0A4[] = { 150.0f, 100.0f, 200.0f };
static f32 D_demo_800CA0B0[] = { 200.0f, 300.0f, 500.0f };
void func_demo_8004E4D4(ActorCutscene* this) {
Vec3f sp54;
Vec3f sp48;
@ -2482,6 +2427,39 @@ void ActorCutscene_Update(ActorCutscene* this) {
}
}
static Vec3f D_demo_800CA0BC[] = {
{ -1373.0, 484.0, -374.0 },
{ 1373.0, 484.0, -374.0 },
{ -1373.0, -704.0, -374.0 },
{ 1373.0, -704.0, -374.0 },
};
static Vec3f D_demo_800CA0EC[] = {
{ 0.0, 40.0, -2278.0 },
{ 295.0, -92.0, -1301.0 },
{ -295.0, -92.0, -1301.0 },
};
static Vec3f D_demo_800CA110[8] = {
{ 170.0f, -35.0f, -380.0f }, { -170.0f, -40.0f, -380.0f }, { 170.0f, -130.0f, -380.0f },
{ -170.0f, -140.0f, -380.0f }, { 140.0f, 40.0f, -250.0f }, { -150.0f, 40.0f, -250.0f },
{ 140.0f, 0.0f, -250.0f }, { -150.0f, 0.0f, -250.0f },
};
static f32 D_demo_800CA170[] = {
0.15f, 0.45f, 0.75f, 1.3f, 0.75f, 0.45f, 0.15f, 0.0f,
};
static f32 D_demo_800CA190[] = { 5.0f, 5.2f };
static f32 D_demo_800CA198[] = {
0.5f, 1.5f, 2.5f, 1.5f, 0.5f, 0.2f, 0.2f,
};
static f32 D_demo_800CA1B4[] = {
-30.0f, -60.0f, -90.0f, -120.0f, -150.0f, -180.0f, -200.0, -210.0,
};
static f32 D_demo_800CA1D4[] = {
1.5f, 0.87f, 0.83f, 0.75f, 0.7f, 0.6f, 0.4f, 0.1f,
};
static Animation* D_demo_800CA1F4[] = {
&D_SY_60265B4, &D_SY_602B8DC, &D_SY_60034C4, &D_SY_602A2CC, &D_SY_602CEB4, &D_SY_602B778, &D_SY_601F3B8,
};
void func_demo_8004FCB8(Actor* actor, s32 arg1) {
f32 angle;
f32 scale;

View File

@ -1538,7 +1538,7 @@ void func_hud_80088970(void) {
gFillScreenAlpha += 32;
if (gFillScreenAlpha > 255) {
gFillScreenAlpha = 255;
};
}
if (D_80161838[0] < 160) {
break;
}
@ -2523,7 +2523,7 @@ void func_hud_8008B9E8(void) {
if ((D_80161788 == 0) && (D_8016178C == 0)) {
if ((gRadioState >= 4) && (gCurrentRadioPortrait != RCID_STATIC) &&
(gCurrentRadioPortrait != RCID_STATIC_FLIP)) {
(gCurrentRadioPortrait != RCID_STATIC + 1)) {
temp = func_hud_8008B774();
if (temp == 1) {
D_80161788 = 20;
@ -2536,7 +2536,7 @@ void func_hud_8008B9E8(void) {
}
}
if ((gCurrentRadioPortrait == RCID_STATIC) || (gCurrentRadioPortrait == RCID_STATIC_FLIP)) {
if ((gCurrentRadioPortrait == RCID_STATIC) || (gCurrentRadioPortrait == RCID_STATIC + 1)) {
D_80161788 = 0;
D_8016178C = 0;
}

View File

@ -42,7 +42,7 @@ s32 D_play_80161A58; // unused
s32 D_play_80161A5C; // saved hit count for venom -> andross
u16 gScreenFlashTimer;
u16 gDropHitCountItem;
s32 sPlayWingSplash;
s32 sPlayWingSplashSfx;
Environment* sEnvironment;
#define MEM_ARRAY_ALLOCATE(arr, count) ((arr) = Memory_Allocate((count) * sizeof(*(arr))))
@ -245,7 +245,7 @@ void Player_WaterEffects(Player* player) {
Matrix_MultVec3f(gCalcMatrix, &sp48, &sp30);
if (player->pos.y < (gGroundHeight + 100.0f)) {
if ((sp3C.y < gGroundHeight + 80.0f) && ((gGameFrameCount % 2) == 0)) {
if (sPlayWingSplash) {}
if (sPlayWingSplashSfx) {}
func_effect_8007ACE0(sp3C.x, gGroundHeight, sp3C.z, 0.1f, 2.0f,
player->rot.y + player->yRot_114 + 20.0f);
}
@ -255,12 +255,12 @@ void Player_WaterEffects(Player* player) {
}
}
if ((sp30.y < gGroundHeight + 80.0f) || (sp3C.y < gGroundHeight + 80.0f)) {
if (!sPlayWingSplash) {
sPlayWingSplash = true;
if (!sPlayWingSplashSfx) {
sPlayWingSplashSfx = true;
AUDIO_PLAY_SFX(NA_SE_SPLASH_LEVEL_S, player->sfxSource, 0);
}
} else {
sPlayWingSplash = false;
sPlayWingSplashSfx = false;
Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_SPLASH_LEVEL_S);
}
}

View File

@ -171,16 +171,16 @@ void func_radio_800BAAE8(void) {
case RCID_FOX:
radioPortraitTex = D_10050E0;
break;
case RCID_FOX_RED_OPEN:
case RCID_FOX_RED + 1:
sRadioUseRedBox = true;
/* fallthrough */
case RCID_FOX_OPEN:
case RCID_FOX + 1:
radioPortraitTex = D_1006000;
break;
case RCID_FOX_EXPERT:
radioPortraitTex = D_1006F20;
break;
case RCID_FOX_EXPERT_OPEN:
case RCID_FOX_EXPERT + 1:
radioPortraitTex = D_1007E40;
break;
case RCID_FALCO_RED:
@ -189,10 +189,10 @@ void func_radio_800BAAE8(void) {
case RCID_FALCO:
radioPortraitTex = D_10032A0;
break;
case RCID_FALCO_RED_OPEN:
case RCID_FALCO_RED + 1:
sRadioUseRedBox = true;
/* fallthrough */
case RCID_FALCO_OPEN:
case RCID_FALCO + 1:
radioPortraitTex = D_10041C0;
break;
case RCID_SLIPPY_RED:
@ -201,10 +201,10 @@ void func_radio_800BAAE8(void) {
case RCID_SLIPPY:
radioPortraitTex = D_100D900;
break;
case RCID_SLIPPY_RED_OPEN:
case RCID_SLIPPY_RED + 1:
sRadioUseRedBox = true;
/* fallthrough */
case RCID_SLIPPY_OPEN:
case RCID_SLIPPY + 1:
radioPortraitTex = D_100E820;
break;
case RCID_PEPPY_RED:
@ -213,112 +213,112 @@ void func_radio_800BAAE8(void) {
case RCID_PEPPY:
radioPortraitTex = D_100BAC0;
break;
case RCID_PEPPY_RED_OPEN:
case RCID_PEPPY_RED + 1:
sRadioUseRedBox = true;
/* fallthrough */
case RCID_PEPPY_OPEN:
case RCID_PEPPY + 1:
radioPortraitTex = D_100C9E0;
break;
case RCID_WOLF:
radioPortraitTex = D_STAR_WOLF_F00B580;
break;
case RCID_WOLF_OPEN:
case RCID_WOLF + 1:
radioPortraitTex = D_STAR_WOLF_F00C4A0;
break;
case RCID_PIGMA:
radioPortraitTex = D_STAR_WOLF_F003C80;
break;
case RCID_PIGMA_OPEN:
case RCID_PIGMA + 1:
radioPortraitTex = D_STAR_WOLF_F004BA0;
break;
case RCID_LEON:
radioPortraitTex = D_STAR_WOLF_F007900;
break;
case RCID_LEON_OPEN:
case RCID_LEON + 1:
radioPortraitTex = D_STAR_WOLF_F008820;
break;
case RCID_ANDREW:
radioPortraitTex = D_STAR_WOLF_F000000;
break;
case RCID_ANDREW_OPEN:
case RCID_ANDREW + 1:
radioPortraitTex = D_STAR_WOLF_F000F20;
break;
case RCID_WOLF_2:
radioPortraitTex = D_STAR_WOLF_F00D3C0;
break;
case RCID_WOLF_2_OPEN:
case RCID_WOLF_2 + 1:
radioPortraitTex = D_STAR_WOLF_F00E2E0;
break;
case RCID_PIGMA_2:
radioPortraitTex = D_STAR_WOLF_F005AC0;
break;
case RCID_PIGMA_2_OPEN:
case RCID_PIGMA_2 + 1:
radioPortraitTex = D_STAR_WOLF_F0069E0;
break;
case RCID_LEON_2:
radioPortraitTex = D_STAR_WOLF_F009740;
break;
case RCID_LEON_2_OPEN:
case RCID_LEON_2 + 1:
radioPortraitTex = D_STAR_WOLF_F00A660;
break;
case RCID_ANDREW_2:
radioPortraitTex = D_STAR_WOLF_F001E40;
break;
case RCID_ANDREW_2_OPEN:
case RCID_ANDREW_2 + 1:
radioPortraitTex = D_STAR_WOLF_F002D60;
break;
case RCID_BOSS_CORNERIA:
radioPortraitTex = D_CO_6026420;
break;
case RCID_BOSS_CORNERIA_OPEN:
case RCID_BOSS_CORNERIA + 1:
radioPortraitTex = D_CO_6027340;
break;
case RCID_BOSS_CORNERIA2:
radioPortraitTex = D_CO_60245E0;
break;
case RCID_BOSS_CORNERIA2_OPEN:
case RCID_BOSS_CORNERIA2 + 1:
radioPortraitTex = D_CO_6025500;
break;
case RCID_BOSS_METEO:
radioPortraitTex = D_ME_601C8E0;
break;
case RCID_BOSS_METEO_OPEN:
case RCID_BOSS_METEO + 1:
radioPortraitTex = D_ME_601D800;
break;
case RCID_BOSS_AREA6:
radioPortraitTex = D_A6_60047E0;
break;
case RCID_BOSS_AREA6_OPEN:
case RCID_BOSS_AREA6 + 1:
radioPortraitTex = D_A6_6005700;
break;
case RCID_CAIMAN_AREA6:
radioPortraitTex = D_A6_60029A0;
break;
case RCID_CAIMAN_AREA6_OPEN:
case RCID_CAIMAN_AREA6 + 1:
radioPortraitTex = D_A6_60038C0;
break;
case RCID_BOSS_ZONESS:
radioPortraitTex = D_ZO_6014510;
break;
case RCID_BOSS_ZONESS_OPEN:
case RCID_BOSS_ZONESS + 1:
radioPortraitTex = D_ZO_6015430;
break;
case RCID_BOSS_SECTORX:
radioPortraitTex = D_SX_6020FB0;
break;
case RCID_BOSS_SECTORX_OPEN:
case RCID_BOSS_SECTORX + 1:
radioPortraitTex = D_SX_6021ED0;
break;
case RCID_BOSS_SECTORY:
radioPortraitTex = D_SY_6018F30;
break;
case RCID_BOSS_SECTORY_OPEN:
case RCID_BOSS_SECTORY + 1:
radioPortraitTex = D_SY_6019E50;
break;
case RCID_BOSS_MACBETH:
radioPortraitTex = D_MA_6010C20;
break;
case RCID_BOSS_MACBETH_OPEN:
case RCID_BOSS_MACBETH + 1:
radioPortraitTex = D_MA_6011B40;
break;
case RCID_ROB64_RED:
@ -328,17 +328,17 @@ void func_radio_800BAAE8(void) {
case RCID_ROB64_2:
radioPortraitTex = D_1009C80;
break;
case RCID_ROB64_RED_OPEN:
case RCID_ROB64_RED + 1:
sRadioUseRedBox = true;
/* fallthrough */
case RCID_ROB64_OPEN:
case RCID_ROB64_2_OPEN:
case RCID_ROB64 + 1:
case RCID_ROB64_2 + 1:
radioPortraitTex = D_100ABA0;
break;
case RCID_KATT:
radioPortraitTex = D_D003DF0;
break;
case RCID_KATT_OPEN:
case RCID_KATT + 1:
radioPortraitTex = D_D004D10;
break;
case RCID_ANDROSS_RED:
@ -349,8 +349,8 @@ void func_radio_800BAAE8(void) {
}
sRadioUseRedBox = true;
break;
case RCID_ANDROSS_RED_OPEN:
case RCID_ANDROSS_OPEN:
case RCID_ANDROSS_RED + 1:
case RCID_ANDROSS + 1:
radioPortraitTex = D_D001090;
if ((gGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_AREA_6)) {
radioPortraitTex = D_A6_6001A80;
@ -360,40 +360,40 @@ void func_radio_800BAAE8(void) {
case RCID_JAMES:
radioPortraitTex = D_D005C30;
break;
case RCID_JAMES_OPEN:
case RCID_JAMES + 1:
radioPortraitTex = D_D006B50;
break;
case RCID_BILL:
radioPortraitTex = D_D001FB0;
break;
case RCID_BILL_OPEN:
case RCID_BILL + 1:
radioPortraitTex = D_D002ED0;
break;
case RCID_GEN_PEPPER:
radioPortraitTex = D_D007A70;
break;
case RCID_GEN_PEPPER_OPEN:
case RCID_GEN_PEPPER + 1:
radioPortraitTex = D_D008990;
break;
case RCID_ROB64_TITLE:
radioPortraitTex = D_GREAT_FOX_E00E100;
break;
case RCID_ROB64_TITLE_OPEN:
case RCID_ROB64_TITLE + 1:
radioPortraitTex = D_GREAT_FOX_E00F020;
break;
case RCID_GEN_PEPPER_TITLE:
radioPortraitTex = D_GREAT_FOX_E00FF40;
break;
case RCID_GEN_PEPPER_TITLE_OPEN:
case RCID_GEN_PEPPER_TITLE + 1:
radioPortraitTex = D_GREAT_FOX_E010E60;
break;
case RCID_TR:
radioPortraitTex = D_TR_6000900;
break;
case RCID_TR_OPEN:
case RCID_TR + 1:
radioPortraitTex = D_TR_6001820;
break;
case RCID_STATIC_FLIP:
case RCID_STATIC + 1:
mirror = true;
/* fallthrough */
case RCID_STATIC:
@ -541,7 +541,7 @@ void Radio_Draw(void) {
}
gCurrentRadioPortrait = RCID_STATIC;
if ((gGameFrameCount % 2) != 0) {
gCurrentRadioPortrait = RCID_STATIC_FLIP;
gCurrentRadioPortrait = RCID_STATIC + 1;
}
break;
@ -552,7 +552,7 @@ void Radio_Draw(void) {
}
gCurrentRadioPortrait = RCID_STATIC;
if ((gGameFrameCount % 2) != 0) {
gCurrentRadioPortrait = RCID_STATIC_FLIP;
gCurrentRadioPortrait = RCID_STATIC + 1;
}
break;
@ -659,7 +659,7 @@ void Radio_Draw(void) {
}
gCurrentRadioPortrait = RCID_STATIC;
if ((gGameFrameCount % 2) != 0) {
gCurrentRadioPortrait = RCID_STATIC_FLIP;
gCurrentRadioPortrait = RCID_STATIC + 1;
}
gRadioTextBoxScaleY -= 0.26f;
if (gRadioTextBoxScaleY < 0.0f) {
@ -676,7 +676,7 @@ void Radio_Draw(void) {
}
gCurrentRadioPortrait = RCID_STATIC;
if ((gGameFrameCount % 2) != 0) {
gCurrentRadioPortrait = RCID_STATIC_FLIP;
gCurrentRadioPortrait = RCID_STATIC + 1;
}
break;
@ -707,14 +707,14 @@ void Radio_Draw(void) {
idx = TEAM_ID_PEPPY;
}
if ((gTeamShields[idx] <= 0) && (gGameFrameCount & 4) && (gTeamShields[idx] != -2) &&
(gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP) &&
(gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1) &&
(gCurrentRadioPortrait != RCID_1000)) {
RCP_SetupDL(&gMasterDisp, 0x4C);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN");
func_hud_80084B94(1);
}
if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) &&
if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) &&
(gCurrentRadioPortrait != RCID_1000)) {
func_hud_80086110(22.0f, 165.0f, gTeamShields[idx]);
}
@ -757,17 +757,17 @@ void Radio_Draw(void) {
if ((gActors[idx].obj.status != OBJ_ACTIVE) && (gGameFrameCount & 4) &&
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gCurrentRadioPortrait != RCID_STATIC) &&
(gCurrentRadioPortrait != RCID_STATIC_FLIP) && (gCurrentRadioPortrait != RCID_1000)) {
(gCurrentRadioPortrait != RCID_STATIC + 1) && (gCurrentRadioPortrait != RCID_1000)) {
RCP_SetupDL(&gMasterDisp, 0x4C);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN");
}
if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) &&
if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) &&
(gCurrentRadioPortrait != RCID_1000)) {
func_hud_80086110(22.0f, 165.0f, gActors[idx].health * 2.55f);
}
}
if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) &&
if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) &&
(gCurrentRadioPortrait != RCID_1000)) {
func_hud_8008AD94();
}
@ -816,7 +816,7 @@ void func_radio_800BC040(void) {
gCurrentRadioPortrait = RCID_STATIC;
if ((gGameFrameCount % 2) != 0) {
gCurrentRadioPortrait = RCID_STATIC_FLIP;
gCurrentRadioPortrait = RCID_STATIC + 1;
}
break;
@ -862,7 +862,7 @@ void func_radio_800BC040(void) {
gCurrentRadioPortrait = RCID_STATIC;
if ((gGameFrameCount % 2) != 0) {
gCurrentRadioPortrait = RCID_STATIC_FLIP;
gCurrentRadioPortrait = RCID_STATIC + 1;
}
gRadioTextBoxScaleY -= 0.015f;
@ -880,7 +880,7 @@ void func_radio_800BC040(void) {
}
gCurrentRadioPortrait = RCID_STATIC;
if ((gGameFrameCount % 2) != 0) {
gCurrentRadioPortrait = RCID_STATIC_FLIP;
gCurrentRadioPortrait = RCID_STATIC + 1;
}
break;

View File

@ -504,7 +504,7 @@ void Meteo_801887D0(Boss* boss) {
void Meteo_Boss297_Init(Boss297* this) {
s32 i;
AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]);
AUDIO_PLAY_BGM(gBossBgms[gCurrentLevel]);
gBossActive = true;

View File

@ -512,7 +512,7 @@ void SectorX_80190078(Boss* boss) {
boss->health = 300;
boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032550);
gBossActive = true;
AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]);
AUDIO_PLAY_BGM(gBossBgms[gCurrentLevel]);
boss->swork[6] = 1;
boss->fwork[44] = 5.0f;
boss->fwork[43] = 5.0f;
@ -838,7 +838,7 @@ void SectorX_80190078(Boss* boss) {
boss->fwork[0] = 0.0f;
boss->unk_04C = 0;
boss->health = 300;
Audio_PlaySequenceDistorted(0, D_boss_800C9E90[gCurrentLevel], 1121, 25, -1);
Audio_PlaySequenceDistorted(0, gBossBgms[gCurrentLevel], 1121, 25, -1);
Radio_PlayMessage(gMsg_ID_19205, RCID_FOX);
boss->timer_052 = 100;
}

View File

@ -1020,7 +1020,7 @@ void Andross_80189B70(Boss* boss) {
gPlayer[0].unk_014 = 1.0f;
Camera_Update360(gPlayer, 1);
Audio_StartPlayerNoise(0);
AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]);
AUDIO_PLAY_BGM(gBossBgms[gCurrentLevel]);
AUDIO_PLAY_SFX(NA_SE_OB_ROUTE_EXPLOSION1, gDefaultSfxSource, 0);
D_ctx_80177CA4 = gHitCount;

View File

@ -68,7 +68,7 @@ s32 D_menu_801B91B8;
s32 D_menu_801B91BC;
s32 D_menu_801B91C0;
s32 D_menu_801B91C4;
s32 D_menu_801B91C8;
bool D_menu_801B91C8;
s32 D_menu_801B91CC;
s32 D_menu_801B91D0;
f32 D_menu_801B91D4;
@ -467,43 +467,41 @@ void Option_Setup(void) {
} else {
D_menu_801B9124 = 300;
}
} else {
if (D_game_800D2870) {
D_menu_801B91A4 = 2;
D_menu_801B91A8 = gVsMatchType;
for (i = 0; i < OPTION_COUNT; i++) {
if (i == 2) {
continue;
}
sOptionCardList[i].unk_38.unk_0C = 0.01f;
sOptionCardList[i].unk_38.unk_10 = 0.21f;
sOptionCardList[i].unk_38.unk_04 = sOptionCardPosY[i];
sOptionCardList[i].unk_38.unk_00 = 0.0f;
sOptionCardList[i].unk_38.unk_08 = 0.0f;
sOptionCardList[i].unk_5C = 0;
sOptionCardList[i].unk_00.unk_20 = 0.01f;
sOptionCardList[i].unk_00.unk_24 = 1.0f;
sOptionCardList[i].unk_00.unk_18 = 158.0f;
sOptionCardList[i].unk_00.unk_1C = sOptionCardCurTextPosY[i];
sOptionCardList[i].unk_58 = 0;
} else if (D_game_800D2870) {
D_menu_801B91A4 = 2;
D_menu_801B91A8 = gVsMatchType;
for (i = 0; i < OPTION_COUNT; i++) {
if (i == 2) {
continue;
}
sOptionCardList[2].unk_38.unk_00 = 0.0f;
sOptionCardList[2].unk_38.unk_08 = 0.0f;
sOptionCardList[2].unk_38.unk_04 = 90.0f;
sOptionCardList[2].unk_38.unk_0C = 0.4f;
sOptionCardList[2].unk_38.unk_10 = 0.21f;
sOptionCardList[2].unk_5C = 1;
sOptionCardList[2].unk_00.unk_20 = 1.0f;
sOptionCardList[2].unk_00.unk_24 = 1.0f;
sOptionCardList[2].unk_00.unk_18 = 145.0f;
sOptionCardList[2].unk_00.unk_1C = 25.0f;
sOptionCardList[2].unk_58 = 1;
sOptionCardList[i].unk_38.unk_0C = 0.01f;
sOptionCardList[i].unk_38.unk_10 = 0.21f;
sOptionCardList[i].unk_38.unk_04 = sOptionCardPosY[i];
sOptionCardList[i].unk_38.unk_00 = 0.0f;
sOptionCardList[i].unk_38.unk_08 = 0.0f;
sOptionCardList[i].unk_5C = 0;
D_menu_801B9124 = OPTION_VERSUS;
} else {
D_menu_801B9124 = OPTION_MAIN_MENU;
sOptionCardList[i].unk_00.unk_20 = 0.01f;
sOptionCardList[i].unk_00.unk_24 = 1.0f;
sOptionCardList[i].unk_00.unk_18 = 158.0f;
sOptionCardList[i].unk_00.unk_1C = sOptionCardCurTextPosY[i];
sOptionCardList[i].unk_58 = 0;
}
sOptionCardList[2].unk_38.unk_00 = 0.0f;
sOptionCardList[2].unk_38.unk_08 = 0.0f;
sOptionCardList[2].unk_38.unk_04 = 90.0f;
sOptionCardList[2].unk_38.unk_0C = 0.4f;
sOptionCardList[2].unk_38.unk_10 = 0.21f;
sOptionCardList[2].unk_5C = 1;
sOptionCardList[2].unk_00.unk_20 = 1.0f;
sOptionCardList[2].unk_00.unk_24 = 1.0f;
sOptionCardList[2].unk_00.unk_18 = 145.0f;
sOptionCardList[2].unk_00.unk_1C = 25.0f;
sOptionCardList[2].unk_58 = 1;
D_menu_801B9124 = OPTION_VERSUS;
} else {
D_menu_801B9124 = OPTION_MAIN_MENU;
}
D_menu_801B912C = 0;
@ -866,8 +864,6 @@ void Option_MainMenuUpdate(void) {
s32 i;
f32 var_fs0;
f32 var_fs1;
s32 temp1;
s32 temp2;
switch (D_menu_801B912C) {
case 0:
@ -919,49 +915,46 @@ void Option_MainMenuUpdate(void) {
break;
case 1:
temp1 =
Option_8019C418(&D_menu_801B91A4, OPTION_COUNT - 1, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9180);
// clang-format off
if (temp1 != 0) { AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); }
if (Option_8019C418(&D_menu_801B91A4, OPTION_COUNT - 1, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9180)) {\
AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4);\
}
// clang-format on
if ((D_menu_801B91A4 == 0) && (D_menu_801B91C8 != 0)) {
temp2 = Option_8019C418(&D_menu_801B91B0, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9190);
if (temp2 != 0) {
AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4);
if (D_menu_801B91B0) {
sOptionCardList[0].unk_00.unk_08 = D_OPT_8004C50;
sOptionCardList[0].unk_00.unk_10 = 80;
sOptionCardList[0].unk_00.unk_14 = 12;
sOptionCardList[0].unk_00.unk_18 = 125.0f;
sOptionCardList[0].unk_00.unk_1C = 55.0f;
} else {
sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50;
sOptionCardList[0].unk_00.unk_10 = 72;
sOptionCardList[0].unk_00.unk_14 = 12;
sOptionCardList[0].unk_00.unk_18 = 124.0f;
sOptionCardList[0].unk_00.unk_1C = 54.0f;
}
gExpertMode = D_menu_801B91B0;
if ((D_menu_801B91A4 == 0) && D_menu_801B91C8 &&
Option_8019C418(&D_menu_801B91B0, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9190)) {
AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4);
if (D_menu_801B91B0) {
sOptionCardList[0].unk_00.unk_08 = D_OPT_8004C50;
sOptionCardList[0].unk_00.unk_10 = 80;
sOptionCardList[0].unk_00.unk_14 = 12;
sOptionCardList[0].unk_00.unk_18 = 125.0f;
sOptionCardList[0].unk_00.unk_1C = 55.0f;
} else {
sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50;
sOptionCardList[0].unk_00.unk_10 = 72;
sOptionCardList[0].unk_00.unk_14 = 12;
sOptionCardList[0].unk_00.unk_18 = 124.0f;
sOptionCardList[0].unk_00.unk_1C = 54.0f;
}
gExpertMode = D_menu_801B91B0;
}
if ((D_menu_801B91A4 == 4) && (D_menu_801B91C8 != 0)) {
temp2 = Option_8019C418(&D_menu_801B91AC, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9198);
if (temp2 != 0) {
AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4);
if (D_menu_801B91AC) {
sOptionCardList[4].unk_00.unk_08 = D_OPT_8004C50;
sOptionCardList[4].unk_00.unk_10 = 80;
sOptionCardList[4].unk_00.unk_14 = 12;
sOptionCardList[4].unk_00.unk_18 = 125.0f;
sOptionCardList[4].unk_00.unk_1C = 151.0f;
} else {
sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0;
sOptionCardList[4].unk_00.unk_10 = 64;
sOptionCardList[4].unk_00.unk_14 = 10;
sOptionCardList[4].unk_00.unk_18 = 133.0f;
sOptionCardList[4].unk_00.unk_1C = 151.0f;
}
if ((D_menu_801B91A4 == 4) && D_menu_801B91C8 &&
Option_8019C418(&D_menu_801B91AC, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9198)) {
AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4);
if (D_menu_801B91AC) {
sOptionCardList[4].unk_00.unk_08 = D_OPT_8004C50;
sOptionCardList[4].unk_00.unk_10 = 80;
sOptionCardList[4].unk_00.unk_14 = 12;
sOptionCardList[4].unk_00.unk_18 = 125.0f;
sOptionCardList[4].unk_00.unk_1C = 151.0f;
} else {
sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0;
sOptionCardList[4].unk_00.unk_10 = 64;
sOptionCardList[4].unk_00.unk_14 = 10;
sOptionCardList[4].unk_00.unk_18 = 133.0f;
sOptionCardList[4].unk_00.unk_1C = 151.0f;
}
}
@ -1016,33 +1009,31 @@ void Option_MainMenuUpdate(void) {
}
}
if (D_menu_801B917C != 0) {
break;
}
if (D_menu_801B917C == 0) {
var_fs0 = 25.0f;
var_fs1 = 90.0f;
var_fs0 = 25.0f;
var_fs1 = 90.0f;
if ((D_menu_801B91A4 == 0) || (D_menu_801B91A4 == 1)) {
var_fs0 = 0.0f;
var_fs1 = 120.0f;
}
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.unk_1C, var_fs0, 0.25f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.unk_04, var_fs1, 0.25f, 100.0f, 0.1f);
gBlurAlpha += 4;
if ((sOptionCardList[D_menu_801B91A4].unk_00.unk_1C == var_fs0) &&
(sOptionCardList[D_menu_801B91A4].unk_38.unk_04 == var_fs1)) {
gBlurAlpha += 255;
D_menu_801B9124 = D_menu_801B91A4;
if (D_menu_801B91A4 == 4 && D_menu_801B91AC) {
D_menu_801B9124 = 6;
if ((D_menu_801B91A4 == 0) || (D_menu_801B91A4 == 1)) {
var_fs0 = 0.0f;
var_fs1 = 120.0f;
}
Option_InitEntry();
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.unk_1C, var_fs0, 0.25f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.unk_04, var_fs1, 0.25f, 100.0f, 0.1f);
gBlurAlpha += 4;
if ((sOptionCardList[D_menu_801B91A4].unk_00.unk_1C == var_fs0) &&
(sOptionCardList[D_menu_801B91A4].unk_38.unk_04 == var_fs1)) {
gBlurAlpha += 255;
D_menu_801B9124 = D_menu_801B91A4;
if (D_menu_801B91A4 == 4 && D_menu_801B91AC) {
D_menu_801B9124 = 6;
}
Option_InitEntry();
}
}
break;
@ -1082,10 +1073,10 @@ void Option_MainMenuDraw(void) {
if (!(sOptionCardList[i].unk_58) || (sOptionCardList[i].unk_00.unk_20) <= 0.0f) {
continue;
}
if ((i == 0) && (D_menu_801B91C8 != 0) && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) {
if ((i == 0) && D_menu_801B91C8 && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) {
Option_8019B6D8(106.0f, 56.0f, 98.0f, 20, 0, 75);
}
if ((i == 4) && (D_menu_801B91C8 != 0) && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) {
if ((i == 4) && D_menu_801B91C8 && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) {
Option_8019B6D8(106.0f, 152.0f, 98.0f, 20, 0, 75);
}
Option_DrawCardLabel(sOptionCardList[i].unk_00);
@ -1363,12 +1354,9 @@ void Option_SoundInit(void) {
}
void Option_SoundUpdate(void) {
s32 sp34;
s32 temp;
s32 sp34 = D_menu_801B9288;
sp34 = D_menu_801B9288;
temp = Option_8019C418(&D_menu_801B9288, 3, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9250);
if (temp != 0) {
if (Option_8019C418(&D_menu_801B9288, 3, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9250)) {
D_menu_801B9270[sp34] = 255.0f;
AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4);
}
@ -1540,7 +1528,7 @@ void Option_801952B4(void) {
case 1:
if (D_menu_801B9178 != 0) {
break; // investigate
break; // looks fake, but isn't
}
for (i = 2; i < 4; i++) {
@ -1554,17 +1542,14 @@ void Option_801952B4(void) {
break;
case 2:
if (D_menu_801B9178 != 0) {
break; // investigate
if (D_menu_801B9178 == 0) {
for (i = 2; i < 4; i++) {
D_menu_801AE9C0[i].unk_20 -= 0.02f;
D_menu_801AE9C0[i].unk_24 -= 0.02f;
D_menu_801AE9C0[i].unk_18 += 0.1f;
}
D_menu_801B914C++;
}
for (i = 2; i < 4; i++) {
D_menu_801AE9C0[i].unk_20 -= 0.02f;
D_menu_801AE9C0[i].unk_24 -= 0.02f;
D_menu_801AE9C0[i].unk_18 += 0.1f;
}
D_menu_801B914C++;
break;
case 3:
@ -1575,45 +1560,40 @@ void Option_801952B4(void) {
switch (D_menu_801B9158) {
case 0:
if (D_menu_801B917C != 0) {
break; // investigate
}
if (D_menu_801B917C == 0) {
for (i = 0; i < 4; i++) {
D_menu_801AE9C0[i].unk_20 += 0.08f;
D_menu_801AE9C0[i].unk_24 += 0.08f;
D_menu_801AE9C0[i].unk_18 -= 0.4f;
D_menu_801AE9C0[i].unk_1C -= 0.4f;
}
for (i = 0; i < 4; i++) {
D_menu_801AE9C0[i].unk_20 += 0.08f;
D_menu_801AE9C0[i].unk_24 += 0.08f;
D_menu_801AE9C0[i].unk_18 -= 0.4f;
D_menu_801AE9C0[i].unk_1C -= 0.4f;
D_menu_801B917C = 2;
D_menu_801B9158++;
}
D_menu_801B917C = 2;
D_menu_801B9158++;
break;
case 1:
if (D_menu_801B917C != 0) {
break; // investigate
}
if (D_menu_801B917C == 0) {
for (i = 0; i < 4; i++) {
D_menu_801AE9C0[i].unk_20 -= 0.08f;
D_menu_801AE9C0[i].unk_24 -= 0.08f;
D_menu_801AE9C0[i].unk_18 += 0.4f;
D_menu_801AE9C0[i].unk_1C += 0.4f;
}
for (i = 0; i < 4; i++) {
D_menu_801AE9C0[i].unk_20 -= 0.08f;
D_menu_801AE9C0[i].unk_24 -= 0.08f;
D_menu_801AE9C0[i].unk_18 += 0.4f;
D_menu_801AE9C0[i].unk_1C += 0.4f;
}
D_menu_801B917C = 2;
D_menu_801B9158++;
D_menu_801B917C = 2;
D_menu_801B9158++;
}
break;
case 2:
if (D_menu_801B917C != 0) {
break;
if (D_menu_801B917C == 0) {
D_menu_801B917C = RAND_INT(30.0f);
D_menu_801B9158 = 0;
}
D_menu_801B917C = RAND_INT(30.0f);
D_menu_801B9158 = 0;
break; // investigate
break;
}
} else {
@ -1838,7 +1818,7 @@ void Option_DataUpdate(void) {
case 2:
if (D_menu_801B9330[D_menu_801B91C0] != 0) {
break;
break; // looks fake, but isn't
}
D_menu_801B91CC = 0;
D_menu_801B91C0 = 0;
@ -1846,74 +1826,71 @@ void Option_DataUpdate(void) {
break;
case 3:
if (D_menu_801B9330[D_menu_801B91C0]) {
break;
if (D_menu_801B9330[D_menu_801B91C0] == 0) {
gDrawMode = DRAW_NONE;
D_menu_801B9124 = 1000;
D_menu_801B912C = 0;
D_menu_801B9244 = 1;
}
gDrawMode = DRAW_NONE;
D_menu_801B9124 = 1000;
D_menu_801B912C = 0;
D_menu_801B9244 = 1;
break;
case 4:
if (D_menu_801B9330[D_menu_801B91C0]) {
break;
}
if (D_menu_801B9330[D_menu_801B91C0] == 0) {
switch (D_menu_801B91CC) {
case 0:
D_menu_801B91CC = 1;
D_menu_801B91C0 = 0;
D_menu_801B912C = 0;
break;
switch (D_menu_801B91CC) {
case 0:
D_menu_801B91CC = 1;
D_menu_801B91C0 = 0;
D_menu_801B912C = 0;
break;
case 1:
D_menu_801B91CC = 2;
AUDIO_PLAY_SFX(NA_SE_BACKUP_CLEAR, gDefaultSfxSource, 4);
D_ctx_801779A8[gMainController] = 50.0f;
D_ctx_80177990[gMainController] = 0;
break;
case 1:
D_menu_801B91CC = 2;
AUDIO_PLAY_SFX(NA_SE_BACKUP_CLEAR, gDefaultSfxSource, 4);
D_ctx_801779A8[gMainController] = 50.0f;
D_ctx_80177990[gMainController] = 0;
break;
case 2:
D_ctx_80177990[gMainController] += (s32) D_ctx_801779A8[gMainController];
temp_fv0 = Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 100.0f, 0.05f, 100.0f, 0.1f);
case 2:
D_ctx_80177990[gMainController] += (s32) D_ctx_801779A8[gMainController];
temp_fv0 = Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 100.0f, 0.05f, 100.0f, 0.1f);
if (D_ctx_80177990[gMainController] >= 100) {
D_ctx_80177990[gMainController] -= 100;
gControllerRumbleFlags[gMainController] = 1;
}
if (temp_fv0 == 0.0f) {
D_menu_801B91CC = 3;
gSaveFile = *(SaveFile*) &gDefaultSave;
Save_Write();
D_menu_801B91AC = 0;
D_menu_801B91B0 = 0;
D_menu_801B91C8 = 0;
gExpertMode = false;
sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50;
sOptionCardList[0].unk_00.unk_10 = 72;
sOptionCardList[0].unk_00.unk_14 = 12;
sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0;
sOptionCardList[4].unk_00.unk_10 = 64;
sOptionCardList[4].unk_00.unk_14 = 10;
for (i = 0; i < OPTION_COUNT; i++) {
sOptionCardCurTextPosX[i] = sOptionCardTextPosX[i];
sOptionCardCurTextPosY[i] = sOptionCardTextPosY[i];
if (D_ctx_80177990[gMainController] >= 100) {
D_ctx_80177990[gMainController] -= 100;
gControllerRumbleFlags[gMainController] = 1;
}
Title_80188010();
}
break;
case 3:
D_menu_801B912C = 0;
break;
if (temp_fv0 == 0.0f) {
D_menu_801B91CC = 3;
gSaveFile = *(SaveFile*) &gDefaultSave;
Save_Write();
D_menu_801B91AC = 0;
D_menu_801B91B0 = 0;
D_menu_801B91C8 = false;
gExpertMode = false;
sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50;
sOptionCardList[0].unk_00.unk_10 = 72;
sOptionCardList[0].unk_00.unk_14 = 12;
sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0;
sOptionCardList[4].unk_00.unk_10 = 64;
sOptionCardList[4].unk_00.unk_14 = 10;
for (i = 0; i < OPTION_COUNT; i++) {
sOptionCardCurTextPosX[i] = sOptionCardTextPosX[i];
sOptionCardCurTextPosY[i] = sOptionCardTextPosY[i];
}
Title_80188010();
}
break;
case 3:
D_menu_801B912C = 0;
break;
}
}
break;
}
@ -3983,14 +3960,12 @@ void Option_8019CBC0(void) {
void Option_8019CD54(void) {
switch (D_menu_801B9128) {
case 0:
if (D_menu_801B9138 == 0) {
if (Option_8019C418(&D_menu_801B90A0[D_menu_801B9098], 36, 0, 0, 50, 5, 10, gMainController,
&D_menu_801B9160[D_menu_801B9098])) {
AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4);
D_menu_801B9150[D_menu_801B9098][0] = D_menu_801AEF5C[D_menu_801B90A0[D_menu_801B9098]];
D_menu_801B90D0[D_menu_801B9098] = 0.0f;
D_menu_801B9100[D_menu_801B9098] = 0.0f;
}
if ((D_menu_801B9138 == 0) && (Option_8019C418(&D_menu_801B90A0[D_menu_801B9098], 36, 0, 0, 50, 5, 10,
gMainController, &D_menu_801B9160[D_menu_801B9098]))) {
AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4);
D_menu_801B9150[D_menu_801B9098][0] = D_menu_801AEF5C[D_menu_801B90A0[D_menu_801B9098]];
D_menu_801B90D0[D_menu_801B9098] = 0.0f;
D_menu_801B9100[D_menu_801B9098] = 0.0f;
}
if (gControllerPress[gMainController].button & A_BUTTON) {
@ -4003,15 +3978,13 @@ void Option_8019CD54(void) {
D_menu_801B9138 = -1;
D_menu_801B9128 = 2;
break;
} else {
if (D_menu_801B9098 < 3) {
AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4);
D_menu_801B90D0[D_menu_801B9098] = 0.0f;
D_menu_801B9140[D_menu_801B9098] = 15;
D_menu_801B9128 = 1;
break;
}
}
if (D_menu_801B9098 < 3) {
AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4);
D_menu_801B90D0[D_menu_801B9098] = 0.0f;
D_menu_801B9140[D_menu_801B9098] = 15;
D_menu_801B9128 = 1;
break;
}
}
@ -4028,25 +4001,21 @@ void Option_8019CD54(void) {
case 10:
D_menu_801B9140[D_menu_801B9098]--;
if (D_menu_801B9140[D_menu_801B9098] != 0) {
break;
if (D_menu_801B9140[D_menu_801B9098] == 0) {
D_menu_801B9128 = 0;
}
D_menu_801B9128 = 0;
break;
case 1:
D_menu_801B9140[D_menu_801B9098]--;
if (D_menu_801B9140[D_menu_801B9098] != 0) {
break;
}
if (D_menu_801B9140[D_menu_801B9098] == 0) {
if ((D_menu_801B9098 + 1) > 2) {
D_menu_801B9138 = 1;
}
if ((D_menu_801B9098 + 1) > 2) {
D_menu_801B9138 = 1;
D_menu_801B9098++;
D_menu_801B9128 = 0;
}
D_menu_801B9098++;
D_menu_801B9128 = 0;
break;
case 2:
@ -4055,9 +4024,8 @@ void Option_8019CD54(void) {
D_menu_801B9140[2]--;
if (D_menu_801B9140[0] != 0) {
break;
break; // looks fake
}
D_menu_801B917C = 20;
D_menu_801B9128 = 3;
break;
@ -4065,8 +4033,8 @@ void Option_8019CD54(void) {
case 3:
if (D_menu_801B917C == 0) {
D_menu_801B912C = 2;
break;
}
break;
}
}