3
* Copyright (C) Remigiusz Dybka 2009 <remigiusz.dybka@gmail.com>
5
Zaz is free software: you can redistribute it and/or modify it
6
under the terms of the GNU General Public License as published by the
7
Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
10
Zaz is distributed in the hope that it will be useful, but
11
WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
See the GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License along
16
with this program. If not, see <http://www.gnu.org/licenses/>.
19
#ifndef __GAMELOOP_H__
20
#define __GAMELOOP_H__
30
#include "lineeditor.h"
32
class GameLoop : public Scenes::Scene
34
friend void pauseMenuContinueHandler(void *ptr);
35
friend void pauseMenuEndGameHandler(void *ptr);
36
friend void nextLevelMenuNextLevelHandler(void *ptr);
37
friend void nextLevelMenuViewReplayHandler(void *ptr);
38
friend void nextLevelMenuExportVideoHandler(void *ptr);
39
friend void gameOverMenuRestartHandler(void *ptr);
40
friend void lifeLostMenuRetryLevelHandler(void *ptr);
42
static const uint nLives = 3;
43
static const uint screenShotTextureSize = 512;
47
uint currentLevelName;
52
vector<string>levelNames;
62
bool showLifeLostMenu;
69
GLuint screenShotTexture;
79
stringstream tempRecording;
85
int livesLeftInReplay;
87
void CenterMsg(string msg, double y, FTFont *font);
90
GameLoop(Scenes::Settings *settings, SDL_Surface *surf, GLuint *gameTextures, uint startLevel, uint fps = Scenes::DEFAULT_FPS);
92
void GenScreenShotTexture();
94
void Render(ulong frame);
95
void Logic(ulong frame);
103
void pauseMenuContinueHandler(void *ptr);
104
void pauseMenuEndGameHandler(void *ptr);
105
void nextLevelMenuNextLevelHandler(void *ptr);
106
void nextLevelMenuViewReplayHandler(void *ptr);
107
void nextLevelMenuExportVideoHandler(void *ptr);
108
void gameOverMenuRestartHandler(void *ptr);
109
void lifeLostMenuRetryLevelHandler(void *ptr);
111
#endif //__GAMELOOP_H__