1 Star 0 Fork 0

JonK/cheat-engine

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
aboutunit.pas 7.96 KB
一键复制 编辑 原始数据 按行查看 历史
Dark Byte 提交于 2023-08-25 14:48 +08:00 . committing bunch of fixes
unit aboutunit;
{$MODE Delphi}
interface
uses
{$ifdef darwin}
macport,
{$endif}
{$ifdef windows}
windows,shellapi,
{$endif}LCLIntf, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, LResources, vmxfunctions, NewKernelHandler, betterControls;
type
{ TAbout }
TAbout = class(TForm)
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Label25: TLabel;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Label3: TLabel;
Label30: TLabel;
Label31: TLabel;
Label32: TLabel;
Label33: TLabel;
Label34: TLabel;
Label5: TLabel;
Image1: TImage;
Button1: TButton;
Label6: TLabel;
Label8: TLabel;
Label9: TLabel;
Panel1: TPanel;
Panel2: TPanel;
Button2: TButton;
Label10: TLabel;
lblDBVM: TLabel;
Panel3: TPanel;
Panel4: TPanel;
procedure Button1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure Label4Click(Sender: TObject);
procedure Label8Click(Sender: TObject);
procedure Label9Click(Sender: TObject);
procedure Image1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure lblDBVMClick(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
procedure UpdateDBVMStatus;
end;
var
About: TAbout;
implementation
uses tlgUnit,MainUnit2, MainUnit, dbvmLoadManual;
resourcestring
rsYourSystemDOESNOTSupportDBVM = 'Your system does not support DBVM. Perhaps it is already inside a VM';
rsThisMeansThatYouWillNeedANewCpuIntelToBeAbleToUseT = 'This means that you will need a new cpu (intel) to be able to use the advanced dbvm options';
rsYourSystemIsRunningDBVMVersion = 'Your system is running DBVM version %s (%.0n bytes free (%d pages))';
rsThisMeansThatYourSystemIsRunningDbvm = 'This means that your system is running dbvm. This means ce will make use of some advanced tools that are otherwise unavailable';
rsYourSystemSupportsDBVM = 'Your system supports DBVM';
rsThisMeansThatYouReCurrentlyNotRunningDbvm = 'This means that you''re currently not running dbvm, but that your system is capable of running it';
rsDidYouReallyThinkYouDFindAnEasterEggByDoingThisWel = 'Did you really think you''d find an easter egg by doing this? Well, you know what? You where right!';
rsAreYouSureYouWantToLaunchDBVM = 'Are you sure you want to launch DBVM? You seem to be running in 32-bit, so don''t really need it that badly (Except for ultimap and cloaked operations)';
rsLaunchdbvmWasNotAssigned = 'launchdbvm was not assigned';
procedure TAbout.Button1Click(Sender: TObject);
begin
Close;
end;
procedure TAbout.FormClose(Sender: TObject; var Action: TCloseAction);
begin
About:=nil;
action:=caFree;
end;
procedure TAbout.Button2Click(Sender: TObject);
begin
end;
procedure TAbout.FormCreate(Sender: TObject);
begin
if ShouldAppsUseDarkMode then
begin
label8.font.color:=clTeal;
label9.font.color:=clTeal;
end;
end;
procedure TAbout.FormShow(Sender: TObject);
var
a,b,c,d: dword;
i: integer;
rs: TResourceStream;
logopic: tpicture;
begin
groupbox1.Caption:=cenamewithversion;
i:=GetFontData(font.Handle).Height;
Label8.Font.Height:=i;
Label9.Font.Height:=i;
if panel4.top<label1.top+label1.height then
begin
panel4.AnchorSideTop.control:=label1;
panel4.AnchorSideTop.side:=asrBottom;
end;
if panel4.top+panel4.height>image1.Top+image1.height then
label10.AnchorSideTop.Control:=panel4;
UpdateDBVMStatus;
{$ifdef altname}
rs := TResourceStream.Create(HInstance, 'IMAGES_ALT_CELOGO', RT_RCDATA);
logopic:=TPicture.Create;
logopic.LoadFromStreamWithFileExt(rs,'.PNG');
image1.Picture:=logopic;
image1.Stretch:=true;
logopic.free;
freeandnil(rs);
{$endif}
end;
procedure TAbout.Label4Click(Sender: TObject);
begin
shellexecute(0,'open',pchar('https://www.patreon.com/cheatengine'),nil,nil,sw_maximize);
end;
procedure TAbout.Label8Click(Sender: TObject);
begin
ShellExecute(0, pchar('open'),pchar('https://cheatengine.org/'), pchar(''),pchar(''), SW_MAXIMIZE );
end;
procedure TAbout.Label9Click(Sender: TObject);
begin
ShellExecute(0, pchar('open'),pchar('http://forum.cheatengine.org/'), pchar(''),pchar(''), SW_MAXIMIZE );
end;
procedure TAbout.Image1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if (ssCtrl in Shift) and (ssAlt in Shift) and (ssShift in Shift) then
begin
ShowMessage(rsDidYouReallyThinkYouDFindAnEasterEggByDoingThisWel);
with TTlg.create(self) do show;
end;
end;
procedure TAbout.lblDBVMClick(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
{$ifdef windows}
//if not isRunningDBVM then
begin
//if not isDBVMCapable then exit;
if button=mbLeft then
begin
if not Is64bitOS then
begin
if messagedlg(rsAreYouSureYouWantToLaunchDBVM, mtWarning, [mbno, mbyes], 0)=mryes then
begin
loaddbk32;
if assigned(launchdbvm) then
launchdbvm(-1)
else
raise exception.create(rsLaunchdbvmWasNotAssigned);
formshow(self);
end;
end
else
begin
if loaddbvmifneeded then
begin
formshow(self);
end;
end;
end
else
if frmDBVMLoadManual<>nil then
frmDBVMLoadManual.SetFocus
else
tfrmDBVMLoadManual.create(Application).Show;
end;
{$endif}
end;
procedure TAbout.UpdateDBVMStatus;
var
supportsdbvm: boolean;
pages: QWORD;
memfree: qword;
dmemfree: double;
vers: DWORD;
oldvmx_password1: QWORD;
oldvmx_password2: DWORD;
oldvmx_password3: QWORD;
begin
{$ifdef windows}
oldvmx_password1:=vmx_password1;
oldvmx_password2:=vmx_password2;
oldvmx_password3:=vmx_password3;
OutputDebugString('UpdateDBVMStatus');
if (vmx_password1=0) and (vmx_password2=0) and (vmx_password3=0) then
begin
OutputDebugString('vmx_password1=0');
OutputDebugString('vmx_password2=0');
OutputDebugString('vmx_password3=0');
vmx_password1:=$76543210;
vmx_password2:=$fedcba98;
vmx_password3:=$90909090;
end;
if dbvm_version=0 then
begin
vmx_password1:=$76543210;
vmx_password2:=$fedcba98;
vmx_password3:=$90909090;
end;
if (dbvm_version>0) then
begin
lblDBVM.Font.Color:=clLime;
memfree:=dbvm_getMemory(pages);
dmemfree:=memfree;
lbldbvm.caption:=Format(rsYourSystemIsRunningDBVMVersion, [inttostr(dbvm_version and $00ffffff), dmemfree, pages]);
lbldbvm.Hint:=rsThisMeansThatYourSystemIsRunningDbvm;
lbldbvm.ShowHint:=true;
lbldbvm.Cursor:=crDefault;
end
else
begin
supportsdbvm:=isDBVMCapable;
if supportsdbvm then
begin
lblDBVM.Font.Color:=clGreen;
lbldbvm.caption:=rsYourSystemSupportsDBVM;
lbldbvm.Hint:=rsThisMeansThatYouReCurrentlyNotRunningDbvm;
lbldbvm.ShowHint:=true;
lbldbvm.Cursor:=crHandPoint;
end
else
begin
lblDBVM.Font.Color:=clRed;
lbldbvm.caption:=rsYourSystemDOESNOTSupportDBVM;
lbldbvm.Hint:=rsThisMeansThatYouWillNeedANewCpuIntelToBeAbleToUseT;
lbldbvm.ShowHint:=true;
lbldbvm.Cursor:=crNo;
end;
end;
vmx_password1:=oldvmx_password1;
vmx_password2:=oldvmx_password2;
vmx_password3:=oldvmx_password3;
{$else}
lblDBVM.visible:=false;
{$endif}
end;
initialization
{$i aboutunit.lrs}
end.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/JonDO/cheat-engine.git
git@gitee.com:JonDO/cheat-engine.git
JonDO
cheat-engine
cheat-engine
master

搜索帮助