Mario Kart 64
Loading...
Searching...
No Matches
Editor Namespace Reference

Data Structures

class  ContentBrowserWindow
 
class  GameObject
 
class  Gizmo
 
class  Handles
 
class  LightObject
 
class  ObjectPicker
 
class  PropertiesWindow
 
class  SceneExplorerWindow
 
class  ToolsWindow
 
class  TrackPropertiesWindow
 

Functions

void GenerateCollisionMesh (std::variant< AActor *, OObject *, GameObject * > object, Gfx *model, float scale)
 
void DebugCollision (GameObject *obj, FVector pos, IRotator rot, FVector scale, const std::vector< Triangle > &triangles)
 
void SaveLevel ()
 
void LoadLevel (Track *track, std::string sceneFile)
 
void Load_AddStaticMeshActor (const nlohmann::json &actorJson)
 
void SetSceneFile (std::shared_ptr< Ship::Archive > archive, std::string sceneFile)
 
void LoadMinimap (Track *track, std::string filePath)
 
void SetDefaultMinimap (Track *track)
 
void SaveActors (nlohmann::json &actorList)
 
void SaveStaticMeshActors (nlohmann::json &actorList)
 
void SaveTour (nlohmann::json &tour)
 
void LoadProps (Track *track, nlohmann::json &data)
 
void LoadActors (Track *track, nlohmann::json &data)
 
void LoadStaticMeshActors (Track *track, nlohmann::json &data)
 
void LoadTour (Track *track, nlohmann::json &data)
 
void SpawnActors (std::vector< std::pair< std::string, SpawnParams > > spawnList)
 
nlohmann::json ToJson (const FVector &v)
 
nlohmann::json ToJson (const TourCamera::KeyFrame &kf)
 
nlohmann::json ToJson (const TourCamera::CameraShot &shot)
 
FVector FromJsonVec (const nlohmann::json &j)
 
TourCamera::KeyFrame FromJsonKeyFrame (const nlohmann::json &j)
 
TourCamera::CameraShot FromJsonCameraShot (const nlohmann::json &j)
 

Variables

std::unordered_map< GameObject *, std::vector< Vtx > > gDebugObjVtxCache
 
std::shared_ptr< Ship::Archive > CurrentArchive
 
std::string SceneFile = ""
 
bool bIsTrainWindowOpen = false
 
std::unordered_map< std::string, std::function< void(const FVector &)> > CActorList
 
std::unordered_map< std::string, std::function< AActor *(const FVector &)> > ActorList
 
std::unordered_map< std::string, std::function< OObject *(const FVector &)> > ObjectList
 

Function Documentation

◆ DebugCollision()

void Editor::DebugCollision ( GameObject * obj,
FVector pos,
IRotator rot,
FVector scale,
const std::vector< Triangle > & triangles )

◆ FromJsonCameraShot()

TourCamera::CameraShot Editor::FromJsonCameraShot ( const nlohmann::json & j)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FromJsonKeyFrame()

TourCamera::KeyFrame Editor::FromJsonKeyFrame ( const nlohmann::json & j)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FromJsonVec()

FVector Editor::FromJsonVec ( const nlohmann::json & j)
inline
Here is the caller graph for this function:

◆ GenerateCollisionMesh()

void Editor::GenerateCollisionMesh ( std::variant< AActor *, OObject *, GameObject * > object,
Gfx * model,
float scale )
Attention
Objects will not be clickable if editor is enabled mid-race.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Load_AddStaticMeshActor()

void Editor::Load_AddStaticMeshActor ( const nlohmann::json & actorJson)
Here is the caller graph for this function:

◆ LoadActors()

void Editor::LoadActors ( Track * track,
nlohmann::json & data )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadLevel()

void Editor::LoadLevel ( Track * track,
std::string sceneFile )

Do not use gWorldInstance.CurrentCourse during loading! The current track is not guaranteed!

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadMinimap()

void Editor::LoadMinimap ( Track * track,
std::string filePath )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadProps()

void Editor::LoadProps ( Track * track,
nlohmann::json & data )
Here is the caller graph for this function:

◆ LoadStaticMeshActors()

void Editor::LoadStaticMeshActors ( Track * track,
nlohmann::json & data )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadTour()

void Editor::LoadTour ( Track * track,
nlohmann::json & data )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SaveActors()

void Editor::SaveActors ( nlohmann::json & actorList)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SaveLevel()

void Editor::SaveLevel ( )

Save track properties, static mesh actors, actors, and tour camera

Write data to file

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SaveStaticMeshActors()

void Editor::SaveStaticMeshActors ( nlohmann::json & actorList)
Here is the caller graph for this function:

◆ SaveTour()

void Editor::SaveTour ( nlohmann::json & tour)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetDefaultMinimap()

void Editor::SetDefaultMinimap ( Track * track)
Here is the caller graph for this function:

◆ SetSceneFile()

void Editor::SetSceneFile ( std::shared_ptr< Ship::Archive > archive,
std::string sceneFile )
Here is the caller graph for this function:

◆ SpawnActors()

void Editor::SpawnActors ( std::vector< std::pair< std::string, SpawnParams > > spawnList)

◆ ToJson() [1/3]

nlohmann::json Editor::ToJson ( const FVector & v)
inline
Here is the caller graph for this function:

◆ ToJson() [2/3]

nlohmann::json Editor::ToJson ( const TourCamera::CameraShot & shot)
inline
Here is the call graph for this function:

◆ ToJson() [3/3]

nlohmann::json Editor::ToJson ( const TourCamera::KeyFrame & kf)
inline
Here is the call graph for this function:

Variable Documentation

◆ ActorList

std::unordered_map<std::string, std::function<AActor*(const FVector&)> > Editor::ActorList
Initial value:
= {
{ "Falling Rock", [](const FVector& pos) { return AFallingRock::Spawn(pos, 80); } },
{ "Mario Sign", [](const FVector& pos) { return AMarioSign::Spawn(pos, IRotator(0, 0, 0), FVector(0, 0, 0), FVector(1.0f, 1.0f, 1.0f)); } },
{ "Wario Sign", [](const FVector& pos) { return AWarioSign::Spawn(pos, IRotator(0, 0, 0), FVector(0, 0, 0), FVector(1.0f, 1.0f, 1.0f)); } },
{ "Cloud", [](const FVector& pos) { return ACloud::Spawn(pos, 500, 3.0f, 200.0f); } },
{ "Finishline", [](const FVector& pos) { return AFinishline::Spawn(pos, IRotator(0, 0, 0)); } },
{ "Ghostship", [](const FVector& pos) { return AShip::Spawn(pos, IRotator(0, 0, 0), FVector(0.4f, 0.4f, 0.4f), AShip::Skin::GHOSTSHIP); } },
{ "Ship 1", [](const FVector& pos) { return AShip::Spawn(pos, IRotator(0, 0, 0), FVector(0.4f, 0.4f, 0.4f), AShip::Skin::SHIP2); } },
{ "Ship 2", [](const FVector& pos) { return AShip::Spawn(pos, IRotator(0, 0, 0), FVector(0.4f, 0.4f, 0.4f), AShip::Skin::SHIP3); } },
{ "SpaghettiShip", [](const FVector& pos) { return ASpaghettiShip::Spawn(pos, IRotator(0, 0, 0), FVector(0.4f, 0.4f, 0.4f)); } },
{ "Starship", [](const FVector& pos) { return AStarship::Spawn(pos, IRotator(0, 0, 0), FVector(1.5f, 1.5f, 1.5f), 0.01f, 150.0f); } },
{ "Train", [](const FVector& pos) { bIsTrainWindowOpen = true; return nullptr; } },
{ "Boat", [](const FVector& pos) { return ABoat::Spawn((0.6666666f)/4, 0, 0, ABoat::SpawnMode::AUTO); } },
{ "Bus", [](const FVector& pos) { return ABus::Spawn(2.0f, 2.5f, 0, 0, ABus::SpawnMode::AUTO); } },
{ "Car", [](const FVector& pos) { return ACar::Spawn(2.0f, 2.5f, 0, 0, ACar::SpawnMode::AUTO); } },
{ "Truck", [](const FVector& pos) { return ATruck::Spawn(2.0f, 2.5f, 0, 0, ATruck::SpawnMode::AUTO); } },
{ "Tanker Truck", [](const FVector& pos) { return ATankerTruck::Spawn(2.0f, 2.5f, 0, 0, ATankerTruck::SpawnMode::AUTO); } },
{ "Text", [](const FVector& pos) { return AText::Spawn("Harbour Masters", FVector(0, 0, 0), FVector(1.0f, 1.0f, 1.0f), AText::TextMode::STATIONARY, 0); } },
}
static ABoat * Spawn(f32 speed, uint32_t pathIndex, uint32_t pathPoint, ABoat::SpawnMode spawnMode)
Definition Boat.h:50
@ AUTO
Definition Boat.h:20
@ AUTO
Definition Bus.h:21
static ABus * Spawn(f32 speedA, f32 speedB, uint32_t pathIndex, uint32_t pathPoint, ABus::SpawnMode spawnMode)
Definition Bus.h:42
static ACar * Spawn(f32 speedA, f32 speedB, uint32_t pathIndex, uint32_t pathPoint, ACar::SpawnMode spawnMode)
Definition Car.h:35
@ AUTO
Definition Car.h:21
static ACloud * Spawn(FVector pos, uint16_t time, f32 hop, f32 gravity)
Definition Cloud.h:22
static AFallingRock * Spawn(FVector pos, int16_t respawnTimer)
Definition FallingRock.h:29
static AFinishline * Spawn()
Definition Finishline.h:37
static AMarioSign * Spawn(FVector pos, IRotator rot, FVector velocity, FVector scale)
Definition MarioSign.h:22
@ GHOSTSHIP
Definition Ship.h:18
@ SHIP2
Definition Ship.h:19
@ SHIP3
Definition Ship.h:20
static AShip * Spawn(FVector pos, IRotator rot, FVector scale, int16_t skin)
Definition Ship.h:27
static ASpaghettiShip * Spawn(FVector pos, IRotator rot, FVector scale)
Definition SpaghettiShip.h:20
static AStarship * Spawn(FVector pos, IRotator rot, FVector scale, f32 speed, f32 radius)
Definition Starship.h:20
@ AUTO
Definition TankerTruck.h:21
static ATankerTruck * Spawn(f32 speedA, f32 speedB, uint32_t pathIndex, uint32_t pathPoint, ATankerTruck::SpawnMode spawnMode)
Definition TankerTruck.h:42
static AText * Spawn(std::string text, FVector pos, FVector scale, AText::TextMode textMode, int16_t playerIndex)
Definition Text.h:100
@ STATIONARY
Definition Text.h:12
@ AUTO
Definition Truck.h:21
static ATruck * Spawn(f32 speedA, f32 speedB, uint32_t pathIndex, uint32_t pathPoint, ATruck::SpawnMode spawnMode)
Definition Truck.h:47
static AWarioSign * Spawn(FVector pos, IRotator rot, FVector velocity, FVector scale)
Definition WarioSign.h:19
bool bIsTrainWindowOpen
Definition ContentBrowser.cpp:32
Definition CoreMath.h:30
Definition CoreMath.h:137

◆ bIsTrainWindowOpen

bool Editor::bIsTrainWindowOpen = false

◆ CActorList

std::unordered_map<std::string, std::function<void(const FVector&)> > Editor::CActorList

◆ CurrentArchive

std::shared_ptr< Ship::Archive > Editor::CurrentArchive

◆ gDebugObjVtxCache

std::unordered_map<GameObject*, std::vector<Vtx> > Editor::gDebugObjVtxCache

◆ ObjectList

std::unordered_map<std::string, std::function<OObject*(const FVector&)> > Editor::ObjectList
Initial value:
= {
{ "Bat", [](const FVector& pos) { return OBat::Spawn(pos, IRotator(0, 0, 0)); } },
{ "Bomb Kart", [](const FVector& pos) { return OBombKart::Spawn(pos, 1, 0.8333333f); } },
{ "Boos", [](const FVector& pos) { return OBoos::Spawn(5, IPathSpan(0, 50), IPathSpan(60, 90), IPathSpan(100, 140)); } },
{ "Cheep Cheep", [](const FVector& pos) { return OCheepCheep::Spawn(pos, OCheepCheep::Behaviour::RACE, IPathSpan(0, 10)); } },
{ "Crab", [](const FVector& pos) { return OCrab::Spawn(FVector2D(pos.x, pos.z), FVector2D(pos.x + 100, pos.z + 100)); } },
{ "Flagpole", [](const FVector& pos) { return OFlagpole::Spawn(pos, 0); } },
{ "Hedgehog", [](const FVector& pos) { return OHedgehog::Spawn(pos, FVector2D(0, 10), 0); } },
{ "Hot Air Balloon", [](const FVector& pos) { return OHotAirBalloon::Spawn(pos); } },
{ "Lakitu", [](const FVector& pos) { return new OLakitu(0, OLakitu::LakituType::STARTER); } },
{ "Penguin", [](const FVector& pos) { return OPenguin::Spawn(pos, 0x150, 0, 100.0f, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE); } },
{ "Seagull", [](const FVector& pos) { return OSeagull::Spawn(pos); } },
{ "Thwomp", [](const FVector& pos) { return OThwomp::Spawn(pos.x, pos.z, 0, 1.0f, 1, 0, 7); } },
{ "Trash Bin", [](const FVector& pos) { return OTrashBin::Spawn(pos, IRotator(0, 0, 0), 1.0f, OTrashBin::Behaviour::MUNCHING); } },
{ "Trophy", [](const FVector& pos) { return OTrophy::Spawn(pos, OTrophy::TrophyType::GOLD_150, OTrophy::Behaviour::ROTATE2); } },
{ "Snowman", [](const FVector& pos) { return OSnowman::Spawn(pos); } },
{ "Podium", [](const FVector& pos) { return OPodium::Spawn(pos); } },
{ "Balloons", [](const FVector& pos) { return OGrandPrixBalloons::Spawn(pos); } },
}
static OBat * Spawn(const FVector &pos, const IRotator &rot)
Definition Bat.h:33
static OBombKart * Spawn(FVector pos, uint16_t behaviour, f32 unk_3C)
Definition BombKart.h:55
static OBoos * Spawn(size_t numBoos, const IPathSpan &leftBoundary, const IPathSpan &triggerBoundary, const IPathSpan &rightBoundary)
Definition Boos.h:40
static OCheepCheep * Spawn(const FVector &pos, Behaviour behaviour, IPathSpan span)
Definition CheepCheep.h:28
@ RACE
Definition CheepCheep.h:23
static OCrab * Spawn(const FVector2D &start, const FVector2D &end)
Definition Crab.h:34
static OFlagpole * Spawn(FVector pos, s16 direction)
Definition Flagpole.h:27
static OGrandPrixBalloons * Spawn(const FVector &pos)
Definition GrandPrixBalloons.h:31
static OHedgehog * Spawn(const FVector &pos, const FVector2D &patrolPoint, s16 behaviour)
Definition Hedgehog.h:30
static OHotAirBalloon * Spawn(FVector pos)
Definition HotAirBalloon.h:25
@ STARTER
Definition Lakitu.h:24
@ CIRCLE
Definition Penguin.h:30
@ ADULT
Definition Penguin.h:22
static OPenguin * Spawn(FVector pos, u16 direction, u16 mirrorModeAngleOffset, f32 diameter, PenguinType type, Behaviour behaviour)
Definition Penguin.h:41
static OPodium * Spawn(const FVector &pos)
Definition Podium.h:30
static OSeagull * Spawn(const FVector &pos)
Definition Seagull.h:33
static OSnowman * Spawn(FVector pos)
Definition Snowman.h:23
static OThwomp * Spawn(s16 x, s16 z, s16 direction, f32 scale, s16 behaviour, s16 primAlpha, u16 boundingBoxSize=7)
Definition Thwomp.h:51
@ MUNCHING
Definition TrashBin.h:25
static OTrashBin * Spawn(const FVector &pos, const IRotator &rot, f32 scale, OTrashBin::Behaviour bhv)
Definition TrashBin.h:29
static OTrophy * Spawn(const FVector &pos, TrophyType trophy, Behaviour bhv)
Definition Trophy.h:40
@ GOLD_150
Definition Trophy.h:28
@ ROTATE2
Definition Trophy.h:35

◆ SceneFile

std::string Editor::SceneFile = ""