From 5c4755eac2aa5a5ea49559b459292557732f7b7d Mon Sep 17 00:00:00 2001 From: elijah-thomas774 Date: Thu, 14 Nov 2024 22:49:24 -0500 Subject: [PATCH] d_a_npc_saltalk OK --- config/SOUE01/rels/d_a_npc_saltalkNP/symbols.txt | 2 +- config/SOUE01/symbols.txt | 2 +- configure.py | 2 +- include/d/a/npc/d_a_npc_saltalk.h | 2 +- include/toBeSorted/area_utils.h | 2 +- src/REL/d/a/npc/d_a_npc_saltalk.cpp | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/SOUE01/rels/d_a_npc_saltalkNP/symbols.txt b/config/SOUE01/rels/d_a_npc_saltalkNP/symbols.txt index 7b657e01..db82b724 100644 --- a/config/SOUE01/rels/d_a_npc_saltalkNP/symbols.txt +++ b/config/SOUE01/rels/d_a_npc_saltalkNP/symbols.txt @@ -21,7 +21,7 @@ getParam4__12dAcNpcSltk_cCFv = .text:0x000005E0; // type:function size:0x24 getSomething__12dAcNpcSltk_cCFv = .text:0x00000610; // type:function size:0x8 isSomething0__12dAcNpcSltk_cCFv = .text:0x00000620; // type:function size:0x28 isSomething1__12dAcNpcSltk_cCFv = .text:0x00000650; // type:function size:0x2C -checkSomething__12dAcNpcSltk_cF7mVec3_c = .text:0x00000680; // type:function size:0xF0 +checkSomething__12dAcNpcSltk_cCF7mVec3_c = .text:0x00000680; // type:function size:0xF0 initializeState_Wait__12dAcNpcSltk_cFv = .text:0x00000770; // type:function size:0x4 executeState_Wait__12dAcNpcSltk_cFv = .text:0x00000780; // type:function size:0x1FC finalizeState_Wait__12dAcNpcSltk_cFv = .text:0x00000980; // type:function size:0x4 diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index edf9279e..4937a1bd 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -3723,7 +3723,7 @@ fn_800A99D0 = .text:0x800A99D0; // type:function size:0xE0 ActorOnRail2__setSegment = .text:0x800A9AB0; // type:function size:0x50 checkPosInAREA = .text:0x800A9B00; // type:function size:0xC4 getAreaForIndexInRoom__Fll = .text:0x800A9BD0; // type:function size:0x78 -checkPosInArea__FllRC7mVec3_cPP4AREA = .text:0x800A9C50; // type:function size:0xD4 +checkPosInArea__FllRC7mVec3_cPCP4AREA = .text:0x800A9C50; // type:function size:0xD4 detach__Q23d2d10ResAccIf_cFv = .text:0x800A9D30; // type:function size:0x60 attach__Q23d2d10ResAccIf_cFPvPCc = .text:0x800A9D90; // type:function size:0x90 BuildPaneObj__Q23d2d8Layout_cFlPCvRCQ34nw4r3lyt11ResBlockSet = .text:0x800A9E20; // type:function size:0x12C diff --git a/configure.py b/configure.py index 0d0a9069..44854e5d 100644 --- a/configure.py +++ b/configure.py @@ -1176,7 +1176,7 @@ config.libs = [ "REL/d/a/npc/d_a_npc_salbage_robot_repair.cpp", ), Rel(NonMatching, "d_a_npc_salesman_s", "REL/d/a/npc/d_a_npc_salesman_s.cpp"), - Rel(NonMatching, "d_a_npc_saltalk", "REL/d/a/npc/d_a_npc_saltalk.cpp"), + Rel(Matching, "d_a_npc_saltalk", "REL/d/a/npc/d_a_npc_saltalk.cpp"), Rel( NonMatching, "d_a_npc_senpaia_mother", "REL/d/a/npc/d_a_npc_senpaia_mother.cpp" ), diff --git a/include/d/a/npc/d_a_npc_saltalk.h b/include/d/a/npc/d_a_npc_saltalk.h index 88a844b3..7bda6e0f 100644 --- a/include/d/a/npc/d_a_npc_saltalk.h +++ b/include/d/a/npc/d_a_npc_saltalk.h @@ -38,7 +38,7 @@ private: bool isSomething0() const; bool isSomething1() const; - bool checkSomething(mVec3_c pos); + bool checkSomething(mVec3_c pos) const; /* 0x6E4 */ dAcRef_c mRef; /* 0x6F0 */ int mAreaIndex; diff --git a/include/toBeSorted/area_utils.h b/include/toBeSorted/area_utils.h index a63fc647..d73cb218 100644 --- a/include/toBeSorted/area_utils.h +++ b/include/toBeSorted/area_utils.h @@ -14,6 +14,6 @@ struct AREA { /* 800a9b00 */ bool checkPosInArea(AREA **area, const mVec3_c &pos); /* 800a9bd0 */ AREA *getAreaForIndexInRoom(s32 areaIndex, s32 roomId); -/* 800a9c50 */ bool checkPosInArea(s32 areaIndex, s32 roomId, const mVec3_c &pos, AREA **area); +/* 800a9c50 */ bool checkPosInArea(s32 areaIndex, s32 roomId, const mVec3_c &pos, AREA *const *area); #endif diff --git a/src/REL/d/a/npc/d_a_npc_saltalk.cpp b/src/REL/d/a/npc/d_a_npc_saltalk.cpp index 9fe2be03..1c15362a 100644 --- a/src/REL/d/a/npc/d_a_npc_saltalk.cpp +++ b/src/REL/d/a/npc/d_a_npc_saltalk.cpp @@ -136,7 +136,7 @@ bool dAcNpcSltk_c::isSomething1() const { return getSomething() == 1; } -bool dAcNpcSltk_c::checkSomething(mVec3_c pos) { +bool dAcNpcSltk_c::checkSomething(mVec3_c pos) const { if (mAreaIndex != 0xFF) { return checkPosInArea(mAreaIndex, roomid, pos, &mpArea) == 1; } else { @@ -145,7 +145,7 @@ bool dAcNpcSltk_c::checkSomething(mVec3_c pos) { // TODO reload from position.y here f32 fDist = field_0x75C + position.y; f32 fDist2 = position.y; - if (fDist <= position.y) { + if (fDist <= fDist2) { fDist2 = fDist; fDist = position.y; }