aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-07-08 09:31:14 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2026-07-08 09:34:52 +0200
commit6ee6c7512bdbc836642dfdd607854faced55dfc3 (patch)
tree3b8ca9c553e812ab9c9ddc8a94d80db9374bd3da
parentda6f2c70174219f61d0498bdd4325b7a8842a1fa (diff)
downloadjetpac.nes-6ee6c7512bdbc836642dfdd607854faced55dfc3.tar.gz
jetpac.nes-6ee6c7512bdbc836642dfdd607854faced55dfc3.zip
Remove unused labels
Since commit 6a9dea943c07 ("Add a new 'check' stage in assemble()"), nasm is now able to detect unused labels. This was then tried on this repository the cleanup labels which were never used. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
-rw-r--r--src/bullets.s1
-rw-r--r--src/driver.s5
-rw-r--r--src/interrupts.s3
-rw-r--r--src/items.s1
-rw-r--r--src/jetpac.s1
-rw-r--r--src/player.s4
6 files changed, 3 insertions, 12 deletions
diff --git a/src/bullets.s b/src/bullets.s
index 9e40546..9b2de81 100644
--- a/src/bullets.s
+++ b/src/bullets.s
@@ -121,7 +121,6 @@
cmp #$FF
beq @initialize_bucket
- @next_free_loop:
;; Prepare the `x` register for the next iteration. Notice that if we
;; are over the total size in memory, we have to roll the `x` back to
;; zero. This is possible because the loop starts at
diff --git a/src/driver.s b/src/driver.s
index 4e54e8c..cf0fc43 100644
--- a/src/driver.s
+++ b/src/driver.s
@@ -8,7 +8,7 @@
;; never conflict with each other.
zp_player_timer = $30 ; asan:ignore
PLAYER_TIMER_FULL_VALUE = HZ * 3
- PLAYER_TIMER_DEV_VALUE = HZ / 4
+ PLAYER_TIMER_DEV_VALUE = HZ / 4 ; asan:ignore
.ifdef PARTIAL
PLAYER_TIMER_VALUE = PLAYER_TIMER_DEV_VALUE
.else
@@ -498,7 +498,6 @@
cpx zp_first_bullet
beq @next_bullet
- @do_bullet:
;; Ok, so the bullet has not been allocated yet and we have space for
;; it. Is it valid?
lda Bullets::zp_pool_base, x
@@ -554,7 +553,6 @@
cpx zp_first_enemy
beq @next_enemy
- @do_enemy:
;; Ok, so the enemy has not been allocated yet and we have space for
;; it. Is it valid?
lda Enemies::zp_pool_base, x
@@ -582,7 +580,6 @@
cpx #Explosions::EXPLOSIONS_POOL_CAPACITY_BYTES
beq @after_explosions
- @do_explosion:
;; Is it valid?
lda Explosions::zp_pool_base, x
and #$80
diff --git a/src/interrupts.s b/src/interrupts.s
index 658f6a3..dc6e51c 100644
--- a/src/interrupts.s
+++ b/src/interrupts.s
@@ -6,9 +6,8 @@
;; If we are on a dev environment, account for any frame drops.
.ifdef PARTIAL
- bmi @after_frame_check
+ bmi @save_registers
jmp @account_for_frame_drop
- @after_frame_check:
.else
bmi @save_registers
rti
diff --git a/src/items.s b/src/items.s
index 1e8a111..0646ad0 100644
--- a/src/items.s
+++ b/src/items.s
@@ -916,7 +916,6 @@
cmp #ENTER_SCREEN_Y
bcc @no
- @yes:
lda #1
rts
@no:
diff --git a/src/jetpac.s b/src/jetpac.s
index a011a45..da0837e 100644
--- a/src/jetpac.s
+++ b/src/jetpac.s
@@ -270,7 +270,6 @@
pha
;; Wait for the PPU to render the screen.
-@set_flags_over:
lda #%10000000
ora Globals::zp_flags
sta Globals::zp_flags
diff --git a/src/player.s b/src/player.s
index 5060e87..e230fab 100644
--- a/src/player.s
+++ b/src/player.s
@@ -474,7 +474,6 @@
sbc #0
sta zp_position_x + 1
- @end:
rts
.endproc
@@ -739,7 +738,7 @@
cmp #2
beq @animation2
;; NOTE: fallthrough for either 0 or even buggy states.
- @still:
+
ldx #$21
ldy #$20
bne @heading
@@ -861,7 +860,6 @@
ora #%00001000
sta Player::zp_state
- @skip_life_update:
;; Move the player's sprites out of the screen.
ldx #0
lda #$FF