/* The following variables are used by all parts of the demo. */
block virt; /* Virtual screen used for background work */
block virt2;
block virt3;
block virt4;
int i;
color pal1[256]; /* A few different palettes for fading, etc */
color pal2[256];
color pal3[256];
color pal4[256];
color pal5[256];
color blackpal[256]; /* Full of 0's */
block sprites[128];
int shaker = 0;
/* Gummi letters */
#define TEXTPOS 75
int skullx[10];
char let;
int skullpos[10];
int ypos[400];
int x,y;
char skullmessage[] = "THE CREDITS.... CODING AND GRAPHICS BY GOOROO FIRST TUNE BY FALCON SECOND TUNE BY GRAND VERBALIZER THIRD TUNE BY GOOROO ENDING ANSI BY PYROMANIAX ";
int donegummiscroll = 0;
int music_on;
void calc_sin (void);
void start_intro (void);
void start_gummi_scroller (void);
void draw_gummi (void);
void calculate_gummi (void);
void draw_letters (void);
void calc_sinus (void);
void start_vector_balls (void);
void run_vector_balls (void);
void start_starfield (void);
void start_lens (void);
void start_plasma (void);
void draw_land_plasma(void);
void start_landscape (void);
void start_firecube (void);
void startmusic(char *filename);
void stopmusic(int fade);
void fade_in(int start, int end, int speed, color *pal);
void fade_out(int start, int end, int speed, color *pal);
void show_end_text (void);
void start_warper (void);
/* Sound System */
PSMFH PSM;
SC S;
PM *p;
MS *m;
int MVol = 252;
long memleft=999999;
int lowest = 0;
int gravis = 0;
void shut_down (char *str)
{
printf ("\n\n%s\n\n",str);
exit (1);
}
void main (void)
{
extern void showmem(void);
clrscr ();
printf ("Gooroo Nation - Startup\n\n");
delay (400);
// printf ("Initializing Sound System\n");
// delay (400);
setlib ("gn.dmo");
setpassword ("voodoo");
startmusic ("gn.psm");
printf ("Checking for VGA\n");
if (!vgadetected())
shut_down ("No VGA card found!");
printf ("Checking for 386\n");
if (wdetectcpu () < 3)
shut_down ("This demo requires a 386 or better.");
/* printf ("Checking Free memory\n");
if (farcoreleft() < 200000L)
shut_down ("Not enough memory to run demo.");*/
printf ("Starting Demo...\n");
wreadpalette (0,255,pal2);
fade_out (0, 16, 4, pal2);
vga256 ();
if (music_on)
{
mMusicPlay (&PSM, "MAINSONG");
mSetMusicVolume (MVol);
}
vga256 ();
wsetpalette (0, 255, pal1); /* Set to a black palette */
calc_sin ();
start_intro ();
start_warper ();
start_vector_balls ();
start_starfield ();
start_lens ();
start_plasma ();
start_greets ();
start_landscape ();
if (music_on)
{
for (i = 0; i < 64; i++) /* Fade out volume and colors */
{
if (MVol > 4)
{
MVol -= 4;
mSetMusicVolume (MVol);
}
wretrace (); /* DELAY doesn't work with Interrupts */
wretrace (); /* Use several retrace commands instead */