void MyFrame::Load()
{
	/*actualizar->Destroy();
	jugar->Destroy();
	instrucciones->Destroy();*/
	/*NotifyNotification *n;
    	notify_init("Azpazeta");
    	n = notify_notification_new ("Azpazeta", "Se ha cargado correctamente la partida", NULL);
    	notify_notification_set_timeout(n, 3000);
	if (!notify_notification_show (n, NULL)) {
        wxPrintf("Error al enviar notificación.\n");        
    	}*/
	switch(city){
	case 1: Stage1(); break;
	case 2: Stage2(); break;
	case 3: Stage3(); break;
	case 4: Stage4(); break;
	case 5: Stage5(); break;
	case 6: Stage6(); break;
	case 7: Stage7(); break;
	case 11: Stage11(); break;
	case 12:Stage12(); break;
	default: Stage1(); break;

	}

}
예제 #2
0
파일: stage.cpp 프로젝트: ponyuzu/-
/******************************************************************************
* 関数名:SetStage
* 
* 引数  :
* 戻り値:
* 説明  :ステージ呼び出し
******************************************************************************/
void SetStage( void )
{

	switch( g_StageNum )
	{
	case STAGE_NONE:
		{
			break;
		}
	case STAGE_1:
		{
			Stage1();
			break;
		}
	case STAGE_2:
		{
			Stage2();
			break;
		}
	case STAGE_3:
		{
			Stage3();
			break;
		}
	}
}
예제 #3
0
/*--- Received when a download has ended ---*/
void Downloader::FileFinished(QNetworkReply* mreply)
{
    qDebug() << "Downloader::FileFinished";

    disconnect(reply, SIGNAL(readyRead()), this, SLOT(FilePart()));
    disconnect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(FileError(QNetworkReply::NetworkError)));
    mreply->deleteLater();
    lastDownloadedSize = 0;
    downloadedSize = 0;

    if (bDownloading)
	{
        bDownloading = false;
        timeoutTimer->stop();
		currentFile->close();
        delete currentFile;

		if (currentFtpFile == FTP_RELEASE_NOTES_FILE)
		{
            emit Stage1();
            DownloadFile(FTP_MANIFEST_ROOT, FTP_MANIFEST_FILE);
		}
		else if (currentFtpFile == FTP_MANIFEST_FILE)
		{
            emit Stage2();
		}
        else
		{
            emit FileDownloaded();
        }
    }
}
void SC_SequencedCommand::CallEveryStage()
{
	switch (mNextStage) {
		case 1 : if (!Stage1()) break; mNextStage++;
		case 2 : if (!Stage2()) break; mNextStage++;
		case 3 : if (!Stage3()) break; mNextStage++;
		case 4 : Stage4(); break;
	}
	Delete();
}
예제 #5
0
파일: ip.c 프로젝트: kelixin/wlan-portal
int CGImain(void) {
	char *s;
	ConnectDB();
	s = GetValue("s");
	GetMAC(remote_addr());
	if(MAC[0]==0) 
		DisplayStage('0',"无法获取MAC地址",1);
	if ( (s== NULL) || *s=='0') 
		Stage0();
	else if( *s=='1') 
		Stage1();
	else if(*s=='2') {
		 Stage2();
	} else Stage0();
	return 0;
}
예제 #6
0
//************************************************************************************
//************************************************************************************
void NDFluid2DCrankNicolson::CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo)
{
    KRATOS_TRY

    int FractionalStepNumber = rCurrentProcessInfo[FRACTIONAL_STEP];

    if(FractionalStepNumber < 3) //first step of the fractional step solution
    {
        int ComponentIndex = FractionalStepNumber - 1;
        Stage1(rLeftHandSideMatrix,rRightHandSideVector,rCurrentProcessInfo, ComponentIndex);
    }
    else if (FractionalStepNumber == 4)//second step of the fractional step solution
    {
        Stage2(rLeftHandSideMatrix,rRightHandSideVector,rCurrentProcessInfo);
    }

    KRATOS_CATCH("")
}
void SC_SequencedCommand::CallNextStage()
{
	bool sendAgain = false;
	FifoMsg msg;

	int isRealTime = mNextStage & 1;
	switch (mNextStage) {
		case 1 :
			sendAgain = Stage1(); // RT
			break;
		case 2 :
			sendAgain = Stage2(); // NRT
			break;
		case 3 :
			sendAgain = Stage3(); // RT
			break;
		case 4 :
			Stage4(); 			// NRT
			break;
	}
	mNextStage++;
	SC_AudioDriver *driver = AudioDriver(mWorld);
	if (sendAgain) {
		msg.Set(mWorld, DoSequencedCommand, 0, (void*)this);
		// send this to next time.
		if (isRealTime) {
			// send to NRT
			driver->SendMsgFromEngine(msg);
		} else {
			// send to RT
			driver->SendMsgToEngine(msg);
		}
	} else {
		if (isRealTime) {
			Delete();
		} else {
			// can only be freed from RT.
			msg.Set(mWorld, FreeSequencedCommand, 0, (void*)this);
			driver->SendMsgToEngine(msg);
		}
	}
}
예제 #8
0
int main(void)
{
    printf(" ---------------------------------------------------------------- \n");
    printf(" APPLE MAC MINI AppleIntelHD3000Graphics EXPLOIT OSX 10.11 \n"); 
    printf(" by Piotr Bania / CISCO TALOS \n");
    printf(" ---------------------------------------------------------------- \n\n\n");
    
    
    IOServiceClose(0);                      
    IOServiceOpen(0, 0, 0, 0);                 
    
    // if this fails and we are done 
    mem = Alloc(0, MEM_SIZE);
    
    
    printf("Mapping the kernel \n");
    
    if (MapKernel() == -1)
        return -1;
 
    printf("Initializing service \n");
    
    if (InitService("Gen6Accelerator") == -1)
        return -1;
    
    printf("Commencing stage 1 \n");
    
    if (Stage1() == -1)
        return -1;

    if (ResolveApi() == -1)
        return -1;

    printf("Commencing stage 2 \n");
     
    Stage2();
 
 
    return 1;
}
예제 #9
0
INT WINAPI wWinMain( HINSTANCE hInst, HINSTANCE, LPWSTR, INT ) // 프로그램 진입점
{
	WNDCLASSEX wc =                                                           // 윈도우 클래스 정의,등록
	{
		sizeof( WNDCLASSEX ), CS_CLASSDC, MsgProc, 0L, 0L,
		GetModuleHandle( NULL ), NULL, NULL, NULL, NULL,
		"ProG", NULL
	};
	RegisterClassEx( &wc );

	HWND hWnd = CreateWindow( "ProG", "ProG",  // 윈도우 생성
		WS_BORDER | WS_SYSMENU, 0, 0, 1680, 1030,     ////   좌표 변수 처리
		NULL, NULL, wc.hInstance, NULL );

	CDevice::GetInstance()->Init(hWnd, 1680, 1030);

	if( SUCCEEDED( InitD3D( hWnd ) ) ) // Direct3D초기화
	{
		ShowWindow( hWnd, SW_SHOWDEFAULT ); // 윈도우 출력
		UpdateWindow( hWnd );

		MSG msg;
		while(true) // 메시지 루프
		{
			if(PeekMessage(&msg, NULL,NULL, NULL, PM_REMOVE))
			{
				TranslateMessage( &msg );
				DispatchMessage( &msg );
			}
			else
			{
				first_time = GetTickCount();
				if(g_Load.Logo_Start == true)
				{
					Loading();
					if(g_Load.Out_Exit() == true)
					{
						PostQuitMessage( 0 );
					}

				}
				if(g_Load.Logo_Start == false)
				{
				Update(); 
				Destroy();
				Active();
				Collision();
				Create();
				Stage1();
				EL();
				World_Time = World_Time + tick;
				
				}
				Render();
				tick = (float)(GetTickCount() - first_time)/(float)1000;
			}
			if(msg.message == WM_QUIT)
			{
				break;
			}

		}
	}

	Cleanup();

	UnregisterClass( "ProG", wc.hInstance );  // 등록된 클래스 소거

	return 0;
}
예제 #10
0
void MyFrame::OnTecla(wxKeyEvent& event)
{
 int ascii = event.GetKeyCode();
	/*wxBitmap adrixdown("/opt/extras.ubuntu.com/azpazeta/media/Adrix.png", wxBITMAP_TYPE_PNG);
	wxBitmap adrixup("/opt/extras.ubuntu.com/azpazeta/media/AdrixUp.png", wxBITMAP_TYPE_PNG);
	wxBitmap adrixleft("/opt/extras.ubuntu.com/azpazeta/media/AdrixLeft.png", wxBITMAP_TYPE_PNG);
	wxBitmap adrixright("/opt/extras.ubuntu.com/azpazeta/media/AdrixRight.png", wxBITMAP_TYPE_PNG);*/
wxClientDC dc(dcpanel);
switch(city){
	case 1:{
	switch(ascii)
	{	
	//El primer edificio está a 26 pix-------333pix y 27 piy--------------330 piy
		
		case WXK_LEFT: //Left
		if(adry< 390 && adrx<330){}else{
		adrx-=5;
		RenderLeft(dc);
		if(adrx<=1 && mision>=6){Stage2();}
		}
		break;
		case WXK_UP: //UP
		if(adry< 390 && adrx<330){}else{
		adry-=5;
		RenderUp(dc);}
		break;
		case WXK_RIGHT: //Right
		//if(){}else{
		adrx+=5;
		RenderRight(dc);
		break;
		case WXK_DOWN: //Down
		//if(/*adry< 330 && adrx<334*/){}else{
		adry+=5;
		RenderDown(dc);
		break;
		case WXK_RETURN:
		if(adry<=400 && adrx<180)
		{if(adrx>=140){
		switch(mision){
		case 0:{
		RenderUp(dc);
		dc.DrawText("Quien eres?\nNo te conozco.\nEres el nuevo?\nPresiona ENTER", wxPoint(625, 470));
		mision++;
		break;}
		case 1:
		RenderUp(dc);
		dc.DrawText("Bueno, me presento\nSoy Alfredo\nEl alcalde de Azpazeta\nPresiona ENTER",wxPoint(625,470));
		mision++;
		break;
		case 2:{
		RenderUp(dc);
		wxString completo=wxT("Como te llamas?\n")+newname+wxT("\nBonito nombre\nPresiona ENTER");
		dc.DrawText(completo,wxPoint(625,470));
		mision++;
		break;}
		case 3:
		RenderUp(dc);
		dc.DrawText("Te has perdido?\nSupongo que querras casa\nPero no va ser gratis\nPresiona ENTER",wxPoint(625,470));
		mision++;
		break;
		case 4:
		RenderUp(dc);
		dc.DrawText("Necesitaras un trabajo\nNo se de que\nEso lo dejo a tu eleccion\nPresiona ENTER",wxPoint(625,470));
		mision++;
		break;
		case 5:
		RenderUp(dc);
		dc.DrawText("[Objetivo anadido:\nEncontrar trabajo]\nPista: El pueblo esta a la izquierda",wxPoint(625,470));
		mision++;
		break;
		}}}
		break;
		case WXK_ESCAPE:
		if(aux==1){SaveDialog* savedlg;savedlg=new SaveDialog();savedlg->ShowModal();savedlg->Destroy();Adrix->Destroy();Load();}
		break;
		case WXK_TAB:
		wxMessageBox(wxT("TAB"));
		break;
		case WXK_SHIFT:{
		wxString cheat=wxGetTextFromUser(wxT("Introduce el Cheat Code"), wxT("Debug Mode"),wxT(""));
		if(cheat==wxT("2")){Stage1();Stage2();}}
		break;
		case WXK_ALT:
		SetMenuBar(menuBar);
		break;
	}break;}
	case 2:
	switch(ascii)
	{	
	//El primer edificio está a 26 pix-------333pix y 27 piy--------------330 piy
		case WXK_LEFT:
		if(adry< 470){}else{
		adrx-=5;
		RenderLeft(dc);
		if(adrx<=1 && mision==15){Stage3();}
		}
		break;
		case WXK_UP:
		if(adry< 470){}else{
		adry-=5;
		RenderUp(dc);}
		break;
		case WXK_RIGHT:
		//if(){}else{
		adrx+=5;
		RenderRight(dc);//}
		break;
		case WXK_DOWN:
		//if(/*adry< 330 && adrx<334*/){}else{
		adry+=5;
		RenderDown(dc);
		//}
		break;
		case WXK_RETURN:
		if(adry<=480)
		{if(adrx>=108 && adrx<=170){
		switch(mision){
		case 6:
		RenderUp(dc);
		dc.DrawText("\"El INEM\nSeguro que aqui habra trabajo\nVoy a ver\"\nPresiona ENTER",wxPoint(625,470));
		mision++;
		break;
		case 7:
		RenderUp(dc);
		dc.DrawText("Siguiente...\n-Venia a por trabajo\n-Tenemos en la panificadora\nPresiona ENTER",wxPoint(625,470));
		mision++;
		break;
		case 8:
		RenderUp(dc);
		dc.DrawText("-Creo que me valdra\n-Siguiente...\n\nPresiona ENTER",wxPoint(625,470));
		mision++;
		break;
		case 9:
		RenderUp(dc);
		dc.DrawText("[Objetivo anadido:\nIr a la panificadora]",wxPoint(625,470));
		mision++;
		break;
		default:
		RenderUp(dc);
		dc.DrawText("Otra vez tu\nAnda vete para fuera\n",wxPoint(625,470));
		}}
		if(adrx>=474 && adrx<=542){
		switch(mision){
		case 10:
		RenderUp(dc);
		dc.DrawText("(Ruidos)\nPUES SI, IMPORTA\nAnda, vete a...\nPresiona ENTER",wxPoint(625,470));
		mision++;
		break;
		case 11:
		RenderUp(dc);
		dc.DrawText("-Y tu quien eres?\n-Vengo por el puesto\n-Ah, sí.\nPresiona ENTER",wxPoint(625,470));
		mision++;
		break;
		case 12:
		RenderUp(dc);
		dc.DrawText("Trabajaras de comerciante\nambulante.\nIras por los pueblos\nPresiona ENTER",wxPoint(625,470));
		mision++;
		break;
		case 13:
		RenderUp(dc);
		dc.DrawText("Vamos a ver como lo haces\nVe a la plaza de Gorguez\nLleva estos panes\nPresiona ENTER",wxPoint(625,470));
		mision++;
		break;
		case 14:
		RenderUp(dc);
		dc.DrawText("[Objetivo anadido:\nVender los panes en Gorguez]\nPista: La estacion de tren\ntiene trenes locales",wxPoint(625,470));
		mision++;
		break; 
		default:
		RenderUp(dc);
		dc.DrawText("(Esta cerrado)",wxPoint(625,470));
		break;
		}}}

		break;
		case WXK_ESCAPE:
		if(aux==1){SaveDialog* savedlg;savedlg=new SaveDialog();savedlg->ShowModal();savedlg->Destroy();Load();}
		break;
		case WXK_TAB:
		SetMenuBar(menuBar);
		break;
		case WXK_SHIFT:{
		wxString cheat=wxGetTextFromUser(wxT("Introduce el Cheat Code"), wxT("Debug Mode"),wxT(""));
		if(cheat==wxT("2")){Stage1();Stage2();}}
		break;
		case WXK_ALT:
		SetMenuBar(menuBar);
		break;
		}break;
	case 3:
	switch(ascii)
	{	
	//El primer edificio está a 26 pix-------333pix y 27 piy--------------330 piy
		case WXK_LEFT:
		if((adry<156 && adrx<307) || ((adry<383 && adry>200) && adrx<307) || (adry<383 && adrx>503)){if(adrx==504){adrx--; RenderLeft(dc); }}else{
		if(adrx<=1){Stage4();}else{
		GOLEFT}
		//if(adrx==1 && mision>=6){Stage2();}
		}
		break;
		case WXK_UP:
		if((adry<156 && adrx<307) || ((adry<383 && adry>200) && adrx<307) || (adry<383 && adrx>503)){printf("Valor X=%d Y=%d",adrx, adry);if(adry==199){adry--; RenderUp(dc);}}else{
		if(adry<=5){Stage7();}
GOUP}
		break;
		case WXK_RIGHT:
		if((adry<156 && adrx<307) || ((adry<383 && adry>200) && adrx<307) || (adry<383 && adrx>503)){if(adrx==306){adrx++; RenderRight(dc); }}else{
		if(adrx>=746){Stage2();}
GORIGHT}
		break;
		case WXK_DOWN:
		if((adry<156 && adrx<307) || ((adry<383 && adry>200) && adrx<307) || (adry<383 && adrx>503)){if(adry==382 || adry==155){adry++; RenderDown(dc);}}else{
GODOWN}
		break;
		case WXK_RETURN:
                //Trenes
		if(adry<=427 && (adrx>=633 && adrx<=670)){
		switch(mision){
		case 15:
		RenderUp(dc);
		dc.DrawText("-Supongo que es la estacion\nVamos a ver como es\nGorguez\nPresiona ENTER",wxPoint(625,470));
		mision++;
		break;
		default:
		wxPrintf("Cargando...");
		TrenDialog* trendlg=new TrenDialog();
		wxPrintf("Mostrando...");
		trendlg->ShowModal();
		trendlg->Destroy();
		Load();
		break;
		}}
                //Piso franco
                if(adry<=196 && (adrx>=156 && adrx<=182)){
		SaveDialog* savedlg;
                savedlg=new SaveDialog();
                savedlg->ShowModal();
                savedlg->Destroy();
		Load();
                }
		break;
		case WXK_ESCAPE:
		if(aux==1){SaveDialog* savedlg;savedlg=new SaveDialog();savedlg->ShowModal();savedlg->Destroy();Load();}
		break;
		case WXK_TAB:
		wxMessageBox(wxT("TAB"));
		break;
		case WXK_SHIFT:
		break;
		case WXK_ALT:
		SetMenuBar(menuBar);
		break;
		}break;
	case 4:
	switch(ascii)
	{	
	//366-222
		case WXK_LEFT:
			if(adrx<=283){}else{
			GOLEFT}
		break;
		case WXK_UP:
			if(adry<=204 && adrx>=474){}else{
			if(adry<=10){Stage5();}
GOUP}
		break;
		case WXK_RIGHT:
			if((adry<=204 && adrx>=475) || (adry>=366 && adrx>=474)){}else{
			if(adrx>=746){Stage3();}
	GORIGHT}
		break;
		case WXK_DOWN:
			if(adry>=366 && adrx>=474){}else{
			GODOWN}
		break;
		case WXK_RETURN:
		if((adrx>=616 || adrx<=688) && adry>=360){
		DivelKey* keydlg=new DivelKey();
		keydlg->ShowModal();
		keydlg->Destroy();}
		break;
		case WXK_ESCAPE:
		if(aux==1){SaveDialog* savedlg;savedlg=new SaveDialog();savedlg->ShowModal();savedlg->Destroy();Load();}
		break;
		case WXK_TAB:
		
		break;
		case WXK_SHIFT:
		
		break;
		case WXK_ALT:
		SetMenuBar(menuBar);
		break;
		}break;
	case 5:
	switch(ascii)
	{	
	//366-222
		case WXK_LEFT:
		if(adrx<=362 && (adry<=226 || adry>=399)){}else{
		GOLEFT

		}
		break;
		case WXK_UP:
		if(adrx<=362 && adry<=226){}else{
		if(adry<=5){Stage6();}
		GOUP
		}		//226-362
		break;
		case WXK_RIGHT:
		if(adrx>=545){}else{
		GORIGHT
		}
		break;
		case WXK_DOWN:
		if(adrx<=362 && adry>=399){}else{
		if(adry>=540){Stage4();}
		GODOWN
		}//399-362
		break;
		case WXK_RETURN:
		if((adrx>=154 && adrx<=222) && adry<=230){
		switch(mision){
		default: Police* poldlg=new Police();
		poldlg->ShowModal();
		poldlg->Destroy();
			}		
			}
		break;
		case WXK_ESCAPE:
		if(aux==1){SaveDialog* savedlg;savedlg=new SaveDialog();savedlg->ShowModal();savedlg->Destroy();Load();}
		break;
		case WXK_TAB:
		
		break;
		case WXK_SHIFT:
		
		break;
		case WXK_ALT:
		SetMenuBar(menuBar);
		break;
		}break;
	case 6:
	switch(ascii)
	{	
	//366-222
		case WXK_LEFT:
		GOLEFT
		break;
		case WXK_UP:
		if(adry<=300){}else{
		GOUP
		}
		break;
		case WXK_RIGHT:
		GORIGHT
		break;
		case WXK_DOWN:
		if(adry>=540){ Stage5();}
		GODOWN
		break;
		case WXK_RETURN:
		//Entrar en Hipermercado
		if(adry<=320 && (adrx>=407 && adrx<=470)){Hiper* hiperdlg; hiperdlg=new Hiper(); hiperdlg->ShowModal();hiperdlg->Destroy();}
		break;
		case WXK_ESCAPE:
		if(aux==1){SaveDialog* savedlg;savedlg=new SaveDialog();savedlg->ShowModal();savedlg->Destroy();Load();}
		break;
		case WXK_TAB:
		
		break;
		case WXK_SHIFT:
		
		break;
		case WXK_ALT:
		SetMenuBar(menuBar);
		break;
		}break;
	case 7:
	switch(ascii)
	{	
	//366-222
		case WXK_LEFT:
		GOLEFT
		break;
		case WXK_UP:
		if(adry<=300){}else{
		GOUP
		}
		break;
		case WXK_RIGHT:
		GORIGHT
		break;
		case WXK_DOWN:
		if(adry>=540){Stage3();}
		GODOWN
		break;
		case WXK_RETURN:
		if(adry<=302 && (adrx>=382 && adrx<=440)){Golf* golfdlg; golfdlg=new Golf();golfdlg->ShowModal();golfdlg->Destroy();}
		break;
		case WXK_ESCAPE:
		if(aux==1){SaveDialog* savedlg;savedlg=new SaveDialog();savedlg->ShowModal();savedlg->Destroy();Load();}
		break;
		case WXK_TAB:
		
		break;
		case WXK_SHIFT:
		
		break;
		case WXK_ALT:
		SetMenuBar(menuBar);
		break;
		}break;
	case 11:
	switch(ascii)
	{	
	//366-222
		case WXK_LEFT:
		if((adrx<=405 && adry>=405) || (adrx<=150 && adry<=130)){}else{
		GOLEFT
		}
		break;
		case WXK_UP:
		if((adrx<=150 && adry<=130) || (adrx>=555 && adry<=340)){}else{
		GOUP
		}
		break;
		case WXK_RIGHT:
		if(adrx>=555 && (adry<=340 || adry>=505)){}else{
		GORIGHT
		}
		break;
		case WXK_DOWN:
		if((adrx<=405 && adry>=405) || (adrx>=555 && adry>=505)){}else{
		GODOWN
		}
		break;
		case WXK_RETURN:
		//Bread&Pan
		if(adrx<=102 && adry<=152){
		DialogBox* dlgbox;
		dlgbox=new DialogBox();
		dlgbox->ShowModal();
		dlgbox->Destroy();
		}
		//Mercado
		if((adrx>=665 && adrx<=732) && adry<=358){
		Mercado* merdlg;
		merdlg=new Mercado();
		merdlg->ShowModal();
		merdlg->Destroy();
		}
		//Estacion de Tren
		if((adrx>=665 && adrx<=732) && adry>=498){
		int iraazpazeta=wxMessageBox("Deseas ir a Azpazeta por 50 $?","Train Station",wxYES_NO|wxICON_QUESTION);
		if(iraazpazeta==wxYES){
		money-=50;
		city=3;
		Load();
		}
		}
		break;
		case WXK_ESCAPE:
		if(aux==1){SaveDialog* savedlg;savedlg=new SaveDialog();savedlg->ShowModal();savedlg->Destroy();Load();}
		break;
		case WXK_TAB:
		
		break;
		case WXK_SHIFT:
		
		break;
		case WXK_ALT:
		SetMenuBar(menuBar);
		break;
		}break;

}
}