#include "stdafx.h"
Include dependency graph for game.cpp:

Go to the source code of this file.
Functions | |
| void | RemoveDeadObjects (CWorld *ThisWorld) |
| remove dead objects from the game world | |
| void | GameLogicDamage (CObject *Obj, CObject *ObjRef) |
| damage an object | |
| void | GameLogicDamageVal (CObject *Obj, int damageVal) |
| damage an object by a specified amount Inflict damage to Obj by damageVal amount. This value will be subtracted from the object's iHealth member variable, so positive values for damageVal will 'weaken' the object, while negative values will strengthen the object. | |
| void | GameLogicEquip (CObject *Obj, CObject *ObjRef) |
| equip an object with a powerup | |
| void | GameLogicFire (CObject *Obj) |
| spawn a weapon projectile | |
Inflict damage to Obj by ObjRef. This function will examine ObjRef to determine the amount of damage to inflict. The 'damage' inflicted could be negative, as in the case of a health-orb or other restorative powerup.
Definition at line 175 of file game.cpp.
References CObject::iDamage, CObject::iDamageSound, CObject::iHealth, MAX_HEALTH, and PlaySound().
Referenced by Collide().
Here is the call graph for this function:

Here is the caller graph for this function:

| void GameLogicDamageVal | ( | CObject * | Obj, | |
| int | damageVal | |||
| ) |
Definition at line 188 of file game.cpp.
References CObject::iDamageSound, CObject::iHealth, and PlaySound().
Here is the call graph for this function:

Equip Obj with a powerup of type determined by examining ObjRef.
Definition at line 200 of file game.cpp.
References DEFAULT_BS_AMMO, DEFAULT_HS_AMMO, DEFAULT_LM_AMMO, DEFAULT_PS_AMMO, DEFAULT_SB_AMMO, CObject::iAmmo, CObject::iHealth, CObject::iType, CObject::iWeapon, PlaySound(), SOUNDID_POWERUP, TYPEID_POWERUP_BS, TYPEID_POWERUP_HS, TYPEID_POWERUP_LM, TYPEID_POWERUP_PS, TYPEID_POWERUP_SB, WEAPONID_BOUNCY_SHOT, WEAPONID_HEAT_SEEKER, WEAPONID_LAND_MINE, WEAPONID_PEA_SHOT, and WEAPONID_SUPER_BULLET.
Referenced by Collide().
Here is the call graph for this function:

Here is the caller graph for this function:

| void GameLogicFire | ( | CObject * | Obj | ) |
The object passed as a parameter is firing it's weapon. The object is examined to determine it's current selected weapon, remaining amount of ammunition, etc. to determine the effects of attempting to fire
Definition at line 245 of file game.cpp.
References CWorld::AddEffect(), CWorld::AddObject(), DegreesToRadians(), EFFECTID_MINISHOCK, EFFECTID_PSYSTEM, CObject::fAngle, CObject::fSubAngle, CObject::iAmmo, CObject::iDamageSound, CObject::iOwnCount, CObject::iRemovalEffect, CObject::iRemovalEffects, CObject::iRemovalSound, CObject::iTexture, CObject::iTint, CObject::iWeapon, Vector::Normalize(), CObject::Owner, CObject::ParentWorld, PI, PlaySound(), CObject::Position, CEffect::PSys, PSystem::SetColor(), SOUNDID_CLICK, SOUNDID_CRUNCH, SOUNDID_EXPLOSION, SOUNDID_FIRE_BS, SOUNDID_FIRE_HS, SOUNDID_FIRE_LM, SOUNDID_FIRE_PS, SOUNDID_FIRE_SB, SOUNDID_HIT, TEXID_PEA_SHOT, TYPEID_BOUNCY_SHOT, TYPEID_HEAT_SEEKER, TYPEID_LAND_MINE, TYPEID_PEA_SHOT, TYPEID_SUPER_BULLET, CObject::Velocity, VRotate2D(), WEAPONID_BOUNCY_SHOT, WEAPONID_HEAT_SEEKER, WEAPONID_LAND_MINE, WEAPONID_NULL, WEAPONID_PEA_SHOT, WEAPONID_SUPER_BULLET, Vector::x, Vector::y, and Vector::z.
Referenced by PhysicsUpdate().
Here is the call graph for this function:

Here is the caller graph for this function:

| void RemoveDeadObjects | ( | CWorld * | ThisWorld | ) |
Traverse the game world object list, and remove objects that are 'dead', meaning that their 'iHealth' member variable is less than or equal to zero. If the object happens to be one of the players, then instead of removing the object, set the world's 'iStartingState' variable.
Definition at line 35 of file game.cpp.
References CWorld::AddEffect(), CWorld::bTakeInput, CObject::bVisible, DamageRadius(), EFFECTID_MINISHOCK, EFFECTID_PSYSTEM, EFFECTID_SHOCKWAVE, EFFECTID_TILEANIM, EFFECTID_TILESTORM, CObject::iDamage, CObject::iHealth, CObject::iInput, CObject::iLingerTime, CObject::iOwnCount, CObject::iRemovalAnim, CObject::iRemovalEffect, CObject::iRemovalEffects, CObject::iRemovalSound, CWorld::iStartingState, CObject::iType, CEffect::MShock, CObject::Next, CWorld::Objects, CObject::Owner, CObject::ParentWorld, PI, CWorld::Player, PlaySound(), CObject::Position, CEffect::PSys, CWorld::RemoveObject(), PSystem::SetColor(), Shockwave::SetColor(), MiniShock::SetColor(), SOUNDID_SCREAM, STARTINGSTATE_VICTORY, CEffect::SWave, CEffect::TAnim, TEXID_EZRAS_HEAD, CEffect::TStorm, TYPEID_SUPER_BULLET, TYPEID_TANK, TYPEID_TNT_BLOCK, CObject::Velocity, Vector::x, Vector::y, and Vector::z.
Referenced by PlayGame().
Here is the call graph for this function:

Here is the caller graph for this function:

Copyright Windsor Schmidt 2006 - All rights reserved.