junglejourney

changeset 107:249743a9dc47

Hopefully fixed problem with score text having an incorrect colour.
author David Boddie <david@boddie.org.uk>
date Sun Sep 04 03:47:41 2011 +0200
parents ec9b8b735e5b
children b20becc97203
files TODO.txt mapcode.oph
diffstat 2 files changed, 46 insertions(+), 44 deletions(-) [+]
line diff
     1.1 --- a/TODO.txt	Sun Sep 04 02:49:24 2011 +0200
     1.2 +++ b/TODO.txt	Sun Sep 04 03:47:41 2011 +0200
     1.3 @@ -1,8 +1,15 @@
     1.4  To Do
     1.5  
     1.6 -Finish the title screen.
     1.7 -Add a completion screen.
     1.8 -Make one of the enemies have different movement.
     1.9 +Check and fix object generation.
    1.10 +Implement high score input.
    1.11  Improve the fire, explosion and player sprites.
    1.12  Add sounds.
    1.13  Nice to have: make projectiles start next to the player, not on top of him.
    1.14 +Nice to have: make one of the enemies have different movement.
    1.15 +Nice to have: make the boomerang turn before hitting a wall.
    1.16 +
    1.17 +Things to look out for
    1.18 +
    1.19 +Score text disappearing - probably caused by incorrect colour setting
    1.20 +between levels.
    1.21 +Strength level increasing unexpectedly.
     2.1 --- a/mapcode.oph	Sun Sep 04 02:49:24 2011 +0200
     2.2 +++ b/mapcode.oph	Sun Sep 04 03:47:41 2011 +0200
     2.3 @@ -4639,7 +4639,6 @@
     2.4      ; Count the number of rooms explored.
     2.5      ldx #0
     2.6      lda #0
     2.7 -    ldy #0
     2.8      sta $8d
     2.9      sta $8e
    2.10      end_of_level_room_count_loop:
    2.11 @@ -4664,17 +4663,7 @@
    2.12          bne end_of_level_room_count_loop
    2.13  
    2.14      ; Position the player so that we can perform an animation.
    2.15 -    lda #6      ; down (first frame)
    2.16 -    sta $3d01
    2.17 -    lda #4      ; y=4
    2.18 -    sta $3d02
    2.19 -    lda #3      ; dy=3
    2.20 -    sta $3d03
    2.21 -    lda #4      ; x=4
    2.22 -    sta $3d04
    2.23 -    lda #3      ; dx=3
    2.24 -    sta $3d05
    2.25 -
    2.26 +    jsr reset_player_position
    2.27      jsr remove_characters
    2.28  
    2.29      jsr reset_unplot_buffer
    2.30 @@ -4902,19 +4891,6 @@
    2.31      lda #12
    2.32      jsr $ffee
    2.33  
    2.34 -    ; Blank the screen now because it will be blanked before the room is shown
    2.35 -    ; and otherwise the text will show briefly.
    2.36 -    jsr blank_screen
    2.37 -
    2.38 -    ; Write the status text.
    2.39 -    ldx #0
    2.40 -    write_status_text_loop:
    2.41 -        lda status_vdu_bytes,x
    2.42 -        jsr $ffee
    2.43 -        inx
    2.44 -        cpx #25
    2.45 -        bmi write_status_text_loop
    2.46 -
    2.47      ; Set the level.
    2.48      lda #0
    2.49      sta $3dfa
    2.50 @@ -4925,7 +4901,9 @@
    2.51      sta $3df7
    2.52      sta $3df8
    2.53  
    2.54 -    jsr write_score
    2.55 +    ; Blank the screen now because it will be blanked before the room is shown
    2.56 +    ; and otherwise the strength bar will show briefly.
    2.57 +    jsr blank_screen
    2.58  
    2.59      ; Set the player's strength.
    2.60      lda #64
    2.61 @@ -4938,21 +4916,7 @@
    2.62  
    2.63      rts
    2.64  
    2.65 -start_level:
    2.66 -
    2.67 -    ; Clear the item/player flags.
    2.68 -    lda #0
    2.69 -    sta $3df0
    2.70 -
    2.71 -    ; Set current room.
    2.72 -
    2.73 -    ldx $3dfa
    2.74 -    lda start_rooms_y,x
    2.75 -    sta $3df2
    2.76 -    lda start_rooms_x,x
    2.77 -    sta $3df3
    2.78 -
    2.79 -    ; Set the player position.
    2.80 +reset_player_position:
    2.81  
    2.82      lda #1      ; player
    2.83      sta $3d00
    2.84 @@ -4967,6 +4931,26 @@
    2.85      lda #3      ; dx=3
    2.86      sta $3d05
    2.87  
    2.88 +    rts
    2.89 +
    2.90 +start_level:
    2.91 +
    2.92 +    ; Clear the item/player flags.
    2.93 +    lda #0
    2.94 +    sta $3df0
    2.95 +
    2.96 +    ; Set current room.
    2.97 +
    2.98 +    ldx $3dfa
    2.99 +    lda start_rooms_y,x
   2.100 +    sta $3df2
   2.101 +    lda start_rooms_x,x
   2.102 +    sta $3df3
   2.103 +
   2.104 +    ; Set the player's position.
   2.105 +
   2.106 +    jsr reset_player_position
   2.107 +
   2.108      ; Fill the treasure table with objects.
   2.109      lda $3dfa   ; level
   2.110      tax
   2.111 @@ -5050,6 +5034,17 @@
   2.112          cpy #121
   2.113          bmi start_level_add_treasure_loop
   2.114  
   2.115 +    ; Write the status text.
   2.116 +    ldx #0
   2.117 +    write_status_text_loop:
   2.118 +        lda status_vdu_bytes,x
   2.119 +        jsr $ffee
   2.120 +        inx
   2.121 +        cpx #25
   2.122 +        bmi write_status_text_loop
   2.123 +
   2.124 +    jsr write_score
   2.125 +
   2.126      clc
   2.127      rts
   2.128