Start mission from hub.
This commit is contained in:
parent
2cd629cf86
commit
46d6ce1cd6
|
@ -71,6 +71,8 @@ void initHub(void)
|
|||
|
||||
memset(&keySprites, 0, sizeof(Sprite*) * MAX_KEY_TYPES);
|
||||
|
||||
selectedMission = NULL;
|
||||
|
||||
loadMusic("music/61321__mansardian__news-background.ogg");
|
||||
|
||||
atlasTexture = getTexture("gfx/atlas/atlas.png");
|
||||
|
@ -517,6 +519,8 @@ static void startMission(void)
|
|||
saveGame();
|
||||
|
||||
stopMusic();
|
||||
|
||||
initWorld();
|
||||
}
|
||||
|
||||
static void cancel(void)
|
||||
|
|
|
@ -49,6 +49,7 @@ extern void playMusic(int loop);
|
|||
extern void stopMusic(void);
|
||||
extern void startSectionTransition(void);
|
||||
extern void endSectionTransition(void);
|
||||
extern void initWorld(void);
|
||||
|
||||
extern App app;
|
||||
extern Colors colors;
|
||||
|
|
|
@ -57,10 +57,10 @@ static void doDebugControls(void)
|
|||
world.bob->weaponType = WPN_GRENADES;
|
||||
}
|
||||
|
||||
if (app.keyboard[SDL_SCANCODE_0])
|
||||
if (app.keyboard[SDL_SCANCODE_0] && world.state != WS_COMPLETE)
|
||||
{
|
||||
saveGame();
|
||||
saveWorld();
|
||||
app.keyboard[SDL_SCANCODE_0] = 0;
|
||||
stopMusic();
|
||||
world.state = WS_COMPLETE;
|
||||
world.missionCompleteTimer = FPS * 3;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,8 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include "../common.h"
|
||||
|
||||
extern void saveGame(void);
|
||||
extern void saveWorld(void);
|
||||
extern void stopMusic(void);
|
||||
|
||||
extern App app;
|
||||
extern Dev dev;
|
||||
|
|
Loading…
Reference in New Issue