mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-27 17:29:49 +00:00
keen: add fine tune controls
really struggling with controls here
This commit is contained in:
parent
2fd7d7d96a
commit
d5efc2135a
@ -1,5 +1,7 @@
|
||||
JUMP_HEIGHT = 6
|
||||
|
||||
SIDE_JUMP_DISTANCE = 14
|
||||
|
||||
;==============================
|
||||
; Handle Keypress
|
||||
;==============================
|
||||
@ -107,7 +109,7 @@ check_left:
|
||||
cmp #'A'
|
||||
beq left_pressed
|
||||
cmp #8 ; left key
|
||||
bne check_right
|
||||
bne check_left_slight
|
||||
left_pressed:
|
||||
|
||||
;===============================
|
||||
@ -120,6 +122,10 @@ left_pressed:
|
||||
cmp #$ff ; check if facing left
|
||||
bne left_facing_right
|
||||
|
||||
lda KEEN_WALKING
|
||||
cmp #4
|
||||
bcs done_left_pressed ; don't shorten it
|
||||
|
||||
lda #4
|
||||
sta KEEN_WALKING
|
||||
|
||||
@ -144,11 +150,23 @@ done_left_pressed:
|
||||
|
||||
jmp done_keypress
|
||||
|
||||
check_left_slight:
|
||||
cmp #'Z'
|
||||
bne check_right
|
||||
|
||||
lda #LEFT
|
||||
sta KEEN_DIRECTION
|
||||
|
||||
lda #1
|
||||
sta KEEN_WALKING
|
||||
jmp done_right_pressed ; don't shorten it
|
||||
|
||||
|
||||
check_right:
|
||||
cmp #'D'
|
||||
beq right_pressed
|
||||
cmp #$15 ; right key
|
||||
bne check_jump_right
|
||||
bne check_right_slight
|
||||
|
||||
|
||||
;===============================
|
||||
@ -162,9 +180,18 @@ right_pressed:
|
||||
cmp #$1 ; check if facing right
|
||||
bne right_facing_left
|
||||
|
||||
lda KEEN_WALKING
|
||||
cmp #4
|
||||
bcs done_right_pressed ; don't shorten it
|
||||
|
||||
; clc
|
||||
; lda KEEN_WALKING
|
||||
; adc #4
|
||||
; sta KEEN_WALKING
|
||||
|
||||
lda #4
|
||||
sta KEEN_WALKING
|
||||
jmp done_left_pressed
|
||||
jmp done_right_pressed
|
||||
|
||||
right_facing_left:
|
||||
lda KEEN_WALKING
|
||||
@ -185,6 +212,17 @@ done_right_pressed:
|
||||
|
||||
jmp done_keypress
|
||||
|
||||
check_right_slight:
|
||||
cmp #'C'
|
||||
bne check_jump_right
|
||||
|
||||
lda #RIGHT
|
||||
sta KEEN_DIRECTION
|
||||
|
||||
lda #1
|
||||
sta KEEN_WALKING
|
||||
jmp done_right_pressed ; don't shorten it
|
||||
|
||||
check_jump_right:
|
||||
cmp #'E'
|
||||
bne check_jump_left
|
||||
@ -206,7 +244,7 @@ jump_right:
|
||||
|
||||
lda #1
|
||||
sta KEEN_DIRECTION
|
||||
lda #10
|
||||
lda #SIDE_JUMP_DISTANCE
|
||||
sta KEEN_WALKING
|
||||
|
||||
jmp done_keypress
|
||||
@ -233,7 +271,7 @@ jump_left:
|
||||
|
||||
lda #$FF
|
||||
sta KEEN_DIRECTION
|
||||
lda #10
|
||||
lda #SIDE_JUMP_DISTANCE
|
||||
sta KEEN_WALKING
|
||||
|
||||
jmp done_keypress
|
||||
|
@ -16,15 +16,12 @@ move_keen:
|
||||
lda #0
|
||||
sta SUPPRESS_WALK ; if we collide we set this to stop walk
|
||||
|
||||
; jsr keen_get_feet_location ; get location of feet
|
||||
|
||||
jsr check_falling ; check for/handle falling
|
||||
|
||||
jsr keen_collide ; check for right/left collision
|
||||
|
||||
jsr handle_jumping ; handle jumping
|
||||
|
||||
|
||||
lda KEEN_WALKING ; if not walking, we're done
|
||||
beq move_keen_early_out
|
||||
|
||||
|
@ -33,11 +33,13 @@ help_text:
|
||||
.byte 3, 7, "D OR -> : MOVE RIGHT",0
|
||||
.byte 3, 8, "Q : JUMP LEFT",0
|
||||
.byte 3, 9, "E : JUMP RIGHT",0
|
||||
.byte 3,10, "M : FIRE LASERGUN",0
|
||||
.byte 3,11, "P : POGO",0
|
||||
.byte 3,13, "SPACEBAR : ACTION/JUMP",0
|
||||
.byte 3,13, "RETURN : STATUS BAR",0
|
||||
.byte 3,14, "ESC : QUITS",0
|
||||
.byte 3,15, "CONTROL-T : TOGGLE SOUND",0
|
||||
.byte 3,16, "J : ENABLE JOYSTICK",0
|
||||
.byte 3,10, "Z : FINE LEFT",0
|
||||
.byte 3,11, "C : FINE RIGHT",0
|
||||
.byte 3,12, "M : FIRE LASERGUN",0
|
||||
.byte 3,13, "P : POGO",0
|
||||
.byte 3,15, "SPACEBAR : ACTION/JUMP",0
|
||||
.byte 3,16, "RETURN : STATUS BAR",0
|
||||
.byte 3,17, "ESC : QUITS",0
|
||||
.byte 3,18, "CONTROL-T : TOGGLE SOUND",0
|
||||
.byte 3,19, "J : ENABLE JOYSTICK",0
|
||||
.byte 255
|
||||
|
Loading…
Reference in New Issue
Block a user