gamestate.c File Reference

Implements the operating state for game play (STATE_CODES::STATE_PLAY). More...

#include "states.h"
#include "game.h"
#include "color.h"
#include "gameconfig.h"
#include "obstacle.h"
#include "playernet.h"
#include "tanksprite.h"
#include "name.h"
#include "net.h"
#include "notice.h"
#include "menustate.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>

Include dependency graph for gamestate.c:

Go to the source code of this file.

Defines

#define BORDER_WIDTH   4
 The width of the border around the battlefield in logical pixels.

Functions

int GameInit ()
 Initalizes the data needed for gameplay.
int GameRun ()
 Runs the body of the Game Simulation Loop.
int GameUninit ()
 Removes the data needed for gameplay and prepares the system to handle another operating state.
static Bool GraphicReset ()
 Reloads all the graphics for the game.
static void RenderScore (Bool forceRender)
 Renders the score for the red and blue teams to the upper left and right corners of the display.
static void SetupScrolling ()
 Determines if the battlefield is too large to fit on screen and sets dInfo.scrollField (DisplayInfo::scrollField) accordingly.

Variables

RenderItem background
 The background image.
static RenderItem border [4]
 The items used for a border around the battlefield.
Uint8 eventState [EC_MAX]
 The event codes that are used to process user input in a way that separates the exact input used from the code that responds to the input.
Uint32 frameTime
 The current simulation time in milliseconds.
static Sint16 scores [2]


Detailed Description

Implements the operating state for game play (STATE_CODES::STATE_PLAY).

Author:
Jeff Jackowski (jeffj@ro.com)
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 gamestate.c.


Define Documentation

#define BORDER_WIDTH   4

The width of the border around the battlefield in logical pixels.

Definition at line 62 of file gamestate.c.


Variable Documentation

RenderItem border[4] [static]

The items used for a border around the battlefield.

Definition at line 67 of file gamestate.c.

Referenced by GameUninit().

Uint32 frameTime

The current simulation time in milliseconds.

@ingroup StatePlay

Definition at line 63 of file main.c.

Referenced by AddScoreNotice(), ClientSync(), GameInit(), GameRun(), GameUninit(), main(), and ProcessNetworkMessages().

Sint16 scores[2] [static]

Definition at line 57 of file gamestate.c.

Referenced by RenderScore(), SendScoreUpdate(), and UpdatePlayers().


Generated on Mon May 28 04:41:39 2007 for Retro Tank Super Attack by  doxygen 1.5.2