Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "z_bg_kin2_bombwall.h"
- #define FLAGS 0x10000010
- #define THIS ((BgKin2Bombwall*)thisx)
- void BgKin2Bombwall_Init(Actor* thisx, GlobalContext* globalCtx);
- void BgKin2Bombwall_Destroy(Actor* thisx, GlobalContext* globalCtx);
- void BgKin2Bombwall_Update(Actor* thisx, GlobalContext* globalCtx);
- void BgKin2Bombwall_Draw(Actor* thisx, GlobalContext* globalCtx);
- void func_80B6E4B8(BgKin2Bombwall* this);
- void func_80B6E4CC(BgKin2Bombwall* this, GlobalContext* globalCtx);
- void func_80B6E544(BgKin2Bombwall* this);
- void func_80B6E558(BgKin2Bombwall* this, GlobalContext* globalCtx);
- void func_80B6E5F8(BgKin2Bombwall* this);
- void func_80B6E614(BgKin2Bombwall* this, GlobalContext* globalCtx);
- /*
- const ActorInit Bg_Kin2_Bombwall_InitVars = {
- ACTOR_BG_KIN2_BOMBWALL,
- ACTORCAT_BG,
- FLAGS,
- OBJECT_KIN2_OBJ,
- sizeof(BgKin2Bombwall),
- (ActorFunc)BgKin2Bombwall_Init,
- (ActorFunc)BgKin2Bombwall_Destroy,
- (ActorFunc)BgKin2Bombwall_Update,
- (ActorFunc)BgKin2Bombwall_Draw
- };
- */
- extern InitChainEntry D_80B6E748;
- extern BgMeshHeader D_06000490;
- extern ColliderCylinderInit D_80B6E6F0;
- extern Gfx D_060002C0[];
- extern Gfx D_06000360[];
- s32 func_80B6E020(BgKin2Bombwall* this, GlobalContext* globalCtx) {
- Actor* other;
- if (this->collider.base.acFlags & 2) {
- other = this->collider.base.ac;
- if (other != NULL && Math3D_DistanceSquared(&this->dyna.actor.world.pos, &other->world.pos) < SQ(80.0f)) {
- return 1;
- }
- }
- return 0;
- }
- #pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Bg_Kin2_Bombwall_0x80B6E020/func_80B6E090.asm")
- /*void func_80B6E090(BgKin2Bombwall* this, GlobalContext* globalCtx) {
- Vec3f spF0;
- ? spE4;
- Vec3f spD8;
- Vec3f spCC;
- s32 i;
- f32* temp_s5;
- f32 temp_f30;
- s32 temp_a0;
- s32 temp_s2;
- s32 temp_s3;
- void* temp_s4;
- s32 phi_v0;
- void* phi_s4;
- s32 phi_s3;
- s32 phi_s0;
- s32 phi_s1;
- s32 phi_s0_2;
- Matrix_RotateY(this->dyna.actor.shape.rot.y, 0);
- temp_f30 = D_80B6E760;
- temp_s5 = &spF0;
- for (i = 0; i < 6; i++) {
- phi_s4 = &D_80B6E730;
- for (j = 0; j < D_80B6E735; j++) {
- temp_s3 = (phi_s3 + 1) & 7;
- spD8.x = ((Rand_Next() >> 0x1C) + *phi_s4);
- spD8.y = ((Rand_ZeroOne() - 0.5f) * 15.0f) + (i * 15.0f);
- spD8.z = (Rand_ZeroOne() * 20.0f) - 10.0f;
- spCC.x = (2.0f * (Rand_ZeroOne() - 0.5f)) + (spD8.x * temp_f30);
- spCC.y = (Rand_ZeroOne() * 7.0f) + 4.0f;
- spCC.z = spD8.z * D_80B6E764;
- SysMatrix_MultiplyVector3fByState(&spD8, temp_s5);
- SysMatrix_MultiplyVector3fByState(&spCC, &spE4);
- spF0.x += this->dyna.actor.world.pos.x;
- spF0.y += this->dyna.actor.world.pos.y;
- spF0.z += this->dyna.actor.world.pos.z;
- if ((Rand_Next() & 3) == 0) {
- phi_s0_2 = 0x20;
- } else {
- phi_s0_2 = 0x40;
- }
- if ((temp_s3 < 2) || (phi_s0 = phi_s0_2, phi_s1 = 0, (Rand_Next() > 0))) {
- temp_s2 = Rand_Next();
- func_800B0E48(globalCtx, temp_s5, &D_801D15B0, &D_80B6E724, &D_80B6E71C, &D_80B6E720,
- (temp_s2 >> 0x1B) + 0x46, (Rand_Next() >> 0x1A) + 0x3C);
- phi_s0 = phi_s0_2 | 1;
- phi_s1 = 1;
- }
- EffectSsKakera_Spawn(globalCtx, temp_s5, &spE4, temp_s5, -0x226, phi_s0, 0x1E, 0, 0, (?32) *(&D_80B6E738 + (temp_s3 * 2)), phi_s1, 0, 0x32, -1, 0x1F5, 0x6000128);
- }
- }
- }*/
- void BgKin2Bombwall_Init(Actor* thisx, GlobalContext* globalCtx) {
- BgKin2Bombwall* this = ((BgKin2Bombwall*)thisx);
- s32 pad;
- Actor_ProcessInitChain(&this->dyna.actor, &D_80B6E748);
- BcCheck3_BgActorInit(&this->dyna, 0);
- Collider_InitCylinder(globalCtx, &this->collider);
- if (Actor_GetSwitchFlag(globalCtx, this->dyna.actor.params & 0x7F)) {
- Actor_MarkForDeath(&this->dyna.actor);
- return;
- }
- BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06000490);
- Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &D_80B6E6F0);
- Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
- Actor_SetHeight(&this->dyna.actor, 60.0f);
- func_80B6E4B8(this);
- }
- void BgKin2Bombwall_Destroy(Actor* thisx, GlobalContext* globalCtx) {
- BgKin2Bombwall* this = ((BgKin2Bombwall*)thisx);
- BgCheck_RemoveActorMesh(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
- Collider_DestroyCylinder(globalCtx, &this->collider);
- }
- void func_80B6E4B8(BgKin2Bombwall* this) {
- this->actionFunc = func_80B6E4CC;
- }
- void func_80B6E4CC(BgKin2Bombwall* this, GlobalContext* globalCtx) {
- if (func_80B6E020(this, globalCtx)) {
- this->collider.base.acFlags &= 0xFFFD;
- ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
- func_80B6E544(this);
- return;
- }
- CollisionCheck_SetAC(globalCtx, &globalCtx->colCheckCtx, &this->collider);
- }
- void func_80B6E544(BgKin2Bombwall* this) {
- this->actionFunc = func_80B6E558;
- }
- void func_80B6E558(BgKin2Bombwall* this, GlobalContext* globalCtx) {
- if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
- ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
- Actor_SetSwitchFlag(globalCtx, this->dyna.actor.params & 0x7F);
- func_800F0568(globalCtx, &this->dyna.actor.world.pos, 60, 0x2810);
- func_800C62BC(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
- this->dyna.actor.draw = NULL;
- func_80B6E090(this, globalCtx);
- func_80B6E5F8(this);
- return;
- }
- ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
- }
- void func_80B6E5F8(BgKin2Bombwall* this) {
- this->unk1AC = 0x28;
- this->actionFunc = func_80B6E614;
- }
- void func_80B6E614(BgKin2Bombwall* this, GlobalContext* globalCtx) {
- this->unk1AC -= 1;
- if (this->unk1AC <= 0) {
- ActorCutscene_Stop(this->dyna.actor.cutscene);
- Actor_MarkForDeath(&this->dyna.actor);
- }
- }
- void BgKin2Bombwall_Update(Actor* thisx, GlobalContext* globalCtx) {
- BgKin2Bombwall* this = ((BgKin2Bombwall*)thisx);
- this->actionFunc(this, globalCtx);
- }
- void BgKin2Bombwall_Draw(Actor* thisx, GlobalContext* globalCtx) {
- func_800BDFC0(globalCtx, D_06000360);
- func_800BE03C(globalCtx, D_060002C0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement