From 86160cce38ba3033792202c01ae3ac3ccc1428e0 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 13 Feb 2026 22:34:25 +0100 Subject: Set the enemy pool size on 'init_pool' loop's init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- .nasm/segments.txt | 2 +- src/enemies.s | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.nasm/segments.txt b/.nasm/segments.txt index 8a74429..d7d3ad5 100644 --- a/.nasm/segments.txt +++ b/.nasm/segments.txt @@ -1,4 +1,4 @@ - HEADER: 16/16 (100%) -- ROM0: 5192/32762 (15.85%) +- ROM0: 5190/32762 (15.84%) - ROMV: 6/6 (100%) - ROM2: 8192/8192 (100%) diff --git a/src/enemies.s b/src/enemies.s index 9db727f..c539f17 100644 --- a/src/enemies.s +++ b/src/enemies.s @@ -146,7 +146,10 @@ .proc init_pool ldx #0 + ;; The initial size of the pool is its whole capacity. ldy #ENEMIES_POOL_CAPACITY + sty zp_enemies_pool_size + @enemies_init_loop: ;; The state is set at random. stx Globals::zp_tmp0 @@ -183,10 +186,6 @@ dey bne @enemies_init_loop - ;; The initial size of the pool is its whole capacity. - lda #ENEMIES_POOL_CAPACITY - sta zp_enemies_pool_size - rts .endproc -- cgit v1.2.3