
#include "zelda.h"
#include "misc.h"
#include "keyboard.h"
#include "timer.h"
#include "bitmap.h"
#include "datafile.h"
#include "sound.h"
#include "gfx.h"
#include "menu.h"
#include "game.h"
#include "intro.h"


int main(int argc,char **argv)
{
  StartupMsg();
  CheckArgs(argc,argv);
  allegro_init();
  SetGfxMode(GFX_AUTODETECT,320,240,8);
  InstallKeyboard();
  InstallTimer();
  CreateBitmaps();
  LoadDatafiles();
  LoadHiscores();
  LoadMap();
  InstallSound();
  ShowIntro();
  DoMenuLoop();
  RemoveSound();
  UnloadDatafiles();
  DestroyBitmaps();
  RemoveTimer();
  RemoveKeyboard();
  SetGfxMode(GFX_TEXT,80,25,8);
  allegro_exit();
  return 0;
}

