Advanced Strategic Command
Macros | Functions | Variables
vehicle.cpp File Reference
#include <algorithm>
#include <math.h>
#include "research.h"
#include "vehicletype.h"
#include "vehicle.h"
#include "buildingtype.h"
#include "viewcalculation.h"
#include "errors.h"
#include "graphicset.h"
#include "gameoptions.h"
#include "spfst.h"
#include "itemrepository.h"
#include "graphics/blitter.h"
#include "actions/context.h"
#include "actions/changeunitmovement.h"
#include "actions/changeunitproperty.h"
#include "actions/spawnobject.h"
#include "actions/unitfieldregistration.h"
#include "attack.h"
Include dependency graph for vehicle.cpp:

Go to the source code of this file.

Macros

#define UNITVERSIONLIMIT   0x7fffffff
 
#define cem_experience   0x1
 
#define cem_damage   0x2
 
#define cem_fuel   0x4
 
#define cem_ammunition   0x8
 
#define cem_weapstrength   0x10
 
#define cem_loading   0x20
 
#define cem_attacked   0x40
 
#define cem_height   0x80
 
#define cem_movement   0x100
 
#define cem_direction   0x200
 
#define cem_material   0x400
 
#define cem_energy   0x800
 
#define cem_class   0x1000
 
#define cem_networkid   0x2000
 
#define cem_name   0x4000
 
#define cem_armor   0x8000
 
#define cem_reactionfire   0x10000
 
#define cem_reactionfire2   0x20000
 
#define cem_poweron   0x40000
 
#define cem_weapstrength2   0x80000
 
#define cem_ammunition2   0x100000
 
#define cem_energyUsed   0x200000
 
#define cem_position   0x400000
 
#define cem_aiparam   0x800000
 
#define cem_version   0x1000000
 

Functions

ASCString getUnitReference (Vehicle *veh)
 

Variables

const float repairEfficiencyVehicle [resourceTypeNum *resourceTypeNum]
 
static const int repairExperienceDecrease = 20
 the percentage of experience that is removed when repairing a fully damaged unit More...
 
const int vehicleVersion = 11
 

Macro Definition Documentation

#define cem_aiparam   0x800000

Definition at line 1113 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_ammunition   0x8

Definition at line 1093 of file vehicle.cpp.

#define cem_ammunition2   0x100000

Definition at line 1110 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_armor   0x8000

Definition at line 1105 of file vehicle.cpp.

#define cem_attacked   0x40

Definition at line 1096 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_class   0x1000

Definition at line 1102 of file vehicle.cpp.

#define cem_damage   0x2

Definition at line 1091 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_direction   0x200

Definition at line 1099 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_energy   0x800

Definition at line 1101 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_energyUsed   0x200000

Definition at line 1111 of file vehicle.cpp.

#define cem_experience   0x1

Definition at line 1090 of file vehicle.cpp.

#define cem_fuel   0x4

Definition at line 1092 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_height   0x80

Definition at line 1097 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_loading   0x20

Definition at line 1095 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_material   0x400

Definition at line 1100 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_movement   0x100

Definition at line 1098 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_name   0x4000

Definition at line 1104 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_networkid   0x2000

Definition at line 1103 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_position   0x400000

Definition at line 1112 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_poweron   0x40000

Definition at line 1108 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_reactionfire   0x10000

Definition at line 1106 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_reactionfire2   0x20000

Definition at line 1107 of file vehicle.cpp.

#define cem_version   0x1000000

Definition at line 1114 of file vehicle.cpp.

Referenced by Vehicle::write().

#define cem_weapstrength   0x10

Definition at line 1094 of file vehicle.cpp.

#define cem_weapstrength2   0x80000

Definition at line 1109 of file vehicle.cpp.

Referenced by Vehicle::write().

#define UNITVERSIONLIMIT   0x7fffffff

Definition at line 47 of file vehicle.cpp.

Referenced by Vehicle::write().

Function Documentation

ASCString getUnitReference ( Vehicle veh)

Variable Documentation

const float repairEfficiencyVehicle[resourceTypeNum *resourceTypeNum]
Initial value:
= { 0, 0, 0,
0, 0.5, 0,
0.5, 0, 1 }

Definition at line 41 of file vehicle.cpp.

const int repairExperienceDecrease = 20
static

the percentage of experience that is removed when repairing a fully damaged unit

Definition at line 206 of file vehicle.cpp.

const int vehicleVersion = 11

Definition at line 1119 of file vehicle.cpp.