' scen/jumpup.txt - finding 2.10: up with the action key held.
'
' CTRL.S "standing" has two branches, one for the button down and one for it
' up, and both answer a fresh up at the same label:
'
'   :2 lda clrB / bmi :backB      (button down)
'      lda clrU / bmi :up
'   ...
'   :btnup lda clrF / bmi :fwd    (button up)
'      lda clrB / bmi :back
'      lda clrU / bmi :up
'
' and :up is the stairs test, then a standing jump if forward is held, then
' DoJumpup with its ledge logic.  The port returned jumpup on the spot when
' the button was down, so a player who keeps the action key held never grabs
' a ledge and cannot climb a flight of stairs.
'
' Level 1 screen 1: standing on the floor at block 2 of the middle row, the
' block above him is empty and the one above and in front has floor, which is
' a ledge to jump for.  He is turned to face it.

SCEN up with the button held jumps for the ledge
AT 1 1 2 1
FACE 0
SEED 17
RUN ..UUUUUUUUUUUU
WANT JUMPHANG 1
WANT ACTION 2
WANT ALIVE 1
END

' The control: with the button up it has always done this, and still does.
SCEN up on its own does the same
AT 1 1 2 1
FACE 0
SEED 17
RUN ..^^^^^^^^^^^^
WANT JUMPHANG 1
WANT ACTION 2
WANT ALIVE 1
END

' CTRL.S DoJumphigh, section 4: whether there is a ceiling to reach is asked
' of the block over his HAND, not the one over his feet -
'     jsr getbasex / clc / adc #jumpupangle / clc / adc ztemp / jsr getblockx
' with jumpupangle -6 and jumpupreach 0 - and the answer under a solid block
' is jumpup, touching the ceiling.  "cmp #block / beq :jumpup" comes before
' the space test, because a solid block is one of the things cmpspace calls
' clear.  The port asked noFloor of the block over his feet, which says yes to
' a solid block, so he jumped clean up through the ceiling of the room he was
' standing in.
'
' The whole top row of screen 2 on level 1 is solid over columns 2 to 5, and
' open over columns 0 and 1.  Seventeen frames into the jump the difference is
' plain: under the ceiling he has not left the floor line at all.

SCEN under a ceiling he only reaches up to it
AT 1 2 3 1
SEED 17
RUN ..^^^^^^^^^^^^^^^
WANT Y 118
WANT POSN 82
WANT BY 1
END

' Two blocks along, with nothing above him, the same key is the high jump and
' he leaves the ground.
SCEN with nothing above him he jumps
AT 1 2 1 1
SEED 17
RUN ..^^^^^^^^^^^^^^^
WANT Y 112
WANT POSN 79
WANT BY 1
END
