ootw: add in last new room

This commit is contained in:
Vince Weaver 2019-01-20 01:45:51 -05:00
parent 43da6edbfa
commit 166572a023
9 changed files with 211 additions and 28 deletions

View File

@ -18,7 +18,7 @@ OOTW: ootw.o
ootw.o: ootw.s \
gr_copy.s gr_fast_clear.s gr_pageflip.s gr_unrle.s gr_putsprite.s \
keyboard.s sluggy.s \
ootw_rope.s earthquake.s \
ootw_rope.s earthquake.s ootw_mesa.s \
ootw_pool.s ootw_cavern.s physicist.s random16.s slug_cutscene.s \
ootw_pool.inc \
ootw_cavern.inc ootw_cavern2.inc ootw_cavern3.inc \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 521 B

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -119,6 +119,7 @@ end_message:
.include "ootw_rope.s"
.include "ootw_pool.s"
.include "ootw_cavern.s"
.include "ootw_mesa.s"
.include "physicist.s"
.include "sluggy.s"
.include "earthquake.s"

View File

@ -33,9 +33,31 @@ ootw_cavern:
sta BASL ; load image off-screen $c00
; Setup some stuff based on which cave we are in
lda WHICH_CAVE
bne cave_bg1
cave_bg0:
; set right exit
lda #1
sta cer_smc+1
lda #<ootw_cavern
sta cer_smc+5
lda #>ootw_cavern
sta cer_smc+6
; set left exit
lda #0
sta cel_smc+1
lda #<ootw_pool
sta cel_smc+5
lda #>ootw_pool
sta cel_smc+6
; load background
lda #>(cavern_rle)
sta GBASH
lda #<(cavern_rle)
@ -43,6 +65,24 @@ cave_bg0:
jmp cave_bg_done
cave_bg1:
; set right exit
lda #1
sta cer_smc+1
lda #<ootw_mesa
sta cer_smc+5
lda #>ootw_mesa
sta cer_smc+6
; set left exit
lda #0
sta cel_smc+1
lda #<ootw_cavern
sta cel_smc+5
lda #>ootw_cavern
sta cel_smc+6
; load background
lda #>(cavern2_rle)
sta GBASH
lda #<(cavern2_rle)
@ -185,19 +225,38 @@ no_boulder:
frame_no_oflo_c:
; pause?
;=================
; see if game over
lda GAME_OVER
cmp #$ff
beq still_in_cavern ; if 0, continue as per normal
cmp #$ff ; if $ff, we died
beq done_cavern
; see if left level
;===========================
; see if exited room to right
cmp #1
bne still_in_cavern
beq cavern_exit_left
cavern_exit_right:
lda #0
sta PHYSICIST_X
cer_smc:
lda #$0
sta WHICH_CAVE
jmp ootw_pool
;==========================
; see if exited room to left
cavern_exit_left:
lda #37
sta PHYSICIST_X
cel_smc:
lda #$0
sta WHICH_CAVE
jmp ootw_pool
still_in_cavern:

View File

@ -15,24 +15,23 @@ cavern2_rle: .byte $28 ; ysize=48
.byte $66, $A3,$6F, $22,$22, $A4,$F6, $A0,$11,$66, $6F,$6F, $F6,$F6
.byte $A3,$66, $A6,$55, $A4,$66, $22,$22, $A3,$66, $A4,$6F, $FF
.byte $A4,$F6, $AD,$66, $6F,$6F, $F6, $A6,$55, $A4,$66, $22,$22
.byte $AB,$66, $A4,$6F, $FF, $A4,$F6, $A8,$66, $A6,$55, $A4,$F6
.byte $22,$22, $A4,$66, $86, $56, $AD,$66, $A4,$6F, $A5,$66
.byte $A6,$55, $22, $A3,$66, $22,$22, $A4,$6F, $88, $55
.byte $A3,$6F, $FF, $A9,$F6, $A6,$66, $76, $86, $56
.byte $A6,$55, $22, $66,$66, $76, $22,$22, $76, $A3,$66
.byte $88, $75, $66,$66, $88, $A5,$66, $76,$76, $66
.byte $A3,$76, $86,$86, $87, $A4,$88, $A7,$55, $22, $87,$87
.byte $77, $22,$22, $77, $A3,$87, $88, $85,$85, $57
.byte $88, $87, $77,$77, $A6,$87, $A9,$88, $A7,$55, $22
.byte $A3,$88, $22,$22, $AA,$88, $A3,$55, $78, $A3,$88, $58
.byte $55,$55, $57,$57, $A4,$88, $58, $A7,$55, $22, $58
.byte $55,$55, $22,$22, $57, $77, $78, $22, $A5,$58
.byte $A4,$55, $57, $A3,$58, $A6,$55, $A3,$58, $A8,$55, $22
.byte $25, $55,$55, $22,$22, $A3,$55, $22, $A0,$1E,$55, $22,$22
.byte $55,$55, $22,$22, $25, $55,$55, $22, $AA,$55, $5A
.byte $A0,$13,$55, $22,$22, $55, $25, $A4,$22, $25, $22
.byte $25, $85,$85, $A0,$12,$55, $A9,$85, $82, $88,$88, $82
.byte $AF,$88, $A8,$28, $A4,$88, $28, $AA,$88, $22, $A3,$88
.byte $28, $A3,$22, $28, $88, $22, $88,$88, $28
.byte $A3,$52, $A8,$55, $52,$52, $28,$28, $A9,$88, $A0,$78,$00
.byte $AB,$66, $A4,$6F, $FF, $A4,$F6, $A8,$66, $A6,$55, $2F
.byte $A3,$6F, $22,$22, $A4,$F6, $88, $55, $A4,$F6, $A0,$12,$66
.byte $A6,$55, $22, $A3,$66, $22,$22, $A4,$66, $88, $55
.byte $66,$66, $86, $AA,$6F, $A3,$66, $76, $86,$86, $87
.byte $88, $A7,$55, $22, $76,$76, $77, $22,$22, $77
.byte $A3,$76, $88, $57, $56, $76, $88, $A5,$76
.byte $77,$77, $76, $77, $87,$87, $A7,$88, $A7,$55, $22
.byte $88,$88, $87, $22,$22, $87, $A6,$88, $85, $88,$88
.byte $57,$57, $58, $A5,$88, $58,$58, $78,$78, $A5,$88, $A7,$55
.byte $22, $88, $58,$58, $22,$22, $78,$78, $88, $28
.byte $A5,$88, $58, $A3,$55, $77, $A3,$88, $A5,$55, $58
.byte $A3,$88, $A8,$55, $22, $A3,$55, $22,$22, $55, $57,$57
.byte $22, $A0,$1E,$55, $22,$22, $55,$55, $22,$22, $A3,$55, $22
.byte $AA,$55, $5A, $A0,$13,$55, $22,$22, $55,$55, $A3,$22, $25
.byte $55, $22, $AA,$55, $5A, $A0,$13,$55, $22, $82
.byte $85, $22, $A7,$82, $88,$88, $A0,$12,$85, $A0,$1C,$88, $A8,$28
.byte $A4,$88, $28, $AA,$88, $22, $A3,$88, $28, $A3,$22
.byte $28, $88, $22, $88,$88, $28, $A3,$52, $A8,$55
.byte $52,$52, $28,$28, $A9,$88, $A0,$78,$00
.byte $A1

View File

@ -25,7 +25,7 @@ cavern3_rle: .byte $28 ; ysize=48
.byte $28, $AD,$22, $55, $00, $A6,$55, $A0,$1E,$22, $52
.byte $55,$55, $00, $A5,$55, $00, $A7,$22, $02,$02, $A0,$12,$22
.byte $52,$52, $A3,$55, $50, $A6,$55, $00, $52,$52, $02
.byte $00, $52,$52, $A5,$50, $AE,$52, $A0,$1A,$55, $A3,$05, $A5,$55
.byte $05, $A9,$55, $05,$05, $AF,$55, $05,$05, $A7,$00, $A3,$05
.byte $AA,$55, $05, $A3,$00, $A3,$05, $A5,$55, $A0,$A0,$00
.byte $00, $52,$52, $A5,$50, $AE,$52, $A0,$3F,$55, $A3,$05, $A3,$00
.byte $05, $A4,$55, $50, $A9,$55, $00,$00, $05, $A8,$55
.byte $A0,$A0,$00
.byte $A1

123
ootw/ootw_mesa.s Normal file
View File

@ -0,0 +1,123 @@
; Ootw mesa at far right
ootw_mesa:
;===========================
; Enable graphics
bit LORES
bit SET_GR
bit FULLGR
;===========================
; Setup pages (is this necessary?)
lda #0
sta DRAW_PAGE
lda #1
sta DISP_PAGE
;===========================
; Setup right/left exit paramaters
lda #20
sta RIGHT_LIMIT
lda #0 ; until we learn to climb slopes?
sta LEFT_LIMIT
;=============================
; Load background to $c00
lda #$0c
sta BASH
lda #$00
sta BASL ; load image off-screen $c00
lda #>(cavern3_rle)
sta GBASH
lda #<(cavern3_rle)
sta GBASL
jsr load_rle_gr
;=================================
; copy to both pages $400/$800
jsr gr_copy_to_current
jsr page_flip
jsr gr_copy_to_current
;=================================
; setup vars
lda #0
sta GAIT
sta GAME_OVER
;============================
; Rope Loop
;============================
mesa_loop:
;================================
; copy background to current page
jsr gr_copy_to_current
;===============================
; check keyboard
jsr handle_keypress
;===============
; draw physicist
jsr draw_physicist
;===============
; page flip
jsr page_flip
;================
; inc frame count
inc FRAMEL
bne mesa_frame_no_oflo
inc FRAMEH
mesa_frame_no_oflo:
; check if done this level
lda GAME_OVER
beq not_done_mesa
cmp #$ff ; check if dead
beq done_mesa
;====================
; check if leaving room
cmp #$2
beq not_done_mesa ; we can't, dead end
; off screen to left
mesa_off_left:
lda #37
sta PHYSICIST_X
lda #1
sta WHICH_CAVE
jmp ootw_cavern
not_done_mesa:
; loop forever
jmp mesa_loop
done_mesa:
rts

View File

@ -316,6 +316,7 @@ frame_no_oflo:
lda #0
sta PHYSICIST_X
sta WHICH_CAVE
jmp ootw_cavern