Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
Functions | |
int | discreteLog (int bitmask) |
vector< vector< char > > | buildroles () |
vector< vector< char > > & | getAllRolePriorities () |
vector< char > & | getPriority (unsigned char rolerow) |
unsigned char | InternalGetRole (const std::string &s) |
const std::string & | InternalGetStrRole (unsigned char c) |
vector< vector< string > > | buildscripts () |
const std::string & | getRoleEvents (unsigned char ourrole, unsigned char theirs) |
unsigned char | getRole (const std::string &s) |
const std::string & | getRole (unsigned char c) |
unsigned int | readBitmask (const std::string &ss) |
unsigned int | getCapitalRoles () |
unsigned int | maxRoleValue () |
Variables | |
static vsUMap< string, int > | rolemap |
static vsUMap< int, string > | irolemap |
const unsigned int | FIRE_ONLY_AUTOTRACKERS = (1<<31) |
const unsigned int | FIRE_MISSILES = (1<<30) |
const unsigned int | FIRE_GUNS = (1<<29) |
const unsigned int | EVERYTHING_ELSE = ( ~(FIRE_MISSILES|FIRE_GUNS|FIRE_ONLY_AUTOTRACKERS) ) |
vector< vector< char > > ROLES::buildroles | ( | ) |
Definition at line 129 of file role_bitmask.cpp.
References a, VSFileSystem::AiFile, b, VSFileSystem::VSFile::Close(), f, i, int, irolemap, j, k, VSFileSystem::Ok, VSFileSystem::VSFile::OpenReadOnly(), XMLSupport::parse_int(), readCSV(), VSFileSystem::VSFile::ReadLine(), rolemap, size, VSFileSystem::VSFile::Size(), and strtoupper().
Referenced by getAllRolePriorities().
vector< vector< string > > ROLES::buildscripts | ( | ) |
Definition at line 59 of file role_bitmask.cpp.
References VSFileSystem::AiFile, VSFileSystem::VSFile::Close(), f, fprintf, getAllRolePriorities(), getRole(), i, index, j, VSFileSystem::Ok, VSFileSystem::VSFile::OpenReadOnly(), readCSV(), VSFileSystem::VSFile::ReadLine(), size, and VSFileSystem::VSFile::Size().
Referenced by getRoleEvents().
std::vector< std::vector< char > > & ROLES::getAllRolePriorities | ( | ) |
Definition at line 25 of file role_bitmask.cpp.
References buildroles().
Referenced by buildscripts(), getPriority(), Universe::Init(), main(), and NetServer::start().
unsigned int ROLES::getCapitalRoles | ( | ) |
Definition at line 219 of file role_bitmask.cpp.
References getRole(), VegaConfig::getVariable(), and vs_config.
Referenced by UnitUtil::isCapitalShip().
std::vector< char > & ROLES::getPriority | ( | unsigned char | rolerow) |
Definition at line 30 of file role_bitmask.cpp.
References getAllRolePriorities(), size, and VSFileSystem::vs_fprintf().
Referenced by TurretBin::AssignTargets(), Priority(), and ChooseTargetClass< numTuple >::ShouldTargetUnit().
unsigned char ROLES::getRole | ( | const std::string & | s) |
Definition at line 198 of file role_bitmask.cpp.
References InternalGetRole().
Referenced by buildscripts(), Orders::FireAt::ChooseTargets(), Unit::getAttackPreference(), getCapitalRoles(), Unit::getCombatRole(), Unit::getUnitRole(), Unit::Init(), readBitmask(), Unit::setAttackPreference(), Unit::setCombatRole(), Unit::setUnitRole(), and Missile::UpdatePhysics2().
const std::string & ROLES::getRole | ( | unsigned char | c) |
Definition at line 202 of file role_bitmask.cpp.
References InternalGetStrRole().
const std::string & ROLES::getRoleEvents | ( | unsigned char | ourrole, |
unsigned char | theirs | ||
) |
Definition at line 115 of file role_bitmask.cpp.
References buildscripts(), size, and VSFileSystem::vs_fprintf().
Referenced by getProperScript().
unsigned char ROLES::InternalGetRole | ( | const std::string & | s) |
Definition at line 42 of file role_bitmask.cpp.
References i, rolemap, and strtoupper().
Referenced by getRole().
const std::string& ROLES::InternalGetStrRole | ( | unsigned char | c) |
unsigned int ROLES::maxRoleValue | ( | ) |
unsigned int ROLES::readBitmask | ( | const std::string & | ss) |
Definition at line 206 of file role_bitmask.cpp.
References getRole().
Referenced by BeamXML::beginElement().
const unsigned int ROLES::EVERYTHING_ELSE = ( ~(FIRE_MISSILES|FIRE_GUNS|FIRE_ONLY_AUTOTRACKERS) ) |
Definition at line 10 of file role_bitmask.h.
Referenced by Orders::FireAllYouGot::Execute(), FireKeyboard::Execute(), Unit::Fire(), and FireBitmask().
const unsigned int ROLES::FIRE_GUNS = (1<<29) |
Definition at line 9 of file role_bitmask.h.
Referenced by Orders::FireAllYouGot::Execute(), FireKeyboard::Execute(), Unit::Fire(), and FireBitmask().
const unsigned int ROLES::FIRE_MISSILES = (1<<30) |
Definition at line 8 of file role_bitmask.h.
Referenced by Orders::FireAllYouGot::Execute(), FireKeyboard::Execute(), Unit::Fire(), and FireBitmask().
const unsigned int ROLES::FIRE_ONLY_AUTOTRACKERS = (1<<31) |
Definition at line 7 of file role_bitmask.h.
Referenced by Unit::Fire(), and FireBitmask().
Definition at line 40 of file role_bitmask.cpp.
Referenced by buildroles(), and InternalGetStrRole().
Definition at line 39 of file role_bitmask.cpp.
Referenced by buildroles(), InternalGetRole(), and InternalGetStrRole().