dumper.c
void GsPrintString(int x, int y, char *string)
{
	GsSprite CharSprite;
	char CharOffset;

	//Set up character sprite
	CharSprite.x = x;
	CharSprite.y = y;
	CharSprite.w = 8;
	CharSprite.h = 8;
	CharSprite.r = 128;
	CharSprite.g = 128;
	CharSprite.b = 128;
	CharSprite.cx = 320;		//Clut X
	CharSprite.cy = 240;		//Clut Y
	CharSprite.tpage = 5;		//64px = 1 tpage
	CharSprite.attribute = COLORMODE(COLORMODE_8BPP);

	while(*string)
	{
		//Check if this is a printable character
		if(*string >= 0x20 && *string <= 0x7F)
		{
			//Get char offset
			CharOffset = *string - 0x20;

			CharSprite.u = (CharOffset%0x20) * 8;
			CharSprite.v = (CharOffset/0x20) * 8;

			//Place sprite in the drawing list
			GsSortSimpleSprite(&CharSprite);
		}

		//Point to the next character
		string++;

		//Increase X offset
		CharSprite.x += (FontSpace[CharOffset] + 1);
	}
}
//Print a string at the specified coordinates
Print a string at the specified coordinates
Print a string at the specified coordinates
void GsPrintString(int x, int y, char *string)
{
	GsSprite CharSprite;
	char CharOffset;
	CharSprite.x = x;
	CharSprite.y = y;
	CharSprite.w = 8;
	CharSprite.h = 8;
	CharSprite.r = 128;
	CharSprite.g = 128;
	CharSprite.b = 128;
	CharSprite.cx = 320;		
	CharSprite.cy = 240;		
	CharSprite.tpage = 5;		
	CharSprite.attribute = COLORMODE(COLORMODE_8BPP);
	while(*string)
	{
		if(*string >= 0x20 && *string <= 0x7F)
		{
			CharOffset = *string - 0x20;
			CharSprite.u = (CharOffset%0x20) * 8;
			CharSprite.v = (CharOffset/0x20) * 8;
			GsSortSimpleSprite(&CharSprite);
		}
		string++;
		CharSprite.x += (FontSpace[CharOffset] + 1);
	}
}
void GsPrintString ( int x , int y , char * string ) { GsSprite CharSprite ; char CharOffset ; CharSprite . x = x ; CharSprite . y = y ; CharSprite . w = 8 ; CharSprite . h = 8 ; CharSprite . r = 128 ; CharSprite . g = 128 ; CharSprite . b = 128 ; CharSprite . cx = 320 ; CharSprite . cy = 240 ; CharSprite . tpage = 5 ; CharSprite . attribute = COLORMODE ( COLORMODE_8BPP ) ; while ( * string ) { if ( * string >= 0x20 && * string <= 0x7F ) { CharOffset = * string - 0x20 ; CharSprite . u = ( CharOffset % 0x20 ) * 8 ; CharSprite . v = ( CharOffset / 0x20 ) * 8 ; GsSortSimpleSprite ( & CharSprite ) ; } string ++ ; CharSprite . x += ( FontSpace [ CharOffset ] + 1 ) ; } }
Print a string at the specified coordinates
Print a string at the specified coordinates
//Set up character sprite //Clut X //Clut Y //64px = 1 tpage //Check if this is a printable character //Get char offset //Place sprite in the drawing list //Point to the next character //Increase X offset