// // Copyright 2020 Electronic Arts Inc. // // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free // software: you can redistribute it and/or modify it under the terms of // the GNU General Public License as published by the Free Software Foundation, // either version 3 of the License, or (at your option) any later version. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed // in the hope that it will be useful, but with permitted additional restrictions // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT // distributed with this program. You should have received a copy of the // GNU General Public License along with permitted additional restrictions // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection /* $Header: F:\projects\c&c\vcs\code\defines.h_v 2.19 16 Oct 1995 16:44:54 JOE_BOSTIC $ */ /*********************************************************************************************** *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S *** *********************************************************************************************** * * * Project Name : Command & Conquer * * * * File Name : DEFINES.H * * * * Programmer : Joe L. Bostic * * * * Start Date : September 10, 1993 * * * * Last Update : September 10, 1993 [JLB] * * * *---------------------------------------------------------------------------------------------* * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #ifndef DEFINES_H #define DEFINES_H //#define PETROGLYPH_EXAMPLE_MOD /********************************************************************** ** If defined, then the advanced balancing features will be enabled ** for this version. */ //#define ADVANCED #define PATCH // Super patch (1.17?) /********************************************************************** ** The demo version of C&C will be built if the following define ** is active. */ //#define DEMO /* ** Use AI pulled in from Red Alert. ST - 7/26/2019 11:42AM */ #define USE_RA_AI /********************************************************************** ** Define this to allow play of the bonus missions for the Gateway ** bundle deal. */ #define BONUS_MISSIONS /********************************************************************** ** Handle expansion scnearios as a set of single missions with all ** necessary information self contained within the mission file. */ #ifndef DEMO #define NEWMENU #endif /********************************************************************** ** If the scenario editor to to be active in this build then uncomment ** the following #define line. */ //#define SCENARIO_EDITOR /********************************************************************** ** This define enables the full set of cheat keys and special ** command line options. */ #define CHEAT_KEYS /********************************************************************** ** If this is defined, the special Virgin limited cheat keys ** are enabled. This allows the "cheat" parameter and then only ** allows the ALT-W to win the mission. */ //#define VIRGIN_CHEAT_KEYS /********************************************************************** ** Optional parameter control for special options. */ //#define PARM_6PLAYER 0x5D9F6F24 // "6" #define PARM_6PLAYER 0x9CAFC93B // Alternate 6 player keyphrase. /* ** Enable the set of limited cheat key options. */ #ifdef VIRGIN_CHEAT_KEYS #define PARM_PLAYTEST 0xF7DDC227 // "PLAYTEST" #endif /* ** Enable the full set of cheat key options. */ #ifdef CHEAT_KEYS #ifndef PARM_PLAYTEST #define PARM_PLAYTEST 0xF7DDC227 // "PLAYTEST" #endif #define PARM_CHEATDAVID 0xBE79088C // Cheat keys for David Dettmer #define PARM_CHEATERIK 0x9F38A19D // Cheat keys for Erik Yeo #define PARM_EDITORERIK 0xC2AA509B // Map editor for Erik Yeo #define PARM_CHEATPHIL 0x39D01821 // Cheat keys for Phil Gorrow #define PARM_CHEATJOE 0xABDD0362 // Cheat keys for Joe Bostic #define PARM_CHEATBILL 0xB5B63531 // Cheat keys for Bill Randolph #define PARM_CHEAT_STEVET 0x2E7FE493 // Cheat keys for Steve Tall #define PARM_EDITORBILL 0x7E7C4CCA // "-EDITOR" #define PARM_CHEATMIKE 0x00532693 // Mike Lightner #define PARM_CHEATADAM 0xDFABC23A // Adam Isgreen #endif //#define PARM_CHEAT 0x6F4BE7CA // "CHEAT" //#define PARM_EDITOR 0x7E7C4CCA // "-EDITOR" #define PARM_EASY 0x59E975CE // "EASY" Enables easy mode. #define PARM_HARD 0xACFE9D13 // "HARD" Enables hard mode. #define PARM_INSTALL 0xD95C68A2 // "FROMINSTALL" #define PARM_TRUENAME 0xB1A34435 // Enables true object names. #define PARM_3POINT 0x03552894 // Enable three point turns. #define PARM_SCORE 0x7FDE2C33 // Enables alternate themes. #define PARM_COMBAT 0xDC57C4B2 // Gives combat advantage to attacker. #define PARM_TREETARGET 0x00AB6BEF // Allows targeting of trees without key. #define PARM_BIB 0xF7867BF0 // Disables building bibs. #define PARM_MCV 0x104DF10F // MCV undeploys rather than sells. #define PARM_HELIPAD 0x53EBECBC // Helipad can be purchased separately from helicopter. #define PARM_IQ 0x9E3881B8 // Smart self defense logic enable. #define PARM_SQUISH 0x4EA2FBDF // Squish images for infantry bodies. #define PARM_HUMAN 0xACB58F61 // Human generated sound effects. #define PARM_SCROLLING 0xC084AE82 // Restricts scrolling over the tabs. //#define PARM_SPECIAL 0xD18129F6 // Enables special mode. //#define PARM_SPECIAL 0x2E84E394 // #1 //#define PARM_SPECIAL 0x63CE7584 // #2 //#define PARM_SPECIAL 0x85F110A5 // #3 ///#define PARM_SPECIAL 0x7F65F13C // #4 //#define PARM_SPECIAL 0x431F5F61 // #5 #define PARM_SPECIAL 0x11CA05BB // #6 funpark //#define PARM_SPECIAL 0xE0F651B9 // #7 //#define PARM_SPECIAL 0x10B9683D // #8 //#define PARM_SPECIAL 0xEE1CD37D // #9 /********************************************************************** ** Defines for verifying free disk space */ #define INIT_FREE_DISK_SPACE 1024*4096 //8388608 #define SAVE_GAME_DISK_SPACE INIT_FREE_DISK_SPACE // (INIT_FREE_DISK_SPACE - (1024*4096)) //#define SAVE_GAME_DISK_SPACE 100000 /********************************************************************** ** This is the credit threshold that the computer's money must exceed ** in order for structure repair to commence. */ #define REPAIR_THRESHHOLD 1000 //#define GERMAN 1 //#define FRENCH 1 //#define JAPANESE 1 #define FOREIGN_VERSION_NUMBER 6 // // typedef enums with -1 will show this warning, even when the type of the enum is signed. It's a compiler bug, apparently // ST - 1/8/2019 9:23AM // #pragma warning (push) #pragma warning (disable:4341) /********************************************************************** ** These enumerations are used to implement RTTI. */ typedef enum RTTIType : unsigned char { RTTI_NONE=0, RTTI_INFANTRY, RTTI_INFANTRYTYPE, RTTI_UNIT, RTTI_UNITTYPE, RTTI_AIRCRAFT, RTTI_AIRCRAFTTYPE, RTTI_BUILDING, RTTI_BUILDINGTYPE, RTTI_TERRAIN, RTTI_ABSTRACTTYPE, RTTI_ANIM, RTTI_ANIMTYPE, RTTI_BULLET, RTTI_BULLETTYPE, RTTI_OVERLAY, RTTI_OVERLAYTYPE, RTTI_SMUDGE, RTTI_SMUDGETYPE, RTTI_TEAM, RTTI_TEMPLATE, RTTI_TEMPLATETYPE, RTTI_TERRAINTYPE, RTTI_OBJECT, RTTI_SPECIAL } RTTIType; /********************************************************************** ** These are the difficulty settings of the game. */ typedef enum DiffType : unsigned char { DIFF_EASY, DIFF_NORMAL, DIFF_HARD, DIFF_COUNT, DIFF_FIRST = 0 } DiffType; /********************************************************************** ** This is the size of the speech buffer. This value should be as large ** as the largest speech sample, plus a few bytes for overhead ** (16 bytes is sufficient). */ #define SPEECH_BUFFER_SIZE 50000L /********************************************************************** ** This is the size of the shape buffer. This buffer is used as a staging ** buffer for the shape drawing technology. It MUST be as big as the ** largest shape (uncompressed) that will be drawn. If this value is ** changed, be sure to update the makefile and rebuild all of the shape ** data files. */ #define SHAPE_BUFFER_SIZE 131072L // Use this to allow keep track of versions as they affect saved games. #define VERSION_NUMBER 1 #define RELEASE_NUMBER 01 #define FAME_FILE_NAME "HALLFAME.DAT" /********************************************************************** ** Map controls. The map is composed of square elements called 'cells'. ** All larger elements are build upon these. */ // Size of the map in cells. The width of the map must be a power // of two. This is accomplished by setting the width by the number of // bits it occupies. The number of meta-cells will be a subset of the // cell width. #define MAP_CELL_MAX_X_BITS 6 #define MAP_CELL_MAX_Y_BITS 6 #define MAP_CELL_X_MASK (~(~0 << MAP_CELL_MAX_X_BITS)) //#define MAP_CELL_Y_MASK ((~(~0 << MAP_CELL_MAX_Y_BITS)) << MAP_CELL_MAX_Y_BITS) // Size of the map in cells. #define MAP_CELL_W (1<(static_cast(a) | static_cast(b));} inline ThreatType operator&(ThreatType a, ThreatType b) {return static_cast(static_cast(a) & static_cast(b));} inline ThreatType operator~(ThreatType a) {return static_cast(~static_cast(a));} #define THREAT_GROUND (THREAT_VEHICLES|THREAT_BUILDINGS|THREAT_INFANTRY) /********************************************************************** ** These return values are used when determine if firing is legal. ** By examining this value it can be determined what should be done ** to fix the reason why firing wasn't allowed. */ typedef enum FireErrorType : unsigned char { FIRE_OK, // Weapon is allowed to fire. FIRE_AMMO, // No ammo available to fire? FIRE_FACING, // Not correctly facing target? FIRE_REARM, // It is busy rearming? FIRE_ROTATING, // Is it in process of rotating? FIRE_ILLEGAL, // Is it targeting something illegal? FIRE_CANT, // Is this unit one that cannot fire anything? FIRE_MOVING, // Is it moving and not allowed to fire while moving? FIRE_RANGE, // Is the target out of range? FIRE_CLOAKED, // Is the shooter currently cloaked? FIRE_BUSY // Is shooter currently doing something else? } FireErrorType; /********************************************************************** ** If an object can cloak, then it will be in one of these states. ** For objects that cannot cloak, they will always be in the ** UNCLOAKED state. This state controls how the obect transitions between ** cloaked and uncloaked conditions. */ typedef enum CloakType : unsigned char { UNCLOAKED, // Completely visible (normal state). CLOAKING, // In process of claoking. CLOAKED, // Completely cloaked (invisible). UNCLOAKING // In process of uncloaking. } CloakType; /********************************************************************** ** For units that are cloaking, these value specify the visual character ** of the object. */ typedef enum VisualType : unsigned char { VISUAL_NORMAL, // Completely visible -- normal. VISUAL_INDISTINCT, // The edges shimmer and become indistinct. VISUAL_DARKEN, // Color and texture is muted along with shimmering. VISUAL_SHADOWY, // Body is translucent in addition to shimmering. VISUAL_RIPPLE, // Just a ripple (true predator effect). VISUAL_HIDDEN, // Nothing at all is visible. } VisualType; /********************************************************************** ** These missions enumerate the various state machines that can apply to ** a game object. Only one of these state machines is active at any one ** time. */ typedef enum MissionType : char { MISSION_NONE=-1, MISSION_SLEEP, // Do nothing whatsoever. MISSION_ATTACK, // Attack nearest enemy. MISSION_MOVE, // Guard location or unit. MISSION_RETREAT, // Return home for R & R. MISSION_GUARD, // Stay still. MISSION_STICKY, // Stay still -- never recruit. MISSION_ENTER, // Move into object cooperatively. MISSION_CAPTURE, // Move into in order to capture. MISSION_HARVEST, // Hunt for and collect nearby Tiberium. MISSION_GUARD_AREA, // Active guard of area. MISSION_RETURN, // Head back to refinery. MISSION_STOP, // Sit still. MISSION_AMBUSH, // Wait until discovered. MISSION_HUNT, // Active search and destroy. MISSION_TIMED_HUNT, // Wait a while, then go into HUNT (multiplayer AI) MISSION_UNLOAD, // Search for and deliver cargo. MISSION_SABOTAGE, // Move into in order to destroy. MISSION_CONSTRUCTION, // Building buildup operation. MISSION_DECONSTRUCTION, // Building builddown operation. MISSION_REPAIR, // Repair process mission. MISSION_RESCUE, MISSION_MISSILE, MISSION_COUNT, MISSION_FIRST=0 } MissionType; /********************************************************************** ** These are the enumerated animation sequences that a building may ** be processing. These serve to control the way that a building ** appears. */ typedef enum BStateType : char { BSTATE_NONE=-1, BSTATE_CONSTRUCTION, // Construction animation. BSTATE_IDLE, // Idle animation. BSTATE_ACTIVE, // Animation when building is "doing its thing". BSTATE_FULL, // Special alternate active state. BSTATE_AUX1, // Auxiliary animation. BSTATE_AUX2, // Auxiliary animation. BSTATE_COUNT } BStateType; /********************************************************************** ** Whenever a unit is selected and a click occurs over another object ** or terrain element, there is some action to initiate. This specifies ** the different types of actions possible. This also controls how the ** mouse cursor looks when "hovering" over the spot that clicking would ** occur at. */ typedef enum ActionType : unsigned char { ACTION_NONE, // Either undefined action or "do nothing". ACTION_MOVE, // Can move there or at least try to. ACTION_NOMOVE, // Special case for movable object, but illegal mouse position. ACTION_ENTER, // Special case for infantry->APC or vehicle->Repair facility. ACTION_SELF, // Self select special case. ACTION_ATTACK, // Can attack or fire upon it in some fashion. ACTION_HARVEST, // Special harvest mode. ACTION_SELECT, // Would change selection to specified object. ACTION_TOGGLE_SELECT,// Toggles select state of the object. ACTION_CAPTURE, // The unit will try to capture the object. ACTION_REPAIR, // The target object should be repaired. ACTION_SELL, // The target building should be sold back. ACTION_SELL_UNIT, // The target unit should be sold back. ACTION_NO_SELL, // No sell or no repair. ACTION_NO_REPAIR, // No sell or no repair. ACTION_SABOTAGE, // The unit will try to sabotage/destroy the object. ACTION_ION, // That target object should be blasted. ACTION_NUKE_BOMB, // That target object should be blasted. ACTION_AIR_STRIKE, // That target object should be blasted. ACTION_GUARD_AREA, // Guard the area/object clicked on. ACTION_TOGGLE_PRIMARY, // Toggle the primary status of the factory. ACTION_NO_DEPLOY, ACTION_COUNT } ActionType; /********************************************************************** ** When a unit gets damaged, the result of the damage is returned as ** this type. It can range from no damage taken to complete destruction. */ typedef enum ResultType : unsigned char { RESULT_NONE, // No damage was taken by the target. RESULT_LIGHT, // Some damage was taken, but no state change occurred. RESULT_HALF, // Damaged to below half strength (only returned on transition). RESULT_MAJOR, // Damaged down to 1 hit point. RESULT_DESTROYED, // Damaged to complete destruction. } ResultType; /********************************************************************** ** These are the special concrete control defines. They enumerate the ** sequence order of the concrete icons in the concrete art file. */ // DEBUG === convert this to be zero based so that a nulled cell is the // default cell. enum ConcreteEnum : char { C_NONE=-1, C_LEFT=0, C_RIGHT=1, C_RIGHT_UPDOWN=2, C_LEFT_UPDOWN=3, C_UP_RIGHT=4, C_UP_LEFT=5, C_DOWN_RIGHT=6, C_DOWN_LEFT=7, C_RIGHT_DOWN=8, C_LEFT_DOWN=9, C_RIGHT_UP=10, C_LEFT_UP=11, C_UPDOWN_RIGHT=12, C_UPDOWN_LEFT=13 }; /********************************************************************** ** Units that move can move at different speeds. These enumerate the ** different speeds that a unit can move. */ typedef enum MPHType: unsigned char { MPH_IMMOBILE=0, MPH_VERY_SLOW=5, MPH_KINDA_SLOW=6, MPH_SLOW=8, MPH_SLOW_ISH=10, MPH_MEDIUM_SLOW=12, MPH_MEDIUM=18, MPH_MEDIUM_FAST=30, MPH_MEDIUM_FASTER=35, MPH_FAST=40, MPH_ROCKET=60, MPH_VERY_FAST=100, MPH_LIGHT_SPEED=255 } MPHType; /********************************************************************** ** General audio volume is enumerated by these identifiers. Since small ** volume variations are usually unnoticable when specifying the volume ** to play a sample, this enumeration list creates more readable code. */ typedef enum VolType : unsigned char { VOL_OFF=0, VOL_0=VOL_OFF, VOL_1=0x19, VOL_2=0x32, VOL_3=0x4C, VOL_4=0x66, VOL_5=0x80, VOL_6=0x9A, VOL_7=0xB4, VOL_8=0xCC, VOL_9=0xE6, VOL_10=0xFF, VOL_FULL=VOL_10 } VolType; /********************************************************************** ** The houses that can be played are listed here. Each has their own ** personality and strengths. */ typedef enum HousesType : char { HOUSE_NONE=-1, HOUSE_GOOD, // Global Defense Initiative HOUSE_BAD, // Brotherhood of Nod HOUSE_NEUTRAL, // Civilians HOUSE_JP, // Disaster Containment Team HOUSE_MULTI1, // Multi-Player house #1 HOUSE_MULTI2, // Multi-Player house #2 HOUSE_MULTI3, // Multi-Player house #3 HOUSE_MULTI4, // Multi-Player house #4 HOUSE_MULTI5, // Multi-Player house #5 HOUSE_MULTI6, // Multi-Player house #6 HOUSE_COUNT, HOUSE_FIRST=HOUSE_GOOD } HousesType; //inline HousesType operator++(HousesType &, int); #define HOUSEF_GOOD (1< 2 players. */ typedef enum ScenarioPlayerEnum : char { SCEN_PLAYER_NONE = -1, SCEN_PLAYER_GDI, SCEN_PLAYER_NOD, SCEN_PLAYER_JP, SCEN_PLAYER_2PLAYER, SCEN_PLAYER_MPLAYER, SCEN_PLAYER_COUNT, SCEN_PLAYER_FIRST = 0, } ScenarioPlayerType; //inline ScenarioPlayerType operator++(ScenarioPlayerType &, int); /********************************************************************** ** These are the directional parameters for a scenario. */ typedef enum ScenarioDirEnum : char { SCEN_DIR_NONE = -1, SCEN_DIR_EAST, SCEN_DIR_WEST, SCEN_DIR_COUNT, SCEN_DIR_FIRST = 0, } ScenarioDirType; //inline ScenarioDirType operator++(ScenarioDirType &, int); /********************************************************************** ** These are the random variations of a scenario. */ typedef enum ScenarioVarEnum : char { SCEN_VAR_NONE = -1, SCEN_VAR_A, SCEN_VAR_B, SCEN_VAR_C, SCEN_VAR_D, SCEN_VAR_COUNT, // comes before the Lose value! SCEN_VAR_LOSE, SCEN_VAR_FIRST = 0, } ScenarioVarType; //inline ScenarioVarType operator++(ScenarioVarType &, int); /********************************************************************** ** The objects to be drawn on the map are grouped into layers. These ** enumerated values specify those layers. The ground layer is sorted ** from back to front. */ typedef enum LayerType : char { LAYER_NONE=-1, LAYER_GROUND, // Touching the ground type object (units & buildings). LAYER_AIR, // Flying above the ground (explosions & flames). LAYER_TOP, // Topmost layer (aircraft & bullets). LAYER_COUNT, LAYER_FIRST=0 } LayerType; //inline LayerType operator++(LayerType &, int); /********************************************************************** ** This enumerates the various bullet types. These types specify bullet's ** visual and explosive characteristics. */ typedef enum BulletType : char { BULLET_NONE=-1, BULLET_SNIPER, // Sniper bullet. BULLET_BULLET, // Small arms BULLET_APDS, // Armor piercing projectile. BULLET_HE, // High explosive shell. BULLET_SSM, // Surface to surface small missile type. BULLET_SSM2, // MLRS missile. BULLET_SAM, // Fast homing anti-aircraft missile. BULLET_TOW, // TOW anti-vehicle short range missile. BULLET_FLAME, // Flame thrower flame. BULLET_CHEMSPRAY, // Chemical weapon spray. BULLET_NAPALM, // Napalm bomblet. BULLET_GRENADE, // Hand tossed grenade. BULLET_LASER, // Laser beam from obelisk BULLET_NUKE_UP, // Nuclear Missile on its way down BULLET_NUKE_DOWN, // Nuclear Missile on its way up BULLET_HONEST_JOHN, // SSM with napalm warhead. BULLET_SPREADFIRE, // Chain gun bullets. BULLET_HEADBUTT, // Stegosaurus, Triceratops head butt BULLET_TREXBITE, // Tyrannosaurus Rex's bite - especially bad for infantry #ifdef PETROGLYPH_EXAMPLE_MOD BULLET_NUKE_LOB, // Nuke projectile #endif //PETROGLYPH_EXAMPLE_MOD BULLET_COUNT, BULLET_FIRST=0 } BulletType; //inline BulletType operator++(BulletType &, int); /********************************************************************** ** All game buildings (structures) are enumerated here. This includes ** civilian structures as well. */ typedef enum StructType : char { STRUCT_NONE=-1, STRUCT_WEAP, STRUCT_GTOWER, STRUCT_ATOWER, STRUCT_OBELISK, STRUCT_RADAR, STRUCT_TURRET, STRUCT_CONST, STRUCT_REFINERY, STRUCT_STORAGE, STRUCT_HELIPAD, STRUCT_SAM, STRUCT_AIRSTRIP, STRUCT_POWER, STRUCT_ADVANCED_POWER, STRUCT_HOSPITAL, STRUCT_BARRACKS, STRUCT_TANKER, STRUCT_REPAIR, STRUCT_BIO_LAB, STRUCT_HAND, STRUCT_TEMPLE, STRUCT_EYE, STRUCT_MISSION, /* ** All buildings that are never used as a prerequisite ** for construction, follow this point. Typically, this is ** limited to civilian structures. */ STRUCT_V01, STRUCT_V02, STRUCT_V03, STRUCT_V04, STRUCT_V05, STRUCT_V06, STRUCT_V07, STRUCT_V08, STRUCT_V09, STRUCT_V10, STRUCT_V11, STRUCT_V12, STRUCT_V13, STRUCT_V14, STRUCT_V15, STRUCT_V16, STRUCT_V17, STRUCT_V18, STRUCT_PUMP, STRUCT_V20, STRUCT_V21, STRUCT_V22, STRUCT_V23, STRUCT_V24, STRUCT_V25, STRUCT_V26, STRUCT_V27, STRUCT_V28, STRUCT_V29, STRUCT_V30, STRUCT_V31, STRUCT_V32, STRUCT_V33, STRUCT_V34, STRUCT_V35, STRUCT_V36, STRUCT_V37, #ifdef OBSOLETE STRUCT_ROAD, #endif STRUCT_SANDBAG_WALL, STRUCT_CYCLONE_WALL, STRUCT_BRICK_WALL, STRUCT_BARBWIRE_WALL, STRUCT_WOOD_WALL, STRUCT_COUNT, STRUCT_FIRST=0 } StructType; //inline StructType operator++(StructType &, int); #define STRUCTF_NONE 0L #define STRUCTF_ADVANCED_POWER (1L << STRUCT_ADVANCED_POWER) #define STRUCTF_REPAIR (1L << STRUCT_REPAIR) #define STRUCTF_EYE (1L << STRUCT_EYE) #define STRUCTF_TEMPLE (1L << STRUCT_TEMPLE) #define STRUCTF_HAND (1L << STRUCT_HAND) #define STRUCTF_BIO_LAB (1L << STRUCT_BIO_LAB) #define STRUCTF_OBELISK (1L << STRUCT_OBELISK) #define STRUCTF_ATOWER (1L << STRUCT_ATOWER) #define STRUCTF_WEAP (1L << STRUCT_WEAP) #define STRUCTF_GTOWER (1L << STRUCT_GTOWER) #define STRUCTF_RADAR (1L << STRUCT_RADAR) #define STRUCTF_TURRET (1L << STRUCT_TURRET) #define STRUCTF_CIV1 (1L << STRUCT_CIV1) #define STRUCTF_CIV2 (1L << STRUCT_CIV2) #define STRUCTF_CIV3 (1L << STRUCT_CIV3) #define STRUCTF_CONST (1L << STRUCT_CONST) #define STRUCTF_REFINERY (1L << STRUCT_REFINERY) #define STRUCTF_STORAGE (1L << STRUCT_STORAGE) #define STRUCTF_HELIPAD (1L << STRUCT_HELIPAD) #define STRUCTF_SAM (1L << STRUCT_SAM) #define STRUCTF_AIRSTRIP (1L << STRUCT_AIRSTRIP) #define STRUCTF_POWER (1L << STRUCT_POWER) #define STRUCTF_HOSPITAL (1L << STRUCT_HOSPITAL) #define STRUCTF_BARRACKS (1L << STRUCT_BARRACKS) #define STRUCTF_TANKER (1L << STRUCT_TANKER) #define STRUCTF_MISSION (1L << STRUCT_MISSION) /********************************************************************** ** The overlays are enumerated here. An overlay functions similarly to ** a transparent icon. It is placed over the terrain but usually falls ** "under" buildings, trees, and units. */ typedef enum OverlayType : char { OVERLAY_NONE=-1, OVERLAY_CONCRETE, // Concrete. OVERLAY_SANDBAG_WALL, // Piled sandbags. OVERLAY_CYCLONE_WALL, // Chain-link fence. OVERLAY_BRICK_WALL, // Solid concrete wall. OVERLAY_BARBWIRE_WALL, // Barbed-wire wall. OVERLAY_WOOD_WALL, // Wooden fence. OVERLAY_TIBERIUM1, // Tiberium patch. OVERLAY_TIBERIUM2, // Tiberium patch. OVERLAY_TIBERIUM3, // Tiberium patch. OVERLAY_TIBERIUM4, // Tiberium patch. OVERLAY_TIBERIUM5, // Tiberium patch. OVERLAY_TIBERIUM6, // Tiberium patch. OVERLAY_TIBERIUM7, // Tiberium patch. OVERLAY_TIBERIUM8, // Tiberium patch. OVERLAY_TIBERIUM9, // Tiberium patch. OVERLAY_TIBERIUM10, // Tiberium patch. OVERLAY_TIBERIUM11, // Tiberium patch. OVERLAY_TIBERIUM12, // Tiberium patch. OVERLAY_ROAD, // Road/concrete piece. OVERLAY_SQUISH, // Squish mark for overran infantry. OVERLAY_V12, // Haystacks OVERLAY_V13, // Haystack OVERLAY_V14, // Wheat field OVERLAY_V15, // Fallow field OVERLAY_V16, // Corn field OVERLAY_V17, // Celery field OVERLAY_V18, // Potato field OVERLAY_FLAG_SPOT, // Flag start location. OVERLAY_WOOD_CRATE, // Wooden goodie crate. OVERLAY_STEEL_CRATE, // Steel goodie crate. OVERLAY_COUNT, OVERLAY_FIRST=0 } OverlayType; //inline OverlayType operator++(OverlayType &, int); /********************************************************************** ** This specifies the infantry in the game. The "E" designation is ** similar to the army classification of enlisted soldiers. */ typedef enum InfantryType : char { INFANTRY_NONE=-1, INFANTRY_E1, // Mini-gun armed. INFANTRY_E2, // Grenade thrower. INFANTRY_E3, // Rocket launcher. INFANTRY_E4, // Flame thrower equipped. INFANTRY_E5, // Chemical thrower equipped. INFANTRY_E7, // Engineer. INFANTRY_RAMBO, // Commando. INFANTRY_C1, // Civilian INFANTRY_C2, // Civilian INFANTRY_C3, // Civilian INFANTRY_C4, // Civilian INFANTRY_C5, // Civilian INFANTRY_C6, // Civilian INFANTRY_C7, // Civilian INFANTRY_C8, // Civilian INFANTRY_C9, // Civilian INFANTRY_C10, // Nikumba INFANTRY_MOEBIUS, // Dr. Moebius INFANTRY_DELPHI, // Agent "Delphi" INFANTRY_CHAN, // Dr. Chan INFANTRY_COUNT, INFANTRY_FIRST=0 } InfantryType; //inline InfantryType operator++(InfantryType &, int); /********************************************************************** ** The game units are enumerated here. These include not only traditional ** vehicles, but also hovercraft and gunboats. */ typedef enum UnitType : char{ UNIT_NONE=-1, UNIT_HTANK, // Heavy tank (Mammoth). UNIT_MTANK, // Medium tank (M1). UNIT_LTANK, // Light tank ('Bradly'). UNIT_STANK, // Stealth tank (Romulan). UNIT_FTANK, // Flame thrower tank. UNIT_VICE, // Visceroid UNIT_APC, // APC. UNIT_MLRS, // MLRS rocket launcher. UNIT_JEEP, // 4x4 jeep replacement. UNIT_BUGGY, // Rat patrol dune buggy type. UNIT_HARVESTER, // Resource gathering vehicle. UNIT_ARTY, // Artillery unit. UNIT_MSAM, // Anti-Aircraft vehicle. UNIT_HOVER, // Hovercraft. UNIT_MHQ, // Mobile Head Quarters. UNIT_GUNBOAT, // Gunboat UNIT_MCV, // Mobile construction vehicle. UNIT_BIKE, // Nod recon motor-bike. UNIT_TRIC, // Triceratops UNIT_TREX, // Tyranosaurus Rex UNIT_RAPT, // Velociraptor UNIT_STEG, // Stegasaurus #ifdef PETROGLYPH_EXAMPLE_MOD UNIT_NUKE_TANK, // Mammoth with a nuke #endif UNIT_COUNT, UNIT_FIRST=0 } UnitType; //inline UnitType operator++(UnitType &, int); #define UNITF_HTANK (1L<(static_cast(a) | static_cast(b));} inline TextPrintType operator&(TextPrintType a, TextPrintType b) {return static_cast(static_cast(a) & static_cast(b));} inline TextPrintType operator~(TextPrintType a) {return static_cast(~static_cast(a));} /********************************************************************** ** These control the maximum number of objects in the game. Make sure that these ** maximums never exceed the maximum value for the "ID" element in the ** object class. */ #define AIRCRAFT_MAX 100 // Lasts for minutes. #define ANIM_MAX 200 // Lasts only a few seconds. #define BUILDING_MAX 500 // Lasts for hours. #define BULLET_MAX 50 // Lasts several seconds. #define FACTORY_MAX 32 // Lasts a few minutes. #define HOUSE_MAX 12 // Lasts entire scenario. #define INFANTRY_MAX 500 // Lasts for minutes. #define OVERLAY_MAX 1 // Very transitory. #define REINFORCEMENT_MAX 50 // Maximum number of reinforcements. #define SMUDGE_MAX 1 // Very transitory. #define TEAM_MAX 60 // Lasts forever. #define TEMPLATE_MAX 1 // Very transitory. #define TERRAIN_MAX 500 // Lasts for hours or eternity. #define TRIGGER_MAX 80 // Lasts forever. #define UNIT_MAX 500 // Lasts for minutes. #define TEAMTYPE_MAX 60 // Lasts forever. // Save filename description. #define DESCRIP_MAX 44 // 40 chars + CR + LF + CTRL-Z + NULL #define MAX_ENTRY_SIZE 15 #define OBUTTON_HEIGHT 9 // Is defined in mapedit.h, need for buttons #define CONQUER_PATH_MAX 9 // Number of cells to look ahead for movement. #define EACH_UNIT_MAX (UNIT_MAX/4) // Default maximum any one player can have. #define EACH_BUILDING_MAX (BUILDING_MAX/4) // Default maximum any one player can build. /********************************************************************** ** Terrain can be of these different classes. At any point in the game ** a particular piece of ground must fall under one of these classifications. ** This is true, even if it is undergoing a temporary transition. */ typedef enum LandType : unsigned char { LAND_CLEAR, // "Clear" terrain. LAND_ROAD, // Road terrain. LAND_WATER, // Water. LAND_ROCK, // Impassable rock. LAND_WALL, // Wall (blocks movement). LAND_TIBERIUM, // Tiberium field. LAND_BEACH, // Beach terrain. LAND_COUNT } LandType; /********************************************************************** ** The theaters of operation are as follows. */ typedef enum TheaterType : char { THEATER_NONE=-1, THEATER_DESERT, THEATER_JUNGLE, THEATER_TEMPERATE, THEATER_WINTER, THEATER_COUNT, THEATER_FIRST=0 } TheaterType; //inline TheaterType operator++(TheaterType &, int); #define THEATERF_DESERT (1<id) /* ** ** Imports from Red Alert for AI. ST - 7/16/2019 11:44AM ** ** ** */ #ifdef USE_RA_AI /********************************************************************** ** A base is broken up into several zones. This type enumerates the ** various zones. */ typedef enum ZoneType : char { ZONE_CORE, // Center of base. ZONE_NORTH, // North section. ZONE_EAST, // East section. ZONE_SOUTH, // South section. ZONE_WEST, // West section. ZONE_COUNT, ZONE_FIRST=0, ZONE_NONE=-1 } ZoneType; /********************************************************************** ** The map is prescanned to mark of movement zones according to certain ** movement characteristics. This enum specifies those characteristics ** and movement zones kept track of. */ typedef enum MZoneType : unsigned char { MZONE_NORMAL, // Normal terrestrial objects (can't crush walls). MZONE_CRUSHER, // Can crush crushable wall types. MZONE_DESTROYER, // Can destroy walls. MZONE_WATER, // Water based objects. MZONE_COUNT, MZONE_FIRST=0 } MZoneType; #define MZONEF_NORMAL (1<