mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-15 09:33:00 -07:00
fix compilation
This commit is contained in:
parent
51e58b9e13
commit
72fcd19a9e
7 changed files with 37 additions and 29 deletions
|
@ -45,7 +45,7 @@ endif
|
||||||
# CXXFLAGS += -DTEXTURE_DEBUG
|
# CXXFLAGS += -DTEXTURE_DEBUG
|
||||||
|
|
||||||
LDFLAGS := -lm -ldl -lpng \
|
LDFLAGS := -lm -ldl -lpng \
|
||||||
-L../external -L../libultraship -lz -lbz2 -pthread -lpulse -lultraship -lstorm -lSDL2 -lGLEW -lGL -lX11
|
-L../StormLib/build -L../libultraship -lz -lbz2 -pthread -lpulse -lultraship -lstorm -lSDL2 -lGLEW -lGL -lX11
|
||||||
|
|
||||||
# Use LLD if available. Set LLD=0 to not use it
|
# Use LLD if available. Set LLD=0 to not use it
|
||||||
ifeq ($(shell command -v ld.lld >/dev/null 2>&1; echo $$?),0)
|
ifeq ($(shell command -v ld.lld >/dev/null 2>&1; echo $$?),0)
|
||||||
|
|
|
@ -461,8 +461,8 @@ char* OldMain(char* infilename)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char comprType[5] = {
|
char comprType[5] = {
|
||||||
CommChunk.compressionTypeH >> 8, CommChunk.compressionTypeH & 0xFF,
|
static_cast<char>(CommChunk.compressionTypeH >> 8), static_cast<char>(CommChunk.compressionTypeH & 0xFF),
|
||||||
CommChunk.compressionTypeL >> 8, CommChunk.compressionTypeL & 0xFF, 0};
|
static_cast<char>(CommChunk.compressionTypeL >> 8), static_cast<char>(CommChunk.compressionTypeL & 0xFF), 0};
|
||||||
fail_parse("file is of the wrong compression type [got %s (%08x)]", &comprType,
|
fail_parse("file is of the wrong compression type [got %s (%08x)]", &comprType,
|
||||||
cType);
|
cType);
|
||||||
}
|
}
|
||||||
|
@ -603,8 +603,8 @@ char* OldMain(char* infilename)
|
||||||
{
|
{
|
||||||
s32 startPos = aloops[0].start, endPos = aloops[0].end;
|
s32 startPos = aloops[0].start, endPos = aloops[0].end;
|
||||||
const char* markerNames[2] = {"start", "end"};
|
const char* markerNames[2] = {"start", "end"};
|
||||||
Marker markers[2] = {{1, startPos >> 16, startPos & 0xffff},
|
Marker markers[2] = {{1, static_cast<u16>(startPos >> 16), static_cast<u16>(startPos & 0xffff)},
|
||||||
{2, endPos >> 16, endPos & 0xffff}};
|
{2, static_cast<u16>(endPos >> 16), static_cast<u16>(endPos & 0xffff)}};
|
||||||
write_header(ofile, "MARK", 2 + 2 * sizeof(Marker) + 1 + 5 + 1 + 3);
|
write_header(ofile, "MARK", 2 + 2 * sizeof(Marker) + 1 + 5 + 1 + 3);
|
||||||
s16 numMarkers = bswap16(2);
|
s16 numMarkers = bswap16(2);
|
||||||
fwrite(&numMarkers, sizeof(s16), 1, ofile);
|
fwrite(&numMarkers, sizeof(s16), 1, ofile);
|
||||||
|
|
|
@ -18,8 +18,11 @@ WARN := -Wall -Wextra -Werror \
|
||||||
-Wno-narrowing \
|
-Wno-narrowing \
|
||||||
-Wno-missing-field-initializers
|
-Wno-missing-field-initializers
|
||||||
|
|
||||||
CXXFLAGS := $(WARN) -std=c++20 -D_GNU_SOURCE -DENABLE_OPENGL -DSPDLOG_ACTIVE_LEVEL=0 -m32
|
CWARN :=
|
||||||
CFLAGS := $(WARN) -std=c99 -D_GNU_SOURCE -DENABLE_OPENGL -DSPDLOG_ACTIVE_LEVEL=0 -m32
|
CXXWARN := -Wno-deprecated-enum-enum-conversion
|
||||||
|
|
||||||
|
CXXFLAGS := $(WARN) $(CXXWARN) -std=c++20 -D_GNU_SOURCE -DENABLE_OPENGL -DSPDLOG_ACTIVE_LEVEL=0
|
||||||
|
CFLAGS := $(WARN) $(CWARN) -std=c99 -D_GNU_SOURCE -DENABLE_OPENGL -DSPDLOG_ACTIVE_LEVEL=0
|
||||||
CPPFLAGS := -MMD
|
CPPFLAGS := -MMD
|
||||||
|
|
||||||
ifneq ($(DEBUG),0)
|
ifneq ($(DEBUG),0)
|
||||||
|
@ -40,10 +43,10 @@ endif
|
||||||
SRC_DIRS := $(shell find -type d -not -path "*build*")
|
SRC_DIRS := $(shell find -type d -not -path "*build*")
|
||||||
|
|
||||||
CXX_FILES := \
|
CXX_FILES := \
|
||||||
$(shell find libultraship/Factories -name *.cpp) \
|
$(shell find libultraship/Factories -name "*.cpp") \
|
||||||
$(shell find libultraship/Lib/Fast3D -name *.cpp) \
|
$(shell find libultraship/Lib/Fast3D -name *.cpp") \
|
||||||
$(shell find libultraship -maxdepth 1 -name *.cpp) \
|
$(shell find libultraship -maxdepth 1 -name "*.cpp") \
|
||||||
$(shell find libultraship/Lib/ImGui -maxdepth 1 -name *.cpp) \
|
$(shell find libultraship/Lib/ImGui -maxdepth 1 -name "*.cpp") \
|
||||||
libultraship/Lib/ImGui/backends/imgui_impl_opengl3.cpp \
|
libultraship/Lib/ImGui/backends/imgui_impl_opengl3.cpp \
|
||||||
libultraship/Lib/ImGui/backends/imgui_impl_sdl.cpp \
|
libultraship/Lib/ImGui/backends/imgui_impl_sdl.cpp \
|
||||||
libultraship/Lib/StrHash64.cpp \
|
libultraship/Lib/StrHash64.cpp \
|
||||||
|
@ -53,7 +56,7 @@ C_FILES := \
|
||||||
libultraship/mixer.c \
|
libultraship/mixer.c \
|
||||||
libultraship/Lib/stb/stb_impl.c
|
libultraship/Lib/stb/stb_impl.c
|
||||||
|
|
||||||
FMT_FILES := $(shell find libultraship/ -type f \( -name *.cpp -o -name *.h \) -a -not -path "libultraship/Lib/*")
|
FMT_FILES := $(shell find libultraship/ -type f \( -name "*.cpp" -o -name "*.h" \) -a -not -path "libultraship/Lib/*")
|
||||||
|
|
||||||
O_FILES := \
|
O_FILES := \
|
||||||
$(CXX_FILES:%.cpp=build/%.o) \
|
$(CXX_FILES:%.cpp=build/%.o) \
|
||||||
|
@ -69,6 +72,7 @@ INC_DIRS := $(addprefix -I, \
|
||||||
libultraship/Lib/spdlog \
|
libultraship/Lib/spdlog \
|
||||||
libultraship/Lib/spdlog/include \
|
libultraship/Lib/spdlog/include \
|
||||||
libultraship \
|
libultraship \
|
||||||
|
../StormLib/src \
|
||||||
)
|
)
|
||||||
|
|
||||||
# create build directories
|
# create build directories
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
#include "U64/PR/ultra64/types.h"
|
#include "U64/PR/ultra64/types.h"
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,9 @@ namespace Ship
|
||||||
Array = 0x4F415252, // OARR
|
Array = 0x4F415252, // OARR
|
||||||
Text = 0x4F545854, // OTXT
|
Text = 0x4F545854, // OTXT
|
||||||
Blob = 0x4F424C42, // OBLB
|
Blob = 0x4F424C42, // OBLB
|
||||||
Audio = 'OAUD',
|
Audio = 0x4F415544, // OAUD
|
||||||
AudioSample = 'OSMP',
|
AudioSample = 0x4F534D50, // OSMP
|
||||||
AudioSoundFont = 'OSFT',
|
AudioSoundFont = 0x4F534654, // OSFT
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class DataType
|
enum class DataType
|
||||||
|
|
25
soh/Makefile
25
soh/Makefile
|
@ -16,11 +16,11 @@ LTO ?= 0
|
||||||
WARN := \
|
WARN := \
|
||||||
-Wno-return-type \
|
-Wno-return-type \
|
||||||
-funsigned-char \
|
-funsigned-char \
|
||||||
-m32 -mhard-float -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-strict-aliasing -fno-inline-functions -fno-inline-small-functions -fno-toplevel-reorder -ffreestanding -fwrapv \
|
-mhard-float -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-strict-aliasing -fno-inline-functions -fno-inline-small-functions -fno-toplevel-reorder -ffreestanding -fwrapv \
|
||||||
|
|
||||||
CXXFLAGS := $(WARN) -std=c++20 -D_GNU_SOURCE -fpermissive -no-pie -nostdlib -march=i386 -msse2 -mfpmath=sse
|
CXXFLAGS := $(WARN) -std=c++20 -D_GNU_SOURCE -fpermissive -no-pie -nostdlib -msse2 -mfpmath=sse
|
||||||
CFLAGS := $(WARN) -std=c99 -D_GNU_SOURCE -no-pie -nostdlib -march=i386 -msse2 -mfpmath=sse
|
CFLAGS := $(WARN) -std=c99 -D_GNU_SOURCE -no-pie -nostdlib -msse2 -mfpmath=sse
|
||||||
LDFLAGS := -m32
|
LDFLAGS :=
|
||||||
CPPFLAGS := -MMD
|
CPPFLAGS := -MMD
|
||||||
|
|
||||||
ifneq ($(DEBUG),0)
|
ifneq ($(DEBUG),0)
|
||||||
|
@ -54,7 +54,7 @@ INC_DIRS := $(addprefix -I, \
|
||||||
)
|
)
|
||||||
|
|
||||||
LDDIRS := $(addprefix -L, \
|
LDDIRS := $(addprefix -L, \
|
||||||
../external \
|
../StormLib/build \
|
||||||
../libultraship/ \
|
../libultraship/ \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -87,14 +87,14 @@ TEXTURE_FILES_OUT := $(foreach f,$(TEXTURE_FILES_PNG:.png=.inc.c),build/$f) \
|
||||||
$(foreach f,$(TEXTURE_FILES_JPG:.jpg=.jpg.inc.c),build/$f) \
|
$(foreach f,$(TEXTURE_FILES_JPG:.jpg=.jpg.inc.c),build/$f) \
|
||||||
|
|
||||||
CXX_FILES := \
|
CXX_FILES := \
|
||||||
$(shell find soh -type f -name *.cpp)
|
$(shell find soh -type f -name "*.cpp")
|
||||||
|
|
||||||
C_FILES := \
|
C_FILES := \
|
||||||
$(shell find soh -type f -name *.c) \
|
$(shell find soh -type f -name "*.c") \
|
||||||
$(shell find src/boot -type f -name *.c) \
|
$(shell find src/boot -type f -name "*.c") \
|
||||||
$(shell find src/buffers -type f -name *.c) \
|
$(shell find src/buffers -type f -name "*.c") \
|
||||||
$(shell find src/code -type f -name *.c) \
|
$(shell find src/code -type f -name "*.c") \
|
||||||
$(shell find src/overlays -type f -name *.c) \
|
$(shell find src/overlays -type f -name "*.c") \
|
||||||
src/libultra/gu/coss.c \
|
src/libultra/gu/coss.c \
|
||||||
src/libultra/gu/guLookAt.c \
|
src/libultra/gu/guLookAt.c \
|
||||||
src/libultra/gu/guLookAtHilite.c \
|
src/libultra/gu/guLookAtHilite.c \
|
||||||
|
@ -125,6 +125,8 @@ setup:
|
||||||
$(MAKE) mpq
|
$(MAKE) mpq
|
||||||
|
|
||||||
mpq:
|
mpq:
|
||||||
|
cmake -B ../StormLib/build -S ../StormLib
|
||||||
|
cmake --build ../StormLib/build
|
||||||
$(MAKE) -C ../libultraship
|
$(MAKE) -C ../libultraship
|
||||||
$(MAKE) -C ../OTRExporter/OTRExporter
|
$(MAKE) -C ../OTRExporter/OTRExporter
|
||||||
$(MAKE) -C ../ZAPDTR
|
$(MAKE) -C ../ZAPDTR
|
||||||
|
@ -137,6 +139,7 @@ distclean: clean
|
||||||
$(MAKE) clean -C ../libultraship
|
$(MAKE) clean -C ../libultraship
|
||||||
$(MAKE) clean -C ../OTRExporter/OTRExporter
|
$(MAKE) clean -C ../OTRExporter/OTRExporter
|
||||||
$(MAKE) clean -C ../ZAPDTR
|
$(MAKE) clean -C ../ZAPDTR
|
||||||
|
rm -rf ../StormLib/build
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf build $(TARGET)
|
rm -rf build $(TARGET)
|
||||||
|
|
|
@ -51,9 +51,9 @@ s32 AudioLoad_Dma(OSIoMesg* mesg, u32 priority, s32 direction, uintptr_t devAddr
|
||||||
OSMesgQueue* reqQueue, s32 medium, const char* dmaFuncType);
|
OSMesgQueue* reqQueue, s32 medium, const char* dmaFuncType);
|
||||||
void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, OSMesgQueue* retQueue);
|
void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, OSMesgQueue* retQueue);
|
||||||
AudioAsyncLoad* AudioLoad_StartAsyncLoadUnkMedium(s32 unkMediumParam, uintptr_t devAddr, uintptr_t ramAddr,
|
AudioAsyncLoad* AudioLoad_StartAsyncLoadUnkMedium(s32 unkMediumParam, uintptr_t devAddr, uintptr_t ramAddr,
|
||||||
ptrdiff_t size, s32 medium,
|
size_t size, s32 medium,
|
||||||
s32 nChunks, OSMesgQueue* retQueue, s32 retMsg);
|
s32 nChunks, OSMesgQueue* retQueue, s32 retMsg);
|
||||||
AudioAsyncLoad* AudioLoad_StartAsyncLoad(u32 devAddr, uintptr_t ramAddr, size_t size, s32 medium, s32 nChunks,
|
AudioAsyncLoad* AudioLoad_StartAsyncLoad(uintptr_t devAddr, uintptr_t ramAddr, size_t size, s32 medium, s32 nChunks,
|
||||||
OSMesgQueue* retQueue, s32 retMsg);
|
OSMesgQueue* retQueue, s32 retMsg);
|
||||||
void AudioLoad_AsyncDma(AudioAsyncLoad* asyncLoad, size_t size);
|
void AudioLoad_AsyncDma(AudioAsyncLoad* asyncLoad, size_t size);
|
||||||
void AudioLoad_AsyncDmaUnkMedium(uintptr_t devAddr, uintptr_t ramAddr, size_t size, s16 arg3);
|
void AudioLoad_AsyncDmaUnkMedium(uintptr_t devAddr, uintptr_t ramAddr, size_t size, s16 arg3);
|
||||||
|
@ -1638,7 +1638,7 @@ void AudioLoad_InitAsyncLoads(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioAsyncLoad* AudioLoad_StartAsyncLoadUnkMedium(s32 unkMediumParam, u32 devAddr, uintptr_t ramAddr, size_t size,
|
AudioAsyncLoad* AudioLoad_StartAsyncLoadUnkMedium(s32 unkMediumParam, uintptr_t devAddr, uintptr_t ramAddr, size_t size,
|
||||||
s32 medium,
|
s32 medium,
|
||||||
s32 nChunks, OSMesgQueue* retQueue, s32 retMsg) {
|
s32 nChunks, OSMesgQueue* retQueue, s32 retMsg) {
|
||||||
AudioAsyncLoad* asyncLoad;
|
AudioAsyncLoad* asyncLoad;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue