Challenge mission graphics.
This commit is contained in:
parent
2e5b45064a
commit
f153383f9e
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
|
@ -72,8 +72,6 @@ void initBattle(void)
|
||||||
|
|
||||||
initMessageBox();
|
initMessageBox();
|
||||||
|
|
||||||
initMissionInfo();
|
|
||||||
|
|
||||||
initDebris();
|
initDebris();
|
||||||
|
|
||||||
resetWaypoints();
|
resetWaypoints();
|
||||||
|
|
|
@ -52,7 +52,6 @@ extern void doWidgets(void);
|
||||||
extern void loadMission(char *filename);
|
extern void loadMission(char *filename);
|
||||||
extern void resetHud(void);
|
extern void resetHud(void);
|
||||||
extern void doHud(void);
|
extern void doHud(void);
|
||||||
extern void initMissionInfo(void);
|
|
||||||
extern void drawMissionInfo(void);
|
extern void drawMissionInfo(void);
|
||||||
extern void drawBackground(SDL_Texture *texture);
|
extern void drawBackground(SDL_Texture *texture);
|
||||||
extern void initBackground(void);
|
extern void initBackground(void);
|
||||||
|
|
|
@ -30,10 +30,10 @@ static const char *objectiveStatus[] = {"Incomplete", "Complete", "Failed", "Con
|
||||||
|
|
||||||
void initMissionInfo(void)
|
void initMissionInfo(void)
|
||||||
{
|
{
|
||||||
missionStartTexture = getTexture("gfx/battle/missionStart.png");
|
missionStartTexture = !battle.isChallenge ? getTexture("gfx/battle/missionStart.png") : getTexture("gfx/battle/challengeStart.png");
|
||||||
missionInProgressTexture = getTexture("gfx/battle/missionInProgress.png");
|
missionInProgressTexture = !battle.isChallenge ? getTexture("gfx/battle/missionInProgress.png") : getTexture("gfx/battle/challengeInProgress.png");
|
||||||
missionCompleteTexture = getTexture("gfx/battle/missionComplete.png");
|
missionCompleteTexture = !battle.isChallenge ? getTexture("gfx/battle/missionComplete.png") : getTexture("gfx/battle/challengeComplete.png");
|
||||||
missionFailedTexture = getTexture("gfx/battle/missionFailed.png");
|
missionFailedTexture = !battle.isChallenge ? getTexture("gfx/battle/missionFailed.png") : getTexture("gfx/battle/challengeFailed.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawMissionInfo(void)
|
void drawMissionInfo(void)
|
||||||
|
|
|
@ -117,7 +117,7 @@ void loadMission(char *filename)
|
||||||
|
|
||||||
battle.background = getTexture(cJSON_GetObjectItem(root, "background")->valuestring);
|
battle.background = getTexture(cJSON_GetObjectItem(root, "background")->valuestring);
|
||||||
|
|
||||||
planetScale = 75 + (rand() % 125);
|
planetScale = 25 + (rand() % 100);
|
||||||
planetScale *= 0.01;
|
planetScale *= 0.01;
|
||||||
battle.planetTexture = getTexture(cJSON_GetObjectItem(root, "planet")->valuestring);
|
battle.planetTexture = getTexture(cJSON_GetObjectItem(root, "planet")->valuestring);
|
||||||
battle.planet.x = (SCREEN_WIDTH / 2) - (rand() % SCREEN_WIDTH) + (rand() % SCREEN_WIDTH);
|
battle.planet.x = (SCREEN_WIDTH / 2) - (rand() % SCREEN_WIDTH) + (rand() % SCREEN_WIDTH);
|
||||||
|
@ -183,6 +183,8 @@ void loadMission(char *filename)
|
||||||
|
|
||||||
battle.isChallenge = game.currentMission->challengeHead.next != NULL;
|
battle.isChallenge = game.currentMission->challengeHead.next != NULL;
|
||||||
|
|
||||||
|
initMissionInfo();
|
||||||
|
|
||||||
playMusic(music);
|
playMusic(music);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ extern void initScript(cJSON *missionJSON);
|
||||||
extern char *getFileLocation(char *filename);
|
extern char *getFileLocation(char *filename);
|
||||||
extern void updateCapitalShipComponentProperties(Entity *parent);
|
extern void updateCapitalShipComponentProperties(Entity *parent);
|
||||||
extern void countNumEnemies(void);
|
extern void countNumEnemies(void);
|
||||||
|
extern void initMissionInfo(void);
|
||||||
|
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
extern Entity *player;
|
extern Entity *player;
|
||||||
|
|
Loading…
Reference in New Issue