mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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
This commit is contained in:
+291
-2
@@ -20,6 +20,10 @@
|
||||
#include "GameSettings.h"
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "ub_config.h"
|
||||
#endif
|
||||
|
||||
#define TOP_X LAPTOP_SCREEN_UL_X
|
||||
#define TOP_Y LAPTOP_SCREEN_UL_Y
|
||||
#define BLOCK_FILE_HEIGHT 10
|
||||
@@ -44,7 +48,12 @@
|
||||
#define FILES_LIST_X FILES_SENDER_TEXT_X
|
||||
#define FILES_LIST_Y ( 9 * BLOCK_HEIGHT )
|
||||
#define FILES_LIST_WIDTH 100
|
||||
|
||||
#ifdef JA2UB
|
||||
#define LENGTH_OF_ENRICO_FILE 39 //Ja25 68
|
||||
#else
|
||||
#define LENGTH_OF_ENRICO_FILE 68
|
||||
#endif
|
||||
#define MAX_FILE_MESSAGE_PAGE_SIZE 325
|
||||
#define VIEWER_MESSAGE_BODY_START_Y FILES_LIST_Y
|
||||
#define PREVIOUS_FILE_PAGE_BUTTON_X iScreenWidthOffset + 553
|
||||
@@ -56,6 +65,13 @@
|
||||
#define FILES_COUNTER_2_WIDTH 43
|
||||
#define FILES_COUNTER_3_WIDTH 45
|
||||
|
||||
#ifdef JA2UB
|
||||
#define RIS_EDT_FILE_JA25 "BINARYDATA\\RIS25.edt"
|
||||
#define RIS_EDT_FILE_JA2 "BINARYDATA\\RIS.edt"
|
||||
|
||||
#define MAP_JA25 "LAPTOP\\TraconaMap.sti"
|
||||
#define MAP_JA2 "LAPTOP\\ArucoFilesMap.sti"
|
||||
#endif
|
||||
|
||||
// the highlighted line
|
||||
INT32 iHighLightFileLine=-1;
|
||||
@@ -176,6 +192,8 @@ void AddStringToFilesList( STR16 pString );
|
||||
BOOLEAN HandleSpecialFiles( UINT8 ubFormat );
|
||||
BOOLEAN HandleSpecialTerroristFile( INT32 iFileNumber, STR sPictureName );
|
||||
|
||||
BOOLEAN HandleMissionBriefingFiles( UINT8 ubFormat ); //mission briefing by Jazz
|
||||
FileRecordWidthPtr CreateWidthRecordsForMissionBriefingFile( void );
|
||||
|
||||
// callbacks
|
||||
void FilesBtnCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
@@ -224,8 +242,16 @@ void GameInitFiles( )
|
||||
ClearFilesList( );
|
||||
|
||||
// add background check by RIS
|
||||
AddFilesToPlayersLog( ENRICO_BACKGROUND, 0,255, NULL, NULL );
|
||||
|
||||
//#ifdef JA2UB
|
||||
//if ( gGameUBOptions.RISRAPORT == TRUE )
|
||||
// AddFilesToPlayersLog( ENRICO_BACKGROUND, 0,255, NULL, NULL );
|
||||
//#else
|
||||
AddFilesToPlayersLog( ENRICO_BACKGROUND, 0,255, NULL, NULL );
|
||||
//#endif
|
||||
|
||||
//mission briefing by Jazz
|
||||
//AddFilesToPlayersLog( MISSION_BRIEFING, 0,4, NULL, NULL );
|
||||
}
|
||||
|
||||
void EnterFiles()
|
||||
@@ -997,6 +1023,11 @@ BOOLEAN DisplayFormattedText( void )
|
||||
// load first graphic
|
||||
HandleSpecialTerroristFile( pFilesList->ubCode, pFilesList->pPicFileNameList[ 0 ] );
|
||||
break;
|
||||
case 4:
|
||||
// picture on the left, with text on right and below
|
||||
// load first graphic
|
||||
HandleMissionBriefingFiles( pFilesList->ubFormat );
|
||||
break;
|
||||
default:
|
||||
HandleSpecialFiles( pFilesList->ubFormat );
|
||||
break;
|
||||
@@ -1009,6 +1040,232 @@ BOOLEAN DisplayFormattedText( void )
|
||||
return ( TRUE );
|
||||
}
|
||||
|
||||
//Mission briefing by Jazz
|
||||
|
||||
FileRecordWidthPtr CreateWidthRecordsForMissionBriefingFile( void )
|
||||
{
|
||||
// this fucntion will create the width list for the Arulco intelligence file
|
||||
FileRecordWidthPtr pTempRecord = NULL;
|
||||
FileRecordWidthPtr pRecordListHead = NULL;
|
||||
|
||||
|
||||
// first record width
|
||||
// pTempRecord = CreateRecordWidth( 7, 350, 200,0 );
|
||||
pTempRecord = CreateRecordWidth( FILES_COUNTER_1_WIDTH, 200, 0,0 );
|
||||
|
||||
// set up head of list now
|
||||
pRecordListHead = pTempRecord;
|
||||
|
||||
// next record
|
||||
// pTempRecord->Next = CreateRecordWidth( 43, 200,0, 0 );
|
||||
pTempRecord->Next = CreateRecordWidth( FILES_COUNTER_2_WIDTH, 200,0, 0 );
|
||||
pTempRecord = pTempRecord->Next;
|
||||
|
||||
// and the next..
|
||||
// pTempRecord->Next = CreateRecordWidth( 45, 200,0, 0 );
|
||||
pTempRecord->Next = CreateRecordWidth( FILES_COUNTER_3_WIDTH, 200,0, 0 );
|
||||
pTempRecord = pTempRecord->Next;
|
||||
|
||||
return( pRecordListHead );
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN HandleMissionBriefingFiles( UINT8 ubFormat )
|
||||
{
|
||||
INT32 iCounter = 0;
|
||||
CHAR16 sString[2048];
|
||||
FileStringPtr pTempString = NULL ;
|
||||
FileStringPtr pLocatorString = NULL;
|
||||
INT32 iYPositionOnPage = 0;
|
||||
INT32 iFileLineWidth = 0;
|
||||
INT32 iFileStartX = 0;
|
||||
UINT32 uiFlags = 0;
|
||||
UINT32 uiFont = 0;
|
||||
BOOLEAN fGoingOffCurrentPage = FALSE;
|
||||
FileRecordWidthPtr WidthList = NULL;
|
||||
|
||||
|
||||
UINT32 uiPicture;
|
||||
HVOBJECT hHandle;
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
|
||||
ClearFileStringList( );
|
||||
|
||||
switch( ubFormat )
|
||||
{
|
||||
case( 4 ):
|
||||
// load data
|
||||
// read one record from file manager file
|
||||
|
||||
WidthList = CreateWidthRecordsForMissionBriefingFile( );
|
||||
while( iCounter < 250 )
|
||||
{
|
||||
LoadEncryptedDataFromFile( "binarydata\\MissionBriefing.EDT", sString, FILE_STRING_SIZE * ( iCounter ) * 2, FILE_STRING_SIZE * 2 );
|
||||
|
||||
AddStringToFilesList( sString );
|
||||
iCounter++;
|
||||
}
|
||||
|
||||
pTempString = pFileStringList;
|
||||
|
||||
|
||||
iYPositionOnPage = 0;
|
||||
iCounter = 0;
|
||||
pLocatorString = pTempString;
|
||||
|
||||
pTempString = GetFirstStringOnThisPage( pFileStringList,FILES_TEXT_FONT, 350, FILE_GAP, giFilesPage, MAX_FILE_MESSAGE_PAGE_SIZE, WidthList);
|
||||
|
||||
// find out where this string is
|
||||
while( pLocatorString != pTempString )
|
||||
{
|
||||
iCounter++;
|
||||
pLocatorString = pLocatorString->Next;
|
||||
}
|
||||
|
||||
|
||||
// move through list and display
|
||||
while( pTempString )
|
||||
{
|
||||
uiFlags = IAN_WRAP_NO_SHADOW;
|
||||
// copy over string
|
||||
wcscpy( sString, pTempString->pString );
|
||||
|
||||
if( sString[ 0 ] == 0 )
|
||||
{
|
||||
// on last page
|
||||
fOnLastFilesPageFlag = TRUE;
|
||||
}
|
||||
|
||||
|
||||
// set up font
|
||||
uiFont = FILES_TEXT_FONT;
|
||||
if( giFilesPage == 0 )
|
||||
{
|
||||
switch( iCounter )
|
||||
{
|
||||
case( 0 ):
|
||||
uiFont = FILES_TITLE_FONT;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if( iCounter == 0 )
|
||||
{
|
||||
// reset width
|
||||
iFileLineWidth = 350;
|
||||
iFileStartX = (UINT16) ( FILE_VIEWER_X + 10 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// reset width
|
||||
iFileLineWidth = 350;
|
||||
iFileStartX = (UINT16) ( FILE_VIEWER_X + 10 );
|
||||
}
|
||||
|
||||
if( ( iYPositionOnPage + IanWrappedStringHeight(0, 0, ( UINT16 )iFileLineWidth, FILE_GAP,
|
||||
uiFont, 0, sString,
|
||||
0, 0, 0 ) ) < MAX_FILE_MESSAGE_PAGE_SIZE )
|
||||
{
|
||||
// now print it
|
||||
iYPositionOnPage += ( INT32 )IanDisplayWrappedString((UINT16) ( iFileStartX ), ( UINT16 )( FILE_VIEWER_Y + iYPositionOnPage), ( INT16 )iFileLineWidth, FILE_GAP, uiFont, FILE_TEXT_COLOR, sString,0,FALSE, uiFlags );
|
||||
|
||||
fGoingOffCurrentPage = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// gonna get cut off...end now
|
||||
fGoingOffCurrentPage = TRUE;
|
||||
}
|
||||
|
||||
pTempString = pTempString->Next;
|
||||
|
||||
if( pTempString == NULL )
|
||||
{
|
||||
// on last page
|
||||
fOnLastFilesPageFlag = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
fOnLastFilesPageFlag = FALSE;
|
||||
}
|
||||
|
||||
// going over the edge, stop now
|
||||
if( fGoingOffCurrentPage == TRUE )
|
||||
{
|
||||
pTempString = NULL;
|
||||
}
|
||||
iCounter++;
|
||||
}
|
||||
ClearOutWidthRecordsList( WidthList );
|
||||
ClearFileStringList( );
|
||||
break;
|
||||
}
|
||||
|
||||
// place pictures
|
||||
// page 1 picture of country
|
||||
if( giFilesPage == 0 )
|
||||
{
|
||||
// title bar
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
//Ja25, new map
|
||||
#ifdef JA2UB
|
||||
if (FileExists(MAP_JA25))
|
||||
{
|
||||
FilenameForBPP("LAPTOP\\TraconaMap.sti", VObjectDesc.ImageFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
FilenameForBPP("LAPTOP\\ArucoFilesMap.sti", VObjectDesc.ImageFile);
|
||||
}
|
||||
#else
|
||||
FilenameForBPP("LAPTOP\\ArucoFilesMap.sti", VObjectDesc.ImageFile);
|
||||
#endif
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &uiPicture));
|
||||
|
||||
// get title bar object
|
||||
GetVideoObject(&hHandle, uiPicture);
|
||||
|
||||
// blt title bar to screen
|
||||
BltVideoObject(FRAME_BUFFER, hHandle, 0,iScreenWidthOffset + 300, iScreenHeightOffset + 270, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
DeleteVideoObjectFromIndex( uiPicture );
|
||||
|
||||
}
|
||||
else if( giFilesPage == 1 )
|
||||
{
|
||||
// title bar
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
//Ja25, new map
|
||||
#ifdef JA2UB
|
||||
if (FileExists(MAP_JA25))
|
||||
{
|
||||
FilenameForBPP("LAPTOP\\TraconaMap.sti", VObjectDesc.ImageFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
FilenameForBPP("LAPTOP\\ArucoFilesMap.sti", VObjectDesc.ImageFile);
|
||||
}
|
||||
#else
|
||||
FilenameForBPP("LAPTOP\\ArucoFilesMap.sti", VObjectDesc.ImageFile);
|
||||
#endif
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &uiPicture));
|
||||
|
||||
// get title bar object
|
||||
GetVideoObject(&hHandle, uiPicture);
|
||||
|
||||
// blt title bar to screen
|
||||
BltVideoObject(FRAME_BUFFER, hHandle, 0,iScreenWidthOffset + 300, iScreenHeightOffset + 270, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
DeleteVideoObjectFromIndex( uiPicture );
|
||||
|
||||
}
|
||||
|
||||
return ( TRUE );
|
||||
}
|
||||
|
||||
//-------------------------------------------
|
||||
|
||||
BOOLEAN HandleSpecialFiles( UINT8 ubFormat )
|
||||
{
|
||||
@@ -1041,7 +1298,18 @@ BOOLEAN HandleSpecialFiles( UINT8 ubFormat )
|
||||
WidthList = CreateWidthRecordsForAruloIntelFile( );
|
||||
while( iCounter < LENGTH_OF_ENRICO_FILE )
|
||||
{
|
||||
#ifdef JA2UB
|
||||
if (FileExists(RIS_EDT_FILE_JA25))
|
||||
{
|
||||
LoadEncryptedDataFromFile( RIS_EDT_FILE_JA25, sString, FILE_STRING_SIZE * ( iCounter ) * 2, FILE_STRING_SIZE * 2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadEncryptedDataFromFile( RIS_EDT_FILE_JA25, sString, FILE_STRING_SIZE * ( iCounter ) * 2, FILE_STRING_SIZE * 2 );
|
||||
}
|
||||
#else
|
||||
LoadEncryptedDataFromFile( "BINARYDATA\\RIS.EDT", sString, FILE_STRING_SIZE * ( iCounter ) * 2, FILE_STRING_SIZE * 2 );
|
||||
#endif
|
||||
AddStringToFilesList( sString );
|
||||
iCounter++;
|
||||
}
|
||||
@@ -1189,7 +1457,19 @@ BOOLEAN HandleSpecialFiles( UINT8 ubFormat )
|
||||
{
|
||||
// title bar
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
#ifdef JA2UB
|
||||
//Ja25, new map
|
||||
if (FileExists(MAP_JA25))
|
||||
{
|
||||
FilenameForBPP("LAPTOP\\TraconaMap.sti", VObjectDesc.ImageFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
FilenameForBPP("LAPTOP\\ArucoFilesMap.sti", VObjectDesc.ImageFile);
|
||||
}
|
||||
#else
|
||||
FilenameForBPP("LAPTOP\\ArucoFilesMap.sti", VObjectDesc.ImageFile);
|
||||
#endif
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &uiPicture));
|
||||
|
||||
// get title bar object
|
||||
@@ -1201,6 +1481,10 @@ BOOLEAN HandleSpecialFiles( UINT8 ubFormat )
|
||||
DeleteVideoObjectFromIndex( uiPicture );
|
||||
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
//JA25 : no picture needed
|
||||
#else
|
||||
else if( giFilesPage == 4 )
|
||||
{
|
||||
// kid pic
|
||||
@@ -1217,6 +1501,11 @@ BOOLEAN HandleSpecialFiles( UINT8 ubFormat )
|
||||
DeleteVideoObjectFromIndex( uiPicture );
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 No picture
|
||||
#else
|
||||
else if( giFilesPage == 5 )
|
||||
{
|
||||
|
||||
@@ -1234,7 +1523,7 @@ BOOLEAN HandleSpecialFiles( UINT8 ubFormat )
|
||||
|
||||
DeleteVideoObjectFromIndex( uiPicture );
|
||||
}
|
||||
|
||||
#endif
|
||||
return ( TRUE );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user