//TWMS_160.3_ICS_人物坐標左右走//update pl49952001
[Enable]
Alloc(AutoLRICS,512)
Alloc(SetX,4)
Alloc(MyLR,4)
Label(AutoLR)
Label(GetWall)
Label(GetChrX)
Label(GoRight)
Label(GoLeft)
SetX:
ReadMem([012F0874]+125C, 4)
MyLR:
DD 1
012FBA10:
DD AutoLRICS
AutoLRICS:
Cmp [Esp],00BD86F8
Jne GetFocus
Mov [Esp],AutoLR
Jmp GetFocus
AutoLR:
Call GetWall
Mov [ebp-04],Eax
Xor Ecx,Ecx
Xor Eax,Eax
Cmp [ebp-04],Eax
Jmp 00BD8A57
GetWall:
Call GetChrX
Mov Ecx,[SetX]
Sub Eax,Ecx
Cmp Eax,0
Jle GoRight
Call GetChrX
Mov Ecx,[SetX]
sub Ecx,Eax
cmp Ecx,0
Jle GoLeft
Mov Eax,[MyLR]
Ret
GetChrX:
Mov Eax,[012F0874]
Mov Eax,[Eax+125C]
Ret
GoRight:
Mov [MyLR],1
Mov Eax,1
Ret
GoLeft:
Mov [MyLR],FFFFFFFF
Mov Eax,FFFFFFFF
Ret
[Disable]
012FBA10:
DD GetFocus
DeAlloc(MyLR)
DeAlloc(SetX)
DeAlloc(AutoLRICS) |