2012-04-19 14:35:52 +08:00
|
|
|
#include "main.h"
|
|
|
|
#include "AppDelegate.h"
|
2012-05-02 17:50:26 +08:00
|
|
|
#include "CCEGLView.h"
|
|
|
|
|
|
|
|
USING_NS_CC;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2012-05-03 10:12:00 +08:00
|
|
|
// 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
|
|
|
|
|
2012-05-02 17:50:26 +08:00
|
|
|
// create the application instance
|
|
|
|
AppDelegate app;
|
2013-07-12 13:11:21 +08:00
|
|
|
EGLView* eglView = EGLView::getInstance();
|
2012-12-29 14:50:00 +08:00
|
|
|
eglView->setViewName("HelloLua");
|
2012-08-21 15:28:43 +08:00
|
|
|
eglView->setFrameSize(480, 320);
|
2013-06-20 14:17:10 +08:00
|
|
|
int ret = Application::sharedApplication()->run();
|
2012-05-03 10:12:00 +08:00
|
|
|
|
|
|
|
#ifdef USE_WIN32_CONSOLE
|
|
|
|
FreeConsole();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return ret;
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|