Пример #1
0
/* Show FPS Counter */
INLINE void frame_counter (void)
{
	static unsigned int gp2x_fc=0; /* Elapsed frame counter */
	static unsigned int gp2x_fc_v=0; /* Frame Counter to show */
	static unsigned long gp2x_fc_t0; /* Last T0 */
	unsigned long gp2x_fc_t1=gp2x_timer_read_real();
	char texto[8];
	int offsetx=0;
	int offsety=0;
	gp2x_fc++;
	if (gp2x_fc_t1-gp2x_fc_t0>=1000*gp2x_timer_read_scale()) {
		gp2x_fc_t0=gp2x_fc_t1;
		gp2x_fc_v=gp2x_fc;
		gp2x_fc=0;
	}
	sprintf(texto,"%d/%d",gp2x_fc_v,gp2x_fps);
	if (gp2x_bordertvout) {
		offsetx+=((((gp2x_bordertvout_width*gp2x_text_width)/100)+7)&~7)/2;
		offsety+=((((gp2x_bordertvout_height*(gp2x_rotate&1?visible_game_width:visible_game_height))/100)+7)&~7)/2;
	}
	fast_memset(&gp2x_screen8[(0+offsety)*gp2x_text_width]+offsetx,0,48);
	fast_memset(&gp2x_screen8[(1+offsety)*gp2x_text_width]+offsetx,0,48);
	fast_memset(&gp2x_screen8[(2+offsety)*gp2x_text_width]+offsetx,0,48);
	fast_memset(&gp2x_screen8[(3+offsety)*gp2x_text_width]+offsetx,0,48);
	fast_memset(&gp2x_screen8[(4+offsety)*gp2x_text_width]+offsetx,0,48);
	fast_memset(&gp2x_screen8[(5+offsety)*gp2x_text_width]+offsetx,0,48);
	fast_memset(&gp2x_screen8[(6+offsety)*gp2x_text_width]+offsetx,0,48);
	fast_memset(&gp2x_screen8[(7+offsety)*gp2x_text_width]+offsetx,0,48);
	gp2x_text(gp2x_screen8,1,1,texto,0);
	gp2x_text(gp2x_screen8,0,0,texto,1);
}
Пример #2
0
/* Game List Text Out */
void gp2x_gamelist_text_out(int x, int y, char *eltexto) {
	char texto[33];
	strncpy(texto,eltexto,32);
	texto[32]=0;
	if (texto[0]!='-')
		gp2x_text(gp2x_screen8,x+1,y+1,texto,0);
	gp2x_text(gp2x_screen8,x,y,texto,255);
}
Пример #3
0
void gp2x_gamelist_text_out(int x, int y, char *eltexto, int color)
{
	char texto[33];
	strncpy(texto,eltexto,32);
	texto[32]=0;
	gp2x_text(gp2x_screen15,x,y,texto,color);
}
Пример #4
0
void gp2x_text_log(char *texto)
{
    if (!pflog)
    {
        memset(gp2x_screen15,0,320*240*2);
    }
    gp2x_text(gp2x_screen15,0,pflog,texto,gp2x_color15(255,255,255));
    pflog+=8;
    if(pflog>239) pflog=0;
}
Пример #5
0
/* Pause Text Message */
void gp2x_text_pause(void) {
	gp2x_video_flip_single();
#ifdef GP2X
	if (gp2x_showfps) {
		int offsetx=0;
		int offsety=0;
		if (gp2x_bordertvout) {
			offsetx+=((((gp2x_bordertvout_width*gp2x_text_width)/100)+7)&~7)/2;
			offsety+=((((gp2x_bordertvout_height*(gp2x_rotate&1?visible_game_width:visible_game_height))/100)+7)&~7)/2;
		}
		fast_memset(&gp2x_screen8[(0+offsety)*gp2x_text_width]+offsetx,0,48);
		fast_memset(&gp2x_screen8[(1+offsety)*gp2x_text_width]+offsetx,0,48);
		fast_memset(&gp2x_screen8[(2+offsety)*gp2x_text_width]+offsetx,0,48);
		fast_memset(&gp2x_screen8[(3+offsety)*gp2x_text_width]+offsetx,0,48);
		fast_memset(&gp2x_screen8[(4+offsety)*gp2x_text_width]+offsetx,0,48);
		fast_memset(&gp2x_screen8[(5+offsety)*gp2x_text_width]+offsetx,0,48);
		fast_memset(&gp2x_screen8[(6+offsety)*gp2x_text_width]+offsetx,0,48);
		fast_memset(&gp2x_screen8[(7+offsety)*gp2x_text_width]+offsetx,0,48);
	}
	gp2x_text(gp2x_screen8,1,1,"PAUSE\0",0);
	gp2x_text(gp2x_screen8,0,0,"PAUSE\0",1);
#else
#ifdef PSP_RES
	gp2x_text(gp2x_screen8,190,160,"Arcade  Paused!\0",0);
	gp2x_text(gp2x_screen8,190,160,"Arcade  Paused!\0",1);
	gp2x_text(gp2x_screen8,190,170,"L+R to Continue\0",0);
	gp2x_text(gp2x_screen8,190,170,"L+R to Continue\0",1);
	gp2x_text(gp2x_screen8,190,180,"or HOME to Quit\0",0);
	gp2x_text(gp2x_screen8,190,180,"or HOME to Quit\0",1);
#else
	gp2x_text(gp2x_screen8,141,111,"PAUSE\0",0);
	gp2x_text(gp2x_screen8,140,110,"PAUSE\0",1);
#endif
#endif
	gp2x_video_flip_single();
}
Пример #6
0
/* Debug information function*/
void gp2x_text_out_int(int x, int y, int entero) {
	char texto[50];
	sprintf(texto,"%d\n",entero);
	gp2x_text(gp2x_screen8,x,y,texto,1);
}
Пример #7
0
/* Debug information function*/
void gp2x_text_out(int x, int y, char *texto) {
	gp2x_text(gp2x_screen8,x,y,texto,1);
}