From 6464e9c08017fec827aee7eb131693f58ecbb782 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sun, 8 Jun 2025 10:58:16 +0200 Subject: [PATCH] units: removed p1 units. All units are now kept in the same table --- src/defs.s | 4 +--- src/unit.s | 4 ++-- src/update.s | 4 ---- src/wram.s | 8 -------- 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/defs.s b/src/defs.s index 8f01034..5ee62a5 100644 --- a/src/defs.s +++ b/src/defs.s @@ -9,7 +9,7 @@ #define NULL 0 -#define UNITS_MAX 8 +#define UNITS_MAX 12 #define STACK_BEGIN 0xDFFF @@ -36,8 +36,6 @@ ; each unit can have up to 4 status effects #define EFFECTS_MAX 4 -#define PLAYERS 2 - ; draw flags .se 1 .de DRAWF_UPDATE_UI, 1 diff --git a/src/unit.s b/src/unit.s index 8033a52..fd956c2 100644 --- a/src/unit.s +++ b/src/unit.s @@ -538,7 +538,7 @@ unit_next_no_current: ld [unit_next_best_act_ptr+1], a ld hl, p0_units - ld b, UNITS_MAX * PLAYERS + ld b, UNITS_MAX ; same as unit_next: ; inputs: @@ -640,7 +640,7 @@ unit_next_no_current: ; resets all moves ; of all actors in p0 and p1_unts unit_reset_all_moves: - ld b, UNITS_MAX * PLAYERS + ld b, UNITS_MAX ld hl, p0_units @loop: push hl diff --git a/src/update.s b/src/update.s index c3f4253..b877ea6 100644 --- a/src/update.s +++ b/src/update.s @@ -18,8 +18,6 @@ update_game: ld hl, p0_units call units_update - ld hl, p1_units - call units_update ld a, [gameplay_flags] and a, GPF_UNIT_NEXT @@ -34,8 +32,6 @@ update_unit_placement: ld hl, p0_units call units_update - ld hl, p1_units - call units_update ldnull bc ret diff --git a/src/wram.s b/src/wram.s index d5a2a98..23e0c54 100644 --- a/src/wram.s +++ b/src/wram.s @@ -87,16 +87,8 @@ scroll_move_x: .adv 1 scroll_y: .adv 1 scroll_x: .adv 1 - ; resources - - ; initiative resource - ; allows deployment or special moves -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: -- 2.30.2