Thanks guys, I got it to work the way I wanted to :-)
Here's the code for a 1024*768 bitmap to be displayed when the app starts if anyone else needs it
Code:
procedure TForm1.Splash;
begin
DXSpriteEngine1.Engine.Moved := False;
with TSplash.Create(DXSpriteEngine1.Engine) do
begin
Image:= Form1.DXImageList1.Items.Find('Splash');
Width:= Image.Width;
Height:= Image.Height;
X:= (Form1.DXDraw1.Width-Width) div 2;
Y:= ((Form1.DXDraw1.Height-Height) div 2) + (Height -780);
Z:= 5;
end;
end;
procedure TSplash.DoMove(MoveCount: Integer);
begin
inherited DoMove(MoveCount);
if Form1.Start_Intro then
begin
Y:= Y+100;
if Y > Form1.DXDraw1.Height+Height+10 then
begin
Dead;
end;
end;
end;
I called DXSpriteEngine1.Engine.Moved := False in the splash procedure to 'pause' the game while the bitmap is displayed and TRUE in the eventhandler of the return key to play the game.
Bookmarks