Advanced Strategic Command
Functions | Variables
typen.cpp File Reference
#include <stdio.h>
#include <cstring>
#include <cmath>
#include "global.h"
#include "ascstring.h"
#include "stringtokenizer.h"
#include "misc.h"
#include "typen.h"
#include "graphicset.h"
#include "vehicletype.h"
#include "buildingtype.h"
#include "textfileparser.h"
#include "textfile_evaluation.h"
Include dependency graph for typen.cpp:

Go to the source code of this file.

Functions

int getheightdelta (int height1, int height2)
 calculate the height difference between two levels of height. More...
 
Resources operator- (const Resources &res1, const Resources &res2)
 
Resources operator- (const Resources &res1)
 
Resources operator+ (const Resources &res1, const Resources &res2)
 
Resources operator* (const Resources &res1, float a)
 
Resources operator/ (const Resources &res1, float a)
 
vector< IntRangeString2IntRangeVector (const ASCString &t)
 parses a string repesenting a number of int ranges Example input: "10-20; 25 ; 30-125" More...
 
ASCString heightToString (int bitmappedHeight)
 

Variables

const char * choehenstufen [choehenstufennum] = {"deep submerged", "submerged", "floating", "ground level", "low-level flight", "flight", "high-level flight", "orbit"}
 The different levels of height. More...
 
const char * cmovemalitypes [cmovemalitypenum]
 the names of the different MoveMalusTypes More...
 
const char * moveMaliTypeIcons [cmovemalitypenum]
 filenames of icons representing the varios movemalus types More...
 
const char * cnetcontrol [cnetcontrolnum]
 The actions that can be used to control a ResourceNet. More...
 
const char * cgeneralnetcontrol [4] = { "store", "move out", "stop storing", "stop using" }
 
const char * cwettertypen [cwettertypennum] = {"dry (standard)","light rain", "heavy rain", "few snow", "lot of snow", "lot of snow + ice"}
 the names of the different weather More...
 
const char * resourceNames [3] = {"energy", "material", "fuel"}
 the names of the different resources. Redundent, as we already have Resources::name More...
 
const int directionangle [sidenum]
 
const int csolarkraftwerkleistung [cwettertypennum] = { 1024, 512, 256, 756, 384, 384 }
 

Function Documentation

int getheightdelta ( int  height1,
int  height2 
)

calculate the height difference between two levels of height.

Since floating and ground based are assumed to be the same effective height, a simple subtraction isn't sufficient. Height is a numeric (and not bitmapped) value

Definition at line 92 of file typen.cpp.

ASCString heightToString ( int  bitmappedHeight)

Definition at line 396 of file typen.cpp.

References choehenstufen.

Referenced by JumpDriveCommand::available().

Resources operator* ( const Resources res1,
float  a 
)

Definition at line 228 of file typen.cpp.

References Resources::resource(), and resourceTypeNum.

Resources operator+ ( const Resources res1,
const Resources res2 
)

Definition at line 221 of file typen.cpp.

Resources operator- ( const Resources res1,
const Resources res2 
)

Definition at line 208 of file typen.cpp.

Resources operator- ( const Resources res1)

Definition at line 215 of file typen.cpp.

References Resources::energy, Resources::fuel, and Resources::material.

Resources operator/ ( const Resources res1,
float  a 
)

Definition at line 236 of file typen.cpp.

References Resources::resource(), and resourceTypeNum.

vector<IntRange> String2IntRangeVector ( const ASCString t)

parses a string repesenting a number of int ranges Example input: "10-20; 25 ; 30-125"

Definition at line 326 of file typen.cpp.

References atoi(), and StringSplit::getNextToken().

Referenced by IntRangeArrayProperty::operation_eq().

Variable Documentation

const char* cgeneralnetcontrol[4] = { "store", "move out", "stop storing", "stop using" }

Definition at line 75 of file typen.cpp.

const char* choehenstufen[choehenstufennum] = {"deep submerged", "submerged", "floating", "ground level", "low-level flight", "flight", "high-level flight", "orbit"}

The different levels of height.

the names of the different levels of height

Definition at line 39 of file typen.cpp.

Referenced by heightToString(), AI::showFieldInformation(), and VehiclePropertyEditor::VehiclePropertyEditor().

const char* cmovemalitypes[cmovemalitypenum]
Initial value:
= { "default",
"light tracked vehicle", "medium tracked vehicle", "heavy tracked vehicle",
"light wheeled vehicle", "medium wheeled vehicle", "heavy wheeled vehicle",
"trooper", "rail vehicle", "medium aircraft",
"medium ship", "building / turret / object", "light aircraft",
"heavy aircraft", "light ship", "heavy ship", "helicopter",
"hoovercraft" }

the names of the different MoveMalusTypes

See Also
MoveMalusType

Definition at line 43 of file typen.cpp.

Referenced by DataTab::setData(), UnitInfoDialog::UnitInfoDialog(), CargoDialog::updateVariables(), CargoDialog::userHandler(), and viewterraininfo().

const char* cnetcontrol[cnetcontrolnum]
Initial value:
= { "store energy", "store material", "store fuel",
"move out all energy", "move out all material", "move out all fuel",
"stop storing energy", "stop storing material", "stop storing fuel",
"stop energy extraction", "stop material extraction", "stop fuelextraction" }

The actions that can be used to control a ResourceNet.

Definition at line 71 of file typen.cpp.

const int csolarkraftwerkleistung[cwettertypennum] = { 1024, 512, 256, 756, 384, 384 }

Definition at line 87 of file typen.cpp.

Referenced by SolarPowerplant::getPlus().

const char* cwettertypen[cwettertypennum] = {"dry (standard)","light rain", "heavy rain", "few snow", "lot of snow", "lot of snow + ice"}
const int directionangle[sidenum]
Initial value:
=
{ 0, -53, -127, -180, -180 -53 , -180 -127 }

Definition at line 81 of file typen.cpp.

Referenced by ContainerBase::paintField().

const char* moveMaliTypeIcons[cmovemalitypenum]
Initial value:
= { "pad_symbol_default.png",
"pad_symbol_lighttracked.png",
"pad_symbol_mediumtracked.png",
"pad_symbol_heavytracked.png",
"pad_symbol_lightwheeled.png",
"pad_symbol_mediumwheeled.png",
"pad_symbol_heavywheeled.png",
"pad_symbol_trooper.png",
"pad_symbol_rail.png",
"pad_symbol_mediumair.png",
"pad_symbol_mediumship.png",
"pad_symbol_turret.png",
"pad_symbol_lightair.png",
"pad_symbol_heavyair.png",
"pad_symbol_lightship.png",
"pad_symbol_heavyship.png",
"pad_symbol_helicopter.png",
"pad_symbol_hoovercraft.png" }

filenames of icons representing the varios movemalus types

See Also
MoveMalusType

Definition at line 51 of file typen.cpp.

Referenced by CargoDialog::updateVariables(), and CargoDialog::userHandler().

const char* resourceNames[3] = {"energy", "material", "fuel"}