From d40d7abbb9ec6ddc201e54096507e3083c070cba Mon Sep 17 00:00:00 2001 From: Aetias Date: Fri, 26 Apr 2024 16:47:04 +0200 Subject: [PATCH] Add map components `Exit` and `CameraViewpoint` --- include/Map/CameraViewpoint.hpp | 19 +++++++++++++++++++ include/Map/Exit.hpp | 26 ++++++++++++++++++++++++++ include/Map/MapBase.hpp | 16 +++++++++++----- 3 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 include/Map/CameraViewpoint.hpp create mode 100644 include/Map/Exit.hpp diff --git a/include/Map/CameraViewpoint.hpp b/include/Map/CameraViewpoint.hpp new file mode 100644 index 00000000..0fde9bdc --- /dev/null +++ b/include/Map/CameraViewpoint.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "global.h" +#include "types.h" + +#include "lib/math.h" + +#include "System/SysNew.hpp" + +class CameraViewpoint : public SysObject { + /* 00 */ unk32 mUnk_00; + /* 04 */ unk8 mUnk_04 + /* 05 */ unk8 mUnk_05[3]; + /* 08 */ Vec3p mPos; + /* 14 */ unk16 mUnk_14; + /* 16 */ unk16 mUnk_16; + /* 18 */ unk16 mUnk_18[2]; + /* 1c */ +}; diff --git a/include/Map/Exit.hpp b/include/Map/Exit.hpp new file mode 100644 index 00000000..be00da58 --- /dev/null +++ b/include/Map/Exit.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "global.h" +#include "types.h" + +#include "System/SysNew.hpp" + +struct ExitDest { + /* 0 */ unk8 mEntrance; + /* 1 */ unk8 mMap; +}; + +class Exit : public SysObject { + /* 00 */ unk32 mDestCourse; + /* 04 */ unk32 mUnk_04; + /* 08 */ unk32 mUnk_08; + /* 0c */ unk32 mUnk_0c; + /* 10 */ ExitDest mDest; + /* 12 */ unk8 mUnk_12; + /* 13 */ unk8 mUnk_13; + /* 14 */ unk8 mUnk_14; + /* 15 */ unk8 mUnk_15; + /* 16 */ unk8 mUnk_16; + /* 17 */ unk8 mUnk_17; + /* 18 */ +}; diff --git a/include/Map/MapBase.hpp b/include/Map/MapBase.hpp index 07e58a32..9a9a2c37 100644 --- a/include/Map/MapBase.hpp +++ b/include/Map/MapBase.hpp @@ -9,8 +9,16 @@ #include "Map/Entrance.hpp" #include "Map/TriggerBase.hpp" +#include "Map/Exit.hpp" +#include "Map/CameraViewpoint.hpp" #include "System/SysNew.hpp" +#define MAX_ENTRANCES 0x40 +#define MAX_TRIGGERS 0x40 +#define MAX_EXITS 0x40 +#define MAX_VIEWPOINTS 8 +#define MAX_MAP_UNK_130 0x20 + struct MapBase_Unk_180 { /* 0 */ unk32 mUnk_0; /* 4 */ @@ -67,13 +75,11 @@ public: /* 0d0 */ Vec3p mUnk_0d0; /* 0dc */ Vec3p mUnk_0dc; /* 0e8 */ Vec3p mUnk_0e8; - /* 0f4 */ u32 mUnk_0f4; - /* 0f8 */ unk32 mUnk_0f8; - /* 0fc */ u32 mUnk_0fc; + /* 0f4 */ Vec3p mUnk_0f4; /* 100 */ std::vector mEntrances; /* 10c */ std::vector mTriggers; - /* 118 */ std::vector mUnk_118; - /* 124 */ std::vector mUnk_124; + /* 118 */ std::vector mExits; + /* 124 */ std::vector mViewpoints; /* 130 */ std::vector mUnk_130; /* 13c */ unk32 mUnk_13c; /* 140 */ unk32 mUnk_140;