Пример #1
0
static __attribute__((noreturn)) void StartModel()
{
    const int screenHeight  = 768;
    const int screenWidth   = 1024;
    const bool singleStep   = Options.singleStep;
    Model_Map map;

    if (Renderer_Init(screenWidth, screenHeight) != Renderer_SUCCESS) //TODO: move this up a level
    {
        printf(Renderer_GetLastError());
        exit(1);
    }
    LoadConfiguration();

    Model_Map_Init(&map, Options.mapWidth, Options.mapHeight);
    Model_Init(&map);

    MapRenderer_StartScene(&map, screenWidth, screenHeight);
    while(!InputHandler_ExitRequested())
    {
        if(!singleStep || InputHandler_NextStepRequested())
        {
            Model_Next();
            Model_GraphIteration();
        }
        MapRenderer_DrawMap();
    }
    MapRenderer_EndScene();
    Model_Map_Free(&map);
    Model_Free();
    Renderer_Quit();//TODO: move this up a level
    exit(0);
}
Пример #2
0
static void Main_Game_Init(HWND hWnd, BOOL bWindowed, HINSTANCE hInstance)
{
	sgRendererInitParms InitParms;
	InitParms.Width = 1024;
	InitParms.Height = 768;
	InitParms.Windowed = FALSE != bWindowed;
	InitParms.Wnd = hWnd;

	Renderer_Init( &InitParms );

	Joes2ObjMan = new CJoes2ObjMan(256); 
	Game.Init(VIEW_WIDTH,VIEW_HEIGHT,Joes2ObjMan,hWnd);
}
Пример #3
0
void Game()
{
    bool running = Renderer_Init( 800, 600, "Bahamuto" );

	Texture_Create( "Data\\Image\\bahaAlpha.png" );
	Shader_Create("Data\\Shader\\texture.fx");

	while( running  && !Window_GetMessage() )
	{
		/*float delta_time = 1.0f/60.0f;*/
		// Run systems
		Renderer_Draw();		
	}
		
	Renderer_Terminate();
}