procedure TForm2.FormCreate(Sender: TObject);
var i: Integer;
begin
ReportMemoryLeaksOnShutdown := true;
AdPerCounter2 := TAdPerformanceCounter.Create;
AdDraw2 := TAdDraw.Create(self);
AdDraw2.DllName := '
AndorraDX93D.dll';
if AdDraw2.Initialize
then
begin
Application.OnIdle := Idle;
Form1.AdImageList.Restore;
//Erzeugen des Partikelsystems
partsys := TAdParticleSystem.Create(AdDraw2);
//Zuweisen des Bildes
partsys.Texture := Form1.AdImageList.Items[0].Texture;
AdGUI2 := TAdGUI.Create(AdDraw2);
//Erzeugen der Klasse
AdGUI2.Skin.LoadFromFile('
Bilder/sunna.axs');
//Laden des Skins
AdGUI2.Cursors.LoadFromFile('
Bilder/cursors.xml');
//Laden der Cursor
AdGUI2.LoadFromFile('
Bilder/gui2.axg');
//Laden der GUI
AdConnector2 := TAdGUIConnector.Create(AdGUI2);
//Erzeugen des GUI Connectors
AdConnector2.ConnectEventHandlers(AdDraw2.Window);
//Verknüfen mit dem Elternfenstersystem
//SpriteEngine erzeugen
AdSpriteEngine2 := TSpriteEngine.Create(
nil);
AdSpriteEngine2.Surface := AdDraw2;
with AdDraw2.Display
do
begin
Width := 800;
Height := 600;
BitDepth := ad32Bit;
//Die Farbtiefe. Hierbei sind die Werte "ad16Bit" und "ad32Bit" erlaubt.
DisplayMode := dmFullscreen;
end;
end
else
begin
ShowMessage('
Error while initializing Andorra 2D. Try to use another display '+
'
mode or another video adapter.');
Close;
end;
HintWindowClass := TGraphicHintWindow;
Application.ShowHint := False;
Application.ShowHint := True;
end;