diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2024-07-10 11:25:00 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2024-07-10 11:25:00 -0400 |
| commit | 635a1fd05263e533042bed065fca886174f32fb0 (patch) | |
| tree | ddbdec8327561a7bc2f65e958f326f8375ff32b9 /src/d/actor/d_a_npc_mt.cpp | |
| parent | 17a76564509f61c82f537eb0d53b4178f5cc0355 (diff) | |
d_a_obj_figure done except linkDraw regalloc
Diffstat (limited to 'src/d/actor/d_a_npc_mt.cpp')
| -rw-r--r-- | src/d/actor/d_a_npc_mt.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/d/actor/d_a_npc_mt.cpp b/src/d/actor/d_a_npc_mt.cpp index f11a1e75..ce7d8b6e 100644 --- a/src/d/actor/d_a_npc_mt.cpp +++ b/src/d/actor/d_a_npc_mt.cpp @@ -7,6 +7,8 @@ #include "d/d_com_inf_game.h" #include "d/d_procname.h" +#define TOTAL_FIGURE_COUNT 0x86 + static u16 l_figure_comp[] = { 0x95FF, 0x94FF, @@ -249,11 +251,9 @@ bool daNpcMt_c::isFigureGet(u8) { /* 00002B98-00002C38 .text setFigure__9daNpcMt_cFUc */ void daNpcMt_c::setFigure(u8 figure) { - /* Nonmatching */ - - if(figure < 0x86) { + if(figure < TOTAL_FIGURE_COUNT) { u8 reg = dComIfGs_getEventReg(l_figure_comp[figure / 8]); - reg |= 1 << (figure & 7); + reg |= 1 << (figure % 8); dComIfGs_setEventReg(l_figure_comp[figure / 8], reg); dComIfGs_onEventBit(0x3A01); } @@ -263,7 +263,7 @@ void daNpcMt_c::setFigure(u8 figure) { int daNpcMt_c::getFigureMakeNum() { int num = 0; - for(u8 i = 0; i < 0x86; i++) { + for(u8 i = 0; i < TOTAL_FIGURE_COUNT; i++) { if(isFigureGet(i)) { num++; } |
