From c66b734e7e862f9b56042705b8cae39ff165b471 Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 11 Mar 2016 23:43:50 +0000 Subject: [PATCH 01/30] Added interval-based script events. --- src/battle/battle.c | 6 ++-- src/battle/battle.h | 1 + src/battle/script.c | 80 ++++++++++++++++++++++++++++++++++++++++++++- src/battle/script.h | 1 + 4 files changed, 83 insertions(+), 5 deletions(-) diff --git a/src/battle/battle.c b/src/battle/battle.c index 79c0692..62149b9 100644 --- a/src/battle/battle.c +++ b/src/battle/battle.c @@ -159,11 +159,9 @@ static void doBattle(void) { doScript(); - battle.stats[STAT_TIME]++; - - if (battle.stats[STAT_TIME] % FPS == 0) + if (battle.stats[STAT_TIME]++ % FPS == 0) { - runScriptFunction("TIME %d", battle.stats[STAT_TIME] / 60); + runScriptTimeFunctions(); } } } diff --git a/src/battle/battle.h b/src/battle/battle.h index c507df1..0662b49 100644 --- a/src/battle/battle.h +++ b/src/battle/battle.h @@ -84,6 +84,7 @@ extern void destroyEffects(void); extern void initChallengeHome(void); extern void updateAccuracyStats(unsigned int *stats); extern void clearInput(void); +extern void runScriptTimeFunctions(void); extern App app; extern Battle battle; diff --git a/src/battle/script.c b/src/battle/script.c index 6aafdb4..4cb3252 100644 --- a/src/battle/script.c +++ b/src/battle/script.c @@ -28,10 +28,24 @@ static ScriptRunner *tail; void initScript(cJSON *scriptNode) { + cJSON *function; + memset(&head, 0, sizeof(ScriptRunner)); tail = &head; scriptJSON = scriptNode; + + if (scriptJSON) + { + function = scriptJSON->child; + + while (function) + { + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Script Function: '%s'", cJSON_GetObjectItem(function, "function")->valuestring); + + function = function->next; + } + } } void doScript(void) @@ -110,11 +124,65 @@ void runScriptFunction(const char *format, ...) } } +void runScriptTimeFunctions(void) +{ + ScriptRunner *scriptRunner; + cJSON *function; + char *functionName; + char funcNameBuffer[MAX_NAME_LENGTH]; + int intParam; + + if (scriptJSON) + { + function = scriptJSON->child; + + sprintf(funcNameBuffer, "TIME %d", battle.stats[STAT_TIME] / 60); + + while (function) + { + functionName = cJSON_GetObjectItem(function, "function")->valuestring; + + if (strcmp(functionName, funcNameBuffer) == 0) + { + scriptRunner = malloc(sizeof(ScriptRunner)); + memset(scriptRunner, 0, sizeof(ScriptRunner)); + + scriptRunner->line = cJSON_GetObjectItem(function, "lines")->child; + + tail->next = scriptRunner; + tail = scriptRunner; + + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Running script '%s'", funcNameBuffer); + } + + if (strstr(functionName, "INTERVAL")) + { + sscanf(functionName, "%*s %d", &intParam); + + if ((battle.stats[STAT_TIME] / 60) % intParam == 0) + { + scriptRunner = malloc(sizeof(ScriptRunner)); + memset(scriptRunner, 0, sizeof(ScriptRunner)); + + scriptRunner->line = cJSON_GetObjectItem(function, "lines")->child; + + tail->next = scriptRunner; + tail = scriptRunner; + + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Running script '%s'", funcNameBuffer); + } + } + + function = function->next; + } + } +} + static void executeNextLine(ScriptRunner *runner) { char *line; char command[24]; - char strParam[2][256]; + char strParam[3][256]; int intParam[2]; line = runner->line->valuestring; @@ -183,6 +251,11 @@ static void executeNextLine(ScriptRunner *runner) battle.isEpic = 0; retreatEnemies(); } + else if (strcmp(command, "SPAWN_FIGHTERS") == 0) + { + sscanf(line, "%*s %s %s %d %s", strParam[0], strParam[1], &intParam[0], strParam[2]); + spawnScriptFighter(strParam[0], strParam[1], intParam[0], strParam[2]); + } else { printf("ERROR: Unrecognised script command '%s'\n", command); @@ -196,6 +269,11 @@ static void executeNextLine(ScriptRunner *runner) void destroyScript(void) { ScriptRunner *scriptRunner; + + if (scriptJSON) + { + cJSON_Delete(scriptJSON); + } while (head.next) { diff --git a/src/battle/script.h b/src/battle/script.h index aadcba0..acbceb6 100644 --- a/src/battle/script.h +++ b/src/battle/script.h @@ -34,6 +34,7 @@ extern void activateLocations(char *locations); void activateObjectives(char *objectives); extern int showingMessageBoxes(void); extern char *getTranslatedString(char *string); +extern void spawnScriptFighter(char *fighters, char *side, int num, char *location); extern Battle battle; extern Colors colors; From 3bd78dbd20ee3aac29903ec7ca78ff370f637006 Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 11 Mar 2016 23:45:12 +0000 Subject: [PATCH 02/30] Spawn fighters offscreen or off map. --- src/battle/fighters.c | 36 ++++++++++++++++++++++++++++++++++++ src/battle/fighters.h | 1 + src/system/util.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) diff --git a/src/battle/fighters.c b/src/battle/fighters.c index 4cf275a..11b1339 100644 --- a/src/battle/fighters.c +++ b/src/battle/fighters.c @@ -99,6 +99,42 @@ Entity *spawnFighter(char *name, int x, int y, int side) return e; } +void spawnScriptFighter(char *fighterTypes, char *sideStr, int num, char *location) +{ + Entity *e; + int i, numTypes, side, offscreen; + char **types, *type; + + types = toTypeArray(fighterTypes, &numTypes); + side = lookup(sideStr); + offscreen = strcmp(location, "OFFSCREEN") == 0; + + for (i = 0 ; i < num ; i++) + { + type = types[rand() % numTypes]; + + e = spawnFighter(type, 0, 0, side); + + if (offscreen) + { + e->x = player->x; + e->y = player->y; + } + else + { + e->x = rand() % 2 ? 0 : BATTLE_AREA_WIDTH; + e->y = rand() % 2 ? 0 : BATTLE_AREA_HEIGHT; + } + + e->x += (rand() % 2) ? -SCREEN_WIDTH : SCREEN_WIDTH; + e->y += (rand() % 2) ? -SCREEN_HEIGHT : SCREEN_HEIGHT; + + e->aiFlags |= AIF_UNLIMITED_RANGE; + } + + free(types); +} + static void randomizeDart(Entity *dart) { char texture[MAX_DESCRIPTION_LENGTH]; diff --git a/src/battle/fighters.h b/src/battle/fighters.h index 11c3600..c6394d5 100644 --- a/src/battle/fighters.h +++ b/src/battle/fighters.h @@ -47,6 +47,7 @@ extern void addDebris(int x, int y, int amount); extern char **getFileList(char *dir, int *count); extern char *getTranslatedString(char *string); extern int getJSONValue(cJSON *node, char *name, int defValue); +extern char **toTypeArray(char *types, int *numTypes); extern App app; extern Battle battle; diff --git a/src/system/util.c b/src/system/util.c index 982b45f..2d9f409 100644 --- a/src/system/util.c +++ b/src/system/util.c @@ -73,6 +73,38 @@ void getSlope(int x1, int y1, int x2, int y2, float *dx, float *dy) *dy /= steps; } +char **toTypeArray(char *types, int *numTypes) +{ + int i; + char **typeArray, *type; + + *numTypes = 1; + + for (i = 0 ; i < strlen(types) ; i++) + { + if (types[i] == ';') + { + *numTypes = *numTypes + 1; + } + } + + typeArray = malloc(*numTypes * sizeof(char*)); + + i = 0; + type = strtok(types, ";"); + while (type) + { + typeArray[i] = malloc(strlen(type) + 1); + strcpy(typeArray[i], type); + + type = strtok(NULL, ";"); + + i++; + } + + return typeArray; +} + char *timeToString(long millis, int showHours) { static char TIME[MAX_NAME_LENGTH]; From 4f27b40d97a201eb1dd42eccf3ff7d7358bb64ca Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 11 Mar 2016 23:45:47 +0000 Subject: [PATCH 03/30] Added rescue challenges --- src/battle/hud.c | 4 ++++ src/challenges/challenges.c | 6 ++++++ src/defs.h | 1 + src/galaxy/mission.c | 36 +----------------------------------- src/galaxy/mission.h | 1 + src/structs.h | 1 + src/system/lookup.c | 1 + 7 files changed, 15 insertions(+), 35 deletions(-) diff --git a/src/battle/hud.c b/src/battle/hud.c index 9fbdc0b..b98ffac 100644 --- a/src/battle/hud.c +++ b/src/battle/hud.c @@ -422,6 +422,10 @@ static void drawObjectives(void) { drawText(SCREEN_WIDTH / 2, 35, 14, TA_CENTER, colors.white, "%d / %d", battle.stats[STAT_ITEMS_COLLECTED] + battle.stats[STAT_ITEMS_COLLECTED_PLAYER], game.currentMission->challengeData.itemLimit); } + else if (game.currentMission->challengeData.rescueLimit) + { + drawText(SCREEN_WIDTH / 2, 35, 14, TA_CENTER, colors.white, "%d / %d", battle.stats[STAT_CIVILIANS_RESCUED], game.currentMission->challengeData.rescueLimit); + } } else { diff --git a/src/challenges/challenges.c b/src/challenges/challenges.c index 61180ee..27082ad 100644 --- a/src/challenges/challenges.c +++ b/src/challenges/challenges.c @@ -57,6 +57,7 @@ void initChallenges(void) challengeDescription[CHALLENGE_PLAYER_KILLS] = _("Take down %d enemy targets"); challengeDescription[CHALLENGE_DISABLE] = _("Disable %d or more enemy fighters"); challengeDescription[CHALLENGE_ITEMS] = _("Collect %d packages"); + challengeDescription[CHALLENGE_RESCUE] = _("Rescue %d civilians"); tail = &game.challengeMissionHead; @@ -128,6 +129,11 @@ static int challengeFinished(void) return 1; } + if (game.currentMission->challengeData.rescueLimit > 0 && (battle.stats[STAT_CIVILIANS_RESCUED] + battle.stats[STAT_CIVILIANS_KILLED]) >= game.currentMission->challengeData.rescueLimit) + { + return 1; + } + if (game.currentMission->challengeData.scriptedEnd) { return 1; diff --git a/src/defs.h b/src/defs.h index c92d365..eed8c23 100644 --- a/src/defs.h +++ b/src/defs.h @@ -292,6 +292,7 @@ enum CHALLENGE_PLAYER_KILLS, CHALLENGE_DISABLE, CHALLENGE_ITEMS, + CHALLENGE_RESCUE, CHALLENGE_MAX }; diff --git a/src/galaxy/mission.c b/src/galaxy/mission.c index b4789ee..ee89fb9 100644 --- a/src/galaxy/mission.c +++ b/src/galaxy/mission.c @@ -28,7 +28,6 @@ static void loadEntities(cJSON *node); static void loadItems(cJSON *node); static void loadLocations(cJSON *node); static unsigned long hashcode(const char *str); -static char **toTypeArray(char *types, int *numTypes); static void loadEpicData(cJSON *node); static char *getAutoBackground(char *filename); static char *getAutoPlanet(char *filename); @@ -87,6 +86,7 @@ Mission *loadMissionMeta(char *filename) mission->challengeData.escapeLimit = getJSONValue(node, "escapeLimit", 0); mission->challengeData.waypointLimit = getJSONValue(node, "waypointLimit", 0); mission->challengeData.itemLimit = getJSONValue(node, "itemLimit", 0); + mission->challengeData.rescueLimit = getJSONValue(node, "rescueLimit", 0); /* restrictions */ mission->challengeData.noMissiles = getJSONValue(node, "noMissiles", 0); @@ -197,8 +197,6 @@ void loadMission(char *filename) battle.planetHeight *= planetScale; srand(time(NULL)); - - cJSON_Delete(root); free(text); @@ -761,38 +759,6 @@ static void loadLocations(cJSON *node) } } -static char **toTypeArray(char *types, int *numTypes) -{ - int i; - char **typeArray, *type; - - *numTypes = 1; - - for (i = 0 ; i < strlen(types) ; i++) - { - if (types[i] == ';') - { - *numTypes = *numTypes + 1; - } - } - - typeArray = malloc(*numTypes * sizeof(char*)); - - i = 0; - type = strtok(types, ";"); - while (type) - { - typeArray[i] = malloc(strlen(type) + 1); - strcpy(typeArray[i], type); - - type = strtok(NULL, ";"); - - i++; - } - - return typeArray; -} - static void loadEpicData(cJSON *node) { Entity *e; diff --git a/src/galaxy/mission.h b/src/galaxy/mission.h index af2a4d9..998712e 100644 --- a/src/galaxy/mission.h +++ b/src/galaxy/mission.h @@ -55,6 +55,7 @@ extern char *getMusicFilename(int n); extern int getJSONValue(cJSON *node, char *name, int defValue); extern char *getJSONValueStr(cJSON *node, char *name, char *defValue); extern void addAllEntsToQuadtree(void); +extern char **toTypeArray(char *types, int *numTypes); extern Battle battle; extern Entity *player; diff --git a/src/structs.h b/src/structs.h index 2473231..334d792 100644 --- a/src/structs.h +++ b/src/structs.h @@ -251,6 +251,7 @@ typedef struct { int itemLimit; int escapeLimit; int waypointLimit; + int rescueLimit; int noMissiles; int noBoost; int noECM; diff --git a/src/system/lookup.c b/src/system/lookup.c index 3edf355..b2810b9 100644 --- a/src/system/lookup.c +++ b/src/system/lookup.c @@ -132,6 +132,7 @@ void initLookups(void) addLookup("CHALLENGE_PLAYER_KILLS", CHALLENGE_PLAYER_KILLS); addLookup("CHALLENGE_DISABLE", CHALLENGE_DISABLE); addLookup("CHALLENGE_ITEMS", CHALLENGE_ITEMS); + addLookup("CHALLENGE_RESCUE", CHALLENGE_RESCUE); addLookup("STAT_PERCENT_COMPLETE", STAT_PERCENT_COMPLETE); addLookup("STAT_MISSIONS_STARTED", STAT_MISSIONS_STARTED); From 4f19dcb9a58b5d0e6212fb302398ad0dc2686379 Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 11 Mar 2016 23:46:00 +0000 Subject: [PATCH 04/30] Added challenge #10. --- data/challenges/10.json | 60 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 data/challenges/10.json diff --git a/data/challenges/10.json b/data/challenges/10.json new file mode 100644 index 0000000..53e2535 --- /dev/null +++ b/data/challenges/10.json @@ -0,0 +1,60 @@ +{ + "name" : "Rescue Civilians", + "description" : "Rescue Civilians", + "background" : "AUTO", + "planet" : "AUTO", + "music" : "AUTO", + "player" : { + "type" : "Tug", + "side" : "SIDE_ALLIES", + "pilot" : "-", + "squadron" : "-", + "x" : 25, + "y" : 25 + }, + "challenge" : { + "rescueLimit" : 8, + "timeLimit" : 300, + "challenges" : [ + { + "type" : "CHALLENGE_RESCUE", + "value" : 4 + }, + { + "type" : "CHALLENGE_RESCUE", + "value" : 5 + }, + { + "type" : "CHALLENGE_RESCUE", + "value" : 8 + } + ] + }, + "fighters" : [ + { + "types" : "Civilian", + "x" : 25, + "y" : 25, + "side" : "SIDE_ALLIES", + "flags" : "+EF_DISABLED", + "number" : 8, + "scatter" : 5000 + } + ], + "entities" : [ + { + "name" : "Jumpgate", + "type" : "ET_JUMPGATE", + "x" : 25, + "y" : 25 + } + ], + "script" : [ + { + "function" : "INTERVAL 30", + "lines" : [ + "SPAWN_FIGHTERS Dart SIDE_PIRATE 1 OFFSCREEN" + ] + } + ] +} From ae6e2ede09cb2fce9853ec9871f09117217f0b4a Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 12 Mar 2016 12:09:42 +0000 Subject: [PATCH 05/30] Control waypoints from script. --- data/missions/alba/01 - patrol #1.json | 8 +++++++- data/missions/alba/02 - patrol #2.json | 6 ++++++ data/missions/alba/03 - patrol #3.json | 6 ++++++ data/missions/granada/02 - suspect packages #2.json | 6 ++++++ data/missions/granada/03 - suspect packages #3.json | 6 ++++++ src/battle/script.c | 6 ++++++ src/battle/script.h | 1 + src/galaxy/mission.c | 2 -- src/galaxy/mission.h | 1 - 9 files changed, 38 insertions(+), 4 deletions(-) diff --git a/data/missions/alba/01 - patrol #1.json b/data/missions/alba/01 - patrol #1.json index 8fcb918..206968b 100644 --- a/data/missions/alba/01 - patrol #1.json +++ b/data/missions/alba/01 - patrol #1.json @@ -8,7 +8,7 @@ "manualComplete" : 1, "objectives" : [ { - "description" : "Check all wayponts", + "description" : "Check all waypoints", "targetName" : "Waypoint", "targetValue" : 5, "targetType" : "TT_WAYPOINT" @@ -42,6 +42,12 @@ } ], "script" : [ + { + "function" : "TIME 0", + "lines" : [ + "ACTIVATE_NEXT_WAYPOINT" + ] + } { "function" : "Waypoint #2", "lines" : [ diff --git a/data/missions/alba/02 - patrol #2.json b/data/missions/alba/02 - patrol #2.json index f586241..74a8b56 100644 --- a/data/missions/alba/02 - patrol #2.json +++ b/data/missions/alba/02 - patrol #2.json @@ -59,6 +59,12 @@ } ], "script" : [ + { + "function" : "TIME 0", + "lines" : [ + "ACTIVATE_NEXT_WAYPOINT" + ] + }, { "function" : "Waypoint #3", "lines" : [ diff --git a/data/missions/alba/03 - patrol #3.json b/data/missions/alba/03 - patrol #3.json index fe1ccb2..32e6290 100644 --- a/data/missions/alba/03 - patrol #3.json +++ b/data/missions/alba/03 - patrol #3.json @@ -45,6 +45,12 @@ } ], "script" : [ + { + "function" : "TIME 0", + "lines" : [ + "ACTIVATE_NEXT_WAYPOINT" + ] + }, { "function" : "TIME 3", "lines" : [ diff --git a/data/missions/granada/02 - suspect packages #2.json b/data/missions/granada/02 - suspect packages #2.json index 5e6a208..8c83f4e 100644 --- a/data/missions/granada/02 - suspect packages #2.json +++ b/data/missions/granada/02 - suspect packages #2.json @@ -126,6 +126,12 @@ } ], "script" : [ + { + "function" : "TIME 0", + "lines" : [ + "ACTIVATE_NEXT_WAYPOINT" + ] + }, { "function" : "Waypoint #2", "lines" : [ diff --git a/data/missions/granada/03 - suspect packages #3.json b/data/missions/granada/03 - suspect packages #3.json index 87663cf..ef8e8e5 100644 --- a/data/missions/granada/03 - suspect packages #3.json +++ b/data/missions/granada/03 - suspect packages #3.json @@ -126,6 +126,12 @@ } ], "script" : [ + { + "function" : "TIME 0", + "lines" : [ + "ACTIVATE_NEXT_WAYPOINT" + ] + }, { "function" : "Waypoint #1", "lines" : [ diff --git a/src/battle/script.c b/src/battle/script.c index 4cb3252..73e195c 100644 --- a/src/battle/script.c +++ b/src/battle/script.c @@ -213,6 +213,10 @@ static void executeNextLine(ScriptRunner *runner) { battle.jumpgate->systemPower = MAX_SYSTEM_POWER; } + else if (strcmp(command, "ACTIVATE_NEXT_WAYPOINT") == 0) + { + activateNextWaypoint(0); + } else if (strcmp(command, "MSG_BOX") == 0) { sscanf(line, "%*s %255[^;]%*c%255[^\n]", strParam[0], strParam[1]); @@ -273,6 +277,8 @@ void destroyScript(void) if (scriptJSON) { cJSON_Delete(scriptJSON); + + scriptJSON = NULL; } while (head.next) diff --git a/src/battle/script.h b/src/battle/script.h index acbceb6..2f05ea9 100644 --- a/src/battle/script.h +++ b/src/battle/script.h @@ -35,6 +35,7 @@ void activateObjectives(char *objectives); extern int showingMessageBoxes(void); extern char *getTranslatedString(char *string); extern void spawnScriptFighter(char *fighters, char *side, int num, char *location); +extern void activateNextWaypoint(int id); extern Battle battle; extern Colors colors; diff --git a/src/galaxy/mission.c b/src/galaxy/mission.c index ee89fb9..6529aaa 100644 --- a/src/galaxy/mission.c +++ b/src/galaxy/mission.c @@ -216,8 +216,6 @@ void loadMission(char *filename) battle.status = MS_IN_PROGRESS; } - activateNextWaypoint(); - countNumEnemies(); initPlayer(); diff --git a/src/galaxy/mission.h b/src/galaxy/mission.h index 998712e..c6a8647 100644 --- a/src/galaxy/mission.h +++ b/src/galaxy/mission.h @@ -35,7 +35,6 @@ extern void stopMusic(void); extern void initPlayer(void); 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 *spawnJumpgate(void); extern Entity *spawnItem(char *type); From 96556bc0dfb8e0c2f1f7553d40fbc8b8dce1731b Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 12 Mar 2016 12:09:50 +0000 Subject: [PATCH 06/30] Increased Rook firepower. --- data/fighters/rook.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/fighters/rook.json b/data/fighters/rook.json index 40d9295..f1974e4 100644 --- a/data/fighters/rook.json +++ b/data/fighters/rook.json @@ -7,6 +7,11 @@ "shieldRechargeRate" : 45, "texture" : "gfx/fighters/rook.png", "guns" : [ + { + "type" : "BT_PLASMA", + "x" : 0, + "y" : 0 + }, { "type" : "BT_PLASMA", "x" : -9, From ed6b0ae37618e98f859927f1697e86ffafc51620 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 12 Mar 2016 12:10:14 +0000 Subject: [PATCH 07/30] Don't point to jumpgate on HUD if it's inactive. --- src/battle/hud.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/battle/hud.c b/src/battle/hud.c index b98ffac..85eda92 100644 --- a/src/battle/hud.c +++ b/src/battle/hud.c @@ -330,7 +330,7 @@ static void drawPlayerTargeter(void) float angle; int x, y; - if (player->target || battle.missionTarget || battle.jumpgate) + if (player->target || battle.missionTarget || (battle.jumpgate && battle.jumpgate->systemPower)) { if (player->target) { @@ -376,7 +376,7 @@ static void drawPlayerTargeter(void) blitRotated(targetPointer, x - battle.camera.x, y - battle.camera.y, angle); } - if (battle.jumpgate) + if (battle.jumpgate && battle.jumpgate->systemPower) { angle = getAngle(player->x, player->y, battle.jumpgate->x, battle.jumpgate->y); x = player->x; @@ -456,7 +456,7 @@ static void drawDistancesInfo(void) y = 11; - if (player->target != NULL) + if (player->target) { drawText(SCREEN_WIDTH - 15, y, 18, TA_RIGHT, colors.red, player->target->name); @@ -469,7 +469,7 @@ static void drawDistancesInfo(void) y += 25; } - if (battle.missionTarget != NULL) + if (battle.missionTarget) { distance = distanceToKM(player->x, player->y, battle.missionTarget->x, battle.missionTarget->y); @@ -478,7 +478,7 @@ static void drawDistancesInfo(void) y += 25; } - if (battle.jumpgate != NULL) + if (battle.jumpgate && battle.jumpgate->systemPower) { distance = distanceToKM(player->x, player->y, battle.jumpgate->x, battle.jumpgate->y); From b235a11f3d6157e17313bf4ebf95cad3d6d60bc2 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 12 Mar 2016 12:10:50 +0000 Subject: [PATCH 08/30] Updated waypoint graphics. --- gfx/entities/waypoint.png | Bin 15204 -> 17675 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gfx/entities/waypoint.png b/gfx/entities/waypoint.png index e84fa0ecd3d7e30df776e1e485794ba6302c3fc9..7a8fee7904d7ba37f188fd5d8e53fd04d69f20fc 100644 GIT binary patch literal 17675 zcmXtA2T)U8(@yBUcd4RM1rZbop;zf5RhocE6)6EiHGmMB6cLaTdhbXL9RWjc(gY%* z2M`P$r1HZSr`o~0Kf})rlxERUED|PeB$5s zEm_gMXE^I_6S3gto3eKIC(XaJf-#4YLPxEi-h*?aGQqMwgw6Jxg>{-XWl3)bpdBuu z7rAd^-M{`sn{?KdyYaSH8Y*pF5B?Ec0S9!6GYT3r!$1Oe36+@rUMpPY93$>WWM!F0 zUK{5ss_xi+wd@pWl{FrBn(!f$g)VbGE~P1%=G)l9AfY`&W+&$tHQzK*a}7jzH~Op#><#>POV=AVxTxmkTLNG&Q zVvOOmwmiuU_F6mJ>>Rc`FTez;?6CE^kKc-W-nk0qfD68#1l2dkGMQ!=8lUNm;}Wn!9Crd4NH&Zh%6r5` zag2JiU|pjD$013aZ$YHwxYyzhkcBprfrLy_DrMpmMmCZo#t9~(VGXK)OuAq;P$Aj! z*XZzi48sd`W?7?hKOva0crrG6&8~GUey`9|&X!E+AojmeWCDm}_>0ZGi?xo_ zu0Q13V!o?!!6)=)|)Ub?n2>)os^JC>JQSfk)+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Q8E+q-)Q_ znRT#3q_yyFt}$My~4l zMZlBAG1kmEtqLF0W=|)C9cQzghT`hZRKU%gZ}m1 z{%z4EZtnx9|B{PF{y1YUND8{4$OQjw(*XYjV#1+j3-sUD=t8{83 zZf!azKXR1svmL_Nx-29fv!Oq6(H}od5b@xpQz?DKrt&NJC*ZMTqWT8NN+sN-qxN&< zTQ{(N4;sdUdkX2fE3R1!L^2B&y%W`Dzj4PHrS)ay28W#4KXfyDQV!#jn$+$f{ae3K zs@P^dSd+rRt29WTkBl<-b)m@xDH>EqPYv=<@`Fkw><2sVEr?!t zv3%X(ZHALE{o22%sc~)6SXoDS|JDE@>gIDhd;*0!6=@Rm{MKvr`T5th2zmz1Hb99T zS$+6HXs&;(P5mHmC!xs?xrLXKyd6^%7zuldEh|PHrWO7^P#fSn=FZyUCP?>Jw#nV&-3nSLN|p= zxO`$eY6;xw(3^W#zKh(Zn87?2&%p-XbW&am%Zi<71mlG=GYXXdAD2}Ackn_2eGt@1 zv Date: Sat, 12 Mar 2016 12:11:06 +0000 Subject: [PATCH 09/30] Rothan mission #2 --- .../rothan/02 - rothan defence #2.json | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 data/missions/rothan/02 - rothan defence #2.json diff --git a/data/missions/rothan/02 - rothan defence #2.json b/data/missions/rothan/02 - rothan defence #2.json new file mode 100644 index 0000000..2960b49 --- /dev/null +++ b/data/missions/rothan/02 - rothan defence #2.json @@ -0,0 +1,156 @@ +{ + "name" : "Rothan Defence #2", + "description" : "", + "requires" : 29, + "background" : "gfx/backgrounds/background05.jpg", + "planet" : "gfx/planets/bluePlanet.png", + "music" : "music/battle/determination.mp3", + "objectives" : [ + { + "description" : "Rendezvous with Irregular Nomads", + "targetName" : "Waypoint", + "targetValue" : 1, + "targetType" : "TT_WAYPOINT" + }, + { + "description" : "Eliminate UNF fighters", + "targetName" : "Enemy", + "targetValue" : 1, + "targetType" : "TT_DESTROY", + "isEliminateAll" : 1, + "active" : 0 + }, + { + "description" : "Retreat to jumpgate", + "targetName" : "Player", + "targetValue" : 1, + "targetType" : "TT_ESCAPED", + "active" : 0 + } + ], + "player" : { + "type" : "Rook", + "side" : "SIDE_ALLIES", + "pilot" : "Julian Spencer", + "squadron" : "Blue Jesters", + "x" : 10, + "y" : 5 + }, + "fighters" : [ + { + "name" : "CSN Pilot", + "types" : "TAF;Ray;Kingfisher;Hammerhead;Rook", + "side" : "SIDE_ALLIES", + "x" : 10, + "y" : 5, + "number" : 3, + "scatter" : 500 + }, + { + "name" : "CSN Pilot", + "groupName" : "Irregular Nomads", + "types" : "TAF;Ray;Kingfisher;Hammerhead;Rook", + "side" : "SIDE_ALLIES", + "x" : 30, + "y" : 1, + "number" : 4, + "active" : 0 + }, + { + "name" : "Rebel", + "groupName" : "Rebels", + "types" : "Nymph;Firefly", + "side" : "SIDE_REBEL", + "x" : -1, + "y" : -1, + "number" : 5, + "aiFlags" : "+AIF_UNLIMITED_RANGE", + "active" : 0 + }, + { + "name" : "Rebel", + "groupName" : "Rebels", + "types" : "Nymph;Firefly", + "side" : "SIDE_REBEL", + "x" : 15, + "y" : -1, + "number" : 5, + "aiFlags" : "+AIF_UNLIMITED_RANGE", + "active" : 0 + }, + { + "name" : "Rebel", + "groupName" : "Rebels", + "types" : "Nymph;Firefly", + "side" : "SIDE_REBEL", + "x" : -1, + "y" : 15, + "number" : 5, + "aiFlags" : "+AIF_UNLIMITED_RANGE", + "active" : 0 + } + ], + "entities" : [ + { + "type" : "ET_WAYPOINT", + "x" : 15, + "y" : 15, + "active" : 0 + }, + { + "type" : "ET_JUMPGATE", + "x" : 30, + "y" : 1, + "systemPower" : 0 + } + ], + "script" : [ + { + "function" : "TIME 1", + "lines" : [ + "MSG_BOX Spencer;Control, we're in position. Awaiting the Irregular Nomads.", + "MSG_BOX Control;Irregular Nomads have just exited the jumpgate. They'll be with you shortly.", + "ACTIVATE_ENTITY_GROUPS Irregular Nomads" + ] + }, + { + "function" : "TIME 15", + "lines" : [ + "MSG_BOX Fox;Commander Spencer, we're on our way. We'll join you at the waypoint.", + "WAIT_MSG_BOX", + "ACTIVATE_NEXT_WAYPOINT", + "MSG_BOX Fox;Acknowledged, Lieutenant, we'll see you in a bit." + ] + }, + { + "function" : "Waypoint #1", + "lines" : [ + "MSG_BOX Spencer;Control, we're ready to--", + "MSG_BOX Control;Commander, be advised that we are detecting UNF fighters advancing on your position, several Nymphs and Fireflies. They are not responding to requests to identify presence or purpose.", + "MSG_BOX Spencer;Pandorans?", + "MSG_BOX Control;Their signatures don't suggest so.", + "WAIT_MSG_BOX", + "WAIT 4,", + "ACTIVATE_ENTITY_GROUPS Rebels", + "ACTIVATE_OBJECTIVES Eliminate UNF fighters", + "MSG_BOX Control;Commander, incoming fighters are hostile. Suggest you prepare to engage or fallback to the jumpgate.", + "MSG_BOX Spencer;Acknowledged, moving to engage." + ] + }, + { + "function" : "OBJECTIVES_COMPLETE 2", + "lines" : [ + "MSG_BOX Spencer;Control, enemy targets have been eliminated.", + "MSG_BOX Control;Any survivors?", + "MSG_BOX Spencer;Negative, I didn't see anyone eject from those fighters.", + "MSG_BOX Control;Commander, your current missions has been aborted. Return to the jumpgate. We need a full report as to what just happened out there.", + "MSG_BOX Spencer;Got it, coming home.", + "WAIT_MSG_BOX", + "ACTIVATE_JUMPGATE", + "ACTIVATE_OBJECTIVES Retreat to jumpgate", + "RETREAT_ALLIES" + ] + } + ] +} + From e9c43f3d603f0b7360ae76ffcba4479ef756d1d1 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 12 Mar 2016 12:11:30 +0000 Subject: [PATCH 10/30] Flocking tweak. --- src/battle/ai.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/battle/ai.c b/src/battle/ai.c index 1d3c0a0..074f221 100644 --- a/src/battle/ai.c +++ b/src/battle/ai.c @@ -607,9 +607,11 @@ static void moveToPlayer(void) { if (fabs(player->dx) >= 1 && fabs(player->dy) >= 1) { - wantedAngle = getAngle(player->x, player->y, player->x + (player->dx * 10), player->y + (player->dy * 10)); + wantedAngle = getAngle(player->x, player->y, player->x + (player->dx * 100), player->y + (player->dy * 100)); turnToFace(wantedAngle); + + applyFighterThrust(); } if (dist <= 250) @@ -806,6 +808,8 @@ static void moveToLeader(void) wantedAngle = getAngle(self->leader->x, self->leader->y, self->leader->x + (self->leader->dx * 10), self->leader->y + (self->leader->dy * 10)); turnToFace(wantedAngle); + + applyFighterThrust(); } if (dist <= 250) From bdced9c00f27727a1e3510855a0c076785796885 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 12 Mar 2016 12:11:56 +0000 Subject: [PATCH 11/30] Use aiActionTime, instead of thinkTime, to allow waypoint to continue to spin. --- src/battle/waypoints.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/battle/waypoints.c b/src/battle/waypoints.c index cd87001..70226d4 100644 --- a/src/battle/waypoints.c +++ b/src/battle/waypoints.c @@ -50,25 +50,29 @@ Entity *spawnWaypoint(void) static void think(void) { - self->thinkTime = 4; + self->angle += 0.25; - self->angle++; if (self->angle >= 360) { self->angle -= 360; } - if (player != NULL && getDistance(player->x, player->y, self->x, self->y) <= 64 && isCurrentObjective() && teamMatesClose()) + if (--self->aiActionTime <= 0) { - self->health = 0; + self->aiActionTime = 0; - updateObjective("Waypoint", TT_WAYPOINT); - - runScriptFunction(self->name); - - activateNextWaypoint(self->id); - - battle.stats[STAT_WAYPOINTS_VISITED]++; + if (self->health && player != NULL && getDistance(player->x, player->y, self->x, self->y) <= 128 && isCurrentObjective() && teamMatesClose()) + { + self->health = 0; + + updateObjective("Waypoint", TT_WAYPOINT); + + runScriptFunction(self->name); + + activateNextWaypoint(self->id); + + battle.stats[STAT_WAYPOINTS_VISITED]++; + } } } @@ -79,7 +83,7 @@ static int isCurrentObjective(void) if (numActiveObjectives > 1) { addHudMessage(colors.cyan, _("Cannot activate waypoint - outstanding objectives not yet complete")); - self->thinkTime = FPS; + self->aiActionTime = FPS; return 0; } @@ -97,7 +101,7 @@ static int teamMatesClose(void) if (getDistance(player->x, player->y, e->x, e->y) > 350) { addHudMessage(colors.cyan, _("Cannot activate waypoint - team mates too far away")); - self->thinkTime = FPS; + self->aiActionTime = FPS; return 0; } } From 5d38abcbebdaedd254dcef49eef5358a62c3e508 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 12 Mar 2016 12:12:12 +0000 Subject: [PATCH 12/30] Use EF_DISABLED, instead of system power. --- data/missions/rothan/01 - rothan defence #1.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/missions/rothan/01 - rothan defence #1.json b/data/missions/rothan/01 - rothan defence #1.json index d762c03..ea40cb3 100644 --- a/data/missions/rothan/01 - rothan defence #1.json +++ b/data/missions/rothan/01 - rothan defence #1.json @@ -75,8 +75,7 @@ "y" : 25, "number" : 12, "scatter" : 5000, - "systemPower" : 0, - "flags" : "+EF_NO_KILL+EF_MISSION_TARGET" + "flags" : "+EF_DISABLED+EF_NO_KILL+EF_MISSION_TARGET" }, { "name" : "CSN Tug", From 71b0a00689df9f3baf08230a126b4f335b8531f8 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 12 Mar 2016 12:35:05 +0000 Subject: [PATCH 13/30] Use EF_DISABLED for jumpgates, rather than systemPower. --- .../coyote/03 - coyote assault #3.json | 4 +-- .../granada/02 - suspect packages #2.json | 4 +-- .../rothan/02 - rothan defence #2.json | 4 +-- src/battle/hud.c | 6 ++-- src/battle/hud.h | 1 + src/battle/jumpgate.c | 24 +++++++++++-- src/battle/script.c | 3 +- src/battle/script.h | 1 + src/galaxy/mission.c | 34 ++++++++++++------- 9 files changed, 57 insertions(+), 24 deletions(-) diff --git a/data/missions/coyote/03 - coyote assault #3.json b/data/missions/coyote/03 - coyote assault #3.json index 1d71700..74e6198 100644 --- a/data/missions/coyote/03 - coyote assault #3.json +++ b/data/missions/coyote/03 - coyote assault #3.json @@ -74,7 +74,7 @@ "type" : "ET_JUMPGATE", "x" : 25, "y" : 25, - "systemPower" : 0 + "flags" : "+EF_DISABLED" } ], "script" : [ @@ -99,7 +99,7 @@ "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_JUMPGATE", + "ACTIVATE_JUMPGATE 1", "RETREAT_ALLIES" ] } diff --git a/data/missions/granada/02 - suspect packages #2.json b/data/missions/granada/02 - suspect packages #2.json index 8c83f4e..2f76c94 100644 --- a/data/missions/granada/02 - suspect packages #2.json +++ b/data/missions/granada/02 - suspect packages #2.json @@ -110,7 +110,7 @@ "type" : "ET_JUMPGATE", "x" : 10, "y" : 8, - "systemPower" : 0 + "flags" : "+EF_DISABLED" } ], "items" : [ @@ -159,7 +159,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_JUMPGATE", + "ACTIVATE_JUMPGATE 1", "WAIT 20", "ACTIVATE_ENTITIES Dart", "ACTIVATE_OBJECTIVES Destroy intercepting Darts", diff --git a/data/missions/rothan/02 - rothan defence #2.json b/data/missions/rothan/02 - rothan defence #2.json index 2960b49..42b580d 100644 --- a/data/missions/rothan/02 - rothan defence #2.json +++ b/data/missions/rothan/02 - rothan defence #2.json @@ -101,7 +101,7 @@ "type" : "ET_JUMPGATE", "x" : 30, "y" : 1, - "systemPower" : 0 + "flags" : "+EF_DISABLED" } ], "script" : [ @@ -146,7 +146,7 @@ "MSG_BOX Control;Commander, your current missions has been aborted. Return to the jumpgate. We need a full report as to what just happened out there.", "MSG_BOX Spencer;Got it, coming home.", "WAIT_MSG_BOX", - "ACTIVATE_JUMPGATE", + "ACTIVATE_JUMPGATE 1", "ACTIVATE_OBJECTIVES Retreat to jumpgate", "RETREAT_ALLIES" ] diff --git a/src/battle/hud.c b/src/battle/hud.c index 85eda92..eca800b 100644 --- a/src/battle/hud.c +++ b/src/battle/hud.c @@ -330,7 +330,7 @@ static void drawPlayerTargeter(void) float angle; int x, y; - if (player->target || battle.missionTarget || (battle.jumpgate && battle.jumpgate->systemPower)) + if (player->target || battle.missionTarget || jumpgateEnabled()) { if (player->target) { @@ -376,7 +376,7 @@ static void drawPlayerTargeter(void) blitRotated(targetPointer, x - battle.camera.x, y - battle.camera.y, angle); } - if (battle.jumpgate && battle.jumpgate->systemPower) + if (jumpgateEnabled()) { angle = getAngle(player->x, player->y, battle.jumpgate->x, battle.jumpgate->y); x = player->x; @@ -478,7 +478,7 @@ static void drawDistancesInfo(void) y += 25; } - if (battle.jumpgate && battle.jumpgate->systemPower) + if (jumpgateEnabled()) { distance = distanceToKM(player->x, player->y, battle.jumpgate->x, battle.jumpgate->y); diff --git a/src/battle/hud.h b/src/battle/hud.h index 832fc6e..b67c9b8 100644 --- a/src/battle/hud.h +++ b/src/battle/hud.h @@ -34,6 +34,7 @@ extern int getPercent(float current, float total); extern int playerHasGun(int type); extern char *getTranslatedString(char *string); extern char *timeToString(long millis, int showHours); +extern int jumpgateEnabled(void); extern App app; extern Battle battle; diff --git a/src/battle/jumpgate.c b/src/battle/jumpgate.c index 5dec983..64c6365 100644 --- a/src/battle/jumpgate.c +++ b/src/battle/jumpgate.c @@ -45,6 +45,26 @@ Entity *spawnJumpgate(void) return jumpgate; } +int jumpgateEnabled(void) +{ + return (battle.jumpgate && (!(battle.jumpgate->flags & EF_DISABLED))); +} + +void activateJumpgate(int activate) +{ + if (battle.jumpgate) + { + if (activate) + { + battle.jumpgate->flags &= ~EF_DISABLED; + } + else + { + battle.jumpgate->flags |= EF_DISABLED; + } + } +} + static void think(void) { self->thinkTime = 4; @@ -55,7 +75,7 @@ static void think(void) self->angle -= 360; } - if (self->systemPower) + if (jumpgateEnabled()) { handleFleeingEntities(); } @@ -128,7 +148,7 @@ static void addEscapeEffect(Entity *ent) static void draw(void) { - if (self->systemPower) + if (jumpgateEnabled()) { blitRotated(portal, self->x - battle.camera.x, self->y - battle.camera.y, portalAngle); } diff --git a/src/battle/script.c b/src/battle/script.c index 73e195c..91b58c4 100644 --- a/src/battle/script.c +++ b/src/battle/script.c @@ -211,7 +211,8 @@ static void executeNextLine(ScriptRunner *runner) } else if (strcmp(command, "ACTIVATE_JUMPGATE") == 0) { - battle.jumpgate->systemPower = MAX_SYSTEM_POWER; + sscanf(line, "%*s %d", &intParam[0]); + activateJumpgate(intParam[0]); } else if (strcmp(command, "ACTIVATE_NEXT_WAYPOINT") == 0) { diff --git a/src/battle/script.h b/src/battle/script.h index 2f05ea9..b2c98c1 100644 --- a/src/battle/script.h +++ b/src/battle/script.h @@ -36,6 +36,7 @@ extern int showingMessageBoxes(void); extern char *getTranslatedString(char *string); extern void spawnScriptFighter(char *fighters, char *side, int num, char *location); extern void activateNextWaypoint(int id); +extern void activateJumpgate(int activate); extern Battle battle; extern Colors colors; diff --git a/src/galaxy/mission.c b/src/galaxy/mission.c index 6529aaa..1f5150c 100644 --- a/src/galaxy/mission.c +++ b/src/galaxy/mission.c @@ -374,7 +374,7 @@ static void loadFighters(cJSON *node) Entity *e; char **types, *name, *groupName, *type; int side, scatter, number, active; - int i, numTypes, addFlags, addAIFlags, systemPower; + int i, numTypes, addFlags, addAIFlags; long flags, aiFlags; float x, y; @@ -398,7 +398,6 @@ static void loadFighters(cJSON *node) number = getJSONValue(node, "number", 1); scatter = getJSONValue(node, "scatter", 1); active = getJSONValue(node, "active", 1); - systemPower = getJSONValue(node, "systemPower", MAX_SYSTEM_POWER); if (cJSON_GetObjectItem(node, "flags")) { @@ -461,12 +460,6 @@ static void loadFighters(cJSON *node) { STRNCPY(e->groupName, groupName, MAX_NAME_LENGTH); } - - e->systemPower = systemPower; - if (!e->systemPower) - { - e->flags |= EF_DISABLED; - } } node = node->next; @@ -572,8 +565,9 @@ static void loadEntities(cJSON *node) { Entity *e; char *name, *groupName; - int i, type, scatter, number, active, systemPower; + int i, type, scatter, number, active, addFlags; float x, y; + long flags; if (node) { @@ -593,7 +587,11 @@ static void loadEntities(cJSON *node) number = getJSONValue(node, "number", 1); active = getJSONValue(node, "active", 1); scatter = getJSONValue(node, "scatter", 1); - systemPower = getJSONValue(node, "systemPower", MAX_SYSTEM_POWER); + + if (cJSON_GetObjectItem(node, "flags")) + { + flags = flagsToLong(cJSON_GetObjectItem(node, "flags")->valuestring, &addFlags); + } for (i = 0 ; i < number ; i++) { @@ -622,6 +620,20 @@ static void loadEntities(cJSON *node) { STRNCPY(e->groupName, groupName, MAX_NAME_LENGTH); } + + if (flags != -1) + { + if (addFlags) + { + e->flags |= flags; + } + else + { + e->flags = flags; + + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "Flags for '%s' (%s) replaced", e->name, e->defName); + } + } e->x = x; e->y = y; @@ -634,8 +646,6 @@ static void loadEntities(cJSON *node) e->active = active; - e->systemPower = systemPower; - SDL_QueryTexture(e->texture, NULL, NULL, &e->w, &e->h); } From a5509b5bcdd558e2ffa0c8d064eea6ff138c7dcc Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 12 Mar 2016 15:12:52 +0000 Subject: [PATCH 14/30] Logging updates. --- src/battle/capitalShips.c | 4 ++++ src/battle/fighters.c | 4 ++++ src/battle/script.c | 2 +- src/galaxy/mission.c | 4 ++++ src/main.c | 5 ++++- src/system/i18n.c | 2 +- src/system/init.c | 4 ++-- src/system/widgets.c | 4 ++++ 8 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/battle/capitalShips.c b/src/battle/capitalShips.c index b5910cd..12f0aed 100644 --- a/src/battle/capitalShips.c +++ b/src/battle/capitalShips.c @@ -379,6 +379,10 @@ static void loadCapitalShipDef(char *filename) cJSON_Delete(root); } + else + { + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "Failed to load '%s'", filename); + } free(text); } diff --git a/src/battle/fighters.c b/src/battle/fighters.c index 11b1339..7c8ec45 100644 --- a/src/battle/fighters.c +++ b/src/battle/fighters.c @@ -764,6 +764,10 @@ static void loadFighterDef(char *filename) cJSON_Delete(root); } + else + { + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "Failed to load '%s'", filename); + } free(text); } diff --git a/src/battle/script.c b/src/battle/script.c index 91b58c4..929422b 100644 --- a/src/battle/script.c +++ b/src/battle/script.c @@ -41,7 +41,7 @@ void initScript(cJSON *scriptNode) while (function) { - SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Script Function: '%s'", cJSON_GetObjectItem(function, "function")->valuestring); + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Found script function: '%s'", cJSON_GetObjectItem(function, "function")->valuestring); function = function->next; } diff --git a/src/galaxy/mission.c b/src/galaxy/mission.c index 1f5150c..69700eb 100644 --- a/src/galaxy/mission.c +++ b/src/galaxy/mission.c @@ -121,6 +121,10 @@ Mission *loadMissionMeta(char *filename) cJSON_Delete(root); } + else + { + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "Failed to load '%s'", filename); + } free(text); diff --git a/src/main.c b/src/main.c index c1d08d7..6617833 100644 --- a/src/main.c +++ b/src/main.c @@ -27,9 +27,10 @@ int main(int argc, char *argv[]) float td; long then, lastFrameTime, frames; long expireTextTimer; - SDL_Event event; + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN); + memset(&app, 0, sizeof(App)); memset(&dev, 0, sizeof(Dev)); @@ -169,6 +170,8 @@ static void handleArguments(int argc, char *argv[]) dev.debug = 1; createScreenshotFolder(); + + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG); } } } diff --git a/src/system/i18n.c b/src/system/i18n.c index 6f17493..7283929 100644 --- a/src/system/i18n.c +++ b/src/system/i18n.c @@ -79,7 +79,7 @@ void setLanguage(char *applicationName, char *languageCode) STRNCPY(language, lang, MAX_LINE_LENGTH); } - printf("Locale is %s\n", language); + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Locale is %s", language); sprintf(c, "%s/%s/LC_MESSAGES/%s.mo", LOCALE_DIR, language, applicationName); diff --git a/src/system/init.c b/src/system/init.c index e9651c6..2d04920 100644 --- a/src/system/init.c +++ b/src/system/init.c @@ -338,10 +338,10 @@ void cleanup(void) destroyWidgets(); destroyResources(); + + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Done"); TTF_Quit(); SDL_Quit(); - - SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Done"); } diff --git a/src/system/widgets.c b/src/system/widgets.c index 67690b0..d8fa666 100644 --- a/src/system/widgets.c +++ b/src/system/widgets.c @@ -427,6 +427,10 @@ static void loadWidgetSet(char *filename) cJSON_Delete(root); } + else + { + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "Failed to load '%s'", filename); + } free(text); } From 0d074eaa222e14dc8e7985ca8e0affc0037fd143 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 12 Mar 2016 15:13:04 +0000 Subject: [PATCH 15/30] JSON bug fix. --- data/missions/alba/01 - patrol #1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/missions/alba/01 - patrol #1.json b/data/missions/alba/01 - patrol #1.json index 206968b..34495c5 100644 --- a/data/missions/alba/01 - patrol #1.json +++ b/data/missions/alba/01 - patrol #1.json @@ -47,7 +47,7 @@ "lines" : [ "ACTIVATE_NEXT_WAYPOINT" ] - } + }, { "function" : "Waypoint #2", "lines" : [ From cca080e88f420668882a36686fde286338e4cce2 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 12 Mar 2016 15:13:12 +0000 Subject: [PATCH 16/30] Updated i18n. --- locale/tbftss.pot | 52 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/locale/tbftss.pot b/locale/tbftss.pot index d349a58..1eea83f 100644 --- a/locale/tbftss.pot +++ b/locale/tbftss.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: TBFTSS: The Pandoran War\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-10 15:44:08+0000\n" +"POT-Creation-Date: 2016-03-12 15:00:11+0000\n" "PO-Revision-Date: ???\n" "Last-Translator: ???\n" "Language-Team: ???\n" @@ -190,6 +190,9 @@ msgstr "" msgid "Collect %d packages" msgstr "" +msgid "Rescue %d civilians" +msgstr "" + msgid "%s has fallen to the Pandorans" msgstr "" @@ -934,7 +937,7 @@ msgstr "" msgid "Can you disable the gate remotely?" msgstr "" -msgid "Negative, the Pandorans have control. We're working take back command function. Stand by." +msgid "Negative, the Pandorans have control. We're working take back command functions. Stand by." msgstr "" msgid "Griffin, all enemy tugs have been dispatched." @@ -955,6 +958,51 @@ msgstr "" msgid "I knew I could count on you, de Winter. Head back to Griffin." msgstr "" +msgid "Control, we're in position. Awaiting the Irregular Nomads." +msgstr "" + +msgid "Irregular Nomads have just exited the jumpgate. They'll be with you shortly." +msgstr "" + +msgid "Commander Spencer, we're on our way. We'll join you at the waypoint." +msgstr "" + +msgid "Acknowledged, Lieutenant, we'll see you in a bit." +msgstr "" + +msgid "Control, we're ready to--" +msgstr "" + +msgid "Commander, be advised that we are detecting UNF fighters advancing on your position, several Nymphs and Fireflies. They are not responding to requests to identify presence or purpose." +msgstr "" + +msgid "Pandorans?" +msgstr "" + +msgid "Their signatures don't suggest so." +msgstr "" + +msgid "Commander, incoming fighters are hostile. Suggest you prepare to engage or fallback to the jumpgate." +msgstr "" + +msgid "Acknowledged, moving to engage." +msgstr "" + +msgid "Control, enemy targets have been eliminated." +msgstr "" + +msgid "Any survivors?" +msgstr "" + +msgid "Negative, I didn't see anyone eject from those fighters." +msgstr "" + +msgid "Commander, your current missions has been aborted. Return to the jumpgate. We need a full report as to what just happened out there." +msgstr "" + +msgid "Got it, coming home." +msgstr "" + msgid "A simple test flight. Get used to piloting your fighter, without threat of attack or any other dangers to face. There are no objectives to complete in this mission, so you may quit it at any time and move on to the next one." msgstr "" From 160f65a15bdd7ae968eed506da6ee58324b76690 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 13 Mar 2016 10:50:32 +0000 Subject: [PATCH 17/30] Added EF_NO_KILL_INC to prevent kill count increment. --- data/capitalShips/csnCorvette01.json | 38 ++++++++++++------------- data/capitalShips/csnCorvette02.json | 38 ++++++++++++------------- data/capitalShips/infCorvette01.json | 34 +++++++++++----------- data/capitalShips/infCorvette02.json | 40 +++++++++++++------------- data/capitalShips/unfCorvette01.json | 42 ++++++++++++++-------------- data/capitalShips/unfCorvette02.json | 40 +++++++++++++------------- src/battle/bullets.c | 2 +- src/battle/fighters.c | 7 +++-- src/defs.h | 1 + 9 files changed, 123 insertions(+), 119 deletions(-) diff --git a/data/capitalShips/csnCorvette01.json b/data/capitalShips/csnCorvette01.json index fe36e4c..afc1ee4 100644 --- a/data/capitalShips/csnCorvette01.json +++ b/data/capitalShips/csnCorvette01.json @@ -10,56 +10,56 @@ "texture" : "gfx/capitalShips/csnCorvette01/core.png", "x" : 0, "y" : -140, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 100, "texture" : "gfx/capitalShips/csnCorvette01/component1.png", "x" : 0, "y" : -200, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 100, "texture" : "gfx/capitalShips/csnCorvette01/component2.png", "x" : -34, "y" : 25, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 100, "texture" : "gfx/capitalShips/csnCorvette01/component2.png", "x" : 34, "y" : 25, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 100, "texture" : "gfx/capitalShips/csnCorvette01/component2.png", "x" : -16, "y" : 25, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 100, "texture" : "gfx/capitalShips/csnCorvette01/component2.png", "x" : 16, "y" : 25, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 100, "texture" : "gfx/capitalShips/csnCorvette01/component3.png", "x" : -23, "y" : 242, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 100, "texture" : "gfx/capitalShips/csnCorvette01/component3.png", "x" : 23, "y" : 242, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" } ], "engines" : [ @@ -68,35 +68,35 @@ "texture" : "gfx/capitalShips/csnCorvette01/engine1.png", "x" : -150, "y" : 293, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/csnCorvette01/engine1.png", "x" : 150, "y" : 293, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/csnCorvette01/engine1.png", "x" : -90, "y" : 293, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/csnCorvette01/engine1.png", "x" : 90, "y" : 293, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/csnCorvette01/engine1.png", "x" : 0, "y" : 296, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" } ], "guns" : [ @@ -107,7 +107,7 @@ "y" : 200, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -118,7 +118,7 @@ "y" : 200, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -129,7 +129,7 @@ "y" : 100, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -140,7 +140,7 @@ "y" : 100, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -151,7 +151,7 @@ "y" : -50, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -162,7 +162,7 @@ "y" : 175, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 } diff --git a/data/capitalShips/csnCorvette02.json b/data/capitalShips/csnCorvette02.json index f19b6e1..96fe100 100644 --- a/data/capitalShips/csnCorvette02.json +++ b/data/capitalShips/csnCorvette02.json @@ -10,49 +10,49 @@ "texture" : "gfx/capitalShips/csnCorvette02/core.png", "x" : 0, "y" : -140, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 100, "texture" : "gfx/capitalShips/csnCorvette02/component1.png", "x" : -105, "y" : 195, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 100, "texture" : "gfx/capitalShips/csnCorvette02/component1.png", "x" : 105, "y" : 195, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 100, "texture" : "gfx/capitalShips/csnCorvette02/component2.png", "x" : -25, "y" : 18, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 100, "texture" : "gfx/capitalShips/csnCorvette02/component3.png", "x" : 25, "y" : 18, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 100, "texture" : "gfx/capitalShips/csnCorvette02/component4.png", "x" : -67, "y" : -117, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 100, "texture" : "gfx/capitalShips/csnCorvette02/component5.png", "x" : 67, "y" : -117, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" } ], "engines" : [ @@ -61,28 +61,28 @@ "texture" : "gfx/capitalShips/csnCorvette02/engine1.png", "x" : -70, "y" : 253, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/csnCorvette02/engine2.png", "x" : -25, "y" : 247, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/csnCorvette02/engine2.png", "x" : 25, "y" : 247, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/csnCorvette02/engine1.png", "x" : 70, "y" : 253, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" } ], "guns" : [ @@ -93,7 +93,7 @@ "y" : -225, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -104,7 +104,7 @@ "y" : -60, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -115,7 +115,7 @@ "y" : -60, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -126,7 +126,7 @@ "y" : 70, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -137,7 +137,7 @@ "y" : 110, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -148,7 +148,7 @@ "y" : 110, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -159,7 +159,7 @@ "y" : 240, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -170,7 +170,7 @@ "y" : 240, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 } diff --git a/data/capitalShips/infCorvette01.json b/data/capitalShips/infCorvette01.json index dcc575e..3076e2a 100644 --- a/data/capitalShips/infCorvette01.json +++ b/data/capitalShips/infCorvette01.json @@ -10,56 +10,56 @@ "texture" : "gfx/capitalShips/infCorvette01/component1.png", "x" : -27, "y" : 100, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette01/component2.png", "x" : 27, "y" : 100, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette01/component3.png", "x" : 20, "y" : -17, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette01/component3.png", "x" : -20, "y" : -17, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette01/component4.png", "x" : -21, "y" : -64, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette01/component5.png", "x" : 21, "y" : -64, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette01/component6.png", "x" : -22, "y" : -243, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette01/component6.png", "x" : 22, "y" : -243, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" } ], "engines" : [ @@ -68,21 +68,21 @@ "texture" : "gfx/capitalShips/infCorvette01/engine1.png", "x" : -50, "y" : 285, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette01/engine1.png", "x" : 50, "y" : 285, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette01/engine2.png", "x" : 0, "y" : 280, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" } ], "guns" : [ @@ -93,7 +93,7 @@ "y" : 170, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -104,7 +104,7 @@ "y" : -150, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -115,7 +115,7 @@ "y" : 50, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" }, { @@ -125,7 +125,7 @@ "y" : 50, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" }, { @@ -135,7 +135,7 @@ "y" : -60, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" }, { @@ -145,7 +145,7 @@ "y" : -60, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" } ] diff --git a/data/capitalShips/infCorvette02.json b/data/capitalShips/infCorvette02.json index da38ba1..b240440 100644 --- a/data/capitalShips/infCorvette02.json +++ b/data/capitalShips/infCorvette02.json @@ -10,63 +10,63 @@ "texture" : "gfx/capitalShips/infCorvette02/core.png", "x" : 0, "y" : -80, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette02/component1.png", "x" : -32, "y" : -75, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette02/component1.png", "x" : 32, "y" : -75, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette02/component2.png", "x" : -95, "y" : 195, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette02/component2.png", "x" : 95, "y" : 195, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette02/component3.png", "x" : -30, "y" : 210, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette02/component3.png", "x" : 30, "y" : 210, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette02/component4.png", "x" : -24, "y" : -20, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette02/component4.png", "x" : 24, "y" : -20, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" } ], "guns" : [ @@ -77,7 +77,7 @@ "y" : 200, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -88,7 +88,7 @@ "y" : 200, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -99,7 +99,7 @@ "y" : 200, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -110,7 +110,7 @@ "y" : 0, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -121,7 +121,7 @@ "y" : 100, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -132,7 +132,7 @@ "y" : -125, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -143,7 +143,7 @@ "y" : -125, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 } @@ -154,28 +154,28 @@ "texture" : "gfx/capitalShips/infCorvette02/engine1.png", "x" : -75, "y" : 275, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette02/engine2.png", "x" : -20, "y" : 275, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette02/engine3.png", "x" : 20, "y" : 275, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/infCorvette02/engine4.png", "x" : 75, "y" : 275, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" } ] } diff --git a/data/capitalShips/unfCorvette01.json b/data/capitalShips/unfCorvette01.json index bf5eb3d..f5f6011 100644 --- a/data/capitalShips/unfCorvette01.json +++ b/data/capitalShips/unfCorvette01.json @@ -10,63 +10,63 @@ "texture" : "gfx/capitalShips/unfCorvette01/core.png", "x" : 0, "y" : -100, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette01/component1.png", "x" : -42, "y" : -36, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette01/component1.png", "x" : 42, "y" : -36, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette01/component2.png", "x" : -40, "y" : -8, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette01/component2.png", "x" : 40, "y" : -8, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette01/component3.png", "x" : -40, "y" : 68, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette01/component4.png", "x" : 40, "y" : 68, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette01/component5.png", "x" : -40, "y" : 128, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette01/component5.png", "x" : 40, "y" : 128, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" } ], "engines" : [ @@ -75,28 +75,28 @@ "texture" : "gfx/capitalShips/unfCorvette01/engine1.png", "x" : -112, "y" : 281, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/unfCorvette01/engine1.png", "x" : 112, "y" : 281, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/unfCorvette01/engine2.png", "x" : -34, "y" : 268, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/unfCorvette01/engine2.png", "x" : 34, "y" : 268, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" } ], "guns" : [ @@ -107,7 +107,7 @@ "y" : -250, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_STATIC+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -118,7 +118,7 @@ "y" : -250, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_STATIC+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -129,7 +129,7 @@ "y" : 20, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" }, { @@ -139,7 +139,7 @@ "y" : 20, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" }, { @@ -149,7 +149,7 @@ "y" : 100, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -160,7 +160,7 @@ "y" : 100, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -171,7 +171,7 @@ "y" : 180, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" }, { @@ -181,7 +181,7 @@ "y" : 180, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" } ] diff --git a/data/capitalShips/unfCorvette02.json b/data/capitalShips/unfCorvette02.json index 911a837..5ce4d6e 100644 --- a/data/capitalShips/unfCorvette02.json +++ b/data/capitalShips/unfCorvette02.json @@ -10,49 +10,49 @@ "texture" : "gfx/capitalShips/unfCorvette01/core.png", "x" : 0, "y" : -100, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette02/component1.png", "x" : -22, "y" : -24, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette02/component1.png", "x" : 22, "y" : -24, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette02/component2.png", "x" : -86, "y" : 188, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette02/component2.png", "x" : 86, "y" : 188, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette02/component3.png", "x" : -43, "y" : 151, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 50, "texture" : "gfx/capitalShips/unfCorvette02/component3.png", "x" : 43, "y" : 151, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" } ], "engines" : [ @@ -61,28 +61,28 @@ "texture" : "gfx/capitalShips/unfCorvette02/engine1.png", "x" : -100, "y" : 286, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/unfCorvette02/engine1.png", "x" : 100, "y" : 286, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/unfCorvette02/engine2.png", "x" : -35, "y" : 289, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" }, { "health" : 150, "texture" : "gfx/capitalShips/unfCorvette02/engine2.png", "x" : 35, "y" : 289, - "flags" : "EF_TAKES_DAMAGE+EF_STATIC" + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC" } ], "guns" : [ @@ -93,7 +93,7 @@ "y" : -250, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_STATIC+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -104,7 +104,7 @@ "y" : 30, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_STATIC+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -115,7 +115,7 @@ "y" : 30, "reloadTime" : 40, "type" : "BT_ROCKET", - "flags" : "EF_TAKES_DAMAGE+EF_STATIC+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_STATIC+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE", "missiles" : 9999 }, @@ -126,7 +126,7 @@ "y" : 30, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" }, { @@ -136,7 +136,7 @@ "y" : -70, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" }, { @@ -146,7 +146,7 @@ "y" : -70, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" }, { @@ -156,7 +156,7 @@ "y" : 170, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" }, { @@ -166,7 +166,7 @@ "y" : 210, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" }, { @@ -176,7 +176,7 @@ "y" : 210, "reloadTime" : 10, "type" : "BT_PLASMA", - "flags" : "EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", + "flags" : "EF_NO_KILL_INC+EF_TAKES_DAMAGE+EF_SECONDARY_TARGET", "aiFlags" : "AIF_AGGRESSIVE+AIF_LONG_RANGE_FIRE" } ] diff --git a/src/battle/bullets.c b/src/battle/bullets.c index d7e233f..ef11737 100644 --- a/src/battle/bullets.c +++ b/src/battle/bullets.c @@ -203,7 +203,7 @@ static void checkCollisions(Bullet *b) } /* assuming that health <= 0 will always mean killed */ - if (e->health <= 0 && b->owner == player) + if (e->health <= 0 && b->owner == player && (!(e->flags & EF_NO_KILL_INC))) { battle.stats[STAT_ENEMIES_KILLED_PLAYER]++; battle.stats[STAT_EPIC_KILL_STREAK]++; diff --git a/src/battle/fighters.c b/src/battle/fighters.c index 7c8ec45..01fb800 100644 --- a/src/battle/fighters.c +++ b/src/battle/fighters.c @@ -321,9 +321,12 @@ void doFighter(void) { if (self->side != SIDE_ALLIES) { - battle.stats[STAT_ENEMIES_KILLED]++; + if (!(self->flags & EF_NO_KILL_INC)) + { + battle.stats[STAT_ENEMIES_KILLED]++; - runScriptFunction("ENEMIES_KILLED %d", battle.stats[STAT_ENEMIES_KILLED]); + runScriptFunction("ENEMIES_KILLED %d", battle.stats[STAT_ENEMIES_KILLED]); + } } else { diff --git a/src/defs.h b/src/defs.h index eed8c23..0006108 100644 --- a/src/defs.h +++ b/src/defs.h @@ -96,6 +96,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define EF_AI_TARGET (2 << 13) #define EF_AI_LEADER (2 << 14) #define EF_ROPED_ATTACHED (2 << 15) +#define EF_NO_KILL_INC (2 << 16) #define AIF_NONE 0 #define AIF_FOLLOWS_PLAYER (2 << 0) From 34e48805352c052127128652a123014b61474466 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 13 Mar 2016 10:50:41 +0000 Subject: [PATCH 18/30] Added challenge #11. --- data/challenges/11.json | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 data/challenges/11.json diff --git a/data/challenges/11.json b/data/challenges/11.json new file mode 100644 index 0000000..a4f4293 --- /dev/null +++ b/data/challenges/11.json @@ -0,0 +1,49 @@ +{ + "name" : "Destroy INF Klondike and INF Canfield", + "description" : "Destroy INF Klondike and INF Canfield", + "background" : "AUTO", + "planet" : "AUTO", + "music" : "AUTO", + "player" : { + "type" : "ATAF", + "side" : "SIDE_ALLIES", + "pilot" : "-", + "squadron" : "-", + "x" : 25, + "y" : 25 + }, + "challenge" : { + "killLimit" : 2, + "timeLimit" : 90, + "challenges" : [ + { + "type" : "CHALLENGE_TIME", + "value" : 50 + }, + { + "type" : "CHALLENGE_TIME", + "value" : 90 + }, + { + "type" : "CHALLENGE_SHOT_ACCURACY", + "value" : 88 + } + ] + }, + "capitalShips" : [ + { + "name" : "INF Klondike", + "types" : "INF Corvette 01", + "side" : "SIDE_PANDORAN", + "x" : 23, + "y" : 23 + }, + { + "name" : "INF Canfield", + "types" : "INF Corvette 01", + "side" : "SIDE_PANDORAN", + "x" : 27, + "y" : 27 + } + ] +} From b37a2681695501ecc5e5e2d131fdb7d210dcea10 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 13 Mar 2016 10:51:48 +0000 Subject: [PATCH 19/30] Added capital ships to challenge killLimit check. --- src/challenges/challenges.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/challenges/challenges.c b/src/challenges/challenges.c index 27082ad..fcedc30 100644 --- a/src/challenges/challenges.c +++ b/src/challenges/challenges.c @@ -109,7 +109,7 @@ static int challengeFinished(void) } /* disabled enemies count as killed during challenges - not player exclusive, but no need to worry about AI contributions here */ - if (game.currentMission->challengeData.killLimit > 0 && (battle.stats[STAT_ENEMIES_KILLED_PLAYER] + battle.stats[STAT_ENEMIES_DISABLED]) >= game.currentMission->challengeData.killLimit) + if (game.currentMission->challengeData.killLimit > 0 && (battle.stats[STAT_ENEMIES_KILLED_PLAYER] + battle.stats[STAT_CAPITAL_SHIPS_DESTROYED] + battle.stats[STAT_ENEMIES_DISABLED]) >= game.currentMission->challengeData.killLimit) { return 1; } From 7b0c70005f410d9f127b6d304fb056a7fd0ddb98 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 13 Mar 2016 10:52:02 +0000 Subject: [PATCH 20/30] Lookup updates. --- src/system/lookup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/system/lookup.c b/src/system/lookup.c index b2810b9..c72bbcb 100644 --- a/src/system/lookup.c +++ b/src/system/lookup.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static Lookup head; static Lookup *tail; -static void addLookup(char *name, long value); +static void addLookup(char *name, long value); void initLookups(void) { @@ -60,6 +60,7 @@ void initLookups(void) addLookup("EF_SECONDARY_TARGET", EF_SECONDARY_TARGET); addLookup("EF_AI_TARGET", EF_AI_TARGET); addLookup("EF_AI_LEADER", EF_AI_LEADER); + addLookup("EF_NO_KILL_INC", EF_NO_KILL_INC); addLookup("AIF_NONE", AIF_NONE); addLookup("AIF_MOVES_TO_PLAYER", AIF_MOVES_TO_PLAYER); From 35b5e4a1c65a3cc71d8700779691820d45fd2e34 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 13 Mar 2016 10:52:12 +0000 Subject: [PATCH 21/30] Misc cleanup. --- data/challenges/08.json | 4 ++-- src/battle/ai.c | 2 +- src/battle/battle.h | 1 - src/system/init.h | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/data/challenges/08.json b/data/challenges/08.json index c88db75..38997bd 100644 --- a/data/challenges/08.json +++ b/data/challenges/08.json @@ -1,6 +1,6 @@ { - "name" : "Defend Jumpgate Point", - "description" : "Defend Jumpgate Point", + "name" : "Defend Jumpgate", + "description" : "Defend Jumpgate", "background" : "AUTO", "planet" : "AUTO", "music" : "AUTO", diff --git a/src/battle/ai.c b/src/battle/ai.c index 074f221..8cbdf27 100644 --- a/src/battle/ai.c +++ b/src/battle/ai.c @@ -65,7 +65,7 @@ void doAI(void) if ((self->aiFlags & AIF_GOAL_JUMPGATE) && nearJumpgate()) { - /* near jumpgate point, but you might decide to continue to fight, anyway */ + /* near jumpgate, but you might decide to continue to fight, anyway */ if ((self->aiFlags & AIF_COVERS_RETREAT) && rand() % 3) { return; diff --git a/src/battle/battle.h b/src/battle/battle.h index 0662b49..975a5bb 100644 --- a/src/battle/battle.h +++ b/src/battle/battle.h @@ -67,7 +67,6 @@ extern void initQuadtree(Quadtree *root); extern void initEffects(void); extern void doScript(void); extern void destroyScript(void); -extern void runScriptFunction(char *format, ...); extern void initMessageBox(void); extern void doMessageBox(void); extern void drawMessageBox(void); diff --git a/src/system/init.h b/src/system/init.h index 6d6dd05..5c14532 100644 --- a/src/system/init.h +++ b/src/system/init.h @@ -40,7 +40,6 @@ extern void loadCapitalShipDefs(void); extern void loadItemDefs(void); extern void initFonts(void); extern void initBulletDefs(void); -extern void initBattle(void); extern void initGame(void); extern void initStats(void); extern void initStarSystems(void); From ad96a70b0a6eb33f019fd9c2379473c13d4bd1bf Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 13 Mar 2016 10:54:50 +0000 Subject: [PATCH 22/30] i18n updates. --- locale/tbftss.pot | 29 ++++++++++++++++++++++++++++- tools/updateI18N.sh | 4 ++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/locale/tbftss.pot b/locale/tbftss.pot index 1eea83f..3467b9a 100644 --- a/locale/tbftss.pot +++ b/locale/tbftss.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: TBFTSS: The Pandoran War\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-12 15:00:11+0000\n" +"POT-Creation-Date: 2016-03-13 10:54:24+0000\n" "PO-Revision-Date: ???\n" "Last-Translator: ???\n" "Language-Team: ???\n" @@ -1216,3 +1216,30 @@ msgstr "" msgid "Likewise. Maybe we'll get it do it again some day, though a part of me really hopes we won't need to ...." msgstr "" +msgid "Destroy all Darts" +msgstr "" + +msgid "Destroy all Lynxes" +msgstr "" + +msgid "Disable all targets" +msgstr "" + +msgid "60 second battle" +msgstr "" + +msgid "Pass all Waypoints" +msgstr "" + +msgid "Defend Jumpgate" +msgstr "" + +msgid "Collect Packages" +msgstr "" + +msgid "Rescue Civilians" +msgstr "" + +msgid "Destroy INF Klondike and INF Canfield" +msgstr "" + diff --git a/tools/updateI18N.sh b/tools/updateI18N.sh index 4163840..d570a60 100755 --- a/tools/updateI18N.sh +++ b/tools/updateI18N.sh @@ -101,6 +101,10 @@ function extractJSON($filename) } } } + else if (strpos($filename, "challenges") !== false) + { + addString($json->{"description"}); + } } function recurseDir($dir) From 35e23e84505d65b13944df96603c4e8a7606e79a Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 14 Mar 2016 08:30:19 +0000 Subject: [PATCH 23/30] Added large explosions, for capital ships. --- src/battle/capitalShips.c | 6 ++++-- src/battle/capitalShips.h | 1 + src/battle/effects.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/src/battle/capitalShips.c b/src/battle/capitalShips.c index 12f0aed..7e351e9 100644 --- a/src/battle/capitalShips.c +++ b/src/battle/capitalShips.c @@ -297,13 +297,15 @@ static void die(void) self->alive = ALIVE_DEAD; - addDebris(self->x, self->y, 50); + addLargeExplosion(); + + addDebris(self->x, self->y, 12); for (e = battle.entityHead.next ; e != NULL ; e = e->next) { if (e->owner == self) { - e->health = 0; + e->alive = ALIVE_DEAD; } } diff --git a/src/battle/capitalShips.h b/src/battle/capitalShips.h index 88fd79a..61102e1 100644 --- a/src/battle/capitalShips.h +++ b/src/battle/capitalShips.h @@ -48,6 +48,7 @@ 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 void addLargeExplosion(void); extern Battle battle; extern Entity *self; diff --git a/src/battle/effects.c b/src/battle/effects.c index 8c67054..9fb123b 100644 --- a/src/battle/effects.c +++ b/src/battle/effects.c @@ -284,6 +284,40 @@ void addSmallExplosion(void) } } +void addLargeExplosion(void) +{ + int i; + Effect *e; + + for (i = 0 ; i < 64 ; i++) + { + e = malloc(sizeof(Effect)); + memset(e, 0, sizeof(Effect)); + battle.effectTail->next = e; + battle.effectTail = e; + + e->type = EFFECT_TEXTURE; + + e->x = self->x + rand() % 255 - rand() % 255; + e->y = self->y + rand() % 255 - rand() % 255; + e->dx = (rand() % 25) - (rand() % 25); + e->dx *= 0.01; + e->dy = (rand() % 25) - (rand() % 25); + e->dy *= 0.01; + e->texture = explosionTexture; + e->size = 128 + (rand() % 512); + e->r = 255; + + setRandomFlameHue(e); + + e->a = 128 + (rand() % 128); + e->health = e->a; + + e->x -= e->size / 2; + e->y -= e->size / 2; + } +} + void addMissileExplosion(Bullet *b) { int i; From 380ca3e26aae761dba7515f5e5cf634ee7a3539d Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 14 Mar 2016 08:30:34 +0000 Subject: [PATCH 24/30] Tweaked accuracy threshold. --- data/challenges/11.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/challenges/11.json b/data/challenges/11.json index a4f4293..3bebd5a 100644 --- a/data/challenges/11.json +++ b/data/challenges/11.json @@ -26,7 +26,7 @@ }, { "type" : "CHALLENGE_SHOT_ACCURACY", - "value" : 88 + "value" : 90 } ] }, From edc18579ec9e0d9c00add5eeec6568cb689f7f2f Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 14 Mar 2016 11:12:22 +0000 Subject: [PATCH 25/30] Added support for spawners. --- common.mk | 2 +- src/battle/battle.c | 12 ++++++++ src/battle/battle.h | 1 + src/battle/spawners.c | 69 +++++++++++++++++++++++++++++++++++++++++++ src/battle/spawners.h | 26 ++++++++++++++++ src/galaxy/mission.c | 40 ++++++++++++++++++++++--- src/structs.h | 17 +++++++++++ 7 files changed, 162 insertions(+), 5 deletions(-) create mode 100644 src/battle/spawners.c create mode 100644 src/battle/spawners.h diff --git a/common.mk b/common.mk index ebd2cba..84a8ad0 100644 --- a/common.mk +++ b/common.mk @@ -24,7 +24,7 @@ OBJS += objectives.o options.o OBJS += player.o OBJS += quadtree.o OBJS += radar.o resources.o rope.o -OBJS += save.o script.o sound.o starfield.o starSystems.o stats.o +OBJS += save.o script.o sound.o spawners.o starfield.o starSystems.o stats.o OBJS += testMission.o textures.o text.o title.o transition.o trophies.o OBJS += util.o OBJS += waypoints.o widgets.o diff --git a/src/battle/battle.c b/src/battle/battle.c index 62149b9..2607f15 100644 --- a/src/battle/battle.c +++ b/src/battle/battle.c @@ -47,6 +47,7 @@ void initBattle(void) battle.effectTail = &battle.effectHead; battle.objectiveTail = &battle.objectiveHead; battle.locationTail = &battle.locationHead; + battle.spawnerTail = &battle.spawnerHead; app.delegate.logic = &logic; app.delegate.draw = &draw; @@ -140,6 +141,8 @@ static void doBattle(void) doStars(ssx, ssy); doBullets(); + + doSpawners(); doEntities(); @@ -383,6 +386,7 @@ void destroyBattle(void) Effect *e; Objective *o; Location *l; + Spawner *s; while (battle.entityHead.next) { @@ -431,6 +435,14 @@ void destroyBattle(void) free(l); } battle.locationTail = &battle.locationHead; + + while (battle.spawnerHead.next) + { + s = battle.spawnerHead.next; + battle.spawnerHead.next = s->next; + free(s); + } + battle.spawnerTail = &battle.spawnerHead; cJSON_Delete(battle.missionJSON); diff --git a/src/battle/battle.h b/src/battle/battle.h index 975a5bb..3464db7 100644 --- a/src/battle/battle.h +++ b/src/battle/battle.h @@ -84,6 +84,7 @@ extern void initChallengeHome(void); extern void updateAccuracyStats(unsigned int *stats); extern void clearInput(void); extern void runScriptTimeFunctions(void); +extern void doSpawners(void); extern App app; extern Battle battle; diff --git a/src/battle/spawners.c b/src/battle/spawners.c new file mode 100644 index 0000000..326f161 --- /dev/null +++ b/src/battle/spawners.c @@ -0,0 +1,69 @@ +/* +Copyright (C) 2015-2016 Parallel Realities + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#include "spawners.h" + +void doSpawners(void) +{ + Entity *e; + Spawner *s; + char *type; + int i, num; + + for (s = battle.spawnerHead.next ; s != NULL ; s = s->next) + { + if (s->active && --s->time <= 0) + { + num = s->step; + + if (s->limit) + { + num = MIN(s->step, s->total); + + s->total -= num; + } + + for (i = 0 ; i < num ; i++) + { + type = s->types[rand() % s->numTypes]; + + e = spawnFighter(type, 0, 0, s->side); + + if (s->offscreen) + { + e->x = player->x; + e->y = player->y; + } + else + { + e->x = rand() % 2 ? 0 : BATTLE_AREA_WIDTH; + e->y = rand() % 2 ? 0 : BATTLE_AREA_HEIGHT; + } + + e->x += (rand() % 2) ? -SCREEN_WIDTH : SCREEN_WIDTH; + e->y += (rand() % 2) ? -SCREEN_HEIGHT : SCREEN_HEIGHT; + + e->aiFlags |= AIF_UNLIMITED_RANGE; + } + + s->time = s->interval; + } + } +} diff --git a/src/battle/spawners.h b/src/battle/spawners.h new file mode 100644 index 0000000..f6f44b9 --- /dev/null +++ b/src/battle/spawners.h @@ -0,0 +1,26 @@ +/* +Copyright (C) 2015-2016 Parallel Realities + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#include "../common.h" + +extern Entity *spawnFighter(char *name, int x, int y, int side); + +extern Battle battle; +extern Entity *player; diff --git a/src/galaxy/mission.c b/src/galaxy/mission.c index 69700eb..9f761ea 100644 --- a/src/galaxy/mission.c +++ b/src/galaxy/mission.c @@ -27,6 +27,7 @@ static void loadCapitalShips(cJSON *node); static void loadEntities(cJSON *node); static void loadItems(cJSON *node); static void loadLocations(cJSON *node); +static void loadSpawners(cJSON *node); static unsigned long hashcode(const char *str); static void loadEpicData(cJSON *node); static char *getAutoBackground(char *filename); @@ -160,6 +161,8 @@ void loadMission(char *filename) loadItems(cJSON_GetObjectItem(root, "items")); loadLocations(cJSON_GetObjectItem(root, "locations")); + + loadSpawners(cJSON_GetObjectItem(root, "spawners")); if (cJSON_GetObjectItem(root, "epic")) { @@ -757,14 +760,43 @@ static void loadLocations(cJSON *node) STRNCPY(l->name, cJSON_GetObjectItem(node, "name")->valuestring, MAX_NAME_LENGTH); l->x = (cJSON_GetObjectItem(node, "x")->valuedouble / BATTLE_AREA_CELLS) * BATTLE_AREA_WIDTH; l->y = (cJSON_GetObjectItem(node, "y")->valuedouble / BATTLE_AREA_CELLS) * BATTLE_AREA_HEIGHT; - l->size = cJSON_GetObjectItem(node, "size")->valueint; - - active = getJSONValue(node, "active", 1); + l->active = active = getJSONValue(node, "active", 1); l->x += (SCREEN_WIDTH / 2); l->y += (SCREEN_HEIGHT / 2); - l->active = active; + + + node = node->next; + } + } +} + +static void loadSpawners(cJSON *node) +{ + int active; + Spawner *s; + + if (node) + { + node = node->child; + + while (node) + { + s = malloc(sizeof(Spawner)); + memset(s, 0, sizeof(Spawner)); + battle.spawnerTail->next = s; + battle.spawnerTail = s; + + STRNCPY(s->name, cJSON_GetObjectItem(node, "name")->valuestring, MAX_NAME_LENGTH); + s->types = toTypeArray(cJSON_GetObjectItem(node, "types")->valuestring, &s->numTypes); + s->side = lookup(cJSON_GetObjectItem(node, "side")->valuestring); + s->interval = cJSON_GetObjectItem(node, "interval")->valueint * FPS; + s->limit = cJSON_GetObjectItem(node, "limit")->valueint; + s->total = cJSON_GetObjectItem(node, "total")->valueint; + s->step = cJSON_GetObjectItem(node, "step")->valueint; + s->offscreen = getJSONValue(node, "offscreen", 0); + s->active = active = getJSONValue(node, "active", 1); node = node->next; } diff --git a/src/structs.h b/src/structs.h index 334d792..9bbc0f8 100644 --- a/src/structs.h +++ b/src/structs.h @@ -26,6 +26,7 @@ typedef struct Entity Entity; typedef struct Bullet Bullet; typedef struct Debris Debris; typedef struct Effect Effect; +typedef struct Spawner Spawner; typedef struct Objective Objective; typedef struct StarSystem StarSystem; typedef struct Challenge Challenge; @@ -303,6 +304,21 @@ struct Quadtree { Quadtree *node[4]; }; +struct Spawner { + char name[MAX_NAME_LENGTH]; + char **types; + int numTypes; + int side; + int time; + int interval; + int limit; + int total; + int step; + int offscreen; + int active; + Spawner *next; +}; + typedef struct { int entId; SDL_Point camera; @@ -332,6 +348,7 @@ typedef struct { Effect effectHead, *effectTail; Objective objectiveHead, *objectiveTail; Location locationHead, *locationTail; + Spawner spawnerHead, *spawnerTail; struct cJSON *missionJSON; unsigned int stats[STAT_MAX]; Quadtree quadtree; From 4e8b85b6a126bf849c9ca279ffe8672180db588c Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 14 Mar 2016 11:28:01 +0000 Subject: [PATCH 26/30] Removed script-based spawner. Redundant. --- data/challenges/10.json | 14 ++++++---- src/battle/battle.c | 2 +- src/battle/battle.h | 2 +- src/battle/fighters.c | 36 ------------------------- src/battle/script.c | 59 ----------------------------------------- src/battle/script.h | 1 - 6 files changed, 11 insertions(+), 103 deletions(-) diff --git a/data/challenges/10.json b/data/challenges/10.json index 53e2535..3303f3f 100644 --- a/data/challenges/10.json +++ b/data/challenges/10.json @@ -49,12 +49,16 @@ "y" : 25 } ], - "script" : [ + "spawners" : [ { - "function" : "INTERVAL 30", - "lines" : [ - "SPAWN_FIGHTERS Dart SIDE_PIRATE 1 OFFSCREEN" - ] + "name" : "spawner", + "types" : "Dart", + "side" : "SIDE_PIRATE", + "interval" : 30, + "limit" : 0, + "total" : 0, + "step" : 1, + "offscreen" : 1 } ] } diff --git a/src/battle/battle.c b/src/battle/battle.c index 2607f15..522964c 100644 --- a/src/battle/battle.c +++ b/src/battle/battle.c @@ -164,7 +164,7 @@ static void doBattle(void) if (battle.stats[STAT_TIME]++ % FPS == 0) { - runScriptTimeFunctions(); + runScriptFunction("TIME %d", battle.stats[STAT_TIME]); } } } diff --git a/src/battle/battle.h b/src/battle/battle.h index 3464db7..6825177 100644 --- a/src/battle/battle.h +++ b/src/battle/battle.h @@ -83,7 +83,7 @@ extern void destroyEffects(void); extern void initChallengeHome(void); extern void updateAccuracyStats(unsigned int *stats); extern void clearInput(void); -extern void runScriptTimeFunctions(void); +extern void runScriptFunction(const char *format, ...); extern void doSpawners(void); extern App app; diff --git a/src/battle/fighters.c b/src/battle/fighters.c index 01fb800..081a352 100644 --- a/src/battle/fighters.c +++ b/src/battle/fighters.c @@ -99,42 +99,6 @@ Entity *spawnFighter(char *name, int x, int y, int side) return e; } -void spawnScriptFighter(char *fighterTypes, char *sideStr, int num, char *location) -{ - Entity *e; - int i, numTypes, side, offscreen; - char **types, *type; - - types = toTypeArray(fighterTypes, &numTypes); - side = lookup(sideStr); - offscreen = strcmp(location, "OFFSCREEN") == 0; - - for (i = 0 ; i < num ; i++) - { - type = types[rand() % numTypes]; - - e = spawnFighter(type, 0, 0, side); - - if (offscreen) - { - e->x = player->x; - e->y = player->y; - } - else - { - e->x = rand() % 2 ? 0 : BATTLE_AREA_WIDTH; - e->y = rand() % 2 ? 0 : BATTLE_AREA_HEIGHT; - } - - e->x += (rand() % 2) ? -SCREEN_WIDTH : SCREEN_WIDTH; - e->y += (rand() % 2) ? -SCREEN_HEIGHT : SCREEN_HEIGHT; - - e->aiFlags |= AIF_UNLIMITED_RANGE; - } - - free(types); -} - static void randomizeDart(Entity *dart) { char texture[MAX_DESCRIPTION_LENGTH]; diff --git a/src/battle/script.c b/src/battle/script.c index 929422b..fd22259 100644 --- a/src/battle/script.c +++ b/src/battle/script.c @@ -124,60 +124,6 @@ void runScriptFunction(const char *format, ...) } } -void runScriptTimeFunctions(void) -{ - ScriptRunner *scriptRunner; - cJSON *function; - char *functionName; - char funcNameBuffer[MAX_NAME_LENGTH]; - int intParam; - - if (scriptJSON) - { - function = scriptJSON->child; - - sprintf(funcNameBuffer, "TIME %d", battle.stats[STAT_TIME] / 60); - - while (function) - { - functionName = cJSON_GetObjectItem(function, "function")->valuestring; - - if (strcmp(functionName, funcNameBuffer) == 0) - { - scriptRunner = malloc(sizeof(ScriptRunner)); - memset(scriptRunner, 0, sizeof(ScriptRunner)); - - scriptRunner->line = cJSON_GetObjectItem(function, "lines")->child; - - tail->next = scriptRunner; - tail = scriptRunner; - - SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Running script '%s'", funcNameBuffer); - } - - if (strstr(functionName, "INTERVAL")) - { - sscanf(functionName, "%*s %d", &intParam); - - if ((battle.stats[STAT_TIME] / 60) % intParam == 0) - { - scriptRunner = malloc(sizeof(ScriptRunner)); - memset(scriptRunner, 0, sizeof(ScriptRunner)); - - scriptRunner->line = cJSON_GetObjectItem(function, "lines")->child; - - tail->next = scriptRunner; - tail = scriptRunner; - - SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Running script '%s'", funcNameBuffer); - } - } - - function = function->next; - } - } -} - static void executeNextLine(ScriptRunner *runner) { char *line; @@ -256,11 +202,6 @@ static void executeNextLine(ScriptRunner *runner) battle.isEpic = 0; retreatEnemies(); } - else if (strcmp(command, "SPAWN_FIGHTERS") == 0) - { - sscanf(line, "%*s %s %s %d %s", strParam[0], strParam[1], &intParam[0], strParam[2]); - spawnScriptFighter(strParam[0], strParam[1], intParam[0], strParam[2]); - } else { printf("ERROR: Unrecognised script command '%s'\n", command); diff --git a/src/battle/script.h b/src/battle/script.h index b2c98c1..1c92b56 100644 --- a/src/battle/script.h +++ b/src/battle/script.h @@ -34,7 +34,6 @@ extern void activateLocations(char *locations); void activateObjectives(char *objectives); extern int showingMessageBoxes(void); extern char *getTranslatedString(char *string); -extern void spawnScriptFighter(char *fighters, char *side, int num, char *location); extern void activateNextWaypoint(int id); extern void activateJumpgate(int activate); From 634d914bd9076dd97d00046ce709f9367db98a81 Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 14 Mar 2016 11:28:19 +0000 Subject: [PATCH 27/30] Jumpgate initial state fix. --- src/galaxy/mission.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/galaxy/mission.c b/src/galaxy/mission.c index 9f761ea..14844eb 100644 --- a/src/galaxy/mission.c +++ b/src/galaxy/mission.c @@ -588,6 +588,7 @@ static void loadEntities(cJSON *node) y = (cJSON_GetObjectItem(node, "y")->valuedouble / BATTLE_AREA_CELLS) * BATTLE_AREA_HEIGHT; name = NULL; groupName = NULL; + flags = -1; name = getJSONValueStr(node, "name", NULL); groupName = getJSONValueStr(node, "groupName", NULL); From 612e76fe0431516bcbe5baeff4ce4df28cd400be Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 14 Mar 2016 17:54:56 +0000 Subject: [PATCH 28/30] Added INF Swarmer. --- data/fighters/swarmer.json | 15 +++++++++++++++ gfx/fighters/swarmer.png | Bin 0 -> 1459 bytes 2 files changed, 15 insertions(+) create mode 100644 data/fighters/swarmer.json create mode 100644 gfx/fighters/swarmer.png diff --git a/data/fighters/swarmer.json b/data/fighters/swarmer.json new file mode 100644 index 0000000..5979ef2 --- /dev/null +++ b/data/fighters/swarmer.json @@ -0,0 +1,15 @@ +{ + "name" : "Swarmer", + "health" : 5, + "speed" : 2, + "reloadTime" : 8, + "texture" : "gfx/fighters/swarmer.png", + "guns" : [ + { + "type" : "BT_PARTICLE", + "x" : 0, + "y" : 0 + } + ], + "flags" : "EF_TAKES_DAMAGE" +} diff --git a/gfx/fighters/swarmer.png b/gfx/fighters/swarmer.png new file mode 100644 index 0000000000000000000000000000000000000000..34a9285feb4d7f5797412c8bd5b8cb83182927a8 GIT binary patch literal 1459 zcmV;k1x)&hP)X1^@s6D=Y3@00006VoOIv00000 z008+zyMF)x010qNS#tmY3ljhU3ljkVnw%H_000McNliru-~$d3Cn@-RUylF)02y>e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00kRKL_t(Y$CZ|SXjXL;$3OSw zx%YY5v$i?hqo%e^ab}^kbiPc&mf}mkG)6dIkVWQ@DWoW6K}I5?LB+qo8EL5z zX{iw@=ZpaIG>*!XfC0)mgM097jH_3%f!ee*^6ve_GDbZuPOsqd!_uYFQX^8gVuj>h z>Xh6|o$}f2+0s%Yva+C{E0bQcQ6C4|BGer@NbcmR08DVXFm;`2Z+;EHN{@%NUhhA! z9@b6(KJt3W8abqdqoBPXU-(!<4i3%{yFzA<)!>#uAZoM>B#ng3lRi#se3oR`? zIQ|QDhxQ{PXo^C6BtrB3`!ofE-G1$%5E&CE^1VZ%0+>KJ9_O!E41mqMJ!pzTTR2Q> zC`8;Lv?HAiA3Tsd?d^m`@S7$+(1Vk(gTZEtY?j6mBAF#uHKl zYlmtY6XF}Vcx4U;nwu#yP4Y@h88Uo0seu4jE?;Kr*|WS3qyTFg8_CsmW)&CHFDr|* zL4)|Sv5_X*Mm<+W&YjhqP`~1;Z6_r1C<5}fKbqatBmPN3mgO&#m2wN5nB?;qO zfb9@8ln8zOeln7i$x2VBznbXT%FCBgfb*8sQ-e8%L27gz!GYz}T)Re#ZSzHCC6)-L zqA<4#s7L^Z9Du$99Dq3RLViBB z2+yXZaBFV@G!-x$f?Inbuw)6g2+skBw`~I;;PEh&DO^`S?2*U-imFGFW|{z)ih|cL zNHR@KU1z=XkE=kZLr}5D%k}&Bxe^Q#?C9WzQ@=i@Nm2Dk`Z_hy0a8?zs=|7rnF*t~ z2ws;9MNx3OT)60w=dSa8DIO=KxfuccrrBLoT~VkitS8l@KGbMH(~AqSL|BxaO-(e) zsl$g!Pf8+?oJ^*s@#C^(40IxTXTk(-+BVl(Te;WK!Tx>wsES0`nwN)1*BLl@6#=Iv zO4nsK!!YQVnTcZC1Uw!-X=vbWx0{8frKEbjoGULU*4Bm%RJvUFb8;{>jpp;`IUb9# zDL0n^UN3!oK7z-NF|X%F?HLwR4MPOvX0^zcF=OPBA=2x+dc+91SuG+U-}wE#PB{Uj z$Ta24{Cp{4qii2H?n%R4%7zV-5;n?~@#AHg$MY|6{gDMgsv;4dKYf}R1ty`e`ozJV zmYhC$2t4(jVe*;7cE?eDkx^w^l N002ovPDHLkV1kTZn$G|L literal 0 HcmV?d00001 From 1fbf31e56c535d71d3047ade43c75be1ead9a7ea Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 14 Mar 2016 17:55:09 +0000 Subject: [PATCH 29/30] Don't check spawners if player is dead. --- src/battle/battle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle/battle.c b/src/battle/battle.c index 522964c..bde30ff 100644 --- a/src/battle/battle.c +++ b/src/battle/battle.c @@ -141,8 +141,6 @@ static void doBattle(void) doStars(ssx, ssy); doBullets(); - - doSpawners(); doEntities(); @@ -154,6 +152,8 @@ static void doBattle(void) if (player != NULL) { + doSpawners(); + doLocations(); doMessageBox(); From 13344ddc06f091faf20390efbcfd246cc2b0a126 Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 14 Mar 2016 17:55:34 +0000 Subject: [PATCH 30/30] Made many attributes optional. --- data/craft/civilian.json | 3 --- data/craft/infTug.json | 2 -- data/craft/munitionsTransport.json | 1 - data/craft/shuttle.json | 1 - data/craft/tug.json | 2 -- data/fighters/cannonDart.json | 2 -- data/fighters/dart.json | 2 -- data/fighters/missileDart.json | 2 -- data/fighters/simpleDart.json | 2 -- data/fighters/staticDart.json | 2 -- data/fighters/unarmedDart.json | 2 -- .../clarke/05 - clarke defence #5.json | 26 +++++++++++++++++++ data/missions/mace/01 - rebel assault #1.json | 2 +- src/battle/fighters.c | 6 ++--- 14 files changed, 30 insertions(+), 25 deletions(-) create mode 100644 data/missions/clarke/05 - clarke defence #5.json diff --git a/data/craft/civilian.json b/data/craft/civilian.json index 8e81ac6..8e9e449 100644 --- a/data/craft/civilian.json +++ b/data/craft/civilian.json @@ -1,10 +1,7 @@ { "name" : "Civilian", "health" : 15, - "shield" : 0, "speed" : 2, - "reloadTime" : 0, - "shieldRechargeRate" : 0, "texture" : "gfx/craft/civilian01.png", "flags" : "EF_MISSION_TARGET+EF_RETREATING+EF_TAKES_DAMAGE", "aiFlags" : "AIF_GOAL_JUMPGATE+AIF_AVOIDS_COMBAT+AIF_FOLLOWS_PLAYER" diff --git a/data/craft/infTug.json b/data/craft/infTug.json index 473ad61..2e406b5 100644 --- a/data/craft/infTug.json +++ b/data/craft/infTug.json @@ -1,10 +1,8 @@ { "name" : "INF Tug", "health" : 50, - "shield" : 0, "speed" : 1.85, "reloadTime" : 10, - "shieldRechargeRate" : 0, "texture" : "gfx/craft/infTug.png", "flags" : "EF_HAS_ROPE+EF_TAKES_DAMAGE", "aiFlags" : "AIF_AVOIDS_COMBAT+AIF_TOWS" diff --git a/data/craft/munitionsTransport.json b/data/craft/munitionsTransport.json index 9998c16..d5fcbcc 100644 --- a/data/craft/munitionsTransport.json +++ b/data/craft/munitionsTransport.json @@ -4,7 +4,6 @@ "shield" : 50, "speed" : 1.5, "reloadTime" : 10, - "shieldRechargeRate" : 0, "texture" : "gfx/craft/munitionsTransport.png", "flags" : "EF_TAKES_DAMAGE", "aiFlags" : "AIF_AVOIDS_COMBAT" diff --git a/data/craft/shuttle.json b/data/craft/shuttle.json index c415548..931bb22 100644 --- a/data/craft/shuttle.json +++ b/data/craft/shuttle.json @@ -3,7 +3,6 @@ "health" : 15, "shield" : 15, "speed" : 2, - "reloadTime" : 0, "shieldRechargeRate" : 60, "texture" : "gfx/craft/shuttle.png", "flags" : "EF_COLLECTS_ITEMS+EF_TAKES_DAMAGE+EF_NO_EPIC", diff --git a/data/craft/tug.json b/data/craft/tug.json index b8392d5..88302c9 100644 --- a/data/craft/tug.json +++ b/data/craft/tug.json @@ -1,10 +1,8 @@ { "name" : "Tug", "health" : 50, - "shield" : 0, "speed" : 1.85, "reloadTime" : 10, - "shieldRechargeRate" : 0, "texture" : "gfx/craft/tug.png", "guns" : [ { diff --git a/data/fighters/cannonDart.json b/data/fighters/cannonDart.json index 8da3cb8..9f4c0f4 100644 --- a/data/fighters/cannonDart.json +++ b/data/fighters/cannonDart.json @@ -1,10 +1,8 @@ { "name" : "CannonDart", "health" : 15, - "shield" : 0, "speed" : 2.1, "reloadTime" : 24, - "shieldRechargeRate" : 0, "texture" : "gfx/fighters/dart01.png", "guns" : [ { diff --git a/data/fighters/dart.json b/data/fighters/dart.json index 3862aec..d1a4d94 100644 --- a/data/fighters/dart.json +++ b/data/fighters/dart.json @@ -1,10 +1,8 @@ { "name" : "Dart", "health" : 15, - "shield" : 0, "speed" : 2.1, "reloadTime" : 24, - "shieldRechargeRate" : 0, "texture" : "gfx/fighters/dart01.png", "guns" : [ { diff --git a/data/fighters/missileDart.json b/data/fighters/missileDart.json index 8088334..52f41c1 100644 --- a/data/fighters/missileDart.json +++ b/data/fighters/missileDart.json @@ -1,10 +1,8 @@ { "name" : "MissileDart", "health" : 15, - "shield" : 0, "speed" : 2.1, "reloadTime" : 24, - "shieldRechargeRate" : 0, "texture" : "gfx/fighters/dart01.png", "missiles" : 999, "flags" : "EF_TAKES_DAMAGE" diff --git a/data/fighters/simpleDart.json b/data/fighters/simpleDart.json index a1d4e9d..53eec64 100644 --- a/data/fighters/simpleDart.json +++ b/data/fighters/simpleDart.json @@ -1,10 +1,8 @@ { "name" : "SimpleDart", "health" : 15, - "shield" : 0, "speed" : 2.1, "reloadTime" : 24, - "shieldRechargeRate" : 0, "texture" : "gfx/fighters/dart01.png", "guns" : [ { diff --git a/data/fighters/staticDart.json b/data/fighters/staticDart.json index b427114..57fd6d7 100644 --- a/data/fighters/staticDart.json +++ b/data/fighters/staticDart.json @@ -1,10 +1,8 @@ { "name" : "StaticDart", "health" : 15, - "shield" : 0, "speed" : 0, "reloadTime" : 24, - "shieldRechargeRate" : 0, "texture" : "gfx/fighters/dart01.png", "flags" : "EF_TAKES_DAMAGE" } diff --git a/data/fighters/unarmedDart.json b/data/fighters/unarmedDart.json index 42e81ed..97d6269 100644 --- a/data/fighters/unarmedDart.json +++ b/data/fighters/unarmedDart.json @@ -1,10 +1,8 @@ { "name" : "UnarmedDart", "health" : 15, - "shield" : 0, "speed" : 2.1, "reloadTime" : 24, - "shieldRechargeRate" : 0, "texture" : "gfx/fighters/dart01.png", "flags" : "EF_TAKES_DAMAGE" } diff --git a/data/missions/clarke/05 - clarke defence #5.json b/data/missions/clarke/05 - clarke defence #5.json new file mode 100644 index 0000000..859c28c --- /dev/null +++ b/data/missions/clarke/05 - clarke defence #5.json @@ -0,0 +1,26 @@ +{ + "name" : "Clarke Defence #5", + "description" : "", + "requires" : 28, + "background" : "gfx/backgrounds/background06.jpg", + "planet" : "gfx/planets/bluePlanet.png", + "music" : "music/battle/heroism.ogg", + "unwinnable" : 1, + "objectives" : [ + { + "description" : "Eliminate all enemy forces", + "targetName" : "Enemy", + "targetValue" : 1, + "targetType" : "TT_DESTROY", + "isEliminateAll" : 1 + } + ], + "player" : { + "type" : "Lynx", + "side" : "SIDE_ALLIES", + "pilot" : "-", + "squadron" : "-", + "x" : 25, + "y" : 45 + } +} diff --git a/data/missions/mace/01 - rebel assault #1.json b/data/missions/mace/01 - rebel assault #1.json index d119150..a797ac0 100644 --- a/data/missions/mace/01 - rebel assault #1.json +++ b/data/missions/mace/01 - rebel assault #1.json @@ -1,7 +1,7 @@ { "name" : "Rebel Assault #1", "description" : "", - "requires" : 28, + "requires" : 99, "background" : "gfx/backgrounds/background03.jpg", "planet" : "gfx/planets/spirit.png", "music" : "music/battle/InnerCore_Low.ogg", diff --git a/src/battle/fighters.c b/src/battle/fighters.c index 081a352..359183b 100644 --- a/src/battle/fighters.c +++ b/src/battle/fighters.c @@ -676,10 +676,10 @@ static void loadFighterDef(char *filename) STRNCPY(e->name, cJSON_GetObjectItem(root, "name")->valuestring, MAX_NAME_LENGTH); STRNCPY(e->defName, e->name, MAX_NAME_LENGTH); e->health = e->maxHealth = cJSON_GetObjectItem(root, "health")->valueint; - e->shield = e->maxShield = cJSON_GetObjectItem(root, "shield")->valueint; + e->shield = e->maxShield = getJSONValue(root, "shield", 0); e->speed = cJSON_GetObjectItem(root, "speed")->valuedouble; - e->reloadTime = cJSON_GetObjectItem(root, "reloadTime")->valueint; - e->shieldRechargeRate = cJSON_GetObjectItem(root, "shieldRechargeRate")->valueint; + e->reloadTime = getJSONValue(root, "reloadTime", 0); + e->shieldRechargeRate = getJSONValue(root, "shieldRechargeRate", 0); e->texture = getTexture(cJSON_GetObjectItem(root, "texture")->valuestring); SDL_QueryTexture(e->texture, NULL, NULL, &e->w, &e->h);