#include "message.h"
#include <SDL.h>
Include dependency graph for gameconfig.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | BattleFieldError_t |
A description with human readible error data from the last error while reading in a battlefield file. More... | |
struct | GameOptions_t |
Stores information on the current game's options. More... | |
struct | ScoreUpdate_t |
A store of score updates used to retain updates over a frame and send them all out together. More... | |
Defines | |
#define | BFLDERRLEN 120 |
#define | MAX_OBSTACLES_PER_MSG 62 |
The maximum number of obstacles that can be transmitted in a single MSG_TYPE_OBSTACLE message. | |
Typedefs | |
typedef BattleFieldError_t | BattleFieldError |
typedef GameOptions_t | GameOptions |
typedef ScoreUpdate_t | ScoreUpdate |
Enumerations | |
enum | GAME_OPT_FLAGS { OPT_ISSET = 1, OPT_ERROR = 2, OPT_USEGUIDEDSHELL = 4, OPT_USEPONGSHELL = 8, OPT_ISCTF = 16, OPT_ISWINSCOREABS = 32, OPT_ALLOWDRAW = 64, OPT_UPDATESCORE = 128 } |
Functions | |
void | AddToConfigList (ClientData *client) |
Adds a client to the list of clients waiting for game configuration data. | |
Bool | HandleArea (SocketAddr *origin, NetBuffer *buffer, Uint8 *unused, Uint16 noid) |
Handles an incomming message from the network describing the goal and spawn areas. | |
Bool | HandleGameOption (SocketAddr *origin, NetBuffer *buffer, Uint8 *unused, Uint16 noid) |
Handles an incomming message from the network describing the game options. | |
Bool | HandleObstacle (SocketAddr *origin, NetBuffer *buffer, Uint8 *unused, Uint16 noid) |
Handles an incomming message from the network describing the obstacles on the battlefield. | |
Bool | HandleScoreUpdate (SocketAddr *origin, NetBuffer *buffer, Uint8 *unused, Uint16 noid) |
Handles an incomming message from the network with a updated scores. | |
Bool | InitGameConfig (const char *fname) |
Loads in a game configuration and prepares to send the configuration to all clients. | |
void | RemoveFromConfigList (ClientData *client) |
Removes a given client from the list of clients waiting to receive the game configuration if the client is in the list. | |
Bool | SendScoreUpdate (ScoreUpdate *scores, int len) |
Sends a score update to all connected clients. | |
Bool | ServiceGameConfig () |
Handles an iteration of sending game configuration data. | |
void | UninitGameConfig () |
Destroyes a loaded game configuration and deallocates all memory used to store that configuration. | |
Variables | |
BattleFieldError | bfErr |
The description of the last error to occur while reading a battlefield file. | |
ClientData * | configListEnd |
The end of the list of clients that need to be given the game configuration. | |
ClientData * | configListStart |
The start of the list of clients that need to be given the game configuration. | |
GameOptions | gameOpts |
The current game's options. | |
SDL_Rect * | goalAreas [TEAM_MAX] |
The lists of CTF goal areas for the game organized by owning team. | |
SDL_Rect * | spawnAreas [TEAM_MAX] |
The lists of spawn areas for the game organized by owning team. |
Copyright (C) 2007 Jeff Jackowski
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Or visit their website at: http://www.gnu.org/
Definition in file gameconfig.h.
#define BFLDERRLEN 120 |
typedef struct BattleFieldError_t BattleFieldError |
Definition at line 178 of file gameconfig.h.
typedef struct GameOptions_t GameOptions |
Definition at line 92 of file gameconfig.h.
enum GAME_OPT_FLAGS |
Definition at line 94 of file gameconfig.h.
The description of the last error to occur while reading a battlefield file.
If no error has occured, the data is invalid.
Definition at line 52 of file gameconfig.c.
Referenced by BfldErrResize(), and ErrorOut().
The current game's options.
Definition at line 47 of file gameconfig.c.
Referenced by ErrorOut(), FlagCfgMsg(), GameInit(), GameRun(), HandleArea(), HandleGameOption(), HandleObstacle(), HandleScoreUpdate(), InitGameConfig(), MakeBuffers(), MessageSrvToCli(), MoveShell(), MoveTank(), ObstacleInit(), ObstacleUninit(), ReadInts(), RenderScore(), SendScoreUpdate(), ServiceGameConfig(), SetupScrolling(), SpawnTank(), StartLoadConfig(), and UninitGameConfig().
SDL_Rect* goalAreas[TEAM_MAX] |
The lists of CTF goal areas for the game organized by owning team.
Definition at line 50 of file gameconfig.c.
Referenced by HandleArea(), MakeBuffers(), and UninitGameConfig().
SDL_Rect* spawnAreas[TEAM_MAX] |
The lists of spawn areas for the game organized by owning team.
Definition at line 49 of file gameconfig.c.
Referenced by HandleArea(), MakeBuffers(), SpawnTank(), and UninitGameConfig().