junglejourney
changeset 90:755ccdf0b1a7
Moved the data and characters sprites up in memory to leave more
room for code.
| author | David Boddie <david@boddie.org.uk> |
|---|---|
| date | Wed Aug 31 11:03:04 2011 +0200 |
| parents | b35f8f1fdd1b |
| children | e95375ec93de |
| files | build.py mapcode.oph tools/makesprites.py |
| diffstat | 3 files changed, 287 insertions(+), 287 deletions(-) [+] |
line diff
1.1 --- a/build.py Wed Aug 31 02:34:09 2011 +0200 1.2 +++ b/build.py Wed Aug 31 11:03:04 2011 +0200 1.3 @@ -49,7 +49,7 @@ 1.4 # Memory map 1.5 # 1900 CODE 1.6 # 1x00 space 1.7 - # 3300 character table (0x24/6 = 6 entries + 1 special entry) 1.8 + # 3D00 character table (0x24/6 = 6 entries + 1 special entry) 1.9 # n type (0 missing, 1 player, 2 projectile, 3 explosion, 1.10 # 4 item, 1.11 # 8 and higher enemy - bits 4,5,6 are enemy type) 1.12 @@ -72,20 +72,20 @@ 1.13 # second character is always the player's weapon 1.14 # new characters are added after these 1.15 # 1.16 - # 332A space 1.17 - # 33F0 item/player flags (128=leave level, 64=player demise, 1=has key) 1.18 - # 33F2 current room (i, j) 1.19 - # 33F4 lives (strength) 1.20 - # 33F5 delay counter 1.21 - # 33F6 score (three bytes) 1.22 - # 33F9 projectile type 1.23 - # 33FA level 1.24 - # 33FB palette workspace (enough for one 5 byte palette entry) 1.25 - # 33FD is also projectile counter when in a room 1.26 - # 33FE is also motion counter when in a room 1.27 - # 33FF is also enemy generation counter when in a room 1.28 + # 3D2A space 1.29 + # 3DF0 item/player flags (128=leave level, 64=player demise, 1=has key) 1.30 + # 3DF2 current room (i, j) 1.31 + # 3DF4 lives (strength) 1.32 + # 3DF5 delay counter 1.33 + # 3DF6 score (three bytes) 1.34 + # 3DF9 projectile type 1.35 + # 3DFA level 1.36 + # 3DFB palette workspace (enough for one 5 byte palette entry) 1.37 + # 3DFD is also projectile counter when in a room 1.38 + # 3DFE is also motion counter when in a room 1.39 + # 3DFF is also enemy generation counter when in a room 1.40 # 1.41 - # 3400 CHARS (character sprites) 1.42 + # 3E00 CHARS (character sprites) 1.43 # 4 * 2 * 0x30 (player movement) 1.44 # 4 * 0x30 (player demise) 1.45 # 4 * 2 * 0x10 (projectile) 1.46 @@ -97,9 +97,9 @@ 1.47 # 2 * 0x60 (exit) 4500 1.48 # 2 * 0x60 (final exit) 1.49 # 1.50 - # 4*2*0x30 + 4*0x30 + 4*2*0x10 + 4*0x10 + 5*4*2*0x40 + 4*0x40 + 4*0x40 + 5*0x40 + 2*0x60 + 2*0x60 + 0x3400 1.51 + # 4*2*0x30 + 4*0x30 + 4*2*0x10 + 5*4*2*0x40 + 4*0x40 + 4*0x40 + 4*0x40 + 5*0x40 + 2*0x60 + 2*0x60 + 0x3400 1.52 # 1.53 - # 4680 space 1.54 + # 5080 space 1.55 # 5100 objects/treasure table (121 entries) 1.56 # n type 1.57 #
2.1 --- a/mapcode.oph Wed Aug 31 02:34:09 2011 +0200 2.2 +++ b/mapcode.oph Wed Aug 31 11:03:04 2011 +0200 2.3 @@ -318,7 +318,7 @@ 2.4 2.5 ; Make sure that the starting, exit, key rooms are empty. 2.6 2.7 - ldx $33fa ; level number 2.8 + ldx $3dfa ; level number 2.9 lda start_rooms_y,x 2.10 cmp $78 2.11 bne make_room_not_starting_room 2.12 @@ -344,7 +344,7 @@ 2.13 tax 2.14 lda exit_room_offsets,x 2.15 tax 2.16 - lda $33f0 2.17 + lda $3df0 2.18 and #1 2.19 beq exit_not_open 2.20 2.21 @@ -378,7 +378,7 @@ 2.22 adc $79 2.23 sta $7c 2.24 sec 2.25 - ldx $33fa 2.26 + ldx $3dfa 2.27 lda seeds,x 2.28 sbc $78 2.29 sec 2.30 @@ -445,12 +445,12 @@ 2.31 2.32 sec 2.33 sbc #1 2.34 - sta $330d ; store weapon/treasure type 2.35 + sta $3d0d ; store weapon/treasure type 2.36 clc 2.37 2.38 lda $78 2.39 eor $79 2.40 - adc $330d 2.41 + adc $3d0d 2.42 and #15 2.43 sta $70 2.44 2.45 @@ -484,19 +484,19 @@ 2.46 bne add_treasure_loop_next 2.47 2.48 lda #4 ; type (weapon/treasure) 2.49 - sta $330c 2.50 + sta $3d0c 2.51 lda $8d ; y 2.52 - sta $330e 2.53 + sta $3d0e 2.54 lda #1 ; dy 2.55 - sta $330f 2.56 + sta $3d0f 2.57 lda $8e ; x 2.58 - sta $3310 2.59 + sta $3d10 2.60 lda #0 ; dx 2.61 - sta $3311 2.62 + sta $3d11 2.63 2.64 lda #$0c 2.65 sta $74 2.66 - lda #$33 2.67 + lda #$3d 2.68 sta $75 2.69 jmp plot_character ; optimise away the rts 2.70 2.71 @@ -642,7 +642,7 @@ 2.72 rts 2.73 2.74 tile_addresses_low: .byte $00, $60, $c0, $00, $60, $c0, $20 2.75 -tile_addresses_high: .byte $53, $53, $53, $45, $45, $45, $46 2.76 +tile_addresses_high: .byte $53, $53, $53, $4f, $4f, $4f, $50 2.77 2.78 plot_tile: ; $7b=tile number 2.79 ; 1 = flowers/decoration 2.80 @@ -674,7 +674,7 @@ 2.81 bpl plot_not_blank_after_add_loop ; don't adjust the tile for later levels 2.82 2.83 clc 2.84 - lda $33fa 2.85 + lda $3dfa 2.86 and #3 ; change the tile set for later levels 2.87 tax 2.88 plot_not_blank_add_loop: 2.89 @@ -695,12 +695,12 @@ 2.90 jsr plot 2.91 rts 2.92 2.93 -plot_room: ; $78,$79 = i,j (from $33f2,$33f3) 2.94 +plot_room: ; $78,$79 = i,j (from $3df2,$3df3) 2.95 jsr blank_screen 2.96 2.97 - lda $33f2 2.98 + lda $3df2 2.99 sta $78 2.100 - lda $33f3 2.101 + lda $3df3 2.102 sta $79 2.103 2.104 lda #$80 2.105 @@ -1199,7 +1199,7 @@ 2.106 rts 2.107 2.108 player_direction_chars_low: .byte $00,$30,$60,$90,$c0,$f0,$20,$50, $80,$b0,$e0,$10 2.109 -player_direction_chars_high: .byte $34,$34,$34,$34,$34,$34,$35,$35, $35,$35,$35,$36 2.110 +player_direction_chars_high: .byte $3e,$3e,$3e,$3e,$3e,$3e,$3f,$3f, $3f,$3f,$3f,$40 2.111 2.112 screen_rows_low: .byte $80,$40,$00,$c0,$80,$40,$00,$c0,$80,$40 2.113 screen_rows_high: .byte $5a,$5e,$62,$65,$69,$6d,$71,$74,$78,$7c 2.114 @@ -1211,13 +1211,13 @@ 2.115 screen_subcolumns_low: .byte $00,$08,$10,$18 2.116 2.117 enemy_direction_chars_low: .byte $c0,$00,$40,$80,$c0,$00,$40,$80 2.118 -enemy_direction_chars_high: .byte $36,$37,$37,$37,$37,$38,$38,$38 2.119 +enemy_direction_chars_high: .byte $40,$41,$41,$41,$41,$42,$42,$42 2.120 2.121 emerge_explode_chars_low: .byte $c0,$00,$40,$80,$c0,$00,$00,$00 2.122 -emerge_explode_chars_high: .byte $40,$41,$41,$41,$41,$42,$42,$42 2.123 +emerge_explode_chars_high: .byte $4a,$4b,$4b,$4b,$4b,$4c,$4c,$4c 2.124 2.125 item_chars_low: .byte $c0,$00,$40,$80,$c0,$00,$40,$80,$c0 2.126 -item_chars_high: .byte $42,$43,$43,$43,$43,$44,$44,$44,$44 2.127 +item_chars_high: .byte $4c,$4d,$4d,$4d,$4d,$4e,$4e,$4e,$4e 2.128 2.129 projectile_chars_low: .byte $40,$50,$60,$70,$80,$90,$a0,$b0 2.130 2.131 @@ -1349,7 +1349,7 @@ 2.132 tax 2.133 lda projectile_chars_low,x 2.134 sta $70 2.135 - lda #$36 2.136 + lda #$40 2.137 sta $71 2.138 2.139 ; Use the dy value to determine which plotting routine to use. 2.140 @@ -1578,10 +1578,10 @@ 2.141 2.142 ; Set the direction and toggle the animation bit. 2.143 2.144 - lda $3301 2.145 + lda $3d01 2.146 and #1 2.147 eor #1 ; toggle animation flag 2.148 - sta $3301 ; left (directional bits are 0) 2.149 + sta $3d01 ; left (directional bits are 0) 2.150 2.151 jsr plot_character 2.152 rts 2.153 @@ -1590,11 +1590,11 @@ 2.154 2.155 ; Set the direction and toggle the animation bit. 2.156 2.157 - lda $3301 2.158 + lda $3d01 2.159 and #1 ; remove direction information (result is 0) 2.160 eor #1 ; toggle animation flag 2.161 ora #2 ; right 2.162 - sta $3301 2.163 + sta $3d01 2.164 2.165 jsr plot_character 2.166 rts 2.167 @@ -1603,11 +1603,11 @@ 2.168 2.169 ; Set the direction and toggle the animation bit. 2.170 2.171 - lda $3301 2.172 + lda $3d01 2.173 and #1 ; remove direction information (result is 0) 2.174 eor #1 ; toggle animation flag 2.175 ora #4 ; up 2.176 - sta $3301 2.177 + sta $3d01 2.178 2.179 jsr plot_character 2.180 rts 2.181 @@ -1616,18 +1616,18 @@ 2.182 2.183 ; Set the direction and toggle the animation bit. 2.184 2.185 - lda $3301 2.186 + lda $3d01 2.187 and #1 ; remove direction information (result is 0) 2.188 eor #1 ; toggle animation flag 2.189 ora #6 ; down 2.190 - sta $3301 2.191 + sta $3d01 2.192 2.193 jsr plot_character 2.194 rts 2.195 2.196 move_player: 2.197 2.198 - lda $33fe 2.199 + lda $3dfe 2.200 and #1 2.201 beq move_player_allowed 2.202 2.203 @@ -1638,7 +1638,7 @@ 2.204 2.205 lda #$00 ; set up the address of the player character 2.206 sta $74 2.207 - lda #$33 2.208 + lda #$3d 2.209 sta $75 2.210 2.211 ; Handle the left key. 2.212 @@ -1648,25 +1648,25 @@ 2.213 cpy #255 2.214 bne move_player_not_left_key 2.215 2.216 - lda $3305 ; read dx 2.217 + lda $3d05 ; read dx 2.218 cmp #0 2.219 beq move_player_left_check_x 2.220 2.221 jsr unplot_character ; unplot the player character 2.222 - dec $3305 2.223 + dec $3d05 2.224 clc 2.225 jmp animate_player_left ; optimise away the rts 2.226 2.227 move_player_left_check_x: ; Check the x offset. 2.228 2.229 - lda $3304 2.230 + lda $3d04 2.231 cmp #0 2.232 beq move_player_leave_room_left 2.233 2.234 clc 2.235 tay 2.236 dey ; x - 1 2.237 - lda $3302 ; load the y offset 2.238 + lda $3d02 ; load the y offset 2.239 tax ; as an index 2.240 lda room_row_offsets_low,x ; read the address of the row 2.241 sta $70 2.242 @@ -1682,7 +1682,7 @@ 2.243 cmp #0 2.244 bne move_player_not_left_key 2.245 2.246 - lda $3303 ; dy 2.247 + lda $3d03 ; dy 2.248 cmp #0 2.249 beq move_player_allow_left 2.250 2.251 @@ -1700,17 +1700,17 @@ 2.252 sta $81 ; temporary 2.253 jsr unplot_character ; unplot the player character 2.254 lda $81 2.255 - sta $3304 ; store the new room x offset 2.256 + sta $3d04 ; store the new room x offset 2.257 lda #3 2.258 - sta $3305 ; dx = 3 2.259 + sta $3d05 ; dx = 3 2.260 clc 2.261 jmp animate_player_left ; optimise away the rts 2.262 2.263 move_player_leave_room_left: 2.264 sec 2.265 - lda $33f3 2.266 + lda $3df3 2.267 sbc #1 2.268 - sta $33f3 2.269 + sta $3df3 2.270 clc 2.271 2.272 ; Set the player's position on the right of the screen. 2.273 @@ -1718,9 +1718,9 @@ 2.274 ; No need to unplot. 2.275 2.276 lda #9 ; x = 9 2.277 - sta $3304 2.278 + sta $3d04 2.279 lda #2 ; dx = 2 2.280 - sta $3305 2.281 + sta $3d05 2.282 2.283 jsr animate_player_left 2.284 sec ; indicate to the calling routine that the player 2.285 @@ -1735,27 +1735,27 @@ 2.286 cpy #255 2.287 bne move_player_not_right_key 2.288 2.289 - lda $3305 ; read dx 2.290 + lda $3d05 ; read dx 2.291 cmp #2 2.292 beq move_player_right_check_x 2.293 cmp #3 2.294 beq move_player_right_tile 2.295 2.296 jsr unplot_character ; unplot the player character 2.297 - inc $3305 2.298 + inc $3d05 2.299 clc 2.300 jmp animate_player_right ; optimise away the rts 2.301 2.302 move_player_right_check_x: ; Check the x offset. 2.303 2.304 - lda $3304 2.305 + lda $3d04 2.306 cmp #9 2.307 beq move_player_leave_room_right 2.308 2.309 clc 2.310 tay 2.311 iny ; x + 1 2.312 - lda $3302 ; load the y offset 2.313 + lda $3d02 ; load the y offset 2.314 tax ; as an index 2.315 lda room_row_offsets_low,x ; read the address of the row 2.316 sta $70 2.317 @@ -1771,7 +1771,7 @@ 2.318 cmp #0 2.319 bne move_player_not_right_key 2.320 2.321 - lda $3303 ; dy 2.322 + lda $3d03 ; dy 2.323 cmp #0 2.324 beq move_player_allow_right 2.325 2.326 @@ -1787,24 +1787,24 @@ 2.327 move_player_allow_right: 2.328 2.329 jsr unplot_character ; unplot the player character 2.330 - inc $3305 ; update dx 2.331 + inc $3d05 ; update dx 2.332 clc 2.333 jmp animate_player_right ; optimise away the rts 2.334 2.335 move_player_right_tile: 2.336 2.337 jsr unplot_character ; unplot the player character 2.338 - inc $3304 ; store the new room x offset 2.339 + inc $3d04 ; store the new room x offset 2.340 lda #0 2.341 - sta $3305 ; dx = 0 2.342 + sta $3d05 ; dx = 0 2.343 clc 2.344 jmp animate_player_right ; optimise away the rts 2.345 2.346 move_player_leave_room_right: 2.347 clc 2.348 - lda $33f3 2.349 + lda $3df3 2.350 adc #1 2.351 - sta $33f3 2.352 + sta $3df3 2.353 clc 2.354 2.355 ; Set the player's position on the left of the screen. 2.356 @@ -1812,9 +1812,9 @@ 2.357 ; No need to unplot. 2.358 2.359 lda #0 ; x = 0 2.360 - sta $3304 2.361 + sta $3d04 2.362 lda #0 ; dx = 0 2.363 - sta $3305 2.364 + sta $3d05 2.365 2.366 jsr animate_player_right 2.367 sec ; indicate to the calling routine that the 2.368 @@ -1829,24 +1829,24 @@ 2.369 cpy #255 2.370 bne move_player_not_up_key 2.371 2.372 - lda $3303 ; read dy 2.373 + lda $3d03 ; read dy 2.374 cmp #0 2.375 beq move_player_up_check_y 2.376 2.377 jsr unplot_character ; unplot the player character 2.378 - dec $3303 2.379 + dec $3d03 2.380 clc 2.381 jmp animate_player_up ; optimise away the rts 2.382 2.383 move_player_up_check_y: ; Check the y offset. 2.384 2.385 - lda $3302 2.386 + lda $3d02 2.387 cmp #0 2.388 beq move_player_leave_room_up 2.389 2.390 tax ; use the y offset as an index 2.391 dex ; y - 1 2.392 - lda $3304 ; load the x offset 2.393 + lda $3d04 ; load the x offset 2.394 tay 2.395 lda room_row_offsets_low,x ; read the address of the row 2.396 sta $70 2.397 @@ -1862,7 +1862,7 @@ 2.398 cmp #0 2.399 bne move_player_not_up_key 2.400 2.401 - lda $3305 ; dx 2.402 + lda $3d05 ; dx 2.403 cmp #3 2.404 bmi move_player_allow_up 2.405 2.406 @@ -1878,17 +1878,17 @@ 2.407 sta $81 ; temporary 2.408 jsr unplot_character ; unplot the player character 2.409 lda $81 2.410 - sta $3302 ; store the new room y offset 2.411 + sta $3d02 ; store the new room y offset 2.412 lda #5 2.413 - sta $3303 ; dy = 5 2.414 + sta $3d03 ; dy = 5 2.415 clc 2.416 jmp animate_player_up ; optimise away the rts 2.417 2.418 move_player_leave_room_up: 2.419 sec 2.420 - lda $33f2 2.421 + lda $3df2 2.422 sbc #1 2.423 - sta $33f2 2.424 + sta $3df2 2.425 clc 2.426 2.427 ; Set the player's position on the bottom of the screen. 2.428 @@ -1896,9 +1896,9 @@ 2.429 ; No need to unplot. 2.430 2.431 lda #9 ; y = 9 2.432 - sta $3302 2.433 + sta $3d02 2.434 lda #0 ; dy = 0 2.435 - sta $3303 2.436 + sta $3d03 2.437 2.438 jsr animate_player_up 2.439 sec ; indicate to the calling routine that the player 2.440 @@ -1913,27 +1913,27 @@ 2.441 cpy #255 2.442 bne move_player_not_down_key 2.443 2.444 - lda $3303 ; read dy 2.445 + lda $3d03 ; read dy 2.446 cmp #0 2.447 beq move_player_down_check_y 2.448 cmp #5 2.449 beq move_player_down_tile 2.450 2.451 jsr unplot_character ; unplot the player character 2.452 - inc $3303 ; 0 < dy < 5 2.453 + inc $3d03 ; 0 < dy < 5 2.454 clc 2.455 jmp animate_player_down ; optimise away the rts 2.456 2.457 move_player_down_check_y: ; Check the y offset. 2.458 2.459 - lda $3302 2.460 + lda $3d02 2.461 cmp #9 2.462 beq move_player_leave_room_down 2.463 2.464 clc 2.465 tax 2.466 inx ; y + 1 2.467 - lda $3304 ; load the x offset 2.468 + lda $3d04 ; load the x offset 2.469 tay 2.470 lda room_row_offsets_low,x ; read the address of the row 2.471 sta $70 2.472 @@ -1949,7 +1949,7 @@ 2.473 cmp #0 2.474 bne move_player_not_down_key 2.475 2.476 - lda $3305 ; dx 2.477 + lda $3d05 ; dx 2.478 cmp #3 2.479 bmi move_player_allow_down 2.480 2.481 @@ -1963,24 +1963,24 @@ 2.482 move_player_allow_down: 2.483 2.484 jsr unplot_character ; unplot the player character 2.485 - inc $3303 ; update dy 2.486 + inc $3d03 ; update dy 2.487 clc 2.488 jmp animate_player_down ; optimise away the rts 2.489 2.490 move_player_down_tile: 2.491 2.492 jsr unplot_character ; unplot the player character 2.493 - inc $3302 ; store the new room y offset 2.494 + inc $3d02 ; store the new room y offset 2.495 lda #0 2.496 - sta $3303 ; dy = 0 2.497 + sta $3d03 ; dy = 0 2.498 clc 2.499 jmp animate_player_down ; optimise away the rts 2.500 2.501 move_player_leave_room_down: 2.502 clc 2.503 - lda $33f2 2.504 + lda $3df2 2.505 adc #1 2.506 - sta $33f2 2.507 + sta $3df2 2.508 clc 2.509 2.510 ; Set the player's position on the top of the screen. 2.511 @@ -1988,9 +1988,9 @@ 2.512 ; No need to unplot. 2.513 2.514 lda #0 ; y = 0 2.515 - sta $3302 2.516 + sta $3d02 2.517 lda #0 ; dy = 0 2.518 - sta $3303 2.519 + sta $3d03 2.520 2.521 jsr animate_player_down 2.522 sec ; indicate to the calling routine that the 2.523 @@ -2002,15 +2002,15 @@ 2.524 2.525 try_to_exit_level: 2.526 2.527 - lda $33f0 ; set the exit flag 2.528 + lda $3df0 ; set the exit flag 2.529 ora #$80 2.530 - sta $33f0 2.531 + sta $3df0 2.532 sec ; indicate that the player is leaving the room 2.533 rts 2.534 2.535 check_fire_key: 2.536 2.537 - lda $33fd 2.538 + lda $3dfd 2.539 bne check_fire_key_exit 2.540 2.541 ldx #182 ; (Return) 2.542 @@ -2018,12 +2018,12 @@ 2.543 cpy #255 2.544 bne check_fire_key_exit 2.545 2.546 - lda $3306 2.547 + lda $3d06 2.548 cmp #0 2.549 bne check_fire_key_exit 2.550 2.551 lda #15 2.552 - sta $33fd 2.553 + sta $3dfd 2.554 2.555 jmp create_projectile ; optimise away the rts 2.556 2.557 @@ -2034,46 +2034,46 @@ 2.558 create_projectile: 2.559 2.560 lda #2 2.561 - sta $3306 2.562 - 2.563 - lda $3301 2.564 + sta $3d06 2.565 + 2.566 + lda $3d01 2.567 and #$06 ; copy the direction information 2.568 asl 2.569 asl 2.570 asl 2.571 - ora $33f9 ; apply the projectile type 2.572 - sta $3307 2.573 - 2.574 - lda $3303 ; dy 2.575 + ora $3df9 ; apply the projectile type 2.576 + sta $3d07 2.577 + 2.578 + lda $3d03 ; dy 2.579 cmp #4 2.580 bpl create_projectile_below 2.581 2.582 clc 2.583 adc #2 2.584 - sta $3309 ; dy + 2 2.585 - lda $3302 ; y 2.586 - sta $3308 2.587 + sta $3d09 ; dy + 2 2.588 + lda $3d02 ; y 2.589 + sta $3d08 2.590 jmp create_projectile_continue 2.591 2.592 create_projectile_below: 2.593 sec 2.594 sbc #4 2.595 - sta $3309 ; dy - 4 2.596 + sta $3d09 ; dy - 4 2.597 clc 2.598 - lda $3302 ; y 2.599 + lda $3d02 ; y 2.600 adc #1 2.601 - sta $3308 2.602 + sta $3d08 2.603 2.604 create_projectile_continue: 2.605 - lda $3304 ; x 2.606 - sta $330a 2.607 - 2.608 - lda $3305 ; dx 2.609 - sta $330b 2.610 + lda $3d04 ; x 2.611 + sta $3d0a 2.612 + 2.613 + lda $3d05 ; dx 2.614 + sta $3d0b 2.615 2.616 lda #$06 2.617 sta $74 2.618 - lda #$33 2.619 + lda #$3d 2.620 sta $75 2.621 jsr plot_character 2.622 2.623 @@ -2096,13 +2096,13 @@ 2.624 emerge_x_position: ; returns A=position 2.625 2.626 jsr unlimited_values 2.627 - lda $3304 2.628 + lda $3d04 2.629 jmp emerge_position_common 2.630 2.631 emerge_y_position: ; returns A=position 2.632 2.633 jsr unlimited_values 2.634 - lda $3302 2.635 + lda $3d02 2.636 ; run on into the next routine 2.637 2.638 emerge_position_common: 2.639 @@ -2145,7 +2145,7 @@ 2.640 emerge_character: ; $74,$75=character address 2.641 2.642 lda #63 2.643 - sta $33ff 2.644 + sta $3dff 2.645 2.646 jsr emerge_y_position ; obtain a y position 2.647 tax 2.648 @@ -2604,13 +2604,13 @@ 2.649 2.650 ldy #2 2.651 lda ($74),y ; y 2.652 - cmp $3302 ; player y 2.653 + cmp $3d02 ; player y 2.654 bmi move_enemy_downwards 2.655 bne move_enemy_upwards 2.656 2.657 ldy #3 2.658 lda ($74),y ; dy 2.659 - cmp $3303 ; player y 2.660 + cmp $3d03 ; player y 2.661 beq move_enemy_horizontally 2.662 bpl move_enemy_upwards 2.663 2.664 @@ -2627,7 +2627,7 @@ 2.665 move_enemy_horizontally: 2.666 ldy #4 2.667 lda ($74),y ; x 2.668 - cmp $3304 ; player x 2.669 + cmp $3d04 ; player x 2.670 bmi move_enemy_rightwards 2.671 bne move_enemy_leftwards 2.672 2.673 @@ -2691,38 +2691,38 @@ 2.674 create_explosion: ; X=y, Y=x 2.675 2.676 lda #3 2.677 - sta $3324 2.678 + sta $3d24 2.679 lda #8 2.680 - sta $3325 2.681 + sta $3d25 2.682 txa 2.683 - sta $3326 2.684 + sta $3d26 2.685 lda #1 2.686 - sta $3327 2.687 + sta $3d27 2.688 tya 2.689 - sta $3328 2.690 + sta $3d28 2.691 lda #0 2.692 - sta $3329 2.693 + sta $3d29 2.694 rts 2.695 2.696 move_projectile_left: 2.697 2.698 - lda $330b 2.699 + lda $3d0b 2.700 cmp #0 2.701 beq move_projectile_left_check_x 2.702 2.703 - dec $330b 2.704 + dec $3d0b 2.705 clc 2.706 rts 2.707 2.708 move_projectile_left_check_x: 2.709 2.710 - lda $330a 2.711 + lda $3d0a 2.712 cmp #0 2.713 beq move_projectile_left_exit 2.714 2.715 tay 2.716 dey ; x - 1 2.717 - ldx $3308 ; y 2.718 + ldx $3d08 ; y 2.719 lda room_row_offsets_low,x ; read the address of the row 2.720 sta $70 2.721 lda #$57 2.722 @@ -2732,7 +2732,7 @@ 2.723 cmp #0 2.724 bne move_projectile_left_wall 2.725 2.726 - lda $3309 ; dy 2.727 + lda $3d09 ; dy 2.728 cmp #5 2.729 bmi move_projectile_allow_left 2.730 2.731 @@ -2747,9 +2747,9 @@ 2.732 2.733 move_projectile_allow_left: 2.734 2.735 - sty $330a ; x 2.736 + sty $3d0a ; x 2.737 lda #3 2.738 - sta $330b ; dx = 3 2.739 + sta $3d0b ; dx = 3 2.740 2.741 clc 2.742 rts 2.743 @@ -2757,7 +2757,7 @@ 2.744 move_projectile_left_wall: ; the projectile hit a wall 2.745 clc 2.746 2.747 - lda $3307 ; type 2 can pass through walls 2.748 + lda $3d07 ; type 2 can pass through walls 2.749 and #$06 2.750 cmp #4 2.751 beq move_projectile_allow_left 2.752 @@ -2765,14 +2765,14 @@ 2.753 cmp #2 2.754 bne move_projectile_left_not_boomerang 2.755 2.756 - lda $3307 2.757 + lda $3d07 2.758 and #$0f 2.759 cmp #8 2.760 bpl move_projectile_left_exit 2.761 2.762 - ldx $3309 ; dy 2.763 + ldx $3d09 ; dy 2.764 ora boomerang_horizontal,x 2.765 - sta $3307 2.766 + sta $3d07 2.767 clc 2.768 rts ; exit without moving or registering a collision 2.769 2.770 @@ -2781,7 +2781,7 @@ 2.771 cmp #6 ; type 3 can destroy certain walls 2.772 bne move_projectile_left_exit 2.773 2.774 - lda $3309 ; dy 2.775 + lda $3d09 ; dy 2.776 cmp #5 2.777 beq move_projectile_left_exit ; shots must be lined up 2.778 2.779 @@ -2799,7 +2799,7 @@ 2.780 2.781 lda #$24 2.782 sta $74 2.783 - lda #$33 2.784 + lda #$3d 2.785 sta $75 2.786 jsr plot_character 2.787 2.788 @@ -2813,19 +2813,19 @@ 2.789 2.790 ; Fire right. 2.791 2.792 - lda $330b 2.793 + lda $3d0b 2.794 cmp #2 2.795 beq move_projectile_right_check_x 2.796 cmp #3 2.797 beq move_projectile_right_tile 2.798 2.799 - inc $330b 2.800 + inc $3d0b 2.801 clc 2.802 rts 2.803 2.804 move_projectile_right_check_x: 2.805 2.806 - lda $330a ; x 2.807 + lda $3d0a ; x 2.808 cmp #9 2.809 bne move_projectile_right_not_edge 2.810 jmp move_projectile_right_exit 2.811 @@ -2834,7 +2834,7 @@ 2.812 clc 2.813 tay 2.814 iny ; x + 1 2.815 - ldx $3308 ; y 2.816 + ldx $3d08 ; y 2.817 lda room_row_offsets_low,x ; read the address of the row 2.818 sta $70 2.819 lda #$57 2.820 @@ -2844,7 +2844,7 @@ 2.821 cmp #0 2.822 bne move_projectile_right_wall 2.823 2.824 - lda $3309 ; dy 2.825 + lda $3d09 ; dy 2.826 cmp #5 2.827 bmi move_projectile_allow_right 2.828 2.829 @@ -2859,22 +2859,22 @@ 2.830 2.831 move_projectile_allow_right: 2.832 2.833 - inc $330b ; dx 2.834 + inc $3d0b ; dx 2.835 clc 2.836 rts 2.837 2.838 move_projectile_right_tile: 2.839 2.840 - inc $330a ; x 2.841 + inc $3d0a ; x 2.842 lda #0 2.843 - sta $330b ; dx 2.844 + sta $3d0b ; dx 2.845 clc 2.846 rts 2.847 2.848 move_projectile_right_wall: ; the projectile hit a wall 2.849 clc 2.850 2.851 - lda $3307 ; type 2 can pass through walls 2.852 + lda $3d07 ; type 2 can pass through walls 2.853 and #$06 2.854 cmp #4 2.855 beq move_projectile_allow_right 2.856 @@ -2882,14 +2882,14 @@ 2.857 cmp #2 2.858 bne move_projectile_right_not_boomerang 2.859 2.860 - lda $3307 2.861 + lda $3d07 2.862 and #$0f 2.863 cmp #8 2.864 bpl move_projectile_right_exit 2.865 2.866 - ldx $3309 ; dy 2.867 + ldx $3d09 ; dy 2.868 ora boomerang_horizontal,x 2.869 - sta $3307 2.870 + sta $3d07 2.871 clc 2.872 rts ; exit without moving or registering a collision 2.873 2.874 @@ -2898,7 +2898,7 @@ 2.875 cmp #6 ; type 3 can destroy certain walls 2.876 bne move_projectile_right_exit 2.877 2.878 - lda $3309 ; dy 2.879 + lda $3d09 ; dy 2.880 cmp #5 2.881 beq move_projectile_right_exit ; shots must be lined up 2.882 2.883 @@ -2916,7 +2916,7 @@ 2.884 2.885 lda #$24 2.886 sta $74 2.887 - lda #$33 2.888 + lda #$3d 2.889 sta $75 2.890 jsr plot_character 2.891 2.892 @@ -2926,23 +2926,23 @@ 2.893 2.894 move_projectile_up: 2.895 2.896 - lda $3309 ; read dy 2.897 + lda $3d09 ; read dy 2.898 cmp #0 2.899 beq move_projectile_up_check_y 2.900 2.901 - dec $3309 2.902 + dec $3d09 2.903 clc 2.904 rts 2.905 2.906 move_projectile_up_check_y: ; Check the y offset. 2.907 2.908 - lda $3308 2.909 + lda $3d08 2.910 cmp #0 2.911 beq move_projectile_up_exit 2.912 2.913 tax ; use the y offset as an index 2.914 dex ; y - 1 2.915 - lda $330a ; load the x offset 2.916 + lda $3d0a ; load the x offset 2.917 tay 2.918 lda room_row_offsets_low,x ; read the address of the row 2.919 sta $70 2.920 @@ -2953,7 +2953,7 @@ 2.921 cmp #0 2.922 bne move_projectile_up_wall 2.923 2.924 - lda $330b ; dx 2.925 + lda $3d0b ; dx 2.926 cmp #3 2.927 bmi move_projectile_allow_up 2.928 2.929 @@ -2966,9 +2966,9 @@ 2.930 2.931 move_projectile_allow_up: 2.932 txa 2.933 - sta $3308 ; store the new room y offset 2.934 + sta $3d08 ; store the new room y offset 2.935 lda #5 2.936 - sta $3309 ; dy = 5 2.937 + sta $3d09 ; dy = 5 2.938 2.939 clc 2.940 rts 2.941 @@ -2976,7 +2976,7 @@ 2.942 move_projectile_up_wall: ; the projectile hit a wall 2.943 clc 2.944 2.945 - lda $3307 ; type 2 can pass through walls 2.946 + lda $3d07 ; type 2 can pass through walls 2.947 and #$06 2.948 cmp #4 2.949 beq move_projectile_allow_up 2.950 @@ -2984,14 +2984,14 @@ 2.951 cmp #2 2.952 bne move_projectile_up_not_boomerang 2.953 2.954 - lda $3307 2.955 + lda $3d07 2.956 and #$0f 2.957 cmp #8 2.958 bpl move_projectile_up_exit 2.959 2.960 - ldx $330b ; dx 2.961 + ldx $3d0b ; dx 2.962 ora boomerang_vertical,x 2.963 - sta $3307 2.964 + sta $3d07 2.965 clc 2.966 rts ; exit without moving or registering a collision 2.967 2.968 @@ -3000,7 +3000,7 @@ 2.969 cmp #6 ; type 3 can destroy certain walls 2.970 bne move_projectile_up_exit 2.971 2.972 - lda $330b ; dx 2.973 + lda $3d0b ; dx 2.974 cmp #3 2.975 bpl move_projectile_up_exit ; shots must be lined up 2.976 2.977 @@ -3018,7 +3018,7 @@ 2.978 2.979 lda #$24 2.980 sta $74 2.981 - lda #$33 2.982 + lda #$3d 2.983 sta $75 2.984 jsr plot_character 2.985 2.986 @@ -3030,26 +3030,26 @@ 2.987 2.988 move_projectile_down: 2.989 2.990 - lda $3309 ; read dy 2.991 + lda $3d09 ; read dy 2.992 cmp #4 2.993 beq move_projectile_down_check_y 2.994 cmp #5 2.995 beq move_projectile_down_tile 2.996 2.997 - inc $3309 ; 0 < dy < 5 2.998 + inc $3d09 ; 0 < dy < 5 2.999 clc 2.1000 rts 2.1001 2.1002 move_projectile_down_check_y: ; Check the y offset. 2.1003 2.1004 - lda $3308 2.1005 + lda $3d08 2.1006 cmp #9 2.1007 beq move_projectile_down_exit 2.1008 2.1009 clc 2.1010 tax 2.1011 inx ; y + 1 2.1012 - lda $330a ; load the x offset 2.1013 + lda $3d0a ; load the x offset 2.1014 tay 2.1015 lda room_row_offsets_low,x ; read the address of the row 2.1016 sta $70 2.1017 @@ -3060,7 +3060,7 @@ 2.1018 cmp #0 2.1019 bne move_projectile_down_wall 2.1020 2.1021 - lda $330b ; dx 2.1022 + lda $3d0b ; dx 2.1023 cmp #3 2.1024 bmi move_projectile_allow_down 2.1025 2.1026 @@ -3073,22 +3073,22 @@ 2.1027 2.1028 move_projectile_allow_down: 2.1029 2.1030 - inc $3309 ; update dy 2.1031 + inc $3d09 ; update dy 2.1032 clc 2.1033 rts 2.1034 2.1035 move_projectile_down_tile: 2.1036 2.1037 - inc $3308 ; store the new room y offset 2.1038 + inc $3d08 ; store the new room y offset 2.1039 lda #0 2.1040 - sta $3309 ; dy = 0 2.1041 + sta $3d09 ; dy = 0 2.1042 clc 2.1043 rts 2.1044 2.1045 move_projectile_down_wall: ; the projectile hit a wall 2.1046 clc 2.1047 2.1048 - lda $3307 ; type 2 can pass through walls 2.1049 + lda $3d07 ; type 2 can pass through walls 2.1050 and #$06 2.1051 cmp #4 2.1052 beq move_projectile_allow_down 2.1053 @@ -3096,14 +3096,14 @@ 2.1054 cmp #2 2.1055 bne move_projectile_down_not_boomerang 2.1056 2.1057 - lda $3307 2.1058 + lda $3d07 2.1059 and #$0f 2.1060 cmp #8 2.1061 bpl move_projectile_down_exit 2.1062 2.1063 - ldx $330b ; dx 2.1064 + ldx $3d0b ; dx 2.1065 ora boomerang_vertical,x 2.1066 - sta $3307 2.1067 + sta $3d07 2.1068 clc 2.1069 rts ; exit without moving or registering a collision 2.1070 2.1071 @@ -3112,7 +3112,7 @@ 2.1072 cmp #6 ; type 3 can destroy certain walls 2.1073 bne move_projectile_down_exit 2.1074 2.1075 - lda $330b ; dx 2.1076 + lda $3d0b ; dx 2.1077 cmp #3 2.1078 bpl move_projectile_down_exit ; shots must be lined up 2.1079 2.1080 @@ -3130,7 +3130,7 @@ 2.1081 2.1082 lda #$24 2.1083 sta $74 2.1084 - lda #$33 2.1085 + lda #$3d 2.1086 sta $75 2.1087 jsr plot_character 2.1088 2.1089 @@ -3140,14 +3140,14 @@ 2.1090 2.1091 move_projectile_animate: 2.1092 2.1093 - lda $3307 2.1094 + lda $3d07 2.1095 eor #1 2.1096 - sta $3307 2.1097 + sta $3d07 2.1098 rts 2.1099 2.1100 move_projectile: 2.1101 2.1102 - lda $3306 2.1103 + lda $3d06 2.1104 cmp #0 2.1105 bne move_projectile_move 2.1106 jmp move_projectile_exit 2.1107 @@ -3157,11 +3157,11 @@ 2.1108 2.1109 lda #$06 2.1110 sta $74 2.1111 - lda #$33 2.1112 + lda #$3d 2.1113 sta $75 2.1114 jsr unplot_character 2.1115 2.1116 - lda $3307 2.1117 + lda $3d07 2.1118 and #$30 ; direction 2.1119 2.1120 cmp #0 2.1121 @@ -3203,7 +3203,7 @@ 2.1122 2.1123 lda #$06 2.1124 sta $74 2.1125 - lda #$33 2.1126 + lda #$3d 2.1127 sta $75 2.1128 jmp plot_character ; optimise away the rts 2.1129 2.1130 @@ -3241,7 +3241,7 @@ 2.1131 2.1132 move_projectile_no_enemy_collision: 2.1133 2.1134 - lda $3307 ; type 2 projectiles pass through everything 2.1135 + lda $3d07 ; type 2 projectiles pass through everything 2.1136 and #$06 2.1137 cmp #4 2.1138 bne move_projectile_remove_projectile 2.1139 @@ -3250,13 +3250,13 @@ 2.1140 ; that we don't perform these checks again here, but it would just add 2.1141 ; overhead to the normal movement routines for the other weapons. 2.1142 2.1143 - lda $3308 ; y 2.1144 + lda $3d08 ; y 2.1145 cmp #0 2.1146 beq move_projectile_remove_projectile 2.1147 cmp #9 2.1148 beq move_projectile_remove_projectile 2.1149 2.1150 - lda $330a ; x 2.1151 + lda $3d0a ; x 2.1152 cmp #0 2.1153 beq move_projectile_remove_projectile 2.1154 cmp #9 2.1155 @@ -3265,7 +3265,7 @@ 2.1156 clc 2.1157 lda #$06 2.1158 sta $74 2.1159 - lda #$33 2.1160 + lda #$3d 2.1161 sta $75 2.1162 2.1163 jsr plot_character 2.1164 @@ -3274,7 +3274,7 @@ 2.1165 move_projectile_remove_projectile: 2.1166 2.1167 lda #0 ; remove the projectile from the character list 2.1168 - sta $3306 2.1169 + sta $3d06 2.1170 2.1171 move_projectile_exit: 2.1172 clc 2.1173 @@ -3286,7 +3286,7 @@ 2.1174 2.1175 lda #$0c ; set the character address 2.1176 sta $74 2.1177 - lda #$33 2.1178 + lda #$3d 2.1179 sta $75 2.1180 2.1181 move_characters_loop: 2.1182 @@ -3301,11 +3301,11 @@ 2.1183 bpl move_characters_read_character 2.1184 2.1185 ; See if it is time to generate a new enemy. 2.1186 - lda $33ff 2.1187 + lda $3dff 2.1188 cmp #0 2.1189 bne move_characters_next 2.1190 2.1191 - lda $33f0 ; player demise - no more enemies 2.1192 + lda $3df0 ; player demise - no more enemies 2.1193 and #$40 2.1194 bne move_characters_next 2.1195 2.1196 @@ -3319,7 +3319,7 @@ 2.1197 cmp #3 2.1198 bne move_characters_not_emerge_explode 2.1199 2.1200 - lda $33fe ; check motion counter 2.1201 + lda $3dfe ; check motion counter 2.1202 and #3 2.1203 bne move_characters_next 2.1204 2.1205 @@ -3330,11 +3330,11 @@ 2.1206 cmp #8 2.1207 bmi move_characters_next 2.1208 2.1209 - lda $33fe ; check motion counter 2.1210 + lda $3dfe ; check motion counter 2.1211 and #3 2.1212 bne move_characters_next 2.1213 2.1214 - lda $33f0 ; player demise - no enemy motion 2.1215 + lda $3df0 ; player demise - no enemy motion 2.1216 and #$40 2.1217 bne move_characters_next 2.1218 2.1219 @@ -3369,9 +3369,9 @@ 2.1220 jsr unplot_character 2.1221 2.1222 ; Remove it from the item table. 2.1223 - ldx $33f2 2.1224 + ldx $3df2 2.1225 lda eleven_times_table,x 2.1226 - adc $33f3 2.1227 + adc $3df3 2.1228 tax 2.1229 lda #0 2.1230 sta $5100,x 2.1231 @@ -3413,9 +3413,9 @@ 2.1232 bmi move_characters_not_key 2.1233 2.1234 ; Key - update the item/player flags byte. 2.1235 - lda $33f0 2.1236 + lda $3df0 2.1237 ora #$01 2.1238 - sta $33f0 2.1239 + sta $3df0 2.1240 clc 2.1241 rts 2.1242 2.1243 @@ -3423,7 +3423,7 @@ 2.1244 2.1245 ; Update the player's weapon. 2.1246 asl 2.1247 - sta $33f9 2.1248 + sta $3df9 2.1249 clc 2.1250 rts 2.1251 2.1252 @@ -3460,15 +3460,15 @@ 2.1253 add_score: ; $70=score to add 2.1254 2.1255 sed 2.1256 - lda $33f6 2.1257 + lda $3df6 2.1258 adc $70 2.1259 - sta $33f6 2.1260 - lda $33f7 2.1261 + sta $3df6 2.1262 + lda $3df7 2.1263 adc #0 2.1264 - sta $33f7 2.1265 - lda $33f8 2.1266 + sta $3df7 2.1267 + lda $3df8 2.1268 adc #0 2.1269 - sta $33f8 2.1270 + sta $3df8 2.1271 cld 2.1272 2.1273 write_score: 2.1274 @@ -3482,7 +3482,7 @@ 2.1275 2.1276 lda #$f6 2.1277 sta $70 2.1278 - lda #$33 2.1279 + lda #$3d 2.1280 sta $71 2.1281 2.1282 ldy #2 2.1283 @@ -3516,26 +3516,26 @@ 2.1284 ; Divide the initial strength by 4 to determine which half character to 2.1285 ; start plotting at, and multiply by 8 to get the address. The net result 2.1286 ; is to mask off the bottom two bits and shift left once. 2.1287 - lda $33f4 2.1288 + lda $3df4 2.1289 and #$fc 2.1290 asl 2.1291 clc 2.1292 tay 2.1293 2.1294 - lda $33f4 2.1295 + lda $3df4 2.1296 adc $70 2.1297 cmp #65 2.1298 bmi add_strength_update 2.1299 2.1300 lda #64 2.1301 sec 2.1302 - sbc $33f4 2.1303 + sbc $3df4 2.1304 sta $70 2.1305 lda #64 2.1306 2.1307 add_strength_update: 2.1308 clc 2.1309 - sta $33f4 2.1310 + sta $3df4 2.1311 2.1312 ldx $70 2.1313 2.1314 @@ -3579,7 +3579,7 @@ 2.1315 2.1316 reduce_strength: ; $70=strength to remove 2.1317 2.1318 - lda $33f4 2.1319 + lda $3df4 2.1320 tax 2.1321 sec 2.1322 sbc $70 2.1323 @@ -3589,7 +3589,7 @@ 2.1324 2.1325 reduce_strength_update: 2.1326 clc 2.1327 - sta $33f4 2.1328 + sta $3df4 2.1329 2.1330 ; Divide the final strength by 4 to determine which half character to 2.1331 ; plot, and multiply by 8 to get the address. The net result is to mask off 2.1332 @@ -3603,32 +3603,32 @@ 2.1333 lda #$59 2.1334 sta $71 2.1335 2.1336 - lda $33f4 2.1337 + lda $3df4 2.1338 and #3 2.1339 tax 2.1340 lda strength_units,x 2.1341 sta ($70),y 2.1342 2.1343 - lda $33f4 2.1344 + lda $3df4 2.1345 cmp #0 2.1346 bne reduce_strength_exit 2.1347 2.1348 - lda $33f0 ; the player ran out of strength 2.1349 + lda $3df0 ; the player ran out of strength 2.1350 ora #$40 2.1351 - sta $33f0 2.1352 + sta $3df0 2.1353 2.1354 lda #64 ; reset the delay counter 2.1355 - sta $33f5 2.1356 + sta $3df5 2.1357 2.1358 lda #$00 ; unplot the player 2.1359 sta $74 2.1360 - lda #$33 2.1361 + lda #$3d 2.1362 sta $75 2.1363 2.1364 jsr unplot_character 2.1365 2.1366 lda #8 ; change the player's direction to the demise animation 2.1367 - sta $3301 2.1368 + sta $3d01 2.1369 2.1370 jsr plot_character 2.1371 2.1372 @@ -3673,7 +3673,7 @@ 2.1373 ldx #6 2.1374 remove_characters_loop: 2.1375 lda #0 2.1376 - sta $3300,x 2.1377 + sta $3d00,x 2.1378 txa 2.1379 adc #6 2.1380 tax 2.1381 @@ -3721,17 +3721,17 @@ 2.1382 2.1383 player_collide: 2.1384 2.1385 - lda $3302 ; player y 2.1386 + lda $3d02 ; player y 2.1387 sta $8a 2.1388 - lda $3304 ; player x 2.1389 + lda $3d04 ; player x 2.1390 sta $8b 2.1391 2.1392 - ldx $3303 ; player dy 2.1393 + ldx $3d03 ; player dy 2.1394 lda player_collision_mask_above,x 2.1395 sta $86 2.1396 lda player_collision_mask_below,x 2.1397 sta $88 2.1398 - ldx $3305 ; player dx 2.1399 + ldx $3d05 ; player dx 2.1400 lda player_collision_mask_left,x 2.1401 sta $87 2.1402 lda player_collision_mask_right,x 2.1403 @@ -3741,17 +3741,17 @@ 2.1404 2.1405 projectile_collide: 2.1406 2.1407 - lda $3308 ; projectile y 2.1408 + lda $3d08 ; projectile y 2.1409 sta $8a 2.1410 - lda $330a ; projectile x 2.1411 + lda $3d0a ; projectile x 2.1412 sta $8b 2.1413 2.1414 - ldx $3309 ; projectile dy 2.1415 + ldx $3d09 ; projectile dy 2.1416 lda projectile_collision_mask_above,x 2.1417 sta $86 2.1418 lda projectile_collision_mask_below,x 2.1419 sta $88 2.1420 - ldx $330b ; projectile dx 2.1421 + ldx $3d0b ; projectile dx 2.1422 lda projectile_collision_mask_left,x 2.1423 sta $87 2.1424 lda projectile_collision_mask_right,x 2.1425 @@ -3763,7 +3763,7 @@ 2.1426 2.1427 lda #$0c ; set the character address 2.1428 sta $74 2.1429 - lda #$33 2.1430 + lda #$3d 2.1431 sta $75 2.1432 2.1433 collide_loop: 2.1434 @@ -3897,17 +3897,17 @@ 2.1435 ; $70=logical colour 2.1436 ; $71=physical colour 2.1437 lda $70 2.1438 - sta $33fb 2.1439 + sta $3dfb 2.1440 lda $71 2.1441 - sta $33fc 2.1442 + sta $3dfc 2.1443 lda #0 2.1444 - sta $33fd 2.1445 - sta $33fe 2.1446 - sta $33ff 2.1447 + sta $3dfd 2.1448 + sta $3dfe 2.1449 + sta $3dff 2.1450 2.1451 lda #$c 2.1452 ldx #$fb 2.1453 - ldy #$33 2.1454 + ldy #$3d 2.1455 jsr $fff1 2.1456 rts 2.1457 2.1458 @@ -3939,10 +3939,10 @@ 2.1459 .byte $60, $56, 0, 0 2.1460 2.1461 chars_block: .byte <chars_file_name, >chars_file_name 2.1462 - .byte $00, $34, 0, 0 2.1463 - .byte $00, $34, 0, 0 2.1464 + .byte $00, $3e, 0, 0 2.1465 + .byte $00, $3e, 0, 0 2.1466 .byte $80, $12, 0, 0 2.1467 - .byte $80, $46, 0, 0 2.1468 + .byte $80, $50, 0, 0 2.1469 2.1470 init: 2.1471 lda #255 2.1472 @@ -4012,12 +4012,12 @@ 2.1473 bmi write_game_over_text_loop 2.1474 2.1475 lda #192 2.1476 - sta $33f5 2.1477 + sta $3df5 2.1478 show_game_over_delay_loop: 2.1479 2.1480 lda #19 2.1481 jsr $fff4 2.1482 - dec $33f5 2.1483 + dec $3df5 2.1484 bne show_game_over_delay_loop 2.1485 2.1486 rts 2.1487 @@ -4046,13 +4046,13 @@ 2.1488 2.1489 ; Set the level. 2.1490 lda #0 2.1491 - sta $33fa 2.1492 + sta $3dfa 2.1493 2.1494 ; Set the score. 2.1495 lda #0 2.1496 - sta $33f6 2.1497 - sta $33f7 2.1498 - sta $33f8 2.1499 + sta $3df6 2.1500 + sta $3df7 2.1501 + sta $3df8 2.1502 jsr write_score 2.1503 2.1504 ; Set the player's strength. 2.1505 @@ -4062,7 +4062,7 @@ 2.1506 2.1507 ; Set the projectile type. 2.1508 lda #0 2.1509 - sta $33f9 2.1510 + sta $3df9 2.1511 2.1512 rts 2.1513 2.1514 @@ -4070,7 +4070,7 @@ 2.1515 2.1516 ; Clear the item/player flags. 2.1517 lda #0 2.1518 - sta $33f0 2.1519 + sta $3df0 2.1520 2.1521 ; Add to the player's strength. 2.1522 lda #20 2.1523 @@ -4079,34 +4079,34 @@ 2.1524 2.1525 ; Set current room. 2.1526 2.1527 - ldx $33fa 2.1528 + ldx $3dfa 2.1529 lda start_rooms_y,x 2.1530 - sta $33f2 2.1531 + sta $3df2 2.1532 lda start_rooms_x,x 2.1533 - sta $33f3 2.1534 + sta $3df3 2.1535 2.1536 ; Set the player position. 2.1537 2.1538 lda #1 ; player 2.1539 - sta $3300 2.1540 + sta $3d00 2.1541 lda #6 ; down (first frame) 2.1542 - sta $3301 2.1543 + sta $3d01 2.1544 lda #5 ; y=5 2.1545 - sta $3302 2.1546 + sta $3d02 2.1547 lda #0 ; dy=0 2.1548 - sta $3303 2.1549 + sta $3d03 2.1550 lda #5 ; x=5 2.1551 - sta $3304 2.1552 + sta $3d04 2.1553 lda #0 ; dx=0 2.1554 - sta $3305 2.1555 + sta $3d05 2.1556 2.1557 ; Fill the treasure table with objects. 2.1558 - lda $33fa ; level 2.1559 + lda $3dfa ; level 2.1560 tax 2.1561 lda key_rooms,x 2.1562 sta $80 2.1563 2.1564 - ldx $33fa ; level 2.1565 + ldx $3dfa ; level 2.1566 lda seeds,x 2.1567 adc #1 2.1568 and #31 2.1569 @@ -4118,7 +4118,7 @@ 2.1570 sta $7d 2.1571 clc 2.1572 2.1573 - lda $33fa ; create an upper limit on the weapon type found in this level 2.1574 + lda $3dfa ; create an upper limit on the weapon type found in this level 2.1575 adc #2 2.1576 sta $8d 2.1577 clc 2.1578 @@ -4214,29 +4214,29 @@ 2.1579 jsr reset_unplot_buffer 2.1580 jsr reset_plot_buffer 2.1581 2.1582 - lda $33f2 ; current room (y) 2.1583 + lda $3df2 ; current room (y) 2.1584 sta $78 2.1585 - lda $33f3 ; current room (x) 2.1586 + lda $3df3 ; current room (x) 2.1587 sta $79 2.1588 jsr plot_room 2.1589 jsr add_treasure 2.1590 2.1591 lda #$00 ; plot the player 2.1592 sta $74 2.1593 - lda #$33 2.1594 + lda #$3d 2.1595 sta $75 2.1596 jsr plot_character 2.1597 2.1598 jsr plot_buffer 2.1599 2.1600 lda #0 ; reset projectile counter 2.1601 - sta $33fd 2.1602 + sta $3dfd 2.1603 2.1604 lda #0 ; reset motion counter 2.1605 - sta $33fe 2.1606 + sta $3dfe 2.1607 2.1608 lda #63 ; reset generation counter 2.1609 - sta $33ff 2.1610 + sta $3dff 2.1611 2.1612 room_loop: 2.1613 jsr reset_unplot_buffer 2.1614 @@ -4246,31 +4246,31 @@ 2.1615 2.1616 jsr move_projectile 2.1617 2.1618 - lda $33f0 2.1619 + lda $3df0 2.1620 and #$40 2.1621 beq room_loop_player_move 2.1622 clc 2.1623 2.1624 - dec $33f5 ; leave the loop when the delay 2.1625 + dec $3df5 ; leave the loop when the delay 2.1626 beq after_room_loop ; counter is about to reset 2.1627 2.1628 - lda $3301 ; leave the loop when the player 2.1629 + lda $3d01 ; leave the loop when the player 2.1630 cmp #11 ; animation has finished 2.1631 beq room_loop_after_player_move 2.1632 clc 2.1633 2.1634 - lda $33fe 2.1635 + lda $3dfe 2.1636 and #7 2.1637 bne room_loop_after_player_move 2.1638 2.1639 lda #$00 2.1640 sta $74 2.1641 - lda #$33 2.1642 + lda #$3d 2.1643 sta $75 2.1644 2.1645 jsr unplot_character 2.1646 2.1647 - inc $3301 2.1648 + inc $3d01 2.1649 jsr plot_character 2.1650 jmp room_loop_after_player_move 2.1651 2.1652 @@ -4293,35 +4293,35 @@ 2.1653 beq exit 2.1654 clc 2.1655 2.1656 - lda $33fd 2.1657 + lda $3dfd 2.1658 cmp #0 2.1659 beq room_loop_no_update_projectile_counter 2.1660 2.1661 - dec $33fd 2.1662 + dec $3dfd 2.1663 2.1664 room_loop_no_update_projectile_counter: 2.1665 2.1666 - dec $33ff ; update generation counter 2.1667 - 2.1668 - inc $33fe ; update motion counter 2.1669 + dec $3dff ; update generation counter 2.1670 + 2.1671 + inc $3dfe ; update motion counter 2.1672 clc 2.1673 jmp room_loop 2.1674 2.1675 after_room_loop: 2.1676 clc 2.1677 2.1678 - lda $33f0 2.1679 + lda $3df0 2.1680 and #$80 2.1681 bne exit_level 2.1682 2.1683 - lda $33f0 2.1684 + lda $3df0 2.1685 and #$40 2.1686 bne game_over 2.1687 2.1688 jmp game_loop 2.1689 2.1690 exit_level: 2.1691 - inc $33fa 2.1692 + inc $3dfa 2.1693 jmp level_loop 2.1694 2.1695 game_over:
3.1 --- a/tools/makesprites.py Wed Aug 31 02:34:09 2011 +0200 3.2 +++ b/tools/makesprites.py Wed Aug 31 11:03:04 2011 +0200 3.3 @@ -123,7 +123,7 @@ 3.4 read_xpm("images/birdrd3.xpm", [(".", "0"), ("+", "1"), ("@", "3")]), 3.5 read_xpm("images/birdrd4.xpm", [(".", "0"), ("+", "1"), ("@", "3")]), 3.6 3.7 - # placeholder enemy appear 3.8 + # Enemy emerge 3.9 read_xpm("images/emerge1.xpm", [(".", "0"), ("+", "1"), ("#", "2"), ("@", "3")]), 3.10 read_xpm("images/emerge2.xpm", [(".", "0"), ("+", "1"), ("#", "3"), ("@", "2")]), 3.11 read_xpm("images/emerge3.xpm", [(".", "0"), ("+", "1"), ("#", "2"), ("@", "3")]), 3.12 @@ -135,13 +135,13 @@ 3.13 read_xpm("images/emerge2.xpm", [(".", "0"), ("+", "1"), ("#", "3"), ("@", "2")]), 3.14 read_xpm("images/emerge1.xpm", [(".", "0"), ("+", "1"), ("#", "2"), ("@", "3")]), 3.15 3.16 - # placeholder weapons 3.17 + # Weapons 3.18 read_xpm("images/weapon1.xpm", [(".", "0"), ("+", "1"), ("@", "3")]), 3.19 read_xpm("images/weapon2.xpm", [(".", "0"), ("@", "1"), ("+", "2")]), 3.20 read_xpm("images/weapon3.xpm", [(".", "0"), ("#", "1"), ("+", "2"), ("@", "3")]), 3.21 read_xpm("images/weapon4.xpm", [(".", "0"), ("@", "1"), ("+", "3")]), 3.22 3.23 - # placeholder treasure 3.24 + # Treasure 3.25 read_xpm("images/key.xpm", [(".", "0"), ("+", "1"), ("@", "3")]), 3.26 read_xpm("images/chest.xpm", [(".", "0"), ("+", "1"), ("@", "3")]), 3.27 read_xpm("images/statue.xpm", [(".", "0"), ("+", "2"), ("@", "3")]),
