Patch:Pause window

From KeenWiki
Jump to navigation Jump to search

The pause window in Keen Dreams and Keen galaxy is displayed whenever a game is loaded and possibly under other circumstances. It is a small window with the text 'PAUSED' in it that closes when a key is pressed. This is not to be confused with simply pausing the game, which occurs without a window which is done by simply pressing the 'P' key during gameplay.


Window

Keen Galaxy paused window

#Keen 4 :
%patch $78F6  [$0003W] #Height
%patch $78FA  [$0008W] #Width
%patch $7906  [$060CW] #Text called from
%patch $2F47C "PAUSED" $00

#Keen 5:
%patch $78B1 [$0003W] #Height
%patch $78B5 [$0008W] #Width
%patch $78C1 [$0588W] #Text called from
%patch $308C8 "PAUSED" $00

#Keen 6:
%patch $76CB [$0003W] #Height
%patch $76CF [$0008W] #Width
%patch $76DB [$0584W] #Text called from
%patch $312B4 "PAUSED" $00

#Keen 7:
%patch $4519  [$0003W] #Height
%patch $451D  [$0008W] #Width
%patch $4529  [$0649W] #Text called from
%patch $240B9 "PAUSED" $00


Complete window code

This is the complete code for the pause window. The first line contains the condition that needs to be met to activate the window. This is the 'pause break' key being pressed. (It is also set by a saved game being loaded.) On the second line the window's size is set up. Line 3 prints the PAUSED text. The remaining code waits for a keypress then clears the window from the screen.

At the end of the code the 'pause break' key is set to 0, if this is not done the Paused window will keep appearing indefinitely.

Pause window code

#Pause window code -Keen 4
%patch $78E4 $83 $3E {$C645W}  [$00] {$74} $40 $9A $18740B15RL     $9A $1D060999RL
                 $B8 [$0003W]  $50 $B8 [$0008W]  $50 $9A $19311070RL     $83 $C4
             $04 $B8 [$060CW]  $50 $9A $19310E1FRL     $83 $C4 $02 $9A $1D060A9BRL
                     $9A $14600EDFRL     $9A $16540D59RL     $C7 $06 {$C645W}
             [$0000W]  $9A $18740B0ARL

#Pause window code -Keen 5
%patch $789F $83 $3E {$BCADW}  [$00] {$74} $40 $9A $196E0B13RL     $9A $1E000995RL
                 $B8 [$0003W]  $50 $B8 [$0008W]  $50 $9A $1A2B106ERL     $83 $C4
             $04 $B8 [$0588W]  $50 $9A $1A2B0E1DRL     $83 $C4 $02 $9A $1E000A97RL
                     $9A $155A0EDCRL     $9A $174E0D56RL     $C7 $06 {$BCADW}
             [$0000W]  $9A $196E0B08RL

#Pause window code -Keen 6
%patch $76B9 $83 $3E {$C7D3W}  [$00] {$74} $40 $9A $183B0B15RL     $9A $1CF709A3RL 
                 $B8 [$0003W]  $50 $B8 [$0008W]  $50 $9A $18F81070RL     $83 $C4
             $04 $B8 [$0584W]  $50 $9A $18F80E1FRL     $83 $C4 $02 $9A $1CF70AA5RL
                     $9A $14130EE0RL     $9A $16080E88RL     $C7 $06 {$C7D3W}
             [$0000W]  $9A $183B0B0ARL 

#Pause window code -Keen Dreams
%patch $450C $83 $3E {$E482W}  [$00] {$74} $35 $9A $0CA507D5RL     $B8 [$0003W]  $50
             $B8 [$0008W]  $50 $9A $11FA1C64RL     $83 $C4 $04 $B8 [$0649W]  $50
             $9A $11FA1A1ERL     $44 $44 $9A $0CA508C0RL     $9A $0FE40C8ERL
                 $9A $0E450A00RL     $C7 $06 {$E482W}  [$0000W]


Key that activates Pause window

This patch alters what key activates the pause window. (See Patch:Scancodes.) By default this is the pause break key. Setting this to $C647 will disable being able to open the window during gameplay; but will not disable the window when, for example, a saved game is loaded.

Key that activates Pause window

#Key that activates Pause window -Keen 4
%patch $78E6 {$C645W}

#Key that activates Pause window -Keen Dreams
%patch $450e {$E482W}


Disable pause window

This patch disables the pause window entirely, meaning it can't be accessed in-game. When saved games are loaded however the game will still be paused, but no paused window will appear.

Disable Pause window

#Disable Pause window -Keen 4 (Free $78E6-$792B)
%patch $78E4 $EB $45


Don't display window, just pause game

This patch removes the pause window, but allows the game to still be paused. The action simply freezes until the player presses a key.

No Pause window, just pause game

#No Pause window, just pause game -Keen 4
%patch $78EB $EB $29


Loaded games aren't paused

This patch stops the Paused window appearing when a game is loaded. Instead gameplay will continue normally.

Loaded games aren't paused

#Loaded games aren't paused -Keen 4
%patch $1BDFF $EB

#Loaded games aren't paused -Keen 5
%patch $1CD9D $EB

#Loaded games aren't paused -Keen 6
%patch $1BA6F $EB

#Loaded games aren't paused -Keen Dreams
%patch $159AD $EB


Window has a different border

In Keen Dreams it is possible to make certain windows use a different set of 8x8 tiles for their border. This patch is on the 'text windows' page.