Patch:Light switch
This page deals with patches relating to the light switches in Keen Vorticons. These switches are related to bridge switches. It also deals with the color changes associated with turning the lights on and off. Related patches can be found on the palette page.
Levels start with lights off
This patch makes all normal levels start with the lights off palette. It does not affect the map level, main menu level or ending sequence. It works by essentially running the 'lights turn off' code at level start (Which means if the usual fade in palette sequence is used there will be a short flash of 'lights on' palette seen as the level loads.
Keen 1
#Levels start with lights off:
%patch $4C92 $E8 $1FB4W $90 $90 $90
%patch $4CA1 $E8 $E90EW
Keen 2
#Levels start with lights off:
%patch $79F6 $E8 $B45EW $90 $90 $90
%patch $7A05 $E8 $E9ECW
Lights on\off colors
Turning the lights off and on changes the game's palette, or more specifically the way colors are mapped to pixels. These patches control the two calls to the two different color maps used for lights being on or off. ('On' uses the normal game colors, 'off' uses the first dark map, used in screen fadeins\fadeouts.)
Keen 1
#Light palettes:
%patch $35A9 [$253BW] #Lights on
%patch $35C9 [$2519W] #Lights off
Keen 2
#Light palettes:
%patch $640B [$2479W] #Lights on
%patch $63EB [$249BW] #Lights off
Keen 3
#Light palettes:
%patch $6C4D [$2597W] #Lights on
%patch $6C6C [$2519W] #Lights off
Special palette for lights off
This lets you make and use a custom palette for lights off (by default it uses one of the screen fading palettes.) This is more specifically a color-map patch, explained on the palettes page. It is incompatible with the new palette color change patch located there.
In this patch the 'lights off' color map call is replaced with one that calls the new patch. It's also possible to change the 'lights on' call. The palette patches page also has values for other palettes (Such as the darker fade or black screen.) The demo palette used here is monochrome (black and white.)
Keen 1
#Make a new palette for lights off:
%patch $19824 $1F $1F $1F $1F $1F $1F $1F $1F $00 $00 $00 $00 $00 $00 $00 $00 $00
%patch $35C9 [$0034W]
Keen 2
#Make a new palette for lights off:
%patch $19824 $1F $1F $1F $1F $1F $1F $1F $1F $00 $00 $00 $00 $00 $00 $00 $00 $00
%patch $640B [$0044W]
Keen 3
#Make a new palette for lights off:
%patch $19824 $1F $1F $1F $1F $1F $1F $1F $1F $00 $00 $00 $00 $00 $00 $00 $00 $00
%patch $6C6C [$0004W]
Disable light switches
It is possible to make the lights turn off, but not on, or on, but not off (If using the lights off at start patch above.) This may be useful if you want the lightswitch to change a level's gameplay permanently. Of course, using both patches makes the light switches do nothing. (But make a click sound.)
Keen 1
#Stop lights...
%patch $3722 $FE8DW #Turning off
%patch $3728 $FE67W #Turning on
Keen 2
#Stop lights...
%patch $6564 $FE8DW #Turning off
%patch $656A $FE67W #Turning on
Keen 3
#Stop lights...
%patch $6DC2 $FE8DW #Turning off
%patch $6DC7 $FE67W #Turning on
Switch speed
It takes time for the screen to change when the lights are switched on\off; by default this is pretty quick, so you don't notice much. It can be made longer however. When the screen is switching, everything is frozen, which may be an effect that is desired.
Keen 1
#Speed of lightswitcing:
%patch $359C [$0001W] #Off
%patch $35BC [$0001W] #On
Keen 2
#Speed of lightswitcing:
%patch $63DE [$0001W] #Off
%patch $63FE [$0001W] #On
Keen 3
#Speed of lightswitcing:
%patch $6C60 [$0001W] #Off
%patch $6C41 [$0001W] #On
Lightswitch tile
This is the 'official' light switch tile in-game. The game uses this to distinguish between a lightswitch and the two bridge switch tiles. If this value doesn't match the tile used the switch may become useless or act like a bridge switch instead.
Keen 1
#Change lightswitch tile (Tile must have lightswitch property)
%patch $36D6 [$010FW]
Keen 2
#Change lightswitch tile (Tile must have lightswitch property)
%patch $$6518 [$010FW]
Keen 3
#Change lightswitch tile (Tile must have lightswitch property)
%patch $$6D76 [$010FW]
Switch sounds
The sound that plays when light switches are flipped is also used for the bridge switches. As such changing it will also affect those tiles. It is also possible to disable the sound entirely.
Keen 1
%patch $35DB $19 #Flip bridge\light switch sound
%patch $35DA $EB $07 #Flip bridge\light switch sound disabled
Keen 2
%patch $641D $19 #Flip bridge\light switch sound
%patch $641C $EB $07 #Flip bridge\light switch sound disabled
Keen 3
%patch $6C7E $19 #Flip bridge\light switch sound
%patch $6C7D $EB $06 #Flip bridge\light switch sound disabled