diff --git a/README.md b/README.md index a7d4100..4b12272 100644 --- a/README.md +++ b/README.md @@ -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 - -F7 Hide the menu \ -F8 Toggle menu focus, this allows you to interact with the menu \ -F9 Switch player character \ -F11 Instant ragdoll death - -F2 Toggle skew/flight cheat \ -F3 Freeze the game \ -Shift + F3 Cycle Slow motion \ -F4 Toggle free camera \ -F5 Toggle player control \ -Insert/Ins Toggle hud - -Q \/ A Flight up \ -Z \/ W 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. \ No newline at end of file diff --git a/docs/development.md b/docs/development.md new file mode 100644 index 0000000..cf64d6a --- /dev/null +++ b/docs/development.md @@ -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(); +} +``` + +### 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->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 diff --git a/docs/features.md b/docs/features.md new file mode 100644 index 0000000..68c5585 --- /dev/null +++ b/docs/features.md @@ -0,0 +1,180 @@ +# Features + +There is a wide range of features, this page explains all the features. + +## Controls + +The following keys can be used ingame. + +| Key | Description | +|-----|-------------| +| F8 | Shows the menu | +| F2 | Toggles the skew/flight cheat | +| F3 | Freezes the games | +| F4 | Toggles the free camera mode | +| F5 | Toggles player control | +| F11 | Instant ragdoll death | + +### Skew + +The skew cheat can be used to fly the player freely through the world. To move the player up or down use the Q and Z keys (or A and W on AZERTY). + +## Free camera + +The free camera can be used to freely fly the camera. + +### Modes + +The free camera can be used in two modes. The first mode freezes player control and allows you to fly the camera, the second mode disables the camera control and allows you to control the player again. At any moment you can press F5 to toggle the player control. + +### Controls + +The following controls are used by the free camera + +| Key | Description | +|-----|-------------| +| WASD | Move the camera forward, backwards, left or right | +| Shift | Fast camera speed | +| Ctrl | Slow camera speed | +| Q/E | Move the camera up/down | +| 1/3 | Roll the camera | + +## Options + +The options menu under help provides some options for toggling features or changing defaults. + +## Menu + +This menu is always visible and contains some basic or quick options. + +### Load unit + +This allows you to switch to a different unit (level). + +### Birth object + +This allows you to spawn an instance with the object name. + +### Player + +This section contains some options related to the player. + +#### Fill 'er up + +This fills up your health to the max health, the name of this option is based on the real debug menu. + +#### Outfit + +This allows you to change the player outfit, press the next button to go through the outfits. + +#### No interpolation + +This disables animation interpolation. + +#### No death fade + +This disables the fade on death, meaning the player won't respawn after dying. Disable this option again to respawn. + +### Time + +This section allows you to change the time multiplier for example to slow down the game or speed it up. + +### Save + +This section allows you to change saved data, currently this only contains the ability to set event variables. + +## Instances + +The instance viewer (instances) shows all the current instances in the game. + +![](https://github.com/TheIndra55/TRAE-menu-hook/assets/15322107/de6f20a3-dbda-4d3f-ada4-377fbfc0b1f1) + +### Transforms + +This section can be used to change the position and rotation of an instance. + +### Object + +This section shows some basic info about the object of the instance. + +### Draw groups + +This section shows the current draw groups and allows you to toggle draw groups on the model. + +### Animations + +This sections shows the current playing animations on the instance and allows you to play animations. + +### Messaging + +This section is used for posting messages to the instance. + +## Level + +The level menu contains some options relating to levels. + +### Disable script + +Checking this option will disable the loading of the level script. + +### Event debug + +This window allows you to see the current event (script) variables for a level. + +![](https://github.com/TheIndra55/TRAE-menu-hook/assets/15322107/27ffc85e-85e5-4b9e-aa49-cd3a920a7ec7) + +## Draw + +The draw menu can be used to enable various of debug drawing such as drawing of the collision mesh or signals. + +![](https://github.com/TheIndra55/TRAE-menu-hook/assets/15322107/889b8c07-c451-444a-8a7a-ab8b8dcd511d) + +### Draw options + +This window will be visible when drawing instances or the collision mesh and allows you to specify some filters. + +![](https://github.com/TheIndra55/TRAE-menu-hook/assets/15322107/a39685d0-8f2f-4a82-8caa-aea2d29534e6) + +### Draw instances + +This will draw a text with the instance name on the world position of all instances. + +### Draw markup + +This will draw a visualization of all markup, such as ledges. + +### Draw enemy route + +This will visualize the pathfinding route of all enemies. + +### Draw collision + +This will visualize the collision mesh of the current level. + +### Draw portals + +This will visualize all portals which are between levels. + +### Draw signals + +This will draw all signals (triggers) in the current level. + +## Debug + +The debug menu has some restored event debug features. + +### Draw debug + +This will enable all of the debug drawing from the level. + +### Debug keypad + +This will enable the debug keypad, which allows you to use debug key combinations. + +## Render + +The render menu allows toggling some render modes such as wireframe and terrain wireframe. + +## Frontend + +The frontend menu allows you to hide the frontend HUD. \ No newline at end of file diff --git a/docs/mods.md b/docs/mods.md new file mode 100644 index 0000000..da39584 --- /dev/null +++ b/docs/mods.md @@ -0,0 +1,21 @@ +# Mods + +A mod loader is provided out of the box, this allows you to replace game files without modifying the game archives. + +## Mods folder + +The mods folder, located in the game folder contains all overridden files. Files which are normally in the PC-W folder such as lara.drm are located in the root of the mods folder, other locations such as `\trae\pc\objectlist.txt` have been relocated to the mods folder. + +## Specialisation + +For localized files such as locals.bin the language mask can be appended after the file name. For example for the French language mask (2) this will be `locals.bin_002`. + +## Examples + +Below are some example paths mapped to mods folder. + +| Original path | Mods folder path | +|---------------|------------------| +| `pc-w\lara.drm` | `mods\lara.drm` | +| `pc-w\sndstrm\ui\trae_main_theme_2.mul` | `mods\sndstrm\ui\trae_main_theme_2.mul` | +| `\trae\pc-w\objectlist.txt` | `mods\trae\pc-w\objectlist.txt` | diff --git a/docs/tr7.txt b/docs/tr7.txt deleted file mode 100644 index 1689d5e..0000000 --- a/docs/tr7.txt +++ /dev/null @@ -1,86 +0,0 @@ -Tomb Raider: Legend function addresses - -Base address: 400000 -Exe timestamp: 446CAB36 (Thu May 18 17:13:26 2006) - -BGOBJECT_Draw 00412F20 -CHRONICLE_SwitchChapter 00420EB0 -CreateVertexShaderFlags 0040A8E0 -D3D_Init 00413D90 -DRAW_DrawQuads 00406240 -DeathState__Process 0056EC70 -EVENT_Process 00430290 -FONT_Print 00432860 -Font__AddEntry 004318E0 -Font__Flush 00432570 -Font__PrintFormatted 004323D0 -G2EmulationInstanceQueryAnimation 004DEE50 -G2EmulationInstanceSetAnimation 004DEC30 -G2EmulationInstanceSetMode 004DED90 -GAMELOOP_ExitGame 00451870 -GAMELOOP_HandleScreenWipes 00450430 -GAMELOOP_IsWipeDone 00450310 -GAMELOOP_LevelLoadAndInit 00451AC0 -GAMELOOP_MainLoop 00452510 -GAMELOOP_Process 00452140 -GAMELOOP_Process_CDCCine 0041F4A0 -GAMELOOP_SetScreenWipe 004503D0 -GAMEWINDOW_Init 004043E0 -GetDrawListByTpageId 00414280 -GetFS 0045C700 -IMAGE_LoadImage 00401480 -INPUT_Process 004E0690 -INSTANCE_BirthCommon 00456970 -INSTANCE_BirthObjectNoParent 00458990 -INSTANCE_DefaultInit 00457DB0 -INSTANCE_HideUnhideDrawGroup 00456230 -INSTANCE_NewInstance 00454A00 -INSTANCE_Post 00455510 -INSTANCE_Query 004554C0 -INSTANCE_ReallyRemoveInstance 004575B0 -INSTANCE_SetModel 00455F40 -InitArchive 0045C670 -InsertGlobalObject 005D5390 -LOAD_ImageFileName 0045C780 -LOAD_UnitFileName 0045C730 -MAINMENU_Run 004E70B0 -MainG2 0045CF80 -MakePeHandle 004642F0 -MarkupManager__AddInstanceMarkup 0045F260 -MarkupManager__AddMarkup 0045F0F0 -OBJ_CheckFamily 00531B10 -OBTABLE_GetObjectID 00462590 -OBTABLE_Init 00462300 -PLAYERCNTRL_Enable 00463EB0 -PLAYER_DebugSwitchPlayerCharacter 005A40B0 -RELOC_GetProcAddress 00464550 -STREAM_GetObjectTracker 005D4240 -STREAM_GetObjectTrackerByName 005D4270 -STREAM_Init 005D40B0 -STREAM_LoadLevel 005D5B60 -STREAM_PollLoadQueue 005D51C0 -TRANS_RotTransPersVectorf 00402B20 -TRANS_TransToDrawVertexV4f 00402EF0 -TerrainDrawable__TerrainDrawable 0040ACF0 -UIScreenManager__PushScreen 004F7D30 -UIScreenManager__WantsNormalFading 004F7480 -cdcRenderLayer__DrawPrepScreenInstances 00419550 -cdc__MSFileSystem__FileExists 0047AB50 -cdc__MSFileSystem__MSFileSystem 005E04F0 -cdc__PCDeviceManager__CreateDevice 00EC62A0 -cdc__PCDeviceManager__Init 00EC6670 -cdc__PCDeviceManager__ReleaseDevice 00EC6550 -cdc__PCVertexShaderTable__GetVertexShader 00ECB0B0 -j_PLAYERCNTRL_Enable 0042FF80 -j_localstr_get 004055B0 -localstr_get 004E43C0 -CAMERA_Process 0047EBE0 -EVENT_InputActionOn 0042E3B0 -CAMERA_CalcPosition 0048D8B0 -CAMERA_Control 0047F320 -STREAM_FinishLoad 005D5640 -MAIN_FailAbort 00401F20 -cdc__FatalError 005DA0C0 -EVENT_DebugInputActionPressed 0042E420 -DisplayExceptionInfo 00401A50 -RenderG2_MotionBlur 0040CA80 diff --git a/docs/tr8.txt b/docs/tr8.txt deleted file mode 100644 index ad566ca..0000000 --- a/docs/tr8.txt +++ /dev/null @@ -1,153 +0,0 @@ -Tomb Raider: Underworld function addresses - -Base address: 400000 -Exe timestamp: 4947E5D6 (Tue Dec 16 17:31:02 2008) - -D3D_Init 00478640 -FXDRAW_DrawModelParticles 0053DFC0 -GAMELOOP_ChangeMode 005D4870 -GAMELOOP_DisplayFrame 005DA1C0 -GAMELOOP_DisplayGameElements 005D9F90 -GAMELOOP_ExitGame 005DF760 -GAMELOOP_LevelLoadAndInit 005D40C0 -GAMELOOP_ModeStartPause 005D4780 -GAMELOOP_Process 005DFBE0 -GAMELOOP_RequestLevelChangeByName 005DF8C0 -GAMELOOP_DoTimeProcess 005DA230 -INPUT_Process 00483810 -INSTANCE_BirthObjectNoParent 005BD0F0 -INSTANCE_DefaultInit 005BA810 -INSTANCE_IntroduceInstance 005BCC30 -INSTANCE_NewInstance 005B2EF0 -INSTANCE_ReallyRemoveInstance 005BC4E0 -INSTANCE_ReallyRemoveAllChildren 005BD3B0 -InsertGlobalObject 005C1550 -MOVIE_DisplayFrame 004A1100 -MovieSubtitles__Process 004A0910 -NsScreenshotSystem_ScriptType__CreateObject 0079E7F0 -NsScreenshotSystem_ScriptType__InitType 007B6B20 -NtCamera_ScriptType__InitType 007ABE60 -NtHealth_ScriptType__InitType 007AC410 -NtScreenshot_ScriptType__InitType 007ADC40 -NtStdScreenMgr_ScriptType__InitType 007ADCA0 -OBTABLE_Init 005BF330 -OBTABLE_GetObjectID 005BF770 -PCMOUSE_GetButtonState 004828F0 -PLAYER_DebugSwitchPlayerCharacter 0079DB50 -RegularWndProc 00478BC0 -SAVE_ClearMemory 00556940 -SAVE_SaveGame 005570F0 -STREAM_FinishLoad 005D1CD0 -STREAM_GetObjectTrackerByName 005C17D0 -STREAM_Init 005C1270 -STREAM_LoadLevel 005D23F0 -STREAM_PollLoadQueue 005C1DA0 -ObjectInit 006D00E0 -SaveLoad__Init 007744E0 -Screenshots__CaptureAndSaveTask__CaptureAndSaveTask 00774A20 -Screenshots__CaptureAndSaveTask__NotEnoughSpace_Callback 007748A0 -Screenshots__GenerateUniqueFilenameTask__OnAsynchronousStepComplete 00774780 -Screenshots__SaveAsNewFileTask__SaveAsNewFileTask 007748B0 -Screenshots__SavingTask__SavingTask 00774650 -Screenshots__SavingTask__Start 00774F70 -Screenshots__TakeScreenshot 00795FE0 -UIControllerConfigGetTextData 006DC5F0 -_getScreenName 0077CB20 -CAMERA_SetMode 005F39F0 -cdcRenderLayer__Create 005CAE70 -cdc__FatalError 00596CB0 -cdc__PCDeviceManager__Create 005239C0 -cdc__PCDeviceManager__CreateDevice 00522580 -cdc__PCDeviceManager__PCDeviceManager 00523810 -cdc__PCDeviceManager__ReleaseDevice 005223F0 -cdc__PCDeviceManager__ShowMousePointer 00521C30 -cdc__PCEffectManager__EndFrame 00519360 -cdc__PCRenderContext__CheckMultiMonitor 005250A0 -cdc__PCRenderDeviceCreate 00509A30 -cdc__PCRenderDevice__IsReadyForBeginFrame 00506EE0 -cdc__PCRenderDevice__Release 00506EA0 -getDiskFs 00472B60 -getFs 00472B50 -initScripts 007A8650 -localstr_get 0049A7A0 -localstr_reload 0049A800 -unitFileName 00477970 -GEAR_Init 006CDF50 -OBJ_PlayAnimLoop 0069A960 -G2EmulationInstanceSetMode 005B1F50 -G2EmulationInstanceSetAnimation 005B1EA0 -CinematicHandlerImpl__TakeControl 004561C0 -CinematicHandlerImpl__NextFrame 00457100 -ArchiveFileSystem__CalculateHash 00472670 -ArchiveFileSystem__Find 004726E0 -ArchiveFileSystem__RequestRead 00472890 -ComputeCRC 004725C0 -STREAM_GetStreamUnitWithID 005C1B50 -STREAM_MoveIntoNewStreamUnit 005C1BF0 -GAMELOOP_GetMainRenderUnit 005D4480 -COLLIDE_CameraWithStreamSignals 005C6DB0 -_cameraGetFocusInstance 005E7920 -_getCameraMode 005E7BC0 -HandleFadingAndLOD 005B5D20 -InputSystem__Update 00483520 -INPUT_RestoreStatus 00483840 -_setCameraRotation 0049DD70 -cdc__RenderViewport__RenderViewport 0055F400 -cdcRenderLayer__SetupViewport 005CAFF0 -RenderG2_BeginScene 005CEBC0 -InputSystem__GetAxisValue 00480E50 -RazielProcess 007228E0 -cdc__Matrix__Build_XYZOrder 0049D500 -CinematicHandlerImpl__BuildWeightedMatrixFromChannels 00454970 -cdc__Matrix__Build 0049CF90 -GAMELOOP_InitGameTracker 005D3CF0 -GAMELOOP_ClearGameTracker 005D3DF0 -_setToGameplayCamera 005EDF50 -RazielInit 00721F80 -PLAYERCNTRL_Enable 005D5F40 -PlayerSM__SwitchPStates 006972C0 -PlayerSM__DefaultMessageHandler 0071F1D0 -GAMELOOP_IsWipeDone 0052E880 -GAMELOOP_SetScreenWipe 0052E8B0 -GAMELOOP_HandleScreenWipes 0052E900 -DeathState__Entry 0075AA50 -DeathState__Process 0075AF90 -RazielPost 0071FFE0 -INSTANCE_Post 005B3750 -MultiFileSystem__GetBestFileSystem 00473560 -MainG2 005DF390 -ProcessArgs 004778C0 -NtUnlockableCinematic_ScriptType__InitType 007AD530 -MAIN_DoMainInit 005DEF70 -NtUnlockableMovie_ScriptType__InitType 007AD750 -NtUIGameData_ScriptType__InitType 007AF0C0 -PhysicsKickStateImpl__ApplyKickImpulse 00769830 -ANIMATE_Init 006C77B0 -OBJ_SwitchState 0069A670 -ANIMATE_Idle 006C2530 -cdc__Resolve__Load 00551470 -_loadPdaMap 006E4E80 -NsCoreBase_ScriptType___PrintInt 00795D30 -NsCoreBase_ScriptType___PrintFloat 00795D80 -NsCoreBase_ScriptType___PrintString 00795DB0 -NsCoreBase_ScriptType___LogInt 00795DD0 -NsCoreBase_ScriptType___LogFloat 00795E10 -NsCoreBase_ScriptType___LogString 00795E30 -NsCoreBase_ScriptType__InitType 007B3920 -AnimationSection__StartResource 0054DC50 -AnimationSection__HandleResourceData 0054DC90 -ScriptSection__FindScript 00551560 -ScriptSection__HandleResourceData 00551AD0 -ScriptSection__GetBaseResourcePointer 00551B00 -ScriptSection__GetRefCount 00551B50 -ScriptSection__FindResource 00551B80 -ScriptSection__StartResource 005521E0 -ScriptSection__HandleResourceEnd 005522B0 -ScriptSection__HandleResourceCancel 00552370 -ScriptSection__ReleaseResource 005523D0 - - - -gameTrackerX 00E7F088 -INPUT_instances 00A02B68 -gPlayerControl_Enabled 008AB4E6 ; setting this to 0 disables any control of lara like moving and shooting. diff --git a/docs/trae.txt b/docs/trae.txt deleted file mode 100644 index c1cfe7b..0000000 --- a/docs/trae.txt +++ /dev/null @@ -1,475 +0,0 @@ -Tomb Raider: Annniversary function addresses - -Base address: 400000 -Exe timestamp: 463F522D (Mon May 07 16:22:05 2007) - -AnimController__GetCurrentInterpQuat 0047A380 -ArchiveFileSystem__CalculateHash 00C66A46 -ArchiveFileSystem__Find 00C66A92 -AreDebugMenusEnabled 004E6090 -BGOBJECT_Draw 00414180 -CAMERA_CDCCineProcess 0041F810 -CAMERA_CalcPosition 00491320 -CAMERA_Control 00482650 -CAMERA_EndLook 00489B30 -CAMERA_ForceEndLookaroundMode 0048A5E0 -CAMERA_LookProcess 0048A600 -CAMERA_Process 00481D70 -CAMERA_SetInstanceFocus 00489380 -CAMERA_SetProjDistance 00491FA0 -CAMERA_StartAccurateAimMode 0048A420 -CAMERA_StartLookaroundMode 0048A300 -CCombatReticle__Deactivate 005925A0 -CDCCine_StartBlockingCine 004207E0 -CDCCine_StopAllCine 0041FF60 -CHECKPOINT_HandlePlayer 00C72171 -CHRONICLE_SetChapterInfo 004227E0 -CHRONICLE_SetChapterVars 00422160 -CLOTH_ClothAddWind 00435BF0 -CLOTH_ClothUpdateState 00437D40 -CLOTH_RelaxAllCloth 00C5FB2F -CLOTH_SetupCloth 00435770 -COLLIDE_InsertDynamicMarker 00C5E7AB -CharacterProxy__Init 0054AF60 -CharacterProxy__SetOrientation 0054AF40 -CharacterProxy__TeleportToNewSettings 00C73F00 -CinematicHandlerImpl__NextFrame 00424FE0 -CloseHandle 005E4F80 -ComputeCRC 0047D970 -CreateSoundstream 00C5EFAA -D3DTEX_SetTPageStateCached 0040F820 -D3D_Init 00C5C175 -D3D_IsSuspended 004153D0 -D3D_PrevGen_EndScene 004168C0 -D3D_PrevGen_Init 00415C20 -D3D_PrevGen_Shutdown 004164C0 -DEBUG_ApplyCheatCode 00427160 -DEBUG_Draw 00427D80 -DEBUG_FatalError 00C5EAC3 -DEBUG_Init 00427130 -DEBUG_Process 00427230 -DEBUG_ReloadCurrentLevel 004279F0 -DOPPEL_GetHealthMeterCallback 005B58B0 -DRAW_DrawQuads 00406D70 -DRAW_DrawQuads2DNoZbuffer 00407A20 -DRAW_DrawTriangles 00C5B5FD -DeathState__Entry 005581D0 -DeathState__Exit 00558540 -DeathState__Process 005699C0 -DeviceCallback__OnCreateDevice 00417530 -DumpUnusedFrontEndObjects 004E7060 -ENEMY_DefaultHandler 004B8A10 -ENEMY_InitCharacterProxy 004B2F10 -ENEMY_KillEnemy 00C6BF33 -ENEMY_LoseHitPoints 004CBF80 -ENEMY_StartAttack 00C698AE -ENEMY_SwitchState 00C69421 -ENEMY_UnhideWeapons 004B6370 -EVENT_DebugInputActionPressed 0042F7C0 -EVENT_HideTerrainGroup 0042ED90 -EVENT_InputActionOn 0042F740 -EVENT_InstanceStart 0042FA90 -EVENT_LinkToParent 0042F020 -EVENT_MoveSunPosition 0042F8A0 -EVENT_PlayerDisableControl 00467A10 -EVENT_PlayerTurnGold 0044E290 -EVENT_PreloadCine 0042E110 -EVENT_Process 004321F0 -EVENT_ProcessMovingWater 0042EA90 -EVENT_ProcessSoundStreams 00431FB0 -EVENT_ProcessSounds 0042D8C0 -EVENT_RestorePlayerCharacter 0042FCC0 -EVENT_RigidBodyThrow 00430A40 -EVENT_SetMusic 0042FDA0 -EVENT_SetScale 0042F290 -EVENT_SetSunPosition 0042F810 -EVENT_SwitchPlayerCharacter 0042FC80 -EnemyMessageControl__UseDefaultHandler 004BA380 -EnemySense__SetUncertainInfo 004C37F0 -EnemySensesControl__AddInstance 00C6E2D3 -EnumFunc 00401B40 -ExtractLevelNum 0045EEB0 -ExtractWorldName 0045EE80 -FSHelper_ReadFile 0045F850 -FXDRAW_DrawRain 0044B770 -FX_DrawWeather 00438E00 -FX_ProcessList 00445C20 -FX_Process_WetDirty 0044F790 -FindTextInLine 0045EE30 -FindUnitInfo 00C7D5C8 -Font__Flush 00434C40 -Font__FontInfo__GetCharInfo 00C5F780 -Font__GetTextWidth 00434510 -Font__Load 00C5F50B -Font__PrintCentered 00434E50 -Font__PrintFormatted 00434A70 -Font__SetCursor 00433C70 -Font__SetRGBA 00433F20 -G2EmulationInstanceQueryAnimation 004DE8B0 -G2EmulationInstanceQueryFrame 004DEC20 -G2EmulationInstanceSetAnimation 004DE690 -G2EmulationInstanceSetMode 004DE7F0 -G2Quat_FromEulerf 004E00B0 -G2Quat_ToEuler 00C6F908 -GAMELOOP_ChangeMode 004540A0 -GAMELOOP_DisplayFrame 00453440 -GAMELOOP_DisplayGameElements 00C61A36 -GAMELOOP_DoTimeProcess 004534E0 -GAMELOOP_ExitGame 004542B0 -GAMELOOP_GetMainRenderUnit 004530E0 -GAMELOOP_HandleScreenWipes 00452A90 -GAMELOOP_InitGameTracker 00C617AF -GAMELOOP_IntroducePlayerInstance 00452810 -GAMELOOP_IsWipeDone 00452970 -GAMELOOP_MainLoop 00C61D50 -GAMELOOP_ModeStartPause 00453F10 -GAMELOOP_Process 00454AC0 -GAMELOOP_RequestLevelChangeByName 00C61CFA -GAMELOOP_ResetAllScreenWipes 00452950 -GAMELOOP_SetLoadingDisplay 004527E0 -GAMELOOP_SetScreenWipe 00452A30 -GAMELOOP_SystemInit 00C61874 -GAMEWINDOW_ApplyInGameSettings 00404960 -GAMEWINDOW_Init 00C5B466 -GAMEWINDOW_Poll 00404750 -GAMEWINDOW_ReadIngameSettings 00404B90 -GAMEWINDOW_ReadSettings 00405170 -GAMEWINDOW_SaveInGameSettings 00404D40 -GAMEWINDOW_SaveSettings 00405550 -GAMEWINDOW_SetDefaults 00404880 -GEAR_Default 00530B90 -GEAR_Idle 005314F0 -GEAR_Init 00531A50 -GEAR_Process 005306D0 -GainHealth 005716A0 -GetArgParameter 0045EEF0 -GetCurrentThreadId 0062DFF0 -GetDrawListByTpageId 00C5C280 -GetFS 0045F640 -GetGameValue 004551E0 -GetMaxHealth 00560590 -GetObjectID 00C63B7D -GetSaveInfo 005C0830 -HasOptionChanged 004553C0 -IMAGE_LoadImage 00401480 -INPUT_Process 004E01B0 -INPUT_RestoreStatus 00C6F96D -INSTANCE_BirthCommon 00459640 -INSTANCE_BirthObject 00C62EF8 -INSTANCE_BirthObjectAtSegment 0045C590 -INSTANCE_BirthObjectNoParent 0045BA90 -INSTANCE_DefaultInit 0045AC10 -INSTANCE_DynamicLinkToParentMarker 00459B80 -INSTANCE_Find 004582D0 -INSTANCE_FindWithName 00458140 -INSTANCE_HideUnhideDrawGroup 004319B0 -INSTANCE_InitInstanceList 004574C0 -INSTANCE_IntroduceCommon1 00C6277A -INSTANCE_IntroduceInstance 0045B720 -INSTANCE_LinkToParent 00459A70 -INSTANCE_LinkToParentMarker 00459B30 -INSTANCE_NewInstance 00C62479 -INSTANCE_Post 004580B0 -INSTANCE_ProcessFunctions 0045A890 -INSTANCE_ProcessIntro 00457680 -INSTANCE_Query 00458060 -INSTANCE_ReallyRemoveAllChildren 0045B5E0 -INSTANCE_ReallyRemoveInstance 0045A3A0 -INSTANCE_SetCurrentStreamUnitID 00458C90 -INSTANCE_SetModel 00458A90 -IncrHealth 005715E0 -InitArchive 0045F5B0 -InitFS 0045F550 -InitHealthSystem 00571550 -InitObjectWithID 00C63A4E -InitStates 0059A3D0 -InputRemapDevice__GetMappedButton 004E1020 -InputSystem__GetAxisValue 004E38C0 -InputSystem__Update 004E3A50 -InsertGlobalObject 00C7D980 -InstanceDraw 00409880 -IsDemoBuild 004E63A0 -IsE3Build 004E6390 -IsMenuOpen 004E60A0 -IsPlatformPS2 004E6EC0 -IsTriggerActive 004682B0 -LIGHT_SetDynamicLightColorAndRadius 0045C8A0 -LevelLoadAndInit 00454510 -LoadChapter 00422090 -LookAroundState__Entry 00598B20 -LookAroundState__Exit 0055A160 -LookAroundState__Process 0055A400 -LookupBooleanFunction 004E7050 -LookupMenuItemCommand 004E7030 -LookupUIMenuHandler 004FA7E0 -LoseHealth 00571860 -MAINMENU_LoadBgUnit 004E88B0 -MAINMENU_PollUnitSwitch 004E8670 -MAINMENU_Run 004E8BE0 -MAINMENU_SetTitleUnitForChapter 004E8550 -MAIN_DoMainInit 0045F6E0 -MAIN_FailAbort 00401E30 -MAIN_ImageItemDisplay 0045EFF0 -MAIN_ResetGame 0045EF70 -MARKUP_Find 004615A0 -MODIFIABLE_Init 00533D30 -MOVIE_DisplayFrame 00418000 -MOVIE_Play 004181F0 -MOVIE_StartPlay 00417D10 -MSSave__ProcessCommandline 00C78EFA -MSSave__Update 005C2780 -MSSave__UpdateUI 005C1150 -MULTIBODY_Throw 0054CA90 -MainG2 0045FD00 -MainG2_UpdateLoop 00401CD0 -MarkupManager__AddInstanceMarkup 00C636C6 -MarkupManager__AddMarkup 00462AE0 -MarkupManager__CreateSAPBox 00461680 -MarkupManager__FindMarkUp 00C634DC -MarkupManager__GetMarkUpBoxById 00C6329D -MovieSubtitles__Load 004024A0 -MovieSubtitles__Process 004026D0 -MultibodySystemImpl__RelocateImpl 0051BE30 -MultiplexStreamImpl__AdvanceToNextFrame 0041A2B0 -MultiplexStreamImpl__PollStream 0041A0F0 -MyWinMain 00401E60 -OBJ_PlayAnimLoop 005349F0 -OBJ_SwitchState 005347B0 -OBJ_TriggerHitReactionEffects 005341F0 -OBTABLE_GetObjectID 00465DE0 -OBTABLE_Init 00465E30 -OBTABLE_InstanceInit 00465B00 -ObjectInit 005357A0 -PCMOUSE_GetButtonState 00C5B5C4 -PLAYER_DebugSwitchPlayerCharacter 005A39A0 -PLAYER_ReSetLookAround 00C759C7 -PLAYER_SetLookAround 00C759A8 -PLAYER_TurnHead 00C7632B -PlayAcceptSound 004F8260 -PlayMenuMusic 0045F270 -PlayerSM__DefaultMessageHandler 0059F790 -PlayerSM__PlayerSM 00599AF0 -PlayerSM__SwitchPStates 004E3D90 -ProcessArgs 0045F930 -PushCommand 00C7036C -PushOKDialog 004FD100 -PushScreen 004FCB60 -RAZIEL_SetLookAround 00C75813 -RAZIEL_TurnHead 00576500 -RELOC_GetCallTrigger 00468290 -RELOC_GetEntry 00C64301 -RELOC_GetProcAddress 004680C0 -RELOC_Relocate 00468210 -Ragdoll__AddBone 005226A0 -RazielInit 0059D670 -RazielPost 00593B10 -ReLaunchMediaCenter 00C5B162 -RegisterGameCineCommands 00451880 -RelocPE 00C64190 -RenderG2_BeginScene 0040D7C0 -RenderG2_EndScene 0040D950 -RenderG2_MotionBlur 0040D7E0 -ResolveReceiver__ReceiveData 005BCA80 -Resolve__Load 005BD810 -RtlUnwind 00646E14 -SAVE_ClearMemory 005C3460 -SAVE_GetCurrentChapter 005C2F90 -SAVE_SaveGame 005C6760 -SAVE_SetLevelStartPlayTime 005C3E90 -SAVE_StartTimeTrial 005C4750 -SAVE_UpdatePlayTime 005C3EF0 -SCRIPT_KillInstance 00469C30 -SFXPROG_AllocInstanceData 00C7BE8C -SIGNAL_FindSignal 0046BF90 -SIGNAL_FindSignalEvent 0046C010 -SOUND_StopAllSound 005CF910 -STREAM_DumpUnit 005DADB0 -STREAM_FinishLoad 005DB680 -STREAM_GetStreamUnitWithID 005DA880 -STREAM_GetStreamUnitWithName 00C7D6C7 -STREAM_GetTerrainGroup 005DAFD0 -STREAM_LevelLoadAndInit 005DBE80 -STREAM_LoadComponentLevel 005D8A90 -STREAM_LoadLevel 00C7DC5B -STREAM_LoadLevelObjects 00C7DAE9 -STREAM_LoadLevelReturn 005DBA60 -STREAM_LoadObjectReturn 005DB1D0 -STREAM_FinishLoad_CDCCine 00C5D6FC -STREAM_GetObjectTrackerByName 00C7D67C -STREAM_PollLoadQueue 005DB190 -STREAM_StreamLoadLevelReturn 005DBB20 -SWITCH_Idle 00541060 -SWITCH_Init 00541280 -SWITCH_Query 00540740 -SaveInput 00C5B58E -SceneLayer__Update 005C9BD0 -SetCameraZoomPercent 00422950 -SetFont 00433D30 -SetGameValue 004551A0 -SetupBuildDir 00C631BE -SpawnEnemyInstance 0042E560 -SpawnSplMarker 005A65D0 -StartAmbientCine 004208A0 -SteerSwitchMode 005BAE60 -Subtitle__Add 0046F080 -Subtitle__Clear 0046F010 -Subtitle__Draw 0046F180 -TERRAIN_CommonRenderLevel 0046F5F0 -TIMER_Init 00402910 -TRANS_RotTransPersVectorf 00402B50 -TRANS_ScaleMatrixf 00403040 -TRANS_TransToDrawVertexV4f 00402F20 -TerrainDrawable__Draw 0040BAE0 -TerrainDrawable__TerrainDrawable 00C5B896 -TransformBoneVerticesLightSrcColor_ISSE 00409540 -TranslateHint 004565F0 -UIButtonConfigHandler 004FA580 -UIButtonConfig__GetNumButtons 004EC280 -UIButtonConfig__InitButtons 004EBF30 -UIControllerConfigDataList 004ECCB0 -UIControllerConfigGetTextData 004ECBE0 -UIDataDefn__Process 004ED2D0 -UIDataList__AddItem 00C70577 -UIDataList__AllocateRunData 00C704C2 -UIFadeGroupInit 004EE3B0 -UIFadeGroupTrigger 004EE580 -UIItemTextSelector_Draw 004F71E0 -UIItemTextSelector__DrawTextA 004F7080 -UIMemoryManager__Alloc 004F76F0 -UIMenuItem__Init 004F78A0 -UIMenu__DoFront 004F8010 -UIMenu__Init 004F9890 -UIScreenManager_SetProcessFunction 004FC240 -UIScreenManager__Draw 004FC3D0 -UIScreenManager__GetTopScreenID 004FC210 -UIScreenManager__PushYesNoDialog 004FD180 -UIScreenManager__WantsNormalFading 004FC1F0 -UIScreen__DoFront 004FBFA0 -UIScreen__Init 004FC6F0 -UISystem__GetMenu 004FD8E0 -UISystem__GetScreen 004FD8A0 -UISystem__Init 004FD590 -UISystem__InitFrontEndUI 004FD670 -UISystem__InitInGameUI 004FD5F0 -WriteToRegistry 004E1850 -_openLoadGame 005BF750 -_openSelectProfile 005BF760 -_pushLoadingScreen 004526C0 -_registerdebugcinecommand 00C61664 -cdcRenderLayer__Create 0041B170 -cdcRenderLayer__DRAW_DrawTriangles 00C5CEE2 -cdc__FatalError 005DF730 -cdc__MSFileSystem__FileExists 005E52C0 -cdc__PCBasicVertexPool__Create 00C82A67 -cdc__PCColorDOFEffect__PrepareDoFTexture 0060D470 -cdc__PCConfigDialog__InitDialog 006160F0 -cdc__PCConfigDialog__PCConfigDialogProc 00616460 -cdc__PCConfigDialog__Show 00616AC0 -cdc__PCConfigDialog__WriteToRegistry 00614C10 -cdc__PCDIPLinearize__DrawIndexedPrimitive 0061ABB0 -cdc__PCDeviceManager__Create 00618E10 -cdc__PCDeviceManager__CreateDevice 00617BE0 -cdc__PCDeviceManager__CreateRenderContext 00616F40 -cdc__PCDeviceManager__Init 00618070 -cdc__PCDeviceManager__PCDeviceManager 00C8199C -cdc__PCDeviceManager__ReleaseDevice 00617F50 -cdc__PCDeviceManager__Settings__Settings 00403FB0 -cdc__PCEffectManager__PrepareDoFTexture 0060DB90 -cdc__PCRenderContext__PCRenderContext 0061BBB0 -cdc__PCRenderDeviceCreate 00C80D6A -cdc__PCStaticPool__OnCreateDevice 004E6ED0 -cdc__PackRGBA 0060CEB0 -j_ArchiveFileSystem__CalculateHash 0047DA10 -j_ArchiveFileSystem__Find 0047DA60 -j_CDCCine_StopAllCine 0042E100 -j_CHECKPOINT_HandlePlayer 0052E600 -j_CLOTH_RelaxAllCloth 00437DF0 -j_COLLIDE_InsertDynamicMarker 00425F30 -j_CharacterProxy__TeleportToNewSettings 0054B3F0 -j_CinematicHandlerImpl__NextFrame 00425860 -j_CreateSoundstream 0042DB20 -j_D3D_Init 004153E0 -j_DEBUG_FatalError 00427A60 -j_DRAW_DrawTriangles 00407570 -j_ENEMY_KillEnemy 004B4DA0 -j_ENEMY_StartAttack 0049C910 -j_ENEMY_SwitchState 0049B1C0 -j_EVENT_PlayerDisableControl 004319F0 -j_EVENT_PlayerTurnGold 00431A00 -j_EnemySensesControl__AddInstance 004C40B0 -j_EventMain 00468260 -j_FindUnitInfo 005DA180 -j_Font__FontInfo__GetCharInfo 00434210 -j_Font__Load 00433DD0 -j_G2Quat_ToEuler 004E0070 -j_GAMELOOP_DisplayGameElements 00453170 -j_GAMELOOP_InitGameTracker 00451F80 -j_GAMELOOP_MainLoop 00454E90 -j_GAMELOOP_RequestLevelChangeByName 004543C0 -j_GAMELOOP_SystemInit 00452050 -j_GAMEWINDOW_Init 00404610 -j_GetDrawListByTpageId 004158E0 -j_GetObjectID 004660C0 -j_INPUT_RestoreStatus 004E0250 -j_INSTANCE_BirthObject 0045BBE0 -j_INSTANCE_IntroduceCommon1 00457DA0 -j_INSTANCE_NewInstance 00457580 -j_InitObjectWithID 00465C90 -j_InsertGlobalObject 005DB360 -j_MSSave__ProcessCommandline 005BEBE0 -j_MarkupManager__AddInstanceMarkup 00462C70 -j_MarkupManager__FindMarkUp 004613B0 -j_MarkupManager__GetMarkUpBoxById 00461020 -j_MultibodySystemImpl__RelocateImpl 0051C440 -j_MultiplexStreamImpl__AdvanceToNextFrame 0041A2F0 -j_PCMOUSE_GetButtonState 00406450 -j_PLAYER_ReSetLookAround 00560110 -j_PLAYER_SetLookAround 005600F0 -j_PLAYER_TurnHead 00576B60 -j_PushCommand 004EC520 -j_RAZIEL_SetLookAround 0055FB60 -j_ReLaunchMediaCenter 00401C20 -j_RelocPE 00467F40 -j_RenderG2_MotionBlur 0043AB40 -j_SFXPROG_AllocInstanceData 005CEA90 -j_STREAM_FinishLoad_CDCCine 00420110 -j_STREAM_GetObjectTrackerByName 005DA260 -j_STREAM_GetStreamUnitWithName 005DA8C0 -j_STREAM_LoadLevel 005DBBA0 -j_STREAM_LoadLevelObjects 005DB4D0 -j_STREAM_LoadObjectReturn 005E03A0 -j_SaveInput 00404F80 -j_SetupBuildDir 0045F390 -j_StartAmbientCine 0042E0E0 -j_TerrainDrawable__TerrainDrawable 0040B9B0 -j_UIDataList__AddItem 004ED6C0 -j_UIDataList__AllocateRunData 004ED600 -j_UIFadeGroupTrigger 00431630 -j__registerdebugcinecommand 004517C0 -j_cdcRenderLayer__DRAW_DrawTriangles 0041B690 -j_cdc__PCBasicVertexPool__Create 0061F840 -j_cdc__PCDeviceManager__PCDeviceManager 00618D10 -j_cdc__PCRenderDeviceCreate 0060C0F0 -j_localstr_get 004058E0 -j_playerInvIsGear_ 005A3FE0 -j_playerInvScriptGiveItem 005B13A0 -localstr_get 004E3C80 -localstr_reload 004E3CB0 -localstr_set_gfx_gen 004E3C00 -menu_draw_item 004E9E70 -menu_finish_pop 004E9520 -menu_print 004EB1D0 -menucommand_FELoadLevel 004EAA50 -menucommand_FELoadRecentMansionLevelCommand 004EADD0 -menucommand_FENewGame 004EA860 -menucommand_LoadLevel 004E4920 -playerActivateRagdoll 005AD950 -playerCanHaveItem 005A1F70 -playerInvCreateItem 005B0890 -playerInvGetObj 005A1AC0 -playerInvIsGear 00C779D1 -playerInvIsWeapon 005A3FA0 -playerInvScriptGiveItem 00C783A5 -playerInvSelectFromList 005B3290 -playerInvSelectGear 005A1A80 -playerInvSelectWeapon 005A6B60