aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.nasm/segments.txt2
-rw-r--r--src/items.s16
2 files changed, 8 insertions, 10 deletions
diff --git a/.nasm/segments.txt b/.nasm/segments.txt
index 7d74792..7ba06cb 100644
--- a/.nasm/segments.txt
+++ b/.nasm/segments.txt
@@ -1,4 +1,4 @@
- HEADER: 16/16 (100%)
-- ROM0: 8030/32762 (24.51%)
+- ROM0: 8034/32762 (24.52%)
- ROMV: 6/6 (100%)
- ROM2: 8192/8192 (100%)
diff --git a/src/items.s b/src/items.s
index e1ebed6..7d22828 100644
--- a/src/items.s
+++ b/src/items.s
@@ -61,12 +61,8 @@
;; Number of shuttle parts (or fuel tanks) that have been collected so far.
zp_collected = $CB
- ;; Coordinate where the dropping of items takes place. This comes in two
- ;; versions, as the "collision" is done in the tile coordinates so to give
- ;; some leeway to the player; but the dropping itself has to fall from the
- ;; exact screen coordinates or otherwise the dropping would feel weird.z
+ ;; Coordinate where the dropping of items takes place.
DROPPING_SCREEN_X = $A8
- DROPPING_TILE_X = $15
;; Y screen coordinates in order for various parts to be considered as
;; "collected".
@@ -390,10 +386,12 @@
sta Items::zp_pool_base + 2, x
;; Are we at the zone where we must drop items?
- ldy Globals::zp_arg1
- dey
- cpy #DROPPING_TILE_X
- beq @drop
+ cmp #DROPPING_SCREEN_X - 8
+ bcs @may_drop
+ jmp @next
+ @may_drop:
+ cmp #DROPPING_SCREEN_X + 8
+ bcc @drop
jmp @next
@drop: