-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ba0cc1
commit 0071898
Showing
6 changed files
with
116 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#ifndef D_T_DOWSING_H | ||
#define D_T_DOWSING_H | ||
|
||
#include <d/tg/d_tg.h> | ||
#include <toBeSorted/dowsing_target.h> | ||
|
||
class dTgDowsing_c : public dTg_c { | ||
public: | ||
dTgDowsing_c(); | ||
virtual ~dTgDowsing_c() {} | ||
|
||
virtual int create() override; | ||
virtual int doDelete() override; | ||
virtual int actorExecute() override; | ||
virtual int draw() override; | ||
|
||
bool checkDowsing() const; | ||
|
||
private: | ||
enum DowsingOption { | ||
TRIAL_0, | ||
TRIAL_1, | ||
TRIAL_2, | ||
TRIAL_3, | ||
PROPELLER, | ||
WATER_BASIN, | ||
CRYSTAL_BALL, | ||
PUMPKIN, | ||
NEW_PLANT_SPECIES, | ||
PARTY_WHEEL, | ||
ZELDA, | ||
DOWSING_MAX | ||
}; | ||
|
||
DowsingTarget mDowsingTarget; // 0x0FC | ||
DowsingOption mDowsingOption; // 0x11C | ||
u16 mUntriggerStoryFlag; // 0x120 | ||
u16 mTriggerStoryFlag; // 0x122 | ||
bool mTargetActive; // 0x124 | ||
|
||
u16 getTriggerSceneFlag() { | ||
return params & 0xFF; | ||
} | ||
|
||
u16 getUntriggerSceneFlag() { | ||
return params >> 0x8 & 0xFF; | ||
} | ||
|
||
DowsingOption getDowsingOption() { | ||
return (DowsingOption)(params >> 0x10 & 0xF); | ||
} | ||
|
||
u32 getDowsingOptionNum() { | ||
return mDowsingOption; | ||
} | ||
|
||
u16 getUntriggerStoryFlag() { | ||
return params >> 0x14 & 0x7FF; | ||
} | ||
|
||
u16 getTriggerStoryFlag() { | ||
return rotation.z.mVal & 0x7FF; | ||
} | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef D_T_GENKI_DWS_TGT_H | ||
#define D_T_GENKI_DWS_TGT_H | ||
|
||
#include <d/tg/d_tg.h> | ||
#include <toBeSorted/dowsing_target.h> | ||
|
||
class dTgGenkiDwsTgt_c : public dTg_c { | ||
public: | ||
dTgGenkiDwsTgt_c() : mDowsingTarget(this, DowsingTarget::SLOT_NONE) {} | ||
virtual ~dTgGenkiDwsTgt_c() {} | ||
|
||
virtual int create() override; | ||
virtual int doDelete() override; | ||
virtual int actorExecute() override; | ||
|
||
|
||
private: | ||
u16 getSceneFlagFromParams(); | ||
|
||
DowsingTarget mDowsingTarget; // 0xFC | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef D_T_HOLY_WATER_H | ||
#define D_T_HOLY_WATER_H | ||
|
||
#include <d/tg/d_tg.h> | ||
#include <toBeSorted/dowsing_target.h> | ||
|
||
class dTgHolyWater_c : public dTg_c { | ||
public: | ||
dTgHolyWater_c() : mDowsingTarget(this, DowsingTarget::SLOT_NONE) {} | ||
virtual ~dTgHolyWater_c() {} | ||
|
||
virtual int create() override; | ||
virtual int doDelete() override; | ||
virtual int actorExecute() override; | ||
virtual int draw() override; | ||
|
||
bool isLinkNearby(); | ||
bool dowsingActive(); | ||
|
||
private: | ||
DowsingTarget mDowsingTarget; // 0x0FC | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters