diff --git a/ootw/TODO b/ootw/TODO index f75bc354..bf792894 100644 --- a/ootw/TODO +++ b/ootw/TODO @@ -73,6 +73,7 @@ Level/Checkpoint #2: * Elevator: + Elevator can change direction mid-floor + + Elevator should shoot sparks every 20 frames or so * View: + music play when viewing city diff --git a/ootw/ootw_c2.s b/ootw/ootw_c2.s index d9ac5513..053df36b 100644 --- a/ootw/ootw_c2.s +++ b/ootw/ootw_c2.s @@ -13,16 +13,6 @@ ootw_c2: lda #0 sta GAME_OVER - sta PHYSICIST_STATE - sta ON_ELEVATOR - - lda #22 - sta PHYSICIST_Y - lda #20 - sta PHYSICIST_X - - lda #1 - sta DIRECTION ;======================= ; Run the intro @@ -43,15 +33,7 @@ ootw_c2: ; Start Level After Cage ;======================= - lda #1 - sta DIRECTION - lda #22 - sta PHYSICIST_Y - lda #26 - sta PHYSICIST_X - lda #0 - sta PHYSICIST_STATE - sta WHICH_JAIL + jsr ootw_jail_init ;========================= ; c2_new_room diff --git a/ootw/ootw_c2_cage.s b/ootw/ootw_c2_cage.s index ac806fb3..b5567fd1 100644 --- a/ootw/ootw_c2_cage.s +++ b/ootw/ootw_c2_cage.s @@ -719,6 +719,10 @@ little_guy_out2_sprite: ; Cage Ending ;============================ cage_ending: + lda #0 + sta FRAMEL + +cage_ending_loop: ;================================ ; copy background to current page @@ -726,7 +730,6 @@ cage_ending: jsr gr_copy_to_current - ;======================= ; draw miners mining ;======================= @@ -737,11 +740,21 @@ cage_ending: ; draw cage (if applicable) ;========================== - lda #11 - sta XPOS - lda #0 + lda FRAMEL + cmp #10 + bcs done_cage_endcage ; bge + + lda FRAMEL + asl + clc + adc #6 + +cage_set_ypos: sta YPOS + lda #18 + sta XPOS + lda #cage_center_sprite @@ -749,6 +762,26 @@ cage_ending: jsr put_sprite_crop +done_cage_endcage: + + ;========================== + ; draw little dude + ;========================== + + lda #27 + sta XPOS + + lda #34 + sta YPOS + + lda #little_guy_in_sprite + sta INH + + jsr put_sprite_crop + + ;====================== ; draw laser ;====================== @@ -759,33 +792,45 @@ cage_ending: ; draw guard (if applicable) ;=========================== - lda #34 + lda FRAMEL + cmp #10 + bcs done_guard_endcage ; bge + + lda #22 sta XPOS lda #28 - sta YPOS + sta YPOS - lda changing_guard_sprites,Y - sta INL - lda changing_guard_sprites+1,Y - sta INH + lda #alien_shooting_up_sprite + sta INH - jsr put_sprite_crop + jsr put_sprite_crop +done_guard_endcage: ;=============== ; page flip jsr page_flip + + ;================ + ; delay + + lda #200 + jsr WAIT + + ;================ ; inc frame count inc FRAMEL - bne end_cage_frame_no_oflo - inc FRAMEH -end_cage_frame_no_oflo: + bmi done_cage_end + jmp cage_ending_loop done_cage_end: diff --git a/ootw/ootw_c2_jail.s b/ootw/ootw_c2_jail.s index fc869f78..8802ddf9 100644 --- a/ootw/ootw_c2_jail.s +++ b/ootw/ootw_c2_jail.s @@ -1,17 +1,15 @@ ; Ootw Checkpoint2 -- Running around the Jail -ootw_jail: - - ;============================== - ; init + ; call once before entering jail for first time +ootw_jail_init: lda #0 - sta ON_ELEVATOR - sta TELEPORTING sta CITY_MOVIE_SEEN sta CART_OUT sta DUDE_OUT sta friend_direction + sta PHYSICIST_STATE + sta WHICH_JAIL lda #1 sta JAIL_POWER_ON @@ -23,6 +21,30 @@ ootw_jail: lda #$FA sta CART_X + lda #25 + sta PHYSICIST_X + lda #30 + sta PHYSICIST_Y + + lda #1 + sta DIRECTION + + rts + + + ;=========================== + ; enter new room in jail + ;=========================== + +ootw_jail: + + ;============================== + ; each room init + + lda #0 + sta ON_ELEVATOR + sta TELEPORTING + ;============================== ; setup per-room variables @@ -30,7 +52,7 @@ ootw_jail: bne jail1 jail0: - lda #(18+128) + lda #(24+128) sta LEFT_LIMIT lda #(39+128) sta RIGHT_LIMIT @@ -43,7 +65,7 @@ jail0: lda #0 sta jel_smc+1 - lda #22 + lda #30 sta PHYSICIST_Y ; load background @@ -274,8 +296,8 @@ ootw_jail_already_set: ;================================= ; copy to screen - jsr gr_copy_to_current - jsr page_flip +; jsr gr_copy_to_current +; jsr page_flip ;================================= ; setup vars @@ -284,9 +306,11 @@ ootw_jail_already_set: sta GAIT sta GAME_OVER + ;============================ ;============================ ; Jail Loop ;============================ + ;============================ jail_loop: ;================================ @@ -298,6 +322,17 @@ jail_loop: ; draw background action lda WHICH_JAIL + +bg_jail0: + ; Jail #0, draw miners + + cmp #0 + bne bg_jail6 + jsr ootw_draw_miners + +bg_jail6: + ; Jail #6, draw power animation + cmp #6 bne c2_no_bg_action diff --git a/ootw/ootw_graphics/l2cage/Makefile b/ootw/ootw_graphics/l2cage/Makefile index 52b3409b..f27d5c38 100644 --- a/ootw/ootw_graphics/l2cage/Makefile +++ b/ootw/ootw_graphics/l2cage/Makefile @@ -8,8 +8,9 @@ all: ootw_c2_cage.inc ##### ootw_c2_cage.inc: $(PNG2RLE) \ - ootw_c2_nocage.png - $(PNG2RLE) asm ootw_c2_nocage.png cage_rle > ootw_c2_cage.inc + ootw_c2_nocage.png ootw_c2_cage_fell.png + $(PNG2RLE) asm ootw_c2_cage_fell.png cage_fell_rle > ootw_c2_cage.inc + $(PNG2RLE) asm ootw_c2_nocage.png cage_rle >> ootw_c2_cage.inc ##### diff --git a/ootw/ootw_graphics/l2cage/ootw_c2_cage.inc b/ootw/ootw_graphics/l2cage/ootw_c2_cage.inc index c2eac2b2..dcfafe5c 100644 --- a/ootw/ootw_graphics/l2cage/ootw_c2_cage.inc +++ b/ootw/ootw_graphics/l2cage/ootw_c2_cage.inc @@ -1,3 +1,62 @@ +cage_fell_rle: .byte $28 ; ysize=48 + .byte $A5,$22, $A4,$00, $20, $62,$62, $20, $00,$00, $20 + .byte $02, $00,$00, $20,$20, $22, $20, $00, $22 + .byte $20, $00, $22, $00, $55, $22, $66,$66 + .byte $A5,$88, $A6,$22, $A5,$00, $A3,$22, $62, $00, $A3,$20 + .byte $00,$00, $06, $66,$66, $22, $20, $66,$66, $A3,$00 + .byte $55, $22, $66,$66, $A6,$88, $A5,$22, $A3,$00, $22 + .byte $00,$00, $02,$02, $00,$00, $22,$22, $66,$66, $22,$22, $00 + .byte $A4,$02, $A4,$00, $55, $22, $66,$66, $A6,$88, $A4,$22 + .byte $A6,$00, $20, $A3,$22, $26, $62,$62, $66,$66, $26 + .byte $22, $A9,$00, $55, $22, $66,$66, $A6,$88, $A4,$22 + .byte $A5,$00, $20, $62, $22, $62, $22,$22, $62 + .byte $A3,$66, $22, $02, $22, $A8,$00, $55, $22 + .byte $66,$66, $A6,$88, $A3,$22, $A6,$00, $02, $26,$26, $66 + .byte $22, $A5,$66, $22, $00, $02, $20, $A7,$00 + .byte $55, $22, $66,$66, $88,$88, $65, $A3,$88, $22,$22 + .byte $02, $A7,$00, $22,$22, $66,$66, $22, $A4,$66, $22 + .byte $20,$20, $22, $A4,$00, $02, $00,$00, $55, $22 + .byte $66,$66, $A6,$88, $22,$22, $A8,$00, $22, $A8,$66, $A4,$22 + .byte $00,$00, $22, $A4,$00, $55, $22, $66,$66, $A7,$88 + .byte $02, $A9,$00, $22, $26, $62, $A5,$66, $22 + .byte $66, $26, $02, $00,$00, $02, $A4,$00, $55 + .byte $22, $66,$66, $A7,$88, $AA,$00, $22, $26, $66 + .byte $62, $66, $26, $66, $22,$22, $66, $02 + .byte $A6,$00, $22, $00, $55, $22, $66,$66, $A7,$88 + .byte $AA,$00, $22,$22, $66,$66, $26, $22, $66, $62 + .byte $66,$66, $20, $A8,$00, $55, $22, $66,$66, $A7,$88 + .byte $AB,$00, $22,$22, $26, $A3,$66, $26, $66,$66, $22 + .byte $00, $20, $A3,$00, $22, $00,$00, $55, $22 + .byte $66,$66, $A7,$88, $AC,$00, $22, $02, $26,$26, $22 + .byte $02,$02, $22, $62, $22, $62, $00,$00, $22 + .byte $20, $00,$00, $55, $22, $66,$66, $A7,$88, $A9,$00 + .byte $22,$22, $A3,$00, $A3,$22, $00,$00, $02, $66, $62 + .byte $66, $00,$00, $22, $66, $00,$00, $55, $22 + .byte $66,$66, $88, $C8, $88, $C8, $88, $18 + .byte $88, $A9,$00, $02,$02, $AA,$00, $02, $22, $A3,$00 + .byte $02, $00,$00, $55, $22, $66,$66, $A7,$88, $AB,$00 + .byte $20, $00,$00, $62, $66, $AD,$00, $55, $22 + .byte $66,$66, $A7,$88, $A7,$00, $20,$20, $22, $00, $22,$22 + .byte $20, $66,$66, $22,$22, $55, $A3,$00, $55, $A3,$00 + .byte $55, $00,$00, $22,$22, $66,$66, $A7,$88, $A7,$00, $22 + .byte $66, $26, $00, $22, $26, $22, $26 + .byte $A4,$22, $55, $00,$00, $55, $00,$00, $55, $A3,$00 + .byte $22,$22, $66,$66, $A7,$88, $A7,$00, $22, $66,$66, $00 + .byte $02, $62, $66,$66, $26, $22,$22, $00, $55 + .byte $00,$00, $55, $00,$00, $55, $A3,$00, $22,$22, $66,$66 + .byte $A7,$88, $A5,$00, $22, $00, $02,$02, $06, $00 + .byte $22,$22, $26,$26, $22, $02, $00,$00, $55, $00,$00 + .byte $55, $00,$00, $55, $A3,$00, $22,$22, $66,$66, $A7,$88 + .byte $AB,$00, $22, $02, $A6,$00, $55, $00,$00, $55 + .byte $00,$00, $55, $A3,$00, $22,$22, $66,$66, $A7,$88, $A0,$13,$00 + .byte $85, $80, $08, $18, $08,$08, $76,$76, $A4,$26 + .byte $66,$66, $A7,$88, $60,$60, $A0,$11,$00, $77,$77, $00, $11 + .byte $00, $70, $07, $77, $A3,$62, $02,$02, $00 + .byte $A7,$68, $26, $A0,$11,$00, $06, $56, $06, $56 + .byte $06, $56, $77, $56, $06, $56, $26 + .byte $56, $06, $56, $06, $56, $06, $56 + .byte $06, $56, $06, $56 + .byte $A1 cage_rle: .byte $28 ; ysize=48 .byte $A5,$22, $A4,$00, $20, $62,$62, $20, $00,$00, $20 .byte $02, $00,$00, $20,$20, $22, $20, $00, $22 diff --git a/ootw/ootw_graphics/l2cage/ootw_c2_cage.png b/ootw/ootw_graphics/l2cage/ootw_c2_cage.png deleted file mode 100644 index 8a04ecfd..00000000 Binary files a/ootw/ootw_graphics/l2cage/ootw_c2_cage.png and /dev/null differ diff --git a/ootw/ootw_graphics/l2cage/ootw_c2_cage_fell.png b/ootw/ootw_graphics/l2cage/ootw_c2_cage_fell.png new file mode 100644 index 00000000..330e7413 Binary files /dev/null and b/ootw/ootw_graphics/l2cage/ootw_c2_cage_fell.png differ diff --git a/ootw/ootw_graphics/l2jail/Makefile b/ootw/ootw_graphics/l2jail/Makefile index a05678e3..d63f6ab4 100644 --- a/ootw/ootw_graphics/l2jail/Makefile +++ b/ootw/ootw_graphics/l2jail/Makefile @@ -8,9 +8,8 @@ all: ootw_c2_jail.inc ##### ootw_c2_jail.inc: $(PNG2RLE) \ - ootw_c2_cage_fell.png jail2_bg.png jail3_bg.png jail4_bg.png dome.png \ + jail2_bg.png jail3_bg.png jail4_bg.png dome.png \ room_b2.png room_b3.png room_b4.png - $(PNG2RLE) asm ootw_c2_cage_fell.png cage_fell_rle > ootw_c2_jail.inc $(PNG2RLE) asm jail2_bg.png jail2_rle >> ootw_c2_jail.inc $(PNG2RLE) asm jail3_bg.png jail3_rle >> ootw_c2_jail.inc $(PNG2RLE) asm jail4_bg.png jail4_rle >> ootw_c2_jail.inc diff --git a/ootw/ootw_graphics/l2jail/ootw_c2_cage_fell.png b/ootw/ootw_graphics/l2jail/ootw_c2_cage_fell.png deleted file mode 100644 index ed0f9680..00000000 Binary files a/ootw/ootw_graphics/l2jail/ootw_c2_cage_fell.png and /dev/null differ diff --git a/ootw/ootw_graphics/l2jail/ootw_c2_jail.inc b/ootw/ootw_graphics/l2jail/ootw_c2_jail.inc index f25b1e17..2bccc6fd 100644 --- a/ootw/ootw_graphics/l2jail/ootw_c2_jail.inc +++ b/ootw/ootw_graphics/l2jail/ootw_c2_jail.inc @@ -1,51 +1,3 @@ -cage_fell_rle: .byte $28 ; ysize=48 - .byte $A4,$22, $A5,$00, $22,$22, $02, $A7,$00, $22, $00 - .byte $20,$20, $00, $20, $22, $00,$00, $66, $55 - .byte $22, $66,$66, $A5,$88, $A5,$22, $02, $A3,$00, $22,$22 - .byte $00, $02, $A5,$00, $22,$22, $A3,$00, $22,$22, $00 - .byte $02, $A3,$00, $66, $55, $22, $66,$66, $A6,$88 - .byte $A4,$22, $00, $20, $A5,$00, $20,$20, $00, $02 - .byte $22, $20, $22,$22, $AA,$00, $66, $55, $22 - .byte $66,$66, $A6,$88, $A3,$22, $00,$00, $02, $AB,$00, $22,$22 - .byte $02,$02, $22, $A7,$00, $66, $55, $22, $66,$66 - .byte $A6,$88, $A3,$22, $AE,$00, $22,$22, $00,$00, $02, $A7,$00 - .byte $66, $55, $22, $66,$66, $A6,$88, $22,$22, $AF,$00 - .byte $22,$22, $AA,$00, $66, $55, $22, $66,$66, $88,$88 - .byte $65, $A3,$88, $22,$22, $AF,$00, $22,$22, $00, $02 - .byte $20, $A3,$00, $22, $A3,$00, $66, $55, $22 - .byte $66,$66, $A6,$88, $22, $02, $AF,$00, $22,$22, $02 - .byte $22, $02, $A7,$00, $66, $55, $22, $66,$66 - .byte $A7,$88, $A0,$10,$00, $22, $00,$00, $02, $A7,$00, $20 - .byte $66, $55, $22, $66,$66, $A7,$88, $A0,$10,$00, $22 - .byte $50, $52, $22, $A7,$00, $02, $66, $55 - .byte $22, $66,$66, $A7,$88, $AE,$00, $50, $00, $02 - .byte $05,$05, $02, $00,$00, $20,$20, $00,$00, $22, $00 - .byte $66, $55, $22, $66,$66, $A7,$88, $AE,$00, $55 - .byte $A7,$00, $02,$02, $A4,$00, $55,$55, $22, $66,$66, $A7,$88 - .byte $A8,$00, $20, $22, $A4,$00, $05, $00, $22 - .byte $00,$00, $22, $00, $22, $00, $22, $00 - .byte $22, $00,$00, $55,$55, $22, $66,$66, $A7,$88, $A7,$00 - .byte $22,$22, $55, $22, $00, $55, $00, $22,$22 - .byte $00, $22, $00, $22, $00, $22, $00 - .byte $22, $00, $22, $00,$00, $55,$55, $22, $66,$66 - .byte $A7,$88, $A5,$00, $20,$20, $02, $22, $55, $02 - .byte $00, $55, $A3,$22, $A3,$00, $22, $00, $22 - .byte $00, $22, $00, $22, $00,$00, $55,$55, $22 - .byte $66,$66, $A7,$88, $A5,$00, $02,$02, $A4,$00, $20,$20, $00 - .byte $02,$02, $A3,$00, $22, $00, $22, $00, $22 - .byte $00, $22, $00,$00, $55,$55, $22, $66,$66, $A7,$88 - .byte $AB,$00, $02,$02, $A6,$00, $22, $00, $22, $00 - .byte $22, $00, $22, $00,$00, $55,$55, $22, $66,$66 - .byte $A7,$88, $AC,$00, $22, $A6,$00, $02, $70, $72 - .byte $70, $02, $10, $72, $00, $77,$77, $25,$25 - .byte $66,$66, $A7,$88, $A3,$60, $AF,$00, $60, $00, $A3,$67 - .byte $60, $71, $67, $60, $67,$67, $62,$62, $66,$66 - .byte $A7,$68, $22, $00,$00, $20,$20, $A8,$00, $22,$22, $A4,$00 - .byte $55, $00, $55, $00, $55, $22, $52 - .byte $00, $55, $22, $52, $00, $55, $00 - .byte $55, $00, $55, $00, $55, $00, $55 - .byte $A0,$A0,$00 - .byte $A1 jail2_rle: .byte $28 ; ysize=48 .byte $A3,$22, $55, $A5,$22, $55, $22, $55, $00,$00 .byte $A0,$1A,$26, $A3,$22, $55, $A5,$22, $55, $22, $55