#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>
Go to the source code of this file.
Functions | |
gZone * | sg_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< REAL > | sg_expansionSpeedConf ("WIN_ZONE_EXPANSION", sg_expansionSpeed) |
static nSettingItem< REAL > | sg_initialSizeConf ("WIN_ZONE_INITIAL_SIZE", sg_initialSize) |
static const int | sg_segments = 11 |
static nNOInitialisator< gZone > | zone_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< REAL > | sg_conquestRateConf ("FORTRESS_CONQUEST_RATE", sg_conquestRate) |
static tSettingItem< REAL > | sg_defendRateConf ("FORTRESS_DEFEND_RATE", sg_defendRate) |
static tSettingItem< REAL > | sg_conquestDecayRateConf ("FORTRESS_CONQUEST_DECAY_RATE", sg_conquestDecayRate) |
static REAL | sg_conquestTimeout = 0 |
static tSettingItem< REAL > | sg_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< REAL > | sg_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) |
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 }
tSettingItem<int> s_dz("SCORE_DEATHZONE", score_deathzone) [static] |
int score_deathzone = -1 [static] |
int sg_baseZonesPerTeam = 0 [static] |
tSettingItem< int > sg_baseZonesPerTeamConfig("FORTRESS_MAX_PER_TEAM", sg_baseZonesPerTeam) [static] |
REAL sg_conquestDecayRate = .1 |
tSettingItem< REAL > sg_conquestDecayRateConf("FORTRESS_CONQUEST_DECAY_RATE", sg_conquestDecayRate) [static] |
REAL sg_conquestRate = .5 |
tSettingItem< REAL > sg_conquestRateConf("FORTRESS_CONQUEST_RATE", sg_conquestRate) [static] |
REAL sg_conquestTimeout = 0 [static] |
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] |
tSettingItem< int > sg_onConquestKillMinConfig("FORTRESS_CONQUERED_KILL_MIN", sg_onConquestKillMin) [static] |
REAL sg_onConquestKillRatio = 0 [static] |
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] |
int sg_onSurviveWin = 1 [static] |
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] |
tSettingItem<int> sg_zoneDeathConf("WIN_ZONE_DEATHS", sg_zoneDeath) [static] |
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().