mirror of https://github.com/zeldaret/mm.git
`EnPoComposer` and `object_po_composer` further documented (#1833)
* PoComposer: some docs * PoComposer: the rest of the object documented * PoComposer: docs tweaked * PoComposer: missing weekevent reg in a schedule file wasnt found by rename script * PoComposer: document tweaks * PoComposer: forgot the texture name
This commit is contained in:
parent
cc4a063e0c
commit
5898c3e2b0
|
|
@ -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" />
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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]++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue