예제 #1
0
int APIENTRY _tWinMain(HINSTANCE hInstance,
					   HINSTANCE hPrevInstance,
					   LPTSTR    lpCmdLine,
					   int       nCmdShow){
	UNREFERENCED_PARAMETER(hPrevInstance);
	UNREFERENCED_PARAMETER(lpCmdLine);

	g_hInstance = hInstance;

	int nRet = 0;
	AppDelegate app;
	nRet = app.Run();

	return nRet;
}
예제 #2
0
int main(int argc, char **argv)
{

	int exit_code = 0;

	bool bServiceMode = false;
	bool bInterpreterMode = false;

	std::string sCmdLine;

	for(int i=1;i<argc; ++i)
	{
		// for linux, we will check the command line to see if it contains "-d", which will run in service mode.
		if(strcmp(argv[i], "-d") == 0)
		{
			bServiceMode = true;
		}
		else if(strcmp(argv[i], "-D") == 0)
		{
			bServiceMode = false;
		}
		else if(strcmp(argv[i], "-i") == 0)
		{
			bInterpreterMode = true;
		}
		else if (argv[i])
		{
			if (sCmdLine.empty())
				sCmdLine = argv[i];
			else
			{
				sCmdLine += " ";
				sCmdLine += argv[i];
			}
		}
	}

    AppDelegate* app = new AppDelegate();
    app->SetMacCommandLine(sCmdLine);

    app->Run();

    return 0;
}
예제 #3
0
파일: main.cpp 프로젝트: BigHand/cocos2d-x
void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv*  env, jobject thiz, jint w, jint h)
{
    if (!cocos2d::CCDirector::sharedDirector()->getOpenGLView())
    {
        cocos2d::CCEGLView *view = new cocos2d::CCEGLView();
        view->setFrameWitdAndHeight(w, h);
        cocos2d::CCDirector::sharedDirector()->setOpenGLView(view);

        CCFileUtils::setRelativePath(IMG_PATH);

        AppDelegate app;
        app.Run();
    }
    else
    {
        cocos2d::CCTexture2D::reloadAllTextures();
        cocos2d::CCDirector::sharedDirector()->setGLDefaultValues();
    }
}
예제 #4
0
void initProgram()
{
	AppDelegate app;
	app.Run();
}