diff --git a/libultraship b/libultraship index ffc062cbf..ce38cb688 160000 --- a/libultraship +++ b/libultraship @@ -1 +1 @@ -Subproject commit ffc062cbf44ce8dc07ac9fc0185224010bd78cc5 +Subproject commit ce38cb6883ca030e61749eae584b6d9a7cb7bca5 diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 87cb361e1..935c388d4 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -51,7 +51,7 @@ #include "Extractor/Extract.h" #endif -#include +#include #ifdef __APPLE__ #include @@ -1899,7 +1899,7 @@ extern "C" void OTRControllerCallback(uint8_t rumble) { } extern "C" float OTRGetAspectRatio() { - return gfx_current_dimensions.aspect_ratio; + return Ship::Context::GetInstance()->GetWindow()->GetAspectRatio(); } extern "C" float OTRGetDimensionFromLeftEdge(float v) { @@ -1912,12 +1912,34 @@ extern "C" float OTRGetDimensionFromRightEdge(float v) { // Gets the width of the current render target area extern "C" uint32_t OTRGetGameRenderWidth() { - return gfx_current_dimensions.width; + auto fastWnd = dynamic_pointer_cast(Ship::Context::GetInstance()->GetWindow()); + auto intP = fastWnd->GetInterpreterWeak().lock(); + + if (!intP) { + assert(false && "Lost reference to Fast::Interpreter"); + return 320; + } + + uint32_t height, width; + intP->GetCurDimensions(&width, &height); + + return width; } // Gets the height of the current render target area extern "C" uint32_t OTRGetGameRenderHeight() { - return gfx_current_dimensions.height; + auto fastWnd = dynamic_pointer_cast(Ship::Context::GetInstance()->GetWindow()); + auto intP = fastWnd->GetInterpreterWeak().lock(); + + if (!intP) { + assert(false && "Lost reference to Fast::Interpreter"); + return 240; + } + + uint32_t height, width; + intP->GetCurDimensions(&width, &height); + + return height; } f32 floorf(f32 x); // RANDOTODO False positive error "allowing all exceptions is incompatible with previous function" @@ -2496,11 +2518,23 @@ extern "C" void EntranceTracker_SetLastEntranceOverride(s16 entranceIndex) { } extern "C" void Gfx_RegisterBlendedTexture(const char* name, u8* mask, u8* replacement) { - gfx_register_blended_texture(name, mask, replacement); + if (auto intP = dynamic_pointer_cast(Ship::Context::GetInstance()->GetWindow()) + ->GetInterpreterWeak() + .lock()) { + intP->RegisterBlendedTexture(name, mask, replacement); + } else { + assert(false && "Lost reference to Fast::Interpreter"); + } } extern "C" void Gfx_UnregisterBlendedTexture(const char* name) { - gfx_unregister_blended_texture(name); + if (auto intP = dynamic_pointer_cast(Ship::Context::GetInstance()->GetWindow()) + ->GetInterpreterWeak() + .lock()) { + intP->UnregisterBlendedTexture(name); + } else { + assert(false && "Lost reference to Fast::Interpreter"); + } } extern "C" void Gfx_TextureCacheDelete(const uint8_t* texAddr) { @@ -2514,7 +2548,13 @@ extern "C" void Gfx_TextureCacheDelete(const uint8_t* texAddr) { texAddr = (const uint8_t*)ResourceMgr_GetResourceDataByNameHandlingMQ(imgName); } - gfx_texture_cache_delete(texAddr); + if (auto intP = dynamic_pointer_cast(Ship::Context::GetInstance()->GetWindow()) + ->GetInterpreterWeak() + .lock()) { + intP->TextureCacheDelete(texAddr); + } else { + assert(false && "Lost reference to Fast::Interpreter"); + } } void SoH_ProcessDroppedFiles(std::string filePath) { diff --git a/soh/soh/ResourceManagerHelpers.cpp b/soh/soh/ResourceManagerHelpers.cpp index e1074e517..57e0ab270 100644 --- a/soh/soh/ResourceManagerHelpers.cpp +++ b/soh/soh/ResourceManagerHelpers.cpp @@ -11,7 +11,7 @@ #include "resource/type/Array.h" #include "resource/type/Skeleton.h" #include "resource/type/PlayerAnimation.h" -#include +#include #include extern "C" PlayState* gPlayState; @@ -292,7 +292,7 @@ extern "C" char* ResourceMgr_LoadPlayerAnimByName(const char* animPath) { } extern "C" void ResourceMgr_PushCurrentDirectory(char* path) { - gfx_push_current_dir(path); + Fast::gfx_push_current_dir(path); } extern "C" Gfx* ResourceMgr_LoadGfxByName(const char* path) { diff --git a/soh/soh/SohGui/ImGuiUtils.cpp b/soh/soh/SohGui/ImGuiUtils.cpp index 87a8b20e6..ab3d8f59c 100644 --- a/soh/soh/SohGui/ImGuiUtils.cpp +++ b/soh/soh/SohGui/ImGuiUtils.cpp @@ -1,5 +1,6 @@ #include "ImGuiUtils.h" #include +#include #include "assets/soh_assets.h" #include "soh/Enhancements/randomizer/rando_hash.h" diff --git a/soh/soh/SohGui/ResolutionEditor.cpp b/soh/soh/SohGui/ResolutionEditor.cpp index d33a7b43c..41026e1e2 100644 --- a/soh/soh/SohGui/ResolutionEditor.cpp +++ b/soh/soh/SohGui/ResolutionEditor.cpp @@ -3,7 +3,8 @@ #include #include "soh/SohGui/UIWidgets.hpp" -#include +#include +#include #include "soh/OTRGlobals.h" #include "soh/SohGui/SohMenu.h" #include "soh/SohGui/SohGui.hpp" @@ -86,6 +87,16 @@ static bool disabled_pixelCount; using namespace UIWidgets; +static std::weak_ptr mInterpreter; + +std::shared_ptr GetInterpreter() { + auto intP = mInterpreter.lock(); + if (!intP) { + assert(false && "Lost reference to Fast::Interpreter"); + } + return intP; +} + void ResolutionCustomWidget(WidgetInfo& info) { ImGui::BeginDisabled(disabled_everything); // Vertical Resolution @@ -368,18 +379,23 @@ void ResolutionCustomWidget(WidgetInfo& info) { } void RegisterResolutionWidgets() { + auto fastWnd = dynamic_pointer_cast(Ship::Context::GetInstance()->GetWindow()); + mInterpreter = fastWnd->GetInterpreterWeak(); + WidgetPath path = { "Settings", "Graphics", SECTION_COLUMN_2 }; // Resolution visualiser mSohMenu->AddWidget(path, "Viewport dimensions: {} x {}", WIDGET_TEXT) .RaceDisable(false) .PreFunc([](WidgetInfo& info) { + auto gfx_current_game_window_viewport = GetInterpreter().get()->mGameWindowViewport; info.name = fmt::format("Viewport dimensions: {} x {}", gfx_current_game_window_viewport.width, gfx_current_game_window_viewport.height); }); mSohMenu->AddWidget(path, "Internal resolution: {} x {}", WIDGET_TEXT) .RaceDisable(false) .PreFunc([](WidgetInfo& info) { + auto gfx_current_dimensions = GetInterpreter().get()->mCurDimensions; info.name = fmt::format("Internal resolution: {} x {}", gfx_current_dimensions.width, gfx_current_dimensions.height); }); @@ -486,6 +502,7 @@ void RegisterResolutionWidgets() { } } else if (showHorizontalResField) { // Show calculated aspect ratio if (item_aspectRatio) { + auto gfx_current_dimensions = GetInterpreter().get()->mCurDimensions; ImGui::Dummy({ 0, 2 }); const float resolvedAspectRatio = (float)gfx_current_dimensions.width / gfx_current_dimensions.height; @@ -539,6 +556,8 @@ void UpdateResolutionVars() { short integerScale_maximumBounds = 1; // can change when window is resized // This is mostly just for UX purposes, as Fit Automatically logic is part of LUS. + auto gfx_current_game_window_viewport = GetInterpreter().get()->mGameWindowViewport; + auto gfx_current_dimensions = GetInterpreter().get()->mCurDimensions; if (((float)gfx_current_game_window_viewport.width / gfx_current_game_window_viewport.height) > ((float)gfx_current_dimensions.width / gfx_current_dimensions.height)) { // Scale to window height diff --git a/soh/soh/SohGui/SohGui.cpp b/soh/soh/SohGui/SohGui.cpp index 7eb3fc6c7..f4088b6a5 100644 --- a/soh/soh/SohGui/SohGui.cpp +++ b/soh/soh/SohGui/SohGui.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #ifdef __APPLE__ #include "graphic/Fast3D/gfx_metal.h" diff --git a/soh/soh/resource/importer/ArrayFactory.cpp b/soh/soh/resource/importer/ArrayFactory.cpp index 0d80d1ef4..0762704ff 100644 --- a/soh/soh/resource/importer/ArrayFactory.cpp +++ b/soh/soh/resource/importer/ArrayFactory.cpp @@ -20,7 +20,7 @@ ResourceFactoryBinaryArrayV0::ReadResource(std::shared_ptr file, for (uint32_t i = 0; i < array->ArrayCount; i++) { if (array->ArrayType == ArrayResourceType::Vertex) { // OTRTODO: Implement Vertex arrays as just a vertex resource. - F3DVtx data; + Fast::F3DVtx data; data.v.ob[0] = reader->ReadInt16(); data.v.ob[1] = reader->ReadInt16(); data.v.ob[2] = reader->ReadInt16(); diff --git a/soh/soh/resource/importer/CollisionHeaderFactory.cpp b/soh/soh/resource/importer/CollisionHeaderFactory.cpp index 35e51d2af..39bf885a0 100644 --- a/soh/soh/resource/importer/CollisionHeaderFactory.cpp +++ b/soh/soh/resource/importer/CollisionHeaderFactory.cpp @@ -1,6 +1,7 @@ #include "soh/resource/importer/CollisionHeaderFactory.h" #include "soh/resource/type/CollisionHeader.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr diff --git a/soh/soh/resource/importer/PathFactory.cpp b/soh/soh/resource/importer/PathFactory.cpp index 6848fde30..945e36c5f 100644 --- a/soh/soh/resource/importer/PathFactory.cpp +++ b/soh/soh/resource/importer/PathFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/Path.h" #include "soh/resource/logging/PathLogger.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr diff --git a/soh/soh/resource/importer/SceneFactory.cpp b/soh/soh/resource/importer/SceneFactory.cpp index 9f79cd80c..730842b7e 100644 --- a/soh/soh/resource/importer/SceneFactory.cpp +++ b/soh/soh/resource/importer/SceneFactory.cpp @@ -1,4 +1,5 @@ #include "spdlog/spdlog.h" +#include #include "soh/resource/type/SohResourceType.h" #include "soh/resource/importer/SceneFactory.h" #include "soh/resource/type/Scene.h" diff --git a/soh/soh/resource/importer/SkeletonFactory.cpp b/soh/soh/resource/importer/SkeletonFactory.cpp index 108d600de..56338cd03 100644 --- a/soh/soh/resource/importer/SkeletonFactory.cpp +++ b/soh/soh/resource/importer/SkeletonFactory.cpp @@ -1,6 +1,7 @@ #include "soh/resource/importer/SkeletonFactory.h" #include "soh/resource/type/Skeleton.h" #include +#include #include namespace SOH { diff --git a/soh/soh/resource/importer/SkeletonLimbFactory.cpp b/soh/soh/resource/importer/SkeletonLimbFactory.cpp index 7b58976ab..731892f2a 100644 --- a/soh/soh/resource/importer/SkeletonLimbFactory.cpp +++ b/soh/soh/resource/importer/SkeletonLimbFactory.cpp @@ -1,6 +1,7 @@ #include "soh/resource/importer/SkeletonLimbFactory.h" #include "soh/resource/type/SkeletonLimb.h" #include "spdlog/spdlog.h" +#include #include "libultraship/libultraship.h" namespace SOH { diff --git a/soh/soh/resource/importer/TextFactory.cpp b/soh/soh/resource/importer/TextFactory.cpp index 54ed691f8..0a2c1afb4 100644 --- a/soh/soh/resource/importer/TextFactory.cpp +++ b/soh/soh/resource/importer/TextFactory.cpp @@ -1,6 +1,7 @@ #include "soh/resource/importer/TextFactory.h" #include "soh/resource/type/Text.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr diff --git a/soh/soh/resource/importer/scenecommand/EndMarkerFactory.cpp b/soh/soh/resource/importer/scenecommand/EndMarkerFactory.cpp index b54f1cade..f96d541f5 100644 --- a/soh/soh/resource/importer/scenecommand/EndMarkerFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/EndMarkerFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/EndMarker.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr EndMarkerFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/importer/scenecommand/SetActorListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetActorListFactory.cpp index 94eb62f14..5b9f851d1 100644 --- a/soh/soh/resource/importer/scenecommand/SetActorListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetActorListFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetActorList.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr SetActorListFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/importer/scenecommand/SetAlternateHeadersFactory.cpp b/soh/soh/resource/importer/scenecommand/SetAlternateHeadersFactory.cpp index 70b045d07..5a6d35cc2 100644 --- a/soh/soh/resource/importer/scenecommand/SetAlternateHeadersFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetAlternateHeadersFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetAlternateHeaders.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include #include "libultraship/libultraship.h" namespace SOH { diff --git a/soh/soh/resource/importer/scenecommand/SetCameraSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetCameraSettingsFactory.cpp index 318f6d4fe..e2f4de65b 100644 --- a/soh/soh/resource/importer/scenecommand/SetCameraSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetCameraSettingsFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetCameraSettings.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr diff --git a/soh/soh/resource/importer/scenecommand/SetCollisionHeaderFactory.cpp b/soh/soh/resource/importer/scenecommand/SetCollisionHeaderFactory.cpp index c348b8986..cc0a7b005 100644 --- a/soh/soh/resource/importer/scenecommand/SetCollisionHeaderFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetCollisionHeaderFactory.cpp @@ -3,6 +3,7 @@ #include "soh/resource/logging/SceneCommandLoggers.h" #include "libultraship/libultraship.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr diff --git a/soh/soh/resource/importer/scenecommand/SetCsCameraFactory.cpp b/soh/soh/resource/importer/scenecommand/SetCsCameraFactory.cpp index eb54b0a22..ed08c88be 100644 --- a/soh/soh/resource/importer/scenecommand/SetCsCameraFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetCsCameraFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetCsCamera.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr SetCsCameraFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/importer/scenecommand/SetCutscenesFactory.cpp b/soh/soh/resource/importer/scenecommand/SetCutscenesFactory.cpp index 20f96ec46..a8883b2e4 100644 --- a/soh/soh/resource/importer/scenecommand/SetCutscenesFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetCutscenesFactory.cpp @@ -3,6 +3,7 @@ #include "soh/resource/logging/SceneCommandLoggers.h" #include #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr SetCutscenesFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/importer/scenecommand/SetEchoSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetEchoSettingsFactory.cpp index f71925bdd..3352a2ef2 100644 --- a/soh/soh/resource/importer/scenecommand/SetEchoSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetEchoSettingsFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetEchoSettings.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr SetEchoSettingsFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/importer/scenecommand/SetEntranceListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetEntranceListFactory.cpp index e033e7d79..eab272b89 100644 --- a/soh/soh/resource/importer/scenecommand/SetEntranceListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetEntranceListFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetEntranceList.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr SetEntranceListFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/importer/scenecommand/SetExitListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetExitListFactory.cpp index cc0128a4f..a1cb515ff 100644 --- a/soh/soh/resource/importer/scenecommand/SetExitListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetExitListFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetExitList.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr SetExitListFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/importer/scenecommand/SetLightListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetLightListFactory.cpp index 9ef1e944f..ebb819634 100644 --- a/soh/soh/resource/importer/scenecommand/SetLightListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetLightListFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetLightList.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr SetLightListFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/importer/scenecommand/SetLightingSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetLightingSettingsFactory.cpp index 545d24f69..01c5d59e1 100644 --- a/soh/soh/resource/importer/scenecommand/SetLightingSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetLightingSettingsFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetLightingSettings.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr diff --git a/soh/soh/resource/importer/scenecommand/SetMeshFactory.cpp b/soh/soh/resource/importer/scenecommand/SetMeshFactory.cpp index 05e3169ce..2f6bf5568 100644 --- a/soh/soh/resource/importer/scenecommand/SetMeshFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetMeshFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetMesh.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include #include "libultraship/libultraship.h" namespace SOH { diff --git a/soh/soh/resource/importer/scenecommand/SetObjectListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetObjectListFactory.cpp index 37d340e36..fbee15e8a 100644 --- a/soh/soh/resource/importer/scenecommand/SetObjectListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetObjectListFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetObjectList.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr SetObjectListFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/importer/scenecommand/SetPathwaysFactory.cpp b/soh/soh/resource/importer/scenecommand/SetPathwaysFactory.cpp index 084d05aae..62a3d0d7f 100644 --- a/soh/soh/resource/importer/scenecommand/SetPathwaysFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetPathwaysFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetPathways.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include #include namespace SOH { diff --git a/soh/soh/resource/importer/scenecommand/SetRoomBehaviorFactory.cpp b/soh/soh/resource/importer/scenecommand/SetRoomBehaviorFactory.cpp index de9a01e77..9b18593f5 100644 --- a/soh/soh/resource/importer/scenecommand/SetRoomBehaviorFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetRoomBehaviorFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetRoomBehavior.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr SetRoomBehaviorFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/importer/scenecommand/SetRoomListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetRoomListFactory.cpp index cc03b9f12..7925a012f 100644 --- a/soh/soh/resource/importer/scenecommand/SetRoomListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetRoomListFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetRoomList.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr SetRoomListFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/importer/scenecommand/SetSkyboxModifierFactory.cpp b/soh/soh/resource/importer/scenecommand/SetSkyboxModifierFactory.cpp index 5168b8c32..a071cc4d0 100644 --- a/soh/soh/resource/importer/scenecommand/SetSkyboxModifierFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetSkyboxModifierFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetSkyboxModifier.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr diff --git a/soh/soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.cpp index e5d3c55c3..3434505cb 100644 --- a/soh/soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetSkyboxSettingsFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetSkyboxSettings.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr diff --git a/soh/soh/resource/importer/scenecommand/SetSoundSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetSoundSettingsFactory.cpp index 6826eae4c..a72acce8c 100644 --- a/soh/soh/resource/importer/scenecommand/SetSoundSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetSoundSettingsFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetSoundSettings.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr SetSoundSettingsFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/importer/scenecommand/SetSpecialObjectsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetSpecialObjectsFactory.cpp index 44adb5d28..2877dc88a 100644 --- a/soh/soh/resource/importer/scenecommand/SetSpecialObjectsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetSpecialObjectsFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetSpecialObjects.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr diff --git a/soh/soh/resource/importer/scenecommand/SetStartPositionListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetStartPositionListFactory.cpp index 3a8c885ac..d370cde2b 100644 --- a/soh/soh/resource/importer/scenecommand/SetStartPositionListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetStartPositionListFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetStartPositionList.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr diff --git a/soh/soh/resource/importer/scenecommand/SetTimeSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetTimeSettingsFactory.cpp index 2a3ec29cf..714570208 100644 --- a/soh/soh/resource/importer/scenecommand/SetTimeSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetTimeSettingsFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetTimeSettings.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr SetTimeSettingsFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/importer/scenecommand/SetTransitionActorListFactory.cpp b/soh/soh/resource/importer/scenecommand/SetTransitionActorListFactory.cpp index e026302a0..fd028b6e3 100644 --- a/soh/soh/resource/importer/scenecommand/SetTransitionActorListFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetTransitionActorListFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetTransitionActorList.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr diff --git a/soh/soh/resource/importer/scenecommand/SetWindSettingsFactory.cpp b/soh/soh/resource/importer/scenecommand/SetWindSettingsFactory.cpp index 7c810c233..86f0af515 100644 --- a/soh/soh/resource/importer/scenecommand/SetWindSettingsFactory.cpp +++ b/soh/soh/resource/importer/scenecommand/SetWindSettingsFactory.cpp @@ -2,6 +2,7 @@ #include "soh/resource/type/scenecommand/SetWindSettings.h" #include "soh/resource/logging/SceneCommandLoggers.h" #include "spdlog/spdlog.h" +#include namespace SOH { std::shared_ptr SetWindSettingsFactory::ReadResource(std::shared_ptr initData, diff --git a/soh/soh/resource/logging/PathLogger.cpp b/soh/soh/resource/logging/PathLogger.cpp index 437815000..47b0081f3 100644 --- a/soh/soh/resource/logging/PathLogger.cpp +++ b/soh/soh/resource/logging/PathLogger.cpp @@ -1,5 +1,6 @@ #include "soh/resource/type/Path.h" #include "spdlog/spdlog.h" +#include namespace SOH { void LogPathAsXML(std::shared_ptr resource) { diff --git a/soh/soh/resource/logging/SceneCommandLoggers.cpp b/soh/soh/resource/logging/SceneCommandLoggers.cpp index b0821bdb9..8a464172d 100644 --- a/soh/soh/resource/logging/SceneCommandLoggers.cpp +++ b/soh/soh/resource/logging/SceneCommandLoggers.cpp @@ -24,6 +24,7 @@ #include "soh/resource/type/scenecommand/SetTransitionActorList.h" #include "soh/resource/type/scenecommand/SetWindSettings.h" #include "spdlog/spdlog.h" +#include #include namespace SOH { diff --git a/soh/soh/resource/type/Array.cpp b/soh/soh/resource/type/Array.cpp index d9c3b1cb4..a4bbc0e5e 100644 --- a/soh/soh/resource/type/Array.cpp +++ b/soh/soh/resource/type/Array.cpp @@ -23,7 +23,7 @@ size_t Array::GetPointerSize() { size_t typeSize = 0; switch (ArrayType) { case ArrayResourceType::Vertex: - typeSize = sizeof(F3DVtx); + typeSize = sizeof(Fast::F3DVtx); break; case ArrayResourceType::Scalar: default: diff --git a/soh/soh/resource/type/Array.h b/soh/soh/resource/type/Array.h index cefea1bc8..c7d15a22a 100644 --- a/soh/soh/resource/type/Array.h +++ b/soh/soh/resource/type/Array.h @@ -2,7 +2,10 @@ #include "resource/Resource.h" +namespace Fast { union F3DVtx; +} + namespace SOH { typedef union ScalarData { uint8_t u8; @@ -80,6 +83,6 @@ class Array : public Ship::Resource { size_t ArrayCount; // OTRTODO: Should be a vector of resource pointers... std::vector Scalars; - std::vector Vertices; + std::vector Vertices; }; } // namespace SOH