From 77987a42cf2f9810ce0672768be002a27ddfb938 Mon Sep 17 00:00:00 2001 From: Kenix3 Date: Sun, 7 May 2023 23:01:12 -0400 Subject: [PATCH] Bump LUS (#2855) * Bump LUS * Ship -> LUS namespace change * z_scene_otr Ship -> LUS namespace --- OTRExporter/OTRExporter/AnimationExporter.cpp | 10 +- OTRExporter/OTRExporter/ArrayExporter.cpp | 2 +- OTRExporter/OTRExporter/AudioExporter.cpp | 8 +- .../OTRExporter/BackgroundExporter.cpp | 2 +- OTRExporter/OTRExporter/BlobExporter.cpp | 2 +- OTRExporter/OTRExporter/CollisionExporter.cpp | 2 +- OTRExporter/OTRExporter/CutsceneExporter.cpp | 2 +- .../OTRExporter/DisplayListExporter.cpp | 4 +- OTRExporter/OTRExporter/Exporter.cpp | 2 +- OTRExporter/OTRExporter/Exporter.h | 2 +- OTRExporter/OTRExporter/Main.cpp | 10 +- OTRExporter/OTRExporter/Main.h | 2 +- OTRExporter/OTRExporter/MtxExporter.cpp | 2 +- OTRExporter/OTRExporter/PathExporter.cpp | 2 +- .../OTRExporter/PlayerAnimationExporter.cpp | 2 +- OTRExporter/OTRExporter/RoomExporter.cpp | 2 +- OTRExporter/OTRExporter/SkeletonExporter.cpp | 2 +- .../OTRExporter/SkeletonLimbExporter.cpp | 2 +- OTRExporter/OTRExporter/TextExporter.cpp | 2 +- OTRExporter/OTRExporter/TextureExporter.cpp | 2 +- OTRExporter/OTRExporter/VersionInfo.cpp | 34 +- OTRExporter/OTRExporter/VersionInfo.h | 2 +- OTRExporter/OTRExporter/VtxExporter.cpp | 4 +- libultraship | 2 +- soh/include/z64.h | 2 +- .../Enhancements/audio/AudioCollection.cpp | 4 +- soh/soh/Enhancements/audio/AudioEditor.cpp | 18 +- .../controls/GameControlEditor.cpp | 42 +- .../cosmetics/CosmeticsEditor.cpp | 60 +- soh/soh/Enhancements/debugconsole.cpp | 580 +++++++++--------- soh/soh/Enhancements/debugger/actorViewer.cpp | 2 +- soh/soh/Enhancements/debugger/colViewer.cpp | 2 +- .../Enhancements/debugger/debugSaveEditor.cpp | 44 +- soh/soh/Enhancements/debugger/dlViewer.cpp | 4 +- .../GameInteractor_RawAction.cpp | 2 +- soh/soh/Enhancements/gameplaystats.cpp | 2 +- soh/soh/Enhancements/presets.cpp | 2 +- .../randomizer/3drando/rando_main.cpp | 2 +- .../randomizer/3drando/spoiler_log.cpp | 6 +- .../Enhancements/randomizer/randomizer.cpp | 6 +- .../randomizer/randomizer_check_tracker.cpp | 10 +- .../randomizer_entrance_tracker.cpp | 2 +- .../randomizer/randomizer_item_tracker.cpp | 30 +- soh/soh/Enhancements/savestates.cpp | 10 +- soh/soh/Enhancements/tts/tts.cpp | 8 +- soh/soh/GameMenuBar.cpp | 128 ++-- soh/soh/OTRGlobals.cpp | 134 ++-- soh/soh/OTRGlobals.h | 2 +- soh/soh/SaveManager.cpp | 16 +- soh/soh/UIWidgets.cpp | 20 +- .../resource/importer/AnimationFactory.cpp | 6 +- soh/soh/resource/importer/AnimationFactory.h | 4 +- .../resource/importer/AudioSampleFactory.cpp | 8 +- .../resource/importer/AudioSampleFactory.h | 4 +- .../importer/AudioSequenceFactory.cpp | 6 +- .../resource/importer/AudioSequenceFactory.h | 4 +- .../importer/AudioSoundFontFactory.cpp | 16 +- .../resource/importer/AudioSoundFontFactory.h | 4 +- .../resource/importer/BackgroundFactory.cpp | 4 +- soh/soh/resource/importer/BackgroundFactory.h | 4 +- .../importer/CollisionHeaderFactory.cpp | 4 +- .../importer/CollisionHeaderFactory.h | 4 +- soh/soh/resource/importer/CutsceneFactory.cpp | 12 +- soh/soh/resource/importer/CutsceneFactory.h | 4 +- soh/soh/resource/importer/PathFactory.cpp | 6 +- soh/soh/resource/importer/PathFactory.h | 4 +- .../importer/PlayerAnimationFactory.cpp | 6 +- .../importer/PlayerAnimationFactory.h | 4 +- soh/soh/resource/importer/SceneFactory.cpp | 54 +- soh/soh/resource/importer/SceneFactory.h | 4 +- soh/soh/resource/importer/SkeletonFactory.cpp | 22 +- soh/soh/resource/importer/SkeletonFactory.h | 4 +- .../resource/importer/SkeletonLimbFactory.cpp | 40 +- .../resource/importer/SkeletonLimbFactory.h | 4 +- soh/soh/resource/importer/TextFactory.cpp | 6 +- soh/soh/resource/importer/TextFactory.h | 4 +- .../scenecommand/EndMarkerFactory.cpp | 6 +- .../importer/scenecommand/EndMarkerFactory.h | 4 +- .../scenecommand/SceneCommandFactory.cpp | 2 +- .../scenecommand/SceneCommandFactory.h | 4 +- .../scenecommand/SetActorListFactory.cpp | 6 +- .../scenecommand/SetActorListFactory.h | 4 +- .../SetAlternateHeadersFactory.cpp | 8 +- .../scenecommand/SetAlternateHeadersFactory.h | 4 +- .../scenecommand/SetCameraSettingsFactory.cpp | 6 +- .../scenecommand/SetCameraSettingsFactory.h | 4 +- .../SetCollisionHeaderFactory.cpp | 8 +- .../scenecommand/SetCollisionHeaderFactory.h | 4 +- .../scenecommand/SetCsCameraFactory.cpp | 6 +- .../scenecommand/SetCsCameraFactory.h | 4 +- .../scenecommand/SetCutscenesFactory.cpp | 8 +- .../scenecommand/SetCutscenesFactory.h | 4 +- .../scenecommand/SetEchoSettingsFactory.cpp | 6 +- .../scenecommand/SetEchoSettingsFactory.h | 4 +- .../scenecommand/SetEntranceListFactory.cpp | 6 +- .../scenecommand/SetEntranceListFactory.h | 4 +- .../scenecommand/SetExitListFactory.cpp | 6 +- .../scenecommand/SetExitListFactory.h | 4 +- .../scenecommand/SetLightListFactory.cpp | 6 +- .../scenecommand/SetLightListFactory.h | 4 +- .../SetLightingSettingsFactory.cpp | 6 +- .../scenecommand/SetLightingSettingsFactory.h | 4 +- .../importer/scenecommand/SetMeshFactory.cpp | 22 +- .../importer/scenecommand/SetMeshFactory.h | 4 +- .../scenecommand/SetObjectListFactory.cpp | 6 +- .../scenecommand/SetObjectListFactory.h | 4 +- .../scenecommand/SetPathwaysFactory.cpp | 8 +- .../scenecommand/SetPathwaysFactory.h | 4 +- .../scenecommand/SetRoomBehaviorFactory.cpp | 6 +- .../scenecommand/SetRoomBehaviorFactory.h | 4 +- .../scenecommand/SetRoomListFactory.cpp | 6 +- .../scenecommand/SetRoomListFactory.h | 4 +- .../scenecommand/SetSkyboxModifierFactory.cpp | 6 +- .../scenecommand/SetSkyboxModifierFactory.h | 4 +- .../scenecommand/SetSkyboxSettingsFactory.cpp | 4 +- .../scenecommand/SetSkyboxSettingsFactory.h | 4 +- .../scenecommand/SetSoundSettingsFactory.cpp | 6 +- .../scenecommand/SetSoundSettingsFactory.h | 4 +- .../scenecommand/SetSpecialObjectsFactory.cpp | 6 +- .../scenecommand/SetSpecialObjectsFactory.h | 4 +- .../SetStartPositionListFactory.cpp | 6 +- .../SetStartPositionListFactory.h | 4 +- .../scenecommand/SetTimeSettingsFactory.cpp | 6 +- .../scenecommand/SetTimeSettingsFactory.h | 4 +- .../SetTransitionActorListFactory.cpp | 6 +- .../SetTransitionActorListFactory.h | 4 +- .../scenecommand/SetWindSettingsFactory.cpp | 6 +- .../scenecommand/SetWindSettingsFactory.h | 4 +- soh/soh/resource/type/Animation.cpp | 4 +- soh/soh/resource/type/Animation.h | 4 +- soh/soh/resource/type/AudioSample.cpp | 4 +- soh/soh/resource/type/AudioSample.h | 4 +- soh/soh/resource/type/AudioSequence.cpp | 4 +- soh/soh/resource/type/AudioSequence.h | 4 +- soh/soh/resource/type/AudioSoundFont.cpp | 4 +- soh/soh/resource/type/AudioSoundFont.h | 4 +- soh/soh/resource/type/Background.cpp | 4 +- soh/soh/resource/type/Background.h | 4 +- soh/soh/resource/type/CollisionHeader.cpp | 4 +- soh/soh/resource/type/CollisionHeader.h | 4 +- soh/soh/resource/type/Cutscene.cpp | 4 +- soh/soh/resource/type/Cutscene.h | 4 +- soh/soh/resource/type/Path.cpp | 4 +- soh/soh/resource/type/Path.h | 4 +- soh/soh/resource/type/PlayerAnimation.cpp | 4 +- soh/soh/resource/type/PlayerAnimation.h | 4 +- soh/soh/resource/type/Scene.cpp | 4 +- soh/soh/resource/type/Scene.h | 4 +- soh/soh/resource/type/Skeleton.cpp | 14 +- soh/soh/resource/type/Skeleton.h | 4 +- soh/soh/resource/type/SkeletonLimb.cpp | 4 +- soh/soh/resource/type/SkeletonLimb.h | 4 +- soh/soh/resource/type/Text.cpp | 4 +- soh/soh/resource/type/Text.h | 4 +- .../resource/type/scenecommand/EndMarker.cpp | 4 +- .../resource/type/scenecommand/EndMarker.h | 4 +- soh/soh/resource/type/scenecommand/RomFile.h | 2 +- .../resource/type/scenecommand/SceneCommand.h | 4 +- .../type/scenecommand/SetActorList.cpp | 4 +- .../resource/type/scenecommand/SetActorList.h | 4 +- .../type/scenecommand/SetAlternateHeaders.cpp | 4 +- .../type/scenecommand/SetAlternateHeaders.h | 4 +- .../type/scenecommand/SetCameraSettings.cpp | 4 +- .../type/scenecommand/SetCameraSettings.h | 4 +- .../type/scenecommand/SetCollisionHeader.cpp | 4 +- .../type/scenecommand/SetCollisionHeader.h | 4 +- .../type/scenecommand/SetCsCamera.cpp | 4 +- .../resource/type/scenecommand/SetCsCamera.h | 4 +- .../type/scenecommand/SetCutscenes.cpp | 4 +- .../resource/type/scenecommand/SetCutscenes.h | 4 +- .../type/scenecommand/SetEchoSettings.cpp | 4 +- .../type/scenecommand/SetEchoSettings.h | 4 +- .../type/scenecommand/SetEntranceList.cpp | 4 +- .../type/scenecommand/SetEntranceList.h | 4 +- .../type/scenecommand/SetExitList.cpp | 4 +- .../resource/type/scenecommand/SetExitList.h | 4 +- .../type/scenecommand/SetLightList.cpp | 4 +- .../resource/type/scenecommand/SetLightList.h | 4 +- .../type/scenecommand/SetLightingSettings.cpp | 4 +- .../type/scenecommand/SetLightingSettings.h | 4 +- .../resource/type/scenecommand/SetMesh.cpp | 4 +- soh/soh/resource/type/scenecommand/SetMesh.h | 4 +- .../type/scenecommand/SetObjectList.cpp | 4 +- .../type/scenecommand/SetObjectList.h | 4 +- .../type/scenecommand/SetPathways.cpp | 6 +- .../resource/type/scenecommand/SetPathways.h | 6 +- .../type/scenecommand/SetRoomBehavior.cpp | 4 +- .../type/scenecommand/SetRoomBehavior.h | 4 +- .../type/scenecommand/SetRoomList.cpp | 4 +- .../resource/type/scenecommand/SetRoomList.h | 4 +- .../type/scenecommand/SetSkyboxModifier.cpp | 4 +- .../type/scenecommand/SetSkyboxModifier.h | 4 +- .../type/scenecommand/SetSkyboxSettings.cpp | 4 +- .../type/scenecommand/SetSkyboxSettings.h | 4 +- .../type/scenecommand/SetSoundSettings.cpp | 4 +- .../type/scenecommand/SetSoundSettings.h | 4 +- .../type/scenecommand/SetSpecialObjects.cpp | 4 +- .../type/scenecommand/SetSpecialObjects.h | 4 +- .../scenecommand/SetStartPositionList.cpp | 4 +- .../type/scenecommand/SetStartPositionList.h | 4 +- .../type/scenecommand/SetTimeSettings.cpp | 4 +- .../type/scenecommand/SetTimeSettings.h | 4 +- .../scenecommand/SetTransitionActorList.cpp | 4 +- .../scenecommand/SetTransitionActorList.h | 4 +- .../type/scenecommand/SetWindSettings.cpp | 4 +- .../type/scenecommand/SetWindSettings.h | 4 +- soh/soh/z_message_OTR.cpp | 4 +- soh/soh/z_play_otr.cpp | 12 +- soh/soh/z_scene_otr.cpp | 164 ++--- 209 files changed, 1134 insertions(+), 1134 deletions(-) diff --git a/OTRExporter/OTRExporter/AnimationExporter.cpp b/OTRExporter/OTRExporter/AnimationExporter.cpp index 2d1039947..416d74725 100644 --- a/OTRExporter/OTRExporter/AnimationExporter.cpp +++ b/OTRExporter/OTRExporter/AnimationExporter.cpp @@ -5,20 +5,20 @@ void OTRExporter_Animation::Save(ZResource* res, const fs::path& outPath, Binary { ZAnimation* anim = (ZAnimation*)res; - WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_Animation); + WriteHeader(res, outPath, writer, LUS::ResourceType::SOH_Animation); ZNormalAnimation* normalAnim = dynamic_cast(anim); ZCurveAnimation* curveAnim = dynamic_cast(anim); ZLinkAnimation* linkAnim = dynamic_cast(anim); if (linkAnim != nullptr) { - writer->Write((uint32_t)Ship::AnimationType::Link); + writer->Write((uint32_t)LUS::AnimationType::Link); writer->Write((uint16_t)linkAnim->frameCount); writer->Write((uint32_t)linkAnim->segmentAddress); } else if (curveAnim != nullptr) { - writer->Write((uint32_t)Ship::AnimationType::Curve); + writer->Write((uint32_t)LUS::AnimationType::Curve); writer->Write((uint16_t)curveAnim->frameCount); writer->Write((uint32_t)curveAnim->refIndexArr.size()); @@ -44,7 +44,7 @@ void OTRExporter_Animation::Save(ZResource* res, const fs::path& outPath, Binary } else if (normalAnim != nullptr) { - writer->Write((uint32_t)Ship::AnimationType::Normal); + writer->Write((uint32_t)LUS::AnimationType::Normal); writer->Write((uint16_t)normalAnim->frameCount); writer->Write((uint32_t)normalAnim->rotationValues.size()); @@ -65,6 +65,6 @@ void OTRExporter_Animation::Save(ZResource* res, const fs::path& outPath, Binary } else { - writer->Write((uint32_t)Ship::AnimationType::Legacy); + writer->Write((uint32_t)LUS::AnimationType::Legacy); } } diff --git a/OTRExporter/OTRExporter/ArrayExporter.cpp b/OTRExporter/OTRExporter/ArrayExporter.cpp index f83bfd87d..f6b602bbb 100644 --- a/OTRExporter/OTRExporter/ArrayExporter.cpp +++ b/OTRExporter/OTRExporter/ArrayExporter.cpp @@ -5,7 +5,7 @@ void OTRExporter_Array::Save(ZResource* res, const fs::path& outPath, BinaryWrit { ZArray* arr = (ZArray*)res; - WriteHeader(res, outPath, writer, Ship::ResourceType::Array); + WriteHeader(res, outPath, writer, LUS::ResourceType::Array); writer->Write((uint32_t)arr->resList[0]->GetResourceType()); writer->Write((uint32_t)arr->arrayCnt); diff --git a/OTRExporter/OTRExporter/AudioExporter.cpp b/OTRExporter/OTRExporter/AudioExporter.cpp index 974e9d020..6e1f38e79 100644 --- a/OTRExporter/OTRExporter/AudioExporter.cpp +++ b/OTRExporter/OTRExporter/AudioExporter.cpp @@ -29,7 +29,7 @@ void OTRExporter_Audio::WriteSampleEntryReference(ZAudio* audio, SampleEntry* en void OTRExporter_Audio::WriteSampleEntry(SampleEntry* entry, BinaryWriter* writer) { - WriteHeader(nullptr, "", writer, Ship::ResourceType::SOH_AudioSample, 2); + WriteHeader(nullptr, "", writer, LUS::ResourceType::SOH_AudioSample, 2); writer->Write(entry->codec); writer->Write(entry->medium); @@ -81,7 +81,7 @@ void OTRExporter_Audio::Save(ZResource* res, const fs::path& outPath, BinaryWrit { ZAudio* audio = (ZAudio*)res; - WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_Audio, 2); + WriteHeader(res, outPath, writer, LUS::ResourceType::SOH_Audio, 2); // Write Samples as individual files for (auto pair : audio->samples) @@ -114,7 +114,7 @@ void OTRExporter_Audio::Save(ZResource* res, const fs::path& outPath, BinaryWrit MemoryStream* fntStream = new MemoryStream(); BinaryWriter fntWriter = BinaryWriter(fntStream); - WriteHeader(nullptr, "", &fntWriter, Ship::ResourceType::SOH_AudioSoundFont, 2); + WriteHeader(nullptr, "", &fntWriter, LUS::ResourceType::SOH_AudioSoundFont, 2); fntWriter.Write((uint32_t)i); fntWriter.Write(audio->soundFontTable[i].medium); @@ -173,7 +173,7 @@ void OTRExporter_Audio::Save(ZResource* res, const fs::path& outPath, BinaryWrit MemoryStream* seqStream = new MemoryStream(); BinaryWriter seqWriter = BinaryWriter(seqStream); - WriteHeader(nullptr, "", &seqWriter, Ship::ResourceType::SOH_AudioSequence, 2); + WriteHeader(nullptr, "", &seqWriter, LUS::ResourceType::SOH_AudioSequence, 2); seqWriter.Write((uint32_t)seq.size()); seqWriter.Write(seq.data(), seq.size()); diff --git a/OTRExporter/OTRExporter/BackgroundExporter.cpp b/OTRExporter/OTRExporter/BackgroundExporter.cpp index ced388d43..f0f1a55f4 100644 --- a/OTRExporter/OTRExporter/BackgroundExporter.cpp +++ b/OTRExporter/OTRExporter/BackgroundExporter.cpp @@ -5,7 +5,7 @@ void OTRExporter_Background::Save(ZResource* res, const fs::path& outPath, Binar { ZBackground* bg = (ZBackground*)res; - WriteHeader(bg, outPath, writer, Ship::ResourceType::SOH_Background); + WriteHeader(bg, outPath, writer, LUS::ResourceType::SOH_Background); writer->Write((uint32_t)bg->GetRawDataSize()); diff --git a/OTRExporter/OTRExporter/BlobExporter.cpp b/OTRExporter/OTRExporter/BlobExporter.cpp index 24cb9c1e0..a547718e3 100644 --- a/OTRExporter/OTRExporter/BlobExporter.cpp +++ b/OTRExporter/OTRExporter/BlobExporter.cpp @@ -5,7 +5,7 @@ void OTRExporter_Blob::Save(ZResource* res, const fs::path& outPath, BinaryWrite { ZBlob* blob = (ZBlob*)res; - WriteHeader(blob, outPath, writer, Ship::ResourceType::Blob); + WriteHeader(blob, outPath, writer, LUS::ResourceType::Blob); auto start = std::chrono::steady_clock::now(); diff --git a/OTRExporter/OTRExporter/CollisionExporter.cpp b/OTRExporter/OTRExporter/CollisionExporter.cpp index 3aab347b3..cbcdbb35f 100644 --- a/OTRExporter/OTRExporter/CollisionExporter.cpp +++ b/OTRExporter/OTRExporter/CollisionExporter.cpp @@ -5,7 +5,7 @@ void OTRExporter_Collision::Save(ZResource* res, const fs::path& outPath, Binary { ZCollisionHeader* col = (ZCollisionHeader*)res; - WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_CollisionHeader); + WriteHeader(res, outPath, writer, LUS::ResourceType::SOH_CollisionHeader); writer->Write(col->absMinX); writer->Write(col->absMinY); diff --git a/OTRExporter/OTRExporter/CutsceneExporter.cpp b/OTRExporter/OTRExporter/CutsceneExporter.cpp index 8b53637cb..2194ce65a 100644 --- a/OTRExporter/OTRExporter/CutsceneExporter.cpp +++ b/OTRExporter/OTRExporter/CutsceneExporter.cpp @@ -5,7 +5,7 @@ void OTRExporter_Cutscene::Save(ZResource* res, const fs::path& outPath, BinaryW { ZCutscene* cs = (ZCutscene*)res; - WriteHeader(cs, outPath, writer, Ship::ResourceType::SOH_Cutscene); + WriteHeader(cs, outPath, writer, LUS::ResourceType::SOH_Cutscene); writer->Write((uint32_t)0); diff --git a/OTRExporter/OTRExporter/DisplayListExporter.cpp b/OTRExporter/OTRExporter/DisplayListExporter.cpp index 82d45891e..81863f09d 100644 --- a/OTRExporter/OTRExporter/DisplayListExporter.cpp +++ b/OTRExporter/OTRExporter/DisplayListExporter.cpp @@ -50,7 +50,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina //printf("Exporting DList %s\n", dList->GetName().c_str()); - WriteHeader(res, outPath, writer, Ship::ResourceType::DisplayList); + WriteHeader(res, outPath, writer, LUS::ResourceType::DisplayList); while (writer->GetBaseAddress() % 8 != 0) writer->Write((uint8_t)0xFF); @@ -786,7 +786,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina } // OTRTODO: Once we aren't relying on text representations, we should call ArrayExporter... - OTRExporter::WriteHeader(nullptr, "", &vtxWriter, Ship::ResourceType::Array); + OTRExporter::WriteHeader(nullptr, "", &vtxWriter, LUS::ResourceType::Array); vtxWriter.Write((uint32_t)ZResourceType::Vertex); vtxWriter.Write((uint32_t)arrCnt); diff --git a/OTRExporter/OTRExporter/Exporter.cpp b/OTRExporter/OTRExporter/Exporter.cpp index bf04e2355..a523bb16c 100644 --- a/OTRExporter/OTRExporter/Exporter.cpp +++ b/OTRExporter/OTRExporter/Exporter.cpp @@ -1,7 +1,7 @@ #include "Exporter.h" #include "VersionInfo.h" -void OTRExporter::WriteHeader(ZResource* res, const fs::path& outPath, BinaryWriter* writer, Ship::ResourceType resType, int32_t resVersion) +void OTRExporter::WriteHeader(ZResource* res, const fs::path& outPath, BinaryWriter* writer, LUS::ResourceType resType, int32_t resVersion) { writer->Write((uint8_t)Endianness::Little); // 0x00 writer->Write((uint8_t)0); // 0x01 diff --git a/OTRExporter/OTRExporter/Exporter.h b/OTRExporter/OTRExporter/Exporter.h index 853c1b544..cd4ed9adb 100644 --- a/OTRExporter/OTRExporter/Exporter.h +++ b/OTRExporter/OTRExporter/Exporter.h @@ -10,5 +10,5 @@ class OTRExporter : public ZResourceExporter { protected: - static void WriteHeader(ZResource* res, const fs::path& outPath, BinaryWriter* writer, Ship::ResourceType resType, int32_t resVersion = 0); + static void WriteHeader(ZResource* res, const fs::path& outPath, BinaryWriter* writer, LUS::ResourceType resType, int32_t resVersion = 0); }; \ No newline at end of file diff --git a/OTRExporter/OTRExporter/Main.cpp b/OTRExporter/OTRExporter/Main.cpp index a7303bbc2..b5e634ad4 100644 --- a/OTRExporter/OTRExporter/Main.cpp +++ b/OTRExporter/OTRExporter/Main.cpp @@ -26,7 +26,7 @@ #include std::string otrFileName = "oot.otr"; -std::shared_ptr otrArchive; +std::shared_ptr otrArchive; BinaryWriter* fileWriter; std::chrono::steady_clock::time_point fileStart, resStart; std::map> files; @@ -48,9 +48,9 @@ static void ExporterParseFileMode(const std::string& buildMode, ZFileMode& fileM printf("BOTR: Generating OTR Archive...\n"); if (DiskFile::Exists(otrFileName)) - otrArchive = std::shared_ptr(new Ship::Archive(otrFileName, true)); + otrArchive = std::shared_ptr(new LUS::Archive(otrFileName, true)); else - otrArchive = Ship::Archive::CreateArchive(otrFileName, 40000); + otrArchive = LUS::Archive::CreateArchive(otrFileName, 40000); auto lst = Directory::ListFiles("Extract"); @@ -86,7 +86,7 @@ static void ExporterProgramEnd() printf("Created version file.\n"); printf("Generating OTR Archive...\n"); - otrArchive = Ship::Archive::CreateArchive(otrFileName, 40000); + otrArchive = LUS::Archive::CreateArchive(otrFileName, 40000); otrArchive->AddFile("version", (uintptr_t)versionStream->ToVector().data(), versionStream->GetLength()); @@ -115,7 +115,7 @@ static void ExporterProgramEnd() return; } const auto& lst = Directory::ListFiles("Extract"); - std::shared_ptr sohOtr = Ship::Archive::CreateArchive("soh.otr", 4096); + std::shared_ptr sohOtr = LUS::Archive::CreateArchive("soh.otr", 4096); //sohOtr->AddFile("version", (uintptr_t)versionStream->ToVector().data(), versionStream->GetLength()); for (const auto& item : lst) diff --git a/OTRExporter/OTRExporter/Main.h b/OTRExporter/OTRExporter/Main.h index 09485be36..3aa68c7e1 100644 --- a/OTRExporter/OTRExporter/Main.h +++ b/OTRExporter/OTRExporter/Main.h @@ -2,7 +2,7 @@ #include -extern std::shared_ptr otrArchive; +extern std::shared_ptr otrArchive; extern std::map> files; void AddFile(std::string fName, std::vector data); \ No newline at end of file diff --git a/OTRExporter/OTRExporter/MtxExporter.cpp b/OTRExporter/OTRExporter/MtxExporter.cpp index a329c43a2..129e43aeb 100644 --- a/OTRExporter/OTRExporter/MtxExporter.cpp +++ b/OTRExporter/OTRExporter/MtxExporter.cpp @@ -4,7 +4,7 @@ void OTRExporter_MtxExporter::Save(ZResource* res, const fs::path& outPath, Bina { ZMtx* mtx = (ZMtx*)res; - WriteHeader(res, outPath, writer, Ship::ResourceType::Matrix); + WriteHeader(res, outPath, writer, LUS::ResourceType::Matrix); for (size_t i = 0; i < 4; i++) for (size_t j = 0; j < 4; j++) diff --git a/OTRExporter/OTRExporter/PathExporter.cpp b/OTRExporter/OTRExporter/PathExporter.cpp index e3f797d9c..cc507c7aa 100644 --- a/OTRExporter/OTRExporter/PathExporter.cpp +++ b/OTRExporter/OTRExporter/PathExporter.cpp @@ -5,7 +5,7 @@ void OTRExporter_Path::Save(ZResource* res, const fs::path& outPath, BinaryWrite { ZPath* path = (ZPath*)res; - WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_Path); + WriteHeader(res, outPath, writer, LUS::ResourceType::SOH_Path); writer->Write((uint32_t)path->pathways.size()); diff --git a/OTRExporter/OTRExporter/PlayerAnimationExporter.cpp b/OTRExporter/OTRExporter/PlayerAnimationExporter.cpp index 22d108c82..b735c4e42 100644 --- a/OTRExporter/OTRExporter/PlayerAnimationExporter.cpp +++ b/OTRExporter/OTRExporter/PlayerAnimationExporter.cpp @@ -5,7 +5,7 @@ void OTRExporter_PlayerAnimationExporter::Save(ZResource* res, const fs::path& o { ZPlayerAnimationData* anim = (ZPlayerAnimationData*)res; - WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_PlayerAnimation); + WriteHeader(res, outPath, writer, LUS::ResourceType::SOH_PlayerAnimation); auto start = std::chrono::steady_clock::now(); diff --git a/OTRExporter/OTRExporter/RoomExporter.cpp b/OTRExporter/OTRExporter/RoomExporter.cpp index b34f49697..3959d7639 100644 --- a/OTRExporter/OTRExporter/RoomExporter.cpp +++ b/OTRExporter/OTRExporter/RoomExporter.cpp @@ -39,7 +39,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite { ZRoom* room = (ZRoom*)res; - WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_Room); + WriteHeader(res, outPath, writer, LUS::ResourceType::SOH_Room); writer->Write((uint32_t)room->commands.size()); diff --git a/OTRExporter/OTRExporter/SkeletonExporter.cpp b/OTRExporter/OTRExporter/SkeletonExporter.cpp index 1a8947a62..fc4bba6fa 100644 --- a/OTRExporter/OTRExporter/SkeletonExporter.cpp +++ b/OTRExporter/OTRExporter/SkeletonExporter.cpp @@ -7,7 +7,7 @@ void OTRExporter_Skeleton::Save(ZResource* res, const fs::path& outPath, BinaryW { ZSkeleton* skel = (ZSkeleton*)res; - WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_Skeleton); + WriteHeader(res, outPath, writer, LUS::ResourceType::SOH_Skeleton); writer->Write((uint8_t)skel->type); writer->Write((uint8_t)skel->limbType); diff --git a/OTRExporter/OTRExporter/SkeletonLimbExporter.cpp b/OTRExporter/OTRExporter/SkeletonLimbExporter.cpp index 9b8742538..1ee17c444 100644 --- a/OTRExporter/OTRExporter/SkeletonLimbExporter.cpp +++ b/OTRExporter/OTRExporter/SkeletonLimbExporter.cpp @@ -7,7 +7,7 @@ void OTRExporter_SkeletonLimb::Save(ZResource* res, const fs::path& outPath, Bin { ZLimb* limb = (ZLimb*)res; - WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_SkeletonLimb); + WriteHeader(res, outPath, writer, LUS::ResourceType::SOH_SkeletonLimb); writer->Write((uint8_t)limb->type); writer->Write((uint8_t)limb->skinSegmentType); diff --git a/OTRExporter/OTRExporter/TextExporter.cpp b/OTRExporter/OTRExporter/TextExporter.cpp index 1e8c8da9d..2fcfe8251 100644 --- a/OTRExporter/OTRExporter/TextExporter.cpp +++ b/OTRExporter/OTRExporter/TextExporter.cpp @@ -5,7 +5,7 @@ void OTRExporter_Text::Save(ZResource* res, const fs::path& outPath, BinaryWrite { ZText* txt = (ZText*)res; - WriteHeader(txt, outPath, writer, Ship::ResourceType::SOH_Text); + WriteHeader(txt, outPath, writer, LUS::ResourceType::SOH_Text); writer->Write((uint32_t)txt->messages.size()); diff --git a/OTRExporter/OTRExporter/TextureExporter.cpp b/OTRExporter/OTRExporter/TextureExporter.cpp index fae445cf8..77cc20955 100644 --- a/OTRExporter/OTRExporter/TextureExporter.cpp +++ b/OTRExporter/OTRExporter/TextureExporter.cpp @@ -5,7 +5,7 @@ void OTRExporter_Texture::Save(ZResource* res, const fs::path& outPath, BinaryWr { ZTexture* tex = (ZTexture*)res; - WriteHeader(tex, outPath, writer, Ship::ResourceType::Texture); + WriteHeader(tex, outPath, writer, LUS::ResourceType::Texture); auto start = std::chrono::steady_clock::now(); diff --git a/OTRExporter/OTRExporter/VersionInfo.cpp b/OTRExporter/OTRExporter/VersionInfo.cpp index 145aa86b9..50910bc31 100644 --- a/OTRExporter/OTRExporter/VersionInfo.cpp +++ b/OTRExporter/OTRExporter/VersionInfo.cpp @@ -1,25 +1,25 @@ #include "VersionInfo.h" #include -std::map resourceVersions; +std::map resourceVersions; void InitVersionInfo() { - resourceVersions = std::map { - { Ship::ResourceType::SOH_Animation, 0 }, - { Ship::ResourceType::Texture, 0 }, - { Ship::ResourceType::SOH_PlayerAnimation, 0 }, - { Ship::ResourceType::DisplayList, 0 }, - { Ship::ResourceType::SOH_Room, 0 }, - { Ship::ResourceType::SOH_CollisionHeader, 0 }, - { Ship::ResourceType::SOH_Skeleton, 0 }, - { Ship::ResourceType::SOH_SkeletonLimb, 0 }, - { Ship::ResourceType::Matrix, 0 }, - { Ship::ResourceType::SOH_Path, 0 }, - { Ship::ResourceType::Vertex, 0 }, - { Ship::ResourceType::SOH_Cutscene, 0 }, - { Ship::ResourceType::Array, 0 }, - { Ship::ResourceType::SOH_Text, 0 }, - { Ship::ResourceType::Blob, 0 }, + resourceVersions = std::map { + { LUS::ResourceType::SOH_Animation, 0 }, + { LUS::ResourceType::Texture, 0 }, + { LUS::ResourceType::SOH_PlayerAnimation, 0 }, + { LUS::ResourceType::DisplayList, 0 }, + { LUS::ResourceType::SOH_Room, 0 }, + { LUS::ResourceType::SOH_CollisionHeader, 0 }, + { LUS::ResourceType::SOH_Skeleton, 0 }, + { LUS::ResourceType::SOH_SkeletonLimb, 0 }, + { LUS::ResourceType::Matrix, 0 }, + { LUS::ResourceType::SOH_Path, 0 }, + { LUS::ResourceType::Vertex, 0 }, + { LUS::ResourceType::SOH_Cutscene, 0 }, + { LUS::ResourceType::Array, 0 }, + { LUS::ResourceType::SOH_Text, 0 }, + { LUS::ResourceType::Blob, 0 }, }; } diff --git a/OTRExporter/OTRExporter/VersionInfo.h b/OTRExporter/OTRExporter/VersionInfo.h index d1b67c7a5..03f8417f2 100644 --- a/OTRExporter/OTRExporter/VersionInfo.h +++ b/OTRExporter/OTRExporter/VersionInfo.h @@ -4,4 +4,4 @@ #include #include "src/resource/Resource.h" -extern std::map resourceVersions; \ No newline at end of file +extern std::map resourceVersions; \ No newline at end of file diff --git a/OTRExporter/OTRExporter/VtxExporter.cpp b/OTRExporter/OTRExporter/VtxExporter.cpp index 5d8001d24..009545d77 100644 --- a/OTRExporter/OTRExporter/VtxExporter.cpp +++ b/OTRExporter/OTRExporter/VtxExporter.cpp @@ -5,7 +5,7 @@ void OTRExporter_Vtx::SaveArr(ZResource* res, const fs::path& outPath, const std::vector& vec, BinaryWriter* writer) { - WriteHeader(res, outPath, writer, Ship::ResourceType::Vertex); + WriteHeader(res, outPath, writer, LUS::ResourceType::Vertex); for (auto& res: vec) { ZVtx* vtx = (ZVtx*)res; @@ -27,7 +27,7 @@ void OTRExporter_Vtx::Save(ZResource* res, const fs::path& outPath, BinaryWriter { ZVtx* vtx = (ZVtx*)res; - WriteHeader(res, outPath, writer, Ship::ResourceType::Vertex); + WriteHeader(res, outPath, writer, LUS::ResourceType::Vertex); writer->Write((uint32_t)1); //Yes I'm hard coding it to one, it *should* be fine. diff --git a/libultraship b/libultraship index 19958ec56..26cd6b45e 160000 --- a/libultraship +++ b/libultraship @@ -1 +1 @@ -Subproject commit 19958ec56fc9966e5a55e4701606f37f2cd8c903 +Subproject commit 26cd6b45e6d9614c0223f238734e70b8b85b1758 diff --git a/soh/include/z64.h b/soh/include/z64.h index 09332cd94..7fa24a1b6 100644 --- a/soh/include/z64.h +++ b/soh/include/z64.h @@ -39,7 +39,7 @@ #define SYSTEM_HEAP_SIZE (1024 * 1024 * 4) #ifdef __cplusplus -namespace Ship +namespace LUS { class Resource; class Scene; diff --git a/soh/soh/Enhancements/audio/AudioCollection.cpp b/soh/soh/Enhancements/audio/AudioCollection.cpp index b59385f8a..289abc256 100644 --- a/soh/soh/Enhancements/audio/AudioCollection.cpp +++ b/soh/soh/Enhancements/audio/AudioCollection.cpp @@ -229,7 +229,7 @@ void AudioCollection::RemoveFromShufflePool(SequenceInfo* seqInfo) { excludedSequences.insert(seqInfo); includedSequences.erase(seqInfo); CVarSetInteger(cvarKey.c_str(), 1); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } void AudioCollection::AddToShufflePool(SequenceInfo* seqInfo) { @@ -237,7 +237,7 @@ void AudioCollection::AddToShufflePool(SequenceInfo* seqInfo) { includedSequences.insert(seqInfo); excludedSequences.erase(seqInfo); CVarClear(cvarKey.c_str()); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } void AudioCollection::InitializeShufflePool() { diff --git a/soh/soh/Enhancements/audio/AudioEditor.cpp b/soh/soh/Enhancements/audio/AudioEditor.cpp index d6bf71d19..18d592796 100644 --- a/soh/soh/Enhancements/audio/AudioEditor.cpp +++ b/soh/soh/Enhancements/audio/AudioEditor.cpp @@ -158,7 +158,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) { const std::string randomizeAllButton = "Randomize All" + hiddenTabId; if (ImGui::Button(resetAllButton.c_str())) { ResetGroup(map, type); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); if (type == SEQ_BGM_WORLD) { ReplayCurrentBGM(); } @@ -166,7 +166,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) { ImGui::SameLine(); if (ImGui::Button(randomizeAllButton.c_str())) { RandomizeGroup(type); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); if (type == SEQ_BGM_WORLD) { ReplayCurrentBGM(); } @@ -205,7 +205,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) { if (ImGui::Selectable(seqData.label.c_str())) { CVarSetInteger(cvarKey.c_str(), value); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); UpdateCurrentBGM(defaultValue, type); } } @@ -219,7 +219,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) { ImGui::PushItemWidth(-FLT_MIN); if (ImGui::Button(resetButton.c_str())) { CVarSetInteger(cvarKey.c_str(), defaultValue); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); UpdateCurrentBGM(defaultValue, seqData.category); } ImGui::SameLine(); @@ -236,7 +236,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) { auto it = validSequences.begin(); const auto& seqData = *std::next(it, rand() % validSequences.size()); CVarSetInteger(cvarKey.c_str(), seqData->sequenceId); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); UpdateCurrentBGM(seqData->sequenceId, type); } } @@ -378,7 +378,7 @@ void DrawSfxEditor(bool& open) { const std::string resetButton = "Reset##linkVoiceFreqMultiplier"; if (ImGui::Button(resetButton.c_str())) { CVarSetFloat("gLinkVoiceFreqMultiplier", 1.0f); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::NewLine(); @@ -552,7 +552,7 @@ void DrawSfxEditor(bool& open) { void InitAudioEditor() { //Draw the bar in the menu. - Ship::AddWindow("Enhancements", "Audio Editor", DrawSfxEditor); + LUS::AddWindow("Enhancements", "Audio Editor", DrawSfxEditor); } std::vector allTypes = { SEQ_BGM_WORLD, SEQ_BGM_EVENT, SEQ_BGM_BATTLE, SEQ_OCARINA, SEQ_FANFARE, SEQ_INSTRUMENT, SEQ_SFX }; @@ -562,7 +562,7 @@ void AudioEditor_RandomizeAll() { RandomizeGroup(type); } - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); ReplayCurrentBGM(); } @@ -571,6 +571,6 @@ void AudioEditor_ResetAll() { ResetGroup(AudioCollection::Instance->GetAllSequences(), type); } - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); ReplayCurrentBGM(); } diff --git a/soh/soh/Enhancements/controls/GameControlEditor.cpp b/soh/soh/Enhancements/controls/GameControlEditor.cpp index d8780353e..3830ffd7d 100644 --- a/soh/soh/Enhancements/controls/GameControlEditor.cpp +++ b/soh/soh/Enhancements/controls/GameControlEditor.cpp @@ -88,7 +88,7 @@ namespace GameControlEditor { void DrawUI(bool&); void Init() { - Ship::AddWindow("Enhancements", "Game Control Editor", DrawUI); + LUS::AddWindow("Enhancements", "Game Control Editor", DrawUI); addButtonName(BTN_A, "A"); addButtonName(BTN_B, "B"); @@ -136,7 +136,7 @@ namespace GameControlEditor { } if (ImGui::Selectable(i->second, i->first == currentButton)) { CVarSetInteger(mapping.cVarName, i->first); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } } ImGui::EndCombo(); @@ -172,7 +172,7 @@ namespace GameControlEditor { ImGui::TableSetupColumn("Modifiers##CustomOcaranaModifiers", PANEL_TABLE_COLUMN_FLAGS); TableHelper::InitHeader(false); - Ship::BeginGroupPanel("Notes", ImGui::GetContentRegionAvail()); + LUS::BeginGroupPanel("Notes", ImGui::GetContentRegionAvail()); labelWidth = ImGui::CalcTextSize("D5").x + 10; DrawMapping(ocarinaD5, labelWidth, disableMask); DrawMapping(ocarinaB4, labelWidth, disableMask); @@ -181,16 +181,16 @@ namespace GameControlEditor { DrawMapping(ocarinaD4, labelWidth, disableMask); ImGui::Dummy(ImVec2(0, 5)); float cursorY = ImGui::GetCursorPosY(); - Ship::EndGroupPanel(); + LUS::EndGroupPanel(); TableHelper::NextCol(); - Ship::BeginGroupPanel("Modifiers", ImGui::GetContentRegionAvail()); + LUS::BeginGroupPanel("Modifiers", ImGui::GetContentRegionAvail()); labelWidth = ImGui::CalcTextSize(ocarinaSongDisable.label).x + 10; DrawMapping(ocarinaSongDisable, labelWidth, disableMask); DrawMapping(ocarinaSharp, labelWidth, disableMask); DrawMapping(ocarinaFlat, labelWidth, disableMask); - Ship::EndGroupPanel(cursorY - ImGui::GetCursorPosY() + 2); + LUS::EndGroupPanel(cursorY - ImGui::GetCursorPosY() + 2); ImGui::EndTable(); } @@ -201,7 +201,7 @@ namespace GameControlEditor { UIWidgets::Spacer(0); } - Ship::BeginGroupPanel("Alternate controls", ImGui::GetContentRegionAvail()); + LUS::BeginGroupPanel("Alternate controls", ImGui::GetContentRegionAvail()); if (ImGui::BeginTable("tableOcarinaAlternateControls", 2, ImGuiTableFlags_SizingFixedSame)) { ImGui::TableSetupColumn("D-pad", PANEL_TABLE_COLUMN_FLAGS); ImGui::TableSetupColumn("Right stick", PANEL_TABLE_COLUMN_FLAGS); @@ -213,7 +213,7 @@ namespace GameControlEditor { UIWidgets::Spacer(0); ImGui::EndTable(); } - Ship::EndGroupPanel(); + LUS::EndGroupPanel(); ImGui::EndTable(); } @@ -221,10 +221,10 @@ namespace GameControlEditor { // CurrentPort is indexed started at 1 here due to the Generic tab, instead of 0 like in InputEditor // Therefore CurrentPort - 1 must always be used inside this function instead of CurrentPort void DrawCustomButtons() { - Ship::GetInputEditor()->DrawControllerSelect(CurrentPort - 1); + LUS::GetInputEditor()->DrawControllerSelect(CurrentPort - 1); - Ship::GetInputEditor()->DrawButton("Modifier 1", BTN_MODIFIER1, CurrentPort - 1, &BtnReading); - Ship::GetInputEditor()->DrawButton("Modifier 2", BTN_MODIFIER2, CurrentPort - 1, &BtnReading); + LUS::GetInputEditor()->DrawButton("Modifier 1", BTN_MODIFIER1, CurrentPort - 1, &BtnReading); + LUS::GetInputEditor()->DrawButton("Modifier 2", BTN_MODIFIER2, CurrentPort - 1, &BtnReading); } void DrawCameraControlPanel() { @@ -233,7 +233,7 @@ namespace GameControlEditor { } UIWidgets::Spacer(0); - Ship::BeginGroupPanel("Aiming/First-Person Camera", ImGui::GetContentRegionAvail()); + LUS::BeginGroupPanel("Aiming/First-Person Camera", ImGui::GetContentRegionAvail()); UIWidgets::PaddedEnhancementCheckbox("Right Stick Aiming", "gRightStickAiming"); DrawHelpIcon("Allows for aiming with the right stick in:\n-First-Person/C-Up view\n-Weapon Aiming"); UIWidgets::PaddedEnhancementCheckbox("Invert Aiming X Axis", "gInvertAimingXAxis"); @@ -252,10 +252,10 @@ namespace GameControlEditor { CVarSetFloat("gFirstPersonCameraSensitivity", 1.0f); } UIWidgets::Spacer(0); - Ship::EndGroupPanel(); + LUS::EndGroupPanel(); UIWidgets::Spacer(0); - Ship::BeginGroupPanel("Third-Person Camera", ImGui::GetContentRegionAvail()); + LUS::BeginGroupPanel("Third-Person Camera", ImGui::GetContentRegionAvail()); UIWidgets::PaddedEnhancementCheckbox("Free Camera", "gFreeCamera"); DrawHelpIcon("Enables free camera control\nNote: You must remap C buttons off of the right stick in the " @@ -273,7 +273,7 @@ namespace GameControlEditor { "gFreeCameraDistMax", 100, 900, "", 185, true, false, true); UIWidgets::PaddedEnhancementSliderInt("Camera Transition Speed: %d", "##CamTranSpeed", "gFreeCameraTransitionSpeed", 0, 900, "", 25, true, false, true); - Ship::EndGroupPanel(); + LUS::EndGroupPanel(); } void DrawDpadControlPanel() { @@ -283,7 +283,7 @@ namespace GameControlEditor { ImVec2 cursor = ImGui::GetCursorPos(); ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5)); - Ship::BeginGroupPanel("D-Pad Options", ImGui::GetContentRegionAvail()); + LUS::BeginGroupPanel("D-Pad Options", ImGui::GetContentRegionAvail()); UIWidgets::PaddedEnhancementCheckbox("D-pad Support on Pause Screen", "gDpadPause"); DrawHelpIcon("Navigate Pause with the D-pad\nIf used with D-pad as Equip Items, you must hold C-Up to equip instead of navigate\n" "To make the cursor only move a single space no matter how long a direction is held, manually set gDpadHoldChange to 0"); @@ -292,7 +292,7 @@ namespace GameControlEditor { "To make the cursor only move a single space during name entry no matter how long a direction is held, manually set gDpadHoldChange to 0"); UIWidgets::PaddedEnhancementCheckbox("D-pad as Equip Items", "gDpadEquips"); DrawHelpIcon("Equip items and equipment on the D-pad\nIf used with D-pad on Pause Screen, you must hold C-Up to equip instead of navigate"); - Ship::EndGroupPanel(); + LUS::EndGroupPanel(); } void DrawMiscControlPanel() { @@ -302,7 +302,7 @@ namespace GameControlEditor { ImVec2 cursor = ImGui::GetCursorPos(); ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5)); - Ship::BeginGroupPanel("Misc Controls", ImGui::GetContentRegionAvail()); + LUS::BeginGroupPanel("Misc Controls", ImGui::GetContentRegionAvail()); UIWidgets::PaddedText("Allow the cursor to be on any slot"); static const char* cursorOnAnySlot[3] = { "Only in Rando", "Always", "Never" }; UIWidgets::EnhancementCombobox("gPauseAnyCursor", cursorOnAnySlot, PAUSE_ANY_CURSOR_RANDO_ONLY); @@ -313,16 +313,16 @@ namespace GameControlEditor { DrawHelpIcon("Hold the assigned button to change the maximum walking speed\nTo change the assigned button, go into the Ports tabs above"); if (CVarGetInteger("gEnableWalkModify", 0)) { UIWidgets::Spacer(5); - Ship::BeginGroupPanel("Walk Modifier", ImGui::GetContentRegionAvail()); + LUS::BeginGroupPanel("Walk Modifier", ImGui::GetContentRegionAvail()); UIWidgets::PaddedEnhancementCheckbox("Toggle modifier instead of holding", "gWalkSpeedToggle", true, false); UIWidgets::PaddedEnhancementSliderFloat("Modifier 1: %d %%", "##WalkMod1", "gWalkModifierOne", 0.0f, 5.0f, "", 1.0f, true, true, false, true); UIWidgets::PaddedEnhancementSliderFloat("Modifier 2: %d %%", "##WalkMod2", "gWalkModifierTwo", 0.0f, 5.0f, "", 1.0f, true, true, false, true); - Ship::EndGroupPanel(); + LUS::EndGroupPanel(); } UIWidgets::Spacer(0); UIWidgets::PaddedEnhancementCheckbox("Answer Navi Prompt with L Button", "gNaviOnL"); DrawHelpIcon("Speak to Navi with L but enter first-person camera with C-Up"); - Ship::EndGroupPanel(); + LUS::EndGroupPanel(); } diff --git a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp index 2bc1353e9..6cd413e06 100644 --- a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp +++ b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp @@ -1411,7 +1411,7 @@ void Draw_Placements(){ void DrawSillyTab() { if (CVarGetInteger("gLetItSnow", 0)) { if (UIWidgets::EnhancementCheckbox("Let It Snow", "gLetItSnow")) { - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } } if (UIWidgets::EnhancementSliderFloat("Link Body Scale: %f", "##Link_BodyScale", "gCosmetics.Link_BodyScale.Value", 0.001f, 0.025f, "", 0.01f, false)) { @@ -1421,7 +1421,7 @@ void DrawSillyTab() { if (ImGui::Button("Reset##Link_BodyScale")) { CVarClear("gCosmetics.Link_BodyScale.Value"); CVarClear("gCosmetics.Link_BodyScale.Changed"); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); static Player* player = GET_PLAYER(gPlayState); player->actor.scale.x = 0.01f; player->actor.scale.y = 0.01f; @@ -1434,7 +1434,7 @@ void DrawSillyTab() { if (ImGui::Button("Reset##Link_HeadScale")) { CVarClear("gCosmetics.Link_HeadScale.Value"); CVarClear("gCosmetics.Link_HeadScale.Changed"); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } if (UIWidgets::EnhancementSliderFloat("Link Sword Scale: %f", "##Link_SwordScale", "gCosmetics.Link_SwordScale.Value", 1.0f, 2.5f, "", 1.0f, false)) { CVarSetInteger("gCosmetics.Link_SwordScale.Changed", 1); @@ -1443,44 +1443,44 @@ void DrawSillyTab() { if (ImGui::Button("Reset##Link_SwordScale")) { CVarClear("gCosmetics.Link_SwordScale.Value"); CVarClear("gCosmetics.Link_SwordScale.Changed"); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } UIWidgets::EnhancementSliderFloat("Bunny Hood Length: %f", "##BunnyHood_EarLength", "gCosmetics.BunnyHood_EarLength", -300.0f, 1000.0f, "", 0.0f, false); ImGui::SameLine(); if (ImGui::Button("Reset##BunnyHood_EarLength")) { CVarClear("gCosmetics.BunnyHood_EarLength"); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } UIWidgets::EnhancementSliderFloat("Bunny Hood Spread: %f", "##BunnyHood_EarSpread", "gCosmetics.BunnyHood_EarSpread", -300.0f, 500.0f, "", 0.0f, false); ImGui::SameLine(); if (ImGui::Button("Reset##BunnyHood_EarSpread")) { CVarClear("gCosmetics.BunnyHood_EarSpread"); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } UIWidgets::EnhancementSliderFloat("Goron Neck Length: %f", "##Goron_NeckLength", "gCosmetics.Goron_NeckLength", 0.0f, 1000.0f, "", 0.0f, false); ImGui::SameLine(); if (ImGui::Button("Reset##Goron_NeckLength")) { CVarClear("gCosmetics.Goron_NeckLength"); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } UIWidgets::EnhancementCheckbox("Unfix Goron Spin", "gUnfixGoronSpin"); UIWidgets::EnhancementSliderFloat("Fairies Size: %f", "##Fairies_Size", "gCosmetics.Fairies_Size", 0.25f, 5.0f, "", 1.0f, false); ImGui::SameLine(); if (ImGui::Button("Reset##Fairies_Size")) { CVarClear("gCosmetics.Fairies_Size"); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } UIWidgets::EnhancementSliderFloat("N64 Logo Spin Speed: %f", "##N64Logo_SpinSpeed", "gCosmetics.N64Logo_SpinSpeed", 0.25f, 5.0f, "", 1.0f, false); ImGui::SameLine(); if (ImGui::Button("Reset##N64Logo_SpinSpeed")) { CVarClear("gCosmetics.N64Logo_SpinSpeed"); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } UIWidgets::EnhancementSliderFloat("Moon Size: %f", "##Moon_Size", "gCosmetics.Moon_Size", 0.5f, 2.0f, "", 1.0f, false); ImGui::SameLine(); if (ImGui::Button("Reset##Moon_Size")) { CVarClear("gCosmetics.Moon_Size"); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } if (UIWidgets::EnhancementSliderFloat("Kak Windmill Speed: %f", "##Kak_Windmill_Speed", "gCosmetics.Kak_Windmill_Speed.Value", 100.0f, 6000.0f, "", 100.0f, false)) { CVarSetInteger("gCosmetics.Kak_Windmill_Speed.Changed", 1); @@ -1489,7 +1489,7 @@ void DrawSillyTab() { if (ImGui::Button("Reset##Kak_Windmill_Speed")) { CVarClear("gCosmetics.Kak_Windmill_Speed.Value"); CVarClear("gCosmetics.Kak_Windmill_Speed.Changed"); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } } @@ -1597,7 +1597,7 @@ void DrawCosmeticRow(CosmeticOption& cosmeticOption) { CVarSetInteger((cosmeticOption.rainbowCvar), 0); CVarSetInteger((cosmeticOption.changedCvar), 1); ApplyOrResetCustomGfxPatches(); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::SameLine(); ImGui::Text(cosmeticOption.label.c_str()); @@ -1605,7 +1605,7 @@ void DrawCosmeticRow(CosmeticOption& cosmeticOption) { if (ImGui::Button(("Random##" + cosmeticOption.label).c_str())) { RandomizeColor(cosmeticOption); ApplyOrResetCustomGfxPatches(); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::SameLine(); bool isRainbow = (bool)CVarGetInteger((cosmeticOption.rainbowCvar), 0); @@ -1613,20 +1613,20 @@ void DrawCosmeticRow(CosmeticOption& cosmeticOption) { CVarSetInteger((cosmeticOption.rainbowCvar), isRainbow); CVarSetInteger((cosmeticOption.changedCvar), 1); ApplyOrResetCustomGfxPatches(); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::SameLine(); bool isLocked = (bool)CVarGetInteger((cosmeticOption.lockedCvar), 0); if (ImGui::Checkbox(("Locked##" + cosmeticOption.label).c_str(), &isLocked)) { CVarSetInteger((cosmeticOption.lockedCvar), isLocked); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } if (CVarGetInteger((cosmeticOption.changedCvar), 0)) { ImGui::SameLine(); if (ImGui::Button(("Reset##" + cosmeticOption.label).c_str())) { ResetColor(cosmeticOption); ApplyOrResetCustomGfxPatches(); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } } } @@ -1642,7 +1642,7 @@ void DrawCosmeticGroup(CosmeticGroup cosmeticGroup) { } } ApplyOrResetCustomGfxPatches(); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::SameLine(); if (ImGui::Button(("Reset##" + label).c_str())) { @@ -1652,7 +1652,7 @@ void DrawCosmeticGroup(CosmeticGroup cosmeticGroup) { } } ApplyOrResetCustomGfxPatches(); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } for (auto& [id, cosmeticOption] : cosmeticOptions) { if (cosmeticOption.group == cosmeticGroup && (!cosmeticOption.advancedOption || CVarGetInteger("gCosmetics.AdvancedMode", 0))) { @@ -1689,7 +1689,7 @@ void DrawCosmeticsEditor(bool& open) { CVarSetInteger(cosmeticOption.lockedCvar, 1); } } - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::SameLine(); if (ImGui::Button("Unlock All Advanced", ImVec2(ImGui::GetContentRegionAvail().x, 30.0f))) { @@ -1698,7 +1698,7 @@ void DrawCosmeticsEditor(bool& open) { CVarSetInteger(cosmeticOption.lockedCvar, 0); } } - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } } UIWidgets::EnhancementCheckbox("Sync Rainbow colors", "gCosmetics.RainbowSync"); @@ -1710,7 +1710,7 @@ void DrawCosmeticsEditor(bool& open) { } } ApplyOrResetCustomGfxPatches(); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::SameLine(); if (ImGui::Button("Reset All", ImVec2(ImGui::GetContentRegionAvail().x, 30.0f))) { @@ -1720,7 +1720,7 @@ void DrawCosmeticsEditor(bool& open) { } } ApplyOrResetCustomGfxPatches(); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } if (ImGui::Button("Lock All", ImVec2(ImGui::GetContentRegionAvail().x / 2, 30.0f))) { @@ -1729,7 +1729,7 @@ void DrawCosmeticsEditor(bool& open) { CVarSetInteger(cosmeticOption.lockedCvar, 1); } } - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::SameLine(); if (ImGui::Button("Unlock All", ImVec2(ImGui::GetContentRegionAvail().x, 30.0f))) { @@ -1738,7 +1738,7 @@ void DrawCosmeticsEditor(bool& open) { CVarSetInteger(cosmeticOption.lockedCvar, 0); } } - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } if (ImGui::BeginTabBar("CosmeticsContextTabBar", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) { @@ -1763,7 +1763,7 @@ void DrawCosmeticsEditor(bool& open) { if (ImGui::Button("Reset##Trails_Duration")) { CVarClear("gCosmetics.Trails_Duration.Value"); CVarClear("gCosmetics.Trails_Duration.Changed"); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::EndTabItem(); } @@ -1800,10 +1800,10 @@ void RegisterOnLoadGameHook() { void InitCosmeticsEditor() { // There's probably a better way to do this, but leaving as is for historical reasons. Even though there is no // real window being rendered here, it calls this every frame allowing us to rotate through the rainbow hue for cosmetics - Ship::AddWindow("Enhancements", "Cosmetics Update Tick", CosmeticsUpdateTick, true, true); + LUS::AddWindow("Enhancements", "Cosmetics Update Tick", CosmeticsUpdateTick, true, true); // Draw the bar in the menu. - Ship::AddWindow("Enhancements", "Cosmetics Editor", DrawCosmeticsEditor); + LUS::AddWindow("Enhancements", "Cosmetics Editor", DrawCosmeticsEditor); // Convert the `current color` into the format that the ImGui color picker expects for (auto& [id, cosmeticOption] : cosmeticOptions) { Color_RGBA8 defaultColor = {cosmeticOption.defaultColor.x, cosmeticOption.defaultColor.y, cosmeticOption.defaultColor.z, cosmeticOption.defaultColor.w}; @@ -1814,7 +1814,7 @@ void InitCosmeticsEditor() { cosmeticOption.currentColor.z = cvarColor.b / 255.0; cosmeticOption.currentColor.w = cvarColor.a / 255.0; } - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); ApplyOrResetCustomGfxPatches(); ApplyAuthenticGfxPatches(); @@ -1829,7 +1829,7 @@ void CosmeticsEditor_RandomizeAll() { } } - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); ApplyOrResetCustomGfxPatches(); } @@ -1840,6 +1840,6 @@ void CosmeticsEditor_ResetAll() { } } - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); ApplyOrResetCustomGfxPatches(); } diff --git a/soh/soh/Enhancements/debugconsole.cpp b/soh/soh/Enhancements/debugconsole.cpp index 1ee0a8830..29047a216 100644 --- a/soh/soh/Enhancements/debugconsole.cpp +++ b/soh/soh/Enhancements/debugconsole.cpp @@ -32,16 +32,16 @@ extern PlayState* gPlayState; #include -#define CMD_REGISTER Ship::GetConsole()->AddCommand +#define CMD_REGISTER LUS::GetConsole()->AddCommand -static bool ActorSpawnHandler(std::shared_ptr Console, const std::vector& args) { +static bool ActorSpawnHandler(std::shared_ptr Console, const std::vector& args) { if ((args.size() != 9) && (args.size() != 3) && (args.size() != 6)) { - Ship::GetConsole()->SendErrorMessage("Not enough arguments passed to actorspawn"); + LUS::GetConsole()->SendErrorMessage("Not enough arguments passed to actorspawn"); return CMD_FAILED; } if (gPlayState == nullptr) { - Ship::GetConsole()->SendErrorMessage("PlayState == nullptr"); + LUS::GetConsole()->SendErrorMessage("PlayState == nullptr"); return CMD_FAILED; } @@ -77,28 +77,28 @@ static bool ActorSpawnHandler(std::shared_ptr Console, const std: if (Actor_Spawn(&gPlayState->actorCtx, gPlayState, actorId, spawnPoint.pos.x, spawnPoint.pos.y, spawnPoint.pos.z, spawnPoint.rot.x, spawnPoint.rot.y, spawnPoint.rot.z, params, 0) == NULL) { - Ship::GetConsole()->SendErrorMessage("Failed to spawn actor. Actor_Spawn returned NULL"); + LUS::GetConsole()->SendErrorMessage("Failed to spawn actor. Actor_Spawn returned NULL"); return CMD_FAILED; } return CMD_SUCCESS; } -static bool KillPlayerHandler(std::shared_ptr Console, const std::vector&) { +static bool KillPlayerHandler(std::shared_ptr Console, const std::vector&) { GameInteractionEffectBase* effect = new GameInteractionEffect::SetPlayerHealth(); effect->parameters[0] = 0; GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] You've met with a terrible fate, haven't you?"); + LUS::GetConsole()->SendInfoMessage("[SOH] You've met with a terrible fate, haven't you?"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not kill player."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not kill player."); return CMD_FAILED; } } -static bool SetPlayerHealthHandler(std::shared_ptr Console, const std::vector& args) { +static bool SetPlayerHealthHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } int health; @@ -106,12 +106,12 @@ static bool SetPlayerHealthHandler(std::shared_ptr Console, const try { health = std::stoi(args[1]); } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Health value must be an integer."); + LUS::GetConsole()->SendErrorMessage("[SOH] Health value must be an integer."); return CMD_FAILED; } if (health < 0) { - Ship::GetConsole()->SendErrorMessage("[SOH] Health value must be a positive integer"); + LUS::GetConsole()->SendErrorMessage("[SOH] Health value must be a positive integer"); return CMD_FAILED; } @@ -119,15 +119,15 @@ static bool SetPlayerHealthHandler(std::shared_ptr Console, const effect->parameters[0] = health; GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Player health updated to %d", health); + LUS::GetConsole()->SendInfoMessage("[SOH] Player health updated to %d", health); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not set player health."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not set player health."); return CMD_FAILED; } } -static bool LoadSceneHandler(std::shared_ptr Console, const std::vector&) { +static bool LoadSceneHandler(std::shared_ptr Console, const std::vector&) { gSaveContext.respawnFlag = 0; gSaveContext.seqId = 0xFF; gSaveContext.gameMode = 0; @@ -135,7 +135,7 @@ static bool LoadSceneHandler(std::shared_ptr Console, const std:: return CMD_SUCCESS; } -static bool RupeeHandler(std::shared_ptr Console, const std::vector& args) { +static bool RupeeHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { return CMD_FAILED; } @@ -145,31 +145,31 @@ static bool RupeeHandler(std::shared_ptr Console, const std::vect rupeeAmount = std::stoi(args[1]); } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Rupee count must be an integer."); + LUS::GetConsole()->SendErrorMessage("[SOH] Rupee count must be an integer."); return CMD_FAILED; } if (rupeeAmount < 0) { - Ship::GetConsole()->SendErrorMessage("[SOH] Rupee count must be positive"); + LUS::GetConsole()->SendErrorMessage("[SOH] Rupee count must be positive"); return CMD_FAILED; } gSaveContext.rupees = rupeeAmount; - Ship::GetConsole()->SendInfoMessage("Set rupee count to %u", rupeeAmount); + LUS::GetConsole()->SendInfoMessage("Set rupee count to %u", rupeeAmount); return CMD_SUCCESS; } -static bool SetPosHandler(std::shared_ptr Console, const std::vector args) { +static bool SetPosHandler(std::shared_ptr Console, const std::vector args) { if (gPlayState == nullptr) { - Ship::GetConsole()->SendErrorMessage("PlayState == nullptr"); + LUS::GetConsole()->SendErrorMessage("PlayState == nullptr"); return CMD_FAILED; } Player* player = GET_PLAYER(gPlayState); if (args.size() == 1) { - Ship::GetConsole()->SendInfoMessage("Player position is [ %.2f, %.2f, %.2f ]", player->actor.world.pos.x, + LUS::GetConsole()->SendInfoMessage("Player position is [ %.2f, %.2f, %.2f ]", player->actor.world.pos.x, player->actor.world.pos.y, player->actor.world.pos.z); return CMD_SUCCESS; @@ -181,15 +181,15 @@ static bool SetPosHandler(std::shared_ptr Console, const std::vec player->actor.world.pos.y = std::stof(args[2]); player->actor.world.pos.z = std::stof(args[3]); - Ship::GetConsole()->SendInfoMessage("Set player position to [ %.2f, %.2f, %.2f ]", player->actor.world.pos.x, + LUS::GetConsole()->SendInfoMessage("Set player position to [ %.2f, %.2f, %.2f ]", player->actor.world.pos.x, player->actor.world.pos.y, player->actor.world.pos.z); return CMD_SUCCESS; } -static bool ResetHandler(std::shared_ptr Console, std::vector args) { +static bool ResetHandler(std::shared_ptr Console, std::vector args) { if (gPlayState == nullptr) { - Ship::GetConsole()->SendErrorMessage("PlayState == nullptr"); + LUS::GetConsole()->SendErrorMessage("PlayState == nullptr"); return CMD_FAILED; } @@ -206,9 +206,9 @@ const static std::map ammoItems{ { "beans", ITEM_BEAN } }; -static bool AddAmmoHandler(std::shared_ptr Console, const std::vector& args) { +static bool AddAmmoHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 3) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } int amount; @@ -216,18 +216,18 @@ static bool AddAmmoHandler(std::shared_ptr Console, const std::ve try { amount = std::stoi(args[2]); } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("Ammo count must be an integer"); + LUS::GetConsole()->SendErrorMessage("Ammo count must be an integer"); return CMD_FAILED; } if (amount < 0) { - Ship::GetConsole()->SendErrorMessage("Ammo count must be positive"); + LUS::GetConsole()->SendErrorMessage("Ammo count must be positive"); return CMD_FAILED; } const auto& it = ammoItems.find(args[1]); if (it == ammoItems.end()) { - Ship::GetConsole()->SendErrorMessage("Invalid ammo type. Options are 'sticks', 'nuts', 'bombs', 'seeds', 'arrows', 'bombchus' and 'beans'"); + LUS::GetConsole()->SendErrorMessage("Invalid ammo type. Options are 'sticks', 'nuts', 'bombs', 'seeds', 'arrows', 'bombchus' and 'beans'"); return CMD_FAILED; } @@ -237,17 +237,17 @@ static bool AddAmmoHandler(std::shared_ptr Console, const std::ve GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Added ammo."); + LUS::GetConsole()->SendInfoMessage("[SOH] Added ammo."); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not add ammo."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not add ammo."); return CMD_FAILED; } } -static bool TakeAmmoHandler(std::shared_ptr Console, const std::vector& args) { +static bool TakeAmmoHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 3) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } int amount; @@ -255,18 +255,18 @@ static bool TakeAmmoHandler(std::shared_ptr Console, const std::v try { amount = std::stoi(args[2]); } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("Ammo count must be an integer"); + LUS::GetConsole()->SendErrorMessage("Ammo count must be an integer"); return CMD_FAILED; } if (amount < 0) { - Ship::GetConsole()->SendErrorMessage("Ammo count must be positive"); + LUS::GetConsole()->SendErrorMessage("Ammo count must be positive"); return CMD_FAILED; } const auto& it = ammoItems.find(args[1]); if (it == ammoItems.end()) { - Ship::GetConsole()->SendErrorMessage( + LUS::GetConsole()->SendErrorMessage( "Invalid ammo type. Options are 'sticks', 'nuts', 'bombs', 'seeds', 'arrows', 'bombchus' and 'beans'"); return CMD_FAILED; } @@ -277,10 +277,10 @@ static bool TakeAmmoHandler(std::shared_ptr Console, const std::v GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Took ammo."); + LUS::GetConsole()->SendInfoMessage("[SOH] Took ammo."); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not take ammo."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not take ammo."); return CMD_FAILED; } } @@ -292,9 +292,9 @@ const static std::map bottleItems{ { "big_poe", ITEM_BIG_POE }, { "blue_fire", ITEM_BLUE_FIRE }, { "rutos_letter", ITEM_LETTER_RUTO }, }; -static bool BottleHandler(std::shared_ptr Console, const std::vector& args) { +static bool BottleHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 3) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } @@ -302,19 +302,19 @@ static bool BottleHandler(std::shared_ptr Console, const std::vec try { slot = std::stoi(args[2]); } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Bottle slot must be an integer."); + LUS::GetConsole()->SendErrorMessage("[SOH] Bottle slot must be an integer."); return CMD_FAILED; } if ((slot < 1) || (slot > 4)) { - Ship::GetConsole()->SendErrorMessage("Invalid slot passed"); + LUS::GetConsole()->SendErrorMessage("Invalid slot passed"); return CMD_FAILED; } const auto& it = bottleItems.find(args[1]); if (it == bottleItems.end()) { - Ship::GetConsole()->SendErrorMessage("Invalid item passed"); + LUS::GetConsole()->SendErrorMessage("Invalid item passed"); return CMD_FAILED; } @@ -324,9 +324,9 @@ static bool BottleHandler(std::shared_ptr Console, const std::vec return CMD_SUCCESS; } -static bool BHandler(std::shared_ptr Console, const std::vector& args) { +static bool BHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } @@ -334,9 +334,9 @@ static bool BHandler(std::shared_ptr Console, const std::vector Console, const std::vector& args) { +static bool ItemHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 3) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } @@ -345,9 +345,9 @@ static bool ItemHandler(std::shared_ptr Console, const std::vecto return CMD_SUCCESS; } -static bool GiveItemHandler(std::shared_ptr Console, const std::vector args) { +static bool GiveItemHandler(std::shared_ptr Console, const std::vector args) { if (args.size() < 3) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } GetItemEntry getItemEntry = GET_ITEM_NONE; @@ -357,7 +357,7 @@ static bool GiveItemHandler(std::shared_ptr Console, const std::v } else if (args[1].compare("randomizer") == 0) { getItemEntry = ItemTableManager::Instance->RetrieveItemEntry(MOD_RANDOMIZER, std::stoi(args[2])); } else { - Ship::GetConsole()->SendErrorMessage("[SOH] Invalid argument passed, must be 'vanilla' or 'randomizer'"); + LUS::GetConsole()->SendErrorMessage("[SOH] Invalid argument passed, must be 'vanilla' or 'randomizer'"); return CMD_FAILED; } @@ -366,9 +366,9 @@ static bool GiveItemHandler(std::shared_ptr Console, const std::v return CMD_SUCCESS; } -static bool EntranceHandler(std::shared_ptr Console, const std::vector& args) { +static bool EntranceHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } @@ -377,7 +377,7 @@ static bool EntranceHandler(std::shared_ptr Console, const std::v try { entrance = std::stoi(args[1], nullptr, 16); } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Entrance value must be a Hex number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Entrance value must be a Hex number."); return CMD_FAILED; } @@ -387,7 +387,7 @@ static bool EntranceHandler(std::shared_ptr Console, const std::v gSaveContext.nextTransitionType = 11; } -static bool VoidHandler(std::shared_ptr Console, const std::vector& args) { +static bool VoidHandler(std::shared_ptr Console, const std::vector& args) { if (gPlayState != nullptr) { gSaveContext.respawn[RESPAWN_MODE_DOWN].tempSwchFlags = gPlayState->actorCtx.flags.tempSwch; gSaveContext.respawn[RESPAWN_MODE_DOWN].tempCollectFlags = gPlayState->actorCtx.flags.tempCollect; @@ -397,20 +397,20 @@ static bool VoidHandler(std::shared_ptr Console, const std::vecto gPlayState->fadeTransition = 2; gSaveContext.nextTransitionType = 2; } else { - Ship::GetConsole()->SendErrorMessage("gPlayState == nullptr"); + LUS::GetConsole()->SendErrorMessage("gPlayState == nullptr"); return CMD_FAILED; } return CMD_SUCCESS; } -static bool ReloadHandler(std::shared_ptr Console, const std::vector& args) { +static bool ReloadHandler(std::shared_ptr Console, const std::vector& args) { if (gPlayState != nullptr) { gPlayState->nextEntranceIndex = gSaveContext.entranceIndex; gPlayState->sceneLoadFlag = 0x14; gPlayState->fadeTransition = 11; gSaveContext.nextTransitionType = 11; } else { - Ship::GetConsole()->SendErrorMessage("gPlayState == nullptr"); + LUS::GetConsole()->SendErrorMessage("gPlayState == nullptr"); return CMD_FAILED; } return CMD_SUCCESS; @@ -420,15 +420,15 @@ const static std::map fw_options { { "clear", 0}, {"warp", 1}, {"backup", 2} }; -static bool FWHandler(std::shared_ptr Console, const std::vector& args) { +static bool FWHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } const auto& it = fw_options.find(args[1]); if (it == fw_options.end()) { - Ship::GetConsole()->SendErrorMessage("[SOH] Invalid option. Options are 'clear', 'warp', 'backup'"); + LUS::GetConsole()->SendErrorMessage("[SOH] Invalid option. Options are 'clear', 'warp', 'backup'"); return CMD_FAILED; } @@ -437,7 +437,7 @@ static bool FWHandler(std::shared_ptr Console, const std::vector< switch(it->second) { case 0: //clear gSaveContext.fw = clear; - Ship::GetConsole()->SendInfoMessage("[SOH] Farore's wind point cleared! Reload scene to take effect."); + LUS::GetConsole()->SendInfoMessage("[SOH] Farore's wind point cleared! Reload scene to take effect."); return CMD_SUCCESS; break; case 1: //warp @@ -446,7 +446,7 @@ static bool FWHandler(std::shared_ptr Console, const std::vector< gPlayState->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_TOP].entranceIndex; gPlayState->fadeTransition = 5; } else { - Ship::GetConsole()->SendErrorMessage("Farore's wind not set!"); + LUS::GetConsole()->SendErrorMessage("Farore's wind not set!"); return CMD_FAILED; } return CMD_SUCCESS; @@ -455,77 +455,77 @@ static bool FWHandler(std::shared_ptr Console, const std::vector< if (CVarGetInteger("gBetterFW", 0)) { gSaveContext.fw = gSaveContext.backupFW; gSaveContext.fw.set = 1; - Ship::GetConsole()->SendInfoMessage("[SOH] Backup FW data copied! Reload scene to take effect."); + LUS::GetConsole()->SendInfoMessage("[SOH] Backup FW data copied! Reload scene to take effect."); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendErrorMessage("Better Farore's Wind isn't turned on!"); + LUS::GetConsole()->SendErrorMessage("Better Farore's Wind isn't turned on!"); return CMD_FAILED; } break; } } else { - Ship::GetConsole()->SendErrorMessage("gPlayState == nullptr"); + LUS::GetConsole()->SendErrorMessage("gPlayState == nullptr"); return CMD_FAILED; } return CMD_SUCCESS; } -static bool FileSelectHandler(std::shared_ptr Console, const std::vector& args) { +static bool FileSelectHandler(std::shared_ptr Console, const std::vector& args) { if (gPlayState != nullptr) { SET_NEXT_GAMESTATE(&gPlayState->state, FileChoose_Init, FileChooseContext); gPlayState->state.running = 0; } else { - Ship::GetConsole()->SendErrorMessage("gPlayState == nullptr"); + LUS::GetConsole()->SendErrorMessage("gPlayState == nullptr"); return CMD_FAILED; } return CMD_SUCCESS; } -static bool QuitHandler(std::shared_ptr Console, const std::vector& args) { - Ship::Context::GetInstance()->GetWindow()->Close(); +static bool QuitHandler(std::shared_ptr Console, const std::vector& args) { + LUS::Context::GetInstance()->GetWindow()->Close(); return CMD_SUCCESS; } -static bool SaveStateHandler(std::shared_ptr Console, const std::vector& args) { +static bool SaveStateHandler(std::shared_ptr Console, const std::vector& args) { unsigned int slot = OTRGlobals::Instance->gSaveStateMgr->GetCurrentSlot(); const SaveStateReturn rtn = OTRGlobals::Instance->gSaveStateMgr->AddRequest({ slot, RequestType::SAVE }); switch (rtn) { case SaveStateReturn::SUCCESS: - Ship::GetConsole()->SendInfoMessage("[SOH] Saved state to slot %u", slot); + LUS::GetConsole()->SendInfoMessage("[SOH] Saved state to slot %u", slot); return CMD_SUCCESS; case SaveStateReturn::FAIL_WRONG_GAMESTATE: - Ship::GetConsole()->SendErrorMessage("[SOH] Can not save a state outside of \"GamePlay\""); + LUS::GetConsole()->SendErrorMessage("[SOH] Can not save a state outside of \"GamePlay\""); return CMD_FAILED; } } -static bool LoadStateHandler(std::shared_ptr Console, const std::vector& args) { +static bool LoadStateHandler(std::shared_ptr Console, const std::vector& args) { unsigned int slot = OTRGlobals::Instance->gSaveStateMgr->GetCurrentSlot(); const SaveStateReturn rtn = OTRGlobals::Instance->gSaveStateMgr->AddRequest({ slot, RequestType::LOAD }); switch (rtn) { case SaveStateReturn::SUCCESS: - Ship::GetConsole()->SendInfoMessage("[SOH] Loaded state from slot (%u)", slot); + LUS::GetConsole()->SendInfoMessage("[SOH] Loaded state from slot (%u)", slot); return CMD_SUCCESS; case SaveStateReturn::FAIL_INVALID_SLOT: - Ship::GetConsole()->SendErrorMessage("[SOH] Invalid State Slot Number (%u)", slot); + LUS::GetConsole()->SendErrorMessage("[SOH] Invalid State Slot Number (%u)", slot); return CMD_FAILED; case SaveStateReturn::FAIL_STATE_EMPTY: - Ship::GetConsole()->SendErrorMessage("[SOH] State Slot (%u) is empty", slot); + LUS::GetConsole()->SendErrorMessage("[SOH] State Slot (%u) is empty", slot); return CMD_FAILED; case SaveStateReturn::FAIL_WRONG_GAMESTATE: - Ship::GetConsole()->SendErrorMessage("[SOH] Can not load a state outside of \"GamePlay\""); + LUS::GetConsole()->SendErrorMessage("[SOH] Can not load a state outside of \"GamePlay\""); return CMD_FAILED; } } -static bool StateSlotSelectHandler(std::shared_ptr Console, const std::vector& args) { +static bool StateSlotSelectHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } uint8_t slot; @@ -533,24 +533,24 @@ static bool StateSlotSelectHandler(std::shared_ptr Console, const try { slot = std::stoi(args[1], nullptr, 10); } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] SaveState slot value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] SaveState slot value must be a number."); return CMD_FAILED; } if (slot < 0) { - Ship::GetConsole()->SendErrorMessage("[SOH] Invalid slot passed. Slot must be between 0 and 2"); + LUS::GetConsole()->SendErrorMessage("[SOH] Invalid slot passed. Slot must be between 0 and 2"); return CMD_FAILED; } OTRGlobals::Instance->gSaveStateMgr->SetCurrentSlot(slot); - Ship::GetConsole()->SendInfoMessage("[SOH] Slot %u selected", + LUS::GetConsole()->SendInfoMessage("[SOH] Slot %u selected", OTRGlobals::Instance->gSaveStateMgr->GetCurrentSlot()); return CMD_SUCCESS; } -static bool InvisibleHandler(std::shared_ptr Console, const std::vector& args) { +static bool InvisibleHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } uint8_t state; @@ -558,7 +558,7 @@ static bool InvisibleHandler(std::shared_ptr Console, const std:: try { state = std::stoi(args[1], nullptr, 10) == 0 ? 0 : 1; } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Invisible value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Invisible value must be a number."); return CMD_FAILED; } @@ -566,18 +566,18 @@ static bool InvisibleHandler(std::shared_ptr Console, const std:: GameInteractionEffectQueryResult result = state ? GameInteractor::ApplyEffect(effect) : GameInteractor::RemoveEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Invisible Link %s", state ? "enabled" : "disabled"); + LUS::GetConsole()->SendInfoMessage("[SOH] Invisible Link %s", state ? "enabled" : "disabled"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not %s Invisible Link.", + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not %s Invisible Link.", state ? "enable" : "disable"); return CMD_FAILED; } } -static bool GiantLinkHandler(std::shared_ptr Console, const std::vector& args) { +static bool GiantLinkHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } uint8_t state; @@ -585,7 +585,7 @@ static bool GiantLinkHandler(std::shared_ptr Console, const std:: try { state = std::stoi(args[1], nullptr, 10) == 0 ? 0 : 1; } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Giant value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Giant value must be a number."); return CMD_FAILED; } @@ -594,18 +594,18 @@ static bool GiantLinkHandler(std::shared_ptr Console, const std:: GameInteractionEffectQueryResult result = state ? GameInteractor::ApplyEffect(effect) : GameInteractor::RemoveEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Giant Link %s", state ? "enabled" : "disabled"); + LUS::GetConsole()->SendInfoMessage("[SOH] Giant Link %s", state ? "enabled" : "disabled"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not %s Giant Link.", + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not %s Giant Link.", state ? "enable" : "disable"); return CMD_FAILED; } } -static bool MinishLinkHandler(std::shared_ptr Console, const std::vector& args) { +static bool MinishLinkHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } uint8_t state; @@ -613,7 +613,7 @@ static bool MinishLinkHandler(std::shared_ptr Console, const std: try { state = std::stoi(args[1], nullptr, 10) == 0 ? 0 : 1; } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Minish value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Minish value must be a number."); return CMD_FAILED; } @@ -622,18 +622,18 @@ static bool MinishLinkHandler(std::shared_ptr Console, const std: GameInteractionEffectQueryResult result = state ? GameInteractor::ApplyEffect(effect) : GameInteractor::RemoveEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Minish Link %s", state ? "enabled" : "disabled"); + LUS::GetConsole()->SendInfoMessage("[SOH] Minish Link %s", state ? "enabled" : "disabled"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not %s Minish Link.", + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not %s Minish Link.", state ? "enable" : "disable"); return CMD_FAILED; } } -static bool AddHeartContainerHandler(std::shared_ptr Console, const std::vector& args) { +static bool AddHeartContainerHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } int hearts; @@ -641,12 +641,12 @@ static bool AddHeartContainerHandler(std::shared_ptr Console, con try { hearts = std::stoi(args[1]); } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Hearts value must be an integer."); + LUS::GetConsole()->SendErrorMessage("[SOH] Hearts value must be an integer."); return CMD_FAILED; } if (hearts < 0) { - Ship::GetConsole()->SendErrorMessage("[SOH] Hearts value must be a positive integer"); + LUS::GetConsole()->SendErrorMessage("[SOH] Hearts value must be a positive integer"); return CMD_FAILED; } @@ -654,17 +654,17 @@ static bool AddHeartContainerHandler(std::shared_ptr Console, con effect->parameters[0] = hearts; GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Added %d heart containers", hearts); + LUS::GetConsole()->SendInfoMessage("[SOH] Added %d heart containers", hearts); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not add heart containers."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not add heart containers."); return CMD_FAILED; } } -static bool RemoveHeartContainerHandler(std::shared_ptr Console, const std::vector& args) { +static bool RemoveHeartContainerHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } int hearts; @@ -672,12 +672,12 @@ static bool RemoveHeartContainerHandler(std::shared_ptr Console, try { hearts = std::stoi(args[1]); } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Hearts value must be an integer."); + LUS::GetConsole()->SendErrorMessage("[SOH] Hearts value must be an integer."); return CMD_FAILED; } if (hearts < 0) { - Ship::GetConsole()->SendErrorMessage("[SOH] Hearts value must be a positive integer"); + LUS::GetConsole()->SendErrorMessage("[SOH] Hearts value must be a positive integer"); return CMD_FAILED; } @@ -685,42 +685,42 @@ static bool RemoveHeartContainerHandler(std::shared_ptr Console, effect->parameters[0] = -hearts; GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Removed %d heart containers", hearts); + LUS::GetConsole()->SendInfoMessage("[SOH] Removed %d heart containers", hearts); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not remove heart containers."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not remove heart containers."); return CMD_FAILED; } } -static bool GravityHandler(std::shared_ptr Console, const std::vector& args) { +static bool GravityHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } GameInteractionEffectBase* effect = new GameInteractionEffect::ModifyGravity(); try { - effect->parameters[0] = Ship::Math::clamp(std::stoi(args[1], nullptr, 10), GI_GRAVITY_LEVEL_LIGHT, GI_GRAVITY_LEVEL_HEAVY); + effect->parameters[0] = LUS::Math::clamp(std::stoi(args[1], nullptr, 10), GI_GRAVITY_LEVEL_LIGHT, GI_GRAVITY_LEVEL_HEAVY); } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Gravity value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Gravity value must be a number."); return CMD_FAILED; } GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Updated gravity."); + LUS::GetConsole()->SendInfoMessage("[SOH] Updated gravity."); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not update gravity."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not update gravity."); return CMD_FAILED; } } -static bool NoUIHandler(std::shared_ptr Console, const std::vector& args) { +static bool NoUIHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } uint8_t state; @@ -728,7 +728,7 @@ static bool NoUIHandler(std::shared_ptr Console, const std::vecto try { state = std::stoi(args[1], nullptr, 10) == 0 ? 0 : 1; } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] No UI value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] No UI value must be a number."); return CMD_FAILED; } @@ -737,31 +737,31 @@ static bool NoUIHandler(std::shared_ptr Console, const std::vecto state ? GameInteractor::ApplyEffect(effect) : GameInteractor::RemoveEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] No UI %s", state ? "enabled" : "disabled"); + LUS::GetConsole()->SendInfoMessage("[SOH] No UI %s", state ? "enabled" : "disabled"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not %s No UI.", + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not %s No UI.", state ? "enable" : "disable"); return CMD_FAILED; } } -static bool FreezeHandler(std::shared_ptr Console, const std::vector& args) { +static bool FreezeHandler(std::shared_ptr Console, const std::vector& args) { GameInteractionEffectBase* effect = new GameInteractionEffect::FreezePlayer(); GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Player frozen"); + LUS::GetConsole()->SendInfoMessage("[SOH] Player frozen"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not freeze player."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not freeze player."); return CMD_FAILED; } } -static bool DefenseModifierHandler(std::shared_ptr Console, const std::vector& args) { +static bool DefenseModifierHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } GameInteractionEffectBase* effect = new GameInteractionEffect::ModifyDefenseModifier(); @@ -769,23 +769,23 @@ static bool DefenseModifierHandler(std::shared_ptr Console, const try { effect->parameters[0] = std::stoi(args[1], nullptr, 10); } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Defense modifier value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Defense modifier value must be a number."); return CMD_FAILED; } GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Defense modifier set to %d", effect->parameters[0]); + LUS::GetConsole()->SendInfoMessage("[SOH] Defense modifier set to %d", effect->parameters[0]); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not set defense modifier."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not set defense modifier."); return CMD_FAILED; } } -static bool DamageHandler(std::shared_ptr Console, const std::vector& args) { +static bool DamageHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } GameInteractionEffectBase* effect = new GameInteractionEffect::ModifyHealth(); @@ -793,29 +793,29 @@ static bool DamageHandler(std::shared_ptr Console, const std::vec try { int value = std::stoi(args[1], nullptr, 10); if (value < 0) { - Ship::GetConsole()->SendErrorMessage("[SOH] Invalid value passed. Value must be greater than 0"); + LUS::GetConsole()->SendErrorMessage("[SOH] Invalid value passed. Value must be greater than 0"); return CMD_FAILED; } effect->parameters[0] = -value; } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Damage value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Damage value must be a number."); return CMD_FAILED; } GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Player damaged"); + LUS::GetConsole()->SendInfoMessage("[SOH] Player damaged"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not damage player."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not damage player."); return CMD_FAILED; } } -static bool HealHandler(std::shared_ptr Console, const std::vector& args) { +static bool HealHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } GameInteractionEffectBase* effect = new GameInteractionEffect::ModifyHealth(); @@ -823,55 +823,55 @@ static bool HealHandler(std::shared_ptr Console, const std::vecto try { int value = std::stoi(args[1], nullptr, 10); if (value < 0) { - Ship::GetConsole()->SendErrorMessage("[SOH] Invalid value passed. Value must be greater than 0"); + LUS::GetConsole()->SendErrorMessage("[SOH] Invalid value passed. Value must be greater than 0"); return CMD_FAILED; } effect->parameters[0] = value; } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Damage value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Damage value must be a number."); return CMD_FAILED; } GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Player healed"); + LUS::GetConsole()->SendInfoMessage("[SOH] Player healed"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not heal player."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not heal player."); return CMD_FAILED; } } -static bool FillMagicHandler(std::shared_ptr Console, const std::vector& args) { +static bool FillMagicHandler(std::shared_ptr Console, const std::vector& args) { GameInteractionEffectBase* effect = new GameInteractionEffect::FillMagic(); GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Magic filled"); + LUS::GetConsole()->SendInfoMessage("[SOH] Magic filled"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not fill magic."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not fill magic."); return CMD_FAILED; } } -static bool EmptyMagicHandler(std::shared_ptr Console, const std::vector& args) { +static bool EmptyMagicHandler(std::shared_ptr Console, const std::vector& args) { GameInteractionEffectBase* effect = new GameInteractionEffect::EmptyMagic(); GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Magic emptied"); + LUS::GetConsole()->SendInfoMessage("[SOH] Magic emptied"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not empty magic."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not empty magic."); return CMD_FAILED; } } -static bool NoZHandler(std::shared_ptr Console, const std::vector& args) { +static bool NoZHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } uint8_t state; @@ -879,7 +879,7 @@ static bool NoZHandler(std::shared_ptr Console, const std::vector try { state = std::stoi(args[1], nullptr, 10) == 0 ? 0 : 1; } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] NoZ value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] NoZ value must be a number."); return CMD_FAILED; } @@ -888,18 +888,18 @@ static bool NoZHandler(std::shared_ptr Console, const std::vector state ? GameInteractor::ApplyEffect(effect) : GameInteractor::RemoveEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] NoZ " + std::string(state ? "enabled" : "disabled")); + LUS::GetConsole()->SendInfoMessage("[SOH] NoZ " + std::string(state ? "enabled" : "disabled")); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not " + + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not " + std::string(state ? "enable" : "disable") + " NoZ."); return CMD_FAILED; } } -static bool OneHitKOHandler(std::shared_ptr Console, const std::vector& args) { +static bool OneHitKOHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } uint8_t state; @@ -907,7 +907,7 @@ static bool OneHitKOHandler(std::shared_ptr Console, const std::v try { state = std::stoi(args[1], nullptr, 10) == 0 ? 0 : 1; } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] One-hit KO value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] One-hit KO value must be a number."); return CMD_FAILED; } @@ -916,18 +916,18 @@ static bool OneHitKOHandler(std::shared_ptr Console, const std::v state ? GameInteractor::ApplyEffect(effect) : GameInteractor::RemoveEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] One-hit KO " + std::string(state ? "enabled" : "disabled")); + LUS::GetConsole()->SendInfoMessage("[SOH] One-hit KO " + std::string(state ? "enabled" : "disabled")); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not " + + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not " + std::string(state ? "enable" : "disable") + " One-hit KO."); return CMD_FAILED; } } -static bool PacifistHandler(std::shared_ptr Console, const std::vector& args) { +static bool PacifistHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } uint8_t state; @@ -935,7 +935,7 @@ static bool PacifistHandler(std::shared_ptr Console, const std::v try { state = std::stoi(args[1], nullptr, 10) == 0 ? 0 : 1; } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Pacifist value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Pacifist value must be a number."); return CMD_FAILED; } @@ -944,18 +944,18 @@ static bool PacifistHandler(std::shared_ptr Console, const std::v state ? GameInteractor::ApplyEffect(effect) : GameInteractor::RemoveEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Pacifist " + std::string(state ? "enabled" : "disabled")); + LUS::GetConsole()->SendInfoMessage("[SOH] Pacifist " + std::string(state ? "enabled" : "disabled")); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not " + + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not " + std::string(state ? "enable" : "disable") + " Pacifist."); return CMD_FAILED; } } -static bool PaperLinkHandler(std::shared_ptr Console, const std::vector& args) { +static bool PaperLinkHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } uint8_t state; @@ -963,7 +963,7 @@ static bool PaperLinkHandler(std::shared_ptr Console, const std:: try { state = std::stoi(args[1], nullptr, 10) == 0 ? 0 : 1; } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Paper Link value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Paper Link value must be a number."); return CMD_FAILED; } @@ -973,18 +973,18 @@ static bool PaperLinkHandler(std::shared_ptr Console, const std:: state ? GameInteractor::ApplyEffect(effect) : GameInteractor::RemoveEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Paper Link " + std::string(state ? "enabled" : "disabled")); + LUS::GetConsole()->SendInfoMessage("[SOH] Paper Link " + std::string(state ? "enabled" : "disabled")); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not " + + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not " + std::string(state ? "enable" : "disable") + " Paper Link."); return CMD_FAILED; } } -static bool RainstormHandler(std::shared_ptr Console, const std::vector& args) { +static bool RainstormHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } uint8_t state; @@ -992,7 +992,7 @@ static bool RainstormHandler(std::shared_ptr Console, const std:: try { state = std::stoi(args[1], nullptr, 10) == 0 ? 0 : 1; } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Rainstorm value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Rainstorm value must be a number."); return CMD_FAILED; } @@ -1001,18 +1001,18 @@ static bool RainstormHandler(std::shared_ptr Console, const std:: state ? GameInteractor::ApplyEffect(effect) : GameInteractor::RemoveEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Rainstorm " + std::string(state ? "enabled" : "disabled")); + LUS::GetConsole()->SendInfoMessage("[SOH] Rainstorm " + std::string(state ? "enabled" : "disabled")); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not " + + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not " + std::string(state ? "enable" : "disable") + " Rainstorm."); return CMD_FAILED; } } -static bool ReverseControlsHandler(std::shared_ptr Console, const std::vector& args) { +static bool ReverseControlsHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } uint8_t state; @@ -1020,7 +1020,7 @@ static bool ReverseControlsHandler(std::shared_ptr Console, const try { state = std::stoi(args[1], nullptr, 10) == 0 ? 0 : 1; } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Reverse controls value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Reverse controls value must be a number."); return CMD_FAILED; } @@ -1029,19 +1029,19 @@ static bool ReverseControlsHandler(std::shared_ptr Console, const state ? GameInteractor::ApplyEffect(effect) : GameInteractor::RemoveEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Reverse controls " + + LUS::GetConsole()->SendInfoMessage("[SOH] Reverse controls " + std::string(state ? "enabled" : "disabled")); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not " + + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not " + std::string(state ? "enable" : "disable") + " Reverse controls."); return CMD_FAILED; } } -static bool UpdateRupeesHandler(std::shared_ptr Console, const std::vector& args) { +static bool UpdateRupeesHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } GameInteractionEffectBase* effect = new GameInteractionEffect::ModifyRupees(); @@ -1049,23 +1049,23 @@ static bool UpdateRupeesHandler(std::shared_ptr Console, const st try { effect->parameters[0] = std::stoi(args[1], nullptr, 10); } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Rupee value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Rupee value must be a number."); return CMD_FAILED; } GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Rupees updated"); + LUS::GetConsole()->SendInfoMessage("[SOH] Rupees updated"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not update rupees."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not update rupees."); return CMD_FAILED; } } -static bool SpeedModifierHandler(std::shared_ptr Console, const std::vector& args) { +static bool SpeedModifierHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } GameInteractionEffectBase* effect = new GameInteractionEffect::ModifyRunSpeedModifier(); @@ -1073,16 +1073,16 @@ static bool SpeedModifierHandler(std::shared_ptr Console, const s try { effect->parameters[0] = std::stoi(args[1], nullptr, 10); } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Speed modifier value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Speed modifier value must be a number."); return CMD_FAILED; } GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Speed modifier updated"); + LUS::GetConsole()->SendInfoMessage("[SOH] Speed modifier updated"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not update speed modifier."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not update speed modifier."); return CMD_FAILED; } } @@ -1093,15 +1093,15 @@ const static std::map boots { { "hover", PLAYER_BOOTS_HOVER }, }; -static bool BootsHandler(std::shared_ptr Console, const std::vector& args) { +static bool BootsHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } const auto& it = boots.find(args[1]); if (it == boots.end()) { - Ship::GetConsole()->SendErrorMessage("Invalid boot type. Options are 'kokiri', 'iron' and 'hover'"); + LUS::GetConsole()->SendErrorMessage("Invalid boot type. Options are 'kokiri', 'iron' and 'hover'"); return CMD_FAILED; } @@ -1110,10 +1110,10 @@ static bool BootsHandler(std::shared_ptr Console, const std::vect GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Boots updated."); + LUS::GetConsole()->SendInfoMessage("[SOH] Boots updated."); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not update boots."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not update boots."); return CMD_FAILED; } } @@ -1124,15 +1124,15 @@ const static std::map shields { { "mirror", ITEM_SHIELD_MIRROR }, }; -static bool GiveShieldHandler(std::shared_ptr Console, const std::vector& args) { +static bool GiveShieldHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } const auto& it = shields.find(args[1]); if (it == shields.end()) { - Ship::GetConsole()->SendErrorMessage("Invalid shield type. Options are 'deku', 'hylian' and 'mirror'"); + LUS::GetConsole()->SendErrorMessage("Invalid shield type. Options are 'deku', 'hylian' and 'mirror'"); return CMD_FAILED; } @@ -1141,23 +1141,23 @@ static bool GiveShieldHandler(std::shared_ptr Console, const std: GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Gave shield."); + LUS::GetConsole()->SendInfoMessage("[SOH] Gave shield."); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not give shield."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not give shield."); return CMD_FAILED; } } -static bool TakeShieldHandler(std::shared_ptr Console, const std::vector& args) { +static bool TakeShieldHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } const auto& it = shields.find(args[1]); if (it == shields.end()) { - Ship::GetConsole()->SendErrorMessage("Invalid shield type. Options are 'deku', 'hylian' and 'mirror'"); + LUS::GetConsole()->SendErrorMessage("Invalid shield type. Options are 'deku', 'hylian' and 'mirror'"); return CMD_FAILED; } @@ -1166,17 +1166,17 @@ static bool TakeShieldHandler(std::shared_ptr Console, const std: GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Took shield."); + LUS::GetConsole()->SendInfoMessage("[SOH] Took shield."); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not take shield."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not take shield."); return CMD_FAILED; } } -static bool KnockbackHandler(std::shared_ptr Console, const std::vector& args) { +static bool KnockbackHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } GameInteractionEffectBase* effect = new GameInteractionEffect::KnockbackPlayer(); @@ -1184,65 +1184,65 @@ static bool KnockbackHandler(std::shared_ptr Console, const std:: try { int value = std::stoi(args[1], nullptr, 10); if (value < 0) { - Ship::GetConsole()->SendErrorMessage("[SOH] Invalid value passed. Value must be greater than 0"); + LUS::GetConsole()->SendErrorMessage("[SOH] Invalid value passed. Value must be greater than 0"); return CMD_FAILED; } effect->parameters[0] = value; } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] Knockback value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] Knockback value must be a number."); return CMD_FAILED; } GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Knockback applied"); + LUS::GetConsole()->SendInfoMessage("[SOH] Knockback applied"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not apply knockback."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not apply knockback."); return CMD_FAILED; } } -static bool ElectrocuteHandler(std::shared_ptr Console, const std::vector& args) { +static bool ElectrocuteHandler(std::shared_ptr Console, const std::vector& args) { GameInteractionEffectBase* effect = new GameInteractionEffect::ElectrocutePlayer(); GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Electrocuted player"); + LUS::GetConsole()->SendInfoMessage("[SOH] Electrocuted player"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not electrocute player."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not electrocute player."); return CMD_FAILED; } } -static bool BurnHandler(std::shared_ptr Console, const std::vector& args) { +static bool BurnHandler(std::shared_ptr Console, const std::vector& args) { GameInteractionEffectBase* effect = new GameInteractionEffect::BurnPlayer(); GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Burned player"); + LUS::GetConsole()->SendInfoMessage("[SOH] Burned player"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not burn player."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not burn player."); return CMD_FAILED; } } -static bool CuccoStormHandler(std::shared_ptr Console, const std::vector& args) { +static bool CuccoStormHandler(std::shared_ptr Console, const std::vector& args) { GameInteractionEffectQueryResult result = GameInteractor::RawAction::SpawnActor(ACTOR_EN_NIW, 0); if (result == GameInteractionEffectQueryResult::Possible) { - Ship::GetConsole()->SendInfoMessage("[SOH] Spawned cucco storm"); + LUS::GetConsole()->SendInfoMessage("[SOH] Spawned cucco storm"); return CMD_SUCCESS; } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not spawn cucco storm."); + LUS::GetConsole()->SendInfoMessage("[SOH] Command failed: Could not spawn cucco storm."); return CMD_FAILED; } } -static bool GenerateRandoHandler(std::shared_ptr Console, const std::vector& args) { +static bool GenerateRandoHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() == 1) { if (GenerateRandomizer()) { return CMD_SUCCESS; @@ -1261,18 +1261,18 @@ static bool GenerateRandoHandler(std::shared_ptr Console, const s return CMD_SUCCESS; } } catch (std::invalid_argument const& ex) { - Ship::GetConsole()->SendErrorMessage("[SOH] seed|count value must be a number."); + LUS::GetConsole()->SendErrorMessage("[SOH] seed|count value must be a number."); return CMD_FAILED; } - Ship::GetConsole()->SendErrorMessage("[SOH] Rando generation already in progress"); + LUS::GetConsole()->SendErrorMessage("[SOH] Rando generation already in progress"); return CMD_FAILED; } -static bool CosmeticsHandler(std::shared_ptr Console, const std::vector& args) { +static bool CosmeticsHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } @@ -1281,16 +1281,16 @@ static bool CosmeticsHandler(std::shared_ptr Console, const std:: } else if (args[1].compare("randomize") == 0) { CosmeticsEditor_RandomizeAll(); } else { - Ship::GetConsole()->SendErrorMessage("[SOH] Invalid argument passed, must be 'reset' or 'randomize'"); + LUS::GetConsole()->SendErrorMessage("[SOH] Invalid argument passed, must be 'reset' or 'randomize'"); return CMD_FAILED; } return CMD_SUCCESS; } -static bool SfxHandler(std::shared_ptr Console, const std::vector& args) { +static bool SfxHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) { - Ship::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); + LUS::GetConsole()->SendErrorMessage("[SOH] Unexpected arguments passed"); return CMD_FAILED; } @@ -1299,7 +1299,7 @@ static bool SfxHandler(std::shared_ptr Console, const std::vector } else if (args[1].compare("randomize") == 0) { AudioEditor_RandomizeAll(); } else { - Ship::GetConsole()->SendErrorMessage("[SOH] Invalid argument passed, must be 'reset' or 'randomize'"); + LUS::GetConsole()->SendErrorMessage("[SOH] Invalid argument passed, must be 'reset' or 'randomize'"); return CMD_FAILED; } @@ -1337,7 +1337,7 @@ static int CheckVarType(const std::string& input) return result; } -static bool SetCVarHandler(std::shared_ptr Console, const std::vector& args) { +static bool SetCVarHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 3) return CMD_FAILED; @@ -1362,11 +1362,11 @@ static bool SetCVarHandler(std::shared_ptr Console, const std::ve CVarSave(); - //Ship::GetConsole()->SendInfoMessage("[SOH] Updated player position to [ %.2f, %.2f, %.2f ]", pos.x, pos.y, pos.z); + //LUS::GetConsole()->SendInfoMessage("[SOH] Updated player position to [ %.2f, %.2f, %.2f ]", pos.x, pos.y, pos.z); return CMD_SUCCESS; } -static bool GetCVarHandler(std::shared_ptr Console, const std::vector& args) { +static bool GetCVarHandler(std::shared_ptr Console, const std::vector& args) { if (args.size() < 2) return CMD_FAILED; @@ -1374,18 +1374,18 @@ static bool GetCVarHandler(std::shared_ptr Console, const std::ve if (cvar != nullptr) { - if (cvar->Type == Ship::ConsoleVariableType::Integer) - Ship::GetConsole()->SendInfoMessage("[SOH] Variable %s is %i", args[1].c_str(), cvar->Integer); - else if (cvar->Type == Ship::ConsoleVariableType::Float) - Ship::GetConsole()->SendInfoMessage("[SOH] Variable %s is %f", args[1].c_str(), cvar->Float); - else if (cvar->Type == Ship::ConsoleVariableType::String) - Ship::GetConsole()->SendInfoMessage("[SOH] Variable %s is %s", args[1].c_str(), cvar->String.c_str()); - else if (cvar->Type == Ship::ConsoleVariableType::Color) - Ship::GetConsole()->SendInfoMessage("[SOH] Variable %s is %08X", args[1].c_str(), cvar->Color); + if (cvar->Type == LUS::ConsoleVariableType::Integer) + LUS::GetConsole()->SendInfoMessage("[SOH] Variable %s is %i", args[1].c_str(), cvar->Integer); + else if (cvar->Type == LUS::ConsoleVariableType::Float) + LUS::GetConsole()->SendInfoMessage("[SOH] Variable %s is %f", args[1].c_str(), cvar->Float); + else if (cvar->Type == LUS::ConsoleVariableType::String) + LUS::GetConsole()->SendInfoMessage("[SOH] Variable %s is %s", args[1].c_str(), cvar->String.c_str()); + else if (cvar->Type == LUS::ConsoleVariableType::Color) + LUS::GetConsole()->SendInfoMessage("[SOH] Variable %s is %08X", args[1].c_str(), cvar->Color); } else { - Ship::GetConsole()->SendInfoMessage("[SOH] Could not find variable %s", args[1].c_str()); + LUS::GetConsole()->SendInfoMessage("[SOH] Could not find variable %s", args[1].c_str()); } @@ -1402,17 +1402,17 @@ void DebugConsole_Init(void) { CMD_REGISTER("save_state", { SaveStateHandler, "Save a state." }); CMD_REGISTER("load_state", { LoadStateHandler, "Load a state." }); CMD_REGISTER("set_slot", { StateSlotSelectHandler, "Selects a SaveState slot", { - { "Slot number", Ship::ArgumentType::NUMBER, } + { "Slot number", LUS::ArgumentType::NUMBER, } }}); // Map & Location CMD_REGISTER("void", { VoidHandler, "Voids out of the current map." }); CMD_REGISTER("reload", { ReloadHandler, "Reloads the current map." }); CMD_REGISTER("fw", { FWHandler,"Spawns the player where Farore's Wind is set." , { - { "clear|warp|backup", Ship::ArgumentType::TEXT } + { "clear|warp|backup", LUS::ArgumentType::TEXT } }}); CMD_REGISTER("entrance", { EntranceHandler, "Sends player to the entered entrance (hex)", { - { "entrance", Ship::ArgumentType::NUMBER } + { "entrance", LUS::ArgumentType::NUMBER } }}); // Gameplay @@ -1421,73 +1421,73 @@ void DebugConsole_Init(void) { CMD_REGISTER("map", { LoadSceneHandler, "Load up kak?" }); CMD_REGISTER("rupee", { RupeeHandler, "Set your rupee counter.", { - {"amount", Ship::ArgumentType::NUMBER } + {"amount", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("bItem", { BHandler, "Set an item to the B button.", { - { "Item ID", Ship::ArgumentType::NUMBER } + { "Item ID", LUS::ArgumentType::NUMBER } }}); - CMD_REGISTER("spawn", { ActorSpawnHandler, "Spawn an actor.", { { "actor_id", Ship::ArgumentType::NUMBER }, - { "data", Ship::ArgumentType::NUMBER }, - { "x", Ship::ArgumentType::PLAYER_POS, true }, - { "y", Ship::ArgumentType::PLAYER_POS, true }, - { "z", Ship::ArgumentType::PLAYER_POS, true }, - { "rx", Ship::ArgumentType::PLAYER_ROT, true }, - { "ry", Ship::ArgumentType::PLAYER_ROT, true }, - { "rz", Ship::ArgumentType::PLAYER_ROT, true } + CMD_REGISTER("spawn", { ActorSpawnHandler, "Spawn an actor.", { { "actor_id", LUS::ArgumentType::NUMBER }, + { "data", LUS::ArgumentType::NUMBER }, + { "x", LUS::ArgumentType::PLAYER_POS, true }, + { "y", LUS::ArgumentType::PLAYER_POS, true }, + { "z", LUS::ArgumentType::PLAYER_POS, true }, + { "rx", LUS::ArgumentType::PLAYER_ROT, true }, + { "ry", LUS::ArgumentType::PLAYER_ROT, true }, + { "rz", LUS::ArgumentType::PLAYER_ROT, true } }}); CMD_REGISTER("pos", { SetPosHandler, "Sets the position of the player.", { - { "x", Ship::ArgumentType::PLAYER_POS, true }, - { "y", Ship::ArgumentType::PLAYER_POS, true }, - { "z", Ship::ArgumentType::PLAYER_POS, true } + { "x", LUS::ArgumentType::PLAYER_POS, true }, + { "y", LUS::ArgumentType::PLAYER_POS, true }, + { "z", LUS::ArgumentType::PLAYER_POS, true } }}); CMD_REGISTER("set", { SetCVarHandler, "Sets a console variable.", { - { "varName", Ship::ArgumentType::TEXT }, - { "varValue", Ship::ArgumentType::TEXT } + { "varName", LUS::ArgumentType::TEXT }, + { "varValue", LUS::ArgumentType::TEXT } }}); CMD_REGISTER("get", { GetCVarHandler, "Gets a console variable.", { - { "varName", Ship::ArgumentType::TEXT } + { "varName", LUS::ArgumentType::TEXT } }}); CMD_REGISTER("addammo", { AddAmmoHandler, "Adds ammo of an item.", { - { "sticks|nuts|bombs|seeds|arrows|bombchus|beans", Ship::ArgumentType::TEXT }, - { "count", Ship::ArgumentType::NUMBER } + { "sticks|nuts|bombs|seeds|arrows|bombchus|beans", LUS::ArgumentType::TEXT }, + { "count", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("takeammo", { TakeAmmoHandler, "Removes ammo of an item.", { - { "sticks|nuts|bombs|seeds|arrows|bombchus|beans", Ship::ArgumentType::TEXT }, - { "count", Ship::ArgumentType::NUMBER } + { "sticks|nuts|bombs|seeds|arrows|bombchus|beans", LUS::ArgumentType::TEXT }, + { "count", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("bottle", { BottleHandler, "Changes item in a bottle slot.", { - { "item", Ship::ArgumentType::TEXT }, - { "slot", Ship::ArgumentType::NUMBER } + { "item", LUS::ArgumentType::TEXT }, + { "slot", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("give_item", { GiveItemHandler, "Gives an item to the player as if it was given from an actor", { - { "vanilla|randomizer", Ship::ArgumentType::TEXT }, - { "giveItemID", Ship::ArgumentType::NUMBER } + { "vanilla|randomizer", LUS::ArgumentType::TEXT }, + { "giveItemID", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("item", { ItemHandler, "Sets item ID in arg 1 into slot arg 2. No boundary checks. Use with caution.", { - { "slot", Ship::ArgumentType::NUMBER }, - { "item id", Ship::ArgumentType::NUMBER } + { "slot", LUS::ArgumentType::NUMBER }, + { "item id", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("invisible", { InvisibleHandler, "Activate Link's Elvish cloak, making him appear invisible.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("giant_link", { GiantLinkHandler, "Turn Link into a giant Lonky boi.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("minish_link", { MinishLinkHandler, "Turn Link into a minish boi.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("add_heart_container", { AddHeartContainerHandler, "Give Link a heart! The maximum amount of hearts is 20!" }); @@ -1495,25 +1495,25 @@ void DebugConsole_Init(void) { CMD_REGISTER("remove_heart_container", { RemoveHeartContainerHandler, "Remove a heart from Link. The minimal amount of hearts is 3." }); CMD_REGISTER("gravity", { GravityHandler, "Set gravity level.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("no_ui", { NoUIHandler, "Disables the UI.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("freeze", { FreezeHandler, "Freezes Link in place" }); CMD_REGISTER("defense_modifier", { DefenseModifierHandler, "Sets the defense modifier.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("damage", { DamageHandler, "Deal damage to Link.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("heal", { HealHandler, "Heals Link.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("fill_magic", { FillMagicHandler, "Fills magic." }); @@ -1521,49 +1521,49 @@ void DebugConsole_Init(void) { CMD_REGISTER("empty_magic", { EmptyMagicHandler, "Empties magic." }); CMD_REGISTER("no_z", { NoZHandler, "Disables Z-button presses.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("ohko", { OneHitKOHandler, "Activates one hit KO. Any damage kills Link and he cannot gain health in this mode.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("pacifist", { PacifistHandler, "Activates pacifist mode. Prevents Link from using his weapon.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("paper_link", { PaperLinkHandler, "Link but made out of paper.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("rainstorm", { RainstormHandler, "Activates rainstorm." }); CMD_REGISTER("reverse_controls", { ReverseControlsHandler, "Reverses the controls.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("update_rupees", { UpdateRupeesHandler, "Adds rupees.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("speed_modifier", { SpeedModifierHandler, "Sets the speed modifier.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("boots", { BootsHandler, "Activates boots.", { - { "kokiri|iron|hover", Ship::ArgumentType::TEXT }, + { "kokiri|iron|hover", LUS::ArgumentType::TEXT }, }}); CMD_REGISTER("giveshield", { GiveShieldHandler, "Gives a shield and equips it when Link is the right age for it.", { - { "deku|hylian|mirror", Ship::ArgumentType::TEXT }, + { "deku|hylian|mirror", LUS::ArgumentType::TEXT }, }}); CMD_REGISTER("takeshield", { TakeShieldHandler, "Takes a shield and unequips it if Link is wearing it.", { - { "deku|hylian|mirror", Ship::ArgumentType::TEXT }, + { "deku|hylian|mirror", LUS::ArgumentType::TEXT }, }}); CMD_REGISTER("knockback", { KnockbackHandler, "Knocks Link back.", { - { "value", Ship::ArgumentType::NUMBER } + { "value", LUS::ArgumentType::NUMBER } }}); CMD_REGISTER("electrocute", { ElectrocuteHandler, "Electrocutes Link." }); @@ -1573,16 +1573,16 @@ void DebugConsole_Init(void) { CMD_REGISTER("cucco_storm", { CuccoStormHandler, "Cucco Storm" }); CMD_REGISTER("gen_rando", { GenerateRandoHandler, "Generate a randomizer seed", { - { "seed|count", Ship::ArgumentType::NUMBER, true }, - { "testing", Ship::ArgumentType::NUMBER, true }, + { "seed|count", LUS::ArgumentType::NUMBER, true }, + { "testing", LUS::ArgumentType::NUMBER, true }, }}); CMD_REGISTER("cosmetics", { CosmeticsHandler, "Change cosmetics.", { - { "reset|randomize", Ship::ArgumentType::TEXT }, + { "reset|randomize", LUS::ArgumentType::TEXT }, }}); CMD_REGISTER("sfx", { SfxHandler, "Change SFX.", { - { "reset|randomize", Ship::ArgumentType::TEXT }, + { "reset|randomize", LUS::ArgumentType::TEXT }, }}); CVarSave(); diff --git a/soh/soh/Enhancements/debugger/actorViewer.cpp b/soh/soh/Enhancements/debugger/actorViewer.cpp index 6bf29c12b..92b8595ec 100644 --- a/soh/soh/Enhancements/debugger/actorViewer.cpp +++ b/soh/soh/Enhancements/debugger/actorViewer.cpp @@ -787,5 +787,5 @@ void DrawActorViewer(bool& open) { } void InitActorViewer() { - Ship::AddWindow("Developer Tools", "Actor Viewer", DrawActorViewer); + LUS::AddWindow("Developer Tools", "Actor Viewer", DrawActorViewer); } diff --git a/soh/soh/Enhancements/debugger/colViewer.cpp b/soh/soh/Enhancements/debugger/colViewer.cpp index 17244706a..26f3a895b 100644 --- a/soh/soh/Enhancements/debugger/colViewer.cpp +++ b/soh/soh/Enhancements/debugger/colViewer.cpp @@ -288,7 +288,7 @@ void CreateSphereData() { } void InitColViewer() { - Ship::AddWindow("Developer Tools", "Collision Viewer", DrawColViewerWindow); + LUS::AddWindow("Developer Tools", "Collision Viewer", DrawColViewerWindow); CreateCylinderData(); CreateSphereData(); diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp index 0f423dcce..463f6970d 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp @@ -605,7 +605,7 @@ void DrawInfoTab() { void DrawBGSItemFlag(uint8_t itemID) { const ItemMapEntry& slotEntry = itemMapping[itemID]; - ImGui::Image(Ship::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1)); + ImGui::Image(LUS::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1)); ImGui::SameLine(); int tradeIndex = itemID - ITEM_POCKET_EGG; bool hasItem = (gSaveContext.adultTradeItems & (1 << tradeIndex)) != 0; @@ -647,7 +647,7 @@ void DrawInventoryTab() { uint8_t item = gSaveContext.inventory.items[index]; if (item != ITEM_NONE) { const ItemMapEntry& slotEntry = itemMapping.find(item)->second; - if (ImGui::ImageButton(Ship::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), + if (ImGui::ImageButton(LUS::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) { selectedIndex = index; ImGui::OpenPopup(itemPopupPicker); @@ -695,7 +695,7 @@ void DrawInventoryTab() { ImGui::SameLine(); } const ItemMapEntry& slotEntry = possibleItems[pickerIndex]; - if (ImGui::ImageButton(Ship::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), + if (ImGui::ImageButton(LUS::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) { gSaveContext.inventory.items[selectedIndex] = slotEntry.id; // Set adult trade item flag if you're playing adult trade shuffle in rando @@ -733,7 +733,7 @@ void DrawInventoryTab() { ImGui::PushItemWidth(32.0f); ImGui::BeginGroup(); - ImGui::Image(Ship::GetTextureByName(itemMapping[item].name), ImVec2(32.0f, 32.0f)); + ImGui::Image(LUS::GetTextureByName(itemMapping[item].name), ImVec2(32.0f, 32.0f)); ImGui::InputScalar("##ammoInput", ImGuiDataType_S8, &AMMO(item)); ImGui::EndGroup(); @@ -1148,7 +1148,7 @@ void DrawUpgradeIcon(const std::string& categoryName, int32_t categoryId, const uint8_t item = items[CUR_UPG_VALUE(categoryId)]; if (item != ITEM_NONE) { const ItemMapEntry& slotEntry = itemMapping[item]; - if (ImGui::ImageButton(Ship::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), + if (ImGui::ImageButton(LUS::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) { ImGui::OpenPopup(upgradePopupPicker); } @@ -1176,7 +1176,7 @@ void DrawUpgradeIcon(const std::string& categoryName, int32_t categoryId, const UIWidgets::SetLastItemHoverText("None"); } else { const ItemMapEntry& slotEntry = itemMapping[items[pickerIndex]]; - if (ImGui::ImageButton(Ship::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), + if (ImGui::ImageButton(LUS::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) { Inventory_ChangeUpgrade(categoryId, pickerIndex); ImGui::CloseCurrentPopup(); @@ -1213,7 +1213,7 @@ void DrawEquipmentTab() { bool hasEquip = (bitMask & gSaveContext.inventory.equipment) != 0; const ItemMapEntry& entry = itemMapping[equipmentValues[i]]; ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0)); - if (ImGui::ImageButton(Ship::GetTextureByName(hasEquip ? entry.name : entry.nameFaded), + if (ImGui::ImageButton(LUS::GetTextureByName(hasEquip ? entry.name : entry.nameFaded), ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) { if (hasEquip) { gSaveContext.inventory.equipment &= ~bitMask; @@ -1312,7 +1312,7 @@ void DrawQuestItemButton(uint32_t item) { uint32_t bitMask = 1 << entry.id; bool hasQuestItem = (bitMask & gSaveContext.inventory.questItems) != 0; ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0)); - if (ImGui::ImageButton(Ship::GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded), + if (ImGui::ImageButton(LUS::GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded), ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) { if (hasQuestItem) { gSaveContext.inventory.questItems &= ~bitMask; @@ -1330,7 +1330,7 @@ void DrawDungeonItemButton(uint32_t item, uint32_t scene) { uint32_t bitMask = 1 << (entry.id - ITEM_KEY_BOSS); // Bitset starts at ITEM_KEY_BOSS == 0. the rest are sequential bool hasItem = (bitMask & gSaveContext.inventory.dungeonItems[scene]) != 0; ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0)); - if (ImGui::ImageButton(Ship::GetTextureByName(hasItem ? entry.name : entry.nameFaded), + if (ImGui::ImageButton(LUS::GetTextureByName(hasItem ? entry.name : entry.nameFaded), ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) { if (hasItem) { gSaveContext.inventory.dungeonItems[scene] &= ~bitMask; @@ -1377,7 +1377,7 @@ void DrawQuestStatusTab() { uint32_t bitMask = 1 << entry.id; bool hasQuestItem = (bitMask & gSaveContext.inventory.questItems) != 0; ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0)); - if (ImGui::ImageButton(Ship::GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded), + if (ImGui::ImageButton(LUS::GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded), ImVec2(16.0f, 24.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) { if (hasQuestItem) { gSaveContext.inventory.questItems &= ~bitMask; @@ -1440,7 +1440,7 @@ void DrawQuestStatusTab() { if (dungeonItemsScene != SCENE_BDAN_BOSS) { float lineHeight = ImGui::GetTextLineHeightWithSpacing(); - ImGui::Image(Ship::GetTextureByName(itemMapping[ITEM_KEY_SMALL].name), ImVec2(lineHeight, lineHeight)); + ImGui::Image(LUS::GetTextureByName(itemMapping[ITEM_KEY_SMALL].name), ImVec2(lineHeight, lineHeight)); ImGui::SameLine(); if (ImGui::InputScalar("##Keys", ImGuiDataType_S8, gSaveContext.inventory.dungeonKeys + dungeonItemsScene)) { gSaveContext.sohStats.dungeonKeys[dungeonItemsScene] = gSaveContext.inventory.dungeonKeys[dungeonItemsScene]; @@ -1781,34 +1781,34 @@ void DrawSaveEditor(bool& open) { } void InitSaveEditor() { - Ship::AddWindow("Developer Tools", "Save Editor", DrawSaveEditor); + LUS::AddWindow("Developer Tools", "Save Editor", DrawSaveEditor); // Load item icons into ImGui for (const auto& entry : itemMapping) { - Ship::LoadResource(entry.second.name, entry.second.texturePath); - Ship::LoadResource(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f)); + LUS::LoadResource(entry.second.name, entry.second.texturePath); + LUS::LoadResource(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f)); } for (const auto& entry : gregMapping) { ImVec4 gregGreen = ImVec4(42.0f / 255.0f, 169.0f / 255.0f, 40.0f / 255.0f, 1.0f); ImVec4 gregFadedGreen = gregGreen; gregFadedGreen.w = 0.3f; - Ship::LoadResource(entry.second.name, entry.second.texturePath, gregGreen); - Ship::LoadResource(entry.second.nameFaded, entry.second.texturePath, gregFadedGreen); + LUS::LoadResource(entry.second.name, entry.second.texturePath, gregGreen); + LUS::LoadResource(entry.second.nameFaded, entry.second.texturePath, gregFadedGreen); } for (const auto& entry : questMapping) { - Ship::LoadResource(entry.second.name, entry.second.texturePath); - Ship::LoadResource(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f)); + LUS::LoadResource(entry.second.name, entry.second.texturePath); + LUS::LoadResource(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f)); } for (const auto& entry : songMapping) { - Ship::LoadResource(entry.name, gSongNoteTex, entry.color); + LUS::LoadResource(entry.name, gSongNoteTex, entry.color); ImVec4 fadedCol = entry.color; fadedCol.w = 0.3f; - Ship::LoadResource(entry.nameFaded, gSongNoteTex, fadedCol); + LUS::LoadResource(entry.nameFaded, gSongNoteTex, fadedCol); } for (const auto& entry : vanillaSongMapping) { - Ship::LoadResource(entry.name, gSongNoteTex, entry.color); + LUS::LoadResource(entry.name, gSongNoteTex, entry.color); ImVec4 fadedCol = entry.color; fadedCol.w = 0.3f; - Ship::LoadResource(entry.nameFaded, gSongNoteTex, fadedCol); + LUS::LoadResource(entry.nameFaded, gSongNoteTex, fadedCol); } } diff --git a/soh/soh/Enhancements/debugger/dlViewer.cpp b/soh/soh/Enhancements/debugger/dlViewer.cpp index e5c704526..1a5fb9b06 100644 --- a/soh/soh/Enhancements/debugger/dlViewer.cpp +++ b/soh/soh/Enhancements/debugger/dlViewer.cpp @@ -64,7 +64,7 @@ void DrawDLViewer(bool& open) { ImGui::EndCombo(); } if (activeDisplayList != nullptr) { - auto res = std::static_pointer_cast(Ship::Context::GetInstance()->GetResourceManager()->LoadResource(activeDisplayList)); + auto res = std::static_pointer_cast(LUS::Context::GetInstance()->GetResourceManager()->LoadResource(activeDisplayList)); for (int i = 0; i < res->Instructions.size(); i++) { std::string id = "##CMD" + std::to_string(i); Gfx* gfx = (Gfx*)&res->Instructions[i]; @@ -138,7 +138,7 @@ void DrawDLViewer(bool& open) { } void InitDLViewer() { - Ship::AddWindow("Developer Tools", "Display List Viewer", DrawDLViewer); + LUS::AddWindow("Developer Tools", "Display List Viewer", DrawDLViewer); displayListsSearchResults = ResourceMgr_ListFiles("*DL", &displayListsSearchResultsCount); } diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_RawAction.cpp b/soh/soh/Enhancements/game-interactor/GameInteractor_RawAction.cpp index 11881893a..4b0f43a5a 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_RawAction.cpp +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_RawAction.cpp @@ -335,7 +335,7 @@ void GameInteractor::RawAction::SetCosmeticsColor(uint8_t cosmeticCategory, uint break; } - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); ApplyOrResetCustomGfxPatches(); } diff --git a/soh/soh/Enhancements/gameplaystats.cpp b/soh/soh/Enhancements/gameplaystats.cpp index 1fccc7250..325ffc6b6 100644 --- a/soh/soh/Enhancements/gameplaystats.cpp +++ b/soh/soh/Enhancements/gameplaystats.cpp @@ -667,7 +667,7 @@ void SetupDisplayColors() { } extern "C" void InitStatTracker() { - Ship::AddWindow("Enhancements", "Gameplay Stats", DrawStatsTracker, + LUS::AddWindow("Enhancements", "Gameplay Stats", DrawStatsTracker, CVarGetInteger("gGameplayStatsEnabled", 0) == 1); SetupDisplayNames(); SetupDisplayColors(); diff --git a/soh/soh/Enhancements/presets.cpp b/soh/soh/Enhancements/presets.cpp index 9977e49be..8871abaf5 100644 --- a/soh/soh/Enhancements/presets.cpp +++ b/soh/soh/Enhancements/presets.cpp @@ -59,7 +59,7 @@ void DrawPresetSelector(PresetType presetTypeId) { if (selectedPresetId != 0) { applyPreset(selectedPresetDef.entries); } - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::PopStyleVar(1); } diff --git a/soh/soh/Enhancements/randomizer/3drando/rando_main.cpp b/soh/soh/Enhancements/randomizer/3drando/rando_main.cpp index 281cf9ece..1857b3826 100644 --- a/soh/soh/Enhancements/randomizer/3drando/rando_main.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/rando_main.cpp @@ -20,7 +20,7 @@ void RandoMain::GenerateRando(std::unordered_map cvarS // std::string settingsFileName = "./randomizer/latest_settings.json"; // CVarSetString("gLoadedPreset", settingsFileName.c_str()); - std::string fileName = Ship::Context::GetPathRelativeToAppDirectory(GenerateRandomizer(cvarSettings, excludedLocations, seedString).c_str()); + std::string fileName = LUS::Context::GetPathRelativeToAppDirectory(GenerateRandomizer(cvarSettings, excludedLocations, seedString).c_str()); CVarSetString("gSpoilerLog", fileName.c_str()); CVarSave(); diff --git a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp index f47cb482c..bebddfd97 100644 --- a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp @@ -807,8 +807,8 @@ const char* SpoilerLog_Write(int language) { WriteShuffledEntrances(); WriteAllLocations(language); - if (!std::filesystem::exists(Ship::Context::GetPathRelativeToAppDirectory("Randomizer"))) { - std::filesystem::create_directory(Ship::Context::GetPathRelativeToAppDirectory("Randomizer")); + if (!std::filesystem::exists(LUS::Context::GetPathRelativeToAppDirectory("Randomizer"))) { + std::filesystem::create_directory(LUS::Context::GetPathRelativeToAppDirectory("Randomizer")); } std::string jsonString = jsonData.dump(4); @@ -823,7 +823,7 @@ const char* SpoilerLog_Write(int language) { fileNameStream << std::to_string(Settings::hashIconIndexes[i]); } std::string fileName = fileNameStream.str(); - std::ofstream jsonFile(Ship::Context::GetPathRelativeToAppDirectory( + std::ofstream jsonFile(LUS::Context::GetPathRelativeToAppDirectory( (std::string("Randomizer/") + fileName + std::string(".json")).c_str())); jsonFile << std::setw(4) << jsonString << std::endl; jsonFile.close(); diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 5096f5ca7..d24c1a7c9 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -4361,7 +4361,7 @@ void DrawRandoEditor(bool& open) { excludedLocationString += ","; } CVarSetString("gRandomizeExcludedLocations", excludedLocationString.c_str()); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::SameLine(); ImGui::Text(rcObject->rcShortName.c_str()); @@ -4402,7 +4402,7 @@ void DrawRandoEditor(bool& open) { excludedLocationString += ","; } CVarSetString("gRandomizeExcludedLocations", excludedLocationString.c_str()); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::SameLine(); ImGui::Text(rcObject->rcShortName.c_str()); @@ -5443,7 +5443,7 @@ void InitRandoItemTable() { void InitRando() { - Ship::AddWindow("Randomizer", "Randomizer Settings", DrawRandoEditor); + LUS::AddWindow("Randomizer", "Randomizer Settings", DrawRandoEditor); Randomizer::CreateCustomMessages(); seedString = (char*)calloc(MAX_SEED_STRING_SIZE, sizeof(char)); InitRandoItemTable(); diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp index 3caba22a6..addedc298 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp @@ -1023,8 +1023,8 @@ void DrawCheckTrackerOptions(bool& open) { } void InitCheckTracker() { - Ship::AddWindow("Randomizer", "Check Tracker", DrawCheckTracker, CVarGetInteger("gCheckTrackerEnabled", 0) == 1); - Ship::AddWindow("Randomizer", "Check Tracker Settings", DrawCheckTrackerOptions); + LUS::AddWindow("Randomizer", "Check Tracker", DrawCheckTracker, CVarGetInteger("gCheckTrackerEnabled", 0) == 1); + LUS::AddWindow("Randomizer", "Check Tracker Settings", DrawCheckTrackerOptions); Color_Background = CVarGetColor("gCheckTrackerBgColor", Color_Bg_Default); Color_Area_Incomplete_Main = CVarGetColor("gCheckTrackerAreaMainIncompleteColor", Color_Main_Default); Color_Area_Incomplete_Extra = CVarGetColor("gCheckTrackerAreaExtraIncompleteColor", Color_Area_Incomplete_Extra_Default); @@ -1045,13 +1045,13 @@ void InitCheckTracker() { Color_Saved_Main = CVarGetColor("gCheckTrackerSavedMainColor", Color_Main_Default); Color_Saved_Extra = CVarGetColor("gCheckTrackerSavedExtraColor", Color_Saved_Extra_Default); - Ship::RegisterHook([](OSContPad* cont_pad) { + LUS::RegisterHook([](OSContPad* cont_pad) { trackerButtonsPressed = cont_pad; }); - Ship::RegisterHook([](uint32_t fileNum) { + LUS::RegisterHook([](uint32_t fileNum) { doInitialize = true; }); - Ship::RegisterHook([](uint32_t fileNum) { + LUS::RegisterHook([](uint32_t fileNum) { Teardown(); }); LocationTable_Init(); diff --git a/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.cpp index 17ae15487..270587b41 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.cpp @@ -919,7 +919,7 @@ void DrawEntranceTracker(bool& open) { } void InitEntranceTracker() { - Ship::AddWindow("Randomizer", "Entrance Tracker", DrawEntranceTracker, + LUS::AddWindow("Randomizer", "Entrance Tracker", DrawEntranceTracker, CVarGetInteger("gEntranceTrackerEnabled", 0) == 1); // Setup hooks for loading and clearing the entrance tracker data diff --git a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp index 2c95879ff..9d69d6fa9 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp @@ -452,7 +452,7 @@ void DrawItemCount(ItemTrackerItem item) { void DrawEquip(ItemTrackerItem item) { bool hasEquip = (item.data & gSaveContext.inventory.equipment) != 0; int iconSize = CVarGetInteger("gItemTrackerIconSize", 36); - ImGui::Image(Ship::GetTextureByName(hasEquip && IsValidSaveFile() ? item.name : item.nameFaded), + ImGui::Image(LUS::GetTextureByName(hasEquip && IsValidSaveFile() ? item.name : item.nameFaded), ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1)); UIWidgets::SetLastItemHoverText(SohUtils::GetItemName(item.id)); @@ -462,7 +462,7 @@ void DrawQuest(ItemTrackerItem item) { bool hasQuestItem = (item.data & gSaveContext.inventory.questItems) != 0; int iconSize = CVarGetInteger("gItemTrackerIconSize", 36); ImGui::BeginGroup(); - ImGui::Image(Ship::GetTextureByName(hasQuestItem && IsValidSaveFile() ? item.name : item.nameFaded), + ImGui::Image(LUS::GetTextureByName(hasQuestItem && IsValidSaveFile() ? item.name : item.nameFaded), ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1)); if (item.id == QUEST_SKULL_TOKEN) { @@ -524,7 +524,7 @@ void DrawItem(ItemTrackerItem item) { } ImGui::BeginGroup(); - ImGui::Image(Ship::GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded), + ImGui::Image(LUS::GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded), ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1)); DrawItemCount(item); @@ -542,7 +542,7 @@ void DrawBottle(ItemTrackerItem item) { } int iconSize = CVarGetInteger("gItemTrackerIconSize", 36); - ImGui::Image(Ship::GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded), + ImGui::Image(LUS::GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded), ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1)); UIWidgets::SetLastItemHoverText(SohUtils::GetItemName(item.id)); @@ -557,11 +557,11 @@ void DrawDungeonItem(ItemTrackerItem item) { bool hasSmallKey = (gSaveContext.inventory.dungeonKeys[item.data]) >= 0; ImGui::BeginGroup(); if (itemId == ITEM_KEY_SMALL) { - ImGui::Image(Ship::GetTextureByName(hasSmallKey && IsValidSaveFile() ? item.name : item.nameFaded), + ImGui::Image(LUS::GetTextureByName(hasSmallKey && IsValidSaveFile() ? item.name : item.nameFaded), ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1)); } else { - ImGui::Image(Ship::GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded), + ImGui::Image(LUS::GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded), ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1)); } @@ -601,7 +601,7 @@ void DrawSong(ItemTrackerItem item) { bool hasSong = (bitMask & gSaveContext.inventory.questItems) != 0; ImVec2 p = ImGui::GetCursorScreenPos(); ImGui::SetCursorScreenPos(ImVec2(p.x + 6, p.y)); - ImGui::Image(Ship::GetTextureByName(hasSong && IsValidSaveFile() ? item.name : item.nameFaded), + ImGui::Image(LUS::GetTextureByName(hasSong && IsValidSaveFile() ? item.name : item.nameFaded), ImVec2(iconSize / 1.5, iconSize), ImVec2(0, 0), ImVec2(1, 1)); UIWidgets::SetLastItemHoverText(SohUtils::GetQuestItemName(item.id)); } @@ -637,7 +637,7 @@ void DrawNotes(bool resizeable = false) { ItemTrackerNotes::TrackerNotesInputTextMultiline("##ItemTrackerNotes", &itemTrackerNotes, size, ImGuiInputTextFlags_AllowTabInput); if (ImGui::IsItemDeactivatedAfterEdit() && IsValidSaveFile()) { CVarSetString(("gItemTrackerNotes" + std::to_string(gSaveContext.fileNum)).c_str(), std::string(std::begin(itemTrackerNotes), std::end(itemTrackerNotes)).c_str()); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::EndGroup(); } @@ -985,7 +985,7 @@ void DrawItemTrackerOptions(bool& open) { CVarSetFloat("gItemTrackerBgColorG", ChromaKeyBackground.y); CVarSetFloat("gItemTrackerBgColorB", ChromaKeyBackground.z); CVarSetFloat("gItemTrackerBgColorA", ChromaKeyBackground.w); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } ImGui::PopItemWidth(); @@ -1081,8 +1081,8 @@ void DrawItemTrackerOptions(bool& open) { } void InitItemTracker() { - Ship::AddWindow("Randomizer", "Item Tracker", DrawItemTracker, CVarGetInteger("gItemTrackerEnabled", 0) == 1); - Ship::AddWindow("Randomizer", "Item Tracker Settings", DrawItemTrackerOptions); + LUS::AddWindow("Randomizer", "Item Tracker", DrawItemTracker, CVarGetInteger("gItemTrackerEnabled", 0) == 1); + LUS::AddWindow("Randomizer", "Item Tracker Settings", DrawItemTrackerOptions); float trackerBgR = CVarGetFloat("gItemTrackerBgColorR", 0); float trackerBgG = CVarGetFloat("gItemTrackerBgColorG", 0); float trackerBgB = CVarGetFloat("gItemTrackerBgColorB", 0); @@ -1097,16 +1097,16 @@ void InitItemTracker() { if (itemTrackerNotes.empty()) { itemTrackerNotes.push_back(0); } - Ship::RegisterHook([](OSContPad* cont_pad) { + LUS::RegisterHook([](OSContPad* cont_pad) { buttonsPressed = cont_pad; }); - Ship::RegisterHook([](uint32_t fileNum) { + LUS::RegisterHook([](uint32_t fileNum) { const char* initialTrackerNotes = CVarGetString(("gItemTrackerNotes" + std::to_string(fileNum)).c_str(), ""); itemTrackerNotes.resize(strlen(initialTrackerNotes) + 1); strcpy(itemTrackerNotes.Data, initialTrackerNotes); }); - Ship::RegisterHook([](uint32_t fileNum) { + LUS::RegisterHook([](uint32_t fileNum) { CVarSetString(("gItemTrackerNotes" + std::to_string(fileNum)).c_str(), ""); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); }); } diff --git a/soh/soh/Enhancements/savestates.cpp b/soh/soh/Enhancements/savestates.cpp index 51cb871d9..d976cb764 100644 --- a/soh/soh/Enhancements/savestates.cpp +++ b/soh/soh/Enhancements/savestates.cpp @@ -837,7 +837,7 @@ extern "C" void ProcessSaveStateRequests(void) { } void SaveStateMgr::SetCurrentSlot(unsigned int slot) { - Ship::GetGameOverlay()->TextDrawNotification(1.0f, true, "slot %u set", slot); + LUS::GetGameOverlay()->TextDrawNotification(1.0f, true, "slot %u set", slot); this->currentSlot = slot; } @@ -855,12 +855,12 @@ void SaveStateMgr::ProcessSaveStateRequests(void) { this->states[request.slot] = std::make_shared(OTRGlobals::Instance->gSaveStateMgr, request.slot); } this->states[request.slot]->Save(); - Ship::GetGameOverlay()->TextDrawNotification(1.0f, true, "saved state %u", request.slot); + LUS::GetGameOverlay()->TextDrawNotification(1.0f, true, "saved state %u", request.slot); break; case RequestType::LOAD: if (this->states.contains(request.slot)) { this->states[request.slot]->Load(); - Ship::GetGameOverlay()->TextDrawNotification(1.0f, true, "loaded state %u", request.slot); + LUS::GetGameOverlay()->TextDrawNotification(1.0f, true, "loaded state %u", request.slot); } else { SPDLOG_ERROR("Invalid SaveState slot: {}", request.type); } @@ -876,7 +876,7 @@ void SaveStateMgr::ProcessSaveStateRequests(void) { SaveStateReturn SaveStateMgr::AddRequest(const SaveStateRequest request) { if (gPlayState == nullptr) { SPDLOG_ERROR("[SOH] Can not save or load a state outside of \"GamePlay\""); - Ship::GetGameOverlay()->TextDrawNotification(1.0f, true, "states not available here", request.slot); + LUS::GetGameOverlay()->TextDrawNotification(1.0f, true, "states not available here", request.slot); return SaveStateReturn::FAIL_WRONG_GAMESTATE; } @@ -890,7 +890,7 @@ SaveStateReturn SaveStateMgr::AddRequest(const SaveStateRequest request) { return SaveStateReturn::SUCCESS; } else { SPDLOG_ERROR("Invalid SaveState slot: {}", request.type); - Ship::GetGameOverlay()->TextDrawNotification(1.0f, true, "state slot %u empty", request.slot); + LUS::GetGameOverlay()->TextDrawNotification(1.0f, true, "state slot %u empty", request.slot); return SaveStateReturn::FAIL_INVALID_SLOT; } [[unlikely]] default: diff --git a/soh/soh/Enhancements/tts/tts.cpp b/soh/soh/Enhancements/tts/tts.cpp index df424f372..29e39c7e5 100644 --- a/soh/soh/Enhancements/tts/tts.cpp +++ b/soh/soh/Enhancements/tts/tts.cpp @@ -681,22 +681,22 @@ void InitTTSBank() { break; } - auto sceneFile = Ship::Context::GetInstance()->GetResourceManager()->LoadFile("accessibility/texts/scenes" + languageSuffix); + auto sceneFile = LUS::Context::GetInstance()->GetResourceManager()->LoadFile("accessibility/texts/scenes" + languageSuffix); if (sceneFile != nullptr) { sceneMap = nlohmann::json::parse(sceneFile->Buffer, nullptr, true, true); } - auto miscFile = Ship::Context::GetInstance()->GetResourceManager()->LoadFile("accessibility/texts/misc" + languageSuffix); + auto miscFile = LUS::Context::GetInstance()->GetResourceManager()->LoadFile("accessibility/texts/misc" + languageSuffix); if (miscFile != nullptr) { miscMap = nlohmann::json::parse(miscFile->Buffer, nullptr, true, true); } - auto kaleidoFile = Ship::Context::GetInstance()->GetResourceManager()->LoadFile("accessibility/texts/kaleidoscope" + languageSuffix); + auto kaleidoFile = LUS::Context::GetInstance()->GetResourceManager()->LoadFile("accessibility/texts/kaleidoscope" + languageSuffix); if (kaleidoFile != nullptr) { kaleidoMap = nlohmann::json::parse(kaleidoFile->Buffer, nullptr, true, true); } - auto fileChooseFile = Ship::Context::GetInstance()->GetResourceManager()->LoadFile("accessibility/texts/filechoose" + languageSuffix); + auto fileChooseFile = LUS::Context::GetInstance()->GetResourceManager()->LoadFile("accessibility/texts/filechoose" + languageSuffix); if (fileChooseFile != nullptr) { fileChooseMap = nlohmann::json::parse(fileChooseFile->Buffer, nullptr, true, true); } diff --git a/soh/soh/GameMenuBar.cpp b/soh/soh/GameMenuBar.cpp index 274dbb20a..3c95ea291 100644 --- a/soh/soh/GameMenuBar.cpp +++ b/soh/soh/GameMenuBar.cpp @@ -108,8 +108,8 @@ namespace GameMenuBar { // MARK: - Delegates void SetupHooks() { - Ship::RegisterHook(UpdateAudio); - Ship::RegisterHook(UpdateAudio); + LUS::RegisterHook(UpdateAudio); + LUS::RegisterHook(UpdateAudio); } void Draw() { @@ -131,8 +131,8 @@ namespace GameMenuBar { } ImGui::Text("Audio API (Needs reload)"); - auto audioBackends = Ship::GetAvailableAudioBackends(); - auto currentAudioBackend = Ship::GetCurrentAudioBackend(); + auto audioBackends = LUS::GetAvailableAudioBackends(); + auto currentAudioBackend = LUS::GetCurrentAudioBackend(); if (audioBackends.size() <= 1) { UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f); @@ -140,7 +140,7 @@ namespace GameMenuBar { if (ImGui::BeginCombo("##AApi", currentAudioBackend.second)) { for (uint8_t i = 0; i < audioBackends.size(); i++) { if (ImGui::Selectable(audioBackends[i].second, audioBackends[i] == currentAudioBackend)) { - Ship::SetCurrentAudioBackend(i, audioBackends[i]); + LUS::SetCurrentAudioBackend(i, audioBackends[i]); } } @@ -164,8 +164,8 @@ namespace GameMenuBar { { bool currentValue = CVarGetInteger("gControllerConfigurationEnabled", 0); CVarSetInteger("gControllerConfigurationEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::ToggleInputEditorWindow(CVarGetInteger("gControllerConfigurationEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::ToggleInputEditorWindow(CVarGetInteger("gControllerConfigurationEnabled", 0)); } UIWidgets::PaddedSeparator(); ImGui::PopStyleColor(1); @@ -190,21 +190,21 @@ namespace GameMenuBar { #ifndef __APPLE__ UIWidgets::EnhancementSliderFloat("Internal Resolution: %d %%", "##IMul", "gInternalResolution", 0.5f, 2.0f, "", 1.0f, true); UIWidgets::Tooltip("Multiplies your output resolution by the value inputted, as a more intensive but effective form of anti-aliasing"); - Ship::SetResolutionMultiplier(CVarGetFloat("gInternalResolution", 1)); + LUS::SetResolutionMultiplier(CVarGetFloat("gInternalResolution", 1)); #endif #ifndef __WIIU__ UIWidgets::PaddedEnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, "", 1, true, true, false); UIWidgets::Tooltip("Activates multi-sample anti-aliasing when above 1x up to 8x for 8 samples for every pixel"); - Ship::SetMSAALevel(CVarGetInteger("gMSAAValue", 1)); + LUS::SetMSAALevel(CVarGetInteger("gMSAAValue", 1)); #endif { // FPS Slider const int minFps = 20; static int maxFps; - if (Ship::WindowBackend() == Ship::Backend::DX11) { + if (LUS::WindowBackend() == LUS::Backend::DX11) { maxFps = 360; } else { - maxFps = Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(); + maxFps = LUS::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(); } int currentFps = fmax(fmin(OTRGlobals::Instance->GetInterpolationFPS(), maxFps), minFps); #ifdef __WIIU__ @@ -264,15 +264,15 @@ namespace GameMenuBar { currentFps = 60; } CVarSetInteger("gInterpolationFPS", currentFps); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); #else bool matchingRefreshRate = - CVarGetInteger("gMatchRefreshRate", 0) && Ship::WindowBackend() != Ship::Backend::DX11; + CVarGetInteger("gMatchRefreshRate", 0) && LUS::WindowBackend() != LUS::Backend::DX11; UIWidgets::PaddedEnhancementSliderInt( (currentFps == 20) ? "FPS: Original (20)" : "FPS: %d", "##FPSInterpolation", "gInterpolationFPS", minFps, maxFps, "", 20, true, true, false, matchingRefreshRate); #endif - if (Ship::WindowBackend() == Ship::Backend::DX11) { + if (LUS::WindowBackend() == LUS::Backend::DX11) { UIWidgets::Tooltip( "Uses Matrix Interpolation to create extra frames, resulting in smoother graphics. This is purely " "visual and does not impact game logic, execution of glitches etc.\n\n" @@ -286,13 +286,13 @@ namespace GameMenuBar { } } // END FPS Slider - if (Ship::WindowBackend() == Ship::Backend::DX11) { + if (LUS::WindowBackend() == LUS::Backend::DX11) { UIWidgets::Spacer(0); if (ImGui::Button("Match Refresh Rate")) { - int hz = Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(); + int hz = LUS::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(); if (hz >= 20 && hz <= 360) { CVarSetInteger("gInterpolationFPS", hz); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } } } else { @@ -300,7 +300,7 @@ namespace GameMenuBar { } UIWidgets::Tooltip("Matches interpolation value to the current game's window refresh rate"); - if (Ship::WindowBackend() == Ship::Backend::DX11) { + if (LUS::WindowBackend() == LUS::Backend::DX11) { UIWidgets::PaddedEnhancementSliderInt(CVarGetInteger("gExtraLatencyThreshold", 80) == 0 ? "Jitter fix: Off" : "Jitter fix: >= %d FPS", "##ExtraLatencyThreshold", "gExtraLatencyThreshold", 0, 360, "", 80, true, true, false); UIWidgets::Tooltip("When Interpolation FPS setting is at least this threshold, add one frame of input lag (e.g. 16.6 ms for 60 FPS) in order to avoid jitter. This setting allows the CPU to work on one frame while GPU works on the previous frame.\nThis setting should be used when your computer is too slow to do CPU + GPU work in time."); @@ -309,8 +309,8 @@ namespace GameMenuBar { UIWidgets::PaddedSeparator(true, true, 3.0f, 3.0f); ImGui::Text("Renderer API (Needs reload)"); - auto renderingBackends = Ship::GetAvailableRenderingBackends(); - auto currentRenderingBackend = Ship::GetCurrentRenderingBackend(); + auto renderingBackends = LUS::GetAvailableRenderingBackends(); + auto currentRenderingBackend = LUS::GetCurrentRenderingBackend(); if (renderingBackends.size() <= 1) { UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f); @@ -318,7 +318,7 @@ namespace GameMenuBar { if (ImGui::BeginCombo("##RApi", currentRenderingBackend.second)) { for (uint8_t i = 0; i < renderingBackends.size(); i++) { if (ImGui::Selectable(renderingBackends[i].second, renderingBackends[i] == currentRenderingBackend)) { - Ship::SetCurrentRenderingBackend(i, renderingBackends[i]); + LUS::SetCurrentRenderingBackend(i, renderingBackends[i]); } } @@ -328,28 +328,28 @@ namespace GameMenuBar { UIWidgets::ReEnableComponent(""); } - if (Ship::Context::GetInstance()->GetWindow()->CanDisableVerticalSync()) { + if (LUS::Context::GetInstance()->GetWindow()->CanDisableVerticalSync()) { UIWidgets::PaddedEnhancementCheckbox("Enable Vsync", "gVsyncEnabled", true, false); } - if (Ship::SupportsWindowedFullscreen()) { + if (LUS::SupportsWindowedFullscreen()) { UIWidgets::PaddedEnhancementCheckbox("Windowed fullscreen", "gSdlWindowedFullscreen", true, false); } - if (Ship::SupportsViewports()) { + if (LUS::SupportsViewports()) { UIWidgets::PaddedEnhancementCheckbox("Allow multi-windows", "gEnableMultiViewports", true, false); UIWidgets::Tooltip("Allows windows to be able to be dragged off of the main game window. Requires a reload to take effect."); } // If more filters are added to LUS, make sure to add them to the filters list here ImGui::Text("Texture Filter (Needs reload)"); - const char* filters[] = { Ship::GetSupportedTextureFilters()[0], Ship::GetSupportedTextureFilters()[1], - Ship::GetSupportedTextureFilters()[2] }; + const char* filters[] = { LUS::GetSupportedTextureFilters()[0], LUS::GetSupportedTextureFilters()[1], + LUS::GetSupportedTextureFilters()[2] }; UIWidgets::EnhancementCombobox("gTextureFilter", filters, 0); UIWidgets::Spacer(0); - Ship::DrawSettings(); + LUS::DrawSettings(); ImGui::EndMenu(); } @@ -982,28 +982,28 @@ namespace GameMenuBar { { bool currentValue = CVarGetInteger("gGameControlEditorEnabled", 0); CVarSetInteger("gGameControlEditorEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Game Control Editor", CVarGetInteger("gGameControlEditorEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Game Control Editor", CVarGetInteger("gGameControlEditorEnabled", 0)); } if (ImGui::Button(GetWindowButtonText("Cosmetics Editor", CVarGetInteger("gCosmeticsEditorEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) { bool currentValue = CVarGetInteger("gCosmeticsEditorEnabled", 0); CVarSetInteger("gCosmeticsEditorEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Cosmetics Editor", CVarGetInteger("gCosmeticsEditorEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Cosmetics Editor", CVarGetInteger("gCosmeticsEditorEnabled", 0)); } if (ImGui::Button(GetWindowButtonText("Audio Editor", CVarGetInteger("gAudioEditor.WindowOpen", 0)).c_str(), ImVec2(-1.0f, 0.0f))) { bool currentValue = CVarGetInteger("gAudioEditor.WindowOpen", 0); CVarSetInteger("gAudioEditor.WindowOpen", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Audio Editor", CVarGetInteger("gAudioEditor.WindowOpen", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Audio Editor", CVarGetInteger("gAudioEditor.WindowOpen", 0)); } if (ImGui::Button(GetWindowButtonText("Gameplay Stats", CVarGetInteger("gGameplayStatsEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) { bool currentValue = CVarGetInteger("gGameplayStatsEnabled", 0); CVarSetInteger("gGameplayStatsEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Gameplay Stats", CVarGetInteger("gGameplayStatsEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Gameplay Stats", CVarGetInteger("gGameplayStatsEnabled", 0)); } ImGui::PopStyleVar(3); ImGui::PopStyleColor(1); @@ -1011,9 +1011,9 @@ namespace GameMenuBar { #ifdef __SWITCH__ UIWidgets::Spacer(0); ImGui::Text("Switch performance mode"); - if (UIWidgets::EnhancementCombobox("gSwitchPerfMode", SWITCH_CPU_PROFILES, (int)Ship::SwitchProfiles::STOCK)) { - SPDLOG_INFO("Profile:: %s", SWITCH_CPU_PROFILES[CVarGetInteger("gSwitchPerfMode", (int)Ship::SwitchProfiles::STOCK)]); - Ship::Switch::ApplyOverclock(); + if (UIWidgets::EnhancementCombobox("gSwitchPerfMode", SWITCH_CPU_PROFILES, (int)LUS::SwitchProfiles::STOCK)) { + SPDLOG_INFO("Profile:: %s", SWITCH_CPU_PROFILES[CVarGetInteger("gSwitchPerfMode", (int)LUS::SwitchProfiles::STOCK)]); + LUS::Switch::ApplyOverclock(); } #endif @@ -1124,9 +1124,9 @@ namespace GameMenuBar { CVarSetInteger("gEnableBetaQuest", betaQuestEnabled); CVarSetInteger("gBetaQuestWorld", betaQuestWorld); - Ship::DispatchConsoleCommand("reset"); + LUS::DispatchConsoleCommand("reset"); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } if (!isBetaQuestEnabled) { @@ -1169,8 +1169,8 @@ namespace GameMenuBar { { bool currentValue = CVarGetInteger("gStatsEnabled", 0); CVarSetInteger("gStatsEnabled", !currentValue); - Ship::ToggleStatisticsWindow(true); - Ship::RequestCvarSaveOnNextTick(); + LUS::ToggleStatisticsWindow(true); + LUS::RequestCvarSaveOnNextTick(); } UIWidgets::Tooltip("Shows the stats window, with your FPS and frametimes, and the OS you're playing on"); UIWidgets::Spacer(0); @@ -1178,8 +1178,8 @@ namespace GameMenuBar { { bool currentValue = CVarGetInteger("gConsoleEnabled", 0); CVarSetInteger("gConsoleEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::ToggleConsoleWindow(!currentValue); + LUS::RequestCvarSaveOnNextTick(); + LUS::ToggleConsoleWindow(!currentValue); } UIWidgets::Tooltip("Enables the console window, allowing you to input commands, type help for some examples"); UIWidgets::Spacer(0); @@ -1187,32 +1187,32 @@ namespace GameMenuBar { { bool currentValue = CVarGetInteger("gSaveEditorEnabled", 0); CVarSetInteger("gSaveEditorEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Save Editor", CVarGetInteger("gSaveEditorEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Save Editor", CVarGetInteger("gSaveEditorEnabled", 0)); } UIWidgets::Spacer(0); if (ImGui::Button(GetWindowButtonText("Collision Viewer", CVarGetInteger("gCollisionViewerEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) { bool currentValue = CVarGetInteger("gCollisionViewerEnabled", 0); CVarSetInteger("gCollisionViewerEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Collision Viewer", CVarGetInteger("gCollisionViewerEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Collision Viewer", CVarGetInteger("gCollisionViewerEnabled", 0)); } UIWidgets::Spacer(0); if (ImGui::Button(GetWindowButtonText("Actor Viewer", CVarGetInteger("gActorViewerEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) { bool currentValue = CVarGetInteger("gActorViewerEnabled", 0); CVarSetInteger("gActorViewerEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Actor Viewer", CVarGetInteger("gActorViewerEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Actor Viewer", CVarGetInteger("gActorViewerEnabled", 0)); } UIWidgets::Spacer(0); if (ImGui::Button(GetWindowButtonText("Display List Viewer", CVarGetInteger("gDLViewerEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) { bool currentValue = CVarGetInteger("gDLViewerEnabled", 0); CVarSetInteger("gDLViewerEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Display List Viewer", CVarGetInteger("gDLViewerEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Display List Viewer", CVarGetInteger("gDLViewerEnabled", 0)); } ImGui::PopStyleVar(3); ImGui::PopStyleColor(1); @@ -1237,48 +1237,48 @@ namespace GameMenuBar { { bool currentValue = CVarGetInteger("gRandomizerSettingsEnabled", 0); CVarSetInteger("gRandomizerSettingsEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Randomizer Settings", CVarGetInteger("gRandomizerSettingsEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Randomizer Settings", CVarGetInteger("gRandomizerSettingsEnabled", 0)); } UIWidgets::Spacer(0); if (ImGui::Button(GetWindowButtonText("Item Tracker", CVarGetInteger("gItemTrackerEnabled", 0)).c_str(), buttonSize)) { bool currentValue = CVarGetInteger("gItemTrackerEnabled", 0); CVarSetInteger("gItemTrackerEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Item Tracker", CVarGetInteger("gItemTrackerEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Item Tracker", CVarGetInteger("gItemTrackerEnabled", 0)); } UIWidgets::Spacer(0); if (ImGui::Button(GetWindowButtonText("Item Tracker Settings", CVarGetInteger("gItemTrackerSettingsEnabled", 0)).c_str(), buttonSize)) { bool currentValue = CVarGetInteger("gItemTrackerSettingsEnabled", 0); CVarSetInteger("gItemTrackerSettingsEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Item Tracker Settings", CVarGetInteger("gItemTrackerSettingsEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Item Tracker Settings", CVarGetInteger("gItemTrackerSettingsEnabled", 0)); } UIWidgets::Spacer(0); if (ImGui::Button(GetWindowButtonText("Entrance Tracker", CVarGetInteger("gEntranceTrackerEnabled", 0)).c_str(), buttonSize)) { bool currentValue = CVarGetInteger("gEntranceTrackerEnabled", 0); CVarSetInteger("gEntranceTrackerEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Entrance Tracker", CVarGetInteger("gEntranceTrackerEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Entrance Tracker", CVarGetInteger("gEntranceTrackerEnabled", 0)); } UIWidgets::Spacer(0); if (ImGui::Button(GetWindowButtonText("Check Tracker", CVarGetInteger("gCheckTrackerEnabled", 0)).c_str(), buttonSize)) { bool currentValue = CVarGetInteger("gCheckTrackerEnabled", 0); CVarSetInteger("gCheckTrackerEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Check Tracker", CVarGetInteger("gCheckTrackerEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Check Tracker", CVarGetInteger("gCheckTrackerEnabled", 0)); } UIWidgets::Spacer(0); if (ImGui::Button(GetWindowButtonText("Check Tracker Settings", CVarGetInteger("gCheckTrackerSettingsEnabled", 0)).c_str(), buttonSize)) { bool currentValue = CVarGetInteger("gCheckTrackerSettingsEnabled", 0); CVarSetInteger("gCheckTrackerSettingsEnabled", !currentValue); - Ship::RequestCvarSaveOnNextTick(); - Ship::EnableWindow("Check Tracker Settings", CVarGetInteger("gCheckTrackerSettingsEnabled", 0)); + LUS::RequestCvarSaveOnNextTick(); + LUS::EnableWindow("Check Tracker Settings", CVarGetInteger("gCheckTrackerSettingsEnabled", 0)); } ImGui::PopStyleVar(3); ImGui::PopStyleColor(1); diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 1380515e7..ee76a234c 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -201,19 +201,19 @@ const char* constCameraStrings[] = { OTRGlobals::OTRGlobals() { std::vector OTRFiles; - std::string mqPath = Ship::Context::GetPathRelativeToAppDirectory("oot-mq.otr"); + std::string mqPath = LUS::Context::GetPathRelativeToAppDirectory("oot-mq.otr"); if (std::filesystem::exists(mqPath)) { OTRFiles.push_back(mqPath); } - std::string ootPath = Ship::Context::GetPathRelativeToAppDirectory("oot.otr"); + std::string ootPath = LUS::Context::GetPathRelativeToAppDirectory("oot.otr"); if (std::filesystem::exists(ootPath)) { OTRFiles.push_back(ootPath); } - std::string sohOtrPath = Ship::Context::GetPathRelativeToAppBundle("soh.otr"); + std::string sohOtrPath = LUS::Context::GetPathRelativeToAppBundle("soh.otr"); if (std::filesystem::exists(sohOtrPath)) { OTRFiles.push_back(sohOtrPath); } - std::string patchesPath = Ship::Context::GetPathRelativeToAppDirectory("mods"); + std::string patchesPath = LUS::Context::GetPathRelativeToAppDirectory("mods"); if (patchesPath.length() > 0 && std::filesystem::exists(patchesPath)) { if (std::filesystem::is_directory(patchesPath)) { for (const auto& p : std::filesystem::recursive_directory_iterator(patchesPath)) { @@ -240,21 +240,21 @@ OTRGlobals::OTRGlobals() { OOT_PAL_GC_DBG1, OOT_PAL_GC_DBG2 }; - context = Ship::Context::CreateInstance("Ship of Harkinian", "soh", OTRFiles); + context = LUS::Context::CreateInstance("Ship of Harkinian", "soh", OTRFiles); - context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(Ship::ResourceType::SOH_Animation, "Animation", std::make_shared()); - context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(Ship::ResourceType::SOH_PlayerAnimation, "PlayerAnimation", std::make_shared()); - context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(Ship::ResourceType::SOH_Room, "Room", std::make_shared()); // Is room scene? maybe? - context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(Ship::ResourceType::SOH_CollisionHeader, "CollisionHeader", std::make_shared()); - context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(Ship::ResourceType::SOH_Skeleton, "Skeleton", std::make_shared()); - context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(Ship::ResourceType::SOH_SkeletonLimb, "SkeletonLimb", std::make_shared()); - context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(Ship::ResourceType::SOH_Path, "Path", std::make_shared()); - context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(Ship::ResourceType::SOH_Cutscene, "Cutscene", std::make_shared()); - context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(Ship::ResourceType::SOH_Text, "Text", std::make_shared()); - context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(Ship::ResourceType::SOH_AudioSample, "AudioSample", std::make_shared()); - context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(Ship::ResourceType::SOH_AudioSoundFont, "AudioSoundFont", std::make_shared()); - context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(Ship::ResourceType::SOH_AudioSequence, "AudioSequence", std::make_shared()); - context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(Ship::ResourceType::SOH_Background, "Background", std::make_shared()); + context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SOH_Animation, "Animation", std::make_shared()); + context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SOH_PlayerAnimation, "PlayerAnimation", std::make_shared()); + context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SOH_Room, "Room", std::make_shared()); // Is room scene? maybe? + context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SOH_CollisionHeader, "CollisionHeader", std::make_shared()); + context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SOH_Skeleton, "Skeleton", std::make_shared()); + context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SOH_SkeletonLimb, "SkeletonLimb", std::make_shared()); + context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SOH_Path, "Path", std::make_shared()); + context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SOH_Cutscene, "Cutscene", std::make_shared()); + context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SOH_Text, "Text", std::make_shared()); + context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SOH_AudioSample, "AudioSample", std::make_shared()); + context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SOH_AudioSoundFont, "AudioSoundFont", std::make_shared()); + context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SOH_AudioSequence, "AudioSequence", std::make_shared()); + context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(LUS::ResourceType::SOH_Background, "Background", std::make_shared()); gSaveStateMgr = std::make_shared(); gRandomizer = std::make_shared(); @@ -278,7 +278,7 @@ OTRGlobals::OTRGlobals() { #if defined(__SWITCH__) SPDLOG_ERROR("Invalid OTR File!"); #elif defined(__WIIU__) - Ship::WiiU::ThrowInvalidOTR(); + LUS::WiiU::ThrowInvalidOTR(); #else SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Invalid OTR File", "Attempted to load an invalid OTR file. Try regenerating.", nullptr); @@ -324,15 +324,15 @@ bool OTRGlobals::HasOriginal() { } uint32_t OTRGlobals::GetInterpolationFPS() { - if (Ship::WindowBackend() == Ship::Backend::DX11) { + if (LUS::WindowBackend() == LUS::Backend::DX11) { return CVarGetInteger("gInterpolationFPS", 20); } if (CVarGetInteger("gMatchRefreshRate", 0)) { - return Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(); + return LUS::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(); } - return std::min(Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(), CVarGetInteger("gInterpolationFPS", 20)); + return std::min(LUS::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(), CVarGetInteger("gInterpolationFPS", 20)); } struct ExtensionEntry { @@ -694,7 +694,7 @@ extern "C" uint32_t GetGIID(uint32_t itemID) { } extern "C" void OTRExtScanner() { - auto lst = *Ship::Context::GetInstance()->GetResourceManager()->GetArchive()->ListFiles("*").get(); + auto lst = *LUS::Context::GetInstance()->GetResourceManager()->GetArchive()->ListFiles("*").get(); for (auto& rPath : lst) { std::vector raw = StringHelper::Split(rPath, "."); @@ -708,8 +708,8 @@ extern "C" void OTRExtScanner() { extern "C" void InitOTR() { #if not defined (__SWITCH__) && not defined(__WIIU__) - if (!std::filesystem::exists(Ship::Context::GetPathRelativeToAppDirectory("oot-mq.otr")) && - !std::filesystem::exists(Ship::Context::GetPathRelativeToAppDirectory("oot.otr"))){ + if (!std::filesystem::exists(LUS::Context::GetPathRelativeToAppDirectory("oot-mq.otr")) && + !std::filesystem::exists(LUS::Context::GetPathRelativeToAppDirectory("oot.otr"))){ if (Extractor::ShowYesNoBox("No OTR Files", "No OTR files found. Generate one now?") == IDYES) { Extractor extract; if (!extract.Run()) { @@ -732,12 +732,12 @@ extern "C" void InitOTR() { #endif #ifdef __SWITCH__ - Ship::Switch::Init(Ship::PreInitPhase); + LUS::Switch::Init(LUS::PreInitPhase); #elif defined(__WIIU__) - Ship::WiiU::Init(); + LUS::WiiU::Init(); #endif - Ship::AddSetupHooksDelegate(GameMenuBar::SetupHooks); - Ship::RegisterMenuDrawMethod(GameMenuBar::Draw); + LUS::AddSetupHooksDelegate(GameMenuBar::SetupHooks); + LUS::RegisterMenuDrawMethod(GameMenuBar::Draw); OTRGlobals::Instance = new OTRGlobals(); SaveManager::Instance = new SaveManager(); @@ -837,7 +837,7 @@ extern bool ShouldClearTextureCacheAtEndOfFrame; extern "C" void Graph_StartFrame() { #ifndef __WIIU__ - using Ship::KbScancode; + using LUS::KbScancode; int32_t dwScancode = OTRGlobals::Instance->context->GetWindow()->GetLastScancode(); OTRGlobals::Instance->context->GetWindow()->SetLastScancode(-1); @@ -975,7 +975,7 @@ extern "C" void Graph_ProcessGfxCommands(Gfx* commands) { if (ShouldClearTextureCacheAtEndOfFrame) { gfx_texture_cache_clear(); - Ship::SkeletonPatcher::UpdateSkeletons(); + LUS::SkeletonPatcher::UpdateSkeletons(); ShouldClearTextureCacheAtEndOfFrame = false; } @@ -996,11 +996,11 @@ extern "C" uint16_t OTRGetPixelDepth(float x, float y) { } extern "C" uint32_t ResourceMgr_GetNumGameVersions() { - return Ship::Context::GetInstance()->GetResourceManager()->GetArchive()->GetGameVersions().size(); + return LUS::Context::GetInstance()->GetResourceManager()->GetArchive()->GetGameVersions().size(); } extern "C" uint32_t ResourceMgr_GetGameVersion(int index) { - return Ship::Context::GetInstance()->GetResourceManager()->GetArchive()->GetGameVersions()[index]; + return LUS::Context::GetInstance()->GetResourceManager()->GetArchive()->GetGameVersions()[index]; } uint32_t IsSceneMasterQuest(s16 sceneNum) { @@ -1045,16 +1045,16 @@ extern "C" uint32_t ResourceMgr_IsGameMasterQuest() { } extern "C" void ResourceMgr_LoadDirectory(const char* resName) { - Ship::Context::GetInstance()->GetResourceManager()->LoadDirectory(resName); + LUS::Context::GetInstance()->GetResourceManager()->LoadDirectory(resName); } extern "C" void ResourceMgr_DirtyDirectory(const char* resName) { - Ship::Context::GetInstance()->GetResourceManager()->DirtyDirectory(resName); + LUS::Context::GetInstance()->GetResourceManager()->DirtyDirectory(resName); } // OTRTODO: There is probably a more elegant way to go about this... // Kenix: This is definitely leaking memory when it's called. extern "C" char** ResourceMgr_ListFiles(const char* searchMask, int* resultSize) { - auto lst = Ship::Context::GetInstance()->GetResourceManager()->GetArchive()->ListFiles(searchMask); + auto lst = LUS::Context::GetInstance()->GetResourceManager()->GetArchive()->ListFiles(searchMask); char** result = (char**)malloc(lst->size() * sizeof(char*)); for (size_t i = 0; i < lst->size(); i++) { @@ -1078,10 +1078,10 @@ extern "C" uint8_t ResourceMgr_FileExists(const char* filePath) { } extern "C" void ResourceMgr_LoadFile(const char* resName) { - Ship::Context::GetInstance()->GetResourceManager()->LoadResource(resName); + LUS::Context::GetInstance()->GetResourceManager()->LoadResource(resName); } -std::shared_ptr GetResourceByNameHandlingMQ(const char* path) { +std::shared_ptr GetResourceByNameHandlingMQ(const char* path) { std::string Path = path; if (ResourceMgr_IsGameMasterQuest()) { size_t pos = 0; @@ -1089,7 +1089,7 @@ std::shared_ptr GetResourceByNameHandlingMQ(const char* path) { Path.replace(pos, 7, "/mq/"); } } - return Ship::Context::GetInstance()->GetResourceManager()->LoadResource(Path.c_str()); + return LUS::Context::GetInstance()->GetResourceManager()->LoadResource(Path.c_str()); } extern "C" char* GetResourceDataByNameHandlingMQ(const char* path) { @@ -1118,7 +1118,7 @@ extern "C" char* ResourceMgr_LoadFileFromDisk(const char* filePath) { extern "C" uint8_t ResourceMgr_ResourceIsBackground(char* texPath) { auto res = GetResourceByNameHandlingMQ(texPath); - return res->InitData->Type == Ship::ResourceType::SOH_Background; + return res->InitData->Type == LUS::ResourceType::SOH_Background; } extern "C" char* ResourceMgr_LoadJPEG(char* data, size_t dataSize) @@ -1166,10 +1166,10 @@ extern "C" uint16_t ResourceMgr_LoadTexHeightByName(char* texPath); extern "C" char* ResourceMgr_LoadTexOrDListByName(const char* filePath) { auto res = GetResourceByNameHandlingMQ(filePath); - if (res->InitData->Type == Ship::ResourceType::DisplayList) - return (char*)&((std::static_pointer_cast(res))->Instructions[0]); - else if (res->InitData->Type == Ship::ResourceType::Array) - return (char*)(std::static_pointer_cast(res))->Vertices.data(); + if (res->InitData->Type == LUS::ResourceType::DisplayList) + return (char*)&((std::static_pointer_cast(res))->Instructions[0]); + else if (res->InitData->Type == LUS::ResourceType::Array) + return (char*)(std::static_pointer_cast(res))->Vertices.data(); else { return (char*)GetResourceDataByNameHandlingMQ(filePath); } @@ -1178,8 +1178,8 @@ extern "C" char* ResourceMgr_LoadTexOrDListByName(const char* filePath) { extern "C" char* ResourceMgr_LoadIfDListByName(const char* filePath) { auto res = GetResourceByNameHandlingMQ(filePath); - if (res->InitData->Type == Ship::ResourceType::DisplayList) - return (char*)&((std::static_pointer_cast(res))->Instructions[0]); + if (res->InitData->Type == LUS::ResourceType::DisplayList) + return (char*)&((std::static_pointer_cast(res))->Instructions[0]); return nullptr; } @@ -1189,7 +1189,7 @@ extern "C" Sprite* GetSeedTexture(uint8_t index) { } extern "C" char* ResourceMgr_LoadPlayerAnimByName(const char* animPath) { - auto anim = std::static_pointer_cast(GetResourceByNameHandlingMQ(animPath)); + auto anim = std::static_pointer_cast(GetResourceByNameHandlingMQ(animPath)); return (char*)&anim->limbRotData[0]; } @@ -1201,7 +1201,7 @@ extern "C" void ResourceMgr_PushCurrentDirectory(char* path) extern "C" Gfx* ResourceMgr_LoadGfxByName(const char* path) { - auto res = std::static_pointer_cast(GetResourceByNameHandlingMQ(path)); + auto res = std::static_pointer_cast(GetResourceByNameHandlingMQ(path)); return (Gfx*)&res->Instructions[0]; } @@ -1215,8 +1215,8 @@ std::unordered_map> origi // Attention! This is primarily for cosmetics & bug fixes. For things like mods and model replacement you should be using OTRs // instead (When that is available). Index can be found using the commented out section below. extern "C" void ResourceMgr_PatchGfxByName(const char* path, const char* patchName, int index, Gfx instruction) { - auto res = std::static_pointer_cast( - Ship::Context::GetInstance()->GetResourceManager()->LoadResource(path)); + auto res = std::static_pointer_cast( + LUS::Context::GetInstance()->GetResourceManager()->LoadResource(path)); // Leaving this here for people attempting to find the correct Dlist index to patch /*if (strcmp("__OTR__objects/object_gi_longsword/gGiBiggoronSwordDL", path) == 0) { @@ -1250,8 +1250,8 @@ extern "C" void ResourceMgr_PatchGfxByName(const char* path, const char* patchNa extern "C" void ResourceMgr_UnpatchGfxByName(const char* path, const char* patchName) { if (originalGfx.contains(path) && originalGfx[path].contains(patchName)) { - auto res = std::static_pointer_cast( - Ship::Context::GetInstance()->GetResourceManager()->LoadResource(path)); + auto res = std::static_pointer_cast( + LUS::Context::GetInstance()->GetResourceManager()->LoadResource(path)); Gfx* gfx = (Gfx*)&res->Instructions[originalGfx[path][patchName].index]; *gfx = originalGfx[path][patchName].instruction; @@ -1262,13 +1262,13 @@ extern "C" void ResourceMgr_UnpatchGfxByName(const char* path, const char* patch extern "C" char* ResourceMgr_LoadArrayByName(const char* path) { - auto res = std::static_pointer_cast(GetResourceByNameHandlingMQ(path)); + auto res = std::static_pointer_cast(GetResourceByNameHandlingMQ(path)); return (char*)res->Scalars.data(); } extern "C" char* ResourceMgr_LoadArrayByNameAsVec3s(const char* path) { - auto res = std::static_pointer_cast(GetResourceByNameHandlingMQ(path)); + auto res = std::static_pointer_cast(GetResourceByNameHandlingMQ(path)); // if (res->CachedGameAsset != nullptr) // return (char*)res->CachedGameAsset; @@ -1311,7 +1311,7 @@ extern "C" SoundFontSample* ReadCustomSample(const char* path) { ExtensionEntry entry = ExtensionCache[path]; - auto sampleRaw = Ship::Context::GetInstance()->GetResourceManager()->LoadFile(entry.path); + auto sampleRaw = LUS::Context::GetInstance()->GetResourceManager()->LoadFile(entry.path); uint32_t* strem = (uint32_t*)sampleRaw->Buffer.get(); uint8_t* strem2 = (uint8_t*)strem; @@ -1402,7 +1402,7 @@ extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(const char* path, Skel bool isAlt = CVarGetInteger("gAltAssets", 0); if (isAlt) { - pathStr = Ship::Resource::gAltAssetPrefix + pathStr; + pathStr = LUS::Resource::gAltAssetPrefix + pathStr; } SkeletonHeader* skelHeader = (SkeletonHeader*) GetResourceDataByName(pathStr.c_str()); @@ -1416,7 +1416,7 @@ extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(const char* path, Skel // Therefore we can take this oppurtunity to take note of the Skeleton that is created... if (skelAnime != nullptr) { auto stringPath = std::string(path); - Ship::SkeletonPatcher::RegisterSkeleton(stringPath, skelAnime); + LUS::SkeletonPatcher::RegisterSkeleton(stringPath, skelAnime); } return skelHeader; @@ -1424,12 +1424,12 @@ extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(const char* path, Skel extern "C" void ResourceMgr_UnregisterSkeleton(SkelAnime* skelAnime) { if (skelAnime != nullptr) - Ship::SkeletonPatcher::UnregisterSkeleton(skelAnime); + LUS::SkeletonPatcher::UnregisterSkeleton(skelAnime); } extern "C" void ResourceMgr_ClearSkeletons(SkelAnime* skelAnime) { if (skelAnime != nullptr) - Ship::SkeletonPatcher::ClearSkeletons(); + LUS::SkeletonPatcher::ClearSkeletons(); } extern "C" s32* ResourceMgr_LoadCSByName(const char* path) { @@ -1437,7 +1437,7 @@ extern "C" s32* ResourceMgr_LoadCSByName(const char* path) { } std::filesystem::path GetSaveFile(std::shared_ptr Conf) { - const std::string fileName = Conf->getString("Game.SaveName", Ship::Context::GetPathRelativeToAppDirectory("oot_save.sav")); + const std::string fileName = Conf->getString("Game.SaveName", LUS::Context::GetPathRelativeToAppDirectory("oot_save.sav")); std::filesystem::path saveFile = std::filesystem::absolute(fileName); if (!exists(saveFile.parent_path())) { @@ -1576,7 +1576,7 @@ extern "C" uint32_t OTRGetCurrentHeight() { } extern "C" void OTRControllerCallback(uint8_t rumble, uint8_t ledColor) { - auto controlDeck = Ship::Context::GetInstance()->GetControlDeck(); + auto controlDeck = LUS::Context::GetInstance()->GetControlDeck(); for (int i = 0; i < controlDeck->GetNumConnectedPorts(); ++i) { auto physicalDevice = controlDeck->GetDeviceFromPortIndex(i); @@ -1639,7 +1639,7 @@ extern "C" void AudioPlayer_Play(const uint8_t* buf, uint32_t len) { } extern "C" int Controller_ShouldRumble(size_t slot) { - auto controlDeck = Ship::Context::GetInstance()->GetControlDeck(); + auto controlDeck = LUS::Context::GetInstance()->GetControlDeck(); if (slot < controlDeck->GetNumConnectedPorts()) { auto physicalDevice = controlDeck->GetDeviceFromPortIndex(slot); @@ -1653,19 +1653,19 @@ extern "C" int Controller_ShouldRumble(size_t slot) { } extern "C" void Controller_BlockGameInput() { - auto controlDeck = Ship::Context::GetInstance()->GetControlDeck(); + auto controlDeck = LUS::Context::GetInstance()->GetControlDeck(); controlDeck->BlockGameInput(); } extern "C" void Controller_UnblockGameInput() { - auto controlDeck = Ship::Context::GetInstance()->GetControlDeck(); + auto controlDeck = LUS::Context::GetInstance()->GetControlDeck(); controlDeck->UnblockGameInput(); } extern "C" void Hooks_ExecuteAudioInit() { - Ship::ExecuteHooks(); + LUS::ExecuteHooks(); } extern "C" void* getN64WeirdFrame(s32 i) { @@ -1985,12 +1985,12 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) { } extern "C" void Overlay_DisplayText(float duration, const char* text) { - Ship::GetGameOverlay()->TextDrawNotification(duration, true, text); + LUS::GetGameOverlay()->TextDrawNotification(duration, true, text); } extern "C" void Overlay_DisplayText_Seconds(int seconds, const char* text) { float duration = seconds * OTRGlobals::Instance->GetInterpolationFPS() * 0.05; - Ship::GetGameOverlay()->TextDrawNotification(duration, true, text); + LUS::GetGameOverlay()->TextDrawNotification(duration, true, text); } extern "C" void Entrance_ClearEntranceTrackingData(void) { diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index 41c0ed364..e1d448af8 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -19,7 +19,7 @@ class OTRGlobals public: static OTRGlobals* Instance; - std::shared_ptr context; + std::shared_ptr context; std::shared_ptr gSaveStateMgr; std::shared_ptr gRandomizer; diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp index 8138d07e7..df4fe8ff0 100644 --- a/soh/soh/SaveManager.cpp +++ b/soh/soh/SaveManager.cpp @@ -41,7 +41,7 @@ void SaveManager::ReadSaveFile(std::filesystem::path savePath, uintptr_t addr, v } std::filesystem::path SaveManager::GetFileName(int fileNum) { - const std::filesystem::path sSavePath(Ship::Context::GetPathRelativeToAppDirectory("Save")); + const std::filesystem::path sSavePath(LUS::Context::GetPathRelativeToAppDirectory("Save")); return sSavePath / ("file" + std::to_string(fileNum + 1) + ".sav"); } @@ -342,11 +342,11 @@ void SaveManager::SaveRandomizer(SaveContext* saveContext) { } void SaveManager::Init() { - const std::filesystem::path sSavePath(Ship::Context::GetPathRelativeToAppDirectory("Save")); + const std::filesystem::path sSavePath(LUS::Context::GetPathRelativeToAppDirectory("Save")); const std::filesystem::path sGlobalPath = sSavePath / std::string("global.sav"); - auto sOldSavePath = Ship::Context::GetPathRelativeToAppDirectory("oot_save.sav"); - auto sOldBackupSavePath = Ship::Context::GetPathRelativeToAppDirectory("oot_save.bak"); - Ship::RegisterHook([this]() { ThreadPoolWait(); }); + auto sOldSavePath = LUS::Context::GetPathRelativeToAppDirectory("oot_save.sav"); + auto sOldBackupSavePath = LUS::Context::GetPathRelativeToAppDirectory("oot_save.bak"); + LUS::RegisterHook([this]() { ThreadPoolWait(); }); GameInteractor::Instance->RegisterGameHook([this](uint32_t fileNum) { ThreadPoolWait(); }); // If the save directory does not exist, create it @@ -771,7 +771,7 @@ void SaveManager::SaveGlobal() { globalBlock["zTargetSetting"] = gSaveContext.zTargetSetting; globalBlock["language"] = gSaveContext.language; - const std::filesystem::path sSavePath(Ship::Context::GetPathRelativeToAppDirectory("Save")); + const std::filesystem::path sSavePath(LUS::Context::GetPathRelativeToAppDirectory("Save")); const std::filesystem::path sGlobalPath = sSavePath / std::string("global.sav"); std::ofstream output(sGlobalPath); @@ -2165,7 +2165,7 @@ extern "C" void Save_SaveGlobal(void) { extern "C" void Save_LoadFile(void) { SaveManager::Instance->LoadFile(gSaveContext.fileNum); - Ship::ExecuteHooks(gSaveContext.fileNum); + LUS::ExecuteHooks(gSaveContext.fileNum); } extern "C" void Save_AddLoadFunction(char* name, int version, SaveManager::LoadFunc func) { @@ -2186,7 +2186,7 @@ extern "C" void Save_CopyFile(int from, int to) { extern "C" void Save_DeleteFile(int fileNum) { SaveManager::Instance->DeleteZeldaFile(fileNum); - Ship::ExecuteHooks(fileNum); + LUS::ExecuteHooks(fileNum); } extern "C" u32 Save_Exist(int fileNum) { diff --git a/soh/soh/UIWidgets.cpp b/soh/soh/UIWidgets.cpp index 34a8febbe..30a6f6837 100644 --- a/soh/soh/UIWidgets.cpp +++ b/soh/soh/UIWidgets.cpp @@ -206,7 +206,7 @@ namespace UIWidgets { bool val = (bool)CVarGetInteger(cvarName, defaultValue); if (CustomCheckbox(text, &val, disabled, disabledGraphic)) { CVarSetInteger(cvarName, val); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); changed = true; } @@ -246,7 +246,7 @@ namespace UIWidgets { CVarSetInteger(cvarName, i); selected = i; changed = true; - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } } } @@ -259,7 +259,7 @@ namespace UIWidgets { if (disabledValue >= 0 && selected != disabledValue) { CVarSetInteger(cvarName, disabledValue); changed = true; - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } } @@ -348,7 +348,7 @@ namespace UIWidgets { if (changed) { CVarSetInteger(cvarName, val); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } return changed; @@ -424,7 +424,7 @@ namespace UIWidgets { if (changed) { CVarSetFloat(cvarName, val); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); } return changed; @@ -471,7 +471,7 @@ namespace UIWidgets { int val = CVarGetInteger(cvarName, 0); if (ImGui::RadioButton(make_invisible.c_str(), id == val)) { CVarSetInteger(cvarName, id); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); ret = true; } ImGui::SameLine(); @@ -498,7 +498,7 @@ namespace UIWidgets { CVarSetColor(cvarName, colorsRGBA); CVarSetInteger(Cvar_RBM.c_str(), 0); //On click disable rainbow mode. - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); changed = true; } Tooltip("Revert colors to the game's original colors (GameCube version)\nOverwrites previously chosen color"); @@ -523,7 +523,7 @@ namespace UIWidgets { NewColors.b = fmin(fmax(colors->z * 255, 0), 255); CVarSetColor(cvarName, NewColors); CVarSetInteger(Cvar_RBM.c_str(), 0); // On click disable rainbow mode. - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); changed = true; } Tooltip("Chooses a random color\nOverwrites previously chosen color"); @@ -584,7 +584,7 @@ namespace UIWidgets { colors.a = 255.0; CVarSetColor(cvarName, colors); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); changed = true; } } @@ -600,7 +600,7 @@ namespace UIWidgets { colors.a = ColorRGBA.w * 255.0; CVarSetColor(cvarName, colors); - Ship::RequestCvarSaveOnNextTick(); + LUS::RequestCvarSaveOnNextTick(); changed = true; } } diff --git a/soh/soh/resource/importer/AnimationFactory.cpp b/soh/soh/resource/importer/AnimationFactory.cpp index 5a6a02f8b..6a7b47799 100644 --- a/soh/soh/resource/importer/AnimationFactory.cpp +++ b/soh/soh/resource/importer/AnimationFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/Animation.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr AnimationFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr AnimationFactory::ReadResource(std::shared_ptr reader, std::shared_ptr resource) { +void LUS::AnimationFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr animation = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, animation); @@ -102,4 +102,4 @@ void Ship::AnimationFactoryV0::ParseFileBinary(std::shared_ptr rea SPDLOG_DEBUG("BEYTAH ANIMATION?!"); } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/AnimationFactory.h b/soh/soh/resource/importer/AnimationFactory.h index c5883305e..6323e988c 100644 --- a/soh/soh/resource/importer/AnimationFactory.h +++ b/soh/soh/resource/importer/AnimationFactory.h @@ -3,7 +3,7 @@ #include "Resource.h" #include "ResourceFactory.h" -namespace Ship { +namespace LUS { class AnimationFactory : public ResourceFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -15,4 +15,4 @@ class AnimationFactoryV0 : public ResourceVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/AudioSampleFactory.cpp b/soh/soh/resource/importer/AudioSampleFactory.cpp index ac338df11..a04734f45 100644 --- a/soh/soh/resource/importer/AudioSampleFactory.cpp +++ b/soh/soh/resource/importer/AudioSampleFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/AudioSample.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr AudioSampleFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr AudioSampleFactory::ReadResource(std::shared_ptr reader, +void LUS::AudioSampleFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr audioSample = std::static_pointer_cast(resource); @@ -67,7 +67,7 @@ void Ship::AudioSampleFactoryV0::ParseFileBinary(std::shared_ptr r audioSample->book.book = audioSample->bookData.data(); audioSample->sample.book = &audioSample->book; } -} // namespace Ship +} // namespace LUS /* @@ -90,7 +90,7 @@ extern "C" SoundFontSample* ReadCustomSample(const char* path) { ExtensionEntry entry = ExtensionCache[path]; - auto sampleRaw = Ship::Context::GetInstance()->GetResourceManager()->LoadFile(entry.path); + auto sampleRaw = LUS::Context::GetInstance()->GetResourceManager()->LoadFile(entry.path); uint32_t* strem = (uint32_t*)sampleRaw->Buffer.get(); uint8_t* strem2 = (uint8_t*)strem; diff --git a/soh/soh/resource/importer/AudioSampleFactory.h b/soh/soh/resource/importer/AudioSampleFactory.h index 582bb9baa..79b028860 100644 --- a/soh/soh/resource/importer/AudioSampleFactory.h +++ b/soh/soh/resource/importer/AudioSampleFactory.h @@ -3,7 +3,7 @@ #include "Resource.h" #include "ResourceFactory.h" -namespace Ship { +namespace LUS { class AudioSampleFactory : public ResourceFactory { public: @@ -17,4 +17,4 @@ class AudioSampleFactoryV0 : public ResourceVersionFactory public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/AudioSequenceFactory.cpp b/soh/soh/resource/importer/AudioSequenceFactory.cpp index 02edb1805..20cb7fc18 100644 --- a/soh/soh/resource/importer/AudioSequenceFactory.cpp +++ b/soh/soh/resource/importer/AudioSequenceFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/AudioSequence.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr AudioSequenceFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -26,7 +26,7 @@ std::shared_ptr AudioSequenceFactory::ReadResource(std::shared_ptr reader, +void LUS::AudioSequenceFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr audioSequence = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, audioSequence); @@ -50,4 +50,4 @@ void Ship::AudioSequenceFactoryV0::ParseFileBinary(std::shared_ptr audioSequence->sequence.fonts[i] = reader->ReadUByte(); } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/AudioSequenceFactory.h b/soh/soh/resource/importer/AudioSequenceFactory.h index 21d45ef62..402f8788c 100644 --- a/soh/soh/resource/importer/AudioSequenceFactory.h +++ b/soh/soh/resource/importer/AudioSequenceFactory.h @@ -3,7 +3,7 @@ #include "Resource.h" #include "ResourceFactory.h" -namespace Ship { +namespace LUS { class AudioSequenceFactory : public ResourceFactory { public: @@ -17,4 +17,4 @@ class AudioSequenceFactoryV0 : public ResourceVersionFactory public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/AudioSoundFontFactory.cpp b/soh/soh/resource/importer/AudioSoundFontFactory.cpp index 7ad588417..9dc1d38c5 100644 --- a/soh/soh/resource/importer/AudioSoundFontFactory.cpp +++ b/soh/soh/resource/importer/AudioSoundFontFactory.cpp @@ -3,7 +3,7 @@ #include "spdlog/spdlog.h" #include "libultraship/libultraship.h" -namespace Ship { +namespace LUS { std::shared_ptr AudioSoundFontFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -27,7 +27,7 @@ std::shared_ptr AudioSoundFontFactory::ReadResource(std::shared_ptr reader, +void LUS::AudioSoundFontFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr audioSoundFont = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, audioSoundFont); @@ -87,7 +87,7 @@ void Ship::AudioSoundFontFactoryV0::ParseFileBinary(std::shared_ptrGetResourceManager()->LoadResourceProcess(sampleFileName.c_str()); + auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str()); drum.sound.sample = static_cast(res ? res->GetPointer() : nullptr); } @@ -131,7 +131,7 @@ void Ship::AudioSoundFontFactoryV0::ParseFileBinary(std::shared_ptrReadInt8(); std::string sampleFileName = reader->ReadString(); instrument.lowNotesSound.tuning = reader->ReadFloat(); - auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str()); + auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str()); instrument.lowNotesSound.sample = static_cast(res ? res->GetPointer() : nullptr); } else { instrument.lowNotesSound.sample = nullptr; @@ -143,7 +143,7 @@ void Ship::AudioSoundFontFactoryV0::ParseFileBinary(std::shared_ptrReadInt8(); std::string sampleFileName = reader->ReadString(); instrument.normalNotesSound.tuning = reader->ReadFloat(); - auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str()); + auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str()); instrument.normalNotesSound.sample = static_cast(res ? res->GetPointer() : nullptr); } else { instrument.normalNotesSound.sample = nullptr; @@ -155,7 +155,7 @@ void Ship::AudioSoundFontFactoryV0::ParseFileBinary(std::shared_ptrReadInt8(); std::string sampleFileName = reader->ReadString(); instrument.highNotesSound.tuning = reader->ReadFloat(); - auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str()); + auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str()); instrument.highNotesSound.sample = static_cast(res ? res->GetPointer() : nullptr); } else { instrument.highNotesSound.sample = nullptr; @@ -180,7 +180,7 @@ void Ship::AudioSoundFontFactoryV0::ParseFileBinary(std::shared_ptrReadInt8(); std::string sampleFileName = reader->ReadString(); soundEffect.tuning = reader->ReadFloat(); - auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str()); + auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str()); soundEffect.sample = static_cast(res ? res->GetPointer() : nullptr); } @@ -188,4 +188,4 @@ void Ship::AudioSoundFontFactoryV0::ParseFileBinary(std::shared_ptrsoundFont.soundEffects = audioSoundFont->soundEffects.data(); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/AudioSoundFontFactory.h b/soh/soh/resource/importer/AudioSoundFontFactory.h index 43b56d0d5..dc142a0e7 100644 --- a/soh/soh/resource/importer/AudioSoundFontFactory.h +++ b/soh/soh/resource/importer/AudioSoundFontFactory.h @@ -3,7 +3,7 @@ #include "Resource.h" #include "ResourceFactory.h" -namespace Ship { +namespace LUS { class AudioSoundFontFactory : public ResourceFactory { public: @@ -17,4 +17,4 @@ class AudioSoundFontFactoryV0 : public ResourceVersionFactory public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/BackgroundFactory.cpp b/soh/soh/resource/importer/BackgroundFactory.cpp index f57a403c8..4359ef952 100644 --- a/soh/soh/resource/importer/BackgroundFactory.cpp +++ b/soh/soh/resource/importer/BackgroundFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/Background.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr BackgroundFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -37,4 +37,4 @@ void BackgroundFactoryV0::ParseFileBinary(std::shared_ptr reader, background->Data.push_back(reader->ReadUByte()); } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/BackgroundFactory.h b/soh/soh/resource/importer/BackgroundFactory.h index 445ebe9b4..26ac35ee0 100644 --- a/soh/soh/resource/importer/BackgroundFactory.h +++ b/soh/soh/resource/importer/BackgroundFactory.h @@ -3,7 +3,7 @@ #include "resource/Resource.h" #include "resource/ResourceFactory.h" -namespace Ship { +namespace LUS { class BackgroundFactory : public ResourceFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -15,4 +15,4 @@ class BackgroundFactoryV0 : public ResourceVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/CollisionHeaderFactory.cpp b/soh/soh/resource/importer/CollisionHeaderFactory.cpp index a935ed7fd..afca936bc 100644 --- a/soh/soh/resource/importer/CollisionHeaderFactory.cpp +++ b/soh/soh/resource/importer/CollisionHeaderFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/CollisionHeader.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr CollisionHeaderFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr CollisionHeaderFactory::ReadResource(std::shared_ptr reader, +void LUS::CollisionHeaderFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr collisionHeader = std::static_pointer_cast(resource); diff --git a/soh/soh/resource/importer/CollisionHeaderFactory.h b/soh/soh/resource/importer/CollisionHeaderFactory.h index 85c4b0f70..65c4aa424 100644 --- a/soh/soh/resource/importer/CollisionHeaderFactory.h +++ b/soh/soh/resource/importer/CollisionHeaderFactory.h @@ -3,7 +3,7 @@ #include "Resource.h" #include "ResourceFactory.h" -namespace Ship { +namespace LUS { class CollisionHeaderFactory : public ResourceFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -15,4 +15,4 @@ class CollisionHeaderFactoryV0 : public ResourceVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/CutsceneFactory.cpp b/soh/soh/resource/importer/CutsceneFactory.cpp index 89372d8a5..8dccf821a 100644 --- a/soh/soh/resource/importer/CutsceneFactory.cpp +++ b/soh/soh/resource/importer/CutsceneFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/Cutscene.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr CutsceneFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -37,7 +37,7 @@ static inline uint32_t read_CMD_BBH(std::shared_ptr reader) { reader->Read((char*)&v, sizeof(uint32_t)); // swap the half word to match endianness - if (reader->GetEndianness() != Ship::Endianness::Native) { + if (reader->GetEndianness() != LUS::Endianness::Native) { uint8_t* b = (uint8_t*)&v; uint8_t tmp = b[2]; b[2] = b[3]; @@ -52,7 +52,7 @@ static inline uint32_t read_CMD_HBB(std::shared_ptr reader) { reader->Read((char*)&v, sizeof(uint32_t)); // swap the half word to match endianness - if (reader->GetEndianness() != Ship::Endianness::Native) { + if (reader->GetEndianness() != LUS::Endianness::Native) { uint8_t* b = (uint8_t*)&v; uint8_t tmp = b[0]; b[0] = b[1]; @@ -67,7 +67,7 @@ static inline uint32_t read_CMD_HH(std::shared_ptr reader) { reader->Read((char*)&v, sizeof(uint32_t)); // swap the half words to match endianness - if (reader->GetEndianness() != Ship::Endianness::Native) { + if (reader->GetEndianness() != LUS::Endianness::Native) { uint8_t* b = (uint8_t*)&v; uint8_t tmp = b[0]; b[0] = b[1]; @@ -80,7 +80,7 @@ static inline uint32_t read_CMD_HH(std::shared_ptr reader) { return v; } -void Ship::CutsceneFactoryV0::ParseFileBinary(std::shared_ptr reader, +void LUS::CutsceneFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr cutscene = std::static_pointer_cast(resource); @@ -469,4 +469,4 @@ void Ship::CutsceneFactoryV0::ParseFileBinary(std::shared_ptr read } } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/CutsceneFactory.h b/soh/soh/resource/importer/CutsceneFactory.h index 9bbc439f7..92402df99 100644 --- a/soh/soh/resource/importer/CutsceneFactory.h +++ b/soh/soh/resource/importer/CutsceneFactory.h @@ -3,7 +3,7 @@ #include "Resource.h" #include "ResourceFactory.h" -namespace Ship { +namespace LUS { class CutsceneFactory : public ResourceFactory { public: @@ -17,4 +17,4 @@ class CutsceneFactoryV0 : public ResourceVersionFactory public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/PathFactory.cpp b/soh/soh/resource/importer/PathFactory.cpp index 4d610deeb..aa227610d 100644 --- a/soh/soh/resource/importer/PathFactory.cpp +++ b/soh/soh/resource/importer/PathFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/Path.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr PathFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr PathFactory::ReadResource(std::shared_ptr reader, +void LUS::PathFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr path = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, path); @@ -54,4 +54,4 @@ void Ship::PathFactoryV0::ParseFileBinary(std::shared_ptr reader, path->pathData.push_back(pathDataEntry); } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/PathFactory.h b/soh/soh/resource/importer/PathFactory.h index c772679a7..ad1c68e95 100644 --- a/soh/soh/resource/importer/PathFactory.h +++ b/soh/soh/resource/importer/PathFactory.h @@ -3,7 +3,7 @@ #include "Resource.h" #include "ResourceFactory.h" -namespace Ship { +namespace LUS { class PathFactory : public ResourceFactory { public: @@ -17,4 +17,4 @@ class PathFactoryV0 : public ResourceVersionFactory public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/PlayerAnimationFactory.cpp b/soh/soh/resource/importer/PlayerAnimationFactory.cpp index 0822697fc..0db77d309 100644 --- a/soh/soh/resource/importer/PlayerAnimationFactory.cpp +++ b/soh/soh/resource/importer/PlayerAnimationFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/PlayerAnimation.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr PlayerAnimationFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -26,7 +26,7 @@ std::shared_ptr PlayerAnimationFactory::ReadResource(std::shared_ptr reader, +void LUS::PlayerAnimationFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr playerAnimation = std::static_pointer_cast(resource); @@ -39,4 +39,4 @@ void Ship::PlayerAnimationFactoryV0::ParseFileBinary(std::shared_ptrlimbRotData.push_back(reader->ReadInt16()); } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/PlayerAnimationFactory.h b/soh/soh/resource/importer/PlayerAnimationFactory.h index 1c57f80bb..a0fdf4a1b 100644 --- a/soh/soh/resource/importer/PlayerAnimationFactory.h +++ b/soh/soh/resource/importer/PlayerAnimationFactory.h @@ -3,7 +3,7 @@ #include "Resource.h" #include "ResourceFactory.h" -namespace Ship { +namespace LUS { class PlayerAnimationFactory : public ResourceFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -15,4 +15,4 @@ class PlayerAnimationFactoryV0 : public ResourceVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/SceneFactory.cpp b/soh/soh/resource/importer/SceneFactory.cpp index 8963bff03..3fd1abaf8 100644 --- a/soh/soh/resource/importer/SceneFactory.cpp +++ b/soh/soh/resource/importer/SceneFactory.cpp @@ -28,37 +28,37 @@ #include "soh/resource/importer/scenecommand/SetLightListFactory.h" #include "soh/resource/importer/scenecommand/SetMeshFactory.h" -namespace Ship { +namespace LUS { std::shared_ptr SceneFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { if (SceneFactory::sceneCommandFactories.empty()) { - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetLightingSettings] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetWind] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetExitList] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetTimeSettings] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetSkyboxModifier] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetEchoSettings] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetSoundSettings] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetSkyboxSettings] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetRoomBehavior] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetCsCamera] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetCameraSettings] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetRoomList] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetCollisionHeader] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetEntranceList] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetSpecialObjects] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetObjectList] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetStartPositionList] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetActorList] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetTransitionActorList] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::EndMarker] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetAlternateHeaders] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetPathways] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetCutscenes] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetLightList] = std::make_shared(); - SceneFactory::sceneCommandFactories[Ship::SceneCommandID::SetMesh] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetLightingSettings] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetWind] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetExitList] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetTimeSettings] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetSkyboxModifier] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetEchoSettings] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetSoundSettings] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetSkyboxSettings] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetRoomBehavior] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetCsCamera] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetCameraSettings] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetRoomList] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetCollisionHeader] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetEntranceList] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetSpecialObjects] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetObjectList] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetStartPositionList] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetActorList] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetTransitionActorList] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::EndMarker] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetAlternateHeaders] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetPathways] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetCutscenes] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetLightList] = std::make_shared(); + SceneFactory::sceneCommandFactories[LUS::SceneCommandID::SetMesh] = std::make_shared(); } auto resource = std::make_shared(resourceMgr, initData); @@ -124,4 +124,4 @@ std::shared_ptr SceneFactoryV0::ParseSceneCommand(std::shared_ptr< return result; } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/SceneFactory.h b/soh/soh/resource/importer/SceneFactory.h index ddbb330c9..16863edc4 100644 --- a/soh/soh/resource/importer/SceneFactory.h +++ b/soh/soh/resource/importer/SceneFactory.h @@ -6,7 +6,7 @@ #include "Resource.h" #include "ResourceFactory.h" -namespace Ship { +namespace LUS { class SceneFactory : public ResourceFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -27,4 +27,4 @@ class SceneFactoryV0 : public ResourceVersionFactory { protected: std::shared_ptr ParseSceneCommand(std::shared_ptr scene, std::shared_ptr reader, uint32_t index); }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/SkeletonFactory.cpp b/soh/soh/resource/importer/SkeletonFactory.cpp index 2431e262a..4741a3f2e 100644 --- a/soh/soh/resource/importer/SkeletonFactory.cpp +++ b/soh/soh/resource/importer/SkeletonFactory.cpp @@ -3,7 +3,7 @@ #include #include -namespace Ship { +namespace LUS { std::shared_ptr SkeletonFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -68,32 +68,32 @@ void SkeletonFactoryV0::ParseFileBinary(std::shared_ptr reader, skeleton->limbTable.push_back(limbPath); } - if (skeleton->type == Ship::SkeletonType::Curve) { + if (skeleton->type == LUS::SkeletonType::Curve) { skeleton->skeletonData.skelCurveLimbList.limbCount = skeleton->limbCount; skeleton->curveLimbArray.reserve(skeleton->skeletonData.skelCurveLimbList.limbCount); - } else if (skeleton->type == Ship::SkeletonType::Flex) { + } else if (skeleton->type == LUS::SkeletonType::Flex) { skeleton->skeletonData.flexSkeletonHeader.dListCount = skeleton->dListCount; } - if (skeleton->type == Ship::SkeletonType::Normal) { + if (skeleton->type == LUS::SkeletonType::Normal) { skeleton->skeletonData.skeletonHeader.limbCount = skeleton->limbCount; skeleton->standardLimbArray.reserve(skeleton->skeletonData.skeletonHeader.limbCount); - } else if (skeleton->type == Ship::SkeletonType::Flex) { + } else if (skeleton->type == LUS::SkeletonType::Flex) { skeleton->skeletonData.flexSkeletonHeader.sh.limbCount = skeleton->limbCount; skeleton->standardLimbArray.reserve(skeleton->skeletonData.flexSkeletonHeader.sh.limbCount); } for (size_t i = 0; i < skeleton->limbTable.size(); i++) { std::string limbStr = skeleton->limbTable[i]; - auto limb = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(limbStr.c_str()); + auto limb = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(limbStr.c_str()); skeleton->skeletonHeaderSegments.push_back(limb ? limb->GetPointer() : nullptr); } - if (skeleton->type == Ship::SkeletonType::Normal) { + if (skeleton->type == LUS::SkeletonType::Normal) { skeleton->skeletonData.skeletonHeader.segment = (void**)skeleton->skeletonHeaderSegments.data(); - } else if (skeleton->type == Ship::SkeletonType::Flex) { + } else if (skeleton->type == LUS::SkeletonType::Flex) { skeleton->skeletonData.flexSkeletonHeader.sh.segment = (void**)skeleton->skeletonHeaderSegments.data(); - } else if (skeleton->type == Ship::SkeletonType::Curve) { + } else if (skeleton->type == LUS::SkeletonType::Curve) { skeleton->skeletonData.skelCurveLimbList.limbs = (SkelCurveLimb**)skeleton->skeletonHeaderSegments.data(); } else { SPDLOG_ERROR("unknown skeleton type {}", (uint32_t)skeleton->type); @@ -142,7 +142,7 @@ void SkeletonFactoryV0::ParseFileXML(tinyxml2::XMLElement* reader, std::shared_p std::string limbName = child->Attribute("Path"); skel->limbTable.push_back(limbName); - auto limb = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(limbName.c_str()); + auto limb = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(limbName.c_str()); skel->skeletonHeaderSegments.push_back(limb ? limb->GetPointer() : nullptr); } @@ -154,4 +154,4 @@ void SkeletonFactoryV0::ParseFileXML(tinyxml2::XMLElement* reader, std::shared_p skel->skeletonData.flexSkeletonHeader.dListCount = skel->dListCount; } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/SkeletonFactory.h b/soh/soh/resource/importer/SkeletonFactory.h index bb898d7d3..580bff1fb 100644 --- a/soh/soh/resource/importer/SkeletonFactory.h +++ b/soh/soh/resource/importer/SkeletonFactory.h @@ -3,7 +3,7 @@ #include "Resource.h" #include "ResourceFactory.h" -namespace Ship { +namespace LUS { class SkeletonFactory : public ResourceFactory { public: @@ -21,5 +21,5 @@ class SkeletonFactoryV0 : public ResourceVersionFactory void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; void ParseFileXML(tinyxml2::XMLElement* reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/SkeletonLimbFactory.cpp b/soh/soh/resource/importer/SkeletonLimbFactory.cpp index 6b901963c..f4196c6be 100644 --- a/soh/soh/resource/importer/SkeletonLimbFactory.cpp +++ b/soh/soh/resource/importer/SkeletonLimbFactory.cpp @@ -3,7 +3,7 @@ #include "spdlog/spdlog.h" #include "libultraship/libultraship.h" -namespace Ship { +namespace LUS { std::shared_ptr SkeletonLimbFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -48,7 +48,7 @@ std::shared_ptr SkeletonLimbFactory::ReadResourceXML(std::shared_ptr reader, +void LUS::SkeletonLimbFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr skeletonLimb = std::static_pointer_cast(resource); @@ -126,7 +126,7 @@ void Ship::SkeletonLimbFactoryV0::ParseFileBinary(std::shared_ptr skeletonLimb->childIndex = reader->ReadUByte(); skeletonLimb->siblingIndex = reader->ReadUByte(); - if (skeletonLimb->limbType == Ship::LimbType::LOD) { + if (skeletonLimb->limbType == LUS::LimbType::LOD) { skeletonLimb->limbData.lodLimb.jointPos.x = skeletonLimb->transX; skeletonLimb->limbData.lodLimb.jointPos.y = skeletonLimb->transY; skeletonLimb->limbData.lodLimb.jointPos.z = skeletonLimb->transZ; @@ -134,19 +134,19 @@ void Ship::SkeletonLimbFactoryV0::ParseFileBinary(std::shared_ptr skeletonLimb->limbData.lodLimb.sibling = skeletonLimb->siblingIndex; if (skeletonLimb->dListPtr != "") { - auto dList = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->dListPtr.c_str()); + auto dList = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->dListPtr.c_str()); skeletonLimb->limbData.lodLimb.dLists[0] = (Gfx*)(dList ? dList->GetPointer() : nullptr); } else { skeletonLimb->limbData.lodLimb.dLists[0] = nullptr; } if (skeletonLimb->dList2Ptr != "") { - auto dList = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->dList2Ptr.c_str()); + auto dList = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->dList2Ptr.c_str()); skeletonLimb->limbData.lodLimb.dLists[1] = (Gfx*)(dList ? dList->GetPointer() : nullptr); } else { skeletonLimb->limbData.lodLimb.dLists[1] = nullptr; } - } else if (skeletonLimb->limbType == Ship::LimbType::Standard) { + } else if (skeletonLimb->limbType == LUS::LimbType::Standard) { skeletonLimb->limbData.standardLimb.jointPos.x = skeletonLimb->transX; skeletonLimb->limbData.standardLimb.jointPos.y = skeletonLimb->transY; skeletonLimb->limbData.standardLimb.jointPos.z = skeletonLimb->transZ; @@ -155,49 +155,49 @@ void Ship::SkeletonLimbFactoryV0::ParseFileBinary(std::shared_ptr skeletonLimb->limbData.standardLimb.dList = nullptr; if (!skeletonLimb->dListPtr.empty()) { - const auto dList = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->dListPtr.c_str()); + const auto dList = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->dListPtr.c_str()); skeletonLimb->limbData.standardLimb.dList = (Gfx*)(dList ? dList->GetPointer() : nullptr); } - } else if (skeletonLimb->limbType == Ship::LimbType::Curve) { + } else if (skeletonLimb->limbType == LUS::LimbType::Curve) { skeletonLimb->limbData.skelCurveLimb.firstChildIdx = skeletonLimb->childIndex; skeletonLimb->limbData.skelCurveLimb.nextLimbIdx = skeletonLimb->siblingIndex; skeletonLimb->limbData.skelCurveLimb.dList[0] = nullptr; skeletonLimb->limbData.skelCurveLimb.dList[1] = nullptr; if (!skeletonLimb->dListPtr.empty()) { - const auto dList = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->dListPtr.c_str()); + const auto dList = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->dListPtr.c_str()); skeletonLimb->limbData.skelCurveLimb.dList[0] = (Gfx*)(dList ? dList->GetPointer() : nullptr); } if (!skeletonLimb->dList2Ptr.empty()) { - const auto dList = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->dList2Ptr.c_str()); + const auto dList = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->dList2Ptr.c_str()); skeletonLimb->limbData.skelCurveLimb.dList[1] = (Gfx*)(dList ? dList->GetPointer() : nullptr); } - } else if (skeletonLimb->limbType == Ship::LimbType::Skin) { + } else if (skeletonLimb->limbType == LUS::LimbType::Skin) { skeletonLimb->limbData.skinLimb.jointPos.x = skeletonLimb->transX; skeletonLimb->limbData.skinLimb.jointPos.y = skeletonLimb->transY; skeletonLimb->limbData.skinLimb.jointPos.z = skeletonLimb->transZ; skeletonLimb->limbData.skinLimb.child = skeletonLimb->childIndex; skeletonLimb->limbData.skinLimb.sibling = skeletonLimb->siblingIndex; - if (skeletonLimb->skinSegmentType == Ship::ZLimbSkinType::SkinType_DList) { + if (skeletonLimb->skinSegmentType == LUS::ZLimbSkinType::SkinType_DList) { skeletonLimb->limbData.skinLimb.segmentType = static_cast(skeletonLimb->skinSegmentType); - } else if (skeletonLimb->skinSegmentType == Ship::ZLimbSkinType::SkinType_4) { + } else if (skeletonLimb->skinSegmentType == LUS::ZLimbSkinType::SkinType_4) { skeletonLimb->limbData.skinLimb.segmentType = 4; - } else if (skeletonLimb->skinSegmentType == Ship::ZLimbSkinType::SkinType_5) { + } else if (skeletonLimb->skinSegmentType == LUS::ZLimbSkinType::SkinType_5) { skeletonLimb->limbData.skinLimb.segmentType = 5; } else { skeletonLimb->limbData.skinLimb.segmentType = 0; } - if (skeletonLimb->skinSegmentType == Ship::ZLimbSkinType::SkinType_DList) { - auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->skinDList.c_str()); + if (skeletonLimb->skinSegmentType == LUS::ZLimbSkinType::SkinType_DList) { + auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->skinDList.c_str()); skeletonLimb->limbData.skinLimb.segment = res ? res->GetPointer() : nullptr; - } else if (skeletonLimb->skinSegmentType == Ship::ZLimbSkinType::SkinType_4) { + } else if (skeletonLimb->skinSegmentType == LUS::ZLimbSkinType::SkinType_4) { skeletonLimb->skinAnimLimbData.totalVtxCount = skeletonLimb->skinVtxCnt; skeletonLimb->skinAnimLimbData.limbModifCount = skeletonLimb->skinLimbModifCount; skeletonLimb->skinAnimLimbData.limbModifications = skeletonLimb->skinLimbModifArray.data(); - auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->skinDList2.c_str()); + auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(skeletonLimb->skinDList2.c_str()); skeletonLimb->skinAnimLimbData.dlist = (Gfx*)(res ? res->GetPointer() : nullptr); for (size_t i = 0; i < skeletonLimb->skinLimbModifArray.size(); i++) { @@ -256,7 +256,7 @@ void SkeletonLimbFactoryV0::ParseFileXML(tinyxml2::XMLElement* reader, std::shar limbData.lodLimb.jointPos.z = skelLimb->transZ; if (skelLimb->dListPtr != "") { - auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess((const char*)skelLimb->dListPtr.c_str()); + auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess((const char*)skelLimb->dListPtr.c_str()); limbData.lodLimb.dLists[0] = (Gfx*)(res ? res->GetPointer() : nullptr); } else { limbData.lodLimb.dLists[0] = nullptr; @@ -270,4 +270,4 @@ void SkeletonLimbFactoryV0::ParseFileXML(tinyxml2::XMLElement* reader, std::shar // skelLimb->dList2Ptr = reader->Attribute("DisplayList2"); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/SkeletonLimbFactory.h b/soh/soh/resource/importer/SkeletonLimbFactory.h index ba98b73c5..1d0204ab8 100644 --- a/soh/soh/resource/importer/SkeletonLimbFactory.h +++ b/soh/soh/resource/importer/SkeletonLimbFactory.h @@ -3,7 +3,7 @@ #include "Resource.h" #include "ResourceFactory.h" -namespace Ship { +namespace LUS { class SkeletonLimbFactory : public ResourceFactory { public: @@ -21,5 +21,5 @@ class SkeletonLimbFactoryV0 : public ResourceVersionFactory void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; void ParseFileXML(tinyxml2::XMLElement* reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/TextFactory.cpp b/soh/soh/resource/importer/TextFactory.cpp index ca71f8ec6..9dfb66dda 100644 --- a/soh/soh/resource/importer/TextFactory.cpp +++ b/soh/soh/resource/importer/TextFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/Text.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr TextFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -50,7 +50,7 @@ std::shared_ptr TextFactory::ReadResourceXML(std::shared_ptr reader, +void LUS::TextFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr text = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, text); @@ -92,4 +92,4 @@ void TextFactoryV0::ParseFileXML(tinyxml2::XMLElement* reader, std::shared_ptr reader, std::shared_ptr resource) override; void ParseFileXML(tinyxml2::XMLElement* reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/EndMarkerFactory.cpp b/soh/soh/resource/importer/scenecommand/EndMarkerFactory.cpp index fe54e6b4b..6d0483e73 100644 --- a/soh/soh/resource/importer/scenecommand/EndMarkerFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/EndMarkerFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/EndMarker.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr EndMarkerFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr EndMarkerFactory::ReadResource(std::shared_ptr reader, +void LUS::EndMarkerFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr endMarker = std::static_pointer_cast(resource); @@ -36,4 +36,4 @@ void Ship::EndMarkerFactoryV0::ParseFileBinary(std::shared_ptr rea // This has no data. } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/EndMarkerFactory.h b/soh/soh/resource/importer/scenecommand/EndMarkerFactory.h index f64d4ed5d..606153a95 100644 --- a/soh/soh/resource/importer/scenecommand/EndMarkerFactory.h +++ b/soh/soh/resource/importer/scenecommand/EndMarkerFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class EndMarkerFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class EndMarkerFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SceneCommandFactory.cpp b/soh/soh/resource/importer/scenecommand/SceneCommandFactory.cpp index 6da03e131..efa170761 100644 --- a/soh/soh/resource/importer/scenecommand/SceneCommandFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SceneCommandFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SceneCommand.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { void SceneCommandVersionFactory::ReadCommandId(std::shared_ptr command, std::shared_ptr reader) { command->cmdId = (SceneCommandID)reader->ReadInt32(); } diff --git a/soh/soh/resource/importer/scenecommand/SceneCommandFactory.h b/soh/soh/resource/importer/scenecommand/SceneCommandFactory.h index fd3a07dce..3ab89c5b7 100644 --- a/soh/soh/resource/importer/scenecommand/SceneCommandFactory.h +++ b/soh/soh/resource/importer/scenecommand/SceneCommandFactory.h @@ -5,11 +5,11 @@ #include "ResourceFactory.h" #include "soh/resource/type/scenecommand/SceneCommand.h" -namespace Ship { +namespace LUS { class SceneCommandFactory : public ResourceFactory {}; class SceneCommandVersionFactory : public ResourceVersionFactory { protected: void ReadCommandId(std::shared_ptr command, std::shared_ptr reader); }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetActorListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetActorListFactory.cpp index 226acb410..50eeb2247 100644 --- a/soh/soh/resource/importer/scenecommand/SetActorListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetActorListFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetActorList.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetActorListFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -26,7 +26,7 @@ std::shared_ptr SetActorListFactory::ReadResource(std::shared_ptr reader, +void LUS::SetActorListFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setActorList = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setActorList); @@ -51,4 +51,4 @@ void Ship::SetActorListFactoryV0::ParseFileBinary(std::shared_ptr } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetActorListFactory.h b/soh/soh/resource/importer/scenecommand/SetActorListFactory.h index e36038076..fa62241fc 100644 --- a/soh/soh/resource/importer/scenecommand/SetActorListFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetActorListFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetActorListFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetActorListFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetAlternateHeadersFactory.cpp b/soh/soh/resource/importer/scenecommand/SetAlternateHeadersFactory.cpp index f61e08917..b01b7f1fc 100644 --- a/soh/soh/resource/importer/scenecommand/SetAlternateHeadersFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetAlternateHeadersFactory.cpp @@ -3,7 +3,7 @@ #include "spdlog/spdlog.h" #include "libultraship/libultraship.h" -namespace Ship { +namespace LUS { std::shared_ptr SetAlternateHeadersFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -27,7 +27,7 @@ std::shared_ptr SetAlternateHeadersFactory::ReadResource(std::shared_p return resource; } -void Ship::SetAlternateHeadersFactoryV0::ParseFileBinary(std::shared_ptr reader, +void LUS::SetAlternateHeadersFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setAlternateHeaders = std::static_pointer_cast(resource); @@ -40,11 +40,11 @@ void Ship::SetAlternateHeadersFactoryV0::ParseFileBinary(std::shared_ptrnumHeaders; i++) { auto headerName = reader->ReadString(); if (!headerName.empty()) { - setAlternateHeaders->headers.push_back(std::static_pointer_cast(Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(headerName.c_str()))); + setAlternateHeaders->headers.push_back(std::static_pointer_cast(LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(headerName.c_str()))); } else { setAlternateHeaders->headers.push_back(nullptr); } } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetAlternateHeadersFactory.h b/soh/soh/resource/importer/scenecommand/SetAlternateHeadersFactory.h index e37e344a4..c9dd3f26c 100644 --- a/soh/soh/resource/importer/scenecommand/SetAlternateHeadersFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetAlternateHeadersFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetAlternateHeadersFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetAlternateHeadersFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetCameraSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetCameraSettingsFactory.cpp index 8615cb04e..88f8522d4 100644 --- a/soh/soh/resource/importer/scenecommand/SetCameraSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetCameraSettingsFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetCameraSettings.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetCameraSettingsFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetCameraSettingsFactory::ReadResource(std::shared_ptr return resource; } -void Ship::SetCameraSettingsFactoryV0::ParseFileBinary(std::shared_ptr reader, +void LUS::SetCameraSettingsFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setCameraSettings = std::static_pointer_cast(resource); @@ -37,4 +37,4 @@ void Ship::SetCameraSettingsFactoryV0::ParseFileBinary(std::shared_ptrsettings.worldMapArea = reader->ReadInt32(); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetCameraSettingsFactory.h b/soh/soh/resource/importer/scenecommand/SetCameraSettingsFactory.h index a87710bea..0271c62f0 100644 --- a/soh/soh/resource/importer/scenecommand/SetCameraSettingsFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetCameraSettingsFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetCameraSettingsFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetCameraSettingsFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetCollisionHeaderFactory.cpp b/soh/soh/resource/importer/scenecommand/SetCollisionHeaderFactory.cpp index 9c6fb333e..aa7a7a104 100644 --- a/soh/soh/resource/importer/scenecommand/SetCollisionHeaderFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetCollisionHeaderFactory.cpp @@ -3,7 +3,7 @@ #include "libultraship/libultraship.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetCollisionHeaderFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -26,7 +26,7 @@ std::shared_ptr SetCollisionHeaderFactory::ReadResource(std::shared_pt return resource; } -void Ship::SetCollisionHeaderFactoryV0::ParseFileBinary(std::shared_ptr reader, +void LUS::SetCollisionHeaderFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setCollisionHeader = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setCollisionHeader); @@ -34,7 +34,7 @@ void Ship::SetCollisionHeaderFactoryV0::ParseFileBinary(std::shared_ptrfileName = reader->ReadString(); - setCollisionHeader->collisionHeader = std::static_pointer_cast(Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(setCollisionHeader->fileName.c_str())); + setCollisionHeader->collisionHeader = std::static_pointer_cast(LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(setCollisionHeader->fileName.c_str())); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetCollisionHeaderFactory.h b/soh/soh/resource/importer/scenecommand/SetCollisionHeaderFactory.h index 0d98f31a2..361e0636b 100644 --- a/soh/soh/resource/importer/scenecommand/SetCollisionHeaderFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetCollisionHeaderFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetCollisionHeaderFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetCollisionHeaderFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetCsCameraFactory.cpp b/soh/soh/resource/importer/scenecommand/SetCsCameraFactory.cpp index 93ca5a68e..e83d60749 100644 --- a/soh/soh/resource/importer/scenecommand/SetCsCameraFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetCsCameraFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetCsCamera.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetCsCameraFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetCsCameraFactory::ReadResource(std::shared_ptr reader, +void LUS::SetCsCameraFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setCsCamera = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setCsCamera); @@ -38,4 +38,4 @@ void Ship::SetCsCameraFactoryV0::ParseFileBinary(std::shared_ptr r // OTRTODO: FINISH! } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetCsCameraFactory.h b/soh/soh/resource/importer/scenecommand/SetCsCameraFactory.h index 69a39eb81..71a8a6a7d 100644 --- a/soh/soh/resource/importer/scenecommand/SetCsCameraFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetCsCameraFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetCsCameraFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetCsCameraFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetCutscenesFactory.cpp b/soh/soh/resource/importer/scenecommand/SetCutscenesFactory.cpp index dd6336eba..37e374282 100644 --- a/soh/soh/resource/importer/scenecommand/SetCutscenesFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetCutscenesFactory.cpp @@ -3,7 +3,7 @@ #include #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetCutscenesFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -27,7 +27,7 @@ std::shared_ptr SetCutscenesFactory::ReadResource(std::shared_ptr reader, +void LUS::SetCutscenesFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setCutscenes = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setCutscenes); @@ -35,7 +35,7 @@ void Ship::SetCutscenesFactoryV0::ParseFileBinary(std::shared_ptr ReadCommandId(setCutscenes, reader); setCutscenes->fileName = reader->ReadString(); - setCutscenes->cutscene = std::static_pointer_cast(Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(setCutscenes->fileName.c_str())); + setCutscenes->cutscene = std::static_pointer_cast(LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(setCutscenes->fileName.c_str())); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetCutscenesFactory.h b/soh/soh/resource/importer/scenecommand/SetCutscenesFactory.h index da594ed8a..86987e59e 100644 --- a/soh/soh/resource/importer/scenecommand/SetCutscenesFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetCutscenesFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetCutscenesFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetCutscenesFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetEchoSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetEchoSettingsFactory.cpp index 7d1503091..5fa20f12f 100644 --- a/soh/soh/resource/importer/scenecommand/SetEchoSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetEchoSettingsFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetEchoSettings.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetEchoSettingsFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetEchoSettingsFactory::ReadResource(std::shared_ptr reader, +void LUS::SetEchoSettingsFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setEchoSettings = std::static_pointer_cast(resource); @@ -36,4 +36,4 @@ void Ship::SetEchoSettingsFactoryV0::ParseFileBinary(std::shared_ptrsettings.echo = reader->ReadInt8(); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetEchoSettingsFactory.h b/soh/soh/resource/importer/scenecommand/SetEchoSettingsFactory.h index 02e01713f..1df65e56b 100644 --- a/soh/soh/resource/importer/scenecommand/SetEchoSettingsFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetEchoSettingsFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetEchoSettingsFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetEchoSettingsFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetEntranceListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetEntranceListFactory.cpp index 0fcb989c7..e75ccec03 100644 --- a/soh/soh/resource/importer/scenecommand/SetEntranceListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetEntranceListFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetEntranceList.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetEntranceListFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetEntranceListFactory::ReadResource(std::shared_ptr reader, +void LUS::SetEntranceListFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setEntranceList = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setEntranceList); @@ -44,4 +44,4 @@ void Ship::SetEntranceListFactoryV0::ParseFileBinary(std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetEntranceListFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetExitListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetExitListFactory.cpp index a5a033437..ca49e5f18 100644 --- a/soh/soh/resource/importer/scenecommand/SetExitListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetExitListFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetExitList.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetExitListFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetExitListFactory::ReadResource(std::shared_ptr reader, +void LUS::SetExitListFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setExitList = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setExitList); @@ -39,4 +39,4 @@ void Ship::SetExitListFactoryV0::ParseFileBinary(std::shared_ptr r } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetExitListFactory.h b/soh/soh/resource/importer/scenecommand/SetExitListFactory.h index 1cebd4441..05afafbc9 100644 --- a/soh/soh/resource/importer/scenecommand/SetExitListFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetExitListFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetExitListFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetExitListFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetLightListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetLightListFactory.cpp index 0d47b84b5..9b6aef5b0 100644 --- a/soh/soh/resource/importer/scenecommand/SetLightListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetLightListFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetLightList.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetLightListFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -26,7 +26,7 @@ std::shared_ptr SetLightListFactory::ReadResource(std::shared_ptr reader, +void LUS::SetLightListFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setLightList = std::static_pointer_cast(resource); @@ -56,4 +56,4 @@ void Ship::SetLightListFactoryV0::ParseFileBinary(std::shared_ptr } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetLightListFactory.h b/soh/soh/resource/importer/scenecommand/SetLightListFactory.h index 12805c95d..aa4cbeb6c 100644 --- a/soh/soh/resource/importer/scenecommand/SetLightListFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetLightListFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetLightListFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetLightListFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetLightingSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetLightingSettingsFactory.cpp index 3acf90b4b..9f49d3006 100644 --- a/soh/soh/resource/importer/scenecommand/SetLightingSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetLightingSettingsFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetLightingSettings.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetLightingSettingsFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetLightingSettingsFactory::ReadResource(std::shared_p return resource; } -void Ship::SetLightingSettingsFactoryV0::ParseFileBinary(std::shared_ptr reader, +void LUS::SetLightingSettingsFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setLightingSettings = std::static_pointer_cast(resource); @@ -68,4 +68,4 @@ void Ship::SetLightingSettingsFactoryV0::ParseFileBinary(std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetLightingSettingsFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetMeshFactory.cpp b/soh/soh/resource/importer/scenecommand/SetMeshFactory.cpp index 132319b8b..85967739d 100644 --- a/soh/soh/resource/importer/scenecommand/SetMeshFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetMeshFactory.cpp @@ -3,7 +3,7 @@ #include "spdlog/spdlog.h" #include "libultraship/libultraship.h" -namespace Ship { +namespace LUS { std::shared_ptr SetMeshFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -27,7 +27,7 @@ std::shared_ptr SetMeshFactory::ReadResource(std::shared_ptr reader, +void LUS::SetMeshFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setMesh = std::static_pointer_cast(resource); @@ -65,8 +65,8 @@ void Ship::SetMeshFactoryV0::ParseFileBinary(std::shared_ptr reade std::string meshOpa = reader->ReadString(); std::string meshXlu = reader->ReadString(); - auto opaRes = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(meshOpa.c_str()); - auto xluRes = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(meshXlu.c_str()); + auto opaRes = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(meshOpa.c_str()); + auto xluRes = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(meshXlu.c_str()); dlist.opa = meshOpa != "" ? (Gfx*)(opaRes ? opaRes->GetPointer() : nullptr) : 0; dlist.xlu = meshXlu != "" ? (Gfx*)(xluRes ? xluRes->GetPointer() : nullptr) : 0; @@ -78,8 +78,8 @@ void Ship::SetMeshFactoryV0::ParseFileBinary(std::shared_ptr reade std::string imgOpa = reader->ReadString(); std::string imgXlu = reader->ReadString(); - auto opaRes = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(imgOpa.c_str()); - auto xluRes = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(imgXlu.c_str()); + auto opaRes = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(imgOpa.c_str()); + auto xluRes = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(imgXlu.c_str()); pType.opa = imgOpa != "" ? (Gfx*)(opaRes ? opaRes->GetPointer() : nullptr) : 0; pType.xlu = imgXlu != "" ? (Gfx*)(xluRes ? xluRes->GetPointer() : nullptr) : 0; @@ -126,8 +126,8 @@ void Ship::SetMeshFactoryV0::ParseFileBinary(std::shared_ptr reade std::string meshOpa = reader->ReadString(); std::string meshXlu = reader->ReadString(); - opaRes = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(meshOpa.c_str()); - xluRes = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(meshXlu.c_str()); + opaRes = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(meshOpa.c_str()); + xluRes = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(meshXlu.c_str()); pType.opa = meshOpa != "" ? (Gfx*)(opaRes ? opaRes->GetPointer() : nullptr) : 0; pType.xlu = meshXlu != "" ? (Gfx*)(xluRes ? xluRes->GetPointer() : nullptr) : 0; @@ -144,8 +144,8 @@ void Ship::SetMeshFactoryV0::ParseFileBinary(std::shared_ptr reade std::string meshOpa = reader->ReadString(); std::string meshXlu = reader->ReadString(); - auto opaRes = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(meshOpa.c_str()); - auto xluRes = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(meshXlu.c_str()); + auto opaRes = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(meshOpa.c_str()); + auto xluRes = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(meshXlu.c_str()); dlist.opa = meshOpa != "" ? (Gfx*)(opaRes ? opaRes->GetPointer() : nullptr) : 0; dlist.xlu = meshXlu != "" ? (Gfx*)(xluRes ? xluRes->GetPointer() : nullptr) : 0; @@ -167,4 +167,4 @@ void Ship::SetMeshFactoryV0::ParseFileBinary(std::shared_ptr reade } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetMeshFactory.h b/soh/soh/resource/importer/scenecommand/SetMeshFactory.h index 4ba2d91b4..17eac6437 100644 --- a/soh/soh/resource/importer/scenecommand/SetMeshFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetMeshFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetMeshFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetMeshFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetObjectListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetObjectListFactory.cpp index d9a8a83f0..9a4801dae 100644 --- a/soh/soh/resource/importer/scenecommand/SetObjectListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetObjectListFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetObjectList.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetObjectListFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetObjectListFactory::ReadResource(std::shared_ptr reader, +void LUS::SetObjectListFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setObjectList = std::static_pointer_cast(resource); @@ -40,4 +40,4 @@ void Ship::SetObjectListFactoryV0::ParseFileBinary(std::shared_ptr } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetObjectListFactory.h b/soh/soh/resource/importer/scenecommand/SetObjectListFactory.h index c6e21d741..d0cc1ee6f 100644 --- a/soh/soh/resource/importer/scenecommand/SetObjectListFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetObjectListFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetObjectListFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetObjectListFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetPathwaysFactory.cpp b/soh/soh/resource/importer/scenecommand/SetPathwaysFactory.cpp index 2e1be596a..8425e1e97 100644 --- a/soh/soh/resource/importer/scenecommand/SetPathwaysFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetPathwaysFactory.cpp @@ -3,7 +3,7 @@ #include "spdlog/spdlog.h" #include -namespace Ship { +namespace LUS { std::shared_ptr SetPathwaysFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -26,7 +26,7 @@ std::shared_ptr SetPathwaysFactory::ReadResource(std::shared_ptr reader, +void LUS::SetPathwaysFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setPathways = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setPathways); @@ -37,8 +37,8 @@ void Ship::SetPathwaysFactoryV0::ParseFileBinary(std::shared_ptr r setPathways->paths.reserve(setPathways->numPaths); for (uint32_t i = 0; i < setPathways->numPaths; i++) { std::string pathFileName = reader->ReadString(); - setPathways->paths.push_back(std::static_pointer_cast(Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(pathFileName.c_str()))); + setPathways->paths.push_back(std::static_pointer_cast(LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(pathFileName.c_str()))); } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetPathwaysFactory.h b/soh/soh/resource/importer/scenecommand/SetPathwaysFactory.h index c1f1d4479..aa7b8a8a4 100644 --- a/soh/soh/resource/importer/scenecommand/SetPathwaysFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetPathwaysFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetPathwaysFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetPathwaysFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetRoomBehaviorFactory.cpp b/soh/soh/resource/importer/scenecommand/SetRoomBehaviorFactory.cpp index 1f87c58a3..4fde10745 100644 --- a/soh/soh/resource/importer/scenecommand/SetRoomBehaviorFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetRoomBehaviorFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetRoomBehavior.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetRoomBehaviorFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetRoomBehaviorFactory::ReadResource(std::shared_ptr reader, +void LUS::SetRoomBehaviorFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setRoomBehavior = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setRoomBehavior); @@ -36,4 +36,4 @@ void Ship::SetRoomBehaviorFactoryV0::ParseFileBinary(std::shared_ptrroomBehavior.gameplayFlags2 = reader->ReadInt32(); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetRoomBehaviorFactory.h b/soh/soh/resource/importer/scenecommand/SetRoomBehaviorFactory.h index 947663dda..9478f2125 100644 --- a/soh/soh/resource/importer/scenecommand/SetRoomBehaviorFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetRoomBehaviorFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetRoomBehaviorFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetRoomBehaviorFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetRoomListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetRoomListFactory.cpp index 67d6306ce..6f949380d 100644 --- a/soh/soh/resource/importer/scenecommand/SetRoomListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetRoomListFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetRoomList.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetRoomListFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -26,7 +26,7 @@ std::shared_ptr SetRoomListFactory::ReadResource(std::shared_ptr reader, +void LUS::SetRoomListFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setRoomList = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setRoomList); @@ -48,4 +48,4 @@ void Ship::SetRoomListFactoryV0::ParseFileBinary(std::shared_ptr r } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetRoomListFactory.h b/soh/soh/resource/importer/scenecommand/SetRoomListFactory.h index 19bc785de..993835fcd 100644 --- a/soh/soh/resource/importer/scenecommand/SetRoomListFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetRoomListFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetRoomListFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetRoomListFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetSkyboxModifierFactory.cpp b/soh/soh/resource/importer/scenecommand/SetSkyboxModifierFactory.cpp index a7454d790..27946c4ec 100644 --- a/soh/soh/resource/importer/scenecommand/SetSkyboxModifierFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetSkyboxModifierFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetSkyboxModifier.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetSkyboxModifierFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetSkyboxModifierFactory::ReadResource(std::shared_ptr return resource; } -void Ship::SetSkyboxModifierFactoryV0::ParseFileBinary(std::shared_ptr reader, +void LUS::SetSkyboxModifierFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setSkyboxModifier = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setSkyboxModifier); @@ -36,4 +36,4 @@ void Ship::SetSkyboxModifierFactoryV0::ParseFileBinary(std::shared_ptrmodifier.sunMoonDisabled = reader->ReadInt8(); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetSkyboxModifierFactory.h b/soh/soh/resource/importer/scenecommand/SetSkyboxModifierFactory.h index 40d7db4c6..d2089956a 100644 --- a/soh/soh/resource/importer/scenecommand/SetSkyboxModifierFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetSkyboxModifierFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetSkyboxModifierFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetSkyboxModifierFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.cpp index c62ae7eb6..4049b333d 100644 --- a/soh/soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetSkyboxSettings.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetSkyboxSettingsFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -38,4 +38,4 @@ void SetSkyboxSettingsFactoryV0::ParseFileBinary(std::shared_ptr r setSkyboxSettings->settings.indoors = reader->ReadInt8(); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.h b/soh/soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.h index 278e38dbb..e91b59b2e 100644 --- a/soh/soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetSkyboxSettingsFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetSkyboxSettingsFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetSoundSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetSoundSettingsFactory.cpp index 5567a2041..195da1e79 100644 --- a/soh/soh/resource/importer/scenecommand/SetSoundSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetSoundSettingsFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetSoundSettings.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetSoundSettingsFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetSoundSettingsFactory::ReadResource(std::shared_ptr< return resource; } -void Ship::SetSoundSettingsFactoryV0::ParseFileBinary(std::shared_ptr reader, +void LUS::SetSoundSettingsFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setSoundSettings = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setSoundSettings); @@ -37,4 +37,4 @@ void Ship::SetSoundSettingsFactoryV0::ParseFileBinary(std::shared_ptrsettings.seqId = reader->ReadInt8(); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetSoundSettingsFactory.h b/soh/soh/resource/importer/scenecommand/SetSoundSettingsFactory.h index 085ffd410..324e2a835 100644 --- a/soh/soh/resource/importer/scenecommand/SetSoundSettingsFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetSoundSettingsFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetSoundSettingsFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetSoundSettingsFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetSpecialObjectsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetSpecialObjectsFactory.cpp index 4fe6589b6..240fd2532 100644 --- a/soh/soh/resource/importer/scenecommand/SetSpecialObjectsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetSpecialObjectsFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetSpecialObjects.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetSpecialObjectsFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetSpecialObjectsFactory::ReadResource(std::shared_ptr return resource; } -void Ship::SetSpecialObjectsFactoryV0::ParseFileBinary(std::shared_ptr reader, +void LUS::SetSpecialObjectsFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setSpecialObjects = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setSpecialObjects); @@ -36,4 +36,4 @@ void Ship::SetSpecialObjectsFactoryV0::ParseFileBinary(std::shared_ptrspecialObjects.globalObject = reader->ReadInt16(); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetSpecialObjectsFactory.h b/soh/soh/resource/importer/scenecommand/SetSpecialObjectsFactory.h index e9ac975ca..41d68fd42 100644 --- a/soh/soh/resource/importer/scenecommand/SetSpecialObjectsFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetSpecialObjectsFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetSpecialObjectsFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetSpecialObjectsFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetStartPositionListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetStartPositionListFactory.cpp index 42b767613..a763fa780 100644 --- a/soh/soh/resource/importer/scenecommand/SetStartPositionListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetStartPositionListFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetStartPositionList.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetStartPositionListFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -27,7 +27,7 @@ std::shared_ptr SetStartPositionListFactory::ReadResource(std::shared_ return resource; } -void Ship::SetStartPositionListFactoryV0::ParseFileBinary(std::shared_ptr reader, +void LUS::SetStartPositionListFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setStartPositionList = std::static_pointer_cast(resource); @@ -53,4 +53,4 @@ void Ship::SetStartPositionListFactoryV0::ParseFileBinary(std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetStartPositionListFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetTimeSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetTimeSettingsFactory.cpp index 63c7d9b29..dd7fbf8e2 100644 --- a/soh/soh/resource/importer/scenecommand/SetTimeSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetTimeSettingsFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetTimeSettings.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetTimeSettingsFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetTimeSettingsFactory::ReadResource(std::shared_ptr reader, +void LUS::SetTimeSettingsFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setTimeSettings = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setTimeSettings); @@ -37,4 +37,4 @@ void Ship::SetTimeSettingsFactoryV0::ParseFileBinary(std::shared_ptrsettings.timeIncrement = reader->ReadInt8(); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetTimeSettingsFactory.h b/soh/soh/resource/importer/scenecommand/SetTimeSettingsFactory.h index ddd277d09..4d1964eaf 100644 --- a/soh/soh/resource/importer/scenecommand/SetTimeSettingsFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetTimeSettingsFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetTimeSettingsFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetTimeSettingsFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetTransitionActorListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetTransitionActorListFactory.cpp index 716e346c0..279129667 100644 --- a/soh/soh/resource/importer/scenecommand/SetTransitionActorListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetTransitionActorListFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetTransitionActorList.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetTransitionActorListFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetTransitionActorListFactory::ReadResource(std::share return resource; } -void Ship::SetTransitionActorListFactoryV0::ParseFileBinary(std::shared_ptr reader, +void LUS::SetTransitionActorListFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setTransitionActorList = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setTransitionActorList); @@ -52,4 +52,4 @@ void Ship::SetTransitionActorListFactoryV0::ParseFileBinary(std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetTransitionActorListFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetWindSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetWindSettingsFactory.cpp index f43e7558b..6b6f5fc87 100644 --- a/soh/soh/resource/importer/scenecommand/SetWindSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetWindSettingsFactory.cpp @@ -2,7 +2,7 @@ #include "soh/resource/type/scenecommand/SetWindSettings.h" #include "spdlog/spdlog.h" -namespace Ship { +namespace LUS { std::shared_ptr SetWindSettingsFactory::ReadResource(std::shared_ptr resourceMgr, std::shared_ptr initData, std::shared_ptr reader) { @@ -25,7 +25,7 @@ std::shared_ptr SetWindSettingsFactory::ReadResource(std::shared_ptr reader, +void LUS::SetWindSettingsFactoryV0::ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) { std::shared_ptr setWind = std::static_pointer_cast(resource); ResourceVersionFactory::ParseFileBinary(reader, setWind); @@ -38,4 +38,4 @@ void Ship::SetWindSettingsFactoryV0::ParseFileBinary(std::shared_ptrsettings.windSpeed = reader->ReadUByte(); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/importer/scenecommand/SetWindSettingsFactory.h b/soh/soh/resource/importer/scenecommand/SetWindSettingsFactory.h index 2406ca80e..faad34a44 100644 --- a/soh/soh/resource/importer/scenecommand/SetWindSettingsFactory.h +++ b/soh/soh/resource/importer/scenecommand/SetWindSettingsFactory.h @@ -2,7 +2,7 @@ #include "soh/resource/importer/scenecommand/SceneCommandFactory.h" -namespace Ship { +namespace LUS { class SetWindSettingsFactory : public SceneCommandFactory { public: std::shared_ptr ReadResource(std::shared_ptr resourceMgr, @@ -14,4 +14,4 @@ class SetWindSettingsFactoryV0 : public SceneCommandVersionFactory { public: void ParseFileBinary(std::shared_ptr reader, std::shared_ptr resource) override; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/Animation.cpp b/soh/soh/resource/type/Animation.cpp index 6f79d09e3..9ffe74ce9 100644 --- a/soh/soh/resource/type/Animation.cpp +++ b/soh/soh/resource/type/Animation.cpp @@ -1,6 +1,6 @@ #include "Animation.h" -namespace Ship { +namespace LUS { void* Animation::GetPointer() { return &animationData; } @@ -18,4 +18,4 @@ size_t Animation::GetPointerSize() { return 0; } } -} // namespace Ship \ No newline at end of file +} // namespace LUS \ No newline at end of file diff --git a/soh/soh/resource/type/Animation.h b/soh/soh/resource/type/Animation.h index ac78b1c25..910b226ed 100644 --- a/soh/soh/resource/type/Animation.h +++ b/soh/soh/resource/type/Animation.h @@ -3,7 +3,7 @@ #include "Resource.h" #include -namespace Ship { +namespace LUS { enum class AnimationType { Normal = 0, Link = 1, @@ -82,4 +82,4 @@ namespace Ship { std::vector transformDataArr; std::vector copyValuesArr; }; -}; // namespace Ship \ No newline at end of file +}; // namespace LUS \ No newline at end of file diff --git a/soh/soh/resource/type/AudioSample.cpp b/soh/soh/resource/type/AudioSample.cpp index d276b7564..d415cb67d 100644 --- a/soh/soh/resource/type/AudioSample.cpp +++ b/soh/soh/resource/type/AudioSample.cpp @@ -1,6 +1,6 @@ #include "AudioSample.h" -namespace Ship { +namespace LUS { void* AudioSample::GetPointer() { return &sample; } @@ -8,4 +8,4 @@ void* AudioSample::GetPointer() { size_t AudioSample::GetPointerSize() { return sizeof(Sample); } -} // namespace Ship \ No newline at end of file +} // namespace LUS \ No newline at end of file diff --git a/soh/soh/resource/type/AudioSample.h b/soh/soh/resource/type/AudioSample.h index 02a9fcb39..608fad810 100644 --- a/soh/soh/resource/type/AudioSample.h +++ b/soh/soh/resource/type/AudioSample.h @@ -5,7 +5,7 @@ #include "Resource.h" #include -namespace Ship { +namespace LUS { typedef struct { /* 0x00 */ uintptr_t start; /* 0x04 */ uintptr_t end; @@ -56,4 +56,4 @@ namespace Ship { uint32_t bookDataCount; std::vector bookData; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/AudioSequence.cpp b/soh/soh/resource/type/AudioSequence.cpp index 1cfce803f..d16e64e76 100644 --- a/soh/soh/resource/type/AudioSequence.cpp +++ b/soh/soh/resource/type/AudioSequence.cpp @@ -1,6 +1,6 @@ #include "AudioSequence.h" -namespace Ship { +namespace LUS { void* AudioSequence::GetPointer() { return &sequence; @@ -9,4 +9,4 @@ void* AudioSequence::GetPointer() { size_t AudioSequence::GetPointerSize() { return sizeof(Sequence); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/AudioSequence.h b/soh/soh/resource/type/AudioSequence.h index 6b473fa2e..38bcaebf6 100644 --- a/soh/soh/resource/type/AudioSequence.h +++ b/soh/soh/resource/type/AudioSequence.h @@ -5,7 +5,7 @@ #include "Resource.h" #include -namespace Ship { +namespace LUS { typedef struct { char* seqData; @@ -27,4 +27,4 @@ public: Sequence sequence; std::vector sequenceData; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/AudioSoundFont.cpp b/soh/soh/resource/type/AudioSoundFont.cpp index 018ff443d..857279573 100644 --- a/soh/soh/resource/type/AudioSoundFont.cpp +++ b/soh/soh/resource/type/AudioSoundFont.cpp @@ -1,6 +1,6 @@ #include "AudioSoundFont.h" -namespace Ship { +namespace LUS { void* AudioSoundFont::GetPointer() { return &soundFont; } @@ -8,4 +8,4 @@ void* AudioSoundFont::GetPointer() { size_t AudioSoundFont::GetPointerSize() { return sizeof(SoundFont); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/AudioSoundFont.h b/soh/soh/resource/type/AudioSoundFont.h index c679ff912..ace639a93 100644 --- a/soh/soh/resource/type/AudioSoundFont.h +++ b/soh/soh/resource/type/AudioSoundFont.h @@ -6,7 +6,7 @@ #include "soh/resource/type/AudioSample.h" #include -namespace Ship { +namespace LUS { typedef struct { /* 0x0 */ s16 delay; @@ -79,4 +79,4 @@ public: SoundFont soundFont; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/Background.cpp b/soh/soh/resource/type/Background.cpp index 2d24c0be3..f9379b9c7 100644 --- a/soh/soh/resource/type/Background.cpp +++ b/soh/soh/resource/type/Background.cpp @@ -1,6 +1,6 @@ #include "Background.h" -namespace Ship { +namespace LUS { void* Background::GetPointer() { return Data.data(); } @@ -8,4 +8,4 @@ void* Background::GetPointer() { size_t Background::GetPointerSize() { return Data.size() * sizeof(uint8_t); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/Background.h b/soh/soh/resource/type/Background.h index a00a0c1c0..96edde32c 100644 --- a/soh/soh/resource/type/Background.h +++ b/soh/soh/resource/type/Background.h @@ -2,7 +2,7 @@ #include "resource/Resource.h" -namespace Ship { +namespace LUS { class Background : public Resource { public: using Resource::Resource; @@ -12,4 +12,4 @@ class Background : public Resource { std::vector Data; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/CollisionHeader.cpp b/soh/soh/resource/type/CollisionHeader.cpp index dbba77011..87f5e5198 100644 --- a/soh/soh/resource/type/CollisionHeader.cpp +++ b/soh/soh/resource/type/CollisionHeader.cpp @@ -1,6 +1,6 @@ #include "CollisionHeader.h" -namespace Ship { +namespace LUS { void* CollisionHeader::GetPointer() { return &collisionHeaderData; } @@ -8,4 +8,4 @@ void* CollisionHeader::GetPointer() { size_t CollisionHeader::GetPointerSize() { return sizeof(collisionHeaderData); } -} // namespace Ship \ No newline at end of file +} // namespace LUS \ No newline at end of file diff --git a/soh/soh/resource/type/CollisionHeader.h b/soh/soh/resource/type/CollisionHeader.h index 59157f737..b830448b2 100644 --- a/soh/soh/resource/type/CollisionHeader.h +++ b/soh/soh/resource/type/CollisionHeader.h @@ -6,7 +6,7 @@ #include #include "z64math.h" -namespace Ship { +namespace LUS { typedef struct { /* 0x00 */ u16 type; @@ -93,4 +93,4 @@ public: std::vector waterBoxes; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/Cutscene.cpp b/soh/soh/resource/type/Cutscene.cpp index e1283e4c9..2da9e91bd 100644 --- a/soh/soh/resource/type/Cutscene.cpp +++ b/soh/soh/resource/type/Cutscene.cpp @@ -1,7 +1,7 @@ #include "Cutscene.h" #include -namespace Ship { +namespace LUS { void* Cutscene::GetPointer() { return commands.data(); } @@ -9,4 +9,4 @@ void* Cutscene::GetPointer() { size_t Cutscene::GetPointerSize() { return commands.size() * sizeof(uint32_t); } -} // namespace Ship \ No newline at end of file +} // namespace LUS \ No newline at end of file diff --git a/soh/soh/resource/type/Cutscene.h b/soh/soh/resource/type/Cutscene.h index 30f4d0c61..b392c60e5 100644 --- a/soh/soh/resource/type/Cutscene.h +++ b/soh/soh/resource/type/Cutscene.h @@ -7,7 +7,7 @@ #include "Vec3f.h" #include "Color3b.h" -namespace Ship { +namespace LUS { enum class CutsceneCommands { Cmd00 = 0x0000, @@ -55,7 +55,7 @@ class Cutscene : public Resource { uint32_t endFrame; std::vector commands; }; -} // namespace Ship +} // namespace LUS ///////////// diff --git a/soh/soh/resource/type/Path.cpp b/soh/soh/resource/type/Path.cpp index 0a9e70137..74938307d 100644 --- a/soh/soh/resource/type/Path.cpp +++ b/soh/soh/resource/type/Path.cpp @@ -1,6 +1,6 @@ #include "Path.h" -namespace Ship { +namespace LUS { void* Path::GetPointer() { return pathData.data(); } @@ -8,4 +8,4 @@ void* Path::GetPointer() { size_t Path::GetPointerSize() { return pathData.size() * sizeof(PathData); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/Path.h b/soh/soh/resource/type/Path.h index 96afabee4..8c5c0d0ee 100644 --- a/soh/soh/resource/type/Path.h +++ b/soh/soh/resource/type/Path.h @@ -6,7 +6,7 @@ #include #include "z64math.h" -namespace Ship { +namespace LUS { typedef struct { /* 0x00 */ u8 count; // number of points in the path @@ -24,4 +24,4 @@ public: std::vector pathData; std::vector> paths; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/PlayerAnimation.cpp b/soh/soh/resource/type/PlayerAnimation.cpp index d22d2712f..8d15140c2 100644 --- a/soh/soh/resource/type/PlayerAnimation.cpp +++ b/soh/soh/resource/type/PlayerAnimation.cpp @@ -1,7 +1,7 @@ #include "PlayerAnimation.h" #include -namespace Ship { +namespace LUS { void* PlayerAnimation::GetPointer() { return limbRotData.data(); } @@ -9,4 +9,4 @@ void* PlayerAnimation::GetPointer() { size_t PlayerAnimation::GetPointerSize() { return limbRotData.size() * sizeof(int16_t); } -} // namespace Ship \ No newline at end of file +} // namespace LUS \ No newline at end of file diff --git a/soh/soh/resource/type/PlayerAnimation.h b/soh/soh/resource/type/PlayerAnimation.h index 51685360e..cf85729e4 100644 --- a/soh/soh/resource/type/PlayerAnimation.h +++ b/soh/soh/resource/type/PlayerAnimation.h @@ -7,7 +7,7 @@ #include "Vec3f.h" #include "Color3b.h" -namespace Ship { +namespace LUS { class PlayerAnimation : public Resource { public: @@ -18,4 +18,4 @@ class PlayerAnimation : public Resource { std::vector limbRotData; }; -} // namespace Ship \ No newline at end of file +} // namespace LUS \ No newline at end of file diff --git a/soh/soh/resource/type/Scene.cpp b/soh/soh/resource/type/Scene.cpp index 947095480..bfe219e54 100644 --- a/soh/soh/resource/type/Scene.cpp +++ b/soh/soh/resource/type/Scene.cpp @@ -1,6 +1,6 @@ #include "Scene.h" -namespace Ship { +namespace LUS { void* Scene::GetPointer() { // Scene is a special type that requries C++ processing. As such, we return nothing. return nullptr; @@ -9,4 +9,4 @@ void* Scene::GetPointer() { size_t Scene::GetPointerSize() { return 0; } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/Scene.h b/soh/soh/resource/type/Scene.h index fd156b64f..e7bb943cf 100644 --- a/soh/soh/resource/type/Scene.h +++ b/soh/soh/resource/type/Scene.h @@ -7,7 +7,7 @@ #include "scenecommand/SceneCommand.h" #include -namespace Ship { +namespace LUS { class Scene : public Resource { public: @@ -18,4 +18,4 @@ public: std::vector> commands; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/Skeleton.cpp b/soh/soh/resource/type/Skeleton.cpp index 11b36ec70..990ecd333 100644 --- a/soh/soh/resource/type/Skeleton.cpp +++ b/soh/soh/resource/type/Skeleton.cpp @@ -3,7 +3,7 @@ #include "soh/OTRGlobals.h" #include "libultraship/libultraship.h" -namespace Ship { +namespace LUS { void* Skeleton::GetPointer() { return &skeletonData; } @@ -36,9 +36,9 @@ void SkeletonPatcher::RegisterSkeleton(std::string& path, SkelAnime* skelAnime) } // Determine if we're using an alternate skeleton - if (path.starts_with(Ship::Resource::gAltAssetPrefix)) { - info.vanillaSkeletonPath = path.substr(Ship::Resource::gAltAssetPrefix.length(), - path.size() - Ship::Resource::gAltAssetPrefix.length()); + if (path.starts_with(LUS::Resource::gAltAssetPrefix)) { + info.vanillaSkeletonPath = path.substr(LUS::Resource::gAltAssetPrefix.length(), + path.size() - LUS::Resource::gAltAssetPrefix.length()); } else { info.vanillaSkeletonPath = path; } @@ -69,12 +69,12 @@ void SkeletonPatcher::UpdateSkeletons() { for (auto skel : skeletons) { Skeleton* newSkel = - (Skeleton*)Ship::Context::GetInstance()->GetResourceManager() - ->LoadResource((isHD ? Ship::Resource::gAltAssetPrefix : "") + skel.vanillaSkeletonPath, true) + (Skeleton*)LUS::Context::GetInstance()->GetResourceManager() + ->LoadResource((isHD ? LUS::Resource::gAltAssetPrefix : "") + skel.vanillaSkeletonPath, true) .get(); if (newSkel != nullptr) skel.skelAnime->skeleton = newSkel->skeletonData.skeletonHeader.segment; } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/Skeleton.h b/soh/soh/resource/type/Skeleton.h index e6f7cd91f..aac9c8161 100644 --- a/soh/soh/resource/type/Skeleton.h +++ b/soh/soh/resource/type/Skeleton.h @@ -5,7 +5,7 @@ #include "SkeletonLimb.h" #include -namespace Ship { +namespace LUS { enum class SkeletonType { Normal, @@ -88,4 +88,4 @@ class SkeletonPatcher { }; -} // namespace Ship \ No newline at end of file +} // namespace LUS \ No newline at end of file diff --git a/soh/soh/resource/type/SkeletonLimb.cpp b/soh/soh/resource/type/SkeletonLimb.cpp index dc3244b11..32315ec92 100644 --- a/soh/soh/resource/type/SkeletonLimb.cpp +++ b/soh/soh/resource/type/SkeletonLimb.cpp @@ -1,6 +1,6 @@ #include "SkeletonLimb.h" -namespace Ship { +namespace LUS { void* SkeletonLimb::GetPointer() { return &limbData; } @@ -21,4 +21,4 @@ size_t SkeletonLimb::GetPointerSize() { return 0; } } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/SkeletonLimb.h b/soh/soh/resource/type/SkeletonLimb.h index 536a6a7db..0db219b93 100644 --- a/soh/soh/resource/type/SkeletonLimb.h +++ b/soh/soh/resource/type/SkeletonLimb.h @@ -4,7 +4,7 @@ #include "libultraship/libultra.h" #include "z64math.h" -namespace Ship { +namespace LUS { enum class LimbType { Invalid, Standard, @@ -129,4 +129,4 @@ public: std::vector> skinLimbModifVertexArrays; std::vector> skinLimbModifTransformationArrays; }; -} // namespace Ship \ No newline at end of file +} // namespace LUS \ No newline at end of file diff --git a/soh/soh/resource/type/Text.cpp b/soh/soh/resource/type/Text.cpp index 8fb34ecab..a8469be36 100644 --- a/soh/soh/resource/type/Text.cpp +++ b/soh/soh/resource/type/Text.cpp @@ -1,6 +1,6 @@ #include "Text.h" -namespace Ship { +namespace LUS { void* Text::GetPointer() { return messages.data(); } @@ -8,4 +8,4 @@ void* Text::GetPointer() { size_t Text::GetPointerSize() { return messages.size() * sizeof(MessageEntry); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/Text.h b/soh/soh/resource/type/Text.h index 8b5c3530d..5458c7135 100644 --- a/soh/soh/resource/type/Text.h +++ b/soh/soh/resource/type/Text.h @@ -5,7 +5,7 @@ #include "Resource.h" #include -namespace Ship { +namespace LUS { // TODO: we've moved away from using classes for this stuff class MessageEntry { @@ -25,4 +25,4 @@ public: std::vector messages; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/EndMarker.cpp b/soh/soh/resource/type/scenecommand/EndMarker.cpp index fcea5c301..b60fab8ab 100644 --- a/soh/soh/resource/type/scenecommand/EndMarker.cpp +++ b/soh/soh/resource/type/scenecommand/EndMarker.cpp @@ -1,6 +1,6 @@ #include "EndMarker.h" -namespace Ship { +namespace LUS { void* EndMarker::GetPointer() { return &endMarker; } @@ -8,4 +8,4 @@ void* EndMarker::GetPointer() { size_t EndMarker::GetPointerSize() { return sizeof(Marker); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/EndMarker.h b/soh/soh/resource/type/scenecommand/EndMarker.h index faef8d990..f3954467e 100644 --- a/soh/soh/resource/type/scenecommand/EndMarker.h +++ b/soh/soh/resource/type/scenecommand/EndMarker.h @@ -7,7 +7,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { } Marker; @@ -21,4 +21,4 @@ class EndMarker : public SceneCommand { Marker endMarker; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/RomFile.h b/soh/soh/resource/type/scenecommand/RomFile.h index 9decec5f1..ebdc3dc3b 100644 --- a/soh/soh/resource/type/scenecommand/RomFile.h +++ b/soh/soh/resource/type/scenecommand/RomFile.h @@ -2,7 +2,7 @@ #include -namespace Ship { +namespace LUS { typedef struct { /* 0x00 */ uintptr_t vromStart; /* 0x04 */ uintptr_t vromEnd; diff --git a/soh/soh/resource/type/scenecommand/SceneCommand.h b/soh/soh/resource/type/scenecommand/SceneCommand.h index 4cab5fca7..353f5d910 100644 --- a/soh/soh/resource/type/scenecommand/SceneCommand.h +++ b/soh/soh/resource/type/scenecommand/SceneCommand.h @@ -6,7 +6,7 @@ #include "Resource.h" #include -namespace Ship { +namespace LUS { enum class SceneCommandID : uint8_t { SetStartPositionList = 0x00, @@ -53,4 +53,4 @@ public: SceneCommandID cmdId; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetActorList.cpp b/soh/soh/resource/type/scenecommand/SetActorList.cpp index 3ab415eb6..4563f9db3 100644 --- a/soh/soh/resource/type/scenecommand/SetActorList.cpp +++ b/soh/soh/resource/type/scenecommand/SetActorList.cpp @@ -1,6 +1,6 @@ #include "SetActorList.h" -namespace Ship { +namespace LUS { void* SetActorList::GetPointer() { return actorList.data(); } @@ -8,4 +8,4 @@ void* SetActorList::GetPointer() { size_t SetActorList::GetPointerSize() { return actorList.size() * sizeof(ActorEntry); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetActorList.h b/soh/soh/resource/type/scenecommand/SetActorList.h index 0612490f0..7f05f88d1 100644 --- a/soh/soh/resource/type/scenecommand/SetActorList.h +++ b/soh/soh/resource/type/scenecommand/SetActorList.h @@ -9,7 +9,7 @@ // #include #include "z64math.h" -namespace Ship { +namespace LUS { typedef struct { /* 0x00 */ s16 id; /* 0x02 */ Vec3s pos; @@ -27,4 +27,4 @@ class SetActorList : public SceneCommand { uint32_t numActors; std::vector actorList; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetAlternateHeaders.cpp b/soh/soh/resource/type/scenecommand/SetAlternateHeaders.cpp index 04538d4b7..15b3c97d4 100644 --- a/soh/soh/resource/type/scenecommand/SetAlternateHeaders.cpp +++ b/soh/soh/resource/type/scenecommand/SetAlternateHeaders.cpp @@ -1,6 +1,6 @@ #include "SetAlternateHeaders.h" -namespace Ship { +namespace LUS { void* SetAlternateHeaders::GetPointer() { // Like Scene, SetAlternateHeader is a special type that is only acted upon in C++. return nullptr; @@ -9,4 +9,4 @@ void* SetAlternateHeaders::GetPointer() { size_t SetAlternateHeaders::GetPointerSize() { return 0; } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetAlternateHeaders.h b/soh/soh/resource/type/scenecommand/SetAlternateHeaders.h index a88067a4f..48c7ed915 100644 --- a/soh/soh/resource/type/scenecommand/SetAlternateHeaders.h +++ b/soh/soh/resource/type/scenecommand/SetAlternateHeaders.h @@ -11,7 +11,7 @@ #include -namespace Ship { +namespace LUS { class SetAlternateHeaders : public SceneCommand { public: @@ -23,4 +23,4 @@ class SetAlternateHeaders : public SceneCommand { uint32_t numHeaders; std::vector> headers; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetCameraSettings.cpp b/soh/soh/resource/type/scenecommand/SetCameraSettings.cpp index 05162bbef..f88d9683d 100644 --- a/soh/soh/resource/type/scenecommand/SetCameraSettings.cpp +++ b/soh/soh/resource/type/scenecommand/SetCameraSettings.cpp @@ -1,6 +1,6 @@ #include "SetCameraSettings.h" -namespace Ship { +namespace LUS { void* SetCameraSettings::GetPointer() { return &settings; } @@ -8,4 +8,4 @@ void* SetCameraSettings::GetPointer() { size_t SetCameraSettings::GetPointerSize() { return sizeof(CameraSettings); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetCameraSettings.h b/soh/soh/resource/type/scenecommand/SetCameraSettings.h index 77751b51d..55491ec43 100644 --- a/soh/soh/resource/type/scenecommand/SetCameraSettings.h +++ b/soh/soh/resource/type/scenecommand/SetCameraSettings.h @@ -7,7 +7,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { int8_t cameraMovement; int32_t worldMapArea; @@ -22,4 +22,4 @@ class SetCameraSettings : public SceneCommand { CameraSettings settings; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetCollisionHeader.cpp b/soh/soh/resource/type/scenecommand/SetCollisionHeader.cpp index c8eef0d5c..0f71ac1d9 100644 --- a/soh/soh/resource/type/scenecommand/SetCollisionHeader.cpp +++ b/soh/soh/resource/type/scenecommand/SetCollisionHeader.cpp @@ -1,6 +1,6 @@ #include "SetCollisionHeader.h" -namespace Ship { +namespace LUS { void* SetCollisionHeader::GetPointer() { if (collisionHeader == nullptr) { return nullptr; @@ -14,4 +14,4 @@ size_t SetCollisionHeader::GetPointerSize() { } return collisionHeader->GetPointerSize(); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetCollisionHeader.h b/soh/soh/resource/type/scenecommand/SetCollisionHeader.h index 4013c36f0..34c8466bd 100644 --- a/soh/soh/resource/type/scenecommand/SetCollisionHeader.h +++ b/soh/soh/resource/type/scenecommand/SetCollisionHeader.h @@ -9,7 +9,7 @@ #include "soh/resource/type/CollisionHeader.h" // #include -namespace Ship { +namespace LUS { class SetCollisionHeader : public SceneCommand { public: using SceneCommand::SceneCommand; @@ -21,4 +21,4 @@ class SetCollisionHeader : public SceneCommand { std::shared_ptr collisionHeader; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetCsCamera.cpp b/soh/soh/resource/type/scenecommand/SetCsCamera.cpp index 53b509a3e..1c996adda 100644 --- a/soh/soh/resource/type/scenecommand/SetCsCamera.cpp +++ b/soh/soh/resource/type/scenecommand/SetCsCamera.cpp @@ -1,6 +1,6 @@ #include "SetCsCamera.h" -namespace Ship { +namespace LUS { void* SetCsCamera::GetPointer() { return &csCamera; } @@ -8,4 +8,4 @@ void* SetCsCamera::GetPointer() { size_t SetCsCamera::GetPointerSize() { return sizeof(CsCamera); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetCsCamera.h b/soh/soh/resource/type/scenecommand/SetCsCamera.h index ffe77cb13..b3f1cf860 100644 --- a/soh/soh/resource/type/scenecommand/SetCsCamera.h +++ b/soh/soh/resource/type/scenecommand/SetCsCamera.h @@ -7,7 +7,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { } CsCamera; @@ -21,4 +21,4 @@ class SetCsCamera : public SceneCommand { CsCamera csCamera; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetCutscenes.cpp b/soh/soh/resource/type/scenecommand/SetCutscenes.cpp index 4b571af7b..9dc7e1098 100644 --- a/soh/soh/resource/type/scenecommand/SetCutscenes.cpp +++ b/soh/soh/resource/type/scenecommand/SetCutscenes.cpp @@ -1,6 +1,6 @@ #include "SetCutscenes.h" -namespace Ship { +namespace LUS { void* SetCutscenes::GetPointer() { if (cutscene == nullptr) { return nullptr; @@ -14,4 +14,4 @@ size_t SetCutscenes::GetPointerSize() { } return cutscene->GetPointerSize(); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetCutscenes.h b/soh/soh/resource/type/scenecommand/SetCutscenes.h index c0fa53dcb..98cdbcd54 100644 --- a/soh/soh/resource/type/scenecommand/SetCutscenes.h +++ b/soh/soh/resource/type/scenecommand/SetCutscenes.h @@ -9,7 +9,7 @@ #include "soh/resource/type/Cutscene.h" // #include -namespace Ship { +namespace LUS { class SetCutscenes : public SceneCommand { public: using SceneCommand::SceneCommand; @@ -20,4 +20,4 @@ class SetCutscenes : public SceneCommand { std::string fileName; std::shared_ptr cutscene; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetEchoSettings.cpp b/soh/soh/resource/type/scenecommand/SetEchoSettings.cpp index f13ef97b7..559b807d2 100644 --- a/soh/soh/resource/type/scenecommand/SetEchoSettings.cpp +++ b/soh/soh/resource/type/scenecommand/SetEchoSettings.cpp @@ -1,6 +1,6 @@ #include "SetEchoSettings.h" -namespace Ship { +namespace LUS { void* SetEchoSettings::GetPointer() { return &settings; } @@ -8,4 +8,4 @@ void* SetEchoSettings::GetPointer() { size_t SetEchoSettings::GetPointerSize() { return sizeof(EchoSettings); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetEchoSettings.h b/soh/soh/resource/type/scenecommand/SetEchoSettings.h index 0256f0043..7080d8a59 100644 --- a/soh/soh/resource/type/scenecommand/SetEchoSettings.h +++ b/soh/soh/resource/type/scenecommand/SetEchoSettings.h @@ -7,7 +7,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { int8_t echo; } EchoSettings; @@ -21,4 +21,4 @@ class SetEchoSettings : public SceneCommand { EchoSettings settings; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetEntranceList.cpp b/soh/soh/resource/type/scenecommand/SetEntranceList.cpp index 34b4ae5e1..c12247bbf 100644 --- a/soh/soh/resource/type/scenecommand/SetEntranceList.cpp +++ b/soh/soh/resource/type/scenecommand/SetEntranceList.cpp @@ -1,6 +1,6 @@ #include "SetEntranceList.h" -namespace Ship { +namespace LUS { void* SetEntranceList::GetPointer() { return entrances.data(); } @@ -8,4 +8,4 @@ void* SetEntranceList::GetPointer() { size_t SetEntranceList::GetPointerSize() { return entrances.size() * sizeof(EntranceEntry); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetEntranceList.h b/soh/soh/resource/type/scenecommand/SetEntranceList.h index 790ff7ce3..970e0fb5c 100644 --- a/soh/soh/resource/type/scenecommand/SetEntranceList.h +++ b/soh/soh/resource/type/scenecommand/SetEntranceList.h @@ -8,7 +8,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { /* 0x00 */ u8 spawn; /* 0x01 */ u8 room; @@ -25,4 +25,4 @@ class SetEntranceList : public SceneCommand { std::vector entrances; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetExitList.cpp b/soh/soh/resource/type/scenecommand/SetExitList.cpp index eea06b6c5..b34ea20ee 100644 --- a/soh/soh/resource/type/scenecommand/SetExitList.cpp +++ b/soh/soh/resource/type/scenecommand/SetExitList.cpp @@ -1,6 +1,6 @@ #include "SetExitList.h" -namespace Ship { +namespace LUS { void* SetExitList::GetPointer() { return exits.data(); } @@ -8,4 +8,4 @@ void* SetExitList::GetPointer() { size_t SetExitList::GetPointerSize() { return exits.size() * sizeof(int16_t); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetExitList.h b/soh/soh/resource/type/scenecommand/SetExitList.h index 50b0c1848..b3f7f87c9 100644 --- a/soh/soh/resource/type/scenecommand/SetExitList.h +++ b/soh/soh/resource/type/scenecommand/SetExitList.h @@ -7,7 +7,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { class SetExitList : public SceneCommand { public: using SceneCommand::SceneCommand; @@ -19,4 +19,4 @@ class SetExitList : public SceneCommand { std::vector exits; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetLightList.cpp b/soh/soh/resource/type/scenecommand/SetLightList.cpp index 3ae6c6d0c..0e69c6f42 100644 --- a/soh/soh/resource/type/scenecommand/SetLightList.cpp +++ b/soh/soh/resource/type/scenecommand/SetLightList.cpp @@ -1,6 +1,6 @@ #include "SetLightList.h" -namespace Ship { +namespace LUS { void* SetLightList::GetPointer() { return lightList.data(); } @@ -8,4 +8,4 @@ void* SetLightList::GetPointer() { size_t SetLightList::GetPointerSize() { return lightList.size() * sizeof(LightInfo); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetLightList.h b/soh/soh/resource/type/scenecommand/SetLightList.h index 330e0de30..561f80d06 100644 --- a/soh/soh/resource/type/scenecommand/SetLightList.h +++ b/soh/soh/resource/type/scenecommand/SetLightList.h @@ -8,7 +8,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { /* 0x0 */ s16 x; /* 0x2 */ s16 y; @@ -45,4 +45,4 @@ class SetLightList : public SceneCommand { uint32_t numLights; std::vector lightList; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetLightingSettings.cpp b/soh/soh/resource/type/scenecommand/SetLightingSettings.cpp index 0bf3b852c..b432d03fb 100644 --- a/soh/soh/resource/type/scenecommand/SetLightingSettings.cpp +++ b/soh/soh/resource/type/scenecommand/SetLightingSettings.cpp @@ -1,6 +1,6 @@ #include "SetLightingSettings.h" -namespace Ship { +namespace LUS { void* SetLightingSettings::GetPointer() { return settings.data(); } @@ -8,4 +8,4 @@ void* SetLightingSettings::GetPointer() { size_t SetLightingSettings::GetPointerSize() { return settings.size() * sizeof(EnvLightSettings); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetLightingSettings.h b/soh/soh/resource/type/scenecommand/SetLightingSettings.h index ab96d7287..4bb3b4f4e 100644 --- a/soh/soh/resource/type/scenecommand/SetLightingSettings.h +++ b/soh/soh/resource/type/scenecommand/SetLightingSettings.h @@ -7,7 +7,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { /* 0x00 */ u8 ambientColor[3]; /* 0x03 */ s8 light1Dir[3]; @@ -28,4 +28,4 @@ class SetLightingSettings : public SceneCommand { std::vector settings; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetMesh.cpp b/soh/soh/resource/type/scenecommand/SetMesh.cpp index 3c7c131b2..e041bde9c 100644 --- a/soh/soh/resource/type/scenecommand/SetMesh.cpp +++ b/soh/soh/resource/type/scenecommand/SetMesh.cpp @@ -1,6 +1,6 @@ #include "SetMesh.h" -namespace Ship { +namespace LUS { void* SetMesh::GetPointer() { return &meshHeader; } @@ -8,4 +8,4 @@ void* SetMesh::GetPointer() { size_t SetMesh::GetPointerSize() { return sizeof(MeshHeader); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetMesh.h b/soh/soh/resource/type/scenecommand/SetMesh.h index ad3ddf278..90ec058d5 100644 --- a/soh/soh/resource/type/scenecommand/SetMesh.h +++ b/soh/soh/resource/type/scenecommand/SetMesh.h @@ -8,7 +8,7 @@ #include "libultraship/libultra.h" #include "z64math.h" -namespace Ship { +namespace LUS { typedef struct { /* 0x00 */ u8 type; } PolygonBase; @@ -100,4 +100,4 @@ class SetMesh : public SceneCommand { std::vector images; MeshHeader meshHeader; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetObjectList.cpp b/soh/soh/resource/type/scenecommand/SetObjectList.cpp index df5746668..ea82a630b 100644 --- a/soh/soh/resource/type/scenecommand/SetObjectList.cpp +++ b/soh/soh/resource/type/scenecommand/SetObjectList.cpp @@ -1,6 +1,6 @@ #include "SetObjectList.h" -namespace Ship { +namespace LUS { void* SetObjectList::GetPointer() { return objects.data(); } @@ -8,4 +8,4 @@ void* SetObjectList::GetPointer() { size_t SetObjectList::GetPointerSize() { return objects.size() * sizeof(int16_t); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetObjectList.h b/soh/soh/resource/type/scenecommand/SetObjectList.h index c6afffdda..b411a35e1 100644 --- a/soh/soh/resource/type/scenecommand/SetObjectList.h +++ b/soh/soh/resource/type/scenecommand/SetObjectList.h @@ -8,7 +8,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { class SetObjectList : public SceneCommand { public: using SceneCommand::SceneCommand; @@ -19,4 +19,4 @@ class SetObjectList : public SceneCommand { uint32_t numObjects; std::vector objects; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetPathways.cpp b/soh/soh/resource/type/scenecommand/SetPathways.cpp index f203b8090..952e26677 100644 --- a/soh/soh/resource/type/scenecommand/SetPathways.cpp +++ b/soh/soh/resource/type/scenecommand/SetPathways.cpp @@ -1,11 +1,11 @@ #include "SetPathways.h" -namespace Ship { +namespace LUS { void* SetPathways::GetPointer() { return paths.data(); } size_t SetPathways::GetPointerSize() { - return paths.size() * sizeof(std::shared_ptr); + return paths.size() * sizeof(std::shared_ptr); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetPathways.h b/soh/soh/resource/type/scenecommand/SetPathways.h index 2d8c58a70..c179cf267 100644 --- a/soh/soh/resource/type/scenecommand/SetPathways.h +++ b/soh/soh/resource/type/scenecommand/SetPathways.h @@ -8,7 +8,7 @@ // #include #include "soh/resource/type/Path.h" -namespace Ship { +namespace LUS { class SetPathways : public SceneCommand { public: @@ -18,6 +18,6 @@ class SetPathways : public SceneCommand { size_t GetPointerSize(); uint32_t numPaths; - std::vector> paths; + std::vector> paths; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetRoomBehavior.cpp b/soh/soh/resource/type/scenecommand/SetRoomBehavior.cpp index 4e9c63db6..3afdf54f9 100644 --- a/soh/soh/resource/type/scenecommand/SetRoomBehavior.cpp +++ b/soh/soh/resource/type/scenecommand/SetRoomBehavior.cpp @@ -1,6 +1,6 @@ #include "SetRoomBehavior.h" -namespace Ship { +namespace LUS { void* SetRoomBehavior::GetPointer() { return &roomBehavior; } @@ -8,4 +8,4 @@ void* SetRoomBehavior::GetPointer() { size_t SetRoomBehavior::GetPointerSize() { return sizeof(RoomBehavior); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetRoomBehavior.h b/soh/soh/resource/type/scenecommand/SetRoomBehavior.h index 9e4a1e81c..19a58b2f5 100644 --- a/soh/soh/resource/type/scenecommand/SetRoomBehavior.h +++ b/soh/soh/resource/type/scenecommand/SetRoomBehavior.h @@ -7,7 +7,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { int8_t gameplayFlags; int32_t gameplayFlags2; @@ -22,4 +22,4 @@ class SetRoomBehavior : public SceneCommand { RoomBehavior roomBehavior; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetRoomList.cpp b/soh/soh/resource/type/scenecommand/SetRoomList.cpp index 1bc692461..069492233 100644 --- a/soh/soh/resource/type/scenecommand/SetRoomList.cpp +++ b/soh/soh/resource/type/scenecommand/SetRoomList.cpp @@ -1,6 +1,6 @@ #include "SetRoomList.h" -namespace Ship { +namespace LUS { void* SetRoomList::GetPointer() { return rooms.data(); } @@ -8,4 +8,4 @@ void* SetRoomList::GetPointer() { size_t SetRoomList::GetPointerSize() { return rooms.size() * sizeof(RomFile); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetRoomList.h b/soh/soh/resource/type/scenecommand/SetRoomList.h index 4533620ec..61044a191 100644 --- a/soh/soh/resource/type/scenecommand/SetRoomList.h +++ b/soh/soh/resource/type/scenecommand/SetRoomList.h @@ -10,7 +10,7 @@ #include -namespace Ship { +namespace LUS { // typedef struct { // /* 0x00 */ uintptr_t vromStart; // /* 0x04 */ uintptr_t vromEnd; @@ -29,4 +29,4 @@ class SetRoomList : public SceneCommand { std::vector fileNames; std::vector rooms; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetSkyboxModifier.cpp b/soh/soh/resource/type/scenecommand/SetSkyboxModifier.cpp index 302ac2667..8dee0a9c7 100644 --- a/soh/soh/resource/type/scenecommand/SetSkyboxModifier.cpp +++ b/soh/soh/resource/type/scenecommand/SetSkyboxModifier.cpp @@ -1,6 +1,6 @@ #include "SetSkyboxModifier.h" -namespace Ship { +namespace LUS { void* SetSkyboxModifier::GetPointer() { return &modifier; } @@ -8,4 +8,4 @@ void* SetSkyboxModifier::GetPointer() { size_t SetSkyboxModifier::GetPointerSize() { return sizeof(SkyboxModifier); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetSkyboxModifier.h b/soh/soh/resource/type/scenecommand/SetSkyboxModifier.h index ad4a008c6..8098f9e5c 100644 --- a/soh/soh/resource/type/scenecommand/SetSkyboxModifier.h +++ b/soh/soh/resource/type/scenecommand/SetSkyboxModifier.h @@ -7,7 +7,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { uint8_t skyboxDisabled; uint8_t sunMoonDisabled; @@ -22,4 +22,4 @@ class SetSkyboxModifier : public SceneCommand { SkyboxModifier modifier; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetSkyboxSettings.cpp b/soh/soh/resource/type/scenecommand/SetSkyboxSettings.cpp index 77f7bad88..e8a37e9bd 100644 --- a/soh/soh/resource/type/scenecommand/SetSkyboxSettings.cpp +++ b/soh/soh/resource/type/scenecommand/SetSkyboxSettings.cpp @@ -1,6 +1,6 @@ #include "SetSkyboxSettings.h" -namespace Ship { +namespace LUS { void* SetSkyboxSettings::GetPointer() { return &settings; } @@ -8,4 +8,4 @@ void* SetSkyboxSettings::GetPointer() { size_t SetSkyboxSettings::GetPointerSize() { return sizeof(SetSkyboxSettings); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetSkyboxSettings.h b/soh/soh/resource/type/scenecommand/SetSkyboxSettings.h index aa110b635..97d3694fd 100644 --- a/soh/soh/resource/type/scenecommand/SetSkyboxSettings.h +++ b/soh/soh/resource/type/scenecommand/SetSkyboxSettings.h @@ -7,7 +7,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { uint8_t unk; uint8_t skyboxId; @@ -24,4 +24,4 @@ class SetSkyboxSettings : public SceneCommand { SkyboxSettings settings; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetSoundSettings.cpp b/soh/soh/resource/type/scenecommand/SetSoundSettings.cpp index 2787442e4..1380cf410 100644 --- a/soh/soh/resource/type/scenecommand/SetSoundSettings.cpp +++ b/soh/soh/resource/type/scenecommand/SetSoundSettings.cpp @@ -1,6 +1,6 @@ #include "SetSoundSettings.h" -namespace Ship { +namespace LUS { void* SetSoundSettings::GetPointer() { return &settings; } @@ -8,4 +8,4 @@ void* SetSoundSettings::GetPointer() { size_t SetSoundSettings::GetPointerSize() { return sizeof(SoundSettings); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetSoundSettings.h b/soh/soh/resource/type/scenecommand/SetSoundSettings.h index c2fb20366..3287b4b96 100644 --- a/soh/soh/resource/type/scenecommand/SetSoundSettings.h +++ b/soh/soh/resource/type/scenecommand/SetSoundSettings.h @@ -7,7 +7,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { uint8_t seqId; uint8_t natureAmbienceId; @@ -23,4 +23,4 @@ class SetSoundSettings : public SceneCommand { SoundSettings settings; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetSpecialObjects.cpp b/soh/soh/resource/type/scenecommand/SetSpecialObjects.cpp index 8b7ed90e9..36c2dc7f7 100644 --- a/soh/soh/resource/type/scenecommand/SetSpecialObjects.cpp +++ b/soh/soh/resource/type/scenecommand/SetSpecialObjects.cpp @@ -1,6 +1,6 @@ #include "SetSpecialObjects.h" -namespace Ship { +namespace LUS { void* SetSpecialObjects::GetPointer() { return &specialObjects; } @@ -8,4 +8,4 @@ void* SetSpecialObjects::GetPointer() { size_t SetSpecialObjects::GetPointerSize() { return sizeof(SpecialObjects); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetSpecialObjects.h b/soh/soh/resource/type/scenecommand/SetSpecialObjects.h index a8f30b83b..b1a48f3a2 100644 --- a/soh/soh/resource/type/scenecommand/SetSpecialObjects.h +++ b/soh/soh/resource/type/scenecommand/SetSpecialObjects.h @@ -7,7 +7,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { int8_t elfMessage; int16_t globalObject; @@ -22,4 +22,4 @@ class SetSpecialObjects : public SceneCommand { SpecialObjects specialObjects; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetStartPositionList.cpp b/soh/soh/resource/type/scenecommand/SetStartPositionList.cpp index d162d7e7e..626503791 100644 --- a/soh/soh/resource/type/scenecommand/SetStartPositionList.cpp +++ b/soh/soh/resource/type/scenecommand/SetStartPositionList.cpp @@ -1,6 +1,6 @@ #include "SetStartPositionList.h" -namespace Ship { +namespace LUS { void* SetStartPositionList::GetPointer() { return startPositions.data(); } @@ -8,4 +8,4 @@ void* SetStartPositionList::GetPointer() { size_t SetStartPositionList::GetPointerSize() { return startPositions.size() * sizeof(ActorEntry); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetStartPositionList.h b/soh/soh/resource/type/scenecommand/SetStartPositionList.h index 34e7278b9..4f914b012 100644 --- a/soh/soh/resource/type/scenecommand/SetStartPositionList.h +++ b/soh/soh/resource/type/scenecommand/SetStartPositionList.h @@ -9,7 +9,7 @@ #include "soh/resource/type/scenecommand/SetActorList.h" // #include -namespace Ship { +namespace LUS { // typedef struct { // /* 0x00 */ s16 id; // /* 0x02 */ Vec3s pos; @@ -27,4 +27,4 @@ class SetStartPositionList : public SceneCommand { uint32_t numStartPositions; std::vector startPositions; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetTimeSettings.cpp b/soh/soh/resource/type/scenecommand/SetTimeSettings.cpp index d5b56c39f..bcaa19237 100644 --- a/soh/soh/resource/type/scenecommand/SetTimeSettings.cpp +++ b/soh/soh/resource/type/scenecommand/SetTimeSettings.cpp @@ -1,6 +1,6 @@ #include "SetTimeSettings.h" -namespace Ship { +namespace LUS { void* SetTimeSettings::GetPointer() { return &settings; } @@ -8,4 +8,4 @@ void* SetTimeSettings::GetPointer() { size_t SetTimeSettings::GetPointerSize() { return sizeof(TimeSettings); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetTimeSettings.h b/soh/soh/resource/type/scenecommand/SetTimeSettings.h index 4eccc216a..fdc4338d8 100644 --- a/soh/soh/resource/type/scenecommand/SetTimeSettings.h +++ b/soh/soh/resource/type/scenecommand/SetTimeSettings.h @@ -7,7 +7,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { uint8_t hour; uint8_t minute; @@ -23,4 +23,4 @@ class SetTimeSettings : public SceneCommand { TimeSettings settings; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetTransitionActorList.cpp b/soh/soh/resource/type/scenecommand/SetTransitionActorList.cpp index 7b40b35cc..3cbb4cae6 100644 --- a/soh/soh/resource/type/scenecommand/SetTransitionActorList.cpp +++ b/soh/soh/resource/type/scenecommand/SetTransitionActorList.cpp @@ -1,6 +1,6 @@ #include "SetTransitionActorList.h" -namespace Ship { +namespace LUS { void* SetTransitionActorList::GetPointer() { return transitionActorList.data(); } @@ -8,4 +8,4 @@ void* SetTransitionActorList::GetPointer() { size_t SetTransitionActorList::GetPointerSize() { return transitionActorList.size() * sizeof(TransitionActorEntry); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetTransitionActorList.h b/soh/soh/resource/type/scenecommand/SetTransitionActorList.h index 443499aa3..20eb63c87 100644 --- a/soh/soh/resource/type/scenecommand/SetTransitionActorList.h +++ b/soh/soh/resource/type/scenecommand/SetTransitionActorList.h @@ -9,7 +9,7 @@ // #include #include "z64math.h" -namespace Ship { +namespace LUS { typedef struct { struct { s8 room; // Room to switch to @@ -31,4 +31,4 @@ class SetTransitionActorList : public SceneCommand { uint32_t numTransitionActors; std::vector transitionActorList; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetWindSettings.cpp b/soh/soh/resource/type/scenecommand/SetWindSettings.cpp index 817ef301d..d575b1b69 100644 --- a/soh/soh/resource/type/scenecommand/SetWindSettings.cpp +++ b/soh/soh/resource/type/scenecommand/SetWindSettings.cpp @@ -1,6 +1,6 @@ #include "SetWindSettings.h" -namespace Ship { +namespace LUS { void* SetWindSettings::GetPointer() { return &settings; } @@ -8,4 +8,4 @@ void* SetWindSettings::GetPointer() { size_t SetWindSettings::GetPointerSize() { return sizeof(WindSettings); } -} // namespace Ship +} // namespace LUS diff --git a/soh/soh/resource/type/scenecommand/SetWindSettings.h b/soh/soh/resource/type/scenecommand/SetWindSettings.h index a368fdf44..3a193d1b0 100644 --- a/soh/soh/resource/type/scenecommand/SetWindSettings.h +++ b/soh/soh/resource/type/scenecommand/SetWindSettings.h @@ -7,7 +7,7 @@ #include "SceneCommand.h" #include -namespace Ship { +namespace LUS { typedef struct { int8_t windWest; int8_t windVertical; @@ -24,4 +24,4 @@ class SetWindSettings : public SceneCommand { WindSettings settings; }; -}; // namespace Ship +}; // namespace LUS diff --git a/soh/soh/z_message_OTR.cpp b/soh/soh/z_message_OTR.cpp index 0c1298caa..a11befaa0 100644 --- a/soh/soh/z_message_OTR.cpp +++ b/soh/soh/z_message_OTR.cpp @@ -16,7 +16,7 @@ extern "C" MessageTableEntry* sStaffMessageEntryTablePtr; //extern "C" MessageTableEntry* _message_0xFFFC_nes; MessageTableEntry* OTRMessage_LoadTable(const char* filePath, bool isNES) { - auto file = std::static_pointer_cast(Ship::Context::GetInstance()->GetResourceManager()->LoadResource(filePath)); + auto file = std::static_pointer_cast(LUS::Context::GetInstance()->GetResourceManager()->LoadResource(filePath)); if (file == nullptr) return nullptr; @@ -92,7 +92,7 @@ extern "C" void OTRMessage_Init() if (sStaffMessageEntryTablePtr == NULL) { auto file2 = - std::static_pointer_cast(Ship::Context::GetInstance()->GetResourceManager()->LoadResource( + std::static_pointer_cast(LUS::Context::GetInstance()->GetResourceManager()->LoadResource( "text/staff_message_data_static/staff_message_data_static")); // OTRTODO: Should not be malloc'ing here. It's fine for now since we check that the message table is already null. sStaffMessageEntryTablePtr = (MessageTableEntry*)malloc(sizeof(MessageTableEntry) * file2->messages.size()); diff --git a/soh/soh/z_play_otr.cpp b/soh/soh/z_play_otr.cpp index 9489fa306..1980e22f8 100644 --- a/soh/soh/z_play_otr.cpp +++ b/soh/soh/z_play_otr.cpp @@ -10,12 +10,12 @@ extern "C" void Play_InitScene(PlayState * play, s32 spawn); extern "C" void Play_InitEnvironment(PlayState * play, s16 skyboxId); void OTRPlay_InitScene(PlayState* play, s32 spawn); -s32 OTRScene_ExecuteCommands(PlayState* play, Ship::Scene* scene); +s32 OTRScene_ExecuteCommands(PlayState* play, LUS::Scene* scene); -//Ship::OTRResource* OTRPlay_LoadFile(PlayState* play, RomFile* file) { -Ship::Resource* OTRPlay_LoadFile(PlayState* play, const char* fileName) +//LUS::OTRResource* OTRPlay_LoadFile(PlayState* play, RomFile* file) { +LUS::Resource* OTRPlay_LoadFile(PlayState* play, const char* fileName) { - auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResource(fileName); + auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResource(fileName); return res.get(); } @@ -74,9 +74,9 @@ void OTRPlay_InitScene(PlayState* play, s32 spawn) { func_80096FD4(play, &play->roomCtx.curRoom); YREG(15) = 0; gSaveContext.worldMapArea = 0; - OTRScene_ExecuteCommands(play, (Ship::Scene*)play->sceneSegment); + OTRScene_ExecuteCommands(play, (LUS::Scene*)play->sceneSegment); Play_InitEnvironment(play, play->skyboxId); - /* auto data = static_cast(Ship::Context::GetInstance() + /* auto data = static_cast(LUS::Context::GetInstance() ->GetResourceManager() ->LoadResource("object_link_child\\object_link_childVtx_01FE08") .get()); diff --git a/soh/soh/z_scene_otr.cpp b/soh/soh/z_scene_otr.cpp index 7412e48e2..09dffadd6 100644 --- a/soh/soh/z_scene_otr.cpp +++ b/soh/soh/z_scene_otr.cpp @@ -33,12 +33,12 @@ #include "soh/resource/type/scenecommand/SetEchoSettings.h" #include "soh/resource/type/scenecommand/SetAlternateHeaders.h" -extern Ship::Resource* OTRPlay_LoadFile(PlayState* play, const char* fileName); +extern LUS::Resource* OTRPlay_LoadFile(PlayState* play, const char* fileName); extern "C" s32 Object_Spawn(ObjectContext* objectCtx, s16 objectId); extern "C" RomFile sNaviMsgFiles[]; -s32 OTRScene_ExecuteCommands(PlayState* play, Ship::Scene* scene); +s32 OTRScene_ExecuteCommands(PlayState* play, LUS::Scene* scene); -std::shared_ptr ResourceMgr_LoadFile(const char* path) { +std::shared_ptr ResourceMgr_LoadFile(const char* path) { std::string Path = path; if (IsGameMasterQuest()) { size_t pos = 0; @@ -46,15 +46,15 @@ std::shared_ptr ResourceMgr_LoadFile(const char* path) { Path.replace(pos, 7, "/mq/"); } } - return Ship::Context::GetInstance()->GetResourceManager()->LoadFile(Path.c_str()); + return LUS::Context::GetInstance()->GetResourceManager()->LoadFile(Path.c_str()); } // Forward Declaration of function declared in OTRGlobals.cpp -std::shared_ptr GetResourceByNameHandlingMQ(const char* path); +std::shared_ptr GetResourceByNameHandlingMQ(const char* path); -bool Scene_CommandSpawnList(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetStartPositionList* cmdStartPos = std::static_pointer_cast(cmd); - Ship::SetStartPositionList* cmdStartPos = (Ship::SetStartPositionList*)cmd; +bool Scene_CommandSpawnList(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetStartPositionList* cmdStartPos = std::static_pointer_cast(cmd); + LUS::SetStartPositionList* cmdStartPos = (LUS::SetStartPositionList*)cmd; ActorEntry* entries = (ActorEntry*)cmdStartPos->GetPointer(); play->linkActorEntry = &entries[play->setupEntranceList[play->curSpawn].spawn]; @@ -66,9 +66,9 @@ bool Scene_CommandSpawnList(PlayState* play, Ship::SceneCommand* cmd) { return false; } -bool Scene_CommandActorList(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetActorList* cmdActor = std::static_pointer_cast(cmd); - Ship::SetActorList* cmdActor = (Ship::SetActorList*)cmd; +bool Scene_CommandActorList(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetActorList* cmdActor = std::static_pointer_cast(cmd); + LUS::SetActorList* cmdActor = (LUS::SetActorList*)cmd; play->numSetupActors = cmdActor->numActors; play->setupActorList = (ActorEntry*)cmdActor->GetPointer(); @@ -76,24 +76,24 @@ bool Scene_CommandActorList(PlayState* play, Ship::SceneCommand* cmd) { return false; } -bool Scene_CommandUnused2(PlayState* play, Ship::SceneCommand* cmd) { +bool Scene_CommandUnused2(PlayState* play, LUS::SceneCommand* cmd) { // OTRTODO: Do we need to implement this? // play->unk_11DFC = SEGMENTED_TO_VIRTUAL(cmd->unused02.segment); return false; } -bool Scene_CommandCollisionHeader(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetCollisionHeader* cmdCol = std::static_pointer_cast(cmd); - Ship::SetCollisionHeader* cmdCol = (Ship::SetCollisionHeader*)cmd; +bool Scene_CommandCollisionHeader(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetCollisionHeader* cmdCol = std::static_pointer_cast(cmd); + LUS::SetCollisionHeader* cmdCol = (LUS::SetCollisionHeader*)cmd; BgCheck_Allocate(&play->colCtx, play, (CollisionHeader*)cmdCol->GetPointer()); return false; } -bool Scene_CommandRoomList(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetRoomList* cmdRoomList = std::static_pointer_cast(cmd); - Ship::SetRoomList* cmdRoomList = (Ship::SetRoomList*)cmd; +bool Scene_CommandRoomList(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetRoomList* cmdRoomList = std::static_pointer_cast(cmd); + LUS::SetRoomList* cmdRoomList = (LUS::SetRoomList*)cmd; play->numRooms = cmdRoomList->numRooms; play->roomList = (RomFile*)cmdRoomList->GetPointer(); @@ -101,17 +101,17 @@ bool Scene_CommandRoomList(PlayState* play, Ship::SceneCommand* cmd) { return false; } -bool Scene_CommandEntranceList(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetEntranceList* otrEntrance = std::static_pointer_cast(cmd); - Ship::SetEntranceList* otrEntrance = (Ship::SetEntranceList*)cmd; +bool Scene_CommandEntranceList(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetEntranceList* otrEntrance = std::static_pointer_cast(cmd); + LUS::SetEntranceList* otrEntrance = (LUS::SetEntranceList*)cmd; play->setupEntranceList = (EntranceEntry*)otrEntrance->GetPointer(); return false; } -bool Scene_CommandSpecialFiles(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetSpecialObjects* specialCmd = std::static_pointer_cast(cmd); - Ship::SetSpecialObjects* specialCmd = (Ship::SetSpecialObjects*)cmd; +bool Scene_CommandSpecialFiles(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetSpecialObjects* specialCmd = std::static_pointer_cast(cmd); + LUS::SetSpecialObjects* specialCmd = (LUS::SetSpecialObjects*)cmd; if (specialCmd->specialObjects.globalObject != 0) { play->objectCtx.subKeepIndex = Object_Spawn(&play->objectCtx, specialCmd->specialObjects.globalObject); @@ -119,16 +119,16 @@ bool Scene_CommandSpecialFiles(PlayState* play, Ship::SceneCommand* cmd) { if (specialCmd->specialObjects.elfMessage != 0) { auto res = - (Ship::Blob*)OTRPlay_LoadFile(play, sNaviMsgFiles[specialCmd->specialObjects.elfMessage - 1].fileName); + (LUS::Blob*)OTRPlay_LoadFile(play, sNaviMsgFiles[specialCmd->specialObjects.elfMessage - 1].fileName); play->cUpElfMsgs = (ElfMessage*)res->Data.data(); } return false; } -bool Scene_CommandRoomBehavior(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetRoomBehavior* cmdRoom = std::static_pointer_cast(cmd); - Ship::SetRoomBehavior* cmdRoom = (Ship::SetRoomBehavior*)cmd; +bool Scene_CommandRoomBehavior(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetRoomBehavior* cmdRoom = std::static_pointer_cast(cmd); + LUS::SetRoomBehavior* cmdRoom = (LUS::SetRoomBehavior*)cmd; play->roomCtx.curRoom.behaviorType1 = cmdRoom->roomBehavior.gameplayFlags; play->roomCtx.curRoom.behaviorType2 = cmdRoom->roomBehavior.gameplayFlags2 & 0xFF; @@ -138,9 +138,9 @@ bool Scene_CommandRoomBehavior(PlayState* play, Ship::SceneCommand* cmd) { return false; } -bool Scene_CommandMeshHeader(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetMesh* otrMesh = static_pointer_cast(cmd); - Ship::SetMesh* otrMesh = (Ship::SetMesh*)cmd; +bool Scene_CommandMeshHeader(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetMesh* otrMesh = static_pointer_cast(cmd); + LUS::SetMesh* otrMesh = (LUS::SetMesh*)cmd; play->roomCtx.curRoom.meshHeader = (MeshHeader*)otrMesh->GetPointer(); return false; @@ -148,9 +148,9 @@ bool Scene_CommandMeshHeader(PlayState* play, Ship::SceneCommand* cmd) { extern "C" void* func_800982FC(ObjectContext* objectCtx, s32 bankIndex, s16 objectId); -bool Scene_CommandObjectList(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetObjectList* cmdObj = static_pointer_cast(cmd); - Ship::SetObjectList* cmdObj = (Ship::SetObjectList*)cmd; +bool Scene_CommandObjectList(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetObjectList* cmdObj = static_pointer_cast(cmd); + LUS::SetObjectList* cmdObj = (LUS::SetObjectList*)cmd; s32 i; s32 j; @@ -210,9 +210,9 @@ bool Scene_CommandObjectList(PlayState* play, Ship::SceneCommand* cmd) { return false; } -bool Scene_CommandLightList(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetLightList* cmdLight = static_pointer_cast(cmd); - Ship::SetLightList* cmdLight = (Ship::SetLightList*)cmd; +bool Scene_CommandLightList(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetLightList* cmdLight = static_pointer_cast(cmd); + LUS::SetLightList* cmdLight = (LUS::SetLightList*)cmd; for (size_t i = 0; i < cmdLight->lightList.size(); i++) { LightContext_InsertLight(play, &play->lightCtx, (LightInfo*)&cmdLight->lightList[i]); @@ -221,17 +221,17 @@ bool Scene_CommandLightList(PlayState* play, Ship::SceneCommand* cmd) { return false; } -bool Scene_CommandPathList(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetPathways* cmdPath = static_pointer_cast(cmd); - Ship::SetPathways* cmdPath = (Ship::SetPathways*)cmd; +bool Scene_CommandPathList(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetPathways* cmdPath = static_pointer_cast(cmd); + LUS::SetPathways* cmdPath = (LUS::SetPathways*)cmd; play->setupPathList = (Path*)cmdPath->paths[0]->GetPointer(); return false; } -bool Scene_CommandTransitionActorList(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetTransitionActorList* cmdActor = static_pointer_cast(cmd); - Ship::SetTransitionActorList* cmdActor = (Ship::SetTransitionActorList*)cmd; +bool Scene_CommandTransitionActorList(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetTransitionActorList* cmdActor = static_pointer_cast(cmd); + LUS::SetTransitionActorList* cmdActor = (LUS::SetTransitionActorList*)cmd; play->transiActorCtx.numActors = cmdActor->numTransitionActors; play->transiActorCtx.list = (TransitionActorEntry*)cmdActor->GetPointer(); @@ -243,16 +243,16 @@ bool Scene_CommandTransitionActorList(PlayState* play, Ship::SceneCommand* cmd) // transiActorCtx->numActors = 0; //} -bool Scene_CommandLightSettingsList(PlayState* play, Ship::SceneCommand* cmd) { +bool Scene_CommandLightSettingsList(PlayState* play, LUS::SceneCommand* cmd) { play->envCtx.lightSettingsList = (EnvLightSettings*)cmd->GetPointer(); return false; } // Scene Command 0x11: Skybox Settings -bool Scene_CommandSkyboxSettings(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetSkyboxSettings* cmdSky = static_pointer_cast(cmd); - Ship::SetSkyboxSettings* cmdSky = (Ship::SetSkyboxSettings*)cmd; +bool Scene_CommandSkyboxSettings(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetSkyboxSettings* cmdSky = static_pointer_cast(cmd); + LUS::SetSkyboxSettings* cmdSky = (LUS::SetSkyboxSettings*)cmd; play->skyboxId = cmdSky->settings.skyboxId; play->envCtx.unk_17 = play->envCtx.unk_18 = cmdSky->settings.weather; @@ -261,9 +261,9 @@ bool Scene_CommandSkyboxSettings(PlayState* play, Ship::SceneCommand* cmd) { return false; } -bool Scene_CommandSkyboxDisables(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetSkyboxModifier* cmdSky = static_pointer_cast(cmd); - Ship::SetSkyboxModifier* cmdSky = (Ship::SetSkyboxModifier*)cmd; +bool Scene_CommandSkyboxDisables(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetSkyboxModifier* cmdSky = static_pointer_cast(cmd); + LUS::SetSkyboxModifier* cmdSky = (LUS::SetSkyboxModifier*)cmd; play->envCtx.sunMoonDisabled = cmdSky->modifier.sunMoonDisabled; play->envCtx.skyboxDisabled = cmdSky->modifier.skyboxDisabled; @@ -271,9 +271,9 @@ bool Scene_CommandSkyboxDisables(PlayState* play, Ship::SceneCommand* cmd) { return false; } -bool Scene_CommandTimeSettings(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetTimeSettings* cmdTime = static_pointer_cast(cmd); - Ship::SetTimeSettings* cmdTime = (Ship::SetTimeSettings*)cmd; +bool Scene_CommandTimeSettings(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetTimeSettings* cmdTime = static_pointer_cast(cmd); + LUS::SetTimeSettings* cmdTime = (LUS::SetTimeSettings*)cmd; if ((cmdTime->settings.hour != 0xFF) && (cmdTime->settings.minute != 0xFF)) { gSaveContext.skyboxTime = gSaveContext.dayTime = @@ -311,9 +311,9 @@ bool Scene_CommandTimeSettings(PlayState* play, Ship::SceneCommand* cmd) { return false; } -bool Scene_CommandWindSettings(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetWind* cmdWind = std::static_pointer_cast(cmd); - Ship::SetWindSettings* cmdWind = (Ship::SetWindSettings*)cmd; +bool Scene_CommandWindSettings(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetWind* cmdWind = std::static_pointer_cast(cmd); + LUS::SetWindSettings* cmdWind = (LUS::SetWindSettings*)cmd; play->envCtx.windDirection.x = cmdWind->settings.windWest; play->envCtx.windDirection.y = cmdWind->settings.windVertical; @@ -324,19 +324,19 @@ bool Scene_CommandWindSettings(PlayState* play, Ship::SceneCommand* cmd) { return false; } -bool Scene_CommandExitList(PlayState* play, Ship::SceneCommand* cmd) { +bool Scene_CommandExitList(PlayState* play, LUS::SceneCommand* cmd) { play->setupExitList = (s16*)cmd->GetPointer(); return false; } -bool Scene_CommandUndefined9(PlayState* play, Ship::SceneCommand* cmd) { +bool Scene_CommandUndefined9(PlayState* play, LUS::SceneCommand* cmd) { return false; } -bool Scene_CommandSoundSettings(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetSoundSettings* cmdSnd = static_pointer_cast(cmd); - Ship::SetSoundSettings* cmdSnd = (Ship::SetSoundSettings*)cmd; +bool Scene_CommandSoundSettings(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetSoundSettings* cmdSnd = static_pointer_cast(cmd); + LUS::SetSoundSettings* cmdSnd = (LUS::SetSoundSettings*)cmd; play->sequenceCtx.seqId = cmdSnd->settings.seqId; play->sequenceCtx.natureAmbienceId = cmdSnd->settings.natureAmbienceId; @@ -348,18 +348,18 @@ bool Scene_CommandSoundSettings(PlayState* play, Ship::SceneCommand* cmd) { return false; } -bool Scene_CommandEchoSettings(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetEchoSettings* cmdEcho = static_pointer_cast(cmd); - Ship::SetEchoSettings* cmdEcho = (Ship::SetEchoSettings*)cmd; +bool Scene_CommandEchoSettings(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetEchoSettings* cmdEcho = static_pointer_cast(cmd); + LUS::SetEchoSettings* cmdEcho = (LUS::SetEchoSettings*)cmd; play->roomCtx.curRoom.echo = cmdEcho->settings.echo; return false; } -bool Scene_CommandAlternateHeaderList(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetAlternateHeaders* cmdHeaders = static_pointer_cast(cmd); - Ship::SetAlternateHeaders* cmdHeaders = (Ship::SetAlternateHeaders*)cmd; +bool Scene_CommandAlternateHeaderList(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetAlternateHeaders* cmdHeaders = static_pointer_cast(cmd); + LUS::SetAlternateHeaders* cmdHeaders = (LUS::SetAlternateHeaders*)cmd; // s32 pad; // SceneCmd* altHeader; @@ -369,8 +369,8 @@ bool Scene_CommandAlternateHeaderList(PlayState* play, Ship::SceneCommand* cmd) // osSyncPrintf("\n[ZU]sceneset counter=[%X]", ((void)0, gSaveContext.sceneSetupIndex)); if (gSaveContext.sceneSetupIndex != 0) { - Ship::Scene* desiredHeader = - std::static_pointer_cast(cmdHeaders->headers[gSaveContext.sceneSetupIndex - 1]).get(); + LUS::Scene* desiredHeader = + std::static_pointer_cast(cmdHeaders->headers[gSaveContext.sceneSetupIndex - 1]).get(); if (desiredHeader != nullptr) { OTRScene_ExecuteCommands(play, desiredHeader); @@ -380,8 +380,8 @@ bool Scene_CommandAlternateHeaderList(PlayState* play, Ship::SceneCommand* cmd) osSyncPrintf("\nげぼはっ! 指定されたデータがないでええっす!"); if (gSaveContext.sceneSetupIndex == 3) { - Ship::Scene* desiredHeader = - std::static_pointer_cast(cmdHeaders->headers[gSaveContext.sceneSetupIndex - 2]).get(); + LUS::Scene* desiredHeader = + std::static_pointer_cast(cmdHeaders->headers[gSaveContext.sceneSetupIndex - 2]).get(); // "Using adult day data there!" osSyncPrintf("\nそこで、大人の昼データを使用するでええっす!!"); @@ -396,9 +396,9 @@ bool Scene_CommandAlternateHeaderList(PlayState* play, Ship::SceneCommand* cmd) return false; } -bool Scene_CommandCutsceneData(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetCutscenes* cmdCS = std::static_pointer_cast(cmd); - Ship::SetCutscenes* cmdCS = (Ship::SetCutscenes*)cmd; +bool Scene_CommandCutsceneData(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetCutscenes* cmdCS = std::static_pointer_cast(cmd); + LUS::SetCutscenes* cmdCS = (LUS::SetCutscenes*)cmd; play->csCtx.segment = cmdCS->cutscene->commands.data(); @@ -407,9 +407,9 @@ bool Scene_CommandCutsceneData(PlayState* play, Ship::SceneCommand* cmd) { } // Camera & World Map Area -bool Scene_CommandMiscSettings(PlayState* play, Ship::SceneCommand* cmd) { - // Ship::SetCameraSettings* cmdCam = std::static_pointer_cast(cmd); - Ship::SetCameraSettings* cmdCam = (Ship::SetCameraSettings*)cmd; +bool Scene_CommandMiscSettings(PlayState* play, LUS::SceneCommand* cmd) { + // LUS::SetCameraSettings* cmdCam = std::static_pointer_cast(cmd); + LUS::SetCameraSettings* cmdCam = (LUS::SetCameraSettings*)cmd; YREG(15) = cmdCam->settings.cameraMovement; gSaveContext.worldMapArea = cmdCam->settings.worldMapArea; @@ -431,7 +431,7 @@ bool Scene_CommandMiscSettings(PlayState* play, Ship::SceneCommand* cmd) { return false; } -bool (*sceneCommands[])(PlayState*, Ship::SceneCommand*) = { +bool (*sceneCommands[])(PlayState*, LUS::SceneCommand*) = { Scene_CommandSpawnList, // SCENE_CMD_ID_SPAWN_LIST Scene_CommandActorList, // SCENE_CMD_ID_ACTOR_LIST Scene_CommandUnused2, // SCENE_CMD_ID_UNUSED_2 @@ -460,8 +460,8 @@ bool (*sceneCommands[])(PlayState*, Ship::SceneCommand*) = { Scene_CommandMiscSettings, // SCENE_CMD_ID_MISC_SETTINGS }; -s32 OTRScene_ExecuteCommands(PlayState* play, Ship::Scene* scene) { - Ship::SceneCommandID cmdCode; +s32 OTRScene_ExecuteCommands(PlayState* play, LUS::Scene* scene) { + LUS::SceneCommandID cmdCode; for (int i = 0; i < scene->commands.size(); i++) { auto sceneCmd = scene->commands[i]; @@ -498,7 +498,7 @@ extern "C" s32 OTRfunc_800973FC(PlayState* play, RoomContext* roomCtx) { roomCtx->curRoom.segment = roomCtx->unk_34; gSegments[3] = VIRTUAL_TO_PHYSICAL(roomCtx->unk_34); - OTRScene_ExecuteCommands(play, (Ship::Scene*)roomCtx->roomToLoad); + OTRScene_ExecuteCommands(play, (LUS::Scene*)roomCtx->roomToLoad); Player_SetBootData(play, GET_PLAYER(play)); Actor_SpawnTransitionActors(play, &play->actorCtx); @@ -534,7 +534,7 @@ extern "C" s32 OTRfunc_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomN //&roomCtx->loadQueue, NULL, __FILE__, __LINE__); auto roomData = - std::static_pointer_cast(GetResourceByNameHandlingMQ(play->roomList[roomNum].fileName)); + std::static_pointer_cast(GetResourceByNameHandlingMQ(play->roomList[roomNum].fileName)); roomCtx->status = 1; roomCtx->roomToLoad = roomData.get();