Files
source/Strategic/Map Screen Interface Map.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

331 lines
9.0 KiB
C

#ifndef _MAP_SCREEN_INTERFACE_MAP_H
#define _MAP_SCREEN_INTERFACE_MAP_H
#include "Vehicles.h"
#include "mapscreen.h"
// functions
void DrawMapIndexBigMap( BOOLEAN fSelectedCursorIsYellow );
//void DrawMapIndexSmallMap( BOOLEAN fSelectedCursorIsYellow );
UINT32 DrawMap( void );
#define MAX_ICON_CHARS 500
typedef struct
{
CHAR8 IconSti[MAX_ICON_CHARS];
INT32 IconX;
INT32 IconY;
} ICON_FILE;
extern ICON_FILE gHiddenIcon[ 256 ];
extern UINT32 guiIcon2[256];
extern BOOLEAN LoadHiddenTownFromLoadGameFile( HWFILE hFile );
extern BOOLEAN SaveHiddenTownToSaveGameFile( HWFILE hFile );
void GetScreenXYFromMapXY( INT16 sMapX, INT16 sMapY, INT16 *psX, INT16 *psY );
void GetScreenXYFromMapXYStationary( INT16 sMapX, INT16 sMapY, INT16 *psX, INT16 *psY );
BOOLEAN InitializePalettesForMap( void );
void InitializeMilitiaPopup(void);
void ShutDownPalettesForMap( void );
// plot path for helicopter
void PlotPathForHelicopter( INT16 sX, INT16 sY );
// the temp path, where the helicopter could go
void PlotATemporaryPathForHelicopter( INT16 sX, INT16 sY );
// trace a route for a passed path...doesn't require dest char - most more general
BOOLEAN TracePathRoute( BOOLEAN fCheckFlag, BOOLEAN fForceUpDate, PathStPtr pPath );
// show arrows for this char
void DisplayPathArrows(UINT16 usCharNum, HVOBJECT hMapHandle);
// restore backgrounds for arrows
void RestoreArrowBackgroundsForTrace(INT32 iArrow, INT32 iArrowX, INT32 iArrowY, BOOLEAN fZoom);
// build path for character
void PlotPathForCharacter( SOLDIERTYPE *pCharacter, INT16 sX, INT16 sY, BOOLEAN fTacticalTraversal );
// build temp path for character
void PlotATemporaryPathForCharacter( SOLDIERTYPE *pCharacter, INT16 sX, INT16 sY );
// display current/temp paths
void DisplaySoldierPath( SOLDIERTYPE *pCharacter );
void DisplaySoldierTempPath( SOLDIERTYPE *pCharacter );
void DisplayHelicopterPath( void );
void DisplayHelicopterTempPath( void );
// clear path after this sector
UINT32 ClearPathAfterThisSectorForCharacter( SOLDIERTYPE *pCharacter, INT16 sX, INT16 sY );
// cancel path : clear the path completely and gives player feedback message that the route was canceled
void CancelPathForCharacter( SOLDIERTYPE *pCharacter );
void CancelPathForVehicle( VEHICLETYPE *pVehicle, BOOLEAN fAlreadyReversed );
void CancelPathForGroup( GROUP *pGroup );
// check if we have waited long enought object update temp path
void DisplayThePotentialPathForHelicopter(INT16 sMapX, INT16 sMapY );
// clear out helicopter list after this sector
UINT32 ClearPathAfterThisSectorForHelicopter( INT16 sX, INT16 sY );
// check to see if sector is highlightable
BOOLEAN IsTheCursorAllowedToHighLightThisSector( INT16 sSectorX, INT16 sSectorY );
// set bad sectors list
void SetUpBadSectorsList( void );
// restore background for map grids
void RestoreBackgroundForMapGrid( INT16 sMapX, INT16 sMapY );
// clip blits to map view region
void ClipBlitsToMapViewRegion( void );
void ClipBlitsToMapViewRegionForRectangleAndABit( UINT32 uiDestPitchBYTES );
// clip blits to full screen....restore after use of ClipBlitsToMapViewRegion( )
void RestoreClipRegionToFullScreen( void );
void RestoreClipRegionToFullScreenForRectangle( UINT32 uiDestPitchBYTES );
// show the icons for people in motion
void ShowPeopleInMotion( INT16 sX, INT16 sY );
// last sector in helicopter's path
INT16 GetLastSectorOfHelicoptersPath( void );
// display info about helicopter path
void DisplayDistancesForHelicopter( void );
// display where hei is
void DisplayPositionOfHelicopter( void );
// check for click
BOOLEAN CheckForClickOverHelicopterIcon( INT16 sX, INT16 sY );
// show town markers
void BlitTownGridMarkers( void );
// load and delete the graphics for the map screen map militia
BOOLEAN LoadMilitiaPopUpBox( void );
void RemoveMilitiaPopUpBox( void );
// check if anyone left behind, if not, move selected cursor along with movement group
//void CheckIfAnyoneLeftInSector( INT16 sX, INT16 sY, INT16 sNewX, INT16 sNewY, INT8 bZ );
// grab the total number of militia in sector
INT32 GetNumberOfMilitiaInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
// create destroy
void CreateDestroyMilitiaPopUPRegions( void );
// draw the militia box
BOOLEAN DrawMilitiaPopUpBox( void );
//Returns true if the player knows how many enemies are in the sector if that number is greater than 0.
//Returns false for all other cases.
UINT32 WhatPlayerKnowsAboutEnemiesInSector( INT16 sSectorX, INT16 sSectorY );
//There is a special case flag used when players encounter enemies in a sector, then retreat. The number of enemies
//will display on mapscreen until time is compressed. When time is compressed, the flag is cleared, and
//a question mark is displayed to reflect that the player no longer knows. This is the function that clears that
//flag.
void ClearAnySectorsFlashingNumberOfEnemies();
void CopyPathToCharactersSquadIfInOne( SOLDIERTYPE *pCharacter );
void InitMapSecrets( void );
enum {
ABORT_PLOTTING = 0,
PATH_CLEARED,
PATH_SHORTENED,
};
// what the player knows about the enemies in a given sector
enum {
KNOWS_NOTHING = 0,
KNOWS_THEYRE_THERE,
KNOWS_HOW_MANY,
};
// scroll bounds
#define EAST_ZOOM_BOUND 378
#define WEST_ZOOM_BOUND 42
#define SOUTH_ZOOM_BOUND 324
#define NORTH_ZOOM_BOUND 36
// WANNE: The starting top/left position of the background image
#define MAP_BORDER_X 261
#define MAP_BORDER_Y 0
// size of squares on the map
extern UINT16 MAP_GRID_X;
extern UINT16 MAP_GRID_Y;
extern UINT16 MAP_BORDER_X_OFFSET;
extern UINT16 MAP_BORDER_Y_OFFSET;
extern UINT16 MAP_VIEW_START_X;
extern UINT16 MAP_VIEW_START_Y;
extern UINT16 MAP_VIEW_WIDTH;
extern UINT16 MAP_VIEW_HEIGHT;
extern INT32 MAP_FONT;
extern INT32 ETA_FONT;
extern UINT16 MAP_HORT_INDEX_X;
extern UINT16 MAP_HORT_INDEX_Y;
extern UINT16 MAP_HORT_HEIGHT;
extern UINT16 MAP_VERT_INDEX_X;
extern UINT16 MAP_VERT_INDEX_Y;
extern UINT16 MAP_VERT_WIDTH;
// Helicopter eta popup position
extern UINT16 MAP_HELICOPTER_ETA_POPUP_X;
extern UINT16 MAP_HELICOPTER_ETA_POPUP_Y;
extern UINT16 MAP_HELICOPTER_UPPER_ETA_POPUP_Y;
extern UINT16 MAP_HELICOPTER_ETA_POPUP_WIDTH;
extern UINT16 MAP_HELICOPTER_ETA_POPUP_HEIGHT;
// sublevel text string position
extern UINT16 MAP_LEVEL_STRING_X;
extern UINT16 MAP_LEVEL_STRING_Y;
// zoomed in grid sizes
#define MAP_GRID_ZOOM_X MAP_GRID_X*2
#define MAP_GRID_ZOOM_Y MAP_GRID_Y*2
// number of units wide
#define WORLD_MAP_X 18 // WANNE: 18 darf nicht geändert werden!
// dirty regions for the map
#define DMAP_GRID_X ( MAP_GRID_X + 1 )
#define DMAP_GRID_Y ( MAP_GRID_Y + 1 )
#define DMAP_GRID_ZOOM_X ( MAP_GRID_ZOOM_X+1)
#define DMAP_GRID_ZOOM_Y ( MAP_GRID_ZOOM_Y+1)
// Orta position on the map
#define ORTA_SECTOR_X 4
#define ORTA_SECTOR_Y 11
#define TIXA_SECTOR_X 9
#define TIXA_SECTOR_Y 10
// what are we showing?..teams/vehicles
// Show values
#define SHOW_TEAMMATES 1
#define SHOW_VEHICLES 2
// wait time until temp path is drawn, from placing cursor on a map grid
#define MIN_WAIT_TIME_FOR_TEMP_PATH 200
//extern INT32 MAP_VIEW_START_X;
//extern INT32 MAP_VIEW_START_Y;
// zoom UL coords
extern INT32 iZoomX;
extern INT32 iZoomY;
// the number of militia on the cursor
extern INT16 sGreensOnCursor;
extern INT16 sRegularsOnCursor;
extern INT16 sElitesOnCursor;
// highlighted sectors
extern INT16 gsHighlightSectorX;
extern INT16 gsHighlightSectorY;
// the big map
extern UINT32 guiBIGMAP;
// the orta icon
extern UINT32 guiORTAICON;
extern UINT32 guiTIXAICON;
// the character icons
extern UINT32 guiCHARICONS;
// the merc arrival sector landing zone icon
extern UINT32 guiBULLSEYE;
// character between sector icons
extern UINT32 guiCHARBETWEENSECTORICONS;
extern UINT32 guiCHARBETWEENSECTORICONSCLOSE;
// the viewable map bound region
extern SGPRect MapScreenRect;
// draw temp path
extern BOOLEAN fDrawTempHeliPath;
// selected destination char
extern INT8 bSelectedDestChar;
// current assignment character
extern INT8 bSelectedAssignChar;
// the info character
extern INT8 bSelectedInfoChar;
// the contract char
extern INT8 bSelectedContractChar;
// map arrows graphical index value
extern UINT32 guiMAPCURSORS;
// has temp path for character path or helicopter been already drawn
extern BOOLEAN fTempPathAlreadyDrawn;
// map view region clipping rect
extern SGPRect MapScreenRect;
// the map border eta pop up
extern UINT32 guiMapBorderEtaPopUp;
// heli pop up
extern UINT32 guiMapBorderHeliSectors;
// the currently selected town militia
extern INT16 sSelectedMilitiaTown;
// the selected sectors
extern UINT16 sSelMapX;
extern UINT16 sSelMapY;
extern BOOLEAN fFoundTixa;
extern UINT32 guiSubLevel1, guiSubLevel2, guiSubLevel3;
extern INT16 sBaseSectorList[ MAX_TOWNS - 1 ];
extern POINT pTownPoints[ MAX_TOWNS ];
#ifdef JA2UB
extern void SetUpValidCampaignSectors( void );
#endif
#endif