mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-09-29 08:55:10 +00:00
ootw: add placeholder for level14 (arena)
This commit is contained in:
parent
da2d2dd650
commit
6d0b3d4918
@ -20,10 +20,12 @@ ootw.dsk: HELLO TITLE INTRO OOTW_C1 OOTW_C2 OOTW_C3 OOTW_C4 OOTW_C5
|
||||
# $(DOS33) -y ootw.dsk BSAVE -a 0x1700 AUDIO_TEST
|
||||
# $(DOS33) -y ootw.dsk BSAVE -a 0x2000 COMPRESS-TEST
|
||||
|
||||
ootw_side2.dsk: HELLO TITLE ENDING OOTW_C15
|
||||
ootw_side2.dsk: HELLO TITLE ENDING \
|
||||
OOTW_C14 OOTW_C15
|
||||
cp empty.dsk ootw_side2.dsk
|
||||
$(DOS33) -y ootw_side2.dsk SAVE A HELLO HELLO
|
||||
$(DOS33) -y ootw_side2.dsk BSAVE -a 0xd00 TITLE
|
||||
$(DOS33) -y ootw_side2.dsk BSAVE -a 0x1700 OOTW_C14
|
||||
$(DOS33) -y ootw_side2.dsk BSAVE -a 0x1700 OOTW_C15
|
||||
$(DOS33) -y ootw_side2.dsk BSAVE -a 0x1700 ENDING
|
||||
|
||||
@ -130,6 +132,20 @@ ootw_c5.o: ootw_c5.s \
|
||||
|
||||
###
|
||||
|
||||
OOTW_C14: ootw_c14.o
|
||||
ld65 -o OOTW_C14 ootw_c14.o -C ../linker_scripts/apple2_1700.inc
|
||||
|
||||
ootw_c14.o: ootw_c14.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 \
|
||||
collision.s door.s gun.s blast.s shield.s \
|
||||
ootw_graphics/sprites/physicist.inc \
|
||||
ootw_graphics/l14arena/ootw_c14_arena.inc
|
||||
ca65 -o ootw_c14.o ootw_c14.s -l ootw_c14.lst
|
||||
|
||||
###
|
||||
|
||||
OOTW_C15: ootw_c15.o
|
||||
ld65 -o OOTW_C15 ootw_c15.o -C ../linker_scripts/apple2_1700.inc
|
||||
|
||||
@ -139,7 +155,7 @@ ootw_c15.o: ootw_c15.s \
|
||||
keyboard.s gr_run_sequence.s physicist.s \
|
||||
collision.s door.s gun.s blast.s shield.s \
|
||||
ootw_graphics/sprites/physicist.inc \
|
||||
ootw_graphics/l5cave/ootw_c5_cave.inc
|
||||
ootw_graphics/l15final/ootw_c15_final.inc
|
||||
ca65 -o ootw_c15.o ootw_c15.s -l ootw_c15.lst
|
||||
|
||||
|
||||
|
525
ootw/ootw_c14.s
Normal file
525
ootw/ootw_c14.s
Normal file
@ -0,0 +1,525 @@
|
||||
; Ootw for Apple II Lores
|
||||
|
||||
; Checkpoint-14 (tanks for the arena memories)
|
||||
|
||||
; by Vince "DEATER" Weaver <vince@deater.net>
|
||||
|
||||
.include "zp.inc"
|
||||
.include "hardware.inc"
|
||||
|
||||
|
||||
;============================
|
||||
; ENTRY POINT FOR LEVEL
|
||||
;============================
|
||||
|
||||
ootw_c14:
|
||||
; Initializing when entering level for first time
|
||||
|
||||
|
||||
;========================================================
|
||||
; RESTART: called when restarting level (after game over)
|
||||
;========================================================
|
||||
|
||||
ootw_c14_restart:
|
||||
|
||||
;===================================
|
||||
; re-initialize level state
|
||||
;===================================
|
||||
|
||||
jsr ootw_c14_level_init
|
||||
|
||||
;===========================
|
||||
; c14_new_room
|
||||
;===========================
|
||||
; enter new room on level 14
|
||||
|
||||
c14_new_room:
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
|
||||
;====================================
|
||||
; Initialize room based on WHICH_ROOM
|
||||
; and then play until we exit
|
||||
;====================================
|
||||
|
||||
jsr ootw_c14_setup_room_and_play
|
||||
|
||||
|
||||
;====================================
|
||||
; we exited the room
|
||||
;====================================
|
||||
c14_check_done:
|
||||
|
||||
lda GAME_OVER ; if died or quit, jump to quit level
|
||||
cmp #$ff
|
||||
beq quit_level
|
||||
|
||||
;=====================================================
|
||||
; Check to see which room to enter next
|
||||
; If it's a special value, means we succesfully beat the level
|
||||
c14_defeated:
|
||||
lda WHICH_ROOM
|
||||
cmp #$ff
|
||||
bne c14_new_room
|
||||
|
||||
; point to next level
|
||||
; and exit to the level loader
|
||||
lda #15
|
||||
sta WHICH_LOAD
|
||||
rts
|
||||
|
||||
|
||||
;===========================
|
||||
; quit_level
|
||||
;===========================
|
||||
|
||||
quit_level:
|
||||
jsr TEXT ; text mode
|
||||
jsr HOME ; clear screen
|
||||
lda KEYRESET ; clear keyboard state
|
||||
|
||||
lda #0 ; set to PAGE0
|
||||
sta DRAW_PAGE
|
||||
|
||||
lda #<end_message ; print the end message
|
||||
sta OUTL
|
||||
lda #>end_message
|
||||
sta OUTH
|
||||
|
||||
jsr move_and_print
|
||||
jsr move_and_print
|
||||
|
||||
wait_loop:
|
||||
lda KEYPRESS ; wait for keypress
|
||||
bpl wait_loop
|
||||
|
||||
lda KEYRESET ; clear strobe
|
||||
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
|
||||
jmp ootw_c14_restart ; restart level
|
||||
|
||||
|
||||
;=========================================
|
||||
;=========================================
|
||||
; Ootw Checkpoint 14 -- Tank Arena
|
||||
;=========================================
|
||||
;=========================================
|
||||
|
||||
; call once before entering for first time
|
||||
ootw_c14_level_init:
|
||||
lda #0
|
||||
sta WHICH_ROOM
|
||||
sta NUM_DOORS
|
||||
|
||||
lda #1
|
||||
sta HAVE_GUN
|
||||
sta DIRECTION ; right
|
||||
|
||||
lda #0
|
||||
sta PHYSICIST_X
|
||||
lda #10
|
||||
sta PHYSICIST_Y
|
||||
|
||||
lda #P_STANDING
|
||||
sta PHYSICIST_STATE
|
||||
|
||||
rts
|
||||
|
||||
|
||||
;===========================
|
||||
;===========================
|
||||
; enter new room
|
||||
;===========================
|
||||
;===========================
|
||||
|
||||
ootw_c14_setup_room_and_play:
|
||||
|
||||
;==============================
|
||||
; each room init
|
||||
|
||||
|
||||
;==============================
|
||||
; setup per-room variables
|
||||
|
||||
lda WHICH_ROOM
|
||||
bne room1
|
||||
|
||||
jsr init_shields
|
||||
|
||||
;===============================
|
||||
; Room0 -- the arena
|
||||
;===============================
|
||||
room:
|
||||
lda #(2+128)
|
||||
sta LEFT_LIMIT
|
||||
lda #(39+128)
|
||||
sta RIGHT_LIMIT
|
||||
|
||||
; set right exit
|
||||
lda #$ff ; exit level if exit this way
|
||||
sta cer_smc+1
|
||||
|
||||
; set left exit
|
||||
lda #0
|
||||
sta cel_smc+1
|
||||
|
||||
lda #28
|
||||
sta PHYSICIST_Y
|
||||
|
||||
; load background
|
||||
lda #>(arena_rle)
|
||||
sta GBASH
|
||||
lda #<(arena_rle)
|
||||
|
||||
jmp room_setup_done
|
||||
|
||||
; ????
|
||||
room1:
|
||||
; cmp #1
|
||||
; bne room2
|
||||
|
||||
; lda #(-4+128)
|
||||
; sta LEFT_LIMIT
|
||||
; lda #(39+128)
|
||||
; sta RIGHT_LIMIT
|
||||
|
||||
; set right exit
|
||||
; lda #2
|
||||
; sta cer_smc+1
|
||||
|
||||
; set left exit
|
||||
; lda #0
|
||||
; sta cel_smc+1
|
||||
|
||||
; lda #8
|
||||
; sta PHYSICIST_Y
|
||||
|
||||
; load background
|
||||
; lda #>(hallway_rle)
|
||||
; sta GBASH
|
||||
; lda #<(hallway_rle)
|
||||
|
||||
jmp room_setup_done
|
||||
|
||||
room_setup_done:
|
||||
|
||||
sta GBASL
|
||||
lda #$c ; load to page $c00
|
||||
jsr load_rle_gr ; tail call
|
||||
|
||||
;=====================
|
||||
; setup walk collision
|
||||
jsr recalc_walk_collision
|
||||
|
||||
|
||||
|
||||
ootw_room_already_set:
|
||||
;===========================
|
||||
; 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 vars
|
||||
|
||||
lda #0
|
||||
sta GAIT
|
||||
sta GAME_OVER
|
||||
|
||||
;============================
|
||||
;============================
|
||||
; Room Loop
|
||||
;============================
|
||||
;============================
|
||||
room_loop:
|
||||
|
||||
;================================
|
||||
; copy background to current page
|
||||
|
||||
jsr gr_copy_to_current
|
||||
|
||||
;==================================
|
||||
; draw background action
|
||||
|
||||
lda WHICH_CAVE
|
||||
|
||||
bg_room0:
|
||||
|
||||
; cmp #0
|
||||
; bne c4_no_bg_action
|
||||
|
||||
; lda FRAMEL
|
||||
; and #$c
|
||||
; lsr
|
||||
; tay
|
||||
|
||||
|
||||
; lda #11
|
||||
; sta XPOS
|
||||
; lda #24
|
||||
; sta YPOS
|
||||
|
||||
; lda recharge_bg_progression,Y
|
||||
; sta INL
|
||||
; lda recharge_bg_progression+1,Y
|
||||
; sta INH
|
||||
|
||||
; jsr put_sprite
|
||||
|
||||
c5_no_bg_action:
|
||||
|
||||
;===============================
|
||||
; check keyboard
|
||||
;===============================
|
||||
|
||||
jsr handle_keypress
|
||||
|
||||
;===============================
|
||||
; move physicist
|
||||
;===============================
|
||||
|
||||
jsr move_physicist
|
||||
|
||||
;===============================
|
||||
; check room limits
|
||||
;===============================
|
||||
|
||||
jsr check_screen_limit
|
||||
|
||||
;===============================
|
||||
; adjust floor
|
||||
;===============================
|
||||
|
||||
; lda PHYSICIST_STATE
|
||||
; cmp #P_FALLING_DOWN
|
||||
; beq check_floor0_done
|
||||
|
||||
; lda WHICH_CAVE
|
||||
; cmp #0
|
||||
; bne check_floor1
|
||||
|
||||
; lda #14
|
||||
; sta PHYSICIST_Y
|
||||
|
||||
; lda PHYSICIST_X
|
||||
; cmp #19
|
||||
; bcc check_floor0_done
|
||||
|
||||
; lda #12
|
||||
; sta PHYSICIST_Y
|
||||
|
||||
; lda PHYSICIST_X
|
||||
; cmp #28
|
||||
; bcc check_floor0_done
|
||||
|
||||
; lda #10
|
||||
; sta PHYSICIST_Y
|
||||
|
||||
check_floor0_done:
|
||||
|
||||
check_floor1:
|
||||
|
||||
|
||||
;=====================================
|
||||
; draw physicist
|
||||
;=====================================
|
||||
|
||||
jsr draw_physicist
|
||||
|
||||
|
||||
;=====================================
|
||||
; handle gun
|
||||
;=====================================
|
||||
|
||||
jsr handle_gun
|
||||
|
||||
;=====================================
|
||||
; draw foreground action
|
||||
;=====================================
|
||||
|
||||
; lda WHICH_CAVE
|
||||
; cmp #0
|
||||
; bne c5_no_fg_action
|
||||
|
||||
c5_draw_rocks:
|
||||
; lda #1
|
||||
; sta XPOS
|
||||
; lda #26
|
||||
; sta YPOS
|
||||
; lda #<small_rock
|
||||
; sta INL
|
||||
; lda #>small_rock
|
||||
; sta INH
|
||||
; jsr put_sprite
|
||||
|
||||
; lda #10
|
||||
; sta XPOS
|
||||
; lda #18
|
||||
; sta YPOS
|
||||
; lda #<medium_rock
|
||||
; sta INL
|
||||
; lda #>medium_rock
|
||||
; sta INH
|
||||
; jsr put_sprite
|
||||
|
||||
; lda #31
|
||||
; sta XPOS
|
||||
; lda #14
|
||||
; sta YPOS
|
||||
; lda #<large_rock
|
||||
; sta INL
|
||||
; lda #>large_rock
|
||||
; sta INH
|
||||
; jsr put_sprite
|
||||
|
||||
c5_no_fg_action:
|
||||
|
||||
;====================
|
||||
; activate fg objects
|
||||
;====================
|
||||
;c2_fg_check_jail1:
|
||||
; lda WHICH_JAIL
|
||||
; cmp #1
|
||||
; bne c2_fg_check_jail2
|
||||
;
|
||||
; lda CART_OUT
|
||||
; bne c2_fg_check_jail2
|
||||
;
|
||||
; inc CART_OUT
|
||||
|
||||
|
||||
;================
|
||||
; move fg objects
|
||||
;================
|
||||
c4_move_fg_objects:
|
||||
|
||||
; lda CART_OUT
|
||||
; cmp #1
|
||||
; bne cart_not_out
|
||||
|
||||
; move cart
|
||||
|
||||
; lda FRAMEL
|
||||
; and #$3
|
||||
; bne cart_not_out
|
||||
;
|
||||
; inc CART_X
|
||||
; lda CART_X
|
||||
; cmp #39
|
||||
; bne cart_not_out
|
||||
; inc CART_OUT
|
||||
|
||||
|
||||
;====================================
|
||||
; page flip
|
||||
;====================================
|
||||
|
||||
jsr page_flip
|
||||
|
||||
;====================================
|
||||
; inc frame count
|
||||
;====================================
|
||||
|
||||
inc FRAMEL
|
||||
bne room_frame_no_oflo
|
||||
inc FRAMEH
|
||||
room_frame_no_oflo:
|
||||
|
||||
;==========================
|
||||
; check if done this level
|
||||
;==========================
|
||||
|
||||
lda GAME_OVER
|
||||
beq still_in_room
|
||||
|
||||
cmp #$ff ; if $ff, we died
|
||||
beq done_room
|
||||
|
||||
;===============================
|
||||
; check if exited room to right
|
||||
cmp #1
|
||||
beq room_exit_left
|
||||
|
||||
;=================
|
||||
; exit to right
|
||||
|
||||
room_right_yes_exit:
|
||||
|
||||
lda #0
|
||||
sta PHYSICIST_X
|
||||
cer_smc:
|
||||
lda #$0 ; smc+1 = exit location
|
||||
sta WHICH_ROOM
|
||||
jmp done_room
|
||||
|
||||
;=====================
|
||||
; exit to left
|
||||
|
||||
room_exit_left:
|
||||
|
||||
lda #37
|
||||
sta PHYSICIST_X
|
||||
cel_smc:
|
||||
lda #0 ; smc+1
|
||||
sta WHICH_ROOM
|
||||
jmp done_room
|
||||
|
||||
; loop forever
|
||||
still_in_room:
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
|
||||
jmp room_loop
|
||||
|
||||
done_room:
|
||||
rts
|
||||
|
||||
end_message:
|
||||
.byte 8,10,"PRESS RETURN TO CONTINUE",0
|
||||
.byte 11,20,"ACCESS CODE: ANKD",0
|
||||
|
||||
.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_hlin.s"
|
||||
.include "keyboard.s"
|
||||
|
||||
.include "physicist.s"
|
||||
.include "alien.s"
|
||||
.include "dummy_friend.s"
|
||||
|
||||
.include "gun.s"
|
||||
.include "laser.s"
|
||||
.include "alien_laser.s"
|
||||
.include "blast.s"
|
||||
.include "shield.s"
|
||||
|
||||
.include "door.s"
|
||||
.include "collision.s"
|
||||
|
||||
; room backgrounds
|
||||
.include "ootw_graphics/l14arena/ootw_c14_arena.inc"
|
||||
; sprites
|
||||
.include "ootw_graphics/sprites/physicist.inc"
|
||||
.include "ootw_graphics/sprites/alien.inc"
|
||||
|
18
ootw/ootw_graphics/l14arena/Makefile
Normal file
18
ootw/ootw_graphics/l14arena/Makefile
Normal file
@ -0,0 +1,18 @@
|
||||
include ../../../Makefile.inc
|
||||
|
||||
PNG2RLE = ../../../gr-utils/png2rle
|
||||
PNG2LZ4 = ../../../gr-utils/png2lz4
|
||||
|
||||
all: ootw_c14_arena.inc
|
||||
|
||||
#####
|
||||
|
||||
ootw_c14_arena.inc: $(PNG2RLE) \
|
||||
arena.png
|
||||
$(PNG2RLE) asm arena.png arena_rle > ootw_c14_arena.inc
|
||||
|
||||
#####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst *.lzz *.inc
|
||||
|
BIN
ootw/ootw_graphics/l14arena/arena.png
Normal file
BIN
ootw/ootw_graphics/l14arena/arena.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 431 B |
31
ootw/ootw_graphics/l14arena/ootw_c14_arena.inc
Normal file
31
ootw/ootw_graphics/l14arena/ootw_c14_arena.inc
Normal file
@ -0,0 +1,31 @@
|
||||
arena_rle: .byte $28 ; ysize=48
|
||||
.byte $A0,$2C,$66, $26, $61, $A3,$66, $16, $A3,$66, $16
|
||||
.byte $A4,$66, $26, $61, $A3,$66, $16, $A3,$66, $16
|
||||
.byte $A4,$66, $26, $61, $A3,$66, $16, $66,$66, $A3,$76
|
||||
.byte $72, $76, $75, $76,$76, $72, $A3,$76, $72
|
||||
.byte $A4,$76, $72, $76, $75, $76,$76, $72, $A3,$76
|
||||
.byte $72, $A4,$76, $72, $76, $75, $76,$76, $72
|
||||
.byte $A3,$76, $A0,$28,$77, $A0,$28,$57, $A0,$87,$55, $A4,$05, $95, $65
|
||||
.byte $A4,$05, $A0,$1D,$55, $A5,$00, $0B, $22, $A5,$00, $AE,$55
|
||||
.byte $AD,$22, $AE,$00, $02, $AC,$22, $52, $A8,$22, $52,$52
|
||||
.byte $02, $AF,$00, $22, $02, $A6,$22, $02,$02, $A4,$22
|
||||
.byte $55, $A6,$22, $55, $22, $02, $AB,$00, $F2
|
||||
.byte $60, $00,$00, $20, $55, $22, $00, $A4,$22
|
||||
.byte $55, $A3,$00, $A3,$22, $55, $A6,$22, $55, $02
|
||||
.byte $AC,$00, $0F, $22, $00,$00, $22, $55, $22
|
||||
.byte $00, $A3,$22, $62, $55, $A3,$00, $A3,$22, $55
|
||||
.byte $22,$22, $F2, $22, $F2, $22, $50, $A0,$10,$00
|
||||
.byte $22,$22, $F5, $22, $00, $22, $52, $00
|
||||
.byte $FF, $F5, $A3,$00, $22, $55, $00, $05
|
||||
.byte $22,$22, $F0, $22, $F0, $22, $55, $AF,$00
|
||||
.byte $20, $22,$22, $F0, $27, $00, $22, $55
|
||||
.byte $00, $22, $F0, $A3,$00, $22, $55, $50,$50
|
||||
.byte $02, $52, $0F, $52, $0F, $52, $55
|
||||
.byte $52, $AE,$00, $A3,$52, $0F, $52, $50, $82
|
||||
.byte $85, $80, $82, $0F, $A3,$80, $82, $85
|
||||
.byte $50, $55, $50, $A5,$55, $A3,$85, $AC,$00, $A0,$17,$88
|
||||
.byte $A3,$58, $55,$55, $AB,$50, $80, $A0,$18,$88, $A8,$85, $A0,$3A,$88
|
||||
.byte $00, $88,$88, $07, $78, $A0,$23,$88, $80, $00,$00
|
||||
.byte $77,$77, $00,$00, $A0,$22,$88, $A3,$85, $58, $88, $10
|
||||
.byte $A0,$22,$88, $80, $81, $86,$86, $85, $88
|
||||
.byte $A1
|
Loading…
Reference in New Issue
Block a user