mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-27 15:29:47 +00:00
ootw: c3: "implement" checkpoint3
also fix a bug in text printing introduced a while back, might be why intro broken
This commit is contained in:
parent
f2ee717dd8
commit
a6a95e048d
@ -7,12 +7,13 @@ PNG2LZ4 = ../gr-utils/png2lz4
|
||||
|
||||
all: ootw.dsk
|
||||
|
||||
ootw.dsk: HELLO LOADER INTRO OOTW OOTW_C2 #COMPRESS-TEST
|
||||
ootw.dsk: HELLO LOADER INTRO OOTW OOTW_C2 OOTW_C3
|
||||
$(DOS33) -y ootw.dsk SAVE A HELLO
|
||||
$(DOS33) -y ootw.dsk BSAVE -a 0x1400 LOADER
|
||||
$(DOS33) -y ootw.dsk BSAVE -a 0x1700 INTRO
|
||||
$(DOS33) -y ootw.dsk BSAVE -a 0x1700 OOTW
|
||||
$(DOS33) -y ootw.dsk BSAVE -a 0x1700 OOTW_C2
|
||||
$(DOS33) -y ootw.dsk BSAVE -a 0x1700 OOTW_C3
|
||||
# $(DOS33) -y ootw.dsk BSAVE -a 0x2000 COMPRESS-TEST
|
||||
|
||||
|
||||
@ -61,6 +62,18 @@ ootw_c2.o: ootw_c2.s \
|
||||
ootw_graphics/l2intro/ootw_l2intro.inc
|
||||
ca65 -o ootw_c2.o ootw_c2.s -l ootw_c2.lst
|
||||
|
||||
####
|
||||
|
||||
OOTW_C3: ootw_c3.o
|
||||
ld65 -o OOTW_C3 ootw_c3.o -C ../linker_scripts/apple2_1700.inc
|
||||
|
||||
ootw_c3.o: ootw_c3.s \
|
||||
gr_copy.s gr_copy_offset.s gr_fast_clear.s gr_pageflip.s gr_unrle.s \
|
||||
gr_putsprite.s gr_putsprite_flipped.s gr_putsprite_crop.s \
|
||||
keyboard.s gr_run_sequence.s physicist.s \
|
||||
ootw_graphics/sprites/sprites_physicist.inc \
|
||||
ootw_graphics/l3vent/ootw_c3_vent.inc
|
||||
ca65 -o ootw_c3.o ootw_c3.s -l ootw_c3.lst
|
||||
|
||||
####
|
||||
|
||||
|
@ -17,9 +17,10 @@
|
||||
110 PRINT "0). START WITH INTRO MOVIE"
|
||||
120 PRINT "1). START AT CHECKPOINT 1 (IH8S)"
|
||||
130 PRINT "2). START AT CHECKPOINT 2 (RAGE)"
|
||||
135 PRINT "3). START AT CHECKPOINT 3 (VENT)"
|
||||
140 INPUT A
|
||||
150 IF A < 0 OR A > 2 THEN 5
|
||||
155 IF A=1 OR A=2 THEN GOSUB 300
|
||||
150 IF A < 0 OR A > 3 THEN 5
|
||||
155 IF A=1 OR A=2 OR A=3 THEN GOSUB 300
|
||||
160 POKE 5,A
|
||||
200 PRINT CHR$ (4)"BRUN LOADER"
|
||||
300 HOME
|
||||
|
@ -51,6 +51,8 @@ which_load_loop:
|
||||
beq load_ootw_cp1
|
||||
cmp #2
|
||||
beq load_ootw_cp2
|
||||
cmp #3
|
||||
beq load_ootw_cp3
|
||||
|
||||
; fall through
|
||||
|
||||
@ -79,9 +81,19 @@ load_ootw_cp2:
|
||||
sta namlo
|
||||
lda #>ootw_c2_filename
|
||||
sta namhi
|
||||
jmp load_done
|
||||
|
||||
load_ootw_cp3:
|
||||
|
||||
; open and read a file
|
||||
lda #<ootw_c3_filename
|
||||
sta namlo
|
||||
lda #>ootw_c3_filename
|
||||
sta namhi
|
||||
|
||||
; fall through
|
||||
|
||||
|
||||
load_done:
|
||||
|
||||
jsr opendir ; open and read entire file into memory
|
||||
@ -111,6 +123,12 @@ ootw_c2_filename: ;.byte "OOTW_C2 "
|
||||
.byte $A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0
|
||||
.byte $A0,$A0,$A0,$A0,$A0,$A0
|
||||
|
||||
ootw_c3_filename: ;.byte "OOTW_C3 "
|
||||
.byte 'O'|$80,'O'|$80,'T'|$80,'W'|$80,'_'|$80,'C'|$80,'3'|$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
|
||||
|
||||
|
||||
;unhook DOS and build nibble table
|
||||
|
||||
|
93
ootw/ootw_c3.s
Normal file
93
ootw/ootw_c3.s
Normal file
@ -0,0 +1,93 @@
|
||||
; Ootw for Apple II Lores -- Checkpoint3 -- The Ventilation System
|
||||
|
||||
; by Vince "Deater" Weaver <vince@deater.net>
|
||||
|
||||
.include "zp.inc"
|
||||
.include "hardware.inc"
|
||||
|
||||
|
||||
|
||||
ootw_c3:
|
||||
|
||||
; Initialize some variables
|
||||
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta PHYSICIST_STATE
|
||||
|
||||
lda #22
|
||||
sta PHYSICIST_Y
|
||||
lda #20
|
||||
sta PHYSICIST_X
|
||||
|
||||
lda #1
|
||||
sta DIRECTION
|
||||
|
||||
;=======================
|
||||
; Run the intro
|
||||
;=======================
|
||||
|
||||
;=======================
|
||||
; Enter the game
|
||||
;=======================
|
||||
|
||||
jsr ootw_vent
|
||||
|
||||
|
||||
;===========================
|
||||
; quit_level
|
||||
;===========================
|
||||
|
||||
quit_level:
|
||||
jsr TEXT
|
||||
jsr HOME
|
||||
lda KEYRESET ; clear strobe
|
||||
bit PAGE0
|
||||
|
||||
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_c3
|
||||
|
||||
|
||||
end_message:
|
||||
.byte 8,10,"PRESS RETURN TO CONTINUE",0
|
||||
.byte 11,20,"ACCESS CODE: VENT",0
|
||||
|
||||
.include "ootw_c3_vent.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_copy_offset.s"
|
||||
.include "gr_putsprite.s"
|
||||
.include "gr_putsprite_flipped.s"
|
||||
.include "gr_putsprite_crop.s"
|
||||
.include "gr_offsets.s"
|
||||
.include "gr_offsets_hl.s"
|
||||
.include "gr_run_sequence.s"
|
||||
.include "gr_overlay.s"
|
||||
.include "random16.s"
|
||||
.include "keyboard.s"
|
||||
|
||||
; room backgrounds
|
||||
.include "ootw_graphics/l3vent/ootw_c3_vent.inc"
|
||||
; sprites
|
||||
;.include "ootw_graphics/sprites/sprites_physicist.inc"
|
||||
|
143
ootw/ootw_c3_vent.s
Normal file
143
ootw/ootw_c3_vent.s
Normal file
@ -0,0 +1,143 @@
|
||||
; Ootw Checkpoint3 -- Rolling around the vents
|
||||
|
||||
ootw_vent:
|
||||
|
||||
;==============================
|
||||
; init
|
||||
|
||||
lda #0
|
||||
|
||||
; load background
|
||||
lda #>(vent_rle)
|
||||
sta GBASH
|
||||
lda #<(vent_rle)
|
||||
sta GBASL
|
||||
lda #$c ; load to page $c00
|
||||
jsr load_rle_gr ; tail call
|
||||
|
||||
;===========================
|
||||
; Enable graphics
|
||||
|
||||
bit LORES
|
||||
bit SET_GR
|
||||
bit FULLGR
|
||||
|
||||
;===========================
|
||||
; Setup pages (is this necessary?)
|
||||
|
||||
lda #0
|
||||
sta DRAW_PAGE
|
||||
lda #1
|
||||
sta DISP_PAGE
|
||||
|
||||
;=================================
|
||||
; copy to screen
|
||||
|
||||
jsr gr_copy_to_current
|
||||
jsr page_flip
|
||||
|
||||
;=================================
|
||||
; setup vars
|
||||
|
||||
lda #0
|
||||
sta GAIT
|
||||
sta GAME_OVER
|
||||
|
||||
;============================
|
||||
; Vent Loop
|
||||
;============================
|
||||
vent_loop:
|
||||
|
||||
;================================
|
||||
; copy background to current page
|
||||
|
||||
jsr gr_copy_to_current
|
||||
|
||||
;==================================
|
||||
; draw background action
|
||||
|
||||
;===============================
|
||||
; check keyboard
|
||||
|
||||
jsr handle_keypress
|
||||
|
||||
;===============================
|
||||
; move physicist
|
||||
|
||||
; jsr move_physicist
|
||||
|
||||
;===============
|
||||
; check room limits
|
||||
|
||||
; jsr check_screen_limit
|
||||
|
||||
|
||||
;===============
|
||||
; draw physicist
|
||||
|
||||
; jsr draw_physicist
|
||||
|
||||
|
||||
;===============
|
||||
; page flip
|
||||
|
||||
jsr page_flip
|
||||
|
||||
;================
|
||||
; inc frame count
|
||||
|
||||
inc FRAMEL
|
||||
bne vent_frame_no_oflo
|
||||
inc FRAMEH
|
||||
vent_frame_no_oflo:
|
||||
|
||||
;==========================
|
||||
; check if done this level
|
||||
;==========================
|
||||
|
||||
lda GAME_OVER
|
||||
beq still_in_vent
|
||||
|
||||
cmp #$ff ; if $ff, we died
|
||||
beq done_vent
|
||||
|
||||
;===============================
|
||||
; check if exited room to right
|
||||
; cmp #1
|
||||
; beq jail_exit_left
|
||||
|
||||
;=================
|
||||
; exit to right
|
||||
|
||||
;jail_right_yes_exit:
|
||||
|
||||
; lda #0
|
||||
; sta PHYSICIST_X
|
||||
;jer_smc:
|
||||
; lda #$0 ; smc+1 = exit location
|
||||
; sta WHICH_CAVE
|
||||
; jmp done_jail
|
||||
|
||||
;=====================
|
||||
; exit to left
|
||||
|
||||
;jail_exit_left:
|
||||
|
||||
; lda #37
|
||||
; sta PHYSICIST_X
|
||||
;jel_smc:
|
||||
; lda #0 ; smc+1
|
||||
; sta WHICH_CAVE
|
||||
; jmp done_jail
|
||||
|
||||
; loop forever
|
||||
still_in_vent:
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
|
||||
jmp vent_loop
|
||||
|
||||
done_vent:
|
||||
rts
|
||||
|
||||
|
18
ootw/ootw_graphics/l3vent/Makefile
Normal file
18
ootw/ootw_graphics/l3vent/Makefile
Normal file
@ -0,0 +1,18 @@
|
||||
include ../../../Makefile.inc
|
||||
|
||||
PNG2RLE = ../../../gr-utils/png2rle
|
||||
PNG2LZ4 = ../../../gr-utils/png2lz4
|
||||
|
||||
all: ootw_c3_vent.inc
|
||||
|
||||
#####
|
||||
|
||||
ootw_c3_vent.inc: $(PNG2RLE) \
|
||||
vent.png
|
||||
$(PNG2RLE) asm vent.png vent_rle > ootw_c3_vent.inc
|
||||
|
||||
#####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst *.lzz *.inc
|
||||
|
5
ootw/ootw_graphics/l3vent/ootw_c3_vent.inc
Normal file
5
ootw/ootw_graphics/l3vent/ootw_c3_vent.inc
Normal file
@ -0,0 +1,5 @@
|
||||
vent_rle: .byte $28 ; ysize=48
|
||||
.byte $A0,$11,$00, $20,$20, $22, $00,$00, $22, $20, $A0,$24,$00
|
||||
.byte $90, $4B, $A0,$23,$00, $A3,$20, $29, $2B, $20,$20
|
||||
.byte $A0,$FF,$00, $A0,$FF,$00, $A0,$FF,$00, $A0,$5B,$00
|
||||
.byte $A1
|
BIN
ootw/ootw_graphics/l3vent/vent.png
Normal file
BIN
ootw/ootw_graphics/l3vent/vent.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 257 B |
@ -21,7 +21,7 @@ move_and_print:
|
||||
adc CH ; add in xpos
|
||||
sta BASL ; store out low byte of addy
|
||||
|
||||
lda gr_offsets,Y ; look up high byte
|
||||
lda gr_offsets+1,Y ; look up high byte
|
||||
adc DRAW_PAGE ;
|
||||
sta BASH ; and store it out
|
||||
; BASH:BASL now points at right place
|
||||
|
Loading…
x
Reference in New Issue
Block a user