d_a_npc_cdn3 OK (#2935)

This commit is contained in:
LagoLunatic 2025-12-09 15:41:11 -05:00 committed by GitHub
parent 60645e1423
commit 2447d5a02a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 32 additions and 29 deletions

View File

@ -2021,7 +2021,7 @@ config.libs = [
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_blue_ns"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_bou"),
ActorRel(Equivalent, "d_a_npc_bouS"), # weak func order (sinShort)
ActorRel(Equivalent, "d_a_npc_cdn3"), # weak func order (~csXyz); vtable order
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_cdn3"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_chat"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_chin"),
ActorRel(MatchingFor(ALL_GCN), "d_a_npc_clerka"),

View File

@ -51,11 +51,11 @@ public:
void executeRelief();
void setAngle();
void pathMoveF();
int ctrlMsgAnm();
inline int ctrlMsgAnm();
bool searchNextScheduleTagSub(fopAc_ac_c*);
bool searchFirstScheduleTagSub(fopAc_ac_c*);
void checkSchedule();
void setSchedule(daTagSchedule_c*);
inline void setSchedule(daTagSchedule_c*);
inline bool isInShop();
bool isChairStyle();
bool isNoTurnTalk();
@ -91,14 +91,14 @@ public:
int normtalkb(void*);
int sellme(void*);
int sing(void*);
int create();
void create_init();
inline int create();
inline void create_init();
inline int createHeap();
void setMtx();
void lookat();
virtual ~daNpcCdn3_c();
int execute();
void checkTimeSchedule();
inline void setMtx();
inline void lookat();
inline virtual ~daNpcCdn3_c();
inline int execute();
inline void checkTimeSchedule();
inline int draw();
@ -326,13 +326,14 @@ public:
int orderEvent() {
#if PLATFORM_SHIELD
if (mFlowNodeNum > 0) {
if (mFlowNodeNum > 0)
#else
if ((!mIsDarkWorld || daPy_py_c::checkNowWolfEyeUp()) &&
mFlowNodeNum > 0 &&
((attention_info.flags & fopAc_AttnFlag_SPEAK_e) ||
(attention_info.flags & fopAc_AttnFlag_TALK_e))) {
(attention_info.flags & fopAc_AttnFlag_TALK_e)))
#endif
{
eventInfo.onCondition(dEvtCnd_CANTALK_e);
}
return 1;

View File

@ -909,12 +909,13 @@ void daNpcCdn3_c::checkSchedule() {
int schedStartTime = (u16)((rawStartTime / 10) * 60 + (rawStartTime % 10) * 10);
int currentTime = getTime();
#if PLATFORM_SHIELD
if (field_0xb88->getWeekNum() == getDayOfWeek() && schedStartTime <= currentTime) {
if (field_0xb88->getWeekNum() == getDayOfWeek() && schedStartTime <= currentTime)
#else
int currentDay = getDayOfWeek();
int schedDay = field_0xb88->getWeekNum();
if (schedDay == currentDay && schedStartTime <= currentTime) {
if (schedDay == currentDay && schedStartTime <= currentTime)
#endif
{
setSchedule(field_0xb88);
field_0xb88 = NULL;
setAction(MODE_PATH);
@ -1454,10 +1455,6 @@ int daNpcCdn3_c::sing(void* param_0) {
return field_0xaa0 == 0;
}
static int daNpcCdn3_Create(void* i_this) {
return static_cast<daNpcCdn3_c*>(i_this)->create();
}
int daNpcCdn3_c::create() {
fopAcM_ct(this, daNpcCdn3_c);
mIsDarkWorld = dKy_darkworld_check();
@ -1575,11 +1572,6 @@ void daNpcCdn3_c::lookat() {
mLookat.action(cStack_80, eyePos, this, afStack_38, NULL != m_targetAct.getActorP());
}
static int daNpcCdn3_Delete(void* i_this) {
static_cast<daNpcCdn3_c*>(i_this)->~daNpcCdn3_c();
return 1;
}
daNpcCdn3_c::~daNpcCdn3_c() {
removeResrc(m_type, mObjNum);
if (heap != NULL) {
@ -1591,10 +1583,6 @@ daNpcCdn3_c::~daNpcCdn3_c() {
#endif
}
static int daNpcCdn3_Execute(void* i_this) {
return static_cast<daNpcCdn3_c*>(i_this)->execute();
}
int daNpcCdn3_c::execute() {
mAcchCir.SetWallH(Cd2_HIO_chkWallH(m_type));
mAcchCir.SetWallR(Cd2_HIO_chkWallR(m_type));
@ -1688,12 +1676,13 @@ void daNpcCdn3_c::checkTimeSchedule() {
}
} else if (field_0xb95 != 0 && mTagSched->getStartEnd() != 1) {
#if PLATFORM_SHIELD
if (mTagSched->getWeekNum() == getDayOfWeek() && field_0xb8c <= iVar2) {
if (mTagSched->getWeekNum() == getDayOfWeek() && field_0xb8c <= iVar2)
#else
int day = getDayOfWeek();
int weekNum = mTagSched->getWeekNum();
if (weekNum == day && field_0xb8c <= iVar2) {
if (weekNum == day && field_0xb8c <= iVar2)
#endif
{
field_0xb95 = 0;
}
}
@ -1721,6 +1710,19 @@ inline int daNpcCdn3_c::draw() {
return 1;
}
static int daNpcCdn3_Create(void* i_this) {
return static_cast<daNpcCdn3_c*>(i_this)->create();
}
static int daNpcCdn3_Delete(void* i_this) {
static_cast<daNpcCdn3_c*>(i_this)->~daNpcCdn3_c();
return 1;
}
static int daNpcCdn3_Execute(void* i_this) {
return static_cast<daNpcCdn3_c*>(i_this)->execute();
}
static int daNpcCdn3_Draw(void* i_this) {
return static_cast<daNpcCdn3_c*>(i_this)->draw();
}