#include <structs.h>
Collaboration diagram for CWorld:

Definition at line 209 of file structs.h.
Public Member Functions | |
| CWorld (void) | |
| default constructor | |
| int | AddObject (CObject *Obj) |
| add this object to the world | |
| int | RemoveObject (CObject *Obj) |
| Remove this object from the world. | |
| int | LoadLevel (const char *filename) |
| load a level file from disk | |
| int | AddEffect (CEffect *Effect) |
| add this effect to the world | |
| int | RemoveEffect (CEffect *Effect) |
| Remove this effect from the world. | |
| void | UpdateEffects (float timeDelta) |
| update all the effects in the world | |
| void | DrawEffects (void) |
| draw all the effects in the world | |
Public Attributes | |
| gcn::Gui * | GUI |
| back reference to the GUI active while in game | |
| bool | bGameOver |
| flag indicating whether or not the game has ended | |
| bool | bTakeInput |
| flag indicating whether or not to take input from players | |
| int | iStartingState |
| breaks down game sequence in to staged states | |
| int | iRenderStyle |
| top-down 2D drawing, or perspective '3D' mode | |
| float | fZoomBias |
| how to bias the view centering (which player) | |
| float | fFinalZoom |
| the zoom amount at the point when a player dies | |
| int | iObjectCount |
| the number of CObject objects in the world | |
| int | iEffectCount |
| the number of PSystem objects in the world | |
| int | iNumCollisions |
| the total number of collisions that have taken place | |
| Uint32 | iCurrentTime |
| milliseconds since SDL was initialized | |
| Uint32 | iOldTime |
| time stamp used to calculate frames-per-second figures | |
| char * | musicFile |
| name of the music file to be loaded for this level | |
| CTile | tiles [MAP_SIZE *MAP_SIZE] |
| tile map used to draw the background graphics | |
| CObject * | Player [4] |
| array holding pointers to the current player-objects | |
| CObject * | Objects |
| pointer to a list of CObject objects in this world | |
| PSystem * | PSystems |
| pointer to a list of PSystem (particle system) objects in this world | |
| CEffect * | Effects |
| pointer to a list of effect objects in this world (particle systems, etc.) | |
| CWorld::CWorld | ( | void | ) |
Create a CWorld object with default parameters.
Definition at line 180 of file structs.cpp.
References bGameOver, bTakeInput, DEFAULT_RENDERSTYLE, Effects, fZoomBias, iCurrentTime, iEffectCount, iNumCollisions, iObjectCount, iOldTime, iRenderStyle, iStartingState, musicFile, NUM_PLAYERS, Objects, Player, PSystems, and STARTINGSTATE_IDLE.
| int CWorld::AddObject | ( | CObject * | Obj | ) |
Inserts this CWorld object at the beginning of the object list.
Definition at line 210 of file structs.cpp.
References iObjectCount, CObject::Next, Objects, and CObject::Previous.
Referenced by GameLogicFire(), InitGame(), and LoadLevel().
Here is the caller graph for this function:

| int CWorld::RemoveObject | ( | CObject * | Obj | ) |
Definition at line 236 of file structs.cpp.
References DAS_ERROR, iObjectCount, CObject::iOwnCount, CObject::Next, Objects, CObject::Owner, and CObject::Previous.
Referenced by RemoveDeadObjects().
Here is the caller graph for this function:

| int CWorld::LoadLevel | ( | const char * | filename | ) |
Loads a level file from disk, populating the calling CWorld object with data.
Definition at line 404 of file structs.cpp.
References AddObject(), ANIMID_CRATECRUSH, CELL_SIZE, DAS_ERROR, EFFECTID_PSYSTEM, EFFECTID_SHOCKWAVE, EFFECTID_TILEANIM, CObject::iDamageSound, CObject::iRemovalAnim, CObject::iRemovalEffect, CObject::iRemovalEffects, CObject::iRemovalSound, MAP_SIZE, musicFile, CObject::Position, SOUNDID_EXPLOSION, SOUNDID_HIT, TEXID_DIRT, TEXID_GRASS, TEXID_GRID, TEXID_ICE, TEXID_LAVA, TEXID_MUD, TEXID_NULL, TEXID_SAND, TEXID_TARMAC, TEXID_WATER, TILE_DAMAGE_LAVA, TILE_EFFECT_DAMAGE, TILEID_BLANK, TILEID_DIRT, TILEID_GRASS, TILEID_ICE, TILEID_LAVA, TILEID_MUD, TILEID_NULL, TILEID_SAND, TILEID_TARMAC, TILEID_WATER, tiles, TYPEID_POWERUP_BS, TYPEID_POWERUP_HEALTH, TYPEID_POWERUP_HS, TYPEID_POWERUP_LM, TYPEID_POWERUP_PS, TYPEID_POWERUP_SB, TYPEID_TNT_BLOCK, TYPEID_WALL_BLOCK, TYPEID_WOOD_BLOCK, Vector::x, and Vector::y.
Referenced by InitGame().
Here is the call graph for this function:

Here is the caller graph for this function:

| int CWorld::AddEffect | ( | CEffect * | Effect | ) |
Inserts this CEffect object at the beginning of the effect list.
Definition at line 285 of file structs.cpp.
References Effects, iEffectCount, CEffect::Next, and CEffect::Previous.
Referenced by GameLogicFire(), PhysicsReflect(), PlayGame(), ProcessTileCollisions(), and RemoveDeadObjects().
Here is the caller graph for this function:

| int CWorld::RemoveEffect | ( | CEffect * | Effect | ) |
Definition at line 312 of file structs.cpp.
References DAS_ERROR, Effects, iEffectCount, CEffect::Next, and CEffect::Previous.
Referenced by UpdateEffects().
Here is the caller graph for this function:

| void CWorld::UpdateEffects | ( | float | timeDelta | ) |
Definition at line 357 of file structs.cpp.
References CEffect::bExpired, Effects, CEffect::Next, RemoveEffect(), and CEffect::Step().
Referenced by PlayGame().
Here is the call graph for this function:

Here is the caller graph for this function:

| void CWorld::DrawEffects | ( | void | ) |
Definition at line 382 of file structs.cpp.
References CEffect::bExpired, CEffect::Draw(), Effects, and CEffect::Next.
Referenced by DrawGLScene().
Here is the call graph for this function:

Here is the caller graph for this function:

| gcn::Gui* CWorld::GUI |
| bool CWorld::bGameOver |
| bool CWorld::bTakeInput |
Definition at line 214 of file structs.h.
Referenced by CWorld(), InitGame(), PlayGame(), and RemoveDeadObjects().
Definition at line 215 of file structs.h.
Referenced by CWorld(), DrawGLScene(), InitGame(), PlayGame(), and RemoveDeadObjects().
| float CWorld::fZoomBias |
| float CWorld::fFinalZoom |
| Uint32 CWorld::iCurrentTime |
Definition at line 222 of file structs.h.
Referenced by CWorld(), PlayGame(), CObject::StartAnimating(), and UpdateAnimation().
| Uint32 CWorld::iOldTime |
| char* CWorld::musicFile |
| CTile CWorld::tiles[MAP_SIZE *MAP_SIZE] |
Definition at line 225 of file structs.h.
Referenced by DrawTiles(), LoadLevel(), and ProcessTileCollisions().
Definition at line 226 of file structs.h.
Referenced by CWorld(), DrawGLScene(), DrawHUD(), InitGame(), PhysicsUpdate(), PlayGame(), ProcessTileCollisions(), and RemoveDeadObjects().
Definition at line 227 of file structs.h.
Referenced by AddObject(), CWorld(), DamageRadius(), DoCollisions(), DrawObjects(), PhysicsUpdate(), RemoveDeadObjects(), RemoveObject(), and UpdateAnimation().
Definition at line 229 of file structs.h.
Referenced by AddEffect(), CWorld(), DrawEffects(), RemoveEffect(), and UpdateEffects().
Copyright Windsor Schmidt 2006 - All rights reserved.