diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2025-12-13 11:50:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-13 11:50:28 -0700 |
| commit | b934e98fc34964970ab5efacb2fb7c3372ae0b1a (patch) | |
| tree | cd96e5fabec7fdcc098d0de33b3b7e2754fb6cd5 /src/engine/editor/SceneManager.h | |
| parent | e6acb59ef4797ce27ddc9e21982c3f4e40824b52 (diff) | |
Refactor Track Class To Instantiate On Track Load (#587)
* Initial Commit
* First compilation of Registry template
* Further changes
* wip changes
* Impl TrackBrowser and Registry Info
* Remove const from TInfo
* Prep GetWorld
* Name refactor
* Refactor gWorldInstance to GetWorld()
* wip
* Should work now
* Data menu work again
* Fix editor staying open after program close
* Rename LoadLevel to LoadTrackDataFromJson
* More changes
* Add statue
* Add search to content browser using tags
* Fix statue pos and register tags
* Fix actor loading
* Fix delete all bug which deleted cameras
* reduce some boiler plate in actor and object
* Remove unused rulesets
* Search bar for all tabs
* fix data screen
* fix actor spawning
* temp editor fix
* Clean up
* improve extra mode transformation
* fix podium crash
* Fix editor clicking
* Fix editor clicking 2
* fix extra in custom track
* Fix FI for three actors
* Fix divide by zero error
* Ids managed by Registry
* Add scary comment
---------
Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Co-authored-by: coco875 <pereira.jannin@gmail.com>
Diffstat (limited to 'src/engine/editor/SceneManager.h')
| -rw-r--r-- | src/engine/editor/SceneManager.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/engine/editor/SceneManager.h b/src/engine/editor/SceneManager.h index f7b3a50bb..48b52a1e2 100644 --- a/src/engine/editor/SceneManager.h +++ b/src/engine/editor/SceneManager.h @@ -7,28 +7,26 @@ #include <nlohmann/json.hpp> namespace Editor { - void SaveLevel(); - void LoadLevel(Track* track, std::string sceneFile); + void SaveLevel(Track* track); + void LoadTrackDataFromJson(Track* track, const std::string& trackPath); + void LoadTrackInfo(TrackInfo& info, std::shared_ptr<Ship::Archive> archive, 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 SaveTour(Track* track, nlohmann::json& tour); void LoadProps(Track* track, nlohmann::json& data); + void LoadPaths(Track* track, const std::string& trackPath); + void LoadTrackInfoData(TrackInfo& info, 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); - extern std::shared_ptr<Ship::Archive> CurrentArchive; // This is used to retrieve and write the scene data file - extern std::string SceneFile; - - inline nlohmann::json ToJson(const FVector& v) { return { {"x", v.x}, |
