[nostalgia/core] Fix GBA compile errors

This commit is contained in:
Gary Talent 2019-10-28 00:41:20 -05:00
parent 4f81c47734
commit ce94af3f00
3 changed files with 13 additions and 2 deletions

View File

@ -2,6 +2,7 @@ if(NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
enable_language(C ASM) enable_language(C ASM)
set( set(
CPP CPP
gba/core.cpp
gba/gfx.cpp gba/gfx.cpp
gba/media.cpp gba/media.cpp
gba/mem.cpp gba/mem.cpp
@ -35,6 +36,7 @@ add_library(
target_link_libraries( target_link_libraries(
NostalgiaCore PUBLIC NostalgiaCore PUBLIC
NostalgiaCommon NostalgiaCommon
OxFS
) )
if(NOSTALGIA_BUILD_TYPE STREQUAL "Native") if(NOSTALGIA_BUILD_TYPE STREQUAL "Native")

View File

@ -169,6 +169,10 @@ ox::Error initGfx(Context*) {
return OxError(0); return OxError(0);
} }
ox::Error shutdownGfx() {
return OxError(0);
}
// Do NOT use Context in the GBA version of this function. // Do NOT use Context in the GBA version of this function.
ox::Error initConsole(Context*) { ox::Error initConsole(Context*) {
const auto PaletteStart = sizeof(GbaImageDataHeader); const auto PaletteStart = sizeof(GbaImageDataHeader);
@ -204,7 +208,12 @@ ox::Error initConsole(Context*) {
return err; return err;
} }
ox::Error loadTileSheet(Context*, ox::FileAddress inode) { ox::Error loadTileSheet(Context*,
TileSheetSpace,
int,
ox::FileAddress tilesheetPath,
ox::FileAddress) {
auto inode = tilesheetPath.getInode().value;
ox::Error err(0); ox::Error err(0);
const auto PaletteStart = sizeof(GbaImageDataHeader); const auto PaletteStart = sizeof(GbaImageDataHeader);
GbaImageDataHeader imgData; GbaImageDataHeader imgData;

View File

@ -12,7 +12,7 @@
namespace nostalgia::core { namespace nostalgia::core {
void panic(const char *msg) { void panic(const char *msg) {
initConsole(nullptr); oxIgnoreError(initConsole(nullptr));
puts(nullptr, 1 * 32 + 0, "SADNESS..."); puts(nullptr, 1 * 32 + 0, "SADNESS...");
puts(nullptr, 4 * 32 + 0, "UNEXPECTED STATE:"); puts(nullptr, 4 * 32 + 0, "UNEXPECTED STATE:");
puts(nullptr, 6 * 32 + 2, msg); puts(nullptr, 6 * 32 + 2, msg);