Add g_copDest (#1229)

* Implement `AddCop` and `g_copDest`

* Fix formatting

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
jonschz 2024-12-15 13:50:52 +01:00 committed by GitHub
parent 2d74f14de0
commit ace2a9f047
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 87 additions and 0 deletions

View file

@ -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);

View file

@ -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

View file

@ -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);

View file

@ -74,6 +74,7 @@
DECOMP_SIZE_ASSERT(LegoObjectFactory, 0x1c8)
// FUNCTION: LEGO1 0x10006e40
// FUNCTION: BETA10 0x1009e930
LegoObjectFactory::LegoObjectFactory()
{
m_idLegoEntityPresenter = MxAtomId("LegoEntityPresenter", e_exact);

View file

@ -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)