From: Lukas Krickl Date: Sun, 4 May 2025 13:35:45 +0000 (+0200) Subject: units: Added stub for unit update X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=0a020371c817f9ed20ebbcf5a4c2d66a5568b06e;p=gbrg%2F.git units: Added stub for unit update --- diff --git a/src/main.s b/src/main.s index c7f5ce6..6e060c6 100644 --- a/src/main.s +++ b/src/main.s @@ -65,6 +65,7 @@ main: #include "map.s" #include "state.s" #include "tiles.inc" +#include "unit.s" ; fill bank .fill 0, 0x7FFF - $ diff --git a/src/unit.s b/src/unit.s new file mode 100644 index 0000000..9d6886e --- /dev/null +++ b/src/unit.s @@ -0,0 +1,8 @@ + ; updates a unit table + ; runs state for each unit + ; inputs: + ; hl: unit table (p0/p1) +units_update: + ret + + diff --git a/src/update.s b/src/update.s index e4542e2..e078d9a 100644 --- a/src/update.s +++ b/src/update.s @@ -8,7 +8,11 @@ update_game: ld de, actor_player call st_update - + + ld hl, p0_units + call units_update + ld hl, p1_units + call units_update ldnull bc ret