junglejourney

changeset 136:8e976229a16f

Added explosion images, adjusting the emerge/explode data format.
author David Boddie <david@boddie.org.uk>
date Sat Sep 10 23:41:25 2011 +0200
parents 3767d031e6b5
children 7b695a054073
files build.py mapcode.oph
diffstat 2 files changed, 10 insertions(+), 10 deletions(-) [+]
line diff
     1.1 --- a/build.py	Sat Sep 10 23:40:31 2011 +0200
     1.2 +++ b/build.py	Sat Sep 10 23:41:25 2011 +0200
     1.3 @@ -84,7 +84,7 @@
     1.4      #                    bit 0 is animation
     1.5      #        enemy:  bits 2,3 are direction, bits 1,0 are animation
     1.6      #        emerging, explosion: bits 4,5,6 are enemy type for emerging,
     1.7 -    #                             bit 3 is type 0=emerge,1=explode,
     1.8 +    #                             bit 2 is type 0=emerge,1=explode,
     1.9      #                             bits 0,1 are animation
    1.10      #        item: bits 0,1,2,3 are type, bit 2 is weapon/treasure
    1.11      #              0-3 weapons, 4 key, 5-8 treasure)
     2.1 --- a/mapcode.oph	Sat Sep 10 23:40:31 2011 +0200
     2.2 +++ b/mapcode.oph	Sat Sep 10 23:41:25 2011 +0200
     2.3 @@ -1325,7 +1325,7 @@
     2.4  enemy_direction_chars_low:  .byte $c0,$00,$40,$80,$c0,$00,$40,$80
     2.5  enemy_direction_chars_high: .byte $41,$42,$42,$42,$42,$43,$43,$43
     2.6  
     2.7 -emerge_explode_chars_low:  .byte $c0,$00,$40,$80,$c0,$00,$00,$00
     2.8 +emerge_explode_chars_low:  .byte $c0,$00,$40,$80,$c0,$00,$40,$80
     2.9  emerge_explode_chars_high: .byte $4b,$4c,$4c,$4c,$4c,$4d,$4d,$4d
    2.10  
    2.11  item_chars_low:  .byte $c0,$00,$40,$80,$c0,$00,$40,$80,$c0
    2.12 @@ -1491,7 +1491,7 @@
    2.13      ; Select the sprites to use.
    2.14  
    2.15      lda $80
    2.16 -    and #3          ; only keep the bits required to find the correct sprite
    2.17 +    and #7          ; only keep the bits required to find the correct sprite
    2.18      clc
    2.19      tax
    2.20      lda emerge_explode_chars_low,x
    2.21 @@ -2308,7 +2308,7 @@
    2.22      bne move_characters_explosion_not_finished
    2.23  
    2.24      txa
    2.25 -    and #8
    2.26 +    and #4
    2.27      bne move_characters_remove_character
    2.28  
    2.29      ; For emerges, convert into an enemy.
    2.30 @@ -2335,7 +2335,7 @@
    2.31  
    2.32      move_characters_explosion_not_finished:
    2.33      txa
    2.34 -    and #$f8
    2.35 +    and #$fc
    2.36      ora $80
    2.37  
    2.38      ldy #1
    2.39 @@ -2795,7 +2795,7 @@
    2.40  
    2.41      lda #3
    2.42      sta $52a4
    2.43 -    lda #8
    2.44 +    lda #4
    2.45      sta $52a5
    2.46      txa
    2.47      sta $52a6
    2.48 @@ -3362,7 +3362,7 @@
    2.49      ldy #0
    2.50      sta ($74),y
    2.51  
    2.52 -    lda #8
    2.53 +    lda #4
    2.54      ldy #1
    2.55      sta ($74),y
    2.56  
    2.57 @@ -3592,7 +3592,7 @@
    2.58      ldy #0
    2.59      sta ($74),y
    2.60  
    2.61 -    lda #8
    2.62 +    lda #4
    2.63      ldy #1
    2.64      sta ($74),y
    2.65  
    2.66 @@ -3816,7 +3816,7 @@
    2.67          sta ($74),y
    2.68  
    2.69          iny
    2.70 -        lda #8          ; explosion
    2.71 +        lda #4          ; explosion
    2.72          sta ($74),y
    2.73  
    2.74          jsr plot_character
    2.75 @@ -3830,7 +3830,7 @@
    2.76  
    2.77          iny             ; whether emerging or exploding, ensure that the enemy
    2.78          lda ($74),y     ; is now exploding
    2.79 -        ora #8
    2.80 +        ora #4
    2.81          sta ($74),y
    2.82  
    2.83          jsr plot_character