mirror of
https://github.com/deater/dos33fsprogs.git
synced 2026-04-21 16:16:47 +00:00
hgr: peasantry: more work on rain
This commit is contained in:
@@ -68,27 +68,21 @@ yes_music:
|
||||
cli
|
||||
no_music:
|
||||
|
||||
; so frame1 is on page1
|
||||
; frame2 is on page2
|
||||
|
||||
; show page2 (frame2) FRAME2
|
||||
; page1 1->3, fiip to page1 FRAME3
|
||||
; page2 2->4, flip to page2 FRAME4
|
||||
; page1 3->5, flip to page1 FRAME5
|
||||
|
||||
lda #0
|
||||
sta DRAW_PAGE
|
||||
sta WHICH
|
||||
|
||||
animation_loop:
|
||||
|
||||
jsr draw_rain
|
||||
|
||||
jsr hgr_page_flip
|
||||
|
||||
;=====================
|
||||
; handle keyboard
|
||||
wait_loop:
|
||||
lda KEYPRESS
|
||||
bmi wait_loop
|
||||
bpl wait_loop
|
||||
|
||||
bit KEYRESET
|
||||
|
||||
@@ -98,6 +92,135 @@ keep_going:
|
||||
|
||||
|
||||
|
||||
;=====================
|
||||
; draw_rain
|
||||
draw_rain:
|
||||
|
||||
lda #0
|
||||
sta WHICH_DROP
|
||||
rain_loop:
|
||||
ldx WHICH_DROP
|
||||
ldy light_rain_locations_x,X
|
||||
lda light_rain_locations_y,X
|
||||
tax
|
||||
|
||||
jsr draw_rain_drop
|
||||
|
||||
inc WHICH_DROP
|
||||
lda WHICH_DROP
|
||||
cmp #15
|
||||
bne rain_loop
|
||||
|
||||
rts
|
||||
|
||||
|
||||
;======================
|
||||
; draw rain drop
|
||||
;======================
|
||||
; x-position in Y
|
||||
; y-position in X
|
||||
|
||||
draw_rain_drop:
|
||||
; ldy #1 ; x position
|
||||
sty COUNT
|
||||
|
||||
; ldx #49 ; y position
|
||||
|
||||
ldy #0 ; sprite offset
|
||||
|
||||
raindrop_loop:
|
||||
lda hposn_low,X
|
||||
clc
|
||||
adc COUNT
|
||||
sta rl_smc1+1
|
||||
sta rl_smc2+1
|
||||
|
||||
lda hposn_high,X
|
||||
clc
|
||||
adc DRAW_PAGE
|
||||
sta rl_smc1+2
|
||||
sta rl_smc2+2
|
||||
rl_smc1:
|
||||
lda $2000
|
||||
eor rain_sprite1,Y
|
||||
rl_smc2:
|
||||
sta $2000
|
||||
|
||||
inx
|
||||
iny
|
||||
cpy #7
|
||||
bne raindrop_loop
|
||||
|
||||
rts
|
||||
|
||||
|
||||
rain_sprite1: ; flip
|
||||
.byte $60 ; X 000 0011 X 110 0000
|
||||
.byte $70 ; X 000 0111 X 111 0000
|
||||
.byte $38 ; X 000 1110 X 011 1000
|
||||
.byte $1C ; X 001 1100 X 001 1100
|
||||
.byte $0E ; X 011 1000 X 000 1110
|
||||
.byte $07 ; X 111 0000 X 000 0111
|
||||
.byte $03 ; X 110 0000 X 000 0011
|
||||
|
||||
|
||||
light_rain_locations_x:
|
||||
.byte 9 ; 63,36
|
||||
.byte 16 ; 112,46
|
||||
.byte 27 ; 189,26
|
||||
.byte 32 ; 224,32
|
||||
.byte 39 ; 273,35
|
||||
.byte 36 ; 252,81
|
||||
.byte 30 ; 210,92
|
||||
.byte 23 ; 161,91
|
||||
.byte 18 ; 126,84
|
||||
.byte 6 ; 42,152
|
||||
.byte 10 ; 70,157
|
||||
.byte 18 ; 126,158
|
||||
.byte 24 ; 168,147
|
||||
.byte 38 ; 266,143
|
||||
.byte 32 ; 224,166
|
||||
|
||||
light_rain_locations_y:
|
||||
.byte 36 ; 63,36
|
||||
.byte 46 ; 112,46
|
||||
.byte 26 ; 189,26
|
||||
.byte 32 ; 224,32
|
||||
.byte 35 ; 273,35
|
||||
.byte 81 ; 252,81
|
||||
.byte 92 ; 210,92
|
||||
.byte 91 ; 161,91
|
||||
.byte 84 ; 126,84
|
||||
.byte 152 ; 42,152
|
||||
.byte 157 ; 70,157
|
||||
.byte 158 ; 126,158
|
||||
.byte 147 ; 168,147
|
||||
.byte 143 ; 266,143
|
||||
.byte 166 ; 224,166
|
||||
|
||||
dark_rain_locations_x:
|
||||
.byte 1 ;7,49
|
||||
.byte 6 ;42,63
|
||||
.byte 21 ;147,37
|
||||
.byte 26 ;182,58
|
||||
.byte 38 ;266,70
|
||||
.byte 29 ;203,69
|
||||
.byte 9 ;63,104
|
||||
.byte 13 ;91,124
|
||||
.byte 32 ;224,127
|
||||
|
||||
dark_rain_locations_y:
|
||||
.byte 49 ;7,49
|
||||
.byte 63 ;42,63
|
||||
.byte 37 ;147,37
|
||||
.byte 58 ;182,58
|
||||
.byte 70 ;266,70
|
||||
.byte 69 ;203,69
|
||||
.byte 104 ;63,104
|
||||
.byte 124 ;91,124
|
||||
.byte 127 ;224,127
|
||||
|
||||
|
||||
;.include "../patch_graphics.s"
|
||||
;.include "../change_palette.s"
|
||||
;.include "../sound_bars.s"
|
||||
|
||||
@@ -96,55 +96,11 @@ CURRENT_ROW = $CD ; dhgr_repack
|
||||
; repack
|
||||
REPACK_TMP = $D0 ; $D0...$D7
|
||||
|
||||
; start/font fall
|
||||
|
||||
TEXT_Y = $D2
|
||||
|
||||
; intro: scrolling
|
||||
|
||||
SCROLL_COUNT = $D0
|
||||
INDEX = $D1
|
||||
DEST_OFFSET = $D2
|
||||
SRC_OFFSET = $D3
|
||||
LENGTH = $D4
|
||||
|
||||
; woz
|
||||
ROW = $D0 ; martymation
|
||||
FAKE_HGR_PAGE = $D1
|
||||
FAKE_HGR_BITS = $D2
|
||||
FAKE_HGR_SHAPE = $D3
|
||||
FAKE_HGR_SHAPE2 = $D4
|
||||
WHICH_BALL = $D5
|
||||
ORBITS = $D6
|
||||
NEXT_BALL = $D7
|
||||
ERASE_COUNT = $D8
|
||||
BALL_X = $D9
|
||||
|
||||
; four color
|
||||
CURRENT = $D0
|
||||
LEFT = $D1
|
||||
XSTART = $D2
|
||||
XEND = $D3
|
||||
COLORSG = $D4
|
||||
COLORSF = $D5
|
||||
COLORSE = $D6
|
||||
COLORSD = $D7
|
||||
COLORSC = $D8
|
||||
COLORSB = $D9
|
||||
COLORSA = $DA
|
||||
ODD = $DB
|
||||
|
||||
; Plasma
|
||||
COMPT1 = $D0
|
||||
COMPT2 = $D1
|
||||
PARAM1 = $D2
|
||||
PARAM2 = $D3
|
||||
PARAM3 = $D4
|
||||
PARAM4 = $D5
|
||||
COUNT = $D6
|
||||
WHICH_DROP = $D7
|
||||
|
||||
;
|
||||
TEMP_VOL = $D9
|
||||
;TEMP_VOL = $D9
|
||||
WHICH = $DA
|
||||
FRAME_RATE = $DB
|
||||
|
||||
|
||||
Reference in New Issue
Block a user