A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
System::CourseMap Class Reference0x809BD6E8

#include <CourseMap.hh>

Description

Contains course metadata, notably the starting position.

Definition at line 33 of file CourseMap.hh.

Inheritance diagram for System::CourseMap:

Public Member Functions

void init ()
 
template<MapdataDerived T>
T * parseMapdata (u32 sectionName) const
 
s16 findSector (const EGG::Vector3f &pos, u16 checkpointIdx, f32 &distanceRatio)
 
s16 findRecursiveSector (const EGG::Vector3f &pos, s16 depth, bool searchBackwardsFirst, MapdataCheckPoint *checkpoint, f32 &completion, bool playerIsForwards) const
 

Static Public Member Functions

static CourseMapCreateInstance ()
 
static void DestroyInstance ()
 
static CourseMapInstance ()
 

Getters

u16 getCheckPointEntryOffsetMs (u16 i, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos) const
 
f32 getCheckPointEntryOffsetExact (u16 i, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos) const
 
s16 getCurrentAreaID (s16 i, const EGG::Vector3f &pos, MapdataAreaBase::Type type) const
 
MapdataCannonPointgetCannonPoint (u16 i) const
 
MapdataCheckPathgetCheckPath (u16 i) const
 
MapdataCheckPointgetCheckPoint (u16 i) const
 
MapdataGeoObjgetGeoObj (u16 i) const
 
MapdataAreaBasegetArea (u16 i) const
 
MapdataAreaBasegetAreaSorted (u16 i) const
 
MapdataPointInfogetPointInfo (u16 i) const
 
MapdataJugemPointgetJugemPoint (u16 i) const
 
MapdataStageInfogetStageInfo () const
 
MapdataStartPointgetStartPoint (u16 i) const
 
u16 getCannonPointCount () const
 
u16 getCheckPathCount () const
 
u16 getCheckPointCount () const
 
u16 getGeoObjCount () const
 
u16 getAreaCount () const
 
u16 getPointInfoCount () const
 
u16 getJugemPointCount () const
 
u16 getStageInfoCount () const
 
u16 getStartPointCount () const
 
u32 version () const
 
MapdataCheckPathAccessorcheckPath () const
 
MapdataCheckPointAccessorcheckPoint () const
 
f32 startTmpAngle () const
 
f32 startTmp0 () const
 
f32 startTmp1 () const
 
f32 startTmp2 () const
 
f32 startTmp3 () const
 

Private Member Functions

s16 findSectorBetweenSides (const EGG::Vector3f &pos, MapdataCheckPoint *checkpoint, f32 &distanceRatio)
 
s16 findSectorOutsideSector (const EGG::Vector3f &pos, MapdataCheckPoint *checkpoint, f32 &distanceRatio)
 
s16 findSectorRegional (const EGG::Vector3f &pos, MapdataCheckPoint *checkpoint, f32 &distanceRatio)
 
s16 searchNextCheckpoint (const EGG::Vector3f &pos, s16 depth, const MapdataCheckPoint *checkpoint, f32 &completion, bool playerIsForwards, bool useCache) const
 
s16 searchPrevCheckpoint (const EGG::Vector3f &pos, s16 depth, const MapdataCheckPoint *checkpoint, f32 &completion, bool playerIsForwards, bool useCache) const
 
void clearSectorChecked ()
 
- Private Member Functions inherited from EGG::Disposer

Static Private Member Functions

static void * LoadFile (const char *filename)
 
- Static Private Member Functions inherited from EGG::Disposer
static constexpr u16 getLinkOffset ()
 

Private Attributes

MapdataFileAccessorm_course
 
MapdataStartPointAccessorm_startPoint
 
MapdataCheckPathAccessorm_checkPath
 
MapdataCheckPointAccessorm_checkPoint
 
MapdataPointInfoAccessorm_pointInfo
 
MapdataGeoObjAccessorm_geoObj
 
MapdataAreaAccessorm_area
 
MapdataJugemPointAccessorm_jugemPoint
 
MapdataCannonPointAccessorm_cannonPoint
 
MapdataStageInfoAccessorm_stageInfo
 
f32 m_startTmpAngle
 
f32 m_startTmp0
 
f32 m_startTmp1
 
f32 m_startTmp2
 
f32 m_startTmp3
 

Static Private Attributes

static CourseMaps_instance = nullptr
 

Constructor & Destructor Documentation

◆ CourseMap()

System::CourseMap::CourseMap ( )
private0x8051276C

Definition at line 225 of file CourseMap.cc.

Member Function Documentation

◆ ~CourseMap()

System::CourseMap::~CourseMap ( )
overrideprivate0x805127AC

Definition at line 230 of file CourseMap.cc.

◆ checkPath()

MapdataCheckPathAccessor * System::CourseMap::checkPath ( ) const
inlinenodiscard

Definition at line 149 of file CourseMap.hh.

◆ checkPoint()

MapdataCheckPointAccessor * System::CourseMap::checkPoint ( ) const
inlinenodiscard

Definition at line 153 of file CourseMap.hh.

◆ clearSectorChecked()

void System::CourseMap::clearSectorChecked ( )
private0x80511E00

Definition at line 486 of file CourseMap.cc.

◆ CreateInstance()

CourseMap * System::CourseMap::CreateInstance ( )
static0x80512694

Definition at line 210 of file CourseMap.cc.

◆ DestroyInstance()

void System::CourseMap::DestroyInstance ( )
static0x8051271C

Definition at line 217 of file CourseMap.cc.

◆ findRecursiveSector()

s16 System::CourseMap::findRecursiveSector ( const EGG::Vector3f & pos,
s16 depth,
bool searchBackwardsFirst,
MapdataCheckPoint * checkpoint,
f32 & completion,
bool playerIsForwards ) const
nodiscard0x80511110

Definition at line 89 of file CourseMap.cc.

◆ findSector()

s16 System::CourseMap::findSector ( const EGG::Vector3f & pos,
u16 checkpointIdx,
f32 & distanceRatio )
nodiscard0x80511500

Definition at line 53 of file CourseMap.cc.

◆ findSectorBetweenSides()

s16 System::CourseMap::findSectorBetweenSides ( const EGG::Vector3f & pos,
MapdataCheckPoint * checkpoint,
f32 & distanceRatio )
nodiscardprivate

Definition at line 248 of file CourseMap.cc.

◆ findSectorOutsideSector()

s16 System::CourseMap::findSectorOutsideSector ( const EGG::Vector3f & pos,
MapdataCheckPoint * checkpoint,
f32 & distanceRatio )
nodiscardprivate

Definition at line 352 of file CourseMap.cc.

◆ findSectorRegional()

s16 System::CourseMap::findSectorRegional ( const EGG::Vector3f & pos,
MapdataCheckPoint * checkpoint,
f32 & distanceRatio )
nodiscardprivate

Definition at line 416 of file CourseMap.cc.

◆ getArea()

MapdataAreaBase * System::CourseMap::getArea ( u16 i) const
inlinenodiscard0x80516768

Definition at line 79 of file CourseMap.hh.

◆ getAreaCount()

u16 System::CourseMap::getAreaCount ( ) const
inlinenodiscard0x80512CB4

Definition at line 125 of file CourseMap.hh.

◆ getAreaSorted()

MapdataAreaBase * System::CourseMap::getAreaSorted ( u16 i) const
inlinenodiscard0x805167B4

Definition at line 84 of file CourseMap.hh.

◆ getCannonPoint()

MapdataCannonPoint * System::CourseMap::getCannonPoint ( u16 i) const
inlinenodiscard0x80518AE0

Definition at line 59 of file CourseMap.hh.

◆ getCannonPointCount()

u16 System::CourseMap::getCannonPointCount ( ) const
inlinenodiscard

Definition at line 108 of file CourseMap.hh.

◆ getCheckPath()

MapdataCheckPath * System::CourseMap::getCheckPath ( u16 i) const
inlinenodiscard0x80515C70

Definition at line 64 of file CourseMap.hh.

◆ getCheckPathCount()

u16 System::CourseMap::getCheckPathCount ( ) const
inlinenodiscard

Definition at line 112 of file CourseMap.hh.

◆ getCheckPoint()

MapdataCheckPoint * System::CourseMap::getCheckPoint ( u16 i) const
inlinenodiscard0x80515C24

Definition at line 69 of file CourseMap.hh.

◆ getCheckPointCount()

u16 System::CourseMap::getCheckPointCount ( ) const
inlinenodiscard

Definition at line 116 of file CourseMap.hh.

◆ getCheckPointEntryOffsetExact()

f32 System::CourseMap::getCheckPointEntryOffsetExact ( u16 i,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos ) const
nodiscard

Definition at line 178 of file CourseMap.cc.

◆ getCheckPointEntryOffsetMs()

u16 System::CourseMap::getCheckPointEntryOffsetMs ( u16 i,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos ) const
nodiscard0x80511E7C

Definition at line 168 of file CourseMap.cc.

◆ getCurrentAreaID()

s16 System::CourseMap::getCurrentAreaID ( s16 i,
const EGG::Vector3f & pos,
MapdataAreaBase::Type type ) const
nodiscard0x80516808

Definition at line 189 of file CourseMap.cc.

◆ getGeoObj()

MapdataGeoObj * System::CourseMap::getGeoObj ( u16 i) const
inlinenodiscard0x80514148

Definition at line 74 of file CourseMap.hh.

◆ getGeoObjCount()

u16 System::CourseMap::getGeoObjCount ( ) const
inlinenodiscard

Definition at line 120 of file CourseMap.hh.

◆ getJugemPoint()

MapdataJugemPoint * System::CourseMap::getJugemPoint ( u16 i) const
inlinenodiscard0x80518920

Definition at line 94 of file CourseMap.hh.

◆ getJugemPointCount()

u16 System::CourseMap::getJugemPointCount ( ) const
inlinenodiscard

Definition at line 133 of file CourseMap.hh.

◆ getPointInfo()

MapdataPointInfo * System::CourseMap::getPointInfo ( u16 i) const
inlinenodiscard0x80515E04

Definition at line 89 of file CourseMap.hh.

◆ getPointInfoCount()

u16 System::CourseMap::getPointInfoCount ( ) const
inlinenodiscard

Definition at line 129 of file CourseMap.hh.

◆ getStageInfo()

MapdataStageInfo * System::CourseMap::getStageInfo ( ) const
inlinenodiscard0x80518B78

Definition at line 99 of file CourseMap.hh.

◆ getStageInfoCount()

u16 System::CourseMap::getStageInfoCount ( ) const
inlinenodiscard

Definition at line 137 of file CourseMap.hh.

◆ getStartPoint()

MapdataStartPoint * System::CourseMap::getStartPoint ( u16 i) const
inlinenodiscard0x80514B30

Definition at line 104 of file CourseMap.hh.

◆ getStartPointCount()

u16 System::CourseMap::getStartPointCount ( ) const
inlinenodiscard

Definition at line 141 of file CourseMap.hh.

◆ init()

void System::CourseMap::init ( )
0x805127EC

Definition at line 8 of file CourseMap.cc.

◆ Instance()

static CourseMap * System::CourseMap::Instance ( )
inlinestaticnodiscard

Definition at line 181 of file CourseMap.hh.

◆ LoadFile()

void * System::CourseMap::LoadFile ( const char * filename)
staticprivate0x809BD6E80x80512C10

Definition at line 493 of file CourseMap.cc.

◆ parseMapdata()

template<MapdataDerived T>
T * System::CourseMap::parseMapdata ( u32 sectionName) const
inlinenodiscard

Definition at line 40 of file CourseMap.hh.

◆ searchNextCheckpoint()

s16 System::CourseMap::searchNextCheckpoint ( const EGG::Vector3f & pos,
s16 depth,
const MapdataCheckPoint * checkpoint,
f32 & completion,
bool playerIsForwards,
bool useCache ) const
nodiscardprivate0x80510F58

Definition at line 442 of file CourseMap.cc.

◆ searchPrevCheckpoint()

s16 System::CourseMap::searchPrevCheckpoint ( const EGG::Vector3f & pos,
s16 depth,
const MapdataCheckPoint * checkpoint,
f32 & completion,
bool playerIsForwards,
bool useCache ) const
nodiscardprivate0x80511034

Definition at line 464 of file CourseMap.cc.

◆ startTmp0()

f32 System::CourseMap::startTmp0 ( ) const
inlinenodiscard

Definition at line 161 of file CourseMap.hh.

◆ startTmp1()

f32 System::CourseMap::startTmp1 ( ) const
inlinenodiscard

Definition at line 165 of file CourseMap.hh.

◆ startTmp2()

f32 System::CourseMap::startTmp2 ( ) const
inlinenodiscard

Definition at line 169 of file CourseMap.hh.

◆ startTmp3()

f32 System::CourseMap::startTmp3 ( ) const
inlinenodiscard

Definition at line 173 of file CourseMap.hh.

◆ startTmpAngle()

f32 System::CourseMap::startTmpAngle ( ) const
inlinenodiscard

Definition at line 157 of file CourseMap.hh.

◆ version()

u32 System::CourseMap::version ( ) const
inlinenodiscard

Definition at line 145 of file CourseMap.hh.

Member Data Documentation

◆ m_area

MapdataAreaAccessor* System::CourseMap::m_area
private

Definition at line 209 of file CourseMap.hh.

◆ m_cannonPoint

MapdataCannonPointAccessor* System::CourseMap::m_cannonPoint
private

Definition at line 211 of file CourseMap.hh.

◆ m_checkPath

MapdataCheckPathAccessor* System::CourseMap::m_checkPath
private

Definition at line 205 of file CourseMap.hh.

◆ m_checkPoint

MapdataCheckPointAccessor* System::CourseMap::m_checkPoint
private

Definition at line 206 of file CourseMap.hh.

◆ m_course

MapdataFileAccessor* System::CourseMap::m_course
private

Definition at line 203 of file CourseMap.hh.

◆ m_geoObj

MapdataGeoObjAccessor* System::CourseMap::m_geoObj
private

Definition at line 208 of file CourseMap.hh.

◆ m_jugemPoint

MapdataJugemPointAccessor* System::CourseMap::m_jugemPoint
private

Definition at line 210 of file CourseMap.hh.

◆ m_pointInfo

MapdataPointInfoAccessor* System::CourseMap::m_pointInfo
private

Definition at line 207 of file CourseMap.hh.

◆ m_stageInfo

MapdataStageInfoAccessor* System::CourseMap::m_stageInfo
private

Definition at line 212 of file CourseMap.hh.

◆ m_startPoint

MapdataStartPointAccessor* System::CourseMap::m_startPoint
private

Definition at line 204 of file CourseMap.hh.

◆ m_startTmp0

f32 System::CourseMap::m_startTmp0
private

Definition at line 216 of file CourseMap.hh.

◆ m_startTmp1

f32 System::CourseMap::m_startTmp1
private

Definition at line 217 of file CourseMap.hh.

◆ m_startTmp2

f32 System::CourseMap::m_startTmp2
private

Definition at line 218 of file CourseMap.hh.

◆ m_startTmp3

f32 System::CourseMap::m_startTmp3
private

Definition at line 219 of file CourseMap.hh.

◆ m_startTmpAngle

f32 System::CourseMap::m_startTmpAngle
private

Definition at line 215 of file CourseMap.hh.

◆ s_instance

CourseMap * System::CourseMap::s_instance = nullptr
staticprivate0x809BD6E8

Definition at line 223 of file CourseMap.hh.