Moved prepareScene / presentScene into main loop.
This commit is contained in:
parent
66874a1720
commit
a7f9585a9a
|
@ -187,8 +187,6 @@ static void doBattle(void)
|
|||
|
||||
static void draw(void)
|
||||
{
|
||||
prepareScene();
|
||||
|
||||
if (player != NULL)
|
||||
{
|
||||
battle.camera.x = player->x - (SCREEN_WIDTH / 2);
|
||||
|
@ -233,8 +231,6 @@ static void draw(void)
|
|||
drawOptions();
|
||||
break;
|
||||
}
|
||||
|
||||
presentScene();
|
||||
}
|
||||
|
||||
static void drawMenu(void)
|
||||
|
|
|
@ -27,8 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define SHOW_OBJECTIVES 2
|
||||
#define SHOW_OPTIONS 3
|
||||
|
||||
extern void prepareScene(void);
|
||||
extern void presentScene(void);
|
||||
extern void doBullets(void);
|
||||
extern void drawBullets(void);
|
||||
extern void doStars(float dx, float dy);
|
||||
|
|
|
@ -312,8 +312,6 @@ static void doPulses(void)
|
|||
|
||||
static void draw(void)
|
||||
{
|
||||
prepareScene();
|
||||
|
||||
drawBackground(background);
|
||||
|
||||
drawStars();
|
||||
|
@ -346,8 +344,6 @@ static void draw(void)
|
|||
drawFallenView();
|
||||
break;
|
||||
}
|
||||
|
||||
presentScene();
|
||||
}
|
||||
|
||||
static void drawPulses(void)
|
||||
|
|
|
@ -27,8 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define SHOW_STATS 4
|
||||
#define SHOW_FALLEN_MESSAGE 5
|
||||
|
||||
extern void prepareScene(void);
|
||||
extern void presentScene(void);
|
||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
||||
extern void initBattle(void);
|
||||
extern void loadMission(char *filename);
|
||||
|
|
|
@ -157,8 +157,6 @@ static void doFighters(void)
|
|||
|
||||
static void draw(void)
|
||||
{
|
||||
prepareScene();
|
||||
|
||||
drawBackground(background);
|
||||
|
||||
drawStars();
|
||||
|
@ -184,8 +182,6 @@ static void draw(void)
|
|||
{
|
||||
drawOptions();
|
||||
}
|
||||
|
||||
presentScene();
|
||||
}
|
||||
|
||||
static void drawFighters(void)
|
||||
|
|
|
@ -22,8 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#define NUM_FIGHTERS 12
|
||||
|
||||
extern void prepareScene(void);
|
||||
extern void presentScene(void);
|
||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
||||
extern SDL_Texture *getTexture(const char *filename);
|
||||
extern void startSectionTransition(void);
|
||||
|
|
|
@ -103,9 +103,13 @@ int main(int argc, char *argv[])
|
|||
|
||||
game.stats[STAT_TIME]++;
|
||||
}
|
||||
|
||||
prepareScene();
|
||||
|
||||
app.delegate.draw();
|
||||
|
||||
presentScene();
|
||||
|
||||
doDevKeys();
|
||||
|
||||
frames++;
|
||||
|
|
|
@ -37,6 +37,8 @@ extern void doMouseWheel(SDL_MouseWheelEvent *event);
|
|||
extern void doMouseMotion(SDL_MouseMotionEvent *event);
|
||||
extern void doDevKeys(void);
|
||||
extern void expireTexts(int all);
|
||||
extern void prepareScene(void);
|
||||
extern void presentScene(void);
|
||||
|
||||
App app;
|
||||
Colors colors;
|
||||
|
|
Loading…
Reference in New Issue