Replaced extraction point with jumpgate.
This commit is contained in:
parent
bd715286a1
commit
bc1c5d09a8
|
@ -12,11 +12,12 @@ OBJS += ai.o
|
||||||
OBJS += battle.o bullets.o
|
OBJS += battle.o bullets.o
|
||||||
OBJS += capitalShips.o challengeHome.o challenges.o cJSON.o controls.o
|
OBJS += capitalShips.o challengeHome.o challenges.o cJSON.o controls.o
|
||||||
OBJS += debris.o dev.o draw.o
|
OBJS += debris.o dev.o draw.o
|
||||||
OBJS += effects.o entities.o extractionPoint.o
|
OBJS += effects.o entities.o
|
||||||
OBJS += fighters.o
|
OBJS += fighters.o
|
||||||
OBJS += galacticMap.o game.o
|
OBJS += galacticMap.o game.o
|
||||||
OBJS += hud.o
|
OBJS += hud.o
|
||||||
OBJS += i18n.o init.o input.o io.o items.o
|
OBJS += i18n.o init.o input.o io.o items.o
|
||||||
|
OBJS += jumpgate.o
|
||||||
OBJS += load.o locations.o lookup.o
|
OBJS += load.o locations.o lookup.o
|
||||||
OBJS += main.o messageBox.o mission.o missionInfo.o modalDialog.o
|
OBJS += main.o messageBox.o mission.o missionInfo.o modalDialog.o
|
||||||
OBJS += objectives.o options.o
|
OBJS += objectives.o options.o
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name" : "Defend Extraction Point",
|
"name" : "Defend Jumpgate Point",
|
||||||
"description" : "Defend Extraction Point",
|
"description" : "Defend Jumpgate Point",
|
||||||
"background" : "AUTO",
|
"background" : "AUTO",
|
||||||
"planet" : "AUTO",
|
"planet" : "AUTO",
|
||||||
"music" : "AUTO",
|
"music" : "AUTO",
|
||||||
|
@ -41,12 +41,12 @@
|
||||||
"scatter" : 5000,
|
"scatter" : 5000,
|
||||||
"number" : 12,
|
"number" : 12,
|
||||||
"flags" : "+EF_RETREATING",
|
"flags" : "+EF_RETREATING",
|
||||||
"aiFlags" : "+AIF_GOAL_EXTRACTION+AIF_UNLIMITED_RANGE+AIF_DEFENSIVE+AIF_COVERS_RETREAT"
|
"aiFlags" : "+AIF_GOAL_JUMPGATE+AIF_UNLIMITED_RANGE+AIF_DEFENSIVE+AIF_COVERS_RETREAT"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"entities" : [
|
"entities" : [
|
||||||
{
|
{
|
||||||
"type" : "ET_EXTRACTION_POINT",
|
"type" : "ET_JUMPGATE",
|
||||||
"x" : 25.1,
|
"x" : 25.1,
|
||||||
"y" : 25.1
|
"y" : 25.1
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,5 +7,5 @@
|
||||||
"shieldRechargeRate" : 0,
|
"shieldRechargeRate" : 0,
|
||||||
"texture" : "gfx/craft/civilian01.png",
|
"texture" : "gfx/craft/civilian01.png",
|
||||||
"flags" : "EF_MISSION_TARGET+EF_RETREATING+EF_TAKES_DAMAGE",
|
"flags" : "EF_MISSION_TARGET+EF_RETREATING+EF_TAKES_DAMAGE",
|
||||||
"aiFlags" : "AIF_GOAL_EXTRACTION+AIF_AVOIDS_COMBAT+AIF_FOLLOWS_PLAYER"
|
"aiFlags" : "AIF_GOAL_JUMPGATE+AIF_AVOIDS_COMBAT+AIF_FOLLOWS_PLAYER"
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
"targetType" : "TT_DESTROY"
|
"targetType" : "TT_DESTROY"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description" : "Retreat to extraction point",
|
"description" : "Retreat to jumpgate",
|
||||||
"targetName" : "Player",
|
"targetName" : "Player",
|
||||||
"targetValue" : 1,
|
"targetValue" : 1,
|
||||||
"targetType" : "TT_ESCAPED",
|
"targetType" : "TT_ESCAPED",
|
||||||
|
@ -70,8 +70,8 @@
|
||||||
],
|
],
|
||||||
"entities" : [
|
"entities" : [
|
||||||
{
|
{
|
||||||
"name" : "Extraction Point",
|
"name" : "Jumpgate",
|
||||||
"type" : "ET_EXTRACTION_POINT",
|
"type" : "ET_JUMPGATE",
|
||||||
"x" : 25,
|
"x" : 25,
|
||||||
"y" : 25,
|
"y" : 25,
|
||||||
"active" : 0
|
"active" : 0
|
||||||
|
@ -94,12 +94,12 @@
|
||||||
{
|
{
|
||||||
"function" : "ALLIES_KILLED 90",
|
"function" : "ALLIES_KILLED 90",
|
||||||
"lines" : [
|
"lines" : [
|
||||||
"MSG_BOX UNF Talos;All fighters, Captain Bailey has signalled the retreat. Coyote is lost. Fall back to the extraction point.",
|
"MSG_BOX UNF Talos;All fighters, Captain Bailey has signalled the retreat. Coyote is lost. Fall back to the jumpgate.",
|
||||||
"MSG_BOX de Winter;You all heard the Captain - fall back, we'll cover the retreat.",
|
"MSG_BOX de Winter;You all heard the Captain - fall back, we'll cover the retreat.",
|
||||||
"MSG_BOX Dodds;Estelle, we've got this. We can take them.",
|
"MSG_BOX Dodds;Estelle, we've got this. We can take them.",
|
||||||
"MSG_BOX de Winter;We're taking too many losses, Dodds. Fall back now, that's an order.",
|
"MSG_BOX de Winter;We're taking too many losses, Dodds. Fall back now, that's an order.",
|
||||||
"WAIT_MSG_BOX",
|
"WAIT_MSG_BOX",
|
||||||
"ACTIVATE_ENTITIES Extraction Point",
|
"ACTIVATE_ENTITIES Jumpgate",
|
||||||
"RETREAT_ALLIES"
|
"RETREAT_ALLIES"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,8 +106,8 @@
|
||||||
"active" : 0
|
"active" : 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name" : "Extraction Point",
|
"name" : "Jumpgate",
|
||||||
"type" : "ET_EXTRACTION_POINT",
|
"type" : "ET_JUMPGATE",
|
||||||
"x" : 10,
|
"x" : 10,
|
||||||
"y" : 8,
|
"y" : 8,
|
||||||
"active" : 0
|
"active" : 0
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
"WAIT 2",
|
"WAIT 2",
|
||||||
"MSG_BOX Tug;Tow cable attached. Ready to head home.",
|
"MSG_BOX Tug;Tow cable attached. Ready to head home.",
|
||||||
"MSG_BOX Carr;We're done here. Let's bring our mystery guest in.",
|
"MSG_BOX Carr;We're done here. Let's bring our mystery guest in.",
|
||||||
"ACTIVATE_ENTITIES Extraction Point",
|
"ACTIVATE_ENTITIES Jumpgate",
|
||||||
"WAIT 20",
|
"WAIT 20",
|
||||||
"ACTIVATE_ENTITIES Dart",
|
"ACTIVATE_ENTITIES Dart",
|
||||||
"ACTIVATE_OBJECTIVES Destroy intercepting Darts",
|
"ACTIVATE_OBJECTIVES Destroy intercepting Darts",
|
||||||
|
|
|
@ -71,8 +71,8 @@
|
||||||
],
|
],
|
||||||
"entities" : [
|
"entities" : [
|
||||||
{
|
{
|
||||||
"name" : "Extraction Point",
|
"name" : "Jumpgate",
|
||||||
"type" : "ET_EXTRACTION_POINT",
|
"type" : "ET_JUMPGATE",
|
||||||
"x" : 26,
|
"x" : 26,
|
||||||
"y" : 25
|
"y" : 25
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,8 +74,8 @@
|
||||||
],
|
],
|
||||||
"entities" : [
|
"entities" : [
|
||||||
{
|
{
|
||||||
"name" : "Extraction Point",
|
"name" : "Jumpgate",
|
||||||
"type" : "ET_EXTRACTION_POINT",
|
"type" : "ET_JUMPGATE",
|
||||||
"x" : 8,
|
"x" : 8,
|
||||||
"y" : 25
|
"y" : 25
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
{
|
{
|
||||||
"function" : "TIME 1",
|
"function" : "TIME 1",
|
||||||
"lines" : [
|
"lines" : [
|
||||||
"MSG_BOX Strickland;This is a straight forward one, guys: take down all enemy targets. But make sure none of those Nymphs make it to the extraction point."
|
"MSG_BOX Strickland;This is a straight forward one, guys: take down all enemy targets. But make sure none of those Nymphs make it to the jumpgate ."
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -50,8 +50,8 @@
|
||||||
],
|
],
|
||||||
"entities" : [
|
"entities" : [
|
||||||
{
|
{
|
||||||
"name" : "Extraction Point",
|
"name" : "Jumpgate",
|
||||||
"type" : "ET_EXTRACTION_POINT",
|
"type" : "ET_JUMPGATE",
|
||||||
"x" : 25,
|
"x" : 25,
|
||||||
"y" : 25
|
"y" : 25
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
{
|
{
|
||||||
"function" : "TIME 1",
|
"function" : "TIME 1",
|
||||||
"lines" : [
|
"lines" : [
|
||||||
"MSG_BOX Control;ABCs, this is Control. Round up those civilians and escort them to the extraction point as quick as you can.",
|
"MSG_BOX Control;ABCs, this is Control. Round up those civilians and escort them to the jumpgate as quick as you can.",
|
||||||
"MSG_BOX Control;We're not expecting any opposition, but be prepared to engage hostiles if needed."
|
"MSG_BOX Control;We're not expecting any opposition, but be prepared to engage hostiles if needed."
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,8 +99,8 @@
|
||||||
],
|
],
|
||||||
"entities" : [
|
"entities" : [
|
||||||
{
|
{
|
||||||
"name" : "Extraction Point",
|
"name" : "Jumpgate",
|
||||||
"type" : "ET_EXTRACTION_POINT",
|
"type" : "ET_JUMPGATE",
|
||||||
"x" : 25,
|
"x" : 25,
|
||||||
"y" : 25
|
"y" : 25
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,8 +107,8 @@
|
||||||
],
|
],
|
||||||
"entities" : [
|
"entities" : [
|
||||||
{
|
{
|
||||||
"name" : "Extraction Point",
|
"name" : "Jumpgate",
|
||||||
"type" : "ET_EXTRACTION_POINT",
|
"type" : "ET_JUMPGATE",
|
||||||
"x" : 25,
|
"x" : 25,
|
||||||
"y" : 25
|
"y" : 25
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,8 +142,8 @@
|
||||||
],
|
],
|
||||||
"entities" : [
|
"entities" : [
|
||||||
{
|
{
|
||||||
"name" : "Extraction Point",
|
"name" : "Jumpgate",
|
||||||
"type" : "ET_EXTRACTION_POINT",
|
"type" : "ET_JUMPGATE",
|
||||||
"x" : 10,
|
"x" : 10,
|
||||||
"y" : 10
|
"y" : 10
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@
|
||||||
"ACTIVATE_ENTITY_GROUPS Pandorans-1",
|
"ACTIVATE_ENTITY_GROUPS Pandorans-1",
|
||||||
"ACTIVATE_OBJECTIVES Destroy Pandoran fighters",
|
"ACTIVATE_OBJECTIVES Destroy Pandoran fighters",
|
||||||
"MSG_BOX Koonan;Enemy craft detected. Pandorans, in both INF and UNF fighters.",
|
"MSG_BOX Koonan;Enemy craft detected. Pandorans, in both INF and UNF fighters.",
|
||||||
"MSG_BOX de Winter;Chaz, you're with me. Wiley, you and your boys get those civilians to the extraction point."
|
"MSG_BOX de Winter;Chaz, you're with me. Wiley, you and your boys get those civilians to the jumpgate."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 13 KiB |
Binary file not shown.
After Width: | Height: | Size: 214 KiB |
|
@ -33,8 +33,8 @@ static void fallback(void);
|
||||||
static void moveToPlayer(void);
|
static void moveToPlayer(void);
|
||||||
static int canAttack(Entity *e);
|
static int canAttack(Entity *e);
|
||||||
static int selectWeapon(int type);
|
static int selectWeapon(int type);
|
||||||
static int nearExtractionPoint(void);
|
static int nearJumpgate(void);
|
||||||
static void moveToExtractionPoint(void);
|
static void moveToJumpgate(void);
|
||||||
static int nearEnemies(void);
|
static int nearEnemies(void);
|
||||||
static int nearItems(void);
|
static int nearItems(void);
|
||||||
static void moveToItem(void);
|
static void moveToItem(void);
|
||||||
|
@ -63,9 +63,9 @@ void doAI(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((self->aiFlags & AIF_GOAL_EXTRACTION) && nearExtractionPoint())
|
if ((self->aiFlags & AIF_GOAL_JUMPGATE) && nearJumpgate())
|
||||||
{
|
{
|
||||||
/* near extraction point, but you might decide to continue to fight, anyway */
|
/* near jumpgate point, but you might decide to continue to fight, anyway */
|
||||||
if ((self->aiFlags & AIF_COVERS_RETREAT) && rand() % 3)
|
if ((self->aiFlags & AIF_COVERS_RETREAT) && rand() % 3)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -534,7 +534,7 @@ static int isRetreating(void)
|
||||||
|
|
||||||
self->aiFlags |= AIF_AVOIDS_COMBAT;
|
self->aiFlags |= AIF_AVOIDS_COMBAT;
|
||||||
self->aiFlags |= AIF_UNLIMITED_RANGE;
|
self->aiFlags |= AIF_UNLIMITED_RANGE;
|
||||||
self->aiFlags |= AIF_GOAL_EXTRACTION;
|
self->aiFlags |= AIF_GOAL_JUMPGATE;
|
||||||
|
|
||||||
addHudMessage(colors.red, _("%s is retreating!"), self->name);
|
addHudMessage(colors.red, _("%s is retreating!"), self->name);
|
||||||
|
|
||||||
|
@ -627,20 +627,20 @@ static void moveToPlayer(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nearExtractionPoint(void)
|
static int nearJumpgate(void)
|
||||||
{
|
{
|
||||||
int dist;
|
int dist;
|
||||||
|
|
||||||
self->target = NULL;
|
self->target = NULL;
|
||||||
|
|
||||||
if (battle.extractionPoint)
|
if (battle.jumpgate)
|
||||||
{
|
{
|
||||||
dist = getDistance(self->x, self->y, battle.extractionPoint->x, battle.extractionPoint->y);
|
dist = getDistance(self->x, self->y, battle.jumpgate->x, battle.jumpgate->y);
|
||||||
|
|
||||||
if (dist <= 2000 || self->aiFlags & AIF_UNLIMITED_RANGE)
|
if (dist <= 2000 || self->aiFlags & AIF_UNLIMITED_RANGE)
|
||||||
{
|
{
|
||||||
self->target = battle.extractionPoint;
|
self->target = battle.jumpgate;
|
||||||
self->action = moveToExtractionPoint;
|
self->action = moveToJumpgate;
|
||||||
self->aiActionTime = (!self->towing) ? FPS / 2 : FPS * 2;
|
self->aiActionTime = (!self->towing) ? FPS / 2 : FPS * 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -648,7 +648,7 @@ static int nearExtractionPoint(void)
|
||||||
return self->target != NULL;
|
return self->target != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void moveToExtractionPoint(void)
|
static void moveToJumpgate(void)
|
||||||
{
|
{
|
||||||
faceTarget(self->target);
|
faceTarget(self->target);
|
||||||
|
|
||||||
|
|
|
@ -537,15 +537,15 @@ void updateCapitalShipComponentProperties(Entity *parent)
|
||||||
switch (e->type)
|
switch (e->type)
|
||||||
{
|
{
|
||||||
case ET_CAPITAL_SHIP_ENGINE:
|
case ET_CAPITAL_SHIP_ENGINE:
|
||||||
sprintf(e->name, "%s (Engine)", parent->name);
|
sprintf(e->name, _("%s (Engine)"), parent->name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ET_CAPITAL_SHIP_COMPONENT:
|
case ET_CAPITAL_SHIP_COMPONENT:
|
||||||
sprintf(e->name, "%s (Component)", parent->name);
|
sprintf(e->name, _("%s (Component)"), parent->name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ET_CAPITAL_SHIP_GUN:
|
case ET_CAPITAL_SHIP_GUN:
|
||||||
sprintf(e->name, "%s (Gun)", parent->name);
|
sprintf(e->name, _("%s (Gun)"), parent->name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ extern void runScriptFunction(char *format, ...);
|
||||||
extern void updateObjective(char *name, int type);
|
extern void updateObjective(char *name, int type);
|
||||||
extern char **getFileList(char *dir, int *count);
|
extern char **getFileList(char *dir, int *count);
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
||||||
|
extern char *getTranslatedString(char *string);
|
||||||
|
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
extern Entity *self;
|
extern Entity *self;
|
||||||
|
|
|
@ -585,7 +585,7 @@ void retreatAllies(void)
|
||||||
|
|
||||||
e->aiFlags |= AIF_AVOIDS_COMBAT;
|
e->aiFlags |= AIF_AVOIDS_COMBAT;
|
||||||
e->aiFlags |= AIF_UNLIMITED_RANGE;
|
e->aiFlags |= AIF_UNLIMITED_RANGE;
|
||||||
e->aiFlags |= AIF_GOAL_EXTRACTION;
|
e->aiFlags |= AIF_GOAL_JUMPGATE;
|
||||||
e->aiFlags &= ~AIF_FOLLOWS_PLAYER;
|
e->aiFlags &= ~AIF_FOLLOWS_PLAYER;
|
||||||
e->aiFlags &= ~AIF_MOVES_TO_PLAYER;
|
e->aiFlags &= ~AIF_MOVES_TO_PLAYER;
|
||||||
}
|
}
|
||||||
|
|
|
@ -326,7 +326,7 @@ static void drawPlayerTargeter(void)
|
||||||
float angle;
|
float angle;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
if (player->target || battle.missionTarget || battle.extractionPoint)
|
if (player->target || battle.missionTarget || battle.jumpgate)
|
||||||
{
|
{
|
||||||
if (player->target)
|
if (player->target)
|
||||||
{
|
{
|
||||||
|
@ -372,9 +372,9 @@ static void drawPlayerTargeter(void)
|
||||||
blitRotated(targetPointer, x - battle.camera.x, y - battle.camera.y, angle);
|
blitRotated(targetPointer, x - battle.camera.x, y - battle.camera.y, angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (battle.extractionPoint)
|
if (battle.jumpgate)
|
||||||
{
|
{
|
||||||
angle = getAngle(player->x, player->y, battle.extractionPoint->x, battle.extractionPoint->y);
|
angle = getAngle(player->x, player->y, battle.jumpgate->x, battle.jumpgate->y);
|
||||||
x = player->x;
|
x = player->x;
|
||||||
y = player->y;
|
y = player->y;
|
||||||
|
|
||||||
|
@ -467,11 +467,11 @@ static void drawDistancesInfo(void)
|
||||||
y += 25;
|
y += 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (battle.extractionPoint != NULL)
|
if (battle.jumpgate != NULL)
|
||||||
{
|
{
|
||||||
distance = distanceToKM(player->x, player->y, battle.extractionPoint->x, battle.extractionPoint->y);
|
distance = distanceToKM(player->x, player->y, battle.jumpgate->x, battle.jumpgate->y);
|
||||||
|
|
||||||
drawText(SCREEN_WIDTH - 15, y, 14, TA_RIGHT, colors.yellow, _("Extraction Point: %.2fkm"), distance);
|
drawText(SCREEN_WIDTH - 15, y, 14, TA_RIGHT, colors.yellow, _("Jumpgate: %.2fkm"), distance);
|
||||||
|
|
||||||
y += 25;
|
y += 25;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,30 +18,30 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "extractionPoint.h"
|
#include "jumpgate.h"
|
||||||
|
|
||||||
static void think(void);
|
static void think(void);
|
||||||
static void handleFleeingEntities(void);
|
static void handleFleeingEntities(void);
|
||||||
static void addEscapeEffect(Entity *ent);
|
static void addEscapeEffect(Entity *ent);
|
||||||
|
|
||||||
Entity *spawnExtractionPoint(void)
|
Entity *spawnJumpgate(void)
|
||||||
{
|
{
|
||||||
Entity *extractionPoint = spawnEntity();
|
Entity *jumpgate = spawnEntity();
|
||||||
|
|
||||||
extractionPoint->type = ET_EXTRACTION_POINT;
|
jumpgate->type = ET_JUMPGATE;
|
||||||
extractionPoint->health = extractionPoint->maxHealth = FPS;
|
jumpgate->health = jumpgate->maxHealth = FPS;
|
||||||
extractionPoint->texture = getTexture("gfx/entities/extractionPoint.png");
|
jumpgate->texture = getTexture("gfx/entities/jumpgate.png");
|
||||||
extractionPoint->action = think;
|
jumpgate->action = think;
|
||||||
extractionPoint->flags |= EF_NO_MT_BOX;
|
jumpgate->flags |= EF_NO_MT_BOX;
|
||||||
|
|
||||||
return extractionPoint;
|
return jumpgate;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void think(void)
|
static void think(void)
|
||||||
{
|
{
|
||||||
self->thinkTime = 4;
|
self->thinkTime = 4;
|
||||||
|
|
||||||
self->angle++;
|
self->angle += 0.1;
|
||||||
if (self->angle >= 360)
|
if (self->angle >= 360)
|
||||||
{
|
{
|
||||||
self->angle -= 360;
|
self->angle -= 360;
|
||||||
|
@ -49,7 +49,7 @@ static void think(void)
|
||||||
|
|
||||||
handleFleeingEntities();
|
handleFleeingEntities();
|
||||||
|
|
||||||
battle.extractionPoint = self;
|
battle.jumpgate = self;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handleFleeingEntities(void)
|
static void handleFleeingEntities(void)
|
|
@ -174,7 +174,7 @@ static void drawChallenges(void)
|
||||||
{
|
{
|
||||||
y+= 50;
|
y+= 50;
|
||||||
|
|
||||||
drawText(SCREEN_WIDTH / 2, y, 20, TA_CENTER, colors.white, "Time Limit: %s", timeToString(game.currentMission->challengeData.timeLimit, 0));
|
drawText(SCREEN_WIDTH / 2, y, 20, TA_CENTER, colors.white, _("Time Limit: %s"), timeToString(game.currentMission->challengeData.timeLimit, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
y += 25;
|
y += 25;
|
||||||
|
|
|
@ -40,7 +40,7 @@ void attachRope(void)
|
||||||
self->towing = e;
|
self->towing = e;
|
||||||
e->owner = self;
|
e->owner = self;
|
||||||
|
|
||||||
self->aiFlags |= AIF_GOAL_EXTRACTION;
|
self->aiFlags |= AIF_GOAL_JUMPGATE;
|
||||||
|
|
||||||
e->flags |= EF_RETREATING;
|
e->flags |= EF_RETREATING;
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ void cutRope(Entity *e)
|
||||||
if (e->owner && e->owner->towing == e)
|
if (e->owner && e->owner->towing == e)
|
||||||
{
|
{
|
||||||
e->owner->towing = NULL;
|
e->owner->towing = NULL;
|
||||||
e->owner->aiFlags &= ~AIF_GOAL_EXTRACTION;
|
e->owner->aiFlags &= ~AIF_GOAL_JUMPGATE;
|
||||||
e->owner = NULL;
|
e->owner = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#define AIF_COLLECTS_ITEMS (2 << 3)
|
#define AIF_COLLECTS_ITEMS (2 << 3)
|
||||||
#define AIF_TOWS (2 << 4)
|
#define AIF_TOWS (2 << 4)
|
||||||
#define AIF_RETREATS (2 << 5)
|
#define AIF_RETREATS (2 << 5)
|
||||||
#define AIF_GOAL_EXTRACTION (2 << 6)
|
#define AIF_GOAL_JUMPGATE (2 << 6)
|
||||||
#define AIF_AVOIDS_COMBAT (2 << 7)
|
#define AIF_AVOIDS_COMBAT (2 << 7)
|
||||||
#define AIF_DEFENSIVE (2 << 8)
|
#define AIF_DEFENSIVE (2 << 8)
|
||||||
#define AIF_MISSILE_BOAT (2 << 9)
|
#define AIF_MISSILE_BOAT (2 << 9)
|
||||||
|
@ -146,7 +146,7 @@ enum
|
||||||
ET_FIGHTER,
|
ET_FIGHTER,
|
||||||
ET_ITEM,
|
ET_ITEM,
|
||||||
ET_WAYPOINT,
|
ET_WAYPOINT,
|
||||||
ET_EXTRACTION_POINT,
|
ET_JUMPGATE,
|
||||||
ET_CAPITAL_SHIP_GUN,
|
ET_CAPITAL_SHIP_GUN,
|
||||||
ET_CAPITAL_SHIP_COMPONENT,
|
ET_CAPITAL_SHIP_COMPONENT,
|
||||||
ET_CAPITAL_SHIP_ENGINE,
|
ET_CAPITAL_SHIP_ENGINE,
|
||||||
|
|
|
@ -589,8 +589,8 @@ static void loadEntities(cJSON *node)
|
||||||
e = spawnWaypoint();
|
e = spawnWaypoint();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ET_EXTRACTION_POINT:
|
case ET_JUMPGATE:
|
||||||
e = spawnExtractionPoint();
|
e = spawnJumpgate();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -37,7 +37,7 @@ extern long flagsToLong(char *flags, int *add);
|
||||||
extern Entity *spawnWaypoint(void);
|
extern Entity *spawnWaypoint(void);
|
||||||
extern void activateNextWaypoint(void);
|
extern void activateNextWaypoint(void);
|
||||||
extern void selectWidget(const char *name, const char *group);
|
extern void selectWidget(const char *name, const char *group);
|
||||||
extern Entity *spawnExtractionPoint(void);
|
extern Entity *spawnJumpgate(void);
|
||||||
extern Entity *spawnItem(char *type);
|
extern Entity *spawnItem(char *type);
|
||||||
extern void failIncompleteObjectives(void);
|
extern void failIncompleteObjectives(void);
|
||||||
extern void completeConditions(void);
|
extern void completeConditions(void);
|
||||||
|
|
|
@ -320,7 +320,7 @@ typedef struct {
|
||||||
int numPlayerGuns;
|
int numPlayerGuns;
|
||||||
int numObjectivesComplete, numObjectivesTotal;
|
int numObjectivesComplete, numObjectivesTotal;
|
||||||
Entity *missionTarget;
|
Entity *missionTarget;
|
||||||
Entity *extractionPoint;
|
Entity *jumpgate;
|
||||||
SDL_Texture *background, *planetTexture;
|
SDL_Texture *background, *planetTexture;
|
||||||
PointF planet;
|
PointF planet;
|
||||||
int planetWidth, planetHeight;
|
int planetWidth, planetHeight;
|
||||||
|
|
|
@ -43,7 +43,7 @@ void initLookups(void)
|
||||||
addLookup("CONTROL_PREV_FIGHTER", CONTROL_PREV_FIGHTER);
|
addLookup("CONTROL_PREV_FIGHTER", CONTROL_PREV_FIGHTER);
|
||||||
|
|
||||||
addLookup("ET_WAYPOINT", ET_WAYPOINT);
|
addLookup("ET_WAYPOINT", ET_WAYPOINT);
|
||||||
addLookup("ET_EXTRACTION_POINT", ET_EXTRACTION_POINT);
|
addLookup("ET_JUMPGATE", ET_JUMPGATE);
|
||||||
addLookup("ET_CAPITAL_SHIP", ET_CAPITAL_SHIP);
|
addLookup("ET_CAPITAL_SHIP", ET_CAPITAL_SHIP);
|
||||||
|
|
||||||
addLookup("EF_NO_KILL", EF_NO_KILL);
|
addLookup("EF_NO_KILL", EF_NO_KILL);
|
||||||
|
@ -68,7 +68,7 @@ void initLookups(void)
|
||||||
addLookup("AIF_COLLECTS_ITEMS", AIF_COLLECTS_ITEMS);
|
addLookup("AIF_COLLECTS_ITEMS", AIF_COLLECTS_ITEMS);
|
||||||
addLookup("AIF_TOWS", AIF_TOWS);
|
addLookup("AIF_TOWS", AIF_TOWS);
|
||||||
addLookup("AIF_RETREATS", AIF_RETREATS);
|
addLookup("AIF_RETREATS", AIF_RETREATS);
|
||||||
addLookup("AIF_GOAL_EXTRACTION", AIF_GOAL_EXTRACTION);
|
addLookup("AIF_GOAL_JUMPGATE", AIF_GOAL_JUMPGATE);
|
||||||
addLookup("AIF_AVOIDS_COMBAT", AIF_AVOIDS_COMBAT);
|
addLookup("AIF_AVOIDS_COMBAT", AIF_AVOIDS_COMBAT);
|
||||||
addLookup("AIF_DEFENSIVE", AIF_DEFENSIVE);
|
addLookup("AIF_DEFENSIVE", AIF_DEFENSIVE);
|
||||||
addLookup("AIF_MISSILE_BOAT", AIF_MISSILE_BOAT);
|
addLookup("AIF_MISSILE_BOAT", AIF_MISSILE_BOAT);
|
||||||
|
|
Loading…
Reference in New Issue