mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-15 05:31:34 +00:00
ootw: c2: can now go up and down in elevator (without effects)
This commit is contained in:
parent
44f183b72a
commit
fffd403296
@ -16,11 +16,6 @@ ootw_elevator:
|
|||||||
lda #1
|
lda #1
|
||||||
sta DISP_PAGE
|
sta DISP_PAGE
|
||||||
|
|
||||||
;=============================
|
|
||||||
; load background image
|
|
||||||
|
|
||||||
jsr elevator_load_background
|
|
||||||
|
|
||||||
;==============================
|
;==============================
|
||||||
; setup physicist
|
; setup physicist
|
||||||
|
|
||||||
@ -30,10 +25,10 @@ ootw_elevator:
|
|||||||
|
|
||||||
;==============================
|
;==============================
|
||||||
; setup per-room variables
|
; setup per-room variables
|
||||||
|
check_elevator4:
|
||||||
lda WHICH_JAIL
|
lda WHICH_JAIL
|
||||||
cmp #4
|
cmp #4
|
||||||
bne elevator5
|
bne check_elevator5
|
||||||
|
|
||||||
elevator4:
|
elevator4:
|
||||||
lda #(-4+128)
|
lda #(-4+128)
|
||||||
@ -53,13 +48,15 @@ elevator4:
|
|||||||
lda #5
|
lda #5
|
||||||
sta going_down_smc+1
|
sta going_down_smc+1
|
||||||
|
|
||||||
|
lda #48
|
||||||
|
sta ELEVATOR_OFFSET
|
||||||
|
|
||||||
jmp elevator_setup_done
|
jmp elevator_setup_done
|
||||||
|
|
||||||
elevator5:
|
check_elevator5:
|
||||||
cmp #5
|
cmp #5
|
||||||
bne elevator6
|
bne check_elevator6
|
||||||
|
elevator5:
|
||||||
lda #(-4+128)
|
lda #(-4+128)
|
||||||
sta LEFT_LIMIT
|
sta LEFT_LIMIT
|
||||||
lda #(21+128)
|
lda #(21+128)
|
||||||
@ -77,13 +74,17 @@ elevator5:
|
|||||||
lda #6
|
lda #6
|
||||||
sta going_down_smc+1
|
sta going_down_smc+1
|
||||||
|
|
||||||
|
lda #96
|
||||||
|
sta ELEVATOR_OFFSET
|
||||||
|
|
||||||
jmp elevator_setup_done
|
jmp elevator_setup_done
|
||||||
|
|
||||||
|
|
||||||
elevator6:
|
check_elevator6:
|
||||||
cmp #6
|
cmp #6
|
||||||
bne elevator7
|
bne elevator7
|
||||||
|
|
||||||
|
elevator6:
|
||||||
lda #(-4+128)
|
lda #(-4+128)
|
||||||
sta LEFT_LIMIT
|
sta LEFT_LIMIT
|
||||||
lda #(21+128)
|
lda #(21+128)
|
||||||
@ -99,6 +100,9 @@ elevator6:
|
|||||||
|
|
||||||
; no down exit
|
; no down exit
|
||||||
|
|
||||||
|
lda #144
|
||||||
|
sta ELEVATOR_OFFSET
|
||||||
|
|
||||||
jmp elevator_setup_done
|
jmp elevator_setup_done
|
||||||
|
|
||||||
elevator7:
|
elevator7:
|
||||||
@ -115,10 +119,18 @@ elevator7:
|
|||||||
lda #4
|
lda #4
|
||||||
sta going_down_smc+1
|
sta going_down_smc+1
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta ELEVATOR_OFFSET
|
||||||
|
|
||||||
; fallthrough
|
; fallthrough
|
||||||
|
|
||||||
elevator_setup_done:
|
elevator_setup_done:
|
||||||
|
|
||||||
|
;=============================
|
||||||
|
; load background image
|
||||||
|
|
||||||
|
jsr elevator_load_background
|
||||||
|
|
||||||
|
|
||||||
;=================================
|
;=================================
|
||||||
; copy to screen
|
; copy to screen
|
||||||
@ -320,9 +332,27 @@ done_elevator:
|
|||||||
|
|
||||||
elevator_load_background:
|
elevator_load_background:
|
||||||
|
|
||||||
|
lda ELEVATOR_OFFSET
|
||||||
|
cmp #24
|
||||||
|
bcs elevator_bg_no_dome
|
||||||
|
|
||||||
|
; load background
|
||||||
|
lda #>(dome_rle)
|
||||||
|
sta GBASH
|
||||||
|
lda #<(dome_rle)
|
||||||
|
sta GBASL
|
||||||
|
lda #$c ; load to page $c00
|
||||||
|
jsr load_rle_gr
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
elevator_bg_no_dome:
|
||||||
|
|
||||||
ldy #0
|
ldy #0
|
||||||
elevator_background_loop:
|
elevator_background_loop:
|
||||||
|
|
||||||
|
; self modify line we're on
|
||||||
|
|
||||||
lda gr_offsets_l,Y
|
lda gr_offsets_l,Y
|
||||||
sta line0_left_loop+1
|
sta line0_left_loop+1
|
||||||
sta line0_center_loop+1
|
sta line0_center_loop+1
|
||||||
@ -335,7 +365,26 @@ elevator_background_loop:
|
|||||||
sta line0_center_loop+2
|
sta line0_center_loop+2
|
||||||
sta line0_right_loop+2
|
sta line0_right_loop+2
|
||||||
|
|
||||||
lda elevator_fb_l,Y
|
sty TEMP
|
||||||
|
|
||||||
|
; calculate framebuffer offset
|
||||||
|
tya
|
||||||
|
clc
|
||||||
|
adc ELEVATOR_OFFSET
|
||||||
|
sec
|
||||||
|
sbc #24
|
||||||
|
tay
|
||||||
|
|
||||||
|
; draw left part
|
||||||
|
|
||||||
|
lda elevator_fb,Y
|
||||||
|
and #$f0
|
||||||
|
beq elevator_right_none
|
||||||
|
|
||||||
|
lda #$88
|
||||||
|
|
||||||
|
elevator_right_none:
|
||||||
|
|
||||||
ldx #0
|
ldx #0
|
||||||
line0_left_loop:
|
line0_left_loop:
|
||||||
sta $c00,X
|
sta $c00,X
|
||||||
@ -343,7 +392,14 @@ line0_left_loop:
|
|||||||
cpx #17
|
cpx #17
|
||||||
bne line0_left_loop
|
bne line0_left_loop
|
||||||
|
|
||||||
lda elevator_fb_c,Y
|
; draw center part
|
||||||
|
|
||||||
|
lda elevator_fb,Y
|
||||||
|
and #$0f
|
||||||
|
beq line0_center_loop
|
||||||
|
|
||||||
|
lda #$88
|
||||||
|
|
||||||
line0_center_loop:
|
line0_center_loop:
|
||||||
sta $c00,X
|
sta $c00,X
|
||||||
inx
|
inx
|
||||||
@ -357,6 +413,7 @@ line0_right_loop:
|
|||||||
cpx #40
|
cpx #40
|
||||||
bne line0_right_loop
|
bne line0_right_loop
|
||||||
|
|
||||||
|
ldy TEMP
|
||||||
iny
|
iny
|
||||||
cpy #24
|
cpy #24
|
||||||
bne elevator_background_loop
|
bne elevator_background_loop
|
||||||
@ -364,16 +421,172 @@ line0_right_loop:
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
elevator_fb_l:
|
elevator_fb:
|
||||||
.byte $88,$88,$88,$88,$88,$88,$88
|
; /----------------\
|
||||||
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00
|
; /----------------\
|
||||||
.byte $88,$88,$88,$88,$88,$88,$88,$88
|
; /----------------\
|
||||||
|
; /----------------\
|
||||||
|
; /----------------\
|
||||||
|
; /----------------\
|
||||||
|
; /----------------\
|
||||||
|
; /----------------\
|
||||||
|
; /----------------\
|
||||||
|
; /----------------\
|
||||||
|
; /----------------\
|
||||||
|
; /----------------\
|
||||||
|
; /----------------\
|
||||||
|
; /----------------\
|
||||||
|
.byte $80 ; ######## ######## 0 (24)
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ;+######## ########
|
||||||
|
|
||||||
elevator_fb_c:
|
.byte $80 ; ######## ######## ; 24 (48) (Room4)
|
||||||
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
|
.byte $80 ; ######## ########
|
||||||
.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ;+######## ########
|
||||||
|
|
||||||
|
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ;+######## ########
|
||||||
|
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ;+######## ########
|
||||||
|
|
||||||
|
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ;+######## ########
|
||||||
|
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $00 ; ########
|
||||||
|
.byte $80 ; ######## ########
|
||||||
|
.byte $88 ; ####################
|
||||||
|
.byte $88 ; ####################
|
||||||
|
.byte $88 ; ####################
|
||||||
|
.byte $88 ; ####################
|
||||||
|
.byte $88 ; ####################
|
||||||
|
.byte $88 ; ####################
|
||||||
|
.byte $88 ;+####################
|
||||||
|
|
||||||
elevator_sprite1:
|
elevator_sprite1:
|
||||||
.byte 10,1
|
.byte 10,1
|
||||||
|
@ -8,11 +8,12 @@ all: ootw_c2_jail.inc
|
|||||||
#####
|
#####
|
||||||
|
|
||||||
ootw_c2_jail.inc: $(PNG2RLE) \
|
ootw_c2_jail.inc: $(PNG2RLE) \
|
||||||
ootw_c2_cage_fell.png jail2_bg.png
|
ootw_c2_cage_fell.png jail2_bg.png jail3_bg.png jail4_bg.png dome.png
|
||||||
$(PNG2RLE) asm ootw_c2_cage_fell.png cage_fell_rle > ootw_c2_jail.inc
|
$(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 jail2_bg.png jail2_rle >> ootw_c2_jail.inc
|
||||||
$(PNG2RLE) asm jail3_bg.png jail3_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 jail4_bg.png jail4_rle >> ootw_c2_jail.inc
|
||||||
|
$(PNG2RLE) asm dome.png dome_rle >> ootw_c2_jail.inc
|
||||||
|
|
||||||
#####
|
#####
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 10 KiB |
@ -45,7 +45,7 @@ cage_fell_rle: .byte $28 ; ysize=48
|
|||||||
.byte $22, $52, $00, $55, $00, $55, $00
|
.byte $22, $52, $00, $55, $00, $55, $00
|
||||||
.byte $55, $00, $55, $00, $55, $A0,$A0,$00
|
.byte $55, $00, $55, $00, $55, $A0,$A0,$00
|
||||||
.byte $A1
|
.byte $A1
|
||||||
jail2_rle: .byte $28 ; ysize=50
|
jail2_rle: .byte $28 ; ysize=48
|
||||||
.byte $A3,$22, $55, $A5,$22, $55, $22, $55, $00,$00
|
.byte $A3,$22, $55, $A5,$22, $55, $22, $55, $00,$00
|
||||||
.byte $A0,$1A,$26, $A3,$22, $55, $A5,$22, $55, $22, $55
|
.byte $A0,$1A,$26, $A3,$22, $55, $A5,$22, $55, $22, $55
|
||||||
.byte $00,$00, $A0,$1D,$22, $55, $A5,$22, $55, $22, $55
|
.byte $00,$00, $A0,$1D,$22, $55, $A5,$22, $55, $22, $55
|
||||||
@ -126,7 +126,7 @@ jail2_rle: .byte $28 ; ysize=50
|
|||||||
.byte $88, $52, $55, $00, $77, $88, $77
|
.byte $88, $52, $55, $00, $77, $88, $77
|
||||||
.byte $88, $22,$22, $00, $77, $88, $77, $88
|
.byte $88, $22,$22, $00, $77, $88, $77, $88
|
||||||
.byte $22,$22, $00, $77, $88, $A7,$55, $56,$56, $55,$55
|
.byte $22,$22, $00, $77, $88, $A7,$55, $56,$56, $55,$55
|
||||||
.byte $A8,$56, $A4,$55, $A3,$56, $AE,$55, $A0,$28,$00
|
.byte $A8,$56, $A4,$55, $A3,$56, $AE,$55
|
||||||
.byte $A1
|
.byte $A1
|
||||||
jail3_rle: .byte $28 ; ysize=48
|
jail3_rle: .byte $28 ; ysize=48
|
||||||
.byte $A0,$1A,$25, $66, $55, $AC,$00, $A0,$1A,$22, $66, $55
|
.byte $A0,$1A,$25, $66, $55, $AC,$00, $A0,$1A,$22, $66, $55
|
||||||
@ -243,3 +243,21 @@ jail4_rle: .byte $28 ; ysize=48
|
|||||||
.byte $E5, $55,$55, $50, $55, $50, $55, $50
|
.byte $E5, $55,$55, $50, $55, $50, $55, $50
|
||||||
.byte $A0,$28,$00
|
.byte $A0,$28,$00
|
||||||
.byte $A1
|
.byte $A1
|
||||||
|
dome_rle: .byte $28 ; ysize=48
|
||||||
|
.byte $A8,$66, $A3,$22, $A0,$12,$00, $A3,$22, $AE,$66, $A3,$22, $A0,$16,$00
|
||||||
|
.byte $22,$22, $AC,$66, $A3,$22, $A0,$18,$00, $A3,$22, $A9,$66, $A3,$22
|
||||||
|
.byte $A0,$1A,$00, $A3,$22, $A7,$66, $A3,$22, $A0,$1C,$00, $A3,$22, $A6,$66
|
||||||
|
.byte $A3,$22, $A0,$1C,$00, $A3,$22, $A5,$66, $A3,$22, $A0,$1E,$00, $A3,$22
|
||||||
|
.byte $A4,$66, $22,$22, $A0,$20,$00, $22,$22, $A3,$66, $A3,$22, $A0,$1B,$00
|
||||||
|
.byte $77, $66, $55, $66, $00, $A3,$22, $66,$66
|
||||||
|
.byte $22,$22, $A0,$1B,$00, $22, $77, $76, $75, $76
|
||||||
|
.byte $60, $00, $22,$22, $66,$66, $22,$22, $A0,$1A,$00, $20
|
||||||
|
.byte $22,$22, $77, $66, $55, $66, $00, $22,$22
|
||||||
|
.byte $66, $A3,$22, $A0,$1A,$00, $A3,$22, $77, $66, $75
|
||||||
|
.byte $66, $00, $A6,$22, $A0,$19,$00, $A7,$22, $00,$00, $A5,$22
|
||||||
|
.byte $A0,$19,$00, $20, $A6,$22, $A4,$00, $A4,$22, $A0,$18,$00, $20
|
||||||
|
.byte $A7,$22, $A4,$00, $A4,$22, $A0,$17,$00, $20, $A7,$22, $A5,$00
|
||||||
|
.byte $22,$22, $A0,$11,$88, $A8,$00, $A0,$20,$88, $A8,$00, $A0,$20,$88, $A8,$00
|
||||||
|
.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
|
||||||
|
@ -186,8 +186,9 @@ TENTACLE_PROGRESS = $F8 ; C1
|
|||||||
ELEVATOR_CYCLE = $F8 ; INTRO
|
ELEVATOR_CYCLE = $F8 ; INTRO
|
||||||
STATIC_LOOPER = $F8 ; INTRO
|
STATIC_LOOPER = $F8 ; INTRO
|
||||||
|
|
||||||
TENTACLE_GRAB = $F9 ; C1
|
|
||||||
ELEVATOR_COUNT = $F9 ; INTRO
|
ELEVATOR_COUNT = $F9 ; INTRO
|
||||||
|
TENTACLE_GRAB = $F9 ; C1
|
||||||
|
ELEVATOR_OFFSET = $F9 ; C2
|
||||||
|
|
||||||
TEMP = $FA
|
TEMP = $FA
|
||||||
TEMPY = $FB
|
TEMPY = $FB
|
||||||
|
Loading…
x
Reference in New Issue
Block a user