This commit is contained in:
@@ -141,7 +141,9 @@ mu_start:
|
|||||||
beq mg_story
|
beq mg_story
|
||||||
+fadeto credits_init ; every screen change fades to black
|
+fadeto credits_init ; every screen change fades to black
|
||||||
mg_play:
|
mg_play:
|
||||||
lda #MZMIN ; a fresh run: level 1, clock zeroed
|
lda opt_level ; a fresh run: the picked start level,
|
||||||
|
clc ; clock zeroed
|
||||||
|
adc #MZMIN-1
|
||||||
sta mzsize
|
sta mzsize
|
||||||
lda #0
|
lda #0
|
||||||
sta tframe
|
sta tframe
|
||||||
|
|||||||
+37
-12
@@ -4,18 +4,20 @@
|
|||||||
; respawns elsewhere after a pause
|
; respawns elsewhere after a pause
|
||||||
; spin cooldown - ra needs a recharge between two spins,
|
; spin cooldown - ra needs a recharge between two spins,
|
||||||
; shown on the status row
|
; shown on the status row
|
||||||
|
; start level - which level a fresh run begins on (1-8)
|
||||||
; the settings live here and survive between levels
|
; the settings live here and survive between levels
|
||||||
; -----------------------------------------------------------
|
; -----------------------------------------------------------
|
||||||
|
|
||||||
OPT_ITEMS = 3
|
OPT_ITEMS = 4
|
||||||
|
|
||||||
options_init:
|
options_init:
|
||||||
jsr clear_screen
|
jsr clear_screen
|
||||||
|
|
||||||
+prbig 1, 6, WHITE, txt_options, 7
|
+prbig 1, 6, WHITE, txt_options, 7
|
||||||
|
|
||||||
+prtext 19, 6, LGREY, txt_oh1, txt_oh1e-txt_oh1
|
+prtext 21, 6, LGREY, txt_oh1, txt_oh1e-txt_oh1
|
||||||
+prtext 20, 4, LGREY, txt_oh2, txt_oh2e-txt_oh2
|
+prtext 22, 4, LGREY, txt_oh2, txt_oh2e-txt_oh2
|
||||||
|
+prtext 23, 5, LGREY, txt_oh3, txt_oh3e-txt_oh3
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
sta optsel
|
sta optsel
|
||||||
@@ -66,19 +68,25 @@ oo_items:
|
|||||||
cpx #OPT_ITEMS
|
cpx #OPT_ITEMS
|
||||||
bne oo_items
|
bne oo_items
|
||||||
|
|
||||||
; the current values next to the two settings
|
; the current values next to the three settings
|
||||||
ldx opt_shoot
|
ldx opt_shoot
|
||||||
lda #10
|
lda #10
|
||||||
jsr put_oval
|
jsr put_oval
|
||||||
ldx opt_cool
|
ldx opt_cool
|
||||||
lda #13
|
lda #13
|
||||||
jsr put_oval
|
jsr put_oval
|
||||||
|
lda opt_level ; the start level as a digit
|
||||||
|
ora #$30
|
||||||
|
sta SCREEN+16*40+24
|
||||||
|
lda #LGREEN
|
||||||
|
sta COLRAM+16*40+24
|
||||||
|
|
||||||
; blinking '>' cursor in front of the picked line
|
; blinking '>' cursor in front of the picked line
|
||||||
lda #$20
|
lda #$20
|
||||||
sta SCREEN+10*40+7
|
sta SCREEN+10*40+7
|
||||||
sta SCREEN+13*40+7
|
sta SCREEN+13*40+7
|
||||||
sta SCREEN+16*40+7
|
sta SCREEN+16*40+7
|
||||||
|
sta SCREEN+19*40+7
|
||||||
lda framectr
|
lda framectr
|
||||||
and #16
|
and #16
|
||||||
bne ou_fire
|
bne ou_fire
|
||||||
@@ -102,8 +110,10 @@ ou_fire:
|
|||||||
jsr start_edge
|
jsr start_edge
|
||||||
beq ou_done
|
beq ou_done
|
||||||
lda optsel
|
lda optsel
|
||||||
cmp #2
|
cmp #3
|
||||||
beq ou_back
|
beq ou_back
|
||||||
|
cmp #2
|
||||||
|
beq ou_tlevel
|
||||||
cmp #1
|
cmp #1
|
||||||
beq ou_tcool
|
beq ou_tcool
|
||||||
lda opt_shoot
|
lda opt_shoot
|
||||||
@@ -114,6 +124,15 @@ ou_tcool:
|
|||||||
lda opt_cool
|
lda opt_cool
|
||||||
eor #1
|
eor #1
|
||||||
sta opt_cool
|
sta opt_cool
|
||||||
|
jmp ou_tsfx
|
||||||
|
ou_tlevel:
|
||||||
|
ldx opt_level ; cycle 1-8, wrapping back to 1
|
||||||
|
inx
|
||||||
|
cpx #MZMAX-MZMIN+2
|
||||||
|
bne ou_tlst
|
||||||
|
ldx #1
|
||||||
|
ou_tlst:
|
||||||
|
stx opt_level
|
||||||
ou_tsfx:
|
ou_tsfx:
|
||||||
lda #SFX_SELECT
|
lda #SFX_SELECT
|
||||||
jsr sfx_play
|
jsr sfx_play
|
||||||
@@ -160,14 +179,16 @@ put_oval:
|
|||||||
jmp print_text
|
jmp print_text
|
||||||
|
|
||||||
; ---- option tables ----
|
; ---- option tables ----
|
||||||
oitem_lo: !byte <txt_ogun, <txt_ocool, <txt_oback
|
oitem_lo: !byte <txt_ogun, <txt_ocool, <txt_olev, <txt_oback
|
||||||
oitem_hi: !byte >txt_ogun, >txt_ocool, >txt_oback
|
oitem_hi: !byte >txt_ogun, >txt_ocool, >txt_olev, >txt_oback
|
||||||
oitem_len: !byte 10, 13, 4
|
oitem_len: !byte 10, 13, 11, 4
|
||||||
oitem_row: !byte 10, 13, 16
|
oitem_row: !byte 10, 13, 16, 19
|
||||||
ocur_lo: ; cursor cells: column 7 of those rows
|
ocur_lo: ; cursor cells: column 7 of those rows
|
||||||
!byte <(SCREEN+10*40+7), <(SCREEN+13*40+7), <(SCREEN+16*40+7)
|
!byte <(SCREEN+10*40+7), <(SCREEN+13*40+7)
|
||||||
|
!byte <(SCREEN+16*40+7), <(SCREEN+19*40+7)
|
||||||
ocur_hi:
|
ocur_hi:
|
||||||
!byte >(SCREEN+10*40+7), >(SCREEN+13*40+7), >(SCREEN+16*40+7)
|
!byte >(SCREEN+10*40+7), >(SCREEN+13*40+7)
|
||||||
|
!byte >(SCREEN+16*40+7), >(SCREEN+19*40+7)
|
||||||
ovtx_lo: !byte <txt_off, <txt_on
|
ovtx_lo: !byte <txt_off, <txt_on
|
||||||
ovtx_hi: !byte >txt_off, >txt_on
|
ovtx_hi: !byte >txt_off, >txt_on
|
||||||
ovcol: !byte LGREY, LGREEN
|
ovcol: !byte LGREY, LGREEN
|
||||||
@@ -175,6 +196,7 @@ ovcol: !byte LGREY, LGREEN
|
|||||||
; ---- option texts ----
|
; ---- option texts ----
|
||||||
txt_ogun: !scr "worker gun"
|
txt_ogun: !scr "worker gun"
|
||||||
txt_ocool: !scr "spin cooldown"
|
txt_ocool: !scr "spin cooldown"
|
||||||
|
txt_olev: !scr "start level"
|
||||||
txt_oback: !scr "back"
|
txt_oback: !scr "back"
|
||||||
txt_on: !scr "on "
|
txt_on: !scr "on "
|
||||||
txt_off: !scr "off"
|
txt_off: !scr "off"
|
||||||
@@ -182,6 +204,8 @@ txt_oh1: !scr "gun: p1 fire shoots a bullet"
|
|||||||
txt_oh1e:
|
txt_oh1e:
|
||||||
txt_oh2: !scr "cooldown: spins need a recharge"
|
txt_oh2: !scr "cooldown: spins need a recharge"
|
||||||
txt_oh2e:
|
txt_oh2e:
|
||||||
|
txt_oh3: !scr "start: a fresh run's first level"
|
||||||
|
txt_oh3e:
|
||||||
|
|
||||||
; ---- the settings themselves (session-wide) ----
|
; ---- the settings themselves (session-wide) ----
|
||||||
!ifdef FORCEOPTS { ; test builds start with both turned on
|
!ifdef FORCEOPTS { ; test builds start with both turned on
|
||||||
@@ -191,4 +215,5 @@ opt_cool: !byte 1
|
|||||||
opt_shoot: !byte 0 ; 0 = classic game, 1 = the worker shoots
|
opt_shoot: !byte 0 ; 0 = classic game, 1 = the worker shoots
|
||||||
opt_cool: !byte 0 ; 1 = spins need a recharge
|
opt_cool: !byte 0 ; 1 = spins need a recharge
|
||||||
}
|
}
|
||||||
optsel: !byte 0 ; picked line: 0-2
|
opt_level: !byte 1 ; a fresh run's first level: 1-8
|
||||||
|
optsel: !byte 0 ; picked line: 0-3
|
||||||
|
|||||||
Reference in New Issue
Block a user