Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux/GCC related fixes #1

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OTRExporter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,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
.
)

Expand Down
4 changes: 2 additions & 2 deletions OTRExporter/CutsceneExporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
louist103 marked this conversation as resolved.
Show resolved Hide resolved
/* 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,
Expand Down
2 changes: 1 addition & 1 deletion OTRExporter/RoomExporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion OTRExporter/TextureAnimationExporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
4 changes: 0 additions & 4 deletions OTRExporter/command_macros_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down