Beispiel #1
0
void MyConsole::Run() {
    Init();

    // Disable auto render on format
    SetAutoRender(0);
    
    while (1) {
        RenderApp();
        Update();
        P1.update();
        P2.update();
        P1.Collision(&P2);
        P2.Collision(&P1);
        P1.Finalize();
        P2.Finalize();
        if (P1.score >= 5) {
            Alert("Player 1 Wins");
            P1.setTexture(bg);
            P2.setTexture(bg);
        } else if (P2.score >= 5) {
            Alert("Player 2 Wins");
            P1.setTexture(bg);
            P2.setTexture(bg);   
        }
        mdelay(30);
    }
}
Beispiel #2
0
    void Browser::Run(const char *pRessourcePath) {
        Init(pRessourcePath);

        // Disable auto render on format
        SetAutoRender(0);
#ifdef WIN32
        strcpy(currentPath, "c:/");
#else
        //        strcpy(currentPath, "uda0:/");
        handle = -1;
        char * s = NULL;
        int next_device_n = 0;
        
        next_device_n = get_devices(next_device_n, s);
        
        strcpy(currentPath, s);
        
        ScanDir();
#endif

        while (1) {
            RenderApp();
            Update();
        }
    }
    void Browser::Run(const char *pRessourcePath) {
        Init(pRessourcePath);

        // Disable auto render on format
        SetAutoRender(0);
#ifdef WIN32
        strcpy(currentPath, "c:/");
#else
        handle = 0;
        char path[2048];
        handle = get_devices(handle, path);
        
        strcpy(currentPath, path);

        ScanDir();
#endif

        while (1) {
            RenderApp();
            Update();
        }
    }