#include "zelda.h"
#include "gfx.h"
#include "sound.h"
#include "intro.h"
#include "misc.h"


void CheckArgs(int argc,char **argv)
{
   int i;
   svga=FALSE;
   svgaStretch=FALSE;
   disableSound=FALSE;
   noIntro=FALSE;
   fadeSpeed=9;
   info=FALSE;

   for(i=1;i<argc;i++)
   {
      if(!stricmp(argv[i],"-svga"))
        svga=TRUE;
      if(!stricmp(argv[i],"-svgaStretch"))
        svgaStretch=TRUE;
      if(!stricmp(argv[i],"-noSound"))
        disableSound=TRUE;
      if(!stricmp(argv[i],"-noIntro"))
        noIntro=TRUE;
      if(!stricmp(argv[i],"-info"))
        info=TRUE;
      if(!stricmp(argv[i],"-fadeSpeed"))
      {
        fadeSpeed=atoi(argv[i+1]);
        i++;
      }
   }
}

void SnapShot()
{
   BITMAP *bmp;
   PALETTE pal;
   get_palette(pal);
   bmp=create_sub_bitmap(screen,0,0,320,240);
   save_bitmap("dump.bmp",bmp,pal);
   destroy_bitmap(bmp);
}

void StartupMsg()
{
  clrscr();
  delay(2000);
  printf("%cWarning!!\nUnfinished game alert...\nThere is nothing beyond the menus!!\n\n",7);
  printf("press a key\n");
  getch();
}

void LoadHiscores()
{
    FILE *f=fopen("zelda.hi","rb");
    fread(&hiscoreList,sizeof(struct HISCORE)*10,1,f),
    fclose(f);
}
void SaveHiscores()
{
    FILE *f=fopen("zelda.hi","wb");
    fwrite(&hiscoreList,sizeof(struct HISCORE)*10,1,f),
    fclose(f);
}


