📄 frmdirectxunit.pas
字号:
begin
if tempkeys.IncreaseZ[4]=0 then
begin
for i:=0 to 4 do
if tempkeys.IncreaseZ[i]=0 then
begin
tempkeys.IncreaseZ[i]:=key;
break;
end else
if tempkeys.IncreaseZ[i]=key then break;
end;
IncreaseZ.Text:=ConvertKeyComboToString(tempkeys.IncreaseZ);
end;
procedure TfrmDirectX.DecreaseXKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var i: integer;
begin
if tempkeys.decreaseX[4]=0 then
begin
for i:=0 to 4 do
if tempkeys.decreaseX[i]=0 then
begin
tempkeys.decreaseX[i]:=key;
break;
end else
if tempkeys.decreaseX[i]=key then break;
end;
decreaseX.Text:=ConvertKeyComboToString(tempkeys.decreasex);
end;
procedure TfrmDirectX.DecreaseYKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var i: integer;
begin
if tempkeys.decreaseY[4]=0 then
begin
for i:=0 to 4 do
if tempkeys.decreaseY[i]=0 then
begin
tempkeys.decreaseY[i]:=key;
break;
end else
if tempkeys.decreaseY[i]=key then break;
end;
decreaseY.Text:=ConvertKeyComboToString(tempkeys.decreaseY);
end;
procedure TfrmDirectX.DecreaseZKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var i: integer;
begin
if tempkeys.decreaseZ[4]=0 then
begin
for i:=0 to 4 do
if tempkeys.decreaseZ[i]=0 then
begin
tempkeys.decreaseZ[i]:=key;
break;
end else
if tempkeys.decreaseZ[i]=key then break;
end;
decreaseZ.Text:=ConvertKeyComboToString(tempkeys.decreaseZ);
end;
procedure TfrmDirectX.Button19Click(Sender: TObject);
begin
zeromemory(@tempkeys.increasex[0],10);
increasex.Text:=ConvertKeyComboToString(tempkeys.increasex); //=''
increasex.SetFocus;
end;
procedure TfrmDirectX.Button21Click(Sender: TObject);
begin
zeromemory(@tempkeys.increaseY[0],10);
increaseY.Text:=ConvertKeyComboToString(tempkeys.increaseY); //=''
increaseY.SetFocus;
end;
procedure TfrmDirectX.Button23Click(Sender: TObject);
begin
zeromemory(@tempkeys.increasez[0],10);
increasez.Text:=ConvertKeyComboToString(tempkeys.increasez); //=''
increasez.SetFocus;
end;
procedure TfrmDirectX.Button20Click(Sender: TObject);
begin
zeromemory(@tempkeys.decreasex[0],10);
decreasex.Text:=ConvertKeyComboToString(tempkeys.decreasex); //=''
decreasex.SetFocus;
end;
procedure TfrmDirectX.Button22Click(Sender: TObject);
begin
zeromemory(@tempkeys.decreaseY[0],10);
decreaseY.Text:=ConvertKeyComboToString(tempkeys.decreaseY); //=''
decreaseY.SetFocus;
end;
procedure TfrmDirectX.Button24Click(Sender: TObject);
begin
zeromemory(@tempkeys.decreasez[0],10);
decreasez.Text:=ConvertKeyComboToString(tempkeys.decreasez); //=''
decreasez.SetFocus;
end;
procedure TfrmDirectX.LoadButtonClick(Sender: TObject);
type TKeysVersion1=record
configured: boolean;
CEDir: string[255];
cewindow: thandle;
callibrationmode: boolean; //false=no textureselect hud
callibrationkey: TKeycombo;
setcallibration: boolean;
mousecallibrationhorizontal1point: single;
mousecallibrationvertical1point: single;
mousecallibrationhorizontal2point: single;
mousecallibrationvertical2point: single;
mousecallibrationhorizontal5point: single;
mousecallibrationvertical5point: single;
mousecallibrationhorizontal10point: single;
mousecallibrationvertical10point: single;
mousecallibrationhorizontal20point: single;
mousecallibrationvertical20point: single;
mousecallibrationhorizontal40point: single;
mousecallibrationvertical40point: single;
loadaimsettingsfile: tkeycombo;
saveaimsettingsfile: tkeycombo;
aimsettings1: string[255];
Aimsettings2: string[255];
Aimsettings3: string[255];
setaimsetting1: tkeycombo;
setaimsetting2: tkeycombo;
setaimsetting3: tkeycombo;
nexttexture: tkeycombo;
previoustexture: tkeycombo;
locktexture: tkeycombo;
IncreaseX: tkeycombo;
DecreaseX: TKeyCombo;
Increasey: tkeycombo;
Decreasey: TKeyCombo;
Increasez: tkeycombo;
Decreasez: TKeyCombo;
HoldAutoaimtoggle: boolean;
autoshoot: boolean;
autoaimtoggle: tKeycombo;
increaselag: tkeycombo;
decreaselag: tkeycombo;
zoomin,zoomout: TKeyCombo;
nozoom: tKeyCombo;
zoom1: tKeyCombo;
zoomlevel1: single;
zoom2: tkeycombo;
zoomlevel2: single;
zoom3: tkeycombo;
zoomlevel3: single;
zoom4: tkeycombo;
zoomlevel4: single;
zoom5: tkeycombo;
zoomlevel5: single;
zoomdelta: single;
lagdelta: integer;
setlag: boolean;
lagtoset: dword;
usefpslag: boolean;
rotateleft: tKeycombo;
rotateright: tkeycombo;
rotateup: tkeycombo;
rotatedown: tkeycombo;
moveleft: tkeycombo;
moveright: tkeycombo;
moveup: tkeycombo;
movedown: tkeycombo;
moveforward: tkeycombo;
movebackwards: tkeycombo;
movespeed: single;
rotatespeed: single;
setcameraback: tkeycombo;
zbuffer: tkeycombo;
fog: tkeycombo;
lighting: tkeycombo;
wireframe: tkeycombo;
ShowKeylist: tkeycombo;
selectedlagrecord: string[50];
lagmemorytype: byte;
getlagfrommemory: boolean;
nrofoffsets: dword;
lagaddress: dword;
offset1: dword;
offset2: dword;
offset3: dword;
offset4: dword;
offset5: dword;
offset6: dword;
offset7: dword;
offset8: dword;
offset9: dword;
offset10: dword;
offset11: dword;
offset12: dword;
offset13: dword;
offset14: dword;
offset15: dword;
pollinginterval: integer;
end;
var id: pchar;
v: integer;
var x: tfilestream;
var oldkeys: tkeysversion1;
begin
if opendialog1.execute then
begin
x:=tfilestream.Create(opendialog1.filename,fmopenread);
try
try
getmem(id,7);
try
x.ReadBuffer(id^,6);
id[6]:=#0;
if id<>'DXMESS' then
begin
//old version
x.Position:=0;
x.ReadBuffer(oldkeys,sizeof(tkeysversion1));
tempkeys.configured:=oldkeys.configured;
tempkeys.CEDir:=oldkeys.CEDir;
tempkeys.cewindow:=oldkeys.cewindow;
tempkeys.callibrationmode:=oldkeys.callibrationmode;
tempkeys.callibrationkey:=oldkeys.callibrationkey;
tempkeys.setcallibration:=oldkeys.setcallibration;
tempkeys.mousecallibrationhorizontal1point:=oldkeys.mousecallibrationhorizontal1point;
tempkeys.mousecallibrationvertical1point:=oldkeys.mousecallibrationvertical1point;
tempkeys.mousecallibrationhorizontal2point:=oldkeys.mousecallibrationhorizontal2point;
tempkeys.mousecallibrationvertical2point:=oldkeys.mousecallibrationvertical2point;
tempkeys.mousecallibrationhorizontal5point:=oldkeys.mousecallibrationhorizontal5point;
tempkeys.mousecallibrationvertical5point:=oldkeys.mousecallibrationvertical5point;
tempkeys.mousecallibrationhorizontal10point:=oldkeys.mousecallibrationhorizontal10point;
tempkeys.mousecallibrationvertical10point:=oldkeys.mousecallibrationvertical10point;
tempkeys.mousecallibrationhorizontal20point:=oldkeys.mousecallibrationhorizontal20point;
tempkeys.mousecallibrationvertical20point:=oldkeys.mousecallibrationvertical20point;
tempkeys.mousecallibrationhorizontal40point:=oldkeys.mousecallibrationhorizontal40point;
tempkeys.mousecallibrationvertical40point:=oldkeys.mousecallibrationvertical40point;
tempkeys.loadaimsettingsfile:=oldkeys.loadaimsettingsfile;
tempkeys.saveaimsettingsfile:=oldkeys.saveaimsettingsfile;
tempkeys.aimsettings1:=oldkeys.aimsettings1;
tempkeys.Aimsettings2:=oldkeys.Aimsettings2;
tempkeys.Aimsettings3:=oldkeys.Aimsettings3;
tempkeys.setaimsetting1:=oldkeys.setaimsetting1;
tempkeys.setaimsetting2:=oldkeys.setaimsetting2;
tempkeys.setaimsetting3:=oldkeys.setaimsetting3;
tempkeys.nexttexture:=oldkeys.nexttexture;
tempkeys.previoustexture:=oldkeys.previoustexture;
tempkeys.locktexture:=oldkeys.locktexture;
tempkeys.IncreaseX:=oldkeys.IncreaseX;
tempkeys.DecreaseX:=oldkeys.DecreaseX;
tempkeys.IncreaseY:=oldkeys.IncreaseY;
tempkeys.DecreaseY:=oldkeys.DecreaseY;
tempkeys.IncreaseZ:=oldkeys.IncreaseZ;
tempkeys.DecreaseZ:=oldkeys.DecreaseZ;
tempkeys.HoldAutoaimtoggle:=oldkeys.HoldAutoaimtoggle;
tempkeys.autoshoot:=oldkeys.autoshoot;
tempkeys.autoaimtoggle:=oldkeys.autoaimtoggle;
tempkeys.increaselag:=oldkeys.increaselag;
tempkeys.decreaselag:=oldkeys.decreaselag;
tempkeys.zoomin:=oldkeys.zoomin;
tempkeys.zoomout:=oldkeys.zoomout;
tempkeys.nozoom:=oldkeys.nozoom;
tempkeys.zoom1:=oldkeys.zoom1;
tempkeys.zoomlevel1:=oldkeys.zoomlevel1;
tempkeys.zoom2:=oldkeys.zoom2;
tempkeys.zoomlevel2:=oldkeys.zoomlevel2;
tempkeys.zoom3:=oldkeys.zoom3;
tempkeys.zoomlevel3:=oldkeys.zoomlevel3;
tempkeys.zoom4:=oldkeys.zoom4;
tempkeys.zoomlevel4:=oldkeys.zoomlevel4;
tempkeys.zoom5:=oldkeys.zoom5;
tempkeys.zoomlevel5:=oldkeys.zoomlevel5;
tempkeys.zoomdelta:=oldkeys.zoomdelta;
tempkeys.lagdelta:=oldkeys.lagdelta;
tempkeys.setlag:=oldkeys.setlag;
tempkeys.lagtoset:=oldkeys.lagtoset;
tempkeys.usefpslag:=oldkeys.usefpslag;
tempkeys.rotateleft:=oldkeys.rotateleft;
tempkeys.rotateright:=oldkeys.rotateright;
tempkeys.rotateup:=oldkeys.rotateup;
tempkeys.rotatedown:=oldkeys.rotatedown;
tempkeys.moveleft:=oldkeys.moveleft;
tempkeys.moveright:=oldkeys.moveright;
tempkeys.moveup:=oldkeys.moveup;
tempkeys.movedown:=oldkeys.movedown;
tempkeys.moveforward:=oldkeys.moveforward;
tempkeys.movebackwards:=oldkeys.movebackwards;
tempkeys.movespeed:=oldkeys.movespeed;
tempkeys.rotatespeed:=oldkeys.rotatespeed;
tempkeys.setcameraback:=oldkeys.setcameraback;
tempkeys.zbuffer:=oldkeys.zbuffer;
tempkeys.fog:=oldkeys.fog;
tempkeys.lighting:=oldkeys.lighting;
tempkeys.wireframe:=oldkeys.wireframe;
tempkeys.ShowKeylist:=oldkeys.ShowKeylist;
tempkeys.SaveAlltextures[0]:=0;
tempkeys.selectedlagrecord:=oldkeys.selectedlagrecord;
tempkeys.lagmemorytype:=oldkeys.lagmemorytype;
tempkeys.getlagfrommemory:=oldkeys.getlagfrommemory;
tempkeys.nrofoffsets:=oldkeys.nrofoffsets;
tempkeys.lagaddress:=oldkeys.lagaddress;
tempkeys.offset1:=oldkeys.offset1;
tempkeys.offset2:=oldkeys.offset2;
tempkeys.offset3:=oldkeys.offset3;
tempkeys.offset4:=oldkeys.offset4;
tempkeys.offset5:=oldkeys.offset5;
tempkeys.offset6:=oldkeys.offset6;
tempkeys.offset7:=oldkeys.offset7;
tempkeys.offset8:=oldkeys.offset8;
tempkeys.offset9:=oldkeys.offset9;
tempkeys.offset10:=oldkeys.offset10;
tempkeys.offset11:=oldkeys.offset11;
tempkeys.offset12:=oldkeys.offset12;
tempkeys.offset13:=oldkeys.offset13;
tempkeys.offset14:=oldkeys.offset14;
tempkeys.offset15:=oldkeys.offset15;
tempkeys.pollinginterval:=oldkeys.pollinginterval;
end
else
begin
x.ReadBuffer(v,4);
if v>dxmessversion then raise exception.Create('This key configuration is not compattible with this version of cheat engine');
x.ReadBuffer(tempkeys,sizeof(tkeys));
end;
finally
freemem(id);
end;
tempkeys.CEDir:=CheatEngineDir;
tempkeys.cewindow:=handle;
//and now convert what si in the tkeys to actual strings
loadaimsettingsfile.text:=ConvertKeyComboToString(tempkeys.loadaimsettingsfile);
saveaimsettingsfile.text:=ConvertKeyComboToString(tempkeys.saveaimsettingsfile);
setaimsetting1.text:=ConvertKeyComboToString(tempkeys.setaimsetting1);
setaimsetting2.text:=ConvertKeyComboToString(tempkeys.setaimsetting2);
setaimsetting3.text:=ConvertKeyComboToString(tempkeys.setaimsetting3);
nexttexture.text:=ConvertKeyComboToString(tempkeys.nexttexture);
previoustexture.Text:=ConvertKeyComboToString(tempkeys.previoustexture);
locktexture.Text:=ConvertKeyComboToString(tempkeys.locktexture);
increasex.Text:=ConvertKeyComboToString(tempkeys.IncreaseX);
increasey.Text:=ConvertKeyComboToString(tempkeys.increaseY);
increasez.Text:=ConvertKeyComboToString(tempkeys.increaseZ);
decreasex.Text:=ConvertKeyComboToString(tempkeys.decreaseX);
decreasey.Text:=ConvertKeyComboToString(tempkeys.decreaseY);
decreasez.Text:=ConvertKeyComboToString(tempkeys.decreaseZ);
autoaimtoggle.Text:=ConvertKeyComboToString(tempkeys.autoaimtoggle);
increaselag.Text:=ConvertKeyComboToString(tempkeys.increaselag);
decreaselag.Text:=ConvertKeyComboToString(tempkeys.decreaselag);
zoomin.Text:=ConvertKeyComboToString(tempkeys.zoomin);
zoomout.Text:=ConvertKeyComboToString(tempkeys.zoomout);
nozoom.Text:=ConvertKeyComboToString(tempkeys.nozoom);
zoom1.Text:=ConvertKeyComboToString(tempkeys.zoom1);
zoom2.Text:=ConvertKeyComboToString(tempkeys.zoom2);
zoom3.Text:=ConvertKeyComboToString(tempkeys.zoom3);
zoom4.Text:=ConvertKeyComboToString(tempkeys.zoom4);
zoom5.Text:=ConvertKeyComboToString(tempkeys.zoom5);
zbuffer.text:=ConvertKeyComboToString(tempkeys.zbuffer);
fog.text:=ConvertKeyComboToString(tempkeys.fog);
lighting.text:=ConvertKeyComboToString(tempkeys.lighting);
wireframe.Text:=ConvertKeycomboToString(tempkeys.wireframe);
showkeylist.Text:=ConvertKeyComboToString(tempkeys.ShowKeylist);
savealltextures.Text:=convertkeycombotostring(tempkeys.SaveAlltextures);
callibrationkey.Text:=ConvertKeyComboToString(tempkeys.callibrationkey);
checkbox2.Checked:=tempkeys.callibrationmode;
zoomlevel1.text:=floattostr(tempkeys.zoomlevel1);
zoomlevel2.Text:=floattostr(tempkeys.zoomlevel2);
zoomlevel3.Text:=floattostr(tempkeys.zoomlevel3);
zoomlevel4.Text:=floattostr(tempkeys.zoomlevel4);
zoomlevel5.Text:=floattostr(tempkeys.zoomlevel5);
zoomdelta.Text:=floattostr(tempkeys.zoomdelta);
lagdelta.Text:=IntToStr(tempkeys.lagdelta);
lag.Text:=inttostr(tempkeys.lagtoset);
editkeypolling.Text:=IntToStr(tempkeys.pollinginterval);
aimfile1.Text:=tempkeys.aimsettings1;
aimfile2.Text:=tempkeys.aimsettings2;
aimfile3.Text:=tempkeys.aimsettings3;
mousecallibrationhorizontal1point.text:=format('%.2f',[tempkeys.mousecallibrationhorizontal1point]);
mousecallibrationhorizontal2point.text:=format('%.2f',[tempkeys.mousecallibrationhorizontal2point]);
mousecallibrationhorizontal5point.text:=format('%.2f',[tempkeys.mousecallibrationhorizontal5point]);
mousecallibrationhorizontal10point.text:=format('%.2f',[tempkeys.mousecallibrationhorizontal10point]);
mousecallibrationhorizontal20point.text:=format('%.2f',[tempkeys.mousecallibrationhorizontal20point]);
mousecallibrationhorizontal40point.text:=format('%.2f',[tempkeys.mousecallibrationhorizontal40point]);
mousecallibrationvertical1point.text:=format('%.2f',[tempkeys.mousecallibrationvertical1point]);
mousecallibrationvertical2point.text:=format('%.2f',[tempkeys.mousecallibrationvertical2point]);
mousecallibrationvertical5point.text:=format('%.2f',[tempkeys.mousecallibrationvertical5point]);
mousecallibrationvertical10point.text:=format('%.2f',[tempkeys.mousecallibrationvertical10point]);
mousecallibrationvertical20point.text:=format('%.2f',[tempkeys.mousecallibrationvertical20point]);
mousecallibrationvertical40point.text:=format('%.2f',[tempkeys.mousecallibrationvertical40point]);
rbkeepdown.checked:=tempkeys.HoldAutoaimtoggle;
autoshoot.checked:=tempkeys.autoshoot;
getlagfrommemory.Checked:=tempkeys.getlagfrommemory;
addresslabel.Caption:=tempkeys.selectedlagrecord;
usefpslag.Checked:=tempkeys.usefpslag;
finally
x.free;
end;
except
raise exception.Create('Error while loading! (and I''m not going to tell you why!)');
end;
end;
end;
procedure TfrmDirectX.SaveButtonClick(Sender: TObject);
var x: tfilestream;
y: integer;
z: string;
begin
applytempkeys;
if savedialog1.execute then
begin
x:=tfilestream.Create(savedialog1.filename,fmcreate);
try
try
applytempkeys;
y:=dxmessversion;
z:='DXMESS';
x.writebuffer(z[1],6);
x.writebuffer(y,4);
x.WriteBuffer(tempkeys,sizeof(TKeys));
finally
x.free;
end;
except
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -