Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
670 | bw | 1 | unit LRLIntroduction; |
2 | |||
3 | |||
4 | interface |
||
5 | |||
6 | |||
7 | uses |
||
8 | SysUtils, |
||
9 | LRLRoutines, LRLSprites; |
||
10 | |||
11 | |||
12 | procedure LRLIntro; |
||
13 | |||
14 | |||
15 | implementation |
||
16 | |||
17 | |||
18 | const |
||
19 | IntroText: array[1..14] of String = ( |
||
20 | 'Lode Runner LIVE. FREEWARE Version 1.0', |
||
21 | 'KolibriOS port by bw (Vladimir V. Byrgazov)', |
||
22 | 'Copyright (c) 1995 Aleksey V. Vaneev', |
||
23 | 'Copyright (c) 2007 bw', |
||
24 | '', |
||
25 | 'Send comments to Aleksey V. Vaneev', |
||
26 | '2:5003/15@FidoNet', |
||
27 | 'ikomi@glas.apc.org', |
||
28 | '', |
||
29 | 'Send comments to bw', |
||
30 | 'bw@handsdriver.net', |
||
31 | '', |
||
32 | '', |
||
33 | '' |
||
34 | ); |
||
35 | |||
36 | SPACE40 = ' '; |
||
37 | |||
38 | |||
39 | var |
||
40 | RefreshDelay: Word; |
||
41 | RefreshRemain: Word; |
||
42 | TimeToRefresh: Boolean; |
||
43 | OldTimer: Pointer; |
||
44 | |||
45 | |||
46 | procedure LRLIntro; |
||
47 | var |
||
48 | i, j, l: Integer; |
||
49 | Count: Word; |
||
50 | k: Word; |
||
51 | MainScreen: Pointer; |
||
52 | begin |
||
53 | RefreshDelay := 1; |
||
54 | RefreshRemain := 1; |
||
55 | GetMem(MainScreen, 64004); |
||
56 | |||
57 | Seek(ImageFile, LRLImagesFilePosition + 7940); |
||
58 | BlockRead(ImageFile, MainScreen^, 64004, k); |
||
59 | Palette256Set(LRLMenuPalette^); |
||
60 | ImageFill(LRLFontBuffer^, 320, 55, 0); |
||
61 | ImageClear(LRLScreen^); |
||
62 | |||
63 | for i := -50 to 4 do |
||
64 | begin |
||
65 | ImagePut(LRLScreen^, LRLFontBuffer^, 0, 0, 0, 0, 319, 199); |
||
66 | ImagePut(LRLScreen^, LRLLogo^, 3, i, 0, 0, 319, 199); |
||
67 | ScreenApply(LRLScreen^); |
||
68 | if Keypressed then |
||
69 | begin |
||
70 | ReadKey; |
||
71 | FreeMem(MainScreen, 64004); |
||
72 | Exit; |
||
73 | end; |
||
74 | Sleep(10); |
||
75 | end; |
||
76 | |||
77 | ImageFill(LRLFontBuffer^, 320, 55, 0); |
||
78 | for i := 0 to 10 do |
||
79 | begin |
||
80 | for k := 0 to 20 do |
||
81 | for j := 0 to 16 do |
||
82 | ImagePutTransparent(LRLScreen^, MainScreen^, 0, 0, |
||
83 | j * 20 - 10 - i, k * 20 - 10 - i, |
||
84 | j * 20 - 10 + i, k * 20 - 10 + i); |
||
85 | |||
86 | Sleep(50); |
||
87 | |||
88 | ImagePut(LRLScreen^, LRLFontBuffer^, 0, 182, 0, 0, 319, 199); |
||
89 | ScreenApply(LRLScreen^); |
||
90 | if Keypressed then |
||
91 | begin |
||
92 | ReadKey; |
||
93 | FreeMem(MainScreen, 64004); |
||
94 | Exit; |
||
95 | end; |
||
96 | end; |
||
97 | |||
98 | Count := 1; |
||
99 | k := 1; |
||
100 | repeat |
||
101 | if TimeToRefresh then |
||
102 | begin |
||
103 | Inc(Count); |
||
104 | TimeToRefresh := False; |
||
105 | end; |
||
106 | |||
107 | if Count >= 2 then |
||
108 | begin |
||
109 | ImageStringGet(SPACE40 + IntroText[k] + SPACE40, LRLFont^, LRLFontBuffer^, 110); |
||
110 | for l := 200 downto 184 do |
||
111 | begin |
||
112 | ImagePut(LRLScreen^, LRLFontBuffer^, 160 - ImageSizeX(LRLFontBuffer^) div 2, l, 0, 0, 319, 199); |
||
113 | ScreenApply(LRLScreen^); |
||
114 | Sleep(20); |
||
115 | end; |
||
116 | Inc(k); |
||
117 | if k > Length(IntroText) then k := 1; |
||
118 | Count := 0; |
||
119 | end; |
||
120 | |||
121 | for I := 1 to 8 do |
||
122 | if Keypressed then |
||
123 | Break else |
||
124 | Sleep(250); |
||
125 | |||
126 | TimeToRefresh := True; |
||
127 | until KeyPressed; |
||
128 | |||
129 | ReadKey; |
||
130 | FadeClear; |
||
131 | FreeMem(MainScreen, 64004); |
||
132 | end; |
||
133 | |||
134 | |||
135 | end. |