-
Notifications
You must be signed in to change notification settings - Fork 0
/
PuyoCommander.h
95 lines (77 loc) · 2.14 KB
/
PuyoCommander.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#ifndef _PUYOCOMMANDER
#define _PUYOCOMMANDER
extern "C" {
#include "sofont.h"
#include "menu.h"
#include "scrollingtext.h"
#include "PuyoDoomMelt.h"
}
#include "corona32.h"
#define CORONA_HEIGHT 120
class PuyoDrawable
{
public:
virtual void draw() = 0;
};
class PuyoCommander
{
public:
PuyoCommander(bool fullscreen,bool sound, bool audio);
void run();
void updateAll(PuyoDrawable *starter, SDL_Surface *extra_surf = NULL);
void showGameOver() { menu_show(gameOverMenu); }
void hideGameOver() { menu_hide(gameOverMenu); }
bool changeControlLoop(int controlIndex, PuyoDrawable *starter);
void controlsMenuLoop(PuyoDrawable *d);
void optionMenuLoop(PuyoDrawable *d = NULL);
void backLoop(Menu *menu, PuyoDrawable *starter = NULL);
void startSingleGameLoop();
void startTwoPlayerGameLoop();
void enterStringLoop(Menu *menu, const char *kItem, char out[256]);
Menu *gameOverMenu;
Menu *gameOver2PMenu;
Menu *gameOver1PMenu;
Menu *nextLevelMenu;
Menu *finishedMenu;
Menu *looserMenu;
Menu *highScoresMenu;
void updateHighScoresMenu(int newOne = -1);
SoFont *smallFont;
SoFont *darkFont;
SoFont *menuFont;
DoomMelt *melt;
private:
Menu *mainMenu;
Menu *singleGameMenu;
Menu *twoPlayerGameMenu;
Menu *optionMenu;
Menu *controlsMenu;
Menu *rulesMenu;
Menu *aboutMenu;
Menu *mustRestartMenu;
ScrollingText *scrollingText;
unsigned int cycle, start_time;
unsigned int lastRenderedCycle;
unsigned int maxFrameDrop;
static const int player1Joystick = 1;
static const int player2Joystick = 0;
int *corona_screen;
Corona32 *corona;
};
extern SDL_Surface *display;
extern class PuyoCommander *theCommander;
extern const char *kYouDidIt;
extern const char *kNextLevel;
extern const char *kLooser;
extern const char *kCurrentLevel;
extern const char *kContinueLeft;
extern const char *kGameOver;
extern const char *kYouGotToLevel;
extern const char *kHitActionToContinue;
extern const char *kContinue;
extern const char *kPlayer;
extern const char *kScore;
extern const char *kContinueGame;
extern const char *kAbortGame;
extern const char *kOptions;
#endif // _PUYOCOMMANDER