en_tag_obj OK (#84)

* en_tag_obj OK

* Changed collider formatting at m4's request

* Removed use of macro and changed name of collider to reflect that it is unused
This commit is contained in:
kyleburnette 2021-03-27 11:55:09 -07:00 committed by GitHub
parent 204790ea8b
commit a5c039f2ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 8 deletions

View File

@ -6422,9 +6422,9 @@ SECTIONS
ovl_En_Tag_Obj : AT(RomLocation)
{
build/src/overlays/actors/ovl_En_Tag_Obj/z_en_tag_obj.o(.text)
build/asm/overlays/ovl_En_Tag_Obj_data.o(.data)
build/src/overlays/actors/ovl_En_Tag_Obj/z_en_tag_obj.o(.data)
build/src/overlays/actors/ovl_En_Tag_Obj/z_en_tag_obj.o(.rodata)
build/asm/overlays/ovl_En_Tag_Obj_rodata.o(.rodata)
build/src/overlays/actors/ovl_En_Tag_Obj/z_en_tag_obj_overlay.o(.ovl)
}
SegmentEnd = .;
SegmentSize = SegmentEnd - SegmentStart;

View File

@ -8,7 +8,12 @@ void EnTagObj_Init(Actor* thisx, GlobalContext* globalCtx);
void EnTagObj_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnTagObj_Update(Actor* thisx, GlobalContext* globalCtx);
/*
static ColliderCylinderInit unusedColliderInit = {
{ COLTYPE_NONE, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_NONE, OC2_TYPE_2, COLSHAPE_CYLINDER, },
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_NONE, },
{ 20, 30, 0, { 0, 0, 0 } },
};
const ActorInit En_Tag_Obj_InitVars = {
ACTOR_EN_TAG_OBJ,
ACTORCAT_PROP,
@ -20,10 +25,22 @@ const ActorInit En_Tag_Obj_InitVars = {
(ActorFunc)EnTagObj_Update,
(ActorFunc)NULL
};
*/
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Tag_Obj_0x80B12870/EnTagObj_Init.asm")
void EnTagObj_Init(Actor* thisx, GlobalContext* globalCtx) {
EnTagObj* this = (EnTagObj*)thisx;
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Tag_Obj_0x80B12870/EnTagObj_Destroy.asm")
this->hasSpawnedSeahorse = 0;
}
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Tag_Obj_0x80B12870/EnTagObj_Update.asm")
void EnTagObj_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void EnTagObj_Update(Actor* thisx, GlobalContext* globalCtx) {
EnTagObj* this = (EnTagObj*)thisx;
if (!this->hasSpawnedSeahorse) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_OT, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, 0, 0, 0, 0);
this->hasSpawnedSeahorse = 1;
}
}

View File

@ -7,7 +7,8 @@ struct EnTagObj;
typedef struct EnTagObj {
/* 0x000 */ Actor actor;
/* 0x144 */ char unk_144[0x54];
/* 0x144 */ char unk_144[0x50];
/* 0x194 */ s32 hasSpawnedSeahorse;
} EnTagObj; // size = 0x198
extern const ActorInit En_Tag_Obj_InitVars;