mirror of https://github.com/zeldaret/oot.git
`En_Sw`: add and apply params for soil, crate, and tree-based spiders
This commit is contained in:
parent
83e0bd3bd9
commit
bfe909d328
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue