second: more animation

also added HLIN_ADD primitive
This commit is contained in:
Vince Weaver 2023-09-19 18:55:31 -04:00
parent 2ab177f99c
commit 6572e45ac2
2 changed files with 93 additions and 5 deletions

View File

@ -8,7 +8,7 @@
; BOX x1,y1 to x2,y2
; CLEAR -
num_scenes=14
num_scenes=15
frame15:
.byte SET_COLOR | BLACK
@ -556,6 +556,56 @@ frame28:
.byte PLOT,7,22
.byte END
frame29:
.byte SET_COLOR | BLACK
.byte CLEAR
.byte SET_COLOR | WHITE
.byte BOX, 27,6,35,41
.byte SET_COLOR | BROWN
.byte BOX, 4,6,26,38
.byte BOX,17,39,26,41
.byte VLIN,6,22,34
.byte VLIN,23,34,33
.byte SET_COLOR | WHITE
.byte VLIN,18,30,4
.byte SET_COLOR | GREY1
.byte VLIN,31,34,4
.byte HLIN,4,5,35
.byte HLIN_ADD,4,8 ; 36
.byte HLIN_ADD,4,10 ; 37
.byte HLIN_ADD,4,13 ; 38
.byte HLIN_ADD,5,16 ; 39
.byte HLIN_ADD,8,19 ; 40
.byte HLIN_ADD,10,21 ; 41
.byte PLOT,35,34
.byte HLIN,33,35,35
.byte HLIN_ADD,33,35 ; 36
.byte HLIN_ADD,32,35 ; 37
.byte HLIN_ADD,31,35 ; 38
.byte HLIN_ADD,30,35 ; 39
.byte HLIN_ADD,28,35 ; 40
.byte HLIN_ADD,28,35 ; 41
.byte BOX,6,23,8,25
.byte VLIN,21,27,4
.byte VLIN,24,25,5
.byte SET_COLOR | LIGHT_BLUE
.byte VLIN,22,23,5
.byte PLOT,9,23
.byte PLOT,8,28
.byte HLIN,9,10,24
.byte HLIN_ADD,9,10 ; 25
.byte HLIN_ADD,6,9 ; 26
.byte HLIN_ADD,8,10 ; 27
.byte SET_COLOR | ORANGE
.byte PLOT,6,24
.byte HLIN_ADD,6,7
.byte SET_COLOR | RED
.byte PLOT,10,26
.byte SET_COLOR | DARK_BLUE
.byte VLIN,23,24,8
.byte END

View File

@ -17,6 +17,7 @@ BOX = $02
HLIN = $03
VLIN = $04
PLOT = $05
HLIN_ADD= $06
BLACK = $00
RED = $01
@ -92,10 +93,10 @@ update_pointer:
draw_table_l:
.byte <(clear_screen-1),<(draw_box-1),<(draw_hlin-1),<(draw_vlin-1)
.byte <(draw_plot-1)
.byte <(draw_plot-1),<(draw_hlin_add-1)
draw_table_h:
.byte >(clear_screen-1),>(draw_box-1),>(draw_hlin-1),>(draw_vlin-1)
.byte >(draw_plot-1)
.byte >(draw_plot-1),>(draw_hlin_add-1)
;=================================
;=================================
@ -233,7 +234,7 @@ draw_hlin:
iny
lda (INL),Y
; sta Y1
sta Y1 ; needed for HLIN_ADD
; lda Y1
lsr
@ -249,6 +250,43 @@ hlin_done:
lda #4
jmp update_pointer
;=================================
;=================================
; draw hlin add
;=================================
;=================================
; increment Y1
draw_hlin_add:
iny ; FIXME: move to common code
lda (INL),Y
sta X1
iny
lda (INL),Y
sta X2
inc Y1
lda Y1
; sta Y1
; lda Y1
lsr
tay
bcs do_hlin_add_mask_odd
jsr hlin_mask_even
jmp hlin_add_done
do_hlin_add_mask_odd:
jsr hlin_mask_odd
; done
hlin_add_done:
lda #3
jmp update_pointer
;=================================
;=================================
; draw vlin
@ -356,7 +394,7 @@ draw_plot:
iny
lda (INL),Y
; sta Y1
sta Y1 ; needed for HLIN_ADD
; lda Y1