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