src/tron/gWinZone.cpp File Reference

#include "rSDL.h"
#include "gWinZone.h"
#include "eFloor.h"
#include "eTimer.h"
#include "eGrid.h"
#include "gCycle.h"
#include "gGame.h"
#include "eTeam.h"
#include "ePlayer.h"
#include "rRender.h"
#include "nConfig.h"
#include "tString.h"
#include "rScreen.h"
#include "eSoundMixer.h"
#include <time.h>
#include <algorithm>
#include <functional>
#include <deque>

Include dependency graph for gWinZone.cpp:

Go to the source code of this file.

Functions

gZonesg_CreateWinDeathZone (eGrid *grid, const eCoord &pos)
 creates a win or death zone (according to configuration) at the specified position

Variables

std::deque< gZone * > sg_Zones
static int sg_zoneDeath = 1
static tSettingItem< int > sg_zoneDeathConf ("WIN_ZONE_DEATHS", sg_zoneDeath)
REAL sg_expansionSpeed = 1.0f
REAL sg_initialSize = 5.0f
static nSettingItem< REALsg_expansionSpeedConf ("WIN_ZONE_EXPANSION", sg_expansionSpeed)
static nSettingItem< REALsg_initialSizeConf ("WIN_ZONE_INITIAL_SIZE", sg_initialSize)
static const int sg_segments = 11
static nNOInitialisator< gZonezone_init (340,"zone")
static int score_deathzone = -1
static tSettingItem< int > s_dz ("SCORE_DEATHZONE", score_deathzone)
REAL sg_conquestRate = .5
REAL sg_defendRate = .25
REAL sg_conquestDecayRate = .1
static tSettingItem< REALsg_conquestRateConf ("FORTRESS_CONQUEST_RATE", sg_conquestRate)
static tSettingItem< REALsg_defendRateConf ("FORTRESS_DEFEND_RATE", sg_defendRate)
static tSettingItem< REALsg_conquestDecayRateConf ("FORTRESS_CONQUEST_DECAY_RATE", sg_conquestDecayRate)
static REAL sg_conquestTimeout = 0
static tSettingItem< REALsg_conquestTimeoutConf ("FORTRESS_CONQUEST_TIMEOUT", sg_conquestTimeout)
static int sg_onConquestKillMin = 0
static tSettingItem< int > sg_onConquestKillMinConfig ("FORTRESS_CONQUERED_KILL_MIN", sg_onConquestKillMin)
static REAL sg_onConquestKillRatio = 0
static tSettingItem< REALsg_onConquestKillRationConfig ("FORTRESS_CONQUERED_KILL_RATIO", sg_onConquestKillRatio)
static int sg_onConquestScore = 0
static tSettingItem< int > sg_onConquestConquestScoreConfig ("FORTRESS_CONQUERED_SCORE", sg_onConquestScore)
static int sg_onConquestWin = 1
static tSettingItem< int > sg_onConquestConquestWinConfig ("FORTRESS_CONQUERED_WIN", sg_onConquestWin)
static int sg_baseZonesPerTeam = 0
static tSettingItem< int > sg_baseZonesPerTeamConfig ("FORTRESS_MAX_PER_TEAM", sg_baseZonesPerTeam)
static int sg_onSurviveWin = 1
static tSettingItem< int > sg_onSurviveWinConfig ("FORTRESS_SURVIVE_WIN", sg_onSurviveWin)


Function Documentation

gZone* sg_CreateWinDeathZone ( eGrid grid,
const eCoord &  pos 
)

creates a win or death zone (according to configuration) at the specified position

Definition at line 61 of file gWinZone.cpp.

References NULL, se_GameTime(), gZone::SetExpansionSpeed(), gZone::SetRadius(), gZone::SetReferenceTime(), gZone::SetRotationSpeed(), sg_expansionSpeed, sg_initialSize, sg_zoneDeath, sn_ConsoleOut(), gCycle::Timestep(), and tNEW.

Referenced by gGame::Analysis().

00062 {
00063     gZone * ret = NULL;
00064     if ( sg_zoneDeath )
00065     {
00066         ret = tNEW( gDeathZoneHack( grid, pos ) );
00067         sn_ConsoleOut( "$instant_death_activated" );
00068     }
00069     else
00070     {
00071         ret = tNEW( gWinZoneHack( grid, pos ) );
00072         sn_ConsoleOut( "$instant_win_activated" );
00073     }
00074 
00075     // initialize radius and expansion speed
00076     static_cast<eGameObject*>(ret)->Timestep( se_GameTime() );
00077     ret->SetReferenceTime();
00078     ret->SetRadius( sg_initialSize );
00079     ret->SetExpansionSpeed( sg_expansionSpeed );
00080     ret->SetRotationSpeed( .3f );
00081 
00082     return ret;
00083 }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

tSettingItem<int> s_dz("SCORE_DEATHZONE", score_deathzone) [static]

int score_deathzone = -1 [static]

Definition at line 698 of file gWinZone.cpp.

Referenced by gDeathZoneHack::OnEnter().

int sg_baseZonesPerTeam = 0 [static]

Definition at line 801 of file gWinZone.cpp.

Referenced by gBaseZoneHack::Timestep().

tSettingItem< int > sg_baseZonesPerTeamConfig("FORTRESS_MAX_PER_TEAM", sg_baseZonesPerTeam) [static]

REAL sg_conquestDecayRate = .1

Definition at line 774 of file gWinZone.cpp.

Referenced by gBaseZoneHack::Timestep().

tSettingItem< REAL > sg_conquestDecayRateConf("FORTRESS_CONQUEST_DECAY_RATE", sg_conquestDecayRate) [static]

REAL sg_conquestRate = .5

Definition at line 772 of file gWinZone.cpp.

Referenced by gBaseZoneHack::Timestep().

tSettingItem< REAL > sg_conquestRateConf("FORTRESS_CONQUEST_RATE", sg_conquestRate) [static]

REAL sg_conquestTimeout = 0 [static]

Definition at line 781 of file gWinZone.cpp.

Referenced by gBaseZoneHack::Timestep().

tSettingItem< REAL > sg_conquestTimeoutConf("FORTRESS_CONQUEST_TIMEOUT", sg_conquestTimeout) [static]

REAL sg_defendRate = .25

Definition at line 773 of file gWinZone.cpp.

Referenced by gBaseZoneHack::OnVanish(), and gBaseZoneHack::Timestep().

tSettingItem< REAL > sg_defendRateConf("FORTRESS_DEFEND_RATE", sg_defendRate) [static]

REAL sg_expansionSpeed = 1.0f

Definition at line 54 of file gWinZone.cpp.

Referenced by zZone::ReadSync(), gZone::ReadSync(), and sg_CreateWinDeathZone().

nSettingItem< REAL > sg_expansionSpeedConf("WIN_ZONE_EXPANSION", sg_expansionSpeed) [static]

REAL sg_initialSize = 5.0f

Definition at line 55 of file gWinZone.cpp.

Referenced by zZone::ReadSync(), gZone::ReadSync(), and sg_CreateWinDeathZone().

nSettingItem< REAL > sg_initialSizeConf("WIN_ZONE_INITIAL_SIZE", sg_initialSize) [static]

tSettingItem< int > sg_onConquestConquestScoreConfig("FORTRESS_CONQUERED_SCORE", sg_onConquestScore) [static]

tSettingItem< int > sg_onConquestConquestWinConfig("FORTRESS_CONQUERED_WIN", sg_onConquestWin) [static]

int sg_onConquestKillMin = 0 [static]

Definition at line 785 of file gWinZone.cpp.

Referenced by gBaseZoneHack::OnVanish().

tSettingItem< int > sg_onConquestKillMinConfig("FORTRESS_CONQUERED_KILL_MIN", sg_onConquestKillMin) [static]

REAL sg_onConquestKillRatio = 0 [static]

Definition at line 789 of file gWinZone.cpp.

Referenced by gBaseZoneHack::OnVanish().

tSettingItem< REAL > sg_onConquestKillRationConfig("FORTRESS_CONQUERED_KILL_RATIO", sg_onConquestKillRatio) [static]

int sg_onConquestScore = 0 [static]

Definition at line 793 of file gWinZone.cpp.

Referenced by gBaseZoneHack::OnConquest(), and gBaseZoneHack::Timestep().

int sg_onConquestWin = 1 [static]

Definition at line 797 of file gWinZone.cpp.

Referenced by gBaseZoneHack::OnConquest().

int sg_onSurviveWin = 1 [static]

Definition at line 1114 of file gWinZone.cpp.

Referenced by gBaseZoneHack::CheckSurvivor().

tSettingItem< int > sg_onSurviveWinConfig("FORTRESS_SURVIVE_WIN", sg_onSurviveWin) [static]

const int sg_segments = 11 [static]

Definition at line 86 of file gWinZone.cpp.

Referenced by zShapeCircle::render(), gZone::Render(), zShapeCircle::render2d(), gZone::Render2D(), and gBaseZoneHack::Timestep().

int sg_zoneDeath = 1 [static]

Definition at line 51 of file gWinZone.cpp.

Referenced by sg_CreateWinDeathZone().

tSettingItem<int> sg_zoneDeathConf("WIN_ZONE_DEATHS", sg_zoneDeath) [static]

std::deque<gZone *> sg_Zones

Definition at line 49 of file gWinZone.cpp.

Referenced by cWidget::Map::DrawMap(), gZone::gZone(), and gZone::~gZone().

nNOInitialisator<gZone> zone_init(340,"zone") [static]

Referenced by zZone::CreatorDescriptor(), and gZone::CreatorDescriptor().


Generated on Sat Mar 15 23:18:31 2008 for Armagetron Advanced by  doxygen 1.5.4