mirror of https://github.com/axmolengine/axmol.git
38 lines
863 B
C++
38 lines
863 B
C++
|
#include "main.h"
|
||
|
#include "AppDelegate.h"
|
||
|
#include "CCEGLView.h"
|
||
|
|
||
|
USING_NS_CC;
|
||
|
|
||
|
// uncomment below line, open debug console
|
||
|
// #define USE_WIN32_CONSOLE
|
||
|
|
||
|
int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||
|
HINSTANCE hPrevInstance,
|
||
|
LPTSTR lpCmdLine,
|
||
|
int nCmdShow)
|
||
|
{
|
||
|
UNREFERENCED_PARAMETER(hPrevInstance);
|
||
|
UNREFERENCED_PARAMETER(lpCmdLine);
|
||
|
|
||
|
#ifdef USE_WIN32_CONSOLE
|
||
|
AllocConsole();
|
||
|
freopen("CONIN$", "r", stdin);
|
||
|
freopen("CONOUT$", "w", stdout);
|
||
|
freopen("CONOUT$", "w", stderr);
|
||
|
#endif
|
||
|
|
||
|
// create the application instance
|
||
|
AppDelegate app;
|
||
|
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
|
||
|
eglView->setFrameSize(800, 450);
|
||
|
|
||
|
int ret = CCApplication::sharedApplication()->run();
|
||
|
|
||
|
#ifdef USE_WIN32_CONSOLE
|
||
|
FreeConsole();
|
||
|
#endif
|
||
|
|
||
|
return ret;
|
||
|
}
|