diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2023-10-31 16:41:28 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2023-10-31 16:41:28 -0400 |
| commit | 0ab15b4127b68df8290ec1ddb8846d4b1868bc90 (patch) | |
| tree | 4e362ef87a9b5515bbceff3e1bf70445942c7dcc /src/d/d_com_static.cpp | |
| parent | 5c69e690b8055a9d965450714cbeb77354a3b0b0 (diff) | |
d_a_ib OK, add J3DFrameCtrl state enum
Diffstat (limited to 'src/d/d_com_static.cpp')
| -rw-r--r-- | src/d/d_com_static.cpp | 60 |
1 files changed, 44 insertions, 16 deletions
diff --git a/src/d/d_com_static.cpp b/src/d/d_com_static.cpp index 4226a222..e3aac855 100644 --- a/src/d/d_com_static.cpp +++ b/src/d/d_com_static.cpp @@ -9,6 +9,7 @@ #include "d/actor/d_a_agbsw0.h" #include "d/actor/d_a_npc_md.h" #include "d/actor/d_a_arrow.h" +#include "d/actor/d_a_ib.h" #include "d/actor/d_a_obj_movebox.h" #include "d/actor/d_a_tag_kb_item.h" #include "d/actor/d_a_item.h" @@ -128,25 +129,52 @@ void daArrow_c::setKeepType(u8 type) { m_keep_type = type; } -// /* 800568D0-800568F8 .text init__9daIball_cFv */ -// void daIball_c::init() { -// /* Nonmatching */ -// } +u32 daIball_c::m_ib_actor[5]; -// /* 800568F8-80056944 .text regist__9daIball_cFP10fopAc_ac_c */ -// void daIball_c::regist(fopAc_ac_c*) { -// /* Nonmatching */ -// } +/* 800568D0-800568F8 .text init__9daIball_cFv */ +void daIball_c::init() { + for (int i = 0; i < ARRAY_SIZE(m_ib_actor); i++) { + m_ib_actor[i] = -1; + } +} -// /* 80056944-80056990 .text remove__9daIball_cFP10fopAc_ac_c */ -// void daIball_c::remove(fopAc_ac_c*) { -// /* Nonmatching */ -// } +/* 800568F8-80056944 .text regist__9daIball_cFP10fopAc_ac_c */ +void daIball_c::regist(fopAc_ac_c* i_actor) { + for (int i = 0; i < ARRAY_SIZE(m_ib_actor); i++) { + if (m_ib_actor[i] == -1) { + m_ib_actor[i] = fopAcM_GetID(i_actor); + break; + } + } +} -// /* 80056990-80056A18 .text remove_old__9daIball_cFv */ -// void daIball_c::remove_old() { -// /* Nonmatching */ -// } +/* 80056944-80056990 .text remove__9daIball_cFP10fopAc_ac_c */ +void daIball_c::remove(fopAc_ac_c* i_actor) { + for (int i = 0; i < ARRAY_SIZE(m_ib_actor); i++) { + if (m_ib_actor[i] == fopAcM_GetID(i_actor)) { + m_ib_actor[i] = -1; + break; + } + } +} + +/* 80056990-80056A18 .text remove_old__9daIball_cFv */ +void daIball_c::remove_old() { + u32 iball_id = -1; + for (int i = 0; i < ARRAY_SIZE(m_ib_actor); i++) { + if (m_ib_actor[i] == -1) { + return; + } + if (m_ib_actor[i] < iball_id) { + iball_id = m_ib_actor[i]; + } + } + fopAc_ac_c* iball = fopAcM_SearchByID(iball_id); + if (iball) { + static_cast<daIball_c*>(iball)->dead(); + remove(iball); + } +} // /* 80056A18-80056AD0 .text getCreateCount__13daObj_Roten_cFv */ // void daObj_Roten_c::getCreateCount() { |
