1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 06:40:15 +00:00

Decompiled ovl_Bg_Bdan_Objects (#66)

* Decompiled ovl_Bg_Bdan_Objects

* Update src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c

Co-Authored-By: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c

Co-Authored-By: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c

Co-Authored-By: Roman971 <32455037+Roman971@users.noreply.github.com>

* Header update

* formatting

* Update include/z64.h

Co-Authored-By: Roman971 <32455037+Roman971@users.noreply.github.com>

* Fixing structs

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
Ethan Roseman 2020-04-12 12:04:14 -04:00 committed by GitHub
parent d263b9dabd
commit f3c945cc82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 443 additions and 1383 deletions

View file

@ -1,14 +1,36 @@
/*
* File: z_bg_bdan_objects.c
* Overlay: ovl_Bg_Bdan_Objects
* Description:
*/
#include "z_bg_bdan_objects.h"
#define ROOM 0x00
#define FLAGS 0x00000010
void BgBdanObjects_Init(BgBdanObjects* this, GlobalContext* globalCtx);
void BgBdanObjects_Destroy(BgBdanObjects* this, GlobalContext* globalCtx);
void BgBdanObjects_Update(BgBdanObjects* this, GlobalContext* globalCtx);
void BgBdanObjects_Draw(BgBdanObjects* this, GlobalContext* globalCtx);
static void BgBdanObjects_Init(BgBdanObjects* this, GlobalContext* globalCtx);
static void BgBdanObjects_Destroy(BgBdanObjects* this, GlobalContext* globalCtx);
static void BgBdanObjects_Update(BgBdanObjects* this, GlobalContext* globalCtx);
static void BgBdanObjects_Draw(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086C054(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086C1A0(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086C29C(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086C55C(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086C5BC(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086C618(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086C6EC(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086C76C(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086C7D0(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086C868(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086C874(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086C9A8(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086C9F0(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086CABC(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086CB10(BgBdanObjects* this, GlobalContext* globalCtx);
static void func_8086CB8C(BgBdanObjects* this, GlobalContext* globalCtx);
/*
const ActorInit Bg_Bdan_Objects_InitVars = {
ACTOR_BG_BDAN_OBJECTS,
ACTORTYPE_BG,
@ -21,49 +43,410 @@ const ActorInit Bg_Bdan_Objects_InitVars = {
(ActorFunc)BgBdanObjects_Update,
(ActorFunc)BgBdanObjects_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086BCA0.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086BD10.s")
static ColliderCylinderInit D_8086CD70 = {
0x0A, 0x11, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFFCFFFFF, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00000000,
0x09, 0x00, 0x00, 0x00, 0x00BB, 0x0050, 0x0000, 0x0000, 0x0000, 0x0000,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/BgBdanObjects_Init.s")
static InitChainEntry initChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 0x64, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/BgBdanObjects_Destroy.s")
static u32 D_8086CDA0[] = {
0x06008618,
0x06004BE8,
0x060038E8,
0x06005200,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C054.s")
extern UNK_TYPE D_060038E8;
extern UNK_TYPE D_06005048;
extern UNK_TYPE D_06005580;
extern UNK_TYPE D_06008CE0;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C1A0.s")
s32 BgBdanObjects_GetContactRu1(BgBdanObjects* this, s32 arg1) {
switch (arg1) {
case 0:
return this->unk_1B8 == 1;
case 4:
return gSaveContext.inf_table[20] & 0x40;
case 3:
return this->unk_1B8 == 4;
default:
osSyncPrintf("Bg_Bdan_Objects_Get_Contact_Ru1\nそんな受信モードは無い%d!!!!!!!!\n");
return -1;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C29C.s")
static void BgBdanObjects_SetContactRu1(BgBdanObjects* this, s32 arg1) {
switch (arg1) {
case 1:
this->unk_1B8 = 2;
break;
case 2:
this->unk_1B8 = 3;
break;
case 4:
gSaveContext.inf_table[20] |= 0x40;
break;
default:
osSyncPrintf("Bg_Bdan_Objects_Set_Contact_Ru1\nそんな送信モードは無い%d!!!!!!!!\n");
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C3D8.s")
static void BgBdanObjects_Init(BgBdanObjects* this, GlobalContext* globalCtx) {
Actor* thisx = &this->dyna.actor;
s16 pad;
s32 localC = 0;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C55C.s")
Actor_ProcessInitChain(this, initChain);
DynaPolyInfo_SetActorMove(this, 1);
this->unk_168 = (thisx->params >> 8) & 0x3F;
thisx->params &= 0xFF;
if (thisx->params == 2) {
thisx->flags |= 0x30;
globalCtx->colCtx.stat.colHeader->waterBoxes[7].unk_02 = thisx->posRot.pos.y;
this->actionFunc = (ActorFunc)func_8086C9A8;
return;
}
if (thisx->params == 0) {
DynaPolyInfo_Alloc(&D_06008CE0, &localC);
ActorCollider_AllocCylinder(globalCtx, &this->collider);
ActorCollider_InitCylinder(globalCtx, &this->collider, this, &D_8086CD70);
thisx->posRot.pos.y = (f32)(thisx->posRot.pos.y + -79.0f);
if (Flags_GetClear(globalCtx, thisx->room)) {
Flags_SetSwitch(globalCtx, this->unk_168);
this->actionFunc = (ActorFunc)func_8086C6EC;
} else {
if (BgBdanObjects_GetContactRu1(this, 4)) {
if (Actor_SpawnAttached(&globalCtx->actorCtx, this, globalCtx, ACTOR_EN_BIGOKUTA,
thisx->initPosRot.pos.x, thisx->initPosRot.pos.y, thisx->initPosRot.pos.z, 0,
thisx->shape.rot.y + 0x8000, 0, 3) != NULL) {
thisx->attachedB->posRot.pos.z = thisx->attachedB->initPosRot.pos.z + 263.0f;
}
thisx->posRot.rot.y = 0;
this->actionFunc = (ActorFunc)func_8086C618;
thisx->posRot.pos.y = thisx->initPosRot.pos.y + -70.0f;
} else {
Flags_SetSwitch(globalCtx, this->unk_168);
this->unk_16A = 0;
this->actionFunc = (ActorFunc)func_8086C054;
}
}
} else {
if (thisx->params == 1) {
DynaPolyInfo_Alloc(&D_06005048, &localC);
this->unk_16A = 0x200;
this->unk_168 = 0;
this->actionFunc = (ActorFunc)func_8086C874;
} else {
DynaPolyInfo_Alloc(&D_06005580, &localC);
if (Flags_GetSwitch(globalCtx, this->unk_168)) {
this->actionFunc = (ActorFunc)func_8086C868;
thisx->posRot.pos.y = thisx->initPosRot.pos.y - 400.0f;
} else {
this->actionFunc = (ActorFunc)func_8086CB10;
}
}
}
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, this, localC);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C5BC.s")
static void BgBdanObjects_Destroy(BgBdanObjects* this, GlobalContext* globalCtx) {
Actor* thisx = &this->dyna.actor;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C618.s")
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
if (thisx->params == 0) {
ActorCollider_FreeCylinder(globalCtx, &this->collider);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C6EC.s")
static void func_8086C054(BgBdanObjects* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C76C.s")
if (BgBdanObjects_GetContactRu1(this, 0)) {
if (this->dyna.actor.xzDistanceFromLink < 250.0f) {
BgBdanObjects_SetContactRu1(this, 1);
this->unk_16A = 0x14;
func_800800F8(globalCtx, 0xBFE, -0x63, &this->dyna.actor, 0);
player->actor.posRot.pos.x = -1130.0f;
player->actor.posRot.pos.y = -1025.0f;
player->actor.posRot.pos.z = -3300.0f;
func_800AA000(0.0f, 0xFF, 0x14, 0x96);
}
} else {
if (this->unk_16A != 0) {
if (this->unk_16A != 0) {
this->unk_16A -= 1;
}
if (this->unk_16A == 0) {
this->actionFunc = (ActorFunc)func_8086C1A0;
}
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C7D0.s")
if ((!func_800BFC84(globalCtx)) && (!BgBdanObjects_GetContactRu1(this, 0))) {
this->dyna.actor.posRot.pos.y = this->dyna.actor.initPosRot.pos.y + -79.0f;
} else {
this->dyna.actor.posRot.pos.y = (this->dyna.actor.initPosRot.pos.y + -79.0f) - 5.0f;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C868.s")
static void func_8086C1A0(BgBdanObjects* this, GlobalContext* globalCtx) {
if (Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.y, this->dyna.actor.initPosRot.pos.y + 500.0f, 0.5f, 7.5f,
1.0f) < 0.1f) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_A);
this->actionFunc = (ActorFunc)func_8086C29C;
this->unk_16A = 0x1E;
BgBdanObjects_SetContactRu1(this, 2);
func_800AA000(0.0f, 0xFF, 0x14, 0x96);
} else {
if (this->unk_16A != 0) {
this->unk_16A -= 1;
}
if (this->unk_16A == 0) {
func_800AA000(0.0f, 0x78, 0x14, 0xA);
this->unk_16A = 0xB;
}
func_8002F974(&this->dyna.actor, 0x208F);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C874.s")
static void func_8086C29C(BgBdanObjects* this, GlobalContext* globalCtx) {
s32 temp;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C9A8.s")
if (this->unk_16A != 0) {
this->unk_16A -= 1;
if (this->unk_16A == 0) {
temp = Quake_Add(globalCtx->cameraCtx.activeCameraPtrs[globalCtx->cameraCtx.unk_5C0], 1);
Quake_SetSpeed(temp, 0x3A98);
Quake_SetQuakeValues(temp, 0, 1, 0xFA, 1);
Quake_SetCountdown(temp, 0xA);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086C9F0.s")
if (BgBdanObjects_GetContactRu1(this, 3)) {
Actor_SpawnAttached(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_EN_BIGOKUTA,
this->dyna.actor.posRot.pos.x, this->dyna.actor.posRot.pos.y + 140.0f,
this->dyna.actor.posRot.pos.z, 0, this->dyna.actor.shape.rot.y + 0x8000, 0, 0);
BgBdanObjects_SetContactRu1(this, 4);
this->unk_16A = 0xA;
this->actionFunc = (ActorFunc)func_8086C55C;
func_8005B1A4(globalCtx->cameraCtx.activeCameraPtrs[globalCtx->cameraCtx.unk_5C0]);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086CABC.s")
static void func_8086C3D8(BgBdanObjects* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086CB10.s")
this->dyna.actor.velocity.y += 0.5f;
if (Math_ApproxF(&this->dyna.actor.posRot.pos.y, this->dyna.actor.initPosRot.pos.y + -70.0f,
this->dyna.actor.velocity.y)) {
this->dyna.actor.posRot.rot.y = 0;
this->unk_16A = 0x3C;
Audio_PlayActorSound2(&this->dyna.actor, 0x289F);
this->dyna.actor.attachedB->posRot.pos.y = this->dyna.actor.posRot.pos.y + 140.0f;
this->actionFunc = (ActorFunc)func_8086C5BC;
func_800800F8(globalCtx, 0xC08, -0x63, this->dyna.actor.attachedB, 0);
player->actor.posRot.pos.x = -1130.0f;
player->actor.posRot.pos.y = -1025.0f;
player->actor.posRot.pos.z = -3500.0f;
player->actor.shape.rot.y = 0x7530;
player->actor.posRot.rot.y = player->actor.shape.rot.y;
func_800AA000(0.0f, 0xFF, 0x1E, 0x96);
} else {
func_8002F974(&this->dyna.actor, 0x2090);
if (this->unk_16A != 0) {
this->unk_16A -= 1;
}
if (this->unk_16A == 0) {
func_800AA000(0.0f, 0x78, 0x14, 0xA);
this->unk_16A = 0xB;
}
if (this->dyna.actor.attachedB != NULL) {
this->dyna.actor.attachedB->posRot.pos.y = this->dyna.actor.posRot.pos.y + 140.0f;
}
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/func_8086CB8C.s")
static void func_8086C55C(BgBdanObjects* this, GlobalContext* globalCtx) {
this->unk_16A -= 1;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/BgBdanObjects_Update.s")
if (this->unk_16A == 0) {
Flags_UnsetSwitch(globalCtx, this->unk_168);
} else if (this->unk_16A == -0x28) {
this->unk_16A = 0;
this->actionFunc = (ActorFunc)func_8086C3D8;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Bdan_Objects/BgBdanObjects_Draw.s")
static void func_8086C5BC(BgBdanObjects* this, GlobalContext* globalCtx) {
if (this->unk_16A != 0) {
this->unk_16A -= 1;
}
if (this->unk_16A == 0) {
if (this->dyna.actor.attachedB != NULL) {
if (this->dyna.actor.attachedB->params == 2) {
this->actionFunc = (ActorFunc)func_8086C618;
} else if (this->dyna.actor.attachedB->params == 0) {
this->dyna.actor.attachedB->params = 1;
}
}
}
}
static void func_8086C618(BgBdanObjects* this, GlobalContext* globalCtx) {
ActorCollider_Cylinder_Update(&this->dyna.actor, &this->collider);
Actor_CollisionCheck_SetAT(globalCtx, &globalCtx->sub_11E60, &this->collider);
if (Flags_GetClear(globalCtx, this->dyna.actor.room)) {
Flags_SetSwitch(globalCtx, this->unk_168);
this->dyna.actor.initPosRot.rot.y = (s16)(this->dyna.actor.shape.rot.y + 0x2000) & 0xC000;
this->actionFunc = (ActorFunc)func_8086C6EC;
} else {
this->dyna.actor.shape.rot.y += this->dyna.actor.posRot.rot.y;
func_800F436C(&this->dyna.actor.unk_E4, 0x2063, ABS(this->dyna.actor.posRot.rot.y) / 512.0f);
}
}
static void func_8086C6EC(BgBdanObjects* this, GlobalContext* globalCtx) {
s32 cond = Math_ApproxUpdateScaledS(&this->dyna.actor.shape.rot.y, this->dyna.actor.initPosRot.rot.y, 0x200);
if (Math_ApproxF(&this->dyna.actor.posRot.pos.y, this->dyna.actor.initPosRot.pos.y + -125.0f, 3.0f)) {
if (cond) {
this->actionFunc = (ActorFunc)func_8086C76C;
}
}
}
static void func_8086C76C(BgBdanObjects* this, GlobalContext* globalCtx) {
if (func_8004356C(&this->dyna.actor)) {
if (this->dyna.actor.xzDistanceFromLink < 120.0f) {
this->actionFunc = (ActorFunc)func_8086C7D0;
func_800800F8(globalCtx, 0xC12, -0x63, &this->dyna.actor, 0);
}
}
}
static void func_8086C7D0(BgBdanObjects* this, GlobalContext* globalCtx) {
if (Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.y, this->dyna.actor.initPosRot.pos.y + 965.0f, 0.5f, 15.0f,
0.2f) < 0.01f) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_A);
this->actionFunc = (ActorFunc)func_8086C868;
} else {
func_8002F974(&this->dyna.actor, 0x208F);
}
}
static void func_8086C868(BgBdanObjects* this, GlobalContext* globalCtx) {
}
static void func_8086C874(BgBdanObjects* this, GlobalContext* globalCtx) {
if (this->unk_16A != 0) {
this->unk_16A -= 1;
}
if (this->unk_168 == 0) {
if (func_8004356C(&this->dyna.actor)) {
this->unk_1B8 = globalCtx->cameraCtx.activeCameraPtrs[0]->unk_142;
func_8005A77C(globalCtx->cameraCtx.activeCameraPtrs[0], 0x3A);
func_8005AD1C(globalCtx->cameraCtx.activeCameraPtrs[0], 4);
this->unk_168 = 0xAU;
}
} else {
func_8005A77C(globalCtx->cameraCtx.activeCameraPtrs[0], 0x3A);
if (!func_8004356C(&this->dyna.actor)) {
if (this->unk_168 != 0) {
this->unk_168 -= 1;
}
}
if (this->unk_168 == 0) {
do {
} while (0);
func_8005A77C(globalCtx->cameraCtx.activeCameraPtrs[0], (s16)this->unk_1B8);
func_8005ACFC(globalCtx->cameraCtx.activeCameraPtrs[0], 4);
}
}
this->dyna.actor.posRot.pos.y = this->dyna.actor.initPosRot.pos.y -
(sinf((f32)this->unk_16A * (M_PI / 256.0f)) * 471.239990234375f); // pi * 150
if (this->unk_16A == 0) {
this->unk_16A = 0x200;
}
}
static void func_8086C9A8(BgBdanObjects* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->unk_168)) {
this->unk_16A = 0x64;
this->actionFunc = (ActorFunc)func_8086C9F0;
}
}
static void func_8086C9F0(BgBdanObjects* this, GlobalContext* globalCtx) {
if (this->unk_16A == 0) {
if (Math_ApproxF(&this->dyna.actor.posRot.pos.y, this->dyna.actor.initPosRot.pos.y, 0.5f)) {
Flags_UnsetSwitch(globalCtx, this->unk_168);
this->actionFunc = (ActorFunc)func_8086C9A8;
}
func_8002F948(this, 0x205E);
} else {
if (Math_ApproxF(&this->dyna.actor.posRot.pos.y, this->dyna.actor.initPosRot.pos.y + 75.0f, 0.5f)) {
this->actionFunc = (ActorFunc)func_8086CABC;
}
func_8002F948(this, 0x205E);
}
globalCtx->colCtx.stat.colHeader->waterBoxes[7].unk_02 = this->dyna.actor.posRot.pos.y;
}
static void func_8086CABC(BgBdanObjects* this, GlobalContext* globalCtx) {
if (this->unk_16A != 0) {
this->unk_16A -= 1;
}
func_8002F994(&this->dyna.actor, this->unk_16A);
if (this->unk_16A == 0) {
this->actionFunc = (ActorFunc)func_8086C9F0;
}
}
static void func_8086CB10(BgBdanObjects* this, GlobalContext* globalCtx) {
if (func_8004356C(&this->dyna.actor)) {
Flags_SetSwitch(globalCtx, this->unk_168);
this->unk_16A = 0x32;
this->actionFunc = (ActorFunc)func_8086CB8C;
this->dyna.actor.initPosRot.pos.y -= 200.0f;
func_800800F8(globalCtx, 0xC1C, 0x33, &this->dyna.actor, 0);
}
}
static void func_8086CB8C(BgBdanObjects* this, GlobalContext* globalCtx) {
if (this->unk_16A != 0) {
this->unk_16A -= 1;
}
this->dyna.actor.posRot.pos.y = this->dyna.actor.initPosRot.pos.y - (cosf(this->unk_16A * (M_PI / 50.0f)) * 200.0f);
if (this->unk_16A == 0) {
Audio_PlayActorSound2(this, NA_SE_EV_BUYOSTAND_STOP_U);
this->actionFunc = (ActorFunc)func_8086C868;
func_800C078C(globalCtx, 0, -1);
} else {
func_8002F974(&this->dyna.actor, 0x2090);
}
}
static void BgBdanObjects_Update(BgBdanObjects* this, GlobalContext* globalCtx) {
Actor_SetHeight(&this->dyna.actor, 50.0f);
this->actionFunc(this, globalCtx);
}
static void BgBdanObjects_Draw(BgBdanObjects* this, GlobalContext* globalCtx) {
if (this->dyna.actor.params == 0) {
if (this->actionFunc == (ActorFunc)func_8086C054) {
if (((this->dyna.actor.initPosRot.pos.y + -79.0f) - 5.0f) < this->dyna.actor.posRot.pos.y) {
Matrix_Translate(0.0f, -50.0f, 0.0f, MTXMODE_APPLY);
}
}
}
if (this->dyna.actor.params == 2) {
Gfx_DrawDListXlu(globalCtx, &D_060038E8);
} else {
Gfx_DrawDListOpa(globalCtx, D_8086CDA0[this->dyna.actor.params]);
}
}

View file

@ -5,8 +5,12 @@
#include <global.h>
typedef struct {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x70];
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ActorFunc actionFunc;
/* 0x0168 */ u8 unk_168;
/* 0x016A */ s16 unk_16A;
/* 0x016C */ ColliderCylinderMain collider;
/* 0x01B8 */ s32 unk_1B8;
} BgBdanObjects; // size = 0x01BC
extern const ActorInit Bg_Bdan_Objects_InitVars;