Advanced Strategic Command
Macros | Functions | Variables
misc.h File Reference

miscellaneous functions which are used by ASC and all its tools More...

#include "global.h"
#include <string>
Include dependency graph for misc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define dblue   lightgray
 

Functions

int getFirstBit (int i)
 Count the number of zero bits on the LSB side of "zahl". More...
 
char * strrr (int a)
 converts a to a string. More...
 
char * strrr (double a)
 converts a to a string. More...
 
int crc32buf (const void *vbuf, int len)
 
int atoi (const std::string &s)
 
double atof (const std::string &s)
 
template<typename T >
const T & min (const T &a, const T &b, const T &c)
 
template<typename T >
const T & max (const T &a, const T &b, const T &c)
 
char * strupr (const char *a)
 
char * itoa (int a, char *b, int c)
 

Variables

const char * digit []
 
const char * letter []
 

Detailed Description

miscellaneous functions which are used by ASC and all its tools

Definition in file misc.h.

Macro Definition Documentation

#define dblue   lightgray

Function Documentation

double atof ( const std::string &  s)
int atoi ( const std::string &  s)
int crc32buf ( const void *  vbuf,
int  len 
)

Definition at line 135 of file misc.cpp.

References UPDC32.

Referenced by Password::encodepassword().

int getFirstBit ( int  i)
char* itoa ( int  a,
char *  b,
int  c 
)
template<typename T >
const T& max ( const T &  a,
const T &  b,
const T &  c 
)
template<typename T >
const T& min ( const T &  a,
const T &  b,
const T &  c 
)

Definition at line 80 of file misc.h.

Referenced by tdlgengine::addeingabe(), AmmoTransferWindow::AmmoTransferWindow(), ColorMerger_Brightness< pixelsize >::assign(), TrainUnitCommand::avail(), compressrle(), ContainerBase::ContainerBase(), copy2screen(), BuildingTypeBaseWidget::display(), MapDisplayPG::displayUnitMovement(), AStar3D::dist(), BarGraphWidget::eventBlit(), tdialogbox::execbutton(), Building::getAmmo(), Vehicle::getAmmo(), Vehicle::getAvailableResource(), BuildingTypeBaseWidget::getBuildingHeight(), SourcePixelSelector_DirectSubRectangle< pixelSize >::getHeight(), SourcePixelSelector_Rectangle< pixelsize >::getHeight(), SourcePixelSelector_DirectRectangle< pixelSize >::getHeight(), getid(), ResourceTransferrable::getMax(), AmmoTransferrable::getMin(), Vehicle::getResource(), WeapDist::getWeaponStrength(), SourcePixelSelector_DirectSubRectangle< pixelSize >::getWidth(), SourcePixelSelector_Rectangle< pixelsize >::getWidth(), SourcePixelSelector_DirectRectangle< pixelSize >::getWidth(), TrainUnitCommand::go(), InternalAmmoTransferWindow::InternalAmmoTransferWindow(), MessageDialog::MessageDialog(), MessageSelectionWindow::messageSelected(), MiningGraph::MiningGraph(), VersionIdentifier::operator<(), VersionIdentifier::operator<=(), VersionIdentifier::operator==(), Vehicle::putAmmo(), Vehicle::putResource(), WholeMapRenderer::renderVisibility(), CGameOptions::runTextIO(), AttackCommand::searchTargets(), ContainerBase::setInternalResourceMaxPlus(), ContainerBase::setInternalResourcePlus(), SourcePixelSelector_Zoom< pixelsize >::setSize(), StartupScreen::StartupScreen(), tputresources::testfield(), MiningStation::testfield(), AmmoTransferrable::transfer(), ResourceTransferrable::transfer(), tshowhistorypaintstat(), viewmessages(), viewterraininfo(), Vehicle::write(), and writePNGtrim().

char* strrr ( int  a)
char* strrr ( double  a)

converts a to a string.

Returns
a pointer to a static array, which will be overwritten in the next call

Definition at line 76 of file misc.cpp.

References strstring.

char* strupr ( const char *  a)

Definition at line 164 of file misc.cpp.

References malloc().

Referenced by ASCStringHelpers::_Strupr().

Variable Documentation

const char* digit[]

Definition at line 37 of file misc.cpp.

Referenced by int2string().

const char* letter[]

Definition at line 38 of file misc.cpp.