Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
TheIndra55 committed Jan 21, 2024
1 parent f4cfbea commit 13cbff5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 18 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
tar -xf lib.zip
- name: Generate project files
run: .\premake5 vs2019
run: .\premake5 vs2022

# compile
- name: Build Anniversary
Expand All @@ -38,9 +38,6 @@ jobs:
- name: Build Legend
run: MSBuild /p:Configuration=Release /p:Platform=TR7

- name: Build Legend Nextgen Demo
run: MSBuild /p:Configuration=Release /p:Platform=TR7DEBUG

# upload
- uses: actions/upload-artifact@v3
with:
Expand All @@ -62,10 +59,3 @@ jobs:
path: |
bin/TR7/Release/TR7-Menu-Hook.asi
bin/TR7/Release/TR7-Menu-Hook.pdb
- uses: actions/upload-artifact@v3
with:
name: Legend Nextgen Demo
path: |
bin/TR7DEBUG/Release/TR7DEBUG-Menu-Hook.asi
bin/TR7DEBUG/Release/TR7DEBUG-Menu-Hook.pdb
18 changes: 17 additions & 1 deletion premake5.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
workspace "TRAE-menu-hook"
architecture "x86"
configurations { "Debug", "Release" }
platforms { "TR7", "TRAE", "TR8" }

project "TRAE-menu-hook"
kind "SharedLib"
Expand Down Expand Up @@ -32,6 +33,8 @@ project "TRAE-menu-hook"
"vendor/json/include"
}

defines { "IMGUI_IMPL_WIN32_DISABLE_GAMEPAD" }

-- Build configurations
symbols "On"

Expand All @@ -40,4 +43,17 @@ project "TRAE-menu-hook"

filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
optimize "On"

-- Game configurations
filter "platforms:TR7"
defines { "TR7" }
targetname "TR7-Menu-Hook"

filter "platforms:TRAE"
defines { "TRAE" }
targetname "TRAE-Menu-Hook"

filter "platforms:TR8"
defines { "TR8" }
targetname "TR8-Menu-Hook"
8 changes: 4 additions & 4 deletions src/Hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include "modules/MainMenu.h"
#include "modules/InstanceViewer.h"
#include "modules/Skew.h"
#include "modules/Render.h"
#include "modules/Draw.h"
//#include "modules/Render.h"
//#include "modules/Draw.h"
#include "modules/Log.h"
#include "modules/ScriptLog.h"

Expand Down Expand Up @@ -116,8 +116,8 @@ void Hook::RegisterModules()
RegisterModule<Skew>();

#ifndef TR8
RegisterModule<Render>();
RegisterModule<Draw>();
//RegisterModule<Render>();
//RegisterModule<Draw>();
#else
RegisterModule<ScriptLog>();
#endif
Expand Down
5 changes: 4 additions & 1 deletion src/game/Game.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ struct GameTracker
char gameMode;
char cheatMode;
char savingGame;
__int16 postSaveScreenID;

char pad1[66];
int StreamUnitID;

char pad1[60];

float timeMult;
};
Expand Down
2 changes: 1 addition & 1 deletion src/util/Hooking.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Hooking
};

#if TR7
#define GET_ADDRESS(tr7, trae, tr8) trl
#define GET_ADDRESS(tr7, trae, tr8) tr7
#elif TRAE
#define GET_ADDRESS(tr7, trae, tr8) trae
#elif TR8
Expand Down

0 comments on commit 13cbff5

Please sign in to comment.