From f1d4eac70016ced41cb5e383e65763187a84b191 Mon Sep 17 00:00:00 2001 From: Warmist Date: Sun, 11 Nov 2012 11:58:43 +0200 Subject: [PATCH] Pre-class remove --- .../luafiles/friendship/friendship.asm | 10 +- .../Dfusion/luafiles/friendship/friendship.o | Bin 722 -> 854 bytes plugins/lua/dfusion/embark.lua | 2 + plugins/lua/dfusion/friendship.lua | 111 ++++++++++++++++++ plugins/lua/dfusion/friendship.o | Bin 0 -> 854 bytes plugins/lua/dfusion/srcs/compile.bat | 1 + plugins/lua/dfusion/srcs/embark.asm | 7 ++ plugins/lua/dfusion/srcs/friendship.asm | 106 +++++++++++++++++ 8 files changed, 234 insertions(+), 3 deletions(-) create mode 100644 plugins/lua/dfusion/friendship.lua create mode 100644 plugins/lua/dfusion/friendship.o create mode 100644 plugins/lua/dfusion/srcs/compile.bat create mode 100644 plugins/lua/dfusion/srcs/embark.asm create mode 100644 plugins/lua/dfusion/srcs/friendship.asm diff --git a/plugins/Dfusion/luafiles/friendship/friendship.asm b/plugins/Dfusion/luafiles/friendship/friendship.asm index e56fe7f49..b649e38de 100644 --- a/plugins/Dfusion/luafiles/friendship/friendship.asm +++ b/plugins/Dfusion/luafiles/friendship/friendship.asm @@ -66,8 +66,10 @@ mov eax, [edi+0x8c] #jmp compare compare: push ecx +mark_racepointer: mov ebx,0xDEADBEEF #write a pointer to the list of allowed races -mov ecx,2000 #write a number of allowed races +mark_racecount: +mov ecx,0xDEADBEEF #write a number of allowed races loop1: cmp word[ebx+ecx*2],ax jz endok @@ -92,11 +94,13 @@ endfinal: pop ebx pop eax -mov [0xFEEDBEEF],eax #write a pointer to safe location (usually after this) +mark_safeloc1: +mov [0xDEADBEEF],eax #write a pointer to safe location (usually after this) pop eax pushfd inc eax #skip one instruction popfd push eax -mov eax,[0xFEEDBEEF] #write a pointer to safe location (same as above) +mark_safeloc2: +mov eax,[0xDEADBEEF] #write a pointer to safe location (same as above) ret diff --git a/plugins/Dfusion/luafiles/friendship/friendship.o b/plugins/Dfusion/luafiles/friendship/friendship.o index f956de3e0a6fce74f63feb2c41a1d07b7a441ec4..c801562dbc1bc9ab11c74929ef422aff7629dcb5 100644 GIT binary patch delta 177 zcmcb_dX0_Ohmn~91VR`Y7$i6H3Ny02-?#SOWEDnbp0)QP<~Ym^SO^vfX1pm4Qpdu; zz|hCQz`)4Bz`zC)U=U?sV3<5vnaLh3ufo8Mtiq_w^Y&lF9EZ693*Ya1`)_hEMAX_RACES then + error("race count must be less then "..MAX_RACES) + end + local rarr=self:allocate("race_array",'uint16_t',MAX_RACES) + local _,rarr_offset=df.sizeof(rarr) + self:set_marker_dword("racepointer",rarr_offset) + self:set_races(rarr) + self:set_marker_dword("racecount",#self.race_data) + local safe_loc=self:allocate("safe_loc",'uint32_t',1) + local _1,safe_loc_offset=df.sizeof(safe_loc) + self:set_marker_dword("safeloc1",safe_loc_offset) + self:set_marker_dword("safeloc2",safe_loc_offset) + local addr=self:move_to_df() + self:patchCalls(addr) + self.installed=true + end +return _ENV \ No newline at end of file diff --git a/plugins/lua/dfusion/friendship.o b/plugins/lua/dfusion/friendship.o new file mode 100644 index 0000000000000000000000000000000000000000..c801562dbc1bc9ab11c74929ef422aff7629dcb5 GIT binary patch literal 854 zcmeZaWM%+?5JmFu5g&@{py|m1nRH)bf{byiEXG}}Xh6zB$ zvvLbcl5!XrI2jli7#SEC*cggZ)15(*@yH@BAd!4z5hsvHI*LdD0|P@jvWRQ2Cj&!0 ziinFR14BEqh$G0HV7N$HVrC9VWIbFYIX|}`u_%?H7cK&lXJKGq=tB_^Wnf^K3>V4C z&o3}!U|^U57fH=a$2y&_fg%~p< zC|!bdA~14_WMW`oU