41 template <MapdataDerived T>
42 [[nodiscard]] T *parseMapdata(u32 sectionName)
const {
44 return sectionPtr ?
new T(sectionPtr) :
nullptr;
47 [[nodiscard]] s16 findSector(
const EGG::Vector3f &pos,
u16 checkpointIdx, f32 &distanceRatio);
48 [[nodiscard]] s16 findRecursiveSector(
const EGG::Vector3f &pos, s16 depth,
50 bool playerIsForwards)
const;
55 [[nodiscard]] f32 getCheckPointEntryOffsetExact(
u16 i,
const EGG::Vector3f &pos,
57 [[nodiscard]] s16 getCurrentAreaID(s16 i,
const EGG::Vector3f &pos,
58 MapdataAreaBase::Type type)
const;
62 return i < getCannonPointCount() ? m_cannonPoint->get(i) :
nullptr;
67 return i < getCheckPathCount() ? m_checkPath->get(i) :
nullptr;
72 return i < getCheckPointCount() ? m_checkPoint->get(i) :
nullptr;
77 return i < getGeoObjCount() ? m_geoObj->get(i) :
nullptr;
82 return i < getAreaCount() ? m_area->get(i) :
nullptr;
87 return i < getAreaCount() ? m_area->getSorted(i) :
nullptr;
92 return i < getPointInfoCount() ? m_pointInfo->get(i) :
nullptr;
97 return i < getJugemPointCount() ? m_jugemPoint->get(i) :
nullptr;
102 return getStageInfoCount() != 0 ? m_stageInfo->get(0) :
nullptr;
107 return i < getStartPointCount() ? m_startPoint->get(i) :
nullptr;
110 [[nodiscard]]
u16 getCannonPointCount()
const {
111 return m_cannonPoint ? m_cannonPoint->size() : 0;
114 [[nodiscard]]
u16 getCheckPathCount()
const {
115 return m_checkPath ? m_checkPath->size() : 0;
118 [[nodiscard]]
u16 getCheckPointCount()
const {
119 return m_checkPoint ? m_checkPoint->size() : 0;
122 [[nodiscard]]
u16 getGeoObjCount()
const {
123 return m_geoObj ? m_geoObj->size() : 0;
127 [[nodiscard]]
u16 getAreaCount()
const {
128 return m_area ? m_area->size() : 0;
131 [[nodiscard]]
u16 getPointInfoCount()
const {
132 return m_pointInfo ? m_pointInfo->size() : 0;
135 [[nodiscard]]
u16 getJugemPointCount()
const {
136 return m_jugemPoint ? m_jugemPoint->size() : 0;
139 [[nodiscard]]
u16 getStageInfoCount()
const {
140 return m_stageInfo ? m_stageInfo->size() : 0;
143 [[nodiscard]]
u16 getStartPointCount()
const {
144 return m_startPoint ? m_startPoint->size() : 0;
147 [[nodiscard]] u32 version()
const {
148 return m_course->version();
159 [[nodiscard]] f32 startTmpAngle()
const {
160 return m_startTmpAngle;
163 [[nodiscard]] f32 startTmp0()
const {
167 [[nodiscard]] f32 startTmp1()
const {
171 [[nodiscard]] f32 startTmp2()
const {
175 [[nodiscard]] f32 startTmp3()
const {
181 static void DestroyInstance();
183 [[nodiscard]]
static CourseMap *Instance() {
191 [[nodiscard]] s16 findSectorBetweenSides(
const EGG::Vector3f &pos,
193 [[nodiscard]] s16 findSectorOutsideSector(
const EGG::Vector3f &pos,
197 [[nodiscard]] s16 searchNextCheckpoint(
const EGG::Vector3f &pos, s16 depth,
199 bool useCache)
const;
200 [[nodiscard]] s16 searchPrevCheckpoint(
const EGG::Vector3f &pos, s16 depth,
202 bool useCache)
const;
203 void clearSectorChecked();
223 static void *LoadFile(
const char *filename);
Contexts can be used to restore a previous memory state for the current session.