-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/TheIndra55/TRAE-menu-hook
- Loading branch information
Showing
7 changed files
with
348 additions
and
788 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,40 @@ | ||
# TRAE-menu-hook | ||
# TRLAU-menu-hook | ||
|
||
Reverse engineering project for Tomb Raider LAU games, this repo contains the code for TRAE-menu-hook menu for Tomb Raider Anniversary, Legend and Underworld. | ||
Reverse engineering project for Tomb Raider LAU games, this repo contains the code for TRLAU-menu-hook menu for Tomb Raider Anniversary, Legend and Underworld. | ||
|
||
[![](https://github.com/TheIndra55/TRAE-menu-hook/actions/workflows/build.yml/badge.svg)](https://github.com/TheIndra55/TRAE-menu-hook/actions/workflows/build.yml) | ||
|
||
## Videos | ||
|
||
(screenshots at bottom of readme) | ||
|
||
| [![](https://i.imgur.com/RMnCPck.png)](https://www.youtube.com/watch?v=orv2mYjBNhM) | [![](https://i.imgur.com/qgDQuio.png)](https://www.youtube.com/watch?v=k1FIa8Pel3E&t) | [![](https://i.imgur.com/cJe3pYa.png)](https://www.youtube.com/watch?v=RwU80Pj0PR8) | [![](https://i.imgur.com/MEPYZBD.png)](https://www.youtube.com/watch?v=BfUCcC6z1jo) | [![](https://i.imgur.com/8HvLmPG.png)](https://www.youtube.com/watch?v=JvH0RPbaUI0) | | ||
|----|----|----|----|----| | ||
| Menu in Underworld | Playtrough with level debug prints | Instance viewer showcase | Loading .drm files without bigfile | Menu in Anniversary | | ||
## Screenshots and videos | ||
|
||
| [![](https://github.com/TheIndra55/TRAE-menu-hook/assets/15322107/bfcdb1a3-b0da-4775-8807-e08f3ae3d622)](https://youtube.com/watch?v=KvwopN8GoEw) | [![](https://github.com/TheIndra55/TRAE-menu-hook/assets/15322107/2bb63cc7-6a39-49c6-bbc8-3537a3b1b26e)](https://tombraidermodding.com/img/media/2d3c437d-ec46-4987-ba69-baa8c3d323ed.png) | [![](https://github.com/TheIndra55/TRAE-menu-hook/assets/15322107/aaaf1df4-4bbb-4e85-b5f1-c7ebbcaf768a)](https://tombraidermodding.com/img/media/894d4df8-370a-4715-85ad-05479c0c5dba.png) | | ||
|---|---|---| | ||
| Menu in Legend and Anniversary | Anniversary screenshot | Underworld screenshot | | ||
## Features | ||
|
||
* Skew/flight cheat | ||
* Free camera | ||
* Switch player character | ||
* Load files from outside the bigfile | ||
* View and manipulate instances | ||
* Mod loader | ||
* Instance viewer | ||
* Spawn instances | ||
* Level debug restored | ||
* Switch levels | ||
* Show level collisions, markup, portals, triggers (signals), enemy navigation | ||
* Disable death fade/respawn | ||
* Disable cinematic bars | ||
* Slow down game (slow motion) | ||
* Wireframe rendering | ||
|
||
## Fixes/improvements | ||
|
||
* Game no longer crashes while DEP is enabled | ||
* Game legal screen can be skipped | ||
|
||
## Build | ||
|
||
Make sure you have [premake5](https://premake.github.io/) installed and in your PATH. | ||
|
||
1. Clone the repository and all submodules | ||
2. Include [MinHook.x86.lib](https://github.com/TsudaKageyu/minhook/releases) in the folder. | ||
3. Run `premake5 vs2019` in your terminal. | ||
4. Open the generated solution (.sln) and build for the right game. | ||
|
||
## FAQ | ||
* Level select | ||
* Restored debug | ||
* Collision, markup, signals and portal drawing | ||
* Render options | ||
|
||
### How to load files outside bigfile | ||
See [features](docs/features.md) for a full list of all features. | ||
|
||
Create a folder named 'mods' in your game folder, inside any files can be placed the game should load as replacement. The folder structure in the 'mods' folder is the same as in the PC-W folder in the bigfile. | ||
|
||
### How to add new objects | ||
|
||
Start by adding the .drm file of your object to the mods folder, next copy the orginal objectlist.txt to mods\(game codename)\pc-w\ and open it in notepad. | ||
Now add a new line with your object name and the new number. | ||
``` | ||
959,yourobjectwithoutdotdrm | ||
``` | ||
|
||
Go back to the start of the file and increase the first number and save the file. | ||
|
||
**Note** objectlist.txt must always end with a line ending (empty line) else the game will crash on start. | ||
|
||
### Controls | ||
|
||
<kbd>F7</kbd> Hide the menu \ | ||
<kbd>F8</kbd> Toggle menu focus, this allows you to interact with the menu \ | ||
<kbd>F9</kbd> Switch player character \ | ||
<kbd>F11</kbd> Instant ragdoll death | ||
|
||
<kbd>F2</kbd> Toggle skew/flight cheat \ | ||
<kbd>F3</kbd> Freeze the game \ | ||
<kbd>Shift</kbd> + <kbd>F3</kbd> Cycle Slow motion \ | ||
<kbd>F4</kbd> Toggle free camera \ | ||
<kbd>F5</kbd> Toggle player control \ | ||
<kbd>Insert/Ins</kbd> Toggle hud | ||
|
||
<kbd>Q</kbd> \/ <kbd>A</kbd> Flight up \ | ||
<kbd>Z</kbd> \/ <kbd>W</kbd> Flight down | ||
## Fixes/improvements | ||
|
||
Flight controls depend on QWERTY/AZERTY keyboard layout | ||
* Fix game crash with DEP enabled | ||
* Allow skipping legal screen and intros | ||
* Disable cinematic bars | ||
|
||
## Thanks to | ||
## Installation | ||
|
||
* SunBeam906 | ||
* Xwilarg | ||
1. Head to the [releases](https://github.com/TheIndra55/TRAE-menu-hook/releases) and look for the latest release. | ||
2. Download the ZIP file for the correct game. | ||
3. Extract all files to the game folder, overwriting any existing files. | ||
|
||
## Screenshots | ||
## Build | ||
|
||
![image](https://user-images.githubusercontent.com/15322107/111395421-1e496700-86bd-11eb-997b-b73f2a3ec244.png) | ||
![image](https://user-images.githubusercontent.com/15322107/113633351-19992280-966d-11eb-9924-27cb87a3830f.png) | ||
![image](https://user-images.githubusercontent.com/15322107/112666334-5ccce780-8e5c-11eb-8592-4ccc47627dba.png) | ||
Please see [development](docs/development.md) for instructions on building and more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# Development | ||
|
||
## Prerequisites | ||
|
||
- [Premake](https://premake.github.io/download) | ||
|
||
## Building | ||
|
||
Clone the repository with all submodules. | ||
|
||
```bash | ||
git clone https://github.com/TheIndra55/TRAE-menu-hook | ||
cd TRAE-menu-hook | ||
git submodule update --init | ||
``` | ||
|
||
Next generate the project files with Premake, for example for Visual Studio: | ||
|
||
```bash | ||
premake5 vs2022 | ||
``` | ||
|
||
Now open the solution (.sln) and build for the preferred game. | ||
|
||
## Modules | ||
|
||
The codebase uses modules for adding new functionality or menus. Modules are implemented by inheriting the `Module` class. | ||
|
||
### Adding a module | ||
|
||
To add a new module create a class inheriting `Module`. You can | ||
|
||
```cpp | ||
#include "Module.h" | ||
|
||
class MyModule : public Module | ||
{ | ||
} | ||
``` | ||
Then register the module in `Hook.cpp` in `RegisterModules`. | ||
```cpp | ||
void Hook::RegisterModules() | ||
{ | ||
... | ||
RegisterModule<MyModule>(); | ||
} | ||
``` | ||
|
||
### Getting a module | ||
|
||
In case you want to interact with a module somewhere else in the code, you can get the module instance. | ||
|
||
```cpp | ||
auto log = Hook::GetInstance().GetModule<Log>(); | ||
|
||
log->WriteLine("Hello, World!"); | ||
``` | ||
### Abstract methods | ||
Modules can implement some abstract methods to be called during a stage. | ||
```cpp | ||
class MyModule : public Module | ||
{ | ||
public: | ||
void OnFrame() | ||
{ | ||
auto font = Font::GetMainFont(); | ||
font->SetCursor(0.f, 0.f); | ||
font->Print("Hello, World!"); | ||
} | ||
} | ||
``` | ||
|
||
#### OnMenu | ||
|
||
Called while the main menu is being drawn, this can be used for adding new menu items. | ||
|
||
```cpp | ||
void MyModule::OnMenu() | ||
{ | ||
if (ImGui::BeginMenu("Your menu")) | ||
{ | ||
ImGui::MenuItem("Your menu item"); | ||
|
||
ImGui::EndMenu(); | ||
} | ||
} | ||
``` | ||
|
||
#### OnDraw | ||
|
||
Called during an ImGui frame, use this to draw your menus. | ||
|
||
#### OnFrame | ||
|
||
Called just before a frame ends, use this to use font or draw functions. | ||
|
||
#### OnLoop | ||
|
||
Called every frame before the game loop. | ||
|
||
#### OnInput | ||
|
||
Called for every message from the window procedure. | ||
|
||
```cpp | ||
void MyModule::OnInput(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) | ||
{ | ||
if (msg == WM_KEYUP && wParam == VK_F1) | ||
{ | ||
// F1 pressed! | ||
} | ||
} | ||
``` | ||
#### OnPostInitialize | ||
Called on post initialization after the device has been obtained |
Oops, something went wrong.