[nostalgia/core] Add support for drawing NostalgiaGraphics in SDL

This commit is contained in:
2019-10-27 16:24:01 -05:00
parent 79a1a6f896
commit 52c4744242
9 changed files with 181 additions and 22 deletions
+6 -2
View File
@@ -13,11 +13,15 @@ namespace nostalgia::world {
using namespace common;
using namespace core;
Zone::Zone(Context *ctx, Bounds bnds, ox::FileAddress tileSheet) {
ox::Error Zone::init(Context *ctx, Bounds bnds, ox::FileAddress tileSheet, ox::FileAddress palette) {
const auto size = bnds.width * bnds.height;
m_tiles = new Tile[size];
m_bounds = bnds;
core::loadTileSheet(ctx, tileSheet);
return core::loadTileSheet(ctx, core::TileSheetSpace::Background, 0, tileSheet, palette);
}
Zone::~Zone() {
delete[] m_tiles;
}
void Zone::draw(Context *ctx) {