ootw: c2: can walk around all rooms now

This commit is contained in:
Vince Weaver 2019-07-11 15:21:11 -04:00
parent e17f3b6c02
commit 15e9e4e81c
7 changed files with 207 additions and 50 deletions

View File

@ -60,22 +60,14 @@ c2_new_room:
sta GAME_OVER
lda WHICH_JAIL
cmp #4
cmp #7
bcs elevator_room ; bge
jail_room:
jsr ootw_jail
jmp c2_check_done
elevator_room:
cmp #8
bcs multilevel_room ; bge
jsr ootw_elevator
jmp c2_check_done
multilevel_room:
; FIXME
c2_check_done:
lda GAME_OVER

View File

@ -25,12 +25,12 @@ ootw_elevator:
;==============================
; setup per-room variables
check_elevator4:
check_elevator7:
lda WHICH_JAIL
cmp #4
bne check_elevator5
cmp #7
bne check_elevator8
elevator4:
elevator7:
lda #(-4+128)
sta LEFT_LIMIT
lda #(21+128)
@ -41,11 +41,11 @@ elevator4:
sta eel_smc+1
; set up exit
lda #7
lda #10
sta going_up_smc+1
; set down exit
lda #5
lda #8
sta going_down_smc+1
lda #48
@ -53,25 +53,25 @@ elevator4:
jmp elevator_setup_done
check_elevator5:
cmp #5
bne check_elevator6
elevator5:
check_elevator8:
cmp #8
bne check_elevator9
elevator8:
lda #(-4+128)
sta LEFT_LIMIT
lda #(21+128)
sta RIGHT_LIMIT
; set left exit
lda #9
lda #4
sta eel_smc+1
; set up exit
lda #4
lda #7
sta going_up_smc+1
; set down exit
lda #6
lda #9
sta going_down_smc+1
lda #96
@ -80,22 +80,22 @@ elevator5:
jmp elevator_setup_done
check_elevator6:
cmp #6
bne elevator7
check_elevator9:
cmp #9
bne elevator10
elevator6:
elevator9:
lda #(-4+128)
sta LEFT_LIMIT
lda #(21+128)
sta RIGHT_LIMIT
; set left exit
lda #8
lda #6
sta eel_smc+1
; set up exit
lda #5
lda #8
sta going_up_smc+1
; no down exit
@ -105,7 +105,7 @@ elevator6:
jmp elevator_setup_done
elevator7:
elevator10:
lda #(10+128)
sta LEFT_LIMIT
@ -116,7 +116,7 @@ elevator7:
; no up exit
; set down exit
lda #4
lda #7
sta going_down_smc+1
lda #0

View File

@ -2,6 +2,12 @@
ootw_jail:
;==============================
; init
lda #0
sta ON_ELEVATOR
;==============================
; setup per-room variables
@ -29,15 +35,10 @@ jail0:
lda #>(cage_fell_rle)
sta GBASH
lda #<(cage_fell_rle)
sta GBASL
lda #$c ; load to page $c00
jsr load_rle_gr ; tail call
jmp jail_setup_done
jail1:
lda WHICH_JAIL
cmp #1
bne jail2
@ -61,14 +62,10 @@ jail1:
lda #>(jail2_rle)
sta GBASH
lda #<(jail2_rle)
sta GBASL
lda #$c ; load to page $c00
jsr load_rle_gr ; tail call
jmp jail_setup_done
jail2:
lda WHICH_JAIL
cmp #2
bne jail3
@ -89,13 +86,66 @@ jail2:
lda #>(jail3_rle)
sta GBASH
lda #<(jail3_rle)
sta GBASL
lda #$c ; load to page $c00
jsr load_rle_gr ; tail call
jmp jail_setup_done
jail3:
cmp #3
bne jail4
lda #(-4+128)
sta LEFT_LIMIT
lda #(39+128)
sta RIGHT_LIMIT
; set right exit
lda #7
sta jer_smc+1
; set left exit
lda #2
sta jel_smc+1
lda #30
sta PHYSICIST_Y
; load background
lda #>(jail4_rle)
sta GBASH
lda #<(jail4_rle)
jmp jail_setup_done
jail4:
cmp #4
bne jail5
lda #(-4+128)
sta LEFT_LIMIT
lda #(39+128)
sta RIGHT_LIMIT
; set right exit
lda #8
sta jer_smc+1
; set left exit
lda #5
sta jel_smc+1
lda #30
sta PHYSICIST_Y
; load background
lda #>(room_b4_rle)
sta GBASH
lda #<(room_b4_rle)
jmp jail_setup_done
jail5:
cmp #5
bne jail6
lda #(-4+128)
sta LEFT_LIMIT
@ -106,21 +156,45 @@ jail3:
lda #4
sta jer_smc+1
; set left exit
lda #2
sta jel_smc+1
lda #30
sta PHYSICIST_Y
; load background
lda #>(jail4_rle)
lda #>(room_b3_rle)
sta GBASH
lda #<(jail4_rle)
lda #<(room_b3_rle)
jmp jail_setup_done
jail6:
lda #(-4+128)
sta LEFT_LIMIT
lda #(39+128)
sta RIGHT_LIMIT
; set right exit
lda #9
sta jer_smc+1
lda #20
sta PHYSICIST_Y
; load background
lda #>(room_b2_rle)
sta GBASH
lda #<(room_b2_rle)
jmp jail_setup_done
jail_setup_done:
sta GBASL
lda #$c ; load to page $c00
jsr load_rle_gr ; tail call
jail_setup_done:
ootw_jail_already_set:
;===========================
; Enable graphics

View File

@ -8,12 +8,16 @@ 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
ootw_c2_cage_fell.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
$(PNG2RLE) asm dome.png dome_rle >> ootw_c2_jail.inc
$(PNG2RLE) asm room_b2.png room_b2_rle >> ootw_c2_jail.inc
$(PNG2RLE) asm room_b3.png room_b3_rle >> ootw_c2_jail.inc
$(PNG2RLE) asm room_b4.png room_b4_rle >> ootw_c2_jail.inc
#####

View File

@ -263,3 +263,90 @@ dome_rle: .byte $28 ; ysize=48
.byte $A0,$20,$88, $A8,$00, $A0,$20,$88, $A8,$00, $A0,$20,$88, $A8,$00, $A0,$20,$88
.byte $A8,$00, $A0,$20,$88, $A8,$00, $AF,$88
.byte $A1
room_b2_rle: .byte $28 ; ysize=48
.byte $A0,$14,$88, $67, $A0,$27,$88, $77, $A0,$27,$88, $76, $A0,$27,$88
.byte $67, $A0,$27,$88, $77, $A0,$27,$88, $76, $A0,$27,$88, $67
.byte $A0,$23,$88, $A4,$08, $07, $A0,$13,$08, $A0,$10,$88, $00,$00, $55
.byte $25, $55, $27, $2E, $2F, $2E, $67
.byte $25,$25, $55, $27, $2E, $2F, $2E, $27
.byte $65, $25, $27, $2E, $2F, $2E, $A0,$10,$88
.byte $00,$00, $55, $22, $55, $A4,$22, $66, $22,$22
.byte $55, $A5,$22, $66, $A5,$22, $A0,$10,$88, $00,$00, $55
.byte $22, $55, $A4,$22, $66, $22,$22, $55, $A5,$22
.byte $66, $A5,$22, $A0,$10,$88, $00,$00, $55, $22, $55
.byte $A4,$22, $66, $22,$22, $55, $A5,$22, $66, $A5,$22
.byte $AF,$88, $08, $00,$00, $55, $22, $55, $A4,$25
.byte $66, $22,$22, $55, $A5,$22, $66, $A5,$22, $AF,$88
.byte $A3,$00, $55, $22, $55, $A4,$22, $66, $22,$22
.byte $55, $A5,$22, $66, $A5,$22, $AF,$88, $A3,$00, $66
.byte $22, $55, $A4,$22, $66, $22,$22, $55, $A5,$22
.byte $66, $A5,$22, $AF,$88, $A3,$00, $66, $22, $55
.byte $A4,$22, $66, $22,$22, $55, $A5,$22, $66, $A5,$22
.byte $AF,$88, $A3,$00, $66, $22, $55, $A4,$22, $66
.byte $22,$22, $55, $A5,$22, $66, $A5,$22, $AF,$88, $A3,$00
.byte $A3,$05, $A5,$06, $A3,$05, $A4,$06, $A3,$05, $A4,$06, $AF,$88
.byte $A0,$19,$00, $A0,$C8,$88
.byte $A1
room_b3_rle: .byte $28 ; ysize=48
.byte $AE,$00, $80, $AA,$88, $A3,$00, $AC,$88, $AC,$00, $80
.byte $AC,$88, $A3,$00, $AC,$88, $A0,$26,$00, $88,$88, $22,$22, $55
.byte $A3,$22, $00, $A0,$13,$22, $00, $A9,$22, $00,$00, $88,$88
.byte $22,$22, $55, $A3,$22, $00, $A0,$13,$22, $00, $A9,$22
.byte $00,$00, $88,$88, $22,$22, $55, $22, $02, $22
.byte $00, $A0,$13,$22, $00, $A9,$22, $00,$00, $88,$88, $22,$22
.byte $25,$25, $00, $22, $00, $A0,$13,$22, $00, $A9,$22
.byte $00,$00, $88,$88, $A4,$22, $55, $22, $00, $A0,$13,$22
.byte $00, $A8,$22, $02, $00,$00, $88,$88, $55, $A3,$22
.byte $55, $22, $00, $A0,$13,$22, $00, $A8,$22, $A3,$00
.byte $88,$88, $55, $A3,$22, $55, $22, $00, $A0,$13,$22
.byte $00, $A8,$22, $A3,$00, $88,$88, $55, $A3,$22, $55
.byte $22, $00, $22, $52, $A0,$11,$22, $00, $A8,$22
.byte $A3,$00, $88,$88, $65,$65, $62,$62, $65, $62, $60
.byte $65,$65, $A4,$62, $65, $A4,$62, $A3,$F2, $A5,$62, $60
.byte $A4,$62, $02, $A3,$22, $A3,$00, $88,$88, $A4,$00, $20
.byte $02, $AE,$00, $05, $AA,$00, $02, $22,$22, $20
.byte $A3,$00, $88,$88, $AD,$00, $80, $AF,$88, $00,$00, $02
.byte $22,$22, $20, $A0,$10,$00, $80, $A0,$11,$88, $00,$00, $A3,$22
.byte $A6,$20, $AA,$80, $A0,$13,$88, $00,$00, $A9,$22, $A0,$1D,$88, $00,$00
.byte $A9,$22, $A0,$1D,$88, $00,$00, $A9,$22, $A0,$1D,$88, $00,$00, $A9,$22
.byte $A0,$1D,$88, $00,$00, $A9,$22, $A0,$1D,$88, $00,$00, $A9,$22, $A0,$1D,$88
.byte $00,$00, $A9,$22, $A0,$1D,$88, $00,$00, $A9,$22, $A0,$1D,$88, $00,$00
.byte $A9,$05
.byte $A1
room_b4_rle: .byte $28 ; ysize=48
.byte $A0,$59,$88, $A0,$1F,$00, $A9,$88, $00, $65, $A3,$25, $27
.byte $2E, $2F, $2E, $27, $A4,$25, $A3,$55, $A6,$25
.byte $05, $A7,$25, $A9,$88, $00, $66, $AD,$22, $55
.byte $A7,$22, $00, $A7,$22, $A9,$88, $00, $66, $AD,$22
.byte $55, $A7,$22, $00, $A7,$22, $A9,$88, $00, $66
.byte $AD,$22, $55, $A7,$22, $00, $A7,$22, $A8,$88, $00,$00
.byte $66, $A0,$15,$22, $00, $A7,$22, $A8,$88, $00,$00, $66
.byte $A0,$15,$22, $00, $A7,$22, $A8,$88, $00,$00, $66, $A6,$22
.byte $52, $AE,$22, $00, $A7,$22, $A8,$88, $00,$00, $66
.byte $A6,$22, $55, $AE,$22, $00, $A7,$22, $A8,$88, $00,$00
.byte $66, $A4,$22, $62,$62, $55, $A6,$62, $52, $A7,$62
.byte $00, $A7,$62, $A6,$88, $A5,$00, $20, $22,$22, $02
.byte $A0,$24,$00, $20, $22,$22, $02, $A0,$19,$00, $A3,$25, $2E
.byte $2F, $2E, $25, $55, $A3,$25, $A7,$22, $00
.byte $22, $00, $22, $00, $AA,$22, $55, $00,$00
.byte $A4,$88, $A7,$22, $55, $AA,$22, $00, $22, $00
.byte $22, $00, $22,$22, $A3,$00, $20, $00, $22
.byte $02, $22, $55, $00,$00, $A4,$88, $A7,$22, $25
.byte $AA,$22, $00, $22, $00, $22, $00, $22,$22
.byte $A3,$00, $22, $00, $22, $20, $22, $55
.byte $00,$00, $A4,$88, $A0,$12,$22, $00, $22, $00, $22
.byte $00, $22,$22, $A3,$00, $22, $00, $A3,$22, $55
.byte $00,$00, $A4,$88, $A3,$22, $02, $AE,$22, $00, $22
.byte $00, $22, $00, $22,$22, $A3,$00, $22, $00
.byte $A3,$22, $55, $00,$00, $A4,$88, $22,$22, $02, $20
.byte $22, $20, $22,$22, $20, $A9,$22, $00, $22
.byte $00, $22, $00, $22,$22, $A3,$00, $22, $00
.byte $A3,$22, $55, $00,$00, $A4,$88, $A4,$22, $20, $22,$22
.byte $20, $AA,$22, $00, $22, $00, $22, $00
.byte $22,$22, $A3,$00, $22, $00, $A3,$22, $55, $A3,$00
.byte $A3,$88, $A0,$12,$22, $00, $22, $00, $22, $00
.byte $22,$22, $A3,$00, $22, $00, $A3,$22, $66, $A3,$00
.byte $A3,$88, $50, $52, $A0,$10,$62, $00, $62, $00
.byte $62, $00, $62,$62, $A3,$60, $62, $60, $A3,$62
.byte $66, $A3,$00, $A3,$88, $A0,$22,$06, $A3,$00, $A3,$88
.byte $A1

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B