/* fatal.c */
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include "fatal.h"
#include "dsif.h"

void fatal_error(char *message, char *file, int line)
{
   char errbuf[512];

	ShutdownSound();

   if (file) {
      sprintf(errbuf, "Error (%s line %d): %s\n", file, line, message);
      message = errbuf;
   }
	MessageBox(NULL, message, "Erkness!!", MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL);

   ExitProcess(1); // Win32's exit()
}

