mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
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
214 lines
7.2 KiB
C
214 lines
7.2 KiB
C
#ifndef __STRATMAP_H
|
|
#define __STRATMAP_H
|
|
// this file is for manipulation of the strategic map structure
|
|
#include "types.h"
|
|
#include "soldier control.h"
|
|
#include "FileMan.h"
|
|
|
|
#include "mapscreen.h"
|
|
|
|
//The maximum size for any team strategically speaking. For example, we can't have more than 20 enemies, militia, or creatures at a time.
|
|
//#define MAX_STRATEGIC_TEAM_SIZE 20
|
|
|
|
// Codes for jumoing into adjacent sectors..
|
|
enum
|
|
{
|
|
JUMP_ALL_LOAD_NEW,
|
|
JUMP_ALL_NO_LOAD,
|
|
JUMP_SINGLE_LOAD_NEW,
|
|
JUMP_SINGLE_NO_LOAD
|
|
};
|
|
|
|
|
|
enum{
|
|
CONTROLLED=0,
|
|
UNCONTROLLED,
|
|
};
|
|
|
|
// For speed, etc lets make these globals, forget the functions if you want
|
|
extern INT16 gWorldSectorX;
|
|
extern INT16 gWorldSectorY;
|
|
extern INT8 gbWorldSectorZ;
|
|
|
|
extern BOOLEAN gfHiddenTown [ MAX_TOWNS ];
|
|
extern BOOLEAN gfDrawHiddenTown [ MAX_TOWNS ];
|
|
extern BOOLEAN gfDrawHiddenTownTemp [ MAX_TOWNS ];
|
|
extern BOOLEAN gfHiddenTownTemp [ MAX_TOWNS ];
|
|
extern BOOLEAN gfIconTown [ MAX_TOWNS ];
|
|
extern BOOLEAN gfIconTownTemp [ MAX_TOWNS ];
|
|
|
|
// SAM definitions
|
|
extern UINT8 NUMBER_OF_SAMS;
|
|
#define MAX_NUMBER_OF_SAMS 50 //4 //50
|
|
|
|
extern INT16 pSamList[ MAX_NUMBER_OF_SAMS ];
|
|
extern INT32 pSamGridNoAList[ MAX_NUMBER_OF_SAMS ];
|
|
extern INT32 pSamGridNoBList[ MAX_NUMBER_OF_SAMS ];
|
|
|
|
extern BOOLEAN fFoundOrta;
|
|
extern BOOLEAN fSamSiteFound[ MAX_NUMBER_OF_SAMS ];
|
|
|
|
extern BOOLEAN gfUseAlternateMap;
|
|
|
|
|
|
// SAM sites
|
|
#define SAM_1_X 2
|
|
#define SAM_2_X 15
|
|
#define SAM_3_X 8
|
|
#define SAM_4_X 4
|
|
|
|
#define SAM_1_Y 4
|
|
#define SAM_2_Y 4
|
|
#define SAM_3_Y 9
|
|
#define SAM_4_Y 14
|
|
|
|
// min condition for sam site to be functional
|
|
#define MIN_CONDITION_FOR_SAM_SITE_TO_WORK 80
|
|
|
|
|
|
// FUNCTIONS FOR DERTERMINING GOOD SECTOR EXIT DATA
|
|
#define CHECK_DIR_X_DELTA ( WORLD_TILE_X * 4 )
|
|
#define CHECK_DIR_Y_DELTA ( WORLD_TILE_Y * 10 )
|
|
|
|
// get index into aray
|
|
#define CALCULATE_STRATEGIC_INDEX( x, y ) ( x + ( y * MAP_WORLD_X ) )
|
|
#define GET_X_FROM_STRATEGIC_INDEX( i ) ( i % MAP_WORLD_X )
|
|
#define GET_Y_FROM_STRATEGIC_INDEX( i ) ( i / MAP_WORLD_X )
|
|
|
|
// macros to convert between the 2 different sector numbering systems
|
|
#define SECTOR_INFO_TO_STRATEGIC_INDEX( i ) ( CALCULATE_STRATEGIC_INDEX ( SECTORX( i ), SECTORY( i ) ) )
|
|
#define STRATEGIC_INDEX_TO_SECTOR_INFO( i ) ( SECTOR( GET_X_FROM_STRATEGIC_INDEX( i ), GET_Y_FROM_STRATEGIC_INDEX( i ) ) )
|
|
|
|
|
|
// grab the town id value
|
|
UINT8 GetTownIdForSector( INT16 sMapX, INT16 sMapY );
|
|
|
|
void GetCurrentWorldSector( INT16 *psMapX, INT16 *psMapY );
|
|
BOOLEAN SetCurrentWorldSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ );
|
|
|
|
BOOLEAN EnterSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
|
|
void UpdateMercsInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
|
|
void UpdateMercInSector( SOLDIERTYPE *pSoldier, INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
|
|
|
|
BOOLEAN ReadInMapStructure(STR fileName, BOOLEAN localizedVersion);
|
|
BOOLEAN ReadInStrategicMapSectorTownNames(STR fileName, BOOLEAN localizedVersion);
|
|
BOOLEAN WriteInStrategicMapSectorTownNames(STR fileName);
|
|
|
|
// get short sector name without town name
|
|
void GetShortSectorString( INT16 sMapX,INT16 sMapY, STR16 sString );
|
|
|
|
//NEW!
|
|
//Calculates the name of the sector based on the loaded sector values.
|
|
//Examples: A9
|
|
// A10_B1
|
|
// J9_B2_A ( >= BETAVERSION ) else J9_B2 (release equivalent)
|
|
void GetLoadedSectorString( STR16 pString );
|
|
|
|
// This will get an ID string like A9- OMERTA...
|
|
void GetSectorIDString( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ , STR16 zString, BOOLEAN fDetailed );
|
|
|
|
void GetMapFileName(INT16 sMapX,INT16 sMapY, INT8 bSectorZ, STR8 bString, BOOLEAN fUsePlaceholder, BOOLEAN fAddAlternateMapLetter );
|
|
|
|
// Called from within tactical.....
|
|
void JumpIntoAdjacentSector( UINT8 ubDirection, UINT8 ubJumpCode, INT32 sAdditionalData );//dnl ch56 151009
|
|
|
|
|
|
|
|
BOOLEAN CanGoToTacticalInSector( INT16 sX, INT16 sY, UINT8 ubZ );
|
|
|
|
void UpdateAirspaceControl( void );
|
|
|
|
BOOLEAN IsThisSectorASAMSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
|
|
|
|
// init sam sites
|
|
void InitializeSAMSites( void );
|
|
|
|
// get town sector size
|
|
UINT8 GetTownSectorSize( INT8 bTownId );
|
|
|
|
// get town sector size, that is under play control
|
|
UINT8 GetTownSectorsUnderControl( INT8 bTownId );
|
|
|
|
// is this sector part of this town
|
|
BOOLEAN SectorIsPartOfTown( INT8 bTownId, INT16 sSectorX, INT16 sSectorY );
|
|
|
|
//BOOLEAN IsThereAnyOneInThisTown( UINT8 ubTownId );
|
|
|
|
|
|
BOOLEAN SoldierOKForSectorExit( SOLDIERTYPE * pSoldier, INT8 bExitDirection, INT32 usAdditionalData );//dnl ch56 151009
|
|
BOOLEAN OKForSectorExit( INT8 bExitDirection, INT32 usAdditionalData, UINT32 *puiTraverseTimeInMinutes );//dnl ch56 151009
|
|
void SetupNewStrategicGame( );
|
|
|
|
BOOLEAN LoadStrategicInfoFromSavedFile( HWFILE hFile );
|
|
BOOLEAN SaveStrategicInfoToSavedFile( HWFILE hFile );
|
|
|
|
void AllMercsHaveWalkedOffSector( );
|
|
|
|
void AdjustSoldierPathToGoOffEdge( SOLDIERTYPE *pSoldier, INT32 sEndGridNo, UINT8 ubTacticalDirection );
|
|
|
|
void AllMercsWalkedToExitGrid();
|
|
UINT8 GetMilitiaCountAtLevelAnywhereInTown( UINT8 ubTownValue, UINT8 ubLevelValue );
|
|
|
|
void PrepareLoadedSector();
|
|
|
|
|
|
#ifdef JA2UB
|
|
// no JA2 UB
|
|
#else
|
|
// handle for slay...no better place to really put this stuff
|
|
void HandleSlayDailyEvent( void );
|
|
#endif
|
|
|
|
void HandleQuestCodeOnSectorEntry( INT16 sNewSectorX, INT16 sNewSectorY, INT8 bNewSectorZ );
|
|
|
|
// handle a soldier leaving thier squad behind, this sets them up for mvt and potential rejoining of group
|
|
void HandleSoldierLeavingSectorByThemSelf( SOLDIERTYPE *pSoldier );
|
|
|
|
BOOLEAN CheckAndHandleUnloadingOfCurrentWorld();
|
|
|
|
// number of SAM sites under player control
|
|
INT32 GetNumberOfSAMSitesUnderPlayerControl( void );
|
|
|
|
// is there a FUNCTIONAL SAM site in this sector?
|
|
BOOLEAN IsThereAFunctionalSAMSiteInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
|
|
|
|
BOOLEAN IsSectorDesert( INT16 sSectorX, INT16 sSectorY );
|
|
BOOLEAN IsSectorTropical( INT16 sSectorX, INT16 sSectorY ); // added by SANDRO
|
|
|
|
// sam site under players control?
|
|
INT32 SAMSitesUnderPlayerControl( INT16 sX, INT16 sY );
|
|
|
|
INT8 GetSAMIdFromSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
|
|
|
|
void SetupProfileInsertionDataForSoldier( SOLDIERTYPE *pSoldier );
|
|
|
|
BOOLEAN HandlePotentialBringUpAutoresolveToFinishBattle( int pSectorX, int pSectorY, int pSectorZ );
|
|
|
|
// WANNE - BMP;
|
|
BOOLEAN MapExists( UINT8 * szFilename );
|
|
|
|
BOOLEAN EscapeDirectionIsValid( INT8 * pbDirection );
|
|
//Used for determining the type of error message that comes up when you can't traverse to
|
|
//an adjacent sector. THESE VALUES DO NOT NEED TO BE SAVED!
|
|
extern BOOLEAN gfInvalidTraversal;
|
|
extern BOOLEAN gfLoneEPCAttemptingTraversal;
|
|
extern BOOLEAN gfRobotWithoutControllerAttemptingTraversal;
|
|
extern UINT8 gubLoneMercAttemptingToAbandonEPCs;
|
|
extern INT8 gbPotentiallyAbandonedEPCSlotID;
|
|
|
|
extern INT8 gbGreenToElitePromotions;
|
|
extern INT8 gbGreenToRegPromotions;
|
|
extern INT8 gbRegToElitePromotions;
|
|
extern INT8 gbMilitiaPromotions;
|
|
|
|
#ifdef JA2UB
|
|
void BeginLoadScreen();
|
|
|
|
//ja25 UB
|
|
void HandleSectorSpecificModificatioToMap( INT16 sMapX, INT16 sMapY, INT8 bMapZ, BOOLEAN fLoadingSavedGame );
|
|
|
|
void HandleEmailBeingSentWhenEnteringSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ, BOOLEAN fLaptopJustGotFixed );
|
|
#endif
|
|
|
|
#endif
|