diff --git a/docs/recommended_todo.md b/docs/recommended_todo.md
index 24dbb03a8..5dfb040ef 100644
--- a/docs/recommended_todo.md
+++ b/docs/recommended_todo.md
@@ -125,14 +125,14 @@
| singleGS_DayEnd.cpp | 31831 | itemBridge.cpp | 32145 |
| gamePlayDataMemCard.cpp | 36033 | piki.cpp | 36101 |
| routeMgr.cpp | 39173 | gameGeneratorCache.cpp | 39960 |
-| collinfo.cpp | 41629 | singleGS_MainGame.cpp | 46029 |
-| gameCaveInfo.cpp | 48322 | itemGate.cpp | 49156 |
-| cellPyramid.cpp | 51300 | pikiMgr.cpp | 52271 |
-| aiFormation.cpp | 52382 | navi_demoCheck.cpp | 60086 |
-| itemWeed.cpp | 62506 | pelletState.cpp | 62830 |
-| singleGS_CaveGame.cpp | 64613 | dynCreature.cpp | 65156 |
-| gamePlayData.cpp | 67504 | itemPlant.cpp | 73029 |
-| fakePiki.cpp | 75901 | mapMgr.cpp | 79445 |
+| collinfo.cpp | 41448 | mapMgr.cpp | 42441 |
+| singleGS_MainGame.cpp | 46029 | gameCaveInfo.cpp | 48322 |
+| itemGate.cpp | 49156 | cellPyramid.cpp | 51300 |
+| pikiMgr.cpp | 52271 | aiFormation.cpp | 52382 |
+| navi_demoCheck.cpp | 60086 | itemWeed.cpp | 62506 |
+| pelletState.cpp | 62830 | singleGS_CaveGame.cpp | 64613 |
+| dynCreature.cpp | 65156 | gamePlayData.cpp | 67504 |
+| itemPlant.cpp | 73029 | fakePiki.cpp | 75901 |
| singleGameSection.cpp | 86420 | baseGameSection.cpp | 92027 |
| itemUjamushi.cpp | 95820 | itemMgr.cpp | 102119 |
| aiPrimitives.cpp | 116955 | pelletMgr.cpp | 142712 |
diff --git a/include/Game/MapMgr.h b/include/Game/MapMgr.h
index 93c73d702..dcac6e2ca 100644
--- a/include/Game/MapMgr.h
+++ b/include/Game/MapMgr.h
@@ -32,6 +32,19 @@ struct WaterBox;
struct MapMgr : virtual public GenericObjectMgr {
struct BeamCollisionArg {
+ BeamCollisionArg(f32 p1, int p2, u8 p3)
+ {
+ _18 = p1;
+ _1C = p2;
+ _20 = p3;
+ }
+
+ Vector3f _00; // _00
+ Vector3f _0C; // _0C
+ f32 _18; // _18
+ int _1C; // _1C
+ u8 _20; // _20
+ f32 _24; // _24
};
static bool traceMoveDebug;
@@ -49,18 +62,18 @@ struct MapMgr : virtual public GenericObjectMgr {
virtual Matrixf* getDemoMatrix(); // _14
virtual void getBoundBox2d(BoundBox2d&) = 0; // _18
virtual void getBoundBox(BoundBox&) = 0; // _1C
- virtual bool findRayIntersection(Sys::RayIntersectInfo&); // _20 (weak)
+ virtual bool findRayIntersection(Sys::RayIntersectInfo&) { return false; } // _20 (weak)
virtual void traceMove(MoveInfo&, f32) = 0; // _24
virtual f32 getMinY(Vector3f&) = 0; // _28
virtual void getCurrTri(CurrTriInfo&) = 0; // _2C
- virtual void createTriangles(Sys::CreateTriangleArg& arg); // _30 (weak)
- virtual void setupJUTTextures() {}; // _34 (weak)
- virtual bool frozenable(); // _38 (weak)
+ virtual void createTriangles(Sys::CreateTriangleArg& arg) { } // _30 (weak)
+ virtual void setupJUTTextures() { } // _34 (weak)
+ virtual bool frozenable() { return false; } // _38 (weak)
virtual void update(); // _3C (weak)
- virtual void do_update(); // _40 (weak)
+ virtual void do_update() { } // _40 (weak)
virtual void drawCollision(Graphics& gfx, Sys::Sphere& boundingSphere) = 0; // _44
- virtual void doSimulation(f32 rate); // _48 (weak)
- virtual void doDirectDraw(Graphics& gfx); // _4C (weak)
+ virtual void doSimulation(f32 rate) { } // _48 (weak)
+ virtual void doDirectDraw(Graphics& gfx) { } // _4C (weak)
WaterBox* findWater(Sys::Sphere&);
f32 getMapRotation();
@@ -73,8 +86,8 @@ struct MapMgr : virtual public GenericObjectMgr {
// unused/inlined:
void draw2d(Graphics&);
- // _00: ptr to _0x24 (GenericObjectMgr)
- // _04: vtable 1
+ // _00 = ptr to _24 (GenericObjectMgr)
+ // _04 = VTBL
RouteMgr* mRouteMgr; // _08
CourseInfo* mCourseInfo; // _0C
SeaMgr* mSeaMgr; // _10
@@ -82,8 +95,7 @@ struct MapMgr : virtual public GenericObjectMgr {
u32 _18; // _18
u32 _1C; // _1C
u32 _20; // _20
-
- // _24: GenericObjectMgr
+ // _24: GenericObjectMgr
};
struct ShapeMapMgr : public MapMgr {
@@ -126,12 +138,14 @@ struct ShapeMapMgr : public MapMgr {
void load(LoadArg&);
+ // _04 = VTBL
+ // _00-_24 = MapMgr
int mTexAnimCount; // _24
Sys::MatTexAnimation* mTexAnims; // _28
Sys::MatTexAnimation* _2C; // _2C
Sys::MatLoopAnimator* _30; // _30
SysShape::Model* mMapModel; // _34
- MapCollision _38; // _38
+ MapCollision mMapCollision; // _38
};
extern MapMgr* mapMgr;
diff --git a/include/Game/WaterBox.h b/include/Game/WaterBox.h
index d37f105f0..d20b1cfe1 100644
--- a/include/Game/WaterBox.h
+++ b/include/Game/WaterBox.h
@@ -29,10 +29,6 @@ enum WBFlags {
struct WaterBox {
WaterBox();
- /**
- * @reifiedAddress{80106CE8}
- * @reifiedFile{plugProjectYamashitaU/enemyBase.cpp}
- */
virtual bool inWater(Sys::Sphere&) // _08 (weak)
{
return false;
@@ -44,10 +40,10 @@ struct WaterBox {
virtual void startDown(f32) { } // _1C (weak)
virtual void startUp(f32) { } // _20 (weak)
virtual void directDraw(Graphics&) { } // _24 (weak)
- virtual void doAnimation(); // _28 (weak)
- virtual void doEntry(); // _2C (weak)
- virtual void doSetView(int viewportNumber); // _30 (weak)
- virtual void doViewCalc(); // _34 (weak)
+ virtual void doAnimation() { } // _28 (weak)
+ virtual void doEntry() { } // _2C (weak)
+ virtual void doSetView(int viewportNumber) { } // _30 (weak)
+ virtual void doViewCalc() { } // _34 (weak)
virtual void doSimulation(f32) { } // _38 (weak)
virtual void doDirectDraw(Graphics& gfx) { } // _3C (weak)
virtual void attachModel(J3DModelData*, Sys::MatTexAnimation*,
diff --git a/include/Game/gameStages.h b/include/Game/gameStages.h
index aa90bf3e4..9cc669d0a 100644
--- a/include/Game/gameStages.h
+++ b/include/Game/gameStages.h
@@ -78,23 +78,22 @@ struct CourseInfo : public CNode {
ID32* getCaveID_FromIndex(int);
int getCaveNum();
- char* mFolder; // _18
- char* mAbeFolder; // _1C
- char* mModelPath; // _20
- char* mCollisionPath; // _24
- char* mWaterboxPath; // _28
- char* mMapcodePath; // _2C
- char* mFarmPath; // _30
- char* mRoutePath; // _34
- Vector3f mStartPosition; // _38
- f32 mStartAngle; // _44
- u32 mCourseIndex; // _48
-
+ char* mFolder; // _18
+ char* mAbeFolder; // _1C
+ char* mModelPath; // _20
+ char* mCollisionPath; // _24
+ char* mWaterboxPath; // _28
+ char* mMapcodePath; // _2C
+ char* mFarmPath; // _30
+ char* mRoutePath; // _34
+ Vector3f mStartPosition; // _38
+ f32 mStartAngle; // _44
+ u32 mCourseIndex; // _48
LimitGenInfo mLimitGenInfo; // _4C
LimitGenInfo mLoopGenInfo; // _78
CaveOtakaraInfo mCaveOtakaraInfo; // _9C
int mGroundOtakaraMax; // _CC
- Matrixf _D0; // _D0
+ Matrixf mDemoMatrix; // _D0
};
struct Stages {
diff --git a/include/MapCollision.h b/include/MapCollision.h
index 488ee490f..aa83acf8a 100644
--- a/include/MapCollision.h
+++ b/include/MapCollision.h
@@ -10,16 +10,18 @@
struct MapCollision : public CNode {
MapCollision() { }
- virtual ~MapCollision() {};
- virtual void getBoundBox(BoundBox& bb) { mDivider->getBoundBox(bb); }
- virtual void getCurrTri(Game::CurrTriInfo&);
- virtual void createTriangles(Sys::CreateTriangleArg& arg);
+ virtual ~MapCollision() { } // _08
+ virtual void getBoundBox(BoundBox& bb) { mDivider->getBoundBox(bb); } // _10
+ virtual void getCurrTri(Game::CurrTriInfo&); // _14
+ virtual void createTriangles(Sys::CreateTriangleArg& arg) { mDivider->createTriangles(arg); } // _18
void read(Stream&);
MapCollision* clone(Matrixf&);
- Sys::GridDivider* mDivider; // _18
+ // _00 = VTBL
+ // _00-_18 = CNode
+ Sys::TriDivider* mDivider; // _18
};
#endif
diff --git a/src/plugProjectKandoU/collinfo.cpp b/src/plugProjectKandoU/collinfo.cpp
index 0037d7623..2e7b8c7ef 100644
--- a/src/plugProjectKandoU/collinfo.cpp
+++ b/src/plugProjectKandoU/collinfo.cpp
@@ -43,7 +43,7 @@ void Platform::setTriDivider(Sys::TriDivider* triDivider)
* Address: 801336EC
* Size: 000008
*/
-Sys::TriDivider* Platform::getTriDivider() { return mTriDivider; }
+Sys::OBBTree* Platform::getTriDivider() { return mTriDivider; }
/*
* read__8PlatformFR6Stream
@@ -608,7 +608,6 @@ int CollPart::getAllCollPartToArray(CollPart** partArray, int limit, int& count)
* Address: 80136A04
* Size: 000118
*/
-// WIP: https://decomp.me/scratch/BSzdU - just regswaps in the dist calculation
CollPart* CollTree::findCollPart(FindCollPartArg& findArg)
{
if (mPart) {
@@ -621,8 +620,7 @@ CollPart* CollTree::findCollPart(FindCollPartArg& findArg)
for (int i = 0; i < numParts; i++) {
CollPart* currPart = partArray[i];
if (((findArg.mCondition == nullptr) || findArg.mCondition->satisfy(currPart)) && currPart->isSphere()) {
- Vector3f sep(findArg.mPosition.mPosition - currPart->mPosition);
- f32 dist = (sep).sqrMagnitude() - SQUARE(currPart->mRadius);
+ f32 dist = findArg.mPosition.mPosition.sqrDistance(currPart->mPosition) - SQUARE(currPart->mRadius);
if (dist < minDist) {
foundPart = currPart;
minDist = dist;
@@ -839,7 +837,6 @@ void CollPart::makeMatrixTo(Matrixf& p1)
* Address: 8013739C
* Size: 000214
*/
-// WIP: https://decomp.me/scratch/b2SSt
void CollPart::makeTubeTree()
{
if (getChild()) {
@@ -868,9 +865,8 @@ void CollPart::calcStickLocal(Vector3f& arg0, Vector3f& arg1)
Matrixf inv;
PSMTXInverse(mtx.mMatrix.mtxView, inv.mMatrix.mtxView);
- Vector3f row1 = mtx.getRow(0);
+ Vector3f row1 = Vector3f(mtx.getRow(0));
- // this... doesn't use length()?
f32 len = row1.length();
if (FABS(len) < 0.001f) {
diff --git a/src/plugProjectKandoU/gameStages.cpp b/src/plugProjectKandoU/gameStages.cpp
index 298f46231..d67720f37 100644
--- a/src/plugProjectKandoU/gameStages.cpp
+++ b/src/plugProjectKandoU/gameStages.cpp
@@ -177,7 +177,7 @@ CourseInfo::CourseInfo()
mCourseIndex = 0;
- PSMTXIdentity(_D0.mMatrix.mtxView);
+ PSMTXIdentity(mDemoMatrix.mMatrix.mtxView);
mGroundOtakaraMax = 0;
}
@@ -267,8 +267,8 @@ void CourseInfo::read(Stream& stream)
stream.readString(nullptr, 0);
// Convert angle to radians
- Vector3f vec(0.0f, 3.1415927f * (0.0055555557f * mStartAngle), 0.0f);
- _D0.makeTR(mStartPosition, vec);
+ Vector3f vec(0.0f, TORADIANS(mStartAngle), 0.0f);
+ mDemoMatrix.makeTR(mStartPosition, vec);
}
mLimitGenInfo.read(stream);
diff --git a/src/plugProjectKandoU/mapMgr.cpp b/src/plugProjectKandoU/mapMgr.cpp
index e46bacde4..0de8aa75b 100644
--- a/src/plugProjectKandoU/mapMgr.cpp
+++ b/src/plugProjectKandoU/mapMgr.cpp
@@ -13,275 +13,13 @@
#include "Sys/TriangleTable.h"
#include "System.h"
#include "types.h"
-
-/*
- Generated from dpostproc
-
- .section .ctors, "wa" # 0x80472F00 - 0x804732C0
- .4byte __sinit_mapMgr_cpp
-
- .section .rodata # 0x804732E0 - 0x8049E220
- .global lbl_8047E190
- lbl_8047E190:
- .4byte 0x00000000
- .4byte 0x00000000
- .4byte 0x00000000
- .global lbl_8047E19C
- lbl_8047E19C:
- .4byte 0x6D61704D
- .4byte 0x67722E63
- .4byte 0x70700000
- .global lbl_8047E1A8
- lbl_8047E1A8:
- .asciz "P2Assert"
- .skip 3
- .4byte 0x25732F61
- .4byte 0x72632E73
- .4byte 0x7A730000
- .4byte 0x25732F61
- .4byte 0x72632E61
- .4byte 0x72630000
- .4byte 0x6D617020
- .4byte 0x6D6F6465
- .4byte 0x6C000000
- .4byte 0x6D6F6465
- .4byte 0x6C2E626D
- .4byte 0x64000000
- .4byte 0x6661726D
- .4byte 0x5F25642E
- .4byte 0x626D6400
- .4byte 0x74657861
- .4byte 0x6E6D5F25
- .4byte 0x642E6274
- .4byte 0x6B000000
- .4byte 0x25732F6C
- .4byte 0x69676874
- .4byte 0x2E696E69
- .4byte 0x00000000
- .4byte 0x25732F74
- .4byte 0x65787473
- .4byte 0x2E737A73
- .4byte 0x00000000
- .4byte 0x67726964
- .4byte 0x2E62696E
- .4byte 0x00000000
- .4byte 0x6D617020
- .4byte 0x636F6C6C
- .4byte 0x6973696F
- .4byte 0x6E000000
- .4byte 0x77617465
- .4byte 0x72626F78
- .4byte 0x2E747874
- .4byte 0x00000000
- .4byte 0x77617465
- .4byte 0x72626F78
- .4byte 0x00000000
- .4byte 0x6D617063
- .4byte 0x6F64652E
- .4byte 0x62696E00
- .4byte 0x726F7574
- .4byte 0x65496E66
- .4byte 0x6F000000
- .4byte 0x6C6F6F70
- .4byte 0x2061762E
- .4byte 0x20252E31
- .4byte 0x66000000
- .4byte 0x25642025
- .4byte 0x64202564
- .4byte 0x3C25643E
- .4byte 0x00000000
- .4byte 0x74726973
- .4byte 0x2061762E
- .4byte 0x20252E31
- .4byte 0x66000000
-
- .section .data, "wa" # 0x8049E220 - 0x804EFC20
- .global lbl_804B18A8
- lbl_804B18A8:
- .4byte 0x00000000
- .4byte 0x00000000
- .4byte 0x00000000
- .global __vt__Q24Game11ShapeMapMgr
- __vt__Q24Game11ShapeMapMgr:
- .4byte 0
- .4byte 0
- .4byte hasHiddenCollision__Q24Game6MapMgrFv
- .4byte constraintBoundBox__Q24Game6MapMgrFRQ23Sys6Sphere
- .4byte "getStartPosition__Q24Game6MapMgrFR10Vector3i"
- .4byte getDemoMatrix__Q24Game6MapMgrFv
- .4byte getBoundBox2d__Q24Game11ShapeMapMgrFR10BoundBox2d
- .4byte getBoundBox__Q24Game11ShapeMapMgrFR8BoundBox
- .4byte
- findRayIntersection__Q24Game11ShapeMapMgrFRQ23Sys16RayIntersectInfo .4byte
- traceMove__Q24Game11ShapeMapMgrFRQ24Game8MoveInfof .4byte
- "getMinY__Q24Game11ShapeMapMgrFR10Vector3" .4byte
- getCurrTri__Q24Game11ShapeMapMgrFRQ24Game11CurrTriInfo .4byte
- createTriangles__Q24Game11ShapeMapMgrFRQ23Sys17CreateTriangleArg .4byte
- setupJUTTextures__Q24Game6MapMgrFv .4byte frozenable__Q24Game6MapMgrFv .4byte
- update__Q24Game6MapMgrFv .4byte do_update__Q24Game11ShapeMapMgrFv .4byte
- drawCollision__Q24Game11ShapeMapMgrFR8GraphicsRQ23Sys6Sphere .4byte
- doSimulation__Q24Game6MapMgrFf .4byte doDirectDraw__Q24Game6MapMgrFR8Graphics
- .4byte doAnimation__Q24Game11ShapeMapMgrFv
- .4byte doSetView__Q24Game11ShapeMapMgrFi
- .4byte doViewCalc__Q24Game11ShapeMapMgrFv
- .4byte doEntry__Q24Game11ShapeMapMgrFv
- .4byte 0
- .4byte 0
- .4byte "@84@4@doAnimation__Q24Game11ShapeMapMgrFv"
- .4byte "@84@4@doEntry__Q24Game11ShapeMapMgrFv"
- .4byte "@84@4@doSetView__Q24Game11ShapeMapMgrFi"
- .4byte "@84@4@doViewCalc__Q24Game11ShapeMapMgrFv"
- .4byte "@84@4@doSimulation__Q24Game6MapMgrFf"
- .4byte "@84@4@doDirectDraw__Q24Game6MapMgrFR8Graphics"
- .4byte doSimpleDraw__16GenericObjectMgrFP8Viewport
- .4byte loadResources__16GenericObjectMgrFv
- .4byte resetMgr__16GenericObjectMgrFv
- .4byte pausable__16GenericObjectMgrFv
- .4byte "@84@4@frozenable__Q24Game6MapMgrFv"
- .4byte getMatrixLoadType__16GenericObjectMgrFv
- .global __vt__Q24Game6MapMgr
- __vt__Q24Game6MapMgr:
- .4byte 0
- .4byte 0
- .4byte hasHiddenCollision__Q24Game6MapMgrFv
- .4byte constraintBoundBox__Q24Game6MapMgrFRQ23Sys6Sphere
- .4byte "getStartPosition__Q24Game6MapMgrFR10Vector3i"
- .4byte getDemoMatrix__Q24Game6MapMgrFv
- .4byte 0
- .4byte 0
- .4byte findRayIntersection__Q24Game6MapMgrFRQ23Sys16RayIntersectInfo
- .4byte 0
- .4byte 0
- .4byte 0
- .4byte createTriangles__Q24Game6MapMgrFRQ23Sys17CreateTriangleArg
- .4byte setupJUTTextures__Q24Game6MapMgrFv
- .4byte frozenable__Q24Game6MapMgrFv
- .4byte update__Q24Game6MapMgrFv
- .4byte do_update__Q24Game6MapMgrFv
- .4byte 0
- .4byte doSimulation__Q24Game6MapMgrFf
- .4byte doDirectDraw__Q24Game6MapMgrFR8Graphics
- .4byte 0
- .4byte 0
- .4byte 0
- .4byte doEntry__16GenericObjectMgrFv
- .4byte 0
- .4byte 0
- .4byte "@36@4@doSimulation__Q24Game6MapMgrFf"
- .4byte "@36@4@doDirectDraw__Q24Game6MapMgrFR8Graphics"
- .4byte doSimpleDraw__16GenericObjectMgrFP8Viewport
- .4byte loadResources__16GenericObjectMgrFv
- .4byte resetMgr__16GenericObjectMgrFv
- .4byte pausable__16GenericObjectMgrFv
- .4byte "@36@4@frozenable__Q24Game6MapMgrFv"
- .4byte getMatrixLoadType__16GenericObjectMgrFv
- .global "__vt__26Iterator"
- "__vt__26Iterator":
- .4byte 0
- .4byte 0
- .4byte "first__26IteratorFv"
- .4byte "next__26IteratorFv"
- .4byte "isDone__26IteratorFv"
- .4byte "__ml__26IteratorFv"
- .4byte 0
-
- .section .sbss # 0x80514D80 - 0x80516360
- .global lbl_80515980
- lbl_80515980:
- .skip 0x4
- .global lbl_80515984
- lbl_80515984:
- .skip 0x4
- .global mapMgr__4Game
- mapMgr__4Game:
- .skip 0x4
- .global traceMoveDebug__Q24Game6MapMgr
- traceMoveDebug__Q24Game6MapMgr:
- .skip 0x4
-
- .section .sdata2, "a" # 0x80516360 - 0x80520E40
- .global lbl_80518860
- lbl_80518860:
- .4byte 0x6D61704D
- .4byte 0x67720000
- .global lbl_80518868
- lbl_80518868:
- .4byte 0x41080000
- .global lbl_8051886C
- lbl_8051886C:
- .4byte 0x00000000
- .global lbl_80518870
- lbl_80518870:
- .4byte 0x40490FDB
- .global lbl_80518874
- lbl_80518874:
- .4byte 0x3BB60B61
- .global lbl_80518878
- lbl_80518878:
- .4byte 0x41700000
- .global lbl_8051887C
- lbl_8051887C:
- .4byte 0x3EC90FDB
- .global lbl_80518880
- lbl_80518880:
- .4byte 0x43A2F983
- .global lbl_80518884
- lbl_80518884:
- .4byte 0xC3A2F983
- .global lbl_80518888
- lbl_80518888:
- .4byte 0x41200000
- .global lbl_8051888C
- lbl_8051888C:
- .4byte 0x40400000
- .global lbl_80518890
- lbl_80518890:
- .4byte 0x47FA0000
- .4byte 0x00000000
- .global lbl_80518898
- lbl_80518898:
- .4byte 0x43300000
- .4byte 0x80000000
- .global lbl_805188A0
- lbl_805188A0:
- .4byte 0x51BA43B7
- .global lbl_805188A4
- lbl_805188A4:
- .float 1.0
- .global lbl_805188A8
- lbl_805188A8:
- .4byte 0x41F00000
- .global lbl_805188AC
- lbl_805188AC:
- .4byte 0x3F19999A
- .global lbl_805188B0
- lbl_805188B0:
- .4byte 0x6D617020
- .4byte 0x61726300
- .global lbl_805188B8
- lbl_805188B8:
- .4byte 0xC7FA0000
- .global lbl_805188BC
- lbl_805188BC:
- .4byte 0x454E542D
- .4byte 0x4D415000
- .global lbl_805188C4
- lbl_805188C4:
- .float 0.5
- .global lbl_805188C8
- lbl_805188C8:
- .4byte 0x4B435000
- .global lbl_805188CC
- lbl_805188CC:
- .4byte 0x47000000
- .global lbl_805188D0
- lbl_805188D0:
- .4byte 0xC7000000
- .4byte 0x00000000
-*/
+#include "nans.h"
namespace Game {
+static const char unusedName[] = "mapMgr";
+static const int unusedArray[] = { 0, 0, 0 };
+
/*
* --INFO--
* Address: ........
@@ -371,56 +109,6 @@ void TDispTriangle::store(Sys::Triangle& triangle, Sys::VertexTable& vertexTable
_28.typeView |= 1;
_2C = p3;
PSMTXIdentity(_30.mMatrix.mtxView);
- /*
- stwu r1, -0x10(r1)
- mflr r0
- mr r9, r3
- stw r0, 0x14(r1)
- li r0, 0
- stw r4, 0(r3)
- addi r3, r9, 0x30
- lwz r7, 0(r4)
- lwz r8, 0x24(r5)
- mulli r7, r7, 0xc
- add r7, r8, r7
- lfs f0, 0(r7)
- stfs f0, 4(r9)
- lfs f0, 4(r7)
- stfs f0, 8(r9)
- lfs f0, 8(r7)
- stfs f0, 0xc(r9)
- lwz r7, 4(r4)
- lwz r8, 0x24(r5)
- mulli r7, r7, 0xc
- add r7, r8, r7
- lfs f0, 0(r7)
- stfs f0, 0x10(r9)
- lfs f0, 4(r7)
- stfs f0, 0x14(r9)
- lfs f0, 8(r7)
- stfs f0, 0x18(r9)
- lwz r4, 8(r4)
- lwz r5, 0x24(r5)
- mulli r4, r4, 0xc
- add r4, r5, r4
- lfs f0, 0(r4)
- stfs f0, 0x1c(r9)
- lfs f0, 4(r4)
- stfs f0, 0x20(r9)
- lfs f0, 8(r4)
- stfs f0, 0x24(r9)
- stb r0, 0x28(r9)
- stb r0, 0x29(r9)
- lhz r0, 0x28(r9)
- ori r0, r0, 1
- sth r0, 0x28(r9)
- stw r6, 0x2c(r9)
- bl PSMTXIdentity
- lwz r0, 0x14(r1)
- mtlr r0
- addi r1, r1, 0x10
- blr
- */
}
/*
@@ -428,74 +116,16 @@ void TDispTriangle::store(Sys::Triangle& triangle, Sys::VertexTable& vertexTable
* Address: 801624E4
* Size: 000100
*/
-void TDispTriangle::store(Matrixf&, Sys::Triangle&, Sys::VertexTable&, int)
+void TDispTriangle::store(Matrixf& mtx, Sys::Triangle& tri, Sys::VertexTable& vertTable, int p4)
{
- /*
- stwu r1, -0x50(r1)
- mflr r0
- stw r0, 0x54(r1)
- stmw r27, 0x3c(r1)
- mr r29, r5
- mr r28, r4
- mr r27, r3
- mr r30, r6
- mr r31, r7
- stw r29, 0(r3)
- mr r3, r28
- lwz r0, 0(r5)
- addi r5, r1, 0x20
- lwz r4, 0x24(r6)
- mulli r0, r0, 0xc
- add r4, r4, r0
- bl PSMTXMultVec
- lfs f1, 0x24(r1)
- mr r3, r28
- lfs f2, 0x28(r1)
- addi r5, r1, 0x14
- lfs f0, 0x20(r1)
- stfs f0, 4(r27)
- stfs f1, 8(r27)
- stfs f2, 0xc(r27)
- lwz r0, 4(r29)
- lwz r4, 0x24(r30)
- mulli r0, r0, 0xc
- add r4, r4, r0
- bl PSMTXMultVec
- lfs f1, 0x18(r1)
- mr r3, r28
- lfs f2, 0x1c(r1)
- addi r5, r1, 8
- lfs f0, 0x14(r1)
- stfs f0, 0x10(r27)
- stfs f1, 0x14(r27)
- stfs f2, 0x18(r27)
- lwz r0, 8(r29)
- lwz r4, 0x24(r30)
- mulli r0, r0, 0xc
- add r4, r4, r0
- bl PSMTXMultVec
- lfs f1, 0xc(r1)
- li r0, 0
- lfs f2, 0x10(r1)
- mr r3, r28
- lfs f0, 8(r1)
- addi r4, r27, 0x30
- stfs f0, 0x1c(r27)
- stfs f1, 0x20(r27)
- stfs f2, 0x24(r27)
- stb r0, 0x28(r27)
- stb r0, 0x29(r27)
- lhz r0, 0x28(r27)
- ori r0, r0, 1
- sth r0, 0x28(r27)
- stw r31, 0x2c(r27)
- bl PSMTXCopy
- lmw r27, 0x3c(r1)
- lwz r0, 0x54(r1)
- mtlr r0
- addi r1, r1, 0x50
- blr
- */
+ mSysTriangle = &tri;
+ mVertices[0] = mtx.mtxMult(vertTable.mObjects[tri.mVertices.x]);
+ mVertices[1] = mtx.mtxMult(vertTable.mObjects[tri.mVertices.y]);
+ mVertices[2] = mtx.mtxMult(vertTable.mObjects[tri.mVertices.z]);
+ _28.clear();
+ _28.typeView |= 1;
+ _2C = p4;
+ PSMTXCopy(mtx.mMatrix.mtxView, _30.mMatrix.mtxView);
}
/*
@@ -527,49 +157,12 @@ MapMgr::MapMgr()
*/
void MapMgr::getStartPosition(Vector3f& outPosition, int p2)
{
- if (mCourseInfo != nullptr) {
+ if (mCourseInfo) {
outPosition = mCourseInfo->mStartPosition;
outPosition.y = getMinY(outPosition) + 8.5f;
} else {
outPosition = Vector3f(0.0f);
}
- /*
- stwu r1, -0x10(r1)
- mflr r0
- stw r0, 0x14(r1)
- stw r31, 0xc(r1)
- mr r31, r4
- lwz r5, 0xc(r3)
- cmplwi r5, 0
- beq lbl_801626D4
- lfs f0, 0x38(r5)
- stfs f0, 0(r31)
- lfs f0, 0x3c(r5)
- stfs f0, 4(r31)
- lfs f0, 0x40(r5)
- stfs f0, 8(r31)
- lwz r12, 4(r3)
- lwz r12, 0x28(r12)
- mtctr r12
- bctrl
- lfs f0, lbl_80518868@sda21(r2)
- fadds f0, f0, f1
- stfs f0, 4(r31)
- b lbl_801626E4
-
-lbl_801626D4:
- lfs f0, lbl_8051886C@sda21(r2)
- stfs f0, 0(r31)
- stfs f0, 4(r31)
- stfs f0, 8(r31)
-
-lbl_801626E4:
- lwz r0, 0x14(r1)
- lwz r31, 0xc(r1)
- mtlr r0
- addi r1, r1, 0x10
- blr
- */
}
/*
@@ -579,21 +172,11 @@ lbl_801626E4:
*/
f32 MapMgr::getMapRotation()
{
- /*
- lwz r3, 0xc(r3)
- cmplwi r3, 0
- beq lbl_8016271C
- lfs f1, lbl_80518874@sda21(r2)
- lfs f0, 0x44(r3)
- lfs f2, lbl_80518870@sda21(r2)
- fmuls f0, f1, f0
- fmuls f1, f2, f0
- blr
+ if (mCourseInfo) {
+ return TORADIANS(mCourseInfo->mStartAngle);
+ }
-lbl_8016271C:
- lfs f1, lbl_8051886C@sda21(r2)
- blr
- */
+ return 0.0f;
}
/*
@@ -601,15 +184,32 @@ lbl_8016271C:
* Address: 80162724
* Size: 00001C
*/
-Matrixf* MapMgr::getDemoMatrix() { return (mCourseInfo != nullptr) ? &mCourseInfo->_D0 : nullptr; }
+Matrixf* MapMgr::getDemoMatrix() { return (mCourseInfo) ? &mCourseInfo->mDemoMatrix : nullptr; }
/*
* --INFO--
* Address: 80162740
* Size: 000704
*/
-f32 MapMgr::getBestAngle(Vector3f&, f32, f32)
+f32 MapMgr::getBestAngle(Vector3f& vec, f32 p2, f32 p3)
{
+ P2ASSERTLINE(488, p3 > 0.0f);
+ Vector3f pos = vec;
+ pos.y = 15.0f + getMinY(pos);
+ f32 angles[16];
+ for (int i = 0; i < 16; i++) {
+ angles[i] = 0.0f;
+ }
+
+ for (int i = 0; i < 16; i++) {
+ f32 val = (PI / 8) * (f32)i;
+ f32 tanTheta = p2 * (f32)tan(p3);
+
+ BeamCollisionArg beamArg(10.0f, 0, 0);
+ beamArg._00 = pos;
+ checkBeamCollision(beamArg);
+ angles[i] = beamArg._24;
+ }
/*
stwu r1, -0x180(r1)
mflr r0
@@ -1935,53 +1535,6 @@ void ShapeMapMgr::do_update()
}
mMapModel->getJ3DModel()->calcMaterial();
mMapModel->getJ3DModel()->diff();
- /*
- stwu r1, -0x20(r1)
- mflr r0
- stw r0, 0x24(r1)
- stw r31, 0x1c(r1)
- stw r30, 0x18(r1)
- stw r29, 0x14(r1)
- mr r29, r3
- lwz r3, gameSystem__4Game@sda21(r13)
- bl paused__Q24Game10GameSystemFv
- clrlwi. r0, r3, 0x18
- bne lbl_801639DC
- li r30, 0
- li r31, 0
- b lbl_801639AC
-
-lbl_80163994:
- lwz r0, 0x30(r29)
- lfs f1, lbl_805188A8@sda21(r2)
- add r3, r0, r31
- bl animate__Q23Sys15MatBaseAnimatorFf
- addi r31, r31, 0xc
- addi r30, r30, 1
-
-lbl_801639AC:
- lwz r0, 0x24(r29)
- cmpw r30, r0
- blt lbl_80163994
- lwz r3, 0x34(r29)
- lwz r3, 8(r3)
- lwz r12, 0(r3)
- lwz r12, 0x14(r12)
- mtctr r12
- bctrl
- lwz r3, 0x34(r29)
- lwz r3, 8(r3)
- bl diff__8J3DModelFv
-
-lbl_801639DC:
- lwz r0, 0x24(r1)
- lwz r31, 0x1c(r1)
- lwz r30, 0x18(r1)
- lwz r29, 0x14(r1)
- mtlr r0
- addi r1, r1, 0x20
- blr
- */
}
/*
@@ -1998,13 +1551,6 @@ void MapMgr::update()
do_update();
}
-/*
- * --INFO--
- * Address: 80163A48
- * Size: 000004
- */
-void MapMgr::do_update() { }
-
/*
* --INFO--
* Address: 80163A4C
@@ -2038,59 +1584,12 @@ void ShapeMapMgr::drawCollision(Graphics& gfx, ::Sys::Sphere& boundingSphere)
gfx.initPrimDraw(nullptr);
gfx._084 = Color4(50, 255, 10, 255);
GXSetLineWidth(' ', GX_TO_ZERO);
- Sys::TriIndexList* triLists = _38.mDivider->findTriLists(boundingSphere);
- Sys::GridDivider* divider = _38.mDivider;
- if (triLists != nullptr) {
- triLists->draw(gfx, *divider->mVertexTable, *divider->mTriangleTable, true);
+ Sys::TriIndexList* triLists = mMapCollision.mDivider->findTriLists(boundingSphere);
+ Sys::VertexTable& vertTable = *mMapCollision.mDivider->mVertexTable;
+ Sys::TriangleTable& triTable = *mMapCollision.mDivider->mTriangleTable;
+ if (triLists) {
+ triLists->draw(gfx, vertTable, triTable, true);
}
- /*
- stwu r1, -0x20(r1)
- mflr r0
- stw r0, 0x24(r1)
- stw r31, 0x1c(r1)
- mr r31, r5
- stw r30, 0x18(r1)
- mr r30, r4
- li r4, 0
- stw r29, 0x14(r1)
- mr r29, r3
- mr r3, r30
- bl initPrimDraw__8GraphicsFP7Matrixf
- li r0, 0x32
- li r5, 0xff
- stb r0, 0x84(r30)
- li r0, 0xa
- li r3, 0x20
- li r4, 0
- stb r5, 0x85(r30)
- stb r0, 0x86(r30)
- stb r5, 0x87(r30)
- bl GXSetLineWidth
- lwz r3, 0x50(r29)
- mr r4, r31
- lwz r12, 0(r3)
- lwz r12, 0x14(r12)
- mtctr r12
- bctrl
- lwz r4, 0x50(r29)
- cmplwi r3, 0
- lwz r5, 0x18(r4)
- lwz r6, 0x1c(r4)
- beq lbl_80163AF4
- mr r4, r30
- li r7, 1
- bl
-draw__Q23Sys12TriIndexListFR8GraphicsRQ23Sys11VertexTableRQ23Sys13TriangleTableb
-
-lbl_80163AF4:
- lwz r0, 0x24(r1)
- lwz r31, 0x1c(r1)
- lwz r30, 0x18(r1)
- lwz r29, 0x14(r1)
- mtlr r0
- addi r1, r1, 0x20
- blr
- */
}
/*
@@ -2098,55 +1597,20 @@ lbl_80163AF4:
* Address: 80163B10
* Size: 00002C
*/
-void ShapeMapMgr::createTriangles(::Sys::CreateTriangleArg& arg) { _38.createTriangles(arg); }
+void ShapeMapMgr::createTriangles(::Sys::CreateTriangleArg& arg) { mMapCollision.createTriangles(arg); }
-} // namespace Game
-
-/*
- * --INFO--
- * Address: 80163B3C
- * Size: 000030
- */
-void MapCollision::createTriangles(Sys::CreateTriangleArg& arg) { mDivider->createTriangles(arg); }
-
-// namespace Sys {
-
-/*
- * --INFO--
- * Address: 80163B6C
- * Size: 000004
- */
-// void TriDivider::createTriangles(Sys::CreateTriangleArg&) { }
-
-// } // namespace Sys
-
-namespace Game {
/*
* --INFO--
* Address: 80163B70
* Size: 00008C
*/
-// void getMinY__Q24Game11ShapeMapMgrFR10Vector3f()
-f32 ShapeMapMgr::getMinY(Vector3f& origin)
+f32 ShapeMapMgr::getMinY(Vector3f& pos)
{
CurrTriInfo info;
- // FROM HERE
- info.mTriangle = nullptr;
- info.mMaxY = 128000.0f;
- info.mMinY = -128000.0f;
- info.mTable = nullptr;
-
- info.mNormalVec = Vector3f(0.0f, 1.0f, 0.0f);
-
- info._0C = true;
- info.mGetFullInfo = false;
- // TO HERE
- // IS CONSTRUCTOR!!!
-
- info.mPosition = origin;
+ info.mPosition = pos;
info._0C = false;
- getCurrTri(info);
+ mMapCollision.getCurrTri(info);
return info.mMinY;
}
@@ -2155,7 +1619,7 @@ f32 ShapeMapMgr::getMinY(Vector3f& origin)
* Address: 80163BFC
* Size: 00002C
*/
-void ShapeMapMgr::getCurrTri(Game::CurrTriInfo& info) { _38.getCurrTri(info); }
+void ShapeMapMgr::getCurrTri(Game::CurrTriInfo& info) { mMapCollision.getCurrTri(info); }
/*
* --INFO--
@@ -2164,27 +1628,9 @@ void ShapeMapMgr::getCurrTri(Game::CurrTriInfo& info) { _38.getCurrTri(info); }
*/
void ShapeMapMgr::doAnimation()
{
- if (mSeaMgr != nullptr) {
+ if (mSeaMgr) {
mSeaMgr->doAnimation();
}
- /*
- stwu r1, -0x10(r1)
- mflr r0
- stw r0, 0x14(r1)
- lwz r3, 0x10(r3)
- cmplwi r3, 0
- beq lbl_80163C50
- lwz r12, 0(r3)
- lwz r12, 0x64(r12)
- mtctr r12
- bctrl
-
-lbl_80163C50:
- lwz r0, 0x14(r1)
- mtlr r0
- addi r1, r1, 0x10
- blr
- */
}
/*
@@ -2194,34 +1640,10 @@ lbl_80163C50:
*/
void ShapeMapMgr::doSetView(int viewportNumber)
{
- /*
- stwu r1, -0x10(r1)
- mflr r0
- stw r0, 0x14(r1)
- stw r31, 0xc(r1)
- mr r31, r4
- clrlwi r4, r4, 0x10
- stw r30, 8(r1)
- mr r30, r3
- lwz r3, 0x34(r3)
- bl setCurrentViewNo__Q28SysShape5ModelFUl
- lwz r3, 0x10(r30)
- cmplwi r3, 0
- beq lbl_80163CA8
- lwz r12, 0(r3)
- mr r4, r31
- lwz r12, 0x6c(r12)
- mtctr r12
- bctrl
-
-lbl_80163CA8:
- lwz r0, 0x14(r1)
- lwz r31, 0xc(r1)
- lwz r30, 8(r1)
- mtlr r0
- addi r1, r1, 0x10
- blr
- */
+ mMapModel->setCurrentViewNo((u16)viewportNumber);
+ if (mSeaMgr) {
+ mSeaMgr->doSetView(viewportNumber);
+ }
}
/*
@@ -2231,29 +1653,11 @@ lbl_80163CA8:
*/
void ShapeMapMgr::doViewCalc()
{
- /*
- stwu r1, -0x10(r1)
- mflr r0
- stw r0, 0x14(r1)
- stw r31, 0xc(r1)
- mr r31, r3
- lwz r3, 0x10(r3)
- cmplwi r3, 0
- beq lbl_80163CF0
- lwz r12, 0(r3)
- lwz r12, 0x70(r12)
- mtctr r12
- bctrl
+ if (mSeaMgr) {
+ mSeaMgr->doViewCalc();
+ }
-lbl_80163CF0:
- lwz r3, 0x34(r31)
- bl viewCalc__Q28SysShape5ModelFv
- lwz r0, 0x14(r1)
- lwz r31, 0xc(r1)
- mtlr r0
- addi r1, r1, 0x10
- blr
- */
+ mMapModel->viewCalc();
}
/*
@@ -2275,62 +1679,6 @@ void ShapeMapMgr::doEntry()
mMapModel->getJ3DModel()->entry();
}
sys->mTimers->_stop("ENT-MAP");
- /*
- stwu r1, -0x10(r1)
- mflr r0
- addi r4, r2, lbl_805188BC@sda21
- li r5, 1
- stw r0, 0x14(r1)
- stw r31, 0xc(r1)
- mr r31, r3
- lwz r6, sys@sda21(r13)
- lwz r3, 0x28(r6)
- bl _start__9SysTimersFPcb
- lwz r0, gameSystem__4Game@sda21(r13)
- cmplwi r0, 0
- beq lbl_80163D90
- lwz r3, 0x10(r31)
- cmplwi r3, 0
- beq lbl_80163D5C
- lwz r12, 0(r3)
- lwz r12, 0x68(r12)
- mtctr r12
- bctrl
-
-lbl_80163D5C:
- lwz r3, gameSystem__4Game@sda21(r13)
- li r4, 2
- bl setDrawBuffer__Q24Game10GameSystemFi
- lwz r3, 0x34(r31)
- lwz r3, 8(r3)
- lwz r12, 0(r3)
- lwz r12, 0xc(r12)
- mtctr r12
- bctrl
- lwz r3, gameSystem__4Game@sda21(r13)
- li r4, 0
- bl setDrawBuffer__Q24Game10GameSystemFi
- b lbl_80163DA8
-
-lbl_80163D90:
- lwz r3, 0x34(r31)
- lwz r3, 8(r3)
- lwz r12, 0(r3)
- lwz r12, 0xc(r12)
- mtctr r12
- bctrl
-
-lbl_80163DA8:
- lwz r3, sys@sda21(r13)
- addi r4, r2, lbl_805188BC@sda21
- lwz r3, 0x28(r3)
- bl _stop__9SysTimersFPc
- lwz r0, 0x14(r1)
- lwz r31, 0xc(r1)
- mtlr r0
- addi r1, r1, 0x10
- blr
- */
}
/*
@@ -2580,1050 +1928,4 @@ void ShapeMapMgr::getBoundBox(BoundBox&)
blr
*/
}
-
-/*
- * --INFO--
- * Address: 801640F0
- * Size: 000008
- */
-bool MapMgr::frozenable() { return false; }
-
-/*
- * --INFO--
- * Address: 801640F8
- * Size: 000004
- */
-void MapMgr::doDirectDraw(Graphics&) { }
-
-/*
- * --INFO--
- * Address: 801640FC
- * Size: 000004
- */
-void MapMgr::doSimulation(f32) { }
-
-/*
- * --INFO--
- * Address: 80164100
- * Size: 000008
- */
-bool MapMgr::findRayIntersection(::Sys::RayIntersectInfo&) { return 0x0; }
-
-/*
- * --INFO--
- * Address: 80164108
- * Size: 000004
- */
-void MapMgr::createTriangles(::Sys::CreateTriangleArg&) { }
-
-/*
- * --INFO--
- * Address: 8016410C
- * Size: 0001E4
- */
-// void ObjectMgr::doViewCalc()
-// {
-// /*
-// stwu r1, -0x20(r1)
-// mflr r0
-// lis r4, "__vt__26Iterator"@ha
-// stw r0, 0x24(r1)
-// li r0, 0
-// addi r4, r4, "__vt__26Iterator"@l
-// cmplwi r0, 0
-// stw r0, 0x14(r1)
-// stw r4, 8(r1)
-// stw r0, 0xc(r1)
-// stw r3, 0x10(r1)
-// bne lbl_80164154
-// lwz r12, 0(r3)
-// lwz r12, 0x18(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801642C0
-
-// lbl_80164154:
-// lwz r12, 0(r3)
-// lwz r12, 0x18(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801641C0
-
-// lbl_8016416C:
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// mr r4, r3
-// lwz r3, 0x14(r1)
-// lwz r12, 0(r3)
-// lwz r12, 8(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// bne lbl_801642C0
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-
-// lbl_801641C0:
-// lwz r12, 8(r1)
-// addi r3, r1, 8
-// lwz r12, 0x10(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// beq lbl_8016416C
-// b lbl_801642C0
-
-// lbl_801641E0:
-// lwz r3, 0x10(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// lwz r12, 0(r3)
-// lwz r12, 0x34(r12)
-// mtctr r12
-// bctrl
-// lwz r0, 0x14(r1)
-// cmplwi r0, 0
-// bne lbl_80164230
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801642C0
-
-// lbl_80164230:
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801642A4
-
-// lbl_80164250:
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// mr r4, r3
-// lwz r3, 0x14(r1)
-// lwz r12, 0(r3)
-// lwz r12, 8(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// bne lbl_801642C0
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-
-// lbl_801642A4:
-// lwz r12, 8(r1)
-// addi r3, r1, 8
-// lwz r12, 0x10(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// beq lbl_80164250
-
-// lbl_801642C0:
-// lwz r3, 0x10(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x1c(r12)
-// mtctr r12
-// bctrl
-// lwz r4, 0xc(r1)
-// cmplw r4, r3
-// bne lbl_801641E0
-// lwz r0, 0x24(r1)
-// mtlr r0
-// addi r1, r1, 0x20
-// blr
-// */
-// }
-
-/*
- * --INFO--
- * Address: 801642F0
- * Size: 000004
- */
-void WaterBox::doViewCalc() { }
-
-/*
- * --INFO--
- * Address: 801642F4
- * Size: 00004C
- */
-// void Iterator::isDone()
-// {
-// /*
-// stwu r1, -0x10(r1)
-// mflr r0
-// stw r0, 0x14(r1)
-// stw r31, 0xc(r1)
-// mr r31, r3
-// lwz r3, 8(r3)
-// lwz r12, 0(r3)
-// lwz r12, 0x1c(r12)
-// mtctr r12
-// bctrl
-// lwz r0, 4(r31)
-// subf r0, r0, r3
-// cntlzw r0, r0
-// srwi r3, r0, 5
-// lwz r31, 0xc(r1)
-// lwz r0, 0x14(r1)
-// mtlr r0
-// addi r1, r1, 0x10
-// blr
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164340
- * Size: 0001F4
- */
-// void ObjectMgr::doSetView(int)
-// {
-// /*
-// stwu r1, -0x20(r1)
-// mflr r0
-// lis r5, "__vt__26Iterator"@ha
-// stw r0, 0x24(r1)
-// li r0, 0
-// addi r5, r5, "__vt__26Iterator"@l
-// stw r31, 0x1c(r1)
-// cmplwi r0, 0
-// mr r31, r4
-// stw r0, 0x14(r1)
-// stw r5, 8(r1)
-// stw r0, 0xc(r1)
-// stw r3, 0x10(r1)
-// bne lbl_80164390
-// lwz r12, 0(r3)
-// lwz r12, 0x18(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_80164500
-
-// lbl_80164390:
-// lwz r12, 0(r3)
-// lwz r12, 0x18(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801643FC
-
-// lbl_801643A8:
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// mr r4, r3
-// lwz r3, 0x14(r1)
-// lwz r12, 0(r3)
-// lwz r12, 8(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// bne lbl_80164500
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-
-// lbl_801643FC:
-// lwz r12, 8(r1)
-// addi r3, r1, 8
-// lwz r12, 0x10(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// beq lbl_801643A8
-// b lbl_80164500
-
-// lbl_8016441C:
-// lwz r3, 0x10(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// lwz r12, 0(r3)
-// mr r4, r31
-// lwz r12, 0x30(r12)
-// mtctr r12
-// bctrl
-// lwz r0, 0x14(r1)
-// cmplwi r0, 0
-// bne lbl_80164470
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_80164500
-
-// lbl_80164470:
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801644E4
-
-// lbl_80164490:
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// mr r4, r3
-// lwz r3, 0x14(r1)
-// lwz r12, 0(r3)
-// lwz r12, 8(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// bne lbl_80164500
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-
-// lbl_801644E4:
-// lwz r12, 8(r1)
-// addi r3, r1, 8
-// lwz r12, 0x10(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// beq lbl_80164490
-
-// lbl_80164500:
-// lwz r3, 0x10(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x1c(r12)
-// mtctr r12
-// bctrl
-// lwz r4, 0xc(r1)
-// cmplw r4, r3
-// bne lbl_8016441C
-// lwz r0, 0x24(r1)
-// lwz r31, 0x1c(r1)
-// mtlr r0
-// addi r1, r1, 0x20
-// blr
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164534
- * Size: 000004
- */
-void WaterBox::doSetView(int viewportNumber) { }
-
-/*
- * --INFO--
- * Address: 80164538
- * Size: 0001E4
- */
-// void ObjectMgr::doEntry()
-// {
-// /*
-// stwu r1, -0x20(r1)
-// mflr r0
-// lis r4, "__vt__26Iterator"@ha
-// stw r0, 0x24(r1)
-// li r0, 0
-// addi r4, r4, "__vt__26Iterator"@l
-// cmplwi r0, 0
-// stw r0, 0x14(r1)
-// stw r4, 8(r1)
-// stw r0, 0xc(r1)
-// stw r3, 0x10(r1)
-// bne lbl_80164580
-// lwz r12, 0(r3)
-// lwz r12, 0x18(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801646EC
-
-// lbl_80164580:
-// lwz r12, 0(r3)
-// lwz r12, 0x18(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801645EC
-
-// lbl_80164598:
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// mr r4, r3
-// lwz r3, 0x14(r1)
-// lwz r12, 0(r3)
-// lwz r12, 8(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// bne lbl_801646EC
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-
-// lbl_801645EC:
-// lwz r12, 8(r1)
-// addi r3, r1, 8
-// lwz r12, 0x10(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// beq lbl_80164598
-// b lbl_801646EC
-
-// lbl_8016460C:
-// lwz r3, 0x10(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// lwz r12, 0(r3)
-// lwz r12, 0x2c(r12)
-// mtctr r12
-// bctrl
-// lwz r0, 0x14(r1)
-// cmplwi r0, 0
-// bne lbl_8016465C
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801646EC
-
-// lbl_8016465C:
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801646D0
-
-// lbl_8016467C:
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// mr r4, r3
-// lwz r3, 0x14(r1)
-// lwz r12, 0(r3)
-// lwz r12, 8(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// bne lbl_801646EC
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-
-// lbl_801646D0:
-// lwz r12, 8(r1)
-// addi r3, r1, 8
-// lwz r12, 0x10(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// beq lbl_8016467C
-
-// lbl_801646EC:
-// lwz r3, 0x10(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x1c(r12)
-// mtctr r12
-// bctrl
-// lwz r4, 0xc(r1)
-// cmplw r4, r3
-// bne lbl_8016460C
-// lwz r0, 0x24(r1)
-// mtlr r0
-// addi r1, r1, 0x20
-// blr
-// */
-// }
-
-/*
- * --INFO--
- * Address: 8016471C
- * Size: 000004
- */
-void WaterBox::doEntry() { }
-
-/*
- * --INFO--
- * Address: 80164720
- * Size: 0001E4
- */
-// void ObjectMgr::doAnimation()
-// {
-// /*
-// stwu r1, -0x20(r1)
-// mflr r0
-// lis r4, "__vt__26Iterator"@ha
-// stw r0, 0x24(r1)
-// li r0, 0
-// addi r4, r4, "__vt__26Iterator"@l
-// cmplwi r0, 0
-// stw r0, 0x14(r1)
-// stw r4, 8(r1)
-// stw r0, 0xc(r1)
-// stw r3, 0x10(r1)
-// bne lbl_80164768
-// lwz r12, 0(r3)
-// lwz r12, 0x18(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801648D4
-
-// lbl_80164768:
-// lwz r12, 0(r3)
-// lwz r12, 0x18(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801647D4
-
-// lbl_80164780:
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// mr r4, r3
-// lwz r3, 0x14(r1)
-// lwz r12, 0(r3)
-// lwz r12, 8(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// bne lbl_801648D4
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-
-// lbl_801647D4:
-// lwz r12, 8(r1)
-// addi r3, r1, 8
-// lwz r12, 0x10(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// beq lbl_80164780
-// b lbl_801648D4
-
-// lbl_801647F4:
-// lwz r3, 0x10(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// lwz r12, 0(r3)
-// lwz r12, 0x28(r12)
-// mtctr r12
-// bctrl
-// lwz r0, 0x14(r1)
-// cmplwi r0, 0
-// bne lbl_80164844
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801648D4
-
-// lbl_80164844:
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-// b lbl_801648B8
-
-// lbl_80164864:
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// mr r4, r3
-// lwz r3, 0x14(r1)
-// lwz r12, 0(r3)
-// lwz r12, 8(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// bne lbl_801648D4
-// lwz r3, 0x10(r1)
-// lwz r4, 0xc(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 0xc(r1)
-
-// lbl_801648B8:
-// lwz r12, 8(r1)
-// addi r3, r1, 8
-// lwz r12, 0x10(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// beq lbl_80164864
-
-// lbl_801648D4:
-// lwz r3, 0x10(r1)
-// lwz r12, 0(r3)
-// lwz r12, 0x1c(r12)
-// mtctr r12
-// bctrl
-// lwz r4, 0xc(r1)
-// cmplw r4, r3
-// bne lbl_801647F4
-// lwz r0, 0x24(r1)
-// mtlr r0
-// addi r1, r1, 0x20
-// blr
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164904
- * Size: 000004
- */
-void WaterBox::doAnimation() { }
-
} // namespace Game
-
-/*
- * --INFO--
- * Address: 80164908
- * Size: 000038
- */
-// void Iterator::operator*()
-// {
-// /*
-// stwu r1, -0x10(r1)
-// mflr r0
-// mr r4, r3
-// stw r0, 0x14(r1)
-// lwz r3, 8(r3)
-// lwz r4, 4(r4)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// lwz r0, 0x14(r1)
-// mtlr r0
-// addi r1, r1, 0x10
-// blr
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164940
- * Size: 0000E4
- */
-// void Iterator::next()
-// {
-// /*
-// stwu r1, -0x10(r1)
-// mflr r0
-// stw r0, 0x14(r1)
-// stw r31, 0xc(r1)
-// mr r31, r3
-// lwz r0, 0xc(r3)
-// cmplwi r0, 0
-// bne lbl_80164980
-// lwz r3, 8(r31)
-// lwz r4, 4(r31)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 4(r31)
-// b lbl_80164A10
-
-// lbl_80164980:
-// lwz r3, 8(r31)
-// lwz r4, 4(r31)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 4(r31)
-// b lbl_801649F4
-
-// lbl_801649A0:
-// lwz r3, 8(r31)
-// lwz r4, 4(r31)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// mr r4, r3
-// lwz r3, 0xc(r31)
-// lwz r12, 0(r3)
-// lwz r12, 8(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// bne lbl_80164A10
-// lwz r3, 8(r31)
-// lwz r4, 4(r31)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 4(r31)
-
-// lbl_801649F4:
-// mr r3, r31
-// lwz r12, 0(r31)
-// lwz r12, 0x10(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// beq lbl_801649A0
-
-// lbl_80164A10:
-// lwz r0, 0x14(r1)
-// lwz r31, 0xc(r1)
-// mtlr r0
-// addi r1, r1, 0x10
-// blr
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164A24
- * Size: 0000DC
- */
-// void Iterator::first()
-// {
-// /*
-// stwu r1, -0x10(r1)
-// mflr r0
-// stw r0, 0x14(r1)
-// stw r31, 0xc(r1)
-// mr r31, r3
-// lwz r0, 0xc(r3)
-// cmplwi r0, 0
-// bne lbl_80164A60
-// lwz r3, 8(r31)
-// lwz r12, 0(r3)
-// lwz r12, 0x18(r12)
-// mtctr r12
-// bctrl
-// stw r3, 4(r31)
-// b lbl_80164AEC
-
-// lbl_80164A60:
-// lwz r3, 8(r31)
-// lwz r12, 0(r3)
-// lwz r12, 0x18(r12)
-// mtctr r12
-// bctrl
-// stw r3, 4(r31)
-// b lbl_80164AD0
-
-// lbl_80164A7C:
-// lwz r3, 8(r31)
-// lwz r4, 4(r31)
-// lwz r12, 0(r3)
-// lwz r12, 0x20(r12)
-// mtctr r12
-// bctrl
-// mr r4, r3
-// lwz r3, 0xc(r31)
-// lwz r12, 0(r3)
-// lwz r12, 8(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// bne lbl_80164AEC
-// lwz r3, 8(r31)
-// lwz r4, 4(r31)
-// lwz r12, 0(r3)
-// lwz r12, 0x14(r12)
-// mtctr r12
-// bctrl
-// stw r3, 4(r31)
-
-// lbl_80164AD0:
-// mr r3, r31
-// lwz r12, 0(r31)
-// lwz r12, 0x10(r12)
-// mtctr r12
-// bctrl
-// clrlwi. r0, r3, 0x18
-// beq lbl_80164A7C
-
-// lbl_80164AEC:
-// lwz r0, 0x14(r1)
-// lwz r31, 0xc(r1)
-// mtlr r0
-// addi r1, r1, 0x10
-// blr
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164B00
- * Size: 000028
- */
-// void __sinit_mapMgr_cpp()
-// {
-// /*
-// lis r4, __float_nan@ha
-// li r0, -1
-// lfs f0, __float_nan@l(r4)
-// lis r3, lbl_804B18A8@ha
-// stw r0, lbl_80515980@sda21(r13)
-// stfsu f0, lbl_804B18A8@l(r3)
-// stfs f0, lbl_80515984@sda21(r13)
-// stfs f0, 4(r3)
-// stfs f0, 8(r3)
-// blr
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164B28
- * Size: 000014
- */
-// void @36 @4 @Game::MapMgr::frozenable()
-// {
-// /*
-// li r11, 4
-// lwzx r11, r3, r11
-// add r3, r3, r11
-// addi r3, r3, -36
-// b frozenable__Q24Game6MapMgrFv
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164B3C
- * Size: 000014
- */
-// void @36 @4 @Game::MapMgr::doDirectDraw(Graphics&)
-// {
-// /*
-// li r11, 4
-// lwzx r11, r3, r11
-// add r3, r3, r11
-// addi r3, r3, -36
-// b doDirectDraw__Q24Game6MapMgrFR8Graphics
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164B50
- * Size: 000014
- */
-// void @36 @4 @Game::MapMgr::doSimulation(float)
-// {
-// /*
-// li r11, 4
-// lwzx r11, r3, r11
-// add r3, r3, r11
-// addi r3, r3, -36
-// b doSimulation__Q24Game6MapMgrFf
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164B64
- * Size: 000014
- */
-// void @84 @4 @Game::MapMgr::frozenable()
-// {
-// /*
-// li r11, 4
-// lwzx r11, r3, r11
-// add r3, r3, r11
-// addi r3, r3, -84
-// b frozenable__Q24Game6MapMgrFv
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164B78
- * Size: 000014
- */
-// void @84 @4 @Game::MapMgr::doDirectDraw(Graphics&)
-// {
-// /*
-// li r11, 4
-// lwzx r11, r3, r11
-// add r3, r3, r11
-// addi r3, r3, -84
-// b doDirectDraw__Q24Game6MapMgrFR8Graphics
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164B8C
- * Size: 000014
- */
-// void @84 @4 @Game::MapMgr::doSimulation(float)
-// {
-// /*
-// li r11, 4
-// lwzx r11, r3, r11
-// add r3, r3, r11
-// addi r3, r3, -84
-// b doSimulation__Q24Game6MapMgrFf
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164BA0
- * Size: 000014
- */
-// void @84 @4 @Game::ShapeMapMgr::doViewCalc()
-// {
-// /*
-// li r11, 4
-// lwzx r11, r3, r11
-// add r3, r3, r11
-// addi r3, r3, -84
-// b doViewCalc__Q24Game11ShapeMapMgrFv
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164BB4
- * Size: 000014
- */
-// void @84 @4 @Game::ShapeMapMgr::doSetView(int)
-// {
-// /*
-// li r11, 4
-// lwzx r11, r3, r11
-// add r3, r3, r11
-// addi r3, r3, -84
-// b doSetView__Q24Game11ShapeMapMgrFi
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164BC8
- * Size: 000014
- */
-// void @84 @4 @Game::ShapeMapMgr::doEntry()
-// {
-// /*
-// li r11, 4
-// lwzx r11, r3, r11
-// add r3, r3, r11
-// addi r3, r3, -84
-// b doEntry__Q24Game11ShapeMapMgrFv
-// */
-// }
-
-/*
- * --INFO--
- * Address: 80164BDC
- * Size: 000014
- */
-// void @84 @4 @Game::ShapeMapMgr::doAnimation()
-// {
-// /*
-// li r11, 4
-// lwzx r11, r3, r11
-// add r3, r3, r11
-// addi r3, r3, -84
-// b doAnimation__Q24Game11ShapeMapMgrFv
-// */
-// }