Merge branch 'main' into isghj-docs-Pr2

This commit is contained in:
isghj 2025-12-06 13:28:16 -08:00
commit 2c2e71f417
27 changed files with 866 additions and 759 deletions

View File

@ -1,12 +1,13 @@
<Root>
<File Name="object_fz" Segment="6">
<DList Name="object_fz_DL_001130" Offset="0x1130" />
<DList Name="object_fz_DL_0021A0" Offset="0x21A0" />
<DList Name="object_fz_DL_002CA0" Offset="0x2CA0" />
<Texture Name="object_fz_Tex_002E70" OutName="tex_002E70" Format="i4" Width="32" Height="32" Offset="0x2E70" />
<DList Name="object_fz_DL_0030A0" Offset="0x30A0" />
<DList Name="object_fz_DL_003158" Offset="0x3158" />
<DList Name="object_fz_DL_003260" Offset="0x3260" />
<DList Name="object_fz_DL_0033F0" Offset="0x33F0" />
<DList Name="gFreezardBodyIntactDL" Offset="0x1130" />
<DList Name="gFreezardBodyHornBrokenDL" Offset="0x21A0" />
<DList Name="gFreezardBodyHeadBrokenDL" Offset="0x2CA0" />
<Texture Name="gFreezardSteamTex" OutName="steam" Format="i4" Width="32" Height="32" Offset="0x2E70" />
<DList Name="gFreezardSteamStartDL" Offset="0x30A0" />
<DList Name="gFreezardSteamDL" Offset="0x3158" />
<!-- Unused, wasn't used in OOT either -->
<DList Name="gFreezardIceSpikeDL" Offset="0x3260" />
<DList Name="gFreezardIceChunkDL" Offset="0x33F0" />
</File>
</Root>

View File

@ -22,9 +22,9 @@
<Texture Name="gPoeComposerSoulTex" OutName="composer_soul" Format="i8" Width="32" Height="64" Offset="0x3DC0" />
<!-- Display Lists -->
<DList Name="object_po_composer_DL_004600" Offset="0x4600" />
<DList Name="gPoeComposerSoulDL" Offset="0x4600" /> <!-- Unused, left over from OOT -->
<DList Name="gPoeComposerSharpHeadDL" Offset="0x6A70" />
<DList Name="object_po_composer_DL_006D80" Offset="0x6D80" />
<DList Name="gPoeComposerBatonDL" Offset="0x6D80" />
<DList Name="gPoeComposerLanternBaseDL" Offset="0x6E08" />
<DList Name="gPoeComposerLanternTopDL" Offset="0x6EA8" />
<DList Name="gPoeComposerLanternGlassDL" Offset="0x6F38" />
@ -32,18 +32,20 @@
<DList Name="gPoeComposerBurnDL" Offset="0x7BC0" />
<!-- Textures -->
<Texture Name="object_po_composer_Tex_007E80" OutName="tex_007E80" Format="rgba16" Width="16" Height="16" Offset="0x7E80" />
<Texture Name="object_po_composer_Tex_008080" OutName="tex_008080" Format="rgba16" Width="16" Height="16" Offset="0x8080" />
<Texture Name="object_po_composer_Tex_008280" OutName="tex_008280" Format="rgba16" Width="16" Height="16" Offset="0x8280" />
<Texture Name="object_po_composer_Tex_008480" OutName="tex_008480" Format="rgba16" Width="16" Height="16" Offset="0x8480" />
<Texture Name="object_po_composer_Tex_008680" OutName="tex_008680" Format="rgba16" Width="16" Height="32" Offset="0x8680" />
<Texture Name="object_po_composer_Tex_008A80" OutName="tex_008A80" Format="rgba16" Width="16" Height="16" Offset="0x8A80" />
<Texture Name="object_po_composer_Tex_008C80" OutName="tex_008C80" Format="rgba16" Width="16" Height="16" Offset="0x8C80" />
<Texture Name="object_po_composer_Tex_008E80" OutName="tex_008E80" Format="rgba16" Width="16" Height="16" Offset="0x8E80" />
<Texture Name="object_po_composer_Tex_009080" OutName="tex_009080" Format="rgba16" Width="16" Height="16" Offset="0x9080" />
<Texture Name="object_po_composer_Tex_009280" OutName="tex_009280" Format="rgba16" Width="16" Height="16" Offset="0x9280" />
<Texture Name="object_po_composer_Tex_009480" OutName="tex_009480" Format="rgba16" Width="16" Height="16" Offset="0x9480" />
<Texture Name="object_po_composer_Tex_009680" OutName="tex_009680" Format="rgba16" Width="16" Height="16" Offset="0x9680" />
<Texture Name="gPoeComposerArmTex" OutName="arm" Format="rgba16" Width="16" Height="16" Offset="0x7E80" />
<Texture Name="gPoeComposerLanternBaseTex" OutName="lantern_base" Format="rgba16" Width="16" Height="16" Offset="0x8080" />
<Texture Name="gPoeComposerCoatTex" OutName="coat" Format="rgba16" Width="16" Height="16" Offset="0x8280" /> <!-- Also used for Lantern top -->
<Texture Name="gPoeComposerLanternGlassTex" OutName="lantern_glass" Format="rgba16" Width="16" Height="16" Offset="0x8480" />
<Texture Name="gPoeComposerClothPaternTex" OutName="cloth" Format="rgba16" Width="16" Height="32" Offset="0x8680" /> <!-- And hat -->
<Texture Name="gPoeComposerEyeTex" OutName="eye" Format="rgba16" Width="16" Height="16" Offset="0x8A80" />
<!-- Sharp's hair curl is also smeared and re-used as flat's golden hair -->
<Texture Name="gPoeComposerSharpHairCurlTex" OutName="sharp_hair" Format="rgba16" Width="16" Height="16" Offset="0x8C80" />
<Texture Name="gPoeComposerMoustacheTex" OutName="moustache" Format="rgba16" Width="16" Height="16" Offset="0x8E80" />
<Texture Name="gPoeComposerHatEmblemSharpTex" OutName="hat_emblem_sharp" Format="rgba16" Width="16" Height="16" Offset="0x9080" />
<Texture Name="gPoeComposerHatEmblemFlatTex" OutName="hat_emblem_flat" Format="rgba16" Width="16" Height="16" Offset="0x9280" />
<!-- From OOT, can't fight them in this game -->
<Texture Name="gPoeComposerCharedBodyTex" OutName="chared_body" Format="rgba16" Width="16" Height="16" Offset="0x9480" />
<Texture Name="gPoeComposerBroachTex" OutName="broach" Format="rgba16" Width="16" Height="16" Offset="0x9680" />
<!-- Limbs -->
<Limb Name="gPoeComposerUpperBodyLimb" Type="Standard" EnumName="POE_COMPOSER_LIMB_UPPER_BODY" Offset="0x9880" />

View File

@ -1,8 +1,8 @@
#ifndef BUILD_H
#define BUILD_H
extern char gBuildCreator[];
extern char gBuildDate[];
extern char gBuildMakeOption[];
extern const char gBuildCreator[];
extern const char gBuildDate[];
extern const char gBuildMakeOption[];
#endif

View File

@ -301,7 +301,7 @@ void Message_DrawItemIcon(struct PlayState* play, Gfx** gfxP);
void Message_HandleOcarina(struct PlayState* play);
void Message_LoadItemIcon(struct PlayState* play, u16 itemId, s16 arg2);
void Message_DecodeHeader(struct PlayState* play);
void func_801514B0(struct PlayState* play, u16 arg1, u8 arg2);
void Message_PauseMenu_ShowDescription(struct PlayState* play, u16 textId, u8 textBoxPos);
void Message_StartTextbox(struct PlayState* play, u16 textId, struct Actor* actor);
void Message_ContinueTextbox(struct PlayState* play, u16 textId);
void Message_DisplaySceneTitleCard(struct PlayState* play, u16 textId);

View File

@ -744,8 +744,8 @@ typedef enum {
// Attempted Cremia Cart Ride
#define WEEKEVENTREG_14_01 PACK_WEEKEVENTREG_FLAG(14, 0x01)
#define WEEKEVENTREG_14_02 PACK_WEEKEVENTREG_FLAG(14, 0x02)
#define WEEKEVENTREG_14_04 PACK_WEEKEVENTREG_FLAG(14, 0x04)
#define WEEKEVENTREG_SHARP_HOSTILE_CONVERSATION PACK_WEEKEVENTREG_FLAG(14, 0x02)
#define WEEKEVENTREG_IKANA_SPRING_RESTORED PACK_WEEKEVENTREG_FLAG(14, 0x04)
#define WEEKEVENTREG_DRANK_CHATEAU_ROMANI PACK_WEEKEVENTREG_FLAG(14, 0x08)
#define WEEKEVENTREG_WON_DEKU_PLAYGROUND_DAY_1 PACK_WEEKEVENTREG_FLAG(14, 0x10)
#define WEEKEVENTREG_WON_DEKU_PLAYGROUND_DAY_2 PACK_WEEKEVENTREG_FLAG(14, 0x20)

View File

@ -1,3 +1,5 @@
#include "build.h"
const char gBuildCreator[] = "zelda@srd44";
const char gBuildDate[] = "00-07-31 17:04:16";
const char gBuildMakeOption[] = "";

View File

@ -3246,7 +3246,7 @@ void Message_OpenText(PlayState* play, u16 textId) {
}
}
void func_801514B0(PlayState* play, u16 arg1, u8 arg2) {
void Message_PauseMenu_ShowDescription(PlayState* play, u16 textId, u8 textBoxPos) {
MessageContext* msgCtx = &play->msgCtx;
Font* font = &msgCtx->font;
Player* player = GET_PLAYER(play);
@ -3276,19 +3276,19 @@ void func_801514B0(PlayState* play, u16 arg1, u8 arg2) {
sCharTexScale = temp / msgCtx->textCharScale;
D_801F6B08 = temp / 1;
if ((arg1 == 0x1709) && (player->transformation == 3)) {
arg1 = 0x1705;
if ((textId == 0x1709) && (player->transformation == PLAYER_FORM_DEKU)) {
textId = 0x1705;
}
msgCtx->currentTextId = arg1;
msgCtx->currentTextId = textId;
if (gSaveContext.options.language == LANGUAGE_JPN) {
Message_FindMessage(play, arg1);
Message_FindMessage(play, textId);
msgCtx->msgLength = font->messageEnd;
DmaMgr_RequestSync(&font->msgBuf, SEGMENT_ROM_START(message_data_static) + font->messageStart,
font->messageEnd);
} else {
Message_FindMessageNES(play, arg1);
Message_FindMessageNES(play, textId);
msgCtx->msgLength = font->messageEnd;
DmaMgr_RequestSync(&font->msgBuf, SEGMENT_ROM_START(message_data_static) + font->messageStart,
font->messageEnd);
@ -3302,7 +3302,7 @@ void func_801514B0(PlayState* play, u16 arg1, u8 arg2) {
msgCtx->unk11F08 = font->msgBuf.wchar[msgCtx->msgBufPos];
msgCtx->unk11F18 = (msgCtx->unk11F08 & 0xF000) >> 0xC;
msgCtx->textBoxType = TEXTBOX_TYPE_9;
msgCtx->textBoxPos = arg2;
msgCtx->textBoxPos = textBoxPos;
msgCtx->unk11F0C = msgCtx->unk11F08 & 0xF;
msgCtx->textUnskippable = true;
DmaMgr_RequestSync(msgCtx->textboxSegment, SEGMENT_ROM_START(message_static) + (D_801CFC78[0] * 0x1000), 0x1000);

View File

@ -51,7 +51,8 @@ void BgIknvDoukutu_Init(Actor* thisx, PlayState* play) {
this->actionFunc = func_80BD71BC;
this->cueType = CS_CMD_ACTOR_CUE_516;
this->unk_160 = 1.0f;
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04) || CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED) ||
CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE)) {
this->dyna.actor.draw = func_80BD7768;
this->actionFunc = func_80BD73D0;
play->envCtx.lightSettingOverride = 25;
@ -67,7 +68,7 @@ void BgIknvDoukutu_Init(Actor* thisx, PlayState* play) {
DynaPolyActor_Init(&this->dyna, 0);
CollisionHeader_GetVirtual(&object_iknv_obj_Colheader_012788, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04)) {
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED)) {
Actor_Kill(&this->dyna.actor);
}
break;
@ -78,7 +79,7 @@ void BgIknvDoukutu_Init(Actor* thisx, PlayState* play) {
DynaPolyActor_Init(&this->dyna, 0);
CollisionHeader_GetVirtual(&object_iknv_obj_Colheader_0117C8, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED)) {
this->unk_160 = 1.0f;
this->dyna.actor.world.pos.y += 68.0f;
} else {

View File

@ -127,7 +127,7 @@ s32 func_80BD7CEC(BgIknvObj* this) {
}
void BgIknvObj_UpdateWaterwheel(BgIknvObj* this, PlayState* play) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED)) {
this->dyna.actor.shape.rot.z -= 0x64;
Actor_PlaySeq_FlaggedMusicBoxHouse(&this->dyna.actor);
Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_WOOD_WATER_WHEEL - SFX_FLAG);

View File

@ -406,7 +406,7 @@ sDoorSch_RomaniRanchBedroom {
sDoorSch_IkanaCanyonMusicBoxHouse {
not if_week_event_reg (WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE) {
not if_week_event_reg (WEEKEVENTREG_75_20) {
not if_week_event_reg (WEEKEVENTREG_14_04) {
not if_week_event_reg (WEEKEVENTREG_IKANA_SPRING_RESTORED) {
return_s (0x1D)
} else not if_week_event_reg (WEEKEVENTREG_59_01) {
if_week_event_reg (WEEKEVENTREG_61_02) {

File diff suppressed because it is too large Load Diff

View File

@ -8,66 +8,97 @@ struct EnFz;
typedef void (*EnFzActionFunc)(struct EnFz*, PlayState*);
typedef void (*EnFzUnkFunc)(struct EnFz*);
#define ENFZ_GET_F(thisx) ((thisx)->params & 0xF)
#define ENFZ_GET_3000(thisx) (((thisx)->params & 0x3000) >> 0xC)
#define ENFZ_GET_4000(thisx) ((thisx)->params & 0x4000)
#define ENFZ_GET_8000(thisx) ((thisx)->params & 0x8000)
#define ENFZ_GET_POWER(thisx) ((thisx)->params & 0xF)
#define ENFZ_GET_ROTATION_LIMIT(thisx) (((thisx)->params & 0x3000) >> 0xC)
// appears out of the ground imediately
#define ENFZ_GET_APPEAR_TYPE(thisx) ((thisx)->params & 0x4000)
// if ENFZ_GET_TRACK_TYPE and NOT ENFZ_GET_APPEAR_TYPE (0x8000)
// appears from the ground if player approaches, skates after them
#define ENFZ_GET_TRACK_TYPE(thisx) ((thisx)->params & 0x8000)
// Track and Appear have a mixed behavior if both are enabled:
// if ENFZ_GET_TRACK_TYPE AND ENFZ_GET_APPEAR_TYPE (0xC000)
// appears from the ground immediately, stays still,
// but follows player to aim, while ignoring rotation limit
typedef enum {
/* 0 */ ENFZ_F_0,
/* 1 */ ENFZ_F_1,
/* 2 */ ENFZ_F_2,
/* 3 */ ENFZ_F_3
} EnFzParam;
// Clock specifies where the internal clock starts, zero is random
// used to force specific attack timing
// used in Snowhead Temple: 0x3, 0x7, 0xD in room 02
// causing them to breath at the bridge in series so the player has to time the jump
// the value passed is 1/10 final value in frames
#define ENFZ_GETZ_CLOCK(thisx) ((thisx)->shape.rot.z)
typedef struct {
/* 0x00 */ u8 unk_00;
/* 0x01 */ u8 unk_01;
/* 0x04 */ Vec3f unk_04;
/* 0x10 */ Vec3f unk_10;
/* 0x1C */ Vec3f unk_1C;
/* 0x28 */ UNK_TYPE1 unk_28[0x4];
/* 0x2C */ s16 unk_2C;
/* 0x2E */ s16 unk_2E;
/* 0x30 */ f32 unk_30;
/* 0x34 */ f32 unk_34;
/* 0x38 */ u8 unk_38;
} EnFzStruct; // size = 0x3C
// 0,1,2 are how powerful (distance) the attack is
// F is treated like 0 (else case)
typedef enum EnFzPower {
/* 0 */ FZ_POWER_0, // + 0
/* 1 */ FZ_POWER_1, // + 10
/* 2 */ FZ_POWER_2, // + 20
/* 3 */ FZ_POWER_PASSIVE, // unfinished empty actionfunc
/* F */ FZ_POWER_F = 0xF // snowhead map room
} EnFzPower;
typedef enum EnFzEffectType {
/* 0 */ FZ_EFFECT_DISABLED,
/* 1 */ FZ_EFFECT_MIST_AURA,
/* 2 */ FZ_EFFECT_BREATH
} EnFzEffectType;
typedef struct EnFzEffect {
/* 0x00 */ u8 type;
/* 0x01 */ u8 timer;
/* 0x04 */ Vec3f pos;
/* 0x10 */ Vec3f velocity;
/* 0x1C */ Vec3f accel;
/* 0x28 */ UNK_TYPE1 unk28[0x4];
/* 0x2C */ s16 primAlpha;
/* 0x2E */ s16 primAlphaState;
/* 0x30 */ f32 xyScale;
/* 0x34 */ f32 xyScaleTarget;
/* 0x38 */ u8 damaging;
} EnFzEffect; // size = 0x3C
// indexes the different mist functions
typedef enum EnFzState {
/* 0 */ FZ_STATE_HIDDEN, // OOT, waiting for player approach, ice cavern
/* 1 */ FZ_STATE_FULLSIZE,
/* 2 */ FZ_STATE_CHANGING, // OOT, growing and disappearing, ice cavern
/* 3 */ FZ_STATE_MELTING, // fire arrows
} EnFzState;
typedef struct EnFz {
/* 0x000 */ Actor actor;
/* 0x144 */ EnFzActionFunc actionFunc;
/* 0x148 */ ColliderCylinder collider1;
/* 0x194 */ ColliderCylinder collider2;
/* 0x1E0 */ ColliderCylinder collider3;
/* 0x22C */ Vec3f unk_22C;
/* 0x238 */ f32 unk_238;
/* 0x23C */ EnFzStruct unk_23C[40];
/* 0x194 */ ColliderCylinder collider2; // might be hard protection ac
/* 0x1E0 */ ColliderCylinder collider3; // at for breath
/* 0x22C */ Vec3f wallHitPos;
/* 0x238 */ f32 distToTargetSq;
/* 0x23C */ EnFzEffect effects[40];
/* 0xB9C */ f32 drawDmgEffAlpha;
/* 0xBA0 */ f32 drawDmgEffScale;
/* 0xBA4 */ s16 drawDmgEffTimer;
/* 0xBA8 */ f32 unk_BA8;
/* 0xBAC */ f32 unk_BAC;
/* 0xBB0 */ f32 unk_BB0;
/* 0xBB4 */ f32 unk_BB4;
/* 0xBB8 */ f32 unk_BB8;
/* 0xBBC */ f32 unk_BBC;
/* 0xBC0 */ u32 unk_BC0;
/* 0xBC4 */ s16 unk_BC4;
/* 0xBC6 */ s16 unk_BC6;
/* 0xBC8 */ s16 unk_BC8;
/* 0xBCA */ s16 unk_BCA;
/* 0xBCC */ u8 unk_BCC;
/* 0xBCD */ u8 unk_BCD;
/* 0xBCE */ u8 unk_BCE;
/* 0xBCF */ u8 unk_BCF;
/* 0xBD0 */ s16 unk_BD0;
/* 0xBD2 */ s16 unk_BD2;
/* 0xBA8 */ Vec3f originPos;
/* 0xBB4 */ f32 originPosY;
/* 0xBB8 */ f32 unkBB8; // set (135.0f), never read
/* 0xBBC */ f32 speedXZ;
/* 0xBC0 */ u32 envAlpha;
// we set it, and read it, but never the same value
// assumed unfinished shared variable with wizrobe
/* 0xBC4 */ s16 wizrobeFlag;
/* 0xBC6 */ s16 internalClock;
/* 0xBC8 */ s16 unusedTimer; // set (0), never read
/* 0xBCA */ s16 mainTimer;
/* 0xBCC */ u8 isBgEnabled;
/* 0xBCD */ u8 isMoving;
/* 0xBCE */ u8 isColliderActive;
/* 0xBCF */ u8 hitCounter; /// set, never read
/* 0xBD0 */ s16 unkBD0; // set (0), never read
/* 0xBD2 */ s16 unkBD2; // set (0,4000), never read
/* 0xBD4 */ UNK_TYPE1 unkBD4[2];
/* 0xBD6 */ u8 unk_BD6;
/* 0xBD7 */ u8 unk_BD7;
/* 0xBD8 */ u8 unk_BD8;
/* 0xBD9 */ u8 unk_BD9;
/* 0xBD6 */ u8 state;
/* 0xBD7 */ u8 drawBody;
/* 0xBD8 */ u8 isDying;
/* 0xBD9 */ u8 attackTimer; // never set, always zero
} EnFz; /* size = 0xBDC */
#endif // Z_EN_FZ_H

View File

@ -224,7 +224,7 @@ void EnHgo_HandlePlayerChoice(EnHgo* this, PlayState* play) {
break;
case 0x1590:
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED)) {
Message_StartTextbox(play, 0x1591, &this->actor);
this->textId = 0x1591;
break;

View File

@ -1232,28 +1232,28 @@ void EnJso_TellHint(EnJso* this, PlayState* play) {
case EN_JSO_HINT_VARIABLE_1:
textId = 0x139D; // Hint about Pamela's family being in the house with the waterwheel
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED)) {
textId = 0x13A1; // Hint about using the Song of Healing on Pamela's father
}
break;
case EN_JSO_HINT_VARIABLE_2:
textId = 0x139E; // Hint about Pamela leaving her house to check something
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED)) {
textId = 0x13A2; // Hint about the well being connected to Ikana Castle
}
break;
case EN_JSO_HINT_VARIABLE_3:
textId = 0x139F; // Hint about restoring the river by going into Sharp's cave
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED)) {
textId = 0x13A3; // Hint about the Gibdos in the well wanting items
}
break;
case EN_JSO_HINT_VARIABLE_4:
textId = 0x13A0; // Hint about needing the Song of Storms to pacify Sharp
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED)) {
textId = 0x13A4; // Hint about the items the Gibdos want being in the well
}
break;

View File

@ -170,8 +170,9 @@ void EnPamera_Init(Actor* thisx, PlayState* play) {
func_80BD8588(this, play);
func_80BD8658(this);
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04) || CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE) ||
CHECK_WEEKEVENTREG(WEEKEVENTREG_75_20) || (gSaveContext.save.entrance == ENTRANCE(IKANA_CANYON, 9))) {
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED) ||
CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE) || CHECK_WEEKEVENTREG(WEEKEVENTREG_75_20) ||
(gSaveContext.save.entrance == ENTRANCE(IKANA_CANYON, 9))) {
Actor_Kill(&this->actor);
}
@ -593,7 +594,7 @@ void func_80BD9840(EnPamera* this, PlayState* play) {
func_80BD9E60(this);
func_80BD9904(this);
}
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED)) {
func_801A0204(NA_BGM_MUSIC_BOX_HOUSE);
} else {
func_801A0204(NA_BGM_INSIDE_A_HOUSE);
@ -898,7 +899,7 @@ void func_80BDA344(Actor* thisx, PlayState* play) {
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
}
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED)) {
play->roomCtx.unk7A[0]++;
}
}

View File

@ -30,7 +30,7 @@ void EnPoComposer_Roll(EnPoComposer* this, PlayState* play);
void EnPoComposer_SetupAwaitPlayer(EnPoComposer* this);
void EnPoComposer_SetupStartCutscene(EnPoComposer* this);
void EnPoComposer_SetupStartedCutscene(EnPoComposer* this);
void EnPoComposer_StepLightAlpha(EnPoComposer* this);
void EnPoComposer_StepMainAlpha(EnPoComposer* this);
ActorProfile En_Po_Composer_Profile = {
/**/ ACTOR_EN_PO_COMPOSER,
@ -93,6 +93,7 @@ static ColliderJntSphInit sJntSphInit = {
static CollisionCheckInfoInit sColChkInfoInit = { 4, 25, 50, 40 };
// Unused. Interesting that they had planned for a fight at some point, maybe flat?
static DamageTable sDamageTable = {
/* Deku Nut */ DMG_ENTRY(0, 0x0),
/* Deku Stick */ DMG_ENTRY(2, 0x0),
@ -120,7 +121,7 @@ static DamageTable sDamageTable = {
/* Zora punch */ DMG_ENTRY(4, 0x0),
/* Spin attack */ DMG_ENTRY(2, 0x0),
/* Sword beam */ DMG_ENTRY(2, 0x0),
/* Normal Roll */ DMG_ENTRY(8, 0x0),
/* Normal Roll */ DMG_ENTRY(8, 0x0), // 8 damage? on rolling?
/* UNK_DMG_0x1B */ DMG_ENTRY(4, 0x0),
/* UNK_DMG_0x1C */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
@ -161,9 +162,10 @@ static AnimationInfo sAnimationInfo[POE_COMPOSER_ANIM_MAX] = {
/* 12 */ { &gPoeComposerAttackAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f },
};
static Color_RGBA8 sLightColorInit = { 255, 255, 210, 0 };
// also used for robe hem base color, but it gets overridden by sSharpClothingColor2 (bug?)
static Color_RGBA8 sEyeColor = { 255, 255, 210, 0 };
static Color_RGBA8 sEnvColorInit = { 0, 0, 0, 255 };
static Color_RGBA8 sLightColorInit = { 0, 0, 0, 255 };
static Color_RGBA8 sSharpClothingColor1 = { 75, 20, 25, 255 };
@ -195,27 +197,29 @@ void EnPoComposer_Init(Actor* thisx, PlayState* play) {
Lights_PointGlowSetInfo(&this->lightInfo, this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z,
255, 255, 255, 0);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
this->eyeColor = sEyeColor;
this->lightColor = sLightColorInit;
this->envColor = sEnvColorInit;
this->cueId = POE_COMPOSER_CUEID_NONE;
if (POE_COMPOSER_IS_FLAT(&this->actor)) {
this->sharpCsNum = 0;
this->inCutscene = true;
EnPoComposer_SetupStartedCutscene(this);
} else if (POE_COMPOSER_4000(&this->actor)) {
} else if (POE_COMPOSER_SHARP_HEALED(&this->actor)) {
// Player spawned in the cave after music house river cutscene
if (gSaveContext.save.entrance != ENTRANCE(IKANA_CANYON, 10)) {
Actor_Kill(&this->actor);
return;
}
this->sharpCsNum = SHARP_CS_ENCOUNTER_FIRST;
this->sharpCsNum = SHARP_CS_ENCOUNTER_HEALED_TALK;
this->inCutscene = true;
EnPoComposer_SetupStartedCutscene(this);
} else {
} else { // Sharp (hostile)
s32 i;
s16 csId = this->actor.csId;
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED)) {
Actor_Kill(&this->actor);
return;
}
@ -228,11 +232,12 @@ void EnPoComposer_Init(Actor* thisx, PlayState* play) {
csId = CutsceneManager_GetAdditionalCsId(csId);
}
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_02)) {
this->sharpCsNum = SHARP_CS_ENCOUNTER_OTHER;
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_SHARP_HOSTILE_CONVERSATION)) {
this->sharpCsNum = SHARP_CS_ENCOUNTER_AGRO_TALK;
} else {
this->sharpCsNum = SHARP_CS_ENCOUNTER_FIRST;
this->sharpCsNum = SHARP_CS_ENCOUNTER_HEALED_TALK;
}
this->inCutscene = false;
EnPoComposer_SetupAwaitPlayer(this);
}
@ -293,6 +298,7 @@ void EnPoComposer_PlayCurse(EnPoComposer* this, PlayState* play) {
// Damage the player every second
if (this->actionTimer == 20) {
// Quarter heart damage (4)
func_800B8D10(play, &this->actor, 0.0f, 0, 0.0f, 1, 4);
this->actionTimer = 0;
} else {
@ -417,7 +423,7 @@ void EnPoComposer_Roll(EnPoComposer* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_SHARP_REACTION);
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, POE_COMPOSER_ANIM_ROLLING);
}
} else if (Animation_OnFrame(&this->skelAnime, 1.0f) && (this->lightColor.a > 32)) {
} else if (Animation_OnFrame(&this->skelAnime, 1.0f) && (this->eyeColor.a > 32)) {
if (this->csCueTimer == 1) {
Actor_PlaySfx(&this->actor, NA_SE_EN_LAST3_DEAD_WIND2_OLD);
this->csCueTimer = 2;
@ -429,7 +435,7 @@ void EnPoComposer_Roll(EnPoComposer* this, PlayState* play) {
}
void EnPoComposer_SharpCutsceneDone(EnPoComposer* this) {
SET_WEEKEVENTREG(WEEKEVENTREG_14_04);
SET_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED);
Actor_Kill(&this->actor);
}
@ -504,7 +510,7 @@ s32 EnPoComposer_UpdateAction(EnPoComposer* this, PlayState* play) {
Cutscene_ActorTranslate(&this->actor, play, cueChannel);
}
EnPoComposer_StepLightAlpha(this);
EnPoComposer_StepMainAlpha(this);
if ((this->sharpCsNum == SHARP_CS_SONG_STORMS) && (play->csCtx.curFrame == 204)) {
Audio_PlaySfx(NA_SE_SY_DIZZY_EFFECT);
@ -521,14 +527,14 @@ s32 EnPoComposer_UpdateAction(EnPoComposer* this, PlayState* play) {
if (POE_COMPOSER_IS_FLAT(&this->actor)) {
EnPoComposer_SetupStartedCutscene(this);
} else if (POE_COMPOSER_4000(&this->actor)) {
} else if (POE_COMPOSER_SHARP_HEALED(&this->actor)) {
EnPoComposer_SetupStartedCutscene(this);
} else {
} else { // Sharp is hostile
this->inCutscene = false;
if (this->sharpCsNum < SHARP_CS_SONG_STORMS) {
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_14_02)) {
SET_WEEKEVENTREG(WEEKEVENTREG_14_02);
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_SHARP_HOSTILE_CONVERSATION)) {
SET_WEEKEVENTREG(WEEKEVENTREG_SHARP_HOSTILE_CONVERSATION);
}
EnPoComposer_SetupPlayCurse(this);
} else {
@ -541,55 +547,57 @@ s32 EnPoComposer_UpdateAction(EnPoComposer* this, PlayState* play) {
return false;
}
void EnPoComposer_StepLightAlpha(EnPoComposer* this) {
if ((this->visible == true) && (this->lightColor.a != 255)) {
if (this->lightColor.a > 247) {
this->lightColor.a = 255;
void EnPoComposer_StepMainAlpha(EnPoComposer* this) {
if ((this->visible == true) && (this->mainAlpha.a != 255)) {
if (this->mainAlpha.a > 247) {
this->mainAlpha.a = 255;
} else {
this->lightColor.a += 7;
this->mainAlpha.a += 7;
}
} else if (!this->visible && (this->lightColor.a != 0)) {
if (this->lightColor.a < 8) {
this->lightColor.a = 0;
} else if (!this->visible && (this->mainAlpha.a != 0)) {
if (this->mainAlpha.a < 8) {
this->mainAlpha.a = 0;
} else {
this->lightColor.a -= 7;
this->mainAlpha.a -= 7;
}
}
}
void EnPoComposer_StepLightColor(EnPoComposer* this) {
void EnPoComposer_StepEyeColor(EnPoComposer* this) {
s16 color;
color = this->lightColor.r + 5;
this->lightColor.r = CLAMP_MAX(color, 255);
color = this->eyeColor.r + 5;
this->eyeColor.r = CLAMP_MAX(color, 255);
color = this->lightColor.g + 5;
this->lightColor.g = CLAMP_MAX(color, 255);
color = this->eyeColor.g + 5;
this->eyeColor.g = CLAMP_MAX(color, 255);
if (this->lightColor.b > 210) {
color = this->lightColor.b - 5;
this->lightColor.b = CLAMP_MIN(color, 210);
if (this->eyeColor.b > 210) {
color = this->eyeColor.b - 5;
this->eyeColor.b = CLAMP_MIN(color, 210);
} else {
color = this->lightColor.b + 5;
this->lightColor.b = CLAMP_MAX(color, 210);
color = this->eyeColor.b + 5;
this->eyeColor.b = CLAMP_MAX(color, 210);
}
}
void EnPoComposer_UpdateEnvColor(EnPoComposer* this) {
void EnPoComposer_UpdateLightColor(EnPoComposer* this) {
if ((this->actionFunc == EnPoComposer_Appear) && (this->skelAnime.curFrame < 12.0f)) {
// Step rgb from 55 to 255 and alpha from 0 to 200 over the first 12 frames of the appear anim
this->envColor.r = this->envColor.g = this->envColor.b = 55.0f + this->skelAnime.curFrame * 16.66f;
this->envColor.a = this->skelAnime.curFrame * (200.0f / 12.0f);
this->lightColor.r = this->lightColor.g = this->lightColor.b = 55.0f + this->skelAnime.curFrame * 16.66f;
this->lightColor.a = this->skelAnime.curFrame * (200.0f / 12.0f);
} else {
f32 rand = Rand_ZeroOne();
// Flame Flicker
f32 lightIntensity = Rand_ZeroOne();
this->envColor.r = 225 + (s32)(rand * 30.0f);
this->envColor.g = 155 + (s32)(rand * 100.0f);
this->envColor.b = 95 + (s32)(rand * 160.0f);
this->envColor.a = 200;
this->lightColor.r = 225 + (s32)(lightIntensity * 30.0f);
this->lightColor.g = 155 + (s32)(lightIntensity * 100.0f);
this->lightColor.b = 95 + (s32)(lightIntensity * 160.0f);
this->lightColor.a = 200;
}
if (this->lightColor.a == 0) {
this->envColor.a = 0;
if (this->mainAlpha.a == 0) {
this->lightColor.a = 0;
}
}
@ -602,7 +610,7 @@ void EnPoComposer_UpdateCollision(EnPoComposer* this, PlayState* play) {
void EnPoComposer_Update(Actor* thisx, PlayState* play) {
EnPoComposer* this = (EnPoComposer*)thisx;
EnPoComposer_UpdateEnvColor(this);
EnPoComposer_UpdateLightColor(this);
SkelAnime_Update(&this->skelAnime);
Actor_SetFocus(&this->actor, 42.0f);
@ -617,16 +625,19 @@ s32 EnPoComposer_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, V
Gfx** gfx) {
EnPoComposer* this = (EnPoComposer*)thisx;
if ((this->lightColor.a == 0) || (limbIndex == POE_COMPOSER_LIMB_LANTERN)) {
if ((this->mainAlpha.a == 0) || (limbIndex == POE_COMPOSER_LIMB_LANTERN)) {
// The lantern limb is never drawn because the limb only contains the lantern base for some reason
// Instead, the whole lantern is drawn manually in EnPoComposer_Draw
// This was likely done to give tighter lantern color control
*dList = NULL;
} else if (POE_COMPOSER_IS_FLAT(&this->actor) && (limbIndex == POE_COMPOSER_LIMB_HEAD)) {
*dList = gPoeComposerFlatHeadDL;
}
if (limbIndex == 19) {
//! @bug skeleton does not have a limb 19, this is leftover from OoT Poes
//! @Bug skeleton does not have a limb 19, this is leftover from OoT Poes
gDPPipeSync((*gfx)++);
gDPSetEnvColor((*gfx)++, this->lightColor.r, this->lightColor.g, this->lightColor.b, this->lightColor.a);
gDPSetEnvColor((*gfx)++, this->eyeColor.r, this->eyeColor.g, this->eyeColor.b, this->eyeColor.a);
}
return false;
@ -645,39 +656,42 @@ void EnPoComposer_Draw(Actor* thisx, PlayState* play) {
EnPoComposer* this = (EnPoComposer*)thisx;
s32 pad;
Gfx* gfx;
// Clothing color draws on robe top, coat, hat, and the emblem on the lantern
Color_RGBA8* clothingColor;
Color_RGBA8* var_t0;
// Overrides clothingColor: hat, robe top, robe hem (overrides eye color)
Color_RGBA8* clothingColor2;
Vec3f lightOffset;
Vec3s lightPos;
OPEN_DISPS(play->state.gfxCtx);
EnPoComposer_StepLightColor(this);
EnPoComposer_StepEyeColor(this);
// Select colors
if (POE_COMPOSER_IS_FLAT(&this->actor)) {
clothingColor = &sFlatClothingColor1;
var_t0 = &sFlatClothingColor2;
clothingColor2 = &sFlatClothingColor2;
} else {
clothingColor = &sSharpClothingColor1;
var_t0 = &sSharpClothingColor2;
clothingColor2 = &sSharpClothingColor2;
}
// Draw skeleton
if ((this->lightColor.a == 255) || (this->lightColor.a == 0)) {
if ((this->mainAlpha.a == 255) || (this->mainAlpha.a == 0)) {
Gfx_SetupDL25_Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_EnvColor(play->state.gfxCtx, this->lightColor.r, this->lightColor.g, this->lightColor.b,
this->lightColor.a));
gSPSegment(
POLY_OPA_DISP++, 0x08,
Gfx_EnvColor(play->state.gfxCtx, this->eyeColor.r, this->eyeColor.g, this->eyeColor.b, this->eyeColor.a));
gSPSegment(
POLY_OPA_DISP++, 0x0A,
Gfx_EnvColor(play->state.gfxCtx, clothingColor->r, clothingColor->g, clothingColor->b, this->lightColor.a));
Gfx_EnvColor(play->state.gfxCtx, clothingColor->r, clothingColor->g, clothingColor->b, this->mainAlpha.a));
gSPSegment(POLY_OPA_DISP++, 0x0B,
Gfx_EnvColor(play->state.gfxCtx, var_t0->r, var_t0->g, var_t0->b, this->lightColor.a));
gSPSegment(POLY_OPA_DISP++, 0x0C, D_801AEFA0);
Gfx_EnvColor(play->state.gfxCtx, clothingColor2->r, clothingColor2->g, clothingColor2->b,
this->mainAlpha.a));
gSPSegment(POLY_OPA_DISP++, 0x0C, D_801AEFA0); // empty DL
POLY_OPA_DISP =
SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
@ -686,25 +700,26 @@ void EnPoComposer_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL25_Opa(play->state.gfxCtx);
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_EnvColor(play->state.gfxCtx, this->lightColor.r, this->lightColor.g, this->lightColor.b,
this->lightColor.a));
gSPSegment(
POLY_XLU_DISP++, 0x08,
Gfx_EnvColor(play->state.gfxCtx, this->eyeColor.r, this->eyeColor.g, this->eyeColor.b, this->eyeColor.a));
gSPSegment(
POLY_XLU_DISP++, 0x0A,
Gfx_EnvColor(play->state.gfxCtx, clothingColor->r, clothingColor->g, clothingColor->b, this->lightColor.a));
Gfx_EnvColor(play->state.gfxCtx, clothingColor->r, clothingColor->g, clothingColor->b, this->mainAlpha.a));
gSPSegment(POLY_XLU_DISP++, 0x0B,
Gfx_EnvColor(play->state.gfxCtx, var_t0->r, var_t0->g, var_t0->b, this->lightColor.a));
gSPSegment(POLY_XLU_DISP++, 0x0C, D_801AEF88);
Gfx_EnvColor(play->state.gfxCtx, clothingColor2->r, clothingColor2->g, clothingColor2->b,
this->mainAlpha.a));
gSPSegment(POLY_XLU_DISP++, 0x0C, D_801AEF88); // transparency DL
POLY_XLU_DISP =
SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnPoComposer_OverrideLimbDraw, EnPoComposer_PostLimbDraw, &this->actor, POLY_XLU_DISP);
}
if (this->lightColor.a != 0) {
if (this->mainAlpha.a != 0) {
// Draw lantern if visible
if (this->lightColor.a == 255) {
if (this->mainAlpha.a == 255) {
Scene_SetRenderModeXlu(play, 0, 1);
gfx = POLY_OPA_DISP;
} else {
@ -713,7 +728,8 @@ void EnPoComposer_Draw(Actor* thisx, PlayState* play) {
}
gDPPipeSync(&gfx[0]);
gDPSetEnvColor(&gfx[1], this->envColor.r, this->envColor.g, this->envColor.b, this->lightColor.a);
// Light color reused for lantern glass
gDPSetEnvColor(&gfx[1], this->lightColor.r, this->lightColor.g, this->lightColor.b, this->mainAlpha.a);
Matrix_Put(&this->lanternMtxF);
MATRIX_FINALIZE_AND_LOAD(&gfx[2], play->state.gfxCtx);
@ -722,10 +738,10 @@ void EnPoComposer_Draw(Actor* thisx, PlayState* play) {
gSPDisplayList(&gfx[4], gPoeComposerLanternGlassDL);
gDPPipeSync(&gfx[5]);
gDPSetEnvColor(&gfx[6], clothingColor->r, clothingColor->g, clothingColor->b, this->lightColor.a);
gDPSetEnvColor(&gfx[6], clothingColor->r, clothingColor->g, clothingColor->b, this->mainAlpha.a);
gSPDisplayList(&gfx[7], gPoeComposerLanternTopDL);
if (this->lightColor.a == 255) {
if (this->mainAlpha.a == 255) {
POLY_OPA_DISP = &gfx[8];
} else {
POLY_XLU_DISP = &gfx[8];
@ -739,8 +755,8 @@ void EnPoComposer_Draw(Actor* thisx, PlayState* play) {
lightPos.y += TRUNCF_BINANG(lightOffset.y);
lightPos.z += TRUNCF_BINANG(lightOffset.z);
Lights_PointGlowSetInfo(&this->lightInfo, lightPos.x, lightPos.y, lightPos.z, this->envColor.r, this->envColor.g,
this->envColor.b, this->envColor.a * (200.0f / 255.0f));
Lights_PointGlowSetInfo(&this->lightInfo, lightPos.x, lightPos.y, lightPos.z, this->lightColor.r,
this->lightColor.g, this->lightColor.b, this->lightColor.a * (200.0f / 255.0f));
CLOSE_DISPS(play->state.gfxCtx);
}

View File

@ -5,7 +5,7 @@
#include "assets/objects/object_po_composer/object_po_composer.h"
#define POE_COMPOSER_IS_FLAT(thisx) ((thisx)->params & 0x8000)
#define POE_COMPOSER_4000(thisx) ((thisx)->params & 0x4000)
#define POE_COMPOSER_SHARP_HEALED(thisx) ((thisx)->params & 0x4000)
typedef enum {
/* 1 */ POE_COMPOSER_CUEID_IDLE = 1,
@ -22,8 +22,8 @@ typedef enum {
} EnPoComposerCueId;
typedef enum {
/* 0 */ SHARP_CS_ENCOUNTER_FIRST,
/* 1 */ SHARP_CS_ENCOUNTER_OTHER,
/* 0 */ SHARP_CS_ENCOUNTER_HEALED_TALK,
/* 1 */ SHARP_CS_ENCOUNTER_AGRO_TALK,
/* 2 */ SHARP_CS_SONG_HEALING,
/* 3 */ SHARP_CS_SONG_STORMS,
/* 4 */ SHARP_CS_MAX
@ -53,8 +53,11 @@ typedef struct EnPoComposer {
/* 0x330 */ s16 inCutscene;
/* 0x332 */ s16 visible;
/* 0x334 */ u16 cueId;
/* 0x336 */ Color_RGBA8 lightColor;
/* 0x33A */ Color_RGBA8 envColor;
/* 0x336 */ union {
Color_RGBA8 mainAlpha; // the alpha is used as general alpha for the whole body
Color_RGBA8 eyeColor; // also used for robe bottom
};
/* 0x33A */ Color_RGBA8 lightColor; // used by lantern light, and lantern glass tint
} EnPoComposer; // size = 0x340
#endif // Z_EN_PO_COMPOSER_H

View File

@ -273,7 +273,7 @@ void EnRailgibud_Init(Actor* thisx, PlayState* play) {
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_IKANA_SPRING_RESTORED)) {
Actor_Kill(&this->actor);
}

View File

@ -856,15 +856,19 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) {
pauseCtx->itemDescriptionOn = true;
if (pauseCtx->cursorYIndex[PAUSE_QUEST] < 2) {
if (pauseCtx->cursorItem[PAUSE_QUEST] < ITEM_REMAINS_ODOLWA) {
func_801514B0(play, 0x1737 + pauseCtx->cursorItem[PAUSE_QUEST], 1);
Message_PauseMenu_ShowDescription(
play, 0x1737 + pauseCtx->cursorItem[PAUSE_QUEST], 1);
} else {
func_801514B0(play, 0x173B + pauseCtx->cursorItem[PAUSE_QUEST], 3);
Message_PauseMenu_ShowDescription(
play, 0x173B + pauseCtx->cursorItem[PAUSE_QUEST], 3);
}
} else {
if (pauseCtx->cursorItem[PAUSE_QUEST] < ITEM_REMAINS_ODOLWA) {
func_801514B0(play, 0x1737 + pauseCtx->cursorItem[PAUSE_QUEST], 1);
Message_PauseMenu_ShowDescription(
play, 0x1737 + pauseCtx->cursorItem[PAUSE_QUEST], 1);
} else {
func_801514B0(play, 0x173B + pauseCtx->cursorItem[PAUSE_QUEST], 1);
Message_PauseMenu_ShowDescription(
play, 0x173B + pauseCtx->cursorItem[PAUSE_QUEST], 1);
}
}
}

View File

@ -681,9 +681,9 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) {
// Give description on item through a message box
pauseCtx->itemDescriptionOn = true;
if (pauseCtx->cursorYIndex[PAUSE_ITEM] < 2) {
func_801514B0(play, 0x1700 + pauseCtx->cursorItem[PAUSE_ITEM], 3);
Message_PauseMenu_ShowDescription(play, 0x1700 + pauseCtx->cursorItem[PAUSE_ITEM], 3);
} else {
func_801514B0(play, 0x1700 + pauseCtx->cursorItem[PAUSE_ITEM], 1);
Message_PauseMenu_ShowDescription(play, 0x1700 + pauseCtx->cursorItem[PAUSE_ITEM], 1);
}
}
}

View File

@ -458,11 +458,11 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) {
if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) && (msgCtx->msgLength == 0) &&
(pauseCtx->cursorPoint[PAUSE_MAP] == DUNGEON_STRAY_FAIRIES)) {
pauseCtx->itemDescriptionOn = true;
func_801514B0(play, 0x17AF, 1);
Message_PauseMenu_ShowDescription(play, 0x17AF, 1);
} else if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) && (msgCtx->msgLength == 0) &&
CHECK_DUNGEON_ITEM(pauseCtx->cursorPoint[PAUSE_MAP], gSaveContext.dungeonSceneSharedIndex)) {
pauseCtx->itemDescriptionOn = true;
func_801514B0(play, 0x17AC + pauseCtx->cursorPoint[PAUSE_MAP], 1);
Message_PauseMenu_ShowDescription(play, 0x17AC + pauseCtx->cursorPoint[PAUSE_MAP], 1);
}
}

View File

@ -603,9 +603,9 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
// Give description on item through a message box
pauseCtx->itemDescriptionOn = true;
if (pauseCtx->cursorYIndex[PAUSE_MASK] < 2) {
func_801514B0(play, 0x1700 + pauseCtx->cursorItem[PAUSE_MASK], 3);
Message_PauseMenu_ShowDescription(play, 0x1700 + pauseCtx->cursorItem[PAUSE_MASK], 3);
} else {
func_801514B0(play, 0x1700 + pauseCtx->cursorItem[PAUSE_MASK], 1);
Message_PauseMenu_ShowDescription(play, 0x1700 + pauseCtx->cursorItem[PAUSE_MASK], 1);
}
}
}

View File

@ -2848,7 +2848,7 @@ Message_LoadOwlWarpText = 0x8014D62C; // type:func
Message_Decode = 0x8014D7B4; // type:func
func_80150A84 = 0x80150A84; // type:func
Message_OpenText = 0x80150D08; // type:func
func_801514B0 = 0x801514B0; // type:func
Message_PauseMenu_ShowDescription = 0x801514B0; // type:func
Message_StartTextbox = 0x801518B0; // type:func
Message_ContinueTextbox = 0x80151938; // type:func
Message_DisplaySceneTitleCard = 0x80151A68; // type:func
@ -7211,43 +7211,43 @@ ObjIcePoly_Update = 0x80932198; // type:func
ObjIcePoly_Draw = 0x809321BC; // type:func
EnFz_Init = 0x80932490; // type:func
EnFz_Destroy = 0x809326F4; // type:func
func_80932784 = 0x80932784; // type:func
func_809328A4 = 0x809328A4; // type:func
func_809328F4 = 0x809328F4; // type:func
func_80932AE8 = 0x80932AE8; // type:func
func_80932AF4 = 0x80932AF4; // type:func
func_80932BD4 = 0x80932BD4; // type:func
func_80932C98 = 0x80932C98; // type:func
func_80933014 = 0x80933014; // type:func
func_809330D4 = 0x809330D4; // type:func
func_80933104 = 0x80933104; // type:func
func_80933184 = 0x80933184; // type:func
func_809331F8 = 0x809331F8; // type:func
func_80933248 = 0x80933248; // type:func
func_80933274 = 0x80933274; // type:func
func_80933324 = 0x80933324; // type:func
func_80933368 = 0x80933368; // type:func
func_809333A4 = 0x809333A4; // type:func
func_809333D8 = 0x809333D8; // type:func
func_80933414 = 0x80933414; // type:func
func_80933444 = 0x80933444; // type:func
func_80933480 = 0x80933480; // type:func
func_809334B8 = 0x809334B8; // type:func
func_809336C0 = 0x809336C0; // type:func
func_80933760 = 0x80933760; // type:func
func_80933790 = 0x80933790; // type:func
func_809337D4 = 0x809337D4; // type:func
func_8093389C = 0x8093389C; // type:func
func_809338E0 = 0x809338E0; // type:func
func_80933AF4 = 0x80933AF4; // type:func
func_80933B38 = 0x80933B38; // type:func
func_80933B48 = 0x80933B48; // type:func
EnFz_UpdateTargetPos = 0x80932784; // type:func
EnFz_ReachedTarget = 0x809328A4; // type:func
EnFz_Damaged = 0x809328F4; // type:func
EnFz_SpawnMistHidden = 0x80932AE8; // type:func
EnFz_SpawnMistChanging = 0x80932AF4; // type:func
EnFz_SpawnMistFullSize = 0x80932BD4; // type:func
EnFz_ApplyDamage = 0x80932C98; // type:func
EnFz_SetYawTowardsPlayer = 0x80933014; // type:func
EnFz_SetupDisappear = 0x809330D4; // type:func
EnFz_Disappear = 0x80933104; // type:func
EnFz_SetupWait = 0x80933184; // type:func
EnFz_Wait = 0x809331F8; // type:func
EnFz_SetupAppear = 0x80933248; // type:func
EnFz_Appear = 0x80933274; // type:func
EnFz_SetupAimForSkate = 0x80933324; // type:func
EnFz_AimForSkate = 0x80933368; // type:func
EnFz_SetupSkateTowardPlayer = 0x809333A4; // type:func
EnFz_SkateTowardPlayer = 0x809333D8; // type:func
EnFz_SetupSkatingAimFreeze = 0x80933414; // type:func
EnFz_SkatingAimFreeze = 0x80933444; // type:func
EnFz_SetupSkatingFreeze = 0x80933480; // type:func
EnFz_SkatingFreeze = 0x809334B8; // type:func
EnFz_SetupDie = 0x809336C0; // type:func
EnFz_Die = 0x80933760; // type:func
EnFz_SetupMelt = 0x80933790; // type:func
EnFz_Melt = 0x809337D4; // type:func
EnFz_SetupIdleStationary = 0x8093389C; // type:func
EnFz_IdleStationary = 0x809338E0; // type:func
EnFz_SetupPassive = 0x80933AF4; // type:func
EnFz_Passive = 0x80933B38; // type:func
EnFz_UpdateLightArrowEffects = 0x80933B48; // type:func
EnFz_Update = 0x80933BFC; // type:func
EnFz_Draw = 0x80933D98; // type:func
func_80934018 = 0x80934018; // type:func
func_809340BC = 0x809340BC; // type:func
func_80934178 = 0x80934178; // type:func
func_80934464 = 0x80934464; // type:func
EnFz_SpawnMistAura = 0x80934018; // type:func
EnFz_SpawnBreath = 0x809340BC; // type:func
EnFz_UpdateEffects = 0x80934178; // type:func
EnFz_DrawEffects = 0x80934464; // type:func
EnKusa_ApplySway = 0x809349E0; // type:func
EnKusa_Sway = 0x80934AB4; // type:func
EnKusa_SnapToFloor = 0x80934F58; // type:func
@ -15564,9 +15564,9 @@ EnPoComposer_SetupRoll = 0x80BC5898; // type:func
EnPoComposer_Roll = 0x80BC58E0; // type:func
EnPoComposer_SharpCutsceneDone = 0x80BC59BC; // type:func
EnPoComposer_UpdateAction = 0x80BC59EC; // type:func
EnPoComposer_StepLightAlpha = 0x80BC5CC8; // type:func
EnPoComposer_StepLightColor = 0x80BC5D34; // type:func
EnPoComposer_UpdateEnvColor = 0x80BC5DEC; // type:func
EnPoComposer_StepMainAlpha = 0x80BC5CC8; // type:func
EnPoComposer_StepEyeColor = 0x80BC5D34; // type:func
EnPoComposer_UpdateLightColor = 0x80BC5DEC; // type:func
EnPoComposer_UpdateCollision = 0x80BC5FE8; // type:func
EnPoComposer_Update = 0x80BC6048; // type:func
EnPoComposer_OverrideLimbDraw = 0x80BC60BC; // type:func

View File

@ -174,8 +174,8 @@ week_event_reg = {
(13 << 8) | 0x40: "WEEKEVENTREG_RECEIVED_OCEANSIDE_WALLET_UPGRADE",
(13 << 8) | 0x80: "WEEKEVENTREG_OCEANSIDE_SPIDER_HOUSE_COLLECTED_REWARD",
(14 << 8) | 0x01: "WEEKEVENTREG_14_01",
(14 << 8) | 0x02: "WEEKEVENTREG_14_02",
(14 << 8) | 0x04: "WEEKEVENTREG_14_04",
(14 << 8) | 0x02: "WEEKEVENTREG_SHARP_HOSTILE_CONVERSATION",
(14 << 8) | 0x04: "WEEKEVENTREG_IKANA_SPRING_RESTORED",
(14 << 8) | 0x08: "WEEKEVENTREG_DRANK_CHATEAU_ROMANI",
(14 << 8) | 0x10: "WEEKEVENTREG_WON_DEKU_PLAYGROUND_DAY_1",
(14 << 8) | 0x20: "WEEKEVENTREG_WON_DEKU_PLAYGROUND_DAY_2",

View File

@ -2,12 +2,19 @@
shopt -s globstar
FUNCTIONS_FILES="tools/disasm/**/functions.txt"
VARIABLES_FILES="tools/disasm/**/variables.txt"
ASM_FILES="extracted/**/asm/**/*s"
if [ "$#" -ne "2" ];
then
echo "usage: $0 old_name new_name"
exit 1
fi
#echo "Replace $1 with $2?"
#read
grep -rl "$1" asm/**/*.s src/**/*.{c,h} include/**/*.h assets/xml/* tools/disasm/functions.txt tools/disasm/variables.txt tools/sizes/*.csv | xargs sed -i "s/\b$1\b/$2/g"
echo "Replacing symbol in most files ..."
grep -rl "$1" src/**/*.{c,h} include/**/*.h assets/xml/* $FUNCTIONS_FILES $VARIABLES_FILES tools/sizes/*.csv | xargs sed -i "s/\b$1\b/$2/g"
# so many files it overloads xargs, and takes much longer
echo "Replacing symbol in asm files ..."
grep -rl "$1" $ASM_FILES | xargs sed -i "s/\b$1\b/$2/g"

View File

@ -2365,7 +2365,7 @@ asm/non_matchings/code/z_message/Message_LoadOwlWarpText.s,Message_LoadOwlWarpTe
asm/non_matchings/code/z_message/Message_Decode.s,Message_Decode,0x8014D7B4,0xCB4
asm/non_matchings/code/z_message/func_80150A84.s,func_80150A84,0x80150A84,0xA1
asm/non_matchings/code/z_message/Message_OpenText.s,Message_OpenText,0x80150D08,0x1EA
asm/non_matchings/code/z_message/func_801514B0.s,func_801514B0,0x801514B0,0x100
asm/non_matchings/code/z_message/Message_PauseMenu_ShowDescription.s,Message_PauseMenu_ShowDescription,0x801514B0,0x100
asm/non_matchings/code/z_message/Message_StartTextbox.s,Message_StartTextbox,0x801518B0,0x22
asm/non_matchings/code/z_message/Message_ContinueTextbox.s,Message_ContinueTextbox,0x80151938,0x4C
asm/non_matchings/code/z_message/Message_DisplaySceneTitleCard.s,Message_DisplaySceneTitleCard,0x80151A68,0x53

1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
2365 asm/non_matchings/code/z_message/Message_Decode.s Message_Decode 0x8014D7B4 0xCB4
2366 asm/non_matchings/code/z_message/func_80150A84.s func_80150A84 0x80150A84 0xA1
2367 asm/non_matchings/code/z_message/Message_OpenText.s Message_OpenText 0x80150D08 0x1EA
2368 asm/non_matchings/code/z_message/func_801514B0.s asm/non_matchings/code/z_message/Message_PauseMenu_ShowDescription.s func_801514B0 Message_PauseMenu_ShowDescription 0x801514B0 0x100
2369 asm/non_matchings/code/z_message/Message_StartTextbox.s Message_StartTextbox 0x801518B0 0x22
2370 asm/non_matchings/code/z_message/Message_ContinueTextbox.s Message_ContinueTextbox 0x80151938 0x4C
2371 asm/non_matchings/code/z_message/Message_DisplaySceneTitleCard.s Message_DisplaySceneTitleCard 0x80151A68 0x53

View File

@ -117,8 +117,8 @@ weekEventReg = {
(13 << 8) | 0x40: "WEEKEVENTREG_RECEIVED_OCEANSIDE_WALLET_UPGRADE",
(13 << 8) | 0x80: "WEEKEVENTREG_OCEANSIDE_SPIDER_HOUSE_COLLECTED_REWARD",
(14 << 8) | 0x01: "WEEKEVENTREG_14_01",
(14 << 8) | 0x02: "WEEKEVENTREG_14_02",
(14 << 8) | 0x04: "WEEKEVENTREG_14_04",
(14 << 8) | 0x02: "WEEKEVENTREG_SHARP_HOSTILE_CONVERSATION",
(14 << 8) | 0x04: "WEEKEVENTREG_IKANA_SPRING_RESTORED",
(14 << 8) | 0x08: "WEEKEVENTREG_DRANK_CHATEAU_ROMANI",
(14 << 8) | 0x10: "WEEKEVENTREG_WON_DEKU_PLAYGROUND_DAY_1",
(14 << 8) | 0x20: "WEEKEVENTREG_WON_DEKU_PLAYGROUND_DAY_2",