mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-14 13:33:48 +00:00
duke: adjust controls a bit more
This commit is contained in:
parent
c880f4d834
commit
05eb07de14
10
duke/TODO
10
duke/TODO
@ -6,11 +6,13 @@ fancier PC-style sounds
|
|||||||
|
|
||||||
movement:
|
movement:
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
collision detection up (hit head on jump)
|
* collision detection up (hit head on jump)
|
||||||
* when land from jump, stop walking
|
* when land from jump, stop walking
|
||||||
walking right into objects, stand back one more
|
walking right into objects, stand back one more (maybe and to mask?)
|
||||||
can keep walking in collision, just don't move
|
* can keep walking in collision, just don't move
|
||||||
enemies
|
|
||||||
|
level1:
|
||||||
|
~~~~~~~
|
||||||
exit door, blue pillar, red key (all in basement?)
|
exit door, blue pillar, red key (all in basement?)
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
@ -3,11 +3,16 @@ DUKE_SPEED = $80
|
|||||||
|
|
||||||
YDEFAULT = 20
|
YDEFAULT = 20
|
||||||
|
|
||||||
|
HARD_TILES = 32 ; start at 32
|
||||||
|
|
||||||
;=========================
|
;=========================
|
||||||
; move duke
|
; move duke
|
||||||
;=========================
|
;=========================
|
||||||
move_duke:
|
move_duke:
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta SUPPRESS_WALK
|
||||||
|
|
||||||
jsr duke_get_feet_location ; get location of feet
|
jsr duke_get_feet_location ; get location of feet
|
||||||
|
|
||||||
jsr check_falling ; check for/handle falling
|
jsr check_falling ; check for/handle falling
|
||||||
@ -19,6 +24,9 @@ move_duke:
|
|||||||
lda DUKE_WALKING
|
lda DUKE_WALKING
|
||||||
beq done_move_duke
|
beq done_move_duke
|
||||||
|
|
||||||
|
lda SUPPRESS_WALK
|
||||||
|
bne done_move_duke
|
||||||
|
|
||||||
lda DUKE_DIRECTION
|
lda DUKE_DIRECTION
|
||||||
bmi move_left
|
bmi move_left
|
||||||
|
|
||||||
@ -94,10 +102,38 @@ done_move_duke:
|
|||||||
;=========================
|
;=========================
|
||||||
; duke collide
|
; duke collide
|
||||||
;=========================
|
;=========================
|
||||||
; only check above head if jumping
|
|
||||||
|
|
||||||
duke_collide:
|
duke_collide:
|
||||||
|
|
||||||
|
;===================
|
||||||
|
; collide with head
|
||||||
|
;===================
|
||||||
|
|
||||||
|
; only check above head if jumping
|
||||||
|
lda DUKE_JUMPING
|
||||||
|
beq collide_left_right
|
||||||
|
|
||||||
|
lda DUKE_FOOT_OFFSET
|
||||||
|
sec
|
||||||
|
sbc #16 ; above head is -2 rows
|
||||||
|
tax
|
||||||
|
|
||||||
|
lda TILEMAP,X
|
||||||
|
|
||||||
|
; if tile# < HARD_TILES then we are fine
|
||||||
|
cmp #HARD_TILES
|
||||||
|
bcc collide_left_right ; blt
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta DUKE_JUMPING
|
||||||
|
lda #1
|
||||||
|
sta DUKE_FALLING
|
||||||
|
|
||||||
|
collide_left_right:
|
||||||
|
;===================
|
||||||
|
; collide left/right
|
||||||
|
;===================
|
||||||
|
|
||||||
lda DUKE_DIRECTION
|
lda DUKE_DIRECTION
|
||||||
beq done_duke_collide
|
beq done_duke_collide
|
||||||
|
|
||||||
@ -106,34 +142,34 @@ duke_collide:
|
|||||||
check_right_collide:
|
check_right_collide:
|
||||||
lda DUKE_FOOT_OFFSET
|
lda DUKE_FOOT_OFFSET
|
||||||
clc
|
clc
|
||||||
adc #1 ; underfoot is on next row (+16)
|
adc #1 ; right is one to right
|
||||||
|
|
||||||
tax
|
tax
|
||||||
lda TILEMAP,X
|
lda TILEMAP,X
|
||||||
|
|
||||||
; if tile# < 32 then we are fine
|
; if tile# < HARD_TILES then we are fine
|
||||||
cmp #32
|
cmp #HARD_TILES
|
||||||
bcc done_duke_collide ; blt
|
bcc done_duke_collide ; blt
|
||||||
|
|
||||||
lda #0 ;
|
lda #1 ;
|
||||||
sta DUKE_WALKING
|
sta SUPPRESS_WALK
|
||||||
jmp done_duke_collide
|
jmp done_duke_collide
|
||||||
|
|
||||||
check_left_collide:
|
check_left_collide:
|
||||||
|
|
||||||
lda DUKE_FOOT_OFFSET
|
lda DUKE_FOOT_OFFSET
|
||||||
sec
|
sec
|
||||||
sbc #1 ; underfoot is on next row (+16)
|
sbc #1 ; left is one to left
|
||||||
|
|
||||||
tax
|
tax
|
||||||
lda TILEMAP,X
|
lda TILEMAP,X
|
||||||
|
|
||||||
; if tile# < 32 then we are fine
|
; if tile# < HARD_TILES then we are fine
|
||||||
cmp #32
|
cmp #HARD_TILES
|
||||||
bcc done_duke_collide ; blt
|
bcc done_duke_collide ; blt
|
||||||
|
|
||||||
lda #0 ;
|
lda #1
|
||||||
sta DUKE_WALKING
|
sta SUPPRESS_WALK
|
||||||
jmp done_duke_collide
|
jmp done_duke_collide
|
||||||
|
|
||||||
done_duke_collide:
|
done_duke_collide:
|
||||||
@ -244,8 +280,8 @@ check_falling:
|
|||||||
tax
|
tax
|
||||||
lda TILEMAP,X
|
lda TILEMAP,X
|
||||||
|
|
||||||
; if tile# < 32 then we fall
|
; if tile# < HARD_TILES then we fall
|
||||||
cmp #32
|
cmp #HARD_TILES
|
||||||
bcs feet_on_ground ; bge
|
bcs feet_on_ground ; bge
|
||||||
|
|
||||||
;=======================
|
;=======================
|
||||||
|
@ -110,6 +110,7 @@ UPDATE_STATUS = $94
|
|||||||
DUKE_FALLING = $95
|
DUKE_FALLING = $95
|
||||||
DUKE_SHOOTING = $96
|
DUKE_SHOOTING = $96
|
||||||
KICK_UP_DUST = $97
|
KICK_UP_DUST = $97
|
||||||
|
SUPPRESS_WALK = $98
|
||||||
|
|
||||||
; done game puzzle state
|
; done game puzzle state
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user