En_Bbfall (Red Bubble) OK and documented (#780)

* EnBbfall_Init OK

* EnBbfall_Destroy, func_808BF5E0, and func_808BF734 OK

* func_808BF578 and func_808BF7A0 OK

* func_808BF4B4, func_808BF830, and func_808BF894 OK

* func_808BF438, func_808BF514, func_808BF8DC OK

* func_808BFA18 and func_808BFA3C OK

* EnBbfall_Draw OK, thanks Tharo, Anon, and Maide!

* LimbDraw functions OK

* All functions OK, thanks Anon for the loop in Update!

* Migrate data to C

* Use generated reloc and object symbols

* Port over a ton of documentation from EnBb

* Use ARRAY_COUNT for all loops

* Do a ton more documentation

* Name unused animation in object_bb

* Copy "floorType" variable name from OoT

* Use enum values for collider type

* Respond to reviews

* Add comment explaining EnBbfall_IsTouchingLava
This commit is contained in:
Tom Overton
2022-04-22 02:04:37 +01:00
committed by GitHub
parent c7753f43b0
commit 232b901ccf
7 changed files with 736 additions and 134 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<File Name="object_bb" Segment="6">
<!-- Bubble Animations -->
<Animation Name="gBubbleAttackAnim" Offset="0x184" /> <!-- Original name is "bb_atack" -->
<Animation Name="object_bb_Anim_0002AC" Offset="0x2AC" /> <!-- Original name might be "bb_damage". Maybe unused? -->
<Animation Name="gBubblePainAnim" Offset="0x2AC" /> <!-- Original name might be "bb_damage". Unused. -->
<Animation Name="gBubbleFlyingAnim" Offset="0x444" /> <!-- Original name is "bb_fly" -->
<!-- Bubble Limb DisplayLimbs -->
+1 -2
View File
@@ -1057,8 +1057,7 @@ beginseg
name "ovl_En_Bbfall"
compress
include "build/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.o"
include "build/data/ovl_En_Bbfall/ovl_En_Bbfall.data.o"
include "build/data/ovl_En_Bbfall/ovl_En_Bbfall.reloc.o"
include "build/src/overlays/actors/ovl_En_Bbfall/ovl_En_Bbfall_reloc.o"
endseg
beginseg
+1 -1
View File
@@ -521,7 +521,7 @@ void EnBb_UpdateDamage(EnBb* this, GlobalContext* globalCtx) {
this->collider.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
this->collider.base.atFlags &= ~AT_ON;
if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
(!(this->collider.info.acHitInfo->toucher.dmgFlags & 0xDB0B3))) {
!(this->collider.info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
Actor_SetDropFlag(&this->actor, &this->collider.info);
this->flameScaleY = 0.0f;
this->flameScaleX = 0.0f;
File diff suppressed because it is too large Load Diff
@@ -2,16 +2,35 @@
#define Z_EN_BBFALL_H
#include "global.h"
#include "objects/object_bb/object_bb.h"
struct EnBbfall;
typedef void (*EnBbfallActionFunc)(struct EnBbfall*, GlobalContext*);
typedef struct EnBbfall {
/* 0x0000 */ Actor actor;
/* 0x0144 */ char unk_144[0x104];
/* 0x0248 */ EnBbfallActionFunc actionFunc;
/* 0x024C */ char unk_24C[0x218];
/* 0x000 */ Actor actor;
/* 0x144 */ SkelAnime skelAnime;
/* 0x188 */ Vec3s jointTable[BUBBLE_LIMB_MAX];
/* 0x1E8 */ Vec3s morphTable[BUBBLE_LIMB_MAX];
/* 0x248 */ EnBbfallActionFunc actionFunc;
/* 0x24C */ u8 flameOpacity;
/* 0x24D */ u8 isBgCheckCollisionEnabled;
/* 0x24E */ s8 bodyPartDrawStatus;
/* 0x24F */ u8 drawDmgEffType;
/* 0x250 */ s16 timer;
/* 0x254 */ f32 flameScaleY;
/* 0x258 */ f32 flameScaleX;
/* 0x25C */ f32 drawDmgEffAlpha;
/* 0x260 */ f32 drawDmgEffScale;
/* 0x264 */ f32 drawDmgEffFrozenSteamScale;
/* 0x268 */ Vec3f flamePos[6];
/* 0x2B0 */ Vec3f bodyPartsPos[5];
/* 0x2EC */ Vec3f bodyPartsVelocity[5];
/* 0x328 */ Gfx* limbDList;
/* 0x32C */ UNK_TYPE1 unk_32C[0x58];
/* 0x384 */ ColliderJntSph collider;
/* 0x3A4 */ ColliderJntSphElement colliderElements[3];
} EnBbfall; // size = 0x464
extern const ActorInit En_Bbfall_InitVars;
+26 -26
View File
@@ -6071,33 +6071,33 @@
0x808BEE38:("EnDekunuts_Draw",),
0x808BF220:("EnBbfall_Init",),
0x808BF318:("EnBbfall_Destroy",),
0x808BF344:("func_808BF344",),
0x808BF3B8:("func_808BF3B8",),
0x808BF438:("func_808BF438",),
0x808BF4B4:("func_808BF4B4",),
0x808BF514:("func_808BF514",),
0x808BF578:("func_808BF578",),
0x808BF5AC:("func_808BF5AC",),
0x808BF5E0:("func_808BF5E0",),
0x808BF734:("func_808BF734",),
0x808BF7A0:("func_808BF7A0",),
0x808BF830:("func_808BF830",),
0x808BF894:("func_808BF894",),
0x808BF8DC:("func_808BF8DC",),
0x808BFA18:("func_808BFA18",),
0x808BFA3C:("func_808BFA3C",),
0x808BFAB4:("func_808BFAB4",),
0x808BFB4C:("func_808BFB4C",),
0x808BFCCC:("func_808BFCCC",),
0x808BFE58:("func_808BFE58",),
0x808BFF8C:("func_808BFF8C",),
0x808C00A0:("func_808C00A0",),
0x808C013C:("func_808C013C",),
0x808C0178:("func_808C0178",),
0x808C01E0:("func_808C01E0",),
0x808BF344:("EnBbfall_Freeze",),
0x808BF3B8:("EnBbfall_Thaw",),
0x808BF438:("EnBbfall_IsTouchingLava",),
0x808BF4B4:("EnBbfall_PlaySfx",),
0x808BF514:("EnBbfall_CheckForWall",),
0x808BF578:("EnBbfall_EnableColliders",),
0x808BF5AC:("EnBbfall_DisableColliders",),
0x808BF5E0:("EnBbfall_SetupWaitForPlayer",),
0x808BF734:("EnBbfall_WaitForPlayer",),
0x808BF7A0:("EnBbfall_SetupEmerge",),
0x808BF830:("EnBbfall_Emerge",),
0x808BF894:("EnBbfall_SetupFly",),
0x808BF8DC:("EnBbfall_Fly",),
0x808BFA18:("EnBbfall_SetupSinkIntoLava",),
0x808BFA3C:("EnBbfall_SinkIntoLava",),
0x808BFAB4:("EnBbfall_SetupDown",),
0x808BFB4C:("EnBbfall_Down",),
0x808BFCCC:("EnBbfall_SetupDead",),
0x808BFE58:("EnBbfall_Dead",),
0x808BFF8C:("EnBbfall_SetupDamage",),
0x808C00A0:("EnBbfall_Damage",),
0x808C013C:("EnBbfall_SetupFrozen",),
0x808C0178:("EnBbfall_Frozen",),
0x808C01E0:("EnBbfall_UpdateDamage",),
0x808C03EC:("EnBbfall_Update",),
0x808C07D4:("func_808C07D4",),
0x808C080C:("func_808C080C",),
0x808C07D4:("EnBbfall_OverrideLimbDraw",),
0x808C080C:("EnBbfall_PostLimbDraw",),
0x808C0A04:("EnBbfall_Draw",),
0x808C1030:("ArmsHook_SetupAction",),
0x808C103C:("ArmsHook_Init",),
-6
View File
@@ -1016,12 +1016,6 @@ D_0600D530 = 0x0600D530;
D_060000A0 = 0x060000A0;
D_060000C8 = 0x060000C8;
// ovl_En_Bbfall
D_06000184 = 0x06000184;
D_06000444 = 0x06000444;
D_06001A30 = 0x06001A30;
// ovl_En_Bee
D_0600005C = 0x0600005C;