Changeset 307
- Timestamp:
- 01/11/10 01:02:39 (2 months ago)
- Location:
- Cheat Engine
- Files:
-
- 15 modified
-
AdvancedOptionsUnit.dfm (modified) (2 diffs)
-
AdvancedOptionsUnit.pas (modified) (3 diffs)
-
CEFuncProc.pas (modified) (3 diffs)
-
CheatEngine.res (modified) (previous)
-
MainUnit.dfm (modified) (1 diff)
-
MainUnit.pas (modified) (7 diffs)
-
PointerscannerSettingsFrm.pas (modified) (2 diffs)
-
Release/Cheat Engine.iss (modified) (1 diff)
-
Structuresfrm.dfm (modified) (2 diffs)
-
Structuresfrm.pas (modified) (6 diffs)
-
autoassembler.pas (modified) (5 diffs)
-
cheatengine.dof (modified) (2 diffs)
-
formsettingsunit.dfm (modified) (13 diffs)
-
plugin/cepluginsdk.h (modified) (3 diffs)
-
plugin/cepluginsdk.pas (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Cheat Engine/AdvancedOptionsUnit.dfm
r306 r307 165 165 TabOrder = 2 166 166 ViewStyle = vsReport 167 OnCustomDrawItem = Codelist2CustomDrawItem 167 168 OnDblClick = Codelist2DblClick 168 169 end … … 174 175 Caption = 'Open the disassembler at this location' 175 176 Default = True 177 OnClick = Codelist2DblClick 176 178 end 177 179 object N2: TMenuItem -
Cheat Engine/AdvancedOptionsUnit.pas
r306 r307 57 57 procedure Codelist2DblClick(Sender: TObject); 58 58 procedure Panel2Resize(Sender: TObject); 59 procedure Codelist2CustomDrawItem(Sender: TCustomListView; 60 Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean); 59 61 private 60 62 { Private declarations } … … 904 906 var mi: TModuleInfo; 905 907 begin 906 if code[codelist2.itemindex].modulename<>'' then 907 begin 908 symhandler.getmodulebyname(code[codelist2.itemindex].modulename,mi); 909 code[codelist2.itemindex].Address:=mi.baseaddress+code[codelist2.itemindex].offset; 910 end; 911 912 memorybrowser.disassemblerview.SelectedAddress:=code[codelist2.itemindex].Address; 913 914 if memorybrowser.Height<(memorybrowser.Panel1.Height+100) then memorybrowser.height:=memorybrowser.Panel1.Height+100; 915 memorybrowser.panel1.visible:=true; 916 memorybrowser.show; 908 if codelist2.itemindex<>-1 then 909 begin 910 if code[codelist2.itemindex].modulename<>'' then 911 begin 912 symhandler.getmodulebyname(code[codelist2.itemindex].modulename,mi); 913 code[codelist2.itemindex].Address:=mi.baseaddress+code[codelist2.itemindex].offset; 914 end; 915 916 memorybrowser.disassemblerview.SelectedAddress:=code[codelist2.itemindex].Address; 917 918 if memorybrowser.Height<(memorybrowser.Panel1.Height+100) then memorybrowser.height:=memorybrowser.Panel1.Height+100; 919 memorybrowser.panel1.visible:=true; 920 memorybrowser.show; 921 end; 917 922 end; 918 923 … … 922 927 end; 923 928 929 procedure TAdvancedOptions.Codelist2CustomDrawItem(Sender: TCustomListView; 930 Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean); 931 begin 932 if code[item.index].changed then sender.Canvas.Font.Color:=clred; 933 end; 934 924 935 end. -
Cheat Engine/CEFuncProc.pas
r305 r307 2404 2404 var sl: tstringlist; 2405 2405 i: integer; 2406 pli: PProcessListInfo; 2406 2407 begin 2407 2408 sl:=tstringlist.create; … … 2410 2411 for i:=0 to processlist.Items.count-1 do 2411 2412 if processlist.Items.Objects[i]<>nil then 2412 freemem(pointer(processlist.Items.Objects[i])); 2413 begin 2414 pli:=pointer(processlist.Items.Objects[i]); 2415 if pli.processIcon>0 then 2416 DestroyIcon(pli.processIcon); 2417 freemem(pli); 2418 end; 2413 2419 2414 2420 processlist.Items.Clear; … … 2456 2462 for i:=0 to processlist.count-1 do 2457 2463 if processlist.Objects[i]<>nil then 2458 freemem(pointer(processlist.Objects[i])); 2464 begin 2465 ProcessListInfo:= pointer( processlist.Objects[i]); 2466 if ProcessListInfo.processIcon>0 then 2467 DestroyIcon(ProcessListInfo.processIcon); 2468 freemem(ProcessListInfo); 2469 end; 2459 2470 2460 2471 processlist.clear; -
Cheat Engine/MainUnit.dfm
r306 r307 2710 2710 end 2711 2711 end 2712 object Timer4: TTimer2713 Enabled = False2714 Interval = 40002715 OnTimer = Timer4Timer2716 Left = 162717 Top = 2642718 end2719 2712 object ActionList1: TActionList 2720 2713 Images = ImageList1 -
Cheat Engine/MainUnit.pas
r306 r307 156 156 Value1: TMenuItem; 157 157 LabelModifiedmem: TLabel; 158 Timer4: TTimer;159 158 pnlFloat: TPanel; 160 159 rt3: TRadioButton; … … 387 386 procedure Value1Click(Sender: TObject); 388 387 procedure ProcessLabelDblClick(Sender: TObject); 389 procedure Timer4Timer(Sender: TObject);390 388 procedure ProcessLabelMouseDown(Sender: TObject; Button: TMouseButton; 391 389 Shift: TShiftState; X, Y: Integer); … … 10007 10005 end; 10008 10006 10009 procedure TMainForm.Timer4Timer(Sender: TObject);10010 begin10011 LabelModifiedmem.visible:=false;10012 timer4.Enabled:=false;10013 end;10014 10015 10016 10007 procedure TMainForm.ProcessLabelMouseDown(Sender: TObject; 10017 10008 Button: TMouseButton; Shift: TShiftState; X, Y: Integer); … … 10872 10863 i,j,k: integer; 10873 10864 newPID: dword; 10865 pli: PProcessListInfo; 10874 10866 begin 10875 10867 //in case there is no processwatcher this timer will be used to enumare the processlist every 2 seconds … … 10884 10876 for j:=0 to pl.Count-1 do //can't do indexof 10885 10877 begin 10886 if pos( autoattachlist.Strings[i],pl.strings[j])=10 then10878 if pos(uppercase(autoattachlist.Strings[i]),uppercase(pl.strings[j]))=10 then 10887 10879 begin 10888 10880 //the process is found … … 10899 10891 enablegui(false); 10900 10892 10893 openProcessEpilogue('',0,0); 10894 10901 10895 symhandler.reinitialize; 10902 10896 reinterpretaddresses; … … 10906 10900 end; 10907 10901 // pl.IndexOf(autoattachlist.items[i]); 10902 10903 for i:=0 to pl.count-1 do 10904 if pl.Objects[i]<>nil then 10905 begin 10906 pli:=pointer(pl.Objects[i]); 10907 if pli.processIcon>0 then 10908 DestroyIcon(pli.processIcon); 10909 freemem(pli); 10910 end; 10911 10908 10912 pl.free; 10909 10913 end; -
Cheat Engine/PointerscannerSettingsFrm.pas
r288 r307 322 322 edtAddress.Width:=cbValueType.Left+cbValueType.Width-edtAddress.Left; 323 323 cbValueType.Visible:=false; 324 editMaxLevel.Text:='5';325 324 cbStaticOnly.Checked:=true; 326 325 end … … 329 328 edtAddress.Width:=rbFindAddress.Width; 330 329 cbValueType.Visible:=true; 331 editMaxLevel.Text:='1';332 330 cbStaticOnly.Checked:=false; 333 331 end; -
Cheat Engine/Release/Cheat Engine.iss
r306 r307 247 247 248 248 [Run] 249 Filename: "{app}\Cheat Engine.exe"; Description: "Launch Cheat Engine 5. 5"; Flags: nowait postinstall skipifsilent runascurrentuser249 Filename: "{app}\Cheat Engine.exe"; Description: "Launch Cheat Engine 5.6"; Flags: nowait postinstall skipifsilent runascurrentuser -
Cheat Engine/Structuresfrm.dfm
r306 r307 70 70 OnDblClick = tvStructureViewDblClick 71 71 OnExpanding = tvStructureViewExpanding 72 OnKeyDown = tvStructureViewKeyDown73 72 OnMouseDown = tvStructureViewMouseDown 74 73 end … … 184 183 OnClick = Memorybrowsepointer1Click 185 184 end 185 object Memorybrowsethisaddress1: TMenuItem 186 Caption = 'Memory browse this address' 187 ShortCut = 32 188 OnClick = Memorybrowsethisaddress1Click 189 end 186 190 object N3: TMenuItem 187 191 Caption = '-' -
Cheat Engine/Structuresfrm.pas
r306 r307 89 89 HeaderControl1: THeaderControl; 90 90 Memorybrowsepointer1: TMenuItem; 91 Memorybrowsethisaddress1: TMenuItem; 91 92 procedure Definenewstructure1Click(Sender: TObject); 92 93 procedure Addelement1Click(Sender: TObject); … … 128 129 procedure Newwindow1Click(Sender: TObject); 129 130 procedure Memorybrowsepointer1Click(Sender: TObject); 130 procedure tvStructureViewKeyDown(Sender: TObject; var Key: Word; 131 Shift: TShiftState); 131 procedure Memorybrowsethisaddress1Click(Sender: TObject); 132 132 private 133 133 { Private declarations } … … 1169 1169 Deleteelement1.Visible:=true; 1170 1170 n2.Visible:=true; 1171 Memorybrowsethisaddress1.Visible:=true; 1171 1172 elementnr:=tvStructureView.Selected.Index; 1172 1173 … … 1178 1179 Memorybrowsepointer1.Visible:=false; 1179 1180 Addtoaddresslist1.Visible:=false; 1181 Memorybrowsethisaddress1.Visible:=false; 1180 1182 end; 1181 1183 end; … … 2186 2188 end; 2187 2189 2188 procedure TfrmStructures.tvStructureViewKeyDown(Sender: TObject; 2189 var Key: Word; Shift: TShiftState); 2190 procedure TfrmStructures.Memorybrowsethisaddress1Click(Sender: TObject); 2190 2191 var 2191 2192 i: integer; … … 2196 2197 section: integer; 2197 2198 address: dword; 2198 x: dword; 2199 begin 2200 if key=vk_space then 2201 begin 2202 if (tvStructureView.selected<>nil) then 2203 begin 2204 s:=tstructure(tvStructureView.Selected.Data); 2205 elementnr:=tvStructureView.Selected.Index; 2206 if s=nil then exit; 2207 2208 2209 if (elementnr>=0) then 2199 x: dword; 2200 begin 2201 if (tvStructureView.selected<>nil) then 2202 begin 2203 s:=tstructure(tvStructureView.Selected.Data); 2204 elementnr:=tvStructureView.Selected.Index; 2205 if s=nil then exit; 2206 2207 2208 if (elementnr>=0) then 2209 begin 2210 //find the position that is clicked 2211 GetWindowRect(tvStructureView.Handle, tvrect); 2212 2213 clickpos.X:=popupmenu1.PopupPoint.X-tvrect.Left; 2214 clickpos.Y:=popupmenu1.PopupPoint.Y-tvrect.Top; 2215 2216 section:=headercontrol1.Sections.Count-1; 2217 for i:=0 to headercontrol1.Sections.Count-1 do 2210 2218 begin 2211 //find the position that is clicked 2212 GetWindowRect(tvStructureView.Handle, tvrect); 2213 2214 clickpos.X:=popupmenu1.PopupPoint.X-tvrect.Left; 2215 clickpos.Y:=popupmenu1.PopupPoint.Y-tvrect.Top; 2216 2217 section:=headercontrol1.Sections.Count-1; 2218 for i:=0 to headercontrol1.Sections.Count-1 do 2219 if (clickpos.x>=headercontrol1.Sections[i].Left) 2220 and 2221 (clickpos.x<headercontrol1.Sections[i].Left+headercontrol1.Sections[i].width) then 2219 2222 begin 2220 if (clickpos.x>=headercontrol1.Sections[i].Left) 2221 and 2222 (clickpos.x<headercontrol1.Sections[i].Left+headercontrol1.Sections[i].width) then 2223 begin 2224 //found it 2225 section:=i; 2226 break; 2227 end; 2223 //found it 2224 section:=i; 2225 break; 2228 2226 end; 2229 2230 if section>0 then2231 section:=section-1; //count starts from 1, so decrease2232 2233 memorybrowser.memoryaddress:=s.addresses[section]+definedstructures[s.basestructure].structelement[elementnr].offset;2234 memorybrowser.RefreshMB;2235 2227 end; 2236 // definedstructures[s.basestructure].structelement[elementnr]. 2237 end; 2238 2239 end; 2240 2228 2229 if section>0 then 2230 section:=section-1; //count starts from 1, so decrease 2231 2232 memorybrowser.memoryaddress:=s.addresses[section]+definedstructures[s.basestructure].structelement[elementnr].offset; 2233 memorybrowser.RefreshMB; 2234 end; 2235 // definedstructures[s.basestructure].structelement[elementnr]. 2236 end; 2241 2237 2242 2238 -
Cheat Engine/autoassembler.pas
r305 r307 311 311 ProcessID: DWORD; 312 312 313 symhandler: TSymhandler; 313 bytes: tbytes; 314 315 symhandler: TSymhandler; 314 316 begin 315 317 if targetself then … … 330 332 331 333 334 pluginhandler.handleAutoAssemblerPlugin(@currentlinep, 0); //tell the plugins that an autoassembler script is about to get executed 335 332 336 //2 pass scanner 333 337 try … … 387 391 //plugins^^^ 388 392 389 393 if uppercase(copy(currentline,1,7))='ASSERT(' then //assert(address,aob) 394 begin 395 a:=pos('(',currentline); 396 b:=pos(',',currentline); 397 c:=pos(')',currentline); 398 if (a>0) and (b>0) and (c>0) then 399 begin 400 s1:=copy(currentline,a+1,b-a-1); 401 s2:=copy(currentline,b+1,c-b-1); 402 testdword:= symhandler.getAddressFromName(s1,false); 403 404 setlength(bytes,0); 405 ConvertStringToBytes(s2, true, bytes); 406 if length(bytes)>0 then 407 begin 408 getmem(bytebuf,length(bytes)); 409 if ReadProcessMemory(processhandle, pointer(testdword), bytebuf, length(bytes),x) then 410 begin 411 try 412 for j:=0 to length(bytes)-1 do 413 begin 414 if bytes[j]>=0 then 415 if byte(bytes[j])<>bytebuf[j] then 416 raise exception.Create('The bytes at '+s1+' are not what was expected'); 417 end; 418 finally 419 freemem(bytebuf); 420 end; 421 end else raise exception.Create('The memory at +'+s1+' can not be read'); 422 423 end 424 else raise exception.Create(s2+' is not a valid bytestring'); 425 426 427 428 setlength(assemblerlines,length(assemblerlines)-1); 429 continue; 430 end 431 else 432 raise exception.Create('Wrong syntax. ASSERT(address,bvtes)'); 433 end; 390 434 391 435 … … 470 514 setlength(assemblerlines,length(assemblerlines)-1); 471 515 continue; 472 end else raise exception.Create('Wrong syntax. CreateThread(address)'); 516 end else raise exception.Create('Wrong syntax. CreateThread(address)'); 473 517 end; 474 518 … … 1495 1539 tokens.free; 1496 1540 1541 1542 pluginhandler.handleAutoAssemblerPlugin(@currentlinep, 3); //tell the plugins to free their data 1497 1543 end; 1498 1544 end; -
Cheat Engine/cheatengine.dof
r306 r307 189 189 MinorVer=6 190 190 Release=0 191 Build=4 6191 Build=48 192 192 Debug=0 193 193 PreRelease=1 … … 200 200 CompanyName= 201 201 FileDescription=Cheat Engine 5.6 202 FileVersion=5.6.0.4 6202 FileVersion=5.6.0.48 203 203 InternalName=CheatEngine 204 204 LegalCopyright=none -
Cheat Engine/formsettingsunit.dfm
r306 r307 3 3 Top = 306 4 4 Width = 785 5 Height = 5 995 Height = 574 6 6 BorderIcons = [biSystemMenu] 7 7 Caption = 'Cheat Engine settings' … … 23 23 Top = 0 24 24 Width = 767 25 Height = 50725 Height = 482 26 26 Align = alClient 27 27 TabOrder = 0 … … 30 30 Top = 1 31 31 Width = 148 32 Height = 50532 Height = 480 33 33 Align = alLeft 34 34 HideSelection = False … … 58 58 Top = 1 59 59 Width = 617 60 Height = 50560 Height = 480 61 61 ActivePage = GeneralSettings 62 62 Align = alClient … … 286 286 end 287 287 object EditAutoAttach: TEdit 288 Left = 25 1288 Left = 255 289 289 Top = 340 290 Width = 14 9290 Width = 143 291 291 Height = 24 292 292 Hint = … … 366 366 Top = 0 367 367 Width = 609 368 Height = 4 71368 Height = 446 369 369 Align = alClient 370 370 TabOrder = 0 … … 372 372 Top = 62 373 373 Width = 383 374 Height = 409374 Height = 384 375 375 inherited Label1: TLabel 376 376 Width = 383 … … 378 378 inherited ListBox1: TListBox 379 379 Width = 383 380 Height = 3 93380 Height = 368 381 381 end 382 382 end … … 385 385 Top = 62 386 386 Width = 226 387 Height = 409387 Height = 384 388 388 DesignSize = ( 389 389 226 390 409)390 384) 391 391 inherited Label2: TLabel 392 392 Left = 7 … … 407 407 Top = 79 408 408 Width = 209 409 Height = 3 91409 Height = 366 410 410 DesignSize = ( 411 411 209 412 3 91)412 366) 413 413 inherited Label52: TLabel 414 414 Left = 14 … … 685 685 Left = 0 686 686 Top = 0 687 Width = 512687 Width = 210 688 688 Height = 16 689 689 Align = alTop … … 707 707 Left = 0 708 708 Top = 0 709 Width = 609709 Width = 592 710 710 Height = 48 711 711 Align = alTop … … 1171 1171 object Panel6: TPanel 1172 1172 Left = 0 1173 Top = 5071173 Top = 482 1174 1174 Width = 767 1175 1175 Height = 47 -
Cheat Engine/plugin/cepluginsdk.h
r304 r307 1 1 /* 2 2 cepluginsdk.h 3 Updated January 2, 2010 4 Because people thought THIS was an SDK they could use without any editing, i've decided 5 to actually make it the default SDK for C and fill in the blanks 6 7 v1.0.1 3 Updated January 9, 2010 4 5 v3.0.1 8 6 */ 9 7 #include <windows.h> 10 8 #define CESDK_VERSION 3 11 9 12 typedef enum {ptAddressList=0, ptMemoryView=1, ptOnDebugEvent=2, ptProcesswatcherEvent=3, ptFunctionPointerchange=4, ptMainMenu=5} PluginType; 10 typedef enum {ptAddressList=0, ptMemoryView=1, ptOnDebugEvent=2, ptProcesswatcherEvent=3, ptFunctionPointerchange=4, ptMainMenu=5, ptDisassemblerContext=6, ptDisassemblerRenderLine=7, ptAutoAssembler=8} PluginType; 11 typedef enum {aaInitialize=0, aaPhase1=1, aaPhase2=2, aaFinalize=3} AutoAssemblerPhase; 13 12 14 13 typedef struct _PluginVersion … … 37 36 typedef void (__stdcall *CEP_PLUGINTYPE4)(int reserved); 38 37 typedef void (__stdcall *CEP_PLUGINTYPE5)(void); 38 typedef BOOL (__stdcall *CEP_PLUGINTYPE6ONPOPUP)(ULONG selectedAddress, char **addressofname); 39 typedef BOOL (__stdcall *CEP_PLUGINTYPE6)(ULONG *selectedAddress); 40 typedef void (__stdcall *CEP_PLUGINTYPE7)(ULONG address, char **addressStringPointer, char **bytestringpointer, char **opcodestringpointer, char **specialstringpointer, ULONG *textcolor); 41 typedef void (__stdcall *CEP_PLUGINTYPE8)(char **line, AutoAssemblerPhase phase); 42 43 39 44 40 45 typedef struct _PLUGINTYPE0_INIT … … 69 74 { 70 75 char* name; //0 terminated string describing the name for the user's menu item 71 CEP_PLUGINTYPE5 callbackroutine; //pointer to a callback routine of the type 1 plugin76 CEP_PLUGINTYPE5 callbackroutine; 72 77 char* shortcut; //0 terminated string containing the shortcut in textform. CE will try it's best to parse it to a valid shortcut 73 78 } PLUGINTYPE5_INIT, MAINMENUPLUGIN_INIT, *PPLUGINTYPE5_INIT, *PMAINMENUPLUGIN_INIT; 79 80 typedef struct _PLUGINTYPE6_INIT 81 { 82 char* name; //0 terminated string describing the name for the user's menu item 83 CEP_PLUGINTYPE6ONPOPUP callbackroutineOnPopup; 84 CEP_PLUGINTYPE6 callbackroutine; 85 char* shortcut; //0 terminated string containing the shortcut in textform. CE will try it's best to parse it to a valid shortcut 86 } PLUGINTYPE6_INIT, DISASSEMBLERCONTEXT_INIT, *PPLUGINTYPE6_INIT, *PDISASSEMBLERCONTEXT_INIT; 74 87 75 88 -
Cheat Engine/plugin/cepluginsdk.pas
r304 r307 7 7 const PluginVersionSDK=3; 8 8 9 type TPluginType=(ptAddressList=0, ptMemoryView=1, ptOnDebugEvent=2, ptProcesswatcherEvent=3, ptFunctionPointerchange=4, ptMainMenu=5, ptDisassemblerContext=6, ptDisassemblerRenderLine=7); 9 type TAutoAssemblerPhase=(aaInitialize=0, aaPhase1=1, aaPhase2=2, aaFinalize=3); 10 type TPluginType=(ptAddressList=0, ptMemoryView=1, ptOnDebugEvent=2, ptProcesswatcherEvent=3, ptFunctionPointerchange=4, ptMainMenu=5, ptDisassemblerContext=6, ptDisassemblerRenderLine=7, ptAutoAssembler=8); 10 11 11 12 type TDWordArray = array[0..0] of DWord; … … 69 70 type TFunction5=TFunction1; 70 71 type TFunction7=TFunction2; 72 type TFunction8=TFunction2; 71 73 72 74 … … 79 81 type PFunction6=^TFunction6; 80 82 type PFunction7=^TFunction7; 83 type PFunction8=^TFunction8; 81 84 82 85 type Tce_showmessage=procedure (s: pchar); stdcall; … … 272 275 type TPluginFunction4=function(section: integer):boolean; stdcall; 273 276 type TPluginfunction5=procedure; stdcall; 277 type TPluginfunction6OnPoup=function(selectedAddress: dword; addressofname: pointer):bool; stdcall; 274 278 type TPluginfunction6=function(selectedAddress: pdword):bool; stdcall; 275 279 type TPluginFunction7=procedure(address: dword; addressStringPointer: pointer; bytestringpointer: pointer; opcodestringpointer: pointer; specialstringpointer: pointer; textcolor: PColor); stdcall; 280 type TPluginFunction8=procedure(line: ppchar; phase: TAutoAssemblerPhase); stdcall; 276 281 277 282 implementation
