Example #1
0
void draw_scoreboard(const void *data)
{
	struct marfitude_pos pos;
	const struct wam *wam = marfitude_get_wam();
	const struct marfitude_player *ps;
	int highscore = marfitude_get_highscore();
	int x1, x2, y1, y2;
	int difficulty;

	if(data) {}

	marfitude_get_pos(&pos);
	glColor4f(1.0, 1.0, 1.0, 1.0);

	difficulty = marfitude_get_difficulty();

	print_gl(50, 0, "Playing: %s", mod->songname);
	if(pos.row_index == wam->num_rows) {
		print_gl(50, 45, "Song complete!");
		marfitude_foreach_player(ps) {
			if(ps->score.score > highscore) {
				print_gl(640 / 2 - 85, 120, "New High Score!!!");
				break;
			}
		}
	} else if(pos.row_index < 0) {
Example #2
0
/** Displays the FPS in the top corner of the screen */
void print_fps(void)
{
	set_font_size(.75);
	glColor4f(0.0, 1.0, 1.0, 1.0);
	if(fps < 100.0) print_gl(640 - 75, 5, "FPS: %2.1f", fps);
	else print_gl(640 - 75, 5, "FPS:%3.1f", fps);
	set_font_size(1.0);
}
Example #3
0
static int test_fun(int argc, char *argv[])
{
	glob_t gl;
	for (int i=1; i<argc; ++i){
		gl.gl_offs = 0;
		glob(argv[i], GLOB_TILDE, 0, &gl);
		print_gl(&gl);
		globfree(&gl);
	}
	
	return 0;
}