Oceff wipe6 (#686)

* Uncorrupted; Not OK

* Merged upstream -- actually OK

* Update assets/xml/overlays/ovl_Oceff_Wipe6.xml

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* - Removed Extra 0 characters; clang-format-11

* Removed new warnings.

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
Nick 2022-03-25 02:45:37 +00:00 committed by GitHub
parent 80cbdb956d
commit ce7aa87454
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 85 additions and 14 deletions

View File

@ -0,0 +1,9 @@
<Root>
<File Name="ovl_Oceff_Wipe6" BaseAddress="0x80BCA5A0" RangeStart="0x330" RangeEnd="0x5B8">
<TextureAnimation Name="ovl_Oceff_Wipe6_Matanimheader_000338" Offset="0x338" />
<Array Name="gOceff6Vtx" Count="22" Offset="0x340">
<Vtx/>
</Array>
<DList Name="gOceff6DL" Offset="0x4A0"/>
</File>
</Root>

View File

@ -1158,7 +1158,7 @@ s16 Camera_ClearFlags(Camera* camera, s16 flags);
s32 func_800DFFAC(Camera* camera, Actor* doorActor, s16 bgCamDataId, f32 arg3, s16 timer1, s16 timer2, s16 timer3);
// UNK_TYPE4 func_800E007C(Camera* param_1, Camera* param_2);
// UNK_TYPE4 func_800E01AC(void);
// void func_800E01B8(void);
Vec3f* Camera_GetQuakeOffset(Vec3f* dst, Camera* camera);
// void func_800E01DC(s32 param_1, u32 param_2, UNK_TYPE4 param_3, UNK_TYPE4 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6);
// UNK_TYPE4 func_800E0228(void);
// void func_800E0238(void);

View File

@ -872,7 +872,8 @@ typedef struct {
/* 0x12074 */ UNK_TYPE1 pad12074[0x4];
/* 0x12078 */ s32 bankRupeesSelected;
/* 0x1207C */ s32 bankRupees;
/* 0x12080 */ UNK_TYPE1 pad12080[0x31];
/* 0x12080 */ UNK_TYPE1 pad12080[0x30];
/* 0x120B0 */ u8 unk120B0;
/* 0x120B1 */ u8 unk120B1;
/* 0x120B2 */ UNK_TYPE1 pad120B2[0x22];
/* 0x120D4 */ UNK_TYPE2 unk120D4;

3
spec
View File

@ -4620,8 +4620,7 @@ beginseg
name "ovl_Oceff_Wipe6"
compress
include "build/src/overlays/actors/ovl_Oceff_Wipe6/z_oceff_wipe6.o"
include "build/data/ovl_Oceff_Wipe6/ovl_Oceff_Wipe6.data.o"
include "build/data/ovl_Oceff_Wipe6/ovl_Oceff_Wipe6.reloc.o"
include "build/src/overlays/actors/ovl_Oceff_Wipe6/ovl_Oceff_Wipe6_reloc.o"
endseg
beginseg

View File

@ -356,7 +356,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800E01AC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800E01B8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_GetQuakeOffset.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800E01DC.s")

View File

@ -15,7 +15,6 @@ void OceffWipe6_Destroy(Actor* thisx, GlobalContext* globalCtx);
void OceffWipe6_Update(Actor* thisx, GlobalContext* globalCtx);
void OceffWipe6_Draw(Actor* thisx, GlobalContext* globalCtx);
#if 0
const ActorInit Oceff_Wipe6_InitVars = {
ACTOR_OCEFF_WIPE6,
ACTORCAT_ITEMACTION,
@ -28,12 +27,75 @@ const ActorInit Oceff_Wipe6_InitVars = {
(ActorFunc)OceffWipe6_Draw,
};
#endif
#include "overlays/ovl_Oceff_Wipe6/ovl_Oceff_Wipe6.c"
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Oceff_Wipe6/OceffWipe6_Init.s")
void OceffWipe6_Init(Actor* thisx, GlobalContext* globalCtx) {
OceffWipe6* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Oceff_Wipe6/OceffWipe6_Destroy.s")
Actor_SetScale(&this->actor, 1.0f);
this->counter = 0;
this->actor.world.pos = GET_ACTIVE_CAM(globalCtx)->eye;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Oceff_Wipe6/OceffWipe6_Update.s")
void OceffWipe6_Destroy(Actor* thisx, GlobalContext* globalCtx) {
func_80115D5C(&globalCtx->state);
globalCtx->msgCtx.unk120B0 = 0;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Oceff_Wipe6/OceffWipe6_Draw.s")
void OceffWipe6_Update(Actor* thisx, GlobalContext* globalCtx) {
OceffWipe6* this = THIS;
this->actor.world.pos = GET_ACTIVE_CAM(globalCtx)->eye;
if (this->counter < 100) {
this->counter++;
} else {
Actor_MarkForDeath(&this->actor);
}
}
void OceffWipe6_Draw(Actor* thisx, GlobalContext* globalCtx) {
OceffWipe6* this = THIS;
f32 z;
u8 alpha;
s32 i;
s32 counter;
Vec3f activeCamEye;
s32 pad;
Vec3f quakeOffset;
s32 pad2;
activeCamEye = GET_ACTIVE_CAM(globalCtx)->eye;
Camera_GetQuakeOffset(&quakeOffset, GET_ACTIVE_CAM(globalCtx));
if (this->counter < 32) {
counter = this->counter;
z = Math_SinS(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(gOceff6Vtx); i += 2) {
gOceff6Vtx[i].v.cn[3] = alpha;
}
OPEN_DISPS(globalCtx->state.gfxCtx);
func_8012C2DC(globalCtx->state.gfxCtx);
Matrix_InsertTranslation(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_NormalizeXYZ(&globalCtx->billboardMtxF);
Matrix_InsertXRotation_s(0x708, MTXMODE_APPLY);
Matrix_InsertTranslation(0.0f, 0.0f, -z, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
AnimatedMat_Draw(globalCtx, ovl_Oceff_Wipe6_Matanimheader_000338);
gSPDisplayList(POLY_XLU_DISP++, gOceff6DL);
CLOSE_DISPS(globalCtx->state.gfxCtx);
}

View File

@ -7,7 +7,7 @@ struct OceffWipe6;
typedef struct OceffWipe6 {
/* 0x000 */ Actor actor;
/* 0x144 */ char unk_144[0x4];
/* 0x144 */ s16 counter;
} OceffWipe6; // size = 0x148
extern const ActorInit Oceff_Wipe6_InitVars;

View File

@ -1290,7 +1290,7 @@
0x800DFFAC:("func_800DFFAC",),
0x800E007C:("func_800E007C",),
0x800E01AC:("func_800E01AC",),
0x800E01B8:("func_800E01B8",),
0x800E01B8:("Camera_GetQuakeOffset",),
0x800E01DC:("func_800E01DC",),
0x800E0228:("func_800E0228",),
0x800E0238:("func_800E0238",),

View File

@ -804,7 +804,7 @@ asm/non_matchings/code/z_camera/Camera_ClearFlags.s,Camera_ClearFlags,0x800DFF84
asm/non_matchings/code/z_camera/func_800DFFAC.s,func_800DFFAC,0x800DFFAC,0x34
asm/non_matchings/code/z_camera/func_800E007C.s,func_800E007C,0x800E007C,0x4C
asm/non_matchings/code/z_camera/func_800E01AC.s,func_800E01AC,0x800E01AC,0x3
asm/non_matchings/code/z_camera/func_800E01B8.s,func_800E01B8,0x800E01B8,0x9
asm/non_matchings/code/z_camera/Camera_GetQuakeOffset.s,Camera_GetQuakeOffset,0x800E01B8,0x9
asm/non_matchings/code/z_camera/func_800E01DC.s,func_800E01DC,0x800E01DC,0x13
asm/non_matchings/code/z_camera/func_800E0228.s,func_800E0228,0x800E0228,0x4
asm/non_matchings/code/z_camera/func_800E0238.s,func_800E0238,0x800E0238,0x1D

1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
804 asm/non_matchings/code/z_camera/func_800DFFAC.s func_800DFFAC 0x800DFFAC 0x34
805 asm/non_matchings/code/z_camera/func_800E007C.s func_800E007C 0x800E007C 0x4C
806 asm/non_matchings/code/z_camera/func_800E01AC.s func_800E01AC 0x800E01AC 0x3
807 asm/non_matchings/code/z_camera/func_800E01B8.s asm/non_matchings/code/z_camera/Camera_GetQuakeOffset.s func_800E01B8 Camera_GetQuakeOffset 0x800E01B8 0x9
808 asm/non_matchings/code/z_camera/func_800E01DC.s func_800E01DC 0x800E01DC 0x13
809 asm/non_matchings/code/z_camera/func_800E0228.s func_800E0228 0x800E0228 0x4
810 asm/non_matchings/code/z_camera/func_800E0238.s func_800E0238 0x800E0238 0x1D