AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Andorra - Imagelist.Add -> SIGSEGV
Thema durchsuchen
Ansicht
Themen-Optionen

Andorra - Imagelist.Add -> SIGSEGV

Ein Thema von Noobmaster · begonnen am 25. Jun 2011 · letzter Beitrag vom 28. Jun 2011
 
Noobmaster

Registriert seit: 18. Jul 2010
114 Beiträge
 
FreePascal / Lazarus
 
#1

Andorra - Imagelist.Add -> SIGSEGV

  Alt 25. Jun 2011, 19:18
Hallo!

Folgender Quellcode erzeugt eine SIGSEGV Fehlermeldung
Delphi-Quellcode:
//-----FillImagelist
//-----fills in the imagelist with alle the necessary images/textures
procedure TMainForm.FillImagelist(path: String);
begin
   { Tables }
   if ImageList <> nil then
   begin
      with Imagelist.Add('Table_Blue') do
      begin
         Texture.LoadGraphicFromFile(path+'/Tische/blau.bmp');
      end;
      with Imagelist.Add('Table_Red') do
      begin
         Texture.LoadGraphicFromFile(path+'/Tische/rot.bmp');
      end;
      with Imagelist.Add('Table_Green') do
      begin
         Texture.LoadGraphicFromFile(path+'/Tische/gruen.bmp');
      end;
      ImageList.Restore; //very important line!
   end;
end;
Anschließend springt der Compiler in folgende Prozedur der Unit "AdDraws":
Delphi-Quellcode:
procedure TAdCustomImage.Initialize;
begin
  //Finalize the image, if it is still initialized
  Finalize;

  //Create a new mesh
  AdMesh := FParent.AdAppl.CreateMesh;
end;
Ein Eine Instanz des Typs "TAdDraw" ist erstellt und der Imagelist zugewiesen:
Delphi-Quellcode:
procedure TMainForm.FormCreate(Sender: TObject);
begin
   //Surface:
   Surface := TAdDraw.Create(MainForm); //creates the Surface
   Surface.DllName := 'AndorraOGLLaz.dll'; //Loads the Dll-library; based on OpenGL

   //SpriteEngine:
   SpriteEngine := TSpriteEngine.Create(nil);
   SpriteEngine.Surface := Surface;

   //Connect the main-loop of the application with the andorra-loop
   Application.OnIdle := @Idle;

   //Create ImageList and fill in the images:
   ImageList := TAdImageList.Create(Surface);
   FillImagelist('Data/Bilder');

   NewGame();
end;
Danke schonmal für die Hilfe...
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:06 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz