Refactoring: Project structure, sprite stairs & fog masks rendering fix

This commit is contained in:
2026-06-23 19:43:55 +02:00
parent 0ceae6f98b
commit 7d3003203c
89 changed files with 4576 additions and 1767 deletions
+31
View File
@@ -0,0 +1,31 @@
#include <gb/gb.h>
#include "engine.h"
uint8_t app_state = 0; // 0 = title, 1 = game
void main(void) {
title_init();
SHOW_BKG;
SHOW_SPRITES;
DISPLAY_ON;
uint8_t prev_keys = 0;
while (1) {
wait_vbl_done();
uint8_t keys = joypad();
if (app_state == 0) {
title_update(keys, prev_keys);
if ((keys & J_START) && !(prev_keys & J_START)) {
app_state = 1;
engine_init();
}
} else {
engine_update(keys, prev_keys);
}
prev_keys = keys;
}
}