2007-11-01 13:36:59 +01:00
|
|
|
program LodeRunnerLive;
|
|
|
|
|
|
|
|
{$apptype gui}
|
|
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
LRLRoutines,
|
|
|
|
LRLSprites,
|
|
|
|
LRLLevels,
|
|
|
|
LRLMainMenu,
|
2008-02-29 18:36:25 +01:00
|
|
|
LRLHighScores,
|
2008-03-24 00:44:28 +01:00
|
|
|
LRLEditor,
|
2007-11-01 13:36:59 +01:00
|
|
|
LRLIntroduction;
|
|
|
|
|
|
|
|
const
|
2008-03-24 00:44:28 +01:00
|
|
|
Version: PChar = 'Lode Runner LIVE. Version 1.5';
|
2007-11-01 13:36:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
procedure LRLInitialize;
|
|
|
|
begin
|
|
|
|
ImagesInitialize;
|
2008-02-29 18:36:25 +01:00
|
|
|
KeyboardInitialize;
|
2008-03-24 00:44:28 +01:00
|
|
|
MouseInitialize;
|
2008-02-29 18:36:25 +01:00
|
|
|
ScreenMode(1);
|
|
|
|
ScreenTitle := Version;
|
2007-11-01 13:36:59 +01:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure LRLDeinitialize;
|
|
|
|
begin
|
|
|
|
ImagesDeinitialize;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure LRLGameStart;
|
|
|
|
var
|
|
|
|
cl: Integer;
|
|
|
|
begin
|
|
|
|
Palette256Set(LRLPalette^);
|
|
|
|
|
|
|
|
ShowLives := True;
|
|
|
|
ShowScore := True;
|
|
|
|
ShowLevel := True;
|
|
|
|
LRLLives := 5;
|
|
|
|
LRLScore := 0;
|
|
|
|
|
|
|
|
cl := 1;
|
|
|
|
repeat
|
|
|
|
LRLPlayLevel(cl);
|
|
|
|
KeyboardFlush;
|
2008-02-29 18:36:25 +01:00
|
|
|
|
2007-11-01 13:36:59 +01:00
|
|
|
if GameResult = 10 then
|
|
|
|
begin
|
|
|
|
Inc(LRLLives);
|
2008-02-29 18:36:25 +01:00
|
|
|
LRLScore := LRLScore + 10000 * Longint(cl);
|
2007-11-01 13:36:59 +01:00
|
|
|
Inc(cl);
|
|
|
|
end else
|
|
|
|
Dec(LRLLives);
|
|
|
|
until (LRLLives = 0) or (GameResult = 100);
|
|
|
|
|
2008-02-29 18:36:25 +01:00
|
|
|
if (GameResult <> 100) and LRLBestScore(LRLScore) then
|
2007-11-01 13:36:59 +01:00
|
|
|
begin
|
|
|
|
LRLInsertScore(LRLEnterName, LRLScore);
|
|
|
|
LRLShowHighScores;
|
2008-02-29 18:36:25 +01:00
|
|
|
end;
|
2007-11-01 13:36:59 +01:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure LRLShell;
|
|
|
|
var
|
|
|
|
MenuSelection: word;
|
|
|
|
begin
|
|
|
|
MenuSelection := 1;
|
|
|
|
repeat
|
|
|
|
LRLSelectItem(MenuSelection);
|
|
|
|
if MenuSelection = 1 then LRLGameStart;
|
2008-03-24 00:44:28 +01:00
|
|
|
if MenuSelection = 2 then LRLEditLevels;
|
2008-02-29 18:36:25 +01:00
|
|
|
if MenuSelection = 3 then LRLShowHighScores;
|
2007-11-01 13:36:59 +01:00
|
|
|
until MenuSelection = 4;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
LRLInitialize;
|
|
|
|
LRLIntro;
|
|
|
|
LRLShell;
|
|
|
|
LRLDeinitialize;
|
|
|
|
end.
|