diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-03-01 23:14:58 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-03-01 23:14:58 +0100 |
| commit | 8b8a5c028e3b9d56ad018aba582cc81e66c45a15 (patch) | |
| tree | c16d4f7a88996030d98e6ff73cd1063e69e4eaf4 | |
| parent | c9e7a7ab06732f5e9fb0cde1cd01f46d059b0259 (diff) | |
| download | jetpac.nes-8b8a5c028e3b9d56ad018aba582cc81e66c45a15.tar.gz jetpac.nes-8b8a5c028e3b9d56ad018aba582cc81e66c45a15.zip | |
Fix bottom collision for fighter jet 1s
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
| -rw-r--r-- | .nasm/segments.txt | 2 | ||||
| -rw-r--r-- | src/enemies.s | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/.nasm/segments.txt b/.nasm/segments.txt index 03c9b6c..a53110b 100644 --- a/.nasm/segments.txt +++ b/.nasm/segments.txt @@ -1,4 +1,4 @@ - HEADER: 16/16 (100%) -- ROM0: 5254/32762 (16.04%) +- ROM0: 5260/32762 (16.06%) - ROMV: 6/6 (100%) - ROM2: 8192/8192 (100%) diff --git a/src/enemies.s b/src/enemies.s index f69e9fd..9bda83d 100644 --- a/src/enemies.s +++ b/src/enemies.s @@ -545,10 +545,17 @@ JAL bite_the_dust @check_down: - ;; If that failed, then increment the vertical tile coordinate twice to - ;; get the bottom boundary and check again. + ;; If that failed, then increment the vertical tile coordinate to get + ;; the bottom boundary and check again. Note that the "bottom" is + ;; different if it's the regular 'basic' enemy or it's the fighter jet + ;; re-using this algorithm. That's why if the level kind is 3 the bottom + ;; is increased by one and not twice. inc Globals::zp_arg0 + ldy Globals::zp_level_kind + cpy #3 + beq @skip_second_inc inc Globals::zp_arg0 + @skip_second_inc: jsr Background::collides beq @end JAL bite_the_dust |
