[nostalgia] Add external palettes to tilesheet system
This commit is contained in:
@@ -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")
|
||||
|
@@ -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
|
||||
|
9
src/nostalgia/player/startup.s
Normal file
9
src/nostalgia/player/startup.s
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
_entry:
|
||||
|
||||
|
||||
reset:
|
||||
@ disable interrupts
|
||||
@ cpsid if
|
||||
|
||||
@ vim:ft=arm
|
Reference in New Issue
Block a user