Fixes for datatype size on amd64.
[crack-attack.git] / src / MetaState.h
blob6ac3ec36a8c3b648a65cb3aa67767763c8738f49
1 /*
2 * MetaState.h
3 * Daniel Nelson - 8/24/0
5 * Copyright (C) 2000 Daniel Nelson
6 * Copyright (C) 2004 Andrew Sayman
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 * Daniel Nelson - aluminumangel.org
23 * 174 W. 18th Ave.
24 * Columbus, OH 43210
27 #ifndef METASTATE_H
28 #define METASTATE_H
30 #include "Game.h"
32 // program states
33 #define MS_BOTH_KEY_WAIT (1 << 0)
34 #define MS_REMOTE_KEY_WAIT (1 << 1)
35 #define MS_LOCAL_KEY_WAIT (1 << 2)
36 #define MS_GAME_OVER_KEY_WAIT (1 << 3)
37 #define MS_GAME_OVER_ANY_KEY_WAIT (1 << 4)
38 #define MS_READY_GAME_START (1 << 5)
39 #define MS_CELEBRATION_WAIT (1 << 6)
40 #define MS_GAME_PLAY (1 << 7)
41 #define MS_CONCESSION (1 << 8)
43 /* static */ class MetaState {
44 public:
45 static void programStart ( int _mode,
46 char player_name[GC_PLAYER_NAME_LENGTH],
47 int width,
48 int height);
49 static void programEnd ( );
50 static void gameStart ( );
51 static void gameWon ( );
52 static void gameLoss ( );
53 static void gameFinish ( );
55 static void celebrationComplete ( );
57 static void localKeyPressed ( bool esc );
58 static void remoteKeyPressed ( );
59 static void remoteReady ( );
61 // set to Game::time_step upon game finish
62 static int final_time_step;
64 // current game state - playing, local key wait, ...
65 static int state;
67 // global game mode - server, client, solo, ...
68 static int mode;
70 // player name
71 static char player_name[GC_PLAYER_NAME_LENGTH];
74 #endif