/[projet1]/public/oric/demos/buggy_boy/LcpIntro/Main.c
Defence Force logotype

Contents of /public/oric/demos/buggy_boy/LcpIntro/Main.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 903 - (show annotations)
Sun Jan 13 15:30:30 2013 UTC (6 years, 10 months ago) by dbug
File MIME type: text/plain
File size: 17827 byte(s)
Added the Buggy Boy demo.
Please note that the building of the DSK file requires working versions of Tap2Dsk and Old2Mfm, they may not work on recent windows versions.
1
2
3 #include <lib.h>
4
5 // --------------------------------------
6 // LcpIntro
7 // --------------------------------------
8 // (c) 2004 Mickael Pointier.
9 // This code is provided as-is.
10 // I do not assume any responsability
11 // concerning the fact this is a bug-free
12 // software !!!
13 // Except that, you can use this example
14 // without any limitation !
15 // If you manage to do something with that
16 // please, contact me :)
17 // --------------------------------------
18 // For more information, please contact me
19 // on internet:
20 // e-mail: mike@defence-force.org
21 // URL: http://www.defence-force.org
22 // --------------------------------------
23 // Note: This text was typed with a Win32
24 // editor. So perhaps the text will not be
25 // displayed correctly with other OS.
26
27
28 #define ENABLE_VSYNC
29
30
31 // ============================================================================
32 //
33 // Externals
34 //
35 // ============================================================================
36
37
38 // ===== Vbl.s =====
39 void System_Initialize();
40
41 void System_InstallIRQ_SimpleVbl();
42 void System_InstallDoNothing_CallBack();
43
44
45 void VSync();
46
47 extern unsigned int VSyncCounter1;
48 extern unsigned int VSyncCounter2;
49
50 void VSyncGetCounter();
51
52 void IrqOff();
53
54 void Temporize();
55
56
57 extern unsigned char SystemEffectTrigger;
58
59 extern void InterruptCode();
60 extern void DigiPlayer_InstallIrq();
61
62 extern void VSync();
63
64
65 // ===== Tables.s =====
66 void TablesInit();
67
68
69 // ===== Lines.s =====
70 extern unsigned char CurrentPixelX; // Coordinate X of edited pixel/byte
71 extern unsigned char CurrentPixelY; // Coordinate Y of edited pixel/byte
72 extern unsigned char OtherPixelX; // Coordinate X of other edited pixel/byte
73 extern unsigned char OtherPixelY; // Coordinate Y of other edited pixel/byte
74
75 void DrawLine();
76
77
78
79
80
81 // === Resol.s ===
82 void ResolSwitchToHires();
83 void ClearHiresScreen();
84
85 void ResolSwitchToText();
86 void ResolClearText();
87
88
89 // === Text.s ===
90 void TextFadeIn();
91 void TextFadeOut();
92
93 void SwitchToHires();
94 void SwitchToText();
95 void ClearTextScreen();
96
97
98 // === Tables.s ===
99
100 extern unsigned char CosTable[256];
101
102 void Tables_InitialiseCostable();
103
104
105 // === Mandel.s ===
106
107 void Mandel_InitDisplay();
108 void Mandel_DrawFractal();
109
110
111 // ==== Fr08.s ====
112 void Sequence_Fr08();
113
114 // ==== Scroller.s ====
115 void Scroller_InitHires();
116 void Scroller_InitDycp();
117 void Scroller_DisplayDycp();
118
119 // ==== ChessBoard.s ====
120 void DrawHorizontalChecker();
121 void DrawVerticalChecker();
122
123 extern unsigned int xpos;
124 extern unsigned int curx;
125
126 extern unsigned int ypos;
127 extern unsigned int cury;
128
129 extern unsigned char zoom;
130 extern unsigned char zoomstart;
131
132
133 //
134 // RANDOM.S
135 //
136 extern unsigned char RandomValue;
137 extern void GetRand();
138
139
140 extern void Filler_ClearMinMaxTable();
141
142
143 extern unsigned char X0;
144 extern unsigned char Y0;
145 extern unsigned char X1;
146 extern unsigned char Y1;
147
148 extern void AddLineASM();
149 extern void FillTablesASM();
150
151
152
153
154
155 void RadarEffect()
156 {
157 unsigned char angle=0;
158 int i;
159 int x0,y0;
160 int x1,y1;
161
162 Filler_ClearMinMaxTable();
163
164 //
165 // Move the triangles around the screen
166 //
167 x0=120+(((int)CosTable[(angle+64)&255])-128)*99/128;
168 y0=100+(((int)CosTable[(angle+128)&255])-128)*99/128;
169 //for (i=0;i<2;i++)
170 {
171 do
172 {
173 angle+=4;
174 x1=120+(((int)CosTable[(angle+64)&255])-128)*99/128;
175 y1=100+(((int)CosTable[(angle+128)&255])-128)*99/128;
176
177 X0=120;
178 Y0=100;
179 X1=x0;
180 Y1=y0;
181 AddLineASM();
182 X0=120;
183 Y0=100;
184 X1=x1;
185 Y1=y1;
186 AddLineASM();
187 X0=x0;
188 Y0=y0;
189 X1=x1;
190 Y1=y1;
191 AddLineASM();
192
193 FillTablesASM();
194
195 x0=x1;
196 y0=y1;
197 }
198 while (angle);
199 }
200 }
201
202
203
204
205
206 // ===========================================
207
208
209 void TextFadeFlash();
210
211 /*
212 void FadeFlash()
213 {
214 TextFadeIn();
215 VSync();
216 VSync();
217 VSync();
218 VSync();
219 VSync();
220 VSync();
221 VSync();
222 VSync();
223 VSync();
224 VSync();
225 VSync();
226 VSync();
227 VSync();
228 VSync();
229 VSync();
230 VSync();
231 VSync();
232 VSync();
233 VSync();
234 VSync();
235 VSync();
236 TextFadeOut();
237 VSync();
238 VSync();
239 VSync();
240 VSync();
241 VSync();
242 VSync();
243 VSync();
244 VSync();
245 VSync();
246 VSync();
247 VSync();
248 VSync();
249 VSync();
250 VSync();
251 VSync();
252 VSync();
253 VSync();
254 VSync();
255 VSync();
256 VSync();
257 VSync();
258 }
259 */
260
261 // ===============================================
262
263
264
265
266
267 void ChessBoard_MainLoop()
268 {
269 unsigned char angle;
270 unsigned char angle0;
271 unsigned char angle1;
272 unsigned char x,y;
273 unsigned char ink,paper;
274 unsigned char counter;
275 unsigned char pixel;
276 unsigned char *ptr_scren;
277
278 angle1=0;
279 angle0=0;
280 angle=0;
281
282 counter=255; // 2 seconds
283 while (counter--)
284 {
285 VSync();
286
287 zoom=60+(CosTable[angle]>>1);
288 zoomstart=1+(((int)zoom)*((int)CosTable[angle0]))/255;
289 DrawHorizontalChecker();
290
291 zoomstart=1+(((int)zoom)*((int)CosTable[angle1]))/255;
292 DrawVerticalChecker();
293
294 angle++;
295 angle0+=2;
296 angle1+=3;
297 }
298 }
299
300
301 void ChessBoard_MakeVideoMode()
302 {
303 unsigned char *ptr_screen;
304 unsigned int y,x;
305 unsigned char c,cc;
306
307 ptr_screen=(unsigned char*)0xa000;
308 for (y=0;y<200;y++)
309 {
310 ptr_screen[1]=1; // INK
311 ptr_screen[2]=16+0; // PAPER
312 ptr_screen[3]=26; // ->TEXT
313
314 ptr_screen+=40;
315 }
316
317
318 ptr_screen=(unsigned char*)0xbb80;
319 for (y=0;y<25;y++)
320 {
321 ptr_screen[0]=30; // ->HIRES
322 c=32;
323 cc=3;
324 for (x=4;x<40;x++)
325 {
326 ptr_screen[x]=c;
327 c++;
328 cc--;
329 if (!cc)
330 {
331 c++;
332 cc=4;
333 }
334 }
335
336 ptr_screen+=40;
337 }
338
339 // Put in BLACK INK the 3 last lines of text
340 for (c=0;c<40*3;c++)
341 {
342 *((unsigned char*)0xbb80+40*25+c)=0;
343 }
344
345 *(unsigned char*)0xbfdf=26; // TEXT
346 }
347
348 // =========================================
349
350 void Fx_DrawDigit_0();
351 void Fx_DrawDigit_1();
352 void Fx_DrawDigit_2();
353 void Fx_DrawDigit_3();
354 void Fx_DrawDigit_4();
355 void Fx_DrawDigit_5();
356 void Fx_DrawDigit_6();
357 void Fx_DrawDigit_7();
358 void Fx_DrawDigit_8();
359 void Fx_DrawDigit_9();
360
361 extern unsigned char Fx_DigitMask;
362
363
364
365
366
367 void RastersClearBuffer();
368 void RastersDisplayBuffer();
369
370
371
372 void Rasters_Demo()
373 {
374 while (!SystemEffectTrigger)
375 {
376 //VSync();
377 RastersDisplayBuffer();
378
379 Scroller_DisplayDycp();
380 }
381 }
382
383
384 // --------------------
385
386
387 extern void DisplayRotoZoomAsm();
388 extern void DisplayRotoZoomAsm_WithTexture();
389
390
391 unsigned char Angle;
392 unsigned char ZoomX;
393 unsigned char ZoomY;
394
395 int MoveX;
396 int MoveY;
397 int MoveDX;
398 int MoveDY;
399
400 extern int U,V,IU,IV,MU,MV;
401
402 extern unsigned char Buffer_RotoZoom[];
403
404 void RotoZoom_Initialise();
405 void RotoZoom_MoveCharacters();
406
407 void InitZoomBuffer()
408 {
409 int x,y;
410
411 int i;
412
413
414 /*
415 for (i=0;i<40*28;i++)
416 {
417 *(unsigned char*)(0xbb80+i)='*';
418 }
419 */
420
421 RotoZoom_Initialise();
422
423
424 /*
425 for (i=0;i<4095;i++)
426 {
427 GetRand();
428 Buffer_RotoZoom[i]=17; //6+(RandomValue&7);
429 }
430
431 for (i=0;i<63;i++)
432 {
433 Buffer_RotoZoom[i]=16;
434 Buffer_RotoZoom[i*64]=16;
435 }
436 */
437
438 /*
439 for (y=0;y<32;y++)
440 {
441 for (x=0;x<32;x++)
442 {
443 Buffer_RotoZoom[ x +y*64]=16;
444 Buffer_RotoZoom[(x+32)+y*64]=17;
445 Buffer_RotoZoom[ x +(y+32)*64]=18;
446 Buffer_RotoZoom[(x+32)+(y+32)*64]=19;
447 }
448 }
449 */
450 }
451
452 void DoRotozoom()
453 {
454 int x,y,z;
455 int div_factor;
456 int offset;
457 int max_x;
458 int max_y;
459 int i;
460 int delay;
461 unsigned char red,green,blue;
462 unsigned char aa;
463
464 InitZoomBuffer();
465
466 ZoomX+=4*20;
467 ZoomY+=3*20;
468
469 aa=0;
470
471 x=0;
472 y=0;
473 delay=100*4;
474 while (delay--)
475 {
476
477 //div_factor=16+16; //(16+((CosTable[ZoomX]+128)>>3));
478 div_factor=16; //(16+((CosTable[ZoomX]+128)>>5));
479 //div_factor=(16+((CosTable[ZoomX]+128)>>3));
480 //div_factor=(16+((CosTable[ZoomX]+128)>>2));
481 //div_factor=(16+((CosTable[ZoomX]+128)>>1));
482
483 /*
484 IU=(CosTable[Angle]<<7) / div_factor;
485 IV=(CosTable[(Angle+64)&255]<<7)/ div_factor;
486 */
487 /*
488 IU=((int)(CosTable[Angle]))<<4;
489 IV=((int)(CosTable[aa]))<<4;
490 */
491 IU=((int)(CosTable[Angle])-127)*16;
492 IV=((int)(CosTable[aa])-127)*16;
493
494
495 /*
496 //div_factor=(16+((CosTable[ZoomX]+128)>>5));
497
498 IU=(CosTable[Angle]>>4);
499 IV=(CosTable[(Angle+64)&255]>>4);
500 */
501
502 MU=x;
503 MV=y;
504
505 Angle+=1;
506 aa+=2;
507 //ZoomX+=4;
508 //ZoomY+=3;
509
510 DisplayRotoZoomAsm();
511
512 RotoZoom_MoveCharacters();
513
514
515 x+=233;
516 y+=122;
517
518 }
519 }
520
521
522 extern unsigned char BigBuffer[];
523
524 #define P(r,g,b) (36+ ((r)) + (((g))*5) + (((b))*5*4))
525
526
527 unsigned char RasterLine[]=
528 {
529 P(0,0,0),
530 P(1,0,0),
531 P(2,0,0),
532 P(3,0,0),
533 P(3,0,1),
534 P(3,0,2),
535 P(3,0,3),
536 P(3,1,3),
537 P(3,2,3),
538 P(3,3,3),
539 P(3,3,2),
540 P(3,3,1),
541 P(3,3,0),
542 P(2,3,0),
543 P(1,3,0),
544 P(0,3,0),
545 P(0,3,1),
546 P(0,3,2),
547 P(0,3,3),
548
549 P(0,0,0)|128,
550
551 P(0,1,0),P(1,0,0),P(2,0,0),P(3,1,0),P(3,2,0),P(3,3,0),P(3,3,0),
552 // -------- 0
553
554 P(1,2,0),P(0,1,0),P(1,0,0),P(2,0,0),P(3,1,0),P(3,2,0),P(3,3,0),P(3,3,0),
555 P(3,3,0),P(3,3,0),P(3,3,0),P(3,3,0),P(2,3,0),P(1,3,0),P(0,3,0),P(0,3,0),
556 P(0,3,1),P(0,3,2),P(0,3,3),P(0,3,3),P(0,3,3),P(0,2,3),P(1,1,3),P(2,0,3),
557 P(3,0,3),P(3,0,3),P(3,0,3),P(3,0,2),P(2,0,1),P(2,1,0),P(2,2,0),P(2,3,0),
558
559 P(3,3,0),P(3,3,1),P(3,3,2),P(3,3,3),P(3,3,3),P(3,3,2),P(3,3,1),P(3,3,0),
560 P(3,3,0),P(3,3,0),P(3,3,0),P(3,3,0),P(2,3,0),P(1,3,0),P(0,3,0),P(0,3,0),
561 P(0,3,1),P(0,3,2),P(0,3,3),P(0,3,3),P(0,3,3),P(0,2,3),P(1,1,3),P(2,0,3),
562 P(3,0,3),P(3,0,3),P(3,0,3),P(3,0,2),P(2,0,1),P(2,1,0),P(2,2,0),P(2,3,0),
563
564 P(1,2,0),P(0,1,0),P(1,0,0),P(2,0,0),P(3,1,0),P(3,2,0),P(3,3,0),P(3,3,0),
565 P(3,3,0),P(3,3,0),P(3,3,0),P(3,3,0),P(2,3,0),P(1,3,0),P(0,3,0),P(0,3,0),
566 P(0,3,1),P(0,3,2),P(0,3,3),P(0,3,3),P(0,3,3),P(0,2,3),P(1,1,3),P(2,0,3),
567 P(3,0,3),P(3,0,3),P(3,0,3),P(3,0,2),P(2,0,1),P(2,1,0),P(2,2,0),P(2,3,0),
568
569 P(1,2,0),P(0,1,0),P(1,0,0),P(2,0,0),P(3,1,0),P(3,2,0),P(3,3,0),P(3,3,0),
570 P(3,3,0),P(3,3,0),P(3,3,0),P(3,3,0),P(2,3,0),P(1,3,0),P(0,3,0),P(0,3,0),
571 P(0,3,1),P(0,3,2),P(0,3,3),P(0,3,3),P(0,3,3),P(0,2,3),P(1,1,3),P(2,0,3),
572 P(3,0,3),P(3,0,3),P(3,0,3),P(3,0,2),P(2,0,1),P(2,1,0),P(2,2,0),P(2,3,0),
573
574 // -------- 256
575
576 P(1,2,0),P(0,1,0),P(1,0,0),P(2,0,0),P(3,1,0),P(3,2,0),P(3,3,0),P(3,3,0),
577 P(3,3,0),P(3,3,0),P(3,3,0),P(3,3,0),P(2,3,0),P(1,3,0),P(0,3,0),P(0,3,0),
578 P(0,3,1),P(0,3,2),P(0,3,3),P(0,3,3),P(0,3,3),P(0,2,3),P(1,1,3),P(2,0,3),
579 P(3,0,3),P(3,0,3),P(3,0,3),P(3,0,2),P(2,0,1),P(2,1,0),P(2,2,0),P(2,3,0),
580
581 P(3,3,0),P(3,3,1),P(3,3,2),P(3,3,3),P(3,3,3),P(3,3,2),P(3,3,1),P(3,2,0),
582 P(3,2,0),P(3,2,0),P(3,0,0),P(2,0,0),P(0,0,0),P(0,0,0),P(1,1,1),P(1,1,1),
583 P(2,2,2),P(2,2,2),P(3,3,3),P(3,3,3),P(2,3,3),P(1,2,3),P(0,1,3),P(0,0,2),
584 P(0,1,2),P(0,1,1),P(0,1,0),P(0,2,0),P(0,3,1),P(0,3,2),P(1,3,0),P(2,3,0),
585
586 P(1,2,0),P(0,1,0),P(1,1,0),P(2,0,0),P(3,1,0),P(3,2,0),P(3,3,0),P(3,3,0),
587 P(3,3,0),P(3,3,0),P(3,3,0),P(3,3,0),P(2,3,0),P(1,3,0),P(0,3,0),P(0,3,0),
588 P(0,3,1),P(0,3,2),P(0,3,3),P(0,3,3),P(0,3,3),P(0,2,3),P(1,1,3),P(2,0,3),
589 P(3,0,3),P(3,0,3),P(3,0,3),P(3,0,2),P(2,0,1),P(2,1,0),P(2,2,0),P(2,3,0),
590
591 P(1,2,0),P(0,1,0),P(1,0,0),P(2,0,0),P(3,1,0),P(3,2,0),P(3,3,0),P(3,3,0),
592 P(3,3,0),P(3,3,0),P(3,3,0),P(3,3,0),P(2,3,0),P(1,3,0),P(0,3,0),P(0,3,0),
593 P(0,3,1),P(0,3,2),P(0,3,3),P(0,3,3),P(0,3,3),P(0,2,3),P(1,1,3),P(2,0,3),
594 P(3,0,3),P(3,0,3),P(3,0,3),P(3,0,2),P(2,0,1),P(2,1,0),P(2,2,0),P(2,3,0),
595
596 // -------- 384
597
598 P(1,2,0),P(0,1,0),P(1,0,0),P(2,0,0),P(3,1,0),P(3,2,0),P(3,3,0),P(3,3,0),
599 P(3,3,0),P(3,3,0),P(3,3,0),P(3,3,0),P(2,3,0),P(1,3,0),P(0,3,0),P(0,3,0),
600 P(0,3,1),P(0,3,2),P(0,3,3),P(0,3,3),P(0,3,3),P(0,2,3),P(1,1,3),P(2,0,3),
601 P(3,0,3),P(3,0,3),P(3,0,3),P(3,0,2),P(2,0,1),P(2,1,0),P(2,2,0),P(2,3,0),
602
603 P(3,3,0),P(3,3,1),P(3,3,2),P(3,3,3),P(3,3,3),P(3,3,2),P(3,3,1),P(3,3,0),
604 P(3,3,1),P(3,3,2),P(3,3,3),P(3,3,2),P(2,3,1),P(1,3,0),P(0,3,0),P(0,3,0),
605 P(0,3,1),P(0,3,2),P(0,3,3),P(0,3,3),P(0,3,3),P(0,2,3),P(1,1,3),P(2,0,3),
606 P(3,0,3),P(3,0,3),P(3,0,3),P(3,0,2),P(2,0,1),P(2,1,0),P(2,2,0),P(2,3,0),
607
608 P(1,2,0),P(0,1,0),P(1,0,0),P(2,0,0),P(3,1,0),P(3,2,0),P(3,3,0),P(3,3,0),
609 P(3,3,0),P(3,3,0),P(3,3,0),P(3,3,0),P(2,3,0),P(1,3,0),P(0,3,0),P(0,3,0),
610 P(0,3,1),P(0,3,2),P(0,3,3),P(0,3,3),P(0,3,3),P(0,2,3),P(1,1,3),P(2,0,3),
611 P(3,0,3),P(3,0,3),P(3,0,3),P(3,0,2),P(2,0,1),P(2,1,0),P(2,2,0),P(2,3,0),
612
613 P(1,2,0),P(0,1,0),P(1,0,0),P(2,0,0),P(3,1,0),P(3,2,0),P(3,3,0),P(3,3,0),
614 P(3,3,0),P(3,3,0),P(3,3,0),P(3,3,0),P(2,3,0),P(1,3,0),P(0,3,0),P(0,3,0),
615 P(0,3,1),P(0,3,2),P(0,3,3),P(0,3,3),P(0,3,3),P(0,2,3),P(1,1,3),P(2,0,3),
616 P(3,0,3),P(3,0,3),P(3,0,3),P(3,0,2),P(2,0,1),P(2,1,0),P(2,2,0),P(2,3,0),
617 };
618
619
620 /*
621 void InitZoomBufferMandel()
622 {
623 int x,y;
624
625 int i;
626
627 for (x=0;x<128*64;x++)
628 {
629 BigBuffer[x]=RasterLine[BigBuffer[x]];
630 }
631
632 }
633 */
634
635 void Mandle_ColorizeBigBuffer();
636
637 void DoRotozoomMandel()
638 {
639 int x,y,z;
640 int div_factor;
641 int offset;
642 int max_x;
643 int max_y;
644 int i;
645 int delay;
646 unsigned char red,green,blue;
647 unsigned char aa;
648
649 Mandle_ColorizeBigBuffer();
650 //InitZoomBufferMandel();
651
652 ZoomX+=4*20;
653 ZoomY+=3*20;
654
655 aa=0;
656
657 x=0;
658 y=0;
659 delay=100*2;
660 while (delay--)
661 {
662 div_factor=(16+((CosTable[ZoomX])>>1));
663
664
665 IU=(((int)(CosTable[Angle])-127<<7)) / div_factor;
666 IV=(((int)(CosTable[(Angle+64)&255])-127)<<7)/ div_factor;
667
668
669 MU=x;
670 MV=y;
671
672 Angle+=1;
673 aa+=2;
674 ZoomX+=4;
675
676 DisplayRotoZoomAsm_WithTexture();
677
678
679 x+=233;
680 y+=122;
681
682 }
683 }
684
685
686 // --------------------
687 void Rasters_Initialise();
688 void Fx_TvMire();
689 void Fx_Snow();
690 void Fx_BearWarning();
691
692
693 extern unsigned char Picture_Karhu[];
694
695 //void PlayerTest();
696
697
698 // ---------------------
699
700 void VScroll_Initialize();
701 void VScroll_DisplayScroller();
702 void VScroll_MainLoop();
703
704 void Mym_PlayFrame();
705 void Mym_Initialize();
706
707
708 void Fx_DrawTitle();
709
710 void InitColorText();
711
712 void Fx_CutSound();
713
714 #define PIXEL_4(r,g,b) (36+ ((r)) + (((g))*5) + (((b))*5*4))
715
716 /*
717 void ColorTextTest()
718 {
719 int r,g,b;
720
721 for (r=0;r<4;r++)
722 {
723 for (g=0;g<4;g++)
724 {
725 for (b=0;b<4;b++)
726 {
727 *(unsigned char*)(0xbb80+3+r+g*40+b*40*4)=PIXEL_4(r,g,b);
728 }
729 }
730 }
731 while (1);
732 }
733 */
734
735 void main()
736 {
737 //
738 // Make sure we are working on a machine where the
739 // overlay memory can be disabled, and then disable
740 // it.
741 // Also install a minimal IRQ handler that makes it
742 // possible to use the VSync instruction
743 //
744 System_Initialize();
745
746 //
747 // Generate all the data we need for various demo parts
748 //
749 TablesInit();
750
751
752 //Fx_PcWarning();
753 //while (1);
754
755
756 /*
757 SwitchToText();
758 ClearTextScreen();
759
760 Rasters_Initialise();
761 Scroller_InitDycp();
762 Rasters_Demo();
763 ScrollerTerminate();
764 Tables_InitialiseCostable();
765 */
766
767
768
769 /*
770 SwitchToHires();
771 ClearHiresScreen();
772 Fx_DrawTitle();
773 */
774
775 // Test of optimization for fractalus
776
777 // SwitchToHires();
778 // ClearHiresScreen();
779 // Mandel_InitDisplay();
780 // Mandel_DrawFractal();
781 //
782 // while (1);
783
784
785 //
786 // Vertical distorter scroller
787 //
788 /*
789 SwitchToText();
790 ClearTextScreen();
791
792 VScroll_Initialize();
793 VScroll_MainLoop();
794 TablesInit();
795 */
796 //PlayerTest();
797
798
799 //-----------
800
801
802 /*
803 SwitchToHires();
804 ClearHiresScreen();
805 Mandel_InitDisplay();
806 Mandel_DrawFractal();
807
808 InitColorText();
809 DoRotozoomMandel();
810 */
811
812
813 // DigiPlayer_InstallIrq();
814 // while(1);
815 //-----------
816
817
818 //
819 // Tv Snow effect
820 //
821 Fx_Snow();
822
823 //
824 // Color mire effect
825 //
826 Fx_TvMire();
827
828 //
829 // Count down
830 //
831 System_InstallIRQ_SimpleVbl();
832 SwitchToHires();
833 ClearHiresScreen();
834
835 Fx_DigitMask=0;
836 /*
837 Fx_DrawDigit_9();
838 RadarEffect();
839 Fx_DrawDigit_8();
840 RadarEffect();
841 Fx_DrawDigit_7();
842 RadarEffect();
843 Fx_DrawDigit_6();
844 RadarEffect();
845 Fx_DrawDigit_5();
846 RadarEffect();
847 Fx_DrawDigit_4();
848 RadarEffect();
849 */
850 Fx_DrawDigit_3();
851 RadarEffect();
852 Fx_DrawDigit_2();
853 RadarEffect();
854 Fx_DrawDigit_1();
855 RadarEffect();
856 Fx_DrawDigit_0();
857 RadarEffect();
858
859
860 //
861 // Farbraush intro tune
862 //
863 Sequence_Fr08();
864
865 //
866 // Display a warning sign
867 //
868 Fx_CutSound();
869 Fx_PcWarning();
870
871 //
872 // The real demo stars here
873 //
874 SwitchToText();
875 ClearTextScreen();
876
877 Mym_Initialize();
878
879 TextFadeFlash();
880
881
882 //
883 // Start digiplayer
884 //
885 //PlayerTest();
886 //DigiPlayer_InstallIrq();
887
888 //
889 // Rotozoom
890 //
891 SwitchToText();
892 ClearTextScreen();
893 DoRotozoom();
894
895
896 SwitchToText();
897 ClearTextScreen();
898
899 TextFadeFlash();
900
901 //
902 // Chessboard
903 //
904 SwitchToText();
905 ClearTextScreen();
906
907 ChessBoard_MakeVideoMode();
908 ChessBoard_MainLoop();
909
910
911 //
912 // Bear advertisement
913 //
914 Fx_BearWarning();
915
916
917
918 SwitchToText();
919 ClearTextScreen();
920
921 TextFadeFlash();
922
923
924 //
925 // Vertical distorter scroller
926 //
927 SwitchToText();
928 ClearTextScreen();
929
930 VScroll_Initialize();
931 VScroll_MainLoop();
932 TablesInit();
933
934
935 //
936 // Mandelbrot
937 //
938 SwitchToHires();
939 ClearHiresScreen();
940
941 //Scroller_InitHires();
942 //System_InstallIRQ_SimpleVbl();
943 Mandel_InitDisplay();
944 Mandel_DrawFractal();
945 //PlayerTest();
946 //DigiPlayer_InstallIrq();
947
948 //ScrollerTerminate();
949
950 InitColorText();
951 DoRotozoomMandel();
952
953
954 //
955 // DYCP
956 //
957 SwitchToText();
958 ClearTextScreen();
959
960 Rasters_Initialise();
961 Scroller_InitDycp();
962 Rasters_Demo();
963 ScrollerTerminate();
964 Tables_InitialiseCostable();
965
966
967 //
968 // End scroller with thanks
969 //
970 SwitchToHires();
971 ClearHiresScreen();
972 Fx_DrawTitle();
973
974 // Cut the music
975 System_InstallDoNothing_CallBack();
976
977 //
978 // Color mire effect
979 //
980 Fx_TvMire();
981
982 //
983 // Tv Snow effect
984 //
985 Fx_Snow();
986
987 //
988 // Black screen
989 //
990 SwitchToText();
991 ClearTextScreen();
992
993 //
994 // And stay there forever
995 //
996 while (1);
997 }
998
999
1000
1001
1002
1003
1004

  ViewVC Help
Powered by ViewVC 1.1.26