Example #1
0
void preGameTracker(int x, int y) {
	globe.getGlobal()->mX = x;
	globe.getGlobal()->mY = y;
	if (x > 1.5) {
		menu = ( y / 150);		
	}
}
Example #2
0
void preGameMouseEvent(int button, int state, int x, int y) {
	if(x>1.5){
		if (button == 0 && state == 0) {
			globe.getGlobal()->mouseDown = true;
			pick = menu;
		}
	
		if (button == 0 && state == 1) {
			globe.getGlobal()->mouseDown = false;
			if (x > 1.5) {
				menu = (y / 150);
				preGameSelect;
			}
			if(menu==pick){
				curtain.setFlip(true);
			}
		}
	}
}
Example #3
0
void preGameUpdater() {
	if (curtain.getFrame() == 60) {
		globe.getGlobal()->stage = pick+1;
		globe.getGlobal()->settingTable = false;
		if(pick==0){
			PlaySound(NULL, 0, 0);
		}
		
	}
	glutPostRedisplay();
}
Example #4
0
void drawPreGameBack()
{
	glPushMatrix(); {
		if (globe.getGlobal()->option.KONAMI_TRIG) {
			globe.getGlobal()->rainbowTyrenol[0] = (globe.getGlobal()->rainbowTyrenol[0] + 0.01) > 1 ? 0.5 : (globe.getGlobal()->rainbowTyrenol[0] + 0.01);
			globe.getGlobal()->rainbowTyrenol[1] = (globe.getGlobal()->rainbowTyrenol[1] + 0.015) > 1 ? 0.5 : (globe.getGlobal()->rainbowTyrenol[1] + 0.015);
			globe.getGlobal()->rainbowTyrenol[2] = (globe.getGlobal()->rainbowTyrenol[2] + 0.02) > 1 ? 0.5 : (globe.getGlobal()->rainbowTyrenol[2] + 0.02);

			glColor3f(globe.getGlobal()->rainbowTyrenol[0], globe.getGlobal()->rainbowTyrenol[1], globe.getGlobal()->rainbowTyrenol[2]);
		}
		else {
			glColor3f(0.2, 0.9, 0.2);
		}
		glBegin(GL_POLYGON); {
			glVertex3f(0, 2, 0.0);
			glVertex3f(2, 2, 0.0);
			glVertex3f(2, 0, 0.0);
			glVertex3f(0, 0, 0.0);
		}
		glEnd();
	}
	glPopMatrix();

	if(globe.getGlobal()->option.KONAMI_TRIG){
		globe.getGlobal()->beMyRain->drawRain();

	}

	glColor4f(0.2, 0.2, 0.2,0.5);
	glBegin(GL_POLYGON); {
		glVertex3f(0, 1.3, 0);
		glVertex3f(2, 1.3, 0);
		glVertex3f(2, 0.7, 0);
		glVertex3f(0, 0.7, 0);
	}
	glEnd();

	glColor3f(0.2, 0.9, 0.9);
	glBegin(GL_POLYGON); {
		glVertex3f(1.3,2,0);
		glVertex3f(2,2,0);
		glVertex3f(2,0,0);
		glVertex3f(1.3,0,0);
	}
	glEnd();	
}
Example #5
0
void drawCursor() {
	glLoadIdentity();
	if(globe.getGlobal()->mouseDown){
		glColor3f(1, 1, 1);
	}
	else{
		glColor3f(0.8,0.8,0.8);
	}
	glPushMatrix(); {
		glTranslatef(1.4, 1.6 - (0.6*menu), 0);
		glBegin(GL_TRIANGLES); {
			glVertex3f(0, 0.05, 0);
			glVertex3f(0 + 0.05*sqrt(3), 0, 0);
			glVertex3f(0, -0.05, 0);
		}		
		glEnd();
	}
	glPopMatrix();
}