Added translation support.

No, really, just added the whole thing. This took literally the
entire day. I'm soooo glad it's working now!

Also includes tons of other small fixes I didn't bother to keep
track of.
This commit is contained in:
Julie Marchant 2019-06-05 22:13:48 -04:00
parent 24e565680b
commit caf963ba19
30 changed files with 5142 additions and 951 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@ build
dist
*.o
*.pak
*.mo
starfighter
src/starfighter

View File

@ -5,7 +5,7 @@ License: GNU GPLv3 or later <https://gnu.org/licenses/gpl.html>
------------------------------------------------------------------------
data/TakaoGothic.ttf
data/TakaoPGothic.ttf
Source: https://packages.debian.org/sid/fonts-takao-gothic

View File

@ -5,6 +5,10 @@
SUBDIRS = src misc
dist_doc_DATA = README.txt COPYING LICENSES
if !RUN_IN_PLACE
dist_doc_DATA = README.txt COPYING LICENSES
nobase_pkgdata_DATA = data/* gfx/* music/* sound/* locale/*
endif
nobase_pkgdata_DATA = data/* gfx/* music/* sound/*

View File

@ -60,10 +60,16 @@ AS_IF([test -n "$SF_SCREEN_HEIGHT"], [
echo "Using built-in screen height default"
])
AS_IF([test -n "$SF_RUN_IN_PLACE"], [
echo "Preparing a run-in-place build"
])
AM_CONDITIONAL([RUN_IN_PLACE], [test -n "$SF_RUN_IN_PLACE"])
AC_SUBST([STARFIGHTER_CFLAGS])
# Checks for header files.
AC_CHECK_HEADERS([ctype.h errno.h stdio.h stdlib.h string.h time.h math.h pwd.h sys/stat.h unistd.h])
AC_CHECK_HEADERS([ctype.h errno.h libintl.h locale.h stdio.h stdlib.h string.h time.h math.h pwd.h sys/stat.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.

View File

@ -1,7 +0,0 @@
# This file has been dedicated to the public domain, to the extent
# possible under applicable law, via CC0. See
# http://creativecommons.org/publicdomain/zero/1.0/ for more
# information. This file is offered as-is, without any warranty.
nobase_pkgdata_DATA = \
credits.txt

View File

@ -1,195 +0,0 @@
# This file has been dedicated to the public domain, to the extent
# possible under applicable law, via CC0. See
# http://creativecommons.org/publicdomain/zero/1.0/ for more
# information. This file is offered as-is, without any warranty.
nobase_pkgdata_DATA = \
aimFighter1.png \
aimFighter2.png \
alienDevice.png \
arrowEast.png \
arrowNorth.png \
arrowNorthEast.png \
arrowNorthWest.png \
arrowSouth.png \
arrowSouthEast.png \
arrowSouthWest.png \
arrowWest.png \
asteroid1.png \
asteroid2.png \
asteroid3.png \
barrier.png \
buyIcon.png \
cargo1.png \
chainLink.png \
cloakShip1.png \
cloakShip2.png \
credits.jpg \
cursor.png \
dollar.png \
drone1.png \
drone2.png \
dualFighter1.png \
dualFighter2.png \
elec1.png \
elec2.png \
elec3.png \
elec4.png \
eliteFighter1.png \
eliteFighter2.png \
escort1.png \
escort2.png \
evilUrsula1.png \
evilUrsula2.png \
execTrans1.png \
execTrans2.png \
explode1.png \
explode2.png \
explode3.png \
explode4.png \
explode05.png \
explode06.png \
explode07.png \
explode08.png \
explode9.png \
explode10.png \
explode11.png \
explode12.png \
explode13.png \
explode14.png \
explode15.png \
explode16.png \
eyananth.jpg \
face_chris.png \
face_crew.png \
face_kline.png \
face_krass.png \
face_phoebe.png \
face_sid.png \
face_ursula.png \
firefly1.png \
firefly2.png \
firefly-big.png \
friendArrowEast.png \
friendArrowNorth.png \
friendArrowNorthEast.png \
friendArrowNorthWest.png \
friendArrowSouth.png \
friendArrowSouthEast.png \
friendArrowSouthWest.png \
friendArrowWest.png \
frigateBody1.png \
frigateBody2.png \
frigateGun11.png \
frigateGun12.png \
frigateGun21.png \
frigateGun22.png \
gameover.png \
goodTrans1.png \
goodTrans2.png \
greenDir.png \
heart.png \
icon1.png \
icon2.png \
icon3.png \
icon4.png \
icon5.png \
icon6.png \
icon7.png \
icon8.png \
icon9.png \
icon10.png \
icon11.png \
icon12.png \
icon13.png \
icon14.png \
icon15.png \
icon16.png \
icon17.png \
icon18.png \
icon19.png \
icon20.png \
icon21.png \
icon22.png \
icon23.png \
icon24.png \
icon25.png \
icon26.png \
iconBase.png \
kline11.png \
kline12.png \
klineText.png \
merc1.png \
merc2.png \
mine.png \
mineBoss1.png \
mineBoss2.png \
mineBossWing11.png \
mineBossWing12.png \
mineBossWing21.png \
mineBossWing22.png \
mineBossWing31.png \
mineBossWing32.png \
mineBossWing41.png \
mineBossWing42.png \
miner1.png \
miner2.png \
missileBoat1.png \
missileBoat2.png \
mobileCannon1.png \
mobileCannon2.png \
mobileShield1.png \
mobileShield2.png \
mordor.jpg \
ore1.png \
ore2.png \
ore3.png \
phoebeText.png \
planet_blue.png \
planet_green.png \
planet_orange.png \
planet_red.png \
planet_sun.png \
plasmaAmmo.png \
plasmaDamage.png \
plasmaGreen.png \
plasmaRate.png \
plasmaRed.png \
plutoBoss1.png \
plutoBoss2.png \
pod.png \
prlogo.png \
rebelCarrier1.png \
rebelCarrier2.png \
redDir.png \
rocket.png \
rocket1.png \
rocket2.png \
rocketAmmo.png \
sellIcon.png \
sflogo.png \
sid1.png \
sid2.png \
sidText.png \
slaveTrans1.png \
slaveTrans2.png \
smallFont.png \
sol.jpg \
spirit.jpg \
splitBoss11.png \
splitBoss12.png \
splitBoss21.png \
splitBoss22.png \
splitBoss31.png \
splitBoss32.png \
startUp.jpg \
stunBolt.png \
superCharge.png \
targetText.png \
transport1.png \
transport2.png \
tug1.png \
tug2.png \
ursulaText.png \
wingmate1.png \
wingmate2.png

38
locale/build.py Executable file
View File

@ -0,0 +1,38 @@
#!/usr/bin/env python3
# Copyright (C) 2016 Julie Marchant <onpon4@riseup.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import os
import subprocess
if __name__ == "__main__":
for fname in os.listdir():
root, ext = os.path.splitext(fname)
if ext == ".po":
print("Building {}...".format(fname))
d, root = os.path.split(root)
os.makedirs(os.path.join(d, root, "LC_MESSAGES"), exist_ok=True)
oname = os.path.join(d, root, "LC_MESSAGES", "pr-starfighter.mo")
subprocess.call(["msgfmt", "-o", oname, fname])
print("Done.")

2055
locale/en.po Normal file

File diff suppressed because it is too large Load Diff

1839
locale/pr-starfighter.pot Normal file

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,12 @@
# http://creativecommons.org/publicdomain/zero/1.0/ for more
# information. This file is offered as-is, without any warranty.
if !RUN_IN_PLACE
desktopdir = $(datarootdir)/applications
desktop_DATA = starfighter.desktop
icondir = $(datarootdir)/pixmaps
icon_DATA = starfighter.png
endif

View File

@ -1,17 +0,0 @@
# This file has been dedicated to the public domain, to the extent
# possible under applicable law, via CC0. See
# http://creativecommons.org/publicdomain/zero/1.0/ for more
# information. This file is offered as-is, without any warranty.
nobase_pkgdata_DATA = \
death.ogg \
frozen_jam.ogg \
last_cyber_dance.ogg \
orbital_colossus.ogg \
railjet_short.ogg \
RE.ogg \
rise_of_spirit.ogg \
sound_and_silence.ogg \
space_dimensions.ogg \
through_space.ogg \
walking_among_androids.ogg

View File

@ -1,24 +0,0 @@
# This file has been dedicated to the public domain, to the extent
# possible under applicable law, via CC0. See
# http://creativecommons.org/publicdomain/zero/1.0/ for more
# information. This file is offered as-is, without any warranty.
nobase_pkgdata_DATA = \
beamLaser.ogg \
cloak.ogg \
clock.ogg \
explode.ogg \
explode2.ogg \
explode3.ogg \
explode4.ogg \
flyby.ogg \
hyperSpace.ogg \
item.ogg \
laser.ogg \
maledeath.ogg \
missile.ogg \
missile2.ogg \
plasma.ogg \
plasma2.ogg \
plasma3.ogg \
shield.ogg

View File

@ -5,7 +5,12 @@
bin_PROGRAMS = starfighter
if RUN_IN_PLACE
starfighter_CPPFLAGS = $(STARFIGHTER_CFLAGS) -Wall
else
starfighter_CPPFLAGS = $(STARFIGHTER_CFLAGS) -DDATADIR=\"$(pkgdatadir)\" -Wall
endif
starfighter_CFLAGS = $(SDL_CFLAGS) $(PANGO_CFLAGS) -lm
starfighter_LDADD = $(SDL_LIBS) $(PANGO_LIBS)

View File

@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libintl.h>
#include <locale.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@ -76,6 +78,10 @@ int main(int argc, char **argv)
printf("Warning: failed to change directory to \"%s\"\n", DATADIR);
#endif
setlocale(LC_ALL, "");
bindtextdomain("pr-starfighter", "./locale/");
textdomain("pr-starfighter");
engine_init(); // Must do this first!
cheatAttempt = 0;

View File

@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libintl.h>
#include <math.h>
#include <stdlib.h>
@ -42,57 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Object alien_defs[CD_MAX];
Object aliens[ALIEN_MAX];
#define NMSG_CHRIS_KILL 15
static const char *chrisKillMessage[NMSG_CHRIS_KILL] = {
"Take that, robot oppressors!",
"Come on, WEAPCO, give me a challenge already!",
"Is that all you've got?",
"I could kill these robots with my hands tied behind my back!",
"And now you're nothing but a pile of scrap metal!",
"Who else wants some?!",
"Humans do it better!",
"A century of AI research is no match for me!",
"What's the matter, WEAPCO? Can't keep up?",
"I eat robots like you for breakfast!",
"Target destroyed!",
"Bring it on, WEAPCO!",
"I wish the guys back at home could see this!",
"How do you like that, WEAPCO?",
"Maybe you should change your name to WEEPCO!"
};
#define NMSG_PHOEBE_KILL 11
static const char *phoebeKillMessage[NMSG_PHOEBE_KILL] = {
"I got another one!",
"Target destroyed!",
"One more for me!",
"Yes! Did you see that, Chris?",
"Hey Chris, remind me to check my kill count later!",
"Bring it on, WEAPCO!",
"Take that, WEAPCO!",
"My kill count is going up!",
"Another one bites the dust!",
"Yeah! Nothing can stand in our way!",
"I got it!"
};
#define NMSG_URSULA_KILL 14
static const char *ursulaKillMessage[NMSG_URSULA_KILL] = {
"Kicked your ass!",
"You ain't so tough!",
"I was always a better WEAPCO pilot than you!",
"Target destroyed!",
"That'll teach you!",
"Take that, you cruddy robots!",
"Is that all you've got?",
"Who else wants some?!",
"I'm not letting you beat me, Phoebe!",
"Bring it on, you mindless drones!",
"Oh, I'm sorry, are you getting your metal asses handed to you?",
"No one messes with the Lexx family!",
"Die, damned WEAPCO drones!",
"Don't think you can get away from me!"
};
/*
This simply pulls back an alien from the array that is
@ -1909,8 +1859,8 @@ Fill in later...
*/
void alien_destroy(Object *alien, Object *attacker)
{
int r;
int collect_type, collect_value, value;
char msg[STRMAX];
audio_playSound(SFX_EXPLOSION, alien->x, alien->y);
@ -1955,8 +1905,31 @@ void alien_destroy(Object *alien, Object *attacker)
if (CHANCE(1 / 16.) && (alien->flags & FL_WEAPCO) &&
(!(alien->flags & FL_NOBANTER)))
{
r = rand() % NMSG_CHRIS_KILL;
radio_setMessage(FS_CHRIS, chrisKillMessage[r], 0);
radio_getRandomMessage(msg, _(
/// Chris brag messages
/// This is a list of brags separated by "\n". They are randomly
/// broadcast when Chris successfully kills an enemy.
/// Instead of directly translating these, please populate the list
/// with brag messages that work well in the target language,
/// following the English version only as a general guideline. Any
/// number of brag messages is permitted.
"Take that, robot oppressors!\n"
"Come on, WEAPCO, give me a challenge already!\n"
"Is that all you've got?\n"
"I could kill these robots with my hands tied behind my back!\n"
"And now you're nothing but a pile of scrap metal!\n"
"Who else wants some?!\n"
"Humans do it better!\n"
"A century of AI research is no match for me!\n"
"What's the matter, WEAPCO? Can't keep up?\n"
"I eat robots like you for breakfast!\n"
"Target destroyed!\n"
"Bring it on, WEAPCO!\n"
"I wish the guys back at home could see this!\n"
"How do you like that, WEAPCO?\n"
"Maybe you should change your name to WEEPCO!"
));
radio_setMessage(FS_CHRIS, msg, 0);
}
}
else if (attacker->classDef == CD_PHOEBE)
@ -1965,8 +1938,27 @@ void alien_destroy(Object *alien, Object *attacker)
if (CHANCE(1 / 8.) && (alien-> flags & FL_WEAPCO) &&
(!(alien->flags & FL_NOBANTER)))
{
r = rand() % NMSG_PHOEBE_KILL;
radio_setMessage(FS_PHOEBE, phoebeKillMessage[r], 0);
radio_getRandomMessage(msg, _(
/// Phoebe brag messages
/// This is a list of brags separated by "\n". They are randomly
/// broadcast when Phoebe successfully kills an enemy.
/// Instead of directly translating these, please populate the list
/// with brag messages that work well in the target language,
/// following the English version only as a general guideline. Any
/// number of brag messages is permitted.
"I got another one!\n"
"Target destroyed!\n"
"One more for me!\n"
"Yes! Did you see that, Chris?\n"
"Hey Chris, remind me to check my kill count later!\n"
"Bring it on, WEAPCO!\n"
"Take that, WEAPCO!\n"
"My kill count is going up!\n"
"Another one bites the dust!\n"
"Yeah! Nothing can stand in our way!\n"
"I got it!"
));
radio_setMessage(FS_PHOEBE, msg, 0);
}
}
else if (attacker->classDef == CD_URSULA)
@ -1975,8 +1967,30 @@ void alien_destroy(Object *alien, Object *attacker)
if (CHANCE(1 / 8.) && (alien-> flags & FL_WEAPCO) &&
(!(alien->flags & FL_NOBANTER)))
{
r = rand() % NMSG_URSULA_KILL;
radio_setMessage(FS_URSULA, ursulaKillMessage[r], 0);
radio_getRandomMessage(msg, _(
/// Ursula brag messages
/// This is a list of brags separated by "\n". They are randomly
/// broadcast when Ursula successfully kills an enemy.
/// Instead of directly translating these, please populate the list
/// with brag messages that work well in the target language,
/// following the English version only as a general guideline. Any
/// number of brag messages is permitted.
"Kicked your ass!\n"
"You ain't so tough!\n"
"I was always a better WEAPCO pilot than you!\n"
"Target destroyed!\n"
"That'll teach you!\n"
"Take that, you cruddy robots!\n"
"Is that all you've got?\n"
"Who else wants some?!\n"
"I'm not letting you beat me, Phoebe!\n"
"Bring it on, you mindless drones!\n"
"Oh, I'm sorry, are you getting your metal asses handed to you?\n"
"No one messes with the Lexx family!\n"
"Die, damned WEAPCO drones!\n"
"Don't think you can get away from me!"
));
radio_setMessage(FS_URSULA, msg, 0);
}
}
else
@ -2124,7 +2138,3 @@ void alien_hurt(Object *alien, Object *attacker, int damage, int ion)
alien->systemPower = alien->maxShield;
}
}
#undef NMSG_CHRIS_KILL
#undef NMSG_PHOEBE_KILL
#undef NMSG_URSULA_KILL

View File

@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libintl.h>
#include <stdlib.h>
#include <string.h>
@ -100,16 +101,20 @@ void cutscene_init(int scene)
}
messages[0].face = -1;
strcpy(messages[0].message, "While escaping with his newly acquired Firefly, Chris Bainfield is intercepted by a WEAPCO patrol...");
/// Cutscene (narration)
strcpy(messages[0].message, _("While escaping with his newly acquired Firefly, Chris Bainfield is intercepted by a WEAPCO patrol..."));
messages[1].face = FS_CHRIS;
strcpy(messages[1].message, "These things just won't give up, will they?");
/// Cutscene (Chris Bainfield)
strcpy(messages[1].message, _("These things just won't give up, will they?"));
messages[2].face = FS_CHRIS;
strcpy(messages[2].message, "What a dilemma! I'm not all that familiar with this ship's controls, but I can't let this patrol reach my rendezvous point...");
/// Cutscene (Chris Bainfield)
strcpy(messages[2].message, _("What a dilemma! I'm not all that familiar with this ship's controls, but I can't let this patrol reach my rendezvous point..."));
messages[3].face = FS_CHRIS;
strcpy(messages[3].message, "I guess I'll have to fight them, then. Let's see what this ship can do!");
/// Cutscene (Chris Bainfield)
strcpy(messages[3].message, _("I guess I'll have to fight them, then. Let's see what this ship can do!"));
break;
@ -134,19 +139,24 @@ void cutscene_init(int scene)
}
messages[0].face = -1;
strcpy(messages[0].message, "A few hours later, in the Sol system, news has already spread of Chris Bainfield's heroic actions. The commander of WEAPCO's navy considers his options.");
/// Cutscene (narration)
strcpy(messages[0].message, _("A few hours later, in the Sol system, news has already spread of Chris Bainfield's heroic actions. The commander of WEAPCO's navy considers his options."));
messages[1].face = FS_KLINE;
strcpy(messages[1].message, "The Emperor will not be pleased. Spirit is now a free star system thanks to that interfering rebel pilot.");
/// Cutscene (Kline Kethlan)
strcpy(messages[1].message, _("The Emperor will not be pleased. Spirit is now a free star system thanks to that interfering rebel pilot."));
messages[2].face = FS_KLINE;
strcpy(messages[2].message, "It was reported that he was able to take down one of our most powerful frigates in under 3 minutes!");
/// Cutscene (Kline Kethlan)
strcpy(messages[2].message, _("It was reported that he was able to take down one of our most powerful frigates in under 3 minutes!"));
messages[3].face = FS_KLINE;
strcpy(messages[3].message, "Talent like that does not appear every day. He would be a perfect candidate for our new AI training program!");
/// Cutscene (Kline Kethlan)
strcpy(messages[3].message, _("Talent like that does not appear every day. He would be a perfect candidate for our new AI training program!"));
messages[4].face = FS_KLINE;
strcpy(messages[4].message, "What a pity I must kill him...");
/// Cutscene (Kline Kethlan)
strcpy(messages[4].message, _("What a pity I must kill him..."));
break;
@ -168,19 +178,24 @@ void cutscene_init(int scene)
aliens[1].active = 1;
messages[0].face = FS_SID;
strcpy(messages[0].message, "We're nearly ready to make the jump to Eyananth.");
/// Cutscene (Sid Wilson)
strcpy(messages[0].message, _("We're nearly ready to make the jump to Eyananth."));
messages[1].face = FS_CHRIS;
strcpy(messages[1].message, "Aren't there a lot of WEAPCO slaves in this system?");
/// Cutscene (Chris Bainfield)
strcpy(messages[1].message, _("Aren't there a lot of WEAPCO slaves in this system?"));
messages[2].face = FS_SID;
strcpy(messages[2].message, "Yes. It's got one of the highest mortality rates in the galaxy.");
/// Cutscene (Sid Wilson)
strcpy(messages[2].message, _("Yes. It's got one of the highest mortality rates in the galaxy."));
messages[3].face = FS_CHRIS;
strcpy(messages[3].message, "You think we can use that to our advantage?");
/// Cutscene (Chris Bainfield)
strcpy(messages[3].message, _("You think we can use that to our advantage?"));
messages[4].face = FS_SID;
strcpy(messages[4].message, "I think so. I'll come up with a plan of action.");
/// Cutscene (Sid Wilson)
strcpy(messages[4].message, _("I think so. I'll come up with a plan of action."));
break;
@ -208,25 +223,32 @@ void cutscene_init(int scene)
aliens[2].active = 1;
messages[0].face = FS_PHOEBE;
strcpy(messages[0].message, "Nice head gear! You shop at the same place as me, huh?");
/// Cutscene (Phoebe Lexx)
strcpy(messages[0].message, _("Nice head gear! You shop at the same place as me, huh?"));
messages[1].face = FS_CHRIS;
strcpy(messages[1].message, "More importantly, what were you doing out there? You're lucky I was around!");
/// Cutscene (Chris Bainfield)
strcpy(messages[1].message, _("More importantly, what were you doing out there? You're lucky I was around!"));
messages[2].face = FS_PHOEBE;
strcpy(messages[2].message, "I'm looking for my sister. She vanished about a week ago.");
/// Cutscene (Phoebe Lexx)
strcpy(messages[2].message, _("I'm looking for my sister. She vanished about a week ago."));
messages[3].face = FS_PHOEBE;
strcpy(messages[3].message, "Hey! Wait a moment! You're that rebel from Spirit! I think you're so cool! Can I come with you?");
/// Cutscene (Phoebe Lexx)
strcpy(messages[3].message, _("Hey! Wait a moment! You're that rebel from Spirit! I think you're so cool! Can I come with you?"));
messages[4].face = FS_CHRIS;
strcpy(messages[4].message, "Extra firepower? I wouldn't mind one bit! What do you think, Sid?");
/// Cutscene (Chris Bainfield)
strcpy(messages[4].message, _("Extra firepower? I wouldn't mind one bit! What do you think, Sid?"));
messages[5].face = FS_SID;
strcpy(messages[5].message, "I agree. I'm also interested in studying her homing missile launcher; it could come in handy.");
/// Cutscene (Sid Wilson)
strcpy(messages[5].message, _("I agree. I'm also interested in studying her homing missile launcher; it could come in handy."));
messages[6].face = FS_CHRIS;
strcpy(messages[6].message, "In that case, welcome aboard!");
/// Cutscene (Chris Bainfield)
strcpy(messages[6].message, _("In that case, welcome aboard, Phoebe!"));
break;
@ -254,31 +276,40 @@ void cutscene_init(int scene)
aliens[2].active = 1;
messages[0].face = FS_SID;
strcpy(messages[0].message, "What happened back there, Chris? The video feed was jammed.");
/// Cutscene (Sid Wilson)
strcpy(messages[0].message, _("What happened back there, Chris? The video feed was jammed."));
messages[1].face = FS_CHRIS;
strcpy(messages[1].message, "We took down the WEAPCO mining vessel and then I was jumped by a man claiming to be Kline Kethlan.");
/// Cutscene (Chris Bainfield)
strcpy(messages[1].message, _("We took down the WEAPCO mining vessel and then I was jumped by a man claiming to be Kline Kethlan."));
messages[2].face = FS_SID;
strcpy(messages[2].message, "I've heard of him. He's the Commander of WEAPCO's naval forces. One of the best pilots they ever had.");
/// Cutscene (Sid Wilson)
strcpy(messages[2].message, _("I've heard of him. He's the Commander of WEAPCO's naval forces. One of the best pilots they ever had."));
messages[3].face = FS_CHRIS;
strcpy(messages[3].message, "He did put up one hell of a fight! He didn't stick around for long, though.");
/// Cutscene (Chris Bainfield)
strcpy(messages[3].message, _("He did put up one hell of a fight! He didn't stick around for long, though."));
messages[4].face = FS_CHRIS;
strcpy(messages[4].message, "Anyway, what's the scoop on Mordor, Sid?");
/// Cutscene (Chris Bainfield)
strcpy(messages[4].message, _("Anyway, what's the scoop on Mordor, Sid?"));
messages[5].face = FS_SID;
strcpy(messages[5].message, "I've learned from the scientist we captured that WEAPCO is testing a new fighter craft there.");
/// Cutscene (Sid Wilson)
strcpy(messages[5].message, _("I've learned from the scientist we captured that WEAPCO is testing a new fighter craft there."));
messages[6].face = FS_CHRIS;
strcpy(messages[6].message, "We should probably destroy that craft, then. We might be able to thwart its development somewhat.");
/// Cutscene (Chris Bainfield)
strcpy(messages[6].message, _("We should probably destroy that craft, then. We might be able to thwart its development somewhat."));
messages[7].face = FS_SID;
strcpy(messages[7].message, "Agreed.");
/// Cutscene (Sid Wilson)
strcpy(messages[7].message, _("Agreed. Capturing it would be better, but that's probably not going to happen."));
messages[8].face = FS_PHOEBE;
strcpy(messages[8].message, "I wonder if my sister will be here...");
/// Cutscene (Phoebe Lexx)
strcpy(messages[8].message, _("I wonder if my sister will be here..."));
break;
@ -306,19 +337,24 @@ void cutscene_init(int scene)
aliens[2].active = 1;
messages[0].face = FS_PHOEBE;
strcpy(messages[0].message, "Will she be okay?");
/// Cutscene (Phoebe Lexx)
strcpy(messages[0].message, _("Will she be okay?"));
messages[1].face = FS_SID;
strcpy(messages[1].message, "I've had a look at the implants and they should be easy to remove. She'll just have a headache for a while.");
/// Cutscene (Sid Wilson)
strcpy(messages[1].message, _("I've had a look at the implants and they should be easy to remove. She'll just have a headache for a while."));
messages[2].face = FS_CHRIS;
strcpy(messages[2].message, "Will she be able to tell us anything useful?");
/// Cutscene (Chris Bainfield)
strcpy(messages[2].message, _("Will she be able to tell us anything useful?"));
messages[3].face = FS_SID;
strcpy(messages[3].message, "We'll have to wait for her memory to come back. She might not be able to remember anything she did while the implants were in.");
/// Cutscene (Sid Wilson)
strcpy(messages[3].message, _("We'll have to wait for her memory to come back. She might not be able to remember anything she did while the implants were in."));
messages[4].face = FS_SID;
strcpy(messages[4].message, "She'll still be able to pilot a ship though.");
/// Cutscene (Sid Wilson)
strcpy(messages[4].message, _("She'll still be able to pilot a ship though."));
break;
@ -352,19 +388,24 @@ void cutscene_init(int scene)
aliens[3].active = 1;
messages[0].face = FS_CHRIS;
strcpy(messages[0].message, "Sorry folks, we just lost our bargaining chip.");
/// Cutscene (Chris Bainfield)
strcpy(messages[0].message, _("Sorry folks, we just lost our bargaining chip."));
messages[1].face = FS_SID;
strcpy(messages[1].message, "Don't worry about it. It's not what I hoped for, but it should still make it easier to defeat WEAPCO.");
/// Cutscene (Sid Wilson)
strcpy(messages[1].message, _("Don't worry about it. It's not what I hoped for, but it should still make it easier to defeat WEAPCO."));
messages[2].face = FS_URSULA;
strcpy(messages[2].message, "Sol is going to be difficult. I've heard they have a lot of heavy defenses on the outer planets.");
/// Cutscene (Ursula Lexx)
strcpy(messages[2].message, _("Sol is going to be difficult. I've heard they have a lot of heavy defenses on the outer planets."));
messages[3].face = FS_SID;
strcpy(messages[3].message, "We'll have to start there, then.");
/// Cutscene (Sid Wilson)
strcpy(messages[3].message, _("We'll have to start there, then."));
messages[4].face = FS_SID;
strcpy(messages[4].message, "The forces here will be unlike anything we've met so far. Just be careful, everyone.");
/// Cutscene (Sid Wilson)
strcpy(messages[4].message, _("The forces here will be unlike anything we've met so far. Just be careful, everyone."));
break;
}
@ -452,7 +493,7 @@ void cutscene_init(int scene)
if ((showMessage) && (gfx_messageBox != NULL))
screen_blit(gfx_messageBox, (screen->w - gfx_messageBox->w) / 2, screen->h - 100);
screen_renderString("Press [Escape] to skip", -1, screen->h - 20, FONT_WHITE);
screen_renderUnicode(_("Press [Escape] to skip"), -1, screen->h - 20, FONT_WHITE);
game_delayFrame();

View File

@ -22,8 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Macros
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define LIMIT(x, a, b) x = ((x) < (b) ? ((x) > (a) ? (x) : (a)) : (b))
#define LIMIT_ADD(x, y, a, b) x = (((x) + (y)) < (b) ? \
(((x) + (y)) > (a) ? \
@ -34,6 +32,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define CHANCE(x) ((rand() % RAND_MAX) < ((x) * RAND_MAX))
#define RANDRANGE(x, y) (((x) < (y)) ? ((x) + (rand() % (long)(1 + (y) - (x)))) : (x))
#define DRAND ((double)rand() / RAND_MAX)
#define _(s) gettext(s)
// A soft dependency defines these as well, so check if they are
// defined before defining (avoids compiler warnings)
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
// Compile-time options
@ -72,6 +81,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MAX_MICRO_HOMING 10
#define RAY_DAMAGE_DELAY 5
#define PIXFONT_LINE_HEIGHT 16
#define PIXFONT_W 8
#define PIXFONT_H 14
#define MENU_Y (screen->h / 3 + 50)
#define MENU_SPACING 20
// Object Flags
#define FL_WEAPCO 1
#define FL_FRIEND 2
@ -606,7 +622,18 @@ enum {
};
// Shop items
// Note: The error codes are set manually because every actual items
// must be >= 0; the real items are used to index an array.
enum {
SHOP_ERROR_WEAPON_CAPACITY = -9,
SHOP_ERROR_ALREADY_OWNED = -8,
SHOP_ERROR_IS_NOT_ROCKETS = -7,
SHOP_ERROR_NOTHING_TO_SELL = -6,
SHOP_ERROR_CANNOT_SELL = -5,
SHOP_ERROR_AMMO_LIMIT = -4,
SHOP_ERROR_CANNOT_UPGRADE = -3,
SHOP_ERROR_INSUFFICIENT_FUNDS = -2,
SHOP_NOTHING = -1,
SHOP_PLASMA_MAX_OUTPUT,
SHOP_PLASMA_MAX_DAMAGE,
SHOP_PLASMA_MAX_RATE,

View File

@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libintl.h>
#include <stdlib.h>
#include <string.h>
@ -32,13 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
static Event events[MAX_EVENTS];
#define NMSG_KLINE_GREETING 4
static const char *klineGreeting[NMSG_KLINE_GREETING] = {
"How nice to see you again, Bainfield!",
"It all ends here, rebel!",
"I hope you won't disappoint me this time...",
"Do you really think you can defeat us?!"
};
void events_init()
{
@ -59,7 +53,18 @@ void events_init()
{
events[0].time = 2;
events[0].face = FS_KLINE;
strcpy(events[0].message, klineGreeting[rand() % NMSG_KLINE_GREETING]);
radio_getRandomMessage(events[0].message, _(
/// This is a list of taunts broadcast by Kline Kethlan when he shows
/// up at interceptions. Taunts are separated by a single "\n". Instead
/// of directly translating these, please populate the list with taunts
/// that work well in the target language, following the English
/// version only as a general guideline. Any number of taunts is
/// permitted.
"How nice to see you again, Bainfield!\n"
"It all ends here, rebel!\n"
"I hope you won't disappoint me this time...\n"
"Do you really think you can defeat us?!"
));
}
break;
@ -67,23 +72,28 @@ void events_init()
case MISN_MOEBO:
events[0].time = 2;
events[0].face = FS_SID;
strcpy(events[0].message, "You should try and destroy some of the frigate's weaponary, it'll help!");
/// Dialog (Sid Wilson)
strcpy(events[0].message, _("You should try and destroy some of the frigate's weaponary, it'll help!"));
events[1].time = 120;
events[1].face = FS_SID;
strcpy(events[1].message, "Chris, get a move on! The frigate is almost in range!");
/// Dialog (Sid Wilson)
strcpy(events[1].message, _("Chris, get a move on! The frigate is almost in range!"));
events[2].time = 150;
events[2].face = FS_SID;
strcpy(events[2].message, "The frigate is charging its cannon!");
/// Dialog (Sid Wilson)
strcpy(events[2].message, _("The frigate is charging its cannon!"));
events[3].time = 170;
events[3].face = FS_SID;
strcpy(events[3].message, "Chris, HURRY!");
/// Dialog (Sid Wilson)
strcpy(events[3].message, _("Chris, HURRY!"));
events[4].time = 180;
events[4].face = FS_SID;
strcpy(events[4].message, "Oh my god...");
/// Dialog (Sid Wilson)
strcpy(events[4].message, _("Oh my god..."));
events[4].entity = ALIEN_BOSS;
events[4].flag = FL_LEAVESECTOR | FL_IMMORTAL;
@ -92,54 +102,64 @@ void events_init()
case MISN_NEROD:
events[0].time = 2;
events[0].face = FS_PHOEBE;
strcpy(events[0].message, "Hey, over here! Destroy this tug so I can break free!");
/// Dialog (Phoebe Lexx)
strcpy(events[0].message, _("Hey, over here! Destroy this tug so I can break free!"));
break;
case MISN_ALLEZ:
events[0].time = 2;
events[0].face = FS_CREW;
strcpy(events[0].message, "Thank God! Please, help us! If they destroy this ship...");
/// Dialog (friendly transport from Eyananth, Allez mission)
strcpy(events[0].message, _("Thank God! Please, help us! If they destroy this ship..."));
events[1].time = 6;
events[1].face = FS_CHRIS;
strcpy(events[1].message, "How long do you need?");
/// Dialog (Chris Bainfield)
strcpy(events[1].message, _("How long do you need?"));
events[2].time = 10;
events[2].face = FS_CREW;
strcpy(events[2].message, "Just a few minutes!");
/// Dialog (friendly transport from Eyananth, Allez mission)
strcpy(events[2].message, _("Just a few minutes!"));
events[3].time = 60;
events[3].face = FS_CREW;
strcpy(events[3].message, "Alright! We've got the weapons working again! Now to look at the engines...");
/// Dialog (friendly transport from Eyananth, Allez mission)
strcpy(events[3].message, _("Alright! We've got the weapons working again! Now to look at the engines..."));
events[3].entity = ALIEN_FRIEND1;
events[3].flag = -FL_NOFIRE;
events[4].time = 80;
events[4].face = FS_CREW;
strcpy(events[4].message, "DAMN! The guns are offline again! What you guys doing back there?!");
/// Dialog (friendly transport from Eyananth, Allez mission)
strcpy(events[4].message, _("DAMN! The guns are offline again! What you guys doing back there?!"));
events[4].entity = ALIEN_FRIEND1;
events[4].flag = FL_NOFIRE;
events[5].time = 100;
events[5].face = FS_CREW;
strcpy(events[5].message, "Chris, HELP! We've lost all system power! We're a sitting duck out here!");
/// Dialog (friendly transport from Eyananth, Allez mission)
strcpy(events[5].message, _("Chris, HELP! We've lost all system power! We're a sitting duck out here!"));
events[5].entity = ALIEN_FRIEND1;
events[5].flag = FL_DISABLED;
events[6].time = 120;
events[6].face = FS_CREW;
strcpy(events[6].message, "Just a little longer...");
/// Dialog (friendly transport from Eyananth, Allez mission)
strcpy(events[6].message, _("Just a little longer..."));
events[7].time = 140;
events[7].face = FS_CREW;
strcpy(events[7].message, "Okay! We've fixed that one. We think we've found the problem with the engines too...");
/// Dialog (friendly transport from Eyananth, Allez mission)
strcpy(events[7].message, _("Okay! We've fixed that one. We think we've found the problem with the engines too..."));
events[7].entity = ALIEN_FRIEND1;
events[7].flag = -FL_DISABLED;
events[8].time = 177;
events[8].face = FS_CREW;
strcpy(events[8].message, "Engines fixed! Let's move!");
/// Dialog (friendly transport from Eyananth, Allez mission)
strcpy(events[8].message, _("Engines fixed! Let's move!"));
events[9].time = 180;
events[9].entity = ALIEN_FRIEND1;
@ -150,11 +170,13 @@ void events_init()
case MISN_ELAMALE:
events[0].time = 5;
events[0].face = FS_PHOEBE;
strcpy(events[0].message, "Ummm... something about this doesn't look right! They should be offering more resistance than this!");
/// Dialog (Phoebe Lexx)
strcpy(events[0].message, _("Ummm... something about this doesn't look right! They should be offering more resistance than this!"));
events[1].time = -8;
events[1].face = FS_PHOEBE;
strcpy(events[1].message, "DAMMIT! It's a trap! Come on, Chris, we have to leave NOW!");
/// Dialog (Phoebe Lexx)
strcpy(events[1].message, _("DAMMIT! It's a trap! Come on, Chris, we have to leave NOW!"));
events[2].time = -9;
events[2].entity = ALIEN_PHOEBE;
@ -162,27 +184,33 @@ void events_init()
events[3].time = -13;
events[3].face = FS_SID;
strcpy(events[3].message, "Chris, wh...");
/// Dialog (Sid Wilson)
strcpy(events[3].message, _("Chris, wh..."));
events[4].time = -15;
events[4].face = FS_KLINE;
strcpy(events[4].message, "So finally I meet the man who has been causing us so much trouble!");
/// Dialog (Kline Kethlan)
strcpy(events[4].message, _("So finally I meet the man who has been causing us so much trouble!"));
events[5].time = -20;
events[5].face = FS_CHRIS;
strcpy(events[5].message, "I see you've jammed up my warp drive. Who are you?");
/// Dialog (Chris Bainfield)
strcpy(events[5].message, _("I see you've jammed up my warp drive. Who are you?"));
events[6].time = -25;
events[6].face = FS_KLINE;
strcpy(events[6].message, "I am Kline Kethlan. And I am here to put to a stop to your worthless little crusade!");
/// Dialog (Kline Kethlan)
strcpy(events[6].message, _("I am Kline Kethlan. And I am here to put to a stop to your worthless little crusade!"));
events[7].time = -31;
events[7].face = FS_CHRIS;
strcpy(events[7].message, "Kline Kethlan, huh? You sure sound confident.");
/// Dialog (Chris Bainfield)
strcpy(events[7].message, _("Kline Kethlan, huh? You sure sound confident."));
events[8].time = -36;
events[8].face = FS_KLINE;
strcpy(events[8].message, "Nowhere to run, nowhere to hide, and no one to help you! This will certainly be interesting...");
/// Dialog (Kline Kethlan)
strcpy(events[8].message, _("Nowhere to run, nowhere to hide, and no one to help you! This will certainly be interesting..."));
events[9].time = -42;
events[9].entity = ALIEN_KLINE;
@ -193,30 +221,37 @@ void events_init()
case MISN_ODEON:
events[0].time = 2;
events[0].face = FS_URSULA;
strcpy(events[0].message, "Unidentified craft sighted. Will proceed to destroy all targets.");
/// Dialog (Ursula Lexx under mind control)
/// Translation note: This should appear robotic or at least monotone.
strcpy(events[0].message, _("Unidentified craft sighted. Will proceed to destroy all targets."));
events[1].time = 8;
events[1].face = FS_CHRIS;
strcpy(events[1].message, "Looks like she's got one of those homing missile launchers too! Any advice, Phoebe?");
/// Dialog (Chris Bainfield)
strcpy(events[1].message, _("Looks like she's got one of those homing missile launchers too! Any advice, Phoebe?"));
events[2].time = 14;
events[2].face = FS_PHOEBE;
strcpy(events[2].message, "Just try and dodge them!");
/// Dialog (Phoebe Lexx)
strcpy(events[2].message, _("Just try and dodge them!"));
break;
case MISN_ALMARTHA:
events[0].time = 1;
events[0].face = FS_CHRIS;
strcpy(events[0].message, "Nice ship!");
/// Dialog (Chris Bainfield)
strcpy(events[0].message, _("That's a nice ship you got there, old-timer!"));
events[1].time = 7;
events[1].face = FS_KRASS;
strcpy(events[1].message, "Thanks, boy. Made it myself!");
/// Dialog (Krass Tyler)
strcpy(events[1].message, _("Thanks, boy. Made it myself!"));
events[2].time = 60;
events[2].face = FS_KRASS;
strcpy(events[2].message, "Hey, boy, we've got company! Looks like your friends didn't do a very good job after all!");
/// Dialog (Krass Tyler)
strcpy(events[2].message, _("Hey, boy, we've got company! Looks like your friends didn't do a very good job after all!"));
events[2].entity = ALIEN_BOSS_PART1;
events[2].flag = -FL_ACTIVATE;
@ -226,7 +261,8 @@ void events_init()
events[4].time = 93;
events[4].face = FS_KRASS;
strcpy(events[4].message, "Keep those things off my back or it'll cost you extra!");
/// Dialog (Krass Tyler)
strcpy(events[4].message, _("Keep those things off my back or it'll cost you extra!"));
events[5].time = 120;
events[5].entity = ALIEN_BOSS_PART3;
@ -234,7 +270,8 @@ void events_init()
events[6].time = 140;
events[6].face = FS_PHOEBE;
strcpy(events[6].message, "Hey! Did we miss anything exciting?");
/// Dialog (Phoebe Lexx)
strcpy(events[6].message, _("Hey! Did we miss anything exciting?"));
events[6].entity = ALIEN_PHOEBE;
events[6].flag = -FL_ACTIVATE;
@ -244,7 +281,8 @@ void events_init()
events[8].time = 150;
events[8].face = FS_KRASS;
strcpy(events[8].message, "I've earned my fee. I'll see you around, boy!");
/// Dialog (Krass Tyler)
strcpy(events[8].message, _("I've earned my fee. I'll see you around, boy!"));
events[8].entity = ALIEN_FRIEND1;
events[8].flag = FL_LEAVESECTOR;
@ -253,7 +291,8 @@ void events_init()
case MISN_POSWIC:
events[0].time = 90;
events[0].face = FS_SID;
strcpy(events[0].message, "DAMMIT! It's getting away! We've got to stop it!");
/// Dialog (Sid Wilson)
strcpy(events[0].message, _("DAMMIT! It's getting away! We've got to stop it!"));
events[0].entity = ALIEN_BOSS;
events[0].flag = FL_LEAVESECTOR;
@ -262,7 +301,8 @@ void events_init()
case MISN_SATURN:
events[0].time = 45;
events[0].face = FS_SID;
strcpy(events[0].message, "Chris! Another two of those ray cannons just arrived in your sector!");
/// Dialog (Sid Wilson)
strcpy(events[0].message, _("Chris! Another two of those ray cannons just arrived in your sector!"));
events[0].entity = ALIEN_BOSS_PART3;
events[0].flag = -FL_ACTIVATE;
@ -272,7 +312,8 @@ void events_init()
events[2].time = 90;
events[2].face = FS_SID;
strcpy(events[2].message, "Two more!");
/// Dialog (Sid Wilson)
strcpy(events[2].message, _("Two more!"));
events[2].entity = ALIEN_BOSS_PART5;
events[2].flag = -FL_ACTIVATE;
@ -289,15 +330,18 @@ void events_init()
events[1].time = 2;
events[1].face = FS_URSULA;
strcpy(events[1].message, "It's a trap! My God! It's Tyler!");
/// Dialog (Ursula Lexx)
strcpy(events[1].message, _("It's a trap! My God! It's Tyler!"));
events[2].time = 8;
events[2].face = FS_KRASS;
strcpy(events[2].message, "I'm a mercenary, what do you expect?! WEAPCO hired me to do a job, just like you have been doing.");
/// Dialog (Krass Tyler)
strcpy(events[2].message, _("I'm a mercenary, what do you expect?! WEAPCO hired me to do a job, just like you have been doing."));
events[3].time = 14;
events[3].face = FS_CHRIS;
strcpy(events[3].message, "Good point. It would be foolish to expect anything else.");
/// Dialog (Chris Bainfield)
strcpy(events[3].message, _("Good point. It would be foolish to expect anything else."));
events[4].time = 15;
events[4].entity = ALIEN_BOSS_PART2;
@ -305,11 +349,13 @@ void events_init()
events[5].time = 20;
events[5].face = FS_KRASS;
strcpy(events[5].message, "Now if you'll assist me in dying quickly, I have a cheque to earn, boy...");
/// Dialog (Krass Tyler)
strcpy(events[5].message, _("Now if you'll assist me in dying quickly, I have a cheque to earn, boy..."));
events[6].time = 25;
events[6].face = FS_CHRIS;
strcpy(events[6].message, "I have a name, you know. Do you remember it?");
/// Dialog (Chris Bainfield)
strcpy(events[6].message, _("I have a name, you know. Do you remember it?"));
events[7].time = 45;
events[7].entity = ALIEN_BOSS_PART3;
@ -324,22 +370,26 @@ void events_init()
case MISN_EARTH:
events[0].time = 2;
events[0].face = FS_KLINE;
strcpy(events[0].message, "That's far enough, Bainfield. You've been lucky so far, but your luck is about to run out!");
/// Dialog (Kline Kethlan)
strcpy(events[0].message, _("That's far enough, Bainfield. You've been lucky so far, but your luck is about to run out!"));
events[1].time = 8;
events[1].face = FS_CHRIS;
strcpy(events[1].message, "Yeah, right! Like I'd lose to you after coming this far!");
/// Dialog (Chris Bainfield)
strcpy(events[1].message, _("Yeah, right! Like I'd lose to you after coming this far!"));
break;
case MISN_VENUS:
events[0].time = 2;
events[0].face = FS_CHRIS;
strcpy(events[0].message, "WEAPCO is finished, Kethlan! You have nowhere to run, nowhere to hide, and no one to help you.");
/// Dialog (Chris Bainfield)
strcpy(events[0].message, _("WEAPCO is finished, Kethlan! You have nowhere to run, nowhere to hide, and no one to help you."));
events[1].time = 8;
events[1].face = FS_KLINE;
strcpy(events[1].message, "You underestimate me, Bainfield.");
/// Dialog (Kline Kethlan)
strcpy(events[1].message, _("You underestimate me, Bainfield."));
break;
}
@ -387,5 +437,3 @@ void events_sync()
}
}
}
#undef NMSG_KLINE_GREETING

View File

@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libintl.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@ -63,46 +64,6 @@ static Star stars[STARS_NUM];
static Uint32 frameLimit = 0;
static int thirds = 0;
#define NMSG_KLINE_INSULT 3
static const char *klineInsult[NMSG_KLINE_INSULT] = {
"Pathetic.", "How very disappointing...", "Heroic. And stupid."
};
#define NMSG_KLINE_VENUS_INSULT 2
static const char *klineVenusInsult[NMSG_KLINE_VENUS_INSULT] = {
"Fool.", "And now you're nothing but a DEAD hero."
};
#define NMSG_PHOEBE_PLAYER_HIT 3
static const char *phoebePlayerHitMessage[NMSG_PHOEBE_PLAYER_HIT] = {
"Oops! Sorry!",
"Whoops! Are you OK, Chris?",
"Oh, sorry! I didn't see you there!"
};
#define NMSG_URSULA_PLAYER_HIT 3
static const char *ursulaPlayerHitMessage[NMSG_URSULA_PLAYER_HIT] = {
"Get out of the way!",
"Don't fly into my missiles!",
"Dammit, Chris, you made me miss!"
};
#define NMSG_PLAYER_PHOEBE_HIT 3
static const char *playerPhoebeHitMessage[NMSG_PLAYER_PHOEBE_HIT] = {
"OW! I hope that was an accident!",
"Chris, please be more careful!",
"Ouch! What are you shooting at me for?"
};
#define NMSG_PLAYER_URSULA_HIT 5
static const char *playerUrsulaHitMessage[NMSG_PLAYER_URSULA_HIT] = {
"I am NOT your enemy!",
"Hey! Watch it!",
"What are you doing?! Shoot THEM!",
"Open your eyes!",
"Are you blind?!"
};
void game_init()
{
@ -620,6 +581,8 @@ static void game_doBullets()
float homingMissileSpeed = 0;
int charger_num;
char msg[STRMAX];
bullet = engine.bulletHead;
prevBullet = engine.bulletHead;
engine.bulletTail = engine.bulletHead;
@ -729,9 +692,39 @@ static void game_doBullets()
{
game.hits++;
if (aliens[i].classDef == CD_PHOEBE)
radio_setMessage(FS_PHOEBE, playerPhoebeHitMessage[rand() % NMSG_PLAYER_PHOEBE_HIT], 0);
{
radio_getRandomMessage(msg, _(
/// Chris: Phoebe Hit Messages
/// This is a list of messages separated by "\n". They are randomly
/// broadcast by Phoebe when Chris (the player) damages her.
/// Instead of directly translating these, please populate the list
/// with messages that work well in the target language,
/// following the English version only as a general guideline. Any
/// number of messages is permitted.
"OW! I hope that was an accident!\n"
"Chris, please be more careful!\n"
"Ouch! What are you shooting at me for?"
));
radio_setMessage(FS_PHOEBE, msg, 0);
}
else if (aliens[i].classDef == CD_URSULA)
radio_setMessage(FS_URSULA, playerUrsulaHitMessage[rand() % NMSG_PLAYER_URSULA_HIT], 0);
{
radio_getRandomMessage(msg, _(
/// Chris: Ursula Hit Messages
/// This is a list of messages separated by "\n". They are randomly
/// broadcast by Phoebe when Chris (the player) damages her.
/// Instead of directly translating these, please populate the list
/// with messages that work well in the target language,
/// following the English version only as a general guideline. Any
/// number of messages is permitted.
"I am NOT your enemy!\n"
"Hey! Watch it!\n"
"What are you doing?! Shoot THEM!\n"
"Open your eyes!\n"
"Are you blind?!"
));
radio_setMessage(FS_URSULA, msg, 0);
}
}
if (!(aliens[i].flags & FL_IMMORTAL))
@ -792,11 +785,35 @@ static void game_doBullets()
{
if (bullet->owner->classDef == CD_PHOEBE)
{
radio_setMessage(FS_PHOEBE, phoebePlayerHitMessage[rand() % NMSG_PHOEBE_PLAYER_HIT], 0);
radio_getRandomMessage(msg, _(
/// Phoebe: Player Hit Messages
/// This is a list of messages separated by "\n". They are randomly
/// broadcast when Phoebe accidentally damages Chris (the player).
/// Instead of directly translating these, please populate the list
/// with messages that work well in the target language,
/// following the English version only as a general guideline. Any
/// number of messages is permitted.
"Oops! Sorry!\n"
"Whoops! Are you OK, Chris?\n"
"Oh, sorry! I didn't see you there!"
));
radio_setMessage(FS_PHOEBE, msg, 0);
}
else if (bullet->owner->classDef == CD_URSULA)
{
radio_setMessage(FS_URSULA, ursulaPlayerHitMessage[rand() % NMSG_URSULA_PLAYER_HIT], 0);
radio_getRandomMessage(msg, _(
/// Ursula: Player Hit Messages
/// This is a list of messages separated by "\n". They are randomly
/// broadcast when Ursula accidentally damages Chris (the player).
/// Instead of directly translating these, please populate the list
/// with messages that work well in the target language,
/// following the English version only as a general guideline. Any
/// number of messages is permitted.
"Get out of the way!\n"
"Don't fly into my missiles!\n"
"Dammit, Chris, you made me miss!"
));
radio_setMessage(FS_URSULA, msg, 0);
}
}
@ -1271,6 +1288,13 @@ static void game_doAliens()
static void game_doPlayer()
{
int shapeToUse;
float cd;
float cc;
int xmoved = 0;
int ymoved = 0;
char msg[STRMAX];
// This causes the motion to slow
engine.ssx *= 0.99;
engine.ssy *= 0.99;
@ -1278,12 +1302,6 @@ static void game_doPlayer()
engine.smx = 0;
engine.smy = 0;
int shapeToUse;
float cd;
float cc;
int xmoved = 0;
int ymoved = 0;
if (player.shield > -100)
{
if (player.shield > 0)
@ -1531,13 +1549,42 @@ static void game_doPlayer()
if (aliens[ALIEN_KLINE].active)
{
if (game.area == MISN_VENUS)
radio_setMessage(FS_KLINE, klineVenusInsult[rand() % NMSG_KLINE_VENUS_INSULT], 1);
{
radio_getRandomMessage(msg, _(
/// Kline Venus insult messages
/// This is a list of insults separated by "\n". They are randomly
/// broadcast when the player dies in the Venus mission.
/// Instead of directly translating these, please populate the list
/// with insults that work well in the target language,
/// following the English version only as a general guideline. Any
/// number of insults is permitted.
"Fool.\n"
"And now you're nothing but a DEAD hero.\n"
));
radio_setMessage(FS_KLINE, msg, 1);
}
else
radio_setMessage(FS_KLINE, klineInsult[rand() % NMSG_KLINE_INSULT], 1);
{
radio_getRandomMessage(msg, _(
/// Kline insult messages
/// This is a list of insults separated by "\n". They are randomly
/// broadcast when the player dies in a mission Kline is in (except Venus).
/// Instead of directly translating these, please populate the list
/// with insults that work well in the target language,
/// following the English version only as a general guideline. Any
/// number of insults is permitted.
"Pathetic.\n"
"How very disappointing...\n"
"Heroic. And stupid."
));
radio_setMessage(FS_KLINE, msg, 1);
}
}
else if ((aliens[ALIEN_BOSS].active) && (aliens[ALIEN_BOSS].classDef == CD_KRASS))
{
radio_setMessage(FS_KRASS, "That was the easiest $90,000,000 I've ever earned! Bwah! Ha! Ha! Ha!", 1);
/// Dialog: Krass Tyler
/// Used when the player is killed in the Jupiter mission.
radio_setMessage(FS_KRASS, _("That was the easiest $90,000,000 I've ever earned! Bwah! Ha! Ha! Ha!"), 1);
}
// Make it look like the ships are all still moving...
@ -1972,7 +2019,7 @@ static void game_doHud()
{
if (gfx_textSprites[i].life > 0)
{
screen_blitText(i, -1, screen->h - 75 - (i * 20));
screen_blitText(i, -1, screen->h - 75 - (i * MENU_SPACING));
gfx_textSprites[i].life--;
if (gfx_textSprites[i].life == 0)
@ -2650,10 +2697,3 @@ int game_mainLoop()
return rtn;
}
#undef NMSG_KLINE_INSULT
#undef NMSG_KLINE_VENUS_INSULT
#undef NMSG_PHOEBE_PLAYER_HIT
#undef NMSG_URSULA_PLAYER_HIT
#undef NMSG_PLAYER_PHOEBE_HIT
#undef NMSG_PLAYER_URSULA_HIT

View File

@ -18,17 +18,32 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <ctype.h>
#include <libintl.h>
#include <stdio.h>
#include <string.h>
#include "SDL.h"
#include "SDL_image.h"
#ifndef NOFONT
// Undef MIN and MAX since pango-break.h includes these macros
// (avoids compiler warnings)
#ifdef MIN
#undef MIN
#endif
#ifdef MAX
#undef MAX
#endif
#include "SDL_ttf.h"
#include <pango/pango-break.h>
#endif
#include "defs.h"
#include "structs.h"
@ -89,7 +104,16 @@ void gfx_init()
exit(1);
}
gfx_unicodeFont = TTF_OpenFont("data/TakaoGothic.ttf", 14);
/// If the TakaoGothic font is able to display the text of the language
/// being translated to, DO NOT CHANGE THIS! If, however, the language
/// requires characters not available in the default font, you can
/// place that font in the "data" directory and indicate the name of the
/// alternate font as a translation to "TakaoPGothic.ttf" (leaving the
/// rest of the string unchanged). Please ensure that the font displays
/// correctly with ALL text (space is limited and some fonts take up
/// more space than others), and also check the license of the font
/// before distributing to make sure you are allowed to do so.
gfx_unicodeFont = TTF_OpenFont(_("data/TakaoPGothic.ttf"), 13);
if (gfx_unicodeFont == NULL)
{
printf("ERROR: TTF_OpenFont: %s\n", TTF_GetError());
@ -144,19 +168,19 @@ static int gfx_renderStringBase(const char *in, int x, int y, int fontColor, int
area.x = x;
area.y = y;
area.w = 8;
area.h = 14;
area.w = PIXFONT_W;
area.h = PIXFONT_H;
letter.y = 0;
letter.w = 8;
letter.h = 14;
letter.w = PIXFONT_W;
letter.h = PIXFONT_H;
while (*in != '\0')
{
if (*in != ' ')
{
letter.x = (*in - 33);
letter.x *= 8;
letter.x *= PIXFONT_W;
/* Blit onto the screen surface */
if (SDL_BlitSurface(gfx_fontSprites[fontColor], &letter, dest, &area) < 0)
@ -166,13 +190,13 @@ static int gfx_renderStringBase(const char *in, int x, int y, int fontColor, int
}
}
area.x += 9;
area.x += PIXFONT_W + 1;
if (wrap)
{
if ((area.x > (dest->w - 70)) && (*in == ' '))
{
area.y += 16;
area.y += PIXFONT_LINE_HEIGHT;
area.x = x;
}
else if (area.x > (dest->w - 31))
@ -190,13 +214,13 @@ static int gfx_renderStringBase(const char *in, int x, int y, int fontColor, int
if (splitword)
{
letter.x = (int)('-') - 33;
letter.x *= 8;
letter.x *= PIXFONT_W;
if (SDL_BlitSurface(gfx_fontSprites[fontColor], &letter, dest, &area) < 0)
{
printf("BlitSurface error: %s\n", SDL_GetError());
engine_showError(2, "");
}
area.y += 16;
area.y += PIXFONT_LINE_HEIGHT;
area.x = x;
}
}
@ -211,7 +235,7 @@ static int gfx_renderStringBase(const char *in, int x, int y, int fontColor, int
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;
x = (dest->w - (strlen(in) * (PIXFONT_W + 1))) / 2;
gfx_renderStringBase(in, x, y - 1, FONT_OUTLINE, wrap, dest);
gfx_renderStringBase(in, x, y + 1, FONT_OUTLINE, wrap, dest);
@ -228,11 +252,12 @@ int gfx_renderUnicode(const char *in, int x, int y, int fontColor, int wrap, SDL
return gfx_renderString(in, x, y, fontColor, wrap, dest);
}
#else
int gfx_renderUnicodeBase(const char *in, int x, int y, int fontColor, int wrap, SDL_Surface *dest)
int gfx_renderUnicodeBase(const char *in, int x, int y, int fontColor, int wrap, SDL_Surface *dest, int blended)
{
SDL_Surface *textSurf;
SDL_Color color;
int w, h;
int avail_w;
int changed;
int breakPoints[STRMAX];
int nBreakPoints;
@ -243,6 +268,8 @@ int gfx_renderUnicodeBase(const char *in, int x, int y, int fontColor, int wrap,
int i;
SDL_Rect area;
avail_w = dest->w - x;
switch (fontColor)
{
case FONT_WHITE:
@ -289,8 +316,8 @@ int gfx_renderUnicodeBase(const char *in, int x, int y, int fontColor, int wrap,
engine_error(TTF_GetError());
}
changed = 1;
while (changed && (w > dest->w))
changed = wrap;
while (changed && (w > avail_w))
{
nLogAttrs = strlen(remainingStr) + 1;
pango_get_log_attrs(remainingStr, strlen(remainingStr), -1, NULL, logAttrs, nLogAttrs);
@ -314,8 +341,11 @@ int gfx_renderUnicodeBase(const char *in, int x, int y, int fontColor, int wrap,
{
engine_error(TTF_GetError());
}
if (w <= dest->w)
if (w <= avail_w)
{
if (blended)
textSurf = TTF_RenderUTF8_Blended(gfx_unicodeFont, testStr, color);
else
textSurf = TTF_RenderUTF8_Solid(gfx_unicodeFont, testStr, color);
area.x = x;
area.y = y;
@ -328,7 +358,7 @@ int gfx_renderUnicodeBase(const char *in, int x, int y, int fontColor, int wrap,
}
SDL_FreeSurface(textSurf);
textSurf = NULL;
y += TTF_FontHeight(gfx_unicodeFont);
y += TTF_FontHeight(gfx_unicodeFont) + 1;
memmove(remainingStr, remainingStr + breakPoints[i],
(strlen(remainingStr) - breakPoints[i]) + 1);
@ -342,6 +372,9 @@ int gfx_renderUnicodeBase(const char *in, int x, int y, int fontColor, int wrap,
engine_error(TTF_GetError());
}
}
if (blended)
textSurf = TTF_RenderUTF8_Blended(gfx_unicodeFont, remainingStr, color);
else
textSurf = TTF_RenderUTF8_Solid(gfx_unicodeFont, remainingStr, color);
area.x = x;
area.y = y;
@ -352,7 +385,7 @@ int gfx_renderUnicodeBase(const char *in, int x, int y, int fontColor, int wrap,
printf("BlitSurface error: %s\n", SDL_GetError());
engine_showError(2, "");
}
y += TTF_FontHeight(gfx_unicodeFont);
y += TTF_FontHeight(gfx_unicodeFont) + 1;
}
else
{
@ -364,13 +397,21 @@ int gfx_renderUnicodeBase(const char *in, int x, int y, int fontColor, int wrap,
int gfx_renderUnicode(const char *in, int x, int y, int fontColor, int wrap, SDL_Surface *dest)
{
gfx_renderUnicodeBase(in, x, y - 1, FONT_OUTLINE, wrap, dest);
gfx_renderUnicodeBase(in, x, y + 1, FONT_OUTLINE, wrap, dest);
gfx_renderUnicodeBase(in, x, y + 2, FONT_OUTLINE, wrap, dest);
gfx_renderUnicodeBase(in, x - 1, y, FONT_OUTLINE, wrap, dest);
gfx_renderUnicodeBase(in, x - 2, y, FONT_OUTLINE, wrap, dest);
gfx_renderUnicodeBase(in, x + 1, y, FONT_OUTLINE, wrap, dest);
return gfx_renderUnicodeBase(in, x, y, fontColor, wrap, dest);
int w;
if (x == -1)
{
TTF_SizeUTF8(gfx_unicodeFont, in, &w, NULL);
x = (dest->w - MIN(w, dest->w)) / 2;
}
gfx_renderUnicodeBase(in, x, y - 1, FONT_OUTLINE, wrap, dest, 1);
gfx_renderUnicodeBase(in, x, y + 1, FONT_OUTLINE, wrap, dest, 1);
gfx_renderUnicodeBase(in, x, y + 2, FONT_OUTLINE, wrap, dest, 1);
gfx_renderUnicodeBase(in, x - 1, y, FONT_OUTLINE, wrap, dest, 1);
gfx_renderUnicodeBase(in, x - 2, y, FONT_OUTLINE, wrap, dest, 1);
gfx_renderUnicodeBase(in, x + 1, y, FONT_OUTLINE, wrap, dest, 1);
return gfx_renderUnicodeBase(in, x, y, fontColor, wrap, dest, 1);
}
#endif
@ -519,7 +560,7 @@ SDL_Surface *gfx_createSurface(int width, int height)
SDL_Surface *gfx_createTextSurface(const char *inString, int color)
{
// XXX: Magic numbers
SDL_Surface *surface = gfx_createSurface(strlen(inString) * 9, 16);
SDL_Surface *surface = gfx_createSurface(strlen(inString) * (PIXFONT_W + 1), PIXFONT_LINE_HEIGHT);
gfx_renderString(inString, 1, 1, color, 0, surface);

View File

@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libintl.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@ -379,27 +380,32 @@ static void intermission_setPlanets()
intermission_planets[PLANET_HAIL].messageMission = MISN_HAIL;
intermission_planets[PLANET_HAIL].messageSlot = 0;
intermission_planets[PLANET_HAIL].faceImage = FS_KRASS;
strcpy(intermission_planets[PLANET_HAIL].subject, "Destroy WEAPCO training ground");
/// Spirit, Hail mission summary
strcpy(intermission_planets[PLANET_HAIL].subject, _("Destroy WEAPCO training ground"));
intermission_planets[PLANET_CERADSE].messageMission = MISN_CERADSE;
intermission_planets[PLANET_CERADSE].messageSlot = 1;
intermission_planets[PLANET_CERADSE].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_CERADSE].subject, "Collect 6 cargo pods");
/// Spirit, Ceradse mission summary
strcpy(intermission_planets[PLANET_CERADSE].subject, _("Collect 6 cargo pods"));
intermission_planets[PLANET_HINSTAG].messageMission = MISN_HINSTAG;
intermission_planets[PLANET_HINSTAG].messageSlot = 2;
intermission_planets[PLANET_HINSTAG].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_HINSTAG].subject, "Destroy 5 WEAPCO missile boats");
/// Spirit, Hinstag mission summary
strcpy(intermission_planets[PLANET_HINSTAG].subject, _("Destroy 5 WEAPCO missile boats"));
intermission_planets[PLANET_JOLDAR].messageMission = MISN_JOLDAR;
intermission_planets[PLANET_JOLDAR].messageSlot = 3;
intermission_planets[PLANET_JOLDAR].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_JOLDAR].subject, "Clear the mine field around Joldar");
/// Spirit, Joldar mission summary
strcpy(intermission_planets[PLANET_JOLDAR].subject, _("Clear the mine field around Joldar"));
intermission_planets[PLANET_MOEBO].messageMission = MISN_MOEBO;
intermission_planets[PLANET_MOEBO].messageSlot = 0;
intermission_planets[PLANET_MOEBO].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_MOEBO].subject, "Destroy WEAPCO frigate");
/// Spirit, Moebo mission summary
strcpy(intermission_planets[PLANET_MOEBO].subject, _("Destroy WEAPCO frigate"));
break;
@ -429,32 +435,38 @@ static void intermission_setPlanets()
intermission_planets[PLANET_RESCUESLAVES].messageMission = MISN_RESCUESLAVES;
intermission_planets[PLANET_RESCUESLAVES].messageSlot = 0;
intermission_planets[PLANET_RESCUESLAVES].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_RESCUESLAVES].subject, "Rescue slaves");
/// Eyananth, interception mission summary
strcpy(intermission_planets[PLANET_RESCUESLAVES].subject, _("Rescue slaves"));
intermission_planets[PLANET_NEROD].messageMission = MISN_NEROD;
intermission_planets[PLANET_NEROD].messageSlot = 1;
intermission_planets[PLANET_NEROD].faceImage = FS_PHOEBE;
strcpy(intermission_planets[PLANET_NEROD].subject, "SOS");
/// Eyananth, Nerod mission summary
strcpy(intermission_planets[PLANET_NEROD].subject, _("SOS"));
intermission_planets[PLANET_ALLEZ].messageMission = MISN_ALLEZ;
intermission_planets[PLANET_ALLEZ].messageSlot = 2;
intermission_planets[PLANET_ALLEZ].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_ALLEZ].subject, "Assist medical supply craft");
/// Eyananth, Allez mission summary
strcpy(intermission_planets[PLANET_ALLEZ].subject, _("Assist medical supply craft"));
intermission_planets[PLANET_URUSOR].messageMission = MISN_URUSOR;
intermission_planets[PLANET_URUSOR].messageSlot = 0;
intermission_planets[PLANET_URUSOR].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_URUSOR].subject, "Capture five WEAPCO supply craft");
/// Eyananth, Urusor mission summary
strcpy(intermission_planets[PLANET_URUSOR].subject, _("Capture five WEAPCO supply craft"));
intermission_planets[PLANET_DORIM].messageMission = MISN_DORIM;
intermission_planets[PLANET_DORIM].messageSlot = 1;
intermission_planets[PLANET_DORIM].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_DORIM].subject, "Find WEAPCO scientist");
/// Eyananth, Dorim mission summary
strcpy(intermission_planets[PLANET_DORIM].subject, _("Find WEAPCO scientist"));
intermission_planets[PLANET_ELAMALE].messageMission = MISN_ELAMALE;
intermission_planets[PLANET_ELAMALE].messageSlot = 0;
intermission_planets[PLANET_ELAMALE].faceImage = FS_PHOEBE;
strcpy(intermission_planets[PLANET_ELAMALE].subject, "Destroy WEAPCO Ore Mining craft");
/// Eyananth, Elamale mission summary
strcpy(intermission_planets[PLANET_ELAMALE].subject, _("Destroy WEAPCO Ore Mining craft"));
break;
@ -488,37 +500,44 @@ static void intermission_setPlanets()
intermission_planets[PLANET_CLOAKFIGHTER].messageMission = MISN_CLOAKFIGHTER;
intermission_planets[PLANET_CLOAKFIGHTER].messageSlot = 0;
intermission_planets[PLANET_CLOAKFIGHTER].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_CLOAKFIGHTER].subject, "Destroy experimental fighter");
/// Mordor, incerception mission summary
strcpy(intermission_planets[PLANET_CLOAKFIGHTER].subject, _("Destroy experimental fighter"));
intermission_planets[PLANET_ODEON].messageMission = MISN_ODEON;
intermission_planets[PLANET_ODEON].messageSlot = 1;
intermission_planets[PLANET_ODEON].faceImage = FS_PHOEBE;
strcpy(intermission_planets[PLANET_ODEON].subject, "Rescue Ursula");
/// Mordor, Odeon mission summary
strcpy(intermission_planets[PLANET_ODEON].subject, _("Rescue Ursula"));
intermission_planets[PLANET_FELLON].messageMission = MISN_FELLON;
intermission_planets[PLANET_FELLON].messageSlot = 2;
intermission_planets[PLANET_FELLON].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_FELLON].subject, "Assist rebel forces");
/// Mordor, Fellon mission summary
strcpy(intermission_planets[PLANET_FELLON].subject, _("Assist rebel forces"));
intermission_planets[PLANET_SIVEDI].messageMission = MISN_SIVEDI;
intermission_planets[PLANET_SIVEDI].messageSlot = 0;
intermission_planets[PLANET_SIVEDI].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_SIVEDI].subject, "Mine ore from asteroid belt");
/// Mordor, Sivedi mission summary
strcpy(intermission_planets[PLANET_SIVEDI].subject, _("Mine ore from asteroid belt"));
intermission_planets[PLANET_ALMARTHA].messageMission = MISN_ALMARTHA;
intermission_planets[PLANET_ALMARTHA].messageSlot = 1;
intermission_planets[PLANET_ALMARTHA].faceImage = FS_KRASS;
strcpy(intermission_planets[PLANET_ALMARTHA].subject, "Create a diversion");
/// Mordor, Almartha mission summary
strcpy(intermission_planets[PLANET_ALMARTHA].subject, _("Create a diversion"));
intermission_planets[PLANET_POSWIC].messageMission = MISN_POSWIC;
intermission_planets[PLANET_POSWIC].messageSlot = 0;
intermission_planets[PLANET_POSWIC].faceImage = FS_URSULA;
strcpy(intermission_planets[PLANET_POSWIC].subject, "Capture WEAPCO executive transport");
/// Mordor, Poswic mission summary
strcpy(intermission_planets[PLANET_POSWIC].subject, _("Capture WEAPCO executive transport"));
intermission_planets[PLANET_ELLESH].messageMission = MISN_ELLESH;
intermission_planets[PLANET_ELLESH].messageSlot = 0;
intermission_planets[PLANET_ELLESH].faceImage = FS_PHOEBE;
strcpy(intermission_planets[PLANET_ELLESH].subject, "Destroy WEAPCO executive transport");
/// Mordor, Ellesh mission summary
strcpy(intermission_planets[PLANET_ELLESH].subject, _("Destroy WEAPCO executive transport"));
break;
@ -562,42 +581,50 @@ static void intermission_setPlanets()
intermission_planets[PLANET_PLUTO].messageMission = MISN_PLUTO;
intermission_planets[PLANET_PLUTO].messageSlot = 0;
intermission_planets[PLANET_PLUTO].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_PLUTO].subject, "Secure Pluto");
/// Sol, Pluto mission summary
strcpy(intermission_planets[PLANET_PLUTO].subject, _("Secure Pluto"));
intermission_planets[PLANET_NEPTUNE].messageMission = MISN_NEPTUNE;
intermission_planets[PLANET_NEPTUNE].messageSlot = 1;
intermission_planets[PLANET_NEPTUNE].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_NEPTUNE].subject, "Secure Neptune");
/// Sol, Neptune mission summary
strcpy(intermission_planets[PLANET_NEPTUNE].subject, _("Secure Neptune"));
intermission_planets[PLANET_URANUS].messageMission = MISN_URANUS;
intermission_planets[PLANET_URANUS].messageSlot = 2;
intermission_planets[PLANET_URANUS].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_URANUS].subject, "Secure Uranus");
/// Sol, Uranus mission summary
strcpy(intermission_planets[PLANET_URANUS].subject, _("Secure Uranus"));
intermission_planets[PLANET_SATURN].messageMission = MISN_SATURN;
intermission_planets[PLANET_SATURN].messageSlot = 0;
intermission_planets[PLANET_SATURN].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_SATURN].subject, "Destroy outer defense system");
/// Sol, Saturn mission summary
strcpy(intermission_planets[PLANET_SATURN].subject, _("Destroy outer defense system"));
intermission_planets[PLANET_JUPITER].messageMission = MISN_JUPITER;
intermission_planets[PLANET_JUPITER].messageSlot = 0;
intermission_planets[PLANET_JUPITER].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_JUPITER].subject, "Investigate distress call");
/// Sol, Jupiter mission summary
strcpy(intermission_planets[PLANET_JUPITER].subject, _("Investigate distress call"));
intermission_planets[PLANET_MARS].messageMission = MISN_MARS;
intermission_planets[PLANET_MARS].messageSlot = 0;
intermission_planets[PLANET_MARS].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_MARS].subject, "Navigate asteroid belt");
/// Sol, Mars mission summary
strcpy(intermission_planets[PLANET_MARS].subject, _("Navigate asteroid belt"));
intermission_planets[PLANET_EARTH].messageMission = MISN_EARTH;
intermission_planets[PLANET_EARTH].messageSlot = 0;
intermission_planets[PLANET_EARTH].faceImage = FS_CHRIS;
strcpy(intermission_planets[PLANET_EARTH].subject, "Take back Earth");
/// Sol, Earth mission summary
strcpy(intermission_planets[PLANET_EARTH].subject, _("Take back Earth"));
intermission_planets[PLANET_VENUS].messageMission = MISN_VENUS;
intermission_planets[PLANET_VENUS].messageSlot = 0;
intermission_planets[PLANET_VENUS].faceImage = FS_SID;
strcpy(intermission_planets[PLANET_VENUS].subject, "Defeat Kline");
/// Sol, Venus mission summary
strcpy(intermission_planets[PLANET_VENUS].subject, _("Defeat Kline"));
break;
}
@ -714,23 +741,29 @@ static void intermission_showStatus(SDL_Surface *infoSurface)
static void intermission_createCommsSurface(SDL_Surface *comms)
{
int yStart;
int yOffset;
engine.commsSection = 0;
gfx_drawRect(comms, 0, 0, comms->w - 1, comms->h - 1, 0x00, 0x00, 0x25);
gfx_renderUnicode("+++ CURRENT MISSIONS (click for info) +++", -1, 15, FONT_GREEN, 0, comms);
gfx_renderString("+++ CURRENT MISSIONS +++", -1, 15, FONT_GREEN, 0, comms);
int yOffset;
/// Please keep this short; it is always rendered as a single line.
gfx_renderUnicode(_("click for info"), -1, 35, FONT_WHITE, 0, comms);
yStart = 60;
for (int i = 0 ; i < MAX_PLANETS ; i++)
{
if ((intermission_planets[i].messageSlot != -1) && (intermission_planets[i].missionCompleted == 0))
{
yOffset = intermission_planets[i].messageSlot * 60;
gfx_drawRect(comms, 0, 40 + yOffset, comms->w - 1, 55, 0x00, 0x00, 0x77);
gfx_blit(gfx_faceSprites[intermission_planets[i].faceImage], 20, 45 + yOffset, comms);
gfx_renderString(intermission_planets[i].name, 80, 45 + yOffset, FONT_WHITE, 0, comms);
gfx_renderString(intermission_planets[i].subject, 80, 65 + yOffset, FONT_CYAN, 0, comms);
gfx_drawRect(comms, 0, yStart + yOffset, comms->w - 1, 55, 0x00, 0x00, 0x77);
gfx_blit(gfx_faceSprites[intermission_planets[i].faceImage], 20, yStart + 5 + yOffset, comms);
gfx_renderString(intermission_planets[i].name, 80, yStart + 5 + yOffset, FONT_WHITE, 0, comms);
gfx_renderUnicode(intermission_planets[i].subject, 80, yStart + 25 + yOffset, FONT_CYAN, 0, comms);
}
}
}
@ -739,7 +772,7 @@ static int intermission_renderDialog(SDL_Surface *comms, int y, int face, const
{
int newY;
gfx_blit(gfx_faceSprites[face], 10, y, comms);
newY = gfx_renderUnicode(string, 80, y, FONT_WHITE, 1, comms) + 25;
newY = gfx_renderUnicode(string, 80, y, FONT_WHITE, 1, comms) + 20;
if (newY < y + 60)
newY += (60 - (newY - y));
return newY;
@ -767,235 +800,295 @@ static void intermission_createMissionDetailSurface(SDL_Surface *comms, int miss
switch (misn)
{
case MISN_HAIL:
strcpy(string, "Hey, boy! You still owe me money for the Firefly I stole for you! But instead, I want you to go to the WEAPCO training ground and destroy all the craft there.");
/// Mission dialog: Spirit, Hail (Krass Tyler)
strcpy(string, _("Hey, boy! You still owe me money for the Firefly I stole for you! But instead, I want you to go to the WEAPCO training ground and destroy all the craft there."));
y = intermission_renderDialog(comms, y, FS_KRASS, string);
strcpy(string, "Oh? That's the job I contracted you to do, was it not?");
/// Mission dialog: Spirit, Hail (Chris Bainfield)
strcpy(string, _("Oh? That's the job I contracted you to do, was it not?"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "I know, but this way we can resolve your debt right now. Do this job, and also collect $500, and we will call it quits. And if you die... well, I guess the ship was not worth stealing! HA HA HA!");
/// Mission dialog: Spirit, Hail (Krass Tyler)
strcpy(string, _("I know, but this way we can resolve your debt right now. Do this job, and also collect $500, and we will call it quits. And if you die... well, I guess the ship was not worth stealing! HA HA HA!"));
y = intermission_renderDialog(comms, y, FS_KRASS, string);
strcpy(string, "As usual, you take me too lightly, Krass.");
/// Mission dialog: Spirit, Hail (Chris Bainfield)
strcpy(string, _("As usual, you take me too lightly, Krass."));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
break;
case MISN_CERADSE:
strcpy(string, "Hey, Sid, what's up?");
/// Mission dialog: Spirit, Ceradse (Chris Bainfield)
strcpy(string, _("Hey, Sid, what's up?"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "Chris, I've intercepted a communication from WEAPCO. Seems they're transporting some medical supplies around Ceradse. We need to get hold of those pods to save some lives!");
/// Mission dialog: Spirit, Ceradse (Sid Wilson)
strcpy(string, _("Chris, I've intercepted a communication from WEAPCO. Seems they're transporting some medical supplies around Ceradse. We need to get hold of those pods to save some lives!"));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "How many do we need?");
/// Mission dialog: Spirit, Ceradse (Chris Bainfield)
strcpy(string, _("How many do we need?"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "All six, Chris! If you lose even a single one, thousands of people could perish in Spirit within the next few months.");
/// Mission dialog: Spirit, Ceradse (Sid Wilson)
strcpy(string, _("All six, Chris! If you lose even a single one, thousands of people could perish in Spirit within the next few months."));
y = intermission_renderDialog(comms, y, FS_SID, string);
break;
case MISN_HINSTAG:
strcpy(string, "Wow! Missile boats?");
/// Mission dialog: Spirit, Hinstag (Chris Bainfield)
strcpy(string, _("Wow! Missile boats?"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "Yup. Looks like WEAPCO is starting to take notice of your actions.");
/// Mission dialog: Spirit, Hinstag (Sid Wilson)
strcpy(string, _("Yup. Looks like WEAPCO is starting to take notice of your actions."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "Sounds like fun! This will really put the Firefly's fighting ability to the test!");
/// Mission dialog: Spirit, Hinstag (Chris Bainfield)
strcpy(string, _("Awesome! This will really put the Firefly's fighting ability to the test!"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "Please be careful, Chris. A single missile boat carries enough rockets to level most major cities. Try not to face them head-on, and keep your distance.");
/// Mission dialog: Spirit, Hinstag (Sid Wilson)
strcpy(string, _("Please be careful, Chris. A single missile boat carries enough rockets to level most major cities. Try not to face them head-on, and keep your distance."));
y = intermission_renderDialog(comms, y, FS_SID, string);
break;
case MISN_JOLDAR:
strcpy(string, "We're going to have to get rid of the mine deployment unit around Joldar. The minefield is stopping interplanetary traffic.");
/// Mission dialog: Spirit, Joldar (Sid Wilson)
strcpy(string, _("We're going to have to get rid of the mine deployment unit around Joldar. The minefield is stopping interplanetary traffic."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "Are any fighters around to keep me entertained?");
/// Mission dialog: Spirit, Joldar (Chris Bainfield)
strcpy(string, _("Are any fighters around to keep me entertained?"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "Not at the moment, but that doesn't mean they won't turn up. Be very careful of those mines! They'll only explode when they encounter a ship that's not transmitting a WEAPCO signal. Shoot them down if they get in your way.");
/// Mission dialog: Spirit, Joldar (Sid Wilson)
strcpy(string, _("Not at the moment, but that doesn't mean they won't turn up. Be very careful of those mines! They'll only explode when they encounter a ship that's not transmitting a WEAPCO signal. Shoot them down if they get in your way."));
y = intermission_renderDialog(comms, y, FS_SID, string);
break;
case MISN_MOEBO:
strcpy(string, "We've got a major problem here! WEAPCO has decided to stop our resistance by destroying Spirit! The explosion will incinerate everything in the system! You've got to destroy that frigate before it gets in range!");
/// Mission dialog: Spirit, Moebo (Sid Wilson)
strcpy(string, _("We've got a major problem here! WEAPCO has decided to stop our resistance by destroying Spirit! The explosion will incinerate everything in the system! You've got to destroy that frigate before it gets in range!"));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "Damn! I'll get right on it, then!");
/// Mission dialog: Spirit, Moebo (Chris Bainfield)
strcpy(string, _("Damn! I'll get right on it, then!"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "We're all counting on you, Chris! But just remember - They didn't call that thing \"Star Killer\" just because it sounded nice!");
/// Mission dialog: Spirit, Moebo (Sid Wilson)
strcpy(string, _("We're all counting on you, Chris! But just remember - They didn't call that thing \"Star Killer\" just because it sounded nice!"));
y = intermission_renderDialog(comms, y, FS_SID, string);
break;
case MISN_RESCUESLAVES:
strcpy(string, "As you know, WEAPCO has many slaves in this system. If we free a large number of them, it might help to spark a rebellion. I estimate that we will need to rescue around 250 to make a difference.");
/// Mission dialog: Eyananth, interceptions (Sid Wilson)
strcpy(string, _("As you know, WEAPCO has many slaves in this system. If we free a large number of them, it might help to spark a rebellion. I estimate that we will need to rescue around 250 to make a difference."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "Most of the slaves are working in ore mines, aren't they?");
/// Mission dialog: Eyananth, interceptions (Chris Bainfield)
strcpy(string, _("Most of the slaves are working in ore mines, aren't they?"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "Yes, but attacking the mines directly would be dangerous. You'd be better off intercepting slave transports. What you'll have to do is fly around and see if you can intercept a WEAPCO patrol. Of course, they might not be escorting any slave units, so be careful!");
/// Mission dialog: Eyananth, interceptions (Sid Wilson)
strcpy(string, _("Yes, but attacking the mines directly would be dangerous. You'd be better off intercepting slave transports. What you'll have to do is fly around and see if you can intercept a WEAPCO patrol. Of course, they might not be escorting any slave units, so be careful!"));
y = intermission_renderDialog(comms, y, FS_SID, string);
break;
case MISN_NEROD:
strcpy(string, "Help! This is an SOS! Can anyone hear me?!");
/// Mission dialog: Eyananth, Nerod (Phoebe Lexx)
strcpy(string, _("Help! This is an SOS! Can anyone hear me?!"));
y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
strcpy(string, "I'm hearing you loud and clear! What's up?");
/// Mission dialog: Eyananth, Nerod (Chris Bainfield)
strcpy(string, _("I'm hearing you loud and clear! What's up?"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "Oh, thank God! I was intercepted by a large WEAPCO force near Nerod! I'm in need of assistance!");
/// Mission dialog: Eyananth, Nerod (Phoebe Lexx)
strcpy(string, _("Oh, thank God! I was intercepted by a large WEAPCO force near Nerod! I'm in need of assistance!"));
y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
strcpy(string, "I'm on my way!");
/// Mission dialog: Eyananth, Nerod (Chris Bainfield)
strcpy(string, _("I'm on my way!"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
break;
case MISN_ALLEZ:
strcpy(string, "I've just received another SOS. This one is coming from a supply craft carrying essential medical supplies.");
/// Mission dialog: Eyananth, Allez (Sid Wilson)
strcpy(string, _("I've just received another SOS. This one is coming from a supply craft carrying essential medical supplies."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "Alright, Tell 'em I'm on my way.");
/// Mission dialog: Eyananth, Allez (Chris Bainfield)
strcpy(string, _("Alright, Tell 'em I'm on my way."));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
break;
case MISN_URUSOR:
strcpy(string, "I need some resources before we leave, it'll make life a lot easier in Mordor. Problem is that WEAPCO hoards these parts.");
/// Mission dialog: Eyananth, Urusor (Sid Wilson)
strcpy(string, _("I need some resources before we leave, it'll make life a lot easier in Mordor. Problem is that WEAPCO hoards these parts."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "Where can we get them, then?");
/// Mission dialog: Eyananth, Urusor (Chris Bainfield)
strcpy(string, _("Where can we get them, then?"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "There's a big shipment of them nearby. I can disable the supply craft carrying them; I just need you to give me some cover while I do it.");
/// Mission dialog: Eyananth, Urusor (Sid Wilson)
strcpy(string, _("There's a big shipment of them nearby. I can disable the supply craft carrying them; I just need you to give me some cover while I do it."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "You got it!");
/// Mission dialog: Eyananth, Urusor (Chris Bainfield)
strcpy(string, _("You got it!"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
break;
case MISN_DORIM:
strcpy(string, "A WEAPCO scientist just ran off in an escape pod and hid in the asteroid belt. If we capture him, we may be able to get some information about Mordor.");
/// Mission dialog: Eyananth, Dorim (Sid Wilson)
strcpy(string, _("A WEAPCO scientist just ran off in an escape pod and hid in the asteroid belt. If we capture him, we may be able to get some information about Mordor."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "I'm on it.");
/// Mission dialog: Eyananth, Dorim (Chris Bainfield)
strcpy(string, _("Alright, I'll go look for him. I guess I'll grab some ore along the way."));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
break;
case MISN_ELAMALE:
strcpy(string, "I've received word that the slaves we rescued have started a rebellion. Looks like the plan worked.");
/// Mission dialog: Eyananth, Elamale (Sid Wilson)
strcpy(string, _("I've received word that the slaves we rescued have started a rebellion. Looks like the plan worked."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "WEAPCO has an automated mining ship in orbit around Elamale. How about we take it out and cause some confusion?");
/// Mission dialog: Eyananth, Elamale (Phoebe Lexx)
strcpy(string, _("WEAPCO has an automated mining ship in orbit around Elamale. How about we take it out and cause some confusion?"));
y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
strcpy(string, "I like that idea!");
/// Mission dialog: Eyananth, Elamale (Chris Bainfield)
strcpy(string, _("I like that idea!"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "It'll work, but be careful.");
/// Mission dialog: Eyananth, Elamale (Sid Wilson)
strcpy(string, _("It'll work, but be careful."));
y = intermission_renderDialog(comms, y, FS_SID, string);
break;
case MISN_CLOAKFIGHTER:
strcpy(string, "What have you found out about that experimental fighter?");
/// Mission dialog: Mordor, interceptions (Chris Bainfield)
strcpy(string, _("What have you found out about that experimental fighter?"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "It's got some kind of cloaking device that makes it invisible to radar. Could prove hard to track down.");
/// Mission dialog: Mordor, interceptions (Sid Wilson)
strcpy(string, _("It's got some kind of cloaking device that makes it invisible to radar. Could prove hard to track down."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "I'll just have to run around the system until I find it.");
/// Mission dialog: Mordor, interceptions (Chris Bainfield)
strcpy(string, _("I'll just have to run around the system until I find it."));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "It's likely to run away if you engage it in battle, so try and do as much damage to it as possible.");
/// Mission dialog: Mordor, interceptions (Sid Wilson)
strcpy(string, _("It's likely to run away if you engage it in battle, so try and do as much damage to it as possible."));
y = intermission_renderDialog(comms, y, FS_SID, string);
break;
case MISN_ODEON:
strcpy(string, "I've located my sister's ship currently in orbit around Odeon. She's ignoring my hails though.");
/// Mission dialog: Mordor, Odeon (Phoebe Lexx)
strcpy(string, _("I've located my sister's ship currently in orbit around Odeon. She's ignoring my hails though."));
y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
strcpy(string, "Something's off here. She seems to be travelling freely with a WEAPCO group.");
/// Mission dialog: Mordor, Odeon (Sid Wilson)
strcpy(string, _("Something's off here. She seems to be travelling freely with a WEAPCO group."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "Do you think she's turned traitor?");
/// Mission dialog: Mordor, Odeon (Chris Bainfield)
strcpy(string, _("Do you think she's turned traitor?"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "No way. She hates WEAPCO with a passion.");
/// Mission dialog: Mordor, Odeon (Phoebe Lexx)
strcpy(string, _("No way. She hates WEAPCO with a passion."));
y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
strcpy(string, "She must be under some kind of mind control. I've heard of WEAPCO developing a new \"AI training program\" recently. We'd better rescue her!");
/// Mission dialog: Mordor, Odeon (Sid Wilson)
strcpy(string, _("She must be under some kind of mind control. I've heard of WEAPCO developing a new \"AI training program\" recently. We'd better rescue her!"));
y = intermission_renderDialog(comms, y, FS_SID, string);
break;
case MISN_FELLON:
strcpy(string, "A rebel group has organized a counter strike. If we can help them secure a victory it will be a real boost to morale.");
/// Mission dialog: Mordor, Fellon (Sid Wilson)
strcpy(string, _("A rebel group has organized a counter strike. If we can help them secure a victory it will be a real boost to morale."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "Awesome! I'm on it!");
/// Mission dialog: Mordor, Fellon (Chris Bainfield)
strcpy(string, _("Awesome! Let's do it!"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "Just make sure the rebel ships don't all get destroyed.");
/// Mission dialog: Mordor, Fellon (Sid Wilson)
strcpy(string, _("Just make sure the rebel ships don't all get destroyed."));
y = intermission_renderDialog(comms, y, FS_SID, string);
break;
case MISN_SIVEDI:
strcpy(string, "Seems like taking out that WEAPCO mining ship wasn't such a good idea. The ore it collected is needed in weapons production.");
/// Mission dialog: Mordor, Sivedi (Sid Wilson)
strcpy(string, _("Seems like taking out that WEAPCO mining ship wasn't such a good idea. The ore it collected is needed in weapons production."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "Damn! I guess that means I'll have to mine some myself, then, huh?");
/// Mission dialog: Mordor, Sivedi (Chris Bainfield)
strcpy(string, _("Damn! I guess that means I'll have to mine some myself, then, huh?"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "Yes. Be careful, Chris. Your weapons weren't designed for that sort of work, after all.");
/// Mission dialog: Mordor, Sivedi (Sid Wilson)
strcpy(string, _("Yes. Be careful, Chris. Your weapons weren't designed for that sort of work, after all."));
y = intermission_renderDialog(comms, y, FS_SID, string);
break;
case MISN_ALMARTHA:
strcpy(string, "Hey, Krass! I need you to help us out with something. Phoebe and Ursula are taking out key WEAPCO plants. Can you help me create a diversion by wreaking havoc a little bit away from that?");
/// Mission dialog: Mordor, Almartha (Chris Bainfield)
strcpy(string, _("Hey, Krass! I need you to help us out with something. Phoebe and Ursula are taking out key WEAPCO plants. Can you help me create a diversion by wreaking havoc a little bit away from that?"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "Sure, I can help you out, boy. But I'll be needing my fee...");
/// Mission dialog: Mordor, Almartha (Krass Tyler)
strcpy(string, _("Sure, I can help you out, boy. But I'll be needing my fee..."));
y = intermission_renderDialog(comms, y, FS_KRASS, string);
break;
case MISN_POSWIC:
strcpy(string, "My memory is finally back. Here's something interesting: just before I was captured, I found out that WEAPCO is transporting several important executives to Poswic.");
/// Mission dialog: Mordor, Poswic (Ursula Lexx)
strcpy(string, _("My memory is finally back. Here's something interesting: just before I was captured, I found out that WEAPCO is transporting several important executives to Poswic."));
y = intermission_renderDialog(comms, y, FS_URSULA, string);
strcpy(string, "We can't let a rare opportunity like this slip through our fingers! I'll need some cover so I can disable that ship.");
/// Mission dialog: Mordor, Poswic (Sid Wilson)
strcpy(string, _("We can't let a rare opportunity like this slip through our fingers! I'll need some cover so I can disable that ship."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "You got it!");
/// Mission dialog: Mordor, Poswic (Chris Bainfield)
strcpy(string, _("I've got you covered, Sid!"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
break;
case MISN_ELLESH:
strcpy(string, "Phoebe, I need you to keep an eye on things here. I'm going after that ship!");
/// Mission dialog: Mordor, Ellesh (Chris Bainfield)
strcpy(string, _("Phoebe, I need you to keep an eye on things here. I'm going after that ship!"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "Are you sure you can catch up to it?");
/// Mission dialog: Mordor, Ellesh (Phoebe Lexx)
strcpy(string, _("Are you sure you can catch up to it?"));
y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
strcpy(string, "Absolutely. One thing that's really nice about the Firefly is its speed. I'll see you in a bit!");
/// Mission dialog: Mordor, Ellesh (Chris Bainfield)
strcpy(string, _("Absolutely. One thing that's really nice about the Firefly is its speed. I'll see you in a bit!"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
break;
@ -1003,76 +1096,95 @@ static void intermission_createMissionDetailSurface(SDL_Surface *comms, int miss
case MISN_PLUTO:
case MISN_NEPTUNE:
case MISN_URANUS:
strcpy(string, "We've got to start from the outside and work our way in. That will give us less chance of being flanked during the final operation.");
/// Mission dialog: Sol, Pluto/Neptune/Uranus (Sid Wilson)
strcpy(string, _("We've got to start from the outside and work our way in. That will give us less chance of being flanked during the final operation."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "Gotcha.");
/// Mission dialog: Sol, Pluto/Neptune/Uranus (Phoebe Lexx)
strcpy(string, _("Sounds like a plan, Sid!"));
y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
strcpy(string, "Okay.");
/// Mission dialog: Sol, Pluto/Neptune/Uranus (Ursula Lexx)
strcpy(string, _("Better safe than sorry, I guess."));
y = intermission_renderDialog(comms, y, FS_URSULA, string);
strcpy(string, "Alright.");
/// Mission dialog: Sol, Pluto/Neptune/Uranus (Chris Bainfield)
strcpy(string, _("Boring, but I guess you're right, Sid, as usual."));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
break;
case MISN_SATURN:
strcpy(string, "WEAPCO has set up a highly dangerous defense line between Saturn and Uranus. We'll need to take it out.");
/// Mission dialog: Sol, Saturn (Chris Bainfield)
strcpy(string, _("WEAPCO has set up a highly dangerous defense line between Saturn and Uranus. We'll need to take it out."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "What kind of defense system?");
/// Mission dialog: Sol, Saturn (Ursula Lexx)
strcpy(string, _("What kind of defense system?"));
y = intermission_renderDialog(comms, y, FS_URSULA, string);
strcpy(string, "Several mobile Energy Ray cannons, not unlike the weapon used by the Star Killer back in Spirit.");
/// Mission dialog: Sol, Saturn (Chris Bainfield)
strcpy(string, _("Several mobile Energy Ray cannons, not unlike the weapon used by the Star Killer back in Spirit."));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "Best check my ejection system, then!");
/// Mission dialog: Sol, Saturn (Phoebe Lexx)
strcpy(string, _("Best check my ejection system, then!"));
y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
break;
case MISN_JUPITER:
strcpy(string, "While you were gone I picked up a distress call coming from around Jupiter.");
/// Mission dialog: Sol, Jupiter (Sid Wilson)
strcpy(string, _("While you were gone I picked up a distress call coming from around Jupiter."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "Who would be sending out a distress call within Sol?");
/// Mission dialog: Sol, Jupiter (Ursula Lexx)
strcpy(string, _("Who would be sending out a distress call within Sol?"));
y = intermission_renderDialog(comms, y, FS_URSULA, string);
strcpy(string, "Let's check it out. Even if it's a trap, I think we can handle it.");
/// Mission dialog: Sol, Jupiter (Chris Bainfield)
strcpy(string, _("Let's check it out. Even if it's a trap, I think we can handle it."));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
break;
case MISN_MARS:
strcpy(string, "Chris, we've got a small problem. WEAPCO has a minefield in the asteroid belt. We'll need you to clear a way through.");
/// Mission dialog: Sol, Mars (Sid Wilson)
strcpy(string, _("Chris, we've got a small problem. WEAPCO has deployed a minefield in the asteroid belt. We'll need you to clear a way through."));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "Alright. I'll radio in once I've cleared a safe path.");
/// Mission dialog: Sol, Mars (Chris Bainfield)
strcpy(string, _("Alright. I'll radio in once I've cleared a safe path."));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
break;
case MISN_EARTH:
strcpy(string, "Okay people, this is the big one. We go in fast and we go in hard. Don't hold back and hit them with everything we've got!");
/// Mission dialog: Sol, Earth (Chris Bainfield)
strcpy(string, _("Okay people, this is the big one. We go in fast and we go in hard. Don't hold back and hit them with everything we've got!"));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "We've come too far to turn back now. None of us better die out there!");
/// Mission dialog: Sol, Earth (Sid Wilson)
strcpy(string, _("We've come too far to turn back now. None of us better die out there!"));
y = intermission_renderDialog(comms, y, FS_SID, string);
strcpy(string, "Right with you, Chris!");
/// Mission dialog: Sol, Earth (Phoebe Lexx)
strcpy(string, _("Right with you, Chris!"));
y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
strcpy(string, "WEAPCO'll regret sticking probes into my head!");
/// Mission dialog: Sol, Earth (Ursula Lexx)
strcpy(string, _("WEAPCO'll regret sticking probes into my head!"));
y = intermission_renderDialog(comms, y, FS_URSULA, string);
break;
case MISN_VENUS:
strcpy(string, "Kethlan has run off to Venus. I'm going after him.");
/// Mission dialog: Sol, Venus (Chris Bainfield)
strcpy(string, _("Kethlan has run off to Venus. I'm going after him."));
y = intermission_renderDialog(comms, y, FS_CHRIS, string);
strcpy(string, "Be careful, Chris. We've won the war, but it would be a real shame if you died now!");
/// Mission dialog: Sol, Venus (Sid Wilson)
strcpy(string, _("Be careful, Chris. We've won the war, but it would be a real shame if you died now!"));
y = intermission_renderDialog(comms, y, FS_SID, string);
break;

View File

@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libintl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -91,83 +92,82 @@ void mission_init()
static const int ALWAYS = 1 * 60;
static const int NEVER = -1;
/// Mission objective
const char *ob_destroyAll = _("Destroy all remaining WEAPCO fighters");
mission_clearAll();
sprintf(missions[MISN_START].primaryObjective[0],
"Escape from WEAPCO Persuit");
/// Mission objective (start)
strcpy(missions[MISN_START].primaryObjective[0], _("Escape from WEAPCO Persuit"));
missions[MISN_START].primaryType[0] = M_DESTROY_ALL_TARGETS;
missions[MISN_START].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_HAIL].primaryObjective[0],
"Collect $500 to pay Mercenary for FIREFLY");
/// Mission objective (Hail)
strcpy(missions[MISN_HAIL].primaryObjective[0], _("Collect $500 to pay Mercenary for FIREFLY"));
missions[MISN_HAIL].primaryType[0] = M_COLLECT;
missions[MISN_HAIL].target1[0] = P_CASH;
missions[MISN_HAIL].targetValue1[0] = 500;
missions[MISN_HAIL].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_HAIL].primaryObjective[1],
"Destroy all remaining WEAPCO fighters");
strcpy(missions[MISN_HAIL].primaryObjective[1], ob_destroyAll);
missions[MISN_HAIL].primaryType[1] = M_DESTROY_ALL_TARGETS;
missions[MISN_HAIL].completed1[1] = OB_INCOMPLETE;
missions[MISN_HAIL].addAliens = FREQUENT;
sprintf(missions[MISN_CERADSE].primaryObjective[0],
"Collect 6 Cargo Pods");
/// Mission objective (Ceradse)
strcpy(missions[MISN_CERADSE].primaryObjective[0], _("Collect 6 Cargo Pods"));
missions[MISN_CERADSE].primaryType[0] = M_COLLECT;
missions[MISN_CERADSE].target1[0] = P_CARGO;
missions[MISN_CERADSE].targetValue1[0] = 6;
missions[MISN_CERADSE].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_CERADSE].primaryObjective[1],
"Do not destroy *ANY* Cargo Pods");
/// Mission objective (Ceradse)
strcpy(missions[MISN_CERADSE].primaryObjective[1], _("Do not destroy *ANY* Cargo Pods"));
missions[MISN_CERADSE].primaryType[1] = M_PROTECT_PICKUP;
missions[MISN_CERADSE].target1[1] = P_CARGO;
missions[MISN_CERADSE].targetValue1[1] = 0;
missions[MISN_CERADSE].completed1[1] = OB_CONDITION;
sprintf(missions[MISN_CERADSE].secondaryObjective[0],
"Destroy all remaining WEAPCO fighters");
strcpy(missions[MISN_CERADSE].secondaryObjective[0], ob_destroyAll);
missions[MISN_CERADSE].secondaryType[0] = M_DESTROY_ALL_TARGETS;
missions[MISN_CERADSE].completed2[0] = OB_INCOMPLETE;
missions[MISN_CERADSE].addAliens = FREQUENT;
sprintf(missions[MISN_HINSTAG].primaryObjective[0],
"Destroy 5 WEAPCO Missile Boats");
/// Mission objective (Hinstag)
strcpy(missions[MISN_HINSTAG].primaryObjective[0], _("Destroy 5 WEAPCO Missile Boats"));
missions[MISN_HINSTAG].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_HINSTAG].target1[0] = CD_MISSILEBOAT;
missions[MISN_HINSTAG].targetValue1[0] = 5;
missions[MISN_HINSTAG].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_HINSTAG].secondaryObjective[0],
"Destroy all remaining WEAPCO fighters");
strcpy(missions[MISN_HINSTAG].secondaryObjective[0], ob_destroyAll);
missions[MISN_HINSTAG].secondaryType[0] = M_DESTROY_ALL_TARGETS;
missions[MISN_HINSTAG].completed2[0] = OB_INCOMPLETE;
missions[MISN_HINSTAG].addAliens = NORMAL;
sprintf(missions[MISN_JOLDAR].primaryObjective[0],
"Destroy 9 WEAPCO Miners");
/// Mission objective (Joldar)
strcpy(missions[MISN_JOLDAR].primaryObjective[0], _("Destroy 9 WEAPCO Mine-droppers"));
missions[MISN_JOLDAR].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_JOLDAR].target1[0] = CD_MINER;
missions[MISN_JOLDAR].targetValue1[0] = 9;
missions[MISN_JOLDAR].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_JOLDAR].secondaryObjective[0],
"Destroy all remaining WEAPCO fighters");
strcpy(missions[MISN_JOLDAR].secondaryObjective[0], ob_destroyAll);
missions[MISN_JOLDAR].secondaryType[0] = M_DESTROY_ALL_TARGETS;
missions[MISN_JOLDAR].completed2[0] = OB_INCOMPLETE;
missions[MISN_JOLDAR].addAliens = NORMAL;
sprintf(missions[MISN_MOEBO].primaryObjective[0],
"Destroy WEAPCO Frigate");
/// Mission objective (Moebo)
strcpy(missions[MISN_MOEBO].primaryObjective[0], _("Destroy WEAPCO Frigate"));
missions[MISN_MOEBO].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_MOEBO].target1[0] = CD_BOSS;
missions[MISN_MOEBO].targetValue1[0] = 1;
@ -178,21 +178,21 @@ void mission_init()
missions[MISN_MOEBO].addAliens = SOMETIMES;
sprintf(missions[MISN_NEROD].primaryObjective[0], "Rescue Phoebe Lexx");
/// Mission objective (Nerod)
strcpy(missions[MISN_NEROD].primaryObjective[0], _("Rescue Phoebe Lexx"));
missions[MISN_NEROD].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_NEROD].target1[0] = CD_CARGOSHIP;
missions[MISN_NEROD].targetValue1[0] = 1;
missions[MISN_NEROD].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_NEROD].primaryObjective[1],
"Do not allow Phoebe to be killed");
/// Mission objective (Nerod)
strcpy(missions[MISN_NEROD].primaryObjective[1], _("Do not allow Phoebe to be killed"));
missions[MISN_NEROD].primaryType[1] = M_PROTECT_TARGET;
missions[MISN_NEROD].target1[1] = CD_PHOEBE;
missions[MISN_NEROD].targetValue1[1] = 0;
missions[MISN_NEROD].completed1[1] = OB_CONDITION;
sprintf(missions[MISN_NEROD].primaryObjective[2],
"Destroy all WEAPCO forces");
strcpy(missions[MISN_NEROD].primaryObjective[2], ob_destroyAll);
missions[MISN_NEROD].primaryType[2] = M_DESTROY_TARGET_TYPE;
missions[MISN_NEROD].target1[2] = CD_ANY;
missions[MISN_NEROD].targetValue1[2] = 35;
@ -201,42 +201,40 @@ void mission_init()
missions[MISN_NEROD].addAliens = ALWAYS;
sprintf(missions[MISN_ALLEZ].primaryObjective[0],
"Assist medical supply craft");
/// Mission objective (Allez)
strcpy(missions[MISN_ALLEZ].primaryObjective[0], _("Assist medical supply craft"));
missions[MISN_ALLEZ].primaryType[0] = M_ESCAPE_TARGET;
missions[MISN_ALLEZ].target1[0] = CD_GOODTRANSPORT;
missions[MISN_ALLEZ].targetValue1[0] = 0;
missions[MISN_ALLEZ].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_ALLEZ].primaryObjective[1],
"Do not allow supply craft to be destroyed");
/// Mission objective (Allez)
strcpy(missions[MISN_ALLEZ].primaryObjective[1], _("Do not allow supply craft to be destroyed"));
missions[MISN_ALLEZ].primaryType[1] = M_PROTECT_TARGET;
missions[MISN_ALLEZ].target1[1] = CD_GOODTRANSPORT;
missions[MISN_ALLEZ].targetValue1[1] = 0;
missions[MISN_ALLEZ].completed1[1] = OB_CONDITION;
sprintf(missions[MISN_ALLEZ].secondaryObjective[0],
"Destroy all remaining WEAPCO fighters");
strcpy(missions[MISN_ALLEZ].secondaryObjective[0], ob_destroyAll);
missions[MISN_ALLEZ].secondaryType[0] = M_DESTROY_ALL_TARGETS;
missions[MISN_ALLEZ].completed2[0] = OB_INCOMPLETE;
missions[MISN_ALLEZ].addAliens = FREQUENT;
sprintf(missions[MISN_URUSOR].primaryObjective[0],
"Disable five WEAPCO supply craft");
/// Mission objective (Urusor)
strcpy(missions[MISN_URUSOR].primaryObjective[0], _("Disable five WEAPCO supply craft"));
missions[MISN_URUSOR].primaryType[0] = M_DISABLE_TARGET;
missions[MISN_URUSOR].target1[0] = CD_CARGOSHIP;
missions[MISN_URUSOR].targetValue1[0] = 5;
missions[MISN_URUSOR].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_URUSOR].primaryObjective[1],
"Destroy all remaining WEAPCO fighters");
strcpy(missions[MISN_URUSOR].primaryObjective[1], ob_destroyAll);
missions[MISN_URUSOR].primaryType[1] = M_DESTROY_ALL_TARGETS;
missions[MISN_URUSOR].completed1[1] = OB_INCOMPLETE;
sprintf(missions[MISN_URUSOR].primaryObjective[2],
"Protect supply craft AND Sid Wilson");
/// Mission objective (Urusor)
strcpy(missions[MISN_URUSOR].primaryObjective[2], _("Protect supply craft AND Sid Wilson"));
missions[MISN_URUSOR].primaryType[2] = M_PROTECT_TARGET;
missions[MISN_URUSOR].target1[2] = CD_CARGOSHIP;
missions[MISN_URUSOR].targetValue1[2] = 0;
@ -245,22 +243,22 @@ void mission_init()
missions[MISN_URUSOR].addAliens = FREQUENT;
sprintf(missions[MISN_DORIM].primaryObjective[0],
"Locate doctor's escape pod");
/// Mission objective (Dorim)
strcpy(missions[MISN_DORIM].primaryObjective[0], _("Locate doctor's escape pod"));
missions[MISN_DORIM].primaryType[0] = M_COLLECT;
missions[MISN_DORIM].target1[0] = P_ESCAPEPOD;
missions[MISN_DORIM].targetValue1[0] = 1;
missions[MISN_DORIM].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_DORIM].primaryObjective[1],
"Do not destroy doctor's escape pod");
/// Mission objective (Dorim)
strcpy(missions[MISN_DORIM].primaryObjective[1], _("Do not destroy doctor's escape pod"));
missions[MISN_DORIM].primaryType[1] = M_PROTECT_PICKUP;
missions[MISN_DORIM].target1[1] = P_ESCAPEPOD;
missions[MISN_DORIM].targetValue1[1] = 1; // DONE ON PURPOSE!! DO NOT CHANGE THIS!!!!
missions[MISN_DORIM].completed1[1] = OB_CONDITION;
sprintf(missions[MISN_DORIM].secondaryObjective[0],
"Collect 10 pieces of Ore");
/// Mission objective (Dorim)
strcpy(missions[MISN_DORIM].secondaryObjective[0], _("Collect 10 pieces of Ore"));
missions[MISN_DORIM].secondaryType[0] = M_COLLECT;
missions[MISN_DORIM].target2[0] = P_ORE;
missions[MISN_DORIM].targetValue2[0] = 10;
@ -272,20 +270,21 @@ void mission_init()
missions[MISN_DORIM].timeLimit2[0] = 3;
sprintf(missions[MISN_ELAMALE].primaryObjective[0],
"Destroy WEAPCO ore mining craft");
/// Mission objective (Elamale)
strcpy(missions[MISN_ELAMALE].primaryObjective[0], _("Destroy WEAPCO ore mining craft"));
missions[MISN_ELAMALE].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_ELAMALE].target1[0] = CD_BOSS;
missions[MISN_ELAMALE].targetValue1[0] = 1;
missions[MISN_ELAMALE].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_ELAMALE].secondaryObjective[0],
"Save present slaves");
/// Mission objective (Elamale)
strcpy(missions[MISN_ELAMALE].secondaryObjective[0], _("Save present slaves"));
missions[MISN_ELAMALE].secondaryType[0] = M_PROTECT_PICKUP;
missions[MISN_ELAMALE].target2[0] = P_SLAVES;
missions[MISN_ELAMALE].completed2[0] = OB_CONDITION;
sprintf(missions[MISN_ELAMALE].primaryObjective[1], "Battle Kline");
/// Mission objective (Elamale)
strcpy(missions[MISN_ELAMALE].primaryObjective[1], _("Battle Kline"));
missions[MISN_ELAMALE].primaryType[1] = M_ESCAPE_TARGET;
missions[MISN_ELAMALE].target1[1] = CD_KLINE;
missions[MISN_ELAMALE].targetValue1[1] = 1;
@ -294,110 +293,109 @@ void mission_init()
missions[MISN_ELAMALE].addAliens = NEVER;
sprintf(missions[MISN_ODEON].primaryObjective[0], "Destroy Ursula's ship");
/// Mission objective (Odeon)
strcpy(missions[MISN_ODEON].primaryObjective[0], _("Destroy Ursula's ship"));
missions[MISN_ODEON].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_ODEON].target1[0] = CD_EVILURSULA;
missions[MISN_ODEON].targetValue1[0] = 0;
missions[MISN_ODEON].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_ODEON].primaryObjective[1],
"Capture Ursula's escape pod");
/// Mission objective (Odeon)
strcpy(missions[MISN_ODEON].primaryObjective[1], _("Capture Ursula's escape pod"));
missions[MISN_ODEON].primaryType[1] = M_COLLECT;
missions[MISN_ODEON].target1[1] = P_ESCAPEPOD;
missions[MISN_ODEON].targetValue1[1] = 1;
missions[MISN_ODEON].completed1[1] = OB_INCOMPLETE;
sprintf(missions[MISN_ODEON].primaryObjective[2], "Do not kill Ursula");
/// Mission objective (Odeon)
strcpy(missions[MISN_ODEON].primaryObjective[2], _("Do not kill Ursula"));
missions[MISN_ODEON].primaryType[2] = M_PROTECT_PICKUP;
missions[MISN_ODEON].target1[2] = P_ESCAPEPOD;
missions[MISN_ODEON].targetValue1[2] = 0;
missions[MISN_ODEON].completed1[2] = OB_CONDITION;
sprintf(missions[MISN_ODEON].secondaryObjective[0],
"Destroy all remaining WEAPCO fighters");
strcpy(missions[MISN_ODEON].secondaryObjective[0], ob_destroyAll);
missions[MISN_ODEON].secondaryType[0] = M_DESTROY_ALL_TARGETS;
missions[MISN_ODEON].completed2[0] = OB_INCOMPLETE;
missions[MISN_ODEON].addAliens = FREQUENT;
sprintf(missions[MISN_FELLON].primaryObjective[0],
"Assist attack on WEAPCO ore mining craft");
/// Mission objective (Fellon)
strcpy(missions[MISN_FELLON].primaryObjective[0], _("Assist attack on WEAPCO ore mining craft"));
missions[MISN_FELLON].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_FELLON].target1[0] = CD_BOSS;
missions[MISN_FELLON].targetValue1[0] = 1;
missions[MISN_FELLON].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_FELLON].primaryObjective[1],
"At least 1 rebel craft must survive");
/// Mission objective (Fellon)
strcpy(missions[MISN_FELLON].primaryObjective[1], _("At least 1 rebel craft must survive"));
missions[MISN_FELLON].primaryType[1] = M_PROTECT_TARGET;
missions[MISN_FELLON].target1[1] = CD_REBELCARRIER;
missions[MISN_FELLON].targetValue1[1] = 2;
missions[MISN_FELLON].completed1[1] = OB_CONDITION;
sprintf(missions[MISN_FELLON].primaryObjective[2],
"Destroy all present WEAPCO forces");
strcpy(missions[MISN_FELLON].primaryObjective[2], ob_destroyAll);
missions[MISN_FELLON].primaryType[2] = M_DESTROY_ALL_TARGETS;
missions[MISN_FELLON].completed1[2] = OB_INCOMPLETE;
missions[MISN_FELLON].addAliens = ALWAYS;
sprintf(missions[MISN_SIVEDI].primaryObjective[0],
"Collect 25 pieces of Ore");
/// Mission objective (Sivedi)
strcpy(missions[MISN_SIVEDI].primaryObjective[0], _("Collect 25 pieces of Ore"));
missions[MISN_SIVEDI].primaryType[0] = M_COLLECT;
missions[MISN_SIVEDI].target1[0] = P_ORE;
missions[MISN_SIVEDI].targetValue1[0] = 25;
missions[MISN_SIVEDI].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_SIVEDI].secondaryObjective[0],
"Collect 25 pieces of Ore");
/// Mission objective (Sivedi)
strcpy(missions[MISN_SIVEDI].secondaryObjective[0], _("Collect 50 pieces of Ore"));
missions[MISN_SIVEDI].secondaryType[0] = M_COLLECT;
missions[MISN_SIVEDI].target2[0] = P_ORE;
missions[MISN_SIVEDI].targetValue2[0] = 25;
missions[MISN_SIVEDI].targetValue2[0] = 25; // 25 + 25 = 50 (the overall total)
missions[MISN_SIVEDI].completed2[0] = OB_INCOMPLETE;
missions[MISN_SIVEDI].addAliens = ALWAYS;
sprintf(missions[MISN_ALMARTHA].primaryObjective[0],
"Collect $2000 to pay mercenary");
/// Mission objective (Almartha)
strcpy(missions[MISN_ALMARTHA].primaryObjective[0], _("Collect $2000 to pay mercenary"));
missions[MISN_ALMARTHA].primaryType[0] = M_COLLECT;
missions[MISN_ALMARTHA].target1[0] = P_CASH;
missions[MISN_ALMARTHA].targetValue1[0] = 2000;
missions[MISN_ALMARTHA].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_ALMARTHA].primaryObjective[1],
"Destroy all remaining WEAPCO fighters");
strcpy(missions[MISN_ALMARTHA].primaryObjective[1], ob_destroyAll);
missions[MISN_ALMARTHA].primaryType[1] = M_DESTROY_ALL_TARGETS;
missions[MISN_ALMARTHA].completed1[1] = OB_INCOMPLETE;
missions[MISN_ALMARTHA].addAliens = ALWAYS;
sprintf(missions[MISN_POSWIC].primaryObjective[0], "Destroy escorts");
/// Mission objective (Poswic)
strcpy(missions[MISN_POSWIC].primaryObjective[0], _("Destroy escorts"));
missions[MISN_POSWIC].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_POSWIC].target1[0] = CD_ESCORT;
missions[MISN_POSWIC].targetValue1[0] = 5;
missions[MISN_POSWIC].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_POSWIC].primaryObjective[1],
"Disable executive transport");
/// Mission objective (Poswic)
strcpy(missions[MISN_POSWIC].primaryObjective[1], _("Disable executive transport"));
missions[MISN_POSWIC].primaryType[1] = M_ESCAPE_TARGET;
missions[MISN_POSWIC].target1[1] = CD_BOSS;
missions[MISN_POSWIC].targetValue1[1] = 1;
missions[MISN_POSWIC].completed1[1] = OB_INCOMPLETE;
sprintf(missions[MISN_POSWIC].primaryObjective[2],
"Destroy all remaining WEAPCO fighters");
strcpy(missions[MISN_POSWIC].primaryObjective[2], ob_destroyAll);
missions[MISN_POSWIC].primaryType[2] = M_DESTROY_ALL_TARGETS;
missions[MISN_POSWIC].completed1[2] = OB_INCOMPLETE;
missions[MISN_POSWIC].addAliens = NORMAL;
sprintf(missions[MISN_ELLESH].primaryObjective[0],
"Destroy executive transport");
/// Mission objective (Ellesh)
strcpy(missions[MISN_ELLESH].primaryObjective[0], _("Destroy executive transport"));
missions[MISN_ELLESH].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_ELLESH].target1[0] = CD_BOSS;
missions[MISN_ELLESH].targetValue1[0] = 1;
@ -406,15 +404,14 @@ void mission_init()
missions[MISN_ELLESH].addAliens = ALWAYS;
sprintf(missions[MISN_PLUTO].primaryObjective[0],
"Destroy planetary guardian");
/// Mission objective (Pluto, Neptune, Uranus)
strcpy(missions[MISN_PLUTO].primaryObjective[0], _("Destroy planetary guardian"));
missions[MISN_PLUTO].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_PLUTO].target1[0] = CD_PLUTOBOSS;
missions[MISN_PLUTO].targetValue1[0] = 1;
missions[MISN_PLUTO].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_PLUTO].primaryObjective[1],
"Destroy all remaining WEAPCO fighters");
strcpy(missions[MISN_PLUTO].primaryObjective[1], ob_destroyAll);
missions[MISN_PLUTO].primaryType[1] = M_DESTROY_ALL_TARGETS;
missions[MISN_PLUTO].completed1[1] = OB_INCOMPLETE;
@ -424,15 +421,13 @@ void mission_init()
missions[MISN_PLUTO].addAliens = ALWAYS;
sprintf(missions[MISN_NEPTUNE].primaryObjective[0],
"Destroy planetary guardian");
strcpy(missions[MISN_NEPTUNE].primaryObjective[0], missions[MISN_PLUTO].primaryObjective[0]);
missions[MISN_NEPTUNE].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_NEPTUNE].target1[0] = CD_NEPTUNEBOSS;
missions[MISN_NEPTUNE].targetValue1[0] = 1;
missions[MISN_NEPTUNE].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_NEPTUNE].primaryObjective[1],
"Destroy all remaining WEAPCO fighters");
strcpy(missions[MISN_NEPTUNE].primaryObjective[1], ob_destroyAll);
missions[MISN_NEPTUNE].primaryType[1] = M_DESTROY_ALL_TARGETS;
missions[MISN_NEPTUNE].completed1[1] = OB_INCOMPLETE;
@ -442,15 +437,13 @@ void mission_init()
missions[MISN_NEPTUNE].addAliens = ALWAYS;
sprintf(missions[MISN_URANUS].primaryObjective[0],
"Destroy all present WEAPCO forces");
strcpy(missions[MISN_URANUS].primaryObjective[0], missions[MISN_PLUTO].primaryObjective[0]);
missions[MISN_URANUS].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_URANUS].target1[0] = CD_URANUSBOSS;
missions[MISN_URANUS].targetValue1[0] = 1;
missions[MISN_URANUS].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_URANUS].primaryObjective[1],
"Destroy all remaining WEAPCO fighters");
strcpy(missions[MISN_URANUS].primaryObjective[1], ob_destroyAll);
missions[MISN_URANUS].primaryType[1] = M_DESTROY_ALL_TARGETS;
missions[MISN_URANUS].completed1[1] = OB_INCOMPLETE;
@ -460,34 +453,34 @@ void mission_init()
missions[MISN_URANUS].addAliens = ALWAYS;
sprintf(missions[MISN_SATURN].primaryObjective[0],
"Destroy outer defence systems");
/// Mission objective (Saturn)
strcpy(missions[MISN_SATURN].primaryObjective[0], _("Destroy outer defence systems"));
missions[MISN_SATURN].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_SATURN].target1[0] = CD_MOBILE_RAY;
missions[MISN_SATURN].targetValue1[0] = 6;
missions[MISN_SATURN].completed1[0] = OB_INCOMPLETE;
sprintf(missions[MISN_SATURN].primaryObjective[1],
"Destroy all remaining WEAPCO craft");
strcpy(missions[MISN_SATURN].primaryObjective[1], ob_destroyAll);
missions[MISN_SATURN].primaryType[1] = M_DESTROY_ALL_TARGETS;
missions[MISN_SATURN].completed1[1] = OB_INCOMPLETE;
missions[MISN_SATURN].addAliens = NORMAL;
sprintf(missions[MISN_JUPITER].primaryObjective[0],
"Investigate distress call");
/// Mission objective (Jupiter)
strcpy(missions[MISN_JUPITER].primaryObjective[0], _("Investigate distress call"));
missions[MISN_JUPITER].primaryType[0] = M_DESTROY_ALL_TARGETS;
missions[MISN_JUPITER].completed1[0] = OB_CONDITION;
sprintf(missions[MISN_JUPITER].primaryObjective[1], "Defeat Krass Tyler");
/// Mission objective (Jupiter)
strcpy(missions[MISN_JUPITER].primaryObjective[1], _("Defeat Krass Tyler"));
missions[MISN_JUPITER].primaryType[1] = M_DESTROY_TARGET_TYPE;
missions[MISN_JUPITER].target1[1] = CD_KRASS;
missions[MISN_JUPITER].targetValue1[1] = 1;
missions[MISN_JUPITER].completed1[1] = OB_HIDDEN;
sprintf(missions[MISN_JUPITER].primaryObjective[2],
"Destroy Krass' support group");
/// Mission objective (Jupiter)
strcpy(missions[MISN_JUPITER].primaryObjective[2], _("Destroy Krass' support group"));
missions[MISN_JUPITER].primaryType[2] = M_DESTROY_ALL_TARGETS;
missions[MISN_JUPITER].target1[1] = CD_FIREFLY;
missions[MISN_JUPITER].targetValue1[1] = 4;
@ -496,7 +489,8 @@ void mission_init()
missions[MISN_JUPITER].addAliens = ALWAYS;
sprintf(missions[MISN_MARS].primaryObjective[0], "Navigate asteroid belt");
/// Mission objective (Mars)
strcpy(missions[MISN_MARS].primaryObjective[0], _("Navigate asteroid belt"));
missions[MISN_MARS].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_MARS].target1[0] = CD_BOSS;
missions[MISN_MARS].targetValue1[0] = 1;
@ -507,8 +501,8 @@ void mission_init()
missions[MISN_MARS].addAliens = ALWAYS;
sprintf(missions[MISN_EARTH].primaryObjective[0],
"Destroy WEAPCO frontline forces");
/// Mission objective (Earth)
strcpy(missions[MISN_EARTH].primaryObjective[0], _("Destroy WEAPCO frontline forces"));
missions[MISN_EARTH].primaryType[0] = M_DESTROY_TARGET_TYPE;
missions[MISN_EARTH].target1[0] = CD_ANY;
missions[MISN_EARTH].targetValue1[0] = 100;
@ -517,7 +511,8 @@ void mission_init()
missions[MISN_EARTH].addAliens = ALWAYS;
sprintf(missions[MISN_VENUS].primaryObjective[0], "Defeat Kline");
/// Mission objective (Venus)
strcpy(missions[MISN_VENUS].primaryObjective[0], _("Defeat Kline"));
missions[MISN_VENUS].primaryType[0] = M_DESTROY_ALL_TARGETS;
missions[MISN_VENUS].completed1[0] = OB_INCOMPLETE;
@ -626,7 +621,11 @@ static void mission_evaluate(int type, int id, int *completed, int *targetValue,
*completed = OB_JUST_COMPLETED;
mission_checkTimer();
if ((game.area == MISN_URUSOR) && (type == M_DISABLE_TARGET))
radio_setMessage(FS_SID, "All vessels disabled!", 1);
{
/// Dialog (Sid Wilson)
/// Used when Sid disables the last target in the Urusor mission.
radio_setMessage(FS_SID, _("All vessels disabled!"), 1);
}
}
else
{
@ -660,12 +659,18 @@ static void mission_evaluate(int type, int id, int *completed, int *targetValue,
case P_CARGO:
sprintf(message, "Cargo pod destroyed!");
if (game.area == MISN_CERADSE) // Get lectured by Sid
radio_setMessage(FS_SID, "Chris, we needed that pod! I told you that we couldn't afford to lose a single one!", 1);
/// Dialog (Sid Wilson)
/// Used when a cargo pod is destroyed in the Ceradse mission.
radio_setMessage(FS_SID, _("Chris, we needed that pod! I told you that we couldn't afford to lose a single one!"), 1);
break;
case P_ESCAPEPOD:
sprintf(message, "Escape Pod lost!");
if (game.area == MISN_ODEON) // Get lectured by Phoebe
radio_setMessage(FS_PHOEBE, "No... Ursula...", 1);
{
/// Dialog (Phoebe Lexx)
/// Used when Ursula is lost in the Odeon mission.
radio_setMessage(FS_PHOEBE, _("No... Ursula..."), 1);
}
break;
}
break;
@ -676,13 +681,19 @@ static void mission_evaluate(int type, int id, int *completed, int *targetValue,
switch (game.area)
{
case MISN_NEROD:
radio_setMessage(FS_SID, "Dammit, Chris! We just lost her!", 1);
/// Dialog (Sid Wilson)
/// Used when Phoebe is killed in the Nerod mission.
radio_setMessage(FS_SID, _("Dammit, Chris! We just lost her!"), 1);
break;
case MISN_ALLEZ:
radio_setMessage(FS_CREW, "Noooo! Hull bre...", 1);
/// Dialog (friendly transport from Eyananth, Allez mission)
/// Used when the friendly transport in the Allez mission is destroyed.
radio_setMessage(FS_CREW, _("Noooo! Hull bre-..."), 1);
break;
case MISN_URUSOR:
radio_setMessage(FS_SID, "Chris, we've got to disable them, not destroy them!!", 1);
/// Dialog (Sid Wilson)
/// Used when a target transport is destroyed in the Urusor mission.
radio_setMessage(FS_SID, _("Chris, we've got to disable them, not destroy them!!"), 1);
break;
}
}
@ -721,6 +732,13 @@ void mission_updateRequirements(int type, int id, int value)
{
info_setLine("Sid has been killed!", FONT_RED);
mission.completed1[0] = OB_JUST_FAILED;
/// Dialog (Sid Wilson)
/// Used when Sid is killed.
/// Translation note: the end is Sid trying to say "FUCK" and getting cut
/// out because of the failure of his communication system, so please
/// translate that to the start of a similar curse word in the target
/// language being similarly cut out.
radio_setMessage(FS_SID, _("HULL BREACHED! SYSTEMS FAILING! F-..."), 1);
}
for (int i = 0 ; i < 3 ; i++)
@ -768,6 +786,9 @@ void mission_updateRequirements(int type, int id, int value)
{
info_setLine("*** Slaves Rescued - Mission Completed ***", FONT_GREEN);
intermission_planets[PLANET_RESCUESLAVES].missionCompleted = 1;
/// Dialog (Chris Bainfield)
/// Used when you rescue enough slaves for the Eyananth slave rescue mission.
radio_setMessage(FS_CHRIS, _("Alright, I think I've rescued enough slaves to stir up some trouble for WEAPCO!"), 1);
}
else
{
@ -781,7 +802,9 @@ void mission_updateRequirements(int type, int id, int value)
{
info_setLine("*** Experimental Fighter Destroyed - Mission Completed ***", FONT_GREEN);
intermission_planets[PLANET_CLOAKFIGHTER].missionCompleted = 1;
radio_setMessage(FS_CHRIS, "That's one less suprise that WEAPCO can spring on us!", 1);
/// Dialog (Chris Bainfield)
/// Used when the Mordor cloak ship is destroyed.
radio_setMessage(FS_CHRIS, _("That's one less suprise that WEAPCO can spring on us!"), 1);
game.experimentalShield = 0;
}
}
@ -794,15 +817,12 @@ Missions 11 and 23 to be exact!
static int mission_revealObjectives()
{
int allDone = 1;
char string[STRMAX] = "";
for (int i = 0 ; i < 3 ; i++)
{
if (mission.completed1[i] == OB_HIDDEN)
{
mission.completed1[i] = OB_INCOMPLETE;
sprintf(string, "New Objective - %s", mission.primaryObjective[i]);
info_setLine(string, FONT_CYAN);
allDone = 0;
}
}
@ -891,7 +911,11 @@ int mission_checkCompleted()
}
if (game.area == MISN_EARTH)
radio_setMessage(FS_CHRIS, "You guys stay here and keep things under control. I'm going after Kethlan!", 1);
{
/// Dialog (Chris Bainfield)
/// Used when the Earth mission is completed.
radio_setMessage(FS_CHRIS, _("You guys stay here and keep things under control. I'm going after Kethlan!"), 1);
}
}
}
@ -1004,13 +1028,13 @@ static void mission_drawScreen()
screen_drawRect(screen->w / 2 - 260, screen->h / 2 - 235, 500, 20, 0x00, 0x77, 0x00);
screen_drawRect(screen->w / 2 - 260, screen->h / 2 - 215, 500, 130, 0x00, 0x33, 0x00);
screen_renderString("Primary Objectives", screen->w / 2 - 250, screen->h / 2 - 231, FONT_WHITE);
screen_renderUnicode(_("Primary Objectives"), screen->w / 2 - 250, screen->h / 2 - 231, FONT_WHITE);
for (int i = 0 ; i < 3 ; i++)
{
if ((mission.primaryType[i] != M_NONE) && (mission.completed1[i] != OB_HIDDEN))
{
screen_renderString(mission.primaryObjective[i], screen->w / 2 - 240, screen->h / 2 + (i * 30) - 191, FONT_WHITE);
screen_renderUnicode(mission.primaryObjective[i], screen->w / 2 - 240, screen->h / 2 + (i * 30) - 191, FONT_WHITE);
}
}
@ -1018,13 +1042,13 @@ static void mission_drawScreen()
{
screen_drawRect(screen->w / 2 - 260, screen->h / 2 - 75, 500, 20, 0x00, 0x77, 0x77);
screen_drawRect(screen->w / 2 - 260, screen->h / 2 - 55, 500, 130, 0x00, 0x33, 0x33);
screen_renderString("Secondary Objectives", screen->w / 2 - 250, screen->h / 2 - 71, FONT_WHITE);
screen_renderUnicode(_("Secondary Objectives"), screen->w / 2 - 250, screen->h / 2 - 71, FONT_WHITE);
for (int i = 0 ; i < 3 ; i++)
{
if (mission.secondaryType[i] != M_NONE)
{
screen_renderString(mission.secondaryObjective[i], screen->w / 2 - 240, screen->h / 2 + (i * 30) - 31, FONT_WHITE);
screen_renderUnicode(mission.secondaryObjective[i], screen->w / 2 - 240, screen->h / 2 + (i * 30) - 31, FONT_WHITE);
game.secondaryMissions++;
}
}
@ -1032,7 +1056,7 @@ static void mission_drawScreen()
screen_drawRect(screen->w / 2 - 260, screen->h / 2 + 85, 500, 20, 0x77, 0x77, 0x00);
screen_drawRect(screen->w / 2 - 260, screen->h / 2 + 105, 500, 130, 0x33, 0x33, 0x00);
screen_renderString("Additional Information", screen->w / 2 - 250, screen->h / 2 + 89, FONT_WHITE);
screen_renderUnicode(_("Additional Information"), screen->w / 2 - 250, screen->h / 2 + 89, FONT_WHITE);
}
/*
@ -1087,10 +1111,18 @@ void mission_showStartScreen()
{
char temp[50];
if (game.area != MISN_MARS)
sprintf(temp, "TIME LIMIT: %d minutes", mission.timeLimit1[0]);
{
/// "%d" must be retained. It is replaced with the mission time
/// limit in minutes.
sprintf(temp, _("TIME LIMIT: %d minutes"), mission.timeLimit1[0]);
}
else
sprintf(temp, "SURVIVAL FOR %d minutes", mission.timeLimit1[0]);
screen_renderString(temp, -1, screen->h / 2 + 195, FONT_RED);
{
/// "%d" must be retained. It is replaced with the mission required
/// survival time in minutes.
sprintf(temp, _("SURVIVAL FOR %d minutes"), mission.timeLimit1[0]);
}
screen_renderUnicode(temp, -1, screen->h / 2 + 195, FONT_RED);
}
switch (game.area)
@ -1102,16 +1134,16 @@ void mission_showStartScreen()
case MISN_ELLESH:
case MISN_MARS:
case MISN_VENUS:
screen_renderString("Phoebe Lexx will not be present", screen->w / 2 - 240, screen->h / 2 + 115, FONT_WHITE);
screen_renderUnicode(_("Phoebe Lexx will not be present"), screen->w / 2 - 240, screen->h / 2 + 115, FONT_WHITE);
if (game.hasWingMate2)
screen_renderString("Ursula Lexx will not be present", screen->w / 2 - 240, screen->h / 2 + 145, FONT_WHITE);
screen_renderUnicode(_("Ursula Lexx will not be present"), screen->w / 2 - 240, screen->h / 2 + 145, FONT_WHITE);
break;
}
if ((game.area == MISN_URUSOR) ||
(game.area == MISN_POSWIC) ||
(game.area == MISN_EARTH))
screen_renderString("Sid Wilson will join you on this mission", screen->w / 2 - 240, screen->h / 2 + 175, FONT_WHITE);
screen_renderUnicode(_("Sid Wilson will join you on this mission"), screen->w / 2 - 240, screen->h / 2 + 175, FONT_WHITE);
renderer_update();
@ -1157,9 +1189,9 @@ void mission_showFinishedScreen()
if (mission.primaryType[i] != M_NONE)
{
if ((game.area != MISN_POSWIC) || (i != 1))
screen_renderString("COMPLETED", screen->w / 2 + 150, screen->h / 2 + (i * 30) - 191, FONT_GREEN);
screen_renderUnicode(_("COMPLETED"), screen->w / 2 + 150, screen->h / 2 + (i * 30) - 191, FONT_GREEN);
else
screen_renderString("FAILED", screen->w / 2 + 150, screen->h / 2 + (i * 30) - 191, FONT_RED);
screen_renderUnicode(_("FAILED"), screen->w / 2 + 150, screen->h / 2 + (i * 30) - 191, FONT_RED);
}
}
@ -1172,12 +1204,12 @@ void mission_showFinishedScreen()
strcpy(temp, mission.secondaryObjective[i]);
if (mission.completed2[i] >= OB_COMPLETED)
{
screen_renderString("COMPLETED", screen->w / 2 + 150, screen->h / 2 + (i * 30) - 31, FONT_GREEN);
screen_renderUnicode(_("COMPLETED"), screen->w / 2 + 150, screen->h / 2 + (i * 30) - 31, FONT_GREEN);
game.secondaryMissionsCompleted++;
}
else
{
screen_renderString("FAILED", screen->w / 2 + 150, screen->h / 2 + (i * 30) - 31, FONT_RED);
screen_renderUnicode(_("FAILED"), screen->w / 2 + 150, screen->h / 2 + (i * 30) - 31, FONT_RED);
}
}
}
@ -1189,19 +1221,32 @@ void mission_showFinishedScreen()
shield_bonus = 100;
else
shield_bonus = player.shield * 10;
sprintf(temp, "Shield Bonus: $%.3d", shield_bonus);
screen_renderString(temp, -1, screen->h / 2 + 130, FONT_WHITE);
/// "%d" must be retained. It is replaced with the money earned
/// from the shield bonus. Please keep "$" as-is as well for the
/// sake of continuity with untranslateable parts of the interface.
sprintf(temp, _("Shield Bonus: $%d"), shield_bonus);
screen_renderUnicode(temp, -1, screen->h / 2 + 130, FONT_WHITE);
game.cash += shield_bonus;
game.cashEarned += shield_bonus;
}
game.timeTaken += engine.timeTaken;
snprintf(temp, sizeof temp, "Mission Time: %2ld:%02ld:%02ld",
engine.timeTaken / 3600, (engine.timeTaken / 60) % 60,
engine.timeTaken % 60);
/// "%02ld" sequences (which represent minutes and seconds,
/// respectively) must remain and stay in the same order relative
/// to each other. The ":"s between them can be changed to other
/// characters if desired, e.g. this would be acceptable:
///
/// "Mission time: %02ldm %02lds"
///
/// If you are familiar with printf formatting, you may also change
/// the formatting as long as the "ld" type remains. For example,
/// the "%02ld" sequences may be changed to "%ld" if you wish to
/// not force two digits to be filled in (e.g. to render the number
/// 3 as "3" instead of "03").
snprintf(temp, sizeof temp, _("Mission Time: %02ld:%02ld"), engine.timeTaken / 60, engine.timeTaken % 60);
screen_renderString(temp, -1, 500, FONT_WHITE);
screen_renderUnicode(temp, -1, 500, FONT_WHITE);
// Do some mission specific stuff here...
if (game.area == MISN_HAIL)

View File

@ -17,11 +17,15 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
#include "defs.h"
#include "structs.h"
#include "engine.h"
#include "gfx.h"
/*
@ -44,3 +48,56 @@ void radio_setMessage(int face, const char *in, int priority)
gfx_createMessageBox(faceShape, in, 1);
}
/*
Get a random message from those listed in `messages` (separated by '\n')
and assign it to `choice`. Used for things like taunts and brags.
*/
void radio_getRandomMessage(char *dest, const char *messages)
{
char *msgs;
char *patch;
int nMsg;
int choice;
int i;
msgs = malloc(sizeof(msgs) * strlen(messages));
nMsg = 0;
strcpy(msgs, messages);
patch = strtok(msgs, "\n");
while (patch != NULL)
{
if (strcmp(patch, "") != 0)
nMsg++;
patch = strtok(NULL, "\n");
}
// Now we know how many choices we have, let's make that choice...
choice = rand() % nMsg;
// And go through the search again...
i = 0;
strcpy(msgs, messages);
patch = strtok(msgs, "\n");
while ((i < choice) && (patch != NULL))
{
if (strcmp(patch, "") != 0)
i++;
patch = strtok(NULL, "\n");
}
if (patch != NULL)
{
strcpy(dest, patch);
}
else
{
engine_warn("Failed to grab a message! Is the list empty?");
strcpy(dest, "");
}
free(msgs);
}

View File

@ -24,5 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "structs.h"
void radio_setMessage(int face, const char *in, int priority);
void radio_getRandomMessage(char *dest, const char *messages);
#endif

View File

@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libintl.h>
#include <stdio.h>
#include <sys/stat.h>
@ -394,24 +395,32 @@ void save_createSurface(SDL_Surface *savesSurface, int clickedSlot)
gfx_renderString("CANCEL", 150, 270, FONT_WHITE, 0, savesSurface);
gfx_renderString("DELETE", 270, 270, FONT_WHITE, 0, savesSurface);
gfx_renderUnicode("SAVE will save the game", 17, 200, FONT_WHITE, 0,
savesSurface);
gfx_renderUnicode("CANCEL will unselect that slot", 17, 220,
FONT_WHITE, 0, savesSurface);
gfx_renderUnicode("DELETE will remove the save", 17, 240,
FONT_WHITE, 0, savesSurface);
/// Explanation of what the SAVE button does (note: "SAVE" is untranslated).
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("SAVE will save the game"), 17, 200, FONT_WHITE, 0, savesSurface);
/// Explanation of what the CANCEL button does (note: "CANCEL" is untranslated)
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("CANCEL will unselect that slot"), 17, 220, FONT_WHITE, 0, savesSurface);
/// Explanation of what the DELETE button does (note: "DELETE" is untranslated)
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("DELETE will remove the save"), 17, 240, FONT_WHITE, 0, savesSurface);
break;
case -1:
gfx_renderUnicode("First click a Save game slot to use", 17, 200,
FONT_WHITE, 0, savesSurface);
/// For when the player attempts to click "SAVE" or "DELETE" without selecting a slot.
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("First click a Save game slot to use"), 17, 200, FONT_WHITE, 0, savesSurface);
break;
case -10:
gfx_renderUnicode("Game Saved", 130, 200, FONT_WHITE, 0,
savesSurface);
/// For when the game is successfully saved.
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("Game Saved"), 130, 200, FONT_WHITE, 0, savesSurface);
break;
case -11:
gfx_renderUnicode("Save Deleted", 130, 200, FONT_WHITE, 0,
savesSurface);
/// For when the save slot is successfully deleted.
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("Save Deleted"), 130, 200, FONT_WHITE, 0, savesSurface);
break;
}

View File

@ -50,6 +50,11 @@ int screen_renderString(const char *in, int x, int y, int fontColor)
return gfx_renderString(in, x, y, fontColor, 0, screen);
}
int screen_renderUnicode(const char *in, int x, int y, int fontColor)
{
return gfx_renderUnicode(in, x, y, fontColor, 0, screen);
}
/*
Draws the background surface that has been loaded
*/

View File

@ -32,6 +32,7 @@ extern LinkedRect *screen_bufferTail;
void screen_blit(SDL_Surface *image, int x, int y);
void screen_blitText(int i, int x, int y);
int screen_renderString(const char *in, int x, int y, int fontColor);
int screen_renderUnicode(const char *in, int x, int y, int fontColor);
void screen_drawBackground();
void screen_addBuffer(int x, int y, int w, int h);
void screen_flushBuffer();

View File

@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libintl.h>
#include <stdio.h>
#include "SDL.h"
@ -239,12 +240,12 @@ static void drawShop()
switch (shopSelectedItem)
{
case -1:
case -2:
case -3:
case -4:
case -5:
case -6:
case SHOP_NOTHING:
case SHOP_ERROR_INSUFFICIENT_FUNDS:
case SHOP_ERROR_CANNOT_UPGRADE:
case SHOP_ERROR_AMMO_LIMIT:
case SHOP_ERROR_CANNOT_SELL:
case SHOP_ERROR_NOTHING_TO_SELL:
break;
case SHOP_PLASMA_MAX_OUTPUT:
case SHOP_PLASMA_MAX_DAMAGE:
@ -336,41 +337,53 @@ static void drawShop()
switch (shopSelectedItem)
{
case -1:
case SHOP_NOTHING:
break;
case -2:
gfx_renderUnicode("You don't have enough money", 20, 30, FONT_WHITE,
0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
case SHOP_ERROR_INSUFFICIENT_FUNDS:
/// For when the player attempts to buy something they can't afford.
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("You don't have enough money"), 20, 30, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
break;
case -3:
gfx_renderUnicode("Cannot upgrade ship", 5, 22, FONT_WHITE, 0,
gfx_shopSprites[SHOP_S_ITEM_INFO]);
gfx_renderUnicode("Hardware capacity has been reached", 20, 38,
FONT_CYAN, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
case SHOP_ERROR_CANNOT_UPGRADE:
/// For when the player attempts an upgrade beyond the maximum (line 1 of 2).
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("Cannot upgrade ship"), 5, 22, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
/// For when the player attempts an upgrade beyond the maximum (line 2 of 2).
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("Hardware capacity has been reached"), 20, 38, FONT_CYAN, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
break;
case -4:
gfx_renderUnicode("Ammunition limit reached", 20, 30, FONT_WHITE, 0,
gfx_shopSprites[SHOP_S_ITEM_INFO]);
case SHOP_ERROR_AMMO_LIMIT:
/// For when the player attempts to buy more ammo than the ship can hold.
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("Ammunition limit reached"), 20, 30, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
break;
case -5:
gfx_renderUnicode("You cannot sell that item", 20, 30, FONT_WHITE,
0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
case SHOP_ERROR_CANNOT_SELL:
/// For when the player attempts to sell an item they aren't allowed to sell.
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("You cannot sell that item"), 20, 30, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
break;
case -6:
gfx_renderUnicode("Nothing to sell", 20, 30, FONT_WHITE, 0,
gfx_shopSprites[SHOP_S_ITEM_INFO]);
case SHOP_ERROR_NOTHING_TO_SELL:
/// For when the player attempts to sell an item they don't have any of.
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("Nothing to sell"), 20, 30, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
break;
case -7:
gfx_renderUnicode("Rockets cannot be bought for Laser or Charger Cannon",
5, 30, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
case SHOP_ERROR_IS_NOT_ROCKETS:
/// For when the player attempts to buy rockets or rocket capacity
/// while secondary weapon is either laser or charge cannon.
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("Rockets cannot be bought for Laser or Charger Cannon"), 5, 30, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
break;
case -8:
gfx_renderUnicode("You already have that weapon", 20, 30,
FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
case SHOP_ERROR_ALREADY_OWNED:
/// For when the player attempts to buy a weapon they already have.
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("You already have that weapon"), 20, 30, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
break;
case -9:
gfx_renderUnicode("This weapon's ammo limit has been reached", 20,
30, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
case SHOP_ERROR_WEAPON_CAPACITY:
/// For when the player attempts to increase rocket capacity beyond
/// what is allowed for the weapon (used for homing missiles).
/// This must be short enough to fit on a single line.
gfx_renderUnicode(_("This weapon's ammo limit has been reached"), 20, 30, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
break;
default:
if (shopItems[shopSelectedItem].price != 0)
@ -384,7 +397,7 @@ static void drawShop()
sprintf(description, "%s (N/A)",
shopItems[shopSelectedItem].description);
}
gfx_renderString(shopItems[shopSelectedItem].name, 5, 22,
gfx_renderUnicode(shopItems[shopSelectedItem].name, 5, 22,
FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
gfx_renderUnicode(description, 20, 38, FONT_CYAN, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]);
break;
@ -396,21 +409,24 @@ void shop_init()
/* ----------- Temporary Items ----------- */
shopItems[SHOP_PLASMA_MAX_OUTPUT].price = 0; // Overwritten later
strcpy(shopItems[SHOP_PLASMA_MAX_OUTPUT].name, "Plasma channel splitter");
strcpy(shopItems[SHOP_PLASMA_MAX_OUTPUT].description,
"Improves poweredup plasma output");
strcpy(shopItems[SHOP_PLASMA_MAX_OUTPUT].name, "Plasma Channel Splitter");
/// Shop item description: Plasma Channel Splitter (PLASMA_MAX_OUTPUT)
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_PLASMA_MAX_OUTPUT].description, _("Improves poweredup plasma output"));
shopItems[SHOP_PLASMA_MAX_OUTPUT].image = SP_PLASMA_MAX_OUTPUT;
shopItems[SHOP_PLASMA_MAX_DAMAGE].price = 0; // Overwritten later
strcpy(shopItems[SHOP_PLASMA_MAX_DAMAGE].name, "Plasma capacity condensor");
strcpy(shopItems[SHOP_PLASMA_MAX_DAMAGE].description,
"Increases poweredup plasma damage");
strcpy(shopItems[SHOP_PLASMA_MAX_DAMAGE].name, "Plasma Capacity Condensor");
/// Shop item description: Plasma Capacity Condensor (PLASMA_MAX_DAMAGE)
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_PLASMA_MAX_DAMAGE].description, _("Increases poweredup plasma damage"));
shopItems[SHOP_PLASMA_MAX_DAMAGE].image = SP_PLASMA_MAX_POWER;
shopItems[SHOP_PLASMA_MAX_RATE].price = 0; // Overwritten later
strcpy(shopItems[SHOP_PLASMA_MAX_RATE].name, "Liquid nitrogen capsules");
strcpy(shopItems[SHOP_PLASMA_MAX_RATE].description,
"Increases plasma firing rate");
strcpy(shopItems[SHOP_PLASMA_MAX_RATE].name, "Liquid Nitrogen Capsules");
/// Shop item description: Liquid Nitrogen Capsules (PLASMA_MAX_RATE)
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_PLASMA_MAX_RATE].description, _("Increases plasma firing rate"));
shopItems[SHOP_PLASMA_MAX_RATE].image = SP_PLASMA_MAX_RATE;
if (game.difficulty == DIFFICULTY_ORIGINAL)
@ -418,8 +434,10 @@ void shop_init()
else
shopItems[SHOP_PLASMA_AMMO].price = 1;
strcpy(shopItems[SHOP_PLASMA_AMMO].name, "10 Plasma cells");
strcpy(shopItems[SHOP_PLASMA_AMMO].description, "Plasma ammunition");
strcpy(shopItems[SHOP_PLASMA_AMMO].name, "Plasma Cells");
/// Shop item description: Plasma Cells
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_PLASMA_AMMO].description, _("Plasma ammunition (10 cells each)"));
shopItems[SHOP_PLASMA_AMMO].image = SP_PLASMA_AMMO;
if (game.difficulty == DIFFICULTY_ORIGINAL)
@ -428,89 +446,108 @@ void shop_init()
shopItems[SHOP_ROCKET_AMMO].price = 1;
strcpy(shopItems[SHOP_ROCKET_AMMO].name, "Rocket Ammo");
strcpy(shopItems[SHOP_ROCKET_AMMO].description,
"High velocity dumb fire rocket");
/// Shop item description: Rocket Ammo
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_ROCKET_AMMO].description, _("High velocity dumb fire rocket"));
shopItems[SHOP_ROCKET_AMMO].image = SP_ROCKET_AMMO;
/* ----------- Permanent Items ----------- */
shopItems[SHOP_PLASMA_MIN_OUTPUT].price = 0; // Overwritten later
strcpy(shopItems[SHOP_PLASMA_MIN_OUTPUT].name, "Additional Plasma Cannon");
strcpy(shopItems[SHOP_PLASMA_MIN_OUTPUT].description,
"Adds an extra plasma cannon to the Firefly");
/// Shop item description: Additional Plasma Cannon (PLASMA_MIN_OUTPUT)
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_PLASMA_MIN_OUTPUT].description, _("Adds an extra plasma cannon to the Firefly"));
shopItems[SHOP_PLASMA_MIN_OUTPUT].image = SP_PLASMA_MIN_OUTPUT;
shopItems[SHOP_PLASMA_MIN_DAMAGE].price = 0; // Overwritten later
strcpy(shopItems[SHOP_PLASMA_MIN_DAMAGE].name, "Plasma Power Booster");
strcpy(shopItems[SHOP_PLASMA_MIN_DAMAGE].description,
"Increases power of plasma shots");
/// Shop item description: Plasma Power Booster (PLASMA_MIN_DAMAGE)
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_PLASMA_MIN_DAMAGE].description, _("Increases power of plasma shots"));
shopItems[SHOP_PLASMA_MIN_DAMAGE].image = SP_PLASMA_MIN_POWER;
shopItems[SHOP_PLASMA_MIN_RATE].price = 0; // Overwritten later
strcpy(shopItems[SHOP_PLASMA_MIN_RATE].name, "Plasma Cooling Booster");
strcpy(shopItems[SHOP_PLASMA_MIN_RATE].description,
"Permanently increases firing rate");
/// Shop item description: Plasma Cooling Booster (PLASMA_MIN_RATE)
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_PLASMA_MIN_RATE].description, _("Permanently increases firing rate"));
shopItems[SHOP_PLASMA_MIN_RATE].image = SP_PLASMA_MIN_RATE;
/* ----------- Ammo Items -------------- */
shopItems[SHOP_PLASMA_MAX_AMMO].price = 0; // Overwritten later
strcpy(shopItems[SHOP_PLASMA_MAX_AMMO].name, "Plasma compressor");
strcpy(shopItems[SHOP_PLASMA_MAX_AMMO].description,
"Increases plasma ammo capacity");
strcpy(shopItems[SHOP_PLASMA_MAX_AMMO].name, "Plasma Compressor");
/// Shop item description: Plasma Compressor (PLASMA_MAX_AMMO)
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_PLASMA_MAX_AMMO].description, _("Increases plasma ammo capacity"));
shopItems[SHOP_PLASMA_MAX_AMMO].image = SP_PLASMA_MAX_AMMO;
shopItems[SHOP_ROCKET_MAX_AMMO].price = 0; // Overwritten later
strcpy(shopItems[SHOP_ROCKET_MAX_AMMO].name, "Rocket Pod");
strcpy(shopItems[SHOP_ROCKET_MAX_AMMO].description,
"Allows for an additional 5 rockets to be carried");
/// Shop item description: Rocket Pod (ROCKET_MAX_AMMO)
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_ROCKET_MAX_AMMO].description, _("Allows for an additional 5 rockets to be carried"));
shopItems[SHOP_ROCKET_MAX_AMMO].image = SP_ROCKET_MAX_AMMO;
/* ---------- Weaponary --------------- */
shopItems[SHOP_DOUBLE_ROCKETS].price = 2000;
strcpy(shopItems[SHOP_DOUBLE_ROCKETS].name, "Dual Rocket Launcher");
strcpy(shopItems[SHOP_DOUBLE_ROCKETS].description,
"Allows for two rockets to be fired at once");
/// Shop item description: Dual Rocket Launcher
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_DOUBLE_ROCKETS].description, _("Launches two rockets at once"));
shopItems[SHOP_DOUBLE_ROCKETS].image = SP_DOUBLE_ROCKETS;
shopItems[SHOP_MICRO_ROCKETS].price = 2500;
strcpy(shopItems[SHOP_MICRO_ROCKETS].name, "Micro Rocket Launcher");
strcpy(shopItems[SHOP_MICRO_ROCKETS].description,
"Launches several less powerful rockets at once");
/// Shop item description: Micro Rocket Launcher
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_MICRO_ROCKETS].description, _("Launches several less powerful rockets at once"));
shopItems[SHOP_MICRO_ROCKETS].image = SP_MICRO_ROCKETS;
shopItems[SHOP_LASER].price = 5000;
strcpy(shopItems[SHOP_LASER].name, "Laser Cannon");
strcpy(shopItems[SHOP_LASER].description, "Laser Cannon");
/// Shop item description: Laser Cannon
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_LASER].description, _("Fires a continuous stream of energy particles"));
shopItems[SHOP_LASER].image = SP_LASER;
shopItems[SHOP_HOMING_MISSILE].price = 7500;
strcpy(shopItems[SHOP_HOMING_MISSILE].name, "Homing Missile Launcher");
sprintf(shopItems[SHOP_HOMING_MISSILE].description,
"Fires homing missile (max %i missiles)", MAX_HOMING);
/// Shop item description: Homing Missile Launcher
/// This must be short enough to fit on a single line.
/// %i must be retained. It is replaced by the maximum missile
/// capacity of the weapon.
sprintf(shopItems[SHOP_HOMING_MISSILE].description, "Fires homing missile (max %i missiles)", MAX_HOMING);
shopItems[SHOP_HOMING_MISSILE].image = SP_HOMING_MISSILE;
shopItems[SHOP_CHARGER].price = 10000;
strcpy(shopItems[SHOP_CHARGER].name, "Charge Cannon");
strcpy(shopItems[SHOP_CHARGER].description, "A charge up cannon");
/// Shop item description: Charge Cannon
/// This must be short enough to fit on a single line.
strcpy(shopItems[SHOP_CHARGER].description, _("Compacts plasma into clusters for greater damage"));
shopItems[SHOP_CHARGER].image = SP_CHARGER;
shopItems[SHOP_DOUBLE_HOMING_MISSILES].price = 10000;
strcpy(shopItems[SHOP_DOUBLE_HOMING_MISSILES].name,
"Dual Homing Missile Launcher");
sprintf(shopItems[SHOP_DOUBLE_HOMING_MISSILES].description,
"Fires two homing missiles (max %i missiles)", MAX_DOUBLE_HOMING);
strcpy(shopItems[SHOP_DOUBLE_HOMING_MISSILES].name, "Dual Homing Missile Launcher");
/// Shop item description: Dual Homing Missile Launcher
/// This must be short enough to fit on a single line.
/// %i must be retained. It is replaced by the maximum missile
/// capacity of the weapon.
sprintf(shopItems[SHOP_DOUBLE_HOMING_MISSILES].description, _("Fires two homing missiles (max %i missiles)"), MAX_DOUBLE_HOMING);
shopItems[SHOP_DOUBLE_HOMING_MISSILES].image = SP_DOUBLE_HOMING_MISSILES;
shopItems[SHOP_MICRO_HOMING_MISSILES].price = 15000;
strcpy(shopItems[SHOP_MICRO_HOMING_MISSILES].name,
"Homing Micro Missile Launcher");
sprintf(shopItems[SHOP_MICRO_HOMING_MISSILES].description,
"Fires several small homing missiles (max %i missiles)", MAX_MICRO_HOMING);
strcpy(shopItems[SHOP_MICRO_HOMING_MISSILES].name, "Micro Homing Missile Launcher");
/// Shop item description: Micro Homing Missile Launcher
/// This must be short enough to fit on a single line.
/// %i must be retained. It is replaced by the maximum missile
/// capacity of the weapon.
sprintf(shopItems[SHOP_MICRO_HOMING_MISSILES].description, _("Fires several small homing missiles (max %i missiles)"), MAX_MICRO_HOMING);
shopItems[SHOP_MICRO_HOMING_MISSILES].image = SP_MICRO_HOMING_MISSILES;
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
drawShop();
}
@ -553,7 +590,7 @@ static void buy(int i)
{
if ((game.cash < shopItems[i].price) && (!engine.cheatCash))
{
shopSelectedItem = -2;
shopSelectedItem = SHOP_ERROR_INSUFFICIENT_FUNDS;
drawShop();
return;
}
@ -563,7 +600,7 @@ static void buy(int i)
case SHOP_PLASMA_MAX_OUTPUT:
if (game.maxPlasmaOutput >= game.maxPlasmaOutputLimit)
{
shopSelectedItem = -3;
shopSelectedItem = SHOP_ERROR_CANNOT_UPGRADE;
return;
}
game.maxPlasmaOutput++;
@ -572,7 +609,7 @@ static void buy(int i)
case SHOP_PLASMA_MAX_DAMAGE:
if (game.maxPlasmaDamage >= game.maxPlasmaDamageLimit)
{
shopSelectedItem = -3;
shopSelectedItem = SHOP_ERROR_CANNOT_UPGRADE;
return;
}
game.maxPlasmaDamage++;
@ -581,7 +618,7 @@ static void buy(int i)
case SHOP_PLASMA_MAX_RATE:
if (game.maxPlasmaRate >= game.maxPlasmaRateLimit)
{
shopSelectedItem = -3;
shopSelectedItem = SHOP_ERROR_CANNOT_UPGRADE;
return;
}
game.maxPlasmaRate++;
@ -590,7 +627,7 @@ static void buy(int i)
case SHOP_PLASMA_AMMO:
if (player.ammo[0] >= game.maxPlasmaAmmo)
{
shopSelectedItem = -4;
shopSelectedItem = SHOP_ERROR_AMMO_LIMIT;
return;
}
LIMIT_ADD(player.ammo[0], 10, 0, game.maxPlasmaAmmo);
@ -600,30 +637,30 @@ static void buy(int i)
if ((player.weaponType[1] == W_CHARGER) ||
(player.weaponType[1] == W_LASER))
{
shopSelectedItem = -7;
shopSelectedItem = SHOP_ERROR_IS_NOT_ROCKETS;
return;
}
if (player.ammo[1] == game.maxRocketAmmo)
{
shopSelectedItem = -4;
shopSelectedItem = SHOP_ERROR_AMMO_LIMIT;
return;
}
if ((player.weaponType[1] == W_HOMING_MISSILE) &&
(player.ammo[1] >= MAX_HOMING))
{
shopSelectedItem = -9;
shopSelectedItem = SHOP_ERROR_WEAPON_CAPACITY;
return;
}
if ((player.weaponType[1] == W_DOUBLE_HOMING_MISSILES) &&
(player.ammo[1] >= MAX_DOUBLE_HOMING))
{
shopSelectedItem = -9;
shopSelectedItem = SHOP_ERROR_WEAPON_CAPACITY;
return;
}
if ((player.weaponType[1] == W_MICRO_HOMING_MISSILES) &&
(player.ammo[1] >= MAX_MICRO_HOMING))
{
shopSelectedItem = -9;
shopSelectedItem = SHOP_ERROR_WEAPON_CAPACITY;
return;
}
player.ammo[1]++;
@ -632,7 +669,7 @@ static void buy(int i)
case SHOP_PLASMA_MIN_OUTPUT:
if (game.minPlasmaOutput >= game.minPlasmaOutputLimit)
{
shopSelectedItem = -3;
shopSelectedItem = SHOP_ERROR_CANNOT_UPGRADE;
return;
}
game.minPlasmaOutput++;
@ -643,7 +680,7 @@ static void buy(int i)
case SHOP_PLASMA_MIN_DAMAGE:
if (game.minPlasmaDamage >= game.minPlasmaDamageLimit)
{
shopSelectedItem = -3;
shopSelectedItem = SHOP_ERROR_CANNOT_UPGRADE;
return;
}
game.minPlasmaDamage++;
@ -654,7 +691,7 @@ static void buy(int i)
case SHOP_PLASMA_MIN_RATE:
if (game.minPlasmaRate >= game.minPlasmaRateLimit)
{
shopSelectedItem = -3;
shopSelectedItem = SHOP_ERROR_CANNOT_UPGRADE;
return;
}
game.minPlasmaRate++;
@ -665,7 +702,7 @@ static void buy(int i)
case SHOP_PLASMA_MAX_AMMO:
if (game.maxPlasmaAmmo >= game.maxPlasmaAmmoLimit)
{
shopSelectedItem = -3;
shopSelectedItem = SHOP_ERROR_CANNOT_UPGRADE;
return;
}
if (game.difficulty == DIFFICULTY_ORIGINAL)
@ -678,30 +715,30 @@ static void buy(int i)
if ((player.weaponType[1] == W_CHARGER) ||
(player.weaponType[1] == W_LASER))
{
shopSelectedItem = -7;
shopSelectedItem = SHOP_ERROR_IS_NOT_ROCKETS;
return;
}
if ((player.weaponType[1] == W_HOMING_MISSILE) &&
(game.maxRocketAmmo >= MAX_HOMING))
{
shopSelectedItem = -9;
shopSelectedItem = SHOP_ERROR_WEAPON_CAPACITY;
return;
}
if ((player.weaponType[1] == W_DOUBLE_HOMING_MISSILES) &&
(game.maxRocketAmmo >= MAX_DOUBLE_HOMING))
{
shopSelectedItem = -9;
shopSelectedItem = SHOP_ERROR_WEAPON_CAPACITY;
return;
}
if ((player.weaponType[1] == W_MICRO_HOMING_MISSILES) &&
(game.maxRocketAmmo >= MAX_MICRO_HOMING))
{
shopSelectedItem = -9;
shopSelectedItem = SHOP_ERROR_WEAPON_CAPACITY;
return;
}
if (game.maxRocketAmmo >= game.maxRocketAmmoLimit)
{
shopSelectedItem = -3;
shopSelectedItem = SHOP_ERROR_WEAPON_CAPACITY;
return;
}
game.maxRocketAmmo += 5;
@ -710,31 +747,31 @@ static void buy(int i)
case SHOP_DOUBLE_ROCKETS:
if (player.weaponType[1] == W_DOUBLE_ROCKETS)
{
shopSelectedItem = -8;
shopSelectedItem = SHOP_ERROR_ALREADY_OWNED;
return;
}
shop_sellSecondaryWeapon();
player.weaponType[1] = W_DOUBLE_ROCKETS;
LIMIT(game.maxRocketAmmo, 5, 50);
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
case SHOP_MICRO_ROCKETS:
if (player.weaponType[1] == W_MICRO_ROCKETS)
{
shopSelectedItem = -8;
shopSelectedItem = SHOP_ERROR_ALREADY_OWNED;
return;
}
shop_sellSecondaryWeapon();
player.weaponType[1] = W_MICRO_ROCKETS;
LIMIT(game.maxRocketAmmo, 5, 50);
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
case SHOP_LASER:
if (player.weaponType[1] == W_LASER)
{
shopSelectedItem = -8;
shopSelectedItem = SHOP_ERROR_ALREADY_OWNED;
return;
}
shop_sellSecondaryWeapon();
@ -748,13 +785,13 @@ static void buy(int i)
while (player.ammo[1] > 0)
sell(SHOP_ROCKET_AMMO);
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
case SHOP_HOMING_MISSILE:
if (player.weaponType[1] == W_HOMING_MISSILE)
{
shopSelectedItem = -8;
shopSelectedItem = SHOP_ERROR_ALREADY_OWNED;
return;
}
shop_sellSecondaryWeapon();
@ -764,13 +801,13 @@ static void buy(int i)
sell(SHOP_ROCKET_MAX_AMMO);
LIMIT(game.maxRocketAmmo, 5, MAX_HOMING);
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
case SHOP_CHARGER:
if (player.weaponType[1] == W_CHARGER)
{
shopSelectedItem = -8;
shopSelectedItem = SHOP_ERROR_ALREADY_OWNED;
return;
}
shop_sellSecondaryWeapon();
@ -784,13 +821,13 @@ static void buy(int i)
while (player.ammo[1] > 0)
sell(SHOP_ROCKET_AMMO);
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
case SHOP_DOUBLE_HOMING_MISSILES:
if (player.weaponType[1] == W_DOUBLE_HOMING_MISSILES)
{
shopSelectedItem = -8;
shopSelectedItem = SHOP_ERROR_ALREADY_OWNED;
return;
}
shop_sellSecondaryWeapon();
@ -800,13 +837,13 @@ static void buy(int i)
sell(SHOP_ROCKET_MAX_AMMO);
LIMIT(game.maxRocketAmmo, 5, MAX_DOUBLE_HOMING);
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
case SHOP_MICRO_HOMING_MISSILES:
if (player.weaponType[1] == W_MICRO_HOMING_MISSILES)
{
shopSelectedItem = -8;
shopSelectedItem = SHOP_ERROR_ALREADY_OWNED;
return;
}
shop_sellSecondaryWeapon();
@ -816,7 +853,7 @@ static void buy(int i)
sell(SHOP_ROCKET_MAX_AMMO);
LIMIT(game.maxRocketAmmo, 5, MAX_MICRO_HOMING);
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
}
@ -832,7 +869,7 @@ static void sell(int i)
case SHOP_PLASMA_MAX_OUTPUT:
if (game.maxPlasmaOutput <= ((game.difficulty != DIFFICULTY_ORIGINAL) ? 1 : 2))
{
shopSelectedItem = -5;
shopSelectedItem = SHOP_ERROR_CANNOT_SELL;
return;
}
@ -849,7 +886,7 @@ static void sell(int i)
case SHOP_PLASMA_MAX_DAMAGE:
if (game.maxPlasmaDamage <= ((game.difficulty != DIFFICULTY_ORIGINAL) ? 1 : 2))
{
shopSelectedItem = -5;
shopSelectedItem = SHOP_ERROR_CANNOT_SELL;
return;
}
@ -866,7 +903,7 @@ static void sell(int i)
case SHOP_PLASMA_MAX_RATE:
if (game.maxPlasmaRate <= ((game.difficulty != DIFFICULTY_ORIGINAL) ? 1 : 2))
{
shopSelectedItem = -5;
shopSelectedItem = SHOP_ERROR_CANNOT_SELL;
return;
}
@ -883,7 +920,7 @@ static void sell(int i)
case SHOP_PLASMA_MIN_OUTPUT:
if (game.minPlasmaOutput <= 1)
{
shopSelectedItem = -5;
shopSelectedItem = SHOP_ERROR_CANNOT_SELL;
return;
}
game.minPlasmaOutput--;
@ -894,7 +931,7 @@ static void sell(int i)
case SHOP_PLASMA_MIN_DAMAGE:
if (game.minPlasmaDamage <= 1)
{
shopSelectedItem = -5;
shopSelectedItem = SHOP_ERROR_CANNOT_SELL;
return;
}
game.minPlasmaDamage--;
@ -905,7 +942,7 @@ static void sell(int i)
case SHOP_PLASMA_MIN_RATE:
if (game.minPlasmaRate <= 1)
{
shopSelectedItem = -5;
shopSelectedItem = SHOP_ERROR_CANNOT_SELL;
return;
}
game.minPlasmaRate--;
@ -916,7 +953,7 @@ static void sell(int i)
case SHOP_PLASMA_AMMO:
if (player.ammo[0] <= 0)
{
shopSelectedItem = -6;
shopSelectedItem = SHOP_ERROR_NOTHING_TO_SELL;
return;
}
if (player.ammo[0] > 10)
@ -933,7 +970,7 @@ static void sell(int i)
case SHOP_ROCKET_AMMO:
if (player.ammo[1] <= 0)
{
shopSelectedItem = -6;
shopSelectedItem = SHOP_ERROR_NOTHING_TO_SELL;
return;
}
player.ammo[1]--;
@ -942,7 +979,7 @@ static void sell(int i)
case SHOP_PLASMA_MAX_AMMO:
if (game.maxPlasmaAmmo <= 100)
{
shopSelectedItem = -1;
shopSelectedItem = SHOP_ERROR_CANNOT_SELL;
return;
}
if (game.difficulty == DIFFICULTY_ORIGINAL)
@ -958,7 +995,7 @@ static void sell(int i)
case SHOP_ROCKET_MAX_AMMO:
if (game.maxRocketAmmo <= 5)
{
shopSelectedItem = -1;
shopSelectedItem = SHOP_ERROR_CANNOT_SELL;
return;
}
game.maxRocketAmmo -= 5;
@ -971,73 +1008,73 @@ static void sell(int i)
case SHOP_DOUBLE_ROCKETS:
if (player.weaponType[1] != W_DOUBLE_ROCKETS)
{
shopSelectedItem = -1;
shopSelectedItem = SHOP_ERROR_NOTHING_TO_SELL;
return;
}
player.weaponType[1] = (game.difficulty == DIFFICULTY_ORIGINAL ? W_NONE : W_ROCKETS);
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
case SHOP_MICRO_ROCKETS:
if (player.weaponType[1] != W_MICRO_ROCKETS)
{
shopSelectedItem = -1;
shopSelectedItem = SHOP_ERROR_NOTHING_TO_SELL;
return;
}
player.weaponType[1] = (game.difficulty == DIFFICULTY_ORIGINAL ? W_NONE : W_ROCKETS);
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
case SHOP_LASER:
if (player.weaponType[1] != W_LASER)
{
shopSelectedItem = -1;
shopSelectedItem = SHOP_ERROR_NOTHING_TO_SELL;
return;
}
player.weaponType[1] = (game.difficulty == DIFFICULTY_ORIGINAL ? W_NONE : W_ROCKETS);
player.ammo[1] = 0;
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
case SHOP_HOMING_MISSILE:
if (player.weaponType[1] != W_HOMING_MISSILE)
{
shopSelectedItem = -1;
shopSelectedItem = SHOP_ERROR_NOTHING_TO_SELL;
return;
}
player.weaponType[1] = (game.difficulty == DIFFICULTY_ORIGINAL ? W_NONE : W_ROCKETS);
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
case SHOP_CHARGER:
if (player.weaponType[1] != W_CHARGER)
{
shopSelectedItem = -1;
shopSelectedItem = SHOP_ERROR_NOTHING_TO_SELL;
return;
}
player.weaponType[1] = (game.difficulty == DIFFICULTY_ORIGINAL ? W_NONE : W_ROCKETS);
player.ammo[1] = 0;
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
case SHOP_DOUBLE_HOMING_MISSILES:
if (player.weaponType[1] != W_DOUBLE_HOMING_MISSILES)
{
shopSelectedItem = -1;
shopSelectedItem = SHOP_ERROR_NOTHING_TO_SELL;
return;
}
player.weaponType[1] = (game.difficulty == DIFFICULTY_ORIGINAL ? W_NONE : W_ROCKETS);
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
case SHOP_MICRO_HOMING_MISSILES:
if (player.weaponType[1] != W_MICRO_HOMING_MISSILES)
{
shopSelectedItem = -1;
shopSelectedItem = SHOP_ERROR_NOTHING_TO_SELL;
return;
}
player.weaponType[1] = (game.difficulty == DIFFICULTY_ORIGINAL ? W_NONE : W_ROCKETS);
shopSelectedItem = -1;
shopSelectedItem = SHOP_NOTHING;
break;
}
@ -1068,7 +1105,7 @@ void shop_show()
screen_blit(gfx_shopSprites[SHOP_S_POWERUP], SHOP_X + 203, SHOP_Y + 245);
screen_blit(gfx_shopSprites[SHOP_S_SECONDARY], SHOP_X + 406, SHOP_Y + 245);
if (shopSelectedItem > -1)
if (shopSelectedItem > SHOP_NOTHING)
{
screen_blit(gfx_sprites[SP_BUY], buy_x, buy_y);
screen_blit(gfx_sprites[SP_SELL], sell_x, sell_y);
@ -1096,7 +1133,7 @@ void shop_show()
}
}
if (shopSelectedItem > -1)
if (shopSelectedItem > SHOP_NOTHING)
{
if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, buy_x, buy_y, 24, 16))
{

View File

@ -41,24 +41,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
static int showGameMenu(int continueSaveSlot)
{
screen_blitText(TS_START_NEW_GAME, -1, screen->h / 3 + 50);
screen_blitText(TS_LOAD_GAME, -1, screen->h / 3 + 70);
screen_blitText(TS_START_NEW_GAME, -1, MENU_Y);
screen_blitText(TS_LOAD_GAME, -1, MENU_Y + MENU_SPACING);
if (continueSaveSlot != -1)
{
screen_blitText(TS_CONTINUE_CURRENT_GAME, -1, screen->h / 3 + 90);
screen_blitText(TS_CONTINUE_CURRENT_GAME, -1, MENU_Y + 2 * MENU_SPACING);
}
screen_blitText(TS_OPTIONS, -1, screen->h / 3 + 110);
screen_blitText(TS_CREDITS, -1, screen->h / 3 + 130);
screen_blitText(TS_OPTIONS, -1, MENU_Y + 3 * MENU_SPACING);
screen_blitText(TS_CREDITS, -1, MENU_Y + 4 * MENU_SPACING);
if (engine.cheat)
{
gfx_textSprites[TS_QUIT].y = 20;
screen_blitText(TS_CHEAT_OPTIONS, -1, screen->h / 3 + 150);
gfx_textSprites[TS_QUIT].y = MENU_SPACING;
screen_blitText(TS_CHEAT_OPTIONS, -1, MENU_Y + 5 * MENU_SPACING);
}
else
{
gfx_textSprites[TS_QUIT].y = 0;
}
screen_blitText(TS_QUIT, -1, screen->h / 3 + 150);
screen_blitText(TS_QUIT, -1, MENU_Y + 5 * MENU_SPACING);
if (engine.cheat)
return 7;
@ -75,11 +75,11 @@ static int showLoadMenu()
rtn++;
if (gfx_textSprites[i].image != NULL)
{
screen_blitText(i, -1, screen->h / 3 + 50);
gfx_textSprites[TS_BACK_TO_MAIN_MENU].y = gfx_textSprites[i].y + 40;
screen_blitText(i, -1, MENU_Y);
gfx_textSprites[TS_BACK_TO_MAIN_MENU].y = gfx_textSprites[i].y + 2 * MENU_SPACING;
}
}
screen_blitText(TS_BACK_TO_MAIN_MENU, -1, screen->h / 3 + 50);
screen_blitText(TS_BACK_TO_MAIN_MENU, -1, MENU_Y);
return rtn;
}
@ -102,10 +102,10 @@ static void createDifficultyMenu()
static int showDifficultyMenu()
{
screen_blitText(TS_START_GAME, -1, screen->h / 3 + 50);
screen_blitText(TS_DIFFICULTY, -1, screen->h / 3 + 70);
screen_blitText(TS_START_GAME, -1, MENU_Y);
screen_blitText(TS_DIFFICULTY, -1, MENU_Y + MENU_SPACING);
gfx_textSprites[TS_BACK_TO_MAIN_MENU].y = 0;
screen_blitText(TS_BACK_TO_MAIN_MENU, -1, screen->h / 3 + 110);
screen_blitText(TS_BACK_TO_MAIN_MENU, -1, MENU_Y + 3 * MENU_SPACING);
return 3;
}
@ -135,12 +135,12 @@ static void createOptionsMenu()
static int showOptionsMenu()
{
screen_blitText(TS_SOUND, -1, screen->h / 3 + 50);
screen_blitText(TS_MUSIC, -1, screen->h / 3 + 70);
screen_blitText(TS_FULLSCREEN, -1, screen->h / 3 + 90);
screen_blitText(TS_AUTOPAUSE, -1, screen->h / 3 + 110);
screen_blitText(TS_SOUND, -1, MENU_Y);
screen_blitText(TS_MUSIC, -1, MENU_Y + MENU_SPACING);
screen_blitText(TS_FULLSCREEN, -1, MENU_Y + 2 * MENU_SPACING);
screen_blitText(TS_AUTOPAUSE, -1, MENU_Y + 3 * MENU_SPACING);
gfx_textSprites[TS_BACK_TO_MAIN_MENU].y = 0;
screen_blitText(TS_BACK_TO_MAIN_MENU, -1, screen->h / 3 + 150);
screen_blitText(TS_BACK_TO_MAIN_MENU, -1, MENU_Y + 5 * MENU_SPACING);
return 5;
}
@ -170,12 +170,12 @@ static void createCheatMenu()
static int showCheatMenu()
{
screen_blitText(TS_UNLIMITED_SHIELD, -1, screen->h / 3 + 50);
screen_blitText(TS_UNLIMITED_AMMO, -1, screen->h / 3 + 70);
screen_blitText(TS_UNLIMITED_CASH, -1, screen->h / 3 + 90);
screen_blitText(TS_UNLIMITED_TIME, -1, screen->h / 3 + 110);
screen_blitText(TS_UNLIMITED_SHIELD, -1, MENU_Y);
screen_blitText(TS_UNLIMITED_AMMO, -1, MENU_Y + MENU_SPACING);
screen_blitText(TS_UNLIMITED_CASH, -1, MENU_Y + 2 * MENU_SPACING);
screen_blitText(TS_UNLIMITED_TIME, -1, MENU_Y + 3 * MENU_SPACING);
gfx_textSprites[TS_BACK_TO_MAIN_MENU].y = 0;
screen_blitText(TS_BACK_TO_MAIN_MENU, -1, screen->h / 3 + 150);
screen_blitText(TS_BACK_TO_MAIN_MENU, -1, MENU_Y + 5 * MENU_SPACING);
return 5;
}
@ -247,16 +247,16 @@ int title_show()
createCheatMenu();
copyrightText = gfx_createSurface(screen->w, 60);
copyrightText = gfx_createSurface(screen->w, 3 * MENU_SPACING);
gfx_renderString("Copyright Parallel Realities 2003",
5, 0, FONT_WHITE, 0, copyrightText);
gfx_renderString("Copyright Guus Sliepen, Astrid S. de Wijn and others 2012",
5, 20, FONT_WHITE, 0, copyrightText);
5, MENU_SPACING, FONT_WHITE, 0, copyrightText);
gfx_renderString("Copyright 2015-2019 Julie Marchant",
5, 40, FONT_WHITE, 0, copyrightText);
5, 2 * MENU_SPACING, FONT_WHITE, 0, copyrightText);
sprintf(buildVersion, "Version %s", VERSION );
infoText = gfx_createSurface(strlen(buildVersion) * 9 + 6, 20);
infoText = gfx_createSurface(strlen(buildVersion) * (PIXFONT_W + 1) + 6, MENU_SPACING);
gfx_renderString(buildVersion, 0, 0, FONT_WHITE, 0, infoText);
// Set the star motion
@ -283,8 +283,8 @@ int title_show()
SDL_Rect optionRec;
optionRec.x = screen->w / 2 - 110;
optionRec.y = screen->h / 3 + 45;
optionRec.h = 22;
optionRec.y = MENU_Y - 5;
optionRec.h = MENU_SPACING + 2;
optionRec.w = 215;
if (continueSaveSlot != -1)
@ -343,13 +343,13 @@ int title_show()
if ((now - then >= 27500) || (skip))
{
optionRec.x = screen->w / 2 - 110;
optionRec.y = screen->h / 3 + 26 + (20 * selectedOption);
optionRec.y = (MENU_Y - 4 - MENU_SPACING) + MENU_SPACING * selectedOption;
if (menuType > MENU_MAIN)
if (selectedOption == listLength)
optionRec.y += 20;
optionRec.y += MENU_SPACING;
screen_drawRect(optionRec.x, optionRec.y, optionRec.w, optionRec.h, redGlow, 0x00, 0x00);
screen_addBuffer(optionRec.x, optionRec.y, optionRec.w, optionRec.h);
screen_addBuffer(optionRec.x, optionRec.y, optionRec.w + 1, optionRec.h + 1);
switch(menuType)
{
@ -370,6 +370,8 @@ int title_show()
break;
}
screen_addBuffer(optionRec.x - 1, MENU_Y, optionRec.w + 2, listLength * MENU_SPACING);
redGlow += redDir;
if (redGlow <= 0) {redDir = 2; redGlow = 0;}
if (redGlow >= 255) {redDir = -2; redGlow = 255;}