home *** CD-ROM | disk | FTP | other *** search
- /*
- Creative Options Interface
- Runtime Version 1.00
-
- Blaze Class Specification
-
- DEMONSTRATION SOFTWARE
-
- Developed by Robert M Miller
- Copyright (C) 1990 Software Dimensions
-
- Disclaimer -------------------------------------------------------------------
-
- This source code may be modified and used without royalties as long as
- the purchaser of the code agrees not to distribute the modified source
- code along with the source code of his/her own works. In other words, you
- can distribute this along with your own programs as long it is in an
- executable form (.EXE/.COM).
-
- */
-
- #include "blaze.h"
- #include <stdlib.h>
- #include <dos.h>
-
- main ()
- {
- register int i, j;
- int k, l, m, n;
- void *s;
-
- Blaze++; // Cancels 43/50 line mode
- Blaze.InvisibleCursor(); // Hides cursor
- -Blaze (0,0); // Resets cursor and (-Blaze) clears the screen
-
- for (i=0,j=0;j<1000;j++)
- Blaze << (i=(i==15)?0:(++i)) << "Blaze! ";
-
- Blaze.EraseArea(0,12,80,3,112);
- Blaze (0,13) << (1|112) << Centered << " Welcome to Blaze! ";
-
- sleep(5);
-
- -Blaze (0,0);
-
- for (i=0,j=0;j<200;j++)
- Blaze << (i=(i==15)?0:(++i)) << Centered << "What could be faster?";
-
- for (i=0,j=0;j<200;j++)
- Blaze << (i=(i==15)?0:(++i)) << Centered << "What could be easier?";
-
- for (i=0,j=0;j<200;j++)
- Blaze << (i=(i==15)?0:(++i)) << Centered << "What do you get for just $10?";
-
- for (i=0,j=0;j<200;j++)
- Blaze << (i=(i==15)?0:(++i)) << Centered << "Automatic centering" << "\n\r";
-
- for (i=0,j=0;j<200;j++)
- Blaze << (i=(i==15)?0:(++i)) << Flushed << "Automatic right flushing" << "\n\r";
-
- for (i=0,j=0;j<200;j++)
- Blaze << (i=(i==15)?0:(++i)) << "Total color control" << "\n\r";
-
- for (i=0,j=0;j<200;j++)
- Blaze << (i=(i==15)?0:(++i)) << Centered << "Total position control" << "\n\r";
-
- -- Blaze; // 43/50 EGA/VGA if possible
-
- -Blaze (0,0);
- Blaze.InvisibleCursor();
-
- for (i=0,j=0;j<300;j++)
- Blaze << (i=(i==15)?0:(++i)) << Centered << "Automatic 43/50 Line EGA/VGA Support!" << "\n\r";
-
- ++ Blaze; // 25 CGA return
- Blaze.InvisibleCursor();
-
- for (i=0,j=0;j<30000;j++)
- Blaze (rand()%55,rand()%25) << (i=(i==15)?0:(++i)) << "Turn scolling on or off!";
-
- Blaze.EraseArea(0,12,80,3,112);
- Blaze (0,13) << (1|112) << Centered << " This string was displayed 30000 times! ";
- sleep(5);
-
- -Blaze;
-
- for (i=0,j=0;j<10000;j++)
- Blaze.Box(rand()%55,rand()%15,(rand()%20)+4,(rand()%8)+4,i=(i==15)?0:(++i));
-
- Blaze.EraseArea(0,12,80,3,112);
- Blaze (0,13) << (1|112) << Centered << " Draw empty boxes! ";
- sleep(5);
- -Blaze;
-
- for (i=0,j=0;j<10000;j++)
- Blaze.BoxFilled(rand()%55,rand()%15,(rand()%20)+4,(rand()%8)+4,1|((i=(i==7)?0:(++i))<<4));
-
- Blaze.EraseArea(0,12,80,3,112);
- Blaze (0,13) << (1|112) << Centered << " Draw filled boxes! ";
- sleep(5);
-
- for (i=0,j=0;j<10000;j++)
- Blaze.EraseArea(rand()%55,rand()%15,(rand()%20)+4,(rand()%8)+4,(i=(i==7)?0:(++i))<<4);
-
- Blaze.EraseArea(0,12,80,3,112);
- Blaze (0,13) << (1|112) << Centered << " Fill areas! ";
- sleep(5);
- Blaze (0,13) << (1|112) << Centered << " Change colors of a region! ";
-
- for (i=0,j=0;j<10000;j++)
- Blaze.BoxAttribute(rand()%55,rand()%15,(rand()%20)+4,(rand()%8)+4,1|((i=(i==7)?0:(++i))<<4));
-
- Blaze.EraseArea(0,12,80,3,112);
- Blaze (0,13) << (1|112) << Centered << " Change colors of a region! ";
- sleep(5);
- -Blaze;
-
- for (i=0,j=0,k=0;j<10000;j++)
- Blaze.CharacterFill(rand()%55,rand()%15,(rand()%20)+4,(rand()%8)+4,(k=(k==15)?0:(++k)),(i=(i==255)?0:(++i)));
-
- Blaze.EraseArea(0,12,80,3,112);
- Blaze (0,13) << (1|112) << Centered << " Fill areas with characters! ";
- sleep(5);
-
- for (k=0;k<3;k++)
- {
- for (i=0,j=0;j<500;j++)
- Blaze.ScrollUp(rand()%55,rand()%15,(rand()%20)+4,(rand()%8)+4);
- for (i=0,j=0;j<500;j++)
- Blaze.ScrollDown(rand()%55,rand()%15,(rand()%20)+4,(rand()%8)+4);
- }
-
- Blaze.EraseArea(0,12,80,3,112);
- Blaze (0,13) << (1|112) << Centered << " Scroll any region of the screen! ";
- sleep(5);
- -Blaze;
-
- for (i=0,j=0;j<5000;j++)
- {
- Blaze.Shadow(k=rand()%55,l=rand()%15,m=(rand()%20)+4,n=(rand()%8)+4);
- Blaze.BoxFilled(k+1,l+1,m,n,1|((i=(i==7)?1:(++i))<<4));
-
- }
-
- Blaze.EraseArea(0,12,80,3,112);
- Blaze (0,13) << (1|112) << Centered << " Draw boxes with shadows! ";
- sleep(5);
-
- s=new char[160*Blaze.WhatHeight()];
- Blaze.GetArea(0,0,80,Blaze.WhatHeight(),s);
- Blaze.EraseArea(0,12,80,3,112);
- Blaze (0,13) << (1|112) << Centered << " Save an area or all of the screen! ";
- sleep(5);
- -Blaze; // Clear screen
- Blaze.EraseArea(0,12,80,3,112);
- Blaze (0,13) << (1|112) << Centered << " Watch me restore the last screen! ";
- sleep(5);
- Blaze.PutArea(0,0,80,Blaze.WhatHeight(),s);
- Blaze.EraseArea(0,12,80,3,112);
- Blaze (0,13) << (1|112) << Centered << " Walla! Here it is! ";
- sleep(5);
- delete s;
-
- -Blaze (0,0); // (0,0) -- home cursor
-
- for (i=0,j=0;j<400;j++)
- Blaze << (i=(i==15)?0:(++i)) << Centered << "All of the samples you just saw were repeated 10,000 times each!"
- << "\n\r";
-
- for (i=0,j=0;j<200;j++)
- Blaze << (i=(i==15)?0:(++i)) << Centered << "Read the DEMO.DOC file for more information!"
- << "\n\r";
-
- for (i=0,j=0;j<300;j++)
- Blaze << (i=(i==15)?0:(++i)) << Centered << "Order the TC++ Blaze Class Today! Only $10!"
- << "\n\r";
-
- Blaze.VisibleCursor();
- }
-