mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-08-27 21:35:46 +00:00
Match and link CMapArea (#22)
This commit is contained in:
parent
2644cb1ea4
commit
b4b7e1a2e3
@ -19177,7 +19177,7 @@ lbl_8046B97C = .bss:0x8046B97C; // type:object size:0xA3C
|
|||||||
@193 = .bss:0x8046C3B8; // type:object size:0xC scope:local
|
@193 = .bss:0x8046C3B8; // type:object size:0xC scope:local
|
||||||
lbl_8046C3C8 = .bss:0x8046C3C8; // type:object size:0xC align:4 data:float
|
lbl_8046C3C8 = .bss:0x8046C3C8; // type:object size:0xC align:4 data:float
|
||||||
lbl_8046C3D4 = .bss:0x8046C3D4; // type:object size:0xC data:4byte
|
lbl_8046C3D4 = .bss:0x8046C3D4; // type:object size:0xC data:4byte
|
||||||
MinesPostTransforms = .bss:0x8046C3E0; // type:object size:0x28 scope:local align:4 data:float
|
MinesPostTransforms = .bss:0x8046C3E0; // type:object size:0x24 scope:local align:4 data:float
|
||||||
kLineOfSightFilter = .bss:0x8046C408; // type:object size:0x18 scope:local data:4byte
|
kLineOfSightFilter = .bss:0x8046C408; // type:object size:0x18 scope:local data:4byte
|
||||||
lbl_8046C420 = .bss:0x8046C420; // type:object size:0x18 data:4byte
|
lbl_8046C420 = .bss:0x8046C420; // type:object size:0x18 data:4byte
|
||||||
lbl_8046C438 = .bss:0x8046C438; // type:object size:0x18 data:4byte
|
lbl_8046C438 = .bss:0x8046C438; // type:object size:0x18 data:4byte
|
||||||
|
@ -446,7 +446,7 @@ config.libs = [
|
|||||||
Object(NonMatching, "MetroidPrime/Enemies/CPatterned.cpp"),
|
Object(NonMatching, "MetroidPrime/Enemies/CPatterned.cpp"),
|
||||||
Object(NonMatching, "MetroidPrime/ScriptObjects/CScriptDoor.cpp"),
|
Object(NonMatching, "MetroidPrime/ScriptObjects/CScriptDoor.cpp"),
|
||||||
Object(NonMatching, "MetroidPrime/Enemies/CStateMachine.cpp"),
|
Object(NonMatching, "MetroidPrime/Enemies/CStateMachine.cpp"),
|
||||||
Object(Equivalent, "MetroidPrime/CMapArea.cpp"),
|
Object(MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/CMapArea.cpp"),
|
||||||
Object(NonMatching, "MetroidPrime/Cameras/CBallCamera.cpp"),
|
Object(NonMatching, "MetroidPrime/Cameras/CBallCamera.cpp"),
|
||||||
Object(NonMatching, "MetroidPrime/ScriptObjects/CScriptEffect.cpp"),
|
Object(NonMatching, "MetroidPrime/ScriptObjects/CScriptEffect.cpp"),
|
||||||
Object(NonMatching, "MetroidPrime/Weapons/CBomb.cpp"),
|
Object(NonMatching, "MetroidPrime/Weapons/CBomb.cpp"),
|
||||||
|
@ -18,58 +18,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
static const CVector3f MinesPostTransforms[3] = {
|
|
||||||
CVector3f(0.f, 0.f, 200.f),
|
|
||||||
CVector3f(0.f, 0.f, 0.f),
|
|
||||||
CVector3f(0.f, 0.f, -200.f),
|
|
||||||
};
|
|
||||||
|
|
||||||
static const uchar MinesPostTransformIndices[42] = {
|
|
||||||
0, // 00 Transport to Tallon Overworld South
|
|
||||||
0, // 01 Quarry Access
|
|
||||||
0, // 02 Main Quarry
|
|
||||||
0, // 03 Waste Disposal
|
|
||||||
0, // 04 Save Station Mines A
|
|
||||||
0, // 05 Security Access A
|
|
||||||
0, // 06 Ore Processing
|
|
||||||
0, // 07 Mine Security Station
|
|
||||||
0, // 08 Research Access
|
|
||||||
0, // 09 Storage Depot B
|
|
||||||
0, // 10 Elevator Access A
|
|
||||||
0, // 11 Security Access B
|
|
||||||
0, // 12 Storage Depot A
|
|
||||||
0, // 13 Elite Research
|
|
||||||
0, // 14 Elevator A
|
|
||||||
1, // 15 Elite Control Access
|
|
||||||
1, // 16 Elite Control
|
|
||||||
1, // 17 Maintenance Tunnel
|
|
||||||
1, // 18 Ventilation Shaft
|
|
||||||
2, // 19 Phazon Processing Center
|
|
||||||
1, // 20 Omega Research
|
|
||||||
2, // 21 Transport Access
|
|
||||||
2, // 22 Processing Center Access
|
|
||||||
1, // 23 Map Station Mines
|
|
||||||
1, // 24 Dynamo Access
|
|
||||||
2, // 25 Transport to Magmoor Caverns South
|
|
||||||
2, // 26 Elite Quarters
|
|
||||||
1, // 27 Central Dynamo
|
|
||||||
2, // 28 Elite Quarters Access
|
|
||||||
1, // 29 Quarantine Access A
|
|
||||||
1, // 30 Save Station Mines B
|
|
||||||
2, // 31 Metroid Quarantine B
|
|
||||||
1, // 32 Metroid Quarantine A
|
|
||||||
2, // 33 Quarantine Access B
|
|
||||||
2, // 34 Save Station Mines C
|
|
||||||
1, // 35 Elevator Access B
|
|
||||||
2, // 36 Fungal Hall B
|
|
||||||
1, // 37 Elevator B
|
|
||||||
2, // 38 Missile Station Mines
|
|
||||||
2, // 39 Phazon Mining Tunnel
|
|
||||||
2, // 40 Fungal Hall Access
|
|
||||||
2, // 41 Fungal Hall A
|
|
||||||
};
|
|
||||||
|
|
||||||
static CAssetId gHackAssetId = kInvalidAssetId;
|
|
||||||
|
|
||||||
CMapArea::CMapArea(CInputStream& in, uint size)
|
CMapArea::CMapArea(CInputStream& in, uint size)
|
||||||
: x0_magic(in.ReadLong())
|
: x0_magic(in.ReadLong())
|
||||||
@ -95,10 +44,12 @@ CMapArea::~CMapArea() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CMapArea::PostConstruct() {
|
void CMapArea::PostConstruct() {
|
||||||
CMappableObject* moStart = x38_moStart = reinterpret_cast< CMappableObject* >(x44_buf.get());
|
uchar* moStart = x44_buf.get();;
|
||||||
CVector3f* vertexStart = x3c_vertexStart =
|
x38_moStart = reinterpret_cast< CMappableObject* >(x44_buf.get());
|
||||||
reinterpret_cast< CVector3f* >(moStart + x28_mappableObjCount);
|
moStart += x28_mappableObjCount * sizeof(CMappableObject);
|
||||||
x40_surfaceStart = reinterpret_cast< CMapAreaSurface* >(vertexStart + x2c_vertexCount);
|
x3c_vertexStart = reinterpret_cast< CVector3f* >(moStart);
|
||||||
|
moStart += x2c_vertexCount * sizeof(CVector3f);
|
||||||
|
x40_surfaceStart = reinterpret_cast< CMapAreaSurface* >(moStart);
|
||||||
|
|
||||||
for (int i = 0; i < x28_mappableObjCount; ++i) {
|
for (int i = 0; i < x28_mappableObjCount; ++i) {
|
||||||
x38_moStart[i].PostConstruct(x44_buf.get());
|
x38_moStart[i].PostConstruct(x44_buf.get());
|
||||||
@ -226,6 +177,57 @@ void CMapArea::CMapAreaSurface::SetupGXMaterial() {
|
|||||||
CGX::SetTevKAlphaSel(GX_TEVSTAGE0, GX_TEV_KASEL_K0_A);
|
CGX::SetTevKAlphaSel(GX_TEVSTAGE0, GX_TEV_KASEL_K0_A);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const CVector3f MinesPostTransforms[3] = {
|
||||||
|
CVector3f(0.f, 0.f, 200.f),
|
||||||
|
CVector3f(0.f, 0.f, 0.f),
|
||||||
|
CVector3f(0.f, 0.f, -200.f),
|
||||||
|
};
|
||||||
|
|
||||||
|
static const uchar MinesPostTransformIndices[42] = {
|
||||||
|
0, // 00 Transport to Tallon Overworld South
|
||||||
|
0, // 01 Quarry Access
|
||||||
|
0, // 02 Main Quarry
|
||||||
|
0, // 03 Waste Disposal
|
||||||
|
0, // 04 Save Station Mines A
|
||||||
|
0, // 05 Security Access A
|
||||||
|
0, // 06 Ore Processing
|
||||||
|
0, // 07 Mine Security Station
|
||||||
|
0, // 08 Research Access
|
||||||
|
0, // 09 Storage Depot B
|
||||||
|
0, // 10 Elevator Access A
|
||||||
|
0, // 11 Security Access B
|
||||||
|
0, // 12 Storage Depot A
|
||||||
|
0, // 13 Elite Research
|
||||||
|
0, // 14 Elevator A
|
||||||
|
1, // 15 Elite Control Access
|
||||||
|
1, // 16 Elite Control
|
||||||
|
1, // 17 Maintenance Tunnel
|
||||||
|
1, // 18 Ventilation Shaft
|
||||||
|
2, // 19 Phazon Processing Center
|
||||||
|
1, // 20 Omega Research
|
||||||
|
2, // 21 Transport Access
|
||||||
|
2, // 22 Processing Center Access
|
||||||
|
1, // 23 Map Station Mines
|
||||||
|
1, // 24 Dynamo Access
|
||||||
|
2, // 25 Transport to Magmoor Caverns South
|
||||||
|
2, // 26 Elite Quarters
|
||||||
|
1, // 27 Central Dynamo
|
||||||
|
2, // 28 Elite Quarters Access
|
||||||
|
1, // 29 Quarantine Access A
|
||||||
|
1, // 30 Save Station Mines B
|
||||||
|
2, // 31 Metroid Quarantine B
|
||||||
|
1, // 32 Metroid Quarantine A
|
||||||
|
2, // 33 Quarantine Access B
|
||||||
|
2, // 34 Save Station Mines C
|
||||||
|
1, // 35 Elevator Access B
|
||||||
|
2, // 36 Fungal Hall B
|
||||||
|
1, // 37 Elevator B
|
||||||
|
2, // 38 Missile Station Mines
|
||||||
|
2, // 39 Phazon Mining Tunnel
|
||||||
|
2, // 40 Fungal Hall Access
|
||||||
|
2, // 41 Fungal Hall A
|
||||||
|
};
|
||||||
|
|
||||||
CTransform4f CMapArea::GetAreaPostTransform(const IWorld& world, int aid) {
|
CTransform4f CMapArea::GetAreaPostTransform(const IWorld& world, int aid) {
|
||||||
if (world.IGetWorldAssetId() == 0xB1AC4D65) // Phazon Mines
|
if (world.IGetWorldAssetId() == 0xB1AC4D65) // Phazon Mines
|
||||||
{
|
{
|
||||||
@ -244,6 +246,7 @@ const CVector3f& CMapArea::GetAreaPostTranslate(const IWorld& world, int aid) {
|
|||||||
return CVector3f::Zero();
|
return CVector3f::Zero();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
static CAssetId gHackAssetId = kInvalidAssetId;
|
||||||
|
|
||||||
CFactoryFnReturn FMapAreaFactory(const SObjectTag& objTag, CInputStream& in,
|
CFactoryFnReturn FMapAreaFactory(const SObjectTag& objTag, CInputStream& in,
|
||||||
const CVParamTransfer&) {
|
const CVParamTransfer&) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user