summaryrefslogtreecommitdiffstats
path: root/src/skel
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-04-17 15:31:11 +0200
committerSergeanur <s.anureev@yandex.ua>2020-04-17 15:31:11 +0200
commit599164006a9e7eb7328fc194c9bae1acbb2c887d (patch)
treec4dc5a5e2bf370e74ffc8ab4b9220ea6e066e952 /src/skel
parentMerge remote-tracking branch 'samler/world' into Standalone (diff)
downloadre3-599164006a9e7eb7328fc194c9bae1acbb2c887d.tar
re3-599164006a9e7eb7328fc194c9bae1acbb2c887d.tar.gz
re3-599164006a9e7eb7328fc194c9bae1acbb2c887d.tar.bz2
re3-599164006a9e7eb7328fc194c9bae1acbb2c887d.tar.lz
re3-599164006a9e7eb7328fc194c9bae1acbb2c887d.tar.xz
re3-599164006a9e7eb7328fc194c9bae1acbb2c887d.tar.zst
re3-599164006a9e7eb7328fc194c9bae1acbb2c887d.zip
Diffstat (limited to 'src/skel')
-rw-r--r--src/skel/events.cpp13
-rw-r--r--src/skel/skeleton.cpp25
-rw-r--r--src/skel/win/win.cpp63
3 files changed, 5 insertions, 96 deletions
diff --git a/src/skel/events.cpp b/src/skel/events.cpp
index 60e1482e..5d16d5b0 100644
--- a/src/skel/events.cpp
+++ b/src/skel/events.cpp
@@ -12,7 +12,7 @@
#include "Camera.h"
-#include "patcher.h"
+
/*
*****************************************************************************
@@ -832,14 +832,3 @@ AttachInputDevices(void)
return TRUE;
}
-
-
-STARTPATCHES
- InjectHook(0x583F10, HandleKeyDown, PATCH_JUMP);
- InjectHook(0x5842F0, HandleKeyUp, PATCH_JUMP);
- InjectHook(0x5846C0, KeyboardHandler, PATCH_JUMP);
- InjectHook(0x5846F0, HandlePadButtonDown, PATCH_JUMP);
- InjectHook(0x584770, HandlePadButtonUp, PATCH_JUMP);
- InjectHook(0x584830, PadHandler, PATCH_JUMP);
- InjectHook(0x584860, AttachInputDevices, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
diff --git a/src/skel/skeleton.cpp b/src/skel/skeleton.cpp
index a02d7e0b..f48089cb 100644
--- a/src/skel/skeleton.cpp
+++ b/src/skel/skeleton.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include <stdio.h>
#include <math.h>
@@ -415,26 +415,3 @@ RsInitialise(void)
return result;
}
-
-
-
-
-STARTPATCHES
- InjectHook(0x584890, RsTimer, PATCH_JUMP);
- InjectHook(0x5848A0, RsCameraShowRaster, PATCH_JUMP);
- InjectHook(0x5848B0, RsCameraBeginUpdate, PATCH_JUMP);
- InjectHook(0x5848C0, RsRegisterImageLoader, PATCH_JUMP);
- InjectHook(0x5848D0, RsSetDebug, PATCH_JUMP);
- InjectHook(0x5848E0, RsMouseSetPos, PATCH_JUMP);
- InjectHook(0x5848F0, RsSelectDevice, PATCH_JUMP);
- InjectHook(0x584900, RsInputDeviceAttach, PATCH_JUMP);
- InjectHook(0x584960, rsCommandLine, PATCH_JUMP);
- InjectHook(0x584980, rsPreInitCommandLine, PATCH_JUMP);
- InjectHook(0x5849C0, RsKeyboardEventHandler, PATCH_JUMP);
- InjectHook(0x5849F0, RsPadEventHandler, PATCH_JUMP);
- InjectHook(0x584A20, RsEventHandler, PATCH_JUMP);
- InjectHook(0x584B30, RsRwTerminate, PATCH_JUMP);
- InjectHook(0x584B40, RsRwInitialise, PATCH_JUMP);
- InjectHook(0x584C30, RsTerminate, PATCH_JUMP);
- InjectHook(0x584C40, RsInitialise, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp
index 351b7247..a534e903 100644
--- a/src/skel/win/win.cpp
+++ b/src/skel/win/win.cpp
@@ -1366,7 +1366,7 @@ psSelectDevice()
{
return FALSE;
}
-
+
if (vm.flags & rwVIDEOMODEEXCLUSIVE)
{
debug("%dx%dx%d", vm.width, vm.height, vm.depth);
@@ -1754,7 +1754,7 @@ void HandleExit()
*****************************************************************************
*/
int PASCAL
-_WinMain(HINSTANCE instance,
+WinMain(HINSTANCE instance,
HINSTANCE prevInstance __RWUNUSED__,
CMDSTR cmdLine,
int cmdShow)
@@ -1763,7 +1763,7 @@ _WinMain(HINSTANCE instance,
RwV2d pos;
RwInt32 argc, i;
RwChar **argv;
-
+ StaticPatcher::Apply();
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, nil, SPIF_SENDCHANGE);
/*
@@ -3025,60 +3025,3 @@ int strcasecmp(const char *str1, const char *str2)
return _strcmpi(str1, str2);
}
#endif
-
-
-STARTPATCHES
- //InjectHook(0x580B30, &CJoySticks::CJoySticks, PATCH_JUMP);
- //InjectHook(0x580B50, &CJoySticks::ClearJoyInfo, PATCH_JUMP);
- InjectHook(0x580B70, _psCreateFolder, PATCH_JUMP);
- InjectHook(0x580BB0, _psGetUserFilesFolder, PATCH_JUMP);
- InjectHook(0x580C70, psCameraBeginUpdate, PATCH_JUMP);
- InjectHook(0x580CA0, psCameraShowRaster, PATCH_JUMP);
- InjectHook(0x580CE0, psTimer, PATCH_JUMP);
- InjectHook(0x580D20, psMouseSetPos, PATCH_JUMP);
- InjectHook(0x580E10, psGetMemoryFunctions, PATCH_JUMP);
- InjectHook(0x580E20, psInstallFileSystem, PATCH_JUMP);
- InjectHook(0x580E30, psNativeTextureSupport, PATCH_JUMP);
- InjectHook(0x580E40, InitApplication, PATCH_JUMP);
- InjectHook(0x580EB0, InitInstance, PATCH_JUMP);
- InjectHook(0x580F30, _GetVideoMemInfo, PATCH_JUMP);
- InjectHook(0x580FA0, GetDXVersion, PATCH_JUMP);
- InjectHook(0x5810C0, _psGetCpuVendr, PATCH_JUMP);
- InjectHook(0x5810E0, _psGetCpuFeatures, PATCH_JUMP);
- InjectHook(0x5810F0, _psGetCpuFeaturesEx, PATCH_JUMP);
- InjectHook(0x581120, _psPrintCpuInfo, PATCH_JUMP);
- InjectHook(0x581180, psInitialise, PATCH_JUMP);
- InjectHook(0x581460, psTerminate, PATCH_JUMP);
- InjectHook(0x581470, _psGetNumVideModes, PATCH_JUMP);
- InjectHook(0x581480, _psFreeVideoModeList, PATCH_JUMP);
- InjectHook(0x5814F0, _psGetVideoModeList, PATCH_JUMP);
- InjectHook(0x581630, _psSelectScreenVM, PATCH_JUMP);
- InjectHook(0x5816B0, WaitForState, PATCH_JUMP);
- InjectHook(0x5816E0, HandleGraphEvent, PATCH_JUMP);
- InjectHook(0x581790, MainWndProc, PATCH_JUMP);
- InjectHook(0x581C90, IsForegroundApp, PATCH_JUMP);
- InjectHook(0x581CB0, GetBestRefreshRate, PATCH_JUMP);
- InjectHook(0x581D80, psSelectDevice, PATCH_JUMP);
- InjectHook(0x581F90, _psSetVideoMode, PATCH_JUMP);
- InjectHook(0x582030, CommandLineToArgv, PATCH_JUMP);
- InjectHook(0x582160, InitialiseLanguage, PATCH_JUMP);
- InjectHook(0x5822F0, CenterVideo, PATCH_JUMP);
- InjectHook(0x582380, PlayMovieInWindow, PATCH_JUMP);
- InjectHook(0x5825E0, CloseInterfaces, PATCH_JUMP);
- InjectHook(0x582680, CloseClip, PATCH_JUMP);
- InjectHook(0x5826A0, HandleExit, PATCH_JUMP);
- InjectHook(0x582710, _WinMain, PATCH_JUMP);
- InjectHook(0x5830D0, _InputInitialise, PATCH_JUMP);
- InjectHook(0x583110, _InputInitialiseMouse, PATCH_JUMP);
- InjectHook(0x583190, CapturePad, PATCH_JUMP);
- InjectHook(0x583580, _InputInitialiseJoys, PATCH_JUMP);
- InjectHook(0x583670, _InputAddJoyStick, PATCH_JUMP);
- InjectHook(0x583810, _InputAddJoys, PATCH_JUMP);
- InjectHook(0x583870, _InputGetMouseState, PATCH_JUMP);
- InjectHook(0x583910, _InputShutdown, PATCH_JUMP);
- InjectHook(0x583940, _InputEnumDevicesCallback, PATCH_JUMP);
- InjectHook(0x583A20, _InputTranslateKey, PATCH_JUMP);
- InjectHook(0x583DC0, _InputTranslateShiftKeyUpDown, PATCH_JUMP);
- InjectHook(0x583E50, _InputTranslateShiftKey, PATCH_JUMP);
- InjectHook(0x583EE0, _InputIsExtended, PATCH_JUMP);
-ENDPATCHES