|
EvEmu
0.8.4
11 September 2021
|
#include <eve-compat.h>

Go to the source code of this file.
Namespaces | |
| EvE | |
Functions | |
| uint16 | crc_hqx (const uint8 *data, size_t len, uint16 crc=0) |
| int64 | filesize (const char *filename) |
| Obtains filesize. More... | |
| int64 | filesize (FILE *fd) |
| Obtains filesize. More... | |
| int64 | npowof2 (int64 num) |
| Calculates next (greater or equal) power-of-two number. More... | |
| int64 | MakeRandomInt (int64 low=0, int64 high=RAND_MAX) |
| Generates random integer from interval [low; high]. More... | |
| double | MakeRandomFloat (double low=0, double high=1) |
| Generates random real from interval [low; high]. More... | |
| bool | IsEven (int64 number) |
| bool | IsNaN (double x) |
| uint32 | CreatePIDFile (const std::string &filename) |
| create PID file More... | |
| double | EvE::min (double x, double y) |
| int32 | EvE::min (int32 x, int32 y) |
| double | EvE::min1 (double x, double y) |
| double | EvE::min (double x, double y, double z) |
| int64 | EvE::max (int64 x, int64 y=0) |
| double | EvE::max (double x, double y=0) |
| double | EvE::max (double x, double y, double z) |
| void | EvE::traceStack (void) |
| bool | EvE::icontains (std::string data, std::string toSearch, size_t pos=0) |
| const char * | EvE::FormatTime (int64 time=-1) |
| const char * | EvE::FormatTime (double time=-1) |
| double | EvE::trunicate2 (double dig=0) |
This is functionally equivalent to python's binascii.crc_hqx.
| [in] | data | Binary data to be checksumed. |
| [in] | len | Length of binary data. |
| [in] | crc | CRC value to start with. |
Definition at line 67 of file misc.cpp.
Referenced by PyService::_BuildCachedReturn().

| uint32 CreatePIDFile | ( | const std::string & | filename | ) |
| int64 filesize | ( | const char * | filename | ) |
Obtains filesize.
| [in] | filename | Name of file to examine. |
Definition at line 75 of file misc.cpp.
References filesize().
Referenced by filesize(), and CachedObjectMgr::LoadCachedFile().


| int64 filesize | ( | FILE * | fd | ) |
Obtains filesize.
| [in] | fd | Descriptor of file to examine. |
|
inline |
Definition at line 88 of file misc.h.
Referenced by DungeonMgr::AddDecoToVector(), Prospector::DropSalvage(), MapData::GetMissionDestination(), CustomsSE::Killed(), StructureSE::Killed(), and ShipSE::Killed().

|
inline |
Definition at line 89 of file misc.h.
Referenced by BeltMgr::SpawnAsteroid().

| double MakeRandomFloat | ( | double | low = 0, |
| double | high = 1 |
||
| ) |
Generates random real from interval [low; high].
| [in] | low | Low boundary of interval. |
| [in] | high | High boundary of interval. |
Definition at line 114 of file misc.cpp.
Referenced by TurretModule::ApplyDamage(), AnomalyMgr::CreateAnomaly(), ShipSE::DamageRandModule(), TurretFormulas::GetDroneToHit(), StaticDataMgr::GetLoot(), TurretFormulas::GetNPCToHit(), DungeonMgr::GetRandLevel(), TurretFormulas::GetSentryToHit(), TurretFormulas::GetToHit(), Sentry::Killed(), NPC::Killed(), ShipSE::Killed(), ActiveModule::LaunchProbe(), PlanetSE::LoadExtras(), DungeonMgr::MakeDungeon(), MakeRandomInt(), GPoint::MakeRandomPointOnSphere(), Vector3D::MakeRandomPointOnSphere(), GPoint::MakeRandomPointOnSphereLayer(), Vector3D::MakeRandomPointOnSphereLayer(), NPCAIMgr::MissileLaunched(), SpawnMgr::PrepSpawn(), ConcordAI::Process(), MiningLaser::ProcessCycle(), DroneAIMgr::SetEngaged(), ConcordAI::SetEngaged(), ConcordAI::SetSignaling(), BeltMgr::SpawnBelt(), NPCAIMgr::Targeted(), and SpawnMgr::WarpOutSpawn().

Generates random integer from interval [low; high].
| [in] | low | Low boundary of interval. |
| [in] | high | High boundary of interval. |
Definition at line 109 of file misc.cpp.
References MakeRandomFloat().
Referenced by APIAccountManager::_GenerateAPIKey(), DungeonMgr::AddDecoToVector(), SystemEntity::ApplyDamage(), Prospector::CheckSuccess(), Command_spawn(), Command_spawnn(), PlanetSE::CreateCustomsOffice(), MissionDataMgr::CreateMissionOffer(), SystemEntity::DropLoot(), Prospector::DropSalvage(), Client::Eject(), GenerateKey(), Agent::GetAcceptRsp(), EntityList::GetAnomalyID(), SystemGPoint::GetAnomalyPoint(), Agent::GetCompleteRsp(), Agent::GetDeclineRsp(), AnomalyMgr::GetDungeonType(), StaticDataMgr::GetLoot(), MapData::GetMissionDestination(), SystemManager::GetRandBeltID(), ModuleManager::GetRandModule(), SystemGPoint::GetRandMoon(), SystemGPoint::GetRandPlanet(), SystemGPoint::GetRandPointOnMoon(), SystemGPoint::GetRandPointOnPlanet(), StaticDataMgr::GetRandRatType(), FleetService::GetRandUnitIDs(), Agent::GetStandingsRsp(), CustomsSE::Killed(), StructureSE::Killed(), ShipSE::Killed(), PlanetSE::LoadExtras(), DungeonMgr::MakeDungeon(), SpawnMgr::MakeSpawn(), SpawnMgr::PrepSpawn(), SpawnMgr::ReSpawn(), SystemBubble::SetSpawnTimer(), NPCAIMgr::SetWander(), and BeltMgr::SpawnBelt().


Calculates next (greater or equal) power-of-two number.
| [in] | num | Base number. |
Definition at line 95 of file misc.cpp.
Referenced by Buffer::_CalcBufferCapacity().
