CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

DLLInterface.h (20976B)


      1 //
      2 // Copyright 2020 Electronic Arts Inc.
      3 //
      4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 
      5 // software: you can redistribute it and/or modify it under the terms of 
      6 // the GNU General Public License as published by the Free Software Foundation, 
      7 // either version 3 of the License, or (at your option) any later version.
      8 
      9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 
     10 // in the hope that it will be useful, but with permitted additional restrictions 
     11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 
     12 // distributed with this program. You should have received a copy of the 
     13 // GNU General Public License along with permitted additional restrictions 
     14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
     15 
     16 
     17 #pragma once
     18 
     19 #ifndef DLL_INTERFACE_H
     20 #define DLL_INTERFACE_H
     21 		
     22 struct CarryoverObjectStruct;
     23 
     24 
     25 
     26 /*
     27 ** DLL Interface version
     28 ** 
     29 ** 
     30 ** 
     31 */
     32 #include "DLLInterfaceVersion.h"
     33 
     34 
     35 
     36 
     37 #define MAX_EXPORT_CELLS			(128 * 128)
     38 
     39 #ifdef TIBERIAN_DAWN
     40 #define MAP_MAX_CELL_WIDTH 64
     41 #define MAP_MAX_CELL_HEIGHT 64
     42 #else
     43 #define MAP_MAX_CELL_WIDTH 128
     44 #define MAP_MAX_CELL_HEIGHT 128
     45 #endif
     46 
     47 
     48 
     49 
     50 /*
     51 ** Interface structs require stricter packing
     52 ** 
     53 ** 
     54 */
     55 #pragma pack(push)
     56 #pragma pack(1)
     57 
     58 
     59 
     60 
     61 /**************************************************************************************
     62 ** 
     63 ** Game state request types
     64 ** 
     65 ** 
     66 */
     67 enum GameStateRequestEnum {
     68 	GAME_STATE_NONE,
     69 	GAME_STATE_STATIC_MAP,
     70 	GAME_STATE_DYNAMIC_MAP,
     71 	GAME_STATE_LAYERS,
     72 	GAME_STATE_SIDEBAR,
     73 	GAME_STATE_PLACEMENT,
     74 	GAME_STATE_SHROUD,
     75 	GAME_STATE_OCCUPIER,
     76 	GAME_STATE_PLAYER_INFO
     77 };	
     78 
     79 
     80 
     81 
     82 /**************************************************************************************
     83 ** 
     84 ** Static map data (tiles)
     85 ** 
     86 ** 
     87 */
     88 struct CNCStaticCellStruct {
     89 	char	TemplateTypeName[32];
     90 	int	IconNumber;
     91 };
     92 
     93 
     94 
     95 enum CnCTheaterType {
     96 	CNC_THEATER_NONE=-1,
     97 	CNC_THEATER_DESERT,
     98 	CNC_THEATER_JUNGLE,
     99 	CNC_THEATER_TEMPERATE,
    100 	CNC_THEATER_WINTER,
    101 
    102 	CNC_THEATER_COUNT,
    103 	CNC_THEATER_FIRST=0
    104 };
    105 
    106 
    107 struct CNCMapDataStruct {
    108 	int	MapCellX;
    109 	int	MapCellY;
    110 	int	MapCellWidth;
    111 	int	MapCellHeight;
    112 	int	OriginalMapCellX;
    113 	int	OriginalMapCellY;
    114 	int	OriginalMapCellWidth;
    115 	int	OriginalMapCellHeight;
    116 
    117 	CnCTheaterType Theater;
    118 	char ScenarioName[_MAX_FNAME+_MAX_EXT];
    119 	
    120 	CNCStaticCellStruct StaticCells[MAX_EXPORT_CELLS];
    121 };
    122 
    123 
    124 
    125 
    126 /**************************************************************************************
    127 ** 
    128 **  Object type enum
    129 ** 
    130 ** 
    131 */
    132 #define DLL_LAYER_COUNT 4
    133 
    134 enum DllObjectTypeEnum {
    135 	UNKNOWN,
    136 	INFANTRY,
    137 	UNIT,
    138 	AIRCRAFT,
    139 	BUILDING,
    140 	TERRAIN,
    141 	ANIM,
    142 	BULLET,
    143 	OVERLAY,
    144 	SMUDGE,
    145 	OBJECT,
    146 	SPECIAL,
    147 	INFANTRY_TYPE,
    148 	UNIT_TYPE,
    149 	AIRCRAFT_TYPE,
    150 	BUILDING_TYPE,
    151 	VESSEL,
    152 	VESSEL_TYPE
    153 };	
    154 
    155 
    156 
    157 
    158 
    159 /**************************************************************************************
    160 **
    161 **  Object action types
    162 **
    163 **
    164 */
    165 enum DllActionTypeEnum : unsigned char {
    166 	DAT_NONE,
    167 	DAT_MOVE,
    168 	DAT_NOMOVE,
    169 	DAT_ENTER,
    170 	DAT_SELF,
    171 	DAT_ATTACK,
    172 	DAT_ATTACK_OUT_OF_RANGE,
    173 	DAT_GUARD,
    174 	DAT_SELECT,
    175 	DAT_CAPTURE,
    176 	DAT_SABOTAGE,
    177 	DAT_HEAL,
    178 	DAT_DAMAGE,
    179 	DAT_TOGGLE_PRIMARY,
    180 	DAT_CANT_DEPLOY,
    181 	DAT_REPAIR,
    182 	DAT_CANT_REPAIR
    183 };
    184 
    185 
    186 
    187 
    188 
    189 /**************************************************************************************
    190 ** 
    191 **  Object state data
    192 ** 
    193 ** 
    194 */
    195 
    196 #define MAX_OCCUPY_CELLS 36
    197 #define MAX_OBJECT_PIPS 18
    198 #define MAX_OBJECT_LINES 3
    199 #define MAX_HOUSES 32
    200 
    201 struct CNCObjectLineStruct {
    202 	int X;
    203 	int Y;
    204 	int X1;
    205 	int Y1;
    206 	int Frame;
    207 	unsigned char Color;
    208 };
    209 
    210 #define CNC_OBJECT_ASSET_NAME_LENGTH 16
    211 struct CNCObjectStruct {
    212 	void				*CNCInternalObjectPointer;
    213 	char				TypeName[CNC_OBJECT_ASSET_NAME_LENGTH];
    214 	char 				AssetName[CNC_OBJECT_ASSET_NAME_LENGTH];		// CNC uses 8.3 filenames, so it shouldn't need to be bigger than 9
    215 	DllObjectTypeEnum	Type;	
    216 	int					ID;
    217 	int					BaseObjectID;
    218 	DllObjectTypeEnum	BaseObjectType;	
    219 	int					PositionX;
    220 	int					PositionY;
    221 	int					Width;
    222 	int					Height;
    223 	int					Altitude;
    224 	int					SortOrder;
    225 	int					Scale;
    226 	int					DrawFlags;
    227 	short				MaxStrength;
    228 	short				Strength;
    229 	unsigned short		ShapeIndex;
    230 	unsigned short		CellX;
    231 	unsigned short		CellY;
    232 	unsigned short		CenterCoordX;
    233 	unsigned short		CenterCoordY;
    234 	short				SimLeptonX;
    235 	short				SimLeptonY;
    236 	unsigned char		DimensionX;
    237 	unsigned char		DimensionY;
    238 	unsigned char		Rotation;
    239 	unsigned char		MaxSpeed;
    240 	char				Owner;
    241 	char				RemapColor;
    242 	char				SubObject;
    243 	bool				IsSelectable;
    244 	unsigned int		IsSelectedMask;
    245 	bool				IsRepairing;
    246 	bool				IsDumping;
    247 	bool				IsTheaterSpecific;
    248 	unsigned int		FlashingFlags;
    249 	unsigned char		Cloak;
    250 	bool				CanRepair;
    251 	bool				CanDemolish;
    252 	bool				CanDemolishUnit;
    253 	short				OccupyList[MAX_OCCUPY_CELLS];
    254 	int					OccupyListLength;
    255 	int					Pips[MAX_OBJECT_PIPS];
    256 	int					NumPips;
    257 	int					MaxPips;
    258 	CNCObjectLineStruct	Lines[MAX_OBJECT_LINES];
    259 	int					NumLines;
    260 	bool				RecentlyCreated;
    261 	bool				IsALoaner;
    262 	bool				IsFactory;
    263 	bool				IsPrimaryFactory;
    264 	bool				IsDeployable;
    265 	bool				IsAntiGround;
    266 	bool				IsAntiAircraft;
    267 	bool				IsSubSurface;
    268 	bool				IsNominal;
    269 	bool				IsDog;
    270 	bool				IsIronCurtain;
    271 	bool				IsInFormation;
    272 	bool				CanMove[MAX_HOUSES];
    273 	bool				CanFire[MAX_HOUSES];
    274 	bool				CanDeploy;
    275 	bool				CanHarvest;
    276 	bool				CanPlaceBombs;
    277 	bool				IsFixedWingedAircraft;
    278 	bool				IsFake;
    279 	unsigned char		ControlGroup;
    280 	unsigned int		VisibleFlags;
    281 	unsigned int		SpiedByFlags;
    282 	char 				ProductionAssetName[CNC_OBJECT_ASSET_NAME_LENGTH];
    283 	const char*			OverrideDisplayName;
    284 	DllActionTypeEnum	ActionWithSelected[MAX_HOUSES];
    285 
    286 	static const unsigned int VISIBLE_FLAGS_ALL = 0xffffffff;
    287 };
    288 
    289 struct CNCObjectListStruct {
    290 	int					Count;
    291 	CNCObjectStruct	Objects[1];		// Variable length
    292 };
    293 
    294 
    295 
    296 
    297 /**************************************************************************************
    298 ** 
    299 **  Placement validity data
    300 ** 
    301 **  Used to pass back info about tructure placement validity
    302 */
    303 struct CNCPlacementCellInfoStruct {
    304 	bool	PassesProximityCheck;			// If the structure was placed in this cell, does that satisfy the proximity check for the whole structure?
    305 	bool	GenerallyClear;					// Is this cell generally clear of obstructions that would prevent placement?
    306 };
    307 
    308 struct CNCPlacementInfoStruct {
    309 	int								Count;
    310 	CNCPlacementCellInfoStruct CellInfo[1];		// Variable length
    311 };
    312 
    313 
    314 
    315 
    316 
    317 /**************************************************************************************
    318 ** 
    319 **  Sidebar/construction state data
    320 ** 
    321 ** 
    322 */
    323 enum DllSuperweaponTypeEnum {
    324 	SW_NONE,
    325 	SW_UNKNOWN,
    326 
    327 	//TD values
    328 	SW_NUKE,
    329 	SW_AIR_STRIKE,
    330 	SW_ION_CANNON,
    331 
    332 	//RA values
    333 	SW_SONAR_PULSE,
    334 	SW_CHRONOSPHERE,
    335 	SW_PARA_BOMB,
    336 	SW_PARA_INFANTRY,
    337 	SW_SPY_MISSION,
    338 	SW_IRON_CURTAIN,
    339 	SW_GPS,
    340 	SW_CHRONOSPHERE_DESTINATION
    341 };
    342 
    343 struct CNCSidebarEntryStruct {
    344 	char							AssetName[16];						// CNC uses 8.3 filenames, so it shouldn't need to be bigger than 9
    345 	int							BuildableType;						// This is the original buildable type that should be passed back if we want to start/cancel construction
    346 	int							BuildableID;	   				// This is the original buildable id that should be passed back if we want to start/cancel construction
    347 	DllObjectTypeEnum			Type;									// Type converted to shared enum
    348 	DllSuperweaponTypeEnum	SuperWeaponType;
    349 	int							Cost;									// Cost to construct
    350 	int							PowerProvided;						// Power cost to construct
    351 	int							BuildTime;							// Cost to construct
    352 	float							Progress;							// Construction progress (0.0 - 1.0)
    353 	short							PlacementList[MAX_OCCUPY_CELLS];	// Which cells this structure occupies for placement (if structure)
    354 	int							PlacementListLength;					// How many cells
    355 	bool							Completed;							// Construction has completed
    356 	bool							Constructing;						// Is it currently constructing
    357 	bool							ConstructionOnHold;				// Is the current construction on hold
    358 	bool							Busy;									// Is the associated factory busy
    359 	bool							BuildableViaCapture;				// Is this buildable due to the capture of a structure of a different faction. This will be false for captured structures of the same faction (ActLike)
    360 	bool							Fake;									// Is this a fake structure?
    361 };
    362 
    363 
    364 struct CNCSidebarStruct {
    365 	int							EntryCount[2];			// Counts for the left and right columns
    366 	int							Credits;			  		// Amount of currency available (excluding Tiberium)
    367 	int							CreditsCounter;		// Visible credits to display in the sidebar (includes count up/down logic)
    368 	int							Tiberium;				// Amount of Tiberium in reserve
    369 	int							MaxTiberium;			// Maximum amount of Tiberium storage available
    370 	int							PowerProduced;
    371 	int							PowerDrained;
    372 	int							MissionTimer;
    373 	unsigned int	  			UnitsKilled;				// Total count of enemy units killed by this player; Includes Infantry, Vehicles, Aircraft
    374 	unsigned int	  			BuildingsKilled;        // Total count of enemy structures killed by this player
    375 	unsigned int	  			UnitsLost;              // Total count player-owned units killed/lost           
    376 	unsigned int	  			BuildingsLost;          // Total count player-owned structures killed/lost      
    377 	unsigned int				TotalHarvestedCredits;  // Complete total of gained credits over the match (does not include starting credits)
    378 	bool							RepairBtnEnabled;
    379 	bool							SellBtnEnabled;
    380 	bool							RadarMapActive;
    381 
    382 	CNCSidebarEntryStruct	Entries[1];			// Variable length column entries
    383 };
    384 
    385 
    386 
    387 enum SidebarRequestEnum {
    388 	SIDEBAR_REQUEST_START_CONSTRUCTION,
    389 	SIDEBAR_REQUEST_HOLD_CONSTRUCTION,
    390 	SIDEBAR_REQUEST_CANCEL_CONSTRUCTION,
    391 	SIDEBAR_REQUEST_START_PLACEMENT,
    392 	SIDEBAR_REQUEST_PLACE,
    393 	SIDEBAR_CANCEL_PLACE,
    394 	SIDEBAR_CLICK_REPAIR,
    395 	SIDEBAR_REQUEST_ENABLE_QUEUE,
    396 	SIDEBAR_REQUEST_DISABLE_QUEUE,
    397 	SIDEBAR_REQUEST_START_CONSTRUCTION_MULTI,
    398 	SIDEBAR_REQUEST_CANCEL_CONSTRUCTION_MULTI
    399 };	
    400 
    401 enum SuperWeaponRequestEnum {
    402 	SUPERWEAPON_REQUEST_PLACE_SUPER_WEAPON
    403 };
    404 enum ControlGroupRequestEnum {
    405 	CONTROL_GROUP_REQUEST_CREATE,
    406 	CONTROL_GROUP_REQUEST_TOGGLE,
    407 	CONTROL_GROUP_REQUEST_ADDITIVE_SELECTION,
    408 };
    409 
    410 
    411 /**************************************************************************************
    412 ** 
    413 **  Input events sent into the DLL
    414 ** 
    415 ** 
    416 */
    417 enum InputRequestEnum {
    418 	INPUT_REQUEST_NONE,
    419 	INPUT_REQUEST_MOUSE_MOVE,
    420 	INPUT_REQUEST_MOUSE_LEFT_CLICK,
    421 	INPUT_REQUEST_MOUSE_RIGHT_DOWN,
    422 	INPUT_REQUEST_MOUSE_RIGHT_CLICK,
    423 	INPUT_REQUEST_MOUSE_AREA,
    424 	INPUT_REQUEST_MOUSE_AREA_ADDITIVE,
    425 	INPUT_REQUEST_SELL_AT_POSITION,
    426 	INPUT_REQUEST_SELECT_AT_POSITION,
    427 	INPUT_REQUEST_COMMAND_AT_POSITION,
    428 	INPUT_REQUEST_SPECIAL_KEYS,
    429 	INPUT_REQUEST_MOD_GAME_COMMAND_1_AT_POSITION,
    430 	INPUT_REQUEST_MOD_GAME_COMMAND_2_AT_POSITION,
    431 	INPUT_REQUEST_MOD_GAME_COMMAND_3_AT_POSITION,
    432 	INPUT_REQUEST_MOD_GAME_COMMAND_4_AT_POSITION,
    433 };
    434 
    435 
    436 /**************************************************************************************
    437 **
    438 **  Structure Requests Repair, Sell
    439 **
    440 **
    441 */
    442 enum StructureRequestEnum {
    443 	INPUT_STRUCTURE_NONE,
    444 	INPUT_STRUCTURE_REPAIR_START,
    445 	INPUT_STRUCTURE_REPAIR,
    446 	INPUT_STRUCTURE_SELL_START,
    447 	INPUT_STRUCTURE_SELL,
    448 	INPUT_STRUCTURE_CANCEL,
    449 };
    450 
    451 
    452 /**************************************************************************************
    453 **
    454 **  Unit Requests Scatter, Select Next, Select Previous, Guard Mode, Stop
    455 **
    456 **
    457 */
    458 enum UnitRequestEnum {
    459 	INPUT_UNIT_NONE,
    460 	INPUT_UNIT_SCATTER,
    461 	INPUT_UNIT_SELECT_NEXT,
    462 	INPUT_UNIT_SELECT_PREVIOUS,
    463 	INPUT_UNIT_GUARD_MODE,
    464 	INPUT_UNIT_STOP,
    465 	INPUT_UNIT_FORMATION_TOGGLE,		// RA Only
    466 	INPUT_UNIT_QUEUED_MOVEMENT_ON, 	// RA Only
    467 	INPUT_UNIT_QUEUED_MOVEMENT_OFF,	// RA Only
    468 };
    469 
    470 
    471 /**************************************************************************************
    472 **
    473 **  Game Action Requests
    474 **
    475 **
    476 */
    477 enum GameRequestEnum {
    478 	INPUT_GAME_MOVIE_DONE,
    479 	INPUT_GAME_LOADING_DONE,
    480 };
    481 
    482 
    483 /**************************************************************************************
    484 **
    485 **  Beacon Requests
    486 **
    487 **
    488 */
    489 enum BeaconRequestEnum {
    490 	INPUT_BEACON_NONE,
    491 	INPUT_BEACON_PLACE,
    492 };
    493 
    494 
    495 /**************************************************************************************
    496 **
    497 **  Special Keys
    498 **
    499 **
    500 */
    501 enum SpecialKeyRequestEnum {
    502 	INPUT_SPECIAL_KEY_CTRL =	0b00000001,
    503 	INPUT_SPECIAL_KEY_ALT =		0b00000010,
    504 	INPUT_SPECIAL_KEY_SHIFT =	0b00000100,
    505 };
    506 
    507 
    508 
    509 /**************************************************************************************
    510 ** 
    511 **  Non-static map data.
    512 ** 
    513 **  Per-cell smudges and overlays. Smudges are used for things like craters and structure bibs that draw under units. 
    514 **  Overlays are things like walls and tiberium that can't move from the cell but aren't flat like smudges.
    515 ** 
    516 ** 
    517 */
    518 struct CNCDynamicMapEntryStruct {
    519 	char						AssetName[16];
    520 	int						PositionX;
    521 	int						PositionY;
    522 	int						Width;
    523 	int						Height;
    524 	short						Type;
    525 	char						Owner;
    526 	int						DrawFlags;
    527 	unsigned char			CellX;
    528 	unsigned char			CellY;
    529 	unsigned char			ShapeIndex;
    530 	bool						IsSmudge;
    531 	bool						IsOverlay;
    532 	bool						IsResource;
    533 	bool						IsSellable;
    534 	bool						IsTheaterShape;
    535 	bool						IsFlag;
    536 };
    537 
    538 struct CNCDynamicMapStruct {
    539 	bool							VortexActive;
    540 	int								VortexX;
    541 	int								VortexY;
    542 	int								VortexWidth;
    543 	int								VortexHeight;
    544 	int								Count;
    545 	CNCDynamicMapEntryStruct	Entries[1];			// Variable length
    546 };
    547 
    548 
    549 
    550 
    551 
    552 /**************************************************************************************
    553 ** 
    554 **  Event data
    555 ** 
    556 **  Used to call back into the GlyphX engine for one-time events like sound effect triggers
    557 ** 
    558 ** 
    559 */
    560 enum EventCallbackType {
    561 	CALLBACK_EVENT_INVALID = -1,
    562 	CALLBACK_EVENT_SOUND_EFFECT = 0,
    563 	CALLBACK_EVENT_SPEECH,
    564 	CALLBACK_EVENT_GAME_OVER,
    565 	CALLBACK_EVENT_DEBUG_PRINT,
    566 	CALLBACK_EVENT_MOVIE,
    567 	CALLBACK_EVENT_MESSAGE,
    568 	CALLBACK_EVENT_UPDATE_MAP_CELL,
    569 	CALLBACK_EVENT_ACHIEVEMENT,
    570 	CALLBACK_EVENT_STORE_CARRYOVER_OBJECTS,
    571 	CALLBACK_EVENT_SPECIAL_WEAPON_TARGETTING,
    572 	CALLBACK_EVENT_BRIEFING_SCREEN,
    573 	CALLBACK_EVENT_CENTER_CAMERA,
    574 	CALLBACK_EVENT_PING
    575 };
    576 
    577 
    578 struct GameOverMultiPlayerStatsStruct
    579 {
    580 	GameOverMultiPlayerStatsStruct()
    581 	:
    582 		GlyphXPlayerID( 0 ),
    583 		IsHuman( false ),
    584 		WasHuman( false ),
    585 		IsWinner( false ),
    586 		ResourcesGathered( 0 ),
    587 		TotalUnitsKilled( 0 ),
    588 		TotalStructuresKilled( 0 ),
    589 		Efficiency( 0 ),
    590 		Score( 0 )
    591 	{
    592 	}
    593 	__int64 GlyphXPlayerID;
    594 	bool IsHuman;
    595 	bool WasHuman;
    596 	bool IsWinner;
    597 	int ResourcesGathered;
    598 	int TotalUnitsKilled;
    599 	int TotalStructuresKilled;
    600 	int Efficiency; // AKA Economy
    601 	int Score;
    602 };
    603 
    604 #define GAME_OVER_MULTIPLAYER_MAX_PLAYERS_TRACKED	8
    605 
    606 
    607 enum EventCallbackMessageEnum {
    608 	MESSAGE_TYPE_DIRECT = 0,
    609 	MESSAGE_TYPE_PLAYER_DEFEATED,
    610 	MESSAGE_TYPE_COMPUTER_TAUNT,
    611 	MESSAGE_TYPE_PLAYER_DISCONNECTED
    612 };
    613 
    614 struct EventCallbackStruct {
    615 
    616 	EventCallbackStruct::EventCallbackStruct(void) : EventType(CALLBACK_EVENT_INVALID), GlyphXPlayerID(0) { }
    617 
    618 	EventCallbackType EventType;
    619 
    620 	__int64 GlyphXPlayerID;
    621 
    622 	union {
    623 		
    624 		struct SoundEffectEvent {
    625 			int SFXIndex;
    626 			int Variation;
    627 			int PixelX;
    628 			int PixelY;
    629 			int PlayerID;		//TO_FIX
    630 			char SoundEffectName[ 16 ];
    631 			int SoundEffectPriority;
    632 			int SoundEffectContext;
    633 		} SoundEffect;
    634 		
    635 		struct SpeechEvent {
    636 			int SpeechIndex;
    637 			int PlayerID;		//TO_FIX
    638 			char SpeechName[ 16 ];
    639 		} Speech;
    640 			  
    641 		struct GameOverEvent {
    642 			bool Multiplayer;
    643 			//
    644 			// Single-player data
    645 			//
    646 			bool IsHuman;
    647 			bool PlayerWins; //This should specify player id
    648 			const char* MovieName;
    649 			const char* MovieName2;
    650 			const char* MovieName3;
    651 			const char* MovieName4;
    652 			const char* AfterScoreMovieName;
    653 			int Score;
    654 			int Leadership;
    655 			int Efficiency;
    656 			int CategoryTotal;
    657 			int NODKilled;
    658 			int GDIKilled;
    659 			int CiviliansKilled;
    660 			int NODBuildingsDestroyed;
    661 			int GDIBuildingsDestroyed;
    662 			int CiviliansBuildingsDestroyed;
    663 			int RemainingCredits;
    664 			int SabotagedStructureType;
    665 			int TimerRemaining;
    666 			//
    667 			// Multi-player data
    668 			//
    669 			int MultiPlayerTotalPlayers;
    670 			GameOverMultiPlayerStatsStruct MultiPlayerPlayersData[ GAME_OVER_MULTIPLAYER_MAX_PLAYERS_TRACKED ];
    671 		} GameOver;
    672 		
    673 		struct DebugPrintEvent {
    674 			const char *PrintString;
    675 		} DebugPrint;
    676 
    677 		struct MovieEvent {
    678 			const char* MovieName;
    679 			int Theme;
    680 			bool Immediate;
    681 		} Movie;
    682 
    683 		struct MessageEvent {
    684 			const char* Message;
    685 			float TimeoutSeconds;
    686 			EventCallbackMessageEnum MessageType;
    687 			__int64 MessageParam1;
    688 		} Message;
    689 
    690 		struct UpdateMapCellEvent {
    691 			int CellX;
    692 			int CellY;
    693 			char TemplateTypeName[32];
    694 		} UpdateMapCell;
    695 
    696 		struct AchievementEvent {
    697 			const char* AchievementType;
    698 			const char* AchievementReason;
    699 		} Achievement;
    700 
    701 		struct StoreCarryoverObjectsEvent {
    702 			const CarryoverObjectStruct* CarryoverList;
    703 		} CarryoverObjects;
    704 
    705 		struct SpecialWeaponTargettingEvent {
    706 			int Type;
    707 			int ID;
    708 			char Name[16];
    709 			DllSuperweaponTypeEnum WeaponType;
    710 		} SpecialWeaponTargetting;
    711 
    712 		struct CenterCameraEvent {
    713 			int CoordX;
    714 			int CoordY;
    715 		} CenterCamera;
    716 
    717 		struct PingEvent {
    718 			int CoordX;
    719 			int CoordY;
    720 		} Ping;
    721 	};
    722 
    723 };
    724 
    725 
    726 
    727 
    728 
    729 
    730 
    731 
    732 /**************************************************************************************
    733 ** 
    734 **  Multiplayer setup data
    735 ** 
    736 **  Used to pass multiplayer setup info into the C&C code from the GlyphX engine
    737 ** 
    738 ** 
    739 */
    740 
    741 
    742 
    743 struct CNCMultiplayerOptionsStruct {
    744 	//int MPlayerPrefColor;				// preferred color index for this player
    745 	//int MPlayerColorIdx;					// actual color index of this player
    746 	//CnCHousesType MPlayerHouse;		// House of this player (GDI/NOD)
    747 	//unsigned char MPlayerLocalID;		// ID of this player
    748 	int MPlayerCount;						// # of human players in this game
    749 	int MPlayerBases;						// 1 = bases are on for this scenario
    750 	int MPlayerCredits;					// # credits everyone gets
    751 	int MPlayerTiberium;					// >0 = tiberium enabled for this scenario
    752 	int MPlayerGoodies;					// 1 = goodies enabled for this scenario
    753 	int MPlayerGhosts;					// 1 = houses with no players will still play
    754 	int MPlayerSolo;						// 1 = allows a single-player net game
    755 	int MPlayerUnitCount;				// # units for non-base multiplayer scenarios
    756 	bool IsMCVDeploy;						// MCV undeploys instead of selling
    757 	bool SpawnVisceroids;				// Do visceroids spawn
    758 	bool EnableSuperweapons;			// Are superweapons available
    759 	bool MPlayerShadowRegrow;
    760 	bool MPlayerAftermathUnits;
    761 	bool CaptureTheFlag;
    762 	bool DestroyStructures;				// New early win condition via destroying all a player's structures
    763 	bool ModernBalance;
    764 };
    765 
    766 
    767 
    768 struct CNCSpiedInfoStruct {
    769 	int Power;
    770 	int Drain;
    771 	int Money;
    772 };
    773 
    774 
    775 struct CNCPlayerInfoStruct {
    776 	char					Name[64];
    777 	unsigned char		House;
    778 	int					ColorIndex;
    779 	unsigned __int64	GlyphxPlayerID;
    780 	int					Team;
    781 	int					StartLocationIndex;
    782 	unsigned char		HomeCellX;
    783 	unsigned char		HomeCellY;
    784 	bool					IsAI;
    785 	unsigned int		AllyFlags;
    786 	bool					IsDefeated;
    787 	unsigned int		SpiedPowerFlags;
    788 	unsigned int		SpiedMoneyFlags;
    789 	CNCSpiedInfoStruct	SpiedInfo[MAX_HOUSES];
    790 	int					SelectedID;
    791 	DllObjectTypeEnum	SelectedType;
    792 	DllActionTypeEnum	ActionWithSelected[MAX_EXPORT_CELLS];
    793 	unsigned int		ActionWithSelectedCount;
    794 	unsigned int		ScreenShake;
    795 	bool				IsRadarJammed;
    796 };
    797 
    798 
    799 //
    800 enum GameRequestType {
    801 	GAME_REQUEST_MOVIE_DONE,
    802 };
    803 
    804 
    805 /**************************************************************************************
    806 **
    807 **  Rules configuration data
    808 **
    809 **
    810 */
    811 struct CNCDifficultyDataStruct
    812 {
    813 	float FirepowerBias;
    814 	float GroundspeedBias;
    815 	float AirspeedBias;
    816 	float ArmorBias;
    817 	float ROFBias;
    818 	float CostBias;
    819 	float BuildSpeedBias;
    820 
    821 	float RepairDelay;
    822 	float BuildDelay;
    823 
    824 	bool IsBuildSlowdown;
    825 	bool IsWallDestroyer;
    826 	bool IsContentScan;
    827 };
    828 
    829 struct CNCRulesDataStruct
    830 {
    831 	CNCDifficultyDataStruct Difficulties[3];
    832 };
    833 
    834 
    835 /**************************************************************************************
    836 ** 
    837 **  Debug input interface
    838 ** 
    839 ** 
    840 */
    841 
    842 enum DebugRequestEnum {
    843 	DEBUG_REQUEST_SPAWN_OBJECT,
    844 	DEBUG_REQUEST_END_GAME,
    845 	DEBUG_REQUEST_UNSHROUD,
    846 	DEBUG_REQUEST_SUPERWEAPON_RECHARGE,
    847 	DEBUG_REQUEST_KILL_OBJECT,
    848 	DEBUG_REQUEST_END_PRODUCTION,
    849 	DEBUG_REQUEST_ADD_RESOURCES,
    850 	DEBUG_REQUEST_UNLOCK_BUILDABLES,
    851 	DEBUG_REQUEST_FORCE_CRASH,
    852 	DEBUG_REQUEST_SET_GLOBAL_FLAG,
    853 };
    854 
    855 
    856 
    857 
    858 
    859 
    860 /**************************************************************************************
    861 ** 
    862 **  Shroud data.
    863 ** 
    864 **  Per-cell shroud info
    865 ** 
    866 ** 
    867 */
    868 struct CNCShroudEntryStruct {
    869 	char			ShadowIndex;
    870 	bool			IsVisible;
    871 	bool			IsMapped;
    872 	bool			IsJamming;
    873 };
    874 
    875 struct CNCShroudStruct {
    876 	int							Count;
    877 	CNCShroudEntryStruct		Entries[1];			// Variable length
    878 };
    879 
    880 
    881 
    882 
    883 
    884 
    885 /**************************************************************************************
    886 **
    887 **  Occupier data.
    888 **
    889 **  Per-cell occupier info
    890 **
    891 **
    892 */
    893 struct CNCOccupierObjectStruct {
    894 	DllObjectTypeEnum			Type;
    895 	int							ID;
    896 };
    897 
    898 struct CNCOccupierEntryHeaderStruct {
    899 	int							Count;
    900 };
    901 
    902 struct CNCOccupierHeaderStruct {
    903 	int							Count;
    904 };
    905 
    906 
    907 
    908 
    909 /**************************************************************************************
    910 **
    911 **  Carryover object.
    912 **
    913 **  Used to store object data that persists between missions
    914 **
    915 **
    916 */
    917 struct CarryoverObjectStruct
    918 {
    919 	CarryoverObjectStruct() : Next(0) {}
    920 
    921 	CarryoverObjectStruct* Next;
    922 
    923 	int RTTI;
    924 	int Type;
    925 	int Cell;
    926 	int Strength;
    927 	int House;
    928 };
    929 
    930 
    931 
    932 
    933 /*
    934 ** End of strict structure packing
    935 ** 
    936 ** 
    937 */
    938 #pragma pack(pop)
    939 
    940 
    941 
    942 #endif //DLL_INTERFACE_H