[nostalgia/core] Add NostalgiaCore-Headless
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||
*/
|
||||
|
||||
#include <nostalgia/core/core.hpp>
|
||||
#include <nostalgia/core/input.hpp>
|
||||
|
||||
namespace nostalgia::core {
|
||||
|
||||
ox::Result<ox::UniquePtr<Context>> init(ox::UniquePtr<ox::FileSystem>, const char*) noexcept {
|
||||
return OxError(1);
|
||||
}
|
||||
|
||||
void setEventHandler(Context*, event_handler) noexcept {
|
||||
}
|
||||
|
||||
uint64_t ticksMs(Context*) noexcept {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool buttonDown(Context*, Key) noexcept {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||
*/
|
||||
|
||||
#include <nostalgia/core/context.hpp>
|
||||
#include <nostalgia/core/gfx.hpp>
|
||||
|
||||
namespace nostalgia::core {
|
||||
|
||||
ox::Error initGfx(Context*) noexcept {
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
ox::Error shutdownGfx(Context*) noexcept {
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
void setWindowTitle(Context*, const char*) noexcept {
|
||||
}
|
||||
|
||||
void focusWindow(Context*) noexcept {
|
||||
}
|
||||
|
||||
int getScreenWidth(Context*) noexcept {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int getScreenHeight(Context*) noexcept {
|
||||
return 0;
|
||||
}
|
||||
|
||||
geo::Size getScreenSize(Context*) noexcept {
|
||||
return {0, 0};
|
||||
}
|
||||
|
||||
uint8_t bgStatus(Context*) noexcept {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void setBgStatus(Context*, uint32_t) noexcept {
|
||||
}
|
||||
|
||||
bool bgStatus(Context*, unsigned) noexcept {
|
||||
return false;
|
||||
}
|
||||
|
||||
void setBgStatus(Context*, unsigned, bool) noexcept {
|
||||
}
|
||||
|
||||
// Do NOT rely on Context in the GBA version of this function.
|
||||
ox::Error initConsole(Context*) noexcept {
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
ox::Error loadBgTileSheet(Context*,
|
||||
int,
|
||||
const ox::FileAddress&,
|
||||
const ox::FileAddress&) noexcept {
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
ox::Error loadSpriteTileSheet(Context*,
|
||||
int,
|
||||
const ox::FileAddress&,
|
||||
const ox::FileAddress&) noexcept {
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
ox::Error loadBgPalette(Context*, int, const ox::FileAddress&) noexcept {
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
ox::Error loadSpritePalette(Context*, int, const ox::FileAddress&) noexcept {
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
// Do NOT use Context in the GBA version of this function.
|
||||
void puts(Context*, int, int, const char*) noexcept {
|
||||
}
|
||||
|
||||
void setTile(Context*, int, int, int, uint8_t) noexcept {
|
||||
}
|
||||
|
||||
// Do NOT use Context in the GBA version of this function.
|
||||
void clearTileLayer(Context*, int) noexcept {
|
||||
}
|
||||
|
||||
[[maybe_unused]]
|
||||
void hideSprite(Context*, unsigned) noexcept {
|
||||
}
|
||||
|
||||
void setSprite(Context*,
|
||||
unsigned,
|
||||
unsigned,
|
||||
unsigned,
|
||||
unsigned,
|
||||
unsigned,
|
||||
unsigned,
|
||||
unsigned) noexcept {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||
*/
|
||||
|
||||
#include <ox/std/std.hpp>
|
||||
|
||||
#include "../media.hpp"
|
||||
|
||||
namespace nostalgia::core {
|
||||
|
||||
ox::Result<char*> loadRom(const char*) noexcept {
|
||||
return OxError(1);
|
||||
}
|
||||
|
||||
void unloadRom(char*) noexcept {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user