diff --git a/common.mk b/common.mk index 34c4b31..ebd2cba 100644 --- a/common.mk +++ b/common.mk @@ -12,11 +12,12 @@ OBJS += ai.o OBJS += battle.o bullets.o OBJS += capitalShips.o challengeHome.o challenges.o cJSON.o controls.o OBJS += debris.o dev.o draw.o -OBJS += effects.o entities.o extractionPoint.o +OBJS += effects.o entities.o OBJS += fighters.o OBJS += galacticMap.o game.o OBJS += hud.o OBJS += i18n.o init.o input.o io.o items.o +OBJS += jumpgate.o OBJS += load.o locations.o lookup.o OBJS += main.o messageBox.o mission.o missionInfo.o modalDialog.o OBJS += objectives.o options.o diff --git a/data/challenges/08.json b/data/challenges/08.json index a0a4eb5..c88db75 100644 --- a/data/challenges/08.json +++ b/data/challenges/08.json @@ -1,6 +1,6 @@ { - "name" : "Defend Extraction Point", - "description" : "Defend Extraction Point", + "name" : "Defend Jumpgate Point", + "description" : "Defend Jumpgate Point", "background" : "AUTO", "planet" : "AUTO", "music" : "AUTO", @@ -41,12 +41,12 @@ "scatter" : 5000, "number" : 12, "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" : [ { - "type" : "ET_EXTRACTION_POINT", + "type" : "ET_JUMPGATE", "x" : 25.1, "y" : 25.1 } diff --git a/data/craft/civilian.json b/data/craft/civilian.json index 0db94cc..8e81ac6 100644 --- a/data/craft/civilian.json +++ b/data/craft/civilian.json @@ -7,5 +7,5 @@ "shieldRechargeRate" : 0, "texture" : "gfx/craft/civilian01.png", "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" } diff --git a/data/missions/coyote/03 - coyote assault #3.json b/data/missions/coyote/03 - coyote assault #3.json index 920c2fc..c53056c 100644 --- a/data/missions/coyote/03 - coyote assault #3.json +++ b/data/missions/coyote/03 - coyote assault #3.json @@ -16,7 +16,7 @@ "targetType" : "TT_DESTROY" }, { - "description" : "Retreat to extraction point", + "description" : "Retreat to jumpgate", "targetName" : "Player", "targetValue" : 1, "targetType" : "TT_ESCAPED", @@ -70,8 +70,8 @@ ], "entities" : [ { - "name" : "Extraction Point", - "type" : "ET_EXTRACTION_POINT", + "name" : "Jumpgate", + "type" : "ET_JUMPGATE", "x" : 25, "y" : 25, "active" : 0 @@ -94,12 +94,12 @@ { "function" : "ALLIES_KILLED 90", "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 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.", "WAIT_MSG_BOX", - "ACTIVATE_ENTITIES Extraction Point", + "ACTIVATE_ENTITIES Jumpgate", "RETREAT_ALLIES" ] } diff --git a/data/missions/granada/02 - suspect packages #2.json b/data/missions/granada/02 - suspect packages #2.json index 12aa84f..264f2e9 100644 --- a/data/missions/granada/02 - suspect packages #2.json +++ b/data/missions/granada/02 - suspect packages #2.json @@ -106,8 +106,8 @@ "active" : 0 }, { - "name" : "Extraction Point", - "type" : "ET_EXTRACTION_POINT", + "name" : "Jumpgate", + "type" : "ET_JUMPGATE", "x" : 10, "y" : 8, "active" : 0 @@ -153,7 +153,7 @@ "WAIT 2", "MSG_BOX Tug;Tow cable attached. Ready to head home.", "MSG_BOX Carr;We're done here. Let's bring our mystery guest in.", - "ACTIVATE_ENTITIES Extraction Point", + "ACTIVATE_ENTITIES Jumpgate", "WAIT 20", "ACTIVATE_ENTITIES Dart", "ACTIVATE_OBJECTIVES Destroy intercepting Darts", diff --git a/data/missions/temper/03 - pirate uprising #3.json b/data/missions/temper/03 - pirate uprising #3.json index 53accb4..450e91f 100644 --- a/data/missions/temper/03 - pirate uprising #3.json +++ b/data/missions/temper/03 - pirate uprising #3.json @@ -71,8 +71,8 @@ ], "entities" : [ { - "name" : "Extraction Point", - "type" : "ET_EXTRACTION_POINT", + "name" : "Jumpgate", + "type" : "ET_JUMPGATE", "x" : 26, "y" : 25 } diff --git a/data/missions/temper/04 - pirate uprising #4.json b/data/missions/temper/04 - pirate uprising #4.json index 41efa17..637296d 100644 --- a/data/missions/temper/04 - pirate uprising #4.json +++ b/data/missions/temper/04 - pirate uprising #4.json @@ -74,8 +74,8 @@ ], "entities" : [ { - "name" : "Extraction Point", - "type" : "ET_EXTRACTION_POINT", + "name" : "Jumpgate", + "type" : "ET_JUMPGATE", "x" : 8, "y" : 25 } @@ -84,7 +84,7 @@ { "function" : "TIME 1", "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 ." ] } ] diff --git a/data/missions/warro/01 - evacuation #1.json b/data/missions/warro/01 - evacuation #1.json index ddebf90..db61742 100644 --- a/data/missions/warro/01 - evacuation #1.json +++ b/data/missions/warro/01 - evacuation #1.json @@ -50,8 +50,8 @@ ], "entities" : [ { - "name" : "Extraction Point", - "type" : "ET_EXTRACTION_POINT", + "name" : "Jumpgate", + "type" : "ET_JUMPGATE", "x" : 25, "y" : 25 } @@ -60,7 +60,7 @@ { "function" : "TIME 1", "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." ] } diff --git a/data/missions/warro/02 - evacuation #2.json b/data/missions/warro/02 - evacuation #2.json index 0f4cc9c..682721b 100644 --- a/data/missions/warro/02 - evacuation #2.json +++ b/data/missions/warro/02 - evacuation #2.json @@ -99,8 +99,8 @@ ], "entities" : [ { - "name" : "Extraction Point", - "type" : "ET_EXTRACTION_POINT", + "name" : "Jumpgate", + "type" : "ET_JUMPGATE", "x" : 25, "y" : 25 } diff --git a/data/missions/warro/03 - evacuation #3.json b/data/missions/warro/03 - evacuation #3.json index f6c06b5..203f6ae 100644 --- a/data/missions/warro/03 - evacuation #3.json +++ b/data/missions/warro/03 - evacuation #3.json @@ -107,8 +107,8 @@ ], "entities" : [ { - "name" : "Extraction Point", - "type" : "ET_EXTRACTION_POINT", + "name" : "Jumpgate", + "type" : "ET_JUMPGATE", "x" : 25, "y" : 25 } diff --git a/data/missions/warro/04 - evacuation #4.json b/data/missions/warro/04 - evacuation #4.json index edb76da..250bc26 100644 --- a/data/missions/warro/04 - evacuation #4.json +++ b/data/missions/warro/04 - evacuation #4.json @@ -142,8 +142,8 @@ ], "entities" : [ { - "name" : "Extraction Point", - "type" : "ET_EXTRACTION_POINT", + "name" : "Jumpgate", + "type" : "ET_JUMPGATE", "x" : 10, "y" : 10 } @@ -177,7 +177,7 @@ "ACTIVATE_ENTITY_GROUPS Pandorans-1", "ACTIVATE_OBJECTIVES Destroy Pandoran 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." ] }, { diff --git a/gfx/entities/extractionPoint.png b/gfx/entities/extractionPoint.png deleted file mode 100644 index c288278..0000000 Binary files a/gfx/entities/extractionPoint.png and /dev/null differ diff --git a/gfx/entities/jumpgate.png b/gfx/entities/jumpgate.png new file mode 100644 index 0000000..6da1c61 Binary files /dev/null and b/gfx/entities/jumpgate.png differ diff --git a/src/battle/ai.c b/src/battle/ai.c index d43cc1d..dbd07f9 100644 --- a/src/battle/ai.c +++ b/src/battle/ai.c @@ -33,8 +33,8 @@ static void fallback(void); static void moveToPlayer(void); static int canAttack(Entity *e); static int selectWeapon(int type); -static int nearExtractionPoint(void); -static void moveToExtractionPoint(void); +static int nearJumpgate(void); +static void moveToJumpgate(void); static int nearEnemies(void); static int nearItems(void); static void moveToItem(void); @@ -63,9 +63,9 @@ void doAI(void) 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) { return; @@ -534,7 +534,7 @@ static int isRetreating(void) self->aiFlags |= AIF_AVOIDS_COMBAT; self->aiFlags |= AIF_UNLIMITED_RANGE; - self->aiFlags |= AIF_GOAL_EXTRACTION; + self->aiFlags |= AIF_GOAL_JUMPGATE; 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; 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) { - self->target = battle.extractionPoint; - self->action = moveToExtractionPoint; + self->target = battle.jumpgate; + self->action = moveToJumpgate; self->aiActionTime = (!self->towing) ? FPS / 2 : FPS * 2; } } @@ -648,7 +648,7 @@ static int nearExtractionPoint(void) return self->target != NULL; } -static void moveToExtractionPoint(void) +static void moveToJumpgate(void) { faceTarget(self->target); diff --git a/src/battle/capitalShips.c b/src/battle/capitalShips.c index 555f12a..919a29b 100644 --- a/src/battle/capitalShips.c +++ b/src/battle/capitalShips.c @@ -537,15 +537,15 @@ void updateCapitalShipComponentProperties(Entity *parent) switch (e->type) { case ET_CAPITAL_SHIP_ENGINE: - sprintf(e->name, "%s (Engine)", parent->name); + sprintf(e->name, _("%s (Engine)"), parent->name); break; case ET_CAPITAL_SHIP_COMPONENT: - sprintf(e->name, "%s (Component)", parent->name); + sprintf(e->name, _("%s (Component)"), parent->name); break; case ET_CAPITAL_SHIP_GUN: - sprintf(e->name, "%s (Gun)", parent->name); + sprintf(e->name, _("%s (Gun)"), parent->name); break; } diff --git a/src/battle/capitalShips.h b/src/battle/capitalShips.h index f24ee88..88fd79a 100644 --- a/src/battle/capitalShips.h +++ b/src/battle/capitalShips.h @@ -47,6 +47,7 @@ extern void runScriptFunction(char *format, ...); extern void updateObjective(char *name, int type); extern char **getFileList(char *dir, int *count); extern int getJSONValue(cJSON *node, char *name, int defValue); +extern char *getTranslatedString(char *string); extern Battle battle; extern Entity *self; diff --git a/src/battle/fighters.c b/src/battle/fighters.c index dc03edd..9e0b89c 100644 --- a/src/battle/fighters.c +++ b/src/battle/fighters.c @@ -585,7 +585,7 @@ void retreatAllies(void) e->aiFlags |= AIF_AVOIDS_COMBAT; e->aiFlags |= AIF_UNLIMITED_RANGE; - e->aiFlags |= AIF_GOAL_EXTRACTION; + e->aiFlags |= AIF_GOAL_JUMPGATE; e->aiFlags &= ~AIF_FOLLOWS_PLAYER; e->aiFlags &= ~AIF_MOVES_TO_PLAYER; } diff --git a/src/battle/hud.c b/src/battle/hud.c index a926948..54bb234 100644 --- a/src/battle/hud.c +++ b/src/battle/hud.c @@ -326,7 +326,7 @@ static void drawPlayerTargeter(void) float angle; int x, y; - if (player->target || battle.missionTarget || battle.extractionPoint) + if (player->target || battle.missionTarget || battle.jumpgate) { if (player->target) { @@ -372,9 +372,9 @@ static void drawPlayerTargeter(void) 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; y = player->y; @@ -467,11 +467,11 @@ static void drawDistancesInfo(void) 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; } diff --git a/src/battle/extractionPoint.c b/src/battle/jumpgate.c similarity index 82% rename from src/battle/extractionPoint.c rename to src/battle/jumpgate.c index c8d1b20..afd5558 100644 --- a/src/battle/extractionPoint.c +++ b/src/battle/jumpgate.c @@ -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 handleFleeingEntities(void); static void addEscapeEffect(Entity *ent); -Entity *spawnExtractionPoint(void) +Entity *spawnJumpgate(void) { - Entity *extractionPoint = spawnEntity(); + Entity *jumpgate = spawnEntity(); - extractionPoint->type = ET_EXTRACTION_POINT; - extractionPoint->health = extractionPoint->maxHealth = FPS; - extractionPoint->texture = getTexture("gfx/entities/extractionPoint.png"); - extractionPoint->action = think; - extractionPoint->flags |= EF_NO_MT_BOX; + jumpgate->type = ET_JUMPGATE; + jumpgate->health = jumpgate->maxHealth = FPS; + jumpgate->texture = getTexture("gfx/entities/jumpgate.png"); + jumpgate->action = think; + jumpgate->flags |= EF_NO_MT_BOX; - return extractionPoint; + return jumpgate; } static void think(void) { self->thinkTime = 4; - self->angle++; + self->angle += 0.1; if (self->angle >= 360) { self->angle -= 360; @@ -49,7 +49,7 @@ static void think(void) handleFleeingEntities(); - battle.extractionPoint = self; + battle.jumpgate = self; } static void handleFleeingEntities(void) diff --git a/src/battle/extractionPoint.h b/src/battle/jumpgate.h similarity index 100% rename from src/battle/extractionPoint.h rename to src/battle/jumpgate.h diff --git a/src/battle/missionInfo.c b/src/battle/missionInfo.c index 36a5378..62970a9 100644 --- a/src/battle/missionInfo.c +++ b/src/battle/missionInfo.c @@ -174,7 +174,7 @@ static void drawChallenges(void) { 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; diff --git a/src/battle/rope.c b/src/battle/rope.c index 1970dac..d43dc47 100644 --- a/src/battle/rope.c +++ b/src/battle/rope.c @@ -40,7 +40,7 @@ void attachRope(void) self->towing = e; e->owner = self; - self->aiFlags |= AIF_GOAL_EXTRACTION; + self->aiFlags |= AIF_GOAL_JUMPGATE; e->flags |= EF_RETREATING; @@ -98,7 +98,7 @@ void cutRope(Entity *e) if (e->owner && e->owner->towing == e) { e->owner->towing = NULL; - e->owner->aiFlags &= ~AIF_GOAL_EXTRACTION; + e->owner->aiFlags &= ~AIF_GOAL_JUMPGATE; e->owner = NULL; } } diff --git a/src/defs.h b/src/defs.h index 1046787..17ff32a 100644 --- a/src/defs.h +++ b/src/defs.h @@ -102,7 +102,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define AIF_COLLECTS_ITEMS (2 << 3) #define AIF_TOWS (2 << 4) #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_DEFENSIVE (2 << 8) #define AIF_MISSILE_BOAT (2 << 9) @@ -146,7 +146,7 @@ enum ET_FIGHTER, ET_ITEM, ET_WAYPOINT, - ET_EXTRACTION_POINT, + ET_JUMPGATE, ET_CAPITAL_SHIP_GUN, ET_CAPITAL_SHIP_COMPONENT, ET_CAPITAL_SHIP_ENGINE, diff --git a/src/galaxy/mission.c b/src/galaxy/mission.c index 769a770..b50eff3 100644 --- a/src/galaxy/mission.c +++ b/src/galaxy/mission.c @@ -589,8 +589,8 @@ static void loadEntities(cJSON *node) e = spawnWaypoint(); break; - case ET_EXTRACTION_POINT: - e = spawnExtractionPoint(); + case ET_JUMPGATE: + e = spawnJumpgate(); break; default: diff --git a/src/galaxy/mission.h b/src/galaxy/mission.h index 0065998..cbdcd6e 100644 --- a/src/galaxy/mission.h +++ b/src/galaxy/mission.h @@ -37,7 +37,7 @@ extern long flagsToLong(char *flags, int *add); extern Entity *spawnWaypoint(void); extern void activateNextWaypoint(void); extern void selectWidget(const char *name, const char *group); -extern Entity *spawnExtractionPoint(void); +extern Entity *spawnJumpgate(void); extern Entity *spawnItem(char *type); extern void failIncompleteObjectives(void); extern void completeConditions(void); diff --git a/src/structs.h b/src/structs.h index d6a637d..fd8a897 100644 --- a/src/structs.h +++ b/src/structs.h @@ -320,7 +320,7 @@ typedef struct { int numPlayerGuns; int numObjectivesComplete, numObjectivesTotal; Entity *missionTarget; - Entity *extractionPoint; + Entity *jumpgate; SDL_Texture *background, *planetTexture; PointF planet; int planetWidth, planetHeight; diff --git a/src/system/lookup.c b/src/system/lookup.c index db2779b..0f146ca 100644 --- a/src/system/lookup.c +++ b/src/system/lookup.c @@ -43,7 +43,7 @@ void initLookups(void) addLookup("CONTROL_PREV_FIGHTER", CONTROL_PREV_FIGHTER); 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("EF_NO_KILL", EF_NO_KILL); @@ -68,7 +68,7 @@ void initLookups(void) addLookup("AIF_COLLECTS_ITEMS", AIF_COLLECTS_ITEMS); addLookup("AIF_TOWS", AIF_TOWS); 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_DEFENSIVE", AIF_DEFENSIVE); addLookup("AIF_MISSILE_BOAT", AIF_MISSILE_BOAT);