1 #ifndef __EDITORMERCS_H 2 #define __EDITORMERCS_H 3 4 #include "JA2Types.h" 5 #include "Overhead_Types.h" 6 #include "Scheduling.h" 7 8 #include <string_theory/string> 9 10 11 //Merc editing modes. These are used to determine which buttons to show and hide. 12 enum 13 { 14 MERC_NOMODE, //used for shutting down mercs tab, to extract any changed information 15 16 MERC_GETITEMMODE, //when selecting a specific piece of inventory from inventorymode 17 18 MERC_TEAMMODE, //selecting a team with no merc selected. 19 MERC_BASICMODE, //basic placement mode 20 21 MERC_GENERALMODE, //detailed placement mode for general information and NPC info 22 MERC_ATTRIBUTEMODE, //detailed placement mode for specifying attributes 23 MERC_INVENTORYMODE, //detailed placement mode for specifying inventory 24 MERC_APPEARANCEMODE, //detailed placement mode for specifying appearance 25 MERC_PROFILEMODE, //specifying a valid profile index will generate the merc automatically. 26 MERC_SCHEDULEMODE, //specifying a schedule for that particular individual 27 }; 28 29 extern UINT8 gubCurrMercMode; 30 31 #define EDIT_NUM_COLORS 4 32 #define EDIT_COLOR_HEAD 0 33 #define EDIT_COLOR_PANTS 1 34 #define EDIT_COLOR_SKIN 2 35 #define EDIT_COLOR_VEST 3 36 #define EDIT_MERC_NONE 0 37 #define EDIT_MERC_NEXT_COLOR 13 38 39 extern SOLDIERTYPE* g_selected_merc; 40 extern INT16 gsSelectedMercGridNo; 41 42 enum _ForUseWithIndicateSelectedMerc 43 { 44 SELECT_NEXT_CREATURE = -7, 45 SELECT_NEXT_REBEL = -6, 46 SELECT_NEXT_CIV = -5, 47 SELECT_NEXT_ENEMY = -4, 48 SELECT_NEXT_TEAMMATE = -3, 49 SELECT_NEXT_MERC = -2, 50 SELECT_NO_MERC = -1 51 // >= 0 select merc with matching ID 52 }; 53 54 extern const ST::string gszScheduleActions[NUM_SCHEDULE_ACTIONS]; 55 56 extern const ST::string gszCivGroupNames[NUM_CIV_GROUPS]; 57 58 void IndicateSelectedMerc( INT16 sID ); 59 60 void GameInitEditorMercsInfo(void); 61 void GameShutdownEditorMercsInfo(void); 62 void EntryInitEditorMercsInfo(void); 63 void UpdateMercsInfo(void); 64 65 void ProcessMercEditing(void); 66 void AddMercToWorld( INT32 iMapIndex ); 67 void HandleRightClickOnMerc( INT32 iMapIndex ); 68 void SetMercEditingMode( UINT8 ubNewMode ); 69 70 void ResetAllMercPositions(void); 71 72 void EraseMercWaypoint(void); 73 void AddMercWaypoint( UINT32 iMapIndex ); 74 75 void SetEnemyColorCode( UINT8 ubColorCode ); 76 77 void SpecifyEntryPoint( UINT32 iMapIndex ); 78 79 //Modify stats of current soldiers 80 void SetMercOrders( INT8 bOrders ); 81 void SetMercAttitude( INT8 bAttitude ); 82 void SetMercDirection( INT8 bDirection ); 83 void SetMercRelativeEquipment( INT8 bLevel ); 84 void SetMercRelativeAttributes( INT8 bLevel ); 85 86 void DeleteSelectedMerc(void); 87 88 void ExtractCurrentMercModeInfo( BOOLEAN fKillTextInputMode ); 89 90 void HandleMercInventoryPanel( INT16 sX, INT16 sY, INT8 bEvent ); 91 92 extern UINT16 gusMercsNewItemIndex; 93 extern BOOLEAN gfRenderMercInfo; 94 95 void ChangeCivGroup( UINT8 ubNewCivGroup ); 96 97 #define MERCINV_LGSLOT_WIDTH 48 98 #define MERCINV_SMSLOT_WIDTH 24 99 #define MERCINV_SLOT_HEIGHT 18 100 101 extern BOOLEAN gfRoofPlacement; 102 103 extern void SetEnemyDroppableStatus( UINT32 uiSlot, BOOLEAN fDroppable ); 104 105 void RenderMercStrings(void); 106 107 extern BOOLEAN gfShowPlayers; 108 extern BOOLEAN gfShowEnemies; 109 extern BOOLEAN gfShowCreatures; 110 extern BOOLEAN gfShowRebels; 111 extern BOOLEAN gfShowCivilians; 112 void SetMercTeamVisibility( INT8 bTeam, BOOLEAN fVisible ); 113 114 extern UINT8 gubCurrentScheduleActionIndex; 115 extern BOOLEAN gfSingleAction; 116 extern BOOLEAN gfUseScheduleData2; 117 118 void UpdateScheduleAction( UINT8 ubNewAction ); 119 void FindScheduleGridNo( UINT8 ubScheduleData ); 120 void ClearCurrentSchedule(void); 121 void CancelCurrentScheduleAction(void); 122 void RegisterCurrentScheduleAction( INT32 iMapIndex ); 123 void StartScheduleAction(void); 124 125 void InitDetailedPlacementForMerc(void); 126 void KillDetailedPlacementForMerc(void); 127 128 void CopyMercPlacement(INT32 iMapIndex); 129 void PasteMercPlacement(INT32 iMapIndex); 130 131 void ExtractAndUpdateMercSchedule(void); 132 133 void DeleteSelectedMercsItem(void); 134 135 #endif 136