mirror of
https://github.com/zeldaret/ss
synced 2026-09-03 01:54:18 -04:00
Merge pull request #278 from elijah-thomas774/free-percent-lol
Some Easy Actors
This commit is contained in:
@@ -52,6 +52,14 @@ public:
|
||||
BOOL isLinked() const {
|
||||
return get() != nullptr;
|
||||
}
|
||||
|
||||
dAcRef_c<T> *getPrev() const {
|
||||
return static_cast<dAcRef_c<T> *>(cListNd_c::getPrev());
|
||||
}
|
||||
|
||||
dAcRef_c<T> *getNext() const {
|
||||
return static_cast<dAcRef_c<T> *>(cListNd_c::getNext());
|
||||
}
|
||||
};
|
||||
|
||||
// Ghidra: ActorBase
|
||||
|
||||
@@ -264,4 +264,6 @@ public:
|
||||
/* 0x14 */ u8 _14[0x2C - 0x14];
|
||||
};
|
||||
|
||||
typedef dAcRef_c<dAcObjBase_c> dAcObjRef_c;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef D_A_O_SPORE_H
|
||||
#define D_A_O_SPORE_H
|
||||
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
class dAcOSpore_c : public dAcObjBase_c {
|
||||
public:
|
||||
dAcOSpore_c() {}
|
||||
virtual ~dAcOSpore_c() {}
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -59,6 +59,8 @@ public:
|
||||
STATE_FUNC_DECLARE(dAcOTumbleWeed_c, Wait);
|
||||
STATE_FUNC_DECLARE(dAcOTumbleWeed_c, Slope);
|
||||
|
||||
STATE_MGR_DEFINE_UTIL_EXECUTESTATE(dTgTumbleWeed_c);
|
||||
|
||||
private:
|
||||
/* 0x330 */ nw4r::g3d::ResFile mResFile;
|
||||
/* 0x334 */ m3d::smdl_c mMdl;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "d/d_base.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "m/m_vec.h"
|
||||
|
||||
extern "C" bool fn_80081FE0(void *, const char *);
|
||||
@@ -28,6 +29,10 @@ public:
|
||||
const mVec3_c &getField_0x78() const {
|
||||
return field_0x78;
|
||||
}
|
||||
f32 getField_0x2A8() const {
|
||||
return field_0x2A8;
|
||||
}
|
||||
mAng getYRot() const;
|
||||
|
||||
bool doFn_800918E0(s32 a1, s16 a2) {
|
||||
return fn_800918E0(field_0xDA0, a1, a2);
|
||||
@@ -64,7 +69,9 @@ private:
|
||||
/* 0x068 */ u8 _0x068[0x6C - 0x068];
|
||||
/* 0x06C */ mVec3_c mPositionMaybe;
|
||||
/* 0x078 */ mVec3_c field_0x78;
|
||||
/* 0x084 */ u8 _0x084[0xD98 - 0x084];
|
||||
/* 0x084 */ u8 _0x084[0x2A8 - 0x084];
|
||||
/* 0x2A8 */ f32 field_0x2A8;
|
||||
/* 0x2AC */ u8 _0x2AC[0xD98 - 0x2AC];
|
||||
/* 0xD98 */ void *field_0xD98;
|
||||
/* 0xD9C */ u8 _0xD9C[0xDA0 - 0xD9C];
|
||||
/* 0xDA0 */ void *field_0xDA0;
|
||||
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
sReloaderType = type;
|
||||
}
|
||||
|
||||
static dCamera_c *getCamera(s32 idx);
|
||||
static dCamera_c *getCamera(s32 idx = 0);
|
||||
static void setCamera(s32 idx, dCamera_c *);
|
||||
|
||||
bool isFaderSettled() const {
|
||||
|
||||
@@ -2688,32 +2688,32 @@ enum StoryFlags_e {
|
||||
/** [(not implemented yet -- 6D05)]
|
||||
* Story Flag #533 (0x0215) - JP from 805ACE33 0x01 to 805ACE33 0x20 / US from 805A9BB3 0x01 to 805A9BB3 0x20
|
||||
*/
|
||||
STORYFLAG_533,
|
||||
STORYFLAG_BOSSRUSH_CURRENT_MIN,
|
||||
|
||||
/** [(not implemented yet -- 7205)]
|
||||
* Story Flag #534 (0x0216) - JP from 805ACE3D 0x01 to 805ACE3D 0x20 / US from 805A9BBD 0x01 to 805A9BBD 0x20
|
||||
*/
|
||||
STORYFLAG_534,
|
||||
STORYFLAG_BOSSRUSH_CURRENT_SEC,
|
||||
|
||||
/** [(not implemented yet -- 7266)]
|
||||
* Story Flag #535 (0x0217) - JP from 805ACE3D 0x40 to 805ACE3C 0x10 / US from 805A9BBD 0x40 to 805A9BBC 0x10
|
||||
*/
|
||||
STORYFLAG_535,
|
||||
STORYFLAG_BOSSRUSH_CURRENT_MS,
|
||||
|
||||
/** [(not implemented yet -- 6D65)]
|
||||
* Story Flag #536 (0x0218) - JP from 805ACE33 0x40 to 805ACE32 0x08 / US from 805A9BB3 0x40 to 805A9BB2 0x08
|
||||
*/
|
||||
STORYFLAG_536,
|
||||
STORYFLAG_GHIRAHIM1_TIME_MIN,
|
||||
|
||||
/** [(not implemented yet -- 7145)]
|
||||
* Story Flag #537 (0x0219) - JP from 805ACE3B 0x10 to 805ACE3A 0x02 / US from 805A9BBB 0x10 to 805A9BBA 0x02
|
||||
*/
|
||||
STORYFLAG_537,
|
||||
STORYFLAG_GHIRAHIM1_TIME_SEC,
|
||||
|
||||
/** [(not implemented yet -- 7006)]
|
||||
* Story Flag #538 (0x021A) - JP from 805ACE39 0x01 to 805ACE39 0x40 / US from 805A9BB9 0x01 to 805A9BB9 0x40
|
||||
*/
|
||||
STORYFLAG_538,
|
||||
STORYFLAG_GHIRAHIM1_TIME_MS,
|
||||
|
||||
/** [(not implemented yet -- 71A5)]
|
||||
* Story Flag #539 (0x021B) - JP from 805ACE3A 0x04 to 805ACE3A 0x80 / US from 805A9BBA 0x04 to 805A9BBA 0x80
|
||||
@@ -2883,7 +2883,7 @@ enum StoryFlags_e {
|
||||
/** [In Boss Rush mode (can be unset)]
|
||||
* Story Flag #572 (0x023C) - JP 805ACD98 0x08 / US 805A9B18 0x08
|
||||
*/
|
||||
STORYFLAG_572,
|
||||
STORYFLAG_BOSSRUSH_ACTIVE,
|
||||
|
||||
/** [In redoing slient realm mode?]
|
||||
* Story Flag #573 (0x023D) - JP 805ACD98 0x10 / US 805A9B18 0x10
|
||||
@@ -2988,167 +2988,167 @@ enum StoryFlags_e {
|
||||
/** [(not implemented yet -- 6875)]
|
||||
* Story Flag #593 (0x0251) - JP from 805ACE29 0x80 to 805ACE28 0x10 / US from 805A9BA9 0x80 to 805A9BA8 0x10
|
||||
*/
|
||||
STORYFLAG_593,
|
||||
STORYFLAG_SCALDERA_TIME_MIN,
|
||||
|
||||
/** [(not implemented yet -- 6705)]
|
||||
* Story Flag #594 (0x0252) - JP from 805ACE27 0x01 to 805ACE27 0x20 / US from 805A9BA7 0x01 to 805A9BA7 0x20
|
||||
*/
|
||||
STORYFLAG_594,
|
||||
STORYFLAG_SCALDERA_TIME_SEC,
|
||||
|
||||
/** [(not implemented yet -- 6766)]
|
||||
* Story Flag #595 (0x0253) - JP from 805ACE27 0x40 to 805ACE26 0x10 / US from 805A9BA7 0x40 to 805A9BA6 0x10
|
||||
*/
|
||||
STORYFLAG_595,
|
||||
STORYFLAG_SCALDERA_TIME_MS,
|
||||
|
||||
/** [(not implemented yet -- 6605)]
|
||||
* Story Flag #596 (0x0254) - JP from 805ACE25 0x01 to 805ACE25 0x20 / US from 805A9BA5 0x01 to 805A9BA5 0x20
|
||||
*/
|
||||
STORYFLAG_596,
|
||||
STORYFLAG_MOLDERACH_TIME_MIN,
|
||||
|
||||
/** [(not implemented yet -- 6665)]
|
||||
* Story Flag #597 (0x0255) - JP from 805ACE25 0x40 to 805ACE24 0x08 / US from 805A9BA5 0x40 to 805A9BA4 0x08
|
||||
*/
|
||||
STORYFLAG_597,
|
||||
STORYFLAG_MOLDERACH_TIME_SEC,
|
||||
|
||||
/** [(not implemented yet -- 6506)]
|
||||
* Story Flag #598 (0x0256) - JP from 805ACE23 0x01 to 805ACE23 0x40 / US from 805A9BA3 0x01 to 805A9BA3 0x40
|
||||
*/
|
||||
STORYFLAG_598,
|
||||
STORYFLAG_MOLDERACH_TIME_MS,
|
||||
|
||||
/** [(not implemented yet -- 6575)]
|
||||
* Story Flag #599 (0x0257) - JP from 805ACE23 0x80 to 805ACE22 0x10 / US from 805A9BA3 0x80 to 805A9BA2 0x10
|
||||
*/
|
||||
STORYFLAG_599,
|
||||
STORYFLAG_IMP1_TIME_MIN,
|
||||
|
||||
/** [(not implemented yet -- 6405)]
|
||||
* Story Flag #600 (0x0258) - JP from 805ACE21 0x01 to 805ACE21 0x20 / US from 805A9BA1 0x01 to 805A9BA1 0x20
|
||||
*/
|
||||
STORYFLAG_600,
|
||||
STORYFLAG_IMP1_TIME_SEC,
|
||||
|
||||
/** [(not implemented yet -- 6466)]
|
||||
* Story Flag #601 (0x0259) - JP from 805ACE21 0x40 to 805ACE20 0x10 / US from 805A9BA1 0x40 to 805A9BA0 0x10
|
||||
*/
|
||||
STORYFLAG_601,
|
||||
STORYFLAG_IMP1_TIME_MS,
|
||||
|
||||
/** [(not implemented yet -- 6305)]
|
||||
* Story Flag #602 (0x025A) - JP from 805ACE1F 0x01 to 805ACE1F 0x20 / US from 805A9B9F 0x01 to 805A9B9F 0x20
|
||||
*/
|
||||
STORYFLAG_602,
|
||||
STORYFLAG_KOLOKTOS_TIME_MIN,
|
||||
|
||||
/** [(not implemented yet -- 6365)]
|
||||
* Story Flag #603 (0x025B) - JP from 805ACE1F 0x40 to 805ACE1E 0x08 / US from 805A9B9F 0x40 to 805A9B9E 0x08
|
||||
*/
|
||||
STORYFLAG_603,
|
||||
STORYFLAG_KOLOKTOS_TIME_SEC,
|
||||
|
||||
/** [(not implemented yet -- 6206)]
|
||||
* Story Flag #604 (0x025C) - JP from 805ACE1D 0x01 to 805ACE1D 0x40 / US from 805A9B9D 0x01 to 805A9B9D 0x40
|
||||
*/
|
||||
STORYFLAG_604,
|
||||
STORYFLAG_KOLOKTOS_TIME_MS,
|
||||
|
||||
/** [(not implemented yet -- 6275)]
|
||||
* Story Flag #605 (0x025D) - JP from 805ACE1D 0x80 to 805ACE1C 0x10 / US from 805A9B9D 0x80 to 805A9B9C 0x10
|
||||
*/
|
||||
STORYFLAG_605,
|
||||
STORYFLAG_TENTALUS_TIME_MIN,
|
||||
|
||||
/** [(not implemented yet -- 6105)]
|
||||
* Story Flag #606 (0x025E) - JP from 805ACE1B 0x01 to 805ACE1B 0x20 / US from 805A9B9B 0x01 to 805A9B9B 0x20
|
||||
*/
|
||||
STORYFLAG_606,
|
||||
STORYFLAG_TENTALUS_TIME_SEC,
|
||||
|
||||
/** [(not implemented yet -- 6166)]
|
||||
* Story Flag #607 (0x025F) - JP from 805ACE1B 0x40 to 805ACE1A 0x10 / US from 805A9B9B 0x40 to 805A9B9A 0x10
|
||||
*/
|
||||
STORYFLAG_607,
|
||||
STORYFLAG_TENTALUS_TIME_MS,
|
||||
|
||||
/** [(not implemented yet -- 6005)]
|
||||
* Story Flag #608 (0x0260) - JP from 805ACE19 0x01 to 805ACE19 0x20 / US from 805A9B99 0x01 to 805A9B99 0x20
|
||||
*/
|
||||
STORYFLAG_608,
|
||||
STORYFLAG_GHIRAHIM2_TIME_MIN,
|
||||
|
||||
/** [(not implemented yet -- 6065)]
|
||||
* Story Flag #609 (0x0261) - JP from 805ACE19 0x40 to 805ACE18 0x08 / US from 805A9B99 0x40 to 805A9B98 0x08
|
||||
*/
|
||||
STORYFLAG_609,
|
||||
STORYFLAG_GHIRAHIM2_TIME_SEC,
|
||||
|
||||
/** [(not implemented yet -- 5F06)]
|
||||
* Story Flag #610 (0x0262) - JP from 805ACE17 0x01 to 805ACE17 0x40 / US from 805A9B97 0x01 to 805A9B97 0x40
|
||||
*/
|
||||
STORYFLAG_610,
|
||||
STORYFLAG_GHIRAHIM2_TIME_MS,
|
||||
|
||||
/** [(not implemented yet -- 5F75)]
|
||||
* Story Flag #611 (0x0263) - JP from 805ACE17 0x80 to 805ACE16 0x10 / US from 805A9B97 0x80 to 805A9B96 0x10
|
||||
*/
|
||||
STORYFLAG_611,
|
||||
STORYFLAG_IMP2_TIME_MIN,
|
||||
|
||||
/** [(not implemented yet -- 5E05)]
|
||||
* Story Flag #612 (0x0264) - JP from 805ACE15 0x01 to 805ACE15 0x20 / US from 805A9B95 0x01 to 805A9B95 0x20
|
||||
*/
|
||||
STORYFLAG_612,
|
||||
STORYFLAG_IMP2_TIME_SEC,
|
||||
|
||||
/** [(not implemented yet -- 5E66)]
|
||||
* Story Flag #613 (0x0265) - JP from 805ACE15 0x40 to 805ACE14 0x10 / US from 805A9B95 0x40 to 805A9B94 0x10
|
||||
*/
|
||||
STORYFLAG_613,
|
||||
STORYFLAG_IMP2_TIME_MS,
|
||||
|
||||
/** [(not implemented yet -- 5D05)]
|
||||
* Story Flag #614 (0x0266) - JP from 805ACE13 0x01 to 805ACE13 0x20 / US from 805A9B93 0x01 to 805A9B93 0x20
|
||||
*/
|
||||
STORYFLAG_614,
|
||||
STORYFLAG_IMP3_TIME_MIN,
|
||||
|
||||
/** [(not implemented yet -- 5D65)]
|
||||
* Story Flag #615 (0x0267) - JP from 805ACE13 0x40 to 805ACE12 0x08 / US from 805A9B93 0x40 to 805A9B92 0x08
|
||||
*/
|
||||
STORYFLAG_615,
|
||||
STORYFLAG_IMP3_TIME_SEC,
|
||||
|
||||
/** [(not implemented yet -- 5C06)]
|
||||
* Story Flag #616 (0x0268) - JP from 805ACE11 0x01 to 805ACE11 0x40 / US from 805A9B91 0x01 to 805A9B91 0x40
|
||||
*/
|
||||
STORYFLAG_616,
|
||||
STORYFLAG_IMP3_TIME_MS,
|
||||
|
||||
/** [(not implemented yet -- 5C75)]
|
||||
* Story Flag #617 (0x0269) - JP from 805ACE11 0x80 to 805ACE10 0x10 / US from 805A9B91 0x80 to 805A9B90 0x10
|
||||
*/
|
||||
STORYFLAG_617,
|
||||
STORYFLAG_HORDE_TIME_MIN,
|
||||
|
||||
/** [(not implemented yet -- 5B05)]
|
||||
* Story Flag #618 (0x026A) - JP from 805ACE0F 0x01 to 805ACE0F 0x20 / US from 805A9B8F 0x01 to 805A9B8F 0x20
|
||||
*/
|
||||
STORYFLAG_618,
|
||||
STORYFLAG_HORDE_TIME_SEC,
|
||||
|
||||
/** [(not implemented yet -- 5B66)]
|
||||
* Story Flag #619 (0x026B) - JP from 805ACE0F 0x40 to 805ACE0E 0x10 / US from 805A9B8F 0x40 to 805A9B8E 0x10
|
||||
*/
|
||||
STORYFLAG_619,
|
||||
STORYFLAG_HORDE_TIME_MS,
|
||||
|
||||
/** [(not implemented yet -- 5A05)]
|
||||
* Story Flag #620 (0x026C) - JP from 805ACE0D 0x01 to 805ACE0D 0x20 / US from 805A9B8D 0x01 to 805A9B8D 0x20
|
||||
*/
|
||||
STORYFLAG_620,
|
||||
STORYFLAG_GHIRAHIM3_TIME_MIN,
|
||||
|
||||
/** [(not implemented yet -- 5A65)]
|
||||
* Story Flag #621 (0x026D) - JP from 805ACE0D 0x40 to 805ACE0C 0x08 / US from 805A9B8D 0x40 to 805A9B8C 0x08
|
||||
*/
|
||||
STORYFLAG_621,
|
||||
STORYFLAG_GHIRAHIM3_TIME_SEC,
|
||||
|
||||
/** [(not implemented yet -- 5906)]
|
||||
* Story Flag #622 (0x026E) - JP from 805ACE0B 0x01 to 805ACE0B 0x40 / US from 805A9B8B 0x01 to 805A9B8B 0x40
|
||||
*/
|
||||
STORYFLAG_622,
|
||||
STORYFLAG_GHIRAHIM3_TIME_MS,
|
||||
|
||||
/** [(not implemented yet -- 5975)]
|
||||
* Story Flag #623 (0x026F) - JP from 805ACE0B 0x80 to 805ACE0A 0x10 / US from 805A9B8B 0x80 to 805A9B8A 0x10
|
||||
*/
|
||||
STORYFLAG_623,
|
||||
STORYFLAG_DEMISE_TIME_MIN,
|
||||
|
||||
/** [(not implemented yet -- 5805)]
|
||||
* Story Flag #624 (0x0270) - JP from 805ACE09 0x01 to 805ACE09 0x20 / US from 805A9B89 0x01 to 805A9B89 0x20
|
||||
*/
|
||||
STORYFLAG_624,
|
||||
STORYFLAG_DEMISE_TIME_SEC,
|
||||
|
||||
/** [(not implemented yet -- 5866)]
|
||||
* Story Flag #625 (0x0271) - JP from 805ACE09 0x40 to 805ACE08 0x10 / US from 805A9B89 0x40 to 805A9B88 0x10
|
||||
*/
|
||||
STORYFLAG_625,
|
||||
STORYFLAG_DEMISE_TIME_MS,
|
||||
|
||||
/** [(not implemented yet -- 550D)]
|
||||
* Story Flag #626 (0x0272) - JP from 805ACE03 0x01 to 805ACE02 0x20 / US from 805A9B83 0x01 to 805A9B82 0x20
|
||||
@@ -3538,17 +3538,17 @@ enum StoryFlags_e {
|
||||
/** [Sets when you refight imp 1 (Sealed Grounds layer 2)]
|
||||
* Story Flag #703 (0x02BF) - JP 805ACDA2 0x08 / US 805A9B22 0x08
|
||||
*/
|
||||
STORYFLAG_703,
|
||||
STORYFLAG_IMPRISONED1_BOSSRUSH,
|
||||
|
||||
/** [Sets when you refight imp 2 (Sealed Grounds layer 3)]
|
||||
* Story Flag #704 (0x02C0) - JP 805ACDA2 0x10 / US 805A9B22 0x10
|
||||
*/
|
||||
STORYFLAG_704,
|
||||
STORYFLAG_IMPRISONED2_BOSSRUSH,
|
||||
|
||||
/** [Sets when you refight imp3 (Sealed Grounds layer 4)]
|
||||
* Story Flag #705 (0x02C1) - JP 805ACDA2 0x20 / US 805A9B22 0x20
|
||||
*/
|
||||
STORYFLAG_705,
|
||||
STORYFLAG_IMPRISONED3_BOSSRUSH,
|
||||
|
||||
/** [Minecart Escort done (Lanayru Gorge layer 2)]
|
||||
* Story Flag #706 (0x02C2) - JP 805ACDA2 0x40 / US 805A9B22 0x40
|
||||
@@ -3653,7 +3653,7 @@ enum StoryFlags_e {
|
||||
/** [[Gets Set in a refight](Hylia's Realm layer 4)]
|
||||
* Story Flag #726 (0x02D6) - JP 805ACDA4 0x40 / US 805A9B24 0x40
|
||||
*/
|
||||
STORYFLAG_726,
|
||||
STORYFLAG_DEMISE_BOSSRUSH,
|
||||
|
||||
/** [Talking to Fi after filling Wallet]
|
||||
* Story Flag #727 (0x02D7) - JP 805ACDA4 0x80 / US 805A9B24 0x80
|
||||
|
||||
@@ -9,6 +9,20 @@ public:
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
/** Updates some window */
|
||||
void fn_80295940();
|
||||
/** ??? */
|
||||
void fn_80295980();
|
||||
/** Checks to see if in BAMBOO_CUTTING .. BOSS_RUSH and returns some boolean (start?) */
|
||||
bool fn_80295AB0();
|
||||
/** Checks to see if in BAMBOO_CUTTING .. BOSS_RUSH and returns some boolean (end?) */
|
||||
bool fn_80295AD0();
|
||||
|
||||
void setHighscore(s32 time);
|
||||
|
||||
/** GUESS: sets the start for the high score? */
|
||||
void fn_80295CB0(bool);
|
||||
|
||||
void timeRelatedExecute();
|
||||
void scoreRelatedExecute();
|
||||
|
||||
@@ -18,7 +32,15 @@ public:
|
||||
void timeRelated();
|
||||
void scoreRelated();
|
||||
|
||||
/** GUESS: Assumption based on function caller */
|
||||
void setComplete() {
|
||||
field_0x3866 = true;
|
||||
}
|
||||
|
||||
private:
|
||||
u8 _0x0000[0x3866 - 0x0000];
|
||||
bool field_0x3866;
|
||||
|
||||
static dLytMiniGame_c *sInstance;
|
||||
};
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_base.h"
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
#include "d/t/d_tg.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "s/s_State.hpp"
|
||||
@@ -29,9 +30,9 @@ public:
|
||||
|
||||
private:
|
||||
/* 0x0FC */ STATE_MGR_DECLARE(dTgBarrel_c);
|
||||
/* 0x138 */ dAcRef_c<dAcOstageSink_c> mStageRef;
|
||||
/* 0x138 */ dAcObjRef_c mStageRef;
|
||||
/* 0x144 */ dAcRef_c<dTgBarrelPos_c> mTgBarrelPosArr[10];
|
||||
/* 0x1BC */ dAcRef_c<dAcOBarrel_c> mBarrelArr[10];
|
||||
/* 0x1BC */ dAcObjRef_c mBarrelArr[10];
|
||||
/* 0x234 */ mVec3_c mSpawnPosition;
|
||||
/* 0x240 */ u8 mStopFlag; ///< Stop Sceneflag - Note there is no checking done to see if valid
|
||||
/* 0x241 */ u8 mSpawnInterval; ///< Barrel Spawn Interval in Seconds
|
||||
|
||||
+47
-4
@@ -1,19 +1,62 @@
|
||||
#ifndef D_T_SPORE_H
|
||||
#define D_T_SPORE_H
|
||||
|
||||
#include "d/a/d_a_base.h"
|
||||
#include "d/t/d_tg.h"
|
||||
#include "egg/egg_types.h"
|
||||
#include "m/m3d/m_proc.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "s/s_State.hpp"
|
||||
#include "s/s_StateMgr.hpp"
|
||||
|
||||
class dSporeTag_c : public dAcBase_c {
|
||||
class dSporeProc_c : public m3d::proc_c {
|
||||
public:
|
||||
dSporeProc_c() : mpTexture(nullptr), field_0x39EC(false), field_0x39ED(false), field_0x39EE(0), field_0x39F0(0) {}
|
||||
~dSporeProc_c() {};
|
||||
|
||||
virtual void drawXlu() override;
|
||||
|
||||
void execute();
|
||||
|
||||
private:
|
||||
/* 0x0018 */ mVec3_c mSporesPos[400];
|
||||
/* 0x12D8 */ f32 field_0x12D8[400];
|
||||
/* 0x1918 */ f32 field_0x1918[400];
|
||||
/* 0x1F58 */ f32 field_0x1F58[400];
|
||||
/* 0x2598 */ f32 field_0x2598[400];
|
||||
/* 0x2BD8 */ f32 field_0x2BD8[400];
|
||||
/* 0x3218 */ mAng field_0x3218[400];
|
||||
/* 0x3538 */ mAng field_0x3538[400];
|
||||
/* 0x3858 */ s8 field_0x3858[400];
|
||||
/* 0x39E8 */ EGG::ResTIMG *mpTexture;
|
||||
/* 0x39EC */ bool field_0x39EC;
|
||||
/* 0x39ED */ u8 field_0x39ED;
|
||||
/* 0x39EE */ s16 field_0x39EE;
|
||||
/* 0x39F0 */ u8 field_0x39F0;
|
||||
/* 0x39F1 */ u8 _0x39F1[0x3A02 - 0x39F1];
|
||||
/* 0x3A02 */ s16 field_0x3A02;
|
||||
/* 0x3A04 */ s16 field_0x3A04;
|
||||
/* 0x3A06 */ s16 field_0x3A06;
|
||||
|
||||
friend class dSporeTag_c;
|
||||
};
|
||||
|
||||
class dSporeTag_c : public dTg_c {
|
||||
public:
|
||||
dSporeTag_c() : mStateMgr(*this, sStateID::null) {}
|
||||
virtual ~dSporeTag_c() {}
|
||||
|
||||
virtual int create() override;
|
||||
virtual int doDelete() override;
|
||||
virtual int draw() override;
|
||||
virtual bool createHeap() override;
|
||||
virtual int actorExecute() override;
|
||||
virtual int actorExecuteInEvent() override;
|
||||
|
||||
STATE_FUNC_DECLARE(dSporeTag_c, Wait);
|
||||
|
||||
private:
|
||||
/* 0x??? */ STATE_MGR_DECLARE(dSporeTag_c);
|
||||
/* 0x0FC */ STATE_MGR_DECLARE(dSporeTag_c);
|
||||
/* 0x138 */ dSporeProc_c mProc;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,14 +1,36 @@
|
||||
#ifndef D_T_STREAM_H
|
||||
#define D_T_STREAM_H
|
||||
|
||||
#include "d/a/d_a_base.h"
|
||||
#include "d/t/d_tg.h"
|
||||
#include "f/f_list_mg.h"
|
||||
#include "f/f_list_nd.h"
|
||||
#include "m/m_mtx.h"
|
||||
|
||||
class dTgStream_c : public dAcBase_c {
|
||||
class dTgStream_c : public dTg_c {
|
||||
public:
|
||||
dTgStream_c() {}
|
||||
dTgStream_c() : mStreamNode(this) {}
|
||||
virtual ~dTgStream_c() {}
|
||||
|
||||
virtual int create() override;
|
||||
virtual int doDelete() override;
|
||||
virtual int actorExecute() override;
|
||||
|
||||
// The following lists are defined in the dol
|
||||
static fLiMgBa_c sStreamList;
|
||||
static fLiMgBa_c sSandStreamList;
|
||||
|
||||
void addToList(fLiMgBa_c &list);
|
||||
|
||||
private:
|
||||
/* 0x0FC */ u8 mSceneflag; ///< Sceneflag to indicate when to flow
|
||||
/* 0x0FD */ u8 mAreaIdx;
|
||||
/* 0x0FE */ u8 mSpeed;
|
||||
/* 0x0FF */ u8 mOrder;
|
||||
/* 0x100 */ u8 mIsSand;
|
||||
/* 0x101 */ u8 field_0x101;
|
||||
/* 0x104 */ mMtx_c mArea;
|
||||
|
||||
/* 0x134 */ fLiNdBa_c mStreamNode;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,17 +1,87 @@
|
||||
#ifndef D_T_SWORD_BATTLE_GAME_H
|
||||
#define D_T_SWORD_BATTLE_GAME_H
|
||||
|
||||
#include "d/a/d_a_base.h"
|
||||
#include "d/t/d_tg.h"
|
||||
#include "s/s_State.hpp"
|
||||
#include "s/s_StateMgr.hpp"
|
||||
#include "toBeSorted/actor_event.h"
|
||||
#include "toBeSorted/timekeeper.h"
|
||||
|
||||
class dTgSwordBattleGame_c : public dAcBase_c {
|
||||
class dTgSwordBattleGame_c : public dTg_c {
|
||||
public:
|
||||
dTgSwordBattleGame_c() : mStateMgr(*this, sStateID::null) {}
|
||||
dTgSwordBattleGame_c() : mStateMgr(*this, sStateID::null), mEventRelated(*this, 0) {}
|
||||
virtual ~dTgSwordBattleGame_c() {}
|
||||
|
||||
virtual int create() override;
|
||||
virtual int doDelete() override;
|
||||
virtual int draw() override;
|
||||
virtual int actorExecute() override;
|
||||
virtual int actorExecuteInEvent() override;
|
||||
|
||||
/* vt 0x74-0x80*/ STATE_VIRTUAL_FUNC_DECLARE(dTgSwordBattleGame_c, Wait);
|
||||
/* vt 0x80-0x88*/ STATE_VIRTUAL_FUNC_DECLARE(dTgSwordBattleGame_c, Manage);
|
||||
void init();
|
||||
|
||||
bool checkInEvent(const char *eventName);
|
||||
|
||||
bool checkInBossRushFlag();
|
||||
void unsetInBossRushFlag();
|
||||
void setInBossRushFlag();
|
||||
|
||||
void unsetEarlyFightFlags() const;
|
||||
void unsetImprisonedFightFlags() const;
|
||||
void unsetDemiseFightFlag() const;
|
||||
|
||||
s32 getCurrentTime() const;
|
||||
void saveCurrentTime(s32 time) const;
|
||||
|
||||
s32 getBossIdx() const;
|
||||
s32 getBossHighscore() const;
|
||||
|
||||
/** Index 0 */
|
||||
s32 getGhirahim1Highscore() const;
|
||||
/** Index 1 */
|
||||
s32 getScalderaHighscore() const;
|
||||
/** Index 2 */
|
||||
s32 getMolderachHighscore() const;
|
||||
/** Index 3 */
|
||||
s32 getImprisoned1Highscore() const;
|
||||
/** Index 4 */
|
||||
s32 getKoloktosHighscore() const;
|
||||
/** Index 5 */
|
||||
s32 getTentalusHighscore() const;
|
||||
/** Index 6 */
|
||||
s32 getGhirahim2Highscore() const;
|
||||
/** Index 7 */
|
||||
s32 getImprisoned2Highscore() const;
|
||||
/** Index 8 */
|
||||
s32 getImprisoned3Highscore() const;
|
||||
/** Index 9 */
|
||||
s32 getHordeHighscore() const;
|
||||
/** Index 10 */
|
||||
s32 getGhirahim3Highscore() const;
|
||||
/** Index 11 */
|
||||
s32 getDemiseHighscore() const;
|
||||
|
||||
s32 getCurrentBossNumber() const;
|
||||
void setCurrentBossNumber(s32 num);
|
||||
|
||||
void notifyBossDeath(bool ghirahim_related = false);
|
||||
bool checkFightStarted() const;
|
||||
|
||||
private:
|
||||
/* 0x??? */ STATE_MGR_DECLARE(dTgSwordBattleGame_c);
|
||||
/* 0x0FC */ STATE_MGR_DECLARE(dTgSwordBattleGame_c);
|
||||
/* 0x138 */ ActorEventRelated mEventRelated;
|
||||
/* 0x188 */ Timekeeper mTimer;
|
||||
/* 0x1A8 */ bool field_0x1A8;
|
||||
/* 0x1A9 */ bool field_0x1A9;
|
||||
/* 0x1AA */ bool field_0x1AA;
|
||||
/* 0x1AB */ bool field_0x1AB; ///< set if current boss is complete
|
||||
/* 0x1AC */ bool field_0x1AC;
|
||||
/* 0x1AD */ u8 field_0x1AD;
|
||||
/* 0x1AE */ u8 field_0x1AE;
|
||||
/* 0x1B0 */ u32 mBossNumber;
|
||||
|
||||
// Note: Gets padded to 0x1B8 due to Timekeepers 8-byte alignment
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#ifndef D_T_TUMBLE_WEED_H
|
||||
#define D_T_TUMBLE_WEED_H
|
||||
|
||||
#include "d/a/obj/d_a_obj_tumble_weed.h"
|
||||
#include "d/t/d_tg.h"
|
||||
#include "s/s_State.hpp"
|
||||
|
||||
class dAcOTumbleWeed_c;
|
||||
class dTgTumbleWeed_c : public dTg_c {
|
||||
public:
|
||||
dTgTumbleWeed_c() : mStateMgr(*this, sStateID::null), childTumbleweed(nullptr) {}
|
||||
dTgTumbleWeed_c() : mStateMgr(*this, sStateID::null) {}
|
||||
virtual ~dTgTumbleWeed_c() {}
|
||||
virtual int create() override;
|
||||
virtual int actorExecute() override;
|
||||
@@ -18,18 +18,21 @@ public:
|
||||
STATE_FUNC_DECLARE(dTgTumbleWeed_c, AreaIn);
|
||||
STATE_FUNC_DECLARE(dTgTumbleWeed_c, Wind);
|
||||
|
||||
STATE_MGR_DEFINE_UTIL_EXECUTESTATE(dTgTumbleWeed_c);
|
||||
|
||||
private:
|
||||
bool shouldSpawnTumbleweed();
|
||||
bool shouldDoWind();
|
||||
void doSpawnTumbleweed();
|
||||
void getWind(mVec3_c *);
|
||||
void getWind(mVec3_c &);
|
||||
|
||||
STATE_MGR_DECLARE(dTgTumbleWeed_c);
|
||||
u16 tumbleweedTimer;
|
||||
u16 padding;
|
||||
u16 windTimer;
|
||||
dAcRef_c<dAcOTumbleWeed_c> childTumbleweed;
|
||||
u16 someField;
|
||||
/* 0x0FC */ STATE_MGR_DECLARE(dTgTumbleWeed_c);
|
||||
|
||||
/* 0x138 */ u16 mSpawnTimer;
|
||||
/* 0x13A */ u16 field_0x13A;
|
||||
/* 0x13C */ u16 mWindTimer;
|
||||
/* 0x140 */ dAcRef_c<dAcOTumbleWeed_c> mSpawnedTumbleWeed;
|
||||
/* 0x14C */ u16 field_0x14C;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,4 +8,6 @@ public:
|
||||
virtual ~dTg_c() {}
|
||||
};
|
||||
|
||||
typedef dAcRef_c<dTg_c> dTgRef_c;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,6 +38,10 @@
|
||||
void changeState(const sStateIDIf_c &value) { \
|
||||
mStateMgr.changeState(value); \
|
||||
}
|
||||
#define STATE_MGR_DEFINE_UTIL_EXECUTESTATE(class_name) \
|
||||
void executeState() { \
|
||||
mStateMgr.executeState(); \
|
||||
}
|
||||
|
||||
#define STATE_MGR_DEFINE_UTIL_ISSTATE(class_name) \
|
||||
bool isState(const sFStateID_c<class_name> &value) const { \
|
||||
|
||||
@@ -19,12 +19,22 @@ public:
|
||||
HARP_PLAYING,
|
||||
};
|
||||
static bool isInMinigameState(Minigame game);
|
||||
|
||||
static bool isInAnyMinigame();
|
||||
|
||||
static bool endMinigame(Minigame game);
|
||||
|
||||
static void create();
|
||||
static void destroy();
|
||||
static void execute();
|
||||
|
||||
static MinigameManager *GetInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
static bool checkInBossRush() {
|
||||
return isInMinigameState(BOSS_RUSH);
|
||||
}
|
||||
|
||||
private:
|
||||
MinigameManager() {}
|
||||
virtual ~MinigameManager() {}
|
||||
|
||||
@@ -3,9 +3,26 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#define TIME_CONVERT(min, sec, msec) ((min * 60 * 1000) + (sec * 1000) + (msec * 10))
|
||||
|
||||
class Timekeeper {
|
||||
public:
|
||||
Timekeeper();
|
||||
virtual ~Timekeeper();
|
||||
|
||||
virtual s32 vt_0x0C(); ///< Init
|
||||
virtual s32 vt_0x10(); ///< Delete
|
||||
virtual s32 vt_0x14();
|
||||
virtual s32 doCount();
|
||||
virtual s32 vt_0x1C();
|
||||
|
||||
s32 getTime() const;
|
||||
void initUpCounter();
|
||||
|
||||
/* 0x08 */ s64 mTime;
|
||||
/* 0x10 */ u32 mCountingUp;
|
||||
/* 0x14 */ u32 mCountingDown;
|
||||
/* 0x1C */ bool field_0x1C;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user