//#define USECONSOLE
#include "Wumbo-WindowsRoot.h"
#include "Wumbo-Program.h"
#include "Wumbo-Types.h"
extern Wumbo::Program *WUMBOFRAMEWORK_GETNEWPROGRAM();
#if PLATFORM_WINDOWS
#include <winsock.h>
#include <windows.h>
#include <mmsystem.h>


#pragma comment(lib,"sfml-system-s.lib")
#pragma comment(lib,"sfml-window-s.lib")
#pragma comment(lib,"sfml-graphics-s.lib")
#pragma comment(lib,"sfml-audio-s.lib")
#pragma comment(lib,"sfml-network-s.lib")
#pragma comment(lib,"xinput.lib")
#pragma comment(lib,"winmm.lib")
#pragma comment(lib,"ws2_32.lib")
#pragma comment(lib,"glew.lib")
#endif

//#pragma comment(lib,"glu32.lib")

//

#ifndef USECONSOLE
	#ifdef _WIN32
		int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int nCmdShow)
	#else
		int main()
	#endif
#else
	int main()
#endif
{
	/*Wumbo::grid<int> bob(2,2);
	bob.set(0,0,1);
	bob.set(1,0,2);
	bob.set(0,1,3);
	bob.set(1,1,4);
	printf("%i %i\n%i %i\n",bob.get(0,0),bob.get(0,1),bob.get(1,0),bob.get(1,1));*/
#if PLATFORM_WINDOWS
	timeBeginPeriod(1);
	WSADATA wsaData;
    if (WSAStartup(MAKEWORD(2,0), &wsaData) != 0) {
        fprintf(stderr, "WSAStartup failed.\n");
        exit(1);
    }
#endif
	Wumbo::WindowsRoot root;
	Wumbo::Program *prog = WUMBOFRAMEWORK_GETNEWPROGRAM();
	root.go(prog);
#if PLATFORM_WINDOWS
	timeEndPeriod(1);
	WSACleanup();
#endif
	return 0;
}