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();
|
||||
|
||||
initMissionInfo();
|
||||
|
||||
initDebris();
|
||||
|
||||
resetWaypoints();
|
||||
|
|
|
@ -52,7 +52,6 @@ extern void doWidgets(void);
|
|||
extern void loadMission(char *filename);
|
||||
extern void resetHud(void);
|
||||
extern void doHud(void);
|
||||
extern void initMissionInfo(void);
|
||||
extern void drawMissionInfo(void);
|
||||
extern void drawBackground(SDL_Texture *texture);
|
||||
extern void initBackground(void);
|
||||
|
|
|
@ -30,10 +30,10 @@ static const char *objectiveStatus[] = {"Incomplete", "Complete", "Failed", "Con
|
|||
|
||||
void initMissionInfo(void)
|
||||
{
|
||||
missionStartTexture = getTexture("gfx/battle/missionStart.png");
|
||||
missionInProgressTexture = getTexture("gfx/battle/missionInProgress.png");
|
||||
missionCompleteTexture = getTexture("gfx/battle/missionComplete.png");
|
||||
missionFailedTexture = getTexture("gfx/battle/missionFailed.png");
|
||||
missionStartTexture = !battle.isChallenge ? getTexture("gfx/battle/missionStart.png") : getTexture("gfx/battle/challengeStart.png");
|
||||
missionInProgressTexture = !battle.isChallenge ? getTexture("gfx/battle/missionInProgress.png") : getTexture("gfx/battle/challengeInProgress.png");
|
||||
missionCompleteTexture = !battle.isChallenge ? getTexture("gfx/battle/missionComplete.png") : getTexture("gfx/battle/challengeComplete.png");
|
||||
missionFailedTexture = !battle.isChallenge ? getTexture("gfx/battle/missionFailed.png") : getTexture("gfx/battle/challengeFailed.png");
|
||||
}
|
||||
|
||||
void drawMissionInfo(void)
|
||||
|
|
|
@ -117,7 +117,7 @@ void loadMission(char *filename)
|
|||
|
||||
battle.background = getTexture(cJSON_GetObjectItem(root, "background")->valuestring);
|
||||
|
||||
planetScale = 75 + (rand() % 125);
|
||||
planetScale = 25 + (rand() % 100);
|
||||
planetScale *= 0.01;
|
||||
battle.planetTexture = getTexture(cJSON_GetObjectItem(root, "planet")->valuestring);
|
||||
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;
|
||||
|
||||
initMissionInfo();
|
||||
|
||||
playMusic(music);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ extern void initScript(cJSON *missionJSON);
|
|||
extern char *getFileLocation(char *filename);
|
||||
extern void updateCapitalShipComponentProperties(Entity *parent);
|
||||
extern void countNumEnemies(void);
|
||||
extern void initMissionInfo(void);
|
||||
|
||||
extern Battle battle;
|
||||
extern Entity *player;
|
||||
|
|
Loading…
Reference in New Issue