Example #1
0
int main(int argc, char* argv[])
{
	printf("--- MIDISYS ENGINE: bilotrip foundation MIDISYS ENGINE 0.1 - dosing, please wait\n");
	
	// init graphics

	InitGraphics(argc, argv);

	// load shaders

	eye_shaderProg = LoadShader("eye");
	fsquad_shaderProg = LoadShader("fsquad");
	redcircle_shaderProg = LoadShader("redcircle");

	// load textures

	grayeye_tex = LoadTexture("grayeye.png");

	room_tex[0] = LoadTexture("room1.png");
	room_tex[1] = LoadTexture("room2.png");
	room_tex[2] = LoadTexture("room3.png");

	// init MIDI sync and audio

	LoadMIDIEventList("music.mid");
	ParseMIDITimeline("mapping.txt");
	InitAudio("music.mp3");

	// start mainloop

	StartMainLoop();
	return 0;
}
Example #2
0
void mainLoop()
{
	if(lpSoundDS && lpSoundDS->lpNextMusic){
		lpSoundDS->NextMusicStart();
	}
	lookPadState();
	lookPadRepeat();

	switch(sysInf.execMode){
	  case movie_mode:
		if(FALSE==lpMovie->IsPlay()){
			my_delete(lpMovie);
			static BOOL bOpOnece = TRUE;
			if(bOpOnece){
				lpSoundDS->ChangeMusic(bgmHandle,pack_bgmfile,2,FALSE,0);
				lpMovie = new CMovie();
				lpMovie->OpenMovie("title.avi",-1,TRUE);
				bOpOnece = FALSE;
			}else{
				PlayEffectNum(evtHandle[1],SelectSnd);
				StartMainLoop();
			}
		}
		return;
	  case opening_mode:
		titleWnd->Exec();
		break;
	  case staffRoll_mode:
		lpStaffRoll->Exec();
		break;
	  case event_exec_mode:
	  case select_exec_mode:
		EXEC_ControlLang( &LangData );
		break;
	  case menu_mode:
		lpMenuWnd->Exec();
		break;
	  case kabegami_mode:
		lpKabeSetWnd->Exec();
		break;
	  case staffmode_mode:
		lpStaffmodeWnd->Exec();
		break;
	  case save_mode:
	  case load_mode:
		if(FALSE==saveWnd->selectExec()){
			my_delete(saveWnd);
		}
		break;
	  case backlog_mode:
		backLog.Exec();
		break;
	}
keyInOut:
	if(Render()){
		HDC		hDC = GetDC(sysInf.hWnd);
		BitBlt(hDC,0,0,WIN_SIZEX,WIN_SIZEY,g_DibInf.memDC,0,0,SRCCOPY);
		ReleaseDC(sysInf.hWnd,hDC);
	}
} // mainLoop
Example #3
0
int main(int argc, char** argv)
{
	// Initialise the framework
	Init(argc, argv);

	//Start the main loop.
	StartMainLoop();
	
	return 0;
}
Example #4
0
bool DBAServer::Start()
{
	WatchDog::Instance().RegWatchDog( GAME_THREAD_WATCHDOG_ID, "DBA-Main-Thread", DBA_FRAME_TIME * 10);
	return StartMainLoop(DBA_FRAME_TIME);
}
Boolean CCXApplication::EventHandler(EventType * pEvent)
{
    Boolean bHandled = FALSE;
    switch (pEvent->eType)
    {
    case EVENT_AppLoad:
        if (! applicationDidFinishLaunching())
        {
            CCScheduler::purgeSharedScheduler();
            SendStopEvent();
        }
#ifdef _TRANZDA_VM_
        QueryPerformanceFrequency(&s_nFreq);
        QueryPerformanceCounter(&s_nLast);
#else
        s_nLast = getTimeOfDayMicroSecond();
#endif
        bHandled = TRUE;
        break;

    case EVENT_AppStopNotify:

        break;
    case EVENT_AppActiveNotify:
        if (pEvent->sParam1 == 0)
        {
            if (!m_bInBackground)
            {
                applicationDidEnterBackground();
                m_bInBackground = true;
            }

            if (CCDirector::sharedDirector()->isPaused())
            {
               StopMainLoop();
            }
            CfgTurnOnBackLight();
            EnableKeyLock();
        }
        else if (pEvent->sParam1 > 0)
        {
            if (m_bInBackground)
            {
                applicationWillEnterForeground();
                m_bInBackground = false;
            }

            StartMainLoop();
            
            CfgTurnOnBackLightDelay(0x7fffffff);
            // if KeyLock disactived, disable it.
            if (! CfgKeyLock_GetActive())
            {
                DisableKeyLock();
            }
        }
        break;
    }

    if (! bHandled)
    {
        bHandled = TApplication::EventHandler(pEvent);
    }
    return bHandled;
}
Example #6
0
wxThread::ExitCode freeglut::Entry() {
    StartMainLoop();
    return 0;
}