src/hcode/btech/btmacros.h File Reference

#include "config.h"
#include <math.h>
#include "macros.h"
#include "floatsim.h"
#include "mech.h"
#include "muxevent.h"
#include "p.event.h"

Include dependency graph for btmacros.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define LOS_NB   InLineOfSight_NB
#define MWalkingSpeed(maxspeed)   ((float) 2.0 * (maxspeed) / 3.0 + 0.1)
#define WalkingSpeed(maxspeed)   ((float) 2.0 * (maxspeed) / 3.0)
#define IsRunning(speed, maxspeed)   (speed > MWalkingSpeed(maxspeed))
#define is_aero(mech)   ((MechType(mech) == CLASS_AERO) || (IsDS(mech)))
#define IsForest(t)   (t == LIGHT_FOREST || t == HEAVY_FOREST)
#define IsForestHex(map, x, y)   (IsForest(GetRTerrain(map,x,y)))
#define IsMountains(t)   (t == MOUNTAINS)
#define IsMountainsHex(map, x, y)   (IsMountains(GetRTerrain(map,x,y)))
#define IsRough(t)   (t == ROUGH)
#define IsRoughHex(map, x, y)   (IsRough(GetRTerrain(map,x,y)))
#define IsBuilding(t)   (t == BUILDING)
#define IsBuildingHex(map, x, y)   (IsBuilding(GetRTerrain(map,x,y)))
#define BaseElev(terr, elev)   ((terr) == WATER ? -(elev) : (terr) == ICE ? -(elev) : (elev))
#define Elevation(mech_map, x, y)   BaseElev(GetRTerrain(mech_map,x,y),GetElevation(mech_map,x,y))
#define MechElevation(mech)   BaseElev(MechRTerrain(mech),abs(MechElev(mech)))
#define MechEngineSizeC(mech)   ((int) rint((2 * MechMaxSpeed(mech) / KPH_PER_MP) / 3) * MechTons(mech))
#define MechLowerElevation(mech)   (MechRTerrain(mech) != BRIDGE ? MechElevation(mech) : bridge_w_elevation(mech))
#define MechUpperElevation(mech)   (MechRTerrain(mech) == ICE ? 0 : MechElevation(mech))
#define MechsElevation(mech)   (MechZ(mech) - ((MechUpperElevation(mech) <= MechZ(mech) ? MechUpperElevation(mech) : MechLowerElevation(mech))))
#define GotPilot(mech)   (MechPilot(mech) > 0 && Location(MechPilot(mech)) == mech->mynum)
#define RGotPilot(mech)   ((GotPilot(mech)) && (Connected(MechPilot(mech)) || !isPlayer(MechPilot(mech))))
#define GotGPilot(mech)
#define RGotGPilot(mech)
#define AeroBay(a, b)   (a)->pd.bay[b]
#define AeroFuel(a)   (a)->ud.fuel
#define AeroFuelMax(a)   (a)->rd.maxfuel
#define AeroFuelOrig(a)   (a)->ud.fuel_orig
#define AeroSI(a)   (a)->ud.si
#define AeroSIOrig(a)   (a)->ud.si_orig
#define AeroTurret(a, b)   (a)->pd.turret[b]
#define AeroUnusableArcs(a)   (a)->pd.unusable_arcs
#define AeroFreeFuel(a)   ((MechType(a) == CLASS_VTOL) && mudconf.btech_nofusionvtolfuel && (!(MechSpecials(a) & ICE_TECH)))
#define DSLastMsg(a)   (a)->rd.last_ds_msg
#define GunPilot(a)   (pilot_override>0?pilot_override:MechPilot(a))
#define MechRadioType(a)   ((a)->ud.radioinfo)
#define MechRadioInfo(a)   (MechRadioType(a) / FREQS)
#define MechFreqs(a)   (MechRadioType(a) % FREQS)
#define MFreqs(a)   MechFreqs(a)
#define MechAim(a)   (a)->rd.aim
#define MechAimType(a)   (a)->rd.aim_type
#define MechAuto(a)   (a)->rd.autopilot_num
#define MechBTH(a)   (a)->rd.basetohit
#define MechBaseWalk(a)   (a)->ud.walkspeed
#define MechBaseRun(a)   (a)->ud.runspeed
#define MechBoomStart(a)   (a)->rd.boom_start
#define MechCarriedCargo(a)   (a)->rd.cargo_weight
#define MechXPMod(a)   (a)->rd.xpmod
#define SetCWCheck(a)   MechCritStatus(a) &= ~LOAD_OK
#define SetWCheck(a)   MechCritStatus(a) &= ~OWEIGHT_OK
#define SetCarriedCargo(a, b)   do { MechCarriedCargo(a) = (b) ; SetCWCheck(a); } while (0)
#define MechCarrying(a)   (a)->rd.carrying
#define SetCarrying(a, b)   do { MechCarrying(a) = (b) ; SetCWCheck(a) ; } while (0)
#define MechChargeTarget(a)   (a)->rd.chgtarget
#define MechChargeTimer(a)   (a)->rd.chargetimer
#define MechChargeDistance(a)   (a)->rd.chargedist
#define MechCocoon(a)   (a)->rd.cocoon
#define MechComm(a)   (a)->rd.commconv
#define MechCommLast(a)   (a)->rd.commconv_last
#define MechComputer(a)   (a)->ud.computer
#define MechCritStatus(a)   (a)->rd.critstatus
#define MechCritStatus2(a)   (a)->rd.critstatus2
#define MechDFATarget(a)   (a)->rd.dfatarget
#define MechDesiredAngle(a)   (a)->rd.angle
#define MechDesiredFacing(a)   (a)->rd.desiredfacing
#define MechDesiredSpeed(a)   (a)->rd.desired_speed
#define MechElev(a)   (a)->pd.elev
#define MechEndFZ(a)   (a)->rd.endfz
#define MechEngineHeat(a)   (a)->rd.engineheat
#define MechFX(a)   (a)->pd.fx
#define MechFY(a)   (a)->pd.fy
#define MechFZ(a)   (a)->pd.fz
#define MechFacing(a)   (FSIM2SHO((a)->pd.facing))
#define MechRFacing(a)   (a)->pd.facing
#define SetRFacing(a, b)   MechRFacing(a) = (b)
#define SetFacing(a, b)   SetRFacing(a,SHO2FSIM(b))
#define AddRFacing(a, b)   MechRFacing(a) += b
#define AddFacing(a, b)   AddRFacing(a,SHO2FSIM(b))
#define MechFireAdjustment(a)   (a)->rd.fire_adjustment
#define MechGoingX(a)   (a)->rd.goingx
#define MechGoingY(a)   (a)->rd.goingy
#define MechHeat(a)   (a)->rd.heat
#define MechHeatLast(a)   (a)->rd.heatboom_last
#define MechHexes(a)   (a)->pd.hexes_walked
#define MechID(a)   (a)->ID
#define MechIsOmniMech(a)   MechSpecials2(a) & OMNIMECH_TECH
#define MechInfantrySpecials(a)   (a)->rd.infantry_specials
#define MechJumpHeading(a)   (a)->rd.jumpheading
#define MechJumpLength(a)   (a)->rd.jumplength
#define MechJumpSpeed(a)   (a)->rd.jumpspeed
#define MechJumpTop(a)   (a)->rd.jumptop
#define MechLRSRange(a)   (a)->ud.lrs_range
#define MechLWRT(a)   (a)->rd.last_weapon_recycle
#define MechLastRndU(a)   (a)->rd.lastrndu
#define MechLastUse(a)   (a)->rd.lastused
#define MechLastStartup(a)   (a)->rd.last_startup
#define MechLastX(a)   (a)->pd.last_x
#define MechLastY(a)   (a)->pd.last_y
#define MechLateral(a)   (a)->rd.lateral
#define MechMASCCounter(a)   (a)->rd.masc_value
#define MechSChargeCounter(a)   (a)->rd.scharge_value
#define MechEngineSizeV(a)   (a)->rd.erat
#define MechEngineSize(a)   (MechEngineSizeV(a) > 0 ? MechEngineSizeV(a) : MechEngineSizeC(a))
#define MechMaxSpeed(a)   (a)->ud.maxspeed
#define TemplateMaxSpeed(a)   (a)->ud.template_maxspeed
#define SetMaxSpeed(a, b)   do {MechMaxSpeed(a) = b;MechCritStatus(a) &= ~SPEED_OK;correct_speed(a);} while (0)
#define LowerMaxSpeed(a, b)   SetMaxSpeed(a,MechMaxSpeed(a)-b)
#define DivideMaxSpeed(a, b)   SetMaxSpeed(a,MechMaxSpeed(a)/b)
#define MechRMaxSpeed(a)   (a)->rd.rspd
#define MMaxSpeed(a)   ((float) MechCargoMaxSpeed((a),(float) MechMaxSpeed((a))))
#define MechMaxSuits(a)   (a)->rd.maxsuits
#define MechMinusHeat(a)   (a)->rd.minus_heat
#define MechMove(a)   (a)->ud.move
#define MechIsQuad(a)   (MechMove(a) == MOVE_QUAD)
#define MechIsBiped(a)   (MechMove(a) == MOVE_BIPED)
#define MechNumOsinks(a)   (a)->rd.onumsinks
#define MechNumSeen(a)   (a)->rd.num_seen
#define MechPNumSeen(a)   (a)->rd.can_see
#define MechRealNumsinks(a)   (a)->ud.numsinks
#define MechActiveNumsinks(a)   (MechRealNumsinks(a) - MechDisabledHS(a))
#define MechDisabledHS(a)   (a)->rd.disabled_hs
#define MechPer(a)   (a)->rd.per
#define MechPrefs(a)   (a)->rd.mech_prefs
#define MechPKiller(a)   (MechPrefs(a) & MECHPREF_PKILL)
#define SetMechPKiller(a)   (MechPrefs(a) |= MECHPREF_PKILL)
#define UnSetMechPKiller(a)   (MechPrefs(a) &= ~MECHPREF_PKILL)
#define MechSLWarn(a)   (MechPrefs(a) & MECHPREF_SLWARN)
#define MechAutoFall(a)   (MechPrefs(a) & MECHPREF_AUTOFALL)
#define MechArmorWarn(a)   (!(MechPrefs(a) & MECHPREF_NOARMORWARN))
#define MechAmmoWarn(a)   (!(MechPrefs(a) & MECHPREF_NOAMMOWARN))
#define MechFailStand(a)   (!(MechPrefs(a) & MECHPREF_NOFAILSTAND))
#define MechAutoconSD(a)   (MechPrefs(a) & MECHPREF_AUTOCON_SD)
#define MechNoFriendlyFire(a)   (MechPrefs(a) & MECHPREF_NOFRIENDLYFIRE)
#define MechWalkXPFactor(a)   (a)->rd.wxf
#define MechPilot(a)   (a)->pd.pilot
#define MechPilotSkillBase(a)   (a)->rd.pilotskillbase
#define MechPilotStatus(a)   (a)->pd.pilotstatus
#define MechPlusHeat(a)   (a)->rd.plus_heat
#define MechRadio(a)   (a)->ud.radio
#define MechRadioRange(a)   (a)->ud.radio_range
#define MechRnd(a)   (a)->rd.rnd
#define MechScanRange(a)   (a)->ud.scan_range
#define MechSections(a)   (a)->ud.sections
#define MechSensor(a)   (a)->rd.sensor
#define MechSpecials(a)   (a)->rd.specials
#define MechSpecials2(a)   (a)->rd.specials2
#define MechSpeed(a)   (a)->rd.speed
#define MechSpotter(a)   (a)->rd.spotter
#define MechStall(a)   (a)->pd.stall
#define MechStartFX(a)   (a)->rd.startfx
#define MechStartFY(a)   (a)->rd.startfy
#define MechStartFZ(a)   (a)->rd.startfz
#define MechStartSpin(a)   (a)->rd.sspin
#define MechStatus(a)   (a)->rd.status
#define MechStatus2(a)   (a)->rd.status2
#define MechSwarmTarget(a)   (a)->rd.swarming
#define MechSwarmer(a)   (a)->rd.swarmedby
#define MechTacRange(a)   (a)->ud.tac_range
#define MechTankCritStatus(a)   (a)->rd.tankcritstatus
#define MechTargX(a)   (a)->rd.targx
#define MechTargY(a)   (a)->rd.targy
#define MechTargZ(a)   (a)->rd.targz
#define MechTarget(a)   (a)->rd.target
#define MechTeam(a)   (a)->pd.team
#define MechTerrain(a)   (a)->pd.terrain
#define MechRTerrain(a)   ((MechTerrain(a) == FIRE || MechTerrain(a) == SMOKE) ? mech_underlying_terrain(a) : MechTerrain(a))
#define MechTons(a)   (a)->ud.tons
#define MechRTons(a)   get_weight(a)
#define MechRTonsV(a)   (a)->rd.row
#define MechRealTons(a)   ((a)->rd.row / 1024)
#define MechRCTonsV(a)   (a)->rd.rcw
#define MechTurnDamage(a)   (a)->rd.turndamage
#define MechStaggeredLastTurn(a)   (a)->rd.staggerstamp
#define MechStaggerStamp(a)   ((a)->rd.staggerstamp - 1)
#define SetMechStaggerStamp(a, b)   ((a)->rd.staggerstamp = (b) + 1)
#define MechTurretFacing(a)   (a)->rd.turretfacing
#define MechType(a)   (a)->ud.type
#define MechType_Name(a)   (a)->ud.mech_name
#define MechType_Ref(a)   (a)->ud.mech_type
#define MechVFacing(a)   AcceptableDegree(MechFacing(a) + MechLateral(a))
#define MechVerticalSpeed(a)   (a)->rd.verticalspeed
#define MechVisMod(a)   (a)->rd.vis_mod
#define MechWeapHeat(a)   (a)->rd.weapheat
#define MechX(a)   (a)->pd.x
#define MechY(a)   (a)->pd.y
#define MechZ(a)   (a)->pd.z
#define MechLX(a)   (a)->rd.lx
#define MechLY(a)   (a)->rd.ly
#define MechTargComp(a)   (a)->ud.targcomp
#define MechBV(a)   (a)->ud.mechbv
#define CargoSpace(a)   (a)->ud.cargospace
#define CarMaxTon(a)   (a)->ud.carmaxton
#define Heatcutoff(a)   (MechCritStatus(a) & HEATCUTOFF)
#define MechHasDHS(a)   (MechSpecials(a) & (CLAN_TECH|DOUBLE_HEAT_TECH))
#define ClanMech(a)   (MechSpecials(a) & CLAN_TECH)
#define HS_Size(a)   (MechType(mech) == CLASS_MECH ? (ClanMech(a) ? 2 : ((MechSpecials(a) & DOUBLE_HEAT_TECH) ? 3 : 1)) : 1)
#define HS_Efficiency(a)   (MechHasDHS(a) ? 2 : 1)
#define MechHasHeat(a)
#define DSSpam(mek, msg)   do { if (DropShip(MechType(mek)) && DSOkToNotify(mek)) MechLOSBroadcast(mek,msg); } while (0)
#define DSSpam_O(mek, msg)   do { if (DropShip(MechType(mek))) MechLOSBroadcast(mek,msg); } while (0)
#define MechHasTurret(a)
#define MechSeemsFriend(a, b)
#define SetTurnMode(a, b)   do { if (b) MechPrefs(a) |= MECHPREF_TURNMODE; else MechPrefs(a) &= ~MECHPREF_TURNMODE; } while (0)
#define GetTurnMode(a)   (MechPrefs(a) & MECHPREF_TURNMODE)
#define MECHEVENT(mech, type, func, time, data)
#define AUTOEVENT(auto, type, func, time, data)   muxevent_add(time, 0, type, func, (void *) (auto), (void *) (data))
#define MAPEVENT(map, type, func, time, data)   muxevent_add(time, 0, type, func, (void *) (map), (void *) (data))
#define StopDec(a)   muxevent_remove_type_data2(EVENT_DECORATION, (void *) a)
#define OBJEVENT(obj, type, func, time, data)   muxevent_add(time, 0, type, func, (void *) obj, (void *) (data))
#define GetPartType(a, b, c)   MechSections(a)[b].criticals[c].type
#define SetPartType(a, b, c, d)   GetPartType(a,b,c)=d
#define GetPartFireMode(a, b, c)   MechSections(a)[b].criticals[c].firemode
#define SetPartFireMode(a, b, c, d)   GetPartFireMode(a,b,c)=d
#define GetPartAmmoMode(a, b, c)   MechSections(a)[b].criticals[c].ammomode
#define SetPartAmmoMode(a, b, c, d)   GetPartAmmoMode(a,b,c)=d
#define GetPartDamageFlags(a, b, c)   MechSections(a)[b].criticals[c].weapDamageFlags
#define SetPartDamageFlags(a, b, c, d)   GetPartDamageFlags(a,b,c)=d
#define GetPartDesiredAmmoLoc(a, b, c)   MechSections(a)[b].criticals[c].desiredAmmoLoc
#define SetPartDesiredAmmoLoc(a, b, c, d)   GetPartDesiredAmmoLoc(a,b,c)=d
#define GetPartData(a, b, c)   MechSections(a)[b].criticals[c].data
#define SetPartData(a, b, c, d)   GetPartData(a,b,c)=d
#define GetPartRBrand(mech, a, b)   MechSections(mech)[a].criticals[b].brand
#define GetPartBrand(mech, a, b)   (GetPartRBrand(mech,a,b)%16)
#define SetPartBrand(mech, a, b, d)   GetPartRBrand(mech,a,b) = (d) + (PartTempNuke(mech,a,b)<<4)
#define PartTempNuke(mech, a, b)   (GetPartRBrand(mech,a,b)>>4)
#define SetPartTempNuke(mech, a, b, d)   GetPartRBrand(mech,a,b) = GetPartBrand(mech,a,b) + ((d) << 4)
#define ClearTempNuke(mech, a, b)   GetPartRBrand(mech,a,b) = GetPartBrand(mech,a,b)
#define PartIsNonfunctional(a, b, c)   (PartIsDisabled(a,b,c) || PartIsBroken(a,b,c) || PartIsDestroyed(a,b,c))
#define PartIsDamaged(a, b, c)   (GetPartFireMode(a,b,c) & DAMAGED_MODE)
#define DamagePart(a, b, c)   (GetPartFireMode(a,b,c) |= DAMAGED_MODE)
#define UnDamagePart(a, b, c)   do { (GetPartFireMode(a,b,c) &= ~DAMAGED_MODE); SetPartDamageFlags(a,b,c,0); SetPartTempNuke(a,b,c,0); } while (0)
#define PartIsDisabled(a, b, c)   (GetPartFireMode(a,b,c) & DISABLED_MODE)
#define DisablePart(a, b, c)   (GetPartFireMode(a,b,c) |= DISABLED_MODE)
#define UnDisablePart(a, b, c)   (GetPartFireMode(a,b,c) &= ~DISABLED_MODE)
#define PartIsBroken(a, b, c)   (GetPartFireMode(a,b,c) & (DESTROYED_MODE|BROKEN_MODE))
#define BreakPart(a, b, c)   (GetPartFireMode(a,b,c) |= BROKEN_MODE)
#define UnBreakPart(a, b, c)   (GetPartFireMode(a,b,c) &= ~BROKEN_MODE)
#define PartIsDestroyed(a, b, c)   (GetPartFireMode(a,b,c) & DESTROYED_MODE)
#define DestroyPart(a, b, c)   do { (GetPartFireMode(a,b,c) |= DESTROYED_MODE); GetPartFireMode(a,b,c) &= ~(BROKEN_MODE|DISABLED_MODE|DAMAGED_MODE); SetPartDamageFlags(a,b,c,0); SetPartTempNuke(a,b,c,0); } while (0)
#define UnDestroyPart(a, b, c)   do { (GetPartFireMode(a,b,c) &= ~(DESTROYED_MODE|HOTLOAD_MODE|DISABLED_MODE|BROKEN_MODE|DAMAGED_MODE)); SetPartDamageFlags(a,b,c,0); SetPartTempNuke(a,b,c,0); } while (0)
#define WpnIsRecycling(a, b, c)
#define SectArmorRepair(a, b)   SomeoneFixingA(a,b)
#define SectRArmorRepair(a, b)   SomeoneFixingA(a,b+8)
#define SectIntsRepair(a, b)   SomeoneFixingI(a,b)
#define SectIsDestroyed(a, b)   (!GetSectArmor(a,b) && ((is_aero(a) || !GetSectInt(a,b)) && !IsDS(a)))
#define SetSectDestroyed(a, b)
#define UnSetSectDestroyed(a, b)
#define SectIsBreached(a, b)   ((a)->ud.sections[b].config & SECTION_BREACHED)
#define SetSectBreached(a, b)   do { MechSections(a)[b].config |= SECTION_BREACHED ; SetWCheck(a); } while (0)
#define UnSetSectBreached(a, b)   do { MechSections(a)[b].config &= ~SECTION_BREACHED ; SetWCheck(a); } while (0)
#define SectIsFlooded(a, b)   ((a)->ud.sections[b].config & SECTION_FLOODED)
#define SetSectFlooded(a, b)   do { MechSections(a)[b].config |= SECTION_FLOODED ; SetWCheck(a); } while (0)
#define UnSetSectFlooded(a, b)   do { MechSections(a)[b].config &= ~SECTION_FLOODED ; SetWCheck(a); } while (0)
#define GetSectArmor(a, b)   ((a)->ud.sections[b].armor)
#define GetSectRArmor(a, b)   ((a)->ud.sections[b].rear)
#define GetSectInt(a, b)   ((a)->ud.sections[b].internal)
#define SetSectArmor(a, b, c)   do { (a)->ud.sections[b].armor=c;SetWCheck(a); } while (0)
#define SetSectRArmor(a, b, c)   do { (a)->ud.sections[b].rear=c;SetWCheck(a); } while (0)
#define SetSectInt(a, b, c)   do { (a)->ud.sections[b].internal=c;SetWCheck(a); } while (0)
#define GetSectOArmor(a, b)   (a)->ud.sections[b].armor_orig
#define GetSectORArmor(a, b)   (a)->ud.sections[b].rear_orig
#define GetSectOInt(a, b)   (a)->ud.sections[b].internal_orig
#define SetSectOArmor(a, b, c)   (a)->ud.sections[b].armor_orig=c
#define SetSectORArmor(a, b, c)   (a)->ud.sections[b].rear_orig=c
#define SetSectOInt(a, b, c)   (a)->ud.sections[b].internal_orig=c
#define CanJump(a)   (!(Stabilizing(a)) && !(Jumping(a)))
#define CrewStunned(a)   muxevent_count_type_data(EVENT_UNSTUN_CREW, (void *) a)
#define StunCrew(a)   MECHEVENT(a, EVENT_UNSTUN_CREW, unstun_crew_event, 60, 0)
#define CrewStunning(a)   muxevent_count_type_data(EVENT_CREWSTUN, (void *) a)
#define StopCrewStunning(a)   muxevent_remove_type_data(EVENT_CREWSTUN, (void *) a)
#define Burning(a)   muxevent_count_type_data(EVENT_VEHICLEBURN, (void *) a)
#define BurningSide(a, side)   muxevent_count_type_data_data(EVENT_VEHICLEBURN, (void *) a, (void *) side)
#define StopBurning(a)   muxevent_remove_type_data(EVENT_VEHICLEBURN, (void *) a)
#define StopBurningSide(a, side)   muxevent_remove_type_data_data(EVENT_VEHICLEBURN, (void *) a, (void *) side)
#define Extinguishing(a)   muxevent_count_type_data(EVENT_VEHICLE_EXTINGUISH, (void *) a)
#define Jellied(a)   (MechCritStatus(a) & JELLIED)
#define Exploding(a)   muxevent_count_type_data(EVENT_EXPLODE, (void *) a)
#define Dumping(a)   muxevent_count_type_data(EVENT_DUMP, (void *) a)
#define Dumping_Type(a, type)   (muxevent_count_type_data_data(EVENT_DUMP, (void *) a, (void *) type) || muxevent_count_type_data_data(EVENT_DUMP, (void *) a, (void *) 0))
#define DumpingData(a, data2)   muxevent_get_type_data(EVENT_DUMP, (void *) a, (void *) data2)
#define ChangingLateral(a)   muxevent_count_type_data(EVENT_LATERAL,(void *) a)
#define Seeing(a)   muxevent_count_type_data(EVENT_PLOS,(void *) a)
#define Locking(a)   muxevent_count_type_data(EVENT_LOCK,(void *) a)
#define Hiding(a)   muxevent_count_type_data(EVENT_HIDE,(void *) a)
#define HasCamo(a)   (MechSpecials2(a) & CAMO_TECH)
#define Digging(a)   (MechTankCritStatus(a) & DIGGING_IN)
#define MechDugIn(a)   (MechTankCritStatus(mech) & DUG_IN)
#define ChangingHulldown(a)   muxevent_count_type_data(EVENT_CHANGING_HULLDOWN,(void *) a)
#define IsHulldown(a)   (MechStatus(a) & HULLDOWN)
#define Falling(a)   muxevent_count_type_data(EVENT_FALL,(void *) a)
#define Moving(a)   muxevent_count_type_data(EVENT_MOVE,(void *) a)
#define RemovingPods(a)   muxevent_count_type_data(EVENT_REMOVE_PODS,(void *) a)
#define SensorChange(a)   muxevent_count_type_data(EVENT_SCHANGE,(void *) a)
#define Stabilizing(a)   muxevent_count_type_data(EVENT_JUMPSTABIL,(void *) a)
#define Standrecovering(a)   muxevent_count_type_data(EVENT_STANDFAIL, (void *) a)
#define Standing(a)   muxevent_count_type_data(EVENT_STAND,(void *) a)
#define Starting(a)   muxevent_count_type_data(EVENT_STARTUP,(void *) a)
#define Recovering(a)   muxevent_count_type_data(EVENT_RECOVERY,(void *) a)
#define TakingOff(a)   muxevent_count_type_data(EVENT_TAKEOFF,(void *) a)
#define FlyingT(a)   (is_aero(a) || MechMove(a) == MOVE_VTOL)
#define RollingT(a)   ((MechType(a) == CLASS_AERO) || (MechType(a) == CLASS_DS))
#define MaybeMove(a)
#define SetRecyclePart(a, b, c, d)   do { UpdateRecycling(a) ; SetPartData(a,b,c,d); } while (0)
#define SetRecycleLimb(a, b, c)   do { UpdateRecycling(a) ; (a)->ud.sections[b].recycle=c; } while (0)
#define UpdateRecycling(a)
#define AllLimbsRecycling(mech)
#define AnyLimbsRecycling(mech)
#define StopExploding(a)   muxevent_remove_type_data(EVENT_EXPLODE, (void *) a)
#define StopLateral(a)   muxevent_remove_type_data(EVENT_LATERAL,(void *) a)
#define StopMasc(a)   muxevent_remove_type_data(EVENT_MASC_FAIL,(void *) a)
#define StopMascR(a)   muxevent_remove_type_data(EVENT_MASC_REGEN,(void *) a)
#define StopSCharge(a)   muxevent_remove_type_data(EVENT_SCHARGE_FAIL,(void *) a)
#define StopSChargeR(a)   muxevent_remove_type_data(EVENT_SCHARGE_REGEN,(void *) a)
#define StopDump(a)   muxevent_remove_type_data(EVENT_DUMP, (void *) a)
#define StopJump(a)   muxevent_remove_type_data(EVENT_JUMP, (void *) a)
#define StopOOD(a)   muxevent_remove_type_data(EVENT_OOD, (void *) a)
#define StopMoving(a)   muxevent_remove_type_data(EVENT_MOVE, (void *) a)
#define StopStand(a)   muxevent_remove_type_data(EVENT_STAND, (void *) a)
#define StopStabilization(a)   muxevent_remove_type_data(EVENT_JUMPSTABIL, (void *) a)
#define StopSensorChange(a)   muxevent_remove_type_data(EVENT_SCHANGE,(void *) a)
#define StopStartup(a)   muxevent_remove_type_data(EVENT_STARTUP, (void *) a)
#define StopHiding(a)   muxevent_remove_type_data(EVENT_HIDE, (void *) a)
#define StopDigging(a)   muxevent_remove_type_data(EVENT_DIG, (void *) a);MechTankCritStatus(a) &= ~DIGGING_IN
#define StopHullDown(a)   muxevent_remove_type_data(EVENT_CHANGING_HULLDOWN, (void *) a)
#define StopTakeOff(a)   muxevent_remove_type_data(EVENT_TAKEOFF, (void *) a)
#define UnjammingTurret(a)   muxevent_count_type_data(EVENT_UNJAM_TURRET, (void *) a)
#define UnJammingAmmo(a)   muxevent_count_type_data(EVENT_UNJAM_AMMO, (void *) a)
#define UnJammingAmmoData(a, type)   muxevent_get_type_data(EVENT_UNJAM_AMMO, (void *) a, (void *) type)
#define WeaponUnJammingAmmo(a, type)   muxevent_count_type_data_data(EVENT_UNJAM_AMMO, (void *) a, (void *) type)
#define EnteringHangar(a)   muxevent_count_type_data(EVENT_ENTER_HANGAR, (void *) a)
#define OODing(a)   MechCocoon(a)
#define C_OODing(a)   (MechCocoon(a) > 0)
#define InSpecial(a)   (MechStatus(a) & UNDERSPECIAL)
#define InGravity(a)   (MechStatus(a) & UNDERGRAVITY)
#define InVacuum(a)   (MechStatus(a) & UNDERVACUUM)
#define Jumping(a)   (MechStatus(a) & JUMPING)
#define Started(a)   (MechStatus(a) & STARTED)
#define Destroyed(a)   (MechStatus(a) & DESTROYED)
#define Fallen(a)   (MechStatus(a) & FALLEN)
#define Immobile(a)   ( !Started(a) || Uncon(a) || Blinded(a) || (MechMove(a) == MOVE_NONE) || ((MechStatus(a) & FALLEN) && ( (MechType(a) != CLASS_MECH) && (MechType(a) != CLASS_MW) )) )
#define Landed(a)   (MechStatus(a) & LANDED)
#define Towed(a)   (MechStatus(a) & TOWED)
#define Towable(a)   (MechCritStatus(a) & TOWABLE)
#define PerformingAction(a)   (MechStatus(a) & PERFORMING_ACTION)
#define StopPerformingAction(a)   (MechStatus(a) &= ~PERFORMING_ACTION)
#define MakeMechFall(a)   MechStatus(a) |= FALLEN;FallCentersTorso(a);MarkForLOSUpdate(a);MechFloods(a);StopStand(a);StopHullDown(a);MechStatus(a) &= ~HULLDOWN;
#define FallCentersTorso(a)   MechStatus(a) &= ~(TORSO_RIGHT|TORSO_LEFT|FLIPPED_ARMS)
#define MakeMechStand(a)   MechStatus(a) &= ~FALLEN;MarkForLOSUpdate(a)
#define StandMechTime(a)   (30 / BOUNDED(1,(MechMaxSpeed(a)/MP2),30))
#define StopLock(a)
#define SearchlightChanging(a)   muxevent_count_type_data(EVENT_SLITECHANGING, (void *) a)
#define HeatcutoffChanging(a)   muxevent_count_type_data(EVENT_HEATCUTOFFCHANGING, (void *) a)
#define SeeWhenShutdown(a)   (MechStatus(mech) & AUTOCON_WHEN_SHUTDOWN)
#define LoseLock(a)   StopLock(a);MechTarget(a)=-1;MechTargX(a)=-1;MechTargY(a)=-1;if (MechAim(a) != NUM_SECTIONS) { mech_notify(a, MECHALL, "Location-specific targeting powers down."); MechAim(a) = NUM_SECTIONS; }
#define StartSeeing(a)
#define Startup(a)
#define Shutdown(a)
#define Destroy(a)
#define DestroyAndDump(a)
#define GetTerrain(mapn, x, y)   Coding_GetTerrain(mapn->map[y][x])
#define GetRTerrain(map, x, y)   ((GetTerrain(map,x,y)==FIRE || GetTerrain(map,x,y)==SMOKE) ? map_underlying_terrain(map,x,y) : GetTerrain(map,x,y))
#define GetElevation(mapn, x, y)   Coding_GetElevation(mapn->map[y][x])
#define GetElev(mapn, x, y)   GetElevation(mapn,x,y)
#define SetMap(mapn, x, y, t, e)   mapn->map[y][x] = Coding_GetIndex(t,e)
#define SetMapB(mapn, x, y, t, e)   mapn[y][x] = Coding_GetIndex(t,e)
#define SetTerrain(mapn, x, y, t)   do {SetMap(mapn,x,y,t,GetElevation(mapn,x,y));UpdateMechsTerrain(mapn,x,y,t); } while (0)
#define SetTerrainBase(mapn, x, y, t)   SetMap(mapn,x,y,t,GetElevation(mapn,x,y))
#define SetElevation(mapn, x, y, e)   SetMap(mapn,x,y,GetTerrain(mapn,x,y),e)
#define ScenError(msg...)   send_channel("ScenErrors",msg)
#define ScenStatus(msg...)   send_channel("ScenStatus",msg)
#define SendAI(msg...)   send_channel("MechAI",msg)
#define SendAlloc(msg)
#define SendLoc(msg)
#define SendCustom(msg...)   send_channel("MechCustom",msg)
#define SendDB(msg...)   send_channel("DBInfo",msg)
#define SendDebug(msg...)   send_channel("MechDebugInfo",msg)
#define SendEcon(msg...)   send_channel("MechEconInfo",msg)
#define SendError(msg...)   send_channel("MechErrors",msg)
#define SendEvent(msg...)   send_channel("EventInfo",msg)
#define SendSensor(msg...)   send_channel("MechSensor",msg)
#define SendTrigger(msg...)   send_channel("MineTriggers",msg)
#define SendXP(msg...)   send_channel("MechXP",msg)
#define SendDSInfo(msg...)   send_channel("DSInfo",msg)
#define SendAttackEmits(msg...)   send_channel("MechAttackEmits",msg)
#define SendAttacks(msg...)   send_channel("MechAttacks",msg)
#define SendAttackXP(msg...)   send_channel("MechAttackXP",msg)
#define SendBTHDebug(msg...)   send_channel("MechBTHDebug",msg)
#define SendFreqs(msg...)   send_channel("MechFreqs",msg)
#define SendPilotXP(msg...)   send_channel("MechPilotXP",msg)
#define SendTechXP(msg...)   send_channel("MechTechXP",msg)
#define TEMPLATE_ERR(a, b...)
#define TEMPLATE_GERR   TEMPLATE_ERR
#define HotLoading(weapindx, mode)   ((mode & HOTLOAD_MODE) && (MechWeapons[weapindx].special & IDF))
#define MirrorPosition(from, to, heightMod)
#define ValidCoordA(mech_map, newx, newy, msg)
#define ValidCoord(mech_map, newx, newy)   ValidCoordA(mech_map,newx, newy, "Illegal coordinates!")
#define FlMechRange(map, m1, m2)   FaMechRange(m1,m2)
#define Readnum(tovar, fromvar)   (!(tovar = atoi(fromvar)) && strcmp(fromvar, "0"))
#define SetBit(val, bit)   (val |= bit)
#define UnSetBit(val, bit)   (val &= ~(bit))
#define EvalBit(val, bit, state)   do {if (state) SetBit(val,bit); else UnSetBit(val,bit);} while (0)
#define ToggleBit(val, bit)   do { if (!(val & bit)) SetBit(val,bit);else UnSetBit(val,bit); } while (0)
#define Sees360(mech)   ((MechMove(mech)==MOVE_NONE) || (MechType(mech) == CLASS_BSUIT))
#define FindWeapons(m, i, wa, wda, cr)   FindWeapons_Advanced(m,i,wa,wda,cr,1)
#define ContinueFlying(mech)
#define Overwater(mech)
#define MoveMod(mech)
#define IsWater(t)   ((t) == ICE || (t) == WATER || (t) == BRIDGE)
#define InWater(mech)   (IsWater(MechRTerrain((mech))) && MechZ(mech)<0)
#define OnWater(mech)   (IsWater(MechRTerrain((mech))) && MechZ(mech)<=0)
#define IsC3(mech)   ((MechSpecials(mech) & (C3_MASTER_TECH|C3_SLAVE_TECH)) && !C3Destroyed(mech))
#define IsC3i(mech)   ((MechSpecials2(mech) & C3I_TECH) && !C3iDestroyed(mech))
#define IsAMS(weapindx)   (MechWeapons[weapindx].special & AMS)
#define AmmoMod(mech, loc, pos)
#define JumpSpeed(mech, map)   ((InGravity(mech) && map) ? (MechJumpSpeed(mech) * 100 / ((MAX(50, MapGravity(map))))) : MechJumpSpeed(mech))
#define JumpSpeedMP(mech, map)   ((int) (JumpSpeed(mech,map) * MP_PER_KPH))
#define NotInWater(mech)   (!(OnWater(mech)))
#define WaterBeast(mech)   (MechMove(mech)==MOVE_HULL || MechMove(mech)==MOVE_FOIL)
#define IsCrap(val)
#define Spinning(mech)   (MechCritStatus(mech) & SPINNING)
#define StopSpinning(mech)   (MechCritStatus(mech) &= ~SPINNING)
#define StartSpinning(mech)   (MechCritStatus(mech) |= SPINNING)
#define MechLit(mech)   (MechCritStatus(mech) & SLITE_LIT)
#define MechLites(mech)   (MechStatus2(mech) & SLITE_ON)
#define IsLit(mech)   (MechLit(mech) || MechLites(mech))
#define OkayCritSect(sect, num, ok)   OkayCritSect2(mech,sect,num,ok)
#define OkayCritSectS(sect, num, ok)   OkayCritSect(sect,num,I2Special(ok))
#define OkayCritSect2(mech, sect, num, ok)   (GetPartType(mech,sect,num)==(ok) && !PartIsNonfunctional(mech,sect,num))
#define OkayCritSectS2(mech, sect, num, ok)   OkayCritSect2(mech,sect,num,I2Special(ok))
#define MAPMOVEMOD(map)   ((map)->movemod > 0 ? (float) (map)->movemod / 100.0 : 1.0)
#define RCache_Remove(n)
#define RCache_Flush()
#define FaMechRange(mech, target)
#define DSBearMod(ds)   ((MechFacing(ds) +30) / 60) % 6
#define ECMActive(mech)   (ECMEnabled(mech) && !ECMCountered(mech))
#define ECCMActive(mech)   ECCMEnabled(mech)
#define ECMEnabled(mech)   (MechStatus2(mech) & ECM_ENABLED)
#define ECCMEnabled(mech)   (MechStatus2(mech) & ECCM_ENABLED)
#define EnableECM(mech)   (MechStatus2(mech) |= ECM_ENABLED)
#define EnableECCM(mech)   (MechStatus2(mech) |= ECCM_ENABLED)
#define DisableECM(mech)   (MechStatus2(mech) &= ~ECM_ENABLED)
#define DisableECCM(mech)   (MechStatus2(mech) &= ~ECCM_ENABLED)
#define PerECMActive(mech)   (PerECMEnabled(mech) && !ECMCountered(mech))
#define PerECCMActive(mech)   PerECCMEnabled(mech)
#define PerECMEnabled(mech)   (MechStatus2(mech) & PER_ECM_ENABLED)
#define PerECCMEnabled(mech)   (MechStatus2(mech) & PER_ECCM_ENABLED)
#define EnablePerECM(mech)   (MechStatus2(mech) |= PER_ECM_ENABLED)
#define EnablePerECCM(mech)   (MechStatus2(mech) |= PER_ECCM_ENABLED)
#define DisablePerECM(mech)   (MechStatus2(mech) &= ~PER_ECM_ENABLED)
#define DisablePerECCM(mech)   (MechStatus2(mech) &= ~PER_ECCM_ENABLED)
#define AnyECMDisturbed(mech)   (ECMDisturbed(mech) || AngelECMDisturbed(mech))
#define AnyECMProtected(mech)   (ECMProtected(mech) || AngelECMProtected(mech))
#define AnyECMActive(mech)   (ECMActive(mech) || AngelECMActive(mech))
#define AnyECCMActive(mech)   (ECCMActive(mech) || AngelECCMActive(mech))
#define ECMDisturbed(mech)   (MechStatus2(mech) & ECM_DISTURBANCE)
#define ECMProtected(mech)   ((MechStatus2(mech) & ECM_PROTECTED) || ECMActive(mech) || PerECMActive(mech))
#define ECMCountered(mech)   (MechStatus2(mech) & ECM_COUNTERED)
#define SetECMCountered(mech)   (MechStatus2(mech) |= ECM_COUNTERED)
#define UnSetECMCountered(mech)   (MechStatus2(mech) &= ~ECM_COUNTERED)
#define SetECMDisturbed(mech)   (MechStatus2(mech) |= ECM_DISTURBANCE)
#define UnSetECMDisturbed(mech)   (MechStatus2(mech) &= ~ECM_DISTURBANCE)
#define SetECMProtected(mech)   (MechStatus2(mech) |= ECM_PROTECTED)
#define UnSetECMProtected(mech)   (MechStatus2(mech) &= ~ECM_PROTECTED)
#define HasWorkingECMSuite(mech)
#define AngelECMActive(mech)   (AngelECMEnabled(mech) && !ECMCountered(mech))
#define AngelECCMActive(mech)   AngelECCMEnabled(mech)
#define AngelECMEnabled(mech)   (MechStatus2(mech) & ANGEL_ECM_ENABLED)
#define AngelECCMEnabled(mech)   (MechStatus2(mech) & ANGEL_ECCM_ENABLED)
#define EnableAngelECM(mech)   (MechStatus2(mech) |= ANGEL_ECM_ENABLED)
#define EnableAngelECCM(mech)   (MechStatus2(mech) |= ANGEL_ECCM_ENABLED)
#define DisableAngelECM(mech)   (MechStatus2(mech) &= ~ANGEL_ECM_ENABLED)
#define DisableAngelECCM(mech)   (MechStatus2(mech) &= ~ANGEL_ECCM_ENABLED)
#define AngelECMProtected(mech)   ((MechStatus2(mech) & ANGEL_ECM_PROTECTED) || AngelECMActive(mech))
#define AngelECMDisturbed(mech)   (MechStatus2(mech) & ANGEL_ECM_DISTURBED)
#define SetAngelECMDisturbed(mech)   (MechStatus2(mech) |= ANGEL_ECM_DISTURBED)
#define UnSetAngelECMDisturbed(mech)   (MechStatus2(mech) &= ~ANGEL_ECM_DISTURBED)
#define SetAngelECMProtected(mech)   (MechStatus2(mech) |= ANGEL_ECM_PROTECTED)
#define UnSetAngelECMProtected(mech)   (MechStatus2(mech) &= ~ANGEL_ECM_PROTECTED)
#define HasWorkingAngelECMSuite(mech)
#define StealthArmorActive(mech)   (MechStatus2(mech) & STH_ARMOR_ON)
#define EnableStealthArmor(mech)   (MechStatus2(mech) |= STH_ARMOR_ON)
#define DisableStealthArmor(mech)   (MechStatus2(mech) &= ~STH_ARMOR_ON)
#define StealthArmorChanging(mech)   muxevent_count_type_data(EVENT_STEALTH_ARMOR, (void *) mech)
#define DestroyNullSigSys(mech)   (MechCritStatus(mech) |= NSS_DESTROYED)
#define NullSigSysDest(mech)   (MechCritStatus(mech) & NSS_DESTROYED)
#define NullSigSysActive(mech)   (MechStatus2(mech) & NULLSIGSYS_ON)
#define EnableNullSigSys(mech)   (MechStatus2(mech) |= NULLSIGSYS_ON)
#define DisableNullSigSys(mech)   (MechStatus2(mech) &= ~NULLSIGSYS_ON)
#define NullSigSysChanging(mech)   muxevent_count_type_data(EVENT_NSS, (void *) mech)
#define HasC3(mech)   (HasC3m(mech) || HasC3s(mech))
#define HasC3m(mech)   ((MechSpecials(mech) & C3_MASTER_TECH))
#define HasC3s(mech)   ((MechSpecials(mech) & C3_SLAVE_TECH))
#define C3Destroyed(mech)   (MechCritStatus(mech) & C3_DESTROYED)
#define MechC3Network(a)   (a)->sd.C3Network
#define MechC3NetworkElem(a, b)   (a)->sd.C3Network[b]
#define MechC3NetworkSize(a)   (a)->sd.wC3NetworkSize
#define MechTotalC3Masters(a)   (a)->sd.wTotalC3Masters
#define MechWorkingC3Masters(a)   (a)->sd.wWorkingC3Masters
#define HasC3i(mech)   ((MechSpecials2(mech) & C3I_TECH))
#define C3iDestroyed(mech)   (MechCritStatus(mech) & C3I_DESTROYED)
#define MechC3iNetwork(a)   (a)->sd.C3iNetwork
#define MechC3iNetworkElem(a, b)   (a)->sd.C3iNetwork[b]
#define MechC3iNetworkSize(a)   (a)->sd.wC3iNetworkSize
#define HasTAG(mech)   ( (MechSpecials2(mech) & TAG_TECH) || HasC3m(mech) )
#define TAGTarget(mech)   (mech)->sd.tagTarget
#define TaggedBy(mech)   (mech)->sd.taggedBy
#define TagRecycling(a)   muxevent_count_type_data(EVENT_TAG_RECYCLE,(void *) a)
#define CarryingClub(mech)   ( (MechSections(mech)[RARM].specials & CARRYING_CLUB) || (MechSections(mech)[LARM].specials & CARRYING_CLUB))
#define DropClub(mech)   do { if(CarryingClub(mech)) { MechSections(mech)[RARM].specials &= ~CARRYING_CLUB; MechSections(mech)[LARM].specials &= ~CARRYING_CLUB; mech_notify(mech, MECHALL, "Your club falls to the ground and shatters."); MechLOSBroadcast(mech, "'s club falls to the ground and shatters."); } } while (0)
#define Staggering(mech)   ( StaggerLevel(mech) > 0 )
#define CheckingStaggerDamage(mech)   muxevent_count_type_data(EVENT_CHECK_STAGGER,(void *) mech)
#define StartStaggerCheck(mech)   do { MECHEVENT(mech, EVENT_CHECK_STAGGER, check_stagger_event, 5, 0); SendDebug(tprintf("Starting stagger check for %d.", mech->mynum)); } while (0)
#define StopStaggerCheck(mech)   do { muxevent_remove_type_data(EVENT_CHECK_STAGGER, (void *) mech); (mech)->rd.staggerDamage=0; (mech)->rd.lastStaggerNotify=0; SendDebug(tprintf("Stopping stagger check for %d.", mech->mynum)); } while (0)
#define StaggerDamage(mech)   ( (mech)->rd.staggerDamage )
#define LastStaggerNotify(mech)   ( (mech)->rd.lastStaggerNotify )
#define StaggerLevel(mech)   ( (mech)->rd.staggerDamage / 20 )
#define MechIsObservator(mech)   (MechCritStatus(mech) & OBSERVATORIC)
#define MechLOSFlag_WoodCount(flag)   (((flag) / MECHLOSFLAG_WOOD) % MECHLOSMAX_WOOD)
#define MechLOSFlag_WaterCount(flag)   (((flag) / MECHLOSFLAG_WATER) % MECHLOSMAX_WATER)
#define MechToMech_LOSFlag(map, from, to)   ((map)->LOSinfo[from->mapnumber][to->mapnumber])
#define MoveModeChange(a)   muxevent_count_type_data(EVENT_MOVEMODE,(void *) a)
#define MoveModeLock(a)   (MechStatus2(a) & MOVE_MODES_LOCK || (MoveModeChange(a) && !(MechStatus2(a) & DODGING)))
#define MoveModeData(a)   muxevent_count_type_data_firstev(EVENT_MOVEMODE, (void *) a)
#define StopMoveMode(a)   muxevent_remove_type_data(EVENT_MOVEMODE, (void *) a)
#define Sprinting(a)   (MechStatus2(a) & SPRINTING)
#define Evading(a)   (MechStatus2(a) & EVADING)
#define Dodging(a)   (MechStatus2(a) & DODGING)
#define SideSlipping(a)   muxevent_count_type_data(EVENT_SIDESLIP, (void *) a)
#define StopSideslip(a)   muxevent_remove_type_data(EVENT_SIDESLIP, (void *) a)


Define Documentation

#define AddFacing ( a,
 )     AddRFacing(a,SHO2FSIM(b))

Definition at line 127 of file btmacros.h.

Referenced by MechFalls(), and UpdateHeading().

#define AddRFacing ( a,
 )     MechRFacing(a) += b

Definition at line 126 of file btmacros.h.

Referenced by UpdateHeading().

#define AeroBay ( a,
 )     (a)->pd.bay[b]

Definition at line 74 of file btmacros.h.

Referenced by DS_Bay_Is_EnterOK(), DS_Bay_Is_Open(), DS_Place(), mech_createbays(), mech_enterbay(), and mech_enterbay_event().

#define AeroFreeFuel (  )     ((MechType(a) == CLASS_VTOL) && mudconf.btech_nofusionvtolfuel && (!(MechSpecials(a) & ICE_TECH)))

Definition at line 82 of file btmacros.h.

Referenced by aero_land(), aero_takeoff(), FuelCheck(), mech_fall_event(), mech_speed(), mech_vertical(), and PrintInfoStatus().

#define AeroFuel (  )     (a)->ud.fuel

Definition at line 75 of file btmacros.h.

Referenced by aero_land(), aero_takeoff(), aero_UpdateSpeed(), FuelCheck(), load_template(), mech_enter_event(), mech_enterbase(), mech_enterbay(), mech_enterbay_event(), mech_fall_event(), mech_speed(), mech_vertical(), PrintInfoStatus(), and SetCargoWeight().

#define AeroFuelMax (  )     (a)->rd.maxfuel

Definition at line 76 of file btmacros.h.

Referenced by SetCargoWeight().

#define AeroFuelOrig (  )     (a)->ud.fuel_orig

Definition at line 77 of file btmacros.h.

Referenced by FuelCheck(), load_template(), PrintInfoStatus(), save_template(), and SetCargoWeight().

#define AeroSI (  )     (a)->ud.si

Definition at line 78 of file btmacros.h.

Referenced by ArmorEvaluateSerious(), DamageMech(), and load_template().

#define AeroSIOrig (  )     (a)->ud.si_orig

Definition at line 79 of file btmacros.h.

Referenced by ArmorEvaluateSerious(), load_template(), and save_template().

#define AeroTurret ( a,
 )     (a)->pd.turret[b]

Definition at line 80 of file btmacros.h.

Referenced by mech_notify(), and mech_printf().

#define AeroUnusableArcs (  )     (a)->pd.unusable_arcs

Definition at line 81 of file btmacros.h.

#define AllLimbsRecycling ( mech   ) 

Value:

(MechSections(mech)[RARM].recycle && \
    MechSections(mech)[LARM].recycle && \
    MechSections(mech)[RLEG].recycle && \
    MechSections(mech)[LLEG].recycle)

Definition at line 424 of file btmacros.h.

#define AmmoMod ( mech,
loc,
pos   ) 

Value:

((!IsAmmo(GetPartType(mech,loc,pos)) || \
    GetPartFireMode(mech,loc,pos) & HALFTON_MODE || \
                GetPartAmmoMode(mech,loc,pos) & AC_AP_MODE || \
                GetPartAmmoMode(mech,loc,pos) & AC_PRECISION_MODE) ? 1 : ( GetPartAmmoMode(mech,loc,pos) & AC_CASELESS_MODE ? .5 : 2 ) )

Definition at line 670 of file btmacros.h.

Referenced by ammo_expedinture_check(), mech_weight_sub_mech(), and mech_weight_sub_veh().

#define AngelECCMActive ( mech   )     AngelECCMEnabled(mech)

Definition at line 768 of file btmacros.h.

#define AngelECCMEnabled ( mech   )     (MechStatus2(mech) & ANGEL_ECCM_ENABLED)

Definition at line 771 of file btmacros.h.

Referenced by checkECM(), PrintWeaponStatus(), and update_LOSinfo().

#define AngelECMActive ( mech   )     (AngelECMEnabled(mech) && !ECMCountered(mech))

Definition at line 767 of file btmacros.h.

Referenced by PrintWeaponStatus().

#define AngelECMDisturbed ( mech   )     (MechStatus2(mech) & ANGEL_ECM_DISTURBED)

Definition at line 780 of file btmacros.h.

Referenced by hit_building(), Mech_ShowFlags(), and MissileHitIndex().

#define AngelECMEnabled ( mech   )     (MechStatus2(mech) & ANGEL_ECM_ENABLED)

Definition at line 770 of file btmacros.h.

Referenced by checkECM(), PrintWeaponStatus(), and update_LOSinfo().

#define AngelECMProtected ( mech   )     ((MechStatus2(mech) & ANGEL_ECM_PROTECTED) || AngelECMActive(mech))

Definition at line 779 of file btmacros.h.

Referenced by checkECM(), Mech_ShowFlags(), and MissileHitIndex().

#define AnyECCMActive ( mech   )     (ECCMActive(mech) || AngelECCMActive(mech))

Definition at line 743 of file btmacros.h.

Referenced by getStatusChar(), and getStatusString().

#define AnyECMActive ( mech   )     (ECMActive(mech) || AngelECMActive(mech))

Definition at line 742 of file btmacros.h.

Referenced by getStatusChar(), and getStatusString().

#define AnyECMDisturbed ( mech   )     (ECMDisturbed(mech) || AngelECMDisturbed(mech))

Definition at line 740 of file btmacros.h.

Referenced by checkECM(), findC3Range(), FindNormalBTH(), getOtherMechInNetwork(), getStatusChar(), getStatusString(), mech_c3_join_leave(), mech_c3_message(), mech_c3_network(), mech_c3_targets(), mech_c3i_join_leave(), mech_c3i_message(), mech_c3i_network(), mech_c3i_targets(), MissileHitIndex(), PrintWeaponStatus(), and sendchannelstuff().

#define AnyECMProtected ( mech   )     (ECMProtected(mech) || AngelECMProtected(mech))

Definition at line 741 of file btmacros.h.

Referenced by getStatusChar(), and getStatusString().

#define AnyLimbsRecycling ( mech   ) 

Value:

(MechSections(mech)[RARM].recycle || \
    MechSections(mech)[LARM].recycle || \
    MechSections(mech)[RLEG].recycle || \
    MechSections(mech)[LLEG].recycle)

Definition at line 430 of file btmacros.h.

#define AUTOEVENT ( auto,
type,
func,
time,
data   )     muxevent_add(time, 0, type, func, (void *) (auto), (void *) (data))

Definition at line 276 of file btmacros.h.

Referenced by auto_astar_follow_event(), auto_astar_goto_event(), auto_astar_roam_event(), auto_com_event(), auto_command_chasetarget(), auto_command_roam(), auto_dumbfollow_event(), auto_dumbgoto_event(), auto_engage(), auto_enter_event(), auto_goto_event(), and auto_leave_event().

#define BaseElev ( terr,
elev   )     ((terr) == WATER ? -(elev) : (terr) == ICE ? -(elev) : (elev))

Definition at line 45 of file btmacros.h.

#define BreakPart ( a,
b,
c   )     (GetPartFireMode(a,b,c) |= BROKEN_MODE)

Definition at line 322 of file btmacros.h.

Referenced by DestroyWeapon().

#define Burning (  )     muxevent_count_type_data(EVENT_VEHICLEBURN, (void *) a)

Definition at line 381 of file btmacros.h.

Referenced by getStatusChar(), getStatusString(), Inferno_Hit(), mech_attachcables(), mech_pickup(), Mech_ShowFlags(), vehicle_burn_event(), vehicle_extinquish_fire(), and vehicle_extinquish_fire_event().

#define BurningSide ( a,
side   )     muxevent_count_type_data_data(EVENT_VEHICLEBURN, (void *) a, (void *) side)

Definition at line 382 of file btmacros.h.

Referenced by vehicle_start_burn().

#define C3Destroyed ( mech   )     (MechCritStatus(mech) & C3_DESTROYED)

Definition at line 809 of file btmacros.h.

Referenced by findC3Range(), FindNormalBTH(), getOtherMechInNetwork(), mech_c3_join_leave(), mech_c3_message(), mech_c3_network(), mech_c3_targets(), PrintWeaponStatus(), and validateC3Network().

#define C3iDestroyed ( mech   )     (MechCritStatus(mech) & C3I_DESTROYED)

Definition at line 819 of file btmacros.h.

Referenced by findC3Range(), FindNormalBTH(), getOtherMechInNetwork(), mech_c3i_join_leave(), mech_c3i_message(), mech_c3i_network(), mech_c3i_targets(), PrintWeaponStatus(), and validateC3iNetwork().

#define C_OODing (  )     (MechCocoon(a) > 0)

Definition at line 460 of file btmacros.h.

Referenced by DamageMech(), and FindNormalBTH().

#define CanJump (  )     (!(Stabilizing(a)) && !(Jumping(a)))

Definition at line 369 of file btmacros.h.

#define CargoSpace (  )     (a)->ud.cargospace

Definition at line 246 of file btmacros.h.

Referenced by load_template(), mech_embark(), mech_udisembark(), mech_weight_sub_mech(), mech_weight_sub_veh(), mechrep_setcargospace(), PrintWeaponStatus(), save_template(), and techlist_func().

#define CarMaxTon (  )     (a)->ud.carmaxton

Definition at line 247 of file btmacros.h.

Referenced by load_template(), mech_embark(), mechrep_setcargospace(), PrintWeaponStatus(), and save_template().

#define CarryingClub ( mech   )     ( (MechSections(mech)[RARM].specials & CARRYING_CLUB) || (MechSections(mech)[LARM].specials & CARRYING_CLUB))

Definition at line 832 of file btmacros.h.

Referenced by getStatusChar(), getStatusString(), mech_grabclub(), and mech_pickup().

#define ChangingHulldown (  )     muxevent_count_type_data(EVENT_CHANGING_HULLDOWN,(void *) a)

Definition at line 398 of file btmacros.h.

Referenced by getStatusChar(), getStatusString(), mech_heading(), mech_hulldown(), mech_hulldown_event(), mech_jump(), mech_speed(), and mech_stand().

#define ChangingLateral (  )     muxevent_count_type_data(EVENT_LATERAL,(void *) a)

Definition at line 391 of file btmacros.h.

Referenced by mech_lateral().

#define CheckingStaggerDamage ( mech   )     muxevent_count_type_data(EVENT_CHECK_STAGGER,(void *) mech)

Definition at line 837 of file btmacros.h.

Referenced by CheckDamage().

#define ClanMech (  )     (MechSpecials(a) & CLAN_TECH)

Definition at line 251 of file btmacros.h.

#define ClearTempNuke ( mech,
a,
 )     GetPartRBrand(mech,a,b) = GetPartBrand(mech,a,b)

Definition at line 312 of file btmacros.h.

Referenced by muxevent_tickmech_repairgun(), and muxevent_tickmech_replacegun().

#define ContinueFlying ( mech   ) 

Value:

if (FlyingT(mech)) { \
  MechStatus(mech) &= ~LANDED; \
  MechZ(mech) += 1; \
  MechFZ(mech) = ZSCALE * MechZ(mech); \
  StopMoving(mech); }

Definition at line 645 of file btmacros.h.

Referenced by aero_takeoff_event(), Leave_DS_Bay(), and Leave_Hangar().

#define CrewStunned (  )     muxevent_count_type_data(EVENT_UNSTUN_CREW, (void *) a)

Definition at line 374 of file btmacros.h.

Referenced by ChargeMech(), FireWeapon(), mech_sendchannel(), mech_speed(), remove_inarc_pods_tank(), and unstun_crew_event().

#define CrewStunning (  )     muxevent_count_type_data(EVENT_CREWSTUN, (void *) a)

Definition at line 378 of file btmacros.h.

Referenced by ModifyHeadHit().

#define DamagePart ( a,
b,
c   )     (GetPartFireMode(a,b,c) |= DAMAGED_MODE)

Definition at line 316 of file btmacros.h.

Referenced by scoreEnhancedWeaponCriticalHit().

#define Destroy (  ) 

Value:

do { \
        if (Uncon(a)) { \
            MechStatus(a) &= ~(BLINDED|UNCONSCIOUS); \
            mech_notify(a, MECHALL, "The mech was destroyed while pilot was unconscious!"); \
        } \
        Shutdown(a); \
        MechStatus(a) |= DESTROYED; \
        MechCritStatus(a) &= ~MECH_STUNNED; \
        StopBSuitSwarmers(FindObjectsData(a->mapindex),a,1); \
        muxevent_remove_data((void *) a); \
        if ((MechType(a) == CLASS_MECH && Jumping(a)) || \
                (MechType(a) != CLASS_MECH && MechZ(a) > MechUpperElevation(a))) \
            MECHEVENT(a, EVENT_FALL, mech_fall_event, FALL_TICK, -1); \
    } while (0)

Definition at line 515 of file btmacros.h.

Referenced by DestroyMech(), drop_thru_ice(), HandleMechCrit(), handlemwconc(), heat_effect(), NewHexEntered(), and swim_except().

#define DestroyAndDump (  ) 

Value:

do { Destroy(a); MechVerticalSpeed(a) = 0.0; \
    if (MechRTerrain(a) == WATER || MechRTerrain(a) == ICE) \
      MechZ(a) = -MechElev(a); \
    else \
       if (MechRTerrain(a) == BRIDGE) { \
           if (MechZ(a) >= MechUpperElevation(a)) \
               MechZ(a) = MechUpperElevation(a); \
           else \
               MechZ(a) = MechLowerElevation(a); \
      } else \
          MechZ(a) = MechElev(a); \
      MechFZ(a) = ZSCALE * MechZ(a); } while (0)

Definition at line 531 of file btmacros.h.

Referenced by DestroyMech().

#define Destroyed (  )     (MechStatus(a) & DESTROYED)

Definition at line 466 of file btmacros.h.

Referenced by AccumulateArtyXP(), AccumulateGunXP(), AccumulateGunXPold(), AccumulateSpotXP(), aero_ControlEffect(), aero_update(), auto_astar_follow_event(), auto_astar_goto_event(), auto_astar_roam_event(), auto_calc_target_score(), auto_dumbfollow_event(), auto_dumbgoto_event(), auto_enter_event(), auto_gun_event(), auto_leave_event(), auto_parse_command(), auto_sensor_event(), auto_update_profile_event(), CanChangeTo(), cause_armordamage(), cause_internaldamage(), char_eject(), common_checks(), DamageMech(), DestroyMech(), DestroySection(), do_magic(), drop_thru_ice(), ds_BridgeHit(), fiery_death(), FindBSuitTarget(), findCommLink(), getEnemies(), getFriends(), getMechInTempNetwork(), getOtherMechInNetwork(), getStatusChar(), getStatusString(), HandleMechCrit(), HandleVTOLCrit(), headhitmwdamage(), mech_attachcables(), mech_c3_join_leave(), mech_c3i_join_leave(), mech_contacts(), mech_crewstun_event(), mech_embark(), mech_explode_event(), mech_hide_event(), mech_notify(), mech_pickup(), mech_printf(), mech_recovery_event(), mech_rrec_event(), mech_scharge_event(), mech_sendchannel(), mech_srec_event(), mech_startup(), mech_udisembark(), mech_unjam_turret_event(), MechCargoMaxSpeed(), mechs_in_hex(), muxevent_tickmech_reattach(), muxevent_tickmech_reload(), muxevent_tickmech_removegun(), muxevent_tickmech_removepart(), muxevent_tickmech_removesection(), muxevent_tickmech_repairarmor(), muxevent_tickmech_repairgun(), muxevent_tickmech_repairinternal(), muxevent_tickmech_repairpart(), muxevent_tickmech_replacegun(), mwlethaldam(), ProlongUncon(), recycle_weaponry(), removeiNarcPodsTank(), sendchannelstuff(), sixth_sense_check(), swim_except(), update_oweight(), validateC3iNetwork(), and validateC3Network().

#define DestroyNullSigSys ( mech   )     (MechCritStatus(mech) |= NSS_DESTROYED)

Definition at line 797 of file btmacros.h.

Referenced by HandleMechCrit().

#define DestroyPart ( a,
b,
c   )     do { (GetPartFireMode(a,b,c) |= DESTROYED_MODE); GetPartFireMode(a,b,c) &= ~(BROKEN_MODE|DISABLED_MODE|DAMAGED_MODE); SetPartDamageFlags(a,b,c,0); SetPartTempNuke(a,b,c,0); } while (0)

Definition at line 325 of file btmacros.h.

Referenced by ammo_explosion(), apply_mechDamage(), char_eject(), DestroyParts(), DestroyWeapon(), HandleMechCrit(), mech_masc_event(), mech_scharge_event(), muxevent_tickmech_removegun(), muxevent_tickmech_removepart(), and TFUNC_LOCPOS().

#define Digging (  )     (MechTankCritStatus(a) & DIGGING_IN)

Definition at line 396 of file btmacros.h.

Referenced by initiate_ood(), mech_dig(), mech_dig_event(), mech_heading(), Mech_ShowFlags(), and mech_speed().

#define DisableAngelECCM ( mech   )     (MechStatus2(mech) &= ~ANGEL_ECCM_ENABLED)

Definition at line 777 of file btmacros.h.

Referenced by HandleMechCrit().

#define DisableAngelECM ( mech   )     (MechStatus2(mech) &= ~ANGEL_ECM_ENABLED)

Definition at line 776 of file btmacros.h.

Referenced by HandleMechCrit().

#define DisableECCM ( mech   )     (MechStatus2(mech) &= ~ECCM_ENABLED)

Definition at line 726 of file btmacros.h.

Referenced by HandleMechCrit().

#define DisableECM ( mech   )     (MechStatus2(mech) &= ~ECM_ENABLED)

Definition at line 725 of file btmacros.h.

Referenced by HandleMechCrit().

#define DisableNullSigSys ( mech   )     (MechStatus2(mech) &= ~NULLSIGSYS_ON)

Definition at line 801 of file btmacros.h.

Referenced by changeNullSigSysEvent(), and HandleMechCrit().

#define DisablePart ( a,
b,
c   )     (GetPartFireMode(a,b,c) |= DISABLED_MODE)

Definition at line 319 of file btmacros.h.

Referenced by DestroyParts().

#define DisablePerECCM ( mech   )     (MechStatus2(mech) &= ~PER_ECCM_ENABLED)

Definition at line 738 of file btmacros.h.

#define DisablePerECM ( mech   )     (MechStatus2(mech) &= ~PER_ECM_ENABLED)

Definition at line 737 of file btmacros.h.

#define DisableStealthArmor ( mech   )     (MechStatus2(mech) &= ~STH_ARMOR_ON)

Definition at line 794 of file btmacros.h.

Referenced by changeStealthArmorEvent(), and HandleMechCrit().

#define DivideMaxSpeed ( a,
 )     SetMaxSpeed(a,MechMaxSpeed(a)/b)

Definition at line 157 of file btmacros.h.

Referenced by NormalizeLegActuatorCrits().

#define Dodging (  )     (MechStatus2(a) & DODGING)

Definition at line 861 of file btmacros.h.

Referenced by ChargeMech(), DeathFromAbove(), phys_common_checks(), and PhysicalAttack().

#define DropClub ( mech   )     do { if(CarryingClub(mech)) { MechSections(mech)[RARM].specials &= ~CARRYING_CLUB; MechSections(mech)[LARM].specials &= ~CARRYING_CLUB; mech_notify(mech, MECHALL, "Your club falls to the ground and shatters."); MechLOSBroadcast(mech, "'s club falls to the ground and shatters."); } } while (0)

Definition at line 833 of file btmacros.h.

Referenced by HandleMechCrit(), and mech_grabclub().

#define DSBearMod ( ds   )     ((MechFacing(ds) +30) / 60) % 6

Definition at line 712 of file btmacros.h.

Referenced by Find_DS_Bay_In_MechHex(), and sketch_tac_mechs().

#define DSLastMsg (  )     (a)->rd.last_ds_msg

Definition at line 83 of file btmacros.h.

Referenced by DSOkToNotify().

#define DSSpam ( mek,
msg   )     do { if (DropShip(MechType(mek)) && DSOkToNotify(mek)) MechLOSBroadcast(mek,msg); } while (0)

Definition at line 258 of file btmacros.h.

Referenced by aero_takeoff().

#define DSSpam_O ( mek,
msg   )     do { if (DropShip(MechType(mek))) MechLOSBroadcast(mek,msg); } while (0)

Definition at line 259 of file btmacros.h.

Referenced by aero_takeoff_event().

#define Dumping (  )     muxevent_count_type_data(EVENT_DUMP, (void *) a)

Definition at line 388 of file btmacros.h.

Referenced by DamageMech(), mech_dump(), mech_jump(), and mech_speed().

#define Dumping_Type ( a,
type   )     (muxevent_count_type_data_data(EVENT_DUMP, (void *) a, (void *) type) || muxevent_count_type_data_data(EVENT_DUMP, (void *) a, (void *) 0))

Definition at line 389 of file btmacros.h.

Referenced by mech_dump().

#define DumpingData ( a,
data2   )     muxevent_get_type_data(EVENT_DUMP, (void *) a, (void *) data2)

Definition at line 390 of file btmacros.h.

Referenced by BlowDumpingAmmo().

#define ECCMActive ( mech   )     ECCMEnabled(mech)

Definition at line 717 of file btmacros.h.

#define ECCMEnabled ( mech   )     (MechStatus2(mech) & ECCM_ENABLED)

Definition at line 720 of file btmacros.h.

Referenced by checkECM(), PrintWeaponStatus(), and update_LOSinfo().

#define ECMActive ( mech   )     (ECMEnabled(mech) && !ECMCountered(mech))

Definition at line 716 of file btmacros.h.

Referenced by PrintWeaponStatus().

#define ECMCountered ( mech   )     (MechStatus2(mech) & ECM_COUNTERED)

Definition at line 748 of file btmacros.h.

Referenced by checkECM(), Mech_ShowFlags(), and PrintWeaponStatus().

#define ECMDisturbed ( mech   )     (MechStatus2(mech) & ECM_DISTURBANCE)

Definition at line 745 of file btmacros.h.

Referenced by Mech_ShowFlags(), and sendchannelstuff().

#define ECMEnabled ( mech   )     (MechStatus2(mech) & ECM_ENABLED)

Definition at line 719 of file btmacros.h.

Referenced by checkECM(), PrintWeaponStatus(), and update_LOSinfo().

#define ECMProtected ( mech   )     ((MechStatus2(mech) & ECM_PROTECTED) || ECMActive(mech) || PerECMActive(mech))

Definition at line 746 of file btmacros.h.

Referenced by checkECM(), Mech_ShowFlags(), and MissileHitIndex().

#define Elevation ( mech_map,
x,
y   )     BaseElev(GetRTerrain(mech_map,x,y),GetElevation(mech_map,x,y))

Definition at line 46 of file btmacros.h.

Referenced by ActualElevation(), ai_crash(), auto_astar_generate_path(), blast_hit_hexf(), CalculateLOSFlag(), calcWeatherPilotEffects(), char_disembark(), collision_check(), determineDamageFromHit(), findC3RangeWithNetwork(), FindNormalBTH(), FireWeaponNumber(), fun_btgetrange(), fun_btmapelev(), HoverTankTileCost(), ImproperLZ(), ImproperLZ_callback(), mech_detachcables(), mech_dropoff(), mech_jump(), mech_range(), mech_report(), mech_scan(), mech_settarget(), mech_udisembark(), mech_vector(), MechSeesHexF(), MechTileCost(), meltSnowAndIce(), Missile_Hit(), NewHexEntered(), possible_mine_poof(), simulate_flight(), sketch_tac_cliffs(), steppable_base_check(), swim_except(), trace_maphexlos(), trace_slitelos(), and TrackedTankTileCost().

#define EnableAngelECCM ( mech   )     (MechStatus2(mech) |= ANGEL_ECCM_ENABLED)

Definition at line 774 of file btmacros.h.

#define EnableAngelECM ( mech   )     (MechStatus2(mech) |= ANGEL_ECM_ENABLED)

Definition at line 773 of file btmacros.h.

#define EnableECCM ( mech   )     (MechStatus2(mech) |= ECCM_ENABLED)

Definition at line 723 of file btmacros.h.

#define EnableECM ( mech   )     (MechStatus2(mech) |= ECM_ENABLED)

Definition at line 722 of file btmacros.h.

#define EnableNullSigSys ( mech   )     (MechStatus2(mech) |= NULLSIGSYS_ON)

Definition at line 800 of file btmacros.h.

Referenced by changeNullSigSysEvent().

#define EnablePerECCM ( mech   )     (MechStatus2(mech) |= PER_ECCM_ENABLED)

Definition at line 735 of file btmacros.h.

#define EnablePerECM ( mech   )     (MechStatus2(mech) |= PER_ECM_ENABLED)

Definition at line 734 of file btmacros.h.

#define EnableStealthArmor ( mech   )     (MechStatus2(mech) |= STH_ARMOR_ON)

Definition at line 793 of file btmacros.h.

Referenced by changeStealthArmorEvent().

#define EnteringHangar (  )     muxevent_count_type_data(EVENT_ENTER_HANGAR, (void *) a)

Definition at line 458 of file btmacros.h.

Referenced by auto_enter_event(), mech_enterbase(), and mech_enterbay().

#define Evading (  )     (MechStatus2(a) & EVADING)

Definition at line 860 of file btmacros.h.

Referenced by getStatusChar(), getStatusString(), initiate_ood(), UpdateHeat(), and UpdateSpeed().

#define EvalBit ( val,
bit,
state   )     do {if (state) SetBit(val,bit); else UnSetBit(val,bit);} while (0)

Definition at line 638 of file btmacros.h.

Referenced by do_magic(), mech_startup_event(), and mech_udisembark().

#define Exploding (  )     muxevent_count_type_data(EVENT_EXPLODE, (void *) a)

Definition at line 387 of file btmacros.h.

Referenced by mech_explode().

#define Extinguishing (  )     muxevent_count_type_data(EVENT_VEHICLE_EXTINGUISH, (void *) a)

Definition at line 385 of file btmacros.h.

Referenced by Mech_ShowFlags(), mech_startup(), and vehicle_extinquish_fire().

#define FallCentersTorso (  )     MechStatus(a) &= ~(TORSO_RIGHT|TORSO_LEFT|FLIPPED_ARMS)

Definition at line 476 of file btmacros.h.

Referenced by mech_attachcables(), and mech_pickup().

#define Fallen (  )     (MechStatus(a) & FALLEN)

Definition at line 467 of file btmacros.h.

Referenced by ActualElevation(), aero_land(), aero_move_event(), aero_takeoff(), aero_thrust(), AttackMovementMods(), auto_astar_follow_event(), auto_astar_goto_event(), auto_astar_roam_event(), auto_dumbfollow_event(), auto_dumbgoto_event(), auto_enter_event(), auto_leave_event(), auto_radio_command_report(), bsuit_attackleg(), bsuit_swarm(), CalculateLOSFlag(), cause_damage(), ChargeMech(), check_stagger_event(), CheckDamage(), DamageMech(), DeathFromAbove(), DestroyParts(), do_magic(), DoMotiveSystemHit(), DoVehicleEngineHit(), DoVTOLRotorDamagedCrit(), FindFasaHitLocation(), FindNormalBTH(), firetic_sub_func(), FireWeaponNumber(), getStatusChar(), getStatusString(), HandleMechCrit(), HandleOverheat(), HandleVehicleCrit(), initiate_ood(), LandMech(), MadePilotSkillRoll_Advanced(), MadePilotSkillRoll_NoXP(), mech_contacts(), mech_drop(), mech_embark(), mech_enter_event(), mech_enterbase(), mech_enterbay(), mech_enterbay_event(), mech_fliparms(), mech_grabclub(), mech_hulldown(), mech_jump(), mech_ood_event(), mech_pickup(), mech_rotatetorso(), Mech_ShowFlags(), mech_speed(), mech_stand(), mech_thrash(), mech_vertical(), MechFloodsLoc(), MechHeight(), PhysicalAttack(), PhysicalDamage(), PhysicalTrip(), PrintGenericStatus(), StartVTOLCrash(), TargetMovementMods(), UpdateHeat(), UpdatePilotSkillRolls(), UpdateSpeed(), and water_extinguish_inferno().

#define Falling (  )     muxevent_count_type_data(EVENT_FALL,(void *) a)

Definition at line 400 of file btmacros.h.

Referenced by mech_attachcables(), and mech_pickup().

#define FaMechRange ( mech,
target   ) 

Value:

FindRange(MechFX(mech), MechFY(mech), MechFZ(mech), \
              MechFX(target), MechFY(target), MechFZ(target))

Definition at line 708 of file btmacros.h.

Referenced by auto_radio_command_report(), auto_sensor_event(), checkECM(), determineDamageFromHit(), DisplayTarget(), FindBSuitTarget(), findC3RangeWithNetwork(), FireSpot(), FireWeapon(), FireWeaponNumber(), fun_btgetrange(), mech_attachcables(), mech_bearing(), mech_charge(), mech_detachcables(), mech_embark(), mech_hide_event(), mech_jump(), mech_lites_target(), mech_pickup(), mech_range(), mech_report(), mech_scan(), mech_thrash(), mech_vector(), mechSeenByNetwork(), move_mech(), PhysicalAttack(), ScrambleInfraAndLiteAmp(), SearchLightInRange(), sendchannelstuff(), sixth_sense_check(), SwarmHitTarget(), and update_LOSinfo().

#define FindWeapons ( m,
i,
wa,
wda,
cr   )     FindWeapons_Advanced(m,i,wa,wda,cr,1)

Definition at line 643 of file btmacros.h.

Referenced by DestroyMainWeapon(), FindMainWeapon(), FindWeaponFromIndex(), FindWeaponIndex(), FindWeaponNumberOnMech_Advanced(), JamMainWeapon(), mech_weaponspecs(), mech_weaponstatus(), payloadlist_func(), PrintEnemyWeaponStatus(), PrintWeaponStatus(), recycle_weaponry(), SectHasBusyWeap(), and weaponstatus_func().

#define FlMechRange ( map,
m1,
m2   )     FaMechRange(m1,m2)

Definition at line 630 of file btmacros.h.

Referenced by checkTAG(), find_mech_in_hex(), findCommLink(), fun_btid2db(), fun_btlosm2m(), getEnemies(), getFriends(), mech_check_range(), mech_contacts(), mech_lock_event(), mech_plos_event(), mech_radio(), mech_settarget(), mech_spot(), mech_tag(), mech_view(), MechFireBroadcast(), MechLOSBroadcast(), MechLOSBroadcasti(), parse_tacargs(), show_lrs_map(), showNetworkData(), showNetworkTargets(), and sketch_tac_mechs().

#define FlyingT (  )     (is_aero(a) || MechMove(a) == MOVE_VTOL)

Definition at line 410 of file btmacros.h.

Referenced by aero_takeoff(), auto_sensor_event(), FindNormalBTH(), FireWeapon(), initiate_ood(), Leave_DS(), load_update1(), mech_eject(), mech_enterbase(), mech_fall_event(), mech_Rsetxy(), mech_speed(), mech_startup_event(), mech_udisembark(), PrintGenericStatus(), PrintInfoStatus(), PrintReport(), and SetCargoWeight().

#define GetElev ( mapn,
x,
y   )     GetElevation(mapn,x,y)

Definition at line 548 of file btmacros.h.

Referenced by LandMech(), LRSElevation(), LRSTerrain(), mech_Rsetmapindex(), mech_Rsetxy(), move_mech(), possibly_blow_bridge(), and sketch_tac_map().

#define GetElevation ( mapn,
x,
y   )     Coding_GetElevation(mapn->map[y][x])

Definition at line 547 of file btmacros.h.

Referenced by map_savemap(), and map_setmapsize().

#define GetPartAmmoMode ( a,
b,
c   )     MechSections(a)[b].criticals[c].ammomode

Definition at line 292 of file btmacros.h.

Referenced by ammo_explosion(), CriticalStatus(), critslot_func(), dump_item(), findAmmoInSection(), FindAmmoType(), FindAmmunition(), FindAndCheckAmmo(), FindInfernoAmmo(), FindNormalBTH(), FireWeapon(), FullAmmo(), GetWeaponAmmoModeLetter(), HandleMechCrit(), handleWeaponCrit(), HitTarget(), load_template(), mech_inarc_ammo_toggle(), mech_toggle_mode_sub_func(), MissileHitIndex(), MissileHitTarget(), and TECHCOMMANDH().

#define GetPartBrand ( mech,
a,
 )     (GetPartRBrand(mech,a,b)%16)

Definition at line 305 of file btmacros.h.

Referenced by CheckWeaponFailed(), critslot_func(), critstatus_func(), do_magic(), dump_item(), load_template(), muxevent_tickmech_reload(), muxevent_tickmech_removegun(), muxevent_tickmech_removepart(), pos_part_name(), tech_parsegun(), TECHCOMMANDH(), TFUNC_LOCPOS(), TFUNC_LOCPOS_VAL(), and weaponstatus_func().

#define GetPartDamageFlags ( a,
b,
c   )     MechSections(a)[b].criticals[c].weapDamageFlags

Definition at line 295 of file btmacros.h.

Referenced by canWeapExplodeFromDamage(), canWeapJamFromDamage(), check_for_damage(), getCritAddedBTH(), getCritAddedHeat(), getCritSubDamage(), isWeapAmmoFeedLocked(), scoreEnhancedWeaponCriticalHit(), and showWeaponDamageAndInfo().

#define GetPartData ( a,
b,
c   )     MechSections(a)[b].criticals[c].data

Definition at line 301 of file btmacros.h.

Referenced by ammo_expedinture_check(), ammo_weight(), AMSMissiles(), apply_mechDamage(), BlowDumpingAmmo(), check_for_damage(), check_for_scrappage(), CountAmmoForWeapon(), CriticalStatus(), critslot_func(), damages_func(), decrement_ammunition(), DestroyParts(), do_magic(), DoAmmunitionCrit(), Dump_Decrease(), dump_item(), findAmmoInSection(), FindAmmunition(), FindAndCheckAmmo(), FindArtemisForWeapon(), FindDestructiveAmmo(), FindInfernoAmmo(), FindRoundsForWeapon(), FindWeapons_Advanced(), HandleMechCrit(), load_template(), LocateAMSDefenses(), mech_dump(), mech_dump_event(), mechDamagefunc(), recycle_weaponry(), show_mechs_damage(), and TECHCOMMANDH().

#define GetPartDesiredAmmoLoc ( a,
b,
c   )     MechSections(a)[b].criticals[c].desiredAmmoLoc

Definition at line 298 of file btmacros.h.

Referenced by FindAmmoForWeapon_sub(), mech_usebin(), and showWeaponDamageAndInfo().

#define GetPartFireMode ( a,
b,
c   )     MechSections(a)[b].criticals[c].firemode

Definition at line 289 of file btmacros.h.

Referenced by CriticalStatus(), critslot_func(), decrement_ammunition(), do_magic(), doJettisonChecks(), dump_item(), FindAndCheckAmmo(), FindNormalBTH(), FireWeapon(), FireWeaponNumber(), FullAmmo(), GetWeaponFireModeLetter(), handleWeaponCrit(), HitTarget(), IsInWeaponArc(), JettisonPacks(), load_template(), mech_rac(), mech_RepairPart(), mech_toggle_mode_sub_func(), MissileHitIndex(), MissileHitTarget(), PrintWeaponStatus(), recycle_weaponry(), and update_specials().

#define GetPartRBrand ( mech,
a,
 )     MechSections(mech)[a].criticals[b].brand

Definition at line 304 of file btmacros.h.

#define GetPartType ( a,
b,
c   )     MechSections(a)[b].criticals[c].type

Definition at line 286 of file btmacros.h.

Referenced by ammo_expedinture_check(), ammo_weight(), apply_mechDamage(), BlowDumpingAmmo(), bomb_drop(), bomb_list(), check_for_damage(), check_for_scrappage(), CheckWeaponFailed(), CountAmmoForWeapon(), countTotalC3MastersOnMech(), countWorkingC3MastersOnMech(), CriticalStatus(), critslot_func(), critstatus_func(), decrement_ammunition(), DestroyParts(), DestroyWeapon(), do_magic(), do_sub_magic(), DoAmmunitionCrit(), DoWeaponDestroyedCrit(), DoWeaponJamCrit(), DS_Bay_Is_Open(), Dump_Decrease(), dump_item(), Find_DS_Bay_Number(), FindAmmoForWeapon_sub(), findAmmoInSection(), FindAmmoType(), FindAmmunition(), findArmBTHMod(), FindArtemisForWeapon(), FindDestructiveAmmo(), FindFirstWeaponCrit(), FindInfernoAmmo(), FindLegHeatSinks(), FindObj(), FindObjWithDest(), FindRoundsForWeapon(), FindWeapons_Advanced(), FullAmmo(), fun_btticweaps(), getWeapData(), GetWeaponAmmoModeLetter(), GetWeaponFireModeLetter(), HandleMechCrit(), InvalidVehicleItem(), isPartOfWorkingC3Master(), listtic_fun(), load_mechdata(), load_template(), LocateAMSDefenses(), mech_disableweap_func(), mech_dump(), mech_dump_event(), mech_FillPartAmmo(), mech_RepairPart(), mech_scharge_event(), mech_toggle_mode_sub_func(), mech_weight_sub_mech(), mech_weight_sub_veh(), mechDamagefunc(), muxevent_tickmech_removegun(), muxevent_tickmech_repairenhcrit(), muxevent_tickmech_repairgun(), muxevent_tickmech_replacegun(), NormalizeLocActuatorCrits(), payloadlist_func(), PhysicalAttack(), pickRandomWeapon(), pos_part_name(), scoreEnhancedWeaponCriticalHit(), SetCargoWeight(), tech_parsegun(), TECHCOMMANDH(), techlist_func(), TFUNC_LOCPOS(), update_specials(), valid_ammo_mode(), WeaponIsNonfunctional(), and weaponstatus_func().

#define GetRTerrain ( map,
x,
y   )     ((GetTerrain(map,x,y)==FIRE || GetTerrain(map,x,y)==SMOKE) ? map_underlying_terrain(map,x,y) : GetTerrain(map,x,y))

Definition at line 546 of file btmacros.h.

Referenced by add_decoration(), ai_crash(), blast_hit_hexesf(), break_sub(), bsuit_hide(), CalculateLOSFlag(), determineDamageFromHit(), DS_BlastNearbyMechsAndTrees(), FindNormalBTH(), growable_callback(), HoverTankTileCost(), ice_growth(), ice_melt(), ImproperLZ(), map_savemap(), mech_jump(), mech_thrash(), MechTileCost(), meltable_callback(), Missile_Hit(), possibly_blow_bridge(), possibly_blow_ice(), trace_maphexlos(), and TrackedTankTileCost().

#define GetSectArmor ( a,
 )     ((a)->ud.sections[b].armor)

Definition at line 353 of file btmacros.h.

Referenced by ai_path_score(), apply_mechDamage(), armor_effect(), ArmorEvaluateSerious(), armorstatus_func(), auto_calc_target_score(), cause_armordamage(), check_for_damage(), crittable(), DamageMech(), getRemainingArmorPercent(), mechDamagefunc(), MechFloodsLoc(), mechrep_Rsavetemp(), muxevent_tickmech_removesection(), muxevent_tickmech_repairarmor(), MySeriousnessCheck(), and TECHCOMMANDH().

#define GetSectInt ( a,
 )     ((a)->ud.sections[b].internal)

Definition at line 355 of file btmacros.h.

Referenced by apply_mechDamage(), ArmorEvaluateSerious(), armorstatus_func(), auto_calc_target_score(), bsuit_attackleg(), calc_ints(), cause_internaldamage(), check_for_damage(), checkVehicleInFire(), completely_intact_int(), CountBSuitMembers(), DamageMech(), DestroySection(), FindAdvFasaVehicleHitLocation(), FindFasaHitLocation(), FindHitLocation(), FindHitLocation_CritProof(), findNARCHitLoc(), get_bsuit_hitloc(), getRemainingInternalPercent(), mech_auto_turret(), mech_embark(), mech_turret(), mech_unjam_turret_event(), mech_usebin(), mechDamagefunc(), MechFloodsLoc(), mechrep_Rsavetemp(), muxevent_tickmech_removesection(), muxevent_tickmech_repairinternal(), PrintArmorStatus(), PrintGenericStatus(), PrintWeaponStatus(), remove_inarc_pods_mech(), show_armor(), ShowTurretFacing(), StartBSuitRecycle(), tank_in_pieces(), TECHCOMMANDH(), updateAutoturnTurret(), vehicle_burn_event(), and vehicle_start_burn().

#define GetSectOArmor ( a,
 )     (a)->ud.sections[b].armor_orig

Definition at line 361 of file btmacros.h.

Referenced by ai_path_score(), apply_mechDamage(), ArmorEvaluateSerious(), armorstatus_func(), auto_calc_target_score(), cause_armordamage(), check_for_damage(), crittable(), dump_locations(), getRemainingArmorPercent(), load_template(), mech_status(), mechDamagefunc(), muxevent_tickmech_repairarmor(), MySeriousnessCheck(), and TECHCOMMANDH().

#define GetSectOInt ( a,
 )     (a)->ud.sections[b].internal_orig

Definition at line 363 of file btmacros.h.

Referenced by apply_mechDamage(), ArmorEvaluateSerious(), armorstatus_func(), auto_calc_target_score(), calc_ints(), cause_internaldamage(), check_for_damage(), completely_intact_int(), critslot_func(), critstatus_func(), DestroySection(), dump_locations(), explode_unit(), FindFasaHitLocation(), FindHitLocation(), FindHitLocation_CritProof(), getRemainingInternalPercent(), load_template(), make_damage_table(), make_scrap_table(), mech_critstatus(), mech_int_check(), mech_ood_event(), mech_ReAttach(), mech_ReplaceSuit(), mech_status(), mech_usebin(), mech_weight_sub_mech(), mech_weight_sub_veh(), mechDamagefunc(), muxevent_tickmech_repairinternal(), no_locations_destroyed(), PrintArmorStatus(), PrintShortInfo(), remove_inarc_pods_mech(), removeiNarcPodsTank(), setarmorstatus_func(), show_narc_pods(), TECHCOMMANDH(), TFUNC_LOC(), TFUNC_LOC_RESEAL(), unit_is_fixable(), vehicle_int_check(), and weaponstatus_func().

#define GetSectORArmor ( a,
 )     (a)->ud.sections[b].rear_orig

Definition at line 362 of file btmacros.h.

Referenced by apply_mechDamage(), ArmorEvaluateSerious(), armorstatus_func(), auto_calc_target_score(), cause_armordamage(), check_for_damage(), dump_locations(), getRemainingArmorPercent(), load_template(), mech_status(), mechDamagefunc(), MechFloodsLoc(), muxevent_tickmech_repairarmor(), MySeriousnessCheckR(), and TECHCOMMANDH().

#define GetSectRArmor ( a,
 )     ((a)->ud.sections[b].rear)

Definition at line 354 of file btmacros.h.

Referenced by apply_mechDamage(), ArmorEvaluateSerious(), armorstatus_func(), auto_calc_target_score(), cause_armordamage(), check_for_damage(), getRemainingArmorPercent(), mechDamagefunc(), MechFloodsLoc(), mechrep_Rsavetemp(), muxevent_tickmech_repairarmor(), MySeriousnessCheckR(), and TECHCOMMANDH().

#define GetTerrain ( mapn,
x,
y   )     Coding_GetTerrain(mapn->map[y][x])

Definition at line 545 of file btmacros.h.

Referenced by auto_astar_generate_path(), auto_roam_generate_target_hex(), CalculateLOSFlag(), CheckForSmoke(), clear_hex(), fire_hex(), fun_btmapterr(), GetTerrainName(), LRSElevation(), LRSTerrain(), make_bridges(), map_savemap(), map_setmapsize(), map_underlying_terrain(), mech_Rsetmapindex(), mech_Rsetxy(), move_mech(), NewHexEntered(), possibly_ignite(), sketch_tac_map(), trace_slitelos(), and water_distance().

#define GetTurnMode (  )     (MechPrefs(a) & MECHPREF_TURNMODE)

Definition at line 270 of file btmacros.h.

Referenced by DisplayTarget(), mech_turnmode(), and UpdateHeading().

#define GotGPilot ( mech   ) 

Value:

((pilot_override && GunPilot(mech) > 0) || \
      (!pilot_override && GotPilot(mech)))

Definition at line 65 of file btmacros.h.

#define GotPilot ( mech   )     (MechPilot(mech) > 0 && Location(MechPilot(mech)) == mech->mynum)

Definition at line 59 of file btmacros.h.

Referenced by DisplayTarget(), headhitmwdamage(), mech_notify(), mech_printf(), mech_turnmode(), and mwlethaldam().

#define GunPilot (  )     (pilot_override>0?pilot_override:MechPilot(a))

Definition at line 84 of file btmacros.h.

Referenced by AccumulateArtyXP(), AccumulateGunXP(), AccumulateGunXPold(), FindAndCheckAmmo(), FindPilotArtyGun(), FindPilotGunnery(), HitTarget(), and Missile_Hit().

#define HasC3 ( mech   )     (HasC3m(mech) || HasC3s(mech))

Definition at line 806 of file btmacros.h.

Referenced by FindNormalBTH(), getOtherMechInNetwork(), mech_c3_join_leave(), mech_c3_message(), mech_c3_network(), mech_c3_targets(), PrintWeaponStatus(), and validateC3Network().

#define HasC3i ( mech   )     ((MechSpecials2(mech) & C3I_TECH))

Definition at line 818 of file btmacros.h.

Referenced by FindNormalBTH(), getOtherMechInNetwork(), mech_c3i_join_leave(), mech_c3i_message(), mech_c3i_network(), mech_c3i_targets(), PrintWeaponStatus(), and validateC3iNetwork().

#define HasC3m ( mech   )     ((MechSpecials(mech) & C3_MASTER_TECH))

Definition at line 807 of file btmacros.h.

Referenced by isTAGDestroyed(), and PrintWeaponStatus().

#define HasC3s ( mech   )     ((MechSpecials(mech) & C3_SLAVE_TECH))

Definition at line 808 of file btmacros.h.

Referenced by PrintWeaponStatus().

#define HasCamo (  )     (MechSpecials2(a) & CAMO_TECH)

Definition at line 395 of file btmacros.h.

Referenced by auto_radio_command_hide(), and bsuit_hide().

#define HasTAG ( mech   )     ( (MechSpecials2(mech) & TAG_TECH) || HasC3m(mech) )

Definition at line 826 of file btmacros.h.

Referenced by mech_tag(), and PrintWeaponStatus().

#define HasWorkingAngelECMSuite ( mech   ) 

Value:

Definition at line 788 of file btmacros.h.

Referenced by PrintWeaponStatus().

#define HasWorkingECMSuite ( mech   ) 

Value:

Definition at line 759 of file btmacros.h.

Referenced by changeStealthArmorEvent(), HeatFactor(), mech_stealtharmor(), and sendECMNotification().

#define Heatcutoff (  )     (MechCritStatus(a) & HEATCUTOFF)

Definition at line 248 of file btmacros.h.

Referenced by heat_cutoff(), and UpdateHeat().

#define HeatcutoffChanging (  )     muxevent_count_type_data(EVENT_HEATCUTOFFCHANGING, (void *) a)

Definition at line 482 of file btmacros.h.

Referenced by heat_cutoff().

#define Hiding (  )     muxevent_count_type_data(EVENT_HIDE,(void *) a)

Definition at line 394 of file btmacros.h.

Referenced by bsuit_hide().

#define HotLoading ( weapindx,
mode   )     ((mode & HOTLOAD_MODE) && (MechWeapons[weapindx].special & IDF))

Definition at line 609 of file btmacros.h.

Referenced by FindBTHByC3Range(), FindBTHByRange(), FindNormalBTH(), handleWeaponCrit(), and MissileHitIndex().

#define HS_Efficiency (  )     (MechHasDHS(a) ? 2 : 1)

Definition at line 254 of file btmacros.h.

Referenced by do_sub_magic(), mech_weight_sub_mech(), and mech_weight_sub_veh().

#define HS_Size (  )     (MechType(mech) == CLASS_MECH ? (ClanMech(a) ? 2 : ((MechSpecials(a) & DOUBLE_HEAT_TECH) ? 3 : 1)) : 1)

Definition at line 253 of file btmacros.h.

Referenced by crit_weight(), DestroyHeatSink(), do_sub_magic(), HandleMechCrit(), mech_weight_sub_mech(), and mech_weight_sub_veh().

#define Immobile (  )     ( !Started(a) || Uncon(a) || Blinded(a) || (MechMove(a) == MOVE_NONE) || ((MechStatus(a) & FALLEN) && ( (MechType(a) != CLASS_MECH) && (MechType(a) != CLASS_MW) )) )

Definition at line 468 of file btmacros.h.

Referenced by bsuit_attackleg(), bsuit_swarm(), FindNormalBTH(), FindTCHitLoc(), HitTarget(), and TargetMovementMods().

#define InGravity (  )     (MechStatus(a) & UNDERGRAVITY)

Definition at line 462 of file btmacros.h.

Referenced by MechCargoMaxSpeed(), and UpdatePilotSkillRolls().

#define InSpecial (  )     (MechStatus(a) & UNDERSPECIAL)

Definition at line 461 of file btmacros.h.

Referenced by BreachLoc(), MechCargoMaxSpeed(), MechFalls(), PossiblyBreach(), UpdateHeat(), and UpdatePilotSkillRolls().

#define InVacuum (  )     (MechStatus(a) & UNDERVACUUM)

Definition at line 463 of file btmacros.h.

Referenced by BreachLoc(), and DestroyParts().

#define InWater ( mech   )     (IsWater(MechRTerrain((mech))) && MechZ(mech)<0)

Definition at line 661 of file btmacros.h.

Referenced by CalculateLOSFlag(), CheckVTOLHeight(), mech_bootlegger(), mech_ood_event(), mech_startup_event(), MechFalls(), MechFloods(), MechFloodsLoc(), UpdateHeat(), and water_extinguish_inferno().

#define is_aero ( mech   )     ((MechType(mech) == CLASS_AERO) || (IsDS(mech)))

Definition at line 36 of file btmacros.h.

Referenced by aero_thrust(), ai_crash(), CheckEdgeOfMap(), CheckVTOLHeight(), DamageMech(), DS_Bay_Is_Open(), fiery_death(), FindAimHitLoc(), FindNormalBTH(), HandleOverheat(), initiate_ood(), mech_heading(), mech_ReAttach(), mech_shutdown(), mech_startup_event(), mech_turret(), mech_update(), move_mech(), PrintGenericStatus(), PrintInfoStatus(), ShowTurretFacing(), TargetMovementMods(), and UpdateHeading().

#define IsAMS ( weapindx   )     (MechWeapons[weapindx].special & AMS)

Definition at line 666 of file btmacros.h.

Referenced by do_magic(), FireWeaponNumber(), handleWeaponCrit(), load_mechdata(), load_template(), LocateAMSDefenses(), mechrep_Raddweap(), PrintWeaponStatus(), and update_specials().

#define IsBuilding (  )     (t == BUILDING)

Definition at line 43 of file btmacros.h.

Referenced by bsuit_hide().

#define IsBuildingHex ( map,
x,
y   )     (IsBuilding(GetRTerrain(map,x,y)))

Definition at line 44 of file btmacros.h.

#define IsC3 ( mech   )     ((MechSpecials(mech) & (C3_MASTER_TECH|C3_SLAVE_TECH)) && !C3Destroyed(mech))

Definition at line 664 of file btmacros.h.

Referenced by sendECMNotification().

#define IsC3i ( mech   )     ((MechSpecials2(mech) & C3I_TECH) && !C3iDestroyed(mech))

Definition at line 665 of file btmacros.h.

Referenced by sendECMNotification().

#define IsCrap ( val   ) 

Value:

(((val) == Special(ENDO_STEEL)) || ((val) == Special(FERRO_FIBROUS)) || \
   ((val) == Special(TRIPLE_STRENGTH_MYOMER)) || ((val) == Special(STEALTH_ARMOR)) || \
         ((val) == Special(HVY_FERRO_FIBROUS)) || ((val) == Special(LT_FERRO_FIBROUS)))

Definition at line 684 of file btmacros.h.

Referenced by apply_mechDamage(), check_for_damage(), check_for_scrappage(), CriticalStatus(), critslot_func(), critstatus_func(), mech_Rfixstuff(), mechDamagefunc(), and TECHCOMMANDH().

#define IsForest (  )     (t == LIGHT_FOREST || t == HEAVY_FOREST)

Definition at line 37 of file btmacros.h.

Referenced by bsuit_hide(), and NewHexEntered().

#define IsForestHex ( map,
x,
y   )     (IsForest(GetRTerrain(map,x,y)))

Definition at line 38 of file btmacros.h.

Referenced by CheckForFire(), determineDamageFromHit(), FindNormalBTH(), fire_dissipation_event(), and Missile_Hit().

#define IsHulldown (  )     (MechStatus(a) & HULLDOWN)

Definition at line 399 of file btmacros.h.

Referenced by getStatusChar(), getStatusString(), mech_heading(), mech_hulldown(), mech_jump(), Mech_ShowFlags(), mech_speed(), and mech_stand().

#define IsLit ( mech   )     (MechLit(mech) || MechLites(mech))

Definition at line 695 of file btmacros.h.

#define IsMountains (  )     (t == MOUNTAINS)

Definition at line 39 of file btmacros.h.

Referenced by bsuit_hide().

#define IsMountainsHex ( map,
x,
y   )     (IsMountains(GetRTerrain(map,x,y)))

Definition at line 40 of file btmacros.h.

#define IsRough (  )     (t == ROUGH)

Definition at line 41 of file btmacros.h.

Referenced by bsuit_hide().

#define IsRoughHex ( map,
x,
y   )     (IsRough(GetRTerrain(map,x,y)))

Definition at line 42 of file btmacros.h.

#define IsRunning ( speed,
maxspeed   )     (speed > MWalkingSpeed(maxspeed))

Definition at line 35 of file btmacros.h.

Referenced by AttackMovementMods(), auto_radio_command_report(), mech_dump(), mech_speed(), mech_unjamammo_func(), NewHexEntered(), UpdateHeading(), UpdateHeat(), and UpdatePilotSkillRolls().

#define IsWater (  )     ((t) == ICE || (t) == WATER || (t) == BRIDGE)

Definition at line 660 of file btmacros.h.

Referenced by CalculateLOSFlag(), CalculateLOSMap(), and growable_callback().

#define Jellied (  )     (MechCritStatus(a) & JELLIED)

Definition at line 386 of file btmacros.h.

Referenced by getStatusChar(), getStatusString(), Inferno_Hit(), litemark_map(), Mech_ShowFlags(), UpdateHeat(), and water_extinguish_inferno().

#define Jumping (  )     (MechStatus(a) & JUMPING)

Definition at line 464 of file btmacros.h.

Referenced by AttackMovementMods(), auto_radio_command_report(), bsuit_hide(), calcWeatherPilotEffects(), ChargeMech(), check_stagger_event(), CheckDamage(), CheckEdgeOfMap(), DeathFromAbove(), DestroyParts(), doBSuitCommonChecks(), domino_space_in_hex(), FindBSuitTarget(), FindNormalBTH(), FireWeapon(), getStatusChar(), getStatusString(), HandleMechCrit(), HandleOverheat(), LandMech(), load_update1(), mech_attachcables(), mech_contacts(), mech_drop(), mech_dump(), mech_embark(), mech_enter_event(), mech_enterbase(), mech_enterbay(), mech_enterbay_event(), mech_grabclub(), mech_hulldown(), mech_jump(), mech_jump_event(), mech_land(), mech_move_event(), mech_pickup(), mech_shutdown(), mech_stand(), mech_thrash(), mech_unjamammo_func(), MechFalls(), mechs_in_hex(), move_mech(), NewHexEntered(), phys_common_checks(), PhysicalAttack(), PrintGenericStatus(), PrintReport(), TargetMovementMods(), UpdateHeading(), UpdateHeat(), UpdatePilotSkillRolls(), and UpdateSpeed().

#define JumpSpeed ( mech,
map   )     ((InGravity(mech) && map) ? (MechJumpSpeed(mech) * 100 / ((MAX(50, MapGravity(map))))) : MechJumpSpeed(mech))

Definition at line 676 of file btmacros.h.

Referenced by move_mech(), and TargetMovementMods().

#define JumpSpeedMP ( mech,
map   )     ((int) (JumpSpeed(mech,map) * MP_PER_KPH))

Definition at line 678 of file btmacros.h.

Referenced by HandleMechCrit(), HandleOverheat(), mech_jump(), move_mech(), PrintGenericStatus(), and UpdateHeading().

#define Landed (  )     (MechStatus(a) & LANDED)

Definition at line 469 of file btmacros.h.

Referenced by aero_ControlEffect(), aero_move_event(), aero_takeoff(), aero_thrust(), aero_update(), ai_crash(), auto_sensor_event(), bsuit_hide(), cause_armordamage(), CheckEdgeOfMap(), CheckVTOLHeight(), DamageMech(), DeathFromAbove(), domino_space_in_hex(), DoVehicleEngineHit(), Find_Single_DS_In_MechHex(), FindNormalBTH(), FireWeapon(), FuelCheck(), HandleOverheat(), HandleVTOLCrit(), Leave_DS(), load_update1(), mech_bomb(), mech_eject(), mech_enterbase(), mech_heading(), mech_move_event(), mech_Rsetxy(), mech_shutdown(), mech_speed(), mech_startup_event(), mech_udisembark(), mech_vertical(), mechs_in_hex(), move_mech(), NewHexEntered(), PrintGenericStatus(), remove_inarc_pods_tank(), sketch_tac_mechs(), StartVTOLCrash(), and UpdateSpeed().

#define LastStaggerNotify ( mech   )     ( (mech)->rd.lastStaggerNotify )

Definition at line 841 of file btmacros.h.

Referenced by CheckDamage().

#define Locking (  )     muxevent_count_type_data(EVENT_LOCK,(void *) a)

Definition at line 393 of file btmacros.h.

Referenced by FindNormalBTH(), FireSpot(), and FireWeaponNumber().

#define LOS_NB   InLineOfSight_NB

Definition at line 32 of file btmacros.h.

Referenced by findC3RangeWithNetwork(), and FireWeaponNumber().

#define LoseLock (  )     StopLock(a);MechTarget(a)=-1;MechTargX(a)=-1;MechTargY(a)=-1;if (MechAim(a) != NUM_SECTIONS) { mech_notify(a, MECHALL, "Location-specific targeting powers down."); MechAim(a) = NUM_SECTIONS; }

Definition at line 486 of file btmacros.h.

Referenced by clear_mech_from_LOS(), and Sensor_DoWeSeeNow().

#define LowerMaxSpeed ( a,
 )     SetMaxSpeed(a,MechMaxSpeed(a)-b)

Definition at line 156 of file btmacros.h.

Referenced by DoMotiveSystemHit(), DoVTOLRotorDamagedCrit(), FindFasaHitLocation(), HandleVehicleCrit(), NormalizeAllActuatorCrits(), and NormalizeLegActuatorCrits().

#define MakeMechFall (  )     MechStatus(a) |= FALLEN;FallCentersTorso(a);MarkForLOSUpdate(a);MechFloods(a);StopStand(a);StopHullDown(a);MechStatus(a) &= ~HULLDOWN;

Definition at line 475 of file btmacros.h.

Referenced by cause_armordamage(), DeathFromAbove(), DoMotiveSystemHit(), DoVehicleCrewKilledCrit(), DoVehicleEngineHit(), FindFasaHitLocation(), HandleVehicleCrit(), mech_drop(), MechFalls(), and NormalizeAllActuatorCrits().

#define MakeMechStand (  )     MechStatus(a) &= ~FALLEN;MarkForLOSUpdate(a)

Definition at line 477 of file btmacros.h.

Referenced by mech_stand(), and mech_stand_event().

#define MAPEVENT ( map,
type,
func,
time,
data   )     muxevent_add(time, 0, type, func, (void *) (map), (void *) (data))

Definition at line 279 of file btmacros.h.

Referenced by add_decoration(), and fire_spreading_event().

#define MAPMOVEMOD ( map   )     ((map)->movemod > 0 ? (float) (map)->movemod / 100.0 : 1.0)

Definition at line 702 of file btmacros.h.

Referenced by move_mech().

#define MaybeMove (  ) 

Value:

do { if (!Moving(a) && Started(a) && (!Fallen(mech) || MechType(a) == CLASS_MECH)) \
   MECHEVENT(a,EVENT_MOVE,is_aero(a) ? aero_move_event : mech_move_event,\
             MOVE_TICK,0); } while (0)

Definition at line 412 of file btmacros.h.

Referenced by aero_takeoff_event(), aero_thrust(), CheckEdgeOfMap(), initiate_ood(), LandMech(), load_update4(), mech_heading(), mech_land(), mech_ood_event(), mech_speed(), mech_startup_event(), mech_vertical(), MechFalls(), and StopSwarming().

#define MechActiveNumsinks (  )     (MechRealNumsinks(a) - MechDisabledHS(a))

Definition at line 169 of file btmacros.h.

Referenced by DisableSomeHS(), mech_status(), PrintInfoStatus(), PrintShortInfo(), and UpdateHeat().

#define MechAim (  )     (a)->rd.aim

Definition at line 89 of file btmacros.h.

Referenced by clear_mech(), DisplayTarget(), FindAimHitLoc(), FindNormalBTH(), FindTCHitLoc(), FireWeapon(), HitTarget(), and mech_target().

#define MechAimType (  )     (a)->rd.aim_type

Definition at line 90 of file btmacros.h.

Referenced by DisplayTarget(), FindTCHitLoc(), FireWeapon(), HitTarget(), and mech_target().

#define MechAmmoWarn (  )     (!(MechPrefs(a) & MECHPREF_NOAMMOWARN))

Definition at line 179 of file btmacros.h.

Referenced by ammo_expedinture_check().

#define MechArmorWarn (  )     (!(MechPrefs(a) & MECHPREF_NOARMORWARN))

Definition at line 178 of file btmacros.h.

Referenced by cause_armordamage().

#define MechAuto (  )     (a)->rd.autopilot_num

Definition at line 91 of file btmacros.h.

Referenced by auto_cal_mapindex(), auto_engage(), auto_newautopilot(), auto_reply(), newfreemech(), and sendchannelstuff().

#define MechAutoconSD (  )     (MechPrefs(a) & MECHPREF_AUTOCON_SD)

Definition at line 181 of file btmacros.h.

Referenced by Sensor_DoWeSeeNow().

#define MechAutoFall (  )     (MechPrefs(a) & MECHPREF_AUTOFALL)

Definition at line 177 of file btmacros.h.

Referenced by NewHexEntered().

#define MechBaseRun (  )     (a)->ud.runspeed

Definition at line 94 of file btmacros.h.

#define MechBaseWalk (  )     (a)->ud.walkspeed

Definition at line 93 of file btmacros.h.

#define MechBoomStart (  )     (a)->rd.boom_start

Definition at line 95 of file btmacros.h.

Referenced by cause_internaldamage(), DestroyParts(), and load_update1().

#define MechBTH (  )     (a)->rd.basetohit

Definition at line 92 of file btmacros.h.

Referenced by do_magic(), DoVehicleCommanderHit(), DoVehicleSensorCrit(), DoVTOLCoPilotCrit(), FindNormalBTH(), and HandleMechCrit().

#define MechBV (  )     (a)->ud.mechbv

Definition at line 245 of file btmacros.h.

Referenced by auto_calc_target_score(), fun_btgetbv(), fun_btgetbv_ref(), load_template(), and save_template().

#define MechC3iNetwork (  )     (a)->sd.C3iNetwork

Definition at line 820 of file btmacros.h.

#define MechC3iNetworkElem ( a,
 )     (a)->sd.C3iNetwork[b]

Definition at line 821 of file btmacros.h.

Referenced by addMechToC3iNetwork(), clearC3iNetwork(), clearMechFromC3iNetwork(), getFreeC3iNetworkPos(), getOtherMechInNetwork(), replicateC3iNetwork(), and validateC3iNetwork().

#define MechC3iNetworkSize (  )     (a)->sd.wC3iNetworkSize

Definition at line 822 of file btmacros.h.

Referenced by addMechToC3iNetwork(), buildTempNetwork(), clearC3iNetwork(), clearMechFromC3iNetwork(), FindNormalBTH(), getOtherMechInNetwork(), load_update1(), mech_c3i_join_leave(), mech_c3i_message(), mech_c3i_network(), mech_c3i_targets(), PrintWeaponStatus(), replicateC3iNetwork(), and validateC3iNetwork().

#define MechC3Network (  )     (a)->sd.C3Network

Definition at line 810 of file btmacros.h.

Referenced by mech_c3_join_leave().

#define MechC3NetworkElem ( a,
 )     (a)->sd.C3Network[b]

Definition at line 811 of file btmacros.h.

Referenced by addMechToC3Network(), clearC3Network(), clearMechFromC3Network(), getFreeC3NetworkPos(), getOtherMechInNetwork(), replicateC3Network(), and validateC3Network().

#define MechC3NetworkSize (  )     (a)->sd.wC3NetworkSize

Definition at line 812 of file btmacros.h.

Referenced by addMechToC3Network(), buildTempNetwork(), clearC3Network(), clearMechFromC3Network(), FindNormalBTH(), getOtherMechInNetwork(), mech_c3_join_leave(), mech_c3_message(), mech_c3_network(), mech_c3_targets(), PrintWeaponStatus(), replicateC3Network(), and validateC3Network().

#define MechCarriedCargo (  )     (a)->rd.cargo_weight

Definition at line 96 of file btmacros.h.

Referenced by MechCargoMaxSpeed().

#define MechCarrying (  )     (a)->rd.carrying

Definition at line 101 of file btmacros.h.

Referenced by DamageMech(), DestroyMech(), DestroySection(), fun_btsetxy(), getStatusChar(), getStatusString(), Leave_DS_Bay(), Leave_Hangar(), load_update1(), mech_attachcables(), mech_detachcables(), mech_dropoff(), mech_embark(), mech_enter_event(), mech_enterbay_event(), mech_jump(), mech_pickup(), mech_speed(), MechCargoMaxSpeed(), move_mech(), PrintEnemyStatus(), PrintInfoStatus(), and UpdateSpeed().

#define MechChargeDistance (  )     (a)->rd.chargedist

Definition at line 105 of file btmacros.h.

Referenced by ChargeMech(), clear_mech(), mech_charge(), and move_mech().

#define MechChargeTarget (  )     (a)->rd.chgtarget

Definition at line 103 of file btmacros.h.

Referenced by ChargeMech(), clear_mech(), DisplayTarget(), mech_charge(), move_mech(), and PrintGenericStatus().

#define MechChargeTimer (  )     (a)->rd.chargetimer

Definition at line 104 of file btmacros.h.

Referenced by ChargeMech(), clear_mech(), DisplayTarget(), mech_charge(), and move_mech().

#define MechCocoon (  )     (a)->rd.cocoon

Definition at line 106 of file btmacros.h.

Referenced by CheckEdgeOfMap(), initiate_ood(), load_update1(), mech_jump(), mech_ood_damage(), mech_ood_event(), MechFalls(), and move_mech().

#define MechComm (  )     (a)->rd.commconv

Definition at line 107 of file btmacros.h.

Referenced by mech_startup_event(), mech_udisembark(), and sendchannelstuff().

#define MechCommLast (  )     (a)->rd.commconv_last

Definition at line 108 of file btmacros.h.

Referenced by load_update1(), mech_startup_event(), mech_udisembark(), and sendchannelstuff().

#define MechComputer (  )     (a)->ud.computer

Definition at line 109 of file btmacros.h.

Referenced by CheckGenericFail(), computer_conversion(), generic_computer_multiplier(), load_template(), and save_template().

#define MechCritStatus (  )     (a)->rd.critstatus

Definition at line 110 of file btmacros.h.

Referenced by aero_takeoff(), aero_takeoff_event(), ai_crash(), auto_sensor_event(), bsuit_attackleg(), bsuit_swarm(), CalculateLOSMap(), cause_lite(), DamageMech(), DestroyParts(), do_magic(), end_lite_check(), FindNormalBTH(), FireWeaponNumber(), get_weight(), HandleMechCrit(), HandleOverheat(), heat_cutoff_event(), HitTarget(), inferno_burn(), inferno_end_event(), initialize_pc(), InLineOfSight(), isTAGDestroyed(), LandMech(), load_update1(), mech_angeleccm(), mech_angelecm(), mech_crewstun_event(), mech_eccm(), mech_ecm(), mech_embark(), mech_hide_event(), mech_kickortrip(), mech_masc_event(), mech_pickup(), Mech_ShowFlags(), mech_shutdown(), mech_slite(), mech_speed(), mech_stand(), mech_udisembark(), MechCargoMaxSpeed(), MechSliteChangeEvent(), ModifyHeadHit(), move_mech(), NormalizeAllActuatorCrits(), PhysicalAttack(), PrefVisSens(), PrintEnemyStatus(), PrintWeaponStatus(), SearchLightInRange(), sendchannelstuff(), sendECMNotification(), Sensor_CanSee(), Sensor_Sees(), update_oweight(), update_specials(), UpdateHeading(), UpdateHeat(), UpdatePilotSkillRolls(), UpdateSpeed(), and water_extinguish_inferno().

#define MechCritStatus2 (  )     (a)->rd.critstatus2

Definition at line 111 of file btmacros.h.

Referenced by HandleMechCrit(), and NormalizeAllActuatorCrits().

#define MechDesiredAngle (  )     (a)->rd.angle

Definition at line 113 of file btmacros.h.

Referenced by aero_takeoff_event(), aero_UpdateSpeed(), aero_vheading(), initiate_ood(), mech_startup_event(), move_mech(), PrintInfoStatus(), and PrintShortInfo().

#define MechDesiredFacing (  )     (a)->rd.desiredfacing

Definition at line 114 of file btmacros.h.

Referenced by aero_move_event(), aero_UpdateSpeed(), ai_adjust_move(), ai_crash(), ai_set_heading(), AttackMovementMods(), auto_dumbfollow_event(), bsuit_swarm(), CheckNavalHeight(), LOCInit(), mech_bootlegger(), mech_dig(), mech_heading(), mech_move_event(), MechFalls(), PrintInfoStatus(), PrintShortInfo(), update_wanted_heading(), UpdateHeading(), and UpdateSpeed().

#define MechDesiredSpeed (  )     (a)->rd.desired_speed

Definition at line 115 of file btmacros.h.

Referenced by aero_land(), aero_move_event(), aero_takeoff_event(), aero_thrust(), aero_UpdateSpeed(), ai_adjust_move(), ai_max_speed(), ai_set_speed(), ai_stop(), AttackMovementMods(), auto_enter_event(), bsuit_swarm(), ChargeMech(), CheckEdgeOfMap(), CheckNavalHeight(), correct_speed(), DeathFromAbove(), FuelCheck(), handlemwconc(), initiate_ood(), limitSpeedToCruise(), load_update1(), LOCInit(), mech_detachcables(), mech_drop(), mech_dropoff(), mech_dump(), mech_hulldown(), mech_masc(), mech_move_event(), mech_ood_event(), mech_scharge(), mech_speed(), mech_startup_event(), mech_unjamammo_func(), mech_vertical(), MechFalls(), ModifyHeadHit(), NewHexEntered(), PrintInfoStatus(), PrintShortInfo(), remove_inarc_pods_tank(), speed_up_if_neccessary(), StartVTOLCrash(), UpdateHeat(), and UpdateSpeed().

#define MechDFATarget (  )     (a)->rd.dfatarget

Definition at line 112 of file btmacros.h.

Referenced by clear_mech(), LandMech(), mech_jump(), mech_land(), and PrintGenericStatus().

#define MechDisabledHS (  )     (a)->rd.disabled_hs

Definition at line 170 of file btmacros.h.

Referenced by DisableSomeHS(), EnableSomeHS(), and UpdateHeat().

#define MechDugIn (  )     (MechTankCritStatus(mech) & DUG_IN)

Definition at line 397 of file btmacros.h.

Referenced by ActualElevation(), FindAdvFasaVehicleHitLocation(), FindFasaHitLocation(), FindHitLocation(), FindHitLocation_CritProof(), FindNormalBTH(), FireWeaponNumber(), mech_dig(), mech_heading(), and Mech_ShowFlags().

#define MechElev (  )     (a)->pd.elev

Definition at line 116 of file btmacros.h.

Referenced by CheckNavalHeight(), drop_thru_ice(), DropGetElevation(), LandMech(), mech_Rsetmapindex(), mech_Rsetxy(), move_mech(), move_unit_back(), NewHexEntered(), and swim_except().

#define MechElevation ( mech   )     BaseElev(MechRTerrain(mech),abs(MechElev(mech)))

Definition at line 48 of file btmacros.h.

Referenced by aero_land(), aero_move_event(), CheckNavalHeight(), CheckVTOLHeight(), collision_check(), DeathFromAbove(), DoVehicleEngineHit(), DoVehicleFuelTankCrit(), DropGetElevation(), HandleVTOLCrit(), LOCInit(), mech_ood_damage(), mech_startup_event(), MechFloods(), NewHexEntered(), PhysicalDamage(), UpdateSpeed(), and water_extinguish_inferno().

#define MechEndFZ (  )     (a)->rd.endfz

Definition at line 117 of file btmacros.h.

Referenced by mech_jump(), and move_mech().

#define MechEngineHeat (  )     (a)->rd.engineheat

Definition at line 118 of file btmacros.h.

Referenced by DestroyParts(), do_magic(), HandleMechCrit(), mech_scharge_event(), and UpdateHeat().

#define MechEngineSize (  )     (MechEngineSizeV(a) > 0 ? MechEngineSizeV(a) : MechEngineSizeC(a))

Definition at line 152 of file btmacros.h.

Referenced by do_sub_magic(), engine_weight(), fun_btengrate(), fun_btengrate_ref(), mech_weight_sub_mech(), mech_weight_sub_veh(), and reactor_explosion().

#define MechEngineSizeC ( mech   )     ((int) rint((2 * MechMaxSpeed(mech) / KPH_PER_MP) / 3) * MechTons(mech))

Definition at line 50 of file btmacros.h.

Referenced by do_magic(), and load_template().

#define MechEngineSizeV (  )     (a)->rd.erat

Definition at line 151 of file btmacros.h.

Referenced by do_magic(), and load_template().

#define MECHEVENT ( mech,
type,
func,
time,
data   ) 

Value:

do { if (mech->mynum > 0) \
     muxevent_add(time, 0, type, func, (void *) (mech), (void *) (data)); } while (0)

Definition at line 272 of file btmacros.h.

Referenced by aero_move_event(), aero_takeoff(), aero_takeoff_event(), auto_reply(), bsuit_hide(), cause_armordamage(), char_disembark(), DamageMech(), discard_mw(), FailureComputerScanner(), FailureRadioRange(), FailureRadioShort(), FuelCheck(), heat_cutoff(), inferno_burn(), initiate_ood(), LandMech(), mech_check_range(), mech_dig(), mech_dropoff(), mech_dump(), mech_dump_event(), mech_enterbase(), mech_enterbay(), mech_explode(), mech_explode_event(), mech_fall_event(), mech_fixturret(), mech_hide_event(), mech_hulldown(), mech_jump(), mech_jump_event(), mech_lateral(), mech_lateral_event(), mech_masc(), mech_masc_event(), mech_mascr_event(), mech_move_event(), mech_nullsig(), mech_ood_damage(), mech_ood_event(), mech_plos_event(), mech_scharge(), mech_scharge_event(), mech_scharger_event(), mech_settarget(), mech_shutdown(), mech_slite(), mech_spot(), mech_spot_event(), mech_stand(), mech_startup(), mech_startup_event(), mech_stealtharmor(), mech_tag(), mech_unjamammo_func(), MechFalls(), ModifyHeadHit(), NewHexEntered(), ProlongUncon(), remove_inarc_pods_tank(), ScrambleInfraAndLiteAmp(), set_sensor(), sixth_sense_check(), StartVTOLCrash(), stopTAG(), vehicle_burn_event(), vehicle_extinquish_fire(), and vehicle_start_burn().

#define MechFacing (  )     (FSIM2SHO((a)->pd.facing))

Definition at line 122 of file btmacros.h.

Referenced by aero_move_event(), ai_crash(), AttackMovementMods(), auto_astar_follow_event(), auto_dumbfollow_event(), auto_radio_command_report(), blast_arcf(), ChargeMech(), CheckDamage(), FindAreaHitGroup(), InWeaponArc(), LOCInit(), mech_bootlegger(), mech_dig(), mech_heading(), mech_move_event(), mech_navigate(), mech_turret(), MechFalls(), move_mech(), PrintInfoStatus(), PrintShortInfo(), ShowTurretFacing(), slow_down_if_neccessary(), speed_up_if_neccessary(), updateAutoturnTurret(), UpdateHeading(), and UpdateSpeed().

#define MechFailStand (  )     (!(MechPrefs(a) & MECHPREF_NOFAILSTAND))

Definition at line 180 of file btmacros.h.

#define MechFireAdjustment (  )     (a)->rd.fire_adjustment

Definition at line 128 of file btmacros.h.

Referenced by artillery_FriendlyAdjustment(), ClearFireAdjustments(), FindArtilleryBTH(), mech_settarget(), and mech_spot().

#define MechFreqs (  )     (MechRadioType(a) % FREQS)

Definition at line 87 of file btmacros.h.

#define MechFX (  )     (a)->pd.fx

Definition at line 119 of file btmacros.h.

Referenced by aero_checklz(), auto_astar_follow_event(), auto_calc_target_score(), auto_gun_event(), blast_arcf(), calc_dest(), ChargeMech(), CheckEdgeOfMap(), determineDamageFromHit(), DisplayTarget(), DS_BlastNearbyMechsAndTrees(), figure_out_range_and_bearing(), FindAreaHitGroup(), findC3RangeWithNetwork(), FindTargetXY(), FireSpot(), FireWeaponNumber(), fun_btgetrange(), fun_bthexlos(), fun_btmapunits(), InLineOfSight(), InWeaponArc(), LOCInit(), MapLimitedBroadcast2d(), MapLimitedBroadcast3d(), mech_bearing(), mech_contacts(), mech_eta(), mech_findcenter(), mech_jump(), mech_lites_target(), mech_range(), mech_report(), mech_Rsetmapindex(), mech_Rsetxy(), mech_scan(), mech_snipe_func(), mech_spot(), mech_spot_event(), mech_vector(), mechCentBearingfunc(), mechCentDistfunc(), MechFireBroadcast(), MechSeesHexF(), MechSeesRange(), MechSLitesRange(), move_mech(), move_unit_back(), navigate_sketch_mechs(), NewHexEntered(), parse_tacargs(), PhysicalAttack(), PrintReport(), reactor_explosion(), ScrambleMessage(), SearchLightInRange(), sendchannelstuff(), Sensor_DoWeSeeNow(), showNetworkData(), showNetworkTargets(), simulate_flight(), and updateAutoturnTurret().

#define MechFY (  )     (a)->pd.fy

Definition at line 120 of file btmacros.h.

Referenced by aero_checklz(), auto_astar_follow_event(), auto_calc_target_score(), auto_gun_event(), blast_arcf(), calc_dest(), ChargeMech(), CheckEdgeOfMap(), determineDamageFromHit(), DisplayTarget(), DS_BlastNearbyMechsAndTrees(), figure_out_range_and_bearing(), FindAreaHitGroup(), findC3RangeWithNetwork(), FindTargetXY(), FireSpot(), FireWeaponNumber(), fun_btgetrange(), fun_bthexlos(), fun_btmapunits(), InLineOfSight(), InWeaponArc(), LOCInit(), MapLimitedBroadcast2d(), MapLimitedBroadcast3d(), mech_bearing(), mech_contacts(), mech_eta(), mech_findcenter(), mech_jump(), mech_lites_target(), mech_range(), mech_report(), mech_Rsetmapindex(), mech_Rsetxy(), mech_scan(), mech_snipe_func(), mech_spot(), mech_spot_event(), mech_vector(), mechCentBearingfunc(), mechCentDistfunc(), MechFireBroadcast(), MechSeesHexF(), MechSeesRange(), MechSLitesRange(), move_mech(), move_unit_back(), navigate_sketch_mechs(), NewHexEntered(), parse_tacargs(), PhysicalAttack(), PrintReport(), reactor_explosion(), ScrambleMessage(), SearchLightInRange(), sendchannelstuff(), Sensor_DoWeSeeNow(), showNetworkData(), showNetworkTargets(), simulate_flight(), and updateAutoturnTurret().

#define MechFZ (  )     (a)->pd.fz

Definition at line 121 of file btmacros.h.

Referenced by aero_land(), calc_dest(), CheckNavalHeight(), CheckVTOLHeight(), DeathFromAbove(), DoVehicleEngineHit(), DoVehicleFuelTankCrit(), DropSetElevation(), findC3RangeWithNetwork(), FindTargetXY(), FireSpot(), FireWeaponNumber(), fun_btgetrange(), fun_btmapunits(), HandleVTOLCrit(), initiate_ood(), LandMech(), MapLimitedBroadcast3d(), mech_fall_event(), mech_jump(), mech_ood_event(), mech_range(), mech_report(), mech_Rsetxy(), mech_scan(), mech_udisembark(), mech_vector(), MechFalls(), MechFireBroadcast(), MechSeesHexF(), MechSeesRange(), MechSLitesRange(), move_mech(), move_unit_back(), NewHexEntered(), and simulate_flight().

#define MechGoingX (  )     (a)->rd.goingx

Definition at line 129 of file btmacros.h.

Referenced by LandMech(), mech_jump(), mech_land(), move_mech(), and PrintGenericStatus().

#define MechGoingY (  )     (a)->rd.goingy

Definition at line 130 of file btmacros.h.

Referenced by LandMech(), mech_jump(), mech_land(), MechFalls(), move_mech(), and PrintGenericStatus().

#define MechHasDHS (  )     (MechSpecials(a) & (CLAN_TECH|DOUBLE_HEAT_TECH))

Definition at line 250 of file btmacros.h.

Referenced by HandleMechCrit().

#define MechHasHeat (  ) 

Value:

Definition at line 255 of file btmacros.h.

Referenced by mech_status(), PrintInfoStatus(), and UpdateHeat().

#define MechHasTurret (  ) 

Value:

Definition at line 261 of file btmacros.h.

Referenced by InWeaponArc().

#define MechHeat (  )     (a)->rd.heat

Definition at line 131 of file btmacros.h.

Referenced by AttackMovementMods(), getStatusChar(), getStatusString(), HandleOverheat(), mech_contacts(), mech_speed(), mech_startup(), MechCargoMaxSpeed(), OverheatMods(), PhysicalDamage(), PrintInfoStatus(), PrintReport(), PrintWeaponStatus(), UpdateHeading(), UpdateHeat(), UpdatePilotSkillRolls(), and UpdateSpeed().

#define MechHeatLast (  )     (a)->rd.heatboom_last

Definition at line 132 of file btmacros.h.

Referenced by HandleOverheat(), and load_update1().

#define MechHexes (  )     (a)->pd.hexes_walked

Definition at line 133 of file btmacros.h.

Referenced by move_mech().

#define MechID (  )     (a)->ID

Definition at line 134 of file btmacros.h.

Referenced by auto_parse_command(), FindMechOnMap(), mech_Rsetmapindex(), mechIDfunc(), MechIDS(), newfreemech(), and ScrambleMessage().

#define MechInfantrySpecials (  )     (a)->rd.infantry_specials

Definition at line 136 of file btmacros.h.

Referenced by bsuit_attackleg(), bsuit_swarm(), doJettisonChecks(), FindNormalBTH(), JettisonPacks(), load_template(), mechrep_gettechstring(), mechrep_Raddinftech(), mechrep_Rdelinftech(), mechrep_Rshowtech(), PrintWeaponStatus(), save_template(), Sensor_Sees(), TargetMovementMods(), and update_specials().

#define MechIsBiped (  )     (MechMove(a) == MOVE_BIPED)

Definition at line 164 of file btmacros.h.

Referenced by terrain_speed().

#define MechIsObservator ( mech   )     (MechCritStatus(mech) & OBSERVATORIC)

Definition at line 844 of file btmacros.h.

Referenced by aero_checklz(), mech_radio(), mech_scan(), parse_tacargs(), Sensor_DoWeSeeNow(), and sixth_sense_check().

#define MechIsOmniMech (  )     MechSpecials2(a) & OMNIMECH_TECH

Definition at line 135 of file btmacros.h.

#define MechIsQuad (  )     (MechMove(a) == MOVE_QUAD)

Definition at line 163 of file btmacros.h.

Referenced by ai_crash(), AttackMovementMods(), bsuit_attackleg(), CountDestroyedLegs(), CritsInLoc(), DestroyParts(), DestroySection(), FindKickLocation(), FindLegHeatSinks(), FindPunchLocation(), FireWeaponNumber(), HandleMechCrit(), IsInWeaponArc(), IsMechLegLess(), mech_bootlegger(), mech_charge(), mech_enterbay(), mech_grabclub(), mech_hulldown(), mech_kickortrip(), mech_lateral(), mech_pickup(), mech_rotatetorso(), mech_stand(), MechFloodsLoc(), NormalizeAllActuatorCrits(), NormalizeLocActuatorCrits(), pos_part_name(), PrintArmorStatus(), PrintWeaponStatus(), remove_inarc_pods_mech(), terrain_speed(), UpdateHeading(), UpdatePilotSkillRolls(), and UpdateSpeed().

#define MechJumpHeading (  )     (a)->rd.jumpheading

Definition at line 137 of file btmacros.h.

Referenced by mech_contacts(), mech_jump(), move_mech(), and PrintReport().

#define MechJumpLength (  )     (a)->rd.jumplength

Definition at line 138 of file btmacros.h.

Referenced by mech_jump(), and move_mech().

#define MechJumpSpeed (  )     (a)->rd.jumpspeed

Definition at line 139 of file btmacros.h.

Referenced by auto_radio_command_jumpjet(), DestroyParts(), do_magic(), do_sub_magic(), HandleMechCrit(), load_mechdata(), load_template(), mech_jump(), mech_ood_damage(), mech_status(), mechrep_Rsavetemp(), save_template(), and UpdateHeat().

#define MechJumpTop (  )     (a)->rd.jumptop

Definition at line 140 of file btmacros.h.

Referenced by mech_jump(), and move_mech().

#define MechLastRndU (  )     (a)->rd.lastrndu

Definition at line 143 of file btmacros.h.

Referenced by MNumber().

#define MechLastStartup (  )     (a)->rd.last_startup

Definition at line 145 of file btmacros.h.

Referenced by mech_startup_event().

#define MechLastUse (  )     (a)->rd.lastused

Definition at line 144 of file btmacros.h.

Referenced by common_checks().

#define MechLastX (  )     (a)->pd.last_x

Definition at line 146 of file btmacros.h.

Referenced by collision_check(), mech_Rsetmapindex(), mech_Rsetxy(), move_mech(), move_unit_back(), NewHexEntered(), and ShutDownMap().

#define MechLastY (  )     (a)->pd.last_y

Definition at line 147 of file btmacros.h.

Referenced by collision_check(), mech_Rsetmapindex(), mech_Rsetxy(), move_mech(), move_unit_back(), NewHexEntered(), and ShutDownMap().

#define MechLateral (  )     (a)->rd.lateral

Definition at line 148 of file btmacros.h.

Referenced by ai_crash(), DestroySection(), LateralDesc(), mech_lateral(), mech_lateral_event(), move_mech(), PrintInfoStatus(), PrintReport(), and UpdateSpeed().

#define MechLit ( mech   )     (MechCritStatus(mech) & SLITE_LIT)

Definition at line 693 of file btmacros.h.

Referenced by cause_lite(), end_lite_check(), getStatusChar(), getStatusString(), and Mech_ShowFlags().

#define MechLites ( mech   )     (MechStatus2(mech) & SLITE_ON)

Definition at line 694 of file btmacros.h.

Referenced by getStatusChar(), getStatusString(), litemark_map(), mech_lites_target(), and Mech_ShowFlags().

#define MechLOSFlag_WaterCount ( flag   )     (((flag) / MECHLOSFLAG_WATER) % MECHLOSMAX_WATER)

Definition at line 849 of file btmacros.h.

Referenced by mech_lites_target().

#define MechLOSFlag_WoodCount ( flag   )     (((flag) / MECHLOSFLAG_WOOD) % MECHLOSMAX_WOOD)

Definition at line 847 of file btmacros.h.

Referenced by mech_lites_target().

#define MechLowerElevation ( mech   )     (MechRTerrain(mech) != BRIDGE ? MechElevation(mech) : bridge_w_elevation(mech))

Definition at line 52 of file btmacros.h.

Referenced by CheckNavalHeight().

#define MechLRSRange (  )     (a)->ud.lrs_range

Definition at line 141 of file btmacros.h.

Referenced by CheckGenericFail(), computer_conversion(), do_magic(), FailureComputerScanner(), HandleMechCrit(), load_mechdata(), load_template(), mech_lrsmap(), mech_srec_event(), mechrep_Rsavetemp(), and save_template().

#define MechLWRT (  )     (a)->rd.last_weapon_recycle

Definition at line 142 of file btmacros.h.

Referenced by recycle_weaponry().

#define MechLX (  )     (a)->rd.lx

Definition at line 238 of file btmacros.h.

Referenced by AccumulatePilXP().

#define MechLY (  )     (a)->rd.ly

Definition at line 239 of file btmacros.h.

Referenced by AccumulatePilXP().

#define MechMASCCounter (  )     (a)->rd.masc_value

Definition at line 149 of file btmacros.h.

Referenced by mech_masc_event(), mech_mascr_event(), mech_scharge_event(), and PrintWeaponStatus().

#define MechMaxSpeed (  )     (a)->ud.maxspeed

Definition at line 153 of file btmacros.h.

Referenced by aero_takeoff_event(), AttackMovementMods(), correct_speed(), do_magic(), do_sub_magic(), fun_btgetrealmaxspeed(), fun_btsetmaxspeed(), initialize_pc(), initiate_ood(), load_mechdata(), load_template(), mech_jump(), mech_scharge_event(), mech_startup_event(), mech_status(), MechCargoMaxSpeed(), mechrep_Rsavetemp(), ModifyHeadHit(), save_template(), UpdatePilotSkillRolls(), and UpdateSpeed().

#define MechMaxSuits (  )     (a)->rd.maxsuits

Definition at line 160 of file btmacros.h.

Referenced by load_template(), PrintGenericStatus(), save_template(), and TECHCOMMANDH().

#define MechMinusHeat (  )     (a)->rd.minus_heat

Definition at line 161 of file btmacros.h.

Referenced by DisableSomeHS(), EnableSomeHS(), HeatFactor(), MakeHeatScaleInfo(), PrintInfoStatus(), PrintShortInfo(), setWeatherHeatEffects(), and UpdateHeat().

#define MechMove (  )     (a)->ud.move

Definition at line 162 of file btmacros.h.

Referenced by ActualElevation(), ai_crash(), armorstatus_func(), auto_astar_generate_path(), auto_roam_generate_target_hex(), bomb_list(), BreachLoc(), bsuit_attackleg(), bsuit_hide(), CalculateLOSFlag(), CalculateLOSMap(), calcWeatherPilotEffects(), CanChangeTo(), cause_armordamage(), cause_internaldamage(), ChargeMech(), checkGrabClubLocation(), CheckNavalHeight(), checkVehicleInFire(), collision_check(), CriticalStatus(), critslot_func(), critstatus_func(), crittable(), DamageMech(), damages_func(), DeathFromAbove(), describe_repairs(), DestroySection(), DisplayTarget(), DoMotiveSystemHit(), DoVehicleStablizerCrit(), drop_thru_ice(), fiery_death(), findCommLink(), FindFasaHitLocation(), FindPilotingSkillName(), FindSPilotPiloting(), FireWeapon(), FireWeaponNumber(), fix_entry(), GetLRSMechChar(), HandleAdvFasaVehicleCrit(), HandleFasaVehicleCrit(), HandleMechCrit(), HandleVehicleCrit(), handleWeaponCrit(), heat_effect(), invalid_section(), limitSpeedToCruise(), listtic_fun(), load_mechdata(), load_template(), mech_attachcables(), mech_bootlegger(), mech_contacts(), mech_critstatus(), mech_dig(), mech_dump(), mech_dump_event(), mech_grabclub(), mech_heading(), mech_lateral(), mech_lateral_event(), mech_masc_event(), mech_move_event(), mech_pickup(), Mech_ShowFlags(), mech_shutdown(), mech_speed(), mech_startup_event(), mech_target(), mech_thrash(), mech_unjamammo_func(), mech_usebin(), mech_vertical(), mech_weaponstatus(), mech_weight_sub_veh(), MechFalls(), MechFloodsLoc(), mechMovefunc(), mechrep_Raddspecial(), mechrep_Raddweap(), mechrep_Rdisplaysection(), mechrep_Rreload(), mechrep_Rrepair(), mechrep_Rsavetemp(), mechrep_Rsetarmor(), mechrep_Rsetmove(), mechrep_Rsettype(), mechrep_Rshowtech(), MissileHitTarget(), move_mech(), muxevent_tickmech_reattach(), muxevent_tickmech_reload(), muxevent_tickmech_removegun(), muxevent_tickmech_removepart(), muxevent_tickmech_removesection(), muxevent_tickmech_repairarmor(), muxevent_tickmech_repairenhcrit(), muxevent_tickmech_repairgun(), muxevent_tickmech_repairinternal(), muxevent_tickmech_repairpart(), muxevent_tickmech_replacegun(), muxevent_tickmech_replacesuit(), muxevent_tickmech_reseal(), NewHexEntered(), PhysicalAttack(), possibly_drop_thru_ice(), PrintArmorStatus(), PrintEnemyWeaponStatus(), PrintGenericStatus(), PrintInfoStatus(), PrintReport(), PrintShortInfo(), PrintWeaponStatus(), recycle_weaponry(), remove_inarc_pods_mech(), save_template(), setarmorstatus_func(), show_mechs_damage(), show_narc_pods(), showNetworkData(), showNetworkTargets(), ShowTurretFacing(), showWeaponDamageAndInfo(), susp_factor(), swim_except(), tech_parsegun(), tech_parsepart_advanced(), techlist_func(), terrain_speed(), UpdatePilotSkillRolls(), UpdateSpeed(), vehicle_burn_event(), vehicle_start_burn(), and weaponstatus_func().

#define MechNoFriendlyFire (  )     (MechPrefs(a) & MECHPREF_NOFRIENDLYFIRE)

Definition at line 182 of file btmacros.h.

Referenced by FireWeaponNumber(), and PhysicalAttack().

#define MechNumOsinks (  )     (a)->rd.onumsinks

Definition at line 165 of file btmacros.h.

Referenced by do_magic(), and do_sub_magic().

#define MechNumSeen (  )     (a)->rd.num_seen

Definition at line 166 of file btmacros.h.

Referenced by ai_opponents(), auto_com_event(), clear_mech_from_LOS(), remove_mech_from_map(), and Sensor_DoWeSeeNow().

#define MechPer (  )     (a)->rd.per

Definition at line 171 of file btmacros.h.

Referenced by MadePerceptionRoll(), mech_startup_event(), mech_udisembark(), and Sensor_DriverBaseChance().

#define MechPilot (  )     (a)->pd.pilot

Definition at line 184 of file btmacros.h.

Referenced by AccumulateSpotXP(), ammo_explosion(), autoeject(), bsuit_attackleg(), cause_damage(), char_disembark(), char_eject(), ChargeMech(), CheckEdgeOfMap(), CheckVTOLHeight(), clear_mech(), common_checks(), DeathFromAbove(), DestroySection(), DisplayTarget(), Dump_Mech(), FindPilotPiloting(), FindPilotSpotting(), FireSpot(), HandleMechCrit(), handlemwconc(), HandleOverheat(), headhitmwdamage(), Leave_DS_Bay(), Leave_Hangar(), MadePerceptionRoll(), MadePilotSkillRoll_Advanced(), mech_disembark(), mech_eject(), mech_explode(), mech_masc_event(), mech_notify(), mech_ood_event(), mech_printf(), mech_scharge_event(), mech_shutdown(), mech_speed(), mech_startup(), mech_startup_event(), mech_thrash(), mech_turnmode(), mech_udisembark(), MechCargoMaxSpeed(), MechPilotSkillRoll_BTH(), move_mech(), mw_ic_bth(), mwlethaldam(), NewHexEntered(), PhysicalAttack(), PhysicalDamage(), PrintGenericStatus(), reactor_explosion(), remove_inarc_pods_mech(), sendchannelstuff(), UpdateHeading(), and UpdateSpeed().

#define MechPilotSkillBase (  )     (a)->rd.pilotskillbase

Definition at line 185 of file btmacros.h.

Referenced by do_magic(), DoMotiveSystemHit(), DoVehicleCommanderHit(), DoVehicleDriverCrit(), DoVTOLPilotHit(), HandleMechCrit(), MadePilotSkillRoll_Advanced(), MadePilotSkillRoll_NoXP(), mech_ood_event(), MechPilotSkillRoll_BTH(), NormalizeAllActuatorCrits(), and NormalizeLegActuatorCrits().

#define MechPilotStatus (  )     (a)->pd.pilotstatus

Definition at line 186 of file btmacros.h.

Referenced by fix_pilotdamage(), handlemwconc(), headhitmwdamage(), mwlethaldam(), and PrintGenericStatus().

#define MechPKiller (  )     (MechPrefs(a) & MECHPREF_PKILL)

Definition at line 173 of file btmacros.h.

Referenced by DisplayTarget(), FireWeaponNumber(), mech_safety(), and PhysicalAttack().

#define MechPlusHeat (  )     (a)->rd.plus_heat

Definition at line 187 of file btmacros.h.

Referenced by aero_update(), HeatFactor(), MakeHeatScaleInfo(), mech_update(), PrintInfoStatus(), PrintShortInfo(), and UpdateHeat().

#define MechPNumSeen (  )     (a)->rd.can_see

Definition at line 167 of file btmacros.h.

Referenced by mech_plos_event(), and Sensor_DoWeSeeNow().

#define MechPrefs (  )     (a)->rd.mech_prefs

Definition at line 172 of file btmacros.h.

Referenced by display_mechpref(), and mech_mechprefs().

#define MechRadio (  )     (a)->ud.radio

Definition at line 188 of file btmacros.h.

Referenced by CheckGenericFail(), generic_radio_multiplier(), load_template(), mechrep_Rsetradio(), and save_template().

#define MechRadioInfo (  )     (MechRadioType(a) / FREQS)

Definition at line 86 of file btmacros.h.

Referenced by findCommLink(), mech_set_channelmode(), and sendchannelstuff().

#define MechRadioRange (  )     (a)->ud.radio_range

Definition at line 189 of file btmacros.h.

Referenced by CheckGenericFail(), computer_conversion(), FailureRadioRange(), FailureRadioShort(), findCommLink(), load_mechdata(), load_template(), mech_check_range(), mech_rrec_event(), mech_sendchannel(), mech_spot(), mechrep_Rsavetemp(), mechrep_Rsetradio(), save_template(), and sendchannelstuff().

#define MechRadioType (  )     ((a)->ud.radioinfo)

Definition at line 85 of file btmacros.h.

Referenced by load_template(), mechrep_Rsetradio(), and save_template().

#define MechRCTonsV (  )     (a)->rd.rcw

Definition at line 222 of file btmacros.h.

Referenced by MechCargoMaxSpeed().

#define MechRealNumsinks (  )     (a)->ud.numsinks

Definition at line 168 of file btmacros.h.

Referenced by DestroyHeatSink(), DestroyParts(), do_magic(), do_sub_magic(), HandleMechCrit(), load_mechdata(), load_template(), mech_weight_sub_veh(), mechrep_Rsavetemp(), and save_template().

#define MechRealTons (  )     ((a)->rd.row / 1024)

Definition at line 221 of file btmacros.h.

Referenced by ChargeMech(), DeathFromAbove(), mech_thrash(), MechCargoMaxSpeed(), MechFalls(), and possible_mine_explosion().

#define MechRFacing (  )     (a)->pd.facing

Definition at line 123 of file btmacros.h.

Referenced by move_mech(), and UpdateHeading().

#define MechRMaxSpeed (  )     (a)->rd.rspd

Definition at line 158 of file btmacros.h.

Referenced by MechCargoMaxSpeed().

#define MechRnd (  )     (a)->rd.rnd

Definition at line 190 of file btmacros.h.

Referenced by MNumber().

#define MechRTerrain (  )     ((MechTerrain(a) == FIRE || MechTerrain(a) == SMOKE) ? mech_underlying_terrain(a) : MechTerrain(a))

Definition at line 217 of file btmacros.h.

Referenced by aero_land(), auto_radio_command_hide(), CalculateLOSFlag(), CalculateLOSMap(), CheckNavalHeight(), CheckVTOLHeight(), collision_check(), determineDamageFromHit(), DoVehicleEngineHit(), DropGetElevation(), DropSetElevation(), FindNormalBTH(), FindPilotingSkillName(), HandleVTOLCrit(), LOCInit(), mech_club(), mech_dig(), mech_grabclub(), mech_move_event(), mech_ood_event(), mech_pickup(), mech_speed(), mech_stand(), MechFalls(), move_mech(), NewHexEntered(), PhysicalAttack(), possible_mine_poof(), and UpdateSpeed().

#define MechRTons (  )     get_weight(a)

Definition at line 219 of file btmacros.h.

Referenced by initiate_ood().

#define MechRTonsV (  )     (a)->rd.row

Definition at line 220 of file btmacros.h.

Referenced by get_weight(), MechCargoMaxSpeed(), sixth_sense_check(), and update_oweight().

#define MechScanRange (  )     (a)->ud.scan_range

Definition at line 191 of file btmacros.h.

Referenced by CheckGenericFail(), computer_conversion(), do_magic(), FailureComputerScanner(), HandleMechCrit(), load_mechdata(), load_template(), mech_report(), mech_scan(), mech_srec_event(), mechrep_Rsavetemp(), and save_template().

#define MechSChargeCounter (  )     (a)->rd.scharge_value

Definition at line 150 of file btmacros.h.

Referenced by mech_scharge_event(), mech_scharger_event(), and PrintWeaponStatus().

#define MechSections (  )     (a)->ud.sections

Definition at line 192 of file btmacros.h.

Referenced by all_limbs_recycled(), ChargeMech(), checkSectionForSpecial(), DamageMech(), DeathFromAbove(), DestroySection(), do_magic(), doBSuitCommonChecks(), DoVehicleStablizerCrit(), dump_item(), dump_locations(), FillDefaultCriticals(), FindNormalBTH(), FindWeaponNumberOnMech_Advanced(), FireWeaponNumber(), HandleFasaVehicleCrit(), HandleMechCrit(), HandleVTOLCrit(), LandMech(), load_mechdata(), load_template(), mech_bootlegger(), mech_club(), mech_explode(), mech_grabclub(), mech_masc_event(), Mech_ShowFlags(), mech_startup(), mech_thrash(), MechFullNoRecycle(), mechrep_Raddspecial(), mechrep_Raddweap(), mechrep_Rdeltech(), mechrep_Rfiremode(), mechrep_Rreload(), mechrep_Rrepair(), mechrep_Rsavetemp(), mechrep_Rshowtech(), MissileHitTarget(), NormalizeArmActuatorCrits(), NormalizeLegActuatorCrits(), NormalizeLocActuatorCrits(), PhysicalAttack(), PrintWeaponStatus(), punch_checkArm(), recycle_weaponry(), remove_inarc_pods_mech(), removeiNarcPodsTank(), techlist_func(), and update_specials().

#define MechSeemsFriend ( a,
 ) 

Value:

(MechTeam(a) == MechTeam(b) && \
                                 InLineOfSight_NB(a, b, 0, 0, 0))

Definition at line 266 of file btmacros.h.

Referenced by GetLRSMech(), GetLRSMechChar(), mech_contacts(), navigate_sketch_mechs(), PrintReport(), showNetworkTargets(), sketch_tac_mechs(), and valid_to_notice().

#define MechsElevation ( mech   )     (MechZ(mech) - ((MechUpperElevation(mech) <= MechZ(mech) ? MechUpperElevation(mech) : MechLowerElevation(mech))))

Definition at line 55 of file btmacros.h.

Referenced by DoVehicleEngineHit(), HandleVTOLCrit(), mech_fall_event(), mech_hide_event(), mech_ood_event(), and NewHexEntered().

#define MechSensor (  )     (a)->rd.sensor

Definition at line 193 of file btmacros.h.

Referenced by auto_sensor_event(), HandleMechCrit(), mech_sensorchange_event(), MechSeesOverMountain(), MechSeesRange(), MechSeesTerrain(), MechSeesThroughWater(), MechSeesThroughWoods(), mechSensorInfo(), ScrambleInfraAndLiteAmp(), Sensor_CanSee(), sensor_light_availability_check(), Sensor_SeesNow(), Sensor_ToHitBonus(), set_sensor(), and show_sensor().

#define MechSLWarn (  )     (MechPrefs(a) & MECHPREF_SLWARN)

Definition at line 176 of file btmacros.h.

Referenced by cause_lite(), and end_lite_check().

#define MechSpecials (  )     (a)->rd.specials

Definition at line 194 of file btmacros.h.

Referenced by AttackMovementMods(), auto_sensor_event(), CalculateLOSFlag(), CanChangeTo(), cause_armordamage(), cause_internaldamage(), crit_weight(), crittable(), DamageMech(), DestroyMech(), DestroyParts(), DisableSomeHS(), do_magic(), do_sub_magic(), DoVehicleFuelTankCrit(), EnableSomeHS(), engine_weight(), FindHitLocation(), FindNormalBTH(), GetBSuitName(), GetLCaseBSuitName(), HandleCritical(), HandleMechCrit(), handleWeaponCrit(), HeatFactor(), load_mechdata(), load_template(), LocateAMSDefenses(), mech_attachcables(), mech_charge(), mech_explode(), mech_loadcargo(), mech_masc(), mech_masc_event(), mech_pickup(), mech_plos_event(), mech_slite(), mech_speed(), mech_startup_event(), mech_udisembark(), mech_unloadcargo(), mech_weight_sub_mech(), mech_weight_sub_veh(), MechCargoMaxSpeed(), mechrep_gettechstring(), mechrep_Raddspecial(), mechrep_Raddtech(), mechrep_Raddweap(), mechrep_Rdeltech(), mechrep_Rsavetemp(), mechrep_Rshowtech(), PhysicalDamage(), pickup_mw(), PrintWeaponStatus(), save_template(), SearchLightInRange(), sendECMNotification(), sixth_sense_check(), techlist_func(), techstatus_func(), update_specials(), UpdateHeading(), UpdateHeat(), UpdatePilotSkillRolls(), and UpdateSpeed().

#define MechSpecials2 (  )     (a)->rd.specials2

Definition at line 195 of file btmacros.h.

Referenced by auto_astar_generate_path(), auto_sensor_event(), CanChangeTo(), drop_thru_ice(), HandleMechCrit(), isTAGDestroyed(), load_template(), load_update1(), mech_embark(), mech_enterbay(), mech_nullsig(), mech_ood_event(), mech_pickup(), mech_scharge(), mech_scharge_event(), mech_startup_event(), mech_stealtharmor(), mech_weight_sub_mech(), mech_weight_sub_veh(), MechCargoMaxSpeed(), MechFloods(), mechrep_gettechstring(), mechrep_Raddspecial(), mechrep_Raddtech(), mechrep_Rdeltech(), mechrep_Rshowtech(), mechs_in_hex(), NewHexEntered(), NormalizeAllActuatorCrits(), PrintWeaponStatus(), save_template(), sendECMNotification(), sketch_tac_mechs(), techlist_func(), techstatus_func(), and update_specials().

#define MechSpeed (  )     (a)->rd.speed

Definition at line 196 of file btmacros.h.

Referenced by aero_land(), aero_move_event(), aero_takeoff(), aero_takeoff_event(), aero_UpdateSpeed(), AttackMovementMods(), auto_astar_follow_event(), auto_calc_target_score(), auto_dumbfollow_event(), auto_dumbgoto_event(), auto_enter_event(), auto_goto_event(), auto_radio_command_report(), bsuit_hide(), bsuit_swarm(), cause_armordamage(), char_disembark(), ChargeMech(), CheckEdgeOfMap(), CheckNavalHeight(), CheckVTOLHeight(), collision_check(), correct_speed(), DeathFromAbove(), DoMotiveSystemHit(), DoVehicleCrewKilledCrit(), DoVehicleFuelTankCrit(), FindNormalBTH(), FuelCheck(), handlemwconc(), HandleOverheat(), HandleVTOLCrit(), LandMech(), Leave_Hangar(), load_update1(), LOCInit(), mech_attachcables(), mech_bootlegger(), mech_contacts(), mech_detachcables(), mech_dig(), mech_disembark(), mech_drop(), mech_dropoff(), mech_embark(), mech_enter_event(), mech_enterbase(), mech_enterbay(), mech_enterbay_event(), mech_eta(), mech_hulldown(), mech_jump(), mech_land(), mech_loadcargo(), mech_masc_event(), mech_move_event(), mech_navigate(), mech_pickup(), mech_shutdown(), mech_speed(), mech_udisembark(), MechFalls(), ModifyHeadHit(), move_mech(), NewHexEntered(), PrintInfoStatus(), PrintReport(), PrintShortInfo(), remove_inarc_pods_tank(), showNetworkData(), showNetworkTargets(), StartVTOLCrash(), StopSwarming(), TargetMovementMods(), UpdateHeading(), UpdateHeat(), UpdatePilotSkillRolls(), and UpdateSpeed().

#define MechSpotter (  )     (a)->rd.spotter

Definition at line 197 of file btmacros.h.

Referenced by artillery_FriendlyAdjustment(), clear_mech(), ClearFireAdjustments(), FindArtilleryBTH(), FindNormalBTH(), FireSpot(), FireWeaponNumber(), mech_check_range(), mech_settarget(), mech_spot(), and mech_spot_event().

#define MechStaggeredLastTurn (  )     (a)->rd.staggerstamp

Definition at line 224 of file btmacros.h.

Referenced by CheckDamage().

#define MechStaggerStamp (  )     ((a)->rd.staggerstamp - 1)

Definition at line 225 of file btmacros.h.

Referenced by CheckDamage().

#define MechStall (  )     (a)->pd.stall

Definition at line 198 of file btmacros.h.

Referenced by do_magic().

#define MechStartFX (  )     (a)->rd.startfx

Definition at line 199 of file btmacros.h.

Referenced by aero_land(), aero_takeoff_event(), aero_UpdateSpeed(), calc_dest(), CheckEdgeOfMap(), mech_jump(), mech_startup_event(), MechFalls(), and move_mech().

#define MechStartFY (  )     (a)->rd.startfy

Definition at line 200 of file btmacros.h.

Referenced by aero_land(), aero_takeoff_event(), aero_UpdateSpeed(), calc_dest(), CheckEdgeOfMap(), mech_jump(), mech_startup_event(), MechFalls(), and move_mech().

#define MechStartFZ (  )     (a)->rd.startfz

Definition at line 201 of file btmacros.h.

Referenced by aero_land(), aero_move_event(), aero_takeoff_event(), aero_UpdateSpeed(), calc_dest(), CheckEdgeOfMap(), mech_jump(), mech_startup_event(), MechFalls(), and move_mech().

#define MechStartSpin (  )     (a)->rd.sspin

Definition at line 202 of file btmacros.h.

Referenced by aero_ControlEffect(), and aero_update().

#define MechStatus (  )     (a)->rd.status

Definition at line 203 of file btmacros.h.

Referenced by AddTerrainMod(), aero_land(), auto_calc_target_score(), cause_armordamage(), ChargeMech(), CheckVTOLHeight(), clear_mech(), clear_mech_from_LOS(), common_checks(), DamageMech(), DeathFromAbove(), DisplayTarget(), do_magic(), DoVehicleEngineHit(), Dump_Mech(), FindAdvFasaVehicleHitLocation(), FindAimHitLoc(), FindFasaHitLocation(), FindHitLocation(), FindHitLocation_CritProof(), FindNormalBTH(), FindTargetHitLoc(), FindTCHitLoc(), FireWeapon(), getEnemies(), HandleCritical(), HandleMechCrit(), HandleOverheat(), HandleVTOLCrit(), handleWeaponCrit(), hex_hit(), hex_target_id(), initiate_ood(), InWeaponArc(), IsInWeaponArc(), LandMech(), load_update1(), LocateAMSDefenses(), mech_attachcables(), mech_contacts(), mech_detachcables(), mech_dropoff(), mech_embark(), mech_explode(), mech_fall_event(), mech_hulldown_event(), mech_jump(), mech_masc(), mech_masc_event(), mech_ood_event(), mech_pickup(), mech_ReAttach(), mech_recovery_event(), mech_rotatetorso(), mech_Rsetxy(), mech_scan(), mech_scharge(), mech_scharge_event(), mech_settarget(), Mech_ShowFlags(), mech_shutdown(), mech_startup_event(), mech_udisembark(), mech_unblind_event(), mech_update(), MechCargoMaxSpeed(), MechFalls(), MechFloodsLoc(), muxevent_tickmech_reattach(), muxevent_tickmech_reload(), muxevent_tickmech_removegun(), muxevent_tickmech_removepart(), muxevent_tickmech_removesection(), muxevent_tickmech_repairarmor(), muxevent_tickmech_repairgun(), muxevent_tickmech_repairinternal(), muxevent_tickmech_repairpart(), muxevent_tickmech_replacegun(), NewHexEntered(), PhysicalAttack(), possibly_ignite_or_clear(), PrefVisSens(), PrintEnemyStatus(), PrintGenericStatus(), PrintWeaponStatus(), ProlongUncon(), ScrambleInfraAndLiteAmp(), SearchLightInRange(), Sensor_DoWeSeeNow(), short_hextarget(), showNetworkTargets(), SwarmHitTarget(), UpdateConditions(), and UpdateSpeed().

#define MechStatus2 (  )     (a)->rd.status2

Definition at line 205 of file btmacros.h.

Referenced by bsuit_swarm(), checkECM(), DamageMech(), FindNormalBTH(), FireWeapon(), HandleOverheat(), initiate_ood(), mech_auto_turret(), mech_masc_event(), mech_scharge_event(), Mech_ShowFlags(), mech_shutdown(), mech_slite(), mech_update(), MechCargoMaxSpeed(), MechFalls(), MechSliteChangeEvent(), NewHexEntered(), PrintWeaponStatus(), StopSwarming(), terrain_speed(), update_LOSinfo(), and UpdateHeading().

#define MechSwarmer (  )     (a)->rd.swarmedby

Definition at line 208 of file btmacros.h.

Referenced by bsuit_swarm(), clear_mech(), and StopSwarming().

#define MechSwarmTarget (  )     (a)->rd.swarming

Definition at line 207 of file btmacros.h.

Referenced by bsuit_swarm(), BSuitMirrorSwarmedTarget(), clear_mech(), CountSwarmers(), doBSuitCommonChecks(), findSwarmers(), FindTargetHitLoc(), FireWeapon(), FireWeaponNumber(), getStatusChar(), getStatusString(), IsMechMounted(), IsMechSwarmed(), mech_attachcables(), mech_jump(), mech_pickup(), mech_settarget(), Mech_ShowFlags(), mech_speed(), MechFloods(), PhysicalAttack(), PhysicalDamage(), StopBSuitSwarmers(), StopSwarming(), and TargetMovementMods().

#define MechTacRange (  )     (a)->ud.tac_range

Definition at line 209 of file btmacros.h.

Referenced by aero_checklz(), CheckGenericFail(), computer_conversion(), do_magic(), FailureComputerScanner(), HandleMechCrit(), load_mechdata(), load_template(), mech_navigate(), mech_srec_event(), mech_tacmap(), mechrep_Rsavetemp(), and save_template().

#define MechTankCritStatus (  )     (a)->rd.tankcritstatus

Definition at line 210 of file btmacros.h.

Referenced by do_magic(), DoTurretJamCrit(), DoTurretLockCrit(), DoVehicleCrewStunnedCrit(), DoVTOLTailRotorDamagedCrit(), FindFasaHitLocation(), HandleVehicleCrit(), mech_attachcables(), mech_dig(), mech_dig_event(), mech_fixturret(), mech_pickup(), Mech_ShowFlags(), mech_speed(), mech_turret(), mech_unjam_turret_event(), PrintGenericStatus(), unstun_crew_event(), and updateAutoturnTurret().

#define MechTargComp (  )     (a)->ud.targcomp

Definition at line 241 of file btmacros.h.

Referenced by FindNormalBTH(), and FireSpot().

#define MechTarget (  )     (a)->rd.target

Definition at line 214 of file btmacros.h.

Referenced by auto_radio_command_report(), auto_sensor_event(), CheckGenericFail(), clear_mech(), clear_mech_from_LOS(), DisplayTarget(), FailureComputerTarget(), FindBSuitTarget(), FindNormalBTH(), FindTargetXY(), FireSpot(), FireWeaponNumber(), mech_bearing(), mech_charge(), mech_contacts(), mech_eta(), mech_jump(), mech_lock_event(), mech_range(), mech_report(), mech_scan(), mech_sensorchange_event(), mech_settarget(), mech_target(), mech_vector(), mech_view(), PhysicalAttack(), Sensor_DoWeSeeNow(), showNetworkTargets(), and updateAutoturnTurret().

#define MechTargX (  )     (a)->rd.targx

Definition at line 211 of file btmacros.h.

Referenced by artillery_FriendlyAdjustment(), clear_mech(), DisplayTarget(), findC3RangeWithNetwork(), FindTargetXY(), FireSpot(), FireWeaponNumber(), mech_eta(), mech_lock_event(), mech_scan(), mech_settarget(), mech_snipe_func(), and updateAutoturnTurret().

#define MechTargY (  )     (a)->rd.targy

Definition at line 212 of file btmacros.h.

Referenced by artillery_FriendlyAdjustment(), clear_mech(), DisplayTarget(), findC3RangeWithNetwork(), FindTargetXY(), FireSpot(), FireWeaponNumber(), mech_eta(), mech_lock_event(), mech_scan(), mech_settarget(), mech_snipe_func(), and updateAutoturnTurret().

#define MechTargZ (  )     (a)->rd.targz

Definition at line 213 of file btmacros.h.

Referenced by findC3RangeWithNetwork(), FindTargetXY(), FireSpot(), FireWeaponNumber(), and mech_settarget().

#define MechTeam (  )     (a)->pd.team

Definition at line 215 of file btmacros.h.

Referenced by AccumulateArtyXP(), AccumulateGunXP(), AccumulateGunXPold(), AccumulateSpotXP(), auto_calc_target_score(), autoeject(), bsuit_attackleg(), bsuit_swarm(), char_disembark(), char_eject(), checkECM(), clear_mech_from_LOS(), DamageMech(), DeathFromAbove(), domino_space(), domino_space_in_hex(), find_mech_in_hex(), findCommLink(), FindNormalBTH(), FireWeapon(), FireWeaponNumber(), getEnemies(), getFriends(), GetMechToMechID(), GetMechToMechID_base(), getOtherMechInNetwork(), getStatusChar(), is_blocked_lz(), IsMechMounted(), IsMechSwarmed(), mech_attachcables(), mech_c3_join_leave(), mech_c3i_join_leave(), mech_charge(), mech_embark(), mech_hide_event(), mech_pickup(), mech_Rsetteam(), mech_set_channelfreq(), Mech_ShowFlags(), mech_spot(), mech_tag(), mech_thrash(), mechs_in_hex(), PhysicalAttack(), pickup_mw(), remove_mech_from_map(), sendchannelstuff(), Sensor_DoWeSeeNow(), Sensor_Sees(), SwarmHitTarget(), and valid_to_notice().

#define MechTerrain (  )     (a)->pd.terrain

Definition at line 216 of file btmacros.h.

Referenced by break_thru_ice(), CheckNavalHeight(), drop_thru_ice(), fiery_death(), mech_Rsetmapindex(), mech_Rsetxy(), mech_underlying_terrain(), move_mech(), move_unit_back(), NewHexEntered(), PhysicalAttack(), swim_except(), UpdateHeat(), and UpdateMechsTerrain().

#define MechToMech_LOSFlag ( map,
from,
to   )     ((map)->LOSinfo[from->mapnumber][to->mapnumber])

Definition at line 852 of file btmacros.h.

Referenced by AddTerrainMod(), auto_calc_target_score(), InLineOfSight(), and mech_lites_target().

#define MechTons (  )     (a)->ud.tons

Definition at line 218 of file btmacros.h.

Referenced by AccumulateGunXPold(), auto_sensor_event(), calcStaggerBTHMod(), crit_weight(), DeathFromAbove(), hasPhysical(), have_axe(), have_mace(), have_sword(), load_mechdata(), load_template(), mech_attachcables(), mech_bootlegger(), mech_contacts(), mech_embark(), mech_int_check(), mech_pickup(), mech_status(), mech_thrash(), mech_udisembark(), mech_weight_sub_mech(), mech_weight_sub_veh(), MechCargoMaxSpeed(), MechFalls(), mechrep_Rsavetemp(), mechrep_Rsavetemp2(), PhysicalDamage(), PrintArmorStatus(), PrintGenericStatus(), PrintReport(), reactor_explosion(), remove_inarc_pods_mech(), save_template(), susp_factor(), update_oweight(), and update_specials().

#define MechTotalC3Masters (  )     (a)->sd.wTotalC3Masters

Definition at line 813 of file btmacros.h.

Referenced by HandleMechCrit(), and update_specials().

#define MechTurnDamage (  )     (a)->rd.turndamage

Definition at line 223 of file btmacros.h.

Referenced by CheckDamage(), DamageMech(), and UpdatePilotSkillRolls().

#define MechTurretFacing (  )     (a)->rd.turretfacing

Definition at line 227 of file btmacros.h.

Referenced by InWeaponArc(), mech_turret(), PrintShortInfo(), ShowTurretFacing(), and updateAutoturnTurret().

#define MechType (  )     (a)->ud.type

Definition at line 228 of file btmacros.h.

Referenced by AccumulateGunXP(), AccumulateGunXPold(), ActualElevation(), aero_land(), aero_takeoff(), aero_takeoff_event(), aero_UpdateSpeed(), ai_check_path(), ai_crash(), ai_path_score(), ammo_explosion(), apply_mechDamage(), armor_effect(), armorstatus_func(), AttackMovementMods(), auto_astar_follow_event(), auto_astar_generate_path(), auto_astar_goto_event(), auto_astar_roam_event(), auto_com_event(), auto_dumbfollow_event(), auto_dumbgoto_event(), auto_enter_event(), auto_leave_event(), auto_radio_command_hide(), auto_roam_generate_target_hex(), blast_hit_hexf(), bomb_list(), BreachLoc(), bsuit_attackleg(), bsuit_hide(), CalculateLOSFlag(), CalculateLOSMap(), Can_Use_Command(), CanChangeTo(), canWeapExplodeFromDamage(), canWeapJamFromDamage(), cause_armordamage(), cause_damage(), cause_internaldamage(), char_eject(), ChargeMech(), check_for_damage(), check_stagger_event(), CheckDamage(), checkGrabClubLocation(), checkVehicleInFire(), collision_check(), common_checks(), CountDestroyedLegs(), crit_weight(), CriticalStatus(), CritsInLoc(), critslot_func(), critstatus_func(), crittable(), dam_to_pc_conversion(), DamageMech(), damages_func(), DeathFromAbove(), DefaultFuelByType(), describe_repairs(), DestroyMech(), DestroyParts(), DestroySection(), determineDamageFromHit(), DisplayTarget(), do_magic(), domino_space(), domino_space_in_hex(), DoVehicleEngineHit(), DoVehicleStablizerCrit(), drop_thru_ice(), dump_item(), engine_weight(), explode_unit(), fiery_death(), FillDefaultCriticals(), FindAdvFasaVehicleHitLocation(), FindAimHitLoc(), FindBSuitTarget(), FindFasaHitLocation(), FindGunnerySkillName(), FindHitLocation(), FindHitLocation_CritProof(), findNARCHitLoc(), FindNormalBTH(), FindPilotingSkillName(), FindTargetHitLoc(), FindTCHitLoc(), FindTechSkillName(), FindWeaponNumberOnMech_Advanced(), FireWeapon(), FireWeaponNumber(), fix_entry(), FuelCheck(), GetArcID(), getC3MasterSize(), getCritAddedBTH(), getCritSubDamage(), getFriends(), GetWeaponCrits(), HandleAdvFasaVehicleCrit(), HandleCritical(), HandleMechCrit(), handleWeaponCrit(), heat_effect(), HeatFactor(), HitTarget(), initialize_pc(), Invalid_Repair_Path(), Invalid_Scrap_Path(), invalid_section(), InWeaponArc(), IsInWeaponArc(), IsMechLegLess(), isWeapAmmoFeedLocked(), LandMech(), listtic_fun(), load_mechdata(), load_template(), make_damage_table(), make_scrap_table(), mech_attachcables(), mech_bootlegger(), mech_charge(), mech_crewstun_event(), mech_critstatus(), mech_damage(), mech_disembark(), mech_drop(), mech_dump(), mech_dump_event(), mech_eject(), mech_embark(), mech_enter_event(), mech_enterbase(), mech_enterbay(), mech_enterbay_event(), mech_explode(), mech_explode_event(), mech_fall_event(), mech_grabclub(), mech_int_check(), mech_jump(), mech_land(), mech_lateral(), mech_lrsmap(), mech_move_event(), mech_navigate(), mech_ood_event(), mech_pickup(), mech_ReAttach(), mech_RepairPart(), mech_rotatetorso(), mech_safety(), mech_scan(), mech_scharge_event(), mech_sensor(), mech_shutdown(), mech_speed(), mech_spot(), mech_stand(), mech_startup(), mech_startup_event(), mech_tacmap(), mech_target(), mech_thrash(), mech_turret(), mech_udisembark(), mech_unjamammo_func(), mech_usebin(), mech_vertical(), mech_weaponstatus(), mech_weight_sub(), mech_weight_sub_veh(), MechCargoMaxSpeed(), MechFalls(), MechFloods(), MechFloodsLoc(), MechHeight(), mechrep_Raddinftech(), mechrep_Raddspecial(), mechrep_Raddweap(), mechrep_Rdisplaysection(), mechrep_Rreload(), mechrep_Rrepair(), mechrep_Rsavetemp(), mechrep_Rsetarmor(), mechrep_Rsettype(), mechrep_Rshowtech(), mechs_in_hex(), mechTypefunc(), mechtypename(), MissileHitTarget(), ModifyHeadHit(), move_mech(), muxevent_tickmech_reattach(), muxevent_tickmech_reload(), muxevent_tickmech_removegun(), muxevent_tickmech_removepart(), muxevent_tickmech_removesection(), muxevent_tickmech_repairarmor(), muxevent_tickmech_repairenhcrit(), muxevent_tickmech_repairgun(), muxevent_tickmech_repairinternal(), muxevent_tickmech_repairpart(), muxevent_tickmech_replacegun(), muxevent_tickmech_replacesuit(), muxevent_tickmech_reseal(), NewHexEntered(), pc_to_dam_conversion(), PhysicalAttack(), PhysicalDamage(), pickup_mw(), possibly_drop_thru_ice(), PrintArmorStatus(), PrintEnemyWeaponStatus(), PrintGenericStatus(), PrintInfoStatus(), PrintReport(), PrintShortInfo(), PrintWeaponStatus(), recycle_weaponry(), remove_inarc_pods_mech(), remove_inarc_pods_tank(), save_template(), Sensor_Sees(), setarmorstatus_func(), shouldDestroyWeapon(), show_mechs_damage(), show_narc_pods(), ShowTurretFacing(), showWeaponDamageAndInfo(), swim_except(), TargetMovementMods(), tech_fix(), tech_parsegun(), tech_parsepart_advanced(), TECHCOMMANDH(), techlist_func(), terrain_speed(), TFUNC_LOC(), TransferTarget(), unit_is_fixable(), update_specials(), UpdateHeading(), UpdateHeat(), UpdatePilotSkillRolls(), UpdateSpeed(), vehicle_burn_event(), vehicle_start_burn(), water_extinguish_inferno(), and weaponstatus_func().

#define MechType_Name (  )     (a)->ud.mech_name

Definition at line 229 of file btmacros.h.

Referenced by load_template(), mech_status(), mech_weaponspecs(), PrintGenericStatus(), save_template(), and try_to_find_name().

#define MechType_Ref (  )     (a)->ud.mech_type

Definition at line 230 of file btmacros.h.

Referenced by auto_set_comtitle(), do_magic(), do_sub_magic(), load_mechdata(), load_template(), mech_getset_ref(), mech_int_check(), mech_loadnew(), mech_status(), mech_weaponspecs(), PrintGenericStatus(), and vehicle_int_check().

#define MechUpperElevation ( mech   )     (MechRTerrain(mech) == ICE ? 0 : MechElevation(mech))

Definition at line 54 of file btmacros.h.

Referenced by bridge_set_elevation(), collision_check(), and mech_shutdown().

#define MechVerticalSpeed (  )     (a)->rd.verticalspeed

Definition at line 232 of file btmacros.h.

Referenced by aero_land(), aero_takeoff_event(), aero_UpdateSpeed(), cause_armordamage(), char_disembark(), CheckNavalHeight(), CheckVTOLHeight(), DoVehicleEngineHit(), DoVehicleFuelTankCrit(), FindNormalBTH(), FuelCheck(), HandleVTOLCrit(), limitSpeedToCruise(), load_update1(), mech_attachcables(), mech_enterbay(), mech_move_event(), mech_navigate(), mech_pickup(), mech_speed(), mech_startup_event(), mech_vertical(), MechFalls(), move_mech(), NewHexEntered(), PrintInfoStatus(), PrintReport(), PrintShortInfo(), StartVTOLCrash(), and TargetMovementMods().

#define MechVFacing (  )     AcceptableDegree(MechFacing(a) + MechLateral(a))

Definition at line 231 of file btmacros.h.

Referenced by mech_contacts(), PrintReport(), showNetworkData(), and showNetworkTargets().

#define MechVisMod (  )     (a)->rd.vis_mod

Definition at line 233 of file btmacros.h.

Referenced by aero_update(), mech_update(), and Sensor_CanSee().

#define MechWalkXPFactor (  )     (a)->rd.wxf

Definition at line 183 of file btmacros.h.

Referenced by load_update1(), and MechCargoMaxSpeed().

#define MechWeapHeat (  )     (a)->rd.weapheat

Definition at line 234 of file btmacros.h.

Referenced by ammo_explosion(), HitTarget(), LocateAMSDefenses(), and UpdateHeat().

#define MechWorkingC3Masters (  )     (a)->sd.wWorkingC3Masters

Definition at line 814 of file btmacros.h.

Referenced by countMaxC3Units(), HandleMechCrit(), trimC3Network(), and update_specials().

#define MechX (  )     (a)->pd.x

Definition at line 235 of file btmacros.h.

Referenced by AccumulatePilXP(), aero_checklz(), aero_land(), aero_takeoff(), aero_takeoff_event(), artillery_shoot(), auto_astar_follow_event(), auto_astar_generate_path(), auto_astar_goto_event(), auto_astar_roam_event(), auto_dumbfollow_event(), auto_dumbgoto_event(), auto_enter_event(), auto_goto_event(), auto_radio_command_goto(), auto_radio_command_report(), auto_roam_generate_target_hex(), autoeject(), blast_hit_hexf(), break_thru_ice(), bsuit_hide(), CalculateLOSFlag(), calcWeatherPilotEffects(), char_disembark(), char_eject(), CheckEdgeOfMap(), CheckNavalHeight(), checkTAG(), collision_check(), DestroyMech(), DestroyParts(), determineDamageFromHit(), DisplayTarget(), domino_space(), domino_space_in_hex(), drop_thru_ice(), DS_BlastNearbyMechsAndTrees(), Find_DS_Bay_In_MechHex(), find_mech_in_hex(), FindBSuitTarget(), findC3RangeWithNetwork(), FindNormalBTH(), FireSpot(), FireWeapon(), FireWeaponNumber(), fun_btid2db(), fun_btlosm2m(), get_lrshexstr(), HexLOSBroadcast(), initiate_ood(), LandMech(), Leave_Hangar(), litemark_map(), load_update1(), loading_bay_whine(), LOCInit(), mech_attachcables(), mech_bearing(), mech_c3_join_leave(), mech_c3i_join_leave(), mech_charge(), mech_contacts(), mech_detachcables(), mech_dropoff(), mech_embark(), mech_enter_event(), mech_enterbase(), mech_enterbay(), mech_enterbay_event(), mech_findcenter(), mech_hide_event(), mech_jump(), mech_lock_event(), mech_navigate(), mech_pickup(), mech_radio(), mech_range(), mech_report(), mech_Rsetmapindex(), mech_Rsetxy(), mech_scan(), mech_settarget(), mech_spot(), mech_tacmap(), mech_tag(), mech_thrash(), mech_udisembark(), mech_underlying_terrain(), mech_vector(), mech_view(), mechCentBearingfunc(), mechCentDistfunc(), MechFireBroadcast(), MechLOSBroadcast(), MechLOSBroadcasti(), mechs_in_hex(), mechSeenByNetwork(), Missile_Hit(), move_mech(), move_unit_back(), navigate_sketch_mechs(), NewHexEntered(), parse_tacargs(), PhysicalAttack(), possible_mine_poof(), PrintInfoStatus(), PrintReport(), PrintShortInfo(), ScrambleInfraAndLiteAmp(), setWeatherHeatEffects(), show_building_in_hex(), show_lrs_map(), showNetworkData(), showNetworkTargets(), ShutDownMap(), sketch_tac_mechs(), sketch_tac_ownmech(), slow_down_if_neccessary(), speed_up_if_neccessary(), SwarmHitTarget(), swim_except(), trace_maphexlos(), trace_slitelos(), update_LOSinfo(), UpdateMechsTerrain(), and water_extinguish_inferno().

#define MechXPMod (  )     (a)->rd.xpmod

Definition at line 97 of file btmacros.h.

Referenced by AccumulateGunXPold(), load_template(), and load_update1().

#define MechY (  )     (a)->pd.y

Definition at line 236 of file btmacros.h.

Referenced by AccumulatePilXP(), aero_checklz(), aero_land(), aero_takeoff(), aero_takeoff_event(), artillery_shoot(), auto_astar_follow_event(), auto_astar_generate_path(), auto_astar_goto_event(), auto_astar_roam_event(), auto_dumbfollow_event(), auto_dumbgoto_event(), auto_enter_event(), auto_goto_event(), auto_radio_command_goto(), auto_radio_command_report(), auto_roam_generate_target_hex(), autoeject(), blast_hit_hexf(), break_thru_ice(), bsuit_hide(), CalculateLOSFlag(), calcWeatherPilotEffects(), char_disembark(), char_eject(), CheckEdgeOfMap(), CheckNavalHeight(), checkTAG(), collision_check(), DestroyMech(), DestroyParts(), determineDamageFromHit(), DisplayTarget(), domino_space(), domino_space_in_hex(), drop_thru_ice(), DS_BlastNearbyMechsAndTrees(), Find_DS_Bay_In_MechHex(), find_mech_in_hex(), FindBSuitTarget(), findC3RangeWithNetwork(), FindNormalBTH(), FireSpot(), FireWeapon(), FireWeaponNumber(), fun_btid2db(), fun_btlosm2m(), get_lrshexstr(), HexLOSBroadcast(), initiate_ood(), LandMech(), Leave_Hangar(), litemark_map(), load_update1(), loading_bay_whine(), LOCInit(), mech_attachcables(), mech_bearing(), mech_c3_join_leave(), mech_c3i_join_leave(), mech_charge(), mech_contacts(), mech_detachcables(), mech_dropoff(), mech_embark(), mech_enter_event(), mech_enterbase(), mech_enterbay(), mech_enterbay_event(), mech_findcenter(), mech_hide_event(), mech_jump(), mech_lock_event(), mech_navigate(), mech_pickup(), mech_radio(), mech_range(), mech_report(), mech_Rsetmapindex(), mech_Rsetxy(), mech_scan(), mech_settarget(), mech_spot(), mech_tacmap(), mech_tag(), mech_thrash(), mech_udisembark(), mech_underlying_terrain(), mech_vector(), mech_view(), mechCentBearingfunc(), mechCentDistfunc(), MechFireBroadcast(), MechLOSBroadcast(), MechLOSBroadcasti(), mechs_in_hex(), mechSeenByNetwork(), Missile_Hit(), move_mech(), move_unit_back(), navigate_sketch_mechs(), NewHexEntered(), parse_tacargs(), PhysicalAttack(), possible_mine_poof(), PrintInfoStatus(), PrintReport(), PrintShortInfo(), ScrambleInfraAndLiteAmp(), setWeatherHeatEffects(), show_building_in_hex(), show_lrs_map(), showNetworkData(), showNetworkTargets(), ShutDownMap(), sketch_tac_mechs(), sketch_tac_ownmech(), slow_down_if_neccessary(), speed_up_if_neccessary(), SwarmHitTarget(), swim_except(), trace_maphexlos(), trace_slitelos(), update_LOSinfo(), UpdateMechsTerrain(), and water_extinguish_inferno().

#define MechZ (  )     (a)->pd.z

Definition at line 237 of file btmacros.h.

Referenced by ActualElevation(), aero_land(), aero_move_event(), aero_UpdateSpeed(), aero_vheading(), blast_hit_hexf(), bridge_set_elevation(), CalculateLOSFlag(), CalculateLOSMap(), calcWeatherPilotEffects(), cause_armordamage(), char_disembark(), CheckNavalHeight(), CheckVTOLHeight(), collision_check(), DamageMech(), DeathFromAbove(), determineDamageFromHit(), DoVehicleEngineHit(), DoVehicleFuelTankCrit(), DropGetElevation(), DropSetElevation(), DS_BlastNearbyMechsAndTrees(), FindNormalBTH(), FindTargetHitLoc(), FuelCheck(), HandleVTOLCrit(), initiate_ood(), LandMech(), litemark_map(), load_update1(), mech_attachcables(), mech_contacts(), mech_detachcables(), mech_dropoff(), mech_embark(), mech_enterbay(), mech_explode_event(), mech_fall_event(), mech_findcenter(), mech_jump(), mech_navigate(), mech_ood_damage(), mech_ood_event(), mech_pickup(), mech_range(), mech_Rsetxy(), mech_shutdown(), mech_speed(), mech_stand(), mech_startup_event(), mech_udisembark(), MechFalls(), MechFloods(), Missile_Hit(), move_mech(), move_unit_back(), NewHexEntered(), PhysicalAttack(), possible_mine_poof(), PrintInfoStatus(), PrintReport(), PrintShortInfo(), reactor_explosion(), Sensor_CanSee(), Sensor_DoWeSeeNow(), show_building_in_hex(), showNetworkData(), showNetworkTargets(), sketch_tac_mechs(), steppable_base_check(), swim_except(), terrain_speed(), update_LOSinfo(), and UpdateHeat().

#define MFreqs (  )     MechFreqs(a)

Definition at line 88 of file btmacros.h.

Referenced by findCommLink(), fun_btmechfreqs(), mech_list_freqs(), mech_sendchannel(), mech_set_channelfreq(), mech_set_channelmode(), mech_set_channeltitle(), and sendchannelstuff().

#define MirrorPosition ( from,
to,
heightMod   ) 

Value:

do {     MechFX(to) = MechFX(from); \
          MechFY(to) = MechFY(from); \
          MechFZ(to) = MechFZ(from) + (heightMod * ZSCALE); \
          MechX(to) = MechX(from); \
          MechY(to) = MechY(from); \
          MechZ(to) = MechZ(from) + heightMod; \
          MechLastX(to) = MechLastX(from); \
          MechLastY(to) = MechLastY(from); \
          MechTerrain(to) = MechTerrain(from); \
          MechElev(to) = MechElev(from) + heightMod; MarkForLOSUpdate(to); MechFloods(to); } while (0)

Definition at line 612 of file btmacros.h.

Referenced by bsuit_swarm(), BSuitMirrorSwarmedTarget(), Leave_DS_Bay(), Leave_Hangar(), mech_pickup(), and move_mech().

#define MMaxSpeed (  )     ((float) MechCargoMaxSpeed((a),(float) MechMaxSpeed((a))))

Definition at line 159 of file btmacros.h.

Referenced by aero_takeoff(), aero_thrust(), aero_UpdateSpeed(), ai_adjust_move(), ai_crash(), ai_max_speed(), ai_path_score(), ai_set_speed(), auto_radio_command_report(), correct_speed(), DoVTOLRotorDamagedCrit(), FuelCheck(), Leave_Hangar(), limitSpeedToCruise(), mech_drop(), mech_dump(), mech_embark(), mech_enter_event(), mech_enterbase(), mech_enterbay_event(), mech_jump(), mech_masc(), mech_scharge(), mech_speed(), mech_udisembark(), mech_unjamammo_func(), mech_vertical(), MechCargoMaxSpeed(), NewHexEntered(), PrintGenericStatus(), slow_down_if_neccessary(), speed_up_if_neccessary(), UpdateHeading(), UpdateHeat(), UpdatePilotSkillRolls(), and UpdateSpeed().

#define MoveMod ( mech   ) 

Value:

(MechType(mech) == CLASS_MW ? 3 : \
 (MechIsBiped(mech) || MechIsQuad(mech)) ? 2 : 1)

Definition at line 656 of file btmacros.h.

Referenced by bridge_set_elevation(), and collision_check().

#define MoveModeChange (  )     muxevent_count_type_data(EVENT_MOVEMODE,(void *) a)

Definition at line 855 of file btmacros.h.

Referenced by DamageMech(), FindNormalBTH(), Mech_ShowFlags(), MechCargoMaxSpeed(), MechFalls(), NewHexEntered(), and UpdatePilotSkillRolls().

#define MoveModeData (  )     muxevent_count_type_data_firstev(EVENT_MOVEMODE, (void *) a)

Definition at line 857 of file btmacros.h.

Referenced by DamageMech(), and FindNormalBTH().

#define MoveModeLock (  )     (MechStatus2(a) & MOVE_MODES_LOCK || (MoveModeChange(a) && !(MechStatus2(a) & DODGING)))

Definition at line 856 of file btmacros.h.

Referenced by DamageMech(), DeathFromAbove(), doBSuitCommonChecks(), FireWeaponNumber(), mech_jump(), mech_pickup(), mech_spot(), and phys_common_checks().

#define Moving (  )     muxevent_count_type_data(EVENT_MOVE,(void *) a)

Definition at line 401 of file btmacros.h.

Referenced by mech_attachcables(), and mech_pickup().

#define MWalkingSpeed ( maxspeed   )     ((float) 2.0 * (maxspeed) / 3.0 + 0.1)

Definition at line 33 of file btmacros.h.

#define NotInWater ( mech   )     (!(OnWater(mech)))

Definition at line 681 of file btmacros.h.

Referenced by mech_heading(), mech_ood_event(), mech_speed(), and mech_vertical().

#define NullSigSysActive ( mech   )     (MechStatus2(mech) & NULLSIGSYS_ON)

Definition at line 799 of file btmacros.h.

Referenced by FindBTHByC3Range(), FindBTHByRange(), HandleMechCrit(), HeatFactor(), mech_nullsig(), Mech_ShowFlags(), PrintWeaponStatus(), and UpdateHeat().

#define NullSigSysChanging ( mech   )     muxevent_count_type_data(EVENT_NSS, (void *) mech)

Definition at line 802 of file btmacros.h.

Referenced by mech_nullsig().

#define NullSigSysDest ( mech   )     (MechCritStatus(mech) & NSS_DESTROYED)

Definition at line 798 of file btmacros.h.

Referenced by changeNullSigSysEvent(), mech_nullsig(), and PrintWeaponStatus().

#define OBJEVENT ( obj,
type,
func,
time,
data   )     muxevent_add(time, 0, type, func, (void *) obj, (void *) (data))

Definition at line 283 of file btmacros.h.

Referenced by building_regen_event(), and possibly_start_building_regen().

#define OkayCritSect ( sect,
num,
ok   )     OkayCritSect2(mech,sect,num,ok)

Definition at line 697 of file btmacros.h.

#define OkayCritSect2 ( mech,
sect,
num,
ok   )     (GetPartType(mech,sect,num)==(ok) && !PartIsNonfunctional(mech,sect,num))

Definition at line 699 of file btmacros.h.

#define OkayCritSectS ( sect,
num,
ok   )     OkayCritSect(sect,num,I2Special(ok))

Definition at line 698 of file btmacros.h.

Referenced by axe_checkArm(), checkGrabClubLocation(), HandleMechCrit(), mace_checkArm(), mech_club(), mech_pickup(), PhysicalDamage(), punch_checkArm(), remove_inarc_pods_mech(), saw_checkArm(), sword_checkArm(), and techlist_func().

#define OkayCritSectS2 ( mech,
sect,
num,
ok   )     OkayCritSect2(mech,sect,num,I2Special(ok))

Definition at line 701 of file btmacros.h.

Referenced by canUsePhysical().

#define OnWater ( mech   )     (IsWater(MechRTerrain((mech))) && MechZ(mech)<=0)

Definition at line 662 of file btmacros.h.

#define OODing (  )     MechCocoon(a)

Definition at line 459 of file btmacros.h.

Referenced by auto_gun_event(), bsuit_hide(), CheckDamage(), DestroyParts(), domino_space_in_hex(), FindNormalBTH(), FireWeapon(), getStatusChar(), getStatusString(), HandleMechCrit(), HandleOverheat(), initiate_ood(), mech_attachcables(), mech_dig(), mech_drop(), mech_embark(), mech_enter_event(), mech_enterbase(), mech_enterbay(), mech_enterbay_event(), mech_grabclub(), mech_hulldown(), mech_jump(), mech_move_event(), mech_ood_event(), mech_pickup(), mech_stand(), mech_thrash(), mechs_in_hex(), and UpdatePilotSkillRolls().

#define Overwater ( mech   ) 

Value:

(MechMove(mech) == MOVE_HOVER || MechType(mech) == CLASS_MW || \
 MechMove(mech) == MOVE_FOIL || MechMove(mech) == MOVE_HULL)

Definition at line 652 of file btmacros.h.

Referenced by bridge_set_elevation(), collision_check(), and DropGetElevation().

#define PartIsBroken ( a,
b,
c   )     (GetPartFireMode(a,b,c) & (DESTROYED_MODE|BROKEN_MODE))

Definition at line 321 of file btmacros.h.

Referenced by check_for_scrappage(), CriticalStatus(), DestroyMainWeapon(), FindMainWeapon(), HandleMechCrit(), JamMainWeapon(), mech_ReSeal(), mech_weaponstatus(), pickRandomWeapon(), and PrintWeaponStatus().

#define PartIsDamaged ( a,
b,
c   )     (GetPartFireMode(a,b,c) & DAMAGED_MODE)

Definition at line 315 of file btmacros.h.

Referenced by check_for_damage(), countDamagedSlots(), CriticalStatus(), DestroyWeapon(), mech_ReSeal(), showWeaponDamageAndInfo(), and TECHCOMMANDH().

#define PartIsDestroyed ( a,
b,
c   )     (GetPartFireMode(a,b,c) & DESTROYED_MODE)

Definition at line 324 of file btmacros.h.

Referenced by apply_mechDamage(), bomb_drop(), check_for_damage(), CriticalStatus(), critslot_func(), DestroyParts(), do_magic(), DS_Bay_Is_Open(), FindDestructiveAmmo(), FindInfernoAmmo(), HandleMechCrit(), mech_embark(), mech_scharge_event(), mechDamagefunc(), NormalizeLocActuatorCrits(), showWeaponDamageAndInfo(), TECHCOMMANDH(), TFUNC_LOCPOS(), and WeaponIsNonfunctional().

#define PartIsDisabled ( a,
b,
c   )     (GetPartFireMode(a,b,c) & DISABLED_MODE)

Definition at line 318 of file btmacros.h.

Referenced by CriticalStatus(), critslot_func(), DestroyParts(), HandleMechCrit(), mech_ReSeal(), mech_weaponstatus(), PrintWeaponStatus(), showWeaponDamageAndInfo(), TECHCOMMANDH(), and WeaponIsNonfunctional().

#define PartIsNonfunctional ( a,
b,
c   )     (PartIsDisabled(a,b,c) || PartIsBroken(a,b,c) || PartIsDestroyed(a,b,c))

Definition at line 314 of file btmacros.h.

Referenced by BlowDumpingAmmo(), check_for_damage(), CountAmmoForWeapon(), countWorkingC3MastersOnMech(), CriticalStatus(), critstatus_func(), do_sub_magic(), Dump_Decrease(), findAmmoInSection(), FindAmmunition(), findArmBTHMod(), FindArtemisForWeapon(), FindLegHeatSinks(), FindObj(), FindRoundsForWeapon(), FindWeaponFromIndex(), FindWeaponNumberOnMech_Advanced(), HandleMechCrit(), handleWeaponCrit(), isPartOfWorkingC3Master(), listtic_fun(), LocateAMSDefenses(), mech_dump(), mech_dump_event(), mech_eject(), mech_embark(), PhysicalAttack(), PrintEnemyWeaponStatus(), TECHCOMMANDH(), and weaponstatus_func().

#define PartTempNuke ( mech,
a,
 )     (GetPartRBrand(mech,a,b)>>4)

Definition at line 309 of file btmacros.h.

Referenced by apply_mechDamage(), check_for_damage(), critstatus_func(), FireWeaponNumber(), handleWeaponCrit(), mech_toggle_mode_sub_func(), mech_unjamammo_func(), mech_weaponstatus(), mechDamagefunc(), pickRandomWeapon(), PrintWeaponStatus(), recycle_weaponry(), TECHCOMMANDH(), and weaponstatus_func().

#define PerECCMActive ( mech   )     PerECCMEnabled(mech)

Definition at line 729 of file btmacros.h.

#define PerECCMEnabled ( mech   )     (MechStatus2(mech) & PER_ECCM_ENABLED)

Definition at line 732 of file btmacros.h.

Referenced by checkECM(), and PrintWeaponStatus().

#define PerECMActive ( mech   )     (PerECMEnabled(mech) && !ECMCountered(mech))

Definition at line 728 of file btmacros.h.

Referenced by PrintWeaponStatus().

#define PerECMEnabled ( mech   )     (MechStatus2(mech) & PER_ECM_ENABLED)

Definition at line 731 of file btmacros.h.

Referenced by checkECM(), and PrintWeaponStatus().

#define PerformingAction (  )     (MechStatus(a) & PERFORMING_ACTION)

Definition at line 472 of file btmacros.h.

Referenced by mech_heading(), and mech_speed().

 
#define RCache_Flush (  ) 

Definition at line 705 of file btmacros.h.

#define RCache_Remove (  ) 

Definition at line 704 of file btmacros.h.

#define Readnum ( tovar,
fromvar   )     (!(tovar = atoi(fromvar)) && strcmp(fromvar, "0"))

Definition at line 633 of file btmacros.h.

Referenced by auto_astar_follow_event(), auto_astar_goto_event(), auto_command_autogun(), auto_command_embark(), auto_command_pickup(), auto_command_roam(), auto_command_speed(), auto_delcommand(), auto_dumbfollow_event(), auto_dumbgoto_event(), auto_goto_event(), auto_jump(), auto_leave_event(), auto_radio_command_autogun(), auto_radio_command_dgoto(), auto_radio_command_goto(), auto_radio_command_heading(), auto_radio_command_jumpjet(), auto_radio_command_leavebase(), auto_radio_command_ogoto(), auto_radio_command_position(), auto_radio_command_speed(), auto_radio_command_sweight(), debug_makemechs(), debug_setvrt(), debug_setxplevel(), fun_btdamagemech(), fun_btgetcharvalue(), fun_btmakemechs(), fun_btmapelev(), fun_btmapterr(), fun_btremovestores(), fun_btsetcharvalue(), initiate_ood(), map_addice(), map_delice(), map_setconditions(), mech_bomb(), mech_brief(), mech_damage(), mech_inarc_ammo_toggle(), mech_rac(), mech_usebin(), multi_weap_sel(), and text2bv().

#define Recovering (  )     muxevent_count_type_data(EVENT_RECOVERY,(void *) a)

Definition at line 408 of file btmacros.h.

Referenced by ProlongUncon().

#define RemovingPods (  )     muxevent_count_type_data(EVENT_REMOVE_PODS,(void *) a)

Definition at line 402 of file btmacros.h.

Referenced by FireWeapon(), mech_grabclub(), mech_jump(), and mech_speed().

#define RGotGPilot ( mech   ) 

Value:

((pilot_override && GunPilot(mech) > 0 && (Connected(GunPilot(mech)) || \
                                                !isPlayer(GunPilot(mech)))) \
      || (!pilot_override && RGotPilot(mech)))

Definition at line 69 of file btmacros.h.

Referenced by AccumulateArtyXP(), AccumulateGunXP(), AccumulateGunXPold(), FindPilotArtyGun(), FindPilotGunnery(), and MadePerceptionRoll().

#define RGotPilot ( mech   )     ((GotPilot(mech)) && (Connected(MechPilot(mech)) || !isPlayer(MechPilot(mech))))

Definition at line 62 of file btmacros.h.

Referenced by AccumulateCommXP(), AccumulatePilXP(), AccumulateSpotXP(), FindPilotPiloting(), FindPilotSpotting(), mech_ss_event(), move_mech(), and NewHexEntered().

#define RollingT (  )     ((MechType(a) == CLASS_AERO) || (MechType(a) == CLASS_DS))

Definition at line 411 of file btmacros.h.

Referenced by aero_move_event(), aero_takeoff_event(), aero_thrust(), and mech_speed().

#define ScenError ( msg...   )     send_channel("ScenErrors",msg)

Definition at line 556 of file btmacros.h.

#define ScenStatus ( msg...   )     send_channel("ScenStatus",msg)

Definition at line 557 of file btmacros.h.

#define SearchlightChanging (  )     muxevent_count_type_data(EVENT_SLITECHANGING, (void *) a)

Definition at line 481 of file btmacros.h.

Referenced by mech_slite().

#define SectArmorRepair ( a,
 )     SomeoneFixingA(a,b)

Definition at line 332 of file btmacros.h.

Referenced by ArmorEvaluateSerious().

#define SectIntsRepair ( a,
 )     SomeoneFixingI(a,b)

Definition at line 334 of file btmacros.h.

Referenced by ArmorEvaluateSerious().

#define SectIsBreached ( a,
 )     ((a)->ud.sections[b].config & SECTION_BREACHED)

Definition at line 339 of file btmacros.h.

Referenced by BreachLoc(), and IsLegDestroyed().

#define SectIsDestroyed ( a,
 )     (!GetSectArmor(a,b) && ((is_aero(a) || !GetSectInt(a,b)) && !IsDS(a)))

Definition at line 336 of file btmacros.h.

Referenced by AccumulateGunXP(), aero_takeoff(), ammo_weight(), axe_checkArm(), BreachLoc(), canUsePhysical(), check_for_damage(), check_for_scrappage(), checkGrabClubLocation(), checkSectionForSpecial(), CriticalStatus(), critstatus_func(), DamageMech(), DestroyMainWeapon(), DestroySection(), do_magic(), DoAmmunitionCrit(), doBSuitCommonChecks(), DoTurretBlownOffCrit(), DoVTOLRotorDestroyedCrit(), DoWeaponDestroyedCrit(), DoWeaponJamCrit(), explode_unit(), FindMainWeapon(), FireWeaponNumber(), IsLegDestroyed(), JamMainWeapon(), mace_checkArm(), mech_club(), mech_Detach(), mech_explode(), mech_fall_event(), mech_pickup(), mech_ReAttach(), mech_ReplaceSuit(), mech_ReSeal(), mech_thrash(), mech_weight_sub_veh(), no_locations_destroyed(), PrintEnemyWeaponStatus(), punch_checkArm(), recycle_weaponry(), saw_checkArm(), show_narc_pods(), sword_checkArm(), TECHCOMMANDH(), unit_is_fixable(), and UpdatePilotSkillRolls().

#define SectIsFlooded ( a,
 )     ((a)->ud.sections[b].config & SECTION_FLOODED)

Definition at line 349 of file btmacros.h.

Referenced by check_for_damage(), IsLegDestroyed(), mech_ReSeal(), MechFloodsLoc(), and TECHCOMMANDH().

#define SectRArmorRepair ( a,
 )     SomeoneFixingA(a,b+8)

Definition at line 333 of file btmacros.h.

Referenced by ArmorEvaluateSerious().

#define Seeing (  )     muxevent_count_type_data(EVENT_PLOS,(void *) a)

Definition at line 392 of file btmacros.h.

#define Sees360 ( mech   )     ((MechMove(mech)==MOVE_NONE) || (MechType(mech) == CLASS_BSUIT))

Definition at line 642 of file btmacros.h.

Referenced by Sensor_CanSee(), sensor_mode_name(), and Sensor_SeesNow().

#define SeeWhenShutdown (  )     (MechStatus(mech) & AUTOCON_WHEN_SHUTDOWN)

Definition at line 484 of file btmacros.h.

Referenced by Sensor_DoWeSeeNow().

#define SendAI ( msg...   )     send_channel("MechAI",msg)

Definition at line 558 of file btmacros.h.

Referenced by ai_adjust_move(), ai_check_path(), auto_astar_follow_event(), auto_astar_goto_event(), auto_astar_roam_event(), auto_com_event(), auto_command_autogun(), auto_command_embark(), auto_command_pickup(), auto_command_roam(), auto_command_speed(), auto_delcommand(), auto_dumbfollow_event(), auto_dumbgoto_event(), auto_enter_event(), auto_get_command_arg(), auto_get_command_enum(), auto_goto_next_command(), auto_leave_event(), auto_reply(), sendAIM(), and sendchannelstuff().

#define SendAlloc ( msg   ) 

Definition at line 559 of file btmacros.h.

#define SendAttackEmits ( msg...   )     send_channel("MechAttackEmits",msg)

Definition at line 575 of file btmacros.h.

Referenced by FireWeapon().

#define SendAttacks ( msg...   )     send_channel("MechAttacks",msg)

Definition at line 576 of file btmacros.h.

Referenced by FireWeapon(), and PhysicalAttack().

#define SendAttackXP ( msg...   )     send_channel("MechAttackXP",msg)

Definition at line 577 of file btmacros.h.

Referenced by AccumulateArtyXP(), and AccumulateGunXPold().

#define SendBTHDebug ( msg...   )     send_channel("MechBTHDebug",msg)

Definition at line 578 of file btmacros.h.

#define SendCustom ( msg...   )     send_channel("MechCustom",msg)

Definition at line 561 of file btmacros.h.

#define SendDB ( msg...   )     send_channel("DBInfo",msg)

Definition at line 562 of file btmacros.h.

Referenced by SaveSpecialObjects().

#define SendDebug ( msg...   )     send_channel("MechDebugInfo",msg)

Definition at line 563 of file btmacros.h.

Referenced by ChannelEmitKill(), ChargeMech(), check_stagger_event(), CheckDamage(), debugC3(), HeatFactor(), MadePilotSkillRoll_Advanced(), MadePilotSkillRoll_NoXP(), mech_bootlegger(), mech_dropoff(), mech_explode(), mech_explode_event(), mech_pickup(), move_mech(), and Sensor_ToHitBonus().

#define SendDSInfo ( msg...   )     send_channel("DSInfo",msg)

Definition at line 570 of file btmacros.h.

Referenced by aero_land(), aero_takeoff(), aero_takeoff_event(), and ChannelEmitKill().

#define SendEcon ( msg...   )     send_channel("MechEconInfo",msg)

Definition at line 564 of file btmacros.h.

Referenced by fun_btaddstores(), and mech_Rresetstuff().

#define SendError ( msg...   )     send_channel("MechErrors",msg)

Definition at line 565 of file btmacros.h.

Referenced by AccumulateGunXPold(), auto_cal_mapindex(), autoeject(), CalculateLOSMap(), char_disembark(), char_eject(), CheckEdgeOfMap(), CheckNavalHeight(), display_mechpref(), do_sub_magic(), engine_weight(), FindTargetDBREFFromMapNumber(), get_lrshexstr(), HandleMechCrit(), initialize_pc(), InLineOfSight(), InWeaponArc(), Leave_Hangar(), list_matching(), load_template(), LOSMap_Hex2Index(), map_load(), map_setmapsize(), mech_dump(), mech_enterbase(), mech_int_check(), move_mech(), nonrecursive_commlink(), pos_part_name(), possibly_see_mech(), remove_mech_from_map(), update_specials(), and vehicle_int_check().

#define SendEvent ( msg...   )     send_channel("EventInfo",msg)

Definition at line 566 of file btmacros.h.

Referenced by map_savemap().

#define SendFreqs ( msg...   )     send_channel("MechFreqs",msg)

Definition at line 579 of file btmacros.h.

Referenced by mech_set_channelfreq().

#define SendLoc ( msg   ) 

Definition at line 560 of file btmacros.h.

Referenced by mech_Rsetmapindex(), and mech_Rsetxy().

#define SendPilotXP ( msg...   )     send_channel("MechPilotXP",msg)

Definition at line 580 of file btmacros.h.

Referenced by AccumulatePilXP().

#define SendSensor ( msg...   )     send_channel("MechSensor",msg)

Definition at line 567 of file btmacros.h.

Referenced by clear_mech_from_LOS(), and Sensor_DoWeSeeNow().

#define SendTechXP ( msg...   )     send_channel("MechTechXP",msg)

Definition at line 581 of file btmacros.h.

Referenced by AccumulateTechWeaponsXP(), and AccumulateTechXP().

#define SendTrigger ( msg...   )     send_channel("MineTriggers",msg)

Definition at line 568 of file btmacros.h.

Referenced by make_mine_explode().

#define SendXP ( msg...   )     send_channel("MechXP",msg)

Definition at line 569 of file btmacros.h.

Referenced by AccumulateCommXP(), AccumulateComputerXP(), AccumulateSpotXP(), fun_btsetcharvalue(), and MadePerceptionRoll().

#define SensorChange (  )     muxevent_count_type_data(EVENT_SCHANGE,(void *) a)

Definition at line 403 of file btmacros.h.

Referenced by mechSensorInfo(), and show_sensor().

#define SetAngelECMDisturbed ( mech   )     (MechStatus2(mech) |= ANGEL_ECM_DISTURBED)

Definition at line 782 of file btmacros.h.

Referenced by checkECM().

#define SetAngelECMProtected ( mech   )     (MechStatus2(mech) |= ANGEL_ECM_PROTECTED)

Definition at line 785 of file btmacros.h.

Referenced by checkECM().

#define SetBit ( val,
bit   )     (val |= bit)

Definition at line 636 of file btmacros.h.

#define SetCarriedCargo ( a,
 )     do { MechCarriedCargo(a) = (b) ; SetCWCheck(a); } while (0)

Definition at line 100 of file btmacros.h.

Referenced by SetCargoWeight().

#define SetCarrying ( a,
 )     do { MechCarrying(a) = (b) ; SetCWCheck(a) ; } while (0)

Definition at line 102 of file btmacros.h.

Referenced by mech_attachcables(), mech_detachcables(), mech_dropoff(), mech_embark(), and mech_pickup().

#define SetCWCheck (  )     MechCritStatus(a) &= ~LOAD_OK

Definition at line 98 of file btmacros.h.

#define SetECMCountered ( mech   )     (MechStatus2(mech) |= ECM_COUNTERED)

Definition at line 749 of file btmacros.h.

Referenced by checkECM().

#define SetECMDisturbed ( mech   )     (MechStatus2(mech) |= ECM_DISTURBANCE)

Definition at line 752 of file btmacros.h.

Referenced by checkECM().

#define SetECMProtected ( mech   )     (MechStatus2(mech) |= ECM_PROTECTED)

Definition at line 755 of file btmacros.h.

Referenced by checkECM().

#define SetElevation ( mapn,
x,
y,
 )     SetMap(mapn,x,y,GetTerrain(mapn,x,y),e)

Definition at line 553 of file btmacros.h.

Referenced by break_sub(), and map_addhex().

#define SetFacing ( a,
 )     SetRFacing(a,SHO2FSIM(b))

Definition at line 125 of file btmacros.h.

Referenced by aero_UpdateSpeed(), bsuit_swarm(), CheckDamage(), CheckNavalHeight(), mech_bootlegger(), and MechFalls().

#define SetMap ( mapn,
x,
y,
t,
 )     mapn->map[y][x] = Coding_GetIndex(t,e)

Definition at line 549 of file btmacros.h.

Referenced by initialize_map_empty(), and map_load().

#define SetMapB ( mapn,
x,
y,
t,
 )     mapn[y][x] = Coding_GetIndex(t,e)

Definition at line 550 of file btmacros.h.

Referenced by map_setmapsize().

#define SetMaxSpeed ( a,
 )     do {MechMaxSpeed(a) = b;MechCritStatus(a) &= ~SPEED_OK;correct_speed(a);} while (0)

Definition at line 155 of file btmacros.h.

Referenced by cause_armordamage(), DoMotiveSystemHit(), DoVehicleEngineHit(), FindFasaHitLocation(), HandleFasaVehicleCrit(), HandleVehicleCrit(), HandleVTOLCrit(), load_template(), mech_masc_event(), mech_scharge_event(), NormalizeAllActuatorCrits(), and StartVTOLCrash().

#define SetMechPKiller (  )     (MechPrefs(a) |= MECHPREF_PKILL)

Definition at line 174 of file btmacros.h.

Referenced by mech_safety().

#define SetMechStaggerStamp ( a,
 )     ((a)->rd.staggerstamp = (b) + 1)

Definition at line 226 of file btmacros.h.

Referenced by CheckDamage().

#define SetPartAmmoMode ( a,
b,
c,
 )     GetPartAmmoMode(a,b,c)=d

Definition at line 293 of file btmacros.h.

Referenced by do_magic(), initialize_pc(), and load_template().

#define SetPartBrand ( mech,
a,
b,
 )     GetPartRBrand(mech,a,b) = (d) + (PartTempNuke(mech,a,b)<<4)

Definition at line 307 of file btmacros.h.

Referenced by do_magic(), load_template(), muxevent_tickmech_replacegun(), and TECHCOMMANDH().

#define SetPartDamageFlags ( a,
b,
c,
 )     GetPartDamageFlags(a,b,c)=d

Definition at line 296 of file btmacros.h.

#define SetPartData ( a,
b,
c,
 )     GetPartData(a,b,c)=d

Definition at line 302 of file btmacros.h.

Referenced by apply_mechDamage(), BlowDumpingAmmo(), decrement_ammunition(), do_magic(), DoAmmunitionCrit(), Dump_Decrease(), initialize_pc(), load_template(), mech_FillPartAmmo(), mech_RepairPart(), muxevent_tickmech_reload(), and TECHCOMMANDH().

#define SetPartDesiredAmmoLoc ( a,
b,
c,
 )     GetPartDesiredAmmoLoc(a,b,c)=d

Definition at line 299 of file btmacros.h.

Referenced by load_template(), and mech_usebin().

#define SetPartFireMode ( a,
b,
c,
 )     GetPartFireMode(a,b,c)=d

Definition at line 290 of file btmacros.h.

Referenced by do_magic(), initialize_pc(), and load_template().

#define SetPartTempNuke ( mech,
a,
b,
 )     GetPartRBrand(mech,a,b) = GetPartBrand(mech,a,b) + ((d) << 4)

Definition at line 310 of file btmacros.h.

Referenced by apply_mechDamage(), DoWeaponJamCrit(), FailureWeaponDud(), FailureWeaponJammed(), FailureWeaponMissiles(), FailureWeaponSpike(), JamMainWeapon(), mech_disableweap_func(), mech_unjam_ammo_event(), muxevent_tickmech_repairenhcrit(), and recycle_weaponry().

#define SetPartType ( a,
b,
c,
 )     GetPartType(a,b,c)=d

Definition at line 287 of file btmacros.h.

Referenced by bomb_drop(), do_magic(), initialize_pc(), and load_template().

#define SetRecycleLimb ( a,
b,
c   )     do { UpdateRecycling(a) ; (a)->ud.sections[b].recycle=c; } while (0)

Definition at line 418 of file btmacros.h.

Referenced by ChargeMech(), DeathFromAbove(), DestroySection(), mech_bootlegger(), mech_grabclub(), mech_udisembark(), PhysicalAttack(), remove_inarc_pods_mech(), and StartBSuitRecycle().

#define SetRecyclePart ( a,
b,
c,
 )     do { UpdateRecycling(a) ; SetPartData(a,b,c,d); } while (0)

Definition at line 416 of file btmacros.h.

Referenced by DoWeaponJamCrit(), FailureWeaponDud(), FailureWeaponJammed(), FailureWeaponSpike(), and LocateAMSDefenses().

#define SetRFacing ( a,
 )     MechRFacing(a) = (b)

Definition at line 124 of file btmacros.h.

Referenced by move_mech(), and UpdateHeading().

#define SetSectArmor ( a,
b,
c   )     do { (a)->ud.sections[b].armor=c;SetWCheck(a); } while (0)

Definition at line 357 of file btmacros.h.

Referenced by apply_mechDamage(), cause_armordamage(), DestroySection(), initialize_pc(), load_mechdata(), load_template(), mechrep_Rrepair(), mechrep_Rsetarmor(), muxevent_tickmech_repairarmor(), and setarmorstatus_func().

#define SetSectBreached ( a,
 )     do { MechSections(a)[b].config |= SECTION_BREACHED ; SetWCheck(a); } while (0)

Definition at line 340 of file btmacros.h.

Referenced by BreachLoc().

#define SetSectDestroyed ( a,
 ) 

Definition at line 337 of file btmacros.h.

Referenced by DestroySection(), and load_template().

#define SetSectFlooded ( a,
 )     do { MechSections(a)[b].config |= SECTION_FLOODED ; SetWCheck(a); } while (0)

Definition at line 350 of file btmacros.h.

Referenced by MechFloodsLoc().

#define SetSectInt ( a,
b,
c   )     do { (a)->ud.sections[b].internal=c;SetWCheck(a); } while (0)

Definition at line 359 of file btmacros.h.

Referenced by apply_mechDamage(), cause_internaldamage(), DestroySection(), initialize_pc(), load_mechdata(), load_template(), mech_int_check(), mech_ReAttach(), mech_ReplaceSuit(), mechrep_Rrepair(), mechrep_Rsetarmor(), muxevent_tickmech_repairinternal(), setarmorstatus_func(), and vehicle_int_check().

#define SetSectOArmor ( a,
b,
c   )     (a)->ud.sections[b].armor_orig=c

Definition at line 365 of file btmacros.h.

Referenced by initialize_pc(), load_mechdata(), load_template(), and mechrep_Rsetarmor().

#define SetSectOInt ( a,
b,
c   )     (a)->ud.sections[b].internal_orig=c

Definition at line 367 of file btmacros.h.

Referenced by initialize_pc(), load_mechdata(), load_template(), mech_int_check(), mechrep_Rsetarmor(), and vehicle_int_check().

#define SetSectORArmor ( a,
b,
c   )     (a)->ud.sections[b].rear_orig=c

Definition at line 366 of file btmacros.h.

Referenced by load_mechdata(), load_template(), and mechrep_Rsetarmor().

#define SetSectRArmor ( a,
b,
c   )     do { (a)->ud.sections[b].rear=c;SetWCheck(a); } while (0)

Definition at line 358 of file btmacros.h.

Referenced by apply_mechDamage(), cause_armordamage(), DestroySection(), load_mechdata(), load_template(), mechrep_Rrepair(), mechrep_Rsetarmor(), muxevent_tickmech_repairarmor(), and setarmorstatus_func().

#define SetTerrain ( mapn,
x,
y,
 )     do {SetMap(mapn,x,y,t,GetElevation(mapn,x,y));UpdateMechsTerrain(mapn,x,y,t); } while (0)

Definition at line 551 of file btmacros.h.

Referenced by add_decoration(), break_sub(), clear_hex(), del_mapobj(), DS_BlastNearbyMechsAndTrees(), fire_dissipation_event(), ice_growth(), ice_melt(), map_addhex(), and map_savemap().

#define SetTerrainBase ( mapn,
x,
y,
 )     SetMap(mapn,x,y,t,GetElevation(mapn,x,y))

Definition at line 552 of file btmacros.h.

Referenced by make_bridges().

#define SetTurnMode ( a,
 )     do { if (b) MechPrefs(a) |= MECHPREF_TURNMODE; else MechPrefs(a) &= ~MECHPREF_TURNMODE; } while (0)

Definition at line 269 of file btmacros.h.

Referenced by mech_turnmode().

#define SetWCheck (  )     MechCritStatus(a) &= ~OWEIGHT_OK

Definition at line 99 of file btmacros.h.

Referenced by ammo_expedinture_check().

#define Shutdown (  ) 

Value:

Definition at line 498 of file btmacros.h.

Referenced by HandleOverheat(), mech_attachcables(), mech_embark(), mech_pickup(), and mech_shutdown().

#define SideSlipping (  )     muxevent_count_type_data(EVENT_SIDESLIP, (void *) a)

Definition at line 862 of file btmacros.h.

Referenced by mech_lateral_event(), and Mech_ShowFlags().

#define Spinning ( mech   )     (MechCritStatus(mech) & SPINNING)

Definition at line 689 of file btmacros.h.

Referenced by aero_ControlEffect(), aero_thrust(), aero_update(), aero_UpdateSpeed(), getStatusChar(), getStatusString(), and mech_heading().

#define Sprinting (  )     (MechStatus2(a) & SPRINTING)

Definition at line 859 of file btmacros.h.

Referenced by getStatusChar(), getStatusString(), initiate_ood(), mech_speed(), UpdateHeat(), and UpdateSpeed().

#define Stabilizing (  )     muxevent_count_type_data(EVENT_JUMPSTABIL,(void *) a)

Definition at line 404 of file btmacros.h.

Referenced by AttackMovementMods(), mech_hulldown(), and mech_jump().

#define StaggerDamage ( mech   )     ( (mech)->rd.staggerDamage )

Definition at line 840 of file btmacros.h.

Referenced by CheckDamage(), and DamageMech().

#define Staggering ( mech   )     ( StaggerLevel(mech) > 0 )

Definition at line 836 of file btmacros.h.

Referenced by getStatusChar(), LandMech(), mech_drop(), mech_jump(), and Mech_ShowFlags().

#define StaggerLevel ( mech   )     ( (mech)->rd.staggerDamage / 20 )

Definition at line 842 of file btmacros.h.

Referenced by calcStaggerBTHMod(), check_stagger_event(), CheckDamage(), and mech_drop().

#define Standing (  )     muxevent_count_type_data(EVENT_STAND,(void *) a)

Definition at line 406 of file btmacros.h.

Referenced by AttackMovementMods(), auto_astar_follow_event(), auto_astar_goto_event(), auto_astar_roam_event(), auto_dumbfollow_event(), auto_dumbgoto_event(), auto_enter_event(), auto_leave_event(), getStatusChar(), getStatusString(), mech_drop(), mech_embark(), mech_enter_event(), mech_enterbase(), mech_enterbay(), mech_enterbay_event(), mech_hulldown(), mech_jump(), mech_speed(), phys_common_checks(), and PhysicalAttack().

#define StandMechTime (  )     (30 / BOUNDED(1,(MechMaxSpeed(a)/MP2),30))

Definition at line 478 of file btmacros.h.

Referenced by mech_hulldown(), and mech_stand().

#define Standrecovering (  )     muxevent_count_type_data(EVENT_STANDFAIL, (void *) a)

Definition at line 405 of file btmacros.h.

Referenced by mech_stand().

#define Started (  )     (MechStatus(a) & STARTED)

Definition at line 465 of file btmacros.h.

Referenced by aero_move_event(), aero_update(), ammo_expedinture_check(), artillery_FriendlyAdjustment(), auto_astar_follow_event(), auto_astar_goto_event(), auto_astar_roam_event(), auto_calc_target_score(), auto_command_shutdown(), auto_command_startup(), auto_dumbfollow_event(), auto_dumbgoto_event(), auto_enter_event(), auto_gun_event(), auto_leave_event(), auto_sensor_event(), calcStaggerBTHMod(), CanChangeTo(), changeNullSigSysEvent(), changeStealthArmorEvent(), ChargeMech(), common_checks(), DamageMech(), DestroyParts(), domino_space_in_hex(), Dump_Mech(), FailureComputerShutdown(), findCommLink(), firetic_sub_func(), FuelCheck(), getOtherMechInNetwork(), getStatusChar(), getStatusString(), HandleMechCrit(), HandleOverheat(), load_update1(), load_update4(), LocateAMSDefenses(), MadePilotSkillRoll_Advanced(), MadePilotSkillRoll_NoXP(), mech_attachcables(), mech_c3_join_leave(), mech_c3i_join_leave(), mech_contacts(), mech_crewstun_event(), mech_dig_event(), mech_disembark(), mech_dump_event(), mech_eject(), mech_embark(), mech_enter_event(), mech_enterbay_event(), mech_explode_event(), mech_fall_event(), mech_hide_event(), mech_hulldown_event(), mech_lateral_event(), mech_masc_event(), mech_notify(), mech_ood_event(), mech_pickup(), mech_plos_event(), mech_printf(), mech_scharge_event(), mech_sensorchange_event(), mech_shutdown(), mech_startup(), mech_udisembark(), mech_unjam_ammo_event(), mech_unjam_turret_event(), mech_update(), mechs_in_hex(), MechSliteChangeEvent(), PrintGenericStatus(), recycle_weaponry(), Sensor_DoWeSeeNow(), set_sensor(), sketch_tac_mechs(), update_LOSinfo(), updateAutoturnTurret(), UpdateHeat(), UpdatePilotSkillRolls(), and vehicle_extinquish_fire().

#define Starting (  )     muxevent_count_type_data(EVENT_STARTUP,(void *) a)

Definition at line 407 of file btmacros.h.

Referenced by auto_astar_follow_event(), auto_astar_goto_event(), auto_astar_roam_event(), auto_command_startup(), auto_dumbfollow_event(), auto_dumbgoto_event(), auto_enter_event(), auto_leave_event(), DestroyParts(), getStatusChar(), getStatusString(), mech_shutdown(), and mech_startup().

#define StartSeeing (  ) 

Definition at line 491 of file btmacros.h.

Referenced by load_update4().

#define StartSpinning ( mech   )     (MechCritStatus(mech) |= SPINNING)

Definition at line 691 of file btmacros.h.

Referenced by aero_ControlEffect().

#define StartStaggerCheck ( mech   )     do { MECHEVENT(mech, EVENT_CHECK_STAGGER, check_stagger_event, 5, 0); SendDebug(tprintf("Starting stagger check for %d.", mech->mynum)); } while (0)

Definition at line 838 of file btmacros.h.

Referenced by CheckDamage().

#define Startup (  ) 

Value:

do { MechStatus(a) |= STARTED;MechTurnDamage(a) = 0;UpdateRecycling(a); \
    MechNumSeen(a)=0; StartSeeing(a); } while (0)

Definition at line 494 of file btmacros.h.

Referenced by load_template(), mech_startup_event(), and mech_udisembark().

#define StealthArmorActive ( mech   )     (MechStatus2(mech) & STH_ARMOR_ON)

Definition at line 792 of file btmacros.h.

Referenced by FindBTHByC3Range(), FindBTHByRange(), FireWeaponNumber(), HandleMechCrit(), HeatFactor(), Mech_ShowFlags(), mech_stealtharmor(), PrintWeaponStatus(), and UpdateHeat().

#define StealthArmorChanging ( mech   )     muxevent_count_type_data(EVENT_STEALTH_ARMOR, (void *) mech)

Definition at line 795 of file btmacros.h.

Referenced by mech_stealtharmor().

#define StopBurning (  )     muxevent_remove_type_data(EVENT_VEHICLEBURN, (void *) a)

Definition at line 383 of file btmacros.h.

Referenced by clear_mech(), do_magic(), and vehicle_extinquish_fire_event().

#define StopBurningSide ( a,
side   )     muxevent_remove_type_data_data(EVENT_VEHICLEBURN, (void *) a, (void *) side)

Definition at line 384 of file btmacros.h.

#define StopCrewStunning (  )     muxevent_remove_type_data(EVENT_CREWSTUN, (void *) a)

Definition at line 379 of file btmacros.h.

Referenced by ModifyHeadHit().

#define StopDec (  )     muxevent_remove_type_data2(EVENT_DECORATION, (void *) a)

Definition at line 281 of file btmacros.h.

Referenced by del_mapobj().

#define StopDigging (  )     muxevent_remove_type_data(EVENT_DIG, (void *) a);MechTankCritStatus(a) &= ~DIGGING_IN

Definition at line 451 of file btmacros.h.

Referenced by mech_heading(), and mech_speed().

#define StopDump (  )     muxevent_remove_type_data(EVENT_DUMP, (void *) a)

Definition at line 442 of file btmacros.h.

Referenced by BlowDumpingAmmo(), and mech_dump().

#define StopExploding (  )     muxevent_remove_type_data(EVENT_EXPLODE, (void *) a)

Definition at line 436 of file btmacros.h.

Referenced by mech_explode().

#define StopHiding (  )     muxevent_remove_type_data(EVENT_HIDE, (void *) a)

Definition at line 450 of file btmacros.h.

Referenced by aero_takeoff(), FireWeaponNumber(), move_mech(), and Sensor_DoWeSeeNow().

#define StopHullDown (  )     muxevent_remove_type_data(EVENT_CHANGING_HULLDOWN, (void *) a)

Definition at line 452 of file btmacros.h.

Referenced by mech_hulldown().

#define StopJump (  )     muxevent_remove_type_data(EVENT_JUMP, (void *) a)

Definition at line 443 of file btmacros.h.

Referenced by LandMech(), mech_jump_event(), and MechFalls().

#define StopLateral (  )     muxevent_remove_type_data(EVENT_LATERAL,(void *) a)

Definition at line 437 of file btmacros.h.

Referenced by mech_lateral().

#define StopLock (  ) 

Value:

Definition at line 479 of file btmacros.h.

Referenced by bsuit_swarm(), and mech_settarget().

#define StopMasc (  )     muxevent_remove_type_data(EVENT_MASC_FAIL,(void *) a)

Definition at line 438 of file btmacros.h.

Referenced by mech_masc().

#define StopMascR (  )     muxevent_remove_type_data(EVENT_MASC_REGEN,(void *) a)

Definition at line 439 of file btmacros.h.

Referenced by mech_masc().

#define StopMoveMode (  )     muxevent_remove_type_data(EVENT_MOVEMODE, (void *) a)

Definition at line 858 of file btmacros.h.

Referenced by DamageMech(), and MechFalls().

#define StopMoving (  )     muxevent_remove_type_data(EVENT_MOVE, (void *) a)

Definition at line 445 of file btmacros.h.

Referenced by HandleOverheat(), initiate_ood(), mech_attachcables(), mech_detachcables(), mech_dropoff(), mech_pickup(), and MechFalls().

#define StopOOD (  )     muxevent_remove_type_data(EVENT_OOD, (void *) a)

Definition at line 444 of file btmacros.h.

Referenced by mech_ood_damage().

#define StopPerformingAction (  )     (MechStatus(a) &= ~PERFORMING_ACTION)

Definition at line 473 of file btmacros.h.

Referenced by do_magic().

#define StopSCharge (  )     muxevent_remove_type_data(EVENT_SCHARGE_FAIL,(void *) a)

Definition at line 440 of file btmacros.h.

Referenced by mech_scharge().

#define StopSChargeR (  )     muxevent_remove_type_data(EVENT_SCHARGE_REGEN,(void *) a)

Definition at line 441 of file btmacros.h.

Referenced by mech_scharge().

#define StopSensorChange (  )     muxevent_remove_type_data(EVENT_SCHANGE,(void *) a)

Definition at line 448 of file btmacros.h.

Referenced by set_sensor().

#define StopSideslip (  )     muxevent_remove_type_data(EVENT_SIDESLIP, (void *) a)

Definition at line 863 of file btmacros.h.

Referenced by mech_lateral_event().

#define StopSpinning ( mech   )     (MechCritStatus(mech) &= ~SPINNING)

Definition at line 690 of file btmacros.h.

Referenced by aero_takeoff_event(), and aero_update().

#define StopStabilization (  )     muxevent_remove_type_data(EVENT_JUMPSTABIL, (void *) a)

Definition at line 447 of file btmacros.h.

#define StopStaggerCheck ( mech   )     do { muxevent_remove_type_data(EVENT_CHECK_STAGGER, (void *) mech); (mech)->rd.staggerDamage=0; (mech)->rd.lastStaggerNotify=0; SendDebug(tprintf("Stopping stagger check for %d.", mech->mynum)); } while (0)

Definition at line 839 of file btmacros.h.

Referenced by check_stagger_event(), CheckDamage(), and LandMech().

#define StopStand (  )     muxevent_remove_type_data(EVENT_STAND, (void *) a)

Definition at line 446 of file btmacros.h.

Referenced by DestroyParts(), HandleOverheat(), mech_attachcables(), and mech_pickup().

#define StopStartup (  )     muxevent_remove_type_data(EVENT_STARTUP, (void *) a)

Definition at line 449 of file btmacros.h.

Referenced by mech_shutdown().

#define StopTakeOff (  )     muxevent_remove_type_data(EVENT_TAKEOFF, (void *) a)

Definition at line 453 of file btmacros.h.

Referenced by aero_land().

#define StunCrew (  )     MECHEVENT(a, EVENT_UNSTUN_CREW, unstun_crew_event, 60, 0)

Definition at line 375 of file btmacros.h.

Referenced by DoVehicleCrewStunnedCrit().

#define TaggedBy ( mech   )     (mech)->sd.taggedBy

Definition at line 828 of file btmacros.h.

Referenced by checkTAG(), FindNormalBTH(), mech_tag(), PrintWeaponStatus(), stopTAG(), and tag_recycle_event().

#define TagRecycling (  )     muxevent_count_type_data(EVENT_TAG_RECYCLE,(void *) a)

Definition at line 829 of file btmacros.h.

Referenced by mech_tag(), and PrintWeaponStatus().

#define TAGTarget ( mech   )     (mech)->sd.tagTarget

Definition at line 827 of file btmacros.h.

Referenced by checkTAG(), mech_Rsetmapindex(), mech_tag(), PrintWeaponStatus(), stopTAG(), tag_recycle_event(), and update_LOSinfo().

#define TakingOff (  )     muxevent_count_type_data(EVENT_TAKEOFF,(void *) a)

Definition at line 409 of file btmacros.h.

Referenced by aero_land(), and aero_takeoff().

#define TEMPLATE_ERR ( a,
b...   ) 

Value:

if (a) { \
if (fp) fclose(fp); return -1; }

Definition at line 602 of file btmacros.h.

Referenced by load_template().

#define TEMPLATE_GERR   TEMPLATE_ERR

Definition at line 605 of file btmacros.h.

Referenced by load_mechdata(), and load_template().

#define TemplateMaxSpeed (  )     (a)->ud.template_maxspeed

Definition at line 154 of file btmacros.h.

Referenced by load_template(), and NormalizeAllActuatorCrits().

#define ToggleBit ( val,
bit   )     do { if (!(val & bit)) SetBit(val,bit);else UnSetBit(val,bit); } while (0)

Definition at line 640 of file btmacros.h.

#define Towable (  )     (MechCritStatus(a) & TOWABLE)

Definition at line 471 of file btmacros.h.

Referenced by mech_attachcables(), and mech_pickup().

#define Towed (  )     (MechStatus(a) & TOWED)

Definition at line 470 of file btmacros.h.

Referenced by getStatusChar(), getStatusString(), mech_attachcables(), mech_pickup(), and mech_startup().

#define UnBreakPart ( a,
b,
c   )     (GetPartFireMode(a,b,c) &= ~BROKEN_MODE)

Definition at line 323 of file btmacros.h.

#define UnDamagePart ( a,
b,
c   )     do { (GetPartFireMode(a,b,c) &= ~DAMAGED_MODE); SetPartDamageFlags(a,b,c,0); SetPartTempNuke(a,b,c,0); } while (0)

Definition at line 317 of file btmacros.h.

Referenced by muxevent_tickmech_repairenhcrit().

#define UnDestroyPart ( a,
b,
c   )     do { (GetPartFireMode(a,b,c) &= ~(DESTROYED_MODE|HOTLOAD_MODE|DISABLED_MODE|BROKEN_MODE|DAMAGED_MODE)); SetPartDamageFlags(a,b,c,0); SetPartTempNuke(a,b,c,0); } while (0)

Definition at line 326 of file btmacros.h.

Referenced by apply_mechDamage(), and mech_RepairPart().

#define UnDisablePart ( a,
b,
c   )     (GetPartFireMode(a,b,c) &= ~DISABLED_MODE)

Definition at line 320 of file btmacros.h.

Referenced by mech_ReSeal().

#define UnJammingAmmo (  )     muxevent_count_type_data(EVENT_UNJAM_AMMO, (void *) a)

Definition at line 455 of file btmacros.h.

Referenced by FireWeapon(), mech_grabclub(), mech_jump(), mech_speed(), mech_unjamammo_func(), and remove_inarc_pods_tank().

#define UnJammingAmmoData ( a,
type   )     muxevent_get_type_data(EVENT_UNJAM_AMMO, (void *) a, (void *) type)

Definition at line 456 of file btmacros.h.

#define UnjammingTurret (  )     muxevent_count_type_data(EVENT_UNJAM_TURRET, (void *) a)

Definition at line 454 of file btmacros.h.

Referenced by ChargeMech(), FireWeapon(), and remove_inarc_pods_tank().

#define UnSetAngelECMDisturbed ( mech   )     (MechStatus2(mech) &= ~ANGEL_ECM_DISTURBED)

Definition at line 783 of file btmacros.h.

Referenced by checkECM().

#define UnSetAngelECMProtected ( mech   )     (MechStatus2(mech) &= ~ANGEL_ECM_PROTECTED)

Definition at line 786 of file btmacros.h.

Referenced by checkECM().

#define UnSetBit ( val,
bit   )     (val &= ~(bit))

Definition at line 637 of file btmacros.h.

#define UnSetECMCountered ( mech   )     (MechStatus2(mech) &= ~ECM_COUNTERED)

Definition at line 750 of file btmacros.h.

Referenced by checkECM().

#define UnSetECMDisturbed ( mech   )     (MechStatus2(mech) &= ~ECM_DISTURBANCE)

Definition at line 753 of file btmacros.h.

Referenced by checkECM().

#define UnSetECMProtected ( mech   )     (MechStatus2(mech) &= ~ECM_PROTECTED)

Definition at line 756 of file btmacros.h.

Referenced by checkECM().

#define UnSetMechPKiller (  )     (MechPrefs(a) &= ~MECHPREF_PKILL)

Definition at line 175 of file btmacros.h.

Referenced by mech_safety(), mech_startup_event(), and mech_udisembark().

#define UnSetSectBreached ( a,
 )     do { MechSections(a)[b].config &= ~SECTION_BREACHED ; SetWCheck(a); } while (0)

Definition at line 342 of file btmacros.h.

Referenced by do_magic().

#define UnSetSectDestroyed ( a,
 ) 

Definition at line 338 of file btmacros.h.

Referenced by mech_ReAttach(), and mech_ReplaceSuit().

#define UnSetSectFlooded ( a,
 )     do { MechSections(a)[b].config &= ~SECTION_FLOODED ; SetWCheck(a); } while (0)

Definition at line 351 of file btmacros.h.

Referenced by mech_ReAttach(), and mech_ReSeal().

#define UpdateRecycling (  ) 

Value:

do { if (Started(a) && !Destroyed(a) && a->rd.last_weapon_recycle != muxevent_tick) \
    recycle_weaponry(a); } while (0)

Definition at line 420 of file btmacros.h.

Referenced by load_update4(), mech_heartbeat(), and PrintWeaponStatus().

#define ValidCoord ( mech_map,
newx,
newy   )     ValidCoordA(mech_map,newx, newy, "Illegal coordinates!")

Definition at line 628 of file btmacros.h.

Referenced by mech_settarget().

#define ValidCoordA ( mech_map,
newx,
newy,
msg   ) 

Value:

DOCHECK(newx < 0 || newx >= mech_map->map_width || \
        newy < 0 || newy >= mech_map->map_height, \
        msg)

Definition at line 624 of file btmacros.h.

Referenced by mech_report(), and mech_scan().

#define WalkingSpeed ( maxspeed   )     ((float) 2.0 * (maxspeed) / 3.0)

Definition at line 34 of file btmacros.h.

Referenced by limitSpeedToCruise(), mech_speed(), mech_udisembark(), MechCargoMaxSpeed(), ModifyHeadHit(), and NewHexEntered().

#define WaterBeast ( mech   )     (MechMove(mech)==MOVE_HULL || MechMove(mech)==MOVE_FOIL)

Definition at line 682 of file btmacros.h.

Referenced by CalculateLOSFlag(), CalculateLOSMap(), mech_heading(), mech_ood_event(), mech_speed(), and mech_vertical().

#define WeaponUnJammingAmmo ( a,
type   )     muxevent_count_type_data_data(EVENT_UNJAM_AMMO, (void *) a, (void *) type)

Definition at line 457 of file btmacros.h.

#define WpnIsRecycling ( a,
b,
c   ) 

Value:

(GetPartData(a,b,c) > 0 && \
                                IsWeapon(GetPartType(a,b,c)) && \
                                !PartIsNonfunctional(a,b,c) && \
                                !SectIsDestroyed(a,b))

Definition at line 328 of file btmacros.h.

Referenced by FindWeaponFromIndex(), handleWeaponCrit(), LocateAMSDefenses(), recycle_weaponry(), and SectHasBusyWeap().


Generated on Mon May 28 04:25:33 2007 for BattletechMUX by  doxygen 1.4.7