diff options
| author | SammygoodTunes <56520787+SammygoodTunes@users.noreply.github.com> | 2025-07-24 19:23:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-24 19:23:29 +0200 |
| commit | dda45d5574798dc45a31437f473eaa55b9142e13 (patch) | |
| tree | ead27bd22d20f3ddbe3bd1dd303e66913a745fae /include | |
| parent | 2415d4899d50a95e8ff564c7b72bc8803d9a96dd (diff) | |
Decomp `src/00_Core/Map/MapManager.cpp` (56%) (#101)
* Fix
* Fix
* stupid typo
* Another dumb typo
* Fix
* Fix declaration
* Fix declaration
* Fix
* Fix symbols
* Corrections
* Fix regression in GetEntrancePos
---------
Co-authored-by: Aetias <aetias@outlook.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/DTCM/UnkStruct_027e0f64.hpp | 9 | ||||
| -rw-r--r-- | include/DTCM/UnkStruct_027e0f6c.hpp | 10 | ||||
| -rw-r--r-- | include/DTCM/UnkStruct_027e0f78.hpp | 2 | ||||
| -rw-r--r-- | include/Map/Course.hpp | 3 | ||||
| -rw-r--r-- | include/Map/Entrance.hpp | 2 | ||||
| -rw-r--r-- | include/Map/MapBase.hpp | 13 | ||||
| -rw-r--r-- | include/Map/MapManager.hpp | 50 | ||||
| -rw-r--r-- | include/Message/MessageManager.hpp | 1 | ||||
| -rw-r--r-- | include/Message/MsgProc.hpp | 4 | ||||
| -rw-r--r-- | include/Save/AdventureFlags.hpp | 11 |
10 files changed, 78 insertions, 27 deletions
diff --git a/include/DTCM/UnkStruct_027e0f64.hpp b/include/DTCM/UnkStruct_027e0f64.hpp index b6fb5a0b..8826fd13 100644 --- a/include/DTCM/UnkStruct_027e0f64.hpp +++ b/include/DTCM/UnkStruct_027e0f64.hpp @@ -5,11 +5,16 @@ #include "Debug/DebugHierarchy.hpp" +struct UnkStruct_027e0f64_04 { + /* 000 */ u8 pad[0x1B4 - 0x00]; + /* 1b4 */ unk32 mUnk_1b4; +}; + class UnkStruct_027e0f64 { public: /* 0 */ DebugHierarchyBase *mUnk_0; - /* 4 */ void *mUnk_4; - /* 8 */ void *mUnk_8; + /* 4 */ UnkStruct_027e0f64_04 *mUnk_4; + /* 8 */ UnkStruct_027e0f64_04 *mUnk_8; /* c */ void func_ov000_0208ae94(); diff --git a/include/DTCM/UnkStruct_027e0f6c.hpp b/include/DTCM/UnkStruct_027e0f6c.hpp new file mode 100644 index 00000000..6bddc3ca --- /dev/null +++ b/include/DTCM/UnkStruct_027e0f6c.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "global.h" +#include "types.h" + +struct UnkStruct_027e0f6c { + void func_ov004_02102770(); +}; + +extern UnkStruct_027e0f6c *data_027e0f6c; diff --git a/include/DTCM/UnkStruct_027e0f78.hpp b/include/DTCM/UnkStruct_027e0f78.hpp index 04353f37..bbae228d 100644 --- a/include/DTCM/UnkStruct_027e0f78.hpp +++ b/include/DTCM/UnkStruct_027e0f78.hpp @@ -10,6 +10,8 @@ struct UnkStruct_027e0f78 { /* 1c */ u16 mUnk_1c; /* 1e */ u16 mUnk_1e; /* 20 */ + + void func_ov004_02102e3c(); }; extern UnkStruct_027e0f78 *data_027e0f78; diff --git a/include/Map/Course.hpp b/include/Map/Course.hpp index c09cbb4d..569f3765 100644 --- a/include/Map/Course.hpp +++ b/include/Map/Course.hpp @@ -33,8 +33,7 @@ public: /* 008 */ unk32 mUnk_008; /* 00c */ char mName[0x10]; /* 01c */ Vec2b mCurrMapPos; // position in the map grid - /* 01e */ unk8 mUnk_01e; - /* 01f */ unk8 mUnk_01f; + /* 01e */ Vec2b mUnk_01e; /* 020 */ u8 mMapGrid[10][10]; /* 084 */ Vec2b mMainGrid; // part of the grid where you can walk off screen to another map /* 086 */ Vec2b mMainGridSize; diff --git a/include/Map/Entrance.hpp b/include/Map/Entrance.hpp index af40f6ad..79e511f4 100644 --- a/include/Map/Entrance.hpp +++ b/include/Map/Entrance.hpp @@ -12,7 +12,7 @@ public: /* 00 */ Vec3p mPos; /* 0c */ unk16 mAngle; /* 0e */ u8 mId; - /* 0f */ // unk8 mUnk_0f; + /* 0f (padding) */ /* 10 */ s32 mUnk_10; /* 14 */ diff --git a/include/Map/MapBase.hpp b/include/Map/MapBase.hpp index f9768a81..f711dbbb 100644 --- a/include/Map/MapBase.hpp +++ b/include/Map/MapBase.hpp @@ -203,7 +203,7 @@ public: void AddTrigger(TriggerParams *param_2); s32 GetTriggerBoundingBox(s32 param_2, AABB *param_3); s32 GetTriggerBoundingBoxes(s32 param_2, AABB *param_3, s32 param_4); - bool GetOverlappingTrigger(Vec3p *param_2); + unk8 GetOverlappingTrigger(Vec3p *param_2); TriggerBase *FindTrigger(unk32 type); unk8 GetOverlappingTriggers(Vec3p *param_2, TriggerBase **triggers, unk32 capacity); bool IsTriggerTypeOverlapped(unk32 type, Vec3p *param_3); @@ -228,7 +228,7 @@ public: bool func_ov00_020809b8(s32 param_2); unk8 func_ov00_02080a78(Vec3p *param_2); unk8 func_ov00_02080b24(Vec2b *param_2); - void func_ov00_02080d08(unk32 param_2); + void func_ov00_02080d08(Vec2b *param_2); bool TriggerOfType_vfunc_10(unk32 type); void func_ov00_02080de4(); unk8 func_ov00_02080de8(unk32 param_2); @@ -240,4 +240,13 @@ public: void func_ov004_0210cb38(); void func_ov004_0210cc20(Course *course); void func_ov004_0210cc58(Course *course, u32 map); + + MapBase *func_ov012_0212b358(unk32 param_2, unk32 param_3); + MapBase *func_ov015_02128dd8(unk32 param_2, unk32 param_3); + s32 func_ov015_02129c14(); + bool func_ov015_02129c24(Vec3p *param_2, Vec3p *param_3); + bool func_ov015_02129c34(s32 param_2); + bool func_ov015_02129c44(s32 param_2); + MapBase *func_ov017_0215b4a0(unk32 param_2, unk32 param_3); + MapBase *func_ov017_0215b4e8(unk32 param_2, unk32 param_3); }; diff --git a/include/Map/MapManager.hpp b/include/Map/MapManager.hpp index aa13a0f1..a6fd03fe 100644 --- a/include/Map/MapManager.hpp +++ b/include/Map/MapManager.hpp @@ -27,6 +27,30 @@ struct MapManager_Unk2 { ~MapManager_Unk2(); }; +struct UnkStruct_0208210c_param3 { + /* 000 */ unk32 mUnk_00; + /* 004 */ unk8 mUnk_04; + /* 005 */ unk8 mUnk_05; + /* 006 */ unk8 mUnk_06; + /* 007 */ bool mUnk_07; + /* 008 */ unk32 mUnk_08; + /* 00c */ unk32 mUnk_0c; + /* 010 */ u8 mUnk_10; + /* 011 */ unk8 mUnk_11; + /* 012 */ unk16 mUnk_12; + /* 014 */ unk16 mUnk_14; + /* 016 */ unk16 mUnk_16; + /* 018 */ Vec3p mUnk_18; + /* 024 */ Vec3p mUnk_24; + /* 030 */ unk8 mUnk_30[0x18C]; + /* 1bc */ bool mUnk_1bc; + /* 1bd */ unk8 mUnk_1bd; + /* 1be */ u8 mUnk_1be; + /* 1bf */ u8 mUnk_1bf; + /* 1c0 */ unk32 mUnk_1c0; + /* 1c4 */ +}; + class MapManager : public SysObject { public: /* 00 */ Course *mCourse; @@ -48,9 +72,9 @@ public: void GetCourseDungeonProgress(CourseProgress *param_2); void func_ov00_020820fc(s32 param_2, unk32 param_3, unk32 param_4); - void func_ov00_0208210c(unk32 param_2, unk32 *param_3); - void func_ov00_0208230c(s32 *param_2); - void func_ov00_02082348(unk32 *param_2); + void func_ov00_0208210c(unk32 param_2, UnkStruct_0208210c_param3 *param_3); + void func_ov00_0208230c(struct FlagsUnk2 *param_2); + void func_ov00_02082348(struct FlagsUnk2 *param_2); void func_ov00_020823a4(unk32 param_2); void func_ov00_020823b4(); bool func_ov00_020823c4(unk32 *param_2, s32 param_3); @@ -87,7 +111,7 @@ public: void func_ov00_02082acc(); unk32 *func_ov00_02082adc(); void func_ov00_02082af4(); - void func_ov00_02082b3c(unk32 *param_2, Vec2b *param3); + bool func_ov00_02082b3c(FlagsUnk2 *param_2); u8 func_ov00_02082d08(); u8 GetCurrentMapPosX(); u8 GetCurrentMapPosY(); @@ -140,7 +164,7 @@ public: s32 GetTriggerBoundingBoxes(s32 param_2, AABB *param_3, s32 param_4); bool func_ov00_020836dc(u32 param_2, u32 actorId); bool IsTriggerTypeOverlapped(u32 param_2, Vec3p *param_3); - bool GetOverlappingTrigger(Vec3p *param_2); + unk8 GetOverlappingTrigger(Vec3p *param_2); bool func_ov00_02083790(s32 param_2); bool func_ov00_02083840(s32 param_2); bool AddTrigger(s32 param_2); @@ -160,7 +184,7 @@ public: s32 func_ov00_020839d4(s32 param_2); s32 func_ov00_020839f8(s32 param_2); static void func_ov00_02083a1c(Vec2b *param_1, MapManager *param_2, Vec3p *param_3); - static void func_ov00_02083a54(u8 *param_1, MapManager *param_2, s32 *param_3, s32 param_4, s32 *param_5); + static void func_ov00_02083a54(Vec2b *param_1, MapManager *param_2, Vec3p *param_3, s32 param_4, unk32 param_5); s32 GetTileStartX(unk32 x); s32 GetTileStartZ(unk32 z); s32 GetTileEndX(unk32 x); @@ -168,7 +192,7 @@ public: s32 func_ov00_02083c24(unk32 x); s32 func_ov00_02083c50(unk32 z); void func_ov00_02083c7c(Vec3p *param_2, Vec2b param_3); - void func_ov00_02083ce8(Vec3p *param_2, u32 param_3, s32 param_4, u32 param_5); + void func_ov00_02083ce8(Vec3p *param_2, Vec2b param_3, s32 param_4, u32 param_5); s32 func_ov00_02083e34(unk8 param_2, unk8 param_3, unk32 param_4); unk32 MapData_vfunc_60(Vec2b *param_1); bool func_ov00_02083e70(Vec2b *param_2); @@ -180,11 +204,11 @@ public: static void func_ov00_02083fb0(u32 *param_1, MapManager *param_2, Vec3p *param_3); void GetTileWorldBounds(Vec2b *tile, AABB *tileBounds); unk32 MapData_vfunc_54(Vec2b *a); - unk32 func_ov00_020840a0(unk8 param_2, unk8 param_3); + unk32 func_ov00_020840a0(u8 param_2, u8 param_3); unk32 *MapData_vfunc_78(Vec2b *param_1); unk32 func_ov00_020840dc(Vec2b *param_1); static unk8 func_ov00_02084100(unk32 *param_1, MapManager *param_2); - u32 GetMapData_Unk_48(); + unk32 GetMapData_Unk_48(); unk32 GetMapData_Unk_4c(); unk32 func_ov00_0208412c(); void func_ov00_0208413c(unk32 param_2); @@ -234,11 +258,11 @@ public: s32 func_ov00_02084d4c(unk32 param_2, unk32 param_3, Vec3p *param_4); unk32 func_ov00_02084ebc(Vec3p *param_2); s32 func_ov00_02085108(Vec3p *param_2); - static s32 func_ov00_0208527c(MapManager *param_1, unk32 param_2, unk32 *param_3); + static unk32 func_ov00_0208527c(MapManager *param_1, unk32 param_2, Vec3p *param_3); static s32 func_ov00_020853fc(MapManager *param_1, Vec3p *param_2, s32 *param_3); unk32 func_ov00_02085594(Vec3p *param_2); - static void func_ov00_0208583c(MapManager *param_1, Vec3p *param_2, unk32 param_3); - static unk32 func_ov00_020858b0(MapManager *param_1, Vec3p *param_2, s32 param_3); + static unk32 func_ov00_0208583c(MapManager *param_1, Vec3p *param_2, unk32 param_3); + static unk32 func_ov00_020858b0(MapManager *param_1, Vec3p *param_2, unk32 param_3); s32 func_ov00_02085a34(Vec3p *param_2, unk32 param_3); unk8 func_ov00_02085c60(Vec3p *param_2, unk32 *param_3, unk32 *param_4, u32 param_5); unk8 func_ov00_02086044(Vec3p *param_2, Vec3p *param_3, unk32 param_4); @@ -255,7 +279,7 @@ public: static void LoadMapTexSprites(s32 param1); void func_ov004_02102260(); void func_ov004_02102264(unk32 *param1, char *param2); - void func_ov004_021024c4(unk32 *param1, unk32 param2, bool param3); + void func_ov004_021024c4(FlagsUnk2 *param1, bool param2, bool param3); void func_ov004_021025d8(); }; diff --git a/include/Message/MessageManager.hpp b/include/Message/MessageManager.hpp index fb06134b..8ac42d14 100644 --- a/include/Message/MessageManager.hpp +++ b/include/Message/MessageManager.hpp @@ -73,6 +73,7 @@ public: UnkStruct_02038aa0 *func_02037178(UnkSubClass1_02256FF8 *param_2); void func_ov004_021069c4(void); + void func_ov004_02106db8(void); }; extern MessageManager gMessageManager; diff --git a/include/Message/MsgProc.hpp b/include/Message/MsgProc.hpp index c3e0b662..97cf46e9 100644 --- a/include/Message/MsgProc.hpp +++ b/include/Message/MsgProc.hpp @@ -184,6 +184,8 @@ extern UnkClass_ov000_027e0d04 data_027e0d04; class UnkClass_data_027e0f7c { public: + void func_ov000_0209d6e8(unk32 *param_2); + char *func_ov000_0209d71c(s32 param_2); u8 *func_ov000_0209d90c(s8, s8); }; -extern UnkClass_data_027e0f7c data_027e0f7c; +extern UnkClass_data_027e0f7c *data_027e0f7c; diff --git a/include/Save/AdventureFlags.hpp b/include/Save/AdventureFlags.hpp index e7619e8d..72c7f0f1 100644 --- a/include/Save/AdventureFlags.hpp +++ b/include/Save/AdventureFlags.hpp @@ -61,11 +61,9 @@ struct UnkStruct_027e0d38_UnkC { class UnkStruct_02082348_04 { public: - /* 00 */ unk32 mUnk_00; - /* 00 */ unk32 mUnk_04; - /* 00 */ unk32 mUnk_08; - /* 0c */ unk16 mUnk_0c; - /* 0e */ u8 mUnk_0e; + /* 00 */ Vec3p mUnk_00; // pos? + /* 0c */ unk16 mUnk_0c; // angle? + /* 0e */ u8 mUnk_0e; // some id? /* 0f */ u8 mUnk_0f; /* 10 */ u8 mUnk_10; /* 11 */ u8 mUnk_11; @@ -79,7 +77,7 @@ struct FlagsUnk2 { /* 04 */ UnkStruct_02082348_04 mUnk_04; /* 18 */ - ~FlagsUnk2(); + //~FlagsUnk2(); void func_ov000_02078bf0(FlagsUnk2 *param_2); void func_ov004_02100ae0(); }; @@ -102,6 +100,7 @@ struct FlagsUnk { /* 4c */ ~FlagsUnk(); + void func_ov000_020980f8(); }; struct FlagsData { |
