I've got two questions about it.
First question. Is there a Windows alternative to Terminal?
Second question. The program does not seem to recognise procecdure LoadGame. Is there some way around that?
Thanks in advance.
function CreateSprite(image: Bitmap; framesPerCell, frames, width, height: Integer): Sprite;
procedure MainGame();
var
game : GameData;
begin
repeat
ProcessEvents();
RefreshScreen();
until WindowCloseRequested();
procedure LoadGame(var game: GameData);
const
PLAYEROFFSET = 150;
begin
//Create the player ship
game.player.theSprite := CreateSprite(GameImage('Ship'), 2, 2, 40, 43);
game.player.theSprite.xPos := Round(ScreenWidth / 2 - game.player.theSprite.width / 2);
game.player.theSprite.yPos := ScreenHeight - PLAYEROFFSET;
game.player.speed := 4;
end;
end;
procedure Main();
const
SCREENWIDTH = 480;
SCREENHEIGHT = 600;
begin
OpenGraphicsWindow('EmptyYourMind1.1', SCREENWIDTH, SCREENHEIGHT);
LoadResources();
MainGame();
FreeResources();
end;
end.
procedure LoadGame(var game: GameData);
const
PLAYEROFFSET = 150;
begin
//Create the player ship
game.player.theSprite := CreateSprite(GameImage('Ship'), 2, 2, 40, 43);
game.player.theSprite.xPos := Round(ScreenWidth / 2 - game.player.theSprite.width / 2);
game.player.theSprite.yPos := ScreenHeight - PLAYEROFFSET;
game.player.speed := 4;
end;
procedure MainGame();
var
game : GameData;
begin
LoadGame(game);
repeat
ProcessEvents();
RefreshScreen();
until WindowCloseRequested();
end;
procedure Main();
const
SCREENWIDTH = 480;
SCREENHEIGHT = 600;
begin
OpenGraphicsWindow('EmptyYourMind1.1', SCREENWIDTH, SCREENHEIGHT);
LoadResources();
MainGame();
FreeResources();
end;
begin
Main();
end.
GameLogic.exe (41,84)Error: Incompatible types: got "Int64" expected "^Single"
GameLogic.exe (42,46)Error: Incompatible types: got "LongInt" expected "^Single"
Users browsing this forum: No registered users and 1 guest