Tomb Raider 3 flight mode patch, version 0.0

How to use the patch

  1. Get the updated Tomb Raider 3 executable from www.core-design.com, and move it to your Tomb Raider 3 directory as instructed.
  2. Put tr3flight.exe in the same directory as the Tomb Raider executable, and run it. When prompted, press a key that you haven't assigned to any other function in the game.
  3. Run tomb3cheat.exe, which was created in the previous step. To enter the cheat mode, press the key you chose earlier. To return to normal, press the "walk" key (Shift by default).

How it works

This patch adds code to the file tomb3.exe which checks for the press of a certain key, and when it's detected, modifies some internal variables. Most of these have the effect of putting the game in "swim mode." One of them causes the game not to notice that it shouldn't be in this mode. It also causes Lara to become invincible and never run out of air.

To make room for the patch, I space-optimized some inefficient code in the keyboard handler. This freed up 186 bytes, only 57 of which are used by the patch. That leaves 129 bytes which you could use for other patches if you were so inclined. A no-clipping mode might be nice.

No new code is required to sustain or exit the cheat mode. In fact, if you enter the cheat mode, save your game, and then run the unpatched tomb3.exe and load the game there, you will still be in the cheat mode and Walk will still exit it. It will probably also kill you, though; see below.

Known bugs

Distribution conditions

I would prefer that you link to my page at www.math.berkeley.edu rather than duplicating this patch elsewhere, since this makes it much easier for me to provide updated versions should the need arise. If you do propagate the patch, please do not misrepresent my work. This means that if you change this file or tr3flight.exe or if you bundle additional files, you must make it very clear that the changes or additions are yours and not mine.