Show objectives intro screen when starting a level.
This commit is contained in:
parent
e9c1560bde
commit
bf0f64caf8
|
@ -95,9 +95,8 @@ void clearControl(int type)
|
|||
}
|
||||
}
|
||||
|
||||
void resetAcceptControls(void)
|
||||
void clearControls(void)
|
||||
{
|
||||
app.keyboard[SDL_SCANCODE_SPACE] = app.keyboard[SDL_SCANCODE_RETURN] = 0;
|
||||
|
||||
clearControl(CONTROL_FIRE);
|
||||
memset(&app.keyboard, 0, sizeof(int) * MAX_KEYBOARD_KEYS);
|
||||
memset(&app.joypadButton, 0, sizeof(int) * SDL_CONTROLLER_BUTTON_MAX);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ static void drawNormal(void);
|
|||
static void addHelperItems(void);
|
||||
static void spawnEnemies(void);
|
||||
static int canAdd(Unit *u, int mx, int my);
|
||||
void startMission(void);
|
||||
static void startMission(void);
|
||||
|
||||
static Texture *background;
|
||||
static int observationIndex;
|
||||
|
@ -82,8 +82,6 @@ void initWorld(void)
|
|||
app.delegate.logic = logic;
|
||||
app.delegate.draw = draw;
|
||||
|
||||
startMission();
|
||||
|
||||
world.bob->x = 166 * MAP_TILE_SIZE;
|
||||
world.bob->y = 103 * MAP_TILE_SIZE;
|
||||
}
|
||||
|
@ -139,6 +137,12 @@ static void draw(void)
|
|||
drawMissionStatus();
|
||||
break;
|
||||
|
||||
case WS_START:
|
||||
drawNormal();
|
||||
drawMissionStatus();
|
||||
drawText(SCREEN_WIDTH / 2, SCREEN_HEIGHT - 80, 24, TA_CENTER, colors.white, _("Press Fire to Continue"));
|
||||
break;
|
||||
|
||||
default:
|
||||
if (world.betweenTimer == 0)
|
||||
{
|
||||
|
@ -164,7 +168,7 @@ static void drawNormal(void)
|
|||
drawParticles(PLANE_FOREGROUND);
|
||||
}
|
||||
|
||||
void startMission(void)
|
||||
static void startMission(void)
|
||||
{
|
||||
Entity *self;
|
||||
SDL_Rect *r;
|
||||
|
@ -209,6 +213,13 @@ static void doWorldStart(void)
|
|||
world.entityChaseTimer = MAX(world.entityChaseTimer - 1, 0);
|
||||
|
||||
doCommon();
|
||||
|
||||
if (isAcceptControl())
|
||||
{
|
||||
clearControls();
|
||||
|
||||
startMission();
|
||||
}
|
||||
}
|
||||
|
||||
static void doWorldInProgress(void)
|
||||
|
|
|
@ -64,8 +64,12 @@ extern int isOnScreen(Entity *e);
|
|||
extern int isControl(int type);
|
||||
extern void clearControl(int type);
|
||||
extern void drawMissionStatus(void);
|
||||
extern int isAcceptControl(void);
|
||||
extern void clearControls(void);
|
||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
||||
|
||||
extern App app;
|
||||
extern Colors colors;
|
||||
extern Dev dev;
|
||||
extern Game game;
|
||||
extern World world;
|
||||
|
|
Loading…
Reference in New Issue