Conversation
include/d/actor/d_a_fr.h
Outdated
| /* 0x5C4 */ mDoExt_McaMorf* mMorf; | ||
| /* 0x5C8 */ mDoExt_btkAnm* mBtkAnm; | ||
| /* 0x5CC */ u8 field_0x5cc; | ||
| /* 0x5CD */ char field_0x5cd; |
There was a problem hiding this comment.
s8 is preferred over char unless it's an actual string
src/d/actor/d_a_fr.cpp
Outdated
| base_process_class* baseProcess = fpcM_Search(s_wd_sub, i_this); | ||
| if (baseProcess) { | ||
| layer_class** layer = &baseProcess[7].delete_tag.layer; | ||
| for (int i = 0; i < (int)baseProcess[0xec].delete_tag.base.mpNode.mpData; i++) { | ||
| cXyz sp48 = *(cXyz*)layer - i_this->current.pos; | ||
| if (sp48.abs() < *(f32*)layer * 22.0f) { | ||
| return (int)layer; | ||
| } | ||
|
|
||
| layer = layer + 0x15; |
There was a problem hiding this comment.
this is supposed to be some actor class belonging to obj_lp based on the search func
There was a problem hiding this comment.
How were you able to tell?
src/d/actor/d_a_fr.cpp
Outdated
| case 2: | ||
| if (i_this->mMorf->isStop()) { | ||
| anm_init(i_this, 8, 1.0f, 0, 1.0f); | ||
| i_this->speedF = l_HIO[2] + cM_rndFX(l_HIO[2] * 0.5f); |
There was a problem hiding this comment.
l_HIO should be set to it's actual HIO class
| if (i_this->shape_angle.x > 0x1000) { | ||
| i_this->shape_angle.x = 0x1000; | ||
| } else { | ||
| if (i_this->shape_angle.x < -0x2000) { | ||
| i_this->shape_angle.x = -0x2000; | ||
| } | ||
| } |
src/d/actor/d_a_fr.cpp
Outdated
| } else { | ||
| if (((i_this->field_0x994 == -1 || !daPy_py_c::checkNowWolf()) && i_this->field_0x5d2 != 5) && i_this->field_0x5d8 < l_HIO[6]) { | ||
| i_this->field_0x5d2 = 5; | ||
| i_this->field_0x5d4 = 0; | ||
| } | ||
| } |
src/d/actor/d_a_fr.cpp
Outdated
| } else { | ||
| if (dComIfGp_event_runCheck() && i_this->eventInfo.checkCommandTalk()) { | ||
| i_this->mMsgFlow.init(i_this, i_this->field_0x994, 0, NULL); | ||
| i_this->field_0x992 = 1; | ||
|
|
||
| OS_REPORT("////////FR MSG FNO %d\n", i_this->field_0x994); | ||
| } | ||
|
|
||
| if ((i_this->field_0x991 == 2 && i_this->field_0x994 != -1) && daPy_py_c::checkNowWolf()) { | ||
| fopAcM_OnStatus(i_this, 0); | ||
| cLib_onBit<u32>(i_this->attention_info.flags, 10); | ||
| i_this->eventInfo.onCondition(1); | ||
| } else { | ||
| fopAcM_OffStatus(i_this, 0); | ||
| cLib_offBit<u32>(i_this->attention_info.flags, 1); | ||
| } | ||
|
|
||
| return 0; | ||
| } |
There was a problem hiding this comment.
there's an early return, so this nest can be removed
src/d/actor/d_a_fr.cpp
Outdated
| // NONMATCHING | ||
| if (cDmrNowMidnaTalk()) { | ||
| return 1; | ||
| } else { |
There was a problem hiding this comment.
early return so this nest can be removed
src/d/actor/d_a_fr.cpp
Outdated
|
|
||
| /* 8051B354-8051B35C 001B54 0008+00 1/0 0/0 0/0 .text daFr_IsDelete__FP8fr_class */ | ||
| static bool daFr_IsDelete(fr_class* param_0) { | ||
| static bool daFr_IsDelete(fr_class* i_this) { |
src/d/actor/d_a_fr.cpp
Outdated
| } else { | ||
| i_this->mBtkAnm = new mDoExt_btkAnm(); | ||
| if (!i_this->mBtkAnm) { | ||
| return 0; | ||
| } else { | ||
| if (i_this->mBtkAnm->init(i_this->mMorf->getModel()->getModelData(), (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("Fr", 17), | ||
| 1, 0, 1.0f, 0, -1)) { | ||
| return 0; | ||
| } else { | ||
| return 1; | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
a lot of unnecessary nesting because of early returns
src/d/actor/d_a_fr.cpp
Outdated
| if (!fopAcM_entrySolidHeap(i_this, useHeapIfrt, 0x14e0)) { | ||
| OS_REPORT("//////////////FR SET NON !!\n"); | ||
| return cPhs_ERROR_e; | ||
| } else { |
include/d/actor/d_a_fr.h
Outdated
| /* 0x04 */ char field_0x4; | ||
| void genMessage(JORMContext*); | ||
|
|
||
| /* 0x00 */ J3DFrameCtrl* field_0x0; |
There was a problem hiding this comment.
this is a fake member, the first 4 bytes should be taken up by the vtable by making the destructor virtual, which should also be inlined
include/d/actor/d_a_obj_lp.h
Outdated
| /* 0x0010 */ cXyz field_0x10[84]; | ||
| }; | ||
|
|
||
| STATIC_ASSERT(sizeof(wd_ss) == 0x400); // Could be incorrect size |
There was a problem hiding this comment.
if the size isn't certainly known i'd prefer not putting a static assert for it yet
src/d/actor/d_a_obj_lp.cpp
Outdated
|
|
||
| dComIfGp_addSimpleModel(modelData, fopAcM_GetRoomNo(i_this), 0); | ||
| if (modelData == NULL) { | ||
| OS_REPORT(1Bh,"[43;30mリリーパッド:シンプルモデル登録失敗しました。\n",1Bh,"[m"); |
There was a problem hiding this comment.
this will break debug rom building, add the 0x1B to the string by doing something like \x1B
|
you have a compile error that'll need to be fixed |
No description provided.