diff --git a/data/missions/aster/01 - return to aster #1.json b/data/missions/aster/01 - return to aster #1.json index f974cf6..9544c17 100644 --- a/data/missions/aster/01 - return to aster #1.json +++ b/data/missions/aster/01 - return to aster #1.json @@ -3,7 +3,7 @@ "description" : "We've received word from CSN Florin that they have suffered a power failure, affecting the entire ship. The stranded vessel has attracted the attention of the Pandorans, who have already deployed shuttles and tugs to absorb it into their ranks. The Salty Wildcats will intercept and provide cover until Florin can affect repairs.", "requires" : 30, "background" : "gfx/backgrounds/background04.jpg", - "planet" : "gfx/planets/bluePlanet.png", + "planet" : "gfx/planets/star.png", "music" : "music/battle/track-3.mp3", "manualComplete" : 1, "objectives" : [ diff --git a/data/missions/aster/02 - return to aster #2.json b/data/missions/aster/02 - return to aster #2.json index 2029790..1a299ab 100644 --- a/data/missions/aster/02 - return to aster #2.json +++ b/data/missions/aster/02 - return to aster #2.json @@ -3,7 +3,7 @@ "description" : "Tzac bombers have been identified in the area, deploying mines. While this violates intergalactic treaties, we could never assume that Tzac, much like the Pandorans, would abide by the rules of war. We need to take down those bombers quickly. Exercise caution around the mines, as they are especially potent.", "requires" : 33, "background" : "gfx/backgrounds/background04.jpg", - "planet" : "gfx/planets/bluePlanet.png", + "planet" : "gfx/planets/star.png", "music" : "music/battle/track-3.mp3", "manualComplete" : 1, "objectives" : [ diff --git a/gfx/planets/star.png b/gfx/planets/star.png new file mode 100644 index 0000000..84f8f9b Binary files /dev/null and b/gfx/planets/star.png differ diff --git a/src/galaxy/mission.c b/src/galaxy/mission.c index a7f97b0..ecb39c1 100644 --- a/src/galaxy/mission.c +++ b/src/galaxy/mission.c @@ -148,14 +148,20 @@ void loadMission(char *filename) { planet = getAutoPlanet(filename); } - planetScale = 75 + (rand() % 125); - planetScale *= 0.01; + battle.planetTexture = getTexture(planet); battle.planet.x = (SCREEN_WIDTH / 2) - (rand() % SCREEN_WIDTH) + (rand() % SCREEN_WIDTH); battle.planet.y = (SCREEN_HEIGHT / 2) - (rand() % SCREEN_HEIGHT) + (rand() % SCREEN_HEIGHT); - SDL_QueryTexture(battle.planetTexture, NULL, NULL, &battle.planetWidth, &battle.planetHeight); - battle.planetWidth *= planetScale; - battle.planetHeight *= planetScale; + + if (strcmp(planet, "gfx/planets/star.png") != 0) + { + SDL_QueryTexture(battle.planetTexture, NULL, NULL, &battle.planetWidth, &battle.planetHeight); + + planetScale = 75 + (rand() % 125); + planetScale *= 0.01; + battle.planetWidth *= planetScale; + battle.planetHeight *= planetScale; + } srand(time(NULL));