Skip to content

Commit daa379e

Browse files
Merge pull request #302 from elijah-thomas774/d_t_scene_change
d_t_scene_change OK
2 parents 26d5757 + e407be8 commit daa379e

File tree

15 files changed

+208
-29
lines changed

15 files changed

+208
-29
lines changed

config/SOUE01/rels/d_a_npc_volcano_f2_salboNP/symbols.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fn_61_4F40 = .text:0x00004F40; // type:function size:0x2E4
9797
fn_61_5230 = .text:0x00005230; // type:function size:0x100
9898
fn_61_5330 = .text:0x00005330; // type:function size:0x1D4
9999
fn_61_5510 = .text:0x00005510; // type:function size:0x1A8
100-
fn_61_56C0 = .text:0x000056C0; // type:function size:0x4C
100+
fn_61_56C0__12dAcNpcSlb2_cF7mVec3_cPC7mVec3_cPC4mAng = .text:0x000056C0; // type:function size:0x4C
101101
fn_61_5710 = .text:0x00005710; // type:function size:0x48
102102
fn_61_5760 = .text:0x00005760; // type:function size:0x48
103103
fn_61_57B0 = .text:0x000057B0; // type:function size:0x48

config/SOUE01/rels/d_t_scene_changeNP/symbols.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global
22
_epilog = .text:0x00000030; // type:function size:0x2C scope:global
33
_unresolved = .text:0x00000060; // type:function size:0x4 scope:global
44
dTgSceneChange_c_classInit__Fv = .text:0x00000070; // type:function size:0x4C
5-
TgSceneChange__init = .text:0x000000C0; // type:function size:0xD4
6-
fn_204_1A0 = .text:0x000001A0; // type:function size:0x74
7-
TgSceneChange__update = .text:0x00000220; // type:function size:0x160
8-
fn_204_380 = .text:0x00000380; // type:function size:0x1C4
9-
fn_204_550 = .text:0x00000550; // type:function size:0x5C
10-
fn_204_5B0 = .text:0x000005B0; // type:function size:0x8
11-
__dt__16dTgSceneChange_cFv = .text:0x000005C0; // type:function size:0x5C
5+
create__16dTgSceneChange_cFv = .text:0x000000C0; // type:function size:0xD4
6+
checkDisabled__16dTgSceneChange_cCFv = .text:0x000001A0; // type:function size:0x74
7+
actorExecute__16dTgSceneChange_cFv = .text:0x00000220; // type:function size:0x160
8+
checkScrapper__16dTgSceneChange_cFv = .text:0x00000380; // type:function size:0x1C4
9+
savePlayerPosition__16dTgSceneChange_cFv = .text:0x00000550; // type:function size:0x5C
10+
draw__16dTgSceneChange_cFv = .text:0x000005B0; // type:function size:0x8
11+
__dt__16dTgSceneChange_cFv = .text:0x000005C0; // type:function size:0x5C scope:weak
1212
_ctors = .ctors:0x00000000; // type:label scope:global
1313
_dtors = .dtors:0x00000000; // type:label scope:global
14-
lbl_204_rodata_0 = .rodata:0x00000000; // type:object size:0x4 data:float
15-
lbl_204_data_0 = .data:0x00000000; // type:object size:0x13 data:string
16-
lbl_204_data_14 = .data:0x00000014; // type:object size:0x4 data:4byte
14+
lbl_204_rodata_0 = .rodata:0x00000000; // type:object size:0x4 scope:local data:float
15+
lbl_204_data_0 = .data:0x00000000; // type:object size:0x13 scope:local data:string
16+
ScrapperStopEvent = .data:0x00000014; // type:object size:0x4 data:4byte
1717
g_profile_SC_CHANGE_TAG = .data:0x00000018; // type:object size:0x10
18-
lbl_204_data_28 = .data:0x00000028; // type:object size:0x4 data:4byte
19-
lbl_204_data_2C = .data:0x0000002C; // type:object size:0x4 data:4byte
20-
lbl_204_data_30 = .data:0x00000030; // type:object size:0xC data:string
21-
TgSceneChange__vtable = .data:0x0000003C; // type:object size:0x74
18+
lbl_204_data_28 = .data:0x00000028; // type:object size:0x4 scope:local data:4byte
19+
lbl_204_data_2C = .data:0x0000002C; // type:object size:0x4 scope:local data:4byte
20+
lbl_204_data_30 = .data:0x00000030; // type:object size:0xC scope:local data:string
21+
__vt__16dTgSceneChange_c = .data:0x0000003C; // type:object size:0x74

config/SOUE01/symbols.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2521,7 +2521,7 @@ vt_0x280__17daPlayerActBase_cFv = .text:0x8005C720; // type:function size:0x8
25212521
getSwordPos__17daPlayerActBase_cCFv = .text:0x8005C730; // type:function size:0x8
25222522
vt_0x278__17daPlayerActBase_cCFv = .text:0x8005C740; // type:function size:0x8
25232523
vt_0x274__17daPlayerActBase_cFv = .text:0x8005C750; // type:function size:0xC
2524-
triggerExitRelated__17daPlayerActBase_cFv = .text:0x8005C760; // type:function size:0x4
2524+
triggerExitRelated__17daPlayerActBase_cFiii = .text:0x8005C760; // type:function size:0x4
25252525
doesGameOver__17daPlayerActBase_cFv = .text:0x8005C770; // type:function size:0x8
25262526
setActorRef11__17daPlayerActBase_cFv = .text:0x8005C780; // type:function size:0x4
25272527
getGroosenatorIfIn__17daPlayerActBase_cFv = .text:0x8005C790; // type:function size:0x8
@@ -2900,8 +2900,8 @@ __sinit_\d_rumble_cpp = .text:0x80066E50; // type:function size:0x108 scope:loca
29002900
fn_80066F60 = .text:0x80066F60; // type:function size:0x50
29012901
lzSafeDecompress__FPCvUlPv = .text:0x80066FB0; // type:function size:0x64
29022902
matrixCreateFromPosRotYScale__FR6mMtx_cRC7mVec3_c4mAngRC7mVec3_cP6mMtx_cf = .text:0x80067020; // type:function size:0x138
2903-
checkIfVec3fInMatrix__FRC6mMtx_cRC7mVec3_c = .text:0x80067160; // type:function size:0x88
2904-
fn_800671F0 = .text:0x800671F0; // type:function size:0x84
2903+
checkAreaBox__FRC6mMtx_cRC7mVec3_c = .text:0x80067160; // type:function size:0x88
2904+
checkAreaCyl__FRC6mMtx_cRC7mVec3_c = .text:0x800671F0; // type:function size:0x84
29052905
__ct__7mVec2_cFv = .text:0x80067280; // type:function size:0x4
29062906
fn_80067290 = .text:0x80067290; // type:function size:0xA8
29072907
fn_80067340 = .text:0x80067340; // type:function size:0xC0

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2944,7 +2944,7 @@ def MatchingFor(*versions):
29442944
Rel(
29452945
NonMatching, "d_t_ro_at_target_manager", "REL/d/t/d_t_ro_at_target_manager.cpp"
29462946
),
2947-
Rel(NonMatching, "d_t_scene_change", "REL/d/t/d_t_scene_change.cpp"),
2947+
Rel(Matching, "d_t_scene_change", "REL/d/t/d_t_scene_change.cpp"),
29482948
Rel(NonMatching, "d_t_ship_flood", "REL/d/t/d_t_ship_flood.cpp"),
29492949
Rel(NonMatching, "d_t_ship_slope", "REL/d/t/d_t_ship_slope.cpp"),
29502950
Rel(Matching, "d_t_ship_window", "REL/d/t/d_t_ship_window.cpp"),

include/d/a/npc/d_a_npc_volcano_f2_salbo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define D_A_NPC_VOLCANO_F2_SALBO_H
33

44
#include "d/a/npc/d_a_ordinary_npc.h"
5+
#include "m/m_vec.h"
56
#include "s/s_State.hpp"
67

78
class dAcNpcSlb2_c : public dAcOrdinaryNpc_c {
@@ -10,6 +11,7 @@ class dAcNpcSlb2_c : public dAcOrdinaryNpc_c {
1011
virtual ~dAcNpcSlb2_c() {}
1112

1213
void fn_61_58C0(int, int);
14+
void fn_61_56C0(const mVec3_c, const mVec3_c *, const mAng *);
1315
bool fn_61_6A10();
1416
void fn_61_68D0(int);
1517

include/d/d_player_act.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ class daPlayerActBase_c : public daPlBase_c {
372372
/* vt 0x26C */ virtual bool doesGameOver() {
373373
return true;
374374
}
375-
/* vt 0x270 */ virtual void triggerExitRelated() {}
375+
/* vt 0x270 */ virtual void triggerExitRelated(UNKWORD sceneLink, UNKWORD pathIdx, UNKWORD sceneType) {}
376376
/* vt 0x274 */ virtual mAng vt_0x274() {
377377
return mRotation.y;
378378
}

include/d/t/d_t_scene_change.h

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,53 @@
22
#define D_T_SCENE_CHANGE_H
33

44
#include "d/t/d_tg.h"
5+
#include "m/m_mtx.h"
6+
#include "m/m_vec.h"
57

68
class dTgSceneChange_c : public dTg_c {
79
public:
10+
// TODO: Move this somewhere not in d_t_scene_change.
11+
// The Variable gets passed to dAcPy_c::triggerExitRelated
12+
enum Type_e {
13+
/* 0x0 */ TYPE_0,
14+
/* 0x1 */ TYPE_1, // Restricting Movement?
15+
/* 0x2 */ TYPE_2,
16+
/* 0x3 */ TYPE_3, // Forced Walk
17+
/* 0x4 */ TYPE_4, // Loftwing
18+
/* 0x5 */ TYPE_5, // Landing on Skyloft
19+
/* 0x6 */ TYPE_6, // Enter/Exit Dungeon
20+
/* 0x7 */ TYPE_7, // Minecart
21+
/* 0x8 */ TYPE_8, // Cistern Rope to Basement
22+
/* 0x9 */ TYPE_9, // Light Pillar?
23+
/* 0xA */ TYPE_A, // Boat
24+
/* 0xB */ TYPE_B, // Actor Related
25+
};
26+
827
dTgSceneChange_c() {}
928
virtual ~dTgSceneChange_c() {}
1029

30+
virtual int create() override;
31+
virtual int draw() override;
32+
virtual int actorExecute() override;
33+
34+
private:
35+
bool checkDisabled() const;
36+
bool checkScrapper();
37+
38+
void savePlayerPosition();
39+
1140
private:
41+
/* 0x0FC */ mMtx_c mArea;
42+
/* 0x12C */ u8 mSceneLink;
43+
/* 0x12D */ u8 mSceneType;
44+
/* 0x12E */ u8 mPathId;
45+
/* 0x12F */ u8 mEnableSceneflag;
46+
/* 0x130 */ u16 mEnableStoryflag;
47+
/* 0x132 */ u16 mDisableStoryflag;
48+
/* 0x134 */ bool field_0x134;
49+
/* 0x135 */ bool field_0x135;
50+
/* 0x136 */ bool field_0x136;
51+
/* 0x138 */ mVec3_c field_0x138; // Player position on Scrapper Stop
1252
};
1353

1454
#endif

include/toBeSorted/area_math.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "m/m_vec.h"
77

88
void matrixCreateFromPosRotYScale(mMtx_c &, const mVec3_c &, const mAng, const mVec3_c &, mMtx_c *, f32);
9-
bool checkIfVec3fInMatrix(const mMtx_c &, const mVec3_c &);
9+
bool checkAreaBox(const mMtx_c &, const mVec3_c &);
10+
bool checkAreaCyl(const mMtx_c &, const mVec3_c &);
1011

1112
#endif

src/REL/d/t/d_t_action.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ int dTgAction_c::actorExecute() {
5151
break;
5252
}
5353
if (pObj->mProfileName == fProfile::BOMB) {
54-
if (checkIfVec3fInMatrix(mActiveMtx, pObj->getPosition())) {
54+
if (checkAreaBox(mActiveMtx, pObj->getPosition())) {
5555
reinterpret_cast<dAcBomb_c *>(pObj)->On_0xA3C(0x20000000);
5656
}
5757
}
5858
}
5959
}
6060

6161
// Check For Player Within Area
62-
if (enabled && checkIfVec3fInMatrix(mActiveMtx, player->getPosition())) {
62+
if (enabled && checkAreaBox(mActiveMtx, player->getPosition())) {
6363
if (mType == FORCE_FADE_RESTART) {
6464
player->onFlags_0x358(0x10000000);
6565
setActiveArea(50.f);

src/REL/d/t/d_t_gate_to_ground.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int dTgGateToGround_c::actorExecute() {
4646

4747
player = dAcPy_c::LINK;
4848

49-
if (checkIfVec3fInMatrix(matrix, player->mPosition)) {
49+
if (checkAreaBox(matrix, player->mPosition)) {
5050
if (player->getRidingActorType() != dAcPy_c::RIDING_LOFTWING) {
5151
if (delayFrames > 15) {
5252
Event e("CloudHole", 100, 0, nullptr, nullptr);

0 commit comments

Comments
 (0)