2011-08-24 14:14:44 +02:00
|
|
|
/*
|
|
|
|
Copyright (C) 2003 Parallel Realities
|
2015-03-01 21:37:32 +01:00
|
|
|
Copyright (C) 2011, 2012, 2013 Guus Sliepen
|
2016-01-02 22:59:48 +01:00
|
|
|
Copyright (C) 2012, 2015 onpon4 <onpon4@riseup.net>
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
2015-02-26 17:20:36 +01:00
|
|
|
as published by the Free Software Foundation; either version 3
|
2011-08-24 14:14:44 +02:00
|
|
|
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
|
2015-02-26 17:20:36 +01:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2015-02-26 17:20:36 +01:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2011-08-24 14:14:44 +02:00
|
|
|
*/
|
|
|
|
|
2011-08-26 21:29:04 +02:00
|
|
|
#include "Starfighter.h"
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2011-08-26 21:29:04 +02:00
|
|
|
Planet systemPlanet[10];
|
|
|
|
mission currentMission;
|
2015-03-29 19:11:12 +02:00
|
|
|
static mission missions[MISN_MAX];
|
2011-08-26 21:29:04 +02:00
|
|
|
|
2011-08-24 14:14:44 +02:00
|
|
|
void initPlanetMissions(signed char system)
|
|
|
|
{
|
|
|
|
for (int i = 0 ; i < 10 ; i++)
|
|
|
|
{
|
|
|
|
systemPlanet[i].missionNumber = -1; // no mission for this planet
|
|
|
|
systemPlanet[i].missionCompleted = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch(system)
|
|
|
|
{
|
|
|
|
// Spirit
|
|
|
|
case 0:
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[0].missionNumber = MISN_HAIL;
|
|
|
|
systemPlanet[0].missionCompleted = 0;
|
|
|
|
|
|
|
|
systemPlanet[1].missionNumber = MISN_CERADSE;
|
|
|
|
systemPlanet[1].missionCompleted = 0;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[2].missionNumber = MISN_HINSTAG;
|
|
|
|
systemPlanet[2].missionCompleted = 0;
|
|
|
|
|
|
|
|
systemPlanet[3].missionNumber = MISN_JOLDAR;
|
|
|
|
systemPlanet[3].missionCompleted = 0;
|
|
|
|
|
|
|
|
systemPlanet[4].missionNumber = MISN_MOEBO;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[4].missionCompleted = -1;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
// Eyananth
|
|
|
|
case 1:
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[0].missionNumber = MISN_NEROD;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[0].missionCompleted = 0;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[1].missionNumber = MISN_ALLEZ;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[1].missionCompleted = 0;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[2].missionNumber = MISN_URUSOR;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[2].missionCompleted = -1;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[3].missionNumber = MISN_DORIM;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[3].missionCompleted = -1;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[4].missionNumber = MISN_ELAMALE;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[4].missionCompleted = -2;
|
|
|
|
|
|
|
|
// This one is for the slaves
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[9].missionNumber = MISN_RESCUESLAVES;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[9].missionCompleted = 0;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
// Mordor
|
|
|
|
case 2:
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[0].missionNumber = MISN_ODEON;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[0].missionCompleted = 0;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[1].missionNumber = MISN_FELLON;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[1].missionCompleted = 0;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[2].missionNumber = MISN_SIVEDI;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[2].missionCompleted = -1;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[3].missionNumber = MISN_ALMARTHA;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[3].missionCompleted = -1;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[4].missionNumber = MISN_POSWIC;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[4].missionCompleted = -2;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[5].missionNumber = MISN_ELLESH;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[5].missionCompleted = -3;
|
|
|
|
|
|
|
|
// This one is for the experimental fighter
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[9].missionNumber = MISN_CLOAKFIGHTER;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[9].missionCompleted = 0;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
// Sol
|
|
|
|
case 3:
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[8].missionNumber = MISN_PLUTO;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[8].missionCompleted = 0;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[7].missionNumber = MISN_NEPTUNE;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[7].missionCompleted = 0;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[6].missionNumber = MISN_URANUS;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[6].missionCompleted = 0;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[5].missionNumber = MISN_SATURN;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[5].missionCompleted = -1;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[4].missionNumber = MISN_JUPITER;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[4].missionCompleted = -2;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[3].missionNumber = MISN_MARS;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[3].missionCompleted = -3;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[2].missionNumber = MISN_EARTH;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[2].missionCompleted = -4;
|
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
systemPlanet[1].missionNumber = MISN_VENUS;
|
2011-08-24 14:14:44 +02:00
|
|
|
systemPlanet[1].missionCompleted = -5;
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void checkForBossMission()
|
|
|
|
{
|
|
|
|
for (int i = 0 ; i < 10 ; i++)
|
|
|
|
{
|
|
|
|
if ((systemPlanet[i].missionCompleted == 0) && (systemPlanet[i].missionNumber != -1))
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0 ; i < 10 ; i++)
|
|
|
|
{
|
|
|
|
if (systemPlanet[i].missionCompleted < 0)
|
|
|
|
systemPlanet[i].missionCompleted++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void updateSystemStatus()
|
|
|
|
{
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.area == MISN_START)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2015-05-21 01:41:43 +02:00
|
|
|
game.stationedPlanet = 0;
|
|
|
|
game.area = 1;
|
|
|
|
strcpy(game.stationedName, "Hail");
|
|
|
|
initPlanetMissions(game.system);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
2015-05-21 01:41:43 +02:00
|
|
|
else if (game.area == MISN_MOEBO)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2015-05-21 01:41:43 +02:00
|
|
|
game.stationedPlanet = 0;
|
|
|
|
game.system = 1;
|
|
|
|
game.area = MISN_RESCUESLAVES;
|
|
|
|
strcpy(game.stationedName, "Nerod");
|
|
|
|
initPlanetMissions(game.system);
|
2015-03-28 14:51:49 +01:00
|
|
|
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.difficulty == DIFFICULTY_ORIGINAL)
|
2015-03-28 14:51:49 +01:00
|
|
|
player.maxShield = 50;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
2015-05-21 01:41:43 +02:00
|
|
|
else if (game.area == MISN_ELAMALE)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2015-05-21 01:41:43 +02:00
|
|
|
game.stationedPlanet = 0;
|
|
|
|
game.system = 2;
|
|
|
|
game.area = MISN_CLOAKFIGHTER;
|
|
|
|
strcpy(game.stationedName, "Odeon");
|
|
|
|
initPlanetMissions(game.system);
|
2015-03-28 14:51:49 +01:00
|
|
|
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.difficulty == DIFFICULTY_ORIGINAL)
|
2015-03-28 14:51:49 +01:00
|
|
|
player.maxShield = 75;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
2015-05-21 01:41:43 +02:00
|
|
|
else if (game.area == MISN_ELLESH)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2015-05-21 01:41:43 +02:00
|
|
|
game.stationedPlanet = 8;
|
|
|
|
game.system = 3;
|
|
|
|
game.area = MISN_PLUTO;
|
|
|
|
strcpy(game.stationedName, "Pluto");
|
|
|
|
initPlanetMissions(game.system);
|
2015-03-28 14:51:49 +01:00
|
|
|
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.difficulty == DIFFICULTY_ORIGINAL)
|
2015-03-28 14:51:49 +01:00
|
|
|
player.maxShield = 100;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
else // Update the mission for the planet
|
|
|
|
{
|
2015-05-21 01:41:43 +02:00
|
|
|
systemPlanet[game.stationedPlanet].missionCompleted = 1;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
|
2015-05-21 01:41:43 +02:00
|
|
|
strcpy(game.destinationName, "None");
|
|
|
|
game.destinationPlanet = game.stationedPlanet;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
Mission Completed Variables:
|
|
|
|
|
|
|
|
0 : Not Completed
|
|
|
|
1 : Completed
|
|
|
|
2 : Just Completed
|
|
|
|
3 : Constraint
|
|
|
|
-1 : Mission Failed
|
|
|
|
-2 : Just Failed
|
|
|
|
|
|
|
|
Timer Variable:
|
|
|
|
1+ : Time in minutes
|
|
|
|
-1 : Time up
|
|
|
|
-2 : No timer
|
|
|
|
*/
|
2011-08-26 21:29:04 +02:00
|
|
|
static void clearAllMissions()
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2015-03-29 19:11:12 +02:00
|
|
|
for (int m = 0 ; m < MISN_MAX ; m++)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
strcpy(missions[m].primaryObjective[i], "");
|
|
|
|
missions[m].primaryType[i] = NONE;
|
|
|
|
missions[m].target1[i] = -1;
|
|
|
|
missions[m].targetValue1[i] = -1;
|
|
|
|
missions[m].timeLimit1[i] = -2;
|
|
|
|
missions[m].completed1[i] = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
strcpy(missions[m].secondaryObjective[i], "");
|
|
|
|
missions[m].secondaryType[i] = NONE;
|
|
|
|
missions[m].target2[i] = -1;
|
|
|
|
missions[m].targetValue2[i] = -1;
|
|
|
|
missions[m].timeLimit2[i] = -2;
|
|
|
|
missions[m].completed2[i] = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
missions[m].addAliens = -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
Sets the currentMission object to the mission number the player
|
|
|
|
is currently on. Timing is assigned if it is required. The rate
|
|
|
|
at which to add enemies in this mission is also set.
|
|
|
|
*/
|
|
|
|
void setMission(int mission)
|
|
|
|
{
|
|
|
|
currentMission = missions[mission];
|
|
|
|
engine.minutes = currentMission.timeLimit1[0];
|
|
|
|
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if (currentMission.timeLimit1[i] > engine.minutes)
|
|
|
|
engine.minutes = currentMission.timeLimit1[i];
|
|
|
|
if (currentMission.timeLimit2[i] > engine.minutes)
|
|
|
|
engine.minutes = currentMission.timeLimit2[i];
|
|
|
|
|
|
|
|
if (currentMission.completed1[i] == 0)
|
|
|
|
currentMission.remainingObjectives1++;
|
|
|
|
if (currentMission.completed2[i] == 0)
|
|
|
|
currentMission.remainingObjectives1++;
|
|
|
|
}
|
|
|
|
|
|
|
|
engine.addAliens = currentMission.addAliens;
|
|
|
|
|
|
|
|
if (engine.minutes > -1)
|
|
|
|
{
|
|
|
|
engine.timeMission = 1;
|
|
|
|
engine.seconds = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
engine.counter2 = 0;
|
|
|
|
engine.timeTaken = 0;
|
|
|
|
}
|
|
|
|
|
2015-03-07 05:18:31 +01:00
|
|
|
/*
|
|
|
|
Call this whenever a mission requires all the remaining aliens to
|
|
|
|
automatically die
|
|
|
|
*/
|
|
|
|
static void mission_killAllEnemies()
|
|
|
|
{
|
2015-03-09 01:59:33 +01:00
|
|
|
for (int i = 0 ; i < ALIEN_MAX ; i++)
|
2015-03-07 05:18:31 +01:00
|
|
|
{
|
2015-03-09 01:59:33 +01:00
|
|
|
if ((aliens[i].flags & FL_WEAPCO) && (aliens[i].active) &&
|
|
|
|
(aliens[i].shield > 0))
|
2015-03-07 15:42:24 +01:00
|
|
|
aliens[i].shield = 0;
|
2015-03-07 05:18:31 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-08-24 14:14:44 +02:00
|
|
|
void checkTimer()
|
|
|
|
{
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if ((currentMission.timeLimit1[i] == -1) && (currentMission.completed1[i] == OB_INCOMPLETE))
|
|
|
|
currentMission.completed1[i] = -2;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if ((currentMission.timeLimit2[i] == -1) && (currentMission.completed2[i] == OB_INCOMPLETE))
|
|
|
|
currentMission.completed2[i] = -2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Find out if there are any uncompleted missions that require the timer
|
|
|
|
engine.timeMission = 0;
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if ((currentMission.timeLimit1[i] > -1) && (currentMission.completed1[i] == OB_INCOMPLETE))
|
|
|
|
engine.timeMission = 1;
|
|
|
|
if ((currentMission.timeLimit2[i] > -1) && (currentMission.completed2[i] == OB_INCOMPLETE))
|
|
|
|
engine.timeMission = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// specific to Spirit Boss
|
2015-05-21 01:41:43 +02:00
|
|
|
if ((game.area == MISN_MOEBO) &&
|
2015-03-29 19:11:12 +02:00
|
|
|
(currentMission.completed1[0] < OB_INCOMPLETE))
|
2011-08-24 14:14:44 +02:00
|
|
|
engine.timeMission = 1;
|
|
|
|
|
|
|
|
// specific to the Asteroid belt
|
2015-05-21 01:41:43 +02:00
|
|
|
if ((game.area == MISN_MARS) &&
|
2015-03-29 19:11:12 +02:00
|
|
|
(currentMission.completed1[0] < OB_INCOMPLETE))
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
currentMission.completed1[0] = OB_COMPLETED;
|
2015-03-05 16:47:30 +01:00
|
|
|
mission_killAllEnemies();
|
2011-08-24 14:14:44 +02:00
|
|
|
engine.addAliens = -1;
|
|
|
|
setInfoLine("*** All Primary Objectives Completed ***", FONT_GREEN);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-08-26 21:29:04 +02:00
|
|
|
static void evaluateRequirement(int type, int id, int *completed, int *targetValue, int fontColor)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
char message[25];
|
|
|
|
|
2015-03-17 18:03:20 +01:00
|
|
|
if ((*targetValue <= 0) && (type != M_PROTECT_TARGET) &&
|
|
|
|
(type != M_PROTECT_PICKUP))
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
*completed = 2;
|
|
|
|
checkTimer();
|
2015-05-21 01:41:43 +02:00
|
|
|
if ((game.area == MISN_URUSOR) && (type == M_DISABLE_TARGET))
|
2016-01-04 15:07:30 +01:00
|
|
|
setRadioMessage(FS_SID, "All vessels disabled!", 1);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
strcpy(message, "");
|
|
|
|
switch(type)
|
|
|
|
{
|
|
|
|
case M_COLLECT:
|
|
|
|
switch(id)
|
|
|
|
{
|
|
|
|
case P_CASH:
|
|
|
|
sprintf(message, "Collect $%d more...", *targetValue);
|
|
|
|
if ((rand() % 2) == 0)
|
|
|
|
sprintf(message, "$%d more to go...", *targetValue);
|
|
|
|
break;
|
|
|
|
case P_CARGO:
|
|
|
|
sprintf(message, "Collect %d more...", *targetValue);
|
|
|
|
if ((rand() % 2) == 0)
|
|
|
|
sprintf(message, "%d more to go...", *targetValue);
|
|
|
|
break;
|
|
|
|
case P_ORE:
|
|
|
|
sprintf(message, "Collect %d more...", *targetValue);
|
|
|
|
if ((rand() % 2) == 0)
|
|
|
|
sprintf(message, "%d more to go...", *targetValue);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case M_PROTECT_PICKUP:
|
|
|
|
*completed = -2;
|
|
|
|
switch(id)
|
|
|
|
{
|
|
|
|
case P_CARGO:
|
2011-08-27 21:21:43 +02:00
|
|
|
sprintf(message, "Cargo pod destroyed!");
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.area == MISN_CERADSE) // Get lectured by Sid
|
2016-01-04 15:07:30 +01:00
|
|
|
setRadioMessage(FS_SID, "Chris, we needed that pod!! I warned you that we couldn't afford to lose a single one!!", 1);
|
2011-08-24 14:14:44 +02:00
|
|
|
break;
|
|
|
|
case P_ESCAPEPOD:
|
|
|
|
sprintf(message, "Escape Pod lost!");
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.area == MISN_ODEON) // Get lectured by Phoebe
|
2016-01-04 15:07:30 +01:00
|
|
|
setRadioMessage(FS_PHOEBE, "No... Ursula...", 1);
|
2011-08-24 14:14:44 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case M_PROTECT_TARGET:
|
|
|
|
if (*targetValue <= 0)
|
|
|
|
{
|
|
|
|
*completed = -2;
|
2015-05-21 01:41:43 +02:00
|
|
|
switch (game.area)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2015-03-29 19:11:12 +02:00
|
|
|
case MISN_NEROD:
|
2016-01-04 15:07:30 +01:00
|
|
|
setRadioMessage(FS_SID, "Dammit, Chris! We just lost her!", 1);
|
2011-08-24 14:14:44 +02:00
|
|
|
break;
|
2015-03-29 19:11:12 +02:00
|
|
|
case MISN_ALLEZ:
|
2016-01-04 15:07:30 +01:00
|
|
|
setRadioMessage(FS_CREW, "Noooo!! Hull bre...", 1);
|
2011-08-24 14:14:44 +02:00
|
|
|
break;
|
2015-03-29 19:11:12 +02:00
|
|
|
case MISN_URUSOR:
|
2016-01-04 15:07:30 +01:00
|
|
|
setRadioMessage(FS_SID, "Chris, we've got to disable them, not destroy them!!", 1);
|
2011-08-24 14:14:44 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case M_DESTROY_TARGET_TYPE:
|
|
|
|
if ((*targetValue <= 10) || (*targetValue % 10 == 0))
|
|
|
|
{
|
|
|
|
if ((rand() % 2) == 0)
|
|
|
|
sprintf(message, "%d more to go...", *targetValue);
|
2012-03-11 15:16:19 +01:00
|
|
|
else
|
|
|
|
sprintf(message, "Destroy %d more...", *targetValue);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case M_DISABLE_TARGET:
|
|
|
|
sprintf(message, "Disable %d more...", *targetValue);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strcmp(message, "") != 0)
|
|
|
|
setInfoLine(message, fontColor);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void updateMissionRequirements(int type, int id, int value)
|
|
|
|
{
|
|
|
|
// Can't complete missions if you're dead!
|
2015-02-28 16:03:27 +01:00
|
|
|
if (player.shield <= 0)
|
2011-08-24 14:14:44 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
char message[25];
|
|
|
|
char matched = 0;
|
|
|
|
|
|
|
|
// We don't need to worry here since if Sid dies,
|
|
|
|
// you will automatically fail the mission(!)
|
|
|
|
if ((type == M_DESTROY_TARGET_TYPE) && (id == CD_SID))
|
|
|
|
{
|
|
|
|
setInfoLine("Sid has been killed!!", FONT_RED);
|
2016-01-04 15:07:30 +01:00
|
|
|
setRadioMessage(FS_CHRIS, "Sid... I... I'm sorry...", 1);
|
2011-08-24 14:14:44 +02:00
|
|
|
currentMission.completed1[0] = -2;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if ((currentMission.completed1[i] == OB_INCOMPLETE) || (currentMission.completed1[i] == OB_CONDITION))
|
|
|
|
{
|
2015-03-07 15:42:24 +01:00
|
|
|
if ((currentMission.primaryType[i] == type) &&
|
|
|
|
((currentMission.target1[i] == id) ||
|
|
|
|
(currentMission.target1[i] == CD_ANY)))
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
matched = 1;
|
|
|
|
currentMission.targetValue1[i] -= value;
|
2011-08-26 21:29:04 +02:00
|
|
|
evaluateRequirement(type, id, ¤tMission.completed1[i], ¤tMission.targetValue1[i], FONT_CYAN);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Don't evaluate secondary objectives at the same time!
|
|
|
|
if (matched)
|
|
|
|
return;
|
|
|
|
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if ((currentMission.completed2[i] == OB_INCOMPLETE) || (currentMission.completed2[i] == OB_CONDITION))
|
|
|
|
{
|
2015-03-07 15:42:24 +01:00
|
|
|
if ((currentMission.secondaryType[i] == type) &&
|
|
|
|
((currentMission.target2[i] == id) ||
|
|
|
|
(currentMission.target2[i] == CD_ANY)))
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
currentMission.targetValue2[i] -= value;
|
2011-08-26 21:29:04 +02:00
|
|
|
evaluateRequirement(type, id, ¤tMission.completed2[i], ¤tMission.targetValue2[i], FONT_YELLOW);
|
2011-08-24 14:14:44 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Special Case - Interceptions
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.area == MISN_INTERCEPTION)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
if ((type == M_COLLECT) && (id == P_SLAVES))
|
|
|
|
{
|
|
|
|
if (systemPlanet[9].missionCompleted == 0)
|
|
|
|
{
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.slavesRescued >= 250)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
setInfoLine("*** Slaves Rescued - Mission Completed ***", FONT_GREEN);
|
|
|
|
systemPlanet[9].missionCompleted = 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-05-21 01:41:43 +02:00
|
|
|
sprintf(message, "Rescue %d more...", 250 - game.slavesRescued);
|
2011-08-24 14:14:44 +02:00
|
|
|
setInfoLine(message, FONT_CYAN);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((type == M_DESTROY_TARGET_TYPE) && (id == CD_CLOAKFIGHTER))
|
|
|
|
{
|
|
|
|
setInfoLine("*** Experimental Fighter Destroyed - Mission Completed ***", FONT_GREEN);
|
|
|
|
systemPlanet[9].missionCompleted = 1;
|
2016-01-04 15:07:30 +01:00
|
|
|
setRadioMessage(FS_CHRIS, "That's one less suprise that WEAPCO can spring on us!", 1);
|
2015-05-21 01:41:43 +02:00
|
|
|
game.experimentalShield = 0;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
This is only used as few times in the game.
|
|
|
|
Missions 11 and 23 to be exact!
|
|
|
|
*/
|
2011-08-26 21:29:04 +02:00
|
|
|
static char revealHiddenObjectives()
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
char allDone = 1;
|
2012-03-11 15:16:19 +01:00
|
|
|
char string[255] = "";
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if (currentMission.completed1[i] == OB_HIDDEN)
|
|
|
|
{
|
|
|
|
currentMission.completed1[i] = OB_INCOMPLETE;
|
|
|
|
sprintf(string, "New Objective - %s", currentMission.primaryObjective[i]);
|
|
|
|
setInfoLine(string, FONT_CYAN);
|
|
|
|
allDone = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!allDone)
|
|
|
|
{
|
|
|
|
// Activate Kline!! :)
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.area == MISN_ELAMALE)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2015-03-05 16:47:30 +01:00
|
|
|
mission_killAllEnemies();
|
2016-01-03 20:31:39 +01:00
|
|
|
events_sync();
|
2015-03-09 01:59:33 +01:00
|
|
|
aliens[ALIEN_KLINE].active = true;
|
|
|
|
aliens[ALIEN_KLINE].x = player.x + 1000;
|
|
|
|
aliens[ALIEN_KLINE].y = player.y;
|
|
|
|
aliens[ALIEN_KLINE].flags |= FL_IMMORTAL | FL_NOFIRE;
|
|
|
|
player_setTarget(ALIEN_KLINE);
|
2015-03-08 15:38:58 +01:00
|
|
|
audio_playMusic("music/last_cyber_dance.ogg", -1);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return allDone;
|
|
|
|
}
|
|
|
|
|
2011-08-26 16:55:46 +02:00
|
|
|
bool allMissionsCompleted()
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if (currentMission.completed1[i] == OB_INCOMPLETE)
|
|
|
|
{
|
|
|
|
if ((currentMission.primaryType[i] == M_DESTROY_ALL_TARGETS) && (engine.allAliensDead) && (currentMission.remainingObjectives1 + currentMission.remainingObjectives2 == 1))
|
|
|
|
{
|
|
|
|
currentMission.completed1[i] = 2;
|
|
|
|
checkTimer();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if (currentMission.completed2[i] == OB_INCOMPLETE)
|
|
|
|
{
|
|
|
|
if ((currentMission.secondaryType[i] == M_DESTROY_ALL_TARGETS) && (engine.allAliensDead) && (currentMission.remainingObjectives1 + currentMission.remainingObjectives2 == 1))
|
|
|
|
{
|
|
|
|
currentMission.completed2[i] = 2;
|
|
|
|
checkTimer();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if (currentMission.completed1[i] == 2)
|
|
|
|
{
|
|
|
|
if (currentMission.remainingObjectives1 > 1)
|
|
|
|
{
|
2015-05-21 01:41:43 +02:00
|
|
|
if ((game.area != MISN_POSWIC) || (i != 1))
|
2011-08-24 14:14:44 +02:00
|
|
|
setInfoLine("*** Primary Objective Completed ***", FONT_GREEN);
|
|
|
|
else
|
|
|
|
setInfoLine(">>> Primary Objective Failed <<<", FONT_RED);
|
|
|
|
currentMission.completed1[i] = OB_COMPLETED;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.area != MISN_INTERCEPTION)
|
2011-08-24 14:14:44 +02:00
|
|
|
setInfoLine("*** All Primary Objectives Completed ***", FONT_GREEN);
|
|
|
|
else
|
|
|
|
setInfoLine("*** Interception Destroyed ***", FONT_GREEN);
|
|
|
|
currentMission.completed1[i] = OB_COMPLETED;
|
|
|
|
|
2015-02-28 14:15:53 +01:00
|
|
|
// do some area specific things
|
2015-05-21 01:41:43 +02:00
|
|
|
if ((game.area == MISN_MOEBO) ||
|
|
|
|
(game.area == MISN_DORIM) ||
|
|
|
|
(game.area == MISN_ELLESH) ||
|
|
|
|
(game.area == MISN_MARS))
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
if (currentMission.remainingObjectives2 == 0)
|
|
|
|
{
|
2015-03-05 16:47:30 +01:00
|
|
|
mission_killAllEnemies();
|
2011-08-24 14:14:44 +02:00
|
|
|
engine.addAliens = -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.area == MISN_EARTH)
|
2016-01-04 15:07:30 +01:00
|
|
|
setRadioMessage(FS_CHRIS, "You guys stay here and keep things under control. I'm going after Kethlan!", 1);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (currentMission.completed2[i] == 2)
|
|
|
|
{
|
|
|
|
if (currentMission.remainingObjectives2 > 1)
|
|
|
|
{
|
|
|
|
setInfoLine("*** Secondary Objective Completed ***", FONT_GREEN);
|
|
|
|
currentMission.completed2[i] = OB_COMPLETED;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
setInfoLine("*** All Secondary Objectives Completed ***", FONT_GREEN);
|
|
|
|
currentMission.completed2[i] = OB_COMPLETED;
|
|
|
|
|
|
|
|
// do some area specific things
|
2015-05-21 01:41:43 +02:00
|
|
|
if ((game.area == MISN_DORIM) &&
|
2015-03-29 19:11:12 +02:00
|
|
|
(currentMission.remainingObjectives1 == 0))
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2015-03-05 16:47:30 +01:00
|
|
|
mission_killAllEnemies();
|
2011-08-24 14:14:44 +02:00
|
|
|
engine.addAliens = -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (currentMission.completed1[i] == -2)
|
|
|
|
{
|
|
|
|
setInfoLine(">>> MISSION FAILED <<<", FONT_RED);
|
|
|
|
currentMission.completed1[i] = OB_FAILED;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (currentMission.completed2[i] == -2)
|
|
|
|
{
|
|
|
|
setInfoLine(">>> Secondary Objective Failed <<<", FONT_RED);
|
|
|
|
currentMission.completed2[i] = OB_FAILED;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-08-27 17:17:54 +02:00
|
|
|
signed char remaining;
|
2011-08-26 16:55:46 +02:00
|
|
|
bool add = false;
|
|
|
|
bool allDone = true;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
// Zero objective list for a recount
|
|
|
|
currentMission.remainingObjectives1 = currentMission.remainingObjectives2 = 0;
|
|
|
|
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if (currentMission.primaryType[i] != NONE)
|
|
|
|
{
|
|
|
|
if (currentMission.completed1[i] == 0)
|
|
|
|
{
|
|
|
|
currentMission.remainingObjectives1++;
|
|
|
|
if (currentMission.primaryType[i] == M_DESTROY_ALL_TARGETS)
|
2011-08-26 16:55:46 +02:00
|
|
|
add = true;
|
|
|
|
allDone = false;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (currentMission.completed1[i] < 0)
|
2011-08-26 16:55:46 +02:00
|
|
|
return false;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
if (currentMission.secondaryType[i] != NONE)
|
|
|
|
{
|
|
|
|
if (currentMission.completed2[i] == 0)
|
|
|
|
{
|
|
|
|
currentMission.remainingObjectives2++;
|
|
|
|
if (currentMission.secondaryType[i] == M_DESTROY_ALL_TARGETS)
|
2011-08-26 16:55:46 +02:00
|
|
|
add = true;
|
|
|
|
allDone = false;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (allDone)
|
|
|
|
allDone = revealHiddenObjectives();
|
|
|
|
|
|
|
|
remaining = currentMission.remainingObjectives1 + currentMission.remainingObjectives2;
|
|
|
|
|
|
|
|
// We've only got one objective left and it's destroy all targets,
|
|
|
|
// so stop adding aliens (otherwise it might be impossible to finish!)
|
2011-08-27 17:17:54 +02:00
|
|
|
if ((add) && (remaining == 1))
|
2011-08-24 14:14:44 +02:00
|
|
|
engine.addAliens = -1;
|
|
|
|
|
|
|
|
return allDone;
|
|
|
|
}
|
|
|
|
|
2011-08-26 16:55:46 +02:00
|
|
|
bool missionFailed()
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if (currentMission.completed1[i] < 0)
|
|
|
|
{
|
2011-08-26 16:55:46 +02:00
|
|
|
return true;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-08-26 16:55:46 +02:00
|
|
|
return false;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
|
2011-08-26 21:29:04 +02:00
|
|
|
static void drawBriefScreen()
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2012-12-09 16:53:21 +01:00
|
|
|
SDL_Rect r = {0, 0, (uint16_t)screen->w, 2};
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2012-03-12 04:16:56 +01:00
|
|
|
for (int i = 0 ; i < (int)(screen->h / 4) - 30 ; i++)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2012-03-12 04:16:56 +01:00
|
|
|
r.y = (i * 2) + 62; // Not a typo; a black gap is left in the middle if it's 60.
|
|
|
|
SDL_FillRect(screen, &r, SDL_MapRGB(screen->format, 0, i, 0));
|
|
|
|
r.y = (screen->h - (i * 2) - 60);
|
2011-08-26 23:53:46 +02:00
|
|
|
SDL_FillRect(screen, &r, SDL_MapRGB(screen->format, 0, i, 0));
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
|
2015-12-31 16:47:27 +01:00
|
|
|
screen_drawRect(140, 70, 500, 20, 0x00, 0x77, 0x00);
|
|
|
|
screen_drawRect(140, 90, 500, 130, 0x00, 0x33, 0x00);
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString("Primary Objectives", 150, 74, FONT_WHITE);
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if ((currentMission.primaryType[i] != NONE) && (currentMission.completed1[i] != OB_HIDDEN))
|
|
|
|
{
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString(currentMission.primaryObjective[i], 160, 114 + (i * 30), FONT_WHITE);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (currentMission.secondaryType[0] != NONE)
|
|
|
|
{
|
2015-12-31 16:47:27 +01:00
|
|
|
screen_drawRect(140, 230, 500, 20, 0x00, 0x77, 0x77);
|
|
|
|
screen_drawRect(140, 250, 500, 130, 0x00, 0x33, 0x33);
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString("Secondary Objectives", 150, 234, FONT_WHITE);
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if (currentMission.secondaryType[i] != NONE)
|
|
|
|
{
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString(currentMission.secondaryObjective[i], 160, 274 + (i * 30), FONT_WHITE);
|
2015-05-21 01:41:43 +02:00
|
|
|
game.secondaryMissions++;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-31 16:47:27 +01:00
|
|
|
screen_drawRect(140, 390, 500, 20, 0x77, 0x77, 0x00);
|
|
|
|
screen_drawRect(140, 410, 500, 130, 0x33, 0x33, 0x00);
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString("Additional Information", 150, 394, FONT_WHITE);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
Simply displays a screen with all the mission information on it, pulled
|
|
|
|
back from the data stored in the currentMission object. The music for the
|
|
|
|
mission begins playing here.
|
|
|
|
*/
|
|
|
|
void missionBriefScreen()
|
|
|
|
{
|
2015-11-07 03:35:07 +01:00
|
|
|
screen_clear(black);
|
2015-10-27 01:07:31 +01:00
|
|
|
renderer_update();
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.area != MISN_INTERCEPTION)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2015-11-07 03:35:07 +01:00
|
|
|
screen_clear(black);
|
2011-08-24 14:14:44 +02:00
|
|
|
drawBriefScreen();
|
|
|
|
|
|
|
|
if (currentMission.timeLimit1[0] > 0)
|
|
|
|
{
|
|
|
|
char temp[50];
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.area != MISN_MARS)
|
2011-08-24 14:14:44 +02:00
|
|
|
sprintf(temp, "TIME LIMIT: %d minutes", currentMission.timeLimit1[0]);
|
|
|
|
else
|
|
|
|
sprintf(temp, "SURVIVAL FOR %d minutes", currentMission.timeLimit1[0]);
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString(temp, -1, 500, FONT_RED);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
|
2015-05-21 01:41:43 +02:00
|
|
|
switch (game.area)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2015-03-29 19:11:12 +02:00
|
|
|
case MISN_URUSOR:
|
|
|
|
case MISN_DORIM:
|
|
|
|
case MISN_SIVEDI:
|
|
|
|
case MISN_ALMARTHA:
|
|
|
|
case MISN_ELLESH:
|
|
|
|
case MISN_MARS:
|
|
|
|
case MISN_VENUS:
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString("Phoebe Lexx will not be present", 160, 420, FONT_WHITE);
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.hasWingMate2)
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString("Ursula Lexx will not be present", 160, 450, FONT_WHITE);
|
2011-08-24 14:14:44 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2015-05-21 01:41:43 +02:00
|
|
|
if ((game.area == MISN_URUSOR) ||
|
|
|
|
(game.area == MISN_POSWIC) ||
|
|
|
|
(game.area == MISN_EARTH))
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString("Sid Wilson will join you on this mission", 160, 480, FONT_WHITE);
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2015-10-27 01:07:31 +01:00
|
|
|
renderer_update();
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
loadGameGraphics();
|
2016-01-04 02:30:54 +01:00
|
|
|
gfx_createTextObject(TS_SHIELD, "Shield", screen->w / 32, screen->h - 50, FONT_WHITE);
|
|
|
|
gfx_createTextObject(TS_PLASMA_T, "Plasma:", screen->w * 5 / 16, screen->h - 50, FONT_WHITE);
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
if (player.weaponType[1] == W_CHARGER)
|
2016-01-04 02:30:54 +01:00
|
|
|
gfx_createTextObject(TS_AMMO_T, "Charge", screen->w / 2, screen->h - 50, FONT_WHITE);
|
2011-08-24 14:14:44 +02:00
|
|
|
else if (player.weaponType[1] == W_LASER)
|
2016-01-04 02:30:54 +01:00
|
|
|
gfx_createTextObject(TS_AMMO_T, "Heat", screen->w / 2 + 20, screen->h - 50, FONT_WHITE);
|
2011-08-24 14:14:44 +02:00
|
|
|
else
|
2016-01-04 02:30:54 +01:00
|
|
|
gfx_createTextObject(TS_AMMO_T, "Rockets:", screen->w / 2, screen->h - 50, FONT_WHITE);
|
2015-12-31 16:47:27 +01:00
|
|
|
|
2016-01-04 02:30:54 +01:00
|
|
|
gfx_createTextObject(TS_TARGET, "Target", screen->w * 11 / 16, screen->h - 50, FONT_WHITE);
|
2015-12-31 16:47:27 +01:00
|
|
|
gfx_createTextObject(TS_CASH_T, "Cash: $", 25, 20, FONT_WHITE);
|
2016-01-04 02:30:54 +01:00
|
|
|
gfx_createTextObject(TS_OBJECTIVES_T, "Objectives Remaining:", screen->w - 250, 20, FONT_WHITE);
|
|
|
|
gfx_createTextObject(TS_TIME_T, "Time Remaining - ", screen->w / 2 - 140, 20, FONT_WHITE);
|
|
|
|
gfx_createTextObject(TS_POWER, "Power", screen->w / 32, screen->h - 30, FONT_WHITE);
|
|
|
|
gfx_createTextObject(TS_OUTPUT, "Output", screen->w * 5 / 16, screen->h - 30, FONT_WHITE);
|
|
|
|
gfx_createTextObject(TS_COOLER, "Cooler", screen->w * 97 / 160, screen->h - 30, FONT_WHITE);
|
2015-03-08 15:38:58 +01:00
|
|
|
audio_playRandomTrack();
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.area != MISN_INTERCEPTION)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString("PRESS ENTER TO CONTINUE...", -1, 550, FONT_WHITE);
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2015-10-27 01:07:31 +01:00
|
|
|
renderer_update();
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
flushInput();
|
|
|
|
engine.done = 0;
|
2013-09-30 16:52:43 +02:00
|
|
|
engine.keyState[KEY_FIRE] = 0;
|
2015-03-04 01:28:15 +01:00
|
|
|
engine.keyState[KEY_ALTFIRE] = 0;
|
|
|
|
engine.keyState[KEY_ESCAPE] = 0;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
while (true)
|
|
|
|
{
|
2015-11-07 03:35:07 +01:00
|
|
|
game_delayFrame();
|
2011-08-24 14:14:44 +02:00
|
|
|
getPlayerInput();
|
2015-03-04 01:28:15 +01:00
|
|
|
if ((engine.keyState[KEY_FIRE]) || (engine.keyState[KEY_ALTFIRE]) ||
|
|
|
|
(engine.keyState[KEY_ESCAPE]))
|
2011-08-24 14:14:44 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2015-11-07 03:35:07 +01:00
|
|
|
screen_clear(black);
|
2015-10-27 01:07:31 +01:00
|
|
|
renderer_update();
|
2015-11-07 03:35:07 +01:00
|
|
|
screen_clear(black);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
engine.gameSection = SECTION_GAME;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
Display a screen showing all the information from the mission
|
|
|
|
the player has just done. This includes objectives that have been
|
|
|
|
completed and failed. A mission timer is also displayed at the bottom
|
|
|
|
of the screen.
|
|
|
|
*/
|
|
|
|
void missionFinishedScreen()
|
|
|
|
{
|
2015-03-29 00:52:03 +01:00
|
|
|
int shield_bonus;
|
|
|
|
char temp[100];
|
|
|
|
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.area != MISN_INTERCEPTION)
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
2015-11-07 03:35:07 +01:00
|
|
|
screen_clear(black);
|
2015-10-27 01:07:31 +01:00
|
|
|
renderer_update();
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.shots > 0)
|
|
|
|
game.accuracy = (game.hits * 100) / game.shots;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2015-11-07 03:35:07 +01:00
|
|
|
screen_clear(black);
|
2011-08-24 14:14:44 +02:00
|
|
|
drawBriefScreen();
|
|
|
|
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if (currentMission.primaryType[i] != NONE)
|
|
|
|
{
|
2015-05-21 01:41:43 +02:00
|
|
|
if ((game.area != MISN_POSWIC) || (i != 1))
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString("COMPLETED", 550, 114 + (i * 30), FONT_GREEN);
|
2011-08-24 14:14:44 +02:00
|
|
|
else
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString("FAILED", 550, 114 + (i * 30), FONT_RED);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (currentMission.secondaryType[0] != NONE)
|
|
|
|
{
|
|
|
|
for (int i = 0 ; i < 3 ; i++)
|
|
|
|
{
|
|
|
|
if (currentMission.secondaryType[i] != NONE)
|
|
|
|
{
|
2012-12-09 16:53:21 +01:00
|
|
|
strcpy(temp, currentMission.secondaryObjective[i]);
|
2011-08-24 14:14:44 +02:00
|
|
|
if (currentMission.completed2[i] >= 1)
|
|
|
|
{
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString("COMPLETED", 550, 274 + (i * 30), FONT_GREEN);
|
2015-05-21 01:41:43 +02:00
|
|
|
game.secondaryMissionsCompleted++;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString("FAILED", 550, 274 + (i * 30), FONT_RED);
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (currentMission.remainingObjectives1 + currentMission.remainingObjectives2 == 0)
|
|
|
|
{
|
2015-03-29 00:52:03 +01:00
|
|
|
shield_bonus = player.shield * 10;
|
|
|
|
sprintf(temp, "Shield Bonus: $%.3d", shield_bonus);
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString(temp, -1, 430, FONT_WHITE);
|
2015-05-21 01:41:43 +02:00
|
|
|
game.cash += shield_bonus;
|
|
|
|
game.cashEarned += shield_bonus;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
|
2015-05-21 01:41:43 +02:00
|
|
|
game.timeTaken += engine.timeTaken;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2015-04-05 23:26:37 +02:00
|
|
|
snprintf(temp, sizeof temp, "Mission Time: %2ld:%02ld:%02ld",
|
|
|
|
engine.timeTaken / 3600, (engine.timeTaken / 60) % 60,
|
|
|
|
engine.timeTaken % 60);
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2015-11-07 01:36:20 +01:00
|
|
|
screen_renderString(temp, -1, 500, FONT_WHITE);
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
// Do some mission specific stuff here...
|
2015-05-21 01:41:43 +02:00
|
|
|
if (game.area == MISN_HAIL)
|
|
|
|
game.cash -= 500;
|
|
|
|
else if (game.area == MISN_ODEON)
|
|
|
|
game.hasWingMate2 = 1;
|
|
|
|
else if (game.area == MISN_ALMARTHA)
|
|
|
|
game.cash -= 2000;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
checkForBossMission();
|
|
|
|
|
2015-10-27 01:07:31 +01:00
|
|
|
renderer_update();
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
flushInput();
|
|
|
|
engine.done = 0;
|
2013-09-30 16:52:43 +02:00
|
|
|
engine.keyState[KEY_FIRE] = 0;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
while (true)
|
|
|
|
{
|
2015-11-07 03:35:07 +01:00
|
|
|
game_delayFrame();
|
2011-08-24 14:14:44 +02:00
|
|
|
getPlayerInput();
|
2013-09-30 16:52:43 +02:00
|
|
|
if ((engine.keyState[KEY_FIRE]))
|
2011-08-24 14:14:44 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Stop people from "selling" Laser ammo as rockets.
|
|
|
|
if (player.weaponType[1] == W_LASER)
|
|
|
|
player.ammo[1] = 1;
|
|
|
|
|
2015-03-08 15:38:58 +01:00
|
|
|
audio_haltMusic();
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2013-07-11 15:29:37 +02:00
|
|
|
This is where all the missions are defined.
|
2011-08-24 14:14:44 +02:00
|
|
|
*/
|
|
|
|
void initMissions()
|
|
|
|
{
|
|
|
|
clearAllMissions();
|
|
|
|
|
|
|
|
// Seconds to wait between attempting to add an enemy
|
|
|
|
int SOMETIMES = 40 * 60;
|
|
|
|
int NORMAL = 15 * 60;
|
|
|
|
int FREQUENT = 5 * 60;
|
|
|
|
int ALWAYS = 1 * 60;
|
2012-03-11 15:21:38 +01:00
|
|
|
int NEVER = -1;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
|
|
|
|
sprintf(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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
missions[MISN_MOEBO].primaryType[0] = M_DESTROY_TARGET_TYPE;
|
|
|
|
missions[MISN_MOEBO].target1[0] = CD_BOSS;
|
|
|
|
missions[MISN_MOEBO].targetValue1[0] = 1;
|
|
|
|
missions[MISN_MOEBO].completed1[0] = OB_INCOMPLETE;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
missions[MISN_MOEBO].timeLimit1[0] = 3;
|
|
|
|
|
|
|
|
missions[MISN_MOEBO].addAliens = SOMETIMES;
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(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");
|
|
|
|
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");
|
|
|
|
missions[MISN_NEROD].primaryType[2] = M_DESTROY_TARGET_TYPE;
|
|
|
|
missions[MISN_NEROD].target1[2] = CD_ANY;
|
|
|
|
missions[MISN_NEROD].targetValue1[2] = 35;
|
|
|
|
missions[MISN_NEROD].completed1[2] = OB_INCOMPLETE;
|
|
|
|
|
|
|
|
missions[MISN_NEROD].addAliens = ALWAYS;
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(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");
|
|
|
|
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;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2015-03-29 19:11:12 +02:00
|
|
|
sprintf(missions[MISN_ALLEZ].secondaryObjective[0],
|
|
|
|
"Destroy all remaining WEAPCO fighters");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
missions[MISN_URUSOR].primaryType[2] = M_PROTECT_TARGET;
|
|
|
|
missions[MISN_URUSOR].target1[2] = CD_CARGOSHIP;
|
|
|
|
missions[MISN_URUSOR].targetValue1[2] = 0;
|
|
|
|
missions[MISN_URUSOR].completed1[2] = OB_CONDITION;
|
|
|
|
|
|
|
|
missions[MISN_URUSOR].addAliens = FREQUENT;
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(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");
|
|
|
|
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");
|
|
|
|
missions[MISN_DORIM].secondaryType[0] = M_COLLECT;
|
|
|
|
missions[MISN_DORIM].target2[0] = P_ORE;
|
|
|
|
missions[MISN_DORIM].targetValue2[0] = 10;
|
|
|
|
missions[MISN_DORIM].completed2[0] = OB_INCOMPLETE;
|
|
|
|
|
|
|
|
missions[MISN_DORIM].addAliens = ALWAYS;
|
|
|
|
|
|
|
|
missions[MISN_DORIM].timeLimit1[0] = 3;
|
|
|
|
missions[MISN_DORIM].timeLimit2[0] = 3;
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(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");
|
|
|
|
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");
|
|
|
|
missions[MISN_ELAMALE].primaryType[1] = M_ESCAPE_TARGET;
|
|
|
|
missions[MISN_ELAMALE].target1[1] = CD_KLINE;
|
|
|
|
missions[MISN_ELAMALE].targetValue1[1] = 1;
|
|
|
|
missions[MISN_ELAMALE].completed1[1] = OB_HIDDEN;
|
|
|
|
|
|
|
|
missions[MISN_ELAMALE].addAliens = NEVER;
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
missions[MISN_SIVEDI].secondaryType[0] = M_COLLECT;
|
|
|
|
missions[MISN_SIVEDI].target2[0] = P_ORE;
|
|
|
|
missions[MISN_SIVEDI].targetValue2[0] = 25;
|
|
|
|
missions[MISN_SIVEDI].completed2[0] = OB_INCOMPLETE;
|
|
|
|
|
|
|
|
missions[MISN_SIVEDI].addAliens = ALWAYS;
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
missions[MISN_ELLESH].primaryType[0] = M_DESTROY_TARGET_TYPE;
|
|
|
|
missions[MISN_ELLESH].target1[0] = CD_BOSS;
|
|
|
|
missions[MISN_ELLESH].targetValue1[0] = 1;
|
|
|
|
missions[MISN_ELLESH].completed1[0] = OB_INCOMPLETE;
|
|
|
|
|
|
|
|
missions[MISN_ELLESH].addAliens = ALWAYS;
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(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");
|
|
|
|
missions[MISN_PLUTO].primaryType[1] = M_DESTROY_ALL_TARGETS;
|
|
|
|
missions[MISN_PLUTO].completed1[1] = OB_INCOMPLETE;
|
|
|
|
|
|
|
|
missions[MISN_PLUTO].timeLimit1[0] = 5;
|
|
|
|
missions[MISN_PLUTO].timeLimit1[1] = 5;
|
|
|
|
|
|
|
|
missions[MISN_PLUTO].addAliens = ALWAYS;
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(missions[MISN_NEPTUNE].primaryObjective[0],
|
|
|
|
"Destroy planetary guardian");
|
|
|
|
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");
|
|
|
|
missions[MISN_NEPTUNE].primaryType[1] = M_DESTROY_ALL_TARGETS;
|
|
|
|
missions[MISN_NEPTUNE].completed1[1] = OB_INCOMPLETE;
|
|
|
|
|
|
|
|
missions[MISN_NEPTUNE].timeLimit1[0] = 5;
|
|
|
|
missions[MISN_NEPTUNE].timeLimit1[1] = 5;
|
|
|
|
|
|
|
|
missions[MISN_NEPTUNE].addAliens = ALWAYS;
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(missions[MISN_URANUS].primaryObjective[0],
|
|
|
|
"Destroy all present WEAPCO forces");
|
|
|
|
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");
|
|
|
|
missions[MISN_URANUS].primaryType[1] = M_DESTROY_ALL_TARGETS;
|
|
|
|
missions[MISN_URANUS].completed1[1] = OB_INCOMPLETE;
|
|
|
|
|
|
|
|
missions[MISN_URANUS].timeLimit1[0] = 5;
|
|
|
|
missions[MISN_URANUS].timeLimit1[1] = 5;
|
|
|
|
|
|
|
|
missions[MISN_URANUS].addAliens = ALWAYS;
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
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");
|
|
|
|
missions[MISN_JUPITER].primaryType[2] = M_DESTROY_ALL_TARGETS;
|
|
|
|
missions[MISN_JUPITER].target1[1] = CD_FIREFLY;
|
|
|
|
missions[MISN_JUPITER].targetValue1[1] = 4;
|
|
|
|
missions[MISN_JUPITER].completed1[2] = OB_HIDDEN;
|
|
|
|
|
|
|
|
missions[MISN_JUPITER].addAliens = ALWAYS;
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(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;
|
|
|
|
missions[MISN_MARS].completed1[0] = OB_INCOMPLETE;
|
|
|
|
|
|
|
|
missions[MISN_MARS].timeLimit1[0] = 2;
|
|
|
|
|
|
|
|
missions[MISN_MARS].addAliens = ALWAYS;
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(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;
|
|
|
|
missions[MISN_EARTH].completed1[0] = OB_INCOMPLETE;
|
|
|
|
|
|
|
|
missions[MISN_EARTH].addAliens = ALWAYS;
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(missions[MISN_VENUS].primaryObjective[0], "Defeat Kline");
|
|
|
|
missions[MISN_VENUS].primaryType[0] = M_DESTROY_ALL_TARGETS;
|
|
|
|
missions[MISN_VENUS].completed1[0] = OB_INCOMPLETE;
|
|
|
|
|
|
|
|
|
|
|
|
strcpy(missions[MISN_INTERCEPTION].primaryObjective[0], "");
|
|
|
|
missions[MISN_INTERCEPTION].primaryType[0] = M_DESTROY_ALL_TARGETS;
|
|
|
|
missions[MISN_INTERCEPTION].completed1[0] = OB_INCOMPLETE;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|