mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
z_obj_tsubo OK (#784)
* 4 unattempts left * z_obj_tsubo OK * name some functions * implement suggestions * implement EllipticEllipsis changes * implement more suggestions
This commit is contained in:
+1
-1
@@ -450,7 +450,7 @@ Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s32 para
|
||||
void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3f* spawnPos, s16 params);
|
||||
s32 func_800A8150(s32 index);
|
||||
s32 func_800A817C(s32 index);
|
||||
s32 func_800A81A4(GlobalContext* globalCtx, s32 a1, s32 a2);
|
||||
s32 Item_CanDropBigFairy(GlobalContext* globalCtx, s32 index, s32 collectibleFlag);
|
||||
void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2);
|
||||
void EffectBlure_AddSpace(EffectBlure* this);
|
||||
void EffectBlure_Init1(void* thisx, void* initParamsx);
|
||||
|
||||
@@ -1369,8 +1369,7 @@ beginseg
|
||||
name "ovl_Obj_Tsubo"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.o"
|
||||
include "build/data/ovl_Obj_Tsubo/ovl_Obj_Tsubo.data.o"
|
||||
include "build/data/ovl_Obj_Tsubo/ovl_Obj_Tsubo.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Obj_Tsubo/ovl_Obj_Tsubo_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
||||
@@ -1185,6 +1185,6 @@ s32 func_800A817C(s32 index) {
|
||||
return D_801AE214[index];
|
||||
}
|
||||
|
||||
s32 func_800A81A4(GlobalContext* globalCtx, s32 a1, s32 a2) {
|
||||
return (func_800A8150(a1) == ITEM00_BIG_FAIRY) && (!Flags_GetCollectible(globalCtx, a2));
|
||||
s32 Item_CanDropBigFairy(GlobalContext* globalCtx, s32 index, s32 collectibleFlag) {
|
||||
return (func_800A8150(index) == ITEM00_BIG_FAIRY) && (!Flags_GetCollectible(globalCtx, collectibleFlag));
|
||||
}
|
||||
|
||||
@@ -487,7 +487,7 @@ void func_808D9894(EnSw* this, Vec3f* vec) {
|
||||
|
||||
s32 func_808D9968(EnSw* this, GlobalContext* globalCtx) {
|
||||
s32 ret = false;
|
||||
s32 param = ENSW_GET_3FC(&this->actor) & 0xFF;
|
||||
s32 param = ENSW_GET_3FC(&this->actor);
|
||||
|
||||
if (ENSW_GET_3(&this->actor)) {
|
||||
if ((param != 0x3F) && Flags_GetTreasure(globalCtx, param)) {
|
||||
|
||||
@@ -7,8 +7,10 @@ struct EnSw;
|
||||
|
||||
typedef void (*EnSwActionFunc)(struct EnSw*, GlobalContext*);
|
||||
|
||||
#define ENSW_GET_3(thisx) (((thisx)->params & 3) & 0xFF)
|
||||
#define ENSW_GET_3FC(thisx) (((thisx)->params & 0x3FC) >> 2)
|
||||
#define ENSW_GETS_3(params) ((params & 3) & 0xFF)
|
||||
#define ENSW_GET_3(thisx) (ENSW_GETS_3((thisx)->params))
|
||||
#define ENSW_GETS_3FC(params) (((params & 0x3FC) >> 2) & 0xFF)
|
||||
#define ENSW_GET_3FC(thisx) (ENSW_GETS_3FC((thisx)->params))
|
||||
#define ENSW_GET_FF00(thisx) ((((thisx)->params & 0xFF00) >> 8) & 0xFF)
|
||||
|
||||
typedef struct EnSw {
|
||||
|
||||
@@ -341,7 +341,7 @@ void ObjComb_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, &this->colliderElement);
|
||||
|
||||
if ((sp2C == 0) && func_800A81A4(globalCtx, OBJCOMB_GET_3F(&this->actor), OBJCOMB_GET_7F00(&this->actor))) {
|
||||
if ((sp2C == 0) && Item_CanDropBigFairy(globalCtx, OBJCOMB_GET_3F(&this->actor), OBJCOMB_GET_7F00(&this->actor))) {
|
||||
this->unk_1B7 = 1;
|
||||
this->actor.flags |= ACTOR_FLAG_10;
|
||||
}
|
||||
|
||||
@@ -158,8 +158,8 @@ void ObjKibako2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->dyna.actor.world.rot.x = 0;
|
||||
this->dyna.actor.shape.rot.x = 0;
|
||||
if (contents == CONTENTS_COLLECTIBLE) {
|
||||
if (func_800A81A4(globalCtx, KIBAKO2_COLLECTIBLE_ID(&this->dyna.actor),
|
||||
KIBAKO2_COLLECTIBLE_FLAG(&this->dyna.actor))) {
|
||||
if (Item_CanDropBigFairy(globalCtx, KIBAKO2_COLLECTIBLE_ID(&this->dyna.actor),
|
||||
KIBAKO2_COLLECTIBLE_FLAG(&this->dyna.actor))) {
|
||||
this->unk_1AC = 1;
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_10;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,12 +7,37 @@ struct ObjTsubo;
|
||||
|
||||
typedef void (*ObjTsuboActionFunc)(struct ObjTsubo*, GlobalContext*);
|
||||
|
||||
typedef void (*ObjTsuboUnkFunc)(struct ObjTsubo*, GlobalContext*);
|
||||
|
||||
#define OBJ_TSUBO_P000F(thisx) ((thisx)->params & 0x0F)
|
||||
#define OBJ_TSUBO_P001F(thisx) ((thisx)->params & 0x1F)
|
||||
#define OBJ_TSUBO_P003F(thisx) ((thisx)->params & 0x3F)
|
||||
#define OBJ_TSUBO_P0010(thisx) (((thisx)->params >> 4) & 1)
|
||||
#define OBJ_TSUBO_GET_TYPE(thisx) (((thisx)->params >> 7) & 3)
|
||||
#define OBJ_TSUBO_PFE00(thisx) (((thisx)->params >> 9) & 0x7F) //item collectable flag?
|
||||
#define OBJ_TSUBO_ZROT(thisx) ((thisx)->home.rot.z)
|
||||
|
||||
typedef struct ObjTsubo {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x0144 */ ObjTsuboActionFunc actionFunc;
|
||||
/* 0x0148 */ char unk_148[0x54];
|
||||
/* 0x0148 */ ColliderCylinder cylinderCollider;
|
||||
/* 0x0194 */ s8 unk_194;
|
||||
/* 0x0195 */ s8 unk_195;
|
||||
/* 0x0196 */ s8 homeRoom;
|
||||
/* 0x0197 */ s8 unk_197;
|
||||
/* 0x0198 */ s8 unk_198;
|
||||
/* 0x0199 */ s8 objBankIndex;
|
||||
/* 0x019A */ s8 unk_19A;
|
||||
/* 0x019B */ u8 unk_19B;
|
||||
} ObjTsubo; // size = 0x19C
|
||||
|
||||
extern const ActorInit Obj_Tsubo_InitVars;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ OBJ_TSUBO_TYPE_0,
|
||||
/* 1 */ OBJ_TSUBO_TYPE_1,
|
||||
/* 2 */ OBJ_TSUBO_TYPE_2,
|
||||
/* 3 */ OBJ_TSUBO_TYPE_3
|
||||
} ObjTsuboType;
|
||||
|
||||
#endif // Z_OBJ_TSUBO_H
|
||||
|
||||
+10
-10
@@ -510,7 +510,7 @@
|
||||
0x800A7D28:("Item_DropCollectibleRandom",),
|
||||
0x800A8150:("func_800A8150",),
|
||||
0x800A817C:("func_800A817C",),
|
||||
0x800A81A4:("func_800A81A4",),
|
||||
0x800A81A4:("Item_CanDropBigFairy",),
|
||||
0x800A81F0:("EffectBlure_AddVertex",),
|
||||
0x800A8514:("EffectBlure_AddSpace",),
|
||||
0x800A8558:("EffectBlure_InitElements",),
|
||||
@@ -7047,19 +7047,19 @@
|
||||
0x809275C0:("func_809275C0",),
|
||||
0x8092762C:("func_8092762C",),
|
||||
0x80927690:("func_80927690",),
|
||||
0x80927714:("func_80927714",),
|
||||
0x8092776C:("func_8092776C",),
|
||||
0x80927714:("ObjTsubo_SpawnEnMkk",),
|
||||
0x8092776C:("ObjTsubo_SpawnEnSw",),
|
||||
0x80927818:("func_80927818",),
|
||||
0x80927864:("func_80927864",),
|
||||
0x8092788C:("func_8092788C",),
|
||||
0x809278C0:("ObjTsubo_Init",),
|
||||
0x80927A4C:("ObjTsubo_Destroy",),
|
||||
0x80927A78:("func_80927A78",),
|
||||
0x80927D2C:("func_80927D2C",),
|
||||
0x80927FCC:("func_80927FCC",),
|
||||
0x809282F0:("func_809282F0",),
|
||||
0x8092860C:("func_8092860C",),
|
||||
0x80928904:("func_80928904",),
|
||||
0x80927A78:("func_PotBreak1",),
|
||||
0x80927D2C:("func_RacePotBreak1",),
|
||||
0x80927FCC:("func_PotBreak2",),
|
||||
0x809282F0:("func_RacePotBreak2",),
|
||||
0x8092860C:("func_PotBreak3",),
|
||||
0x80928904:("func_RacePotBreak3",),
|
||||
0x80928914:("func_80928914",),
|
||||
0x80928928:("func_80928928",),
|
||||
0x809289B4:("func_809289B4",),
|
||||
@@ -7071,7 +7071,7 @@
|
||||
0x809291DC:("func_809291DC",),
|
||||
0x8092926C:("func_8092926C",),
|
||||
0x8092932C:("ObjTsubo_Update",),
|
||||
0x809294B0:("func_809294B0",),
|
||||
0x809294B0:("ObjTsubo_Draw",),
|
||||
0x80929910:("EnIk_Init",),
|
||||
0x80929A98:("EnIk_Destroy",),
|
||||
0x80929AF8:("func_80929AF8",),
|
||||
|
||||
Reference in New Issue
Block a user