ootw: start making cave engine more generic

This commit is contained in:
Vince Weaver 2019-01-20 01:02:41 -05:00
parent 95301329cb
commit e55c030176
3 changed files with 19 additions and 6 deletions

View File

@ -16,6 +16,7 @@ ootw:
sta EARTH_OFFSET
sta KICKING
sta CROUCHING
sta WHICH_CAVE
lda #22
sta PHYSICIST_Y

View File

@ -1,4 +1,4 @@
; Cavern scene (with the slugs)
; Cavern scenes (with the slugs)
ootw_cavern:
;===========================
@ -11,13 +11,12 @@ ootw_cavern:
;==================
; setup drawing
lda #0
sta DRAW_PAGE
lda #1
sta DISP_PAGE
;===================
;======================
; setup room boundaries
lda #0
@ -33,20 +32,33 @@ ootw_cavern:
lda #$00
sta BASL ; load image off-screen $c00
lda WHICH_CAVE
cave_bg0:
lda #>(cavern_rle)
sta GBASH
lda #<(cavern_rle)
sta GBASL
jmp cave_bg_done
cave_bg1:
lda #>(cavern2_rle)
sta GBASH
lda #<(cavern2_rle)
sta GBASL
cave_bg_done:
jsr load_rle_gr
;=============================
;================================
; Load quake background to $1000
jsr gr_make_quake
;=================================
; copy to both pages $400/$800
; copy $c00 background to both pages $400/$800
jsr gr_copy_to_current
jsr page_flip

View File

@ -132,7 +132,7 @@ CURSOR = $9D
LEFT_LIMIT = $E0
RIGHT_LIMIT = $E1
WHICH_SLUG = $E2
XX = $E3
WHICH_CAVE = $E3
YY = $E4
HGR_COLOR = $E4
GAME_OVER = $E5