junglejourney
changeset 131:3e3d7f4df570
Added a palette animation to the completion screen.
| author | David Boddie <david@boddie.org.uk> |
|---|---|
| date | Sat Sep 10 15:16:29 2011 +0200 |
| parents | ae6589e0aeca |
| children | a25ead484b18 |
| files | mapcode.oph |
| diffstat | 1 files changed, 40 insertions(+), 11 deletions(-) [+] |
line diff
1.1 --- a/mapcode.oph Sat Sep 10 14:28:21 2011 +0200 1.2 +++ b/mapcode.oph Sat Sep 10 15:16:29 2011 +0200 1.3 @@ -379,15 +379,17 @@ 1.4 1.5 lda #5 1.6 sta $579c,x 1.7 - lda #3 1.8 - sta $70 1.9 - jmp add_room_decoration ; optimise away the rts 1.10 + jmp exit_decoration 1.11 1.12 exit_not_open: 1.13 clc 1.14 lda #4 1.15 sta $579c,x 1.16 - rts 1.17 + 1.18 + exit_decoration: 1.19 + lda #3 1.20 + sta $70 1.21 + jmp add_room_decoration ; optimise away the rts 1.22 1.23 make_room_not_exit_room: 1.24 1.25 @@ -4327,15 +4329,42 @@ 1.26 1.27 jmp set_core_palette ; optimise away the rts 1.28 1.29 +complete_palette_bytes: .byte 2,4, 3,5, 1,4, 3,3, 2,2 1.30 + 1.31 set_complete_palette: 1.32 1.33 - lda #1 1.34 - sta $70 1.35 - lda #4 1.36 - sta $71 1.37 - jsr set_palette 1.38 - 1.39 - jmp set_core_palette ; optimise away the rts 1.40 + lda #0 1.41 + sta $80 1.42 + lda #25 1.43 + sta $81 1.44 + 1.45 + set_complete_palette_loop: 1.46 + 1.47 + jsr wait_for_vsync 1.48 + 1.49 + dec $81 1.50 + lda $81 1.51 + cmp #0 1.52 + bne set_complete_palette_loop 1.53 + 1.54 + lda #25 1.55 + sta $81 1.56 + 1.57 + ldx $80 1.58 + lda complete_palette_bytes,x 1.59 + sta $70 1.60 + inx 1.61 + lda complete_palette_bytes,x 1.62 + sta $71 1.63 + inx 1.64 + stx $80 1.65 + jsr set_palette 1.66 + 1.67 + lda $80 1.68 + cmp #10 1.69 + bne set_complete_palette_loop 1.70 + 1.71 + rts 1.72 1.73 set_hidden_palette: 1.74
