mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-09-29 08:55:10 +00:00
gr: thinking: working!
This commit is contained in:
parent
be704a2e44
commit
9552d1483f
@ -21,7 +21,7 @@ XSAVE = $F9
|
|||||||
SAVED_YY= $F9
|
SAVED_YY= $F9
|
||||||
YSAVE = $FA
|
YSAVE = $FA
|
||||||
SAVED_XX= $FA
|
SAVED_XX= $FA
|
||||||
|
ADJUSTED_YY = $FB
|
||||||
|
|
||||||
thinking:
|
thinking:
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ inc_pointer:
|
|||||||
|
|
||||||
stx XSAVE
|
stx XSAVE
|
||||||
ldx BITMAP_PTR
|
ldx BITMAP_PTR
|
||||||
lda thinking_data-1-35,X
|
lda thinking_data-1-30,X
|
||||||
sta CURRENT_BITMAP
|
sta CURRENT_BITMAP
|
||||||
ldx XSAVE
|
ldx XSAVE
|
||||||
|
|
||||||
@ -82,10 +82,10 @@ thinking_xloop:
|
|||||||
stx XSAVE ; save X (YY)
|
stx XSAVE ; save X (YY)
|
||||||
sty YSAVE ; save Y (XX)
|
sty YSAVE ; save Y (XX)
|
||||||
|
|
||||||
; if YY <7 or YY > 14 then don't draw bitmap
|
; if YY <6 or YY > 13 then don't draw bitmap
|
||||||
cpx #7
|
cpx #6
|
||||||
bcc do_plot
|
bcc do_plot
|
||||||
cpx #14
|
cpx #13
|
||||||
bcs do_plot
|
bcs do_plot
|
||||||
|
|
||||||
handle_bitmap:
|
handle_bitmap:
|
||||||
@ -119,19 +119,30 @@ skip_plot:
|
|||||||
ldx SAVED_YY ; YY
|
ldx SAVED_YY ; YY
|
||||||
ldy SAVED_XX ; XX
|
ldy SAVED_XX ; XX
|
||||||
|
|
||||||
|
|
||||||
|
; if YY is < 10 do following, otherwise reverse
|
||||||
|
|
||||||
cpx #10
|
cpx #10
|
||||||
bcc counting_up
|
bcc counting_up
|
||||||
|
|
||||||
counting_down:
|
counting_down:
|
||||||
|
; now doing the reverse
|
||||||
|
|
||||||
; cpy #30 ; is XX < 10
|
lda #19
|
||||||
; bcc color_adjust_up ; then potentially adjust UP
|
sec
|
||||||
; cpy #10 ; is XX > 30
|
sbc SAVED_YY
|
||||||
; bcs color_adjust_down ; then potentially adjust down
|
sta ADJUSTED_YY
|
||||||
; bcc color_adjust_none ; else, do nothing
|
|
||||||
|
; YY now going from 10..0
|
||||||
|
|
||||||
|
jmp detect_adjust_dir
|
||||||
|
|
||||||
|
|
||||||
counting_up:
|
counting_up:
|
||||||
|
lda SAVED_YY
|
||||||
|
sta ADJUSTED_YY
|
||||||
|
|
||||||
|
detect_adjust_dir:
|
||||||
; if YY is < 10 do following, otherwise reverse
|
; if YY is < 10 do following, otherwise reverse
|
||||||
|
|
||||||
; if XX is < 10, check for inc
|
; if XX is < 10, check for inc
|
||||||
@ -150,7 +161,7 @@ color_adjust_up:
|
|||||||
; if XX < YY then inc color
|
; if XX < YY then inc color
|
||||||
; if XX >= YY then do nothing
|
; if XX >= YY then do nothing
|
||||||
|
|
||||||
cpy SAVED_YY ; compare XX to YY
|
cpy ADJUSTED_YY ; compare XX to YY
|
||||||
bcs col_same ; bge do nothing
|
bcs col_same ; bge do nothing
|
||||||
|
|
||||||
col_inc:
|
col_inc:
|
||||||
@ -163,10 +174,10 @@ color_adjust_down:
|
|||||||
|
|
||||||
lda #39
|
lda #39
|
||||||
sec
|
sec
|
||||||
sbc XSAVE
|
sbc ADJUSTED_YY
|
||||||
sta XSAVE
|
sta ADJUSTED_YY
|
||||||
|
|
||||||
cpy XSAVE ; compare XX to YY
|
cpy ADJUSTED_YY ; compare XX to YY
|
||||||
|
|
||||||
; if XX > 39-YY then inc color
|
; if XX > 39-YY then inc color
|
||||||
bcc col_down_same
|
bcc col_down_same
|
||||||
@ -198,14 +209,14 @@ done_done:
|
|||||||
;=============================================
|
;=============================================
|
||||||
; reverse the colors on bottom half of screen
|
; reverse the colors on bottom half of screen
|
||||||
|
|
||||||
cpx #9
|
; cpx #10
|
||||||
beq blarch
|
; beq blarch
|
||||||
bcc blurgh
|
; bcc blurgh
|
||||||
dec COL
|
|
||||||
jmp blarch
|
|
||||||
blurgh:
|
|
||||||
inc COL
|
inc COL
|
||||||
blarch:
|
; jmp blarch
|
||||||
|
;blurgh:
|
||||||
|
; inc COL
|
||||||
|
;blarch:
|
||||||
|
|
||||||
|
|
||||||
;=======================
|
;=======================
|
||||||
@ -231,10 +242,10 @@ done_yloop:
|
|||||||
; increment color
|
; increment color
|
||||||
; after loop we are +10
|
; after loop we are +10
|
||||||
; so -1 actually means increment 1 (because we mod 8 it)
|
; so -1 actually means increment 1 (because we mod 8 it)
|
||||||
|
inc COL
|
||||||
; inc COL
|
; inc COL
|
||||||
; inc COL
|
; dec COL
|
||||||
dec COL
|
; dec COL
|
||||||
dec COL
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user