diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-04-17 17:08:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 17:08:26 +0200 |
commit | 1c74d111e8cafa4ad70837725c71f6d478390f01 (patch) | |
tree | 818918190bf4403c32137d7348a77e23b643a669 /src/vehicles/Train.cpp | |
parent | implemented CVector2D::NormaliseSafe for SkidMarks (diff) | |
parent | appveyor setup (diff) | |
download | re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.gz re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.bz2 re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.lz re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.xz re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.zst re3-1c74d111e8cafa4ad70837725c71f6d478390f01.zip |
Diffstat (limited to 'src/vehicles/Train.cpp')
-rw-r--r-- | src/vehicles/Train.cpp | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp index 25be193c..0d1ff9b0 100644 --- a/src/vehicles/Train.cpp +++ b/src/vehicles/Train.cpp @@ -1,6 +1,6 @@ #include "common.h" #include "main.h" -#include "patcher.h" + #include "Timer.h" #include "ModelIndices.h" #include "FileMgr.h" @@ -691,32 +691,3 @@ CTrain::UpdateTrains(void) time += 0x40000/4; } } - -#include <new> - -class CTrain_ : public CTrain -{ -public: - void ctor(int32 id, uint8 CreatedBy) { ::new (this) CTrain(id, CreatedBy); } - void SetModelIndex_(uint32 id) { CTrain::SetModelIndex(id); } - void ProcessControl_(void) { CTrain::ProcessControl(); } - void PreRender_(void) { CTrain::PreRender(); } - void Render_(void) { CTrain::Render(); } - void dtor(void) { CTrain::~CTrain(); } -}; - -STARTPATCHES - InjectHook(0x54E470, &CTrain_::SetModelIndex_, PATCH_JUMP); - InjectHook(0x54E4C0, &CTrain_::PreRender_, PATCH_JUMP); - InjectHook(0x54EAA0, &CTrain_::Render_, PATCH_JUMP); - InjectHook(0x54E450, &CTrain_::dtor, PATCH_JUMP); - InjectHook(0x54E2A0, &CTrain_::ctor, PATCH_JUMP); - InjectHook(0x550300, &CTrain::TrainHitStuff, PATCH_JUMP); - InjectHook(0x5504A0, &CTrain::AddPassenger, PATCH_JUMP); - InjectHook(0x550360, &CTrain::OpenTrainDoor, PATCH_JUMP); - - InjectHook(0x54F000, CTrain::InitTrains, PATCH_JUMP); - InjectHook(0x54F360, CTrain::Shutdown, PATCH_JUMP); - InjectHook(0x54EAB0, CTrain::ReadAndInterpretTrackFile, PATCH_JUMP); - InjectHook(0x54F3A0, CTrain::UpdateTrains, PATCH_JUMP); -ENDPATCHES |