14 PalType = Array[0..255] of ColType;
\r
17 Col : Array[1..20] of ColType;
\r
18 Pos : Array[1..20] of Byte;
\r
19 UP : Array[1..20] of Boolean;
\r
26 Bars : Array[1..40] Of BarType;
\r
27 NumBars, NumLines : Byte;
\r
30 Procedure Pal(Col, R, G, B : Byte);
\r
46 Procedure GetPal(Col : Byte; Var R, G, B : Byte);
\r
70 Procedure WaitRetrace; Assembler;
\r
84 Procedure SetPal(Var Palet : PalType); Assembler;
\r
99 Procedure FadeOut(NoBars, BarSize : Byte);
\r
105 For F := 1 to NoBars do
\r
106 For L := 1 to BarSize do
\r
108 If Bars[F].Col[L].R > 0 Then Dec(Bars[F].Col[L].R);
\r
109 If Bars[F].Col[L].G > 0 Then Dec(Bars[F].Col[L].G);
\r
110 If Bars[F].Col[L].B > 0 Then Dec(Bars[F].Col[L].B);
\r
134 Procedure DrawCopper(NoLines, StartCol, YStart : Byte);
\r
138 For Loop := YStart to YStart + NoLines do
\r
140 FillChar(Mem[$a000:Loop*320],320,StartCol+Loop-YStart);
\r
145 Procedure SetCopperPal(NoBars, BarSize, YStart, ColStart, Space : Byte);
\r
154 FillChar(Bars, SizeOf (Bars),0);
\r
155 HalfBar := BarSize Div 2;
\r
156 IncR := 63 Div HalfBar;
\r
158 For Loop := 1 to NoBars do
\r
160 For Loop2 := 1 to HalfBar do
\r
163 Bars[Loop].Col[Loop2].R := Loop2 * IncR;
\r
165 Bars[Loop].Col[Loop2].G := Loop2 * IncR;
\r
167 Bars[Loop].Col[Loop2].B := Loop2 * IncR;
\r
169 Bars[Loop].Pos[Loop2] := YStart + (Loop-1) * (BarSize+Space) + Loop2 -1 + ColStart;
\r
170 Bars[Loop].UP[Loop2] := True
\r
173 For Loop2 := HalfBar + 1 to BarSize do
\r
176 Bars[Loop].Col[Loop2].R := (BarSize - Loop2) * IncR;
\r
178 Bars[Loop].Col[Loop2].G := (BarSize - Loop2) * IncR;
\r
180 Bars[Loop].Col[Loop2].B := (BarSize - Loop2) * IncR;
\r
182 Bars[Loop].Pos[Loop2] := YStart + (Loop-1) * (BarSize+Space) + Loop2 -1 + ColStart;
\r
183 Bars[Loop].UP[Loop2] := True
\r
186 RGB := (RGB + 1) Mod 3;
\r
194 Procedure RotatePal(NoBars, BarSize, YStart, StartCol, NumLines : Byte;
\r
204 FillChar(TPal, 768, 0);
\r
205 For Loop := 1 to NoBars do
\r
207 For Loop2 := 1 to BarSize do
\r
209 TPal[Bars[Loop].Pos[Loop2]] := Bars[Loop].Col[Loop2];
\r
212 If Bars[Loop].Pos[Loop2] = StartCol Then
\r
213 Bars[Loop].UP[Loop2] := False;
\r
214 If Bars[Loop].Pos[Loop2] = NumLines Then
\r
215 Bars[Loop].UP[Loop2] := True;
\r
217 If Bars[Loop].UP[Loop2] Then
\r
218 Dec(Bars[Loop].Pos[Loop2])
\r
220 Inc(Bars[Loop].Pos[Loop2]);
\r
231 Procedure SetUP(NumLines, NumBars, BarSize, YStart, ColStart, Space : Byte);
\r
234 DrawCopper(NumLines,ColStart,YStart);
\r
235 SetCopperPal(NumBars, BarSize, YStart, ColStart, Space);
\r
256 SetUP(NumLines, NumBars, BarSize, YStart, ColStart, Space);
\r
258 RotatePal(NumBars, BarSize,YStart, ColStart, NumLines, True);
\r
261 For Loop := 0 to 63 do
\r
263 RotatePal(NumBars, BarSize,YStart, ColStart, NumLines, True);
\r
264 FadeOut(NumBars, BarSize);
\r
281 While KeyPressed do ReadKey;
\r
292 WriteLn('Copper Bars Trainer...');
\r
294 WriteLn('By EzE of Asphyxia.');
\r
296 WriteLn('Contact Us on ...');
\r
299 WriteLn('the Asphyxia BBS (031) - 7655312');
\r
301 WriteLn('Email : eze@');
\r
302 WriteLn(' asphyxia@');
\r
303 WriteLn(' edwards@');
\r
304 WriteLn(' bailey@');
\r
305 WriteLn(' mcphail@');
\r
306 WriteLn(' beastie.cs.und.ac.za');
\r
308 WriteLn('or peter.edwards@datavert.co.za');
\r
310 WriteLn('Write me snail-mail at...');
\r
311 WriteLn('P.O. Box 2313');
\r
312 WriteLn('Hillcrest');
\r
318 For Loop := 0 to 63 do
\r
322 Pal(7, R1, G1, B1);
\r
323 If R1 < R Then Inc(R1);
\r
324 If G1 < G Then Inc(G1);
\r
325 If B1 < B Then Inc(B1);
\r
337 Procedure Fadecurs;
\r
342 GetPal(7, R, G, B);
\r
343 For Loop := 0 to 63 do
\r
348 If R > 0 Then Dec(R);
\r
349 If G > 0 Then Dec(G);
\r
350 If B > 0 Then Dec(B);
\r
357 While KeyPressed do ReadKey;
\r