Go to most recent revision | Details | 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, |
||
12 | {LRLEditor,} |
||
13 | LRLIntroduction; |
||
14 | |||
15 | const |
||
16 | Version: PChar = 'Lode Runner LIVE. Version 1.4b'; |
||
17 | |||
18 | |||
19 | procedure LRLInitialize; |
||
20 | begin |
||
21 | ImagesInitialize; |
||
22 | KeyboardInitialize; |
||
23 | ScreenMode(1); |
||
24 | ScreenTitle := Version; |
||
25 | end; |
||
26 | |||
27 | |||
28 | procedure LRLDeinitialize; |
||
29 | begin |
||
30 | ImagesDeinitialize; |
||
31 | end; |
||
32 | |||
33 | |||
34 | procedure LRLGameStart; |
||
35 | var |
||
36 | cl: Integer; |
||
37 | begin |
||
38 | Palette256Set(LRLPalette^); |
||
39 | |||
40 | ShowLives := True; |
||
41 | ShowScore := True; |
||
42 | ShowLevel := True; |
||
43 | LRLLives := 5; |
||
44 | LRLScore := 0; |
||
45 | |||
46 | cl := 1; |
||
47 | repeat |
||
48 | LRLPlayLevel(cl); |
||
49 | KeyboardFlush; |
||
50 | |||
51 | if GameResult = 10 then |
||
52 | begin |
||
53 | Inc(LRLLives); |
||
54 | LRLScore := LRLScore + 10000 * Longint(cl); |
||
55 | Inc(cl); |
||
56 | end else |
||
57 | Dec(LRLLives); |
||
58 | until (LRLLives = 0) or (GameResult = 100); |
||
59 | |||
60 | if (GameResult <> 100) and LRLBestScore(LRLScore) then |
||
61 | begin |
||
62 | LRLInsertScore(LRLEnterName, LRLScore); |
||
63 | LRLShowHighScores; |
||
64 | end; |
||
65 | end; |
||
66 | |||
67 | procedure LRLShell; |
||
68 | var |
||
69 | MenuSelection: word; |
||
70 | begin |
||
71 | MenuSelection := 1; |
||
72 | repeat |
||
73 | LRLSelectItem(MenuSelection); |
||
74 | if MenuSelection = 1 then LRLGameStart; |
||
75 | {if MenuSelection = 2 then LRLEditLevels;} |
||
76 | if MenuSelection = 3 then LRLShowHighScores; |
||
77 | until MenuSelection = 4; |
||
78 | end; |
||
79 | |||
80 | |||
81 | begin |
||
82 | LRLInitialize; |
||
83 | LRLIntro; |
||
84 | LRLShell; |
||
85 | LRLDeinitialize; |
||
86 | end.> |