mirror of
https://github.com/HarbourMasters/2ship2harkinian.git
synced 2024-11-23 22:19:53 +00:00
ovl_Oceff_Wipe7 OK (#1009)
* progress * ovl_Oceff_Wipe7 OK * pr review * format * renamings
This commit is contained in:
parent
b2996b0352
commit
4b545bc259
10
assets/xml/overlays/ovl_Oceff_Wipe7.xml
Normal file
10
assets/xml/overlays/ovl_Oceff_Wipe7.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<Root>
|
||||
<File Name="ovl_Oceff_Wipe7" BaseAddress="0x80BCDCB0" RangeStart="0x330" RangeEnd="0xDB8">
|
||||
<Texture Name="sSongofHealingEffectTex" OutName="song_of_healing_effect" Format="i8" Width="32" Height="32" Offset="0x330"/>
|
||||
<TextureAnimation Name="sSongofHealingEffectTexAnim" Offset="0xB38" />
|
||||
<Array Name="sSongofHealingEffectFrustrumVtx" Count="22" Offset="0xB40">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
<DList Name="sSongOfHealingEffectFrustumDL" Offset="0xCA0"/>
|
||||
</File>
|
||||
</Root>
|
4
spec
4
spec
@ -4450,9 +4450,7 @@ beginseg
|
||||
name "ovl_Oceff_Wipe7"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.o"
|
||||
include "build/data/ovl_Oceff_Wipe7/ovl_Oceff_Wipe7.data.o"
|
||||
include "build/data/ovl_Oceff_Wipe7/ovl_Oceff_Wipe7.bss.o"
|
||||
include "build/data/ovl_Oceff_Wipe7/ovl_Oceff_Wipe7.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Oceff_Wipe7/ovl_Oceff_Wipe7_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
@ -15,7 +15,6 @@ void OceffWipe7_Destroy(Actor* thisx, PlayState* play);
|
||||
void OceffWipe7_Update(Actor* thisx, PlayState* play);
|
||||
void OceffWipe7_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
#if 0
|
||||
const ActorInit Oceff_Wipe7_InitVars = {
|
||||
ACTOR_OCEFF_WIPE7,
|
||||
ACTORCAT_ITEMACTION,
|
||||
@ -28,12 +27,77 @@ const ActorInit Oceff_Wipe7_InitVars = {
|
||||
(ActorFunc)OceffWipe7_Draw,
|
||||
};
|
||||
|
||||
#endif
|
||||
#include "assets/overlays/ovl_Oceff_Wipe7/ovl_Oceff_Wipe7.c"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Oceff_Wipe7/OceffWipe7_Init.s")
|
||||
s32 D_80BCEB10;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Oceff_Wipe7/OceffWipe7_Destroy.s")
|
||||
void OceffWipe7_Init(Actor* thisx, PlayState* play) {
|
||||
OceffWipe7* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Oceff_Wipe7/OceffWipe7_Update.s")
|
||||
Actor_SetScale(&this->actor, 1.0f);
|
||||
this->counter = 0;
|
||||
this->actor.world.pos = GET_ACTIVE_CAM(play)->eye;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Oceff_Wipe7/OceffWipe7_Draw.s")
|
||||
void OceffWipe7_Destroy(Actor* thisx, PlayState* play) {
|
||||
OceffWipe7* this = THIS;
|
||||
|
||||
func_80115D5C(&play->state);
|
||||
play->msgCtx.unk120B0 = 0;
|
||||
}
|
||||
|
||||
void OceffWipe7_Update(Actor* thisx, PlayState* play) {
|
||||
OceffWipe7* this = THIS;
|
||||
|
||||
this->actor.world.pos = GET_ACTIVE_CAM(play)->eye;
|
||||
if (this->counter < 100) {
|
||||
this->counter++;
|
||||
} else {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
void OceffWipe7_Draw(Actor* thisx, PlayState* play) {
|
||||
OceffWipe7* this = THIS;
|
||||
f32 z;
|
||||
u8 alpha;
|
||||
s32 i;
|
||||
s32 counter;
|
||||
Vec3f activeCamEye = GET_ACTIVE_CAM(play)->eye;
|
||||
s32 pad;
|
||||
Vec3f quakeOffset;
|
||||
s32 pad2;
|
||||
|
||||
Camera_GetQuakeOffset(&quakeOffset, GET_ACTIVE_CAM(play));
|
||||
|
||||
if (this->counter < 32) {
|
||||
z = Math_SinS(this->counter * 0x200) * 1220.0f;
|
||||
} else {
|
||||
z = 1220.0f;
|
||||
}
|
||||
|
||||
if (this->counter >= 80) {
|
||||
alpha = 12 * (100 - this->counter);
|
||||
} else {
|
||||
alpha = 255;
|
||||
}
|
||||
|
||||
for (i = 1; i < ARRAY_COUNT(sSongofHealingEffectFrustrumVtx); i += 2) {
|
||||
sSongofHealingEffectFrustrumVtx[i].v.cn[3] = alpha;
|
||||
}
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
func_8012C2DC(play->state.gfxCtx);
|
||||
Matrix_Translate(activeCamEye.x + quakeOffset.x, activeCamEye.y + quakeOffset.y, activeCamEye.z + quakeOffset.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
Matrix_RotateXS(0x708, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
AnimatedMat_Draw(play, sSongofHealingEffectTexAnim);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sSongOfHealingEffectFrustumDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ struct OceffWipe7;
|
||||
|
||||
typedef struct OceffWipe7 {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x4];
|
||||
/* 0x144 */ s16 counter;
|
||||
} OceffWipe7; // size = 0x148
|
||||
|
||||
extern const ActorInit Oceff_Wipe7_InitVars;
|
||||
|
Loading…
Reference in New Issue
Block a user