Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. program LodeRunnerLive;
  2.  
  3. {$apptype gui}
  4.  
  5.  
  6. uses
  7.   LRLRoutines,
  8.   LRLSprites,
  9.   LRLLevels,
  10.   LRLMainMenu,
  11.   {LRLHighScores,
  12.   LRLEditor,}
  13.   LRLIntroduction;
  14.  
  15. const
  16.   Version: array [1..34] of char = 'Lode Runner LIVE. Version 1.0'#13#10#13#10'$';
  17.  
  18.  
  19. procedure LRLInitialize;
  20. begin
  21.   kos_setkeyboardmode(0);
  22.   ImagesInitialize;
  23. end;
  24.  
  25.  
  26. procedure LRLDeinitialize;
  27. begin
  28.   ImagesDeinitialize;
  29. end;
  30.  
  31.  
  32. procedure LRLGameStart;
  33. var
  34.   cl: Integer;
  35. begin
  36.   Palette256Set(LRLPalette^);
  37.  
  38.   ShowLives := True;
  39.   ShowScore := True;
  40.   ShowLevel := True;
  41.   LRLLives := 5;
  42.   LRLScore := 0;
  43.  
  44.   cl := 1;
  45.   repeat
  46.     LRLPlayLevel(cl);
  47.     KeyboardFlush;
  48.     if GameResult = 10 then
  49.     begin
  50.       Inc(LRLLives);
  51.       LRLScore := LRLScore + 10000 * longint(cl);
  52.       Inc(cl);
  53.     end else
  54.       Dec(LRLLives);
  55.   until (LRLLives = 0) or (GameResult = 100);
  56.  
  57.   {(GameResult <> 100) and LRLBestScore(LRLScore) then
  58.   begin
  59.     LRLInsertScore(LRLEnterName, LRLScore);
  60.     LRLShowHighScores;
  61.   end;}
  62. end;
  63.  
  64. procedure LRLShell;
  65. var
  66.   MenuSelection: word;
  67. begin
  68.   MenuSelection := 1;
  69.   repeat
  70.     LRLSelectItem(MenuSelection);
  71.     if MenuSelection = 1 then LRLGameStart;
  72.     {if MenuSelection = 2 then LRLEditLevels;
  73.     if MenuSelection = 3 then LRLShowHighScores;}
  74.   until MenuSelection = 4;
  75. end;
  76.  
  77.  
  78. begin
  79.   LRLInitialize;
  80.   LRLIntro;
  81.   LRLShell;
  82.   LRLDeinitialize;
  83. end.
  84.