mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-10-24 23:25:28 +00:00
ootw: c4: more progress on doors
This commit is contained in:
parent
4a7cf594e2
commit
7095729b0d
@ -1,4 +1,10 @@
|
||||
BEHAVIOR DIFFERENCES:
|
||||
|
||||
alien guard behavior:
|
||||
+ will punch you if you get too close
|
||||
+ l4, if you draw gun (but not fire) guard won't shoot you,
|
||||
but instead will yell at you a bit
|
||||
|
||||
+ L1
|
||||
- underwater there is a water-motion effect
|
||||
- bubble motion is fancier in real thing
|
||||
|
82
ootw/door.s
82
ootw/door.s
@ -1,20 +1,13 @@
|
||||
|
||||
DOOR_STATUS = 0
|
||||
DOOR_STATUS_OPEN = $01
|
||||
DOOR_STATUS_OPENING = $02
|
||||
DOOR_STATUS_CLOSING = $04
|
||||
DOOR_STATUS_CLOSED = $08
|
||||
DOOR_STATUS_EXPLODED = $10
|
||||
DOOR_STATUS_LOCKED = $20
|
||||
DOOR_STATUS_EXPLODING = $40
|
||||
|
||||
|
||||
door_state0:
|
||||
.byte $0 ; status
|
||||
.byte $0 ; explode_dir
|
||||
.byte $0 ; left_trigger
|
||||
.byte $0 ; right_trigger
|
||||
.byte $0 ; step
|
||||
DOOR_STATUS_OPEN = $00
|
||||
DOOR_STATUS_OPENING1 = $01
|
||||
DOOR_STATUS_OPENING2 = $02
|
||||
DOOR_STATUS_CLOSING1 = $03
|
||||
DOOR_STATUS_CLOSING2 = $04
|
||||
DOOR_STATUS_CLOSED = $05
|
||||
DOOR_STATUS_EXPLODED = $06
|
||||
DOOR_STATUS_LOCKED = $07
|
||||
DOOR_STATUS_EXPLODING = $08
|
||||
|
||||
|
||||
;==================================
|
||||
@ -28,15 +21,15 @@ draw_doors:
|
||||
|
||||
ldx #0
|
||||
draw_doors_loop:
|
||||
lda #<door_closed_sprite
|
||||
|
||||
ldy door_status,X
|
||||
|
||||
; ldy #1
|
||||
|
||||
lda door_sprite_lookup_lo,Y
|
||||
sta INL
|
||||
lda #>door_closed_sprite
|
||||
lda door_sprite_lookup_hi,Y
|
||||
sta INH
|
||||
jmp actually_draw_door
|
||||
|
||||
|
||||
door_not_closed:
|
||||
|
||||
|
||||
actually_draw_door:
|
||||
lda door_x,X
|
||||
@ -54,7 +47,7 @@ actually_draw_door:
|
||||
|
||||
draw_doors_continue:
|
||||
inx
|
||||
cmp NUM_DOORS
|
||||
cpx NUM_DOORS
|
||||
bne draw_doors_loop
|
||||
|
||||
done_draw_doors:
|
||||
@ -89,6 +82,31 @@ handle_doors:
|
||||
;======================================
|
||||
;======================================
|
||||
|
||||
|
||||
door_sprite_lookup_lo:
|
||||
.byte <door_open_sprite ; DOOR_STATUS_OPEN
|
||||
.byte <door_opening_sprite1 ; DOOR_STATUS_OPENING1
|
||||
.byte <door_opening_sprite2 ; DOOR_STATUS_OPENING2
|
||||
.byte <door_closing_sprite1 ; DOOR_STATUS_CLOSING1
|
||||
.byte <door_closing_sprite2 ; DOOR_STATUS_CLOSING2
|
||||
.byte <door_closed_sprite ; DOOR_STATUS_CLOSED
|
||||
.byte <door_exploded_sprite ; DOOR_STATUS_EXPLODED
|
||||
.byte <door_closed_sprite ; DOOR_STATUS_LOCKED
|
||||
.byte <door_exploding_sprite1 ; DOOR_STATUS_EXPLODING
|
||||
|
||||
door_sprite_lookup_hi:
|
||||
|
||||
.byte >door_open_sprite ; DOOR_STATUS_OPEN
|
||||
.byte >door_opening_sprite1 ; DOOR_STATUS_OPENING1
|
||||
.byte >door_opening_sprite2 ; DOOR_STATUS_OPENING2
|
||||
.byte >door_closing_sprite1 ; DOOR_STATUS_CLOSING1
|
||||
.byte >door_closing_sprite2 ; DOOR_STATUS_CLOSING2
|
||||
.byte >door_closed_sprite ; DOOR_STATUS_CLOSED
|
||||
.byte >door_exploded_sprite ; DOOR_STATUS_EXPLODED
|
||||
.byte >door_closed_sprite ; DOOR_STATUS_LOCKED
|
||||
.byte >door_exploding_sprite1 ; DOOR_STATUS_EXPLODING
|
||||
|
||||
|
||||
door_closed_sprite:
|
||||
.byte 1,10
|
||||
.byte $00
|
||||
@ -115,7 +133,7 @@ door_open_sprite:
|
||||
.byte $AA
|
||||
.byte $AA
|
||||
|
||||
door_opening_sprite:
|
||||
door_opening_sprite2:
|
||||
door_closing_sprite1:
|
||||
.byte 1,10
|
||||
.byte $00
|
||||
@ -129,6 +147,7 @@ door_closing_sprite1:
|
||||
.byte $0A
|
||||
.byte $00
|
||||
|
||||
door_opening_sprite1:
|
||||
door_closing_sprite2:
|
||||
.byte 1,10
|
||||
.byte $00
|
||||
@ -155,3 +174,16 @@ door_exploded_sprite:
|
||||
.byte $AA
|
||||
.byte $AA
|
||||
.byte $A5
|
||||
|
||||
door_exploding_sprite1:
|
||||
.byte 1,10
|
||||
.byte $00
|
||||
.byte $A5
|
||||
.byte $AA
|
||||
.byte $AA
|
||||
.byte $AA
|
||||
.byte $AA
|
||||
.byte $AA
|
||||
.byte $AA
|
||||
.byte $AA
|
||||
.byte $A5
|
||||
|
@ -1038,5 +1038,10 @@ door_y:
|
||||
c4_r0_door3_y: .byte 24
|
||||
c4_r0_door4_y: .byte 24
|
||||
|
||||
|
||||
door_status:
|
||||
c4_r0_door0_status: .byte DOOR_STATUS_OPEN
|
||||
c4_r0_door1_status: .byte DOOR_STATUS_CLOSED
|
||||
c4_r0_door2_status: .byte DOOR_STATUS_EXPLODED
|
||||
c4_r0_door3_status: .byte DOOR_STATUS_OPENING1
|
||||
c4_r0_door4_status: .byte DOOR_STATUS_OPENING2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user