## actors:
[ ] actors have a specific collision box
+[ ] actors update code is based on type
## map
- enemy spwaner (spwans n enemies of a specific type)
- enemies always spawn slightly off screen and walk in once a spwaner is triggered
[ ] scrolling is only possible up. moving back cannot be done
+[ ] maps can run code when objects are loaded based on type
## sate machine
.def int DIRLEFT = BTNLEFT
.def int DIRRIGHT = BTNRIGHT
+
+ ; row pattern struct
+.se 0
+.de pat_tilemap, 10
+.de pat_size, 0
-; mapgen flags
-.se 1
-.de MAPGEN_F_NO_ACT_SG, 1
+ ; map object struct
+.se 0
+.de mo_type, 1
+.de mo_flags, 1
+.de mo_page, 1
+.de mo_row, 1
+.de mo_dat, 4
+.de mo_size, 0
#include "ui.s"
#include "audio.s"
#include "map.s"
+#include "rowpatterns.s"
#include "math.s"
#include "game.s"
- ; loads a map
- ; including the required tileset
- ; sets current page to 0
- ; draws page 0 to the screen
- ; loads map objects
-map_load:
- ret
-
- ; draws a single row of tiles:w
-map_draw_row:
- ret
+ ; tile space
+.def int TS = 0x30
+pat_empty:
+.db TS, TS, TS, TS, TS, TS, TS, TS, TS, TS
+
+ ; enf of level row pattern
+pat_eol:
+.db 0xFF
player_unit: .adv 0
actors: .adv act_size * ACTS_MAX
+ ; current page the map is on
map_current_page: .adv 1
-
-state_end:
+ ; current row that is being drawn
+map_current_row: .adv 1
+ ; current pattern to be drawn
+map_current_pattern: .adv 2