mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-26 15:29:55 +00:00
ootw: monster can grab you
This commit is contained in:
parent
e498485b56
commit
2a49a509e2
|
@ -50,17 +50,11 @@ ootw_pool:
|
||||||
|
|
||||||
;=================================
|
;=================================
|
||||||
; setup vars
|
; setup vars
|
||||||
; lda #22
|
|
||||||
; sta PHYSICIST_Y
|
|
||||||
; lda #20
|
|
||||||
; sta PHYSICIST_X
|
|
||||||
|
|
||||||
; lda #1
|
|
||||||
; sta DIRECTION
|
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
sta GAIT
|
sta GAIT
|
||||||
sta GAME_OVER
|
sta GAME_OVER
|
||||||
|
sta TENTACLE_GRAB
|
||||||
|
|
||||||
lda #30
|
lda #30
|
||||||
sta TENTACLE_PROGRESS
|
sta TENTACLE_PROGRESS
|
||||||
|
@ -70,10 +64,6 @@ ootw_pool:
|
||||||
;============================
|
;============================
|
||||||
pool_loop:
|
pool_loop:
|
||||||
|
|
||||||
; check keyboard
|
|
||||||
|
|
||||||
jsr handle_keypress_pool
|
|
||||||
|
|
||||||
;================================
|
;================================
|
||||||
; copy background to current page
|
; copy background to current page
|
||||||
|
|
||||||
|
@ -145,9 +135,51 @@ pool_loop:
|
||||||
jsr put_sprite
|
jsr put_sprite
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;==============================
|
||||||
|
; handle being grabbed
|
||||||
|
|
||||||
|
lda TENTACLE_GRAB
|
||||||
|
beq tentacle_action
|
||||||
|
|
||||||
|
;=================================
|
||||||
|
; actively being grabbed
|
||||||
|
|
||||||
|
lda TENTACLE_PROGRESS
|
||||||
|
tax
|
||||||
|
|
||||||
|
lda caught_progression,X
|
||||||
|
sta INL
|
||||||
|
lda caught_progression+1,X
|
||||||
|
sta INH
|
||||||
|
|
||||||
|
lda TENTACLE_X
|
||||||
|
sta XPOS
|
||||||
|
lda #22
|
||||||
|
sta YPOS
|
||||||
|
|
||||||
|
lda FRAMEL
|
||||||
|
and #$1f
|
||||||
|
bne no_caught_progress
|
||||||
|
|
||||||
|
inc TENTACLE_PROGRESS
|
||||||
|
inc TENTACLE_PROGRESS
|
||||||
|
no_caught_progress:
|
||||||
|
jsr put_sprite
|
||||||
|
|
||||||
|
lda TENTACLE_PROGRESS
|
||||||
|
cmp #24
|
||||||
|
bne beyond_tentacles
|
||||||
|
|
||||||
|
lda #$ff
|
||||||
|
sta GAME_OVER
|
||||||
|
|
||||||
|
jmp beyond_tentacles
|
||||||
|
|
||||||
|
|
||||||
;===============
|
;===============
|
||||||
; move/draw tentacle monster
|
; move/draw tentacle monster
|
||||||
|
tentacle_action:
|
||||||
lda FRAMEH
|
lda FRAMEH
|
||||||
and #3
|
and #3
|
||||||
bne tentacle_move
|
bne tentacle_move
|
||||||
|
@ -169,12 +201,6 @@ tentacle_move:
|
||||||
cmp #26
|
cmp #26
|
||||||
bpl no_tentacle
|
bpl no_tentacle
|
||||||
|
|
||||||
; lda FRAMEL
|
|
||||||
; and #$30 ; 0110 1100
|
|
||||||
; lsr
|
|
||||||
; lsr
|
|
||||||
; lsr
|
|
||||||
|
|
||||||
tax
|
tax
|
||||||
|
|
||||||
lda tentacle_progression,X
|
lda tentacle_progression,X
|
||||||
|
@ -194,16 +220,44 @@ tentacle_move:
|
||||||
inc TENTACLE_PROGRESS
|
inc TENTACLE_PROGRESS
|
||||||
inc TENTACLE_PROGRESS
|
inc TENTACLE_PROGRESS
|
||||||
no_tentacle_progress:
|
no_tentacle_progress:
|
||||||
|
|
||||||
|
|
||||||
jsr put_sprite
|
jsr put_sprite
|
||||||
|
|
||||||
|
; See if we are fully extended
|
||||||
|
; if we are close enough to grab
|
||||||
|
|
||||||
|
lda TENTACLE_PROGRESS
|
||||||
|
cmp #12
|
||||||
|
bne no_tentacle
|
||||||
|
|
||||||
|
sec
|
||||||
|
lda PHYSICIST_X
|
||||||
|
sbc TENTACLE_X ; want -4 to 4
|
||||||
|
clc
|
||||||
|
adc #4 ; want 0 to 8
|
||||||
|
and #$f8
|
||||||
|
bne no_tentacle
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta TENTACLE_PROGRESS
|
||||||
|
lda #1
|
||||||
|
sta TENTACLE_GRAB
|
||||||
|
|
||||||
no_tentacle:
|
no_tentacle:
|
||||||
|
|
||||||
|
;===============================
|
||||||
|
; check keyboard
|
||||||
|
|
||||||
|
jsr handle_keypress_pool
|
||||||
|
|
||||||
|
|
||||||
;===============
|
;===============
|
||||||
; draw physicist
|
; draw physicist
|
||||||
|
|
||||||
jsr draw_physicist
|
jsr draw_physicist
|
||||||
|
|
||||||
|
|
||||||
|
beyond_tentacles:
|
||||||
|
|
||||||
;======================
|
;======================
|
||||||
; draw foreground plant
|
; draw foreground plant
|
||||||
|
|
||||||
|
|
|
@ -261,6 +261,23 @@ tentacle5:
|
||||||
|
|
||||||
; TODO: trim right and bottom off sprites
|
; TODO: trim right and bottom off sprites
|
||||||
|
|
||||||
|
|
||||||
|
caught_progression:
|
||||||
|
.word caught0
|
||||||
|
.word caught1
|
||||||
|
.word caught2
|
||||||
|
.word caught3
|
||||||
|
.word caught4
|
||||||
|
.word caught5
|
||||||
|
.word caught6
|
||||||
|
.word caught7
|
||||||
|
.word caught8
|
||||||
|
.word ripple4
|
||||||
|
.word ripple4
|
||||||
|
.word ripple4 ; 12
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
caught0:
|
caught0:
|
||||||
.byte $7,$8
|
.byte $7,$8
|
||||||
.byte $aa,$aa,$aa,$9a,$9a,$aa,$aa
|
.byte $aa,$aa,$aa,$9a,$9a,$aa,$aa
|
||||||
|
|
|
@ -155,6 +155,7 @@ DIRECTION = $F5
|
||||||
GAIT = $F6
|
GAIT = $F6
|
||||||
TENTACLE_X = $F7
|
TENTACLE_X = $F7
|
||||||
TENTACLE_PROGRESS = $F8
|
TENTACLE_PROGRESS = $F8
|
||||||
|
TENTACLE_GRAB = $F9
|
||||||
TEMP = $FA
|
TEMP = $FA
|
||||||
TEMPY = $FB
|
TEMPY = $FB
|
||||||
INL = $FC
|
INL = $FC
|
||||||
|
|
Loading…
Reference in New Issue
Block a user