Originally Posted by
WILL
Jicro has taken over UnDelphiX in all it's unofficial glory.
It's the most current version and is considered to be the 'as official as we're gonna get' version of the old DelphiX.
Strange... I could not get the DRAW to work correctly with his units... Perhaps you can help me?
Code:
procedure TDrawEngine.ApplyDraw(Sender: TObject; LagCount: Integer);
var
nAux: Integer;
begin
// Pinta o fundo
Surface.Fill(clBlack);
// Requisita pintura das layers
for nAux := 0 to High( FLayers ) do
begin
// Se a layer estiver vis??vel
if FLayers[ nAux ].Visible then
begin
// Requisita pintra
FLayers[ nAux ].RequestDraw;
// Desenha a layer
Surface.Draw( 0, 0, Surface.ClientRect, FLayers[ nAux ].Surface, False );
end;
end;
// Se tem que desenhar a grid, desenha
if FShowGrid then
DrawTheGrid;
// Se tem que desenhar os numeros, desenha
if FShowNumbers then
DrawTheNumbers;
// Desenha um ret?¢ngulo onde o mouse est?°, dependendo do tipo
case UsingTool of
utColision: DrawMouseSquare( clRed );
utTerrain : DrawMouseSquare( clYellow );
end;
// Desenha os Frames Por Segundo
DrawFPS;
// Applica as altera?ß?µes
Surface.Canvas.Release;
Flip;
end;
this line: Surface.Draw is not working. Or it's working, but the layer surface does not get's to the main surface
Bookmarks