MCPcopy Index your code
hub / github.com/LostArtefacts/TRX

github.com/LostArtefacts/TRX @4.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 4.2 ↗ · + Follow
2,700 symbols 6,410 edges 450 files 36 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

TR1X logo TR1X logo

This is an open source implementation of the classic Tomb Raider I game (1996), made by reverse engineering the TombATI / GLRage variant of the original game and replacing proprietary audio/video libraries with open source variants.

See the Tomb Raider Forums topic.

Showcase

Restored braid Enemy health bar and UI scaling
3D pickups Improved stats
Customizable draw distance Fly cheat
Free camera PS1 UI and new graphics options

Windows / Linux

Installing (simplified)

  1. Head over to GitHub releases: https://github.com/LostArtefacts/TR1X/releases
  2. Download the installer. Your browser may complain that the .exe is unsafe, but it's OK to ignore this alert.
  3. Mark the installer EXE as safe to run by right-clicking on the .exe, going to properties and clicking "Unblock".
  4. Run the installer and proceed with the steps.

We hope that eventually these alerts will go away as the popularity of the project rises.

Installing (advanced / manual)

  1. Head over to GitHub releases: https://github.com/LostArtefacts/TR1X/releases
  2. Download the zip file.
  3. Extract the zip file into a directory of your choice.
    Make sure you choose to overwrite existing directories and files (cfg/TR1X_config.json5 can remain, but new features will not be configurable).
  4. (First time installation) Put your original game files into the target directory.

    1. For Steam and GOG users, extract the original GAME.BIN file using a tool such as UltraISO to your target directory. Note that neither the GOG nor the Steam releases ship the music files. You have a few options here:
    2. You can download the music files from the link below.
      https://lostartefacts.dev/aux/tr1x/music.zip The legality of this approach is disputable.
    3. Rip the assets yourself from a physical PlayStation/SegaSaturn disk.

    Optionally you can also install the Unfinished Business expansion pack files. - Either one of these these variants: - https://lostartefacts.dev/aux/tr1x/trub-music.zip (fan-made patch to include music triggers) - https://lostartefacts.dev/aux/tr1x/trub-vanilla.zip (original level files, which do not include music triggers) - Or the more manual link: https://archive.org/details/tomb-raider-i-unfinished-business-pc-eng-full-version_20201225 2. For TombATI users this means copying the data, fmv and music directories. 5. To play the game, run TR1X.exe. 6. To play the Unfinished Expansion pack, run TR1X.exe -gold.

If you install everything correctly, your game directory should look more or less like this (click to expand):

* Will not be present until the game has been launched.

.
├── cfg
│   ├── TR1X.json5 *
│   ├── TR1X_gameflow.json5
│   ├── TR1X_gameflow_demo_pc.json5
│   └── TR1X_gameflow_ub.json5
├── data
│   ├── cat.phd
│   ├── cred0.pcx
│   ├── cred1.pcx
│   ├── cred2.pcx
│   ├── cred3.pcx
│   ├── cut1.phd
│   ├── cut2.phd
│   ├── cut3.phd
│   ├── cut4.phd
│   ├── egypt.phd
│   ├── eidospc.pcx
│   ├── end2.phd
│   ├── end.pcx
│   ├── end.phd
│   ├── gym.phd
│   ├── install.pcx
│   ├── level10a.phd
│   ├── level10b.phd
│   ├── level10c.phd
│   ├── level1.phd
│   ├── level2.phd
│   ├── level3a.phd
│   ├── level3b.phd
│   ├── level4.phd
│   ├── level5.phd
│   ├── level6.phd
│   ├── level7a.phd
│   ├── level7b.phd
│   ├── level8a.phd
│   ├── level8b.phd
│   ├── level8c.phd
│   ├── titleh.pcx
│   ├── titleh_ub.pcx
│   │── title.phd
│   │── images
│   │   ├── atlantis.webp
│   │   ├── credits_1.webp
│   │   ├── credits_2.webp
│   │   ├── credits_3.webp
│   │   ├── credits_3_alt.webp
│   │   ├── credits_ps1.webp
│   │   ├── egypt.webp
│   │   ├── eidos.webp
│   │   ├── end.webp
│   │   ├── greece.webp
│   │   ├── greece_saturn.webp
│   │   ├── gym.webp
│   │   ├── install.webp
│   │   ├── peru.webp
│   │   ├── title.webp
│   │   ├── title_og_alt.webp
│   │   └── title_ub.webp
│   └── injections
│       ├── atlantis_fd.bin
│       ├── atlantis_textures.bin
│       ├── backpac.bin
│       └── etc...
├── fmv
│   ├── cafe.rpl
│   ├── canyon.rpl
│   ├── core.avi
│   ├── end.rpl
│   ├── escape.rpl
│   ├── lift.rpl
│   ├── mansion.rpl
│   ├── prison.rpl
│   ├── pyramid.rpl
│   ├── snow.rpl
│   └── vision.rpl
├── music
│   ├── track02.flac
│   ├── track03.flac
│   ├── track04.flac
│   ├── track05.flac
│   ├── track06.flac
│   ├── track07.flac
│   ├── track08.flac
│   ├── track09.flac
│   ├── track10.flac
│   ├── track11.flac
│   ├── track12.flac
│   ├── track13.flac
│   ├── track14.flac
│   ├── track15.flac
│   ├── track16.flac
│   ├── track17.flac
│   ├── track18.flac
│   ├── track19.flac
│   ├── track20.flac
│   ├── track21.flac
│   ├── track22.flac
│   ├── track23.flac
│   ├── track24.flac
│   ├── track25.flac
│   ├── track26.flac
│   ├── track27.flac
│   ├── track28.flac
│   ├── track29.flac
│   ├── track30.flac
│   ├── track31.flac
│   ├── track32.flac
│   ├── track33.flac
│   ├── track34.flac
│   ├── track35.flac
│   ├── track36.flac
│   ├── track37.flac
│   ├── track38.flac
│   ├── track39.flac
│   ├── track40.flac
│   ├── track41.flac
│   ├── track42.flac
│   ├── track43.flac
│   ├── track44.flac
│   ├── track45.flac
│   ├── track46.flac
│   ├── track47.flac
│   ├── track48.flac
│   ├── track49.flac
│   ├── track50.flac
│   ├── track51.flac
│   ├── track52.flac
│   ├── track53.flac
│   ├── track54.flac
│   ├── track55.flac
│   ├── track56.flac
│   ├── track57.flac
│   ├── track58.flac
│   ├── track59.flac
│   └── track60.flac
├── shaders
│   ├── 2d.glsl
│   ├── 3d.glsl
│   └── fbo.glsl
├── TR1X.exe
└── TR1X_ConfigTool.exe

Configuring

To configure TR1X, run the TR1X_ConfigTool.exe application. All the configuration is explained in this tool. Alternatively, after running the game at least once, you can edit TR1X.json5 manually in a text editor such as Notepad.

macOS

Installing

  1. Head over to GitHub releases: https://github.com/LostArtefacts/TR1X/releases
  2. Download the TR1X-Installer.dmg installer image. Mount the image and drag TR1X to the Applications folder.
  3. Run TR1X from the Applications folder. This will show you an error dialog about missing game data files. This is expected at this point, as you have not copied them in yet. However, it's important to run the app first to allow macOS to verify the app bundle's signature.
  4. Find TR1X in your Applications folder. Right-click it and click "Show Package Contents".
  5. Copy your Tomb Raider 1 game data files into Contents/Resources. (See the Windows / Linux instructions for retrieving game data from e.g. GOG.)

If you install everything correctly, your game directory should look more or less like this (click to expand):

* Will not be present until the game has been launched.

.
└── Contents
    ├── _CodeSignature
    ├── Framworks
    ├── info.plist
    ├── MacOS
    └── Resources
        ├── cfg
        │   ├── TR1X.json5 *
        │   ├── TR1X_gameflow.json5
        │   ├── TR1X_gameflow_demo_pc.json5
        │   └── TR1X_gameflow_ub.json5
        ├── data
        │   ├── cat.phd
        │   ├── cred0.pcx
        │   ├── cred1.pcx
        │   ├── cred2.pcx
        │   ├── cred3.pcx
        │   ├── cut1.phd
        │   ├── cut2.phd
        │   ├── cut3.phd
        │   ├── cut4.phd
        │   ├── egypt.phd
        │   ├── eidospc.pcx
        │   ├── end2.phd
        │   ├── end.pcx
        │   ├── end.phd
        │   ├── gym.phd
        │   ├── install.pcx
        │   ├── level10a.phd
        │   ├── level10b.phd
        │   ├── level10c.phd
        │   ├── level1.phd
        │   ├── level2.phd
        │   ├── level3a.phd
        │   ├── level3b.phd
        │   ├── level4.phd
        │   ├── level5.phd
        │   ├── level6.phd
        │   ├── level7a.phd
        │   ├── level7b.phd
        │   ├── level8a.phd
        │   ├── level8b.phd
        │   ├── level8c.phd
        │   ├── titleh.pcx
        │   ├── titleh_ub.pcx
        │   │── title.phd
        │   │── images
        │   │   ├── atlantis.webp
        │   │   ├── credits_1.webp
        │   │   ├── credits_2.webp
        │   │   ├── credits_3.webp
        │   │   ├── credits_3_alt.webp
        │   │   ├── credits_ps1.webp
        │   │   ├── egypt.webp
        │   │   ├── eidos.webp
        │   │   ├── end.webp
        │   │   ├── greece.webp
        │   │   ├── greece_saturn.webp
        │   │   ├── gym.webp
        │   │   ├── install.webp
        │   │   ├── peru.webp
        │   │   ├── title.webp
        │   │   ├── title_og_alt.webp
        │   │   └── title_ub.webp
        │   └── injections
        │       ├── atlantis_fd.bin
        │       ├── atlantis_textures.bin
        │       ├── backpac.bin
        │       └── etc...
        ├── fmv
        │   ├── cafe.rpl
        │   ├── canyon.rpl
        │   ├── core.avi
        │   ├── end.rpl
        │   ├── escape.rpl
        │   ├── lift.rpl
        │   ├── mansion.rpl
        │   ├── prison.rpl
        │   ├── pyramid.rpl
        │   ├── snow.rpl
        │   └── vision.rpl
        ├── icon.icns
        ├── music
        │   ├── track02.flac
        │   ├── track03.flac
        │   ├── track04.flac
        │   ├── track05.flac
        │   ├── track06.flac
        │   ├── track07.flac
        │   ├── track08.flac
        │   ├── track09.flac
        │   ├── track10.flac
        │   ├── track11.flac
        │   ├── track12.flac
        │   ├── track13.flac
        │   ├── track14.flac
        │   ├── track15.flac
        │   ├── track16.flac
        │   ├── track17.flac
        │   ├── track18.flac
        │   ├── track19.flac
        │   ├── track20.flac
        │   ├── track21.flac
        │   ├── track22.flac
        │   ├── track23.flac
        │   ├── track24.flac
        │   ├── track25.flac
        │   ├── track26.flac
        │   ├── track27.flac
        │   ├── track28.flac
        │   ├── track29.flac
        │   ├── track30.flac
        │   ├── track31.flac
        │   ├── track32.flac
        │   ├── track33.flac
        │   ├── track34.flac
        │   ├── track35.flac
        │   ├── track36.flac
        │   ├── track37.flac
        │   ├── track38.flac
        │   ├── track39.flac
        │   ├── track40.flac
        │   ├── track41.flac
        │   ├── track42.flac
        │   ├── track43.flac
        │   ├── track44.flac
        │   ├── track45.flac
        │   ├── track46.flac
        │   ├── track47.flac
        │   ├── track48.flac
        │   ├── track49.flac
        │   ├── track50.flac
        │   ├── track51.flac
        │   ├── track52.flac
        │   ├── track53.flac
        │   ├── track54.flac
        │   ├── track55.flac
        │   ├── track56.flac
        │   ├── track57.flac
        │   ├── track58.flac
        │   ├── track59.flac
        │   └── track60.flac
        └── shaders
            ├── 2d.glsl
            ├── 3d.glsl
            └── fbo.glsl

Improvements over original game

Not all options are turned on by default. Refer to TR1X_ConfigTool.exe for details.

UI

  • added proper UI and bar scaling
  • added enemy health bars
  • added PS1 style UI
  • added fade effects to displayed images
  • added an option to use PS1 loading screens
  • added a wireframe mode
  • improved support for windowed mode

Gameplay

  • added ability to set user-defined FOV
  • added ability to select weapons / using items with numeric keys
  • added ability to look around while running
  • added ability to forward and backward jump while looking
  • added ability to look up and down while hanging
  • added ability to sidestep like in TR3
  • added ability to jump-twist and somersault like in TR2+
  • added ability to cancel ledge-swinging animation like in TR2+
  • added ability to jump at any point while running like in TR2+
  • added ability to automatically walk to items when nearby
  • added ability to roll while underwater like in TR2+
  • added a pause screen
  • added a choice whether to play NG or NG+ without having to play the entire game
  • added Japanese mode (guns deal twice the damage, inspired by JP release of TR3); available for both NG and NG+
  • added ability to restart level on death
  • added ability to restart the adventure from any level when loading a game
  • added the "Story so far..." option in the select level menu to view cutscenes and FMVs
  • added graphics effects, lava emitters, flame emitters, and waterfalls to the savegame so they now persist on load
  • added an option to restore the mummy in City of Khamoon room 25, similar to the PS version
  • added a flag indicating if new game plus is unlocked to the player config which allows the player to select new game plus or not when making a new game
  • fixed keys and items not working when drawing guns immediately after using them
  • fixed counting the secret in The Great Pyramid
  • fixed running out of ammo forcing

Extension points exported contracts — how you extend this code

IInstallSource (Interface)
(no doc)
tools/installer/Installer/Installers/IInstallSource.cs
IStep (Interface)
(no doc)
tools/installer/Installer/Models/IStep.cs

Core symbols most depended-on inside this repo

Savegame_Legacy_Read
called by 122
src/game/savegame/savegame_legacy.c
Random_GetControl
called by 114
src/game/random.c
Savegame_Legacy_Write
called by 107
src/game/savegame/savegame_legacy.c
Sound_Effect
called by 103
src/game/sound.c
Item_SwitchToAnim
called by 91
src/game/items.c
Text_Create
called by 86
src/game/text.c
Room_GetFloor
called by 78
src/game/room.c
Inv_RequestItem
called by 70
src/game/inventory/inventory_func.c

Shape

Function 2,165
Class 240
Method 201
Enum 92
Interface 2

Languages

C84%
C#10%
C++6%

Modules by API surface

src/gfx/gl/gl_core_3_3.c577 symbols
src/global/types.h119 symbols
src/specific/s_fmv.c78 symbols
src/game/output.c71 symbols
src/game/lara/lara_col.c61 symbols
src/game/lara/lara_state.c60 symbols
src/game/inject.c45 symbols
src/game/savegame/savegame_bson.c44 symbols
src/specific/s_output.c39 symbols
src/game/items.c38 symbols
src/specific/s_input.c28 symbols
src/game/overlay.c28 symbols

For agents

$ claude mcp add TRX \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact