mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-09-10 23:54:33 +00:00
mode7: have both checkerboard and island running out of same code
This commit is contained in:
parent
31a4e2b107
commit
f99a73a2b8
@ -56,9 +56,6 @@ mode7_flying:
|
|||||||
sta KEY_COUNT
|
sta KEY_COUNT
|
||||||
sta KEY_OFFSET
|
sta KEY_OFFSET
|
||||||
|
|
||||||
lda #1 ; slightly off North for better view of island
|
|
||||||
sta ANGLE
|
|
||||||
|
|
||||||
lda #2 ; initialize sky both pages
|
lda #2 ; initialize sky both pages
|
||||||
sta DRAW_SKY
|
sta DRAW_SKY
|
||||||
|
|
||||||
@ -163,6 +160,9 @@ turn_left:
|
|||||||
|
|
||||||
dec ANGLE
|
dec ANGLE
|
||||||
|
|
||||||
|
inc DRAW_SKY
|
||||||
|
inc DRAW_SKY
|
||||||
|
|
||||||
check_right:
|
check_right:
|
||||||
cmp #('D')
|
cmp #('D')
|
||||||
bne check_speedup
|
bne check_speedup
|
||||||
@ -183,6 +183,8 @@ turn_right:
|
|||||||
sta TURNING
|
sta TURNING
|
||||||
|
|
||||||
inc ANGLE
|
inc ANGLE
|
||||||
|
inc DRAW_SKY
|
||||||
|
inc DRAW_SKY
|
||||||
|
|
||||||
check_speedup:
|
check_speedup:
|
||||||
cmp #('Z')
|
cmp #('Z')
|
||||||
@ -552,17 +554,23 @@ draw_background_mode7:
|
|||||||
;==============
|
;==============
|
||||||
; 6
|
; 6
|
||||||
|
|
||||||
.if .def(CHECKERBOARD_MAP)
|
dec DRAW_SKY ; usually 2 as we redraw both pages ; 5
|
||||||
lda #0
|
|
||||||
|
|
||||||
|
lda DRAW_BLUE_SKY
|
||||||
|
bne draw_blue_sky
|
||||||
|
|
||||||
|
draw_black_sky:
|
||||||
sta CV
|
sta CV
|
||||||
|
|
||||||
jsr scroll_background
|
jsr scroll_background
|
||||||
|
jmp no_draw_sky
|
||||||
|
|
||||||
.else
|
draw_blue_sky:
|
||||||
; Draw Sky
|
; Draw Sky
|
||||||
; not performance critical as this happens rarely
|
; not performance critical as this happens rarely
|
||||||
|
|
||||||
dec DRAW_SKY ; usually 2 as we redraw both pages ; 5
|
|
||||||
lda #COLOR_BOTH_MEDIUMBLUE ; MEDIUMBLUE color ; 2
|
lda #COLOR_BOTH_MEDIUMBLUE ; MEDIUMBLUE color ; 2
|
||||||
sta COLOR ; 3
|
sta COLOR ; 3
|
||||||
lda #0 ; 2
|
lda #0 ; 2
|
||||||
@ -594,7 +602,7 @@ sky_loop: ; draw line across screen
|
|||||||
;===========
|
;===========
|
||||||
; 63+(X*16)+14
|
; 63+(X*16)+14
|
||||||
|
|
||||||
.endif
|
|
||||||
|
|
||||||
no_draw_sky:
|
no_draw_sky:
|
||||||
|
|
||||||
@ -913,9 +921,11 @@ screenx_loop:
|
|||||||
|
|
||||||
|
|
||||||
nomatch:
|
nomatch:
|
||||||
|
; This is self modified a few times
|
||||||
|
; jsr lookup_checkerboard_map
|
||||||
|
; jmp match
|
||||||
; Get color to draw in A
|
; Get color to draw in A
|
||||||
.include "island_lookup.s"
|
.include "island_lookup.s"
|
||||||
; .include "checkerboard_lookup.s"
|
|
||||||
|
|
||||||
match:
|
match:
|
||||||
|
|
||||||
|
Binary file not shown.
@ -37,6 +37,23 @@ checkerboard_demo:
|
|||||||
sta INL
|
sta INL
|
||||||
jsr decompress_scroll
|
jsr decompress_scroll
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta DRAW_BLUE_SKY
|
||||||
|
|
||||||
|
|
||||||
|
lda #$20
|
||||||
|
sta nomatch
|
||||||
|
lda #<lookup_checkerboard_map
|
||||||
|
sta nomatch+1
|
||||||
|
lda #>lookup_checkerboard_map
|
||||||
|
sta nomatch+2
|
||||||
|
lda #$4c
|
||||||
|
sta nomatch+3
|
||||||
|
lda #<match
|
||||||
|
sta nomatch+4
|
||||||
|
lda #>match
|
||||||
|
sta nomatch+5
|
||||||
|
|
||||||
jsr mode7_flying
|
jsr mode7_flying
|
||||||
|
|
||||||
rts
|
rts
|
||||||
@ -48,6 +65,22 @@ checkerboard_demo:
|
|||||||
island_demo:
|
island_demo:
|
||||||
; initialize
|
; initialize
|
||||||
|
|
||||||
|
lda #1
|
||||||
|
sta DRAW_BLUE_SKY
|
||||||
|
|
||||||
|
lda #$A5 ; fix the code that was self-modified
|
||||||
|
sta nomatch ; away in checkerboard code
|
||||||
|
lda #$6A
|
||||||
|
sta nomatch+1
|
||||||
|
lda #$8D
|
||||||
|
sta nomatch+2
|
||||||
|
lda #<(spacex_label+1)
|
||||||
|
sta nomatch+3
|
||||||
|
lda #>(spacex_label+1)
|
||||||
|
sta nomatch+4
|
||||||
|
lda #$29
|
||||||
|
sta nomatch+5
|
||||||
|
|
||||||
jsr mode7_flying
|
jsr mode7_flying
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
@ -97,6 +97,7 @@ DRAW_SKY EQU $8A
|
|||||||
COLOR_MASK EQU $8B
|
COLOR_MASK EQU $8B
|
||||||
KEY_COUNT EQU $8C
|
KEY_COUNT EQU $8C
|
||||||
KEY_OFFSET EQU $8D
|
KEY_OFFSET EQU $8D
|
||||||
|
DRAW_BLUE_SKY EQU $8E
|
||||||
|
|
||||||
SHIPY EQU $E4
|
SHIPY EQU $E4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user