Removed the second "drawString" function.

It wasn't very useful. All it did was offer the option to center
text and take away the option to wrap text. I've moved the text
centering option to gfx_renderString and replaced all uses of this
function with that function.
This commit is contained in:
onpon4 2015-11-06 10:12:57 -05:00
parent 7c67112a8b
commit 67d464433d
6 changed files with 92 additions and 88 deletions

View File

@ -174,6 +174,9 @@ static int gfx_renderStringBase(const char *in, int x, int y, int fontColor, sig
int gfx_renderString(const char *in, int x, int y, int fontColor, int wrap, SDL_Surface *dest) int gfx_renderString(const char *in, int x, int y, int fontColor, int wrap, SDL_Surface *dest)
{ {
if (x == -1)
x = (dest->w - (strlen(in) * 9)) / 2;
gfx_renderStringBase(in, x, y - 1, FONT_OUTLINE, wrap, dest); gfx_renderStringBase(in, x, y - 1, FONT_OUTLINE, wrap, dest);
gfx_renderStringBase(in, x, y + 1, FONT_OUTLINE, wrap, dest); gfx_renderStringBase(in, x, y + 1, FONT_OUTLINE, wrap, dest);
gfx_renderStringBase(in, x, y + 2, FONT_OUTLINE, wrap, dest); gfx_renderStringBase(in, x, y + 2, FONT_OUTLINE, wrap, dest);
@ -183,17 +186,8 @@ int gfx_renderString(const char *in, int x, int y, int fontColor, int wrap, SDL_
return gfx_renderStringBase(in, x, y, fontColor, wrap, dest); return gfx_renderStringBase(in, x, y, fontColor, wrap, dest);
} }
int drawString(const char *in, int x, int y, int fontColor, SDL_Surface *dest)
{
if (x == -1)
x = (dest->w - (strlen(in) * 9)) / 2;
return gfx_renderString(in, x, y, fontColor, 0, dest);
}
int drawString(const char *in, int x, int y, int fontColor) int drawString(const char *in, int x, int y, int fontColor)
{ {
if (x == -1)
x = (screen->w - (strlen(in) * 9)) / 2;
return gfx_renderString(in, x, y, fontColor, 0, screen); return gfx_renderString(in, x, y, fontColor, 0, screen);
} }
@ -411,7 +405,7 @@ SDL_Surface *textSurface(const char *inString, int color)
{ {
SDL_Surface *surface = createSurface(strlen(inString) * 9, 16); SDL_Surface *surface = createSurface(strlen(inString) * 9, 16);
drawString(inString, 1, 1, color, surface); gfx_renderString(inString, 1, 1, color, 0, surface);
return gfx_setTransparent(surface); return gfx_setTransparent(surface);
} }

View File

@ -35,7 +35,6 @@ void gfx_init();
SDL_Surface *gfx_setTransparent(SDL_Surface *sprite); SDL_Surface *gfx_setTransparent(SDL_Surface *sprite);
void gfx_blit(SDL_Surface *image, int x, int y, SDL_Surface *dest); void gfx_blit(SDL_Surface *image, int x, int y, SDL_Surface *dest);
int gfx_renderString(const char *in, int x, int y, int fontColor, int wrap, SDL_Surface *dest); int gfx_renderString(const char *in, int x, int y, int fontColor, int wrap, SDL_Surface *dest);
extern int drawString(const char *in, int x, int y, int fontColor, SDL_Surface *dest);
extern int drawString(const char *in, int x, int y, int fontColor); extern int drawString(const char *in, int x, int y, int fontColor);
extern void drawBackGround(); extern void drawBackGround();
extern void clearScreen(Uint32 color); extern void clearScreen(Uint32 color);

View File

@ -354,9 +354,9 @@ static void intermission_updateCommsSurface(SDL_Surface *comms)
blevelRect(comms, 0, 10, comms->w - 1, 55, 0x00, 0x22, 0x00); blevelRect(comms, 0, 10, comms->w - 1, 55, 0x00, 0x22, 0x00);
gfx_blit(shape[FACE_CHRIS], 20, 15, comms); gfx_blit(shape[FACE_CHRIS], 20, 15, comms);
drawString("Chris Bainfield", 80, 15, FONT_WHITE, comms); gfx_renderString("Chris Bainfield", 80, 15, FONT_WHITE, 0, comms);
sprintf(string, "Current Location: %s", systemPlanet[game.stationedPlanet].name); sprintf(string, "Current Location: %s", systemPlanet[game.stationedPlanet].name);
drawString(string, 80, 35, FONT_WHITE, comms); gfx_renderString(string, 80, 35, FONT_WHITE, 0, comms);
} }
static void intermission_createCommsSurface(SDL_Surface *comms) static void intermission_createCommsSurface(SDL_Surface *comms)
@ -365,7 +365,7 @@ static void intermission_createCommsSurface(SDL_Surface *comms)
blevelRect(comms, 0, 0, comms->w - 1, comms->h - 1, 0x00, 0x00, 0x25); blevelRect(comms, 0, 0, comms->w - 1, comms->h - 1, 0x00, 0x00, 0x25);
drawString("+++ RECEIVED MESSAGES +++", 115, 80, FONT_GREEN, comms); gfx_renderString("+++ RECEIVED MESSAGES +++", 115, 80, FONT_GREEN, 0, comms);
int yOffset; int yOffset;
@ -376,9 +376,9 @@ static void intermission_createCommsSurface(SDL_Surface *comms)
yOffset = systemPlanet[i].messageSlot * 60; yOffset = systemPlanet[i].messageSlot * 60;
blevelRect(comms, 0, 105 + yOffset, comms->w - 1, 55, 0x00, 0x00, 0x77); blevelRect(comms, 0, 105 + yOffset, comms->w - 1, 55, 0x00, 0x00, 0x77);
gfx_blit(shape[systemPlanet[i].faceImage], 20, 110 + yOffset, comms); gfx_blit(shape[systemPlanet[i].faceImage], 20, 110 + yOffset, comms);
drawString(systemPlanet[i].from, 80, 110 + yOffset, FONT_WHITE, comms); gfx_renderString(systemPlanet[i].from, 80, 110 + yOffset, FONT_WHITE, 0, comms);
drawString(systemPlanet[i].subject, 80, 130 + yOffset, FONT_CYAN, comms); gfx_renderString(systemPlanet[i].subject, 80, 130 + yOffset, FONT_CYAN, 0, comms);
drawString("INCOMPLETE", 350, 110 + yOffset, FONT_RED, comms); gfx_renderString("INCOMPLETE", 350, 110 + yOffset, FONT_RED, 0, comms);
} }
} }
@ -419,7 +419,7 @@ static void intermission_createMissionDetailSurface(SDL_Surface *comms, int miss
strcpy(name, "Error"); strcpy(name, "Error");
} }
sprintf(string, "+++ Communication with %s +++", name); sprintf(string, "+++ Communication with %s +++", name);
drawString(string, -1, 20, FONT_GREEN, comms); gfx_renderString(string, -1, 20, FONT_GREEN, 0, comms);
while (fscanf(fp, "%[^\n]%*c", string) == 1) while (fscanf(fp, "%[^\n]%*c", string) == 1)
{ {
@ -478,7 +478,7 @@ static void intermission_createOptions(SDL_Surface *optionsSurface)
blevelRect(optionsSurface, 0, 0, optionsSurface->w - 2, optionsSurface->h - 2, 0x00, 0x00, 0x44); blevelRect(optionsSurface, 0, 0, optionsSurface->w - 2, optionsSurface->h - 2, 0x00, 0x00, 0x44);
drawString("++ OPTIONS ++", 105, 8, FONT_WHITE, optionsSurface); gfx_renderString("++ OPTIONS ++", 105, 8, FONT_WHITE, 0, optionsSurface);
blevelRect(optionsSurface, 190, 45, 50, 22, 0x00, 0x00, 0x00); blevelRect(optionsSurface, 190, 45, 50, 22, 0x00, 0x00, 0x00);
blevelRect(optionsSurface, 250, 45, 50, 22, 0x00, 0x00, 0x00); blevelRect(optionsSurface, 250, 45, 50, 22, 0x00, 0x00, 0x00);
@ -487,9 +487,9 @@ static void intermission_createOptions(SDL_Surface *optionsSurface)
blevelRect(optionsSurface, 190, 45, 50, 22, 0xff, 0x00, 0x00); blevelRect(optionsSurface, 190, 45, 50, 22, 0xff, 0x00, 0x00);
else else
blevelRect(optionsSurface, 250, 45, 50, 22, 0xff, 0x00, 0x00); blevelRect(optionsSurface, 250, 45, 50, 22, 0xff, 0x00, 0x00);
drawString("ON", 207, 50, FONT_WHITE, optionsSurface); gfx_renderString("ON", 207, 50, FONT_WHITE, 0, optionsSurface);
drawString("OFF", 263, 50, FONT_WHITE, optionsSurface); gfx_renderString("OFF", 263, 50, FONT_WHITE, 0, optionsSurface);
drawString("SOUND", 30, 50, FONT_WHITE, optionsSurface); gfx_renderString("SOUND", 30, 50, FONT_WHITE, 0, optionsSurface);
blevelRect(optionsSurface, 190, 95, 50, 22, 0x00, 0x00, 0x00); blevelRect(optionsSurface, 190, 95, 50, 22, 0x00, 0x00, 0x00);
blevelRect(optionsSurface, 250, 95, 50, 22, 0x00, 0x00, 0x00); blevelRect(optionsSurface, 250, 95, 50, 22, 0x00, 0x00, 0x00);
@ -498,9 +498,9 @@ static void intermission_createOptions(SDL_Surface *optionsSurface)
blevelRect(optionsSurface, 190, 95, 50, 22, 0xff, 0x00, 0x00); blevelRect(optionsSurface, 190, 95, 50, 22, 0xff, 0x00, 0x00);
else else
blevelRect(optionsSurface, 250, 95, 50, 22, 0xff, 0x00, 0x00); blevelRect(optionsSurface, 250, 95, 50, 22, 0xff, 0x00, 0x00);
drawString("ON", 207, 100, FONT_WHITE, optionsSurface); gfx_renderString("ON", 207, 100, FONT_WHITE, 0, optionsSurface);
drawString("OFF", 263, 100, FONT_WHITE, optionsSurface); gfx_renderString("OFF", 263, 100, FONT_WHITE, 0, optionsSurface);
drawString("MUSIC", 30, 100, FONT_WHITE, optionsSurface); gfx_renderString("MUSIC", 30, 100, FONT_WHITE, 0, optionsSurface);
blevelRect(optionsSurface, 190, 145, 50, 22, 0x00, 0x00, 0x00); blevelRect(optionsSurface, 190, 145, 50, 22, 0x00, 0x00, 0x00);
blevelRect(optionsSurface, 250, 145, 50, 22, 0x00, 0x00, 0x00); blevelRect(optionsSurface, 250, 145, 50, 22, 0x00, 0x00, 0x00);
@ -509,9 +509,9 @@ static void intermission_createOptions(SDL_Surface *optionsSurface)
blevelRect(optionsSurface, 190, 145, 50, 22, 0xff, 0x00, 0x00); blevelRect(optionsSurface, 190, 145, 50, 22, 0xff, 0x00, 0x00);
else else
blevelRect(optionsSurface, 250, 145, 50, 22, 0xff, 0x00, 0x00); blevelRect(optionsSurface, 250, 145, 50, 22, 0xff, 0x00, 0x00);
drawString("ON", 207, 150, FONT_WHITE, optionsSurface); gfx_renderString("ON", 207, 150, FONT_WHITE, 0, optionsSurface);
drawString("OFF", 263, 150, FONT_WHITE, optionsSurface); gfx_renderString("OFF", 263, 150, FONT_WHITE, 0, optionsSurface);
drawString("FULLSCREEN", 30, 150, FONT_WHITE, optionsSurface); gfx_renderString("FULLSCREEN", 30, 150, FONT_WHITE, 0, optionsSurface);
} }
static void intermission_doOptions(SDL_Surface *optionsSurface) static void intermission_doOptions(SDL_Surface *optionsSurface)

View File

@ -178,11 +178,11 @@ void createSavesSurface(SDL_Surface *savesSurface, signed char clickedSlot)
blevelRect(savesSurface, 5, y, 338, 25, 0x99, 0x00, 0x00); blevelRect(savesSurface, 5, y, 338, 25, 0x99, 0x00, 0x00);
else else
blevelRect(savesSurface, 5, y, 338, 25, 0x00, 0x00, 0x99); blevelRect(savesSurface, 5, y, 338, 25, 0x00, 0x00, 0x99);
drawString(saveSlot[i], 70, y + 5, FONT_WHITE, savesSurface); gfx_renderString(saveSlot[i], 70, y + 5, FONT_WHITE, 0, savesSurface);
y += 30; y += 30;
} }
drawString("*** HELP ***", 120, 170, FONT_WHITE, savesSurface); gfx_renderString("*** HELP ***", 120, 170, FONT_WHITE, 0, savesSurface);
switch (clickedSlot) switch (clickedSlot)
{ {
@ -194,25 +194,28 @@ void createSavesSurface(SDL_Surface *savesSurface, signed char clickedSlot)
blevelRect(savesSurface, 5, 265, 100, 25, 0x00, 0x99, 0x00); blevelRect(savesSurface, 5, 265, 100, 25, 0x00, 0x99, 0x00);
blevelRect(savesSurface, 125, 265, 100, 25, 0x99, 0x99, 0x00); blevelRect(savesSurface, 125, 265, 100, 25, 0x99, 0x99, 0x00);
blevelRect(savesSurface, 243, 265, 100, 25, 0x99, 0x00, 0x00); blevelRect(savesSurface, 243, 265, 100, 25, 0x99, 0x00, 0x00);
drawString("SAVE", 40, 270, FONT_WHITE, savesSurface); gfx_renderString("SAVE", 40, 270, FONT_WHITE, 0, savesSurface);
drawString("CANCEL", 150, 270, FONT_WHITE, savesSurface); gfx_renderString("CANCEL", 150, 270, FONT_WHITE, 0, savesSurface);
drawString("DELETE", 270, 270, FONT_WHITE, savesSurface); gfx_renderString("DELETE", 270, 270, FONT_WHITE, 0, savesSurface);
drawString("SAVE will save the game", 17, 200, FONT_WHITE, savesSurface); gfx_renderString("SAVE will save the game", 17, 200, FONT_WHITE, 0,
drawString("CANCEL will unselect that slot", 17, 220, FONT_WHITE,
savesSurface);
drawString("DELETE will remove the save", 17, 240, FONT_WHITE,
savesSurface); savesSurface);
gfx_renderString("CANCEL will unselect that slot", 17, 220,
FONT_WHITE, 0, savesSurface);
gfx_renderString("DELETE will remove the save", 17, 240,
FONT_WHITE, 0, savesSurface);
break; break;
case -1: case -1:
drawString("First click a Save game slot to use", 17, 200, gfx_renderString("First click a Save game slot to use", 17, 200,
FONT_WHITE, savesSurface); FONT_WHITE, 0, savesSurface);
break; break;
case -10: case -10:
drawString("Game Saved", 130, 200, FONT_WHITE, savesSurface); gfx_renderString("Game Saved", 130, 200, FONT_WHITE, 0,
savesSurface);
break; break;
case -11: case -11:
drawString("Save Deleted", 130, 200, FONT_WHITE, savesSurface); gfx_renderString("Save Deleted", 130, 200, FONT_WHITE, 0,
savesSurface);
break; break;
} }

View File

@ -28,7 +28,7 @@ static void drawSecondaryWeaponSurface()
{ {
char description[50] = ""; char description[50] = "";
drawString("Secondary Weapon", 10, 3, FONT_WHITE, shopSurface[2]); gfx_renderString("Secondary Weapon", 10, 3, FONT_WHITE, 0, shopSurface[2]);
switch (player.weaponType[1]) switch (player.weaponType[1])
{ {
@ -60,13 +60,13 @@ static void drawSecondaryWeaponSurface()
strcpy(description, "Type : Mcr Homing Missiles"); strcpy(description, "Type : Mcr Homing Missiles");
break; break;
} }
drawString(description, 10, 22, FONT_WHITE, shopSurface[2]); gfx_renderString(description, 10, 22, FONT_WHITE, 0, shopSurface[2]);
if ((player.weaponType[1] != W_LASER) && if ((player.weaponType[1] != W_LASER) &&
(player.weaponType[1] != W_CHARGER) && (player.weaponType[1] != W_NONE)) (player.weaponType[1] != W_CHARGER) && (player.weaponType[1] != W_NONE))
{ {
sprintf(description, "Capacity : %d", game.maxRocketAmmo); sprintf(description, "Capacity : %d", game.maxRocketAmmo);
drawString(description, 10, 37, FONT_WHITE, shopSurface[2]); gfx_renderString(description, 10, 37, FONT_WHITE, 0, shopSurface[2]);
} }
} }
@ -199,28 +199,28 @@ static void drawShop()
char description[100]; char description[100];
strcpy(description, ""); strcpy(description, "");
drawString("Primary Weapon", 10, 3, FONT_WHITE, shopSurface[0]); gfx_renderString("Primary Weapon", 10, 3, FONT_WHITE, 0, shopSurface[0]);
sprintf(description, "Plasma Cannons : %d", game.minPlasmaOutput); sprintf(description, "Plasma Cannons : %d", game.minPlasmaOutput);
drawString(description, 10, 22, FONT_WHITE, shopSurface[0]); gfx_renderString(description, 10, 22, FONT_WHITE, 0, shopSurface[0]);
sprintf(description, "Plasma Power : Stage %d", sprintf(description, "Plasma Power : Stage %d",
game.minPlasmaDamage); game.minPlasmaDamage);
drawString(description, 10, 37, FONT_WHITE, shopSurface[0]); gfx_renderString(description, 10, 37, FONT_WHITE, 0, shopSurface[0]);
sprintf(description, "Cooler : Stage %d", sprintf(description, "Cooler : Stage %d",
game.minPlasmaRate); game.minPlasmaRate);
drawString(description, 10, 52, FONT_WHITE, shopSurface[0]); gfx_renderString(description, 10, 52, FONT_WHITE, 0, shopSurface[0]);
drawString("Powerup Weapon", 10, 3, FONT_WHITE, shopSurface[1]); gfx_renderString("Powerup Weapon", 10, 3, FONT_WHITE, 0, shopSurface[1]);
sprintf(description, "Plasma Output : Stage %d", sprintf(description, "Plasma Output : Stage %d",
game.maxPlasmaOutput); game.maxPlasmaOutput);
drawString(description, 10, 22, FONT_WHITE, shopSurface[1]); gfx_renderString(description, 10, 22, FONT_WHITE, 0, shopSurface[1]);
sprintf(description, "Plasma Condensor : Stage %d", sprintf(description, "Plasma Condensor : Stage %d",
game.maxPlasmaDamage); game.maxPlasmaDamage);
drawString(description, 10, 37, FONT_WHITE, shopSurface[1]); gfx_renderString(description, 10, 37, FONT_WHITE, 0, shopSurface[1]);
sprintf(description, "Liquid Nitrogen : Stage %d", sprintf(description, "Liquid Nitrogen : Stage %d",
game.maxPlasmaRate); game.maxPlasmaRate);
drawString(description, 10, 52, FONT_WHITE, shopSurface[1]); gfx_renderString(description, 10, 52, FONT_WHITE, 0, shopSurface[1]);
sprintf(description, "Plasma Capacity : %d", game.maxPlasmaAmmo); sprintf(description, "Plasma Capacity : %d", game.maxPlasmaAmmo);
drawString(description, 10, 67, FONT_WHITE, shopSurface[1]); gfx_renderString(description, 10, 67, FONT_WHITE, 0, shopSurface[1]);
drawSecondaryWeaponSurface(); drawSecondaryWeaponSurface();
@ -228,12 +228,12 @@ static void drawShop()
blevelRect(shopSurface[3], 0, 0, 600, 120, 0x00, 0x00, 0x22); blevelRect(shopSurface[3], 0, 0, 600, 120, 0x00, 0x00, 0x22);
drawString("Temporary Weapons", 10, 2, FONT_WHITE, shopSurface[3]); gfx_renderString("Temporary Weapons", 10, 2, FONT_WHITE, 0, shopSurface[3]);
drawString("Ammo and Storage", 260, 2, FONT_WHITE, shopSurface[3]); gfx_renderString("Ammo and Storage", 260, 2, FONT_WHITE, 0, shopSurface[3]);
drawString("Primary Weapons", 10, 62, FONT_WHITE, shopSurface[3]); gfx_renderString("Primary Weapons", 10, 62, FONT_WHITE, 0, shopSurface[3]);
drawString("Secondary Weapons", 260, 62, FONT_WHITE, shopSurface[3]); gfx_renderString("Secondary Weapons", 260, 62, FONT_WHITE, 0, shopSurface[3]);
signed char icons = MAX_SHOPITEMS; signed char icons = MAX_SHOPITEMS;
@ -251,54 +251,56 @@ static void drawShop()
} }
sprintf(description, "Shield Units : %d", player.maxShield); sprintf(description, "Shield Units : %d", player.maxShield);
drawString(description, 10, 4, FONT_WHITE, shopSurface[4]); gfx_renderString(description, 10, 4, FONT_WHITE, 0, shopSurface[4]);
sprintf(description, "Cash : $%d", game.cash); sprintf(description, "Cash : $%d", game.cash);
drawString(description, 10, 80, FONT_WHITE, shopSurface[4]); gfx_renderString(description, 10, 80, FONT_WHITE, 0, shopSurface[4]);
sprintf(description, "Plasma Cells : %.3d", player.ammo[0]); sprintf(description, "Plasma Cells : %.3d", player.ammo[0]);
drawString(description, 430, 4, FONT_WHITE, shopSurface[4]); gfx_renderString(description, 430, 4, FONT_WHITE, 0, shopSurface[4]);
sprintf(description, "Rockets : %.3d", player.ammo[1]); sprintf(description, "Rockets : %.3d", player.ammo[1]);
drawString(description, 475, 80, FONT_WHITE, shopSurface[4]); gfx_renderString(description, 475, 80, FONT_WHITE, 0, shopSurface[4]);
shopSurface[5] = createSurface(601, 56); shopSurface[5] = createSurface(601, 56);
blevelRect(shopSurface[5], 0, 0, 600, 35, 0x00, 0x99, 0x00); blevelRect(shopSurface[5], 0, 0, 600, 35, 0x00, 0x99, 0x00);
blevelRect(shopSurface[5], 0, 20, 600, 35, 0x00, 0x33, 0x00); blevelRect(shopSurface[5], 0, 20, 600, 35, 0x00, 0x33, 0x00);
drawString("Information", 5, 4, FONT_WHITE, shopSurface[5]); gfx_renderString("Information", 5, 4, FONT_WHITE, 0, shopSurface[5]);
switch (shopSelectedItem) switch (shopSelectedItem)
{ {
case -1: case -1:
break; break;
case -2: case -2:
drawString("You don't have enough money", 20, 30, FONT_WHITE, gfx_renderString("You don't have enough money", 20, 30, FONT_WHITE,
shopSurface[5]); 0, shopSurface[5]);
break; break;
case -3: case -3:
drawString("Cannot upgrade ship", 5, 22, FONT_WHITE, shopSurface[5]); gfx_renderString("Cannot upgrade ship", 5, 22, FONT_WHITE, 0,
drawString("Hardware capacity has been reached", 20, 38, FONT_CYAN,
shopSurface[5]); shopSurface[5]);
gfx_renderString("Hardware capacity has been reached", 20, 38,
FONT_CYAN, 0, shopSurface[5]);
break; break;
case -4: case -4:
drawString("Ammunition limit reached", 20, 30, FONT_WHITE, gfx_renderString("Ammunition limit reached", 20, 30, FONT_WHITE, 0,
shopSurface[5]); shopSurface[5]);
break; break;
case -5: case -5:
drawString("You cannot sell that item", 20, 30, FONT_WHITE, gfx_renderString("You cannot sell that item", 20, 30, FONT_WHITE,
shopSurface[5]); 0, shopSurface[5]);
break; break;
case -6: case -6:
drawString("Nothing to sell", 20, 30, FONT_WHITE, shopSurface[5]); gfx_renderString("Nothing to sell", 20, 30, FONT_WHITE, 0,
break;
case -7:
drawString("Rockets cannot be bought for Laser or Charger Cannon",
5, 30, FONT_WHITE, shopSurface[5]);
break;
case -8:
drawString("You already have that weapon", 20, 30, FONT_WHITE,
shopSurface[5]); shopSurface[5]);
break; break;
case -7:
gfx_renderString("Rockets cannot be bought for Laser or Charger Cannon",
5, 30, FONT_WHITE, 0, shopSurface[5]);
break;
case -8:
gfx_renderString("You already have that weapon", 20, 30,
FONT_WHITE, 0, shopSurface[5]);
break;
case -9: case -9:
drawString("This weapon's ammo limit has been reached", 20, 30, gfx_renderString("This weapon's ammo limit has been reached", 20,
FONT_WHITE, shopSurface[5]); 30, FONT_WHITE, 0, shopSurface[5]);
break; break;
default: default:
if (shopItems[shopSelectedItem].price != 0) if (shopItems[shopSelectedItem].price != 0)
@ -312,9 +314,9 @@ static void drawShop()
sprintf(description, "%s (N/A)", sprintf(description, "%s (N/A)",
shopItems[shopSelectedItem].description); shopItems[shopSelectedItem].description);
} }
drawString(shopItems[shopSelectedItem].name, 5, 22, FONT_WHITE, gfx_renderString(shopItems[shopSelectedItem].name, 5, 22,
shopSurface[5]); FONT_WHITE, 0, shopSurface[5]);
drawString(description, 20, 38, FONT_CYAN, shopSurface[5]); gfx_renderString(description, 20, 38, FONT_CYAN, 0, shopSurface[5]);
break; break;
} }
} }

View File

@ -368,9 +368,12 @@ int doTitle()
if (!skip) if (!skip)
{ {
drawString("Copyright Parallel Realities 2003", 5, 560, FONT_WHITE, background); gfx_renderString("Copyright Parallel Realities 2003", 5,
drawString("Copyright Guus Sliepen, Astrid S. de Wijn and others 2012", 5, 580, FONT_WHITE, background); 560, FONT_WHITE, 0, background);
drawString(buildVersion, 794 - strlen(buildVersion) * 9, 580, FONT_WHITE, background); gfx_renderString("Copyright Guus Sliepen, Astrid S. de Wijn and others 2012",
5, 580, FONT_WHITE, 0, background);
gfx_renderString(buildVersion, 794 - strlen(buildVersion) * 9,
580, FONT_WHITE, 0, background);
screen_addBuffer(0, 560, 800, 40); screen_addBuffer(0, 560, 800, 40);
skip = true; skip = true;
} }
@ -390,9 +393,12 @@ int doTitle()
{ {
if ((now - then <= 27500) && (!skip)) if ((now - then <= 27500) && (!skip))
{ {
drawString("Copyright Parallel Realities 2003", 5, 560, FONT_WHITE, background); gfx_renderString("Copyright Parallel Realities 2003", 5, 560,
drawString("Copyright Guus Sliepen, Astrid S. de Wijn and others 2012", 5, 580, FONT_WHITE, background); FONT_WHITE, 0, background);
drawString(buildVersion, 794 - strlen(buildVersion) * 9, 580, FONT_WHITE, background); gfx_renderString("Copyright Guus Sliepen, Astrid S. de Wijn and others 2012",
5, 580, FONT_WHITE, 0, background);
gfx_renderString(buildVersion, 794 - strlen(buildVersion) * 9,
580, FONT_WHITE, 0, background);
screen_addBuffer(0, 560, 800, 40); screen_addBuffer(0, 560, 800, 40);
skip = true; skip = true;
} }