obj_funen OK (#91)

* initial funen work

* obj_funen OK

* ran format script
This commit is contained in:
kyleburnette
2021-05-04 16:51:42 -07:00
committed by GitHub
parent 94ef01b42f
commit 751c5e1049
3 changed files with 32 additions and 6 deletions
@@ -7,7 +7,6 @@
void ObjFunen_Init(Actor* thisx, GlobalContext* globalCtx);
void ObjFunen_Draw(Actor* thisx, GlobalContext* globalCtx);
/*
const ActorInit Obj_Funen_InitVars = {
ACTOR_OBJ_FUNEN,
ACTORCAT_PROP,
@@ -19,8 +18,32 @@ const ActorInit Obj_Funen_InitVars = {
(ActorFunc)func_800BDFB0,
(ActorFunc)ObjFunen_Draw
};
*/
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Obj_Funen_0x80A19740/ObjFunen_Init.asm")
extern Gfx D_060000D0[];
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Obj_Funen_0x80A19740/ObjFunen_Draw.asm")
f32 D_80A198D0[] = { 0.1f, 0.024390244f };
void ObjFunen_Init(Actor* thisx, GlobalContext* globalCtx) {
ObjFunen* this = THIS;
Actor_SetScale(&this->actor, D_80A198D0[this->actor.params & 1]);
}
void ObjFunen_Draw(Actor* thisx, GlobalContext* globalCtx) {
s32 temp;
s32 pad[2];
OPEN_DISPS(globalCtx->state.gfxCtx);
func_8012C2DC(globalCtx->state.gfxCtx);
Matrix_RotateY((s16)(func_800DFCDC(ACTIVE_CAM) - 0x8000), 1);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
temp = -(globalCtx->unk18840 & 0x7FFFFFFF) & 0x7F;
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, temp, 0x20, 0x20, 1, 0, temp, 0x20, 0x20));
gSPDisplayList(POLY_XLU_DISP++, D_060000D0);
CLOSE_DISPS(globalCtx->state.gfxCtx);
}