+==========================================================================================+ |Keen 1-3 tile property format: | +==========================================================================================+ This covers the data segment that determines the properties of tiles in Keen 1-3. The segment is stored in the executable at the following addresses: Keen 1.31: $130F8 Keen 2.31: $17828 Keen 3.31: $198C8 The tile properties 'file' is internal, being stored in the executable. For the purposes of this document we will treat it as an external file, 'TILES.TLI' (As can be done with Tileinfo and patching.) In a nutshell the file is divided into six 'planes'; each composed of two-byte entries. Each plane covers a specific property of the tileset, such as animation frames, blocking-up or general behavior. The total size of the tile file is thus (tilenum * 12) bytes ------------------------------------------------------------------------------- FILE STRUCTURE: ANIMATION ENTRIES ... .. . BEAHVIOR ENTRIES ... .. . BLOCKING UP ... .. . BLOCKING RIGHT ... .. . BLOCKING DOWN ... .. . BLOCKING LEFT ... .. . ------------------------------------------------------------------------------- NOTES: ANIMATION ENTRIES: Values here are either 1, 2, or 4. (Any value not is rounded to 4.) When Keen reads a value it skips the next (val-1) entries as 'the same' Thus if it reads a value of 2, it assumes the next value is also 2. (And for 4, the next 3 values.) BEHAVIOR ENTRIES: This property is basically how a tile interacts with Keen; door, kills, etc. Valid values are between 0-31 (And value higher is 'nothing') The following list describes what value is what: -2: Masked -1: Foreground 00: Nothing 17: Exit 01: Kills 18: Key 1 02: Door 1 19: Key 2 03: Door 2 20: Key 3 04: Door 3 21: Key 4 05: Door 4 22: Message box popup 06: 500 points 23: Lightswitch 07: 100 points 24: Teleporter 08: 200 points 25: Switch on 09: 1000 points 26: Swtich off 10: 5000 points 27: Ankh 11: Joystick 28: Single bullet 12: Battery 13: Vaccum 14: Whiskey 15: Raygun 16: Pogo Anything not used by an episode (Teleporters in Keen 2) will still attempt to call the relevant code, causing errors. BLOCKING ENTRIES: The possible values here are 0, or not 0 (Usually 1) A value of 0 means Keen can move past INTO the x-or-y boundry of a tile (Its left side, bottom, etc) and a value of 1 means he is stopped from doing so. One way tiles are thus ones that let him OUT past a boundry, but not in. (But you already knew that.) Top tile values and properties are as follows: 0: Fall through 1: Solid 2: Slippery 3: Ice