Example #1
0
static void _disclaimer_cool ( void )
{
	ledUpdate = 1;
	exit      = 0;

	drawDisclaimerGraphics( );
	doTextDisclaimerFadeIn( );
	doDisclaimerBGFadeIn( );

	disclaimerLogoLedIndex = 0;

	doDisclaimerLogoFadeIn( );

	u8 i = getHz();

	while ( i-- )
	{
		WAITBREAK_DISCLAIMER(4);
		doDisclaimerLogoLedUpdate ( );
	}

	doDisclaimerBGFadeOut( );
	doTextDisclaimerFadeOut( );

	ledUpdate = 0;
	doDisclaimerLogoFadeOut ( );

	displayOff(0);
	resetScreen();
}
Example #2
0
MainWindow::MainWindow()
{
    setupUi(this); 

    connect(action_Load_Model, SIGNAL(triggered()), this, SLOT(loadModel()));
    connect(action_Snap_Shot, SIGNAL(triggered()), this, SLOT(snapShot()));
    connect(action_Fix_Camera, SIGNAL(triggered()), this, SLOT(fixCamera()));
    connect(action_Reset_Screen, SIGNAL(triggered()), this, SLOT(resetScreen()));
    connect(action_Update_Geometry, SIGNAL(triggered()), this, SLOT(updateGeometry()));
    connect(action_Export_OBJ, SIGNAL(triggered()), this, SLOT(exportOBJ()));
    connect(action_Render, SIGNAL(triggered()), this, SLOT(renderTexture()));
    connect(action_Vector_Field, SIGNAL(triggered()), this, SLOT(setVectorField()));
    connect(action_Load_2D_3D_points, SIGNAL(triggered()), this, SLOT(loadPoints()));
    connect(action_Tool_Box, SIGNAL(triggered()), this, SLOT(showToolBox()));
    connect(action_Delete_Last_Line_Of_Source, SIGNAL(triggered()), this, SLOT(deleteLastLine_Source()));
    connect(action_Delete_Last_Line_Of_Target, SIGNAL(triggered()), this, SLOT(deleteLastLine_Target()));

    disp_modules.reset(new DispModuleHandler(centralwidget));
    this->setCentralWidget(centralwidget);

    parameter_dock.reset(new ParameterDock);
    parameter_dock->setFixedWidth(250);
    this->addDockWidget(Qt::LeftDockWidgetArea, parameter_dock.get());
    parameter_dock->setDispModules(disp_modules);
    parameter_dock->hide();

    this->show();

	//pointsSelect = false;
	//isCompute = false;
}
Example #3
0
void LoadAllOptions(){
	gOptions.mFontSize = GetPrivateProfileInt("VIDEO", "FONT", 1, gConfig);
	gOptions.mAntiAliasingEnable = GetPrivateProfileInt("VIDEO", "ANTIALIASING", 0, gConfig);
	gOptions.mQuestIconEnable = GetPrivateProfileInt("VIDEO", "QUESTICONS", 1, gConfig);
	gOptions.mFarZoom = GetPrivateProfileInt("VIDEO", "FARZOOM", 0, gConfig);
	gOptions.mAllowDuel = GetPrivateProfileInt("VIDEO", "DUEL", 1, gConfig);
	gOptions.mSkillBarEnable = GetPrivateProfileInt("QUICKBAR2", "ENABLED", 0, gConfig) ? 1 : 0;

	SetFont(9 + gOptions.mFontSize);

	if(gOptions.mAntiAliasingEnable){
		setFullSceneAntiAliasing(2);
		resetScreen();
	}

	if(gOptions.mFarZoom)
		ApplyZoom(true);

	char usernameKeys[1024];
	int readSize = 0;
	int totalSize = GetPrivateProfileString("USERNAMES", NULL, NULL, usernameKeys, sizeof(usernameKeys), gConfig);

	while(true){
		if(readSize >= totalSize)
			break;

		char* username = new char[35];
		GetPrivateProfileString("USERNAMES", &usernameKeys[readSize], "Username", username, 35, gConfig);
		gOptions.mUsernames.push_back(username);

		readSize += strlen(&usernameKeys[readSize]) + 1;
	}
}
Example #4
0
static void writeCredits ( u8 part, u8 y_pos )
{
    y = y_pos;

    if ( part == 1 ) writeTextCredits1();
    if ( part == 2 ) writeTextCredits2();
    if ( part == 3 ) writeTextCredits3();

    displayOn(10);

    waitJoySc ( 10 );

    displayOff ( 10 );
    resetScreen();
}
Example #5
0
void screen_credits ()
{
    if ( DEV > 1 ) return;

    music_stop();
    displayOff(0);
    resetScreen();

    VDP_setTextPalette ( PAL0 );
    prepareColor (  1, 0xfff );
    prepareColor (  2, 0x444 );
    prepareColor ( 17, font_palette.data [ 7 ] );
    prepareColor ( 18, font_palette.data [ 8 ] );
    prepareColor ( 33, 0xfff );
    prepareColor ( 34, 0x444 );

    writeCredits ( 1, 4 );
    writeCredits ( 2, 4 );
    writeCredits ( 3, 9 );

    //waitSc(2);
}
Example #6
0
static void _disclaimer_simple ( )
{
	displayInit();
	displayOff(0);

	SYS_disableInts();

	resetPalettes();
	resetScroll();
	resetSprites();
	resetScreen();

	VDP_drawImageEx ( PLAN_A, &ob_cs_disclaimer, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, 16),  0, 0, 0, 0 );

	preparePal ( PAL1, ob_cs_disclaimer.palette->data );

	SYS_enableInts();

	displayOn(0);

	waitJoySc(3);

	displayOff(10);
}
Example #7
0
void game(){
SceCtrlData pad;
int playerStarting;
char cursorPathLeft[200] = "./images/selector_left.png";
char cursorPathRight[200] = "./images/selector_right.png";
char *activeCursorPath;
Image* lCursorSide1 = loadImage( cursorPathLeft );
Image* lCursorSide2 = loadImage( cursorPathLeft );
Image* lCursorSide3 = loadImage( cursorPathLeft );
Image* lCursorSide4 = loadImage( cursorPathLeft );
Image* lCursorSide5 = loadImage( cursorPathLeft );
//char *playerOneChosenCards[5][20] = { {p1.cardOne}, {p1.cardTwo}, {p1.cardThree}, {p1.cardFour}, {p1.cardFive} };
//char *playerTwoChosenCards[5][20] = { {p2.cardOne}, {p2.cardTwo}, {p2.cardThree}, {p2.cardFour}, {p2.cardFive} };
char *cardSelectedRight;
int selMenuLeft = 0;
int selMenuRight = 0;
int sideDrawDoneLeft = 0;
int sideDrawDoneRight = 0;
int cursorDrawn = 0;
char *cardSelectedPlayerOne;
playerStarting = firstRandStart();
	resetScreen(); // have to clear the screen to display background etc.

	setPlayerOneCards( "Geezard", "Funguar", "Bite Bug", "Red Bat", "Blobra"); 
	setPlayerTwoCards( "Geezard", "Funguar", "Bite Bug", "Red Bat", "Blobra"); //set player's cards
	if(playerStarting == 0){
	cardDrawSideMenuP1();
	sideDrawDoneLeft = cardDrawSideMenuBackP2();
	activeCursorPath = cursorPathLeft;
	} else {
	cardDrawSideMenuP2();
	sideDrawDoneRight = cardDrawSideMenuBackP1();
	activeCursorPath = cursorPathRight;
	}
	while(sideDrawDoneLeft == 1){
		sceCtrlReadBufferPositive(&pad, 1);
		sprintf( activeCursorPath, cursorPathLeft );
		lCursorSide1 = loadImage( activeCursorPath );
		blitAlphaImageToScreen( 0, 0, 24, 15, lCursorSide1, 78, triadSideCardGridY[selMenuLeft]);
		cursorDrawn = 1;
		if(pad.Buttons & PSP_CTRL_UP){
			if(selMenuLeft > 0){
				selMenuLeft--;
				switch(selMenuLeft){
					case 0:
						if(cursorDrawn == 1){
							freeImage( lCursorSide1 );
							freeImage( lCursorSide2 );
							freeImage( lCursorSide3 );
							freeImage( lCursorSide4 );
							freeImage( lCursorSide5 );
						}
						sprintf( activeCursorPath, cursorPathLeft );
						lCursorSide1 = loadImage( activeCursorPath );
						blitAlphaImageToScreen( 0, 0, 24, 15, lCursorSide1, 78, triadSideCardGridY[selMenuLeft]);
						cursorDrawn = 1;
						break;
					
					case 1:
						if(cursorDrawn == 1){
							freeImage( lCursorSide1 );
							freeImage( lCursorSide2 );
							freeImage( lCursorSide3 );
							freeImage( lCursorSide4 );
							freeImage( lCursorSide5 );
						}
						sprintf( activeCursorPath, cursorPathLeft );
						lCursorSide2 = loadImage( activeCursorPath );
						blitAlphaImageToScreen( 0, 0, 24, 15, lCursorSide1, 78, triadSideCardGridY[selMenuLeft]);
						cursorDrawn = 1;
						break;

					case 2:
						if(cursorDrawn == 1){
							freeImage( lCursorSide1 );
							freeImage( lCursorSide2 );
							freeImage( lCursorSide3 );
							freeImage( lCursorSide4 );
							freeImage( lCursorSide5 );
						}
						sprintf( activeCursorPath, cursorPathLeft );
						lCursorSide3 = loadImage( activeCursorPath );
						blitAlphaImageToScreen( 0, 0, 24, 15, lCursorSide1, 78, triadSideCardGridY[selMenuLeft]);
						cursorDrawn = 1;
						break;
					case 3:
						if(cursorDrawn == 1){
							freeImage( lCursorSide1 );
							freeImage( lCursorSide2 );
							freeImage( lCursorSide3 );
							freeImage( lCursorSide4 );
							freeImage( lCursorSide5 );
						}
						sprintf( activeCursorPath, cursorPathLeft );
						lCursorSide4 = loadImage( activeCursorPath );
						blitAlphaImageToScreen( 0, 0, 24, 15, lCursorSide1, 78, triadSideCardGridY[selMenuLeft]);
						cursorDrawn = 1;
						break;

					case 4:
						if(cursorDrawn == 1){
							freeImage( lCursorSide1 );
							freeImage( lCursorSide2 );
							freeImage( lCursorSide3 );
							freeImage( lCursorSide4 );
							freeImage( lCursorSide5 );
						}
						sprintf( activeCursorPath, cursorPathLeft );
						lCursorSide5 = loadImage( activeCursorPath );
						blitAlphaImageToScreen( 0, 0, 24, 15, lCursorSide1, 78, triadSideCardGridY[selMenuLeft]);
						cursorDrawn = 1;
						break;

					default:
						break;
				}

			}	flipScreen();
		}  else if(pad.Buttons & PSP_CTRL_DOWN){
			if(selMenuLeft < 4){
				selMenuLeft++;
				switch(selMenuLeft){
					case 0:
						if(cursorDrawn == 1){
							freeImage( lCursorSide1 );
							freeImage( lCursorSide2 );
							freeImage( lCursorSide3 );
							freeImage( lCursorSide4 );
							freeImage( lCursorSide5 );
						}
						sprintf( activeCursorPath, cursorPathLeft );
						lCursorSide1 = loadImage( activeCursorPath );
						blitAlphaImageToScreen( 0, 0, 24, 15, lCursorSide1, 78, triadSideCardGridY[selMenuLeft]);
						cursorDrawn = 1;
						break;
					
					case 1:
						if(cursorDrawn == 1){
							freeImage( lCursorSide1 );
							freeImage( lCursorSide2 );
							freeImage( lCursorSide3 );
							freeImage( lCursorSide4 );
							freeImage( lCursorSide5 );
						}
						sprintf( activeCursorPath, cursorPathLeft );
						lCursorSide2 = loadImage( activeCursorPath );
						blitAlphaImageToScreen( 0, 0, 24, 15, lCursorSide1, 78, triadSideCardGridY[selMenuLeft]);
						cursorDrawn = 1;
						break;

					case 2:
						if(cursorDrawn == 1){
							freeImage( lCursorSide1 );
							freeImage( lCursorSide2 );
							freeImage( lCursorSide3 );
							freeImage( lCursorSide4 );
							freeImage( lCursorSide5 );
						}
						sprintf( activeCursorPath, cursorPathLeft );
						lCursorSide3 = loadImage( activeCursorPath );
						blitAlphaImageToScreen( 0, 0, 24, 15, lCursorSide1, 78, triadSideCardGridY[selMenuLeft]);
						cursorDrawn = 1;
						break;
					case 3:
						if(cursorDrawn == 1){
							freeImage( lCursorSide1 );
							freeImage( lCursorSide2 );
							freeImage( lCursorSide3 );
							freeImage( lCursorSide4 );
							freeImage( lCursorSide5 );
						}
						sprintf( activeCursorPath, cursorPathLeft );
						lCursorSide4 = loadImage( activeCursorPath );
						blitAlphaImageToScreen( 0, 0, 24, 15, lCursorSide1, 78, triadSideCardGridY[selMenuLeft]);
						cursorDrawn = 1;
						break;

					case 4:
						if(cursorDrawn == 1){
							freeImage( lCursorSide1 );
							freeImage( lCursorSide2 );
							freeImage( lCursorSide3 );
							freeImage( lCursorSide4 );
							freeImage( lCursorSide5 );
						}
						sprintf( activeCursorPath, cursorPathLeft );
						lCursorSide5 = loadImage( activeCursorPath );
						blitAlphaImageToScreen( 0, 0, 24, 15, lCursorSide1, 78, triadSideCardGridY[selMenuLeft]);
						cursorDrawn = 1;
						break;

					default:
						break;
			}
				if(pad.Buttons & PSP_CTRL_CROSS){
				switch(selMenuLeft){
					case 0:
						cardSelectedPlayerOne = playerOneCardOne;
						break;
					case 1:
						cardSelectedPlayerOne = playerOneCardTwo;
						break;
					case 2:
						cardSelectedPlayerOne = playerOneCardThree;
						break;
					case 3:
						cardSelectedPlayerOne = playerOneCardFour;
						break;
					case 4:
						cardSelectedPlayerOne = playerOneCardFive;
						break;
					default:
						break;
				}
			}
		} 
	} flipScreen();
	}
}