organize system/client-functions
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Allow backsteps and\nmovement when enemies\nare nearby"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
# region @ 801CEBF0 (4 bytes)
|
||||
.data 0x801CEBF0 # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x4800000C # 801CEBF0 => b +0x0000000C /* 801CEBFC */
|
||||
# region @ 801CFAE0 (4 bytes)
|
||||
.data 0x801CFAE0 # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x48000014 # 801CFAE0 => b +0x00000014 /* 801CFAF4 */
|
||||
# end sentinel
|
||||
.data 0x00000000 # address
|
||||
.data 0x00000000 # size
|
||||
@@ -0,0 +1,22 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Allow backsteps and\nmovement when enemies\nare nearby"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
# region @ 801CEBF0 (4 bytes)
|
||||
.data 0x801CEBF0 # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x4800000C # 801CEBF0 => b +0x0000000C /* 801CEBFC */
|
||||
# region @ 801CFAE0 (4 bytes)
|
||||
.data 0x801CFAE0 # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x48000014 # 801CFAE0 => b +0x00000014 /* 801CFAF4 */
|
||||
# end sentinel
|
||||
.data 0x00000000 # address
|
||||
.data 0x00000000 # size
|
||||
@@ -0,0 +1,22 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Allow backsteps and\nmovement when enemies\nare nearby"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
# region @ 801CEDF0 (4 bytes)
|
||||
.data 0x801CEDF0 # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x4800000C # 801CEDF0 => b +0x0000000C /* 801CEDFC */
|
||||
# region @ 801CFCE0 (4 bytes)
|
||||
.data 0x801CFCE0 # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x48000014 # 801CFCE0 => b +0x00000014 /* 801CFCF4 */
|
||||
# end sentinel
|
||||
.data 0x00000000 # address
|
||||
.data 0x00000000 # size
|
||||
@@ -0,0 +1,22 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Allow backsteps and\nmovement when enemies\nare nearby"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
# region @ 801CE7AC (4 bytes)
|
||||
.data 0x801CE7AC # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x4800000C # 801CE7AC => b +0x0000000C /* 801CE7B8 */
|
||||
# region @ 801CF69C (4 bytes)
|
||||
.data 0x801CF69C # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x48000014 # 801CF69C => b +0x00000014 /* 801CF6B0 */
|
||||
# end sentinel
|
||||
.data 0x00000000 # address
|
||||
.data 0x00000000 # size
|
||||
@@ -0,0 +1,22 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Allow backsteps and\nmovement when enemies\nare nearby"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
# region @ 801CECC0 (4 bytes)
|
||||
.data 0x801CECC0 # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x4800000C # 801CECC0 => b +0x0000000C /* 801CECCC */
|
||||
# region @ 801CFBB0 (4 bytes)
|
||||
.data 0x801CFBB0 # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x48000014 # 801CFBB0 => b +0x00000014 /* 801CFBC4 */
|
||||
# end sentinel
|
||||
.data 0x00000000 # address
|
||||
.data 0x00000000 # size
|
||||
@@ -0,0 +1,22 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Allow backsteps and\nmovement when enemies\nare nearby"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
# region @ 801D0D10 (4 bytes)
|
||||
.data 0x801D0D10 # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x4800000C # 801D0D10 => b +0x0000000C /* 801D0D1C */
|
||||
# region @ 801D1CEC (4 bytes)
|
||||
.data 0x801D1CEC # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x48000014 # 801D1CEC => b +0x00000014 /* 801D1D00 */
|
||||
# end sentinel
|
||||
.data 0x00000000 # address
|
||||
.data 0x00000000 # size
|
||||
@@ -0,0 +1,22 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Allow backsteps and\nmovement when enemies\nare nearby"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
# region @ 801CED8C (4 bytes)
|
||||
.data 0x801CED8C # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x4800000C # 801CED8C => b +0x0000000C /* 801CED98 */
|
||||
# region @ 801CFC7C (4 bytes)
|
||||
.data 0x801CFC7C # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x48000014 # 801CFC7C => b +0x00000014 /* 801CFC90 */
|
||||
# end sentinel
|
||||
.data 0x00000000 # address
|
||||
.data 0x00000000 # size
|
||||
@@ -0,0 +1,22 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Allow backsteps and\nmovement when enemies\nare nearby"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
# region @ 801CF2AC (4 bytes)
|
||||
.data 0x801CF2AC # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x4800000C # 801CF2AC => b +0x0000000C /* 801CF2B8 */
|
||||
# region @ 801D019C (4 bytes)
|
||||
.data 0x801D019C # address
|
||||
.data 0x00000004 # size
|
||||
.data 0x48000014 # 801D019C => b +0x00000014 /* 801D01B0 */
|
||||
# end sentinel
|
||||
.data 0x00000000 # address
|
||||
.data 0x00000000 # size
|
||||
@@ -0,0 +1,16 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Fix movement dead\nzone thresholds"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
|
||||
.data 0x00308E88
|
||||
.deltaof code_start, code_end
|
||||
code_start:
|
||||
.include MovementXB
|
||||
code_end:
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -0,0 +1,16 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Fix movement dead\nzone thresholds"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
|
||||
.data 0x00308F08
|
||||
.deltaof code_start, code_end
|
||||
code_start:
|
||||
.include MovementXB
|
||||
code_end:
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -0,0 +1,16 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Fix movement dead\nzone thresholds"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
|
||||
.data 0x003067D8
|
||||
.deltaof code_start, code_end
|
||||
code_start:
|
||||
.include MovementXB
|
||||
code_end:
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -0,0 +1,16 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Fix movement dead\nzone thresholds"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
|
||||
.data 0x003073D8
|
||||
.deltaof code_start, code_end
|
||||
code_start:
|
||||
.include MovementXB
|
||||
code_end:
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -0,0 +1,16 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Fix movement dead\nzone thresholds"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
|
||||
.data 0x00308F08
|
||||
.deltaof code_start, code_end
|
||||
code_start:
|
||||
.include MovementXB
|
||||
code_end:
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -0,0 +1,16 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Fix movement dead\nzone thresholds"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
|
||||
.data 0x00308EB8
|
||||
.deltaof code_start, code_end
|
||||
code_start:
|
||||
.include MovementXB
|
||||
code_end:
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -0,0 +1,16 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Fix movement dead\nzone thresholds"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
|
||||
.data 0x00309078
|
||||
.deltaof code_start, code_end
|
||||
code_start:
|
||||
.include MovementXB
|
||||
code_end:
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -0,0 +1,39 @@
|
||||
start:
|
||||
call process_stick_value
|
||||
push esi
|
||||
sub esi, 4
|
||||
call process_stick_value
|
||||
pop esi
|
||||
jmp end
|
||||
|
||||
process_stick_value:
|
||||
mov ax, [esp + 0x3C] # ax = stick val y
|
||||
cwd # dx = FFFF if y < 0 else 0000
|
||||
xor dh, dh # dx = 00FF if y < 0 else 0000
|
||||
add ax, dx # adjust ax if y negative else don't
|
||||
sar ax, 8 # eax = ----Y1Y2
|
||||
neg ax
|
||||
shl eax, 16 # eax = Y1Y2-----
|
||||
|
||||
mov ax, [esp + 0x3A] # ax = stick val x
|
||||
cwd # dx = FFFF if x < 0 else 0000
|
||||
xor dh, dh # dx = 00FF if x < 0 else 0000
|
||||
add ax, dx # adjust ax if x negative else don't
|
||||
sar ax, 8 # eax = Y1Y2X1X2
|
||||
|
||||
# check for deadzone - if either value is outside of deadzone, allow movement
|
||||
xor ecx, ecx # ecx = 0
|
||||
lea edx, [eax + 0x28] # edx = eax + 0x28 (deadzone range is -0x28 through 0x28)
|
||||
cmp dl, 0x50
|
||||
cmova ecx, eax # if X2 out of deadzone range, use eax
|
||||
mov edx, eax
|
||||
bswap edx # dh = Y2
|
||||
add dh, 0x28 # dh = Y2 + 0x28
|
||||
cmp dh, 0x50
|
||||
cmova ecx, eax # if Y2 out of deadzone range, use eax
|
||||
|
||||
mov [esi + 0x18], ecx # set processed stick values
|
||||
ret
|
||||
|
||||
.zero 0x56
|
||||
end:
|
||||
Reference in New Issue
Block a user