junglejourney

changeset 110:66895d303b5f

Removed redundant operations to save space.
author David Boddie <david@boddie.org.uk>
date Sun Sep 04 18:04:49 2011 +0200
parents f8ab64d9d70c
children 8bf248930f5c
files mapcode.oph
diffstat 1 files changed, 8 insertions(+), 19 deletions(-) [+]
line diff
     1.1 --- a/mapcode.oph	Sun Sep 04 17:51:59 2011 +0200
     1.2 +++ b/mapcode.oph	Sun Sep 04 18:04:49 2011 +0200
     1.3 @@ -1913,8 +1913,7 @@
     1.4  
     1.5      tax                         ; use the y offset as an index
     1.6      dex                         ; y - 1
     1.7 -    lda $3d04                   ; load the x offset
     1.8 -    tay
     1.9 +    ldy $3d04                   ; load the x offset
    1.10      lda room_row_offsets_low,x  ; read the address of the row
    1.11      sta $70
    1.12      lda #$57
    1.13 @@ -2007,8 +2006,7 @@
    1.14      clc
    1.15      tax
    1.16      inx                         ; y + 1
    1.17 -    lda $3d04                   ; load the x offset
    1.18 -    tay
    1.19 +    ldy $3d04                   ; load the x offset
    1.20      lda room_row_offsets_low,x  ; read the address of the row
    1.21      sta $70
    1.22      lda #$57
    1.23 @@ -3080,8 +3078,7 @@
    1.24  
    1.25      tax                         ; use the y offset as an index
    1.26      dex                         ; y - 1
    1.27 -    lda $3d0a                   ; load the x offset
    1.28 -    tay
    1.29 +    ldy $3d0a                   ; load the x offset
    1.30      lda room_row_offsets_low,x  ; read the address of the row
    1.31      sta $70
    1.32      lda #$57
    1.33 @@ -3192,8 +3189,7 @@
    1.34      clc
    1.35      tax
    1.36      inx                         ; y + 1
    1.37 -    lda $3d0a                   ; load the x offset
    1.38 -    tay
    1.39 +    ldy $3d0a                   ; load the x offset
    1.40      lda room_row_offsets_low,x  ; read the address of the row
    1.41      sta $70
    1.42      lda #$57
    1.43 @@ -3365,9 +3361,7 @@
    1.44      lsr
    1.45      lsr
    1.46      lsr
    1.47 -    lsr
    1.48 -    tax
    1.49 -    lda enemy_scores,x
    1.50 +    adc #2
    1.51      sta $70
    1.52      jsr add_score
    1.53  
    1.54 @@ -3430,8 +3424,6 @@
    1.55      clc
    1.56      rts
    1.57  
    1.58 -enemy_scores: .byte 2, 4, 6, 8, 10
    1.59 -
    1.60  move_characters:
    1.61  
    1.62      lda #$0c            ; set the character address
    1.63 @@ -4332,8 +4324,7 @@
    1.64      sta $70
    1.65      define_envelopes_loop:
    1.66  
    1.67 -        lda $70
    1.68 -        tax
    1.69 +        ldx $70
    1.70          lda envelopes_high,x
    1.71          tay
    1.72          lda envelopes_low,x
    1.73 @@ -4528,8 +4519,7 @@
    1.74          lda #150
    1.75          sta $3df5
    1.76  
    1.77 -        lda $72
    1.78 -        tax
    1.79 +        ldx $72
    1.80          ldy #22
    1.81          show_title_wait_message_loop:
    1.82  
    1.83 @@ -4949,8 +4939,7 @@
    1.84      jsr reset_player_position
    1.85  
    1.86      ; Fill the treasure table with objects.
    1.87 -    lda $3dfa   ; level
    1.88 -    tax
    1.89 +    ldx $3dfa   ; level
    1.90      lda key_rooms,x
    1.91      sta $80
    1.92