[nostalgia/core] Replace puts loc param with column and row params
This commit is contained in:
@@ -9,6 +9,7 @@ add_library(
|
||||
|
||||
target_link_libraries(
|
||||
NostalgiaCore-GBA PUBLIC
|
||||
NostalgiaCore
|
||||
GbaStartup
|
||||
OxFS
|
||||
OxStd
|
||||
|
||||
@@ -112,7 +112,11 @@ ox::Error initConsole(Context *ctx) {
|
||||
constexpr auto PaletteAddr = "/Palettes/Charset.npal";
|
||||
if (!ctx) {
|
||||
ctx = new (ox_alloca(sizeof(Context))) Context();
|
||||
ox::FileStore32 fs(loadRom(), 32 * ox::units::MB);
|
||||
auto rom = loadRom();
|
||||
if (!rom) {
|
||||
return OxError(1);
|
||||
}
|
||||
ox::FileStore32 fs(rom, 32 * ox::units::MB);
|
||||
ctx->rom = new (ox_alloca(sizeof(ox::FileSystem32))) ox::FileSystem32(fs);
|
||||
}
|
||||
return loadTileSheet(ctx, TileSheetSpace::Background, 0, TilesheetAddr, PaletteAddr);
|
||||
|
||||
@@ -13,10 +13,10 @@ namespace nostalgia::core {
|
||||
|
||||
void panic(const char *msg) {
|
||||
oxIgnoreError(initConsole(nullptr));
|
||||
puts(nullptr, 1 * 32 + 0, "SADNESS...");
|
||||
puts(nullptr, 4 * 32 + 0, "UNEXPECTED STATE:");
|
||||
puts(nullptr, 6 * 32 + 2, msg);
|
||||
puts(nullptr, 10 * 32 + 0, "PLEASE RESTART THE SYSTEM");
|
||||
puts(nullptr, 32 + 0, 1, "SADNESS...");
|
||||
puts(nullptr, 32 + 0, 4, "UNEXPECTED STATE:");
|
||||
puts(nullptr, 32 + 2, 6, msg);
|
||||
puts(nullptr, 32 + 0, 10, "PLEASE RESTART THE SYSTEM");
|
||||
// TODO: properly end program execution, this wastes power
|
||||
while (1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user