Einzelnen Beitrag anzeigen

Benutzerbild von pustekuchen
pustekuchen

Registriert seit: 27. Aug 2010
265 Beiträge
 
Delphi 11 Alexandria
 
#10

AW: [Andorra]dmFullscreen\dmWindowed dem Display Objekt zuweisen

  Alt 14. Okt 2010, 15:19
Danke DeddyH

Wer das selbe Problem hat hier sind die zu ersetzenden Codezeilen

TAdDisplay = record ... wird zu

Delphi-Quellcode:
  TAdDisplay = class
    private
      FWidth: Integer;
      FHeight: integer;
      FBitDepth: TAdBitDepth;
      FFreq: integer;
      FDisplayMode: TAdWindowDisplayMode;
    public
      {The width of the video surface.}
      property Width: Integer read FWidth write FWidth;
      {The hieght of the video surface.}
      property Height: Integer read FHeight write FHeight;
      {The bit depth the video surface should be created with. This property only
       affects the fullscreen mode.}

      property BitDepth: TAdBitDepth read FBitDepth write FBitDepth;
      {The horizontal display refresh frequncy. This property only affects the
       fullscreen mode.}

      property Freq:integer read FFreq write FFreq;
      {The mode the display is created in.
       @seealso(TAdDisplayMode)}

      property DisplayMode:TAdWindowDisplayMode read FDisplayMode write FDisplayMode;
  end;
Delphi-Quellcode:
procedure TAdDraw.SetupDisplay;
begin
   [...]
end;
wird zu
Delphi-Quellcode:
procedure TAdDraw.SetupDisplay;
begin
  //Set default display settings
  FDisplay := TAdDisplay.Create;
  FDisplay.Width := 800;
  FDisplay.Height := 600;
  FDisplay.BitDepth := ad32Bit;
  FDisplay.Freq := 0;
  FDisplay.DisplayMode := dmDefault;

  //Set default options
  Options := [aoTextures, aoBlending, aoCulling];
end;
Delphi-Quellcode:
destructor TAdDraw.Destroy
begin
   ...
end
wird zu

Delphi-Quellcode:
destructor TAdDraw.Destroy;
begin
  //Destroy the window object
  if FWnd <> nil then
    FreeAndNil(FWnd);

  //Free all loaded objects
  if AdAppl <> nil then
    Finalize;

  FProperties.Free;
  FSurfaceEventList.Free;
  FDllLoader.Free;
  FLog.Free;
  FDisplay.Free;
    inherited Destroy;
end;
  Mit Zitat antworten Zitat