mirror of
https://github.com/zeldaret/ss
synced 2026-08-16 13:16:42 -04:00
insect tag progress
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "common.h"
|
||||
#include "d/d_base.h"
|
||||
#include "d/snd/d_snd_source_if.h"
|
||||
#include "f/f_profile_name.h"
|
||||
#include "m/m_allocator.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "m/m_vec.h"
|
||||
@@ -180,6 +181,9 @@ public:
|
||||
bool checkBeyondRadius(const mVec3_c &point, f32 radius) {
|
||||
return getSquareDistanceTo(point) > radius;
|
||||
}
|
||||
bool checkInRadius(const mVec3_c &point, f32 radius) {
|
||||
return getSquareDistanceTo(point) < radius;
|
||||
}
|
||||
|
||||
u32 getRoomId() {
|
||||
return mRoomID;
|
||||
@@ -195,6 +199,10 @@ public:
|
||||
return mActorProperties & property;
|
||||
}
|
||||
|
||||
dAcBase_c* searchNextActor(dAcBase_c* parent) {
|
||||
return static_cast<dAcBase_c*>(fManager_c::searchBaseByGroupType(dAcBase_c::ACTOR, parent));
|
||||
}
|
||||
|
||||
public:
|
||||
static void setTempCreateParams(
|
||||
mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, s32 roomId, u32 params2, dAcBase_c *parent, u8 subtype, u16 unkFlag,
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
#include "s/s_State.hpp"
|
||||
#include "s/s_StateMgr.hpp"
|
||||
#include "d/a/d_a_insect.h"
|
||||
|
||||
class dAcInsectButterfly_c : public dAcObjBase_c {
|
||||
class dAcInsectButterfly_c : public dAcOInsect_c {
|
||||
public:
|
||||
dAcInsectButterfly_c() : mStateMgr(*this, sStateID::null) {}
|
||||
virtual ~dAcInsectButterfly_c() {}
|
||||
@@ -16,8 +17,14 @@ public:
|
||||
STATE_FUNC_DECLARE(dAcInsectButterfly_c, Finalize);
|
||||
STATE_FUNC_DECLARE(dAcInsectButterfly_c, Dead);
|
||||
|
||||
void setKillSignal() {
|
||||
killSignal = 1;
|
||||
}
|
||||
private:
|
||||
/* 0x??? */ STATE_MGR_DECLARE(dAcInsectButterfly_c);
|
||||
/* 0x468 */ u8 field_0x468[0xA34-0x468];
|
||||
/* 0xA34 */ STATE_MGR_DECLARE(dAcInsectButterfly_c);
|
||||
/* 0xA70 */ u8 field_0xA70[0xAC6-0xA70];
|
||||
/* 0xAC6 */ u8 killSignal;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,8 +14,13 @@ public:
|
||||
STATE_FUNC_DECLARE(dAcOsoil_c, Hole);
|
||||
STATE_FUNC_DECLARE(dAcOsoil_c, Ready);
|
||||
|
||||
bool isStateHole() {
|
||||
return mStateMgr.isState(StateID_Hole);
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x??? */ STATE_MGR_DECLARE(dAcOsoil_c);
|
||||
/* 0x330 */ u8 field_0x330[0x6CC-0x330];
|
||||
/* 0x6CC */ STATE_MGR_DECLARE(dAcOsoil_c);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define D_A_OBJ_WARP_H
|
||||
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
#include "d/flag/storyflag_manager.h"
|
||||
#include "s/s_State.hpp"
|
||||
#include "s/s_StateMgr.hpp"
|
||||
|
||||
@@ -18,7 +19,54 @@ public:
|
||||
STATE_FUNC_DECLARE(dAcOWarp_c, GateIn);
|
||||
STATE_FUNC_DECLARE(dAcOWarp_c, GateClear);
|
||||
|
||||
virtual void fn_0x80();
|
||||
virtual void fn_0x84();
|
||||
virtual void fn_0x88();
|
||||
virtual s32 checkStateGateOpen();
|
||||
virtual s32 fn_0x90();
|
||||
virtual s32 checkThisHasSongItem();
|
||||
|
||||
bool isFaronTrial() const {
|
||||
return mTrialIndexBitmask & 0x10;
|
||||
}
|
||||
|
||||
bool isEldinTrial() const {
|
||||
return mTrialIndexBitmask & 0x40;
|
||||
}
|
||||
|
||||
bool isLanayruTrial() const {
|
||||
return mTrialIndexBitmask & 0x20;
|
||||
}
|
||||
|
||||
bool isHyliaTrial() const {
|
||||
return mTrialIndexBitmask & 0x80;
|
||||
}
|
||||
|
||||
bool isFaronTrialAndCompleted() const {
|
||||
return isFaronTrial() && StoryflagManager::sInstance->getFlag(STORYFLAG_FARON_TRIAL_COMPLETE);
|
||||
}
|
||||
|
||||
bool isEdlinTrialAndCompleted() const {
|
||||
return isEldinTrial() && StoryflagManager::sInstance->getFlag(STORYFLAG_ELDIN_TRIAL_COMPLETE);
|
||||
}
|
||||
|
||||
bool isLanayruTrialAndCompleted() const {
|
||||
return isLanayruTrial() && StoryflagManager::sInstance->getFlag(STORYFLAG_LANAYRU_TRIAL_COMPLETE);
|
||||
}
|
||||
|
||||
bool isHyliaTrialAndCompleted() const {
|
||||
return isHyliaTrial() && StoryflagManager::sInstance->getFlag(STORYFLAG_HYLIA_TRIAL_COMPLETE);
|
||||
}
|
||||
|
||||
bool isTrialComplete() const {
|
||||
return isFaronTrialAndCompleted()
|
||||
|| isEdlinTrialAndCompleted()
|
||||
|| isLanayruTrialAndCompleted()
|
||||
|| isHyliaTrialAndCompleted();
|
||||
}
|
||||
private:
|
||||
/* 0x330 */ u8 field_0x330[0xC66-0x330];
|
||||
/* 0xC66 */ u8 mTrialIndexBitmask;
|
||||
/* 0x??? */ STATE_MGR_DECLARE(dAcOWarp_c);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user