diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.h b/src/overlays/actors/ovl_En_Sw/z_en_sw.h index 8e10b59396..6922b8fa61 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.h +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.h @@ -53,12 +53,14 @@ typedef struct EnSw { // version of the macro used for the whole entity struct. #define ENSW_GET_TYPE_EN(this) PARAMS_GET_S(this->actor.params,13,3) -typedef enum { +#define EN_SW_PARAM_GOLD_SOIL 0x8000 +#define EN_SW_PARAM_GOLD_TREE 0xE000 + +typedef enum EnSwType{ SW_TYPE_NORMAL, // normal Skull(wall)tula SW_TYPE_GOLD_DEFAULT, // normal Gold Skulltula, found in dungeons SW_TYPE_GOLD_NIGHT, // nocturnal Gold Skulltula, found outside - SW_TYPE_GOLD_HIDDEN_SOIL, // found by using bugs on soil patches - SW_TYPE_GOLD_HIDDEN_TREE, // found by hitting trees and crates + SW_TYPE_GOLD_HIDDEN_SOIL, // found by using bugs on soil patches and hitting crates + SW_TYPE_GOLD_HIDDEN_TREE, // found by hitting trees } EnSwType; - #endif diff --git a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c index bb1acebc24..5ff967ca4c 100644 --- a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c +++ b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c @@ -20,6 +20,8 @@ #include "player.h" #include "skin_matrix.h" +#include "overlays/actors/ovl_En_Sw/z_en_sw.h" + #include "assets/objects/object_wood02/object_wood02.h" #define FLAGS 0 @@ -357,7 +359,7 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) { } else { if (this->actor.home.rot.z != 0) { this->actor.home.rot.z &= 0x1FFF; - this->actor.home.rot.z |= 0xE000; + this->actor.home.rot.z |= EN_SW_PARAM_GOLD_TREE; Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SW, dropsSpawnPt.x, dropsSpawnPt.y, dropsSpawnPt.z, 0, this->actor.world.rot.y, 0, this->actor.home.rot.z); this->actor.home.rot.z = 0; diff --git a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c index 08c20a9ff5..5555371edf 100644 --- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c +++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c @@ -17,6 +17,8 @@ #include "effect.h" #include "play_state.h" +#include "overlays/actors/ovl_En_Sw/z_en_sw.h" + #include "assets/objects/object_kibako2/object_kibako2.h" #define FLAGS 0 @@ -171,7 +173,7 @@ void ObjKibako2_Kill(ObjKibako2* this, PlayState* play) { if (PARAMS_GET_NOSHIFT(params, 15, 1) == 0) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SW, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, - this->dyna.actor.world.pos.z, 0, this->dyna.actor.shape.rot.y, 0, params | 0x8000); + this->dyna.actor.world.pos.z, 0, this->dyna.actor.shape.rot.y, 0, params | EN_SW_PARAM_GOLD_SOIL); } ObjKibako2_SpawnCollectible(this, play); Actor_Kill(&this->dyna.actor); diff --git a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c index ca902bce1b..3e6aeca830 100644 --- a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c +++ b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c @@ -12,6 +12,8 @@ #include "play_state.h" #include "player.h" +#include "overlays/actors/ovl_En_Sw/z_en_sw.h" + #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED void ObjMakekinsuta_Init(Actor* thisx, PlayState* play); @@ -52,7 +54,7 @@ void func_80B98320(ObjMakekinsuta* this, PlayState* play) { if (this->unk_152 != 0) { if (this->timer >= 60 && !func_8002DEEC(GET_PLAYER(play))) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SW, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, this->actor.shape.rot.y, 0, (this->actor.params | 0x8000)); + this->actor.world.pos.z, 0, this->actor.shape.rot.y, 0, (this->actor.params | EN_SW_PARAM_GOLD_SOIL)); this->actionFunc = ObjMakekinsuta_DoNothing; } else { this->timer++;