Skip to content
This repository was archived by the owner on Oct 6, 2026. It is now read-only.

Commit edb2188

Browse files
committed
some rough MoveObj s3dModel stuff
1 parent 6803685 commit edb2188

7 files changed

Lines changed: 81 additions & 5 deletions

File tree

‎config/GLME01/splits.txt‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ Unsorted/TitleScreenPane.cpp:
6161
.text start:0x8003A430 end:0x8003AF2C
6262
.ctors start:0x8020BAEC end:0x8020BAF0
6363

64+
Unsorted/s3dmodel.cpp:
65+
.text start:0x80058368 end:0x80058850
66+
6467
Unsorted/800627D8.cpp:
6568
.text start:0x800627D0 end:0x800627E8
6669
.sbss start:0x804D872C end:0x804D8730
@@ -71,6 +74,9 @@ Unsorted/8006385C.cpp:
7174
Unsorted/InGameFlagsUtil.cpp:
7275
.text start:0x80065FA4 end:0x80066D74
7376

77+
Unsorted/MoveObj.cpp:
78+
.text start:0x800677D0 end:0x800685DC
79+
7480
Unsorted/RailInfoUtil.cpp:
7581
.text start:0x80092568 end:0x8009359C
7682

‎config/GLME01/symbols.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,8 +1565,8 @@ fn_8005833C = .text:0x8005833C; // type:function size:0x18
15651565
fn_80058354 = .text:0x80058354; // type:function size:0x8
15661566
fn_8005835C = .text:0x8005835C; // type:function size:0x8
15671567
fn_80058364 = .text:0x80058364; // type:function size:0x4
1568-
fn_80058368 = .text:0x80058368; // type:function size:0x30
1569-
fn_80058398 = .text:0x80058398; // type:function size:0x464
1568+
__ct__8S3DModelFll = .text:0x80058368; // type:function size:0x30
1569+
init__8S3DModelFll = .text:0x80058398; // type:function size:0x464
15701570
fn_800587FC = .text:0x800587FC; // type:function size:0x54
15711571
fn_80058850 = .text:0x80058850; // type:function size:0xC8
15721572
fn_80058918 = .text:0x80058918; // type:function size:0x98
@@ -1760,7 +1760,7 @@ fn_8006722C = .text:0x8006722C; // type:function size:0x1B4
17601760
fn_800673E0 = .text:0x800673E0; // type:function size:0x40
17611761
fn_80067420 = .text:0x80067420; // type:function size:0x33C
17621762
fn_8006775C = .text:0x8006775C; // type:function size:0x74
1763-
fn_800677D0 = .text:0x800677D0; // type:function size:0x1C4
1763+
__ct__7MoveObjFv = .text:0x800677D0; // type:function size:0x1C4
17641764
fn_80067994 = .text:0x80067994; // type:function size:0x64
17651765
fn_800679F8 = .text:0x800679F8; // type:function size:0x50
17661766
fn_80067A48 = .text:0x80067A48; // type:function size:0x4C
@@ -12852,7 +12852,7 @@ jumptable_8033B0BC = .data:0x8033B0BC; // type:object size:0x2C scope:local
1285212852
lbl_8033B0E8 = .data:0x8033B0E8; // type:object size:0x68
1285312853
lbl_8033B150 = .data:0x8033B150; // type:object size:0xA data:string
1285412854
lbl_8033B15C = .data:0x8033B15C; // type:object size:0xC
12855-
lbl_8033B168 = .data:0x8033B168; // type:object size:0x48
12855+
__vt__7MoveObj = .data:0x8033B168; // type:object size:0x48
1285612856
lbl_8033B1B0 = .data:0x8033B1B0; // type:object size:0xE data:string
1285712857
lbl_8033B1C0 = .data:0x8033B1C0; // type:object size:0x17 data:string
1285812858
lbl_8033B1D8 = .data:0x8033B1D8; // type:object size:0xA data:string

‎configure.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,9 +767,11 @@ def MatchingFor(*versions):
767767
Object(NonMatching, "Unsorted/80007018.cpp"),
768768
Object(NonMatching, "Unsorted/LMDvdFileBlock.cpp"),
769769
Object(NonMatching, "Unsorted/80005EB8.cpp"),
770+
Object(NonMatching, "Unsorted/MoveObj.cpp"),
770771
Object(NonMatching, "Unsorted/RailInfoUtil.cpp"),
771772
Object(NonMatching, "Unsorted/800627D8.cpp"),
772773
Object(NonMatching, "Unsorted/LMDisplayUtil.cpp"),
774+
Object(NonMatching, "Unsorted/s3dmodel.cpp"),
773775
]),
774776
]
775777

‎include/Unsorted/MoveObj.hpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ class MoveObj {
2020

2121
inline s32 get_3C() const { return _3C; }
2222
public:
23-
/* 0x004 */ u8 _0[0x38];
23+
/* 0x004 */ u8 _0[0x34];
24+
/* 0x038 */ s32 _38;
2425
/* 0x03C */ s32 _3C;
2526
/* 0x040 */ u8 _40[0x788 - 0x40];
2627
};

‎include/Unsorted/s3dmodel.hpp‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#ifndef S3DMODEL_H_
2+
#define S3DMODEL_H_
3+
4+
#include <types.h>
5+
#include <dolphin/mtx.h>
6+
7+
8+
class S3DModel {
9+
public:
10+
struct unkS3DModel_1 {
11+
/* 0x00 */ s32 _0;
12+
/* 0x04 */ s32 _4;
13+
/* 0x08 */ u16 _8;
14+
/* 0x0A */ u16 _A;
15+
/* 0x0C */ u16 _C;
16+
};
17+
18+
S3DModel(unkS3DModel_1*, s32);
19+
20+
void init(unkS3DModel_1*, s32);
21+
22+
public:
23+
/* 0x00 */ s32 _0;
24+
/* 0x04 */ unkS3DModel_1* _4;
25+
// size: 0x118
26+
};
27+
28+
#endif

‎src/Unsorted/MoveObj.cpp‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include "Unsorted/MoveObj.hpp"
2+
3+
4+
MoveObj::MoveObj() {
5+
6+
}

‎src/Unsorted/s3dmodel.cpp‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#include "Unsorted/s3dmodel.hpp"
2+
#include "JSystem/JKernel/JKRHeap.hpp"
3+
#include <dolphin/os.h>
4+
5+
S3DModel::S3DModel(unkS3DModel_1* param_1, s32 param_2) {
6+
init(param_1, param_2);
7+
}
8+
9+
void S3DModel::init(unkS3DModel_1* param_1, s32 param_2) {
10+
_0 = 0;
11+
_4 = param_1;
12+
13+
s32 iVar1;
14+
if (_4 != nullptr) {
15+
iVar1 = _4->_8 + _4->_C;
16+
} else {
17+
iVar1 = param_2;
18+
}
19+
20+
if (param_2 != 0 && param_2 > iVar1) {
21+
OSErrorLine(119, "");
22+
}
23+
24+
s32 sizeBase1 = (param_2 * 4);
25+
sizeBase1 *= 48;
26+
27+
void* ppVar2 = JKRAllocFromHeap(nullptr, sizeBase1 + (sizeBase1 * 12), 4);
28+
29+
if (ppVar2 == nullptr) {
30+
OSErrorLine(130, "");
31+
}
32+
33+
}

0 commit comments

Comments
 (0)