From ce94af3f00e1a8602b8f88b17b444762df22f088 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 28 Oct 2019 00:41:20 -0500 Subject: [PATCH] [nostalgia/core] Fix GBA compile errors --- src/nostalgia/core/CMakeLists.txt | 2 ++ src/nostalgia/core/gba/gfx.cpp | 11 ++++++++++- src/nostalgia/core/gba/panic.cpp | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/nostalgia/core/CMakeLists.txt b/src/nostalgia/core/CMakeLists.txt index a584eabb..c904c3a4 100644 --- a/src/nostalgia/core/CMakeLists.txt +++ b/src/nostalgia/core/CMakeLists.txt @@ -2,6 +2,7 @@ if(NOSTALGIA_BUILD_TYPE STREQUAL "GBA") enable_language(C ASM) set( CPP + gba/core.cpp gba/gfx.cpp gba/media.cpp gba/mem.cpp @@ -35,6 +36,7 @@ add_library( target_link_libraries( NostalgiaCore PUBLIC NostalgiaCommon + OxFS ) if(NOSTALGIA_BUILD_TYPE STREQUAL "Native") diff --git a/src/nostalgia/core/gba/gfx.cpp b/src/nostalgia/core/gba/gfx.cpp index f59e83a9..f0022b6f 100644 --- a/src/nostalgia/core/gba/gfx.cpp +++ b/src/nostalgia/core/gba/gfx.cpp @@ -169,6 +169,10 @@ ox::Error initGfx(Context*) { return OxError(0); } +ox::Error shutdownGfx() { + return OxError(0); +} + // Do NOT use Context in the GBA version of this function. ox::Error initConsole(Context*) { const auto PaletteStart = sizeof(GbaImageDataHeader); @@ -204,7 +208,12 @@ ox::Error initConsole(Context*) { 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); const auto PaletteStart = sizeof(GbaImageDataHeader); GbaImageDataHeader imgData; diff --git a/src/nostalgia/core/gba/panic.cpp b/src/nostalgia/core/gba/panic.cpp index 52549033..5b72101a 100644 --- a/src/nostalgia/core/gba/panic.cpp +++ b/src/nostalgia/core/gba/panic.cpp @@ -12,7 +12,7 @@ namespace nostalgia::core { void panic(const char *msg) { - initConsole(nullptr); + oxIgnoreError(initConsole(nullptr)); puts(nullptr, 1 * 32 + 0, "SADNESS..."); puts(nullptr, 4 * 32 + 0, "UNEXPECTED STATE:"); puts(nullptr, 6 * 32 + 2, msg);