Tomb Raider II .TR2 Data File Format
(Including Tomb Raider .PHD/.TUB and Tomb Raider III .TR2 information, where available)
(Also includes TOMBPC.DAT script information)
Document Version 1.00 (991108)
The Rosetta Stone was the key that unlocked the mysteries of Egyptian hieroglyphics. It contains an inscription praising King Ptolemy V, which is repeated three times - once in hieroglyphic, once in demotic, and once in Greek. By translating the Greek, comparisons could be made with the demotic and hieroglyphic versions, providing an invaluable lexicon with which to translate other hieroglyphic works. The efforts that went into making the document you are now reading could be likened to a form of digital archæology, and hopefully this document will provide sufficient information for others to decipher and create their own "TR-hieroglyphic" works.
This document contains detailed descriptions of the Tomb Raider II data file formats ({Level-name}.TR2 and TOMBPC.DAT). It is assumed that the reader has knowledge and experience programming in C or C++, and has at least a passing familiarity with graphics programming. This document is self-contained; all hyperlinks refer only to itself. All information in this document was derived independently, without the aid or assistance of anyone at Core Design or Eidos. As such, the information in this document may contain errors or omissions, and all structure and variable names were deduced from the interpretation of the data (and therefore could be misleading or completely wrong). All the information in this document was tested and is therefore plausible, but could also be a misinterpretation. All information herein is provided as is - you get what you pay for, and this one's free. This was a spare-time project that set out to document the Tomb Raider 2 file format; along the way, additional information about Tomb Raider 1 / Gold (.PHD, .TUB) and Tomb Raider 3 (.TR2) files became available, and that information is provided in context. Where applicable, Tomb Raider I, Tomb Raider Unfinished Business, and Tomb Raider Gold are all referred to as TR1, and if the information specific to TR1 is interspersed with TR2 information, the TR1 information is highlighted in RED. Likewise, Tomb Raider III is referred to as TR3, and information specific to TR3 is highlighted in GREEN. In the few places where there is such information, information specific to TR2 ONLY is highlighted in BLUE. Everything else is assumed to pertain to TR2 only, or to all three games. [Late note: as this document was being prepared for release, the Tomb Raider: Last Revelation demo was released. .TR4 files will be hopefully be addressed in a future revision of this document.]
Because of Core/Eidos' position on Tomb Raider level editing tools, it is suggested that any tools that you develop be released in source code form, anonymously, using Usenet newsgroups. Anonymity can protect you from legal action, wide distribution via Usenet prevents Core/Eidos from attempting to recall or control the distribution of your software, and distributing source code both allows multi-platform development (e.g. let others port it to the Mac or Linux for you) and encourages others to write utilities, since they can learn and benefit from your source code. Also, Linux has taught us that 40,000 people debugging a single application makes for a clean final product ;-)
Tomb Raider, Tomb Raider Gold, Unfinished Business, Tomb Raider II, Tomb Raider III, Lara Croft, and all images and data within the data files and game engine are Copyright © Core Design and/or Eidos PLC. Modification and/or distribution of any part of a Tomb Raider data file (any version) is almost certainly a copyright violation.
This document was composed at a screen resolution of 1024x768, and is best viewed at that resolution. It contains many links, but all of them refer only to this document; no link from this page will take you to another web site, and this document can be viewed offline (not connected to the Internet). Use your browser's BACK button to return from a link, e.g. if you click on a structure declaration to see its definition, clicking BACK will return you to your point of origin after you've examined the structure definition.
Table of Contents
I. The Fundamentals
Overview
Coordinates
Colours
Objects
Animations
Lighting
Basic Data Structures
Textures
Sounds
II. Room Geometry
Overview
Room Structures
V. Mesh Construction and Animation
VI. Non-Player Character Behaviour
IX. The Entire TR2 Level Format
Tomb Raider II
Tomb Raider I
Tomb Raider III
Itemized Differences between TRI and TRII
Itemized Differences between TRII and TRIII
Itemized Differences between "normal" TRs and Demos
Catalogues
TR2 Item IDs
TR1 Entity States
TR2 Entity States
TR1 Animations
TR2 Animations
TR2 Sound IDs
Overview: Tomb Raider II is driven by two sets of files. The script file, TOMBPC.DAT, contains all the text strings describing the various elements in the game (e.g. the game engine knows about "Key 1"; it looks in TOMBPC.DAT to determine the name to be displayed in Lara's inventory, such as "Rusty Key" or "Taste rostige" or "Clé Rouillée"), the level and cut-scene filenames (e.g. WALL.TR2, CUT3.TR2), the order in which they are to be played, and various per-level and per-game configuration options (e.g. what weapons and objects Lara starts the level with, whether or not the "cheat" codes work, etc.). The level files, {level-name}.TR2, contain everything about the level, including the geographical geometry, the geometry (meshes) of all animate and inanimate objects in the level, all the textures and colour data, all animation data, index information (and, in TR1, the actual sound sample data) for all sounds, accessibility maps - everything necessary to run the game. For whatever reason, Core has included everything in one file instead of breaking it up into logical groupings; this means that every level contains all the meshes, textures, sound information, and animation data for Lara and all of her weapons. There are a fair number of other redundancies, too.
For the purposes of further discussion,
the following are assumed:
bit8
specifies an 8-bit signed integer (range -128..127)
bitu8
specifies an 8-bit unsigned integer (range 0..255)
bit16
specifies a 16-bit signed integer (range -32768..32767)
bitu16
specifies a 16-bit unsigned integer (range 0..65535)
bit32
specifies a 32-bit signed integer (range -2147483648..2147483647)
bitu32
specifies a 32-bit unsigned integer (range 0..4294967295)
All multi-byte integers (bit{u}16, bit{u}32) are
stored in little-endian (Intel-x86, etc.) format, with the least significant
byte stored first and the most significant byte stored last. When using
this data in platforms with big-endian (PowerPC, etc.) number format, be
sure to reverse the order of bytes.
Data alignment is something one has to be careful about. When some entity gets an address that is a multiple of n, it is said to be n-byte aligned. The reason it is important here is that some systems prefer multibyte alignment for multibyte quantities, and compilers for such systems may pad the data to get the "correct" alignments, thus making the in-memory structures out of sync with their file counterparts. However, a compiler may be commanded to use a lower level of alignment, one that will not cause padding. And for TR's data structures, 2-byte alignment should be successful in nearly all cases, with exceptions noted below.
To set single-byte alignment in Microsoft Visual C++, use the following compiler directive:
#pragma pack(push, tr2, 1)To return to the project's default alignment, use the following directive:
#pragma pack(pop, tr2)
To achieve 2-byte alignment in Metrowerks CodeWarrior, widely used in the MacOS, use this compiler directive:
#pragma options align=mac68kTo return to the project's default alignment, use this directive:
#pragma options align=resetSimilar options exist for other compilers.
Coordinates: The world coordinate system is oriented with the X-Z plane horizontal and Y vertical, with -Y being "up" (e.g. decreasing Y values indicate increasing altitude). The world coordinate system is specified using bit32 values; however, the geography is limited to the +X/+Z quadrant for reasons that are explained below. Mesh coordinates are relative and are specified using bit16s. There are some additional coordinate values used, such as "the number of 1024-unit blocks between points A and B"; these are simply scaled versions of more conventional coordinates.
Colours: All colours in TR2
are specified either explicitly (using either the tr2_colour
structure, described below, or the 16-bit ARGB structure) or implicitly,
by indexing one of the palettes. If, for some reason, 16-bit textures
are turned off, all colours and textures use an 8-bit palette that is stored
in the .TR2 file. This palette consists of a 256-element array of
tr2_colour
structures, each designating some colour; textures and other elements
that need to reference a colour specify an index (0..255) into the Palette[]
array. There is also a 16-bit palette, which is used for identifying
colours of solid polygons. The 16-bit palette contains up to 256
four-byte entries; the first three bytes are a tr2_colour,
while the last byte is ignored (set to 0).
The 16-bit textile array, which contains tr2_textile16
structures, specifies colours using 16-bit ARGB, where the highest bit
(0x8000) is a crude alpha channel (really just simple transparency - 0
::= transparent, 1 ::= opaque). The next 5 bits (0x7c00) specify
the red channel, the next 5 bits (0x03e0) specify the green channel, and
the last 5 bits (0x001f) specify the blue channel, each on a scale from
0..31.
Objects: There are two basic types of objects in TR2 - meshes and sprites. Meshes are collections of textured or coloured polygons that are assembled to form a three-dimensional object (such as a tree, a tiger, or Lara herself). The "rooms" themselves are also composed of meshes. Mesh objects may contain more than one mesh; though these meshes are moved relative to each other, each mesh is rigid. Sprites are two-dimensional images that are inserted into three-dimensional space, such as the "secret" dragons, ammunition, medi-packs, etc. There are also animated sprite sequences, such as the fire at the end of "The Great Wall." Core had presumably used this method to reduce CPU utilization on the PlayStation and/or the earlier PCs. Sprites become less and less abundant; TR2 has very few scenery sprites, and TR3's pickups are models instead of sprites. Objects are referenced in one of two ways - as an offset into an array (e.g. Moveables[i]) or using an identifying tag (ObjectID). In the latter case, the related array (Items[], Moveables[], etc.) is searched until a matching ObjectID is found.
Animations: There are three basic types of animations in TR2, two corresponding directly with meshes and sprites, and a third type, animated textures. Sprite animation (sprite sequences) consists simply of a series of sprites that are to be displayed one after another, e.g. grenade explosions. Mesh animations are much more complex, done by what is essentially a skeletal-modeling scheme. These involve some arrays (Frames[] and MeshTree[]) of offsets and rotations for each element of a composite mesh. Frames are then grouped into an array (Animations[]) that describes discrete "movements," e.g. Lara taking a step or a tiger striking with its paw. The animations are "sewn together" by a state change array and an animation dispatch array, which, together with state information about the character, ensure that the animation is fluid (e.g. if Lara is running and the player releases the RUN key, she will stop; depending upon which of her feet was down at the time, either her left or right foot will strike the floor as part of the "stop" animation. The correct animation (left foot stop vs. right foot stop) is selected using these structures and the state information). Animated textures are simply a list of textures that are cycled through in an endless loop; they are normally used as geographic elements of the levels (e.g. water surface, bubbling lava, Atlantean plasma walls).
Lighting: There are two main types of lighting in Tomb Raider, constant and vertex. Constant lighting means that all parts of an object have the same illumination, while in vertex lighting, each polygon vertex has its own light value, and the illumination of the polygon interiors is interpolated from the vertex values. Furthermore, lighting can be either internal or external. Internal lighting is specified in an object's data, external lighting is calculated using the room's light sources (ambient light, point light sources, flares, gunshots). Light intensities are described with a single value in TR1 and a pair of values in TR2 and TR3; the paired values are almost always equal, and the pairing may reflect some feature that was only imperfectly implemented, such as off/on or minimum/maximum values. In TR1 and TR2, the light values go from 0 (maximum light) to 8192 (minimum light), while in TR3, the light values go from 0 (minimum light) to 32767 (maximum light).
Basic Data Structures: Much of the .TR2 file is comprised of structures based on a few fundamental data structures, described below.
typedef struct { // 3 bytesAnd as mentioned earlier, the 16-bit palette uses a similar structure:
typedef struct { // 4 bytes typedef
struct { // 131072 bytes
bitu16 Tile[256 * 256];
} tr2_textile16;
Textures: All mesh surfaces are either coloured or textured. Coloured surfaces are "painted" with a single colour that is either specified explicitly or using an index into the palette. Textured surfaces map textures (bitmapped images) from the texture tiles (textiles) to each point on the mesh surface. This is done using conventional UV mapping, which is specified in "Object Textures" below; each object texture specifies a mapping from a set of vertices to locations in the textile, and these texture vertices are associated with position vertices specified here.
Sounds: There are several sorts of sounds, which can be classified
as either continuous or triggered. Continuous sounds are level-background
sounds (such as the blowing wind in "The Great Wall") and sound sources
(such as waterfalls; these are in SoundSources[]). Triggered sounds are
sounds played when some event happens, such as at certain animation frames
(footsteps and other Lara sounds), when doors open and close, and when
weapons are fired. Sounds are stored in two places: the game-data files
and the CD audio tracks (the latter are separate soundfiles in the MacOS
version). The latter kind of sound is referred to straightforwardly, by
index, while the former kind of sound is referred to using a three-layer
indexing scheme, to provide a maximum amount of abstraction. An internal
sound index references SoundMap[], which points to a SoundDetails[] record,
which in turn points to a SampleIndices[] entry, which in turn points to
a sound sample. SoundDetails[] contains such features as sound intensity,
how many sound samples to choose from, among others. The sound samples
themselves are in Microsoft WAVE format, and they are embedded either in
the data files (TR1, some later TR demos) or in a separate file (MAIN.SFX)
in TR2 and TR3.
Overview: A room in TR2 is simply a rectangular three-dimensional area. A room may be "indoors" or "outdoors," may or may not be enclosed, may be accessible or inaccessible to Lara, may or may not contain doors or objects. All rooms have "portals," called "doors" in some documentation, which are pathways to adjacent rooms. There are two kinds of portals, visibility portals and collisional portals. Visibility portals are for determining how much of a room (if any) is visible from another room, while collisional portals are for enabling an object to travel from one room to another. The visibility portals are most likely for doing "portal rendering", which is a visibility-calculation scheme that goes as follows: The viewpoint is a member of some room, which is then listed as visible from it. This room's portals are checked for visibility from that viewpoint, and visible portals have their opposite-side rooms marked as visible. These rooms are then checked for portals that are visible from the viewpoint through the viewpoint's room's portals, and visible ones have their opposite-side rooms marked as visible. This operation is repeated, with viewing through intermediate portals, until all visible portals have been found. The result is a tree of rooms, starting from the viewpoint's room; only those rooms and their contents need be rendered. It is clear that both visibility and collision calculations require that objects have room memberships given for them, and indeed we shall find that most map objects have room memberships.
Rooms may overlap; as we shall see, this is involved in how horizontal collisional portals are implemented. However, different rooms may overlap without either being directly accessible from the other; there are several inadvertent examples of such "5D space" in the Tomb Raider series. The only possibly deliberate example I know of is the flying saucer in "Area 51" in TR3, whose interior is bigger than its exterior.
A room can have an "alternate room" specified for it; that means that that room can be replaced by that alternate as the game is running. This trick is used to produce such tricks as empty rooms vs. rooms full of water, scenery rearrangements (for example, the dynamited house in "Bartoli's Hideout" in TR2), and so forth. An empty room is first created, and then a full room is created at its location from a copy of it. The empty room then has that full room set as its alternate, and when that room is made to alternate, one sees a full room rather than an empty one.
The rooms are stored sequentially in an array, and "Room Numbers" are simply indices into this array (e.g. "Room Number 5" is simply Rooms[5]; the first room is Rooms[0]).
Rooms are divided into Sectors, which are 1024x1024 unit squares that form a grid on the X-Z plane. Sectors are the defining area for floor/ceiling height and various actions (e.g. a tiger appears and attacks when Lara steps on a given square); the various attributes of each sector are stored in the Sector Data (described in this section) and the FloorData. As an aside, Sectors correspond to the "squares," easily visible in all of the Tomb Raider games, that experienced players count when gauging jumps; they also account for some of the game's less-appealing graphic artifacts. Careful tiling and texture construction can make these "squares" almost invisible.
Rooms have two kinds of surfaces, rendered and collisional, much like the two kinds of portals. The former are what is seen, while the latter control how objects interact with the world geometry. Furthermore, these two types are specified separately in the room data.
Rooms are defined with a complex structure, which is described below "inside-out," meaning that the smaller component structures are described first, followed by the larger structures that are built using the smaller structures.
In TR3, BoxIndex is more complicated. Only bits 4-14 are the "real" index; bits 0-3 are most likely some kind of flag, such as what kind of footstep sound to make (wood, metal, snow). Furthermore, there is a special value of the "real" index, 2047, or 0x7ff.
typedef struct { // (variable length)
tr2_room_info info; // where the room exists, in world coordinates
bitu32 NumDataWords; // number of data words (bitu16s)
bitu16 Data[NumDataWords]; // the raw data from which the rest of
// this is derived
tr2_room_data RoomData; // the room mesh
bitu16 NumPortals; // number of visibility portals to other rooms
tr2_room_portal Portals[NumPortals]; // list of visibility portals
bitu16 NumZsectors; // "width" of sector list
bitu16 NumXsectors; // "height" of sector list
tr2_room_sector SectorList[NumXsectors * NumZsectors]; // list of sectors
// in this room
bit16 AmbientIntensity1; // This and the next one only affect
// externally-lit objects
bit16 AmbientIntensity2; // Almost always the same value as AmbientIntensity1 [absent from TR1 data files]
bit16 LightMode; // (present only in TR2: 0 is normal, 1 is
// flickering(?), 2 and 3 are uncertain)
bitu16 NumLights; // number of point lights in this room
tr2_room_light Lights[NumLights]; // list of point lights
bitu16 NumStaticMeshes; // number of static meshes
tr2_room_staticmesh StaticMeshes[NumStaticMeshes]; // list of static meshes
bit16 AlternateRoom; // number of the room that this room can alternate
// with (e.g. empty/filled with water is implemented as an empty room that alternates with a full room)
bit16 Flags; // flag bits: 0x0001 - room is filled with water,
// 0x0020 - Lara's ponytail gets blown
// by the wind;
// TR1 has only the water flag and the extra
// unknown flag 0x0100.
// TR3 most likely has flags for "is raining", "is snowing", "water is cold", and "is
// filled by quicksand", among others.
tr2_colour RoomLightColour; // Present in TR3 only; absent from TR1/TR2.
} tr2_room;
The FloorData defines special sector attributes such as floor and ceiling slopes, collisional portals to other rooms, climbability of walls, and all the various types of triggering. It is referenced by the sectors as an array of 16-bit unsigned integers, e.g. the current sector is calculated as (((CurrentX - tr2_room_info.x) / 1024) * tr2_room.NumZsectors) + ((CurrentZ - tr2_room_info.z) / 1024), which is then used as an offset into tr2_room:: SectorList[]; tr2_room_sector::FDindex is an offset into the FloorData[] array.
The FloorData consists of opcodes and operands. Opcodes are 16
bits, as follows:
Function:
bits 0..7 (0x00FF)
SubFunction:
bits 8..14 (0x7F00)
EndData:
bit 15 (0x8000)
If EndData is set, there are no more opcodes (after the current
one) in this section of FloorData; otherwise, the next opcode in
FloorData should be interpreted after the current one.
Some functions reference an FDlist, which is a separate list
of opcodes and operands that immediately follows the current FloorData
opcode. FDlist opcodes and operands are different from the base FloorData
opcodes and operands:
FDfunction: bits
10-13 (0x3C00)
Operands: bits
0-9 (0x03FF) vary, depending on FDfunction
FDcontinue: bit
15 (0x8000)
Several of the functions indicate adjustments to the sector's floor and ceiling heights; these are specified by adjusting the corner heights. The corners will be denoted as 00, 01, 10, and 11; the first is the corner's X coordinate and the second is the corner's Z coordinate, with both given as multiples of 1024.
When parsing functions for TR3, use only the lower 5 bits to find the function value, because some of TR3's functions use the upper 3 bits of the lower byte as part of the operand. However, this will also work correctly in TR1 and TR2.
FloorData Functions are described below.
Function 0x01: Portal Sector
SubFunction 0x00: Room Portal:
the next FloorData element (the operand) is the number of the room that
this sector is a collisional portal to.
An entity that arrives in
a sector with this function present will gets its room membership changed
to this function's operand, without any change in position.
Function 0x02: Floor Slant
SubFunction 0x00: Floor
Slant: The next FloorData element contains the slant values for the floor
of this sector. Slant values are specified in increments of 256 units.
The high byte (bit8) is the Z slope, while the low byte (bit8) is the X
slope. If the X slope is greater than zero, then its value is added to
the floor heights of corners 00 and 01. If it is less than zero, then its
value is subtracted from the floor heights of corners 10 and 11. If the
Z slope is greater than zero, then its value is added to the floor heights
of corners 00 and 10. If it is less than zero, then its value is subtracted
from the floor heights of corners 01 and 11.
Function 0x03: Ceiling Slant
SubFunction 0x00: Ceiling
Slant: The next FloorData element contains the slant values for the ceiling
of this sector. Slant values are specified in increments of 256 units.
The high byte (bit8) is the Z slope, while the low byte (bit8) is the X
slope. If the X slope is greater than zero, then its value is subtracted
from the ceiling heights of corners 10 and 11. If it is less than zero,
then its value is added to the ceiling heights of corners 00 and 01. If
the Z slope is greater than zero, then its value is subtracted from the
ceiling heights of corners 00 and 10. If it is less than zero, then its
value is added to the ceiling heights of corners 01 and 11.
Function 0x04: Trigger items, switch cameras,
end the level and much more.
As used below, "run FDlist(activate or deactivate)" means go through
each element in FDlist and perform its function ("run FDlist+1" just means
start at FDlist[1] rather than FDlist[0]). Activate/deactivate is
only used for the activate/deactivate item function.
There are two states for each item, active/inactive (the meaning depends
on the item, e.g. a tiger must be active to be seen, if a door is active
it is open, if it is inactive it is closed, etc.) and on/off (keyholes
and switches).
The bitu16 immediately following the 0x04 FloorData opcode contains
flags; the bits at 0x3e00 are the Activation Mask (which is XORed with
any appropriate item flags), the bit at 0x0100 indicates "state change
occurs only once". A good example of activation-mask use is the multiple-switch
room of "Palace Midas" in TR1.
SubFunction 0x00: Run FDlist(activate)
SubFunction 0x01: If Lara
is on the ground, run FDlist(activate)
SubFunction 0x02: If item
at FDlist[0] is on, run FDlist+1(activate), else run FDlist+1(deactivate)
SubFunction 0x03: If item
at FDlist[0] is on, run FDlist+1(activate)
SubFunction 0x04: If item
at FDlist[0] is picked up, run FDlist+1(activate)
SubFunction 0x05: If item
at FDlist[0] is in this sector, run FDlist+1(activate), else run FDlist+1(deactivate)
SubFunction 0x06: If Lara
is on the ground, run FDlist(deactivate)
SubFunction 0x07: unknown
SubFunction 0x08: If Lara
is not on the ground, run FDlist(activate)
(mainly used for activating collision detection with such objects as footbridges)
SubFunction 0x09: Run FDlist(deactivate)
Function 0x05: Kills Lara
Any SubFunction: If Lara
is on the ground, it kills Lara with fire.
Function 0x06: Climbable Walls
This subfunction indicates
climbability of walls; its value is the bitwise OR of the values associated
with all the climbable-wall directions (0x01 ::= +Z, 0x02 ::= +X, 0x04
::= -Z, 0x08 ::= -X), e.g. SubFunction 0x09 indicates that the walls on
both the +Z and -X sides of this sector are climbable.
Functions 0x07 to 0x12: (only in TR3) These specify the floor and ceiling slopes, which are more complicated here, since these functions specify dividing up the floors and ceilings into triangles along either of the two diagonals. Also, one of the triangles may be a collisional portal to the room above (if in the ceiling) or to the room below (if in the floor). The function word must be parsed as follows:
Bit 15: Continuation bit
Bits 10-14: value t01
Bits 5-9: value t00
Bits 0-4 function value
where t00 and t01 are signed.
It is followed by one operand, to be parsed as follows:
Bits 12-15: value t13
Bits 8-11: value t12
Bits 4-7: value t11
Bits 0-3: value t10
where t10, t11, t12, and t13 are unsigned.
Here are the triangulations and vertex adjustments; for some of the functions, one of the triangles is a portal to another room:
Functions 0x07, 0x0b, 0x0c:
Triangle 1: 00-01-10 (function 0x0b: is a portal)
Triangle 2: 11-10-01 (function 0x0c: is a portal)
Overall adjustment: adj = t00 + t01 + t10 + t12
Add these quantities to these vertex floor heights:
00: (adj - t11)
01: (adj - t12)
10: (adj - t10)
11: (adj - t13)
Functions 0x08, 0x0d, 0x0e:
Triangle 1: 01-11-00 (function 0x0d: is a portal)
Triangle 2: 10-00-11 (function 0x0e: is a portal)
Overall adjustment: adj = t00 + t01 + t11 + t13
Add these quantities to these vertex floor heights:
00: (adj - t11)
01: (adj - t12)
10: (adj - t10)
11: (adj - t13)
Functions 0x09, 0x0f, 0x10:
Triangle 1: 00-10-01 (function 0x0f: is a portal)
Triangle 2: 11-01-10 (function 0x10: is a portal)
Overall adjustment: adj = t10 + t12
Subtract these quantities from these vertex ceiling heights:
00: (adj - t12)
01: (adj - t11)
10: (adj - t13)
11: (adj - t10)
Functions 0x0a, 0x10, 0x11:
Triangle 1: 01-00-11 (function 0x11: is a portal)
Triangle 2: 10-11-00 (function 0x12: is a portal)
Overall adjustment: adj = t11 + t13
Subtract these quantities from these vertex ceiling heights:
00: (adj - t12)
01: (adj - t11)
10: (adj - t13)
11: (adj - t10)
Function 0x13:
has subfunction 0x00 and no operand. Unknown, but is possibly monkey-swingability
of the ceiling.
FloorData FDlist functions are described below:
FDfunction 0x00: Activate or deactivate item
Operand (bits 0..9): Item
index
FDfunction 0x01: Switch to camera (also uses
the bitu16 immediately following)
Operand (bits 0..6): Index
in Cameras[]
The bitu16 immediately following specifies delay and
repeatability for switched camera
Operand (bits 0..7 (0xff)):
Camera Delay
Number
of seconds to wait before automatically switching back to the normal camera.
0x00 never switches back to the normal camera.
Operand (bit 8 (0x100)):
If set, only switch to camera once; otherwise, switch to
camera every time
FDfunction 0x02: Underwater Current
Operand (bits 0..9 (0x3ff)):
direction and intensity of flow
0, 1, 2 -Z direction
in decreasing intensity (0 is strongest)
3, 4, 5 -X direction
in decreasing intensity
6, 7, 8 +Z direction
in decreasing intensity
9, 10, 11 +X direction in decreasing intensity
FDfunction 0x03:: Set AlternateRoom Variable
Operand (bit 0 (0x01)):
AlternateRoom Flag value (0/1)
FDfunction 0x04: Alter Room Flags this
affects (enhances/negates) roomflags (always paired with 0x05)
Operand: not sure, range
0 - 5
FDfunction 0x05: Alter Room Flags this affects
(enhances/negates) roomflags (always paired with 0x04)
Operand: not sure, range
0 - 5
FDfunction 0x06: Look at Item (if a camera
change is also desired, this should come first)
Operand (bits 0..9 (0x3ff)):
Item index
FDfunction 0x07: End Level
FDfunction 0x08: Play CD Track
Operand (bits 0..9 (0x3ff)):
CD track ID (TR1: Internal Sound Index)
FDfunction 0x09: Assault Course Clock Control
Operand (bits 0..9 (0x3ff)):
0x1c ::= clear clock
0x1d ::= stop clock
0x1e ::= clock reset and displayed
This opcode is also associated with switches; other values of its operand
appear to indicate switch sounds.
FDfunction 0x0a: Play "Found Secret" Sound
Operand (bits 0..9 (0x3ff)):
Which secret (0..NumSecrets-1)
FDfunction 0x0b: Unknown
While FloorData index 0 means the sector does not use floordata, there is still a "dummy" entry for index 0. This dummy entry doesn't contain any useful information.
Overview: Nearly all of the non-geographic visual elements in TR2 (as well as a few parts of the landscape) are specified as meshes. A mesh is simply a list of vertices and how they're arranged. The TR2 mesh structure includes a list of vertices as relative coordinates (which allows meshes to easily be placed anywhere in the world geometry), a list of normals (to indicate which side of each face is visible), and lists of Rectangles and Triangles, both Textured and Coloured. The elements of each tr2_face4 or tr2_face3 structure (Rectangles and Triangles) contain an offset into the Vertices[] array for the mesh. Other arrays (Moveables[], StaticMeshes[]) do not reference the array Meshes[] directly, but instead reference the array MeshPointers[], which points to locations inside of Meshes[], inside of which the meshes are stored in packed fashion.
Meshes:
The sign of the number of normals specifies
which sort of lighting to use. If the sign is positive, then external vertex
lighting is used, with the lighting calculated from the room's ambient
and point-source lighting values. The latter appears to use a simple Lambert
law for directionality: intensity is proportional to max((normal direction).(direction
to source), 0). If the sign is negative, then internal vertex lighting
is used, using the data included with the mesh.NOTE
that this is not a "real" C/C++ structure, in that the arrays are sized
by the NumXXX elements that precede them.
typedef struct {
tr2_vertex Centre;
// This is usually close to the mesh's centroid, and appears to be the
center of a sphere used for collision testing.
bit32 CollisionSize; //
This appears to be the radius of that aforementioned collisional sphere.
bit16 NumVertices; //
number of vertices in this mesh
tr2_vertex Vertices[NumVertices];
// list of vertices (relative coordinates)
bit16 NumNormals; // If
positive, number of normals in this mesh.
// If negative, number of vertex lighting elements (* (-1))
tr2_vertex Normals[NumNormals];
// list of normals (if NumNormals is positive)
bit16 Lights[-NumNormals];
// list of light values (if NumNormals is negative)
bit16 NumTexturedRectangles;
// number of textured rectangles in this mesh
tr2_face4 TexturedRectangles[NumTexturedRectangles];
// list of textured rectangles
bit16 NumTexturedTriangles;
// number of textured triangles in this mesh
tr2_face3 TexturedTriangles[NumTexturedTriangles];
// list of textured triangles
bit16 NumColouredRectangles;
// number of coloured rectangles in this mesh
tr2_face4 ColouredRectangles[NumColouredRectangles];
// list of coloured rectangles
bit16 NumColouredTriangles;
// number of coloured triangles in this mesh
tr2_face3 ColouredTriangles[NumColouredTriangles];
// list of coloured triangles
} tr2_mesh;
Static Meshes:
/*
* StaticMesh structure. This defines meshes that don't move (e.g. skeletons
* lying on the floor, spiderwebs, trees, statues, etc.)
* StaticMeshes have two bounding boxes; it is not clear why they have more than
* one. One could be the visibililty box, and one could be the collisional
* box, for instance; the former being used for visibility testing, and the
* latter for collision testing.
*/
typedef struct { // 32 bytes
bitu32 ObjectID; // Object
Identifier (matched in Items[])
bitu16 Mesh; // mesh (offset
into MeshPointers[])
tr2_vertex BoundingBox[2][2];
// First index is which one; second index is opposite corners
bitu16 Flags; // Meaning
uncertain; it is usually 2, and is 3 for objects Lara can travel through,
// like TR2's skeletons and underwater vegetation
} tr2_staticmesh;
Moveables:
/*
* Moveable structure. This defines a list of contiguous meshes that
* comprise one object.
* This structure also points to the hierarchy and offsets of the meshes
* (MeshTree), and also to the animations used (Animation); these will be
* described in detail below. If the Animation index is -1, that means that
* the entity's animations are all generated by the engine; an example is
* Lara's ponytail. Some movables are really stationary, such as locks and
* the sky, and some are not rendered, such as "look at me" points to aim
* the camera at.
*/
typedef struct { // 18 bytes
bitu32 ObjectID; // Item
Identifier (matched in Items[])
bitu16 NumMeshes; // number
of meshes in this object
bitu16 StartingMesh; //
stating mesh (offset into MeshPointers[])
bitu32 MeshTree; // offset
into MeshTree[]
bitu32 FrameOffset; //
byte offset into Frames[] (divide by 2 for Frames[i])
bitu16 Animation; // offset
into Animations[]
} tr2_moveable;
Items: Items are instances of objects, which can be sprite sequences or movables. For an object to appear in a level, it must be referenced in the Items[] array. Multiple instances are possible (e.g. two identical tigers in different rooms are represented using two entries in Items[], one for each). The object ID is used to locate the appropriate sprite sequence or movable for the item.
typedef struct {
// 24 bytes [TR1: 22 bytes]
bit16 ObjectID; // Object
Identifier (matched in Moveables[], or SpriteSequences[], as appropriate)
bit16 Room; // which room
contains this item
bit32 x; // item position
in world coordinates
bit32 y;
bit32 z;
bit16 Angle; // ((0xc000
>> 14) * 90) degrees
bit16 Intensity1; // (constant
lighting; -1 means use mesh lighting)
bit16 Intensity2; // Like
Intensity1, and almost always with the same value. [absent from TR1 data
files]
bitu16 Flags; // 0x0100
indicates "initially invisible", 0x3e00 is Activation Mask
// 0x3e00 indicates "open" or "activated";
these can be XORed with
// related FloorData::FDlist fields (e.g. for switches)
} tr2_item;
Sprites:
These are "billboard" objects that are always rendered perpendicular to the view direction. These are used for text and explosion effects and similar things; they are also used for some scenery objects and pickup items, though this use gets less as one goes from TR1 to TR3. The various "Sides" below are the positions of the sprite sides relative to the sprite's overall position, measured in TR's world-coordinate units.
typedef struct { // 16 bytes
bitu16 Tile;
bitu8 x;
bitu8 y;
bitu16 Width;
// actually (Width * 256) + 255
bitu16 Height;
// actually (Height * 256) + 255
bit16 LeftSide;
bit16 TopSide;
bit16 RightSide;
bit16 BottomSide;
} tr2_sprite_texture;
Sprite Sequences:
These are collections of sprites that are referred to as a group. The
members of this group can be cycled through (animated sprites such as flames)
or selected in other ways (text). Some sequences have only one member;
this is done so as to access all the sprites in the same way.
typedef struct { // 8 bytes
bit32 ObjectID; // Item
identifier (matched in Items[])
bit16 NegativeLength;
// negative of "how many sprites are in this sequence"
bit16 Offset; // where
(in sprite texture list) this sequence starts
} tr2_sprite_sequence;
Overview:
The animated mesh objects in the Tomb Raider series are sets of meshes
that are moved relative to each other, as defined by Moveables[] entries.
Each entry describes which meshes to be used (a contiguous set of them
referred to in MeshPointers[]), what hierarchy and relative offsets they
have (contents of MeshTree[] pointed to), and what animations are to be
used (contents of Animations[] pointed to).
The hierarchy used is a branching one, with the meshes being at the nodes, and with the first mesh being the root node. The MeshTree[] values, called "Bone2" in some documentation, are applied to each of the child meshes in sequence; they are sets of four bit32's, the first being a hierarchy operator, and the remaining three being the coordinates in the parent mesh's system. A hierarchy example is that for the Lara meshes:
Hips Left thigh Left shin Left foot Right thigh Right shin Right foot Torso Left inner arm Left outer arm Left hand Right inner arm Right outer arm Right hand Head (Ponytail is a separate object)This is implemented by using a stack of meshes and "push" and "pop" operations in MeshTree[]. Normally, each mesh's parent is the previous mesh in series. But such meshes can be "remembered" by adding them to a stack of meshes with a "push" operation. This remembered mesh can then be used as the parent mesh with a "pop" operation. It is not clear what the maximum stack depth is; most TR mesh stacks do not extend beyond 2 or 3 meshes.
The animations for each mesh object are selected with some ingenious techniques. Which animations to use are not hardcoded; instead, each entity has some states it can be in, and these states are used to select which animation. For example, locks have only one state (they just sit there), doors have two states (open and closed), and Lara has numerous states, such as standing, walking, running, jumping, falling, being hurt, dying, etc. Each animation has a state ID, which can be used to select it; however, state transitions might seem to require a large number of intermediate states (opening, closing, starting to jump, landing, etc.). The alternative used in the Tomb Raider engine is for each animation to have bridge animations to other states' animations, which are selected using the ID of which state to change to. These bridge animations then lead to the animation with the appropriate state. Thus, a closed door will run a looped closed-door animation as long as its state stays "closed", but when its state becomes "open", it will change to an opening-door bridge animation, which will end in a looped open-door animation. Likewise, closing a door will make it use a closing-door bridge animation. Some bridge animations are chosen with a finer grain of selectivity, however, such as using one for left foot forward and one for right foot forward.
Thus, each animation references a set of StateChange structures (called simply a "structure" in some documentation), each one of which references an AnimDispatch structure (called a "range" in some documentation). Each StateChange structure contains a new state and which AnimDispatch structures to use. When an entity goes into a new state, the StateChange structures are scanned for that state's ID, and if one matches, then that StateChange's AnimDispatches are then scanned for a range of frames that contains the ID of the current frame. If such an AnimDispatch is found, the animation and the frame are changed to those listed in it.
The ultimate unit of animation is, of course, the frame, and each frame consists of a bounding box, the offset of the root mesh, and rotation angles for all the meshes with respect to their parent meshes. The root mesh is also rotated, but relative to the object's overall coordinates. All rotations are performed around the meshes' origins, and are in order Y, X, Z (yaw, pitch, roll). The reason for the root mesh's displacement is because entities traveling on solid surfaces are likely tracked by having their locations be at ground level, and Lara's hips, for example, are well above the ground. Finally, some of the angles are not specified explicitly, when they are not, they are zero.
Frames are referenced in two ways, either by an offset into the Frames[] array that contains them, or by frame index. The values of the latter appear to be unique to each kind of entity, but not between entities; the first frame for each kind is numbered 0. This is likely a convenience when constructing the animations, since the list of animation frames for each entity can be constructed separately. However, using these indices is fairly simple. Each Animation structure has a first-frame index; this index is subtracted from the index of the desired frame in order to find out its index relative to the animation's first frame.
There are also some special AnimCommands (called "Bone1" in some documentation) for doing various additional things. Some of them are for setting reference points; these may either be 3D ones, for example for grab locations, or 2D ones, for jumps from surface. Some others define actions per frame, like playing sounds, emitting bubbles, and so forth.
Finally, some entities appear to have very incomplete animations; their complete animations are "borrowed" from similar entities. One example of this is the various goons in TR2's Venice levels -- some of them have a full set of animations, while some others have only the standing animation. The ones with only the standing animation borrow their other animations from the fully-animated ones.
Data Structures:
/*
* MeshTree structure
*
* MeshTree[] is actually groups of four bit32s. The first one is a
* "flags" word;
* bit 1 (0x0002) indicates "put the parent mesh on the mesh stack";
* bit 0 (0x0001) indicates "take the top mesh off of the mesh stack and
use as the parent mesh"
* when set, otherwise "use the previous mesh are
the parent mesh".
* When both are present, the bit-0 operation is always done before the
bit-1 operation; in effect, read the stack but do not change it.
* The next three bit32s are X, Y, Z offsets of the mesh's origin from
the parent mesh's origin.
*/
typedef struct { // 4 bytes
bit32 Coord;
} tr2_meshtree;
/*
* Animation structure.
* This describes each individual animation; these may be looped by specifying
* the next animation to be itself. In TR2 and TR3, one must be careful when
* parsing frames using the FrameSize value as the size of each frame, since
* an animation's frame range may extend into the next animation's frame range,
* and that may have a different FrameSize value.
*/
typedef struct { // 32 bytes
bitu32 FrameOffset; //
byte offset into Frames[] (divide by 2 for Frames[i])
bitu8 FrameRate;
// Engine ticks per frame
bitu8 FrameSize; // number
of bit16's in Frames[] used by this animation
bitu16 StateID;
bitu8 Unknown2[8];
bitu16 FrameStart; //
first frame in this animation
bitu16 FrameEnd; // last
frame in this animation (numframes = (End - Start) + 1)
bitu16 NextAnimation;
bitu16 NextFrame;
bitu16 NumStateChanges;
bitu16 StateChangeOffset;
// offset into StateChanges[]
bitu16 NumAnimCommands;
// How many of them to use.
bitu16 AnimCommand; //
offset into AnimCommand[]
} tr2_animation;
/*
* State Change structure
* Each one contains the state to change to and which animation dispatches
* to use; there may be more than one, with each separate one covering a different
* range of frames.
*/
typedef struct { // 6 bytes
bitu16 StateID;
bitu16 NumAnimDispatches;
// number of ranges (seems to always be 1..5)
bitu16 AnimDispatch; //
Offset into AnimDispatches[]
} tr2_state_change;
/*
* Animation Dispatch structure
* This specifies the next animation and frame to use; these are associated
* with some range of frames. This makes possible such specificity as one
* animation for left foot forward and another animation for right foot forward.
*/
typedef struct { // 8 bytes
bit16 Low;
// Lowest frame that uses this range
bit16 High;
// Highest frame (+1?) that uses this range
bit16 NextAnimation;
// Animation to dispatch to
bit16 NextFrame;
// Frame offset to dispatch to
} tr2_anim_dispatch;
/*
* AnimCommand structure
* These are various commands associated with each animation; they are
* called "Bone1" in some documentation. They are varying numbers of bit16's
* packed into an array; the first of each set is the opcode, which determines
* how operand bit16's follow it. Some of them refer to the whole animation
* (jump and grab points, etc.), while others of them are associated with
* specific frames (sound, bubbles, etc.).
*/
typedef struct { // 2 bytes
bit16 Value;
} tr2_anim_command;
Here are all the AnimCommand opcodes and their operands:
// 1: 3 operands. Position reference: (x,y,z); found in grab and block-move
animations
// 2: 2 operands. Position reference on surface for jumping: (x,z)
for horizontal and (y,z) for vertical surfaces(?)
// 3: No operands. Not clear; occurs in animations that are "slaved"
to other animations, such as Lara throwing switches or moving blocks.
// 4: No operands. Not clear; occurs in some death and settling-down
animations, but not all.
// 5: 2 operands. The first one is a frame number, and the second one
is the ID of the sound to play at that frame (internal sound index).
In TR2 and TR3, one of the sound indices two highest bits may be set;
when they are, their meanings are
0x4000 -- play this sound when on dry land (example: footsteps)
0x8000 -- play this sound when in water (example: running through shallow
water)
// 6: 2 operands. The first one is a frame number, and the second one
is some miscellaneous action.
// 0: Occurs in flipping-over animations; freeze
camera at current position until end of animation?
// 3: Make bubble
// 12: Temporarily stop responding to controls?
// etc.
14 and 15: Some kind of camera control?
18: ?
19: ?
20: Lara changing clothes (using a different Lara model)
21: ?
22: ?
23: Hide object
24: Show object
26: Some kind of camera control?
TR3 has additional ones, such as
-32736 = 0x8000 + 32
32
16416 = 0x4000 + 32
/*
* Frame structure.
*
* Frames indicate how composite meshes are positioned and rotated.
They work
* in conjunction with Animations[] and MeshTree[]. A given frame has
the following
* format:
* bit16 BB1x, BB1y, BB1z // bounding box (low)
* bit16 BB2x, BB2y, BB2z // bounding box (high)
* bit16 OffsetX, OffsetY, OffsetZ // starting offset for this moveable
* (TR1 ONLY: bit16 NumValues // number of angle
sets to follow; these start with the first mesh, and meshes without angles
get zero angles.)
* (TR2/3: NumValues is implicitly NumMeshes (from moveable))
* What follows next is a list of angle sets. In TR2/3, an angle set
can
* specify either one or three axes of rotation. If either of the high
two
* bits (0xc000) of the first angle bitu16 are set, it's one axis: only
one
* bitu16, low 10 bits (0x03ff), scale is 0x100 ::= 90 degrees; the
high two
* bits are interpreted as follows: 0x4000 ::= X only, 0x8000 ::= Y
only,
* 0xC000 ::= Z only.
* If neither of the high bits are set, it's a three-axis rotation.
The next
* 10 bits (0x3ff0) are the X rotation, the next 10 (including the following
* bitu16) (0x000f, 0xfc00) are the Y rotation, the next 10 (0x03ff)
are the
* Z rotation, same scale as before (0x100 ::= 90 degrees).
* Rotations are performed in Y, X, Z order.
* TR1 ONLY: All angle sets are two words and
interpreted like the two-word
* sets in TR2/3, EXCEPT that the word order is
reversed.
*/
Overview:
All the Tomb Raider game physics and entity behavior appears to be
hardcoded, with each type ID being associated with some specific sort of
behavior (as Lara, as a boat, as a tiger, as a door, as a boulder, as a
lock, etc.). There is no sign of the sorts of schemes used by some other
game engines for specifying this behavior in data files. One scheme is
to use generic characters, generic projectiles, and so forth, and to specialize
them by reading in appropriate records from data files. Another scheme is to use interpreted pseudocode; this
is used by id's Quake. This hardcoding makes it difficult to port the earlier
Tomb Raider scenarios to the engines of the later games, which could be
desirable with their improved 3D-card and sound-card support. While textures,
models, and animations can be ported, behavior cannot be.
However, there is a hint that TR3 may have some such information. Some of its characters are hostile in some levels, and not in others (the India-level monkeys, the Antarctica-level flamethrower wielders); there may be some flag in Items[] that determines whether a character is hostile or not. But the hostile and non-hostile versions of these characters may have separate type ID's.
Despite that lack, the Tomb Raider series does have navigation hints for the Non-Player Characters; those entities that move freely across the maps under the command of the game AI. One of the NPC's is the camera, since only Lara (and the vehicles she rides) is under the direct control of the player; the game AI makes the camera follow Lara. The camera uses the navigation hints used by the flying NPC's; these can be constructed so as to help the camera out of tight spots.
The navigation hints are three data structures: boxes, overlaps, and zones. Most sectors point to some box, the main exceptions being horizontal-portal sectors. Several neighbring sectors may point to the same box. A box is a horizontal rectangle, with corners and height specified; each box also has a pointer into the list of overlaps. Each segment in that list is the list of accessible neighboring boxes for some box; the NPC's apparently select from this list to decide where to go next. This selection is done with the help of the zones. These structures of 6 (TR1) or 10 (TR2, TR3) bit16's that act as zone ID's; their overall indexing is the same as the boxes, meaning that each box will have an associated set of zone ID's. An NPC will select one of this set to use, and will prefer to go into the overlaps-list boxes that have the same zone value as the box it is currently in. For example, one can create guard paths by making chains of zone-ID-sharing boxes, with their overlaps pointing to the next boxes in those chains.
Data Structures:
Boxes:
typedef struct { // 8 bytes [TR1: 20 bytes]
In
TR1, the first four are bit32's instead of bitu8's, and are not scaled.
bitu8 Zmin;
// sectors (* 1024 units)
bitu8 Zmax;
bitu8 Xmin;
bitu8 Xmax;
bit16 TrueFloor; // Y
value (no scaling)
bit16 OverlapIndex; //
index into Overlaps[]. The high bit is sometimes set; this
// occurs in front of swinging doors and the like.
} tr2_box;
Overlaps:
This is a set of lists of neighboring boxes for each box, each member being a bitu16; the highest bit being set marks the end of each list. NPC's apparently use this list to decide where to go next.
Zones:
This is a set of bit16's, 6 for TR1 and 10 for TR2 and TR3. NPCs prefer to travel to a box with the same zone ID as the one they are currently at. Which of these zone ID's it uses depends on the kind of the NPC and its current state. The first half of the Zones structure is for the "normal" room state, and the second half is for the "alternate" room state. TR1, for example, has 2 sets of ground zones and 1 set of fly zones; its zones are
ground zone 1 (normal)
ground zone 2 (normal)
fly zone (normal)
ground zone 1 (alternate)
ground zone 2 (alternate)
fly zone (alternate)
The ground zones are for NPC's that travel on the ground, while the
fly zones are for flying or swimming NPC's. TR2 and TR3 have similar breakdowns,
though they have 4 ground zones.
Overview:
The Tomb Raider series makes abundant use of sound, which appears in
a variety of contexts. Sounds can be either continuous or triggered. Continuous
ones can be for the whole level or produced by some sound-source object.
The whole-level sound is a CD-track sound, which is played continuously,
thus the blowing-wind sounds in the underground parts of "The Great Wall".
Sound-source objects make sound in a range around some specific point.
Likewise, triggered ones can be triggered by a variety of events. The triggering
can be hardcoded in the engine (gunshots, switch pulls) or by reaching
some animation frame (footsteps, Lara's somewhat unladylike sounds). Switch
pulls and/or door sounds may be specified with operand of FDFunction 0x09;
operand values lower than those used for assault-course clock control may
specify which sounds to use.
Though CD-track sounds are referred to by track index, game-data sounds are referred to by an internal sound index; this is translated into which sound sample with the help of three layers of indexing, to allow for a suitable degree of abstraction. Internal sound indices for various sounds appear to be consistent across all the level files in a game; a gunshot or a passport opening in one level file will have the same internal sound index as in all the others. The highest level of these is the SoundMap[] array, which translates the internal sound index into an index into SoundDetails[]. Each SoundDetails record contains such details as the sound intensity, how many samples to select from, and an index into SampleIndices[]. This allows for selecting among multiple samples to produce variety; that index is the index to the SampleIndices[] value of first of these, with the rest of them being having the next indices in series of that array. Thus, if the number of samples is 4, then the TR engine looks in SampleIndices[] locations Index, Index+1, Index+2, and Index+3. Finally, the SampleIndices[] array references some arrays of sound samples. In TR1, these samples are embedded in the level files, and SampleIndices[] contains the displacements of each one in bytes from the beginning of that embedded block. In TR2 and TR3, these samples are concatenated in the file "MAIN.SFX" with no additional information; SampleIndices[] contains sequence numbers (0, 1, 2, 3, ...) in MAIN.SFX. Finally , the samples themselves are all in Microsoft WAVE format.
The CD-audio tracks are stored in different fashions in the various
versions of the TR series. In the PC version of TR3, they are all stored
in the file CDAUDIO.WAD, which has the format (source: Sven, BachmannS@gmx.net,
http://wotsit.org/cgi-bin/download.cgi?tr3audio): a series of header records
with this format:
{ // 0x108 bytes
bit32 SampleLength; // how many bytes
bit32 SampleOffset; // offset in file
bit8 Name[256]; // C string; the length is a guess, because Sven's sizes are inconsistent.
};
followed by embedded samples in the Microsoft WAVE format.
In the Macintosh versions of TR1 and TR2, the CD audio tracks are separate files in AIFF format, while in the Macintosh version of TR3, these tracks are separate files in Microsoft WAVE format. The Macintosh version of TR3 contains an additional file, CDAudio.db, which contains the names of all the track files as 32-byte zero-padded C strings with no extra contents.
Data Structures:
/*
* SoundSource structure
* This structure contains the details of continuous-sound sources. Although
* a SoundSource object has a position, it has no room membership; the sound
* seems to propagate omnidirectionally for about 10 horizontal-grid sizes
* without regard for the presence of walls.
*/
typedef struct {
bit32 x;
// absolute X position of sound source (world coordinates)
bit32 y;
// absolute Y position of sound source (world coordinates)
bit32 z;
// absolute Z position of sound source (world coordinates)
bitu16 SoundID; // internal
sound index
bitu16 Flags; // 0x40,
0x80, or 0xc0
} tr2_sound_source;
SoundMap is for mapping from internal-sound index to SoundDetails index; it is 370 bit16s in TR2 and TR3 and 256 bit16s in TR1. A value of -1 indicates "none".
/*
* Sound-sample details (SoundDetails)
*/
typedef struct { // 8 bytes
bit16 Sample; // (index
into SampleIndices)
bit16 Volume;
bit16 Unknown1; // sound
range? (distance at which this sound can be heard?)
bit16 Unknown2; // Bits
8-15: priority?, Bits 2-7: number of sound
// samples in this group, Bits 0-1: channel number?
} tr2_sound_details;
SampleIndices: In TR1, this is a list of
indices into the embedded sound-samples object, which precedes this object
in the level file. In TR2 and TR3, this is a list of indices into
the file "MAIN.SFX"; the indices are the index numbers of that file's embedded
sound samples, rather than the samples' starting locations. That file itself
is a set of concatenated soundfiles with no catalogue info present. In
all the TR series, the sound format used is Microsoft WAVE (.wav).
These are various odds and ends that do not fit into the earlier categories.
Version: Every level file (.PHD, .TUB, .TR2) begins with a bitu32 version number. This seems to be used by the engine to guarantee compatibility between various level editor versions and the game engine version. More generally, it can be used to determine what sort of level is being read. Here are the known (observed) values for the version header:
0x00000020
Tomb Raider 1, Gold, Unfinished Business
0x0000002d
Tomb Raider 2
0xFF080038
Tomb Raider 3
0xFF180038
Tomb Raider 3
Palette: This consists of 256 tr2_colour structs, one for each palette entry. However, the individual colour values range from 0 to 63; they must be multiplied by 4 to get the correct values.
This used for all 8-bit colour, such as 8-bit textures.
Object Textures:
/*
* Object-texture vertex structure. It specifies a vertex location in
textile coordinates.
* The Xpixel and Ypixel are the actual coordinates of the vertex's pixel.
* The Xcoordinate and Ycoordinate values depend on where the other vertices
* are in the object texture. And if the object texture is used to specify
* a triangle, then the fourth vertex's values will all be zero.
*/
typedef struct { // 4
bytes
bitu8 Xcoordinate; //
1 if Xpixel is the low value, 255 if Xpixel is the high value in the object
texture
bitu8 Xpixel;
bitu8 Ycoordinate; //
1 if Ypixel is the low value, 255 if Ypixel is the high value in the object
texture
bitu8 Ypixel;
} tr2_object_texture_vert;
/*
* Object texture structure.
* These, thee contents of ObjectTextures[], are used for specifying texture
* mapping for the world geometry and for mesh objects.
*/
typedef struct { // 20 bytes
bitu16 Attribute;
// 0 means that a texture is all-opaque, and that transparency
// information is ignored.
// 1 means that transparency information is used. In 8-bit colour,
// index 0 is the transparent colour, while in 16-bit colour, the
// top bit (0x8000) is the alpha channel (1 = opaque, 0 = transparent).
// 2 (only in TR3) means that the opacity (alpha)
is equal to the intensity;
// the brighter the colour, the more opaque it
is. The intensity is probably calculated
// as the maximum of the individual
color values.
bitu16 Tile; // index
into textile list
tr2_object_texture_vert
Vertices[4]; // the four corners of the texture
} tr2_object_texture;
Animated Textures:
Animated textures describe sets of object textures that are cycled through to produce texture animations; they are a set of bit16's with the following format (not a "real" C/C++ structure):
bit16 NumAnimatedTextures
struct {
bit16 NumTextureIDs; // Actually, this is
the number of texture ID's - 1.
bit16 TextureIDs[NumTextureIDs + 1]; // offsets
into ObjectTextures[], in animation order.
} AnimatedTextures[NumAnimatedTextures];
If a texture belongs to an animated-texture group, it will automatically
be animated by the engine. The animation framerate is most likely hardcoded.
Cameras:
These are positions to switch the camera to; the camera gets switched
to one of these as specified in the floordata, which also specify what
to look at, how long to switch, and whether to do so only once.
typedef struct {
bit32 x;
bit32 y;
bit32 z;
bit16 Room;
bitu16 Unknown1; // correlates
to Boxes[]? Zones[]?
} tr2_camera;
Cinematic Frames:
These are camera positionings for cutscenes. All the entity animations
are specified separately, and it is not clear where there is any syncing
between these frames and any of the animations.
typedef struct {
bit16 rotY;
// rotation about Y axis, +/- 32767 == +/- 180 degrees
bit16 rotZ;
// rotation about Z axis, +/- 32767 == +/- 180 degrees
bit16 rotZ2; //
seems to work a lot like rotZ; I haven't yet been able to
// differentiate them
bit16 posZ;
// camera position relative to something (target? Lara? room
// origin?). pos* are _not_ in world coordinates.
bit16 posY;
// camera position relative to something (see posZ)
bit16 posX;
// camera position relative to something (see posZ)
bit16 unknown; // changing
this can cause a runtime error
bit16 rotX;
// rotation about X axis, +/- 32767 == +/- 180 degrees
} tr2_cinematic_frame;
LightMap:
A 32*256 array of bitu8's which is apparently for applying light to
8-bit colour, in some documentation called "ColourMap". The current palette
index and lighting value are used to calcuate an index to this table, which
is a table of palette indices.
The Tomb Raider series' software rendering, like that of most real-time-3D games, uses 8-bit colour for speed and low bulk; however, there is the serious problem of how to do lighting with 8-bit colour, because doing it directly is computationally expensive. The usual solution is to arrange the palettes' colours in ramps, which the engine then follows in the appropriate directions. However, the TR series' palettes generally lack such neat ramps.
But the TR series has a more general solution, one that does not require palettes to have colour ramps. It uses precalculated lighting tables, the "ColourMap" objects. These contain translations of a colour value and a lighting value, listed by palette index. The translation goes as follows:
n = ColourMap[256 * k + i];
where i is the original palette index, k is determined from the lighting
value, and n is the new palette index. The lighting index k varies from
0 to 31, and the corresponding lighting value is, for TR1,
2 - k / 16
and for TR2 and TR3,
2 - (k + 1) / 16
This may be associated with the curious fact of the lighting values
in the data files increasing in the "wrong" direction in TR1 and TR2, with
0 being full brightness and greater values being darker.
What follows is the physical .TR2 file layout, byte for byte. Note
that this is not a "real" C/C++ structure, in that some arrays are variable-length,
with the length being defined by another element of the structure.
bitu32 Version; // version (4 bytes)
tr2_colour Palette[256]; // 8-bit
palette (768 bytes)
tr2_colour4 Palette16[256]; //
(1024 bytes)
bitu32 NumTextiles; // number of texture
tiles (4 bytes)
tr2_textile8 Textile8[NumTextiles];
// 8-bit (palettized) textiles (NumTextiles * 65536 bytes)
tr2_textile16 Textile16[NumTextiles];
// 16-bit (ARGB) textiles (NumTextiles * 131072 bytes)
bitu32 Unused; // 32-bit unused value (4
bytes)
bitu16 NumRooms; // number of rooms (2 bytes)
struct {
tr2_room_info
RoomInfo; // room header (16 bytes)
bitu32 NumData; // number
of data bitu16's to follow (=RoomData) (4 bytes)
struct {
bitu16
NumVertices; // number of vertices to follow (2 bytes)
tr2_vertex_room
Vertices[NumVertices]; // vertex list (NumVertices * 12 bytes)
bitu16
NumRectangles; // number of rectangles to follow (2 bytes)
tr2_face4
Rectangles[NumRectangles]; // rectangle list (NumRectangles * 10 bytes)
bitu16
NumTriangles; // number of triangles to follow (2 bytes)
tr2_face3
Triangles[NumTriangles]; // triangle list (NumTriangles * 8 bytes)
bitu16
NumSprites; // number of sprites to follow (2 bytes)
tr2_room_sprite
Sprites[NumSprites]; // room sprite list (NumSprites * 4 bytes)
bitu16
NumDoors; // number of doors to follow (2 bytes)
tr2_room_door
Doors[NumDoors]; // door list (NumDoors * 32 bytes)
bitu16
NumZsector; // sector table width (2 bytes)
bitu16
NumXsector; // sector table height (2 bytes)
tr2_room_sector
SectorData[NumZsector * NumXsector]; // sector table (NumZsector * NumXsector
* 8 bytes)
bit16
Intensity1;
bit16
Intensity2;
bit16
LightMode;
bitu16
NumLights; // number of lights to follow (2 bytes)
tr2_room_light
Lights[NumLights]; // light list (NumLights * 24 bytes)
bitu16
NumStaticMeshes; // number of static mesh records to follow (2 bytes)
tr2_room_staticmesh
StaticMeshes[NumStaticMeshes]; // static mesh data (NumStaticMeshes * 20
bytes)
bit16
AlternateRoom; // (2 bytes)
bitu16
Flags; // (2 bytes)
} RoomData;
} Rooms[NumRooms];
bitu32 NumFloorData; // number of floor data
bitu16's to follow (4 bytes)
bitu16 FloorData[NumFloorData]; // floor
data (NumFloorData * 2 bytes)
bitu32 NumMeshData; // number of bitu16's
of mesh data to follow (=Meshes[]) (4 bytes)
struct {
tr2_vertex Centre;
// relative coordinates of mesh centre (6 bytes)
bitu8 Unknown1[4]; //
unknown (4 bytes)
bit16 NumVertices; //
number of vertices to follow (2 bytes)
tr2_vertex Vertices[NumVertices];
// list of vertices (NumVertices * 6 bytes)
bit16 NumNormals; // number
of normals to follow (2 bytes)
tr2_vertex Normals[NumNormals];
// list of normals (NumNormals * 6 bytes) (becomes Lights if NumNormals
< 0; 2 bytes)
bit16 NumTexturedRectangles;
// number of textured rectangles to follow (2 bytes)
tr2_face4 TexturedRectangles[NumTexturedRectangles];
// list of textured rectangles (NumTexturedRectangles * 10 bytes)
bit16 NumTexturedTriangles;
// number of textured triangles to follow (2 bytes)
tr2_face3 TexturedTriangles[NumTexturedTriangles];
// list of textured triangles (NumTexturedTriangles * 8 bytes)
bit16 NumColouredRectangles;
// number of coloured rectangles to follow (2 bytes)
tr2_face4 ColouredRectangles[NumColouredRectangles];
// list of coloured rectangles (NumColouredRectangles * 10 bytes)
bit16 NumColouredTriangles;
// number of coloured triangles to follow (2 bytes)
tr2_face3 ColouredTriangles[NumColouredTriangles];
// list of coloured triangles (NumColouredTriangles * 8 bytes)
} Meshes[NumMeshPointers]; // note that NumMeshPointers
comes AFTER Meshes[]
bitu32 NumMeshPointers; // number of mesh
pointers to follow (4 bytes)
bitu32 MeshPointers[NumMeshPointers]; //
mesh pointer list (NumMeshPointers * 4 bytes)
bitu32 NumAnimations; // number of animations
to follow (4 bytes)
tr2_animation Animations[NumAnimations];
// animation list (NumAnimations * 32 bytes)
bitu32 NumStateChanges; // number of state
changes to follow (4 bytes)
tr2_state_change StateChanges[NumStateChanges];
// state-change list (NumStructures * 6 bytes)
bitu32 NumAnimDispatches; // number of animation
dispatches to follow (4 bytes)
tr2_anim_dispatch AnimDispatches[NumAnimDispatches];
// animation-dispatch list list (NumAnimDispatches * 8 bytes)
bitu32 NumAnimCommands; // number of animation
commands to follow (4 bytes)
tr2_anim_command AnimCommands[NumAnimCommands];
// animation-command list (NumAnimCommands * 2 bytes)
bitu32 NumMeshTrees; // number of MeshTrees
to follow (4 bytes)
tr2_meshtree MeshTrees[NumMeshTrees];
// MeshTree list (NumMeshTrees * 4 bytes)
bitu32 NumFrames; // number of words of frame
data to follow (4 bytes)
bitu16 Frames[NumFrames]; // frame data (NumFrames
* 2 bytes)
bitu32 NumMoveables; // number of moveables
to follow (4 bytes)
tr2_moveable Moveables[NumMoveables];
// moveable list (NumMoveables * 18 bytes)
bitu32 NumStaticMeshes; // number of StaticMesh
data records to follow (4 bytes)
tr2_staticmesh StaticMeshes[NumStaticMeshes];
// StaticMesh data (NumStaticMesh * 32 bytes)
bitu32 NumObjectTextures; // number of object
textures to follow (4 bytes)
tr2_object_texture ObjectTextures[NumObjectTextures];
// object texture list (NumObjectTextures * 20 bytes) (after AnimatedTextures
in TR3)
bitu32 NumSpriteTextures; // number of sprite
textures to follow (4 bytes)
tr2_sprite_texture SpriteTextures[NumSpriteTextures];
// sprite texture list (NumSpriteTextures * 16 bytes)
bitu32 NumSpriteSequences; // number of sprite
sequences records to follow (4 bytes)
tr2_sprite_sequence SpriteSequences[NumSpriteSequences];
// sprite sequence data (NumSpriteSequences * 8 bytes)
bitu32 NumCameras; // number of camera data
records to follow (4 bytes)
tr2_camera Cameras[NumCameras]; //
camera data (NumCameras * 16 bytes)
bitu32 NumSoundSources; // number of sound
source data records to follow (4 bytes)
tr2_sound_source SoundSources[NumSoundSources];
// sound source data (NumSoundSources * 16 bytes)
bitu32 NumBoxes; // number of box data records
to follow (4 bytes)
tr2_box Boxes[NumBoxes]; // box data
(NumBoxes * 8 bytes)
bitu32 NumOverlaps; // number of overlap
records to follow (4 bytes)
bitu16 Overlaps[NumOverlaps]; // overlap
data (NumOverlaps * 2 bytes)
10*bit16 Zones[NumBoxes]; // zone data (NumBoxes
* 20 bytes)
bitu32 NumAnimatedTextures; // number of
animated texture records to follow (4 bytes)
bitu16 AnimatedTextures[NumAnimatedTextures];
// animated texture data (NumAnimatedTextures * 2 bytes)
bitu32 NumItems; // number of items to follow
(4 bytes)
tr2_item Items[NumItems]; // item list
(NumItems * 24 bytes)
bitu8 LightMap[32 * 256]; // light map (8192
bytes)
bitu16 NumCinematicFrames; // number of cinematic
frame records to follow (2 bytes)
tr2_cinematic_frame CinematicFrames[NumCinematicFrames];
// (NumCinematicFrames * 16 bytes)
bitu16 NumDemoData; // number of demo data
records to follow (2 bytes)
bitu8 DemoData[NumDemoData]; // demo data
(NumDemoData bytes)
bit16 SoundMap[370]; // sound map (740 bytes)
bitu32 NumSoundDetails; // number of sound-detail
records to follow (4 bytes)
tr2_sample_info SoundDetails[NumSoundDetails];
// sound-detail list (NumSoundDetails * 8 bytes)
bitu32 NumSampleIndices; // number of sample
indices to follow (4 bytes)
bitu32 SampleIndices[NumSampleIndices]; //
sample indices (NumSampleIndices * 4 bytes)
What follows is the physical .PHD file layout, byte for byte. Note
that this is not a "real" C/C++ structure, in that some arrays are variable-length,
with the length being defined by another element of the structure.
bitu32 Version; // version (4 bytes)
bitu32 NumTextiles; // number of texture
tiles (4 bytes)
tr2_textile8 Textile8[NumTextiles];
// 8-bit (palettized) textiles (NumTextiles * 65536 bytes)
bitu32 Unused; // 32-bit unused value (4
bytes)
bitu16 NumRooms; // number of rooms (2 bytes)
struct {
tr2_room_info
RoomInfo; // room header (16 bytes)
bitu32 NumData; // number
of data bitu16's to follow (=RoomData) (4 bytes)
struct {
bitu16
NumVertices; // number of vertices to follow (2 bytes)
tr2_vertex_room
Vertices[NumVertices]; // vertex list (NumVertices * 8 bytes [TR1 version])
bitu16
NumRectangles; // number of rectangles to follow (2 bytes)
tr2_face4
Rectangles[NumRectangles]; // rectangle list (NumRectangles * 10 bytes)
bitu16
NumTriangles; // number of triangles to follow (2 bytes)
tr2_face3
Triangles[NumTriangles]; // triangle list (NumTriangles * 8 bytes)
bitu16
NumSprites; // number of sprites to follow (2 bytes)
tr2_room_sprite
Sprites[NumSprites]; // room sprite list (NumSprites * 4 bytes)
bitu16
NumDoors; // number of doors to follow (2 bytes)
tr2_room_door
Doors[NumDoors]; // door list (NumDoors * 32 bytes)
bitu16
NumZsector; // sector table width (2 bytes)
bitu16
NumXsector; // sector table height (2 bytes)
tr2_room_sector
SectorData[NumZsector * NumXsector]; // sector table (NumZsector * NumXsector
* 8 bytes)
bit16
Intensity1;
bitu16
NumLights; // number of lights to follow (2 bytes)
tr2_room_light
Lights[NumLights]; // light list (NumLights * 18 bytes [TR1 version])
bitu16
NumStaticMeshes; // number of static mesh records to follow (2 bytes)
tr2_room_staticmesh
StaticMeshes[NumStaticMeshes]; // static mesh data (NumStaticMeshes * 18
bytes [TR1 version])
bit16
AlternateRoom; // (2 bytes)
bitu16
Flags; // (2 bytes)
} RoomData;
} Rooms[NumRooms];
bitu32 NumFloorData; // number of floor data
bitu16's to follow (4 bytes)
bitu16 FloorData[NumFloorData]; // floor
data (NumFloorData * 2 bytes)
bitu32 NumMeshData; // number of bitu16's
of mesh data to follow (=Meshes[]) (4 bytes)
struct {
tr2_vertex Centre;
// relative coordinates of mesh centre (6 bytes)
bitu8 Unknown1[4]; //
unknown (4 bytes)
bit16 NumVertices; //
number of vertices to follow (2 bytes)
tr2_vertex Vertices[NumVertices];
// list of vertices (NumVertices * 6 bytes)
bit16 NumNormals; // number
of normals to follow (2 bytes)
tr2_vertex Normals[NumNormals];
// list of normals (NumNormals * 6 bytes) (becomes Lights if NumNormals
< 0; 2 bytes)
bit16 NumTexturedRectangles;
// number of textured rectangles to follow (2 bytes)
tr2_face4 TexturedRectangles[NumTexturedRectangles];
// list of textured rectangles (NumTexturedRectangles * 10 bytes)
bit16 NumTexturedTriangles;
// number of textured triangles to follow (2 bytes)
tr2_face3 TexturedTriangles[NumTexturedTriangles];
// list of textured triangles (NumTexturedTriangles * 8 bytes)
bit16 NumColouredRectangles;
// number of coloured rectangles to follow (2 bytes)
tr2_face4 ColouredRectangles[NumColouredRectangles];
// list of coloured rectangles (NumColouredRectangles * 10 bytes)
bit16 NumColouredTriangles;
// number of coloured triangles to follow (2 bytes)
tr2_face3 ColouredTriangles[NumColouredTriangles];
// list of coloured triangles (NumColouredTriangles * 8 bytes)
} Meshes[NumMeshPointers]; // note that NumMeshPointers
comes AFTER Meshes[]
bitu32 NumMeshPointers; // number of mesh
pointers to follow (4 bytes)
bitu32 MeshPointers[NumMeshPointers]; //
mesh pointer list (NumMeshPointers * 4 bytes)
bitu32 NumAnimations; // number of animations
to follow (4 bytes)
tr2_animation Animations[NumAnimations];
// animation list (NumAnimations * 32 bytes)
bitu32 NumStateChanges; // number of state
changes to follow (4 bytes)
tr2_state_change StateChanges[NumStateChanges];
// state-change list (NumStructures * 6 bytes)
bitu32 NumAnimDispatches; // number of animation
dispatches to follow (4 bytes)
tr2_anim_dispatch AnimDispatches[NumAnimDispatches];
// animation-dispatch list list (NumAnimDispatches * 8 bytes)
bitu32 NumAnimCommands; // number of animation
commands to follow (4 bytes)
tr2_anim_command AnimCommands[NumAnimCommands];
// animation-command list (NumAnimCommands * 2 bytes)
bitu32 NumMeshTrees; // number of MeshTrees
to follow (4 bytes)
tr2_meshtree MeshTrees[NumMeshTrees];
// MeshTree list (NumMeshTrees * 4 bytes)
bitu32 NumFrames; // number of words of frame
data to follow (4 bytes)
bitu16 Frames[NumFrames]; // frame data (NumFrames
* 2 bytes)
bitu32 NumMoveables; // number of moveables
to follow (4 bytes)
tr2_moveable Moveables[NumMoveables];
// moveable list (NumMoveables * 18 bytes)
bitu32 NumStaticMeshes; // number of StaticMesh
data records to follow (4 bytes)
tr2_staticmesh StaticMeshes[NumStaticMeshes];
// StaticMesh data (NumStaticMesh * 32 bytes)
bitu32 NumObjectTextures; // number of object
textures to follow (4 bytes) (after AnimatedTextures in TR3)
tr2_object_texture ObjectTextures[NumObjectTextures];
// object texture list (NumObjectTextures * 20 bytes) (after AnimatedTextures
in TR3)
bitu32 NumSpriteTextures; // number of sprite
textures to follow (4 bytes)
tr2_sprite_texture SpriteTextures[NumSpriteTextures];
// sprite texture list (NumSpriteTextures * 16 bytes)
bitu32 NumSpriteSequences; // number of sprite
sequences records to follow (4 bytes)
tr2_sprite_sequence SpriteSequences[NumSpriteSequences];
// sprite sequence data (NumSpriteSequences * 8 bytes)
bitu32 NumCameras; // number of camera data
records to follow (4 bytes)
tr2_camera Cameras[NumCameras]; //
camera data (NumCameras * 16 bytes)
bitu32 NumSoundSources; // number of sound
source data records to follow (4 bytes)
tr2_sound_source SoundSources[NumSoundSources];
// sound source data (NumSoundSources * 16 bytes)
bitu32 NumBoxes; // number of box data records
to follow (4 bytes)
tr2_box Boxes[NumBoxes]; // box data
(NumBoxes * 20 bytes [TR1 version])
bitu32 NumOverlaps; // number of overlap
records to follow (4 bytes)
bitu16 Overlaps[NumOverlaps]; // overlap
data (NumOverlaps * 2 bytes)
6*bit16 Zones[NumBoxes]; // zone data (NumBoxes
* 12 bytes [TR1 version])
bitu32 NumAnimatedTextures; // number of
animated texture records to follow (4 bytes)
bitu16 AnimatedTextures[NumAnimatedTextures];
// animated texture data (NumAnimatedTextures * 2 bytes)
bitu32 NumItems; // number of items to follow
(4 bytes)
tr2_item Items[NumItems]; // item list
(NumItems * 22 bytes [TR1 version])
bitu8 LightMap[32 * 256]; // light map (8192
bytes)
tr2_colour Palette[256]; // 8-bit
palette (768 bytes)
bitu16 NumCinematicFrames; // number of cinematic
frame records to follow (2 bytes)
tr2_cinematic_frame CinematicFrames[NumCinematicFrames];
// (NumCinematicFrames * 16 bytes)
bitu16 NumDemoData; // number of demo data
records to follow (2 bytes)
bitu8 DemoData[NumDemoData]; // demo data
(NumDemoData bytes)
bit16 SoundMap[256]; // sound map (512 bytes)
bitu32 NumSoundDetails; // number of sound-detail
records to follow (4 bytes)
tr2_sample_info SoundDetails[NumSoundDetails];
// sound-detail list (NumSoundDetails * 8 bytes)
bitu32 NumSamples (number of bitu8's in Samples)
bitu8 Samples (array of bitu8's -- embedded
sound samples in Microsoft WAVE format)
bitu32 NumSampleIndices; // number of sample
indices to follow (4 bytes)
bitu32 SampleIndices[NumSampleIndices]; //
sample indices (NumSampleIndices * 4 bytes)
What follows is the physical Tomb Raider III .TR2 file layout, byte for byte. Note
that this is not a "real" C/C++ structure, in that some arrays are variable-length,
with the length being defined by another element of the structure.
bitu32 Version; // version (4 bytes)
tr2_colour Palette[256]; // 8-bit
palette (768 bytes)
tr2_colour4 Palette16[256]; //
(1024 bytes)
bitu32 NumTextiles; // number of texture
tiles (4 bytes)
tr2_textile8 Textile8[NumTextiles];
// 8-bit (palettized) textiles (NumTextiles * 65536 bytes)
tr2_textile16 Textile16[NumTextiles];
// 16-bit (ARGB) textiles (NumTextiles * 131072 bytes) (absent from TR1)
bitu32 Unused; // 32-bit unused value (4
bytes)
bitu16 NumRooms; // number of rooms (2 bytes)
struct {
tr2_room_info
RoomInfo; // room header (16 bytes)
bitu32 NumData; // number
of data bitu16's to follow (=RoomData) (4 bytes)
struct {
bitu16
NumVertices; // number of vertices to follow (2 bytes)
tr2_vertex_room
Vertices[NumVertices]; // vertex list (NumVertices * 12 bytes)
bitu16
NumRectangles; // number of rectangles to follow (2 bytes)
tr2_face4
Rectangles[NumRectangles]; // rectangle list (NumRectangles * 10 bytes)
bitu16
NumTriangles; // number of triangles to follow (2 bytes)
tr2_face3
Triangles[NumTriangles]; // triangle list (NumTriangles * 8 bytes)
bitu16
NumSprites; // number of sprites to follow (2 bytes)
tr2_room_sprite
Sprites[NumSprites]; // room sprite list (NumSprites * 4 bytes)
bitu16
NumDoors; // number of doors to follow (2 bytes)
tr2_room_door
Doors[NumDoors]; // door list (NumDoors * 32 bytes)
bitu16
NumZsector; // sector table width (2 bytes)
bitu16
NumXsector; // sector table height (2 bytes)
tr2_room_sector
SectorData[NumZsector * NumXsector]; // sector table (NumZsector * NumXsector
* 8 bytes)
bit16
Intensity1;
bit16
Intensity2;
bitu16
NumLights; // number of lights to follow (2 bytes)
tr2_room_light
Lights[NumLights]; // light list (NumLights * 24 bytes)
bitu16
NumStaticMeshes; // number of static mesh records to follow (2 bytes)
tr2_room_staticmesh
StaticMeshes[NumStaticMeshes]; // static mesh data (NumStaticMeshes * 20
bytes)
bit16
AlternateRoom; // (2 bytes)
bitu16
Flags; // (2 bytes)
tr2_colour
RoomLightColour // 3 bytes
} RoomData;
} Rooms[NumRooms];
bitu32 NumFloorData; // number of floor data
bitu16's to follow (4 bytes)
bitu16 FloorData[NumFloorData]; // floor
data (NumFloorData * 2 bytes)
bitu32 NumMeshData; // number of bitu16's
of mesh data to follow (=Meshes[]) (4 bytes)
struct {
tr2_vertex Centre;
// relative coordinates of mesh centre (6 bytes)
bitu8 Unknown1[4]; //
unknown (4 bytes)
bit16 NumVertices; //
number of vertices to follow (2 bytes)
tr2_vertex Vertices[NumVertices];
// list of vertices (NumVertices * 6 bytes)
bit16 NumNormals; // number
of normals to follow (2 bytes)
tr2_vertex Normals[NumNormals];
// list of normals (NumNormals * 6 bytes) (becomes Lights if NumNormals
< 0; 2 bytes)
bit16 NumTexturedRectangles;
// number of textured rectangles to follow (2 bytes)
tr2_face4 TexturedRectangles[NumTexturedRectangles];
// list of textured rectangles (NumTexturedRectangles * 10 bytes)
bit16 NumTexturedTriangles;
// number of textured triangles to follow (2 bytes)
tr2_face3 TexturedTriangles[NumTexturedTriangles];
// list of textured triangles (NumTexturedTriangles * 8 bytes)
bit16 NumColouredRectangles;
// number of coloured rectangles to follow (2 bytes)
tr2_face4 ColouredRectangles[NumColouredRectangles];
// list of coloured rectangles (NumColouredRectangles * 10 bytes)
bit16 NumColouredTriangles;
// number of coloured triangles to follow (2 bytes)
tr2_face3 ColouredTriangles[NumColouredTriangles];
// list of coloured triangles (NumColouredTriangles * 8 bytes)
} Meshes[NumMeshPointers]; // note that NumMeshPointers
comes AFTER Meshes[]
bitu32 NumMeshPointers; // number of mesh
pointers to follow (4 bytes)
bitu32 MeshPointers[NumMeshPointers]; //
mesh pointer list (NumMeshPointers * 4 bytes)
bitu32 NumAnimations; // number of animations
to follow (4 bytes)
tr2_animation Animations[NumAnimations];
// animation list (NumAnimations * 32 bytes)
bitu32 NumStateChanges; // number of state
changes to follow (4 bytes)
tr2_state_change StateChanges[NumStateChanges];
// state-change list (NumStructures * 6 bytes)
bitu32 NumAnimDispatches; // number of animation
dispatches to follow (4 bytes)
tr2_anim_dispatch AnimDispatches[NumAnimDispatches];
// animation-dispatch list list (NumAnimDispatches * 8 bytes)
bitu32 NumAnimCommands; // number of animation
commands to follow (4 bytes)
tr2_anim_command AnimCommands[NumAnimCommands];
// animation-command list (NumAnimCommands * 2 bytes)
bitu32 NumMeshTrees; // number of MeshTrees
to follow (4 bytes)
tr2_meshtree MeshTrees[NumMeshTrees];
// MeshTree list (NumMeshTrees * 4 bytes)
bitu32 NumFrames; // number of words of frame
data to follow (4 bytes)
bitu16 Frames[NumFrames]; // frame data (NumFrames
* 2 bytes)
bitu32 NumMoveables; // number of moveables
to follow (4 bytes)
tr2_moveable Moveables[NumMoveables];
// moveable list (NumMoveables * 18 bytes)
bitu32 NumStaticMeshes; // number of StaticMesh
data records to follow (4 bytes)
tr2_staticmesh StaticMeshes[NumStaticMeshes];
// StaticMesh data (NumStaticMesh * 32 bytes)
bitu32 NumSpriteTextures; // number of sprite
textures to follow (4 bytes)
tr2_sprite_texture SpriteTextures[NumSpriteTextures];
// sprite texture list (NumSpriteTextures * 16 bytes)
bitu32 NumSpriteSequences; // number of sprite
sequences records to follow (4 bytes)
tr2_sprite_sequence SpriteSequences[NumSpriteSequences];
// sprite sequence data (NumSpriteSequences * 8 bytes)
bitu32 NumCameras; // number of camera data
records to follow (4 bytes)
tr2_camera Cameras[NumCameras]; //
camera data (NumCameras * 16 bytes)
bitu32 NumSoundSources; // number of sound
source data records to follow (4 bytes)
tr2_sound_source SoundSources[NumSoundSources];
// sound source data (NumSoundSources * 16 bytes)
bitu32 NumBoxes; // number of box data records
to follow (4 bytes)
tr2_box Boxes[NumBoxes]; // box data
(NumBoxes * 8 bytes)
bitu32 NumOverlaps; // number of overlap
records to follow (4 bytes)
bitu16 Overlaps[NumOverlaps]; // overlap
data (NumOverlaps * 2 bytes)
10*bit16 Zones[NumBoxes]; // zone data (NumBoxes
* 20 bytes)
bitu32 NumAnimatedTextures; // number of
animated texture records to follow (4 bytes)
bitu16 AnimatedTextures[NumAnimatedTextures];
// animated texture data (NumAnimatedTextures * 2 bytes)
bitu32 NumObjectTextures; // number of object
textures to follow (4 bytes) (after AnimatedTextures in TR3)
tr2_object_texture ObjectTextures[NumObjectTextures];
// object texture list (NumObjectTextures * 20 bytes)
bitu32 NumItems; // number of items to follow
(4 bytes)
tr2_item Items[NumItems]; // item list
(NumItems * 24 bytes)
bitu8 LightMap[32 * 256]; // light map (8192
bytes)
bitu16 NumCinematicFrames; // number of cinematic
frame records to follow (2 bytes)
tr2_cinematic_frame CinematicFrames[NumCinematicFrames];
// (NumCinematicFrames * 16 bytes)
bitu16 NumDemoData; // number of demo data
records to follow (2 bytes)
bitu8 DemoData[NumDemoData]; // demo data
(NumDemoData bytes)
bit16 SoundMap[370]; // sound map (740 bytes)
bitu32 NumSoundDetails; // number of sound-detail
records to follow (4 bytes)
tr2_sample_info SoundDetails[NumSoundDetails];
// sound-detail list (NumSoundDetails * 8 bytes)
bitu32 NumSampleIndices; // number of sample
indices to follow (4 bytes)
bitu32 SampleIndices[NumSampleIndices]; //
sample indices (NumSampleIndices * 4 bytes)
TR1 has no colour table or 16-bit palette before the start of the textures; it also lacks 16-bit textures.
In TR1, tr2_vertex_room_struct has after its tr2_vertex struct only the first light intensity, and not the attributes or the second intensity.
In TR1, after SectorData, there is only the first light intensity, and not the second one or the lighting mode.
In TR1, tr2_room_light_struct has only one of:
bitu16 Diffuse1/2
bitu32 Unknown1/2
In TR1, tr2_room_static does not have two light intensities, but only one.
"Boxes" objects are rectangles whose four horizontal-coordinate values are bitu8's in TR2 and bit32's in TR1.
"Zones" objects have 10 bit16's in TR2, but 6 bit16's in TR1
In TR1, tr2_item_struct is like the TR2 version, but with only one light intensity.
The TR1 colour table has the same format as the TR2 colour table, but it is located between the LightMap and the cinematic frames.
SoundMap is 370 bit16's in TR2, but 256 bit16's in TR1.
Between SoundDetails and SampleIndices, TR1 has all the level's sound
samples, in the form of embedded Microsoft WAVE files. Just before these
samples is the total number of bytes in those sound samples, which is a
bit32.
After the two room-light intensities, TR2 has a lighting-mode value, which TR3 lacks.
Also in tr2_room_struct, TR3 has 3 extra bytes at the end, which appears to be the room-light color.
Finally, in TR2, the tr2_object_texture data is before the tr2_sprite_texture
data. In TR3, it is before the tr2_item data.
Presumably as a form of copy protection, the demo versions of some of the TR games use levels that are slightly different from those in the retail versions. However, those that have been found are all data rearrangements, as explained below.
The TR1 and Unfinished Business (.TUB) demos have their palettes moved to between the SpriteSequences and the Cameras.
The TR2 "Wall" demo, and maybe also its "Venice" demo, has its LightMap (8K) moved to between the SpriteSequences and the Cameras. It also has its SampleIndices content replaced by the soundfiles, though the associated number of them remains unchanged (the number of indices becomes the number of samples).
That demo also has its own version of TOMBPC.DAT, called DEMOPC.DAT, which appears to have the exact same format as TOMBPC.DAT.
No rearrangements are known for the TR3 demos.
Overview: The flow of the game, which levels come in what order, what item(s) Lara has at the beginning of each level, the filenames of the level and cut-scene files, all the visible text (e.g. "Save Game," "Rusty Key," etc.), and various other options are controlled using a file called TOMBPC.DAT. This file is normally compiled using a utility called GAMEFLOW.EXE, which was (apparently) accidentally distributed by Eidos in the German distribution of Tomb Raider II Gold. TR2 and TR3 use this file, and use essentially the same format of it, but TR1 has this file's contents embedded in the app, which explains why there are separate TR1 and Unfinished Business apps. What follows is a description of the contents of the binary TOMBPC.DAT file.
bitu32 Version;
// seems to be 3 for TR2
bitu8 Info[256];
// null-terminated string describing this game, copyright info, etc.
NOT ENCRYPTED
bit32 FirstOption;
// Level to go to when that happens (0x500 is exit-to-title) ??? when WHAT
happens?
bit32 TitleReplace;
// Level to go to when that happens (-1 is NONE) ??? when WHAT happens?
bit32 OnDeathDemoMode; // Level to go to
when Lara dies during demo mode (0x500 is exit-to-title)
bit32 OnDeathInGame;
// Level to go to when Lara dies during the game (0 is exit-to-title)
bit32 DemoTime;
// time in game ticks (1/30th of a second?) to wait before starting a demo
bit32 OnDemoInterrupt;
// Level to go to when demo mode is interrupted (0x500 is exit-to-title)
bit32 OnDemoEnd;
// Level to go to when the demo ends (0x500 is exit-to-title)
bitu8 Unused1[36];
// filler
bit16 NumLevels;
// number of levels in the game (some level files are used more than once
for some reason)
bit16 NumChapterScreens; // chapter screens
(Present in TR2, first used in TR3)
bit16 NumTitles;
// only one, TITLE.TR2
bit16 NumRPLs;
// number of FMV cutscenes (*.RPL)
bit16 NumCutScenes;
// number of in-game (engine-rendered) cutscenes (CUT*.TR2)
bit16 NumDemoLevels;
// Number of demo levels
bit16 TitleSoundID;
// ID of title soundtrack
bit16 SingleLevel;
// If doing only a single level
bitu8 Unused2[32];
// filler
//
// The Flags word below uses the following bit assignments:
// 0x0001: DemoVersion
(1 ::= demo, 0 ::= normal game)
// 0x0002: Title_Disabled
(1 ::= no title screen, 0 ::= normal title screen)
// 0x0004: CheatModeCheck_Disabled
(1 ::= no cheat mode, 0 ::= cheat mode enabled)
// 0x0008: NoInputTimeout
(1 ::= wait forever if no input, 0 ::= enter demo
// mode if no input timeout)
// 0x0010: LoadSave_Disabled
(1 ::= load/save game disabled, 0 ::= load/save
// game enabled)
// 0x0020: ScreenSizing_Disabled
(1 ::= no screen re-sizing allowed, 0 ::= screen
// re-sizing allowed)
// 0x0040: LockOutOptionRing
(1 ::= ???, 0 ::= normal option ring)
// 0x0080: DozyCheat_Enabled
(???)
// 0x0100: Use_Encryption
(1 ::= XOR all StringData with XORbyte, 0 ::= leave
// StringData as-is)
// 0x0400: SelectAnyLevel
(1 ::= allow player to select any level, 0 ::= no
// level selection)
//
bitu16 Flags;
// Various flags (see above)
bitu8 Unused3[6];
// filler
bitu8 XORbyte;
// For encryption ("cipher code")
bitu8 Unused4;
// High byte of a short?
bit16 SecretSoundID;
// ID of "found a secret" soundtrack
bitu8 Unused5[4];
// filler
//
// The sections that follow
contain String Arrays. These are of the following pseudo-structure:
// struct {
// bitu16 StringOffsets[NumStrings];
// offsets (into StringData[]) of each string
// bitu16 StringDataSize;
// number of bytes of raw string data to follow
// bitu8 StringData[StringDataSize];
// if Flags & 0x0100, this entire array is XORed with
// // XORbyte
// } StringArray;
//
// While it is not correct C/C++, the following are specified as StringArray[NumStrings],
// where NumStrings indicates the number of StringOffsets in
the structure.
//
StringArray LevelDisplayNames[NumLevels];
StringArray ChapterScreens[NumChapterScreens];
StringArray TitleFileNames[NumTitles];
StringArray RPLFileNames[NumRPLs];
StringArray LevelFileNames[NumLevels];
StringArray CutSceneFileNames[NumCutScenes];
//
// The LevelScript contains interpreted data (opcodes and operands)
that specify
// actions to take for each level (e.g. play cut scene, take away weapons,
etc). The
// details of this data are discussed below, after the structure descriptions.
//
struct {
bitu16 LevelScriptOffsets[NumLevels
+ 1]; // offsets (into LevelScriptData[])
// of each level's script data
bitu16 NumLevelScriptData;
bitu8 LevelScriptData[NumLevelScriptData];
} LevelScript;
bitu16 DemoLevelList[NumDemoLevels];
//
// GameStrings 1 and 2 are the level-independent strings that are displayed
when interacting
// with the game menus (e.g. "Inventory," "Load Game," "Jump" (control
setup), "Shotgun"
// (weapon in inventory), etc.)
//
bit16 NumGameStrings1;
StringArray GameStrings1[NumGameStrings1];
StringArray GameStrings2[41];
//
// KeyStrings1..10 are the level-specific printable strings for the
various pickups in each level,
// not including level-independent pickups (e.g. Shotgun Shells, Medi
Packs). These pickups
// are all "active" at some point, e.g. they are used as keys or are
prerequisites for advancing
// through the game. Examples include "Rusty Key," "Green Pass
Card," "Circuit Breaker," "The
// Seraph," "Talion," etc. Each level of TR2 can contain up to 10 pickups.
The following arrays
// are arranged longitudinally, meaning that each array contains all
of the Nth-pickup strings for
// each level. For example, KeyStrings1 contains the printable
names for the "first" pickup in
// each level, KeyStrings2 contains the names for the "second" pickup,
etc. Note that "first"
// and "second" have nothing to do with the order these objects are
encountered in the game;
// they are simply indices used by the game engine (Key 1, Key 2, etc.)
//
StringArray KeyStrings1[NumLevels];
// Puzzle 1
StringArray KeyStrings2[NumLevels];
// Puzzle 2
StringArray KeyStrings3[NumLevels];
// Puzzle 3
StringArray KeyStrings4[NumLevels];
// Puzzle 4
StringArray KeyStrings5[NumLevels];
// Pickup 1
StringArray KeyStrings6[NumLevels];
// Pickup 2
StringArray KeyStrings7[NumLevels];
// Key 1
StringArray KeyStrings8[NumLevels];
// Key 2
StringArray KeyStrings9[NumLevels];
// Key 3
StringArray KeyStrings10[NumLevels];
// Key 4
LevelScript Description:
In LevelScript, Opcodes and Operands are all bitu16.
Note that if a level is a demo level, its level ID will be 1024 higher
than a "normal" level ID.
Opcodes:
3 -- Play FMV (prerendered cutscene):
operand is RPL ID
4 -- Play (interactive) game level:
operand is level's ID
5 -- Play engine-rendered cutscene:
operand is cutscene ID
6 -- Do level-completion display (no
operands)
7 -- Play demo level: operand is level
ID
9 -- End of set (no operands)
10 -- Play soundtrack: operand is soundtrack ID
(it precedes opcodes of associated levels)
11 -- (Lara starts out in motorboat? -- TR2, "Bartoli's
Hideout") (no operands?)
12 -- Chapter screen: operand is chapter ID
14 -- Lose your weapons (no operands)
15 -- End of game (no operands)
16 -- Associated with cutscenes; a viewpoint control?
(one operand?)
17 -- (one operand?)
18 -- Give item; operand is item type
19 -- Item-type 12 state to start level in: operand
is state number
20 -- Number of secrets (overrides engine's hardcoded
count of them?): operand is that number
21 -- (no operands?)
22 -- Lose your ammo and medipacks? (no operands?)
Opcode-18 stuff to give (repeat means give another):
After finding all the secrets in a level (Tomb Raider 2)
0 Pistols
1 Shotgun
2 Automatic pistols
3 Uzis
4 Harpoon gun
5 M-16
6 Grenade launcher
7 Pistol clip
8 Shotgun-shell box
9 Automatic-pistol clip
10 Uzi clip
11 Harpoon bundle
12 M-16 clip
13 Grenade pack
14 Flare box
15 Small medipack
16 Big medipack
17 Pickup 1
18 Pickup 2
19 Puzzle 1
20 Puzzle 2
21 Puzzle 3
22 Puzzle 4
23 Key 1
24 Key 2
25 Key 3
26 Key 4
When a level starts (Tomb Raider 2)
1000 Pistols
1001 Shotgun
1002 Automatic pistols
1003 Uzis
1004 Harpoon gun
1005 M16
1006 Grenade launcher
1007 Pistol clip
1008 Shotgun-shell box
1009 Automatic-pistol clip
1010 Uzi clip
1011 Harpoon bundle
1012 M16 clip
1013 Grenade pack
1014 Flare box
1015 Small medipack
1016 Big medipack
1017 Pickup 1
1018 Pickup 2
1019 Puzzle 1
1020 Puzzle 2
1021 Puzzle 3
1022 Puzzle 4
1023 Key 1
1024 Key 2
1025 Key 3
1026 Key 4
Tomb Raider 2 identifications:
FMV IDs:
0 -- LOGO (everybody's corporate
logos)
1 -- ANCIENT (monks vs. dragon)
2 -- MODERN (Lara drops in
from helicopter)
3 -- LANDING (Seaplane lands
at rig)
4 -- MS (Lara hitchhikes on
a minisub)
5 -- CRASH (Lara goes to Tibet
and has a rough landing there)
6 -- JEEP (Lara steals it
and outruns Bartoli's goons)
7 -- END (Lara escaping the
collapsing lair)
Cutscene IDs:
0 -- CUT1 (At the end of the
Great Wall)
1 -- CUT2 (Lara the stowaway)
2 -- CUT3 (Bartoli vs. goon)
3 -- CUT4 (Bartoli stabs himself)
Soundtrack IDs:
0 -- BLANK (no sound)
3 -- CUT1 ("at the fancy
door" soundtrack)
4 -- CUT2 ("Lara the
stowaway" soundtrack)
5 -- CUT3 ("Bartoli
vs. goon" soundtrack)
30 -- CUT4 ("Bartoli stabs
himself" soundtrack)
31 -- DERELICT (eerie choppy/echo-y
synths)
32 -- WATER (dripping/pouring
water sounds)
33 -- WIND (Blowing wind)
34 -- HEARTBT (musical embellishment
of one)
52 -- SHOWER (that infamous
shower scene)
58 -- MACHINES (in the offshore
rig)
59 -- FLOATING (wispy synths)
It is always easier to build upon the work of others than to try and create everything from scratch. In order to build upon the works of others, however, one must know what the others' works are. What follows are catalogues of some of the fine work done by the Core level designers. These catalogues are based upon observation and subjective interpretation, and therefore may not be either complete or perfectly accurate. They do provide a good starting-point, however.
The catalogues included here are:
TR2 Item IDs
TR1 Entity States
TR2 Entity States
TR1 Animations
TR2 Animations
TR2 Sound IDs
TR2 ItemIDs:
0: Lara
* = sprite sequence; others are movable mesh
objects
1: Lara pistol animation
2: Lara's ponytail
3: Lara shotgun animation
4: Lara auto-pistol animation
5: Lara Uzi animation
6: Lara M16 animation
7: Lara grenade-launcher animation
8: Lara harpoon-gun animation
9: Lara flare animation
10: Lara's hips
11: Lara's hips
12: Lara's hips / Lara dagger animation
13: Red snowmobile (can go fast)
14: Boat
15: Doberman
16: Masked goon (white mask)
17: Masked goon (white mask)
18: Masked goon (black mask)
19: Knifethrower
20: Shotgun goon
21: Rat
22: Dragon
23: Dragon (partially decomposed)
24: Gondola (Venetian boat)
25: Shark
26: Yellow moray eel
27: Black moray eel
28: Barracuda / Whiskered fish (white, yellow)
29: Scuba diver
30: Gun-wielding rig worker
31: Gun-wielding rig worker
32: Stick-wielding goon
33: Stick-wielding goon
34: Flamethrower-wielding goon
36: Spider
37: Giant spider
38: Crow
39: Tiger / Snow leopard / White tiger
40: Marco Bartoli
41: Spear-wielding Guardian
42: Spear-wielding Guardian statue
43: Sword-wielding Guardian
44: Sword-wielding Guardian statue
45: Yeti
46: Bird monster (guards Talion)
47: Eagle
48: Mercenary
49: Mercenary (black ski mask)
50: Mercenary (black ski mask)
51: Black snowmobile (with guns)
52: Mercenary snowmobile driver
53: Monk with long stick
54: Monk with knife-end stick
55: Collapsible floor
57: Loose boards (Opera House)
58: Swinging sandbag / spiky ball
59: Spikes / Glass shards
60: Boulder
61: Disk
62: Wall-mounted disk shooter
63: Door? (Opera House)
64: Slamming door
65: Elevator
66: Minisub
67: Movable cubical block (pushable)
68: Movable cubical block (pushable)
69: Movable cubical block (pushable)
70: Movable cubical block (pushable)
71: Big bowl (Ice Palace)
72: Breakable window
73: Breakable window
76: Airplane propeller
77: Power saw
78: Overhead pulley hook
79: Sandbag / Ceiling fragments
80: Rolling spindle
81: Wall-mounted knife blade
82: Statue with knife blade
83: Multiple boulders / snowballs
84: Detachable icicles
85: Spiky movable wall
86: Bounce pad
87: Wall segment with spikes
88: Tibetan bell
89: * Boat wake (Venice, Bartoli)
90: * Snowmobile wake (Tibetan Foothills)
91: Lara and a snowmobile
92: Wheel doorknob
93: Above-water switch
94: Underwater propeller
95: Air fan
96: Swinging box / spiky ball
97: Gun-wielding rig worker / Marco Bartoli (unused?)
98: Goon at the fancy door holding poison bottle / Gun-wielding rig worker
99: Lara in cutscene
100: * Frame (for indicator bars)
101: Rolling storage drums
102: Zipline handle
103: Above-water switch
104: Underwater switch (some above-water ones)
105: Underwater switch
106: Door
107: Door
108: Door
109: Door
110: Door
111: Door
112: Door
113: Door
114: Door
115: Door
116: Door ? Bridge ? (Temple of Xian)
117: Bridge (flat)
118: Bridge (slope = 1)
119: Bridge (slope = 2)
120: Passport (opening up)
121: Stopwatch
122: Lara and butler picture
123: Goon at the fancy door / Monk
124: Airplane cockpit / Marco Bartoli
125: Fancy-door goon's gunflare / Crate lid / Minisub / Bartoli follower
126: Fancy-door goon's gun / Ceiling hook
127: Fancy-door goon's gunflare / Marco Bartoli / Lara's boot (thrown) / Bartoli follower
128: Laptop computer / Fabio / Marco Bartoli / Bartoli follower
129: Crate / Bartoli follower
130: Eros the Goon
133: Passport (closed)
134: N-thingy (Playstation memory card?)
135: * Pistols
136: * Shotgun
137: * Auto pistols
138: * Uzis
139: * Harpoon gun
140: * M16
141: * Grenade launcher
143: * Shotgun shells
144: * Auto-pistol clips
145: * Uzi clips
146: * Harpoons
147: * M16 clips
148: * Grenades
149: * Small medipack
150: * Large medipack
151: * Flares
152: Flare
153: Sunglasses
154: Portable CD player
155: Direction keys
157: Pistol
158: Shotgun
159: Auto-pistol
160: Uzi
161: Harpoon gun
162: M16
163: Grenade launcher
164: Pistol ammo(?)
165: Shotgun ammo
166: Auto-pistol ammo
167: Uzi ammo
168: Harpoons
169: M16 ammo
170: Grenades
171: Small medipack
172: Large medipack
173: Flares (opening box)
174: * Puzzle 1
175: * Puzzle 2
176: * Puzzle 3 ? [unused]
177: * Puzzle 4
178: Puzzle 1
179: Puzzle 2
180: Puzzle 3 ? [unused]
181: Puzzle 4
182: Slot 1 empty
183: Slot 2 empty
184: Slot 3 empty ? [unused]
185: Slot 4 empty
186: Slot 1 full
187: Slot 2 full
188: Slot 3 full ? [unused]
189: Slot 4 full
190: * Dragon 1
191: * Dragon 2
192: * Dragon 3
193: * Key 1
194: * Key 2
195: * Key 3
196: * Key 4
197: Key 1
198: Key 2
199: Key 3
200: Key 4
201: Lock 1
202: Lock 2
203: Lock 3
204: Lock 4
205: * Pickup 1
206: * Pickup 2
207: Pickup 1
208: Pickup 2
209: Dragon explosion effect (expanding bubble)
210: Dragon explosion effect (expanding bubble)
211: Dragon explosion effect (expanding bubble)
212: Lara's hips / Alarm
213: Lara's hips
214: Tyrannosaur
215: Lara's hips
216: Lara's hips
217: Lara's hips
218: Dragon bones
219: Dragon bones
220: * Extra Fire (Ice Palace)
222: Aquatic Mine (Venice)
223: Menu background (displayed when doing 3D-hardware rendering)
224: * Gray disk
225: Gong-hammering animation
226: Gong (Ice Palace)
227: Detonator box
228: Helicopter (Diving Area)
229: * Grenade blast
230: * Splash
231: * Bubbles
233: * Blood splatter
234: * Green-white thing (Great Wall)
235: Flare burning?
236: * Flash (looks like distant light)
238: * Bullet hit
239: * Sparkles (Floating Islands, Dragon's Lair)
240: Gunflare
241: Gunflare (spiky)
243: Lara's hips
244: Lara's hips
245: Rod?
246: * Flamethrower (repeat of grenade blast)
247: Pointer?
248: Support?
249: Rod?
250: * Sprayed particles (Diving Area, Barkhang Monastery, Temple of Xian)
252: * Fire
253: Lara's hips
254: Skybox
255: * Standard symbols
256: Monk
257: Lara's hips
259: Helicopter (The Great Wall)
260: The butler
261: * Assault-course numerals and punctuation
262: Lara's hips
263: Shotgun
264: Lara's hips
289: * Cellar artifact 1 (gold mask)
290: * Cellar artifact 2 (rounded statue)
291: * Cellar artifact 3 (flattened statue)
TR1
Entity States
I've
found that the two lion types are the two sexes of lions and that the crocodiles
and giant rats have separate types for on-land ones and swimming ones.
Also, Lara's evil-twin mutant has only the breathing animation; its mirror-image
behaviour is almost certainly hardcoded. I wonder if there is a reference-point
object in the center of the room that this mutant lives in; there has to
be some such point to refer the reflection to.
This contains the states of everything but Lara.
* = sprite sequence; others are movable mesh objects
0: Lara
7: Wolf
1: Lara pistol animation
2: Lara shotgun animation
3: Lara magnum animation
4: Lara Uzi animation
5: Lara / Lara's home appearance / Lara
wounded / Lara turned to gold
6: Lara's evil twin mutant
1: Walking
2: Running
3: Jumping
5: Stalking
6: Jumping and attacking
7: Attacking
8: Lying down
9: Getting ready to strike
10:
Running jump
11:
Dying
12:
Biting
8: Bear
0: Walking on all fours
1: Getting back to all fours
2: Walking on hind legs
3: Running on all fours
4: Rearing up on hind legs
5: Growling?
6: Running and attacking
7: Standing on hind legs
8: Biting
9: Dying
9: Bat
1: Starting to fly
2: Flying straight
3: Biting
4: Circling
5: Dying
10: Crocodile (on land)
1: Stationary
2: Walking
3: Walking
4: Turning
5: Biting
7: Dying
11: Crocodile (in water)
1: Swimming
2: Biting
3: Dying
12: Lion (male)
1: Standing
2: Walking
3: Leaping
4: Leaping and biting
5: Dying
6: Biting
7: Biting
13: Lion (female)
1: Standing
2: Walking
3: Leaping
4: Leaping and biting
5: Dying
6: Biting
7: Biting
14: Panther
1: Standing
2: Walking
3: Leaping
4: Leaping and biting
5: Dying
6: Biting
7: Biting
15: Gorilla
1: Standing on all fours
3: Running on all fours
4:
Walking on legs (attacking?)
5: Dying
6: Thumping chest
7: Waving arms
8: Turning leftward?
9: Turning rightward?
10:
Jumping up and waving arms
11:
Climbing
16: Giant Rat (on land)
1: Standing
2: Jumping and Biting
3: Running
4: Biting
5: Dying
6: Rearing up
17: Giant Rat (in water)
1: Swimming
2: Biting
3: Dying
18: Tyrannosaur
1:
Standing
2: Walking
3: Running
5: Dying
6: Bellowing
7: Biting
8: Shaking Head and Spitting Out
19: Raptor
0: Dying
1: Standing
2: Walking
3: Running
4: Jumping and Biting?
6: Bellowing
7: Running and bellowing
8: Biting
20: Winged mummy (unused) / Winged mutant
1: Crouching
2: Walking
3: Running
4: Biting?
6: Looking
7: Jumping?
8: Clawing?
9: Aiming right-hand gun
10:
Aiming and firing left-hand gun
11:
Firing right-hand gun
12:
Standing
13:
Flying
21: Lara's hips
[Only
one state]
22: Lara's hips
[Only
one state]
23: Centaur mutant
1: Standing
2: Firing
3: Galloping
4: Aiming
5: Dying
6: Rearing up
24: Mummy
1: Standing
2: Falling forward
27: Larson
0: Walking
1: Standing holding gun
2: Walking
3: Running
4: Aiming gun
5: Injured by gunshot / Dying
6: Standing
7: Firing gun
28: Pierre
1: Standing
2: Walking
3: Running
4: Aiming guns
5: Dying
6: Putting guns away
7: Firing guns
29: Skateboard
0: Being turned around
1: Stationary
2: Stationary
3: Stationary
4: Stationary
30: Skateboard kid
0: Turning and Aiming?
1: Firing
2: Skating
3: Aiming
4: Firing
5: Dying
31: Cowboy
1: Aiming
2: Walking
3: Running
4: Aiming
5: Dying
6: Firing
32: "Mr. T"
0: Dying
1: Standing
2: Walking
3: Running
4: Aiming
6: Firing
33: Winged Natla (actually, Natla with
a winged mutant)
1: Standing
2: Flying
3: Running
4: Aiming and firing
5: "Dying" the first time
7: Spinning around in air
8: Standing
9: Dying for real
34: Giant mutant
0: Dying
1: Sitting on floor
2: Pulling self forward
4: Slapping with right hand
5: Slapping with both hands
6: Making big wave with right hand
8: Dropping to floor after hatching
9: Raising arms
11: Shaking victim with right hand
35: Collapsible floor
0: Stationary
1: Shaking
2: Falling
3: Settling down
36: Swinging blade
0: Stationary
2: Swinging
37: Spikes
[Only
one state]
38: Boulder
0: Stationary
1: Rolling
39: Dart
[Only
one state]
40: Wall-mounted dartgun
0: Idle?
1: Firing?
41: Door (opens upward)
0: Upward
1: On side
42: Slamming doors
0: Open
1: Closed
43: Sword of Damocles
[Only
one state]
44: Thor's hammer's handle
0: Stationary in "up" position
1: Moving down a little and returning
2: Moving down all the way
3: Stopped at "down" position
45: Thor's hammer's block
0: Stationary
1: Moving down a little and returning
2: Moving down all the way
46: Hanging ball? / Some kind of box?
[Only
one state]
47: Metal rod? / Powered mining cart
0: Stationary
1: Moving
48: Movable cubical block (pushable)
0: Stationary
1: Being pulled?
2: Being pushed?
49: Movable cubical block (pushable)
0: Stationary
1: Being pulled?
2: Being pushed?
50: Movable cubical block (pushable)
0: Stationary
1: Being pulled?
2: Being pushed?
51: Movable cubical block (pushable)
0: Stationary
1: Being pulled?
2: Being pushed?
52: Movable tall block
0: Stationary
1: Moving forward?
2: Moving backward?
53: Pieces of something?
0: Stationary
1: Falling
2: Settling down
54: Sword of Damocles
[Only
one state]
55: Above-water switch
0: Off
1: On
[states may be reversed]
56: Underwater switch
0: Off
1: On
[states may be reversed]
57: Door
0: Closed
1: Open
58: Door
0: Closed
1: Open
59: Door
0: Closed
1: Open
60: Door
0: Closed
1: Open
61: Door
0: Closed
1: Open
62: Door
0: Closed
1: Open
63: Door
0: Closed
1: Open
64: Door
0: Closed
1: Open
65: Trapdoor (opens downward)
0: Closed
1: Open
66: Trapdoor (opens downward)
0: Closed
1: Open
68: Bridge (flat)
[Only
one state]
69: Bridge (slope = 1)
[Only
one state]
70: Bridge (slope = 2)
[Only
one state]
71: Passport (opening up)
[Only
one state]
72: Compass
[Only
one state]
74: Cogs (animated)
0: Stationary
1: Turning
75: Cogs (animated)
0: Stationary
1: Turning
76: Cogs (animated)
0: Stationary
1: Turning
77: Lara in CS / Scion holder in CS
78: Larson in CS / Natla in CS / Scion
holder in CS
79: Larson's gun in CS / Scion in CS /
Natla in CS
80: Scion in CS
81: Passport (closed)
[Only
one state]
82: N-thingy (Playstation memory card?)
[Only
one state]
83: Save crystal
[Only
one state]
84: * Pistols
85: * Shotgun
86: * Magnums
87: * Uzis
88: * Pistol ammo(?)
89: * Shotgun ammo
90: * Magnum ammo
91: * Uzi ammo
93: * Small medipack
94: * Large medipack
95: Sunglasses
[Only
one state]
96: Cassette player and headphones
[Only
one state]
97: Direction keys
[Only
one state]
99: Pistol
[Only
one state]
100: Shotgun
[Only
one state]
101: Magnum
[Only
one state]
102: Uzi
[Only
one state]
103: Pistol ammo(?)
[Only
one state]
104: Shotgun ammo
[Only
one state]
105: Magnum ammo
[Only
one state]
106: Uzi ammo
[Only
one state]
108: Small medipack
[Only
one state]
109: Large medipack
[Only
one state]
110: * Puzzle 1
111: * Puzzle 2
112: * Puzzle 3
113: * Puzzle 4
114: Puzzle 1
[Only
one state]
115: Puzzle 2
[Only
one state]
116: Puzzle 3
[Only
one state]
117: Puzzle 4
[Only
one state]
118: Slot 1 empty
[Only
one state]
119: Slot 2 empty
[Only
one state]
120: Slot 3 empty
[Only
one state]
121: Slot 4 empty
[Only
one state]
122: Slot 1 full
[Only
one state]
123: Slot 2 full
[Only
one state]
124: Slot 3 full
[Only
one state]
125: Slot 4 full
[Only
one state]
126: * Pickup 1
127: Pickup 1
[Only
one state]
128: Lara's hips
[Only
one state]
129: * Key 1
130: * Key 2
131: * Key 3
132: * Key 4
133: Key 1
[Only
one state]
134: Key 2
[Only
one state]
135: Key 3
[Only
one state]
136: Key 4
[Only
one state]
137: Lock 1
[Only
one state]
138: Lock 2
[Only
one state]
139: Lock 3
[Only
one state]
140: Lock 4
[Only
one state]
143: * Scion Piece
146: Complete Scion
[Only
one state]
147: Scion Holder
[Only
one state]
150: Scion Piece
[Only
one state]
151: * Flare(?) / Explosion
153: * Splash
155: * Bubbles
156: * Bubbles
158: * Blood splatter
160: * Flying disk
161: Centaur statue
[Only
one state]
162: Shack suspended from wire rope
0: Starting position
1: Dropping after first fuse
2: Dropping after second fuse
3: Dropping after third fuse (to ground)
4: On the ground
163: Mutant egg and holder (normal size)
0: Starting to hatch
1: Hatching (is the fragmenting hardcoded?)
164: * Bullet hit
165: * Sparkle
166: Gunflare
[Only
one state]
169: Lara's hips
[Only
one state]
170: Lara's hips
[Only
one state]
172: Mutant bullet
[Only
one state]
173: Mutant grenade
[Only
one state]
176: * Splatter
177: Lara's hips
[Only
one state]
178: * Fire
179: Lara's hips
[Only
one state]
180: Flowing Atlantean lava
[Only
one state]
181: Mutant egg and holder (big)
0: Starting to hatch
1: Hatching (is the fragmenting hardcoded?)
182: Motorboat
1: Stationary (initial)
2: Moving
3: Stationary (final)
183: Lara's hips
[Only
one state]
189: Shrinking wedge?
[Only
one state]
190: * Standard symbols
191: * Plant 1
192: * Plant 2
193: * Plant 3
194: * Plant 4
195: * Plant 5
200: * Bag 1
204: * Bag 2
207: Gunflare
[Only
one state]
212: * Rock 1
213: * Rock 2
214: * Rock 3
215: * Bag 3
216: * Pottery 1
217: * Pottery 2
231: * Painted pot
233: * Inca mummy
236: * Pottery 3
237: * Pottery 4
238: * Pottery 5
239: * Pottery 6
TR2 Entity States
Comparing these to those of TR1, it seems rather difficult to map the NPC's, though
doors and switches and stuff like that will map just fine.
This contains the states of everything but Lara
Exception: Lara and the boats and snowmobiles
* = sprite sequence; others are movable mesh objects
0: Lara
Also
has Lara hitting the gong with the hammer in the Ice Palace
12: Lara's hips / Lara dagger animation
Lara
examining Dagger of Xian pulled from Bartoli dragon's belly
13: Red snowmobile (can go fast)
1: Lara pistol animation
2: Lara's ponytail
3: Lara shotgun animation
4: Lara auto-pistol animation
5: Lara Uzi animation
6: Lara M16 animation
7: Lara grenade-launcher animation
8: Lara harpoon-gun animation
9: Lara flare animation
10: Lara's hips
Lara
and the snowmobiles:
0: Driving
1: Climbing in from right
2: Starting the engine
3: Stopping the engine
4: Jumping upward
5: Driving
6: Climbing in from left
7: Climbing out to left
8: Driving
9: Climbing out to right
10:
Dying?
11:
Dying
12:
Thrown out of snowmobile and dying
11: Lara's hips
Lara
and the boats:
0: Entering
1: Driving (stationary)
2: Driving (moving)
3: Jumping out rightward (starboard)
4: Jumping out leftward (port)
6: Jumping upward
8: Dying
[various
states of vibration]
0:
1:
2:
4: Going slightly upwards
6:
7:
8:
10:
Going off a ledge
11:
14: Boat
[various
states of rocking/pitching]
0:
1:
2:
3:
15: Doberman
1: Walking
2: Running
3: Standing
4: Biting
5: Sitting on all fours
6: Standing and panting
7: Biting
8: Jumping and biting
9: Jumping and biting
10:
Dying
16: Masked goon (white mask, jacket)
1: Walking
2: Running
3: Standing and aiming gun
4: Standing and aiming gun
5: Standing and shaking head
6: Standing and aiming gun, bracing self
7: Firing gun, bracing self
9: Running while aiming gun
10:
Standing and aiming gun
11:
Firing gun
12:
Dying
13:
Dying
17: Masked goon (white mask, vest)
0: Standing (animations recycled)
18: Masked goon (black mask)
0: Standing (animations recycled)
19: Knifethrower
1: Standing
2: Walking
3: Running
4: Throwing with right hand
5: Throwing with left hand
6: Throwing with left hand
7: Throwing with right hand
8: Throwing with both hands
9: Throwing with both hands
10:
Dying
20: Shotgun goon
1: Standing, guns up
2: Standing, guns holstered
3: Walking, guns up
4: Running
5: Aiming right gun
6: Aiming left gun
7: Firing right gun
8: Firing left gun
9: Aiming both guns
10:
Firing both guns
11:
Dying
21: Rat
1: Running
2: Standing on all fours
3: Rearing up, biting?
4: Biting
5: Rearing up and biting
6: Dying
22: Dragon (front)
1: Walking
2: Walking, looking leftward
3: Walking, looking rightward
4: Rearing up
5: Breathing fire in reared-up position
6: Standing
7: Back to forward position
8: Walking
9: Raising left foot
10:
Raising right foot
11:
Dying
23: Dragon (back)
[various
standing and walking states]
1:
2:
3:
6:
7:
8:
9:
10:
11:
Dying
24: Gondola (Venetian boat)
[Seems
to be static, as if animations were unused]
[Fragmentation
probably hardcoded]
1:
2:
3:
4:
25: Shark
0: Standing still
1: Swimming
2: Swimming fast
3: Biting
4: Biting
5: Dying
6: Shaking victim in mouth
26: Yellow moray eel
1: Biting
2: Wiggling head
3: Dying
27: Black moray eel
1: Biting
2: Wiggling head
3: Dying
28: Barracuda / Whiskered Fish (white,
yellow)
1: Standing still
2: Swimming
3: Swimming fast
4: Biting
5: Biting
6: Dying
29: Scuba diver
1: Swimming
2: Treading water
3: Swimming, wielding harpoon gun
4: Swimming, wielding harpoon gun
6: Treading water, wielding harpoon gun
7: Treading water, firing harpoon gun
9: Dying
30: Gun-wielding rig worker (khaki pants)
1: Walking
2: Standing
3: Standing with gun upward
4: Firing gun
5: Running
6: Grabbing gun
7: Dying
8: Aiming gun
9: Crouching and aiming gun
10:
Crouching and firing gun
31: Gun-wielding rig worker (blue jeans)
1: Standing while wielding gun
2: Walking 324
3: Running
4: Standing with gun pointed downward
5: Firing gun
6: Running while firing gun
7: Dying
8: Aiming gun
9: Running and aiming gun
10:
Crouching and aiming gun
11:
Crouching and firing gun
32: Stick-wielding goon
1: Standing
2: Running
3: Big sideways hit
4: Hitting with stick
5: Standing, holding stick with both hands
6: Running, ready for big hit with stick
7: Standing, ready for big hit with stick
8: Making big hit with stick
9: Hitting with stick
10:
Running, holding stick with both hands
11:
Dying
12:
Stepping up
13:
Climbing up low ledge
14:
Climbing up ledge
15:
Jumping down from a ledge
33: Stick-wielding goon (can't climb)
1: Standing
2: Running
3: Big sideways hit
4: Hitting with stick
5: Standing, holding stick with both hands
6: Running, ready for big hit with stick
7: Standing, ready for big hit with stick
8: Making big hit with stick
9: Hitting with stick
10:
Running, holding stick with both hands
11:
Dying
34: Flamethrower-wielding goon
1: Standing
2: Running
3: Running, holding nozzle horizontal
4: Standing, pointing nozzle downward
5: Firing
6: Firing while walking
7: Dying
8: Aiming
9: Aiming while running
36: Spider
1: Standing
2: Crawling
3: Crawling
4: Biting
5: Jumping
6: Jumping
7: Dying
37: Giant spider
1: Standing
2: Crawling
3: Crawling fast
4: Biting
7: Dying
38: Crow
1: Flying
2: Flying in place
3: Flying
4: Dying
5: Dying
6: Pecking
7: Pecking
39: Tiger / Snow leopard / White tiger
0: Dying
1: Standing
2: Walking
3: Leaping
5: Biting
6: Biting
7: Leaping and biting
8: Leaping and biting
40: Marco Bartoli
[Only
one state]
41: Spear-wielding Xian Guard
1: Holding spears upward
2: Holding spears horizontal forward-right
3: Walking while pointing spears forward
4: Running while pointing spears forward
5: Picking up spears, pointing them backward
6: Pointing spears forward
7: Pointing spears downward and back
8: Pointing spears forward
9: Walking, moving right spear forward
10:
Thrusting left spear forward
11:
Walking, moving left spear forward
12:
Thrusting right spear forward
13:
Turning spears rightward
14:
Turning spears leftward
15:
Pulling up spears and pointing them back-downward
16:
Twirling spears over head
18:
Getting up from statue position
19:
Spearing victim and tossing forward
42: Spear-wielding Xian Guard statue
[Only
one state]
[fragmenting
probably hardcoded]
43: Sword-wielding Xian Guard
1: Standing
2: Walking
3: Swinging sword back over head
4: Swinging sword forward over head
5: Swinging sword sideways to back
6: Swinging sword sideways to forward
7: Holding sword pointed downward
8: Flying while holding sword
9: Getting up from statue position
10:
Moving sword back while walking (swing over shoulder / pull back)
11:
Moving sword forward while walking (swing forward / thrust)
44: Sword-wielding Xian Guard statue
[Only
one state]
[fragmenting
probably hardcoded]
45: Yeti
1: Running
2: Standing
3: Walking
4: Punching
5: Reaching and swiping downward
6: Running and punching
7: Howling
8: Dying
9: Thumping chest
10:
Stepping up
11:
Climbing up a short ledge
12:
Climbing up a ledge
13:
Jumping down from a ledge
14:
Holding victim and waving
46: Bird monster (guards Talion)
1: Standing
2: Walking
3: Looking upward
4: Swiping downward
5: Getting ready to punch
6: Punching
7: Punching
8: Howling
9: Dying
10:
Pulling arms out
11:
Getting hands together in front
47: Eagle
1: Flying
2: Perching?
3: Gliding
4: Dying
5: Dying
6: Pecking
48: Mercenary
1: Standing
2: Walking
3: Running
4: Aiming gun
5: Firing gun
6: Aiming gun two-handed
7: Firing gun two-handed
8: Firing gun in a sweep
9: Firing gun in continued sweep
10:
Aiming gun while walking
11:
Aiming gun sideways
12:
Aiming gun while walking
13:
Dying
14:
Firing gun while walking
49: Mercenary (black ski mask, gray jacket)
1: Aiming gun while walking
2: Standing
3: Walking
4: Running
5: Aiming gun
6: Aiming gun two-handed
7: Firing gun
8: Aiming gun two-handed
9: Firing gun while walking
10:
Firing gun while walking
11:
Dying
12:
Squatting and aiming
13:
Squatting and firing
50: Mercenary (black ski mask, brown jacket)
0:
Standing (animations recycled)
51: Black snowmobile (with guns)
1: Idle
2: Moving
3: Turning left
4: Turning right
5: Turning left
6: Turning right
52: Mercenary snowmobile driver
1: Driving (idle)
2: Driving (moving)
3: Turning left
4: Turning right
5: Turning left
6: Turning right
7: Dying
53: Monk with long stick
1: Standing and wielding stick
2: Walking
3: Running
4: Slicing with stick
5: Twirling stick and holding out hand
6: Stabbing forward with stick
7: Spearing with stick
8: Twirling stick overhead
9: Dying
10:
Holding stick out and running
11:
Holding stick and putting out hand
54: Monk with knife-end stick
1: Standing and wielding stick
2: Walking
3: Running
4: Slicing with stick
5: Twirling stick and holding out hand
6: Stabbing forward with stick
7: Spearing with stick
8: Twirling stick to side and overhead
9: Dying
10:
Holding stick out and running
11:
Holding stick and putting out hand
55: Collapsible floor
0: Stationary
1: Shaking
2: Falling
3: Settling down
57: Loose boards
0: Stationary
1: Shaking
2: Falling
3: Settling down
58: Swinging sandbag / spiky ball
[Only
one state]
59: Spikes / Glass shards
[Only
one state]
60: Boulder
0: Stationary
1: Rolling
61: Disk (like dart)
[Only
one state]
62: Wall-mounted disk shooter (like dartgun)
0: Idle?
1: Firing?
63: Drawbridge
0: Upward
1: On side
64: Slamming door
0: Open
1: Closed
65: Elevator
0: Doors closed
1: Doors open
66: Minisub
[Only
one state]
67: Movable cubical block (pushable)
0: Stationary
1: Being pulled?
2: Being pushed?
68: Movable cubical block (pushable)
0: Stationary
1: Being pulled?
2: Being pushed?
69: Movable cubical block (pushable)
0: Stationary
1: Being pulled?
2: Being pushed?
70: Movable cubical block (pushable)
0: Stationary
1: Being pulled?
2: Being pushed?
71: Big bowl (Ice Palace)
0: Horizontal
1: Tipped
72: Breakable window (can shoot out)
[Only
one state]
[fragmenting
probably hardcoded]
73: Breakable window (must jump through)
[Only
one state]
[fragmenting
probably hardcoded]
76: Airplane propeller
0: Spinning
1: Stopped
77: Power saw
0: Spinning
1: Stopped
78: Overhead pulley hook
[Only
one state]
79: Sandbag / Ceiling fragments
0: Stationary
1: Falling
2: Settling down
80: Rolling spindle
1: Stationary
2: Rolling
81: Wall-mounted knife blade
1: Extended
2: Pulled back
82: Statue with knife blade
1: Pulled back
2: Extended
83: Multiple boulders / snowballs
1: Rolling
2: Stopped
84: Detachable icicles
1: Attached to ceiling
2: Falling
3: On ground
85: Spiky movable wall
[Only
one state]
86: Bounce pad
0: Idle
1: Kicking upwards
87: Spiky ceiling segment
[Only
one state]
88: Tibetan bell
0: Stationary
1: Swinging
89: * Boat wake (Venice, Bartoli)
90: * Snowmobile wake (Tibetan Foothills)
91: Lara and a snowmobile
[Only
one state]
92: Wheel knob
0: Parent door closed
1: Parent door open
93: Above-water switch
0: Off
1: On
[states may be reversed]
94: Underwater propeller
0: Spinning
1: Stopped
95: Air fan
0: Spinning
1: Stopped
96: Swinging box / spiky ball
[Only
one state]
97: Gun-wielding rig worker / Marco Bartoli
(unused?)
98: Goon at the fancy door holding poison
bottle / Gun-wielding rig worker
99: Lara in cutscene
100: * Frame (for indicator bars)
101: Rolling storage drums
1: Rolling
2: Stopped
102: Zipline handle
1: Moving
2: Settling down
103: Above-water switch
0: Off
1: On
[states may be reversed]
104: Above-water/underwater switch
0: Off
1: On
[states may be reversed]
105: Underwater switch
0: Off
1: On
[states may be reversed]
106: Door
0: Closed
1: Open
107: Door
0: Closed
1: Open
108: Door
0: Closed
1: Open
109: Door
0: Closed
1: Open
110: Door
0: Closed
1: Open
111: Door (pulled upward in Temple of Xian)
0: Closed
1: Open
112: Door (pulled upward in Temple of Xian)
0: Closed
1: Open
113: Door (pulled upward)
0:
Closed
1: Open
114: Trapdoor (opens downward)
0: Closed
1: Open
115: Trapdoor (opens downward)
0: Closed
1: Open
116: Trapdoor (opens downward)
0: Closed
1: Open
117: Bridge (flat)
[Only
one state]
118: Bridge (slope = 1)
[Only
one state]
119: Bridge (slope = 2)
[Only
one state]
120: Passport (opening up)
[Only
one state]
121: Stopwatch
[Only
one state]
122: Lara and butler picture
[Only
one state]
123: Goon at the fancy door / Monk
124: Airplane cockpit / Marco Bartoli
125: Fancy-door goon's gunflare / Crate lid /
Minisub / Bartoli follower
126: Fancy-door goon's gun / Ceiling hook
127: Fancy-door goon's gunflare / Marco Bartoli
/ Lara's boot (thrown) / Bartoli follower
128: Laptop computer / Fabio / Marco Bartoli
/ Bartoli follower
129: Crate / Bartoli follower
130: Eros the Goon
133: Passport (closed)
[Only
one state]
134: N-thingy (Playstation memory card?)
[Only
one state]
135: * Pistols
136: * Shotgun
137: * Auto pistols
138: * Uzis
139: * Harpoon gun
140: * M16
141: * Grenade launcher
143: * Shotgun shells
144: * Auto-pistol clips
145: * Uzi clips
146: * Harpoons
147: * M16 clips
148: * Grenades
149: * Small medipack
150: * Large medipack
151: * Flares
152: Flare
[Only
one state]
153: Sunglasses
[Only
one state]
154: Portable CD player
[Only
one state]
155: Direction keys
[Only
one state]
157: Pistol
[Only
one state]
158: Shotgun
[Only
one state]
159: Auto-pistol
[Only
one state]
160: Uzi
[Only
one state]
161: Harpoon gun
[Only
one state]
162: M16
[Only
one state]
163: Grenade launcher
[Only
one state]
164: Pistol ammo(?)
[Only
one state]
165: Shotgun ammo
[Only
one state]
166: Auto-pistol ammo
[Only
one state]
167: Uzi ammo
[Only
one state]
168: Harpoons
[Only
one state]
169: M16 ammo
[Only
one state]
170: Grenades
[Only
one state]
171: Small medipack
[Only
one state]
172: Large medipack
[Only
one state]
173: Flares (opening box)
[Only
one state]
174: * Puzzle 1
175: * Puzzle 2
176: * Puzzle 3 ? [unused]
177: * Puzzle 4
178: Puzzle 1
[Only
one state]
179: Puzzle 2
[Only
one state]
180: Puzzle 3 ? [unused]
[Only
one state]
181: Puzzle 4
[Only
one state]
182: Slot 1 empty
[Only
one state]
183: Slot 2 empty
[Only
one state]
184: Slot 3 empty ? [unused]
[Only
one state]
185: Slot 4 empty
[Only
one state]
186: Slot 1 full
[Only
one state]
187: Slot 2 full
[Only
one state]
188: Slot 3 full ? [unused]
[Only
one state]
189: Slot 4 full
[Only
one state]
190: * Dragon 1
191: * Dragon 2
192: * Dragon 3
193: * Key 1
194: * Key 2
195: * Key 3
196: * Key 4
197: Key 1
[Only
one state]
198: Key 2
[Only
one state]
199: Key 3
[Only
one state]
200: Key 4
[Only
one state]
201: Lock 1
[Only
one state]
202: Lock 2
[Only
one state]
203: Lock 3
[Only
one state]
204: Lock 4
[Only
one state]
205: * Pickup 1
206: * Pickup 2
207: Pickup 1
[Only
one state]
208: Pickup 2
[Only
one state]
209: Dragon explosion effect (expanding netted
bubble)
[Only
one state]
210: Dragon explosion effect (expanding netted
bubble)
[Only
one state]
211: Dragon explosion effect (expanding solid
bubble)
[Only
one state]
212: Lara's hips / Alarm
[Only
one state]
213: Lara's hips
[Only
one state]
214: Tyrannosaur
1: Standing
2: Walking
3: Running
5: Dying
6: Bellowing
7: Biting
8: Shaking Head and Spitting Out
215: Lara's hips
[Only
one state]
216: Lara's hips
[Only
one state]
217: Lara's hips
[Only
one state]
218: Dragon bones (front)
[Only
one state]
219: Dragon bones (back)
[Only
one state]
220: * Extra Fire (Ice Palace)
222: Aquatic Mine (Venice)
[Only
one state]
223: Menu background (displayed when doing 3D-hardware
rendering)
[Only
one state]
224: * Gray disk
225: Gong-hammering animation
[Only
one state]
226: Gong (Ice Palace)
[Only
one state]
227: Detonator box
[Only
one state]
228: Helicopter (Diving Area)
[Only
one state]
229: * Grenade blast
230: * Splash
231: * Bubbles
233: * Blood splatter
234: * Green-white thing (Great Wall)
235: Flare burning?
[Only
one state]
236: * Flash (looks like distant light)
238: * Bullet hit
239: * Sparkles (Floating Islands, Dragon's Lair)
240: Gunflare
[Only
one state]
241: Gunflare (spiky)
[Only
one state]
243: Lara's hips
[Only
one state]
244: Lara's hips
[Only
one state]
245: Rod?
[Only
one state]
246: * Flamethrower (repeat of grenade blast)
247: Pointer?
[Only
one state]
248: Support?
[Only
one state]
249: Rod?
[Only
one state]
250: * Sprayed particles (Diving Area, Barkhang
Monastery, Temple of Xian)
252: * Fire
253: Lara's hips
[Only
one state]
254: Skybox
[Only
one state]
255: * Standard symbols
256: Monk
[Only
one state]
257: Lara's hips
[Only
one state]
259: Helicopter (The Great Wall)
[Only
one state]
260: The butler
1: Walking
2: Standing
261: * Assault-course numerals and punctuation
262: Lara's hips
[Only
one state]
263: Shotgun
[Only
one state]
264: Lara's hips
[Only
one state]
289: * Cellar artifact 1 (gold mask)
290: * Cellar artifact 2 (rounded statue)
291: * Cellar artifact 3 (flattened statue)
These are animation identifications for TR1 and TR2
The format of each one is:
Number#: Identification
Next Animation Number
Bones1[] Opcode Identification
Sounds
TR1 Animations:
Movable 0: Basic Lara
0: Running
Movable 1: Pistol Animations
160: Aim pistols
Movable 2: Shotgun Animations
164: Aim shotgun
Movable 3: AutoPistol Animations
169: Aim autopistols
Movable 4: Uzi Animations
170: Aim Uzis [has angry head]
0
Footstep
1: Walking carefully
1
Footstep
2: Sidestep?
11
Footstep
3: Sidestep?
11
Footstep
4: Run a bit
0
5: Run a bit
0
6: Start running
0
Footstep
7: Run to walk?
1
Footstep
8: Stop running
11
Footstep
9: Run half a cycle?
1
Footstep
10: Stop running? End a jump?
11
Footstep
11: Stationary
103
12: Sidestep left
12
Footstep
13: Sidestep right
13
Footstep
14: Landing on feet?
15
Landing on feet
15: Getting up on feet
11
Footstep
16: Jump
17
[Opcode 2]
Jump
17: Into the air
77
18: Jump
19
[Opcode 2]
Jump
19: Into the air
77
20: Moving slightly leftward
21
21: Leftward to forward?
1
Footstep
22: Landing
23
23: Landing
23
24: Landing, then getting up
11
Landing on feet, then
htting wall
25: Dying
25
Dying with broken bones
26: Jump upwards
[Opcode 2]
27
27: Jump upwards
28
Jump
28: Jumping upwards
28
29: Grabbing?
[Opcode 1: Grab point]
96
30: Landing
23
31: Landing
11
Landing on feet
32: Pulling herself up?
33
33: Landing
23
Landing on feet, then
htting wall
34: In the air?
35
35: In the air?
35
36: Jumping up?
23
37: Jumping up?
23
38: Getting to standstill
11
Footstep
39: Getting to standstill
11
Footstep
40: Walking backward
40
Footstep
41: Starting to walk backward
40
42: Pulling herself up a ledge
11
[Opcode 1: Step point]
Pulling herself up
43: Starting to run
6
[Opcode 1: Step point]
[Opcode 3]
44: Sidestepping rightward
44
Footstep
45: Falling
23
46: Falling
0
47: Flipover?
48
48: Flip-to-standing?
11
[Opcode 6: 0]
Footstep
49: Falling
23
50: Stepping up
[Opcode 1: Step point]
51
Stepping up?
51: To standing position
11
Footstep
52: Starting to run
6
53: Hitting wall
11
Hitting wall
54: Hitting wall
11
Hitting wall
55: Stepping up
0
Footstep
56: Stepping up
0
Footstep
57: Stepping up
1
Footstep
58: Stepping down
1
Footstep
59: Stepping down
1
Footstep
60: Stepping down
1
Footstep
61: Stepping down backward
40
Footstep
62: Stepping down backward
40
Footstep
63: Pulling lever
11
[Opcode 3: attached to
other]
Pulling metal lever
64: Pushing lever back
11
[Opcode 3: attached to
other]
Metal-lever reset (pushing
it back)
65: Sidestep right
65
Footstep
66: To standing position
11
67: Sidestep left
67
68: To standing position
11
69: Sidestep right
69
70: Sliding
70
Sliding
71: Recovering from slide?
72
Footstep
72: To standing position
11
Footstep
73: Starting a standing jump
91
Stepping up?
74: Jump?
[Opcode 2]
75
75: Backflip
75
76: Jump
[Opcode 2]
77
77: Landing
77
78: Jump Left
[Opcode 2]
79
79: Leftward Roll
79
80: Jump Right
[Opcode 2]
81
81: Rightward Roll
81
82: Landing on Feet after a Fall
11
Landing on feet
83: Falling?
23
84: Falling?
23
85: Falling?
23
86: Swimming
[Opcode 6: 3, 3]
86
Swimming
87: Swimming stationary
87
88: Pushing something?
89
89: Jump backwards
90
Footstep
90: To standing position
11
Footstep
91: Jumping upwards
[Opcode 2]
28
92: Running
0
Footstep
93: Fall
93
94: Jump with getting ready to grab
95
95: Jump with being ready to grab
95
96: Grabbing a ledge
96
Ledge grabbing?
97: Pulling herself up
102
[Opcode 1: Step point]
Pulling up
98: Falling?
23
99: Landing?
82
Landing on feet
100: Jump with being ready to grab
95
101: Jump with being ready to grab
95
102: Stationary
11
103: Stationary and breathing
103
104: Starting to slide while looking rightward
105
Landing on feet
105: Sliding while looking rightward
105
Sliding
106: To standing position
11
Footstep
107: Swimming
108
108: Swimming
108
[Opcode 6: 3, 3, 3]
109: Swimming
86
Swimming
110: Treading water
110
111: Pulling herself out of the water
11
[Opcode 6: 12]
Surfacing
112: Diving
86
[Opcode 6: 3, 3, 3]
Into water
113: Reverse direction underwater
86
Swim and gurgle
114: Surfacing
110
Catching breath and a
splash
115: Starting to swim
86
Gurgle
116: Treading water
116
Treading water
117: Treading water
110
118: Treading water
116
119: Dive
86
[Opcode 6: 3]
Swimming
120: Ready to push/pull block
120
121: To standing position from push/pull
11
122: Pulling block
11
[Opcode 1: Final-position
offset]
[Opcode 3: attached to
other]
Pulling block
123: Pushing block
11
[Opcode 1: Final-position
offset]
[Opcode 3: attached to
other]
Pushing block
124: Dying underwater
124
[Opcode 6: 3, 3, 3, 3]
125: Getting hurt
125
Getting hurt
126: Getting hurt
126
Getting hurt
126: Getting hurt
127
Getting hurt
128: Getting hurt
0
Getting hurt
129: Underwater lever pull
108
[Opcode 6: 3, 3, 3]
Underwater lever pull
130: Picking up underwater
108
[Opcode 6: 3, 3]
131: Pulling out and using key
11
[Opcode 3: attached to
other]
Inserting key/card
132: Dying underwater
132
[Opcode 6: 3, 3, 3]
133: Dying
133
Killed by flames/lava
134: Inserting something
11
[Opcode 3: attached to
other]
Inserting chip
135: Picking something up
11
[Opcode 3: attached to
other]
136: Leftward on grabbed ledge
136
Something clicking
137: Rightward on grabbed ledge
137
Something clicking
138: Dying
138
Dying
139: Dying
139
Getting hurt
140: Starting to tread water
141
141: Treading water backward
141
Treading water
142: Treading water
110
143: Treading water leftward
143
Treading water
144: Treading water rightward
144
Treading water
145: Dying
145
Dying and hitting ground
146: Starting roll
147
147: Finishing roll
[Opcode 6: 0]
148
148: Standing up after roll
11
Roll over
149: Dying
149
Killed by spikes
150: Ledge grab
96
Ledge grab?
151: Roll over
11
Roll over
152: Swimming
87
Into water
153: Dive
153
154: Swimming
87
Into water
155: Dying
155
Dying with broken bones
156: Starting dive
158
157: Starting dive
158
158: Swan dive
158
159: Handstand pull-up
102
[Opcode 1: Step point]
Pulling up?
160
161: Holster pistols
160
162: Pull out pistols
160
163: Aim pistols
163
164
165: Put shotgun back, grab shotgun
165
166: Put shotgun back, grab shotgun
164
167: Put shotgun to hips
164
168: Wield shotgun
164
169
170
TR2 Animations:
Movable 0: Basic Lara
0: Running
Movable 1: Pistol Animations
218: Aim pistols
Movable 2: Ponytail
[All animations hardcoded as game physics]
Movable 3: Shotgun Animations
222: Aim shotgun
Movable 4: AutoPistol Animations
227: Aim autopistols
Movable 5: Uzi Animations
228: Aim Uzis [has angry head]
Movable 6: M16 Animations
229: M16 on back, aiming another M16
Movable 7: Grenade-launcher animations
237: Put grenade launcher away, aim GL
Movable 8: Harpoon-gun animations
243: Harpoon gun on back; aiming another HG
Movable 9: Flare animations
254: Holding flare
Movable 10:
259: Standing
0
{footstep / walk in shallow
water}
1: Walking carefully
1
{footstep / treading
water}
2: Sidestep?
11
{footstep / walk in shallow
water}
3: Sidestep?
11
{footstep / walk in shallow
water}
4: Run a bit
0
5: Run a bit
0
6: Start running
0
{footstep / walk in shallow
water}
7: Run to walk?
1
{footstep / walk in shallow
water}
8: Stop running
11
{footstep / walk in shallow
water}
9: Run half a cycle?
1
{footstep / walk in shallow
water}
10: Stop running? End a jump?
11
{footstep / walk in shallow
water}
11: Stationary
103
12: Sidestep left
12
{footstep / treading
water}
13: Sidestep right
13
{footstep / treading
water}
14: Landing on feet?
15
{landing on feet / into
water}
15: Getting up on feet
11
{Footstep / {}}
16: Jump
17
[Opcode 2]
Jump {footstep / walk
in shallow water}
17: Into the air
77
18: Jump
19
[Opcode 2]
Jump {footstep / walk
in shallow water}
19: Into the air
77
20: Moving slightly leftward
21
21: Leftward to forward?
1
{footstep / treading
water}
22: Landing
23
23: Landing
23
24: Landing, then getting up
11
{hitting wall, falling
/ walk in water, into water}
25: Dying
25
{dying with broken bones
/ into water}
26: Jump upwards
27
[Opcode 2]
{{} / walk in shallow
water}
27: Jump upwards
28
Jump
28: Jumping upwards
28
29: Grabbing?
[Opcode 1: Grab point]
96
30: Landing
23
31: Landing
11
{landing on feet / walk
in shallow water}
32: Pulling herself up?
33
33: Landing
23
Landing on feet, hitting
wall
34: In the air?
35
35: In the air?
35
36: Jumping up?
23
37: Jumping up?
23
38: Getting to standstill
11
{footstep / walk in shallow
water}
39: Getting to standstill
11
{footstep / walk in shallow
water}
40: Walking backward
40
{footstep / treading
water}
41: Starting to walk backward
40
42: Pulling herself up a ledge
11
[Opcode 1: Step point]
Pulling up {{} / surfacing}
43: Starting to run
6
[Opcode 1: Step point]
[Opcode 3]
44: Sidestepping rightward
44
{footstep / trading water}
45: Falling
23
46: Falling
0
47: Flipover?
48
{} / Into water
48: Flip-to-standing?
11
[Opcode 6: 0]
{footstep / walk in shallow
water}
49: Falling
23
50: Stepping up
[Opcode 1: Step point]
51
Pulling up {{} / wade
in shallow water}
51: To standing position
11
Footstep
52: Starting to run
6
53: Hitting wall
11
Hitting wall
54: Hitting wall
11
Hitting wall
55: Stepping up
0
Footstep {{} / walk in
shallow water}
56: Stepping up
0
Footstep {{} / walk in
shallow water}
57: Stepping up
1
Footstep {{} / treading
water}
58: Stepping down
1
Footstep {{} / treading
water}
59: Stepping down
1
Footstep {{} / walk in
shallow water}
60: Stepping down
1
Footstep {{} / walk in
shallow water}
61: Stepping down backward
40
Footstep {{} / walk in
shallow water}
62: Stepping down backward
40
Footstep {{} / walk in
shallow water}
63: Pulling lever
11
[Opcode 3: attached to
other]
Pulling metal lever {{}
/ treading water}
64: Pushing lever back
11
[Opcode 3: attached to
other]
Metal-lever reset (pushing
it back) {{} / treading water}
65: Sidestep left
65
Footstep {{} / treading
water}
66: To standing position
11
67: Sidestep right
67
Footstep {{} / treading
water}
68: To standing position
11
69: Step forward
69
Footstep {{} / treading
water}
70: Sliding
70
Sliding
71: Recovering from slide?
72
Footstep {{} / walk in
shallow water}
72: To standing position
11
Footstep
73: Starting a standing jump
91
Jump {{} / treading water}
74: Jump?
[Opcode 2]
{{} / surfacing}
75: Backflip
75
76: Jump
[Opcode 2]
{{} / surfacing}
77: Landing
77
78: Jump Left
[Opcode 2]
79
{{} / surfacing}
79: Leftward Roll
79
80: Jump Right
[Opcode 2]
81
{{} / surfacing}
81: Rightward Roll
81
82: Landing on Feet after a Fall
11
Landing on feet {{} /
walk shallow, into water}
83: Falling?
23
84: Falling?
23
85: Falling?
23
86: Swimming
[Opcode 6: 3, 3]
Swimming
87: Swimming stationary
87
88: Pushing something?
89
89: Jump backwards
90
Footstep {{} / walk in
shallow water}
90: To standing position
11
Footstep {{} / treading
water}
91: Jumping upwards
[Opcode 2]
28
{{} / surfacing}
92: Running
0
Footstep {{} / walk in
shallow water}
93: Fall
93
94: Jump with getting ready to grab
95
95: Jump with being ready to grab
95
96: Grabbing a ledge
96
Ledge grab, pull up
97: Pulling herself up
102
[Opcode 1: Step point]
Pulling up
98: Falling?
23
99: Landing?
82
Landing on feet
100: Jump with being ready to grab
95
101: Jump with being ready to grab
95
102: Stationary
11
103: Stationary and breathing
103
104: Starting to slide while looking rightward
105
Landing on feet
105: Sliding while looking rightward
105
Sliding
106: To standing position
11
Footstep {{} / walk in
shallow water}
107: Swimming
108
108: Swimming
108
[Opcode 6: 3, 3, 3]
109: Swimming
86
Swimming
110: Treading water
110
111: Pulling herself out of the water
11
[Opcode 6: 12]
Surfacing
112: Diving
86
[Opcode 6: 3, 3, 3]
Into water
113: Reverse direction underwater
86
Swimming, gurgle
114: Surfacing
110
Catching breath, surfacing
115: Starting to swim
86
Gurgle
116: Treading water
116
Treading water
117: Treading water
110
118: Treading water
116
119: Dive
86
[Opcode 6: 3, 3, 3]
Swimming
120: Ready to push/pull block
120
121: To standing position from push/pull
11
122: Pulling block
11
[Opcode 1: Final-position
offset]
[Opcode 3: attached to
other]
Pulling block
123: Pushing block
11
[Opcode 1: Final-position
offset]
[Opcode 3: attached to
other]
Pushing block
124: Dying underwater
124
[Opcode 6: 3, 3, 3, 3]
125: Getting hurt
125
Getting hurt
126: Getting hurt
126
Getting hurt
126: Getting hurt
127
Getting hurt
128: Getting hurt
0
Getting hurt
129: Underwater lever pull
108
[Opcode 6: 3, 3, 3]
Underwater lever pull,
then swimming
130: Picking up underwater
108
[Opcode 6: 3, 3]
131: Pulling out and using key
11
[Opcode 3: attached to
other]
Inserting key/card {{}
/ treading water}
132: Dying underwater
132
[Opcode 6: 3, 3, 3]
133: Dying
133
Killed by flames/lava
{{} / into water}
134: Inserting something
11
[Opcode 3: attached to
other]
Inserting chip
135: Picking something up
11
[Opcode 3: attached to
other]
Picked up something
136: Leftward on grabbed ledge
136
Something clicking
137: Rightward on grabbed ledge
137
Something clicking
138: Dying
138
Dying {{} / into water}
139: Dying
139
Getting hurt, hitting
wall {{} / into water}
140: Starting to tread water
141
141: Treading water backward
141
Treading water
142: Treading water
110
143: Treading water leftward
143
Treading water
144: Treading water rightward
144
Treading water
145: Dying
145
145: Dying, hitting ground {{} / into water}
146: Starting roll
147
147: Finishing roll
[Opcode 6: 0]
{roll over / into water}
148: Standing up after roll
11
149: Dying
149
Killed by spikes
150: Ledge grab
96
Ledge grab
151: Roll over
11
Hit the ground and roll
{{} / into water}
152: Swimming
87
Into water
153: Dive
153
154: Swimming
87
Into water
155: Dying
155
Dying with broken bones
{{} / into water}
156: Starting dive
158
157: Starting dive
158
158: Swan dive
158
159: Handstand pull-up
102
[Opcode 1: Step point]
Pulling up [attachment
point]
160: Starting to climb upward
164
[Opcode 1: Grab point]
Pulling up, clicks, {{}
/ wade in shallow water}
161: Climbing upward
161
[Opcode 1: Grab point]
Pulling up? {{} / clicks}
162: Stop climbing upward
164
[Opcode 1: Grab point]
Click
163: Stop climbing upward
164
[Opcode 1: Grab point]
Click
164: Hold on while climbing
164
165: Starting to climb upward
161
Click
166: Stop climbing downward
164
Click
167: Stop climbing downward
164
Click
168: Climb downward
168
[Opcode 1: Grab point]
Click
169: Climb downward
168
[Opcode 1: Grab point]
Click
170: Climb rightward
170
Click
171: Climb leftward
171
Click
172: Hanging on to ledge
173
[Opcode 1: Grab point]
173: Climbing up while holding ledge
164
174: Climbing onto ledge
102
[Opcode 1:]
Pulling up [attachment
point, opcode 3]
175: To standing position
11
176: Wading
177
177: Wading
177
Wade in shallow water
178: Wading
177
Into water
179: Starting to wade
177
180: Starting to run?
0
181: Starting to run?
0
182: Starting to jump backwards from grab
183
[Opcode 2]
183: Jumping backwards
75
[Opcode 1: Grab point]
184: To standing position
11
185: To standing position
11
186:
177
187: Climb upward and stop
96
[Opcode 1: Grab point]
Click
188: Climb downward and stop
96
[Opcode 1: Grab point]
Click
189: Throwing flare?
189
190: Running uphill
177
Into water
191: Pulling upward
11
[Opcode 3]
Into water
192: Getting onto terra firma
11
Into water
193: Getting onto terra firma
11
Into water
194: Climb down and grab
96
[Opcode 1: Grab point]
Click
195: Pressing two buttons?
11
[Opcode 3: attached to
other]
Lever pull
196: Pressing two buttons?
11
[Opcode 3: attached to
other]
Lever pull
197: Pressing button
11
[Opcode 3: attached to
other]
Pressing button
198: Swimming
108
199: Swimming
108
200: Swimming
108
201: Climb right and drop
96
[Opcode 1: Grab point]
202: Climb left and drop
96
[Opcode 1: Grab point]
203: Swimming flipover?
205
Swimming
204: Pick up a flare?
11
205: Swimming?
108
206: Grabbing a flare while swimming?
108
207: Half-flipover
209
[Opcode 6: 0]
208: Flipover to dive
153
209: Flipover?
75
210: Flipover
211
[Opcode 6: 0]
211: Landing after flip
75
212: Flipover
213
[Opcode 6: 0]
213: Landing after flip
77
214: Kicking
11
215: Grabbing zipline handle
[Opcode 1: Grab point]
Zipline handle grab
216: Holding onto zipline?
216
217: Releasing zipline handle?
[Opcode 1: Grab point]
[Opcode 3]
77
218
219: Holster pistols
218
220: Pull out pistols
218
221: Aim pistols
221
224
223: Put shotgun back, grab shotgun
222
Holstering guns
224: Put shotgun back, grab shotgun
224
Firing shotgun, then
cocking it
225: Put shotgun to hips
225
[Opcode 4]
Holstering guns
226: Wield shotgun
222
227
228
231
230: Put M16 back, grab M16
229
Holstering guns
231: Fire M16
231
232: Put M16 back, grab M16
232
[Opcode 4]
Holstering guns
233: Turn M16 away
229
234: Aim M16
236
235: Turn M16 away
234
236: Aim and fire M16
236
238
Holstering guns
238: Aim grenade launcher
240
239: Get grenade for launcher
240
Grenade settling, entering
240: Fire grenade launcher
239
Grenade-launcher firing
241: Turning grenade launcher away
238
242: Put grenade launcher away, then wield it
242
[Opcode 4]
Holstering guns
245
244: Put harpoon gun back, grab HG
243
Holstering guns
245: Fire harpoon gun
245
Harpoon ricochet
246: Put harpoon gun back; grab HG
243
[Opcode 4]
Holstering guns
247: Turn harpoon gun away
243
248: Reload harpoon gun
243
{harpoon reload / underwater
harpoon reload}
249: Pointing harpoon gun forward
251
250: Turning harpoon gun away from forward
249
251: Fire harpoon gun
251
Fire harpoon
252: Put harpoon gun back; grab HG
252
[Opcode 4]
253: Put harpoon gun back; grab HG
253
[Opcode 4]
254
255: Pulling flare out?
255
256: Pulling flare out?
257
257: Lighting flare?
254
258: Lighting flare?
254
259
260: Being tossed about (Lara getting killed by tyrannosaur?)
260
TR2 Sound
IDs
The first number is the sound's index in "SoundMap"; TR2 appears
to be completely consistent here.
The second number is the sound's index in the file MAIN.SFX
A short description follows, and if the sound is a member of a set,
then a "--" and then how many are in that set. Thus, Lara's footsteps are
a set of 4 sounds.
0000 -- 0000 -- Footstep -- 4
0001 -- 0004 -- Lara grunt
0002 -- 0005 -- Lara "no"
0003 -- 0006 -- Lara sliding
0004 -- 0007 -- Lara landing on feet
0005 -- 0008 -- Lara grunt (pulling up)
0006 -- 0009 -- Lara unholstering pistols/magnums/UZIs
0007 -- 0010 -- Lara holstering pistols/magnums/UZIs
0008 -- 0011 -- Lara firing pistols
0009 -- 0012 -- Lara cocking shotgun/pistol
0010 -- 0013 -- Bullet ricochet -- 2
0011 -- 0015 -- Lara lighting flare
0012 -- 0016 -- Flare burning
0013 -- ----
0014 -- ----
0015 -- 0017 -- Harpoon ricochet
0016 -- 0018 -- Harpoon reload
0017 -- 0019 -- Walk in shallow water -- 4
0018 -- 0023 -- Wade in shallow water -- 2
0019 -- ----
0020 -- 0025 -- Lara treading water
0021 -- 0026 -- Lara firing magnums
0022 -- 0027 -- Harpoon reload (underwater?)
0023 -- 0028 -- Fire harpoon (underwater)
0024 -- 0029 -- Massive crash
0025 -- 0030 -- Lara pressing button
0026 -- 0031 -- Lara moan (pulling up)
0027 -- 0032 -- Lara grunt (hitting wall) -- 2
0028 -- 0034 -- Click (?) -- 2
0029 -- 0036 -- Lara grunt (jumping)
0030 -- 0037 -- Lara scream (falling)
0031 -- 0038 -- Lara getting hurt -- 2
0032 -- 0040 -- Lara roll
0033 -- 0041 -- Splash (Lara into water)
0034 -- 0042 -- Splash (Lara surfacing)
0035 -- 0043 -- Switch (Lara underwater)
0036 -- 0044 -- Lara catching breath
0037 -- 0045 -- Underwater gurgle
0038 -- 0046 -- Lara pulling metal lever
0039 -- 0047 -- Lara inserting key/card
0040 -- 0048 -- Lara inserting chip/pryr-whl/scroll/gem/etc.
0041 -- 0049 -- Lara dying 1
0042 -- 0050 -- Lara dying 2
0043 -- 0051 -- Lara firing Uzis
0044 -- 0052 -- Gunshot echo?
0045 -- 0053 -- Lara firing shotgun
0046 -- 0054 -- Lara grunt (starting to push block)
0047 -- 0055 -- Lara grunt (pushing block) -- 3
0048 -- 0058 -- Click (?)
0049 -- 0059 -- Something hitting Lara?
0050 -- 0060 -- Bullet hitting Lara?
0051 -- 0061 -- Lara "heh!" (pulling up?)
0052 -- 0062 -- Lara treading water
0053 -- 0063 -- Lara's bones breaking (dying)
0054 -- 0064 -- Ledge grab by Lara?
0055 -- 0065 -- Lara "oomph!" (hitting wall after grabbing ledge)
0056 -- 0066 -- Footstep/ledge shimmy by Lara?
0057 -- 0067 -- Metal-lever reset
0058 -- 0068 -- Glass breaking
0059 -- 0069 -- Waterfall and gurgle
0060 -- 0060 -- Underwater ambience
0061 -- 0071 -- Underwater level pull
0062 -- 0072 -- Lara "aha!" (picked up something)
0063 -- 0073 -- Block sliding
0064 -- 0074 -- Door opening
0065 -- 0075 -- Something swinging
0066 -- 0076 -- Brittle ground
0067 -- 0077 -- Brittle ground breaking away/falling
0068 -- 0078 -- Brittle ground hitting solid ground
0069 -- 0079 -- Enemy footstep -- 3
0070 -- 0082 -- Enemy grunt (climbing up something)
0071 -- 0083 -- Enemy hitting Lara 1
0072 -- 0084 -- Enemy hitting Lara 2
0073 -- 0085 -- Enemy groan (dying)
0074 -- 0086 -- Enemy growl
0075 -- 0087 -- Enemy grunt (climbing up something?)
0076 -- 0088 -- Enemy grunt (climbing up something?)
0077 -- 0089 -- ?
0078 -- 0090 -- Lara firing M-16
0079 -- 0091 -- Waterfall
0080 -- 0092 -- Sword statue (drop)
0081 -- 0093 -- Sword statue (lift)
0082 -- 0094 -- Metal gate open
0083 -- 0095 -- Metal gate close
0084 -- 0096 -- Pop?
0085 -- 0097 -- Enemy body hitting ground (dying) -- 3
0086 -- 0100 -- Dog bark 1
0087 -- 0101 -- Footstep? -- 3
0088 -- 0104 -- Dog bark 2
0089 -- 0105 -- Dog yelp (dying) -- 3
0090 -- 0108 -- Dog pant
0091 -- 0109 -- Footstep? -- 3
0092 -- 0112 -- Leopard growl 1
0093 -- 0113 -- Leopard snarl
0094 -- 0114 -- Leopard growl 2
0095 -- 0115 -- Leopard growl-twitch (dying)
0096 -- 0116 -- Leopard growl 3
0097 -- 0117 -- Rat squeak -- 2
0098 -- 0119 -- Rat squeal (dying)
0099 -- 0120 -- Tiger growl 1
0100 -- 0121 -- Tiger growl 2
0101 -- 0122 -- Tiger growl 3
0102 -- 0123 -- Tiger dying
0103 -- 0124 -- Tiger growl 4
0104 -- 0125 -- Echo?
0105 -- 0126 -- Explosion -- 2
0106 -- 0128 -- Growl?
0107 -- 0129 -- Footstep?
0108 -- 0130 -- Menu-option movement
0109 -- 0131 -- Menu option: Lara's home
0110 -- ----
0111 -- 0132 -- Menu/menu-option popup
0112 -- 0133 -- Menu-option escape
0113 -- 0134 -- Menu-option select?
0114 -- 0135 -- Menu-option select
0115 -- 0136 -- Menu game-page turn
0116 -- 0137 -- Lara sigh ("The-e-ere!") from recharge
0117 -- 0138 -- Enemy footstep (clicking) -- 4
0118 -- 0142 -- Enemy firing gun with silencer -- 2
0119 -- 0144 -- Enemy "ah!" (dying)
0120 -- 0145 -- Enemy "oo!" (dying)
0121 -- 0146 -- Enemy punch?
0122 -- 0147 -- Spider moving
0123 -- 0148 -- Grenade launcher load (grenade entering)
0124 -- 0149 -- Grenade launcher load (grenade settling)
0125 -- 0150 -- Fire grenade launcher
0126 -- 0151 -- Spider biting Lara?
0127 -- 0152 -- Spiked metal door slide
0128 -- 0153 -- Spiked metal door close
0129 -- 0154 -- Eagle squawk
0130 -- 0155 -- Eagle-wing flap
0131 -- 0156 -- Eagle dying squawk
0132 -- 0157 -- Crow "grok!"
0133 -- 0158 -- Crow-wing flap
0134 -- 0159 -- Crow "grak!"
0135 -- 0160 -- Crunch?
0136 -- 0161 -- Enemy gun cock?
0137 -- 0162 -- Enemy gunshot?
0138 -- 0163 -- ?
0139 -- 0164 -- ?
0140 -- 0165 -- Heavy breathing (?)
0141 -- 0166 -- Enemy chuckling (after killing Lara)
0142 -- 0167 -- Monk "poy-yaw!"
0143 -- 0168 -- Monk "awu!" (dying?)
0144 -- ----
0145 -- 0169 -- Lara "oi-ah!" (killed by spikes)
0146 -- 0170 -- Lara groan (killed by flames/lava)
0147 -- 0171 -- Boulder(s)/oildrum(s)/snowballs/etc. rolling
0148 -- 0172 -- Sandbag snapping
0149 -- 0173 -- Sandbag/? hitting ground
0150 -- 0174 -- Burning
0151 -- ----
0152 -- 0175 -- Snowmobile start
0153 -- 0176 -- Snowmobile idle
0154 -- 0177 -- Snowmobile accelerate
0155 -- 0178 -- Snowmobile (high engine RPM)
0156 -- 0179 -- Snowmobile shut off
0157 -- 0180 -- Enemy gunshot
0158 -- 0181 -- Enemy groan (dying)
0159 -- 0182 -- Enemy heavy breathing
0160 -- 0183 -- Click?
0161 -- 0184 -- Floor trapdoor open
0162 -- 0185 -- Floor trapdoor close
0163 -- 0186 -- Yeti growl -- 2
0164 -- 0188 -- Yeti chest beat
0165 -- 0189 -- Yeti ?
0166 -- 0190 -- Yeti grunt and chest beat
0167 -- 0191 -- Yeti scream
0168 -- 0192 -- Yeti scream (dying)
0169 -- 0193 -- Yeti growl 1
0170 -- 0194 -- Yeti growl 2
0171 -- 0195 -- Yeti grunt
0172 -- 0196 -- Yeti growl 3
0173 -- 0197 -- Yeti footstep -- 2
0174 -- 0199 -- Enemy heavy breathing
0175 -- 0200 -- Enemy flamethrower flame
0176 -- 0201 -- Enemy flamethrower reset?
0177 -- 0202 -- Enemy flamethrower cycle?
0178 -- 0203 -- Enemy groan (dying?)
0179 -- 0204 -- Enemy flamethrower pack echo (dying)
0180 -- 0205 -- Enemy belt(?) jingle
0181 -- 0206 -- Wrench "ching" (enemy)
0182 -- 0207 -- Footstep?
0183 -- 0208 -- Footstep/Lara hit?
0184 -- 0209 -- Enemy cocking shotgun
0185 -- ----
0186 -- 0210 -- Underwater?
0187 -- ----
0188 -- 0211 -- Scuba-diver airflow
0189 -- ----
0190 -- 0212 -- Pulley crane-block movement
0191 -- 0213 -- Curtain open/close
0192 -- 0214 -- enemy grunt (scuba; dying?)
0193 -- 0215 -- Underwater?
0194 -- 0216 -- Boat start
0195 -- 0217 -- Boat idle
0196 -- 0218 -- Boat accelerate
0197 -- 0219 -- Boat (high engine RPM)
0198 -- 0220 -- Boat shut off
0199 -- 0221 -- Boat (engine hit)
0200 -- 0222 -- Boat (body hit)
0201 -- 0223 -- Clatter 1
0202 -- 0224 -- Clatter 2
0203 -- 0225 -- Clatter 3
0204 -- 0226 -- Door slide
0205 -- 0227 -- Lara flesh wound -- 2
0206 -- 0229 -- saw (high RPM)
0207 -- 0230 -- saw switched off
0208 -- 0231 -- Bell chime
0209 -- 0232 -- ? creaking/hitting something
0210 -- 0233 -- ? swinging
0211 -- 0234 -- ? breaking?
0212 -- 0235 -- Pulley movement
0213 -- 0236 -- Airplane engine idle
0214 -- ----
0215 -- 0237 -- Underwater fan
0216 -- ----
0217 -- 0238 -- Vent fan
0218 -- 0239 -- Rope swing
0219 -- 0240 -- Jump pad 1
0220 -- 0241 -- Jump pad 2
0221 -- 0242 -- Something breaking?
0222 -- 0243 -- ball/rock/snowballs/etc rolling
0223 -- 0244 -- ball/rock/snowballs/etc settling
0224 -- 0245 -- ?
0225 -- 0246 -- Crash?
0226 -- 0247 -- Crash?
0227 -- 0248 -- Something rolling
0228 -- 0249 -- Something hitting wall/settling
0229 -- 0250 -- Blade slice-hit
0230 -- 0251 -- Blade "ching"
0231 -- 0252 -- Rolling spike-wheel
0232 -- 0253 -- Kill of something?
0233 -- 0254 -- blade cutting into Lara?
0234 -- 0255 -- Rotating-handle loosen
0235 -- 0256 -- Rotating-handle turn
0236 -- 0257 -- Rotating-handle door-latch open
0237 -- 0258 -- Rotating-handle door creak and latch
0238 -- 0259 -- Monk? footstep -- 4
0239 -- 0263 -- Monk sword swing (single)
0240 -- 0264 -- Monk sword swing (multi)
0241 -- 0265 -- Monk shout 1 -- 3
0242 -- 0268 -- Monk shout 2 -- 3
0243 -- 0271 -- Monk dying? -- 3
0244 -- 0274 -- Monk hurt? -- 3
0245 -- 0277 -- Crunch? -- 2
0246 -- 0279 -- Enemy, "haye"
0247 -- 0280 -- Splash (surfacing)
0248 -- 0281 -- Waterfall
0249 -- 0282 -- Footstep in snow -- 3
0250 -- 0285 -- Gunshot?
0251 -- 0286 -- Enemy gunshot
0252 -- 0287 -- Enemy "ahaga-hoog-uh!" (dying)
0253 -- 0288 -- Enemy grunt (dying?)
0254 -- 0289 -- Shooting-circle blade
0255 -- 0290 -- Footstep? -- 4
0256 -- 0294 -- Monk "oye!"
0257 -- 0295 -- Monk "aweh!"
0258 -- 0296 -- Shooting circle blade hit
0259 -- 0297 -- Warrior footstep
0260 -- 0298 -- Monk blade swing? -- 3
0261 -- 0301 -- Monk? blade swing
0262 -- 0302 -- Warrior growl -- 2
0263 -- 0304 -- Knifethrower hiccup
0264 -- 0305 -- Warrior burp, "wuuhh!"? -- 3
0265 -- 0308 -- Warrior growl-burp?
0266 -- ----
0267 -- 0309 -- Warrior awaken
0268 -- 0310 -- Warrior growl-burp?
0269 -- 0311 -- Lever pull
0270 -- ----
0271 -- ----
0272 -- ----
0273 -- ----
0274 -- ----
0275 -- ----
0276 -- ----
0277 -- ----
0278 -- 0312 -- Chain pulley
0279 -- 0313 -- Lara zipline handle grab
0280 -- 0314 -- Lara zipline slide
0281 -- 0315 -- Lara zipline handle hit
0282 -- 0316 -- Body slump?
0283 -- 0317 -- ? body crunch
0284 -- 0318 -- ?
0285 -- 0319 -- Crunch?
0286 -- 0320 -- Sliding door open
0287 -- 0321 -- Sliding door open
0288 -- 0322 -- Water something
0289 -- 0323 -- ?
0290 -- 0324 -- ?
0291 -- 0325 -- Talion guardian scream
0292 -- 0326 -- ? gasp, growl -- 3
0293 -- 0329 -- Talion guardian hoarse breathing
0294 -- 0330 -- Talion guardian footstep
0295 -- 0331 -- Talion guardian scream (dying)
0296 -- 0332 -- Large spider
0297 -- 0333 -- Helicopter
0298 -- 0334 -- Dragon footstep
0299 -- 0335 -- Dragon growl 1
0300 -- 0336 -- Dragon growl 2
0301 -- 0337 -- Dragon body fall
0302 -- 0338 -- Dragon dying breath
0303 -- 0339 -- Dragon growl 3
0304 -- 0340 -- Dragon grunt
0305 -- 0341 -- Dragon fire-breathing
0306 -- 0342 -- Dragon leg lift
0307 -- 0343 -- Dragon leg hit
0308 -- 0344 -- Warrior blade swing -- 2
0309 -- 0346 -- Warrior blade swing (fast)
0310 -- ----
0311 -- 0347 -- Warrior breath?
0312 -- 0348 -- Warrior hover
0313 -- 0349 -- Warrior landing
0314 -- 0350 -- Warrior? blade hit
0315 -- 0351 -- Warrior? blade slice -- 2
0316 -- 0353 -- Birds chirping -- 2
0317 -- 0355 -- ? crunch
0318 -- 0356 -- ? crunch -- 3
0319 -- 0359 -- Door creak and close
0320 -- 0360 -- ? breaking
0321 -- 0361 -- Large spider snarl
0322 -- 0362 -- Large spider footstep -- 4
0323 -- 0366 -- Large spider snarl (dying)
0324 -- 0367 -- Dragon growl
0325 -- 0368 -- Dragon/T-Rex footstep
0326 -- 0369 -- Dragon/T-Rex growl 1
0327 -- 0370 -- Dragon/T-Rex growl 2
0328 -- ----
0329 -- 0371 -- Water drip -- 3
0330 -- 0374 -- Stage-backdrop move
0331 -- 0375 -- Stone door slide
0332 -- 0376 -- Platform alarm (Star-Trek-like)
0333 -- 0377 -- Lara's grandfather clock tick
0334 -- 0378 -- Lara's house front door chime
0335 -- 0379 -- Lara's house alarm
0336 -- 0380 -- ? Boat racing
0337 -- 0381 -- ? Water
0338 -- 0382 -- ?
0339 -- 0383 -- ?
0340 -- 0384 -- ?
0341 -- 0385 -- ?
0342 -- 0386 -- ?
0343 -- 0387 -- hit?
0344 -- 0388 -- Butler sounds 1 -- 5
0345 -- 0393 -- Butler sounds 2 -- 4
0346 -- 0397 -- Butler sounds 3 -- 2
0347 -- 0399 -- Butler cup clatter -- 2
0348 -- 0401 -- Brittle ground breaking
0349 -- 0402 -- Spider explode (dying)/Lara bullet hit?
0350 -- 0403 -- Shark bite
0351 -- 0404 -- Lava
0352 -- 0405 -- Loud hit?
0353 -- 0406 -- Unwelcome guests at Lara's home
0354 -- 0407 -- Zipper?