ootw: more arena work
|
@ -8,7 +8,9 @@ all: ootw_c14_arena.inc
|
|||
#####
|
||||
|
||||
ootw_c14_arena.inc: \
|
||||
blank.lzsa \
|
||||
arena_main_bg.lzsa \
|
||||
arena_panel_bg.lzsa \
|
||||
inside_bg.lzsa \
|
||||
inside03.lzsa inside04.lzsa inside05.lzsa inside06.lzsa \
|
||||
inside07.lzsa inside08.lzsa inside09.lzsa inside10.lzsa \
|
||||
|
@ -44,8 +46,13 @@ ootw_c14_arena.inc: \
|
|||
arena_next13.lzsa arena_next14.lzsa arena_next15.lzsa arena_next16.lzsa \
|
||||
arena_next17.lzsa arena_next18.lzsa arena_next19.lzsa arena_next20.lzsa \
|
||||
arena_next21.lzsa arena_next22.lzsa arena_next23.lzsa arena_next24.lzsa \
|
||||
arena_next25.lzsa arena_next26.lzsa arena_next27.lzsa
|
||||
arena_next25.lzsa arena_next26.lzsa arena_next27.lzsa \
|
||||
eject01.lzsa eject02.lzsa eject03.lzsa eject04.lzsa eject05.lzsa \
|
||||
eject06.lzsa eject07.lzsa eject08.lzsa eject09.lzsa eject10.lzsa \
|
||||
sky_bg.lzsa \
|
||||
sky01.lzsa sky02.lzsa sky03.lzsa sky04.lzsa sky05.lzsa
|
||||
echo "arena_main_bg_lzsa: .incbin \"arena_main_bg.lzsa\"" > ootw_c14_arena.inc
|
||||
echo "arena_panel_bg_lzsa: .incbin \"arena_panel_bg.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "inside_bg_lzsa: .incbin \"inside_bg.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "inside03_lzsa: .incbin \"inside03.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "inside04_lzsa: .incbin \"inside04.lzsa\"" >> ootw_c14_arena.inc
|
||||
|
@ -136,6 +143,7 @@ ootw_c14_arena.inc: \
|
|||
echo "entering11_lzsa: .incbin \"entering11.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "entering12_lzsa: .incbin \"entering12.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "entering13_lzsa: .incbin \"entering13.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "blank_lzsa: .incbin \"blank.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "arena_next_bg_lzsa: .incbin \"arena_next_bg.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "arena_next01_lzsa: .incbin \"arena_next01.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "arena_next02_lzsa: .incbin \"arena_next02.lzsa\"" >> ootw_c14_arena.inc
|
||||
|
@ -164,9 +172,22 @@ ootw_c14_arena.inc: \
|
|||
echo "arena_next25_lzsa: .incbin \"arena_next25.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "arena_next26_lzsa: .incbin \"arena_next26.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "arena_next27_lzsa: .incbin \"arena_next27.lzsa\"" >> ootw_c14_arena.inc
|
||||
|
||||
|
||||
|
||||
echo "eject01_lzsa: .incbin \"eject01.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "eject02_lzsa: .incbin \"eject02.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "eject03_lzsa: .incbin \"eject03.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "eject04_lzsa: .incbin \"eject04.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "eject05_lzsa: .incbin \"eject05.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "eject06_lzsa: .incbin \"eject06.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "eject07_lzsa: .incbin \"eject07.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "eject08_lzsa: .incbin \"eject08.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "eject09_lzsa: .incbin \"eject09.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "eject10_lzsa: .incbin \"eject10.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "sky_bg_lzsa: .incbin \"sky_bg.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "sky01_lzsa: .incbin \"sky01.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "sky02_lzsa: .incbin \"sky02.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "sky03_lzsa: .incbin \"sky03.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "sky04_lzsa: .incbin \"sky04.lzsa\"" >> ootw_c14_arena.inc
|
||||
echo "sky05_lzsa: .incbin \"sky05.lzsa\"" >> ootw_c14_arena.inc
|
||||
|
||||
#####
|
||||
|
||||
|
|
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 738 B After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 731 B After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 734 B After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 727 B After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 731 B After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 740 B After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 731 B After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 732 B After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 736 B After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 737 B After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 735 B After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 744 B After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 746 B After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 746 B After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 735 B After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 734 B After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 734 B After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 743 B After Width: | Height: | Size: 737 B |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 637 B |
After Width: | Height: | Size: 652 B |
After Width: | Height: | Size: 696 B |
After Width: | Height: | Size: 709 B |
After Width: | Height: | Size: 725 B |
After Width: | Height: | Size: 718 B |
After Width: | Height: | Size: 710 B |
After Width: | Height: | Size: 722 B |
After Width: | Height: | Size: 738 B |
After Width: | Height: | Size: 742 B |
After Width: | Height: | Size: 695 B |
After Width: | Height: | Size: 662 B |
After Width: | Height: | Size: 721 B |
After Width: | Height: | Size: 764 B |
After Width: | Height: | Size: 738 B |
After Width: | Height: | Size: 680 B |
After Width: | Height: | Size: 637 B |
|
@ -51,21 +51,23 @@ ootw_c14_restart:
|
|||
jsr ootw_c14_level_init
|
||||
|
||||
;===========================
|
||||
; c14_new_room
|
||||
; c14 startup
|
||||
;===========================
|
||||
; enter new room on level 14
|
||||
|
||||
c14_new_room:
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta BUTTON_PRESS
|
||||
|
||||
lda #6
|
||||
sta HAND_X
|
||||
lda #14
|
||||
sta HAND_Y
|
||||
|
||||
;====================================
|
||||
; Initialize room based on WHICH_ROOM
|
||||
; and then play until we exit
|
||||
; play until we exit
|
||||
;====================================
|
||||
|
||||
jsr ootw_c14_setup_room_and_play
|
||||
|
||||
jsr ootw_c14_play
|
||||
|
||||
;====================================
|
||||
; we exited the room
|
||||
|
@ -77,12 +79,15 @@ c14_check_done:
|
|||
beq quit_level
|
||||
|
||||
;=====================================================
|
||||
; Check to see which room to enter next
|
||||
; If it's a special value, means we succesfully beat the level
|
||||
; we beat the level, run the eject sequence
|
||||
c14_defeated:
|
||||
lda WHICH_ROOM
|
||||
cmp #$ff
|
||||
bne c14_new_room
|
||||
|
||||
lda #<eject_sequence
|
||||
sta INTRO_LOOPL
|
||||
lda #>eject_sequence
|
||||
sta INTRO_LOOPH
|
||||
|
||||
jsr run_sequence
|
||||
|
||||
; point to next level
|
||||
; and exit to the level loader
|
||||
|
@ -139,31 +144,27 @@ ootw_c14_level_init:
|
|||
|
||||
;===========================
|
||||
;===========================
|
||||
; enter new room
|
||||
; play the arena
|
||||
;===========================
|
||||
;===========================
|
||||
|
||||
ootw_c14_setup_room_and_play:
|
||||
ootw_c14_play:
|
||||
|
||||
;===============================
|
||||
; Room0 -- the arena
|
||||
;===============================
|
||||
room:
|
||||
|
||||
;===================
|
||||
; load background
|
||||
lda #>(arena_main_bg_lzsa)
|
||||
;===================
|
||||
|
||||
lda #>(arena_panel_bg_lzsa)
|
||||
sta getsrc_smc+2 ; LZSA_SRC_HI
|
||||
lda #<(arena_main_bg_lzsa)
|
||||
|
||||
room_setup_done:
|
||||
|
||||
lda #<(arena_panel_bg_lzsa)
|
||||
sta getsrc_smc+1 ; LZSA_SRC_LO
|
||||
lda #$c ; load to page $c00
|
||||
jsr decompress_lzsa2_fast ; tail call
|
||||
|
||||
ootw_room_already_set:
|
||||
;===========================
|
||||
; Enable graphics
|
||||
;===========================
|
||||
|
||||
bit LORES
|
||||
bit SET_GR
|
||||
|
@ -205,6 +206,34 @@ room_loop:
|
|||
|
||||
jsr handle_keypress
|
||||
|
||||
|
||||
;===============================
|
||||
; draw hand
|
||||
;===============================
|
||||
|
||||
lda HAND_X
|
||||
sta XPOS
|
||||
lda HAND_Y
|
||||
sta YPOS
|
||||
|
||||
lda BUTTON_PRESS
|
||||
beq regular_hand
|
||||
button_hand:
|
||||
lda #<hand_press_sprite
|
||||
sta INL
|
||||
lda #>hand_press_sprite
|
||||
dec BUTTON_PRESS
|
||||
jmp hand_ready
|
||||
|
||||
regular_hand:
|
||||
lda #<hand_sprite
|
||||
sta INL
|
||||
lda #>hand_sprite
|
||||
hand_ready:
|
||||
sta INH
|
||||
jsr put_sprite_crop
|
||||
|
||||
|
||||
;=====================================
|
||||
; draw foreground action
|
||||
;=====================================
|
||||
|
@ -298,14 +327,14 @@ room_frame_no_oflo:
|
|||
;==========================
|
||||
|
||||
lda GAME_OVER
|
||||
beq still_in_room
|
||||
beq still_in_arena
|
||||
|
||||
cmp #$ff ; if $ff, we died
|
||||
beq done_room
|
||||
; cmp #$ff ; if $ff, we died
|
||||
jmp done_room
|
||||
|
||||
|
||||
; loop forever
|
||||
still_in_room:
|
||||
still_in_arena:
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
|
||||
|
@ -323,7 +352,7 @@ end_message:
|
|||
.include "../decompress_fast_v2.s"
|
||||
.include "../gr_copy.s"
|
||||
;.include "../gr_putsprite.s"
|
||||
;.include "../gr_putsprite_crop.s"
|
||||
.include "../gr_putsprite_crop.s"
|
||||
.include "../gr_offsets.s"
|
||||
;.include "../gr_hlin.s"
|
||||
;.include "../keyboard.s"
|
||||
|
@ -360,7 +389,6 @@ end_message:
|
|||
; D or -> : start moving right
|
||||
; W or up : jump or elevator/transporter up
|
||||
; S or down : crouch or pickup or elevator/transporter down
|
||||
; L : charge gun
|
||||
; space : action
|
||||
; escape : quit
|
||||
|
||||
|
@ -408,11 +436,13 @@ check_left:
|
|||
;====================
|
||||
;====================
|
||||
left_pressed:
|
||||
; inc GUN_FIRE ; fire gun if charging
|
||||
lda HAND_X
|
||||
beq no_hand_left
|
||||
|
||||
; left==0
|
||||
; lda DIRECTION ; if facing right, turn to face left
|
||||
; bne left_going_right
|
||||
dec HAND_X
|
||||
dec HAND_X
|
||||
|
||||
no_hand_left:
|
||||
jmp done_keypress
|
||||
|
||||
|
||||
|
@ -431,6 +461,15 @@ check_right:
|
|||
;===================
|
||||
;===================
|
||||
right_pressed:
|
||||
lda HAND_X
|
||||
cmp #12
|
||||
beq no_hand_right
|
||||
|
||||
inc HAND_X
|
||||
inc HAND_X
|
||||
|
||||
no_hand_right:
|
||||
|
||||
jmp done_keypress
|
||||
|
||||
|
||||
|
@ -451,7 +490,16 @@ check_up:
|
|||
;==========================
|
||||
;==========================
|
||||
up:
|
||||
lda HAND_Y
|
||||
cmp #6
|
||||
beq no_hand_up
|
||||
|
||||
dec HAND_Y
|
||||
dec HAND_Y
|
||||
dec HAND_Y
|
||||
dec HAND_Y
|
||||
|
||||
no_hand_up:
|
||||
jmp done_keypress
|
||||
|
||||
|
||||
|
@ -468,6 +516,15 @@ check_down:
|
|||
;==========================
|
||||
;==========================
|
||||
down:
|
||||
lda HAND_Y
|
||||
cmp #14
|
||||
beq no_hand_up
|
||||
|
||||
inc HAND_Y
|
||||
inc HAND_Y
|
||||
inc HAND_Y
|
||||
inc HAND_Y
|
||||
|
||||
jmp done_keypress
|
||||
|
||||
|
||||
|
@ -477,13 +534,29 @@ down:
|
|||
check_space:
|
||||
cmp #' '
|
||||
beq space
|
||||
; cmp #$15 ; ascii 21=??
|
||||
jmp unknown
|
||||
cmp #$D ; enter
|
||||
bne unknown
|
||||
|
||||
;======================
|
||||
; SPACE -- Keypress, also look for enter?
|
||||
;======================
|
||||
space:
|
||||
lda #5
|
||||
sta BUTTON_PRESS
|
||||
|
||||
lda HAND_X
|
||||
cmp #4
|
||||
bne no_eject
|
||||
|
||||
lda HAND_Y
|
||||
cmp #10
|
||||
bne no_eject
|
||||
|
||||
lda #$01 ; done, set so we exit
|
||||
sta GAME_OVER
|
||||
|
||||
no_eject:
|
||||
jmp done_keypress
|
||||
|
||||
unknown:
|
||||
done_keypress:
|
||||
|
@ -600,7 +673,8 @@ tank_intro_sequence:
|
|||
.byte 128+2 ; .word entering10_lzsa ; (2)
|
||||
.byte 128+2 ; .word entering11_lzsa ; (2)
|
||||
.byte 128+2 ; .word entering12_lzsa ; (2)
|
||||
.byte 128+32 ; .word entering13_lzsa ; (16) pause a bit
|
||||
.byte 128+2 ; .word entering13_lzsa ; (2)
|
||||
.byte 128+32 ; .word blank_lzsa ; (16) pause a bit
|
||||
.byte 255 ; load to bg
|
||||
.word arena_next_bg_lzsa ; this
|
||||
.byte 128+28 ; .word arena_next01_lzsa ; (14)
|
||||
|
@ -630,5 +704,48 @@ tank_intro_sequence:
|
|||
.byte 128+14 ; .word arena_next25_lzsa ; (7)
|
||||
.byte 128+14 ; .word arena_next26_lzsa ; (7)
|
||||
.byte 128+14 ; .word arena_next27_lzsa ; (7)
|
||||
|
||||
.byte 0 ; ending
|
||||
|
||||
|
||||
eject_sequence:
|
||||
.byte 255 ; load to bg
|
||||
.word arena_main_bg_lzsa ; this
|
||||
.byte 6
|
||||
.word eject01_lzsa ; (3)
|
||||
.byte 128+6 ; .word eject02_lzsa ; (3)
|
||||
.byte 128+10 ; .word eject03_lzsa ; (5)
|
||||
.byte 128+4 ; .word eject04_lzsa ; (2)
|
||||
.byte 128+6 ; .word eject05_lzsa ; (3)
|
||||
.byte 128+12 ; .word eject06_lzsa ; (6)
|
||||
.byte 128+4 ; .word eject07_lzsa ; (2)
|
||||
.byte 128+10 ; .word eject08_lzsa ; (5)
|
||||
.byte 128+4 ; .word eject09_lzsa ; (2)
|
||||
.byte 128+6 ; .word eject10_lzsa ; (3)
|
||||
.byte 255 ; load to bg
|
||||
.word sky_bg_lzsa ; this
|
||||
.byte 128+8 ; .word sky01_lzsa ; (4)
|
||||
.byte 128+10 ; .word sky02_lzsa ; (5)
|
||||
.byte 128+20 ; .word sky03_lzsa ; (10)
|
||||
.byte 128+16 ; .word sky04_lzsa ; (8)
|
||||
.byte 128+12 ; .word sky05_lzsa ; (6)
|
||||
.byte 20
|
||||
.word blank_lzsa ; (10)
|
||||
.byte 0
|
||||
|
||||
|
||||
|
||||
hand_sprite:
|
||||
.byte 3,4
|
||||
.byte $AA,$bA,$AA
|
||||
.byte $AA,$bb,$AA
|
||||
.byte $bb,$bb,$bA
|
||||
.byte $bb,$bb,$bb
|
||||
|
||||
hand_press_sprite:
|
||||
.byte 3,4
|
||||
.byte $AA,$bb,$AA
|
||||
.byte $bA,$bb,$AA
|
||||
.byte $bb,$bb,$bb
|
||||
.byte $bb,$bb,$bb
|
||||
|
||||
|
||||
|
|
|
@ -229,6 +229,7 @@ BUBBLES_Y = $EB ; C1 underwater
|
|||
BEFORE_SWING = $EB ; C1
|
||||
SHOOTING_BOTTOM = $EB ; C2 cage
|
||||
CART_OUT = $EB ; C2 jail
|
||||
BUTTON_PRESS = $EB ; c14 arena
|
||||
|
||||
CUTFRAME = $EC
|
||||
DISP_PAGE = $ED ; ALL
|
||||
|
@ -237,9 +238,11 @@ OFFSET = $EF
|
|||
|
||||
INTRO_LOOPL = $F0 ; INTRO
|
||||
PHYSICIST_X = $F0 ; ALL
|
||||
HAND_X = $F0 ; C14
|
||||
|
||||
INTRO_LOOPH = $F1 ; INTRO
|
||||
PHYSICIST_Y = $F1 ; ALL
|
||||
HAND_Y = $F1 ; C14
|
||||
|
||||
SPRITETEMP = $F2 ; ALL
|
||||
XPOS = $F3 ; ALL
|
||||
|
|