Patch:Doors (Galaxy)

From KeenWiki
Jump to navigation Jump to search

This page covers patches relating to the doors in Keen Galaxy, how they open and interact with sprites (including Keen). For patches relating to the keygems used to open them, see keygems. For the 'V' keycard that opens the special door in Keen 5, see Patch:Keycard (Galaxy).

There are three kinds of door in Galaxy that Keen can enter. The most common kind are 'passage' doors, allowing Keen to move between two points in the level, found in all Keen Galaxy games. Patches relating t these are found on this page. The second kind are keygem doors that require a keygem to open, also found in all galaxy games. The third type are V card doors which require a V card to open and usually exit the level.

For patches relating to the player themselves as they enter doors, what they look like and how they behave, see Patch:Keen entering doors.


Door tile property

There are two places where the game checks for the door tile property; the first is when Keen presses the up arrow while standing. This starts the door alignment process. During this process the game checks for a lack of the door tile property, when it finds this it has found the 'edge' of the door and knows that Keen is properly aligned with it. Then Keen enters the door.

Keen 4

#Door tile property
%patch $B9AF [$02] {74}
%patch $B9F1 [$02] {74}

Keen 6

#Door tile property
%patch $ABC5 [$02] {74}
%patch $AC07 [$02] {74}


Win level value

In Keen 5 there is a special pointer value (What is placed over the 'door property' tiles of a door to tell the game the x,y location in the level Keen will go to when he enters the door.) that will cause Keen to win the level. In previous games a door with a value of $0000W would do this, transporting Keen out outside the level, where he would win. (See below.) This however also moved the screen, making it a little odd to use. This value skips everything and simply wins the level. (A value of $0000W can still be used however.)

Note that this applies to all doors in Keen 5, including the V card doors.

Keen 5

#Pointer value for doors that wins level:
%patch $B44D $B1B1W


Win level code

This is the code executed when Keen enters a door marked with the win level pointer value. The first few bytes are a check for this value, which can be anything. (Due to level size limits $B1B1 is guaranteed to not be useable by normally functioning doors.) If the value is found then the level state is set to 2 (Win level, see link for other values.) and Keen's sprite action is set to $DB0W (Enter door)

Keen 5

#Win level door pointer code
%patch $B44B $81 $FF [$B1B1W]  {$75} $11 $C7 $06 {$6F70W}  [$0002W]  $C7 $44 $1C [$0DB0W]
                 $5F $5E $8B $E5 $5D $CB


Remove 'air-door' glitch

This patch stops Keen re-entering doors he has just emerged from. This stops a particular bug which allows Keen to exit some levels by pressing up as soon as he emerges from a door.

Keen 4

#Eliminate air-door entry glitch
%patch $2FD5E [$0C02W]