コード例 #1
0
ファイル: main.cpp プロジェクト: reworks/ECSREngine
int main(int argc, char* argv[])
{  
	App game;

	game.Init();

	return game.Run();
}
コード例 #2
0
ファイル: main.cpp プロジェクト: gawallsibya/BIT_C-CPP
int main()
{
	App app;
	app.Init();
	app.Run();
	app.Exit();
	return 0;
}
コード例 #3
0
ファイル: WinMain.cpp プロジェクト: ElanHR/Provincial
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 
    LPSTR lpszCmdLine, int nCmdShow)
{
    App *A = new App;                    //create a new App
    A->Init(hInstance, nCmdShow);        //initalize App
    A->MessageLoop(hInstance, nCmdShow); //begin App's "lifetime" (looping for messages.  all frames occur here.)
    A->FreeMemory();                     //kill App
    return 0;                            //exit Main
}
コード例 #4
0
ファイル: main.cpp プロジェクト: InfiniteYuan1/STM32
int	main(void){
	SystemInit();
	app.Init();
//	timer.Start();

	while(true){
		app.loop();
	}
}
コード例 #5
0
ファイル: WinMain.cpp プロジェクト: konlil/kexe
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
	App *a = new App;
	a->Init(hInstance, nCmdShow);
	a->MessageLoop(hInstance, nCmdShow);
	a->FreeMemory();
	delete a;

	return 0;
}
コード例 #6
0
ファイル: main.cpp プロジェクト: Shiroy/NetworkMove
int main()
{
    App theApp;

    theApp.Init();
    theApp.Run();
    theApp.Exit();

    return 0;
}
コード例 #7
0
ファイル: main.cpp プロジェクト: AndersUa/NBody
int main(int argc, char** argv)
{
	App* app = new App(GLUTBackend::GetInstance());
	if (!app->Init(argc, argv))
	{
		fprintf(stderr, "Init faild");
		getchar();
		return 1;
	}
	app->Run();
	delete app;
	return 0;
}
コード例 #8
0
ファイル: Main.cpp プロジェクト: LambdaF/HobbyTurnbased
int WINAPI WinMain(HINSTANCE , HINSTANCE , LPSTR , int )
{
	SetCurrentDirectory("..\\Bin");

	HGE* hgeEngine=HGE_Init();

	if(hgeEngine==NULL)
	{
		return(-1);
	}

	MSG windowsMessage;

	Renderer::Create( hgeEngine );
	Root::Create();

	Input::InputWrapper input;
	input.Initialize( hgeEngine->System_GetState( HGE_HWND ), Vector2f() );

	Root::GetInstance()->AttachInputWrapper( &input );

	App application;

	application.Init();
	for(;;)
	{
		// check for messages
		if ( PeekMessage( &windowsMessage, NULL, 0, 0, PM_REMOVE ) ) 
		{
			// handle or dispatch messages
			if ( windowsMessage.message == WM_QUIT )
			{
				break;
			}
			TranslateMessage( &windowsMessage );
			DispatchMessage( &windowsMessage );
		} 
		else
		{
			application.update();
		}

	}

	HGE_Shutdown(hgeEngine);

	// Clean up and shutdown
	return 0;
}
コード例 #9
0
ファイル: main.cpp プロジェクト: gitter-badger/SmartHome-2
int
main(int argc, char* argv[])
{
	app.Init();
	// Infinite loop
	while (1)
	{
		//光强传感器值,大概范围0~300
		sensor.Converted();
		app.mFireSensor = sensor.mConvertedVoltage[0]*100;
		app.mSmokeSensor = sensor.mConvertedVoltage[1]*100;
		//循环 
		app.loop();
	}
}
コード例 #10
0
ファイル: App.cpp プロジェクト: hawncho/zombiegame
int main(int argc, char** argv)
{
	App app;

	// Create a GLUT window
	InitializeWindow(argc, argv, WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_TITLE, &app);

	// Initialize that app
	if (!app.Init())
	{
		fprintf(stderr, "Failed to initialize app.\n");
		system("pause");
		return 17;
	}

	return 0;
}
コード例 #11
0
ファイル: main.cpp プロジェクト: Neutree/SmartHome
int
main(int argc, char* argv[])
{
	TaskManager::DelayS(3);
	//系统初始化
	app.Init();
	//开启定时器
	timer.Start();
	//循环体
	while (1)
	{
		//将光传感器的值采集出来并且放到app对象的变量中
		lightSensor.Converted();//ADC转换
		app.mLightSensor = lightSensor.mConvertedVoltage[3]*100;//获取光感值
		
		
		//循环 
		app.loop();
	}
}
コード例 #12
0
extern "C" int SDL_main( int argc, char* argv[] )
#endif
{
    std::set_unexpected( HandleUnexpected );
	try {
#ifdef __linux__
		gtk_init(&argc,&argv);
#endif
		App app;
		app.Init( argc, argv );
		return app.Run();
	}
    catch ( std::bad_alloc &ex ) {
        ShowError( ex.what(), "Memory Exception in Application" );
    }
    catch ( std::exception &ex ) {
        ShowError( ex.what(), "Exception in Application" );
    }
    catch ( ... ) {
        ShowError( "Unknown Error!", "Unknown Error in Application" );
    }
	return -1;
}
コード例 #13
0
ファイル: Main.cpp プロジェクト: RedSray/JRPG
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
	{
		AllocConsole();
		freopen("CONIN$", "r", stdin); 
		freopen("CONOUT$", "w", stdout); 
		freopen("CONOUT$", "w", stderr); 
		//JUST FOR FUN
		std::cout << " ____  ____  ____  __  __  ___ " << std::endl;
		std::cout << "(  _ \\( ___)(  _ \\(  )(  )/ __)" << std::endl;
		std::cout << " )(_) ))__)  ) _ < )(__)(( (_-." << std::endl;
		std::cout << "(____/(____)(____/(______)\\___/\n" << std::endl;
		std::cout << "-Launching Application-\n" << std::endl;
	}

	App application;

	application.Init();

	application.Run();

	return 0;
};
コード例 #14
0
ファイル: main.cpp プロジェクト: howprice/sdl2-tetris
int main( int argc, char** argv )
{
	bool bFullScreen = false;
	unsigned int displayWidth = 1280;
	unsigned int displayHeight = 720;
	for( int i = 1; i < argc; ++i )
	{
		if( strcmp( argv[i], "--fullscreen" ) == 0 )
		{
			bFullScreen = true;
		}
		else if( strcmp( argv[i], "--width" ) == 0)
		{
			SDL_assert( argc > i ); // make sure we have another argument
			displayWidth = (unsigned int)atoi( argv[++i] );
		}
		else if(strcmp( argv[i], "--height" ) == 0)
		{
			SDL_assert( argc > i ); // make sure we have another argument
			displayHeight = (unsigned int)atoi( argv[++i] );
		}
	}

	App app;
	if( !app.Init( bFullScreen, displayWidth, displayHeight ) )
	{
		printf( "ERROR - App failed to initialise\n" );
		app.ShutDown();
		return 1;
	}

	app.Run();

	app.ShutDown();

	return 0;
}