axmol/samples/Lua/TestLua/proj.win32/main.cpp

38 lines
815 B
C++
Raw Normal View History

2012-08-23 16:10:50 +08:00
#include "main.h"
#include "AppDelegate.h"
#include "cocos2d.h"
2012-08-23 16:10:50 +08:00
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;
EGLView eglView;
2013-09-18 18:26:03 +08:00
eglView.init("TestLua",900,640);
2012-08-23 16:10:50 +08:00
int ret = Application::getInstance()->run();
2012-08-23 16:10:50 +08:00
#ifdef USE_WIN32_CONSOLE
FreeConsole();
#endif
return ret;
}