defs: Added new actor tables
authorLukas Krickl <lukas@krickl.dev>
Sun, 4 May 2025 13:25:41 +0000 (15:25 +0200)
committerLukas Krickl <lukas@krickl.dev>
Sun, 4 May 2025 13:25:41 +0000 (15:25 +0200)
Also removed more dead code

src/defs.s
src/player.s
src/wram.s

index 4f43bbd1dda59caed64311df19189ea4e928106f..63080d55a2d61acb5296e40814be6dd9bc2e530c 100644 (file)
@@ -7,8 +7,7 @@
 #define WRAM 0xC000
 #define WRAMLEN 0xFFF
 
-  ; max update calls per frame
-#define SIM_UPDATE_MAX 8 
+#define UNITS_MAX 8
 
 #define STACK_BEGIN 0xDFFF
 
index 3be7e8fd396b4fdc0559aa91f4053d1ce239f1c7..bec7b87bc41222e061e27a6efdd873210e3af028 100644 (file)
@@ -54,25 +54,6 @@ player_draw_cursor:
   ld a, CURSOR_TILE
   ld [hl+], a
 
-  xor a, a
-  ld [hl+], a
-
-  ; preview tile 
-  ld hl, PLAYER_SPRITE1+oamsize
-
-  ld a, [cursor_y]
-  add a, OBJ_OFF_Y
-  sub a, b
-  ld [hl+], a
-
-  ld a, [cursor_x]
-  add a, OBJ_OFF_X
-  sub a, c
-  ld [hl+], a
-
-  ld a, [cursor_preview_tile] 
-  ld [hl+], a
-
   xor a, a
   ld [hl+], a
   
index b629f868349d7207326964d3de4d4150c1c13303..fb71539685ee1ac1a92d8a2fdc9742b1c0d39fbe 100644 (file)
@@ -11,21 +11,13 @@ curr_inputs: .adv 1
   ; previous frame's inputs
 prev_inputs: .adv 1
 
-  ; ui index
-ui_cursor_pos: .adv 1
-
 game_mode: .adv st_size
 
-  ; cursor state
-cursor_state: .adv st_size
-cursor_preview_tile: .adv 1
-  
-  ; selected building state
-building_state: .adv st_size
-
   ; actors 
   ; actors are state machines
   ; they get updated once a frame
+  ; actor player is a simple cursor 
+  ; that has deploymnet control
 actor_player: .adv act_size 
 
   ; offset into bg_update_queue 
@@ -61,16 +53,12 @@ scroll_x: .adv 1
 
   ; initiative resource
   ; allows deployment or special moves
-r_init: .adv 1
-
-  ; current cell index
-  ; for cell update loop
-  ; big endian
-sim_cell_ptr: .adv 2
-  
-  ; cell screen ptr 
-  ; points to tile that this cell owns
-sim_cell_screen_ptr: .adv 2
+r_p0_init: .adv 1
+r_p1_init: .adv 1
+
+; units for p0 and p1
+p0_units: .adv act_size * UNITS_MAX 
+p1_units: .adv act_size * UNITS_MAX 
 
 state_cells: .adv c_size * MAP_SIZE
 state_cells_end: