Skip to content

Commit

Permalink
Add g_copDest (#1229)
Browse files Browse the repository at this point in the history
* Implement `AddCop` and `g_copDest`

* Fix formatting

---------

Co-authored-by: jonschz <[email protected]>
  • Loading branch information
jonschz and jonschz authored Dec 15, 2024
1 parent 2d74f14 commit ace2a9f
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 0 deletions.
1 change: 1 addition & 0 deletions LEGO1/lego/legoomni/include/act3.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class Act3 : public LegoWorld {
MxResult FUN_10073360(Act3Ammo& p_ammo, const Vector3& p_param2);
MxResult FUN_10073390(Act3Ammo& p_ammo, const Vector3& p_param2);
void SetBrickster(Act3Brickster* p_brickster);
void AddCop(Act3Cop* p_cop);
void FUN_10073400();
void FUN_10073430();
void GoodEnding(const Matrix4& p_destination);
Expand Down
11 changes: 11 additions & 0 deletions LEGO1/lego/legoomni/include/act3actors.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ class LegoWorld;
// SIZE 0x178
class Act3Actor : public LegoAnimActor {
public:
struct Act3CopDest {
// name verified by BETA10 0x10018776
const char* m_bName; // 0x00

// name verified by BETA10 0x100187cb
LegoPathBoundary* m_boundary; // 0x04

MxFloat m_unk0x08[3]; // 0x08
MxFloat m_unk0x14[3]; // 0x14
};

Act3Actor();

// FUNCTION: LEGO1 0x100431b0
Expand Down
62 changes: 62 additions & 0 deletions LEGO1/lego/legoomni/src/actors/act3actors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,71 @@

DECOMP_SIZE_ASSERT(Act3Actor, 0x178)
DECOMP_SIZE_ASSERT(Act3Cop, 0x188)
DECOMP_SIZE_ASSERT(Act3Cop::Act3CopDest, 0x20)
DECOMP_SIZE_ASSERT(Act3Brickster, 0x1b4)
DECOMP_SIZE_ASSERT(Act3Shark, 0x1a8)

// name verified by BETA10 0x10018776
// GLOBAL: LEGO1 0x100f4120
// GLOBAL: BETA10 0x101dcdc8
Act3Actor::Act3CopDest g_copDest[5] = {
{"INT38", NULL, {3.69, -1.31251, -59.231}, {-0.99601698, 0.0, -0.089166}},
{
"EDG02_08",
NULL,
{
-96.459999,
4.0,
11.22,
},
{
-0.9725,
0.0,
-0.23,
},
},
{
"INT18",
NULL,
{
28.076799,
2.0,
32.11,
},
{
-0.19769999,
0.0,
0.98,
},
},
{
"INT48",
NULL,
{
84.736,
9.0,
-1.965,
},
{
0.241,
0.0,
-0.97,
},
},
{"INT42",
NULL,
{
63.76178,
0.999993,
-77.739998,
},
{
0.47999999,
0.0,
-0.87699997,
}}
};

// Initialized at LEGO1 0x1003fa20
// GLOBAL: LEGO1 0x10104ef0
Mx3DPointFloat Act3Actor::g_unk0x10104ef0 = Mx3DPointFloat(0.0, 5.0, 0.0);
Expand Down
1 change: 1 addition & 0 deletions LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
DECOMP_SIZE_ASSERT(LegoObjectFactory, 0x1c8)

// FUNCTION: LEGO1 0x10006e40
// FUNCTION: BETA10 0x1009e930
LegoObjectFactory::LegoObjectFactory()
{
m_idLegoEntityPresenter = MxAtomId("LegoEntityPresenter", e_exact);
Expand Down
12 changes: 12 additions & 0 deletions LEGO1/lego/legoomni/src/worlds/act3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,18 @@ MxResult Act3::FUN_10073390(Act3Ammo& p_ammo, const Vector3& p_param2)
return SUCCESS;
}

// FUNCTION: LEGO1 0x100733d0
// FUNCTION: BETA10 0x10016b5d
void Act3::AddCop(Act3Cop* p_cop)
{
if (m_cop1) {
m_cop2 = p_cop;
}
else {
m_cop1 = p_cop;
}
}

// FUNCTION: LEGO1 0x100733f0
// FUNCTION: BETA10 0x10016ba2
void Act3::SetBrickster(Act3Brickster* p_brickster)
Expand Down

0 comments on commit ace2a9f

Please sign in to comment.