📄 unit3.pas
字号:
unit Unit3;
//////////////////////////////////////////////////////////////////////
//
// Delphi sample for creating Engine Plug-in using the A6_5x Engine done by
// Michal Messerschmidt aka LazyDog of Lazy Dog Software
// (www.LazyDogSoftware.com)
//
// SDK Version 6.50.6
//
// tested on Delphi 5,6,7 & 2005
//////////////////////////////////////////////////////////////////////
interface
uses A6DLL; // needed to reference VAR_ declaration below
function SetTextMode : VAR_; cdecl; exports SetTextMode;
function ShowMainMessage : VAR_; cdecl; exports ShowMainMessage;
implementation
var I : Integer;
B,G,R : Var_;
function SetTextMode : VAR_;
begin
Result := 0;
draw_textmode('Times',_VAR(3),_VAR(20),_VAR(100));
end;
function ShowMainMessage : VAR_;
begin
Result := 0;
// change the color displayed each time through
case I of
1 : begin
Inc(B,_VAR(0.5));
if _INT(B) > 254 then
begin
B := _VAR(0);
G := _VAR(100);
Inc(I);
end;
end;
2 : begin
Inc(G,_VAR(0.5));
if _INT(G) > 254 then
begin
G := _VAR(0);
R := _VAR(100);
Inc(I);
end;
end;
3 : begin
Inc(R,_VAR(0.5));
if _INT(R) > 254 then
begin
R := _VAR(0);
B := _VAR(100);
I := 1;
end;
end;
end;
draw_text('You are running the engine!',_VAR(300),_VAR(150),vector(_VAR(100),_VAR(100),_VAR(100)));
draw_text('Hit ESC to quit the program',_VAR(300),_VAR(200),vector(B,G,R));
end;
INITIALIZATION
B := _VAR(100); // set blue color level
G := _VAR(0); // set green color level
R := _VAR(0); // set red color level
I := 1;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -