[nostalgia] Add external palettes to tilesheet system

This commit is contained in:
2019-10-22 19:23:14 -05:00
parent fbdb48a1ee
commit 92103bfc41
31 changed files with 802 additions and 105 deletions

View File

@@ -4,6 +4,12 @@ add_library(
world.cpp
)
target_link_libraries(
NostalgiaWorld PUBLIC
NostalgiaCore
OxMetalClaw
)
#install(TARGETS NostalgiaCommon DESTINATION lib)
install(
FILES

View File

@@ -13,7 +13,7 @@ namespace nostalgia::world {
using namespace common;
using namespace core;
Zone::Zone(Context *ctx, Bounds bnds, InodeId_t tileSheet) {
Zone::Zone(Context *ctx, Bounds bnds, ox::FileAddress tileSheet) {
const auto size = bnds.width * bnds.height;
m_tiles = new Tile[size];
m_bounds = bnds;

View File

@@ -17,11 +17,10 @@
namespace nostalgia::world {
struct Tile {
static constexpr auto Fields = 3;
static constexpr auto Fields = 2;
uint8_t bgTile = 0;
uint8_t type = 0;
void *occupant = nullptr;
};
template<typename T>
@@ -48,7 +47,7 @@ struct Zone {
Tile *m_tiles = nullptr;
public:
Zone(core::Context *ctx, common::Bounds bnds, core::InodeId_t tileSheet);
Zone(core::Context *ctx, common::Bounds bnds, ox::FileAddress tileSheet);
void draw(core::Context *ctx);