ootw: add rope room

This commit is contained in:
Vince Weaver 2019-01-18 23:23:18 -05:00
parent f133c7adc1
commit 1cc0aa1065
9 changed files with 218 additions and 3 deletions

View File

@ -18,8 +18,10 @@ 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 \
ootw_rope.s \
ootw_pool.s ootw_cavern.s physicist.s random16.s slug_cutscene.s \
ootw_pool.inc ootw_cavern.inc ootw_quake.inc ootw_sprites.inc
ootw_pool.inc ootw_cavern.inc ootw_quake.inc ootw_rope.inc \
ootw_sprites.inc
ca65 -o ootw.o ootw.s -l ootw.lst
####
@ -38,6 +40,9 @@ ootw_cavern.inc: $(PNG2RLE) another_cave.png
ootw_quake.inc: $(PNG2RLE) another_cave_shake.png
$(PNG2RLE) asm another_cave_shake.png quake_rle > ootw_quake.inc
ootw_rope.inc: $(PNG2RLE) another_rope.png
$(PNG2RLE) asm another_rope.png rope_rle > ootw_rope.inc
#####
clean:

View File

@ -1,5 +1,15 @@
TODO:
+ slugs on ceiling
+ ability to run
+ ability to jump
+ make slug init a loop
+ add rope room, with falling rocks and earthquake
+ add cavern2 room with more slugs
+ add routine that auto-generates the two earthquake backgrounds
from one background image
far-out:
+ add the shooting-in-hallway scene

BIN
ootw/another_rope.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

View File

@ -1,5 +1,5 @@
5 HOME
10 PRINT "OOTW PROOF-OF-CONCEPT V1.0 BY DEATER"
10 PRINT "OOTW PROOF-OF-CONCEPT V1.1 BY DEATER"
20 PRINT
25 PRINT " ,"
30 PRINT "ORIGINAL BY ERIC CHAHI"

View File

@ -115,6 +115,7 @@ end_message:
.byte 8,10,"PRESS RETURN TO CONTINUE",0
.byte 11,20,"ACCESS CODE: IH8S",0
.include "ootw_rope.s"
.include "ootw_pool.s"
.include "ootw_cavern.s"
.include "physicist.s"
@ -130,5 +131,6 @@ end_message:
.include "ootw_pool.inc"
.include "ootw_cavern.inc"
.include "ootw_quake.inc"
.include "ootw_rope.inc"
.include "ootw_sprites.inc"
.include "slug_cutscene.s"

View File

@ -310,13 +310,24 @@ frame_no_oflo:
; check if done this level
cmp #$2
bne not_done_pool
bne not_to_right
; exit to right
lda #0
sta PHYSICIST_X
jmp ootw_cavern
not_to_right:
cmp #$1
bne not_done_pool
lda #37
sta PHYSICIST_X
jmp ootw_rope
not_done_pool:
; loop forever

47
ootw/ootw_rope.inc Normal file
View File

@ -0,0 +1,47 @@
rope_rle: .byte $28 ; ysize=48
.byte $A3,$00, $22,$22, $00, $A4,$22, $A3,$00, $55, $A9,$00
.byte $22, $A4,$00, $22, $52, $22, $00,$00, $22
.byte $06, $A5,$66, $A3,$00, $22,$22, $00, $A4,$22, $A3,$00
.byte $55, $A6,$00, $05, $00, $55, $22, $A5,$00
.byte $55, $22, $00,$00, $22, $00, $A5,$66, $00,$00
.byte $55, $22,$22, $00, $A4,$22, $20, $00,$00, $55
.byte $A6,$00, $55, $00, $55, $22, $A5,$00, $55
.byte $22, $00,$00, $02, $20, $A4,$66, $26, $00,$00
.byte $77, $55, $22, $00, $A5,$22, $00,$00, $55
.byte $A8,$00, $55, $22, $A5,$00, $55, $22, $00,$00
.byte $20, $22, $06, $A3,$66, $22, $00,$00, $77
.byte $55, $22, $00, $A5,$22, $AB,$00, $55, $22
.byte $A5,$00, $55, $22, $00,$00, $22, $00,$00, $55
.byte $66,$66, $22, $00,$00, $77, $55, $22, $00
.byte $A4,$22, $A3,$00, $55, $A8,$00, $55, $22, $00,$00
.byte $55, $22, $00, $55, $22, $00,$00, $02
.byte $00,$00, $55, $66,$66, $22, $00,$00, $77, $55
.byte $22, $00, $A4,$22, $20, $00,$00, $55, $A8,$00
.byte $55, $22, $00,$00, $55, $22, $00, $55
.byte $22, $A5,$00, $55, $26, $66, $22, $00,$00
.byte $77, $55, $22,$22, $00, $A4,$22, $A9,$00, $50
.byte $00, $55, $22, $00,$00, $55, $22, $00
.byte $55, $22, $A5,$00, $55, $22, $26, $22
.byte $A3,$00, $55, $22,$22, $00, $A4,$22, $A9,$00, $55
.byte $00, $55, $22, $00,$00, $25, $22, $00
.byte $05, $22, $A5,$00, $55, $02, $00, $22
.byte $A3,$00, $77, $55, $22, $00, $A4,$22, $AB,$00
.byte $55, $22, $00,$00, $22, $A3,$00, $22, $A5,$00
.byte $55, $00,$00, $22, $A4,$00, $55, $22,$22, $00
.byte $22,$22, $02, $05, $AA,$00, $55, $22, $00,$00
.byte $22, $A3,$00, $22,$22, $A5,$00, $55, $22,$22, $A4,$00
.byte $55, $22,$22, $20, $02, $20, $22, $AB,$00
.byte $05, $22, $00,$00, $22, $A3,$00, $02, $22
.byte $A5,$00, $55, $22,$22, $A4,$00, $A7,$22, $AC,$00, $22
.byte $00,$00, $02, $A4,$00, $22, $A5,$00, $55, $02,$02
.byte $A4,$00, $A6,$22, $02, $22, $00, $70,$70, $A8,$00
.byte $22, $A7,$00, $22, $A5,$00, $55, $A6,$00, $A6,$22
.byte $20, $52, $A4,$55, $50,$50, $A5,$00, $22, $A7,$00
.byte $22, $AC,$00, $02, $52, $72, $52, $A3,$22
.byte $A5,$00, $A3,$05, $55, $A3,$50, $22, $A0,$15,$00, $20,$20
.byte $A3,$22, $00, $22, $20, $A8,$00, $05, $55,$55
.byte $50, $A0,$13,$00, $A6,$22, $20, $22,$22, $AB,$00, $05
.byte $55,$55, $AD,$50, $A4,$00, $A9,$22, $20, $AC,$00, $05,$05
.byte $AC,$55, $A4,$00, $AA,$22, $AF,$00, $05, $A6,$55, $A4,$05
.byte $A4,$00, $AA,$22, $A0,$92,$00
.byte $A1

132
ootw/ootw_rope.s Normal file
View File

@ -0,0 +1,132 @@
; Ootw Rope course
ootw_rope:
;===========================
; 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 #37
sta RIGHT_LIMIT
lda #22 ; 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 #>(rope_rle)
sta GBASH
lda #<(rope_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
;============================
rope_loop:
;================================
; copy background to current page
jsr gr_copy_to_current
;===============================
; check keyboard
jsr handle_keypress
;===============
; draw physicist
jsr draw_physicist
;======================
; draw foreground plant
lda #<foreground_spikes
sta INL
lda #>foreground_spikes
sta INH
lda #30
sta XPOS
lda #30
sta YPOS
jsr put_sprite
;===============
; page flip
jsr page_flip
;================
; inc frame count
inc FRAMEL
bne rope_frame_no_oflo
inc FRAMEH
rope_frame_no_oflo:
; pause?
; check if done this level
lda GAME_OVER
cmp #$ff
beq done_rope
; check if done this level
cmp #$2
bne not_done_rope
lda #0
sta PHYSICIST_X
jmp ootw_pool
not_done_rope:
; loop forever
jmp rope_loop
done_rope:
rts

View File

@ -282,6 +282,14 @@ ripple4:
.byte $aa,$aa,$aa
foreground_spikes:
.byte $4,$5
.byte $00,$aa,$aa,$00
.byte $00,$aa,$0a,$00
.byte $00,$aa,$00,$00
.byte $00,$aa,$00,$00
.byte $00,$aa,$aa,$00
;=========================
; slug creatures