Skip to content

Commit

Permalink
fix some really old code no one ever checked and go backwards
Browse files Browse the repository at this point in the history
  • Loading branch information
cheat-engine committed Dec 18, 2016
1 parent 53659bd commit b4ef45b
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 16 deletions.
42 changes: 30 additions & 12 deletions Cheat Engine/MainUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -7480,15 +7480,28 @@ procedure TMainForm.rbDecClick(Sender: TObject);
end;

procedure TMainForm.Cut2Click(Sender: TObject);
var e: TEdit;
begin
if scanvalue.SelLength > 0 then
scanvalue.CutToClipboard;
e:=nil;
if scanvalue.Focused then e:=scanvalue;
if (scanvalue2<>nil) and scanvalue2.Focused then e:=scanvalue2;
if e=nil then exit;

if e.SelLength > 0 then
e.CutToClipboard;
end;

procedure TMainForm.Copy2Click(Sender: TObject);
var e: tedit;
begin
if scanvalue.SelLength > 0 then
scanvalue.CopyToClipboard;
e:=nil;
if scanvalue.Focused then e:=scanvalue;
if (scanvalue2<>nil) and scanvalue2.Focused then e:=scanvalue2;

if e=nil then exit;

if e.SelLength > 0 then
e.CopyToClipboard;
end;

procedure TMainForm.Paste2Click(Sender: TObject);
Expand All @@ -7497,18 +7510,23 @@ procedure TMainForm.Paste2Click(Sender: TObject);
Text: string;
i: integer;
allow: boolean;
e: tedit;
begin
cb := tclipboard.Create;
if cb.HasFormat(CF_TEXT) then
begin
if scanvalue.Focused then
scanvalue.PasteFromClipboard;
try
if cb.HasFormat(CF_TEXT) then
begin
e:=nil;
if scanvalue.Focused then e:=scanvalue;
if (scanvalue2<>nil) and scanvalue2.Focused then e:=scanvalue2;

if (scanvalue2 <> nil) and (scanvalue2.Focused) then
scanvalue2.PasteFromClipboard;
end;
if e=nil then exit;

cb.Free;
e.PasteFromClipboard;
end;
finally
cb.Free;
end;
end;

procedure TMainForm.checkpaste;
Expand Down
4 changes: 2 additions & 2 deletions Cheat Engine/addresslist.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1925,7 +1925,7 @@ procedure TAddresslist.AdvancedCustomDrawItem(Sender: TCustomTreeView; Node: TTr
t:=memrec.AsyncProcessingTime mod 1000; //every time t=0 the line should be up (value 0)
t:=trunc(t*0.36); //every second is a full rotation

x:=cx+cos(pi*(270+t mod 360)/180)*r;
x:=cx+cos(pi*(270+t mod 360)/180)*r*ifthen(memrec.Active,-1,1);
y:=cy+sin(pi*(270+t mod 360)/180)*r;

sender.Canvas.Line(cx,cy,trunc(x),trunc(y));
Expand All @@ -1939,7 +1939,7 @@ procedure TAddresslist.AdvancedCustomDrawItem(Sender: TCustomTreeView; Node: TTr
t:=(memrec.AsyncProcessingTime div 1000) mod 60; //every 60 seconds (t=0) the second handle should be up
t:=t*6;

x:=cx+cos(pi*(270+t mod 360)/180)*r;
x:=cx+cos(pi*(270+t mod 360)/180)*r*ifthen(memrec.Active,-1,1);
y:=cy+sin(pi*(270+t mod 360)/180)*r;

sender.Canvas.Line(cx,cy,trunc(x),trunc(y));
Expand Down
10 changes: 8 additions & 2 deletions Cheat Engine/docs/todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process/system info: resizing is shitty

kernel: Add an noexception method that will stop all exceptions
kernel: When using the processwatcher obtain handles for them on creation (use circular buffer and keep track which ones ce has opened)
ceshare: continue with it


lua: Add the openFile equivalent for openProcess to lua

Expand All @@ -16,4 +16,10 @@ memscan: Add a wincp scan option to text scans

symbol condig window: tab 0 isn't on the symbolname

lua:autoassembler: Make autoAssembler return the alloclist which can then be passed to disable scripts
lua:autoassembler: Make autoAssembler return the alloclist which can then be passed to disable scripts

linux: make a 32-bit linux build with .so injection support

replace: selection only

ceshare: continue with it

0 comments on commit b4ef45b

Please sign in to comment.