39 template <MapdataDerived T>
40 [[nodiscard]] T *parseMapdata(u32 sectionName)
const {
42 return sectionPtr ?
new T(sectionPtr) :
nullptr;
45 [[nodiscard]] s16 findSector(
const EGG::Vector3f &pos,
u16 checkpointIdx, f32 &distanceRatio);
46 [[nodiscard]] s16 findRecursiveSector(
const EGG::Vector3f &pos, s16 depth,
48 bool playerIsForwards)
const;
53 [[nodiscard]] f32 getCheckPointEntryOffsetExact(
u16 i,
const EGG::Vector3f &pos,
55 [[nodiscard]] s16 getCurrentAreaID(s16 i,
const EGG::Vector3f &pos,
56 MapdataAreaBase::Type type)
const;
60 return i < getCannonPointCount() ? m_cannonPoint->get(i) :
nullptr;
65 return i < getCheckPathCount() ? m_checkPath->get(i) :
nullptr;
70 return i < getCheckPointCount() ? m_checkPoint->get(i) :
nullptr;
75 return i < getGeoObjCount() ? m_geoObj->get(i) :
nullptr;
80 return i < getAreaCount() ? m_area->get(i) :
nullptr;
85 return i < getAreaCount() ? m_area->getSorted(i) :
nullptr;
90 return i < getPointInfoCount() ? m_pointInfo->get(i) :
nullptr;
95 return i < getJugemPointCount() ? m_jugemPoint->get(i) :
nullptr;
100 return getStageInfoCount() != 0 ? m_stageInfo->get(0) :
nullptr;
105 return i < getStartPointCount() ? m_startPoint->get(i) :
nullptr;
108 [[nodiscard]]
u16 getCannonPointCount()
const {
109 return m_cannonPoint ? m_cannonPoint->size() : 0;
112 [[nodiscard]]
u16 getCheckPathCount()
const {
113 return m_checkPath ? m_checkPath->size() : 0;
116 [[nodiscard]]
u16 getCheckPointCount()
const {
117 return m_checkPoint ? m_checkPoint->size() : 0;
120 [[nodiscard]]
u16 getGeoObjCount()
const {
121 return m_geoObj ? m_geoObj->size() : 0;
125 [[nodiscard]]
u16 getAreaCount()
const {
126 return m_area ? m_area->size() : 0;
129 [[nodiscard]]
u16 getPointInfoCount()
const {
130 return m_pointInfo ? m_pointInfo->size() : 0;
133 [[nodiscard]]
u16 getJugemPointCount()
const {
134 return m_jugemPoint ? m_jugemPoint->size() : 0;
137 [[nodiscard]]
u16 getStageInfoCount()
const {
138 return m_stageInfo ? m_stageInfo->size() : 0;
141 [[nodiscard]]
u16 getStartPointCount()
const {
142 return m_startPoint ? m_startPoint->size() : 0;
145 [[nodiscard]] u32 version()
const {
146 return m_course->version();
157 [[nodiscard]] f32 startTmpAngle()
const {
158 return m_startTmpAngle;
161 [[nodiscard]] f32 startTmp0()
const {
165 [[nodiscard]] f32 startTmp1()
const {
169 [[nodiscard]] f32 startTmp2()
const {
173 [[nodiscard]] f32 startTmp3()
const {
179 static void DestroyInstance();
181 [[nodiscard]]
static CourseMap *Instance() {
189 [[nodiscard]] s16 findSectorBetweenSides(
const EGG::Vector3f &pos,
191 [[nodiscard]] s16 findSectorOutsideSector(
const EGG::Vector3f &pos,
195 [[nodiscard]] s16 searchNextCheckpoint(
const EGG::Vector3f &pos, s16 depth,
197 bool useCache)
const;
198 [[nodiscard]] s16 searchPrevCheckpoint(
const EGG::Vector3f &pos, s16 depth,
200 bool useCache)
const;
201 void clearSectorChecked();
221 static void *LoadFile(
const char *filename);
Contexts can be used to restore a previous memory state for the current session.