[nostalgia,turbine] Make GBA files (other than ARM asm) build on all platforms

This commit is contained in:
2023-06-18 23:02:03 -05:00
parent 7c1c9a697e
commit 56e980385c
8 changed files with 54 additions and 21 deletions

View File

@@ -3,9 +3,8 @@ add_library(
gfx.cpp
)
if(TURBINE_BUILD_TYPE STREQUAL "GBA")
add_subdirectory(gba)
else()
add_subdirectory(gba)
if(NOT TURBINE_BUILD_TYPE STREQUAL "GBA")
add_subdirectory(opengl)
endif()

View File

@@ -1,12 +1,20 @@
enable_language(CXX ASM)
set_source_files_properties(gfx.cpp PROPERTIES COMPILE_FLAGS -marm)
target_sources(
NostalgiaCore PRIVATE
add_library(
NostalgiaCore-GBA OBJECT
context.cpp
gfx.cpp
panic.cpp
)
target_include_directories(
NostalgiaCore-GBA PUBLIC
../../include
)
target_link_libraries(
NostalgiaCore PUBLIC
NostalgiaCore-GBA PUBLIC
TeaGBA
)
Keel
)
if(TURBINE_BUILD_TYPE STREQUAL "GBA")
set_source_files_properties(gfx.cpp PROPERTIES COMPILE_FLAGS -marm)
target_link_libraries(NostalgiaCore PUBLIC NostalgiaCore-GBA)
endif()

View File

@@ -197,7 +197,7 @@ ox::Error loadSpritePalette(Context *ctx, unsigned cbb, const ox::FileAddress &p
void puts(Context *ctx, int column, int row, ox::CRStringView str) noexcept {
const auto col = static_cast<unsigned>(column);
for (auto i = 0u; i < str.bytes(); i++) {
const auto c = charMap[static_cast<unsigned>(str[i])];
const auto c = charMap[static_cast<std::size_t>(str[i])];
setTile(ctx, 0, static_cast<int>(col + i), row, static_cast<uint8_t>(c));
}
}