Files
source/Strategic/Map Screen Helicopter.h
T
Wanne e64d5a2fa6 MERGED source code from development trunk revision 4545 up to latest current revision 4882
Development Trunk: https://ja2svn.dyndns.org/source/ja2/branches/Wanne/JA2%201.13%20MP
A detailed list of all the features (changes) is visible in the history log of the development trunk:

INFO: The source code for the official 2011 release (4870) has been branched here:
https://ja2svn.dyndns.org/source/ja2/branches/JA2_rev.4870_2011

This commit contains the following features:

*** Externalized Vehicles ***
o Now with this feature we can add/remove vehicles
o New XML File: TableData\Vehicles.xml
o Added a new function parameter to lua file Scripts\Overhead lua to set up the helicopter in method: SetUpHelicopterForPlayer()
o Added example mini (Docs\Externalized Vehicles Example.zip) mod which adds 2 additional vehicles (hummer and ice-cream truck to sector A9)

*** Up to 255 save slots ***
- There is a "Next" and "Prev" button where you can scroll through the save slots
- It is now possible to load the automatic save (SAVE_EVERY_N_HOURS) from the load screen. This is the first slot after the quickload slot
- Added the 2 alternate players end turn saves (which can be enabled/disabled in option screen) to the save/load game form

*** New Feature: Externalized emails from Emails.edt to XML***
o This feature can be enabled/disabled in the Source:
--> See email.cpp: If "ReadXMLEmail" == FALSE, then normal way (read from Email.edt) otherwise read from XML files
o 2 new XML files: TableData\Email\EmailMercAvailable.xml and EmailMercLevelUp.xml
o Renamed SenderNamesList.xml to EmailSenderNamesList.xml and moved from TableData folder to TableData\Email folder
o Names for mercenaries are get from the file MercProfiles.xml and different names get from the file EmailSenderNamesList.xml

*** Externalized Hidden Towns (Tixa, Orta) ***
o Now it is possible to add new hidden towns (locations)
o See file: TableData/Map/Cities.xml
o New variable in TableData/Map/Cities.xml
- hiddenTown:   0 = show on strategy map, 1 = Hide on strategy map
- townIcon:     1 = on, 0 = off (This is the icon you see on the strategy map)
- szIconFile:   The path to the sti icon file (eg: interface\prison.sti, interface\my_icon.sti)
- iconPosition: The x,y position of the icon on the strategy map

*** Encyclopedia and Briefing Room, reachable from the laptop ***
o 2 new ja2_options.ini properties: BRIEFING_ROOM, ENCYCLOPEDIA
o demonstration video: http://www.youtube.com/watch?v=7CIXdXWLrAo
o Added Example usage of the Briefing Room
- Extract it in your JA2 1.13 folder and use the latest development executable
- The briefing room can be reached from the laptop. Enter SN5631 for the code and then click the "Exit" button
- See "Info_BriefingRoom.txt" and "BriefingRoom_Mission1.png"

*** Improved interrupt system (IIS) ***
o This system changes the way interrupts work. See: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=290787#Post290787
o Option system (see ja2_options.ini: IMPROVED_INTERRUPT_SYSTEM)
o A few more settings for the interrupt system in ja2_options.ini
o INFO: Multiplayer games always use the "old" interrupt system, not matter what the user selects in the ja2_options.ini

*** Walking and sidestepping with weapon raised ***
o Enable/disable the walking/sidestepping with raised weapon in ja2_options.ini: ALLOW_WALKING_WITH_WEAPON_RAISED
o You can set an AP/BP modifier when walking/sidestepping with weapon raised in APBPConstants.ini: AP_MODIFIER_WEAPON_READY
o The following feature apply when you walk/sidestep with weapon raised:
-> limited angle of view, but you can see more farther when the weapon has a scope
-> better change for interrupts if you see an enemy
-> less APs and BPs when shooting, because the weapon is already raised
-> It should cost more APs when walking. Maybe you can export the additional AP and BP modifier to the APBPConstants.ini

*** Increase squad size to 8 (800x600) and 8 and 10 (1024x768) ***
o Squad sizes (dependend on the screen resolution) can be selected in the start new game screen
o In a multiplayer game, the squad size will always be 6, because it does not work with more soldiers/squad

*** Added UB-1.13 source code ***
o Merged the UB-1.13 source code (Revision: 4721) from svn: http://subversion.assembla.com/svn/ub-source113
o If you want to build UB-EXE or UB-MapEditor, just enable the 2 defines (JA2UB and JA2UBMAPS) in "builddefines.h"
o The UB-Verion reads from "ja2_UB.ini" instead of "ja2.ini"
o There are 2 new XML files
- Layout\LayoutMainMenu.xml
- MapAction\ActionItems.xml
o There are 2 new LUA-Script files
- Scripts\ExplosionControl.lua
- Scripts\InterfaceDialogue.lua

*** Hide enemy health text / enemy hit count ***
o ja2_options.ini: HIDE_ENEMY_HEALTH_TEXT, HIDE_ENEMY_HIT_COUNT
o both new settings only have effect in a singleplayer game
o see: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=128840&page=1


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4885 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-01-18 11:19:01 +00:00

267 lines
7.6 KiB
C

#ifndef __MAP_SCREEN_HELICOPTER_H
#define __MAP_SCREEN_HELICOPTER_H
#include "Types.h"
#include "Soldier Control.h"
// costs of flying through sectors
#define COST_AIRSPACE_SAFE 100
#define COST_AIRSPACE_UNSAFE 1000 // VERY dangerous
#define MIN_PROGRESS_FOR_SKYRIDER_QUOTE_DOING_WELL 25 // scale of 0-100
#define MIN_REGRESS_FOR_SKYRIDER_QUOTE_DOING_BADLY 10 // scale of 0-100
// skyrider quotes
#define OWED_MONEY_TO_SKYRIDER 11
#define MENTION_DRASSEN_SAM_SITE 20
#define SECOND_HALF_OF_MENTION_DRASSEN_SAM_SITE 21
#define SAM_SITE_TAKEN 22
#define SKYRIDER_SAYS_HI 23
#define SPIEL_ABOUT_OTHER_SAM_SITES 24
#define SECOND_HALF_OF_SPIEL_ABOUT_OTHER_SAM_SITES 25
#define SPIEL_ABOUT_ESTONI_AIRSPACE 26
#define CONFIRM_DESTINATION 27
//#define DESTINATION_TOO_FAR 28 // unused
#define ALTERNATE_FUEL_SITE 26
#define ARRIVED_IN_HOSTILE_SECTOR 29
#define BELIEVED_ENEMY_SECTOR 30 // may become unused
#define ARRIVED_IN_NON_HOSTILE_SECTOR 31
#define HOVERING_A_WHILE 32
#define RETURN_TO_BASE 33
#define ENEMIES_SPOTTED_EN_ROUTE_IN_FRIENDLY_SECTOR_A 34
#define ENEMIES_SPOTTED_EN_ROUTE_IN_FRIENDLY_SECTOR_B 35
#define MENTION_HOSPITAL_IN_CAMBRIA 45
#define THINGS_ARE_GOING_BADLY 46
#define THINGS_ARE_GOING_WELL 47
#define CHOPPER_NOT_ACCESSIBLE 48
#define DOESNT_WANT_TO_FLY 49
#define HELI_TOOK_MINOR_DAMAGE 52
#define HELI_TOOK_MAJOR_DAMAGE 53
#define HELI_GOING_DOWN 54
#define HELI_PATH_THROUGH_ENEMEY_AIRSPACE 55
#define HELI_HOT_DROP 56
// enums for skyrider monologue
enum{
SKYRIDER_MONOLOGUE_EVENT_DRASSEN_SAM_SITE = 0,
SKYRIDER_MONOLOGUE_EVENT_OTHER_SAM_SITES,
SKYRIDER_MONOLOGUE_EVENT_ESTONI_REFUEL,
SKYRIDER_MONOLOGUE_EVENT_CAMBRIA_HOSPITAL,
};
enum
{
DRASSEN_REFUELING_SITE = 0,
ESTONI_REFUELING_SITE,
NUMBER_OF_REFUEL_SITES,
};
// the sam site enums
enum{
SAM_SITE_ONE = 0, // near Chitzena
SAM_SITE_TWO, // near Drassen
SAM_SITE_THREE, // near Cambria
SAM_SITE_FOUR, // near Meduna
NUMBER_OF_SAM_SITES,
};
// list of refueling site's sector locations
extern UINT8 ubRefuelList[ NUMBER_OF_REFUEL_SITES ][ 2 ];
// is the helicopter available to player?
extern BOOLEAN fHelicopterAvailable;
// helicopter vehicle id value
extern INT32 iHelicopterVehicleId;
// heli is hovering
extern BOOLEAN fHoveringHelicopter;
// helicopter icon
extern UINT32 guiHelicopterIcon;
// helicopter destroyed
extern BOOLEAN fHelicopterDestroyed;
// is the pilot returning straight to base?
extern BOOLEAN fHeliReturnStraightToBase;
// is the heli in the air?
extern BOOLEAN fHelicopterIsAirBorne;
// total distance travelled
//extern INT32 iTotalHeliDistanceSinceRefuel;
// total owed to player
//extern INT32 iTotalAccumlatedCostByPlayer;
// whether or not skyrider is alive and well? and on our side yet?
extern BOOLEAN fSkyRiderAvailable;
// time started hovering
extern UINT32 uiStartHoverTime;
// what state is skyrider's dialogue in in?
extern UINT32 guiHelicopterSkyriderTalkState;
// plot for helicopter
extern BOOLEAN fPlotForHelicopter;
// the flags for skyrider events
extern BOOLEAN fShowEstoniRefuelHighLight;
extern BOOLEAN fShowOtherSAMHighLight;
extern BOOLEAN fShowDrassenSAMHighLight;
extern BOOLEAN fShowCambriaHospitalHighLight;
extern INT32 iTotalAccumulatedCostByPlayer;
extern UINT32 guiTimeOfLastSkyriderMonologue;
extern BOOLEAN fSkyRiderSetUp;
extern BOOLEAN fRefuelingSiteAvailable[ NUMBER_OF_REFUEL_SITES ];
extern UINT8 gubHelicopterHitsTaken;
extern BOOLEAN gfSkyriderSaidCongratsOnTakingSAM;
extern UINT8 gubPlayerProgressSkyriderLastCommentedOn;
// add and remove grunts from the helicopter
BOOLEAN AddSoldierToHelicopter( SOLDIERTYPE *pSoldier );
BOOLEAN RemoveSoldierFromHelicopter( SOLDIERTYPE *pSoldier );
#ifdef JA2TESTVERSION
extern BOOLEAN fSAMSitesDisabledFromAttackingPlayer;
#endif
/* ARM: Max. fuel range system removed
// add another sector to how far helictoper has travelled
void AddSectorToHelicopterDistanceTravelled( void );
// total distance travelled since last refuel
INT32 HowFarHelicopterhasTravelledSinceRefueling( void );
// get the total the heli can go
INT32 GetTotalDistanceHelicopterCanTravel( void );
// how far can helicopter can travel before refuel
INT32 HowFurtherCanHelicopterTravel( void );
// check if this sector is out of the way
BOOLEAN IsSectorOutOfTheWay( INT16 sX, INT16 sY );
*/
// how far to nearest refuel point from this sector?
INT32 DistanceToNearestRefuelPoint( INT16 sX, INT16 sY );
// location of closest
INT32 LocationOfNearestRefuelPoint( BOOLEAN fNotifyPlayerIfNoSafeLZ );
// refuel helicopter
void ReFuelHelicopter( void );
// how much will it cost for helicopter to travel through this sector?
INT32 GetCostOfPassageForHelicopter( INT16 sX, INT16 sY );
// helicopter shot down, kill all on board
void SkyriderDestroyed( void );
// have pilot say different stuff
void HelicopterDialogue( UINT8 ubDialogueCondition );
// is the helicopter available for flight?
BOOLEAN CanHelicopterFly( void );
// is the pilot alive and on our side?
BOOLEAN IsHelicopterPilotAvailable( void );
// land the helicopter here
void LandHelicopter( void );
// have helicopter take off
void TakeOffHelicopter( void );
// test whether or not a sector contains a fuel site
BOOLEAN IsRefuelSiteInSector( INT16 sMapX, INT16 sMapY );
// update which refueling sites are controlled by player & therefore available
void UpdateRefuelSiteAvailability( void );
// setup helicopter for player
void SetUpHelicopterForPlayer( INT16 sX, INT16 sY , UINT8 SkyDrive, UINT8 VehicleID );
// the intended path of the helicopter
INT32 DistanceOfIntendedHelicopterPath( void );
// handle a little wait for hover
void HandleHeliHoverLong( void );
// handle a LONG wait in hover mode
void HandleHeliHoverTooLong( void );
// start the heli hover time
void StartHoverTime( void );
// drop off everyone in helicopter
void DropOffEveryOneInHelicopter( void );
// handle heli entering this sector
BOOLEAN HandleHeliEnteringSector( INT16 sX, INT16 sY );
// check for arrival at refuel
BOOLEAN CheckForArrivalAtRefuelPoint( void );
// set up helic, if it doesn't have a mvt group
void SetUpHelicopterForMovement( void );
// number of passengers in helicopter
INT32 GetNumberOfPassengersInHelicopter( void );
// skyrider talking to player
void SkyRiderTalk( UINT16 usQuoteNum );
// sky rider monlogue events for mapscreen
void HandleSkyRiderMonologueEvent( UINT32 uiEventCode, UINT32 uiSpecialCode );
// handle animation of sectors for mapscreen
void HandleAnimationOfSectors( void );
// check and handle skyrider monologue
void CheckAndHandleSkyriderMonologues( void );
// last sector value in helicopter's path
INT16 LastSectorInHelicoptersPath( void );
// total cost of helicopter trip
//INT32 GetTotalCostOfHelicopterTrip( void );
void HandleHelicopterOnGroundGraphic( void );
void HandleHelicopterOnGroundSkyriderProfile( void );
BOOLEAN IsHelicopterOnGroundAtRefuelingSite( UINT8 ubRefuelingSite );
BOOLEAN HandleSAMSiteAttackOfHelicopterInSector( INT16 sSectorX, INT16 sSectorY );
// is the helicopter capable of taking off for the player?
BOOLEAN CanHelicopterTakeOff( void );
void InitializeHelicopter( void );
BOOLEAN IsSkyriderIsFlyingInSector( INT16 sSectorX, INT16 sSectorY );
BOOLEAN IsGroupTheHelicopterGroup( GROUP *pGroup );
INT16 GetNumSafeSectorsInPath( void );
INT16 GetNumUnSafeSectorsInPath( void );
BOOLEAN SoldierAboardAirborneHeli( SOLDIERTYPE *pSoldier );
UINT8 MoveAllInHelicopterToFootMovementGroup( void );
#endif