diff options
| author | Pheenoh <pheenoh@gmail.com> | 2023-08-13 23:45:56 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-13 23:45:56 -0600 |
| commit | da21df7ee7206a821ef15f7ae3f644b95e1cb7af (patch) | |
| tree | 64de498718a9c2a4aa59bc4c2b69e4c3dbc43c2a /include | |
| parent | a997bb00bc2c8b08b260ef619a09885855dc4a3f (diff) | |
d_a_tag_chkpoint WIP, d_a_tag_myna2 OK (#1883)
* d_a_tag_chgrestart
* d_a_tag_bottle_item
* deps fix
* more d_a_tag_chkpoint, d_a_tag_myna2 OK
* Fix Build Scripts (#1879)
* d_a_npc_fish (#1880)
* d_drawlist (#1881)
* comment
* progress
* progress
---------
Co-authored-by: jdflyer <jdflyer10@gmail.com>
Co-authored-by: Noah McQueen <67965519+Yotona@users.noreply.github.com>
Co-authored-by: Jcw87 <Jcw87@users.noreply.github.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h | 50 | ||||
| -rw-r--r-- | include/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.h | 19 |
2 files changed, 67 insertions, 2 deletions
diff --git a/include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h b/include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h index 2d3a2fac60..1daa29ee7c 100644 --- a/include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h +++ b/include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h @@ -1,6 +1,54 @@ #ifndef D_A_TAG_CHKPOINT_H #define D_A_TAG_CHKPOINT_H -#include "dolphin/types.h" +#include "f_op/f_op_actor_mng.h" +#include "d/com/d_com_inf_game.h" +#include "JSystem/JKernel/JKRHeap.h" + +class daTag_Chk_c : public fopAc_ac_c { +public: + /* 8048A6F8 */ s32 execute(); + + u16 getAreaType() { return orig.angle.z & 0x100; } + u16 getHeight() { return fopAcM_GetParam(this) & 0xff; } + u8 getSwBit() { return fopAcM_GetParam(this) >> 8; } + u8 getSwBit2() { return fopAcM_GetParam(this) >> 16; } + + s32 create() { + if (!fopAcM_CheckCondition(this, 8)) { + new (this) daTag_Chk_c(); + fopAcM_OnCondition(this, 8); + } + + if (getAreaType() == 0) { + mScale.x *= 50.0f; + mScale.y *= 100.0f; + mScale.z *= 50.0f; + + mPos1.set(current.pos.x - mScale.x, current.pos.y, current.pos.z - mScale.z); + mPos2.set(current.pos.x + mScale.x, current.pos.y + mScale.y, current.pos.z + mScale.z); + } else { + mScale.x *= 100.0f; + mScale.y *= 100.0f; + mScale.z *= 0.0f; + + mPos1.set(0.0f, current.pos.y, 0.0f); + mPos2.set(0.0f, current.pos.y + mScale.y, 0.0f); + } + + mAttentionInfo.mPosition = current.pos; + + u16 l_height = getHeight(); + l_height != 0xff ? mAttentionInfo.mPosition.y += l_height * 10.0f : mAttentionInfo.mPosition.y += mScale.y * 0.5f; + + mEyePos = mAttentionInfo.mPosition; + return cPhs_COMPLEATE_e; + } +private: + /* 0x568 */ u8 field_0x568[8]; + /* 0x570 */ cXyz mPos1; + /* 0x57C */ cXyz mPos2; +}; +STATIC_ASSERT(sizeof(daTag_Chk_c) == 0x588); #endif /* D_A_TAG_CHKPOINT_H */ diff --git a/include/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.h b/include/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.h index ace6a1dfef..288f84e1c5 100644 --- a/include/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.h +++ b/include/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.h @@ -1,6 +1,23 @@ #ifndef D_A_TAG_MYNA2_H #define D_A_TAG_MYNA2_H -#include "dolphin/types.h" +#include "f_op/f_op_actor_mng.h" +#include "d/com/d_com_inf_game.h" + +class daTagMyna2_c : public fopAc_ac_c { +public: + /* 80D5C698 */ s32 create(); + /* 80D5C708 */ s32 execute(); + + u8 getSwBit() { return fopAcM_GetParam(this) >> 8; } + u8 getMode() { return fopAcM_GetParam(this); } + f32 getExtent() { return mScale.x * 100.0f;} + +private: + /* 0x568 */ u32 mSwitchNo; + /* 0x56C */ u32 mMode; + /* 0x570 */ s16 mTimer; +}; +STATIC_ASSERT(sizeof(daTagMyna2_c) == 0x574); #endif /* D_A_TAG_MYNA2_H */ |
