You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Cameras/Tombraider/InjectableGenericCameraSystem/Interceptor.asm
+11-15Lines changed: 11 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -61,34 +61,33 @@ cameraAddressInterceptor PROC
61
61
; Game jmps to this location due to the hook set in C function SetCameraStructInterceptorHook
62
62
mov[_cameraStructAddress],esi ; intercept address of camera struct
63
63
exit:
64
-
mov[esi-60h],eax ; original statement
65
-
movecx,[edi+04h]
64
+
movupsxmm0, xmmword ptr [esi+000003C0h]
65
+
movups xmmword ptr [esi-50h],xmm0
66
66
jmp[_cameraStructInterceptionContinue] ; jmp back into the original game code, which is the location after the original statements above.
67
67
cameraAddressInterceptor ENDP
68
68
69
69
70
70
gamespeedAddressInterceptor PROC
71
-
mov[_gamespeedStructAddress],esi
71
+
mov[_gamespeedStructAddress],edi
72
72
cmp byte ptr [_timeStopped],1
73
73
je exit
74
74
originalCode:
75
-
fstp dword ptr [esi+00000104h]
75
+
fstp dword ptr [edi+00000104h]
76
76
exit:
77
77
jmp[_gamespeedInterceptionContinue]
78
78
gamespeedAddressInterceptor ENDP
79
79
80
80
81
81
fovWriteInterceptor1 PROC
82
82
; Game jmps to this location due to the hook set in C function SetFoVWriteInterceptorHooks.
83
+
movecx,[ebp-04h]
83
84
cmp dword ptr esi,[_cameraStructAddress]
84
85
jne originalCode
85
86
cmp byte ptr [_cameraEnabled],1 ; check if the user enabled the camera. If so, just skip the write statements, otherwise just execute the original code.
86
87
je exit ; our own camera is enabled, just skip the writes
87
88
originalCode:
88
-
fstp dword ptr [esi-78h] ; original statement
89
+
fstp dword ptr [esi-78h]
89
90
exit:
90
-
pushebx ; original statement
91
-
movecx,edi ; original statement
92
91
jmp[_fovWriteInterceptionContinue1] ; jmp back into the original game code which is the location after the original statements above.
93
92
fovWriteInterceptor1 ENDP
94
93
@@ -99,8 +98,8 @@ fovWriteInterceptor2 PROC
99
98
je exit ; our own camera is enabled, just skip the writes
100
99
originalCode:
101
100
fld dword ptr [eax+ecx+38h] ; original statement
102
-
leaeax,[eax+ecx+10h] ; original statement
103
101
exit:
102
+
popebp
104
103
jmp[_fovWriteInterceptionContinue2] ; jmp back into the original game code which is the location after the original statements above.
105
104
fovWriteInterceptor2 ENDP
106
105
@@ -112,12 +111,12 @@ fovWriteInterceptor2 ENDP
112
111
113
112
cameraWriteInterceptor1 PROC
114
113
; Game jmps to this location due to the hook set in C function SetCameraWriteInterceptorHooks.
cmp byte ptr [_cameraEnabled],1 ; check if the user enabled the camera. If so, just skip the write statements, otherwise just execute the original code.
118
117
je exit ; our own camera is enabled, just skip the writes
119
118
originalCode:
120
-
movaps[esi+090h],xmm0
119
+
movaps[ecx+00000090h],xmm0
121
120
exit:
122
121
jmp[_cameraWriteInterceptionContinue1] ; jmp back into the original game code which is the location after the original statements above.
123
122
cameraWriteInterceptor1 ENDP
@@ -130,11 +129,8 @@ cameraWriteInterceptor2 PROC
130
129
cmp byte ptr [_cameraEnabled],1 ; check if the user enabled the camera. If so, just skip the write statements, otherwise just execute the original code.
131
130
je exit ; our own camera is enabled, just skip the writes
132
131
originalCode:
133
-
mov[esi-30h],eax
134
-
movecx,[esi+000003E4h]
135
-
mov[esi-2Ch],ecx
136
-
movedx,[esi+000003E8h]
137
-
mov[esi-28h],edx
132
+
movupsxmm0, xmmword ptr [esi+000003E0h]
133
+
movups xmmword ptr [esi-30h],xmm0
138
134
exit:
139
135
jmp[_cameraWriteInterceptionContinue2] ; jmp back into the original game code which is the location after the original statements above.
0 commit comments