Patch:Keen look

From KeenWiki
(Redirected from Patch:Keen look up)
Jump to: navigation, search

This page contains patches that relate to the player looking up or down and under what conditions the player starts and stops doing so. It covers all the Galaxy and Dreams episodes. Other patches relating to Keen can be found under Patch:Keen (Keen 4), Patch:Keen (Keen 5), Patch:Keen (Keen 6) and Patch:Keen (Keen Dreams).

Note that Keen looking up when the player leaves him idle for a time is Keen bored.


Sprite Actions

There are 7 actions relating to Keen's looking, two for looking up and five for looking down. The first up\down action simply changes Keen's sprite while the second actively moves the screen up or down. For looking down there are three additional actions, the third of which triggers the screen to move back up, if it has been moved down sufficiently.

Keen will start looking up in two situations. The first is if the up key is pressed while he is standing. The second occurs if he attempts to flick a switch but for some reason, such as bad positioning, fails. The look up sequence contains two actions. The starting action leads to the next action which does nothing until the up arrow is no longer pressed. When the up arrow is not pressed (Or a few other things such as the shooting or jumping keys being pressed occur) Keen will return to his standing action.


Keen 4

Keen 4 actions:
$0C02W #Keen looks up
$0C20W #Keen looks up (Screen moves)
$0C3EW #Keen looking down
$0C5CW #Keen looks down (Screen moves)
$0C7AW #Keen stops looking down 1
$0C98W #Keen stops looking down 2
$0CB6W #Keen stops looking up/down (Screen moves back)


Keen 5

Keen 5 actions:
$0AC2W #Keen looks up
$0AE0W #Keen looks up (Screen moves)
$0AD4W #Keen looking down
$0AFEW #Keen looks down (Screen moves)
$0B1CW #Keen stops looking down 1
$0B3AW #Keen stops looking down 2
$0B58W #Keen stops looking up/down (Screen moves back)

Patch: Keen 5
#This action makes screen move up
%patch $86C8 $0AE0W
#Keen start looking up -normal
%patch $AF3E $0AC2W
#Keen start looking up -switch flick fail
%patch $30FA4 $0AC2W
#Looking sequence
%patch $30E1E $0AE0W %patch $30E3C $0000W
#Keen stops looking up
%patch $B09A $0888W
#This action makes screen move down
%patch $86FE $0B3AW


Keen 6

Keen 6 actions:
$0AB6W #Keen looks up
$0AD4W #Keen looks up (Screen moves)
$0AF2W #Keen looking down
$0B10W #Keen looks down (Screen moves)
$0B2EW #Keen stops looking down 1
$0B4CW #Keen stops looking down 2
$0B6AW #Keen stops looking up/down (Screen moves back)

Patch: Keen 6
#Keen start looking up
%patch $AD8C $0AB6W


If disturbed while looking

When looking up or down and thus using his second sprite collision Keen can be disturbed by Platforms or Bounders; in both cases he will revert to his falling action.

For a complete list of Keen's actions see Patch:Keen (Keen 4)#Sprite_Actions.

Patch: Keen 4
#Be disturbed by
%patch $CE54 $11A2W
#Platforms
%patch $CE8C $11A2W
#Bounders


Sprite Behavior

There are three unique behaviors Keen uses while looking. The first is when looking up, the second when looking down and the third when finishing looking down. The first two behaviors simply revert Keen to standing when certain keys like jump are pressed (And of course when the up/down arrows aren't being pressed.) The third will 'correct' the screen if Keen has looked down far enough.

Patch: Keen 4
#Look up
%patch $2FA82 $0B80049ARL %patch $2FAA0 $0B80049ARL
#Look down
%patch $2FABE $0B8004E2RL
#Start
%patch $2FADC $0B8004E2RL %patch $2FAFA $0B8004E2RL
#Stop 1
%patch $2FB18 $00000000L
#Stop 2
%patch $2FB36 $0B8010D1RL
#Stop 3 -Screen moves

Patch: Keen 5
#Look up
%patch $30E12 $0AAF056FRL %patch $30E30 $0AAF056FRL
#Look down
%patch $30E4D $0AAF05B7RL
#Start
%patch $30E6C $0AAF05B7RL %patch $30E8A $0AAF05B7RL
#Stop 1
%patch $30EA8 $00000000L
#Stop 2
%patch $30EC6 $0AAF11FFRL
#Stop 3 -Screen moves


Look up code

This is the complete code for Keen's looking up behavior. It consists of a number of variable checks to see whether Keen should stop looking up and revert to his standing action, $0888W. The first of these is Keen's vertical direction variable, set in part by the up arrow. Next is Keen's horizontal direction set by the left\right arrows. The remaining variables check whether Keen is attempting jumping, shooting or pogoing. (In order they are JumpNew, JumpOld, PogoNew, PogoOld and ShootNew)

Patch: Keen 5
#Keen look up sprite behavior code
%patch $B05F $55 $8B $EC $56 $8B $76 $06 $83 $3E $9E38W $FF $75 $2A $83 $3E $9E36W $00 $75 $23 $83 $3E $BC31W $00 $74 $07 $83 $3E $BC2FW $00 $74 $15 $83 $3E $BC2DW $00 $74 $07 $83 $3E $BC2BW $00 $74 $07 $83 $3E $BC29W $00 $74 $0D $C7 $44 $1C $0888W $56 $0E $E8 $FD7AW $83 $C4 $02 $5E $5D $CB


Look down code

This is the complete code for Keen's looking down behavior. It consists of a number of variable checks to see whether Keen should stop looking down. First jumping (JumpNew, JumpOld) is checked, if Keen is attempting a jump while looking down then a check relating to Keen's top tile collision is performed. On line 12 a check involving the SpriteSync variable occurs, followed by an OnPlatform check. The sum of these lines is to check if Keen is standing on some sort of one-way platform or tile that he can drop down from. If so then he does and uses his 'falling 1' action $0180W as well as playing sound $14.

The second section relates to stopping looking down on 'normal' surfaces. First Keen's vertical and horizontal variables are checked, to see if the down arrow is being pressed and not the left or right arrows. After that PogoNew, PogoOld and ShootNew are checked. If any of these checks are failed Keen will revert to his 'stop looking down 2' action.

Patch: Keen 5
#Keen look down sprite behavior code
%patch $B0A7 $55 $8B $EC $83 $EC $08 $56 $57 $8B $76 $06 $83 $3E $BC31W $00 $75 $03 $E9 $0100W $83 $3E $BC2FW $00 $74 $03 $E9 $00F6W $8B $44 $36 $25 $0007W $3D $0001W $74 $03 $E9 $00E8W $C7 $06 $BC2FW $0001W $8B $44 $32 $89 $46 $FA $A1 $9E51W $33 $D2 $8B $5E $FA $D1 $E3 $8B $9F $87 $BF $D1 $EB $D1 $E3 $03 $D3 $8B $5C $34 $D1 $E3 $03 $D3 $89 $46 $FE $89 $56 $FC $C4 $5E $FC $26 $8B $3F $8E $06 $61 $BF $26 $80 $BD $FA $2F $00 $74 $03 $E9 $00D5W $26 $80 $BD $EA $18 $00 $74 $03 $E9 $00CAW $26 $80 $BD $72 $24 $00 $74 $03 $E9 $00BFW $A1 $9E4CW $D1 $E0 $01 $46 $FC $C4 $5E $FC $26 $8B $3F $8E $06 $61 $BF $26 $80 $BD $FA $2F $00 $74 $03 $E9 $00A2W $26 $80 $BD $EA $18 $00 $74 $03 $E9 $0097W $26 $80 $BD $72 $24 $00 $74 $03 $E9 $008CW $83 $3E $9BB4W $04 $73 $05 $B8 $0004W $EB $03 $A1 $9BB4W $B1 $04 $D3 $E0 $89 $46 $F8 $83 $3E $6F6EW $00 $74 $0A $8B $1E $6F6EW $8B $47 $14 $01 $46 $F8 $8B $46 $F8 $01 $44 $28 $C7 $06 $6F6EW $0000W $01 $44 $0C $33 $C0 $A3 $BF83W $A3 $BF85W $C7 $44 $1C $1080W $33 $C0 $89 $44 $18 $89 $44 $16 $B8 $0014W $50 $9A $196E09EFRL $83 $C4 $02 $5F $5E $8B $E5 $5D $CB %patch $B1BC $83 $3E $9E38W $01 $75 $23 $83 $3E $9E36W $00 $75 $1C $83 $3E $BC31W $00 $74 $07 $83 $3E $BC2FW $00 $74 $0E $83 $3E $BC2DW $00 $74 $0C $83 $3E $BC2BW $00 $75 $05 $C7 $44 $1C $0B58W $5F $5E $8B $E5 $5D $CB


Animations

Keen uses one animation when looking up, it is used by both his looking actions. Looking down uses two animations, a halfway and a looking animation. The looking animation is used by the two looking down actions, th starting and finishing actions use the halfway animation.

Patch: Keen 4
#Keen look up
%patch $2FA72 $0092W $0092W %patch $2FA7C $001EW
#Animation speed
%patch $2FA90 $0092W $0092W %patch $2FA9A $0000W
#Animation speed
#Keen look down
%patch $2FAAE $00A0W $00A0W
#Keen bend down
%patch $2FAB8 $0006W
#Animation speed
%patch $2FACC $00A1W $00A1W
#Keen look down
%patch $2FAD6 $0018W
#Animation speed
%patch $2FAEA $00A1W $00A1W
#Keen look down (Screen moves)
%patch $2FAF4 $0000W
#Wait for keypress
%patch $2FB08 $00A0W $00A0W
#Keen stop looking down
%patch $2FB12 $0006W
#Bending time
%patch $2FB26 $00A0W $00A0W
#Keen stops looking down (Screen moves)
%patch $2FB30 $0000W
#Wait till standing