//
//  main.m
//  GlobalGameJam15
//
//  Created by Cesar Parent on 23/01/2015.
//  Copyright (c) 2015 Cesar Parent. All rights reserved.
//

#include <PixelKit/PixelKit.h>
#include <time.h>
#include "Defines.h"
#include "TitleScreen.h"

int main(int argc, char *argv[]) {
	
	using namespace PixelKit;
	try
	{
		srand((unsigned int)time(nullptr));
		Game ggj15(kGameName, kGameWidth, kGameHeight);
		SDL_ShowCursor(false);
		ggj15.run(new TitleScreen(ggj15));
	}
	catch(const std::runtime_error* e)
	{
		SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
								 "Runtime Error",
								 e->what(),
								 nullptr);
	}
	return 0;
}
