Monday 22 April 2019

2: Tomb Raider 3 source code notes

Further investigation of the Tomb Raider 3 source code that was leaked online. See the first post in this series for details. [link]

I am studying the modified version mentioned in the comments of the first post (“TR3_ok”) because this version can be successfully built in Visual Studio 2013 as is. I wasn’t the genius who modified the code though.

To run the game, copy the “data” and “pix” folders from the retail version into the project’s folder.

Note on my PC I had to locate the project folder on a USB drive because the setup dialog for the game didn’t have any display resolution options if I used a project folder located on my system.

The leaked source code is not the version used for the retail game. It is an earlier version and some things are unfinished. The members of the discord channel refer to this version as Tomb Raider 2.1.

Be aware that the code contains some rude/offensive language by original programmers in the comments.

It seems that the source code was used for the PC and PSX versions of the game since blocks of code are contained in #ifdef PC_VERSION and #ifdef PSX_VERSION compiler directives. The modified version of the code I am using builds the PC version.