ootw: add placeholder for checkpoint2

This commit is contained in:
Vince Weaver 2019-01-27 21:37:09 -05:00
parent 642fb04b36
commit 585afcf4e7
6 changed files with 292 additions and 10 deletions

View File

@ -6,11 +6,13 @@ PNG2RLE = ../gr-utils/png2rle
all: ootw.dsk
ootw.dsk: HELLO LOADER OOTW INTRO
ootw.dsk: HELLO LOADER INTRO OOTW OOTW_C2
$(DOS33) -y ootw.dsk SAVE A HELLO
$(DOS33) -y ootw.dsk BSAVE -a 0x1800 LOADER
$(DOS33) -y ootw.dsk BSAVE -a 0x2000 OOTW
$(DOS33) -y ootw.dsk BSAVE -a 0x2000 INTRO
$(DOS33) -y ootw.dsk BSAVE -a 0x2000 OOTW
$(DOS33) -y ootw.dsk BSAVE -a 0x2000 OOTW_C2
####
@ -32,6 +34,20 @@ ootw.o: ootw.s \
####
OOTW_C2: ootw_c2.o
ld65 -o OOTW_C2 ootw_c2.o -C ../linker_scripts/apple2_2000.inc
ootw_c2.o: ootw_c2.s \
gr_copy.s gr_fast_clear.s gr_pageflip.s gr_unrle.s gr_putsprite.s \
keyboard.s sluggy.s \
sprites_physicist.inc \
ootw_c2_cage.s \
ootw_c2_cage.inc
ca65 -o ootw_c2.o ootw_c2.s -l ootw_c2.lst
####
INTRO: intro.o
ld65 -o INTRO intro.o -C ../linker_scripts/apple2_2000.inc
@ -76,8 +92,10 @@ ootw_cavern3.inc: $(PNG2RLE) another_cave3.png
ootw_rope.inc: $(PNG2RLE) another_rope.png
$(PNG2RLE) asm another_rope.png rope_rle > ootw_rope.inc
ootw_underwater.inc: $(PNG2RLE) another_uboot.png
$(PNG2RLE) asm another_uboot.png underwater_rle > ootw_underwater.inc
#####
ootw_c2_cage.inc: $(PNG2RLE) ootw_c2_cage.png
$(PNG2RLE) asm ootw_c2_cage.png cage_rle > ootw_c2_cage.inc
#####
@ -121,7 +139,4 @@ intro_tunnel2.inc: $(PNG2RLE) intro_tunnel2.png
#####
clean:
rm -f *~ *.o *.lst HELLO OOTW
rm -f *~ *.o *.lst HELLO OOTW OOTW_C2 INTRO LOADER

View File

@ -77,8 +77,8 @@ load_ootw_cp2:
sta namlo
lda #>ootw_c2_filename
sta namhi
jmp load_done
; fall through
load_done:
@ -104,7 +104,7 @@ ootw_filename: ;.byte "OOTW "
.byte $A0,$A0,$A0,$A0,$A0,$A0
ootw_c2_filename: ;.byte "OOTW_C2 "
.byte 'O'|$80,'O'|$80,'T'|$80,'W'|$80,'_'|$80,'C'|$80,'w'|$80,$A0
.byte 'O'|$80,'O'|$80,'T'|$80,'W'|$80,'_'|$80,'C'|$80,'2'|$80,$A0
.byte $A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0
.byte $A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0
.byte $A0,$A0,$A0,$A0,$A0,$A0

86
ootw/ootw_c2.s Normal file
View File

@ -0,0 +1,86 @@
; Ootw for Apple II Lores -- Checkpoint2
; by Vince "Deater" Weaver <vince@deater.net>
.include "zp.inc"
.include "hardware.inc"
ootw_c2:
; Initialize some variables
lda #0
sta GAME_OVER
sta KICKING
sta CROUCHING
lda #22
sta PHYSICIST_Y
lda #20
sta PHYSICIST_X
lda #1
sta DIRECTION
lda #40
sta BOULDER_Y
;=======================
; Enter the game
;=======================
jsr ootw_cage
;===========================
; quit_level
;===========================
quit_level:
jsr TEXT
jsr HOME
lda KEYRESET ; clear strobe
lda #0
sta DRAW_PAGE
lda #<end_message
sta OUTL
lda #>end_message
sta OUTH
jsr move_and_print
jsr move_and_print
wait_loop:
lda KEYPRESS
bpl wait_loop
lda KEYRESET ; clear strobe
jmp ootw_c2
end_message:
.byte 8,10,"PRESS RETURN TO CONTINUE",0
.byte 11,20,"ACCESS CODE: RAGE",0
.include "ootw_c2_cage.s"
.include "physicist.s"
.include "text_print.s"
.include "gr_pageflip.s"
.include "gr_unrle.s"
.include "gr_fast_clear.s"
.include "gr_copy.s"
.include "gr_putsprite.s"
.include "gr_offsets.s"
.include "random16.s"
.include "keyboard.s"
; room backgrounds
.include "ootw_c2_cage.inc"
; sprites
.include "sprites_physicist.inc"
; cutscenes

47
ootw/ootw_c2_cage.inc Normal file
View File

@ -0,0 +1,47 @@
cage_rle: .byte $28 ; ysize=48
.byte $A4,$22, $A5,$00, $22,$22, $02, $55, $A6,$00, $22
.byte $00, $20,$20, $00, $20, $22, $00,$00, $66
.byte $55, $22, $66,$66, $A5,$88, $A5,$22, $02, $A3,$00
.byte $22,$22, $00, $02, $00, $55, $A3,$00, $22,$22
.byte $A3,$00, $22,$22, $00, $02, $A3,$00, $66, $55
.byte $22, $66,$66, $A6,$88, $A4,$22, $00, $20, $A5,$00
.byte $20,$20, $55, $02, $22, $20, $22,$22, $AA,$00
.byte $66, $55, $22, $66,$66, $A6,$88, $A3,$22, $00,$00
.byte $02, $A4,$00, $78, $08, $98, $78, $08,$08
.byte $78, $22,$22, $02,$02, $22, $A7,$00, $66, $55
.byte $22, $66,$66, $A6,$88, $A3,$22, $A7,$00, $77, $00
.byte $66, $77, $00,$00, $77, $22,$22, $00,$00, $02
.byte $A7,$00, $66, $55, $22, $66,$66, $A6,$88, $22,$22
.byte $A8,$00, $77, $00, $05, $77, $60,$60, $77
.byte $22,$22, $AA,$00, $66, $55, $22, $66,$66, $88,$88
.byte $65, $A3,$88, $22,$22, $A8,$00, $77, $66, $00
.byte $77, $66,$66, $77, $22,$22, $00, $02, $20
.byte $A3,$00, $22, $A3,$00, $66, $55, $22, $66,$66
.byte $A6,$88, $22, $02, $A8,$00, $77, $06, $40
.byte $77, $00, $55, $77, $22,$22, $02, $22
.byte $02, $A7,$00, $66, $55, $22, $66,$66, $A7,$88
.byte $A9,$00, $77, $00, $44, $77, $50, $55
.byte $77, $22, $00,$00, $02, $A7,$00, $20, $66
.byte $55, $22, $66,$66, $A7,$88, $A9,$00, $77, $00
.byte $F4, $77, $00,$00, $77, $22, $50, $52
.byte $22, $A7,$00, $02, $66, $55, $22, $66,$66
.byte $A7,$88, $A9,$00, $A5,$08, $58, $08, $02, $05,$05
.byte $02, $00,$00, $20,$20, $00,$00, $22, $00, $66
.byte $55, $22, $66,$66, $A7,$88, $AE,$00, $55, $A7,$00
.byte $02,$02, $A4,$00, $55,$55, $22, $66,$66, $A7,$88, $A8,$00
.byte $20, $22, $A4,$00, $05, $00, $22, $AB,$00
.byte $55,$55, $22, $66,$66, $A7,$88, $A7,$00, $22,$22, $55
.byte $22, $00, $55, $00, $22,$22, $00, $22
.byte $AA,$00, $55,$55, $22, $66,$66, $A7,$88, $A5,$00, $20,$20
.byte $02, $22, $55, $02, $00, $55, $A3,$22
.byte $AC,$00, $55,$55, $22, $66,$66, $A7,$88, $A5,$00, $02,$02
.byte $A4,$00, $20,$20, $00, $02,$02, $AC,$00, $55,$55, $22
.byte $66,$66, $A7,$88, $AB,$00, $02,$02, $A8,$00, $20,$20, $00,$00
.byte $02, $00,$00, $55,$55, $22, $66,$66, $A7,$88, $AC,$00
.byte $22, $A8,$00, $22,$22, $00, $A7,$25, $66,$66, $A7,$88
.byte $A3,$60, $AF,$00, $A6,$60, $A7,$62, $66,$66, $A7,$68, $22
.byte $00,$00, $20,$20, $A8,$00, $22,$22, $A4,$00, $55, $00
.byte $55, $00, $55, $22, $52, $00, $55
.byte $22, $52, $00, $55, $00, $55, $00
.byte $55, $00, $55, $00, $55, $A0,$A0,$00
.byte $A1

BIN
ootw/ootw_c2_cage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

134
ootw/ootw_c2_cage.s Normal file
View File

@ -0,0 +1,134 @@
; Ootw -- Despite all my Rage...
ootw_cage:
;===========================
; 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 #0
sta LEFT_LIMIT
;=============================
; Load background to $c00
lda #$0c
sta BASH
lda #$00
sta BASL ; load image off-screen $c00
lda #>(cage_rle)
sta GBASH
lda #<(cage_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
;============================
; Cage Loop
;============================
cage_loop:
;================================
; copy background to current page
jsr gr_copy_to_current
;=======================
; draw miners mining
;===============================
; check keyboard
jsr handle_keypress
;===============
; draw physicist
; jsr draw_physicist
;======================
; draw cage
;===============
; page flip
jsr page_flip
;================
; inc frame count
inc FRAMEL
bne cage_frame_no_oflo
inc FRAMEH
cage_frame_no_oflo:
; pause?
; check if done this level
lda GAME_OVER
cmp #$ff
beq done_cage
; check if done this level
; cmp #$2
; bne not_to_right
; exit to right
; lda #0
; sta PHYSICIST_X
; sta WHICH_CAVE
; 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
jmp cage_loop
done_cage:
rts