1 #ifndef __PREBATTLE_INTERFACE_H 2 #define __PREBATTLE_INTERFACE_H 3 4 #include "Types.h" 5 #include "Strategic_Movement.h" 6 7 void InitPreBattleInterface(GROUP* battle_group, bool persistent_pbi); 8 void KillPreBattleInterface(void); 9 void RenderPreBattleInterface(void); 10 11 extern BOOLEAN gfPreBattleInterfaceActive; 12 extern bool gfDisplayPotentialRetreatPaths; 13 extern BOOLEAN gfAutomaticallyStartAutoResolve; 14 extern BOOLEAN fDisableMapInterfaceDueToBattle; 15 16 extern GROUP *gpBattleGroup; 17 18 extern BOOLEAN gfTacticalTraversal; 19 extern GROUP *gpTacticalTraversalGroup; 20 extern SOLDIERTYPE *gpTacticalTraversalChosenSoldier; 21 22 extern BOOLEAN gfGotoSectorTransition; 23 extern BOOLEAN gfEnteringMapScreenToEnterPreBattleInterface; 24 25 enum 26 { 27 //General encounter codes (gubEnemyEncounterCode) 28 NO_ENCOUNTER_CODE, //when there is no encounter 29 ENEMY_INVASION_CODE, 30 ENEMY_ENCOUNTER_CODE, 31 ENEMY_AMBUSH_CODE, 32 ENTERING_ENEMY_SECTOR_CODE, 33 CREATURE_ATTACK_CODE, 34 35 BLOODCAT_AMBUSH_CODE, 36 ENTERING_BLOODCAT_LAIR_CODE, 37 38 //Explicit encounter codes only (gubExplicitEnemyEncounterCode -- a superset of gubEnemyEncounterCode) 39 FIGHTING_CREATURES_CODE, 40 HOSTILE_CIVILIANS_CODE, 41 HOSTILE_BLOODCATS_CODE, 42 }; 43 44 extern BOOLEAN gfAutoAmbush; 45 extern BOOLEAN gfHighPotentialForAmbush; 46 47 void ActivatePreBattleAutoresolveAction(void); 48 void ActivatePreBattleEnterSectorAction(void); 49 void ActivatePreBattleRetreatAction(void); 50 51 void CalculateNonPersistantPBIInfo(void); 52 53 //SAVE START 54 55 //Using the ESC key in the PBI will get rid of the PBI and go back to mapscreen, but 56 //only if the PBI isn't persistant (!gfPersistantPBI). 57 extern BOOLEAN gfPersistantPBI; 58 59 //Contains general information about the type of encounter the player is faced with. This 60 //determines whether or not you can autoresolve the battle or even retreat. This code 61 //dictates the header that is used at the top of the PBI. 62 extern UINT8 gubEnemyEncounterCode; 63 64 //The autoresolve during tactical battle option needs more detailed information than the 65 //gubEnemyEncounterCode can provide. The explicit version contains possibly unique codes 66 //for reasons not normally used in the PBI. For example, if we were fighting the enemy 67 //in a normal situation, then shot at a civilian, the civilians associated with the victim 68 //would turn hostile, which would disable the ability to autoresolve the battle. 69 extern BOOLEAN gubExplicitEnemyEncounterCode; 70 71 //Location of the current battle (determines where the animated icon is blitted) and if the 72 //icon is to be blitted. 73 extern BOOLEAN gfBlitBattleSectorLocator; 74 75 extern UINT8 gubPBSectorX; 76 extern UINT8 gubPBSectorY; 77 extern UINT8 gubPBSectorZ; 78 79 extern BOOLEAN gfCantRetreatInPBI; 80 //SAVE END 81 82 void WakeUpAllMercsInSectorUnderAttack(); 83 84 void RetreatAllInvolvedPlayerGroups( void ); 85 86 bool PlayerGroupInvolvedInThisCombat(GROUP const&); 87 bool PlayerMercInvolvedInThisCombat(SOLDIERTYPE const&); 88 89 enum 90 { 91 LOG_DEFEAT, 92 LOG_VICTORY, 93 }; 94 void LogBattleResults( UINT8 ubVictoryCode); 95 96 extern BOOLEAN gfUsePersistantPBI; 97 extern BOOLEAN gfRenderPBInterface; 98 99 void HandlePreBattleInterfaceStates(void); 100 101 #endif 102