Changeset 473 for tools/wow_patcher


Ignore:
Timestamp:
Apr 23, 2010, 8:45:12 PM (15 years ago)
Author:
george
Message:
  • Přidáno: WowLua pro 3.3.3a.
  • Opraveno: Nástroj pro generování WowLua byl zobecněn a ověřen vůči 3.3.0a, 3.3.2 a 3.3.3a.
Location:
tools/wow_patcher
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tools/wow_patcher/wowpatcher.lpi

    r470 r473  
    3939        <IsPartOfProject Value="True"/>
    4040        <UnitName Value="wowpatcher"/>
    41         <CursorPos X="24" Y="39"/>
    42         <TopLine Value="27"/>
     41        <CursorPos X="30" Y="130"/>
     42        <TopLine Value="122"/>
    4343        <EditorIndex Value="0"/>
    44         <UsageCount Value="48"/>
     44        <UsageCount Value="49"/>
    4545        <Loaded Value="True"/>
    4646      </Unit0>
     
    7171      <Position1>
    7272        <Filename Value="wowpatcher.pas"/>
    73         <Caret Line="94" Column="1" TopLine="75"/>
     73        <Caret Line="96" Column="17" TopLine="78"/>
    7474      </Position1>
    7575      <Position2>
    7676        <Filename Value="wowpatcher.pas"/>
    77         <Caret Line="92" Column="5" TopLine="76"/>
     77        <Caret Line="95" Column="1" TopLine="76"/>
    7878      </Position2>
    7979      <Position3>
    8080        <Filename Value="wowpatcher.pas"/>
    81         <Caret Line="95" Column="1" TopLine="76"/>
     81        <Caret Line="96" Column="1" TopLine="77"/>
    8282      </Position3>
    8383      <Position4>
    8484        <Filename Value="wowpatcher.pas"/>
    85         <Caret Line="96" Column="1" TopLine="77"/>
     85        <Caret Line="95" Column="1" TopLine="76"/>
    8686      </Position4>
    8787      <Position5>
    8888        <Filename Value="wowpatcher.pas"/>
    89         <Caret Line="97" Column="1" TopLine="78"/>
     89        <Caret Line="96" Column="1" TopLine="77"/>
    9090      </Position5>
    9191      <Position6>
    9292        <Filename Value="wowpatcher.pas"/>
    93         <Caret Line="98" Column="1" TopLine="79"/>
     93        <Caret Line="95" Column="1" TopLine="76"/>
    9494      </Position6>
    9595      <Position7>
    9696        <Filename Value="wowpatcher.pas"/>
    97         <Caret Line="99" Column="1" TopLine="80"/>
     97        <Caret Line="97" Column="1" TopLine="78"/>
    9898      </Position7>
    9999      <Position8>
    100100        <Filename Value="wowpatcher.pas"/>
    101         <Caret Line="100" Column="1" TopLine="81"/>
     101        <Caret Line="98" Column="1" TopLine="79"/>
    102102      </Position8>
    103103      <Position9>
    104104        <Filename Value="wowpatcher.pas"/>
    105         <Caret Line="101" Column="1" TopLine="82"/>
     105        <Caret Line="99" Column="1" TopLine="80"/>
    106106      </Position9>
    107107      <Position10>
    108108        <Filename Value="wowpatcher.pas"/>
    109         <Caret Line="104" Column="1" TopLine="85"/>
     109        <Caret Line="98" Column="1" TopLine="79"/>
    110110      </Position10>
    111111      <Position11>
    112112        <Filename Value="wowpatcher.pas"/>
    113         <Caret Line="95" Column="1" TopLine="76"/>
     113        <Caret Line="99" Column="1" TopLine="80"/>
    114114      </Position11>
    115115      <Position12>
    116116        <Filename Value="wowpatcher.pas"/>
    117         <Caret Line="96" Column="17" TopLine="78"/>
     117        <Caret Line="100" Column="1" TopLine="81"/>
    118118      </Position12>
    119119      <Position13>
    120120        <Filename Value="wowpatcher.pas"/>
    121         <Caret Line="95" Column="1" TopLine="76"/>
     121        <Caret Line="85" Column="64" TopLine="84"/>
    122122      </Position13>
    123123      <Position14>
    124124        <Filename Value="wowpatcher.pas"/>
    125         <Caret Line="96" Column="1" TopLine="77"/>
     125        <Caret Line="149" Column="1" TopLine="131"/>
    126126      </Position14>
    127127      <Position15>
    128128        <Filename Value="wowpatcher.pas"/>
    129         <Caret Line="95" Column="1" TopLine="76"/>
     129        <Caret Line="117" Column="24" TopLine="98"/>
    130130      </Position15>
    131131      <Position16>
    132132        <Filename Value="wowpatcher.pas"/>
    133         <Caret Line="96" Column="1" TopLine="77"/>
     133        <Caret Line="157" Column="5" TopLine="125"/>
    134134      </Position16>
    135135      <Position17>
    136136        <Filename Value="wowpatcher.pas"/>
    137         <Caret Line="95" Column="1" TopLine="76"/>
     137        <Caret Line="159" Column="65" TopLine="128"/>
    138138      </Position17>
    139139      <Position18>
    140140        <Filename Value="wowpatcher.pas"/>
    141         <Caret Line="97" Column="1" TopLine="78"/>
     141        <Caret Line="157" Column="1" TopLine="130"/>
    142142      </Position18>
    143143      <Position19>
    144144        <Filename Value="wowpatcher.pas"/>
    145         <Caret Line="98" Column="1" TopLine="79"/>
     145        <Caret Line="158" Column="49" TopLine="121"/>
    146146      </Position19>
    147147      <Position20>
    148148        <Filename Value="wowpatcher.pas"/>
    149         <Caret Line="99" Column="1" TopLine="80"/>
     149        <Caret Line="76" Column="60" TopLine="55"/>
    150150      </Position20>
    151151      <Position21>
    152152        <Filename Value="wowpatcher.pas"/>
    153         <Caret Line="98" Column="1" TopLine="79"/>
     153        <Caret Line="148" Column="23" TopLine="125"/>
    154154      </Position21>
    155155      <Position22>
    156156        <Filename Value="wowpatcher.pas"/>
    157         <Caret Line="99" Column="1" TopLine="80"/>
     157        <Caret Line="118" Column="29" TopLine="99"/>
    158158      </Position22>
    159159      <Position23>
    160160        <Filename Value="wowpatcher.pas"/>
    161         <Caret Line="100" Column="1" TopLine="81"/>
     161        <Caret Line="132" Column="42" TopLine="110"/>
    162162      </Position23>
    163163      <Position24>
    164164        <Filename Value="wowpatcher.pas"/>
    165         <Caret Line="85" Column="64" TopLine="84"/>
     165        <Caret Line="129" Column="12" TopLine="110"/>
    166166      </Position24>
    167167      <Position25>
    168168        <Filename Value="wowpatcher.pas"/>
    169         <Caret Line="149" Column="1" TopLine="131"/>
     169        <Caret Line="21" Column="50" TopLine="2"/>
    170170      </Position25>
    171171      <Position26>
    172172        <Filename Value="wowpatcher.pas"/>
    173         <Caret Line="117" Column="24" TopLine="98"/>
     173        <Caret Line="108" Column="40" TopLine="102"/>
    174174      </Position26>
    175175      <Position27>
    176176        <Filename Value="wowpatcher.pas"/>
    177         <Caret Line="157" Column="5" TopLine="125"/>
     177        <Caret Line="133" Column="22" TopLine="114"/>
    178178      </Position27>
    179179      <Position28>
    180180        <Filename Value="wowpatcher.pas"/>
    181         <Caret Line="159" Column="65" TopLine="128"/>
     181        <Caret Line="20" Column="43" TopLine="2"/>
    182182      </Position28>
    183183      <Position29>
    184184        <Filename Value="wowpatcher.pas"/>
    185         <Caret Line="157" Column="1" TopLine="130"/>
     185        <Caret Line="76" Column="55" TopLine="76"/>
    186186      </Position29>
    187187      <Position30>
    188188        <Filename Value="wowpatcher.pas"/>
    189         <Caret Line="158" Column="49" TopLine="121"/>
     189        <Caret Line="138" Column="15" TopLine="119"/>
    190190      </Position30>
    191191    </JumpHistory>
  • tools/wow_patcher/wowpatcher.pas

    r406 r473  
    1818  TWoWPatcher = class(TCustomApplication)
    1919  private
    20     function FindSequence(Data, Sequence: array of Byte; Position: Integer = 0): Integer;
     20    function FindSequence(Data: array of Byte; Sequence: array of Integer; Position: Integer = 0): Integer;
     21    procedure WriteHexData(Data: array of Integer; From, Count: Integer);
    2122    procedure WriteHexData(Data: array of Byte; From, Count: Integer);
    2223  protected
     
    7475end;
    7576
    76 function TWoWPatcher.FindSequence(Data, Sequence: array of Byte; Position: Integer = 0): Integer;
     77function TWoWPatcher.FindSequence(Data: array of Byte; Sequence: array of Integer; Position: Integer = 0): Integer;
    7778var
    7879  I: Integer;
     
    8788      Same := True;
    8889      for II := 0 to High(Sequence) do begin
    89         if Data[I + II] <> Sequence[II] then begin
     90        if (Sequence[II] <> -1) and (Data[I + II] <> Sequence[II]) then begin
    9091          Same := False;
    9192          Break;
     
    9899    end;
    99100  end;
     101end;
     102
     103procedure TWoWPatcher.WriteHexData(Data: array of Integer; From, Count: Integer);
     104var
     105  I: Integer;
     106begin
     107  for I := From to From + Count - 1 do
     108    if Data[I] <> -1 then
     109      Write(IntToHex(Data[I], 2) + ' ')
     110      else Write('XX ');
    100111end;
    101112
     
    116127  I: Integer;
    117128const
    118   StartSequence: array[0..9] of Byte = ($FF, $FF, $5B, $8B, $E5, $5D, $C3, $8D, $49, $00);
    119   StartSequence2: array[0..9] of Byte = ($E8, $71, $09, $FB, $FF, $5B, $8B, $E5, $5D, $C3);
     129  StartSequence: array[0..15] of Integer = ($8D, $4D, $E8, $E8, -1, -1, -1, -1, $5B, $8B, $E5, $5D, $C3, $8D, $49, $00);
     130  StartSequence2: array[0..15] of Integer = ($88, $1D, -1, -1, -1, -1, $E8, -1, -1, -1, -1, $5B, $8B, $E5, $5D, $C3);
    120131begin
    121132  OriginalFile := TFileStream.Create(FileName, fmOpenRead);
Note: See TracChangeset for help on using the changeset viewer.