[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

@@ -6,11 +6,13 @@ if(NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
main.cpp
startup.s
)
set(NOSTALGIA_PLAYER_DEPS "")
else()
add_executable(
nostalgia
main.cpp
)
set(NOSTALGIA_PLAYER_DEPS "NostalgiaCore-SDL")
endif()
if(COMMAND OBJCOPY_FILE)
@@ -27,11 +29,8 @@ endif()
target_link_libraries(
nostalgia
NostalgiaWorld
NostalgiaCommon
NostalgiaCore
OxFS
OxStd
OxMetalClaw
${NOSTALGIA_PLAYER_DEPS}
)
add_custom_target("nostalgia.bin")

View File

@@ -13,28 +13,27 @@ using namespace nostalgia::common;
using namespace nostalgia::core;
using namespace nostalgia::world;
int run() {
while(1);
ox::FileSystem32 fs(ox::FileStore32(loadRom(), 32 * ox::units::MB));
int run(ox::FileSystem *fs) {
Context ctx;
init(&ctx);
ctx.rom = &fs;
//Zone zone(&ctx, Bounds{0, 0, 40, 40}, 102);
//zone.draw(&ctx);
while (1);
ctx.rom = fs;
Zone zone(&ctx, Bounds{0, 0, 40, 40}, "/TileSheets/GeneralWorld");
zone.draw(&ctx);
run();
return 0;
}
#ifndef OX_USE_STDLIB
extern "C" void _start() {
run();
ox::FileSystem32 fs(ox::FileStore32(loadRom(), 32 * ox::units::MB));
run(&fs);
}
#else
int main() {
return run();
return run(nullptr);
}
#endif

View File

@@ -0,0 +1,9 @@
_entry:
reset:
@ disable interrupts
@ cpsid if
@ vim:ft=arm