diff options
| author | Random <28494085+Random06457@users.noreply.github.com> | 2023-11-16 00:50:31 +0100 |
|---|---|---|
| committer | louist103 <35883445+louist103@users.noreply.github.com> | 2024-03-02 12:06:49 -0500 |
| commit | c39d88d2782460be8085875686967d1438f6b5fe (patch) | |
| tree | 8f800917c26fc80c671da0d718b645d14afdc5f1 | |
| parent | 331b021883b6fca7c3a1836877a0fcf8e883ebe5 (diff) | |
Linux/GCC related fixes (#1)
* linux fixes
Fixes case sensitive path, -1 used in a uint16_t enum, CMD_F and soh include path
* fix type correctness
| -rw-r--r-- | OTRExporter/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | OTRExporter/CutsceneExporter.cpp | 4 | ||||
| -rw-r--r-- | OTRExporter/RoomExporter.cpp | 2 | ||||
| -rw-r--r-- | OTRExporter/TextureAnimationExporter.h | 2 | ||||
| -rw-r--r-- | OTRExporter/command_macros_base.h | 4 |
5 files changed, 5 insertions, 9 deletions
diff --git a/OTRExporter/CMakeLists.txt b/OTRExporter/CMakeLists.txt index 854430e..7817190 100644 --- a/OTRExporter/CMakeLists.txt +++ b/OTRExporter/CMakeLists.txt @@ -170,7 +170,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/spdlog/include
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/nlohmann-json/include
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/src/resource
- ${CMAKE_CURRENT_SOURCE_DIR}/../../soh/soh
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../mm/2s2h
.
)
diff --git a/OTRExporter/CutsceneExporter.cpp b/OTRExporter/CutsceneExporter.cpp index e7c782d..42d2d4f 100644 --- a/OTRExporter/CutsceneExporter.cpp +++ b/OTRExporter/CutsceneExporter.cpp @@ -450,8 +450,8 @@ void OTRExporter_Cutscene::SaveOot(ZCutscene* cs, BinaryWriter* writer) { } // MUST be uint16_t for -1 typedef enum : uint16_t{ - /* -1 */ CS_TEXT_TYPE_NONE = -1, - /* 0 */ CS_TEXT_TYPE_DEFAULT, + /* -1 */ CS_TEXT_TYPE_NONE = (uint16_t)-1, + /* 0 */ CS_TEXT_TYPE_DEFAULT = 0, /* 1 */ CS_TEXT_TYPE_1, /* 2 */ CS_TEXT_OCARINA_ACTION, /* 3 */ CS_TEXT_TYPE_3, diff --git a/OTRExporter/RoomExporter.cpp b/OTRExporter/RoomExporter.cpp index fe1b2e3..0357d90 100644 --- a/OTRExporter/RoomExporter.cpp +++ b/OTRExporter/RoomExporter.cpp @@ -172,7 +172,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite for (const auto& c : cmdCsCam->cameras) { writer->Write(c.type); writer->Write(c.numPoints); - for (size_t i = 0; i < c.numPoints; i++) { + for (int16_t i = 0; i < c.numPoints; i++) { writer->Write(cmdCsCam->points[((c.baseOffset - arrBase) / 6) + i].scalars[0].scalarData.s16); writer->Write(cmdCsCam->points[((c.baseOffset - arrBase) / 6) + i].scalars[1].scalarData.s16); writer->Write(cmdCsCam->points[((c.baseOffset - arrBase) / 6) + i].scalars[2].scalarData.s16); diff --git a/OTRExporter/TextureAnimationExporter.h b/OTRExporter/TextureAnimationExporter.h index 40b1983..1ac12d3 100644 --- a/OTRExporter/TextureAnimationExporter.h +++ b/OTRExporter/TextureAnimationExporter.h @@ -3,7 +3,7 @@ #include "ZResource.h"
#include "ZTextureAnimation.h"
#include "Exporter.h"
-#include <utils/BinaryWriter.h>
+#include <Utils/BinaryWriter.h>
class OTRExporter_TextureAnimation : public OTRExporter
{
diff --git a/OTRExporter/command_macros_base.h b/OTRExporter/command_macros_base.h index 3067d2c..1506c78 100644 --- a/OTRExporter/command_macros_base.h +++ b/OTRExporter/command_macros_base.h @@ -25,11 +25,7 @@ #define CMD_W(a) (a) -#if defined(__GNUC__) -#define CMD_F(a) {.f = (a)} -#else #define CMD_F(a) {(a)} -#endif #define CMD_PTR(a) (u32)(a) |
