mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +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:
@@ -67,6 +67,8 @@
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
|
||||
#include "Vehicles.h"
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
class SOLDIERTYPE;
|
||||
@@ -75,6 +77,19 @@ class SOLDIERTYPE;
|
||||
// HEADROCK HAM 3.5: Include Facility data
|
||||
#include "Facilities.h"
|
||||
|
||||
#include "Vehicles.h"
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "Explosion Control.h"
|
||||
#include "Ja25_Tactical.h"
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
#include "MapScreen Quotes.h"
|
||||
#include "email.h"
|
||||
#include "interface Dialogue.h"
|
||||
#include "mercs.h"
|
||||
#include "ub_config.h"
|
||||
#endif
|
||||
|
||||
// various reason an assignment can be aborted before completion
|
||||
enum{
|
||||
NO_MORE_MED_KITS = 40,
|
||||
@@ -520,6 +535,11 @@ BOOLEAN RepairObject( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOwner, OBJECTTYPE *
|
||||
void RepairItemsOnOthers( SOLDIERTYPE *pSoldier, UINT8 *pubRepairPtsLeft );
|
||||
BOOLEAN UnjamGunsOnSoldier( SOLDIERTYPE *pOwnerSoldier, SOLDIERTYPE *pRepairSoldier, UINT8 *pubRepairPtsLeft );
|
||||
|
||||
#ifdef JA2UB
|
||||
void HaveMercSayWhyHeWontLeave( SOLDIERTYPE *pSoldier ); //Ja25 UB
|
||||
BOOLEAN CanMercBeAllowedToLeaveTeam( SOLDIERTYPE *pSoldier ); //JA25 UB
|
||||
#endif
|
||||
|
||||
/* No point in allowing SAM site repair any more. Jan/13/99. ARM
|
||||
BOOLEAN IsTheSAMSiteInSectorRepairable( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ );
|
||||
BOOLEAN SoldierInSameSectorAsSAM( SOLDIERTYPE *pSoldier );
|
||||
@@ -2109,7 +2129,8 @@ INT8 CanCharacterSquad( SOLDIERTYPE *pSoldier, INT8 bSquadValue )
|
||||
return( CHARACTER_CANT_JOIN_SQUAD_VEHICLE );
|
||||
}
|
||||
|
||||
if ( NumberOfPeopleInSquad( bSquadValue ) >= NUMBER_OF_SOLDIERS_PER_SQUAD )
|
||||
//SQUAD10 FIX
|
||||
if ( NumberOfPeopleInSquad( bSquadValue ) >= gGameOptions.ubSquadSize )
|
||||
{
|
||||
return( CHARACTER_CANT_JOIN_SQUAD_FULL );
|
||||
}
|
||||
@@ -6050,7 +6071,8 @@ BOOLEAN DisplayRepairMenu( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
if ( IsThisVehicleAccessibleToSoldier( pSoldier, iVehicleIndex ) )
|
||||
{
|
||||
AddMonoString( (UINT32 *)&hStringHandle,pVehicleStrings[ pVehicleList[ iVehicleIndex ].ubVehicleType ] );
|
||||
//AddMonoString( (UINT32 *)&hStringHandle,pVehicleStrings[ pVehicleList[ iVehicleIndex ].ubVehicleType ] );
|
||||
AddMonoString( (UINT32 *)&hStringHandle,gNewVehicle[ pVehicleList[ iVehicleIndex ].ubVehicleType ].NewVehicleStrings );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8072,6 +8094,17 @@ void BeginRemoveMercFromContract( SOLDIERTYPE *pSoldier )
|
||||
// This function will setup the quote, then start dialogue beginning the actual leave sequence
|
||||
if( ( pSoldier->stats.bLife > 0 ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) )
|
||||
{
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 UB
|
||||
//if the merc cant leave
|
||||
if( !CanMercBeAllowedToLeaveTeam( pSoldier ) )
|
||||
{
|
||||
HaveMercSayWhyHeWontLeave( pSoldier );
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// WANNE: Nothing to do here, when we want to dismiss the robot
|
||||
BOOLEAN fAmIaRobot = AM_A_ROBOT( pSoldier );
|
||||
if (!fAmIaRobot)
|
||||
@@ -9302,7 +9335,8 @@ void CreateSquadBox( void )
|
||||
for(uiCounter=0; uiCounter <= uiMaxSquad; uiCounter++)
|
||||
{
|
||||
// get info about current squad and put in string
|
||||
swprintf( sString, L"%s ( %d/%d )", pSquadMenuStrings[uiCounter], NumberOfPeopleInSquad( ( INT8 )uiCounter ), NUMBER_OF_SOLDIERS_PER_SQUAD );
|
||||
//SQUAD10 FIX
|
||||
swprintf( sString, L"%s ( %d/%d )", pSquadMenuStrings[uiCounter], NumberOfPeopleInSquad( ( INT8 )uiCounter ), gGameOptions.ubSquadSize );
|
||||
AddMonoString(&hStringHandle, sString );
|
||||
|
||||
// make sure it is unhighlighted
|
||||
@@ -9506,7 +9540,8 @@ BOOLEAN DisplayVehicleMenu( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
if ( IsThisVehicleAccessibleToSoldier( pSoldier, iCounter ) )
|
||||
{
|
||||
AddMonoString((UINT32 *)&hStringHandle, pVehicleStrings[ pVehicleList[ iCounter ].ubVehicleType ]);
|
||||
//AddMonoString((UINT32 *)&hStringHandle, pVehicleStrings[ pVehicleList[ iCounter ].ubVehicleType ]);
|
||||
AddMonoString((UINT32 *)&hStringHandle, gNewVehicle[ pVehicleList[ iCounter ].ubVehicleType ].NewVehicleStrings);
|
||||
fVehiclePresent = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -14430,7 +14465,8 @@ BOOLEAN DisplayFacilityAssignmentMenu( SOLDIERTYPE *pSoldier, UINT8 ubFacilityTy
|
||||
if ( IsThisVehicleAccessibleToSoldier( pSoldier, iCounterB ) )
|
||||
{
|
||||
// Create line that says "Repair X" where X is the vehicle.
|
||||
swprintf( sTempString, gzFacilityAssignmentStrings[ FAC_REPAIR_VEHICLE ], pVehicleStrings[ pVehicleList[ iCounterB ].ubVehicleType ]);
|
||||
// swprintf( sTempString, gzFacilityAssignmentStrings[ FAC_REPAIR_VEHICLE ], pVehicleStrings[ pVehicleList[ iCounterB ].ubVehicleType ]);
|
||||
swprintf( sTempString, gzFacilityAssignmentStrings[ FAC_REPAIR_VEHICLE ], gNewVehicle[ pVehicleList[ iCounterB ].ubVehicleType ].NewVehicleStrings);
|
||||
AddMonoString((UINT32 *)&hStringHandle, sTempString );
|
||||
fFoundVehicle = TRUE;
|
||||
}
|
||||
@@ -16348,3 +16384,36 @@ void RecordNumMilitiaTrainedForMercs( INT16 sX, INT16 sY, INT8 bZ, UINT8 ubMilit
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef JA2UB
|
||||
//Ja25 UB
|
||||
|
||||
BOOLEAN CanMercBeAllowedToLeaveTeam( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
/*
|
||||
//if we are in sector... J14_1 && K14_1
|
||||
if( gWorldSectorX == 14 && gWorldSectorY == MAP_ROW_J && gbWorldSectorZ == 1 ||
|
||||
gWorldSectorX == 14 && gWorldSectorY == MAP_ROW_K && gbWorldSectorZ == 1 )
|
||||
*/
|
||||
//if we are in, or passed the tunnels
|
||||
if( pSoldier->sSectorX >= 14 )
|
||||
{
|
||||
//dont allow anyone to leave
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
void HaveMercSayWhyHeWontLeave( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
//if the merc is qualified
|
||||
if( IsSoldierQualifiedMerc( pSoldier ) )
|
||||
{
|
||||
TacticalCharacterDialogue( pSoldier, QUOTE_ANSWERING_MACHINE_MSG );
|
||||
}
|
||||
else
|
||||
{
|
||||
TacticalCharacterDialogue( pSoldier, QUOTE_REFUSING_ORDER );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1990,7 +1990,11 @@ void RenderAutoResolve()
|
||||
SetFactTrue( FACT_FIRST_BATTLE_WON );
|
||||
}
|
||||
SetTheFirstBattleSector( ( INT16 ) (gpAR->ubSectorX + gpAR->ubSectorY * MAP_WORLD_X ) );
|
||||
#ifdef JA2UB
|
||||
//Ja25: no loyalty
|
||||
#else
|
||||
HandleFirstBattleEndingWhileInTown( gpAR->ubSectorX, gpAR->ubSectorY, 0, TRUE );
|
||||
#endif
|
||||
}
|
||||
|
||||
switch( gpAR->ubBattleStatus )
|
||||
|
||||
@@ -642,11 +642,14 @@ void InitNewCampaign()
|
||||
//InitKnowFacilitiesFlags( );
|
||||
|
||||
BuildUndergroundSectorInfoList();
|
||||
|
||||
#ifdef JA2UB
|
||||
// no UB
|
||||
#else
|
||||
if (!is_networked)
|
||||
// allow overhead view of omerta A9 on game onset
|
||||
// HEADROCK HAM 3.5: Externalized.
|
||||
SetSectorFlag( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY, startingZ, SF_ALREADY_VISITED ); //hayden
|
||||
#endif
|
||||
|
||||
//Generates the initial forces in a new campaign. The idea is to randomize numbers and sectors
|
||||
//so that no two games are the same.
|
||||
|
||||
@@ -91,6 +91,10 @@ enum //strategic values for each sector
|
||||
#define SF_SKYRIDER_NOTICED_ENEMIES_HERE 0x00000400
|
||||
#define SF_HAVE_USED_GUIDE_QUOTE 0x00000800
|
||||
|
||||
#ifdef JA2UB
|
||||
#define SF_HAVE_SAID_PLAYER_QUOTE_NEW_SECTOR 0x00001000
|
||||
#endif
|
||||
|
||||
#define SF_SMOKE_EFFECTS_TEMP_FILE_EXISTS 0x00100000 //Temp File starts with sm_
|
||||
#define SF_LIGHTING_EFFECTS_TEMP_FILE_EXISTS 0x00200000 //Temp File starts with l_
|
||||
#define SF_REVEALED_STATUS_TEMP_FILE_EXISTS 0x01000000 //Temp File starts with v_
|
||||
@@ -377,6 +381,16 @@ enum
|
||||
SHELTER,
|
||||
ABANDONED_MINE,
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25: New
|
||||
FINAL_COMPLEX,
|
||||
GUARD_POST_TYPE,
|
||||
CRASH_SITE_TYPE,
|
||||
POWER_PLANT_TYPE,
|
||||
MOUNTAINS_TYPE,
|
||||
UNKNOWN_TYPE,
|
||||
#endif
|
||||
|
||||
NUM_TRAVTERRAIN_TYPES
|
||||
};
|
||||
extern UINT8 gszTerrain[NUM_TRAVTERRAIN_TYPES][15];
|
||||
@@ -451,7 +465,12 @@ typedef struct SECTORINFO
|
||||
UINT8 bFiller3;
|
||||
|
||||
UINT32 uiNumberOfWorldItemsInTempFileThatCanBeSeenByPlayer;
|
||||
|
||||
#ifdef JA2UB
|
||||
BOOLEAN fValidSector; //ja25 UB
|
||||
BOOLEAN fCustomSector;
|
||||
BOOLEAN fCampaignSector;
|
||||
#endif
|
||||
|
||||
INT8 bPadding[ 41 ];
|
||||
|
||||
}SECTORINFO;
|
||||
@@ -484,6 +503,11 @@ typedef struct UNDERGROUND_SECTORINFO
|
||||
UINT8 ubMusicMode, ubUnsed;
|
||||
|
||||
UINT32 uiNumberOfWorldItemsInTempFileThatCanBeSeenByPlayer;
|
||||
#ifdef JA2UB
|
||||
BOOLEAN fCustomSector;
|
||||
BOOLEAN fCampaignSector;
|
||||
#endif
|
||||
|
||||
INT8 bPadding[36];
|
||||
//no padding left!
|
||||
}UNDERGROUND_SECTORINFO;
|
||||
|
||||
@@ -298,13 +298,16 @@ void InitCreatureQuest()
|
||||
fPlayMeanwhile = TRUE;
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 No meanwhiles && no creatures
|
||||
#else
|
||||
if( fPlayMeanwhile && !gfCreatureMeanwhileScenePlayed )
|
||||
{
|
||||
//Start the meanwhile scene for the queen ordering the release of the creatures.
|
||||
HandleCreatureRelease();
|
||||
gfCreatureMeanwhileScenePlayed = TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
giHabitatedDistance = 0;
|
||||
switch( gGameOptions.ubDifficultyLevel )
|
||||
{
|
||||
@@ -1558,8 +1561,12 @@ BOOLEAN LoadCreatureDirectives( HWFILE hFile, UINT32 uiSavedGameVersion )
|
||||
if( gfClearCreatureQuest && giLairID != -1 )
|
||||
{
|
||||
giLairID = 0;
|
||||
#ifdef JA2UB
|
||||
// no UB
|
||||
#else
|
||||
gfCreatureMeanwhileScenePlayed = FALSE;
|
||||
uiMeanWhileFlags &= ~(0x00000800);
|
||||
#endif
|
||||
}
|
||||
gfClearCreatureQuest = FALSE;
|
||||
#endif
|
||||
|
||||
@@ -49,6 +49,18 @@
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "Explosion Control.h"
|
||||
#include "Ja25_Tactical.h"
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
#include "MapScreen Quotes.h"
|
||||
#include "email.h"
|
||||
#include "interface Dialogue.h"
|
||||
#include "mercs.h"
|
||||
#include "ub_config.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
extern BOOLEAN gfMercsNeverQuit;
|
||||
#endif
|
||||
@@ -209,11 +221,15 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent )
|
||||
// WANNE: This fixes the bug, that Speck did not sent the email on Day 3, when MERC_WEBSITE_ALL_MERCS_AVAILABLE = TRUE!
|
||||
if ( gGameExternalOptions.fMercDayOne == FALSE /* && gGameExternalOptions.fAllMercsAvailable == FALSE */ )
|
||||
{
|
||||
AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin( ), -1, -1 );
|
||||
#ifdef JA2UB
|
||||
//No JA25 UB
|
||||
#else
|
||||
AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin( ), -1, -1 ,TYPE_EMAIL_EMAIL_EDT );
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case EVENT_DAY2_ADD_EMAIL_FROM_IMP:
|
||||
AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ), -1, -1);
|
||||
AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
break;
|
||||
//If a merc gets hired and they dont show up immediately, the merc gets added to the queue and shows up
|
||||
// uiTimeTillMercArrives minutes later
|
||||
@@ -344,6 +360,10 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent )
|
||||
//case EVENT_BEGIN_AIR_RAID:
|
||||
// BeginAirRaid( );
|
||||
// break;
|
||||
|
||||
#ifdef JA2UB
|
||||
// Ja25 No meanwhiles
|
||||
#else
|
||||
case EVENT_MEANWHILE:
|
||||
if( !DelayEventIfBattleInProgress( pEvent ) )
|
||||
{
|
||||
@@ -351,6 +371,7 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent )
|
||||
InterruptTime();
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case EVENT_BEGIN_CREATURE_QUEST:
|
||||
break;
|
||||
case EVENT_CREATURE_SPREAD:
|
||||
@@ -407,7 +428,11 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent )
|
||||
}
|
||||
break;
|
||||
case EVENT_MERC_SITE_BACK_ONLINE:
|
||||
#ifdef JA2UB
|
||||
// no JA25 UB
|
||||
#else
|
||||
GetMercSiteBackOnline();
|
||||
#endif
|
||||
break;
|
||||
case EVENT_INVESTIGATE_SECTOR:
|
||||
InvestigateSector( (UINT8)pEvent->uiParam );
|
||||
@@ -444,6 +469,31 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent )
|
||||
case EVENT_POSTAL_SERVICE_SHIPMENT:
|
||||
gPostalService.DeliverShipment(pEvent->uiParam);
|
||||
break;
|
||||
#ifdef JA2UB
|
||||
//Ja25 UB
|
||||
case EVENT_ATTACK_INITIAL_SECTOR_IF_PLAYER_STILL_THERE:
|
||||
if ( gGameUBOptions.EventAttackInitialSectorIfPlayerStillThere == TRUE )
|
||||
{
|
||||
ShouldEnemiesBeAddedToInitialSector();
|
||||
}
|
||||
break;
|
||||
|
||||
case EVENT_SAY_DELAYED_MERC_QUOTE:
|
||||
DelayedSayingOfMercQuote( pEvent->uiParam );
|
||||
break;
|
||||
|
||||
case EVENT_DELAY_SOMEONE_IN_SECTOR_MSGBOX:
|
||||
SetMsgBoxForPlayerBeNotifiedOfSomeoneElseInSector();
|
||||
break;
|
||||
|
||||
case EVENT_SECTOR_H8_DONT_WAIT_IN_SECTOR:
|
||||
HandleSayingDontStayToLongWarningInSectorH8();
|
||||
break;
|
||||
|
||||
case EVENT_SEND_ENRICO_UNDERSTANDING_EMAIL:
|
||||
HandleEnricosUnderstandingEmail();
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CRIPPLED_VERSION
|
||||
case EVENT_CRIPPLED_VERSION_END_GAME_CHECK:
|
||||
|
||||
@@ -85,7 +85,15 @@ enum
|
||||
EVENT_MERC_SITE_NEW_MERC_AVAILABLE,
|
||||
EVENT_POSTAL_SERVICE_SHIPMENT,
|
||||
// EVENT_CHECK_FOR_AIR_RAID,
|
||||
#ifdef JA2UB
|
||||
//Ja25:
|
||||
EVENT_ATTACK_INITIAL_SECTOR_IF_PLAYER_STILL_THERE,
|
||||
EVENT_SAY_DELAYED_MERC_QUOTE,
|
||||
|
||||
EVENT_DELAY_SOMEONE_IN_SECTOR_MSGBOX,
|
||||
EVENT_SECTOR_H8_DONT_WAIT_IN_SECTOR,
|
||||
EVENT_SEND_ENRICO_UNDERSTANDING_EMAIL,
|
||||
#endif
|
||||
#ifdef CRIPPLED_VERSION
|
||||
EVENT_CRIPPLED_VERSION_END_GAME_CHECK,
|
||||
#endif
|
||||
|
||||
+101
-5
@@ -74,9 +74,16 @@
|
||||
#include "XML.h"
|
||||
#include "mercs.h"
|
||||
#include "aim.h"
|
||||
#include "Map Screen Interface.h"
|
||||
#ifdef JA2UB
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
#include "Ja25_Tactical.h"
|
||||
#include "Arms Dealer Init.h"
|
||||
#endif
|
||||
|
||||
#include "LuaInitNPCs.h"
|
||||
#include "Luaglobal.h"
|
||||
#include "SaveLoadScreen.h"
|
||||
|
||||
class OBJECTTYPE;
|
||||
class SOLDIERTYPE;
|
||||
@@ -93,6 +100,14 @@ extern UNDERGROUND_SECTORINFO* FindUnderGroundSector( INT16 sMapX, INT16 sMapY,
|
||||
|
||||
UINT8 gubScreenCount=0;
|
||||
|
||||
#ifdef JA2UB
|
||||
void InitCustomStrategicLayer ( void )
|
||||
{
|
||||
LetLuaGameInit(2); //load custom InitStrategicLayer
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void InitNPCs( void )
|
||||
{
|
||||
|
||||
@@ -422,8 +437,30 @@ void InitStrategicLayer( void )
|
||||
InitSquads();
|
||||
// Init vehicles
|
||||
InitAllVehicles( );
|
||||
// init town loyalty
|
||||
InitTownLoyalty();
|
||||
|
||||
#ifdef JA2UB
|
||||
InitCustomStrategicLayer ( );
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 UB
|
||||
InitJerryQuotes();
|
||||
if ( gGameUBOptions.JerryQuotes == TRUE )
|
||||
{
|
||||
HandleJerryMiloQuotes( TRUE ); //AA
|
||||
}
|
||||
|
||||
InitJa25StrategicAi( );
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef JA2UB
|
||||
////if ( gGameUBOptions.InitTownLoyalty_UB == TRUE )
|
||||
InitTownLoyalty(); //Ja25 no loyalty
|
||||
#else
|
||||
// init town loyalty
|
||||
InitTownLoyalty(); //Ja25 no loyalty
|
||||
#endif
|
||||
// init the mine management system
|
||||
InitializeMines();
|
||||
// initialize map screen flags
|
||||
@@ -453,6 +490,9 @@ void InitStrategicLayer( void )
|
||||
// re-set up leave list arrays for dismissed mercs
|
||||
InitLeaveList( );
|
||||
|
||||
#ifdef JA2UB
|
||||
LuaInitStrategicLayer(0); //JA25 UB InitStrategicLayer.lua
|
||||
#endif
|
||||
// reset time compression mode to X0 (this will also pause it)
|
||||
SetGameTimeCompressionLevel( TIME_COMPRESS_X0 );
|
||||
|
||||
@@ -472,6 +512,16 @@ void ShutdownStrategicLayer()
|
||||
DeleteAllStrategicEvents();
|
||||
RemoveAllGroups();
|
||||
TrashUndergroundSectorInfo();
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 No creatures
|
||||
//Ja25 No strategic ai
|
||||
#else
|
||||
DeleteCreatureDirectives();
|
||||
|
||||
KillStrategicAI();
|
||||
|
||||
#endif
|
||||
DeleteCreatureDirectives();
|
||||
KillStrategicAI();
|
||||
ClearTacticalMessageQueue();
|
||||
@@ -486,9 +536,26 @@ BOOLEAN InitNewGame( BOOLEAN fReset )
|
||||
gubScreenCount = 0;
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
//reset autosave
|
||||
AutoSaveToSlot[0] = FALSE;
|
||||
AutoSaveToSlot[1] = FALSE;
|
||||
AutoSaveToSlot[2] = FALSE;
|
||||
AutoSaveToSlot[3] = FALSE;
|
||||
AutoSaveToSlot[4] = FALSE;
|
||||
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 no meanwhiles
|
||||
#else
|
||||
// reset meanwhile flags
|
||||
uiMeanWhileFlags = 0;
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
fFirstTimeInMapScreen = TRUE;
|
||||
#endif
|
||||
|
||||
|
||||
// Reset the selected soldier
|
||||
gusSelectedSoldier = NOBODY;
|
||||
@@ -528,7 +595,12 @@ BOOLEAN InitNewGame( BOOLEAN fReset )
|
||||
{
|
||||
//Init all the arms dealers inventory
|
||||
InitAllArmsDealers();
|
||||
InitBobbyRayInventory();
|
||||
#ifdef JA2UB
|
||||
if ( gGameUBOptions.fBobbyRSite == TRUE )
|
||||
InitBobbyRayInventory(); //Ja25 UB
|
||||
#else
|
||||
InitBobbyRayInventory();
|
||||
#endif
|
||||
}
|
||||
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"InitNewGame: clearing messages");
|
||||
@@ -625,8 +697,16 @@ BOOLEAN InitNewGame( BOOLEAN fReset )
|
||||
ResetHeliSeats( );
|
||||
|
||||
#ifdef LUA_GAME_INIT_NEW_GAME
|
||||
LetLuaGameInit(0);
|
||||
|
||||
LetLuaGameInit(0);
|
||||
|
||||
#ifdef JA2UB
|
||||
InitCustomStrategicLayer ( );
|
||||
#endif
|
||||
#else
|
||||
#ifdef JA2UB
|
||||
|
||||
#else
|
||||
INT32 iStartingCash;
|
||||
|
||||
// Setup two new messages!
|
||||
@@ -675,7 +755,7 @@ BOOLEAN InitNewGame( BOOLEAN fReset )
|
||||
|
||||
// Setup initial money
|
||||
AddTransactionToPlayersBook( ANONYMOUS_DEPOSIT, 0, GetWorldTotalMin(), iStartingCash );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
UINT32 uiDaysTimeMercSiteAvailable = Random( 2 ) + 1;
|
||||
@@ -700,6 +780,22 @@ BOOLEAN InitNewGame( BOOLEAN fReset )
|
||||
|
||||
gubScreenCount = 1;
|
||||
|
||||
#ifdef JA2UB
|
||||
//ja25 ub
|
||||
//Init the initial hweli crash sequence variable
|
||||
if ( gGameUBOptions.InGameHeli == FALSE )
|
||||
InitializeHeliGridnoAndTime( FALSE );
|
||||
|
||||
//If tex is in the game ( John is NOT in the game )
|
||||
//if( gJa25SaveStruct.fJohnKulbaIsInGame == FALSE )
|
||||
//{
|
||||
//make sure Betty offers his videos for sale
|
||||
//AddTexsVideosToBettysInventory();
|
||||
//}
|
||||
|
||||
InitJerryMiloInfo(); //JA25 UB
|
||||
#endif
|
||||
|
||||
//Set the fact the game is in progress
|
||||
gTacticalStatus.fHasAGameBeenStarted = TRUE;
|
||||
|
||||
|
||||
+107
-7
@@ -26,6 +26,9 @@
|
||||
#include "SaveLoadGame.h"
|
||||
#include "GameSettings.h"
|
||||
#include "connect.h"
|
||||
#include "Options Screen.h"
|
||||
#include "SaveLoadScreen.h"
|
||||
#include "Text.h"
|
||||
// HEADROCK HAM 3.5: Add facility code for hourly update of detection levels
|
||||
#include "Facilities.h"
|
||||
|
||||
@@ -34,7 +37,11 @@ void HourlyLarryUpdate( void );
|
||||
|
||||
extern INT32 GetCurrentBalance( void );
|
||||
extern void PayOffSkyriderDebtIfAny( );
|
||||
#ifdef JA2UB
|
||||
//no UB
|
||||
#else
|
||||
void HourlyCheckIfSlayAloneSoHeCanLeave();
|
||||
#endif
|
||||
|
||||
void UpdateRegenCounters( void );
|
||||
|
||||
@@ -48,6 +55,7 @@ void HandleMinuteUpdate()
|
||||
|
||||
void HandleHourlyUpdate()
|
||||
{
|
||||
CHAR16 zString[128];
|
||||
//if the game hasnt even started yet ( we havent arrived in the sector ) dont process this
|
||||
if ( DidGameJustStart() )
|
||||
return;
|
||||
@@ -87,9 +95,11 @@ void HandleHourlyUpdate()
|
||||
HourlyQuestUpdate();
|
||||
|
||||
HourlyLarryUpdate();
|
||||
|
||||
#ifdef JA2UB
|
||||
// no UB
|
||||
#else
|
||||
HourlyCheckIfSlayAloneSoHeCanLeave();
|
||||
|
||||
#endif
|
||||
// WDS - New AI
|
||||
HourlyCheckStrategicAI();
|
||||
|
||||
@@ -100,9 +110,96 @@ void HandleHourlyUpdate()
|
||||
UpdateRegenCounters();
|
||||
}
|
||||
|
||||
if ((gGameExternalOptions.autoSaveTime != 0) &&
|
||||
(GetWorldHour() % gGameExternalOptions.autoSaveTime == 0)) {
|
||||
SaveGame( SAVE__TIMED_AUTOSAVE, L"Auto Save" );
|
||||
// WANNE: This check should avoid the resaving of a loaded auto-save game, when entering tactical
|
||||
BOOLEAN doAutoSave = TRUE;
|
||||
if (lastLoadedSaveGameDay == GetWorldDay() && lastLoadedSaveGameHour == GetWorldHour() )
|
||||
{
|
||||
doAutoSave = FALSE;
|
||||
}
|
||||
|
||||
if (doAutoSave)
|
||||
{
|
||||
if ( AutoSaveToSlot[1] == FALSE && AutoSaveToSlot[2] == FALSE && AutoSaveToSlot[3] == FALSE && AutoSaveToSlot[4] == FALSE )
|
||||
AutoSaveToSlot[0] = TRUE;
|
||||
|
||||
if ((gGameExternalOptions.autoSaveTime != 0) && (GetWorldHour() % gGameExternalOptions.autoSaveTime == 0))
|
||||
{
|
||||
if ( AutoSaveToSlot[0] == TRUE )
|
||||
{
|
||||
if( CanGameBeSaved() )
|
||||
{
|
||||
guiPreviousOptionScreen = guiCurrentScreen;
|
||||
swprintf( zString, L"%s%d",pMessageStrings[ MSG_SAVE_AUTOSAVE_TEXT ],SAVE__TIMED_AUTOSAVE_SLOT1);
|
||||
DoAutoSave(SAVE__TIMED_AUTOSAVE_SLOT1,zString);
|
||||
}
|
||||
|
||||
AutoSaveToSlot[0] = FALSE;
|
||||
AutoSaveToSlot[1] = TRUE;
|
||||
AutoSaveToSlot[2] = FALSE;
|
||||
AutoSaveToSlot[3] = FALSE;
|
||||
AutoSaveToSlot[4] = FALSE;
|
||||
}
|
||||
else if ( AutoSaveToSlot[1] == TRUE )
|
||||
{
|
||||
if( CanGameBeSaved() )
|
||||
{
|
||||
guiPreviousOptionScreen = guiCurrentScreen;
|
||||
swprintf( zString, L"%s%d",pMessageStrings[ MSG_SAVE_AUTOSAVE_TEXT ],SAVE__TIMED_AUTOSAVE_SLOT2);
|
||||
DoAutoSave(SAVE__TIMED_AUTOSAVE_SLOT2,zString);
|
||||
}
|
||||
|
||||
AutoSaveToSlot[0] = FALSE;
|
||||
AutoSaveToSlot[1] = FALSE;
|
||||
AutoSaveToSlot[2] = TRUE;
|
||||
AutoSaveToSlot[3] = FALSE;
|
||||
AutoSaveToSlot[4] = FALSE;
|
||||
}
|
||||
else if ( AutoSaveToSlot[2] == TRUE )
|
||||
{
|
||||
if( CanGameBeSaved() )
|
||||
{
|
||||
guiPreviousOptionScreen = guiCurrentScreen;
|
||||
swprintf( zString, L"%s%d",pMessageStrings[ MSG_SAVE_AUTOSAVE_TEXT ],SAVE__TIMED_AUTOSAVE_SLOT3);
|
||||
DoAutoSave(SAVE__TIMED_AUTOSAVE_SLOT3,zString);
|
||||
}
|
||||
|
||||
AutoSaveToSlot[0] = FALSE;
|
||||
AutoSaveToSlot[1] = FALSE;
|
||||
AutoSaveToSlot[2] = FALSE;
|
||||
AutoSaveToSlot[3] = TRUE;
|
||||
AutoSaveToSlot[4] = FALSE;
|
||||
}
|
||||
else if ( AutoSaveToSlot[3] == TRUE )
|
||||
{
|
||||
if( CanGameBeSaved() )
|
||||
{
|
||||
guiPreviousOptionScreen = guiCurrentScreen;
|
||||
swprintf( zString, L"%s%d",pMessageStrings[ MSG_SAVE_AUTOSAVE_TEXT ],SAVE__TIMED_AUTOSAVE_SLOT4);
|
||||
DoAutoSave(SAVE__TIMED_AUTOSAVE_SLOT4,zString);
|
||||
}
|
||||
AutoSaveToSlot[0] = FALSE;
|
||||
AutoSaveToSlot[1] = FALSE;
|
||||
AutoSaveToSlot[2] = FALSE;
|
||||
AutoSaveToSlot[3] = FALSE;
|
||||
AutoSaveToSlot[4] = TRUE;
|
||||
|
||||
}
|
||||
else if ( AutoSaveToSlot[4] == TRUE )
|
||||
{
|
||||
if( CanGameBeSaved() )
|
||||
{
|
||||
guiPreviousOptionScreen = guiCurrentScreen;
|
||||
swprintf( zString, L"%s%d",pMessageStrings[ MSG_SAVE_AUTOSAVE_TEXT ],SAVE__TIMED_AUTOSAVE_SLOT5);
|
||||
DoAutoSave(SAVE__TIMED_AUTOSAVE_SLOT5,zString);
|
||||
}
|
||||
AutoSaveToSlot[0] = TRUE;
|
||||
AutoSaveToSlot[1] = FALSE;
|
||||
AutoSaveToSlot[2] = FALSE;
|
||||
AutoSaveToSlot[3] = FALSE;
|
||||
AutoSaveToSlot[4] = FALSE;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,7 +440,9 @@ void HourlyLarryUpdate( void )
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
// no JA25 UB
|
||||
#else
|
||||
void HourlyCheckIfSlayAloneSoHeCanLeave()
|
||||
{
|
||||
SOLDIERTYPE *pSoldier;
|
||||
@@ -368,4 +467,5 @@ void HourlyCheckIfSlayAloneSoHeCanLeave()
|
||||
TacticalCharacterDialogueWithSpecialEvent( pSoldier, 0, DIALOGUE_SPECIAL_EVENT_CONTRACT_ENDING_NO_ASK_EQUIP, 0, 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,338 @@
|
||||
#ifndef JA25__STRATEGIC_AI
|
||||
#define JA25__STRATEGIC_AI
|
||||
|
||||
#ifdef JA2UB
|
||||
typedef struct
|
||||
{
|
||||
UINT32 uiJerryMiloQuotesFlags; //used to keep track of the quotes Jerry says.
|
||||
BOOLEAN fImportCharactersFromOldJa2Save; // True if we have loaded in merc profiles from JA2
|
||||
|
||||
BOOLEAN fInCustomMap;
|
||||
|
||||
BOOLEAN fJohnKulbaIsInGame; // If true Kulba is in the game, otherwise tex is
|
||||
|
||||
BOOLEAN fMorrisToSayHurtPlayerQuoteNextTurn;
|
||||
UINT8 ubPlayerMorrisHurt;
|
||||
|
||||
BOOLEAN fBiggensUsedDetonator;
|
||||
|
||||
BOOLEAN fSendEmail_10_NextSector; // True if we are to send email #10 next time the player loads up a sector
|
||||
|
||||
UINT8 ubEmailFromSectorFlag;
|
||||
|
||||
BOOLEAN fNpcHasBeenAdded; // True if manuel has been added to sector H10 or i9
|
||||
|
||||
BOOLEAN fShowMercDestinationDialogWhenHiringMerc; //
|
||||
|
||||
BOOLEAN fHaveAimandMercOffferItems; // TRUE when MERC and AIM are giving away 'gifts' to the mercs that get hired
|
||||
|
||||
BOOLEAN fBiffWasKilledWhenImportingSave; //TRUE is biff was killed when we imported the save
|
||||
|
||||
UINT8 ubImportantSpeckQuotesSaidBefore;
|
||||
|
||||
BOOLEAN fShouldMsgBoxComeUpSayingSomeoneImportantIsInSector;
|
||||
|
||||
UINT8 ubStateOfFanInPowerGenSector;
|
||||
|
||||
UINT8 ubHowPlayerGotThroughFan;
|
||||
|
||||
UINT32 uiJa25TacticalFlags;
|
||||
|
||||
INT32 iPowerGenFanPositionSndID;
|
||||
|
||||
UINT32 uiTacticalTurnCounter;
|
||||
|
||||
UINT32 uiTurnPowerGenFanWentDown;
|
||||
|
||||
UINT32 uiJa25GeneralFlags;
|
||||
|
||||
UINT8 ubStatusOfFortifiedDoor;
|
||||
|
||||
UINT32 uiDisplayCoverCounter;
|
||||
UINT32 uiDisplayLosCounter;
|
||||
UINT32 uiDisplayGunRangeCounter;
|
||||
|
||||
UINT8 ubLoadScreenStairTraversal;
|
||||
|
||||
UINT8 ubMorrisNoteState;
|
||||
|
||||
UINT8 ubJohnKulbaInitialSectorX;
|
||||
UINT8 ubJohnKulbaInitialSectorY;
|
||||
|
||||
UINT8 ubDisplayPlayerLostMsgBox;
|
||||
|
||||
BOOLEAN fJerryBreakingLaptopOccuring;
|
||||
|
||||
BOOLEAN fEnemyShouldImmediatelySeekThePlayer;
|
||||
INT8 bSectorTheEnemyWillSeekEnemy;
|
||||
|
||||
INT8 bNewMercProfileIDForSayingMorrisNote;
|
||||
|
||||
UINT8 ubDisplayCommanderMorrisNote;
|
||||
|
||||
UINT16 usFiller1;
|
||||
|
||||
UINT32 uiTurnLastSaidSeeEnemyQuote;
|
||||
|
||||
UINT8 ubFiller[928]; //Struct is originally 1000 bytes in size
|
||||
|
||||
} JA25_SAVE_INFO;
|
||||
|
||||
extern JA25_SAVE_INFO gJa25SaveStruct;
|
||||
|
||||
//following flags use uiEmailFromSectorFlag
|
||||
#define SECTOR_EMAIL__ANOTHER_SECTOR 0x01
|
||||
#define SECTOR_EMAIL__J11_J12 0x02
|
||||
#define SECTOR_EMAIL__POWER_GEN 0x04
|
||||
#define SECTOR_EMAIL__TUNNEL 0x08
|
||||
#define SECTOR_EMAIL__POWER_GEN_LVL_1 0x10
|
||||
|
||||
|
||||
//following flags use fNpcHasBeenAdded
|
||||
#define SECTOR_ADDED_NPC__MANUEL 0x01
|
||||
#define SECTOR_ADDED_NPC__TEX 0x02
|
||||
#define SECTOR_ADDED_NPC__JOHN_K 0x04
|
||||
|
||||
|
||||
//Following flags use ubImportantSpeckQuotesSaidBefore
|
||||
#define SPECK__ENCOURAGE_POAYER_TO_KEEP_SHOPPING 1<<0
|
||||
#define SPECK__SECOND_INTRO_BEEN_SAID 1<<1
|
||||
#define SPECK__BETTER_EQUIPMENT 1<<2
|
||||
|
||||
|
||||
//following flags are used with ubStateOfFanInPowerGenSector
|
||||
enum
|
||||
{
|
||||
PGF__RUNNING_NORMALLY,
|
||||
PGF__STOPPED,
|
||||
PGF__BLOWN_UP,
|
||||
};
|
||||
|
||||
|
||||
//following flags are used with uiJa25TacticalFlags
|
||||
|
||||
|
||||
|
||||
//following flags are used with ubHowPlayerGotThroughFan
|
||||
enum
|
||||
{
|
||||
PG__PLAYER_NOT_GONE_THROUGH_YET,
|
||||
PG__PLAYER_BLEW_UP_FAN_TO_GET_THROUGH,
|
||||
PG__PLAYER_STOPPED_FAN_TO_GET_THROUGH,
|
||||
};
|
||||
|
||||
//The following flags are used with uiJa25GeneralFlags.
|
||||
#define JA_GF__POWER_GEN_FAN_HAS_BEEN_STOPPED 0x00000001
|
||||
#define JA_GF__BIGGENS_SAID_QUOTE_117 0x00000002
|
||||
#define JA_GF__DID_PLAYER_MAKE_SOUND_GOING_THROUGH_TUNNEL_GATE 0x00000004
|
||||
#define JA_GF__PLAYER_HAS_SEEN_FORTIFIED_DOOR 0x00000008
|
||||
|
||||
#define JA_GF__ALL_DEAD_TOP_LEVEL_OF_COMPLEX 0x00000010
|
||||
#define JA_GF__ALREADY_MOVED_ENEMIES_IN_COMPLEX 0x00000020
|
||||
#define JA_GF__PICKED_UP_MONEY_IN_GUARD_POST 0x00000040
|
||||
#define JA_GF__PICKED_UP_MONEY_IN_FIRST_TOWN 0x00000080
|
||||
|
||||
#define JA_GF__PLAYER_SAID_LAPTOP_FIXED_QUOTE 0x00000100
|
||||
#define JA_GF__RAUL_BLOW_HIMSELF_UP 0x00000200
|
||||
#define JA_GF__QUOTE_105_HAS_BEEN_SAID 0x00000400
|
||||
#define JA_GF__BARRETT_IS_HALF_PRICE 0x00000800
|
||||
|
||||
#define JA_GF__MOVE_ENEMIES_TO_EDGE_IN_TUNNEL_1 0x00001000
|
||||
#define JA_GF__MOVE_ENEMIES_TO_EDGE_IN_TUNNEL_2 0x00002000
|
||||
#define JA_GF__PLAYER_SEEN_FAN_BEFORE 0x00004000
|
||||
#define JA_GF__PLAYER_SAID_GATE_LOCKED_QUOTE 0x00008000
|
||||
|
||||
|
||||
//The following is used with ubStatusOfFortifiedDoor
|
||||
enum
|
||||
{
|
||||
FD__CLOSED,
|
||||
FD__OPEN,
|
||||
};
|
||||
|
||||
|
||||
//the following is used with ubLoadScreenStairTraversal
|
||||
enum
|
||||
{
|
||||
LS__NOT_GOING_UP_STAIRS,
|
||||
LS__GOING_UP_STAIRS,
|
||||
LS__GOING_DOWN_STAIRS,
|
||||
};
|
||||
|
||||
|
||||
|
||||
//the following is used with ubMorrisNoteState
|
||||
enum
|
||||
{
|
||||
MN__NOT_PICKED_UP_YET,
|
||||
MN__PICKED_UP_BY_OLD_MERC_NEVER_SAID_QUOTE,
|
||||
MN__PICKED_UP_BY_OLD_MERC_SAID_QUOTE_ALREADY,
|
||||
MN__PICKED_UP_BY_NEW_MERC,
|
||||
MN__FINISHED = MN__PICKED_UP_BY_NEW_MERC,
|
||||
};
|
||||
|
||||
|
||||
//used with ubDisplayCommanderMorrisNote
|
||||
enum
|
||||
{
|
||||
DMN__NOT_TO_DISPLAY_IT,
|
||||
DMN__DISPLAY_PART_1,
|
||||
DMN__DISPLAY_PART_2,
|
||||
DMN__FINISHED,
|
||||
};
|
||||
|
||||
|
||||
BOOLEAN AreAnyPlayerMercsStillInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
|
||||
|
||||
BOOLEAN ShouldEnemiesBeAddedToInitialSector();
|
||||
|
||||
void InitJa25StrategicAi();
|
||||
|
||||
extern void SetNumberJa25EnemiesInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT8 ubNumAdmins, UINT8 ubNumTroops, UINT8 ubNumElites );
|
||||
|
||||
void InitJa25SaveStruct();
|
||||
|
||||
void InitJa25StrategicAiBloodcats( );
|
||||
extern void SetNumberJa25EnemiesInSurfaceSector( INT32 iSectorID, UINT8 ubNumAdmins, UINT8 ubNumTroops, UINT8 ubNumElites );
|
||||
|
||||
BOOLEAN SaveJa25SaveInfoToSaveGame( HWFILE hFile );
|
||||
BOOLEAN LoadJa25SaveInfoFromSavedGame( HWFILE hFile );
|
||||
|
||||
|
||||
void AddEnemiesToJa25TunnelMaps();
|
||||
void HandleAddingEnemiesToTunnelMaps();
|
||||
|
||||
void SetJa25GeneralFlag( UINT32 uiFlagToSet );
|
||||
void ClearJa25GeneralFlag( UINT32 uiFlagToClear );
|
||||
BOOLEAN IsJa25GeneralFlagSet( UINT32 uiFlagToCheck );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT32 uiTimeOfLastBattleInMinutes;
|
||||
UINT32 uiTimeOfLastUpdate;
|
||||
|
||||
INT16 iLastBattleSectorID;
|
||||
INT8 bLastBattleSectorZ;
|
||||
|
||||
INT8 bFiller1;
|
||||
|
||||
UINT32 uiAttackedSameSectorCounter;
|
||||
|
||||
INT8 bFiller[16];
|
||||
|
||||
} JA25_SECTOR_AI_MANAGER;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
INT16 iSectorID;
|
||||
INT8 bSectorZ;
|
||||
|
||||
INT8 bBaseNumEnemies; // The base number of enemies that can present in the sector
|
||||
INT8 bRandomNumEnemies; // The random amount of enemies that can be present
|
||||
|
||||
INT8 bProbabilityOfAttacking; // The probability Increase of attacking every hour of time compressing
|
||||
|
||||
INT8 bMaxProbabilityForAttackingSector; // The max amount of probabilty the enemy will attack enemy
|
||||
|
||||
INT8 bCurrentProbability; // Gets updated every hour when there can be an attack, reset when attack occurs
|
||||
|
||||
BOOLEAN fPlayerControlled; // Set when the player controls the sector
|
||||
|
||||
UINT8 ubMinimumProbabiltyBeforeAttack;
|
||||
|
||||
BOOLEAN fPlayerHasLiberatedSectorBefore; //Set when the player has a victory in the sector, never gets cleared after that
|
||||
|
||||
BOOLEAN fAutoDirection; //Calculate direction enemy are coming in from
|
||||
|
||||
UINT8 ubInsertionDirection; // For custom maps, used to describe which direction enemies are from
|
||||
|
||||
UINT32 sInsertionGridNo; // For custom maps, the insertion gridno
|
||||
|
||||
BOOLEAN fCustomSector; // Ah, a flag so the AI doesn't need to lookup sector info
|
||||
|
||||
UINT8 ubLoadingScreenID; // For a custom map, which loading screen to use
|
||||
|
||||
BOOLEAN fEnemyEnrouteToAttack; // To help things so that the enemy wioll not continually send dudes
|
||||
|
||||
INT8 bFiller[21];
|
||||
|
||||
} JA25_SECTOR_AI;
|
||||
|
||||
#define CUSTOMSECTOR 1020
|
||||
|
||||
extern JA25_SECTOR_AI gJa25AiSectorStruct[CUSTOMSECTOR];
|
||||
|
||||
enum
|
||||
{
|
||||
JA25_H7,
|
||||
JA25_H8,
|
||||
JA25_H9,
|
||||
JA25_I9,
|
||||
JA25_H10,
|
||||
JA25_I10, //5
|
||||
JA25_I11,
|
||||
JA25_J11,
|
||||
JA25_I12,
|
||||
JA25_J12,
|
||||
JA25_I13, //10
|
||||
JA25_J13,
|
||||
JA25_I13_1,
|
||||
JA25_J13_1,
|
||||
JA25_J14_1,
|
||||
JA25_K14_1, //15
|
||||
JA25_K15,
|
||||
JA25_K15_1,
|
||||
JA25_K15_2,
|
||||
JA25_L15_2,
|
||||
JA25_L15_3,
|
||||
|
||||
NUM_CAMPAIGN_JA25_SECTORS
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
extern BOOLEAN gfEnemyShouldImmediatelySeekThePlayer;
|
||||
//extern INT32 giNumJA25Sectors;
|
||||
|
||||
extern void SetNumberJa25EnemiesInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT8 ubNumAdmins, UINT8 ubNumTroops, UINT8 ubNumElites );
|
||||
void SetJa25SectorOwnedStatus( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, BOOLEAN fPlayerOwned );
|
||||
INT8 GetTheFurthestSectorPlayerOwns();
|
||||
void Ja25_UpdateTimeOfEndOfLastBattle( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
|
||||
BOOLEAN Ja25_AreEnemiesAbleToAttackSector( INT16 iSectorID, INT8 bSectorZ );
|
||||
BOOLEAN InitJa25SectorAi();
|
||||
INT16 GetJA25SectorID( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
|
||||
void JA25_HandleUpdateOfStrategicAi();
|
||||
|
||||
void SetEnemiesToFindThePlayerMercs();
|
||||
|
||||
void HandleSayingDontStayToLongWarningInSectorH8();
|
||||
extern void SetNumberJa25EnemiesInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT8 ubNumAdmins, UINT8 ubNumTroops, UINT8 ubNumElites );
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
BOOLEAN InitJa25StrategicAiDecisions( BOOLEAN fLoadedGame );
|
||||
#endif
|
||||
|
||||
void HandleEnricosUnderstandingEmail();
|
||||
|
||||
void HandleRemovingEnemySoldierInitLinksIfPlayerEverWonInSector();
|
||||
|
||||
// -1 if enemy isnt supposed to seek player, otherwise SAI sectgor ID get returned
|
||||
INT8 GetSectorEnemyIsToImmediatelySeekEnemyIn();
|
||||
|
||||
void AddJA25AIDataToSector( JA25_SECTOR_AI *pSectorAIInfo );
|
||||
extern void SetNumberOfJa25BloodCatsInSector( INT32 iSectorID, INT8 bNumBloodCats, INT8 bBloodCatPlacements );
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+1259
-27
File diff suppressed because it is too large
Load Diff
@@ -56,8 +56,8 @@ extern BOOLEAN LetLuaInterfaceDialogue( UINT8 ubNPC, UINT8 InitFunction);
|
||||
extern BOOLEAN LuaHandlePlayerTeamMemberDeath(UINT8 ProfileId, UINT8 Init);
|
||||
extern BOOLEAN LuaHandleNPCTeamMemberDeath(UINT8 ProfileId, UINT8 Init);
|
||||
extern BOOLEAN LuaCheckForKingpinsMoneyMissing( BOOLEAN fFirstCheck, UINT8 Init);
|
||||
extern BOOLEAN LuaHandleQuestCodeOnSectorExit( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT8 Init);
|
||||
extern BOOLEAN LuaHandleQuestCodeOnSectorEntry( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT8 Init);
|
||||
extern BOOLEAN LuaHandleQuestCodeOnSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT8 Init);
|
||||
//extern BOOLEAN LuaHandleQuestCodeOnSectorEntry( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT8 Init);
|
||||
extern BOOLEAN LuaHandleDelayedItemsArrival( UINT32 uiReason, UINT8 Init);
|
||||
extern BOOLEAN LetLuaHandleNPCSystemEvent( UINT32 uiEvent, UINT8 Init);
|
||||
|
||||
@@ -69,6 +69,12 @@ extern void IniLuaGlobal();
|
||||
extern BOOLEAN LoadLuaGlobalFromLoadGameFile( HWFILE hFile );
|
||||
extern BOOLEAN SaveLuaGlobalToSaveGameFile( HWFILE hFile );
|
||||
|
||||
|
||||
#ifdef JA2UB
|
||||
extern BOOLEAN LuaInitStrategicLayer(UINT8 Init);
|
||||
extern BOOLEAN LetLuaMakeBadSectorListFromMapsOnHardDrive(UINT8 Init);
|
||||
#endif
|
||||
|
||||
//Intro
|
||||
extern BOOLEAN LuaIntro(UINT8 Init, UINT32 uiCurrentVideo, INT8 bIntroType, UINT32 iStringToUse);
|
||||
|
||||
|
||||
+184
-5
@@ -22,6 +22,7 @@
|
||||
#include "Queen Command.h"
|
||||
#include "gamescreen.h"
|
||||
#include "Map Screen Interface Map.h"
|
||||
#include "ub_config.h"
|
||||
|
||||
#include "Creature Spreading.h"
|
||||
#include "World Items.h"
|
||||
@@ -34,6 +35,8 @@ extern "C" {
|
||||
#include "lualib.h"
|
||||
}
|
||||
|
||||
#include "Ja25_Tactical.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern BOOLEAN gfDoneWithSplashScreen;
|
||||
@@ -50,6 +53,11 @@ void IniGlobalGameSetting(lua_State *L)
|
||||
|
||||
lua_pushinteger(L, gGameOptions.ubDifficultyLevel);
|
||||
lua_setglobal(L, "newDIFFICULTY_LEVEL");
|
||||
|
||||
#ifdef JA2UB
|
||||
lua_pushinteger(L, gGameOptions.ubDifficultyLevel);
|
||||
lua_setglobal(L, "difficultyLevel");
|
||||
#endif
|
||||
|
||||
// -------------------------------
|
||||
// ja2_options.ini Settings (use "ini" prefix)
|
||||
@@ -84,10 +92,74 @@ void IniGlobalGameSetting(lua_State *L)
|
||||
lua_pushinteger(L, gGameExternalOptions.fCanTrueCiviliansBecomeHostile);
|
||||
lua_setglobal(L, "iniCAN_TRUE_CIVILIANS_BECOME_HOSTILE");
|
||||
|
||||
#ifdef JA2UB
|
||||
lua_pushinteger(L, gGameUBOptions.LOCATEGRIDNO);
|
||||
lua_setglobal(L, "iniNEW_MERC_ARRIVAL_LOCATION");
|
||||
#else
|
||||
lua_pushinteger(L, gGameExternalOptions.iInitialMercArrivalLocation);
|
||||
lua_setglobal(L, "iniNEW_MERC_ARRIVAL_LOCATION");
|
||||
#endif
|
||||
|
||||
lua_pushinteger(L, gGameExternalOptions.ubDefaultArrivalSectorY);
|
||||
lua_setglobal(L, "iniDEFAULT_ARRIVAL_SECTOR_Y");
|
||||
|
||||
lua_pushinteger(L, gGameExternalOptions.ubDefaultArrivalSectorX);
|
||||
lua_setglobal(L, "iniDEFAULT_ARRIVAL_SECTOR_X");
|
||||
|
||||
#ifdef JA2UB
|
||||
lua_pushinteger(L, gGameUBOptions.ubEndDefaultSectorX);
|
||||
lua_setglobal(L, "iniDEFAULT_END_SECTOR_X");
|
||||
|
||||
lua_pushinteger(L, gGameUBOptions.ubEndDefaultSectorY);
|
||||
lua_setglobal(L, "iniDEFAULT_END_SECTOR_Y");
|
||||
|
||||
lua_pushinteger(L, gGameUBOptions.ubEndDefaultSectorZ);
|
||||
lua_setglobal(L, "iniDEFAULT_END_SECTOR_Z");
|
||||
|
||||
lua_pushinteger(L, gGameUBOptions.InitialHeliGridNo[ 0 ]);
|
||||
lua_setglobal(L, "iniINITIALHELIGRIDNO1");
|
||||
lua_pushinteger(L, gGameUBOptions.InitialHeliGridNo[ 1 ]);
|
||||
lua_setglobal(L, "iniINITIALHELIGRIDNO2");
|
||||
lua_pushinteger(L, gGameUBOptions.InitialHeliGridNo[ 2 ]);
|
||||
lua_setglobal(L, "iniINITIALHELIGRIDNO3");
|
||||
lua_pushinteger(L, gGameUBOptions.InitialHeliGridNo[ 3 ]);
|
||||
lua_setglobal(L, "iniINITIALHELIGRIDNO4");
|
||||
lua_pushinteger(L, gGameUBOptions.InitialHeliGridNo[ 4 ]);
|
||||
lua_setglobal(L, "iniINITIALHELIGRIDNO5");
|
||||
lua_pushinteger(L, gGameUBOptions.InitialHeliGridNo[ 5 ]);
|
||||
lua_setglobal(L, "iniINITIALHELIGRIDNO6");
|
||||
lua_pushinteger(L, gGameUBOptions.InitialHeliGridNo[ 6 ]);
|
||||
lua_setglobal(L, "iniINITIALHELIGRIDNO7");
|
||||
|
||||
lua_pushinteger(L, gGameUBOptions.JerryGridNo);
|
||||
lua_setglobal(L, "iniJERRYGRIDNO");
|
||||
|
||||
lua_pushboolean(L, gGameUBOptions.LaptopQuestEnabled);
|
||||
lua_setglobal(L, "iniLAPTOP_QUEST");
|
||||
|
||||
lua_pushboolean(L, gGameUBOptions.InJerry);
|
||||
lua_setglobal(L, "iniJERRY");
|
||||
|
||||
lua_pushboolean(L, gGameUBOptions.JerryQuotes);
|
||||
lua_setglobal(L, "iniJERRYQUOTES");
|
||||
|
||||
lua_pushboolean(L, gGameUBOptions.InGameHeliCrash);
|
||||
lua_setglobal(L, "iniINGAMEHELICRASH");
|
||||
|
||||
|
||||
lua_pushboolean(L, gGameUBOptions.InGameHeli);
|
||||
lua_setglobal(L, "iniINGAMEHELI");
|
||||
#endif
|
||||
|
||||
// -------------------------------
|
||||
// Other global variables
|
||||
// -------------------------------
|
||||
|
||||
|
||||
#ifdef JA2UB
|
||||
lua_pushinteger(L, gGameUBOptions.TestUB);
|
||||
lua_setglobal(L, "TestUB");
|
||||
#endif
|
||||
|
||||
lua_pushinteger(L, gGameExternalOptions.ubDefaultArrivalSectorY);
|
||||
lua_setglobal(L, "ubDefaultArrivalSectorY");
|
||||
|
||||
@@ -166,9 +238,39 @@ void IniGlobalGameSetting(lua_State *L)
|
||||
lua_pushboolean(L, IsMusicPlaying());
|
||||
lua_setglobal(L, "fMusicPlaying");
|
||||
|
||||
// unused
|
||||
//lua_pushboolean(L, gfForceMusicToTense);
|
||||
//lua_setglobal(L, "gfForceMusicToTense");
|
||||
// lua_pushboolean(L, gfForceMusicToTense);
|
||||
// lua_setglobal(L, "gfForceMusicToTense");
|
||||
|
||||
//GameExternalOptions
|
||||
lua_pushboolean(L, gGameExternalOptions.gfInvestigateSector);
|
||||
lua_setglobal(L, "gfInvestigateSector");
|
||||
|
||||
lua_pushboolean(L, gGameExternalOptions.fMercDayOne);
|
||||
lua_setglobal(L, "fMercDayOne");
|
||||
|
||||
lua_pushinteger(L, gGameOptions.ubGameStyle);
|
||||
lua_setglobal(L, "gameStyle");
|
||||
|
||||
lua_pushinteger(L, gGameExternalOptions.fEnableCrepitus);
|
||||
lua_setglobal(L, "enableCrepitus");
|
||||
|
||||
lua_pushinteger(L, gGameOptions.ubDifficultyLevel);
|
||||
lua_setglobal(L, "difficultyLevel");
|
||||
|
||||
lua_pushinteger(L, gGameExternalOptions.iStartingCashNovice);
|
||||
lua_setglobal(L, "startingCashNovice");
|
||||
|
||||
lua_pushinteger(L, gGameExternalOptions.iStartingCashExperienced);
|
||||
lua_setglobal(L, "startingCashExperienced");
|
||||
|
||||
lua_pushinteger(L, gGameExternalOptions.iStartingCashExpert);
|
||||
lua_setglobal(L, "startingCashExpert");
|
||||
|
||||
lua_pushinteger(L, gGameExternalOptions.iStartingCashInsane);
|
||||
lua_setglobal(L, "startingCashInsane");
|
||||
|
||||
lua_pushinteger(L, gGameExternalOptions.fCanTrueCiviliansBecomeHostile);
|
||||
lua_setglobal(L, "fCanTrueCiviliansBecomeHostile");
|
||||
|
||||
// WANNE: Currently not used
|
||||
lua_pushinteger(L, guiNumWorldItems);
|
||||
@@ -196,5 +298,82 @@ void IniGlobalGameSetting(lua_State *L)
|
||||
lua_setglobal(L, "gfDoneWithSplashScreen");
|
||||
|
||||
lua_pushinteger(L, gbIntroScreenMode);
|
||||
lua_setglobal(L, "gbIntroScreenMode");
|
||||
lua_setglobal(L, "gbIntroScreenMode");
|
||||
|
||||
#ifdef JA2UB
|
||||
lua_pushboolean(L, gGameUBOptions.fTexAndJohn);
|
||||
lua_setglobal(L, "enabledJohnAndTex");
|
||||
|
||||
lua_pushboolean(L, gGameUBOptions.fRandomManuelText);
|
||||
lua_setglobal(L, "RandomManuelText");
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
//Items
|
||||
lua_pushinteger(L, BARRETT_UB);
|
||||
lua_setglobal(L, "itemBARRETT_UB");
|
||||
|
||||
lua_pushinteger(L, CALICO_960_UB);
|
||||
lua_setglobal(L, "itemCALICO_960_UB");
|
||||
|
||||
lua_pushinteger(L, PSG1_UB);
|
||||
lua_setglobal(L, "itemPSG1_UB");
|
||||
|
||||
lua_pushinteger(L, L85_UB);
|
||||
lua_setglobal(L, "itemL85_UB");
|
||||
|
||||
lua_pushinteger(L, TAR21_UB);
|
||||
lua_setglobal(L, "itemTAR21_UB");
|
||||
|
||||
lua_pushinteger(L, VAL_SILENT_UB);
|
||||
lua_setglobal(L, "itemVAL_SILENT_UB");
|
||||
|
||||
lua_pushinteger(L, MICRO_UZI_UB);
|
||||
lua_setglobal(L, "itemMICRO_UZI_UB");
|
||||
|
||||
lua_pushinteger(L, CALICO_950_UB);
|
||||
lua_setglobal(L, "itemCALICO_950_UB");
|
||||
|
||||
lua_pushinteger(L, CALICO_900_UB);
|
||||
lua_setglobal(L, "itemCALICO_900_UB");
|
||||
|
||||
lua_pushinteger(L, CLIP_CANNON_BALL);
|
||||
lua_setglobal(L, "itemCLIP_CANNON_BALL");
|
||||
|
||||
lua_pushinteger(L, MERC_UMBRELLA);
|
||||
lua_setglobal(L, "itemMERC_UMBRELLA");
|
||||
|
||||
lua_pushinteger(L, HAND_CANNON);
|
||||
lua_setglobal(L, "itemHAND_CANNON");
|
||||
|
||||
lua_pushinteger(L, HARTFORD_6_SHOOTER);
|
||||
lua_setglobal(L, "itemHARTFORD_6_SHOOTER");
|
||||
|
||||
lua_pushinteger(L, TEX_MOVIE_ATTACK_CLYDESDALES);
|
||||
lua_setglobal(L, "itemTEX_MOVIE_ATTACK_CLYDESDALES");
|
||||
|
||||
lua_pushinteger(L, TEX_MOVIE_WILD_EAST);
|
||||
lua_setglobal(L, "itemTEX_MOVIE_WILD_EAST");
|
||||
|
||||
lua_pushboolean(L, TEX_MOVIE_HAVE_HONDA);
|
||||
lua_setglobal(L, "itemTEX_MOVIE_HAVE_HONDA");
|
||||
|
||||
lua_pushboolean(L, LAPTOP_TRANSMITTER);
|
||||
lua_setglobal(L, "itemLAPTOP_TRANSMITTER");
|
||||
|
||||
lua_pushboolean(L, CHE_GUEVARA_CANTEEN);
|
||||
lua_setglobal(L, "itemCHE_GUEVARA_CANTEEN");
|
||||
|
||||
lua_pushboolean(L, MERC_WRISTWATCH);
|
||||
lua_setglobal(L, "itemMERC_WRISTWATCH");
|
||||
|
||||
lua_pushboolean(L, SAM_GARVER_COMBAT_KNIFE);
|
||||
lua_setglobal(L, "itemSAM_GARVER_COMBAT_KNIFE");
|
||||
|
||||
lua_pushboolean(L, MERC_UMBRELLA_OLD);
|
||||
lua_setglobal(L, "itemMERC_UMBRELLA_OLD");
|
||||
|
||||
lua_pushboolean(L, MORRIS_INSTRUCTION_NOTE);
|
||||
lua_setglobal(L, "itemMORRIS_INSTRUCTION_NOTE");
|
||||
#endif
|
||||
}
|
||||
+11
-7
@@ -11,13 +11,17 @@ extern "C" {
|
||||
|
||||
// --------------------------
|
||||
// WANNE: Should we enable lua scripting for different actions, or should we use "hardcoded" stuff instead?
|
||||
#define LUA_GAME_INIT_NEW_GAME // GameInit.lua (Function: InitNewGame)
|
||||
#define LUA_GAME_INIT_NPCS // GameInit.lua (Function: InitNPCs)
|
||||
#define LUA_INTRO // Intro.lua
|
||||
#define LUA_HOURLY_QUEST_UPDATE // HourlyUpdate.lua
|
||||
#define LUA_STRATEGY_EVENT_HANDLER // StrategicEventHandler.lua
|
||||
#define LUA_STRATEGY_TOWN_LOYALTY // StrategicTownLoyalty.lua
|
||||
#define LUA_OVERHEAD // Overhead.lua
|
||||
|
||||
#define LUA_INTERFACE_DIALOGUE // InterfaceDialogue.lua
|
||||
#define LUA_EXPLOSION_CONTROL // ExplosionControl.lua
|
||||
#define LUA_HANDLE_QUEST_CODE_ON_SECTOR // Strategicmap.lua
|
||||
#define LUA_GAME_INIT_NEW_GAME // GameInit.lua (Function: InitNewGame)
|
||||
#define LUA_GAME_INIT_NPCS // GameInit.lua (Function: InitNPCs)
|
||||
#define LUA_INTRO // Intro.lua
|
||||
#define LUA_HOURLY_QUEST_UPDATE // HourlyUpdate.lua
|
||||
#define LUA_STRATEGY_EVENT_HANDLER // StrategicEventHandler.lua
|
||||
#define LUA_STRATEGY_TOWN_LOYALTY // StrategicTownLoyalty.lua
|
||||
#define LUA_OVERHEAD // Overhead.lua
|
||||
// --------------------------
|
||||
|
||||
void IniGlobalGameSetting(lua_State *L);
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "Facilities.h"
|
||||
#endif
|
||||
|
||||
#include "Vehicles.h"
|
||||
|
||||
// the amounts of time to wait for hover stuff
|
||||
#define TIME_DELAY_FOR_HOVER_WAIT 10 // minutes
|
||||
@@ -69,7 +70,7 @@ extern PathStPtr pTempHelicopterPath;
|
||||
extern UINT8 ubSAMControlledSectors[ MAP_WORLD_Y ][ MAP_WORLD_X ];
|
||||
|
||||
// the seating capacities
|
||||
extern INT32 iSeatingCapacities[];
|
||||
//extern INT32 iSeatingCapacities[];
|
||||
|
||||
// the static NPC dialogue faces
|
||||
//extern UINT32 uiExternalStaticNPCFaces[];
|
||||
@@ -677,8 +678,13 @@ void LandHelicopter( void )
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef JA2UB
|
||||
Assert( 0 );
|
||||
//No meanwhiles
|
||||
#else
|
||||
// play meanwhile scene if it hasn't been used yet
|
||||
HandleKillChopperMeanwhileScene();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -862,7 +868,7 @@ void SetUpHelicopterForMovement( void )
|
||||
pVehicleList[ iHelicopterVehicleId ].ubMovementGroup = CreateNewVehicleGroupDepartingFromSector( ( UINT8 )( pVehicleList[ iHelicopterVehicleId ].sSectorX ), ( UINT8 )( pVehicleList[ iHelicopterVehicleId ].sSectorY ), iHelicopterVehicleId );
|
||||
|
||||
// add everyone in vehicle to this mvt group
|
||||
for( iCounter = 0; iCounter < iSeatingCapacities[ pVehicleList[ iHelicopterVehicleId ].ubVehicleType ]; iCounter++ )
|
||||
for( iCounter = 0; iCounter < gNewVehicle[ pVehicleList[ iHelicopterVehicleId ].ubVehicleType ].iNewSeatingCapacities; iCounter++ )
|
||||
{
|
||||
if( pVehicleList[ iHelicopterVehicleId ].pPassengers[ iCounter ] != NULL )
|
||||
{
|
||||
@@ -949,14 +955,14 @@ void UpdateRefuelSiteAvailability( void )
|
||||
}
|
||||
|
||||
|
||||
void SetUpHelicopterForPlayer( INT16 sX, INT16 sY , UINT8 SkyDrive )
|
||||
void SetUpHelicopterForPlayer( INT16 sX, INT16 sY , UINT8 SkyDrive, UINT8 VehicleID )
|
||||
{
|
||||
if( fSkyRiderSetUp == FALSE )
|
||||
{
|
||||
fHelicopterAvailable = TRUE;
|
||||
fSkyRiderAvailable = TRUE;
|
||||
|
||||
iHelicopterVehicleId = AddVehicleToList( sX, sY, 0, HELICOPTER );
|
||||
iHelicopterVehicleId = AddVehicleToList( sX, sY, 0, VehicleID ); //HELICOPTER
|
||||
|
||||
Assert( iHelicopterVehicleId != -1 );
|
||||
|
||||
@@ -1001,7 +1007,7 @@ UINT8 MoveAllInHelicopterToFootMovementGroup( void )
|
||||
}
|
||||
|
||||
// go through list of everyone in helicopter
|
||||
for( iCounter = 0; iCounter < iSeatingCapacities[ pVehicleList[ iHelicopterVehicleId ].ubVehicleType ]; iCounter++ )
|
||||
for( iCounter = 0; iCounter < gNewVehicle[ pVehicleList[ iHelicopterVehicleId ].ubVehicleType ].iNewSeatingCapacities; iCounter++ )
|
||||
{
|
||||
// get passenger
|
||||
pSoldier = pVehicleList[ iHelicopterVehicleId ].pPassengers[ iCounter ];
|
||||
|
||||
@@ -191,7 +191,7 @@ BOOLEAN IsRefuelSiteInSector( INT16 sMapX, INT16 sMapY );
|
||||
void UpdateRefuelSiteAvailability( void );
|
||||
|
||||
// setup helicopter for player
|
||||
void SetUpHelicopterForPlayer( INT16 sX, INT16 sY , UINT8 SkyDrive );
|
||||
void SetUpHelicopterForPlayer( INT16 sX, INT16 sY , UINT8 SkyDrive, UINT8 VehicleID );
|
||||
|
||||
// the intended path of the helicopter
|
||||
INT32 DistanceOfIntendedHelicopterPath( void );
|
||||
|
||||
@@ -28,12 +28,13 @@
|
||||
// Also include Town Militia for checks regarding Mobile Militia Restrictions
|
||||
#include "Town Militia.h"
|
||||
// Also include Quests, for checking whether a fact is true.
|
||||
#include "Quests.h"
|
||||
#include "Quests.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "ub_config.h"
|
||||
#endif
|
||||
|
||||
//#define MAP_BORDER_CORNER_X 584
|
||||
//#define MAP_BORDER_CORNER_Y 279
|
||||
@@ -454,6 +455,65 @@ BOOLEAN CreateButtonsForMapBorder( void )
|
||||
// SetButtonCursor(guiMapBorderLandRaiseButtons[ 0 ], MSYS_NO_CURSOR );
|
||||
// SetButtonCursor(guiMapBorderLandRaiseButtons[ 1 ], MSYS_NO_CURSOR );
|
||||
|
||||
|
||||
#ifdef JA2UB
|
||||
//EnableButton
|
||||
|
||||
if (gGameUBOptions.BorderTown == TRUE)
|
||||
{
|
||||
EnableButton( giMapBorderButtons[ MAP_BORDER_TOWN_BTN ]);
|
||||
}
|
||||
else
|
||||
{
|
||||
DisableButton( giMapBorderButtons[ MAP_BORDER_TOWN_BTN ]);
|
||||
}
|
||||
|
||||
if (gGameUBOptions.BorderMine == TRUE)
|
||||
{
|
||||
EnableButton( giMapBorderButtons[ MAP_BORDER_MINE_BTN ]);
|
||||
}
|
||||
else
|
||||
{
|
||||
DisableButton( giMapBorderButtons[ MAP_BORDER_MINE_BTN ]);
|
||||
}
|
||||
|
||||
if (gGameUBOptions.BorderTeams == TRUE)
|
||||
{
|
||||
EnableButton( giMapBorderButtons[ MAP_BORDER_TEAMS_BTN ]);
|
||||
}
|
||||
else
|
||||
{
|
||||
DisableButton( giMapBorderButtons[ MAP_BORDER_TEAMS_BTN ]);
|
||||
}
|
||||
|
||||
if (gGameUBOptions.BorderMilitia == TRUE)
|
||||
{
|
||||
EnableButton( giMapBorderButtons[ MAP_BORDER_MILITIA_BTN ]);
|
||||
}
|
||||
else
|
||||
{
|
||||
DisableButton( giMapBorderButtons[ MAP_BORDER_MILITIA_BTN ]);
|
||||
}
|
||||
|
||||
if (gGameUBOptions.BorderAirspace == TRUE)
|
||||
{
|
||||
EnableButton( giMapBorderButtons[ MAP_BORDER_AIRSPACE_BTN ]);
|
||||
}
|
||||
else
|
||||
{
|
||||
DisableButton( giMapBorderButtons[ MAP_BORDER_AIRSPACE_BTN ]);
|
||||
}
|
||||
|
||||
if (gGameUBOptions.BorderItem == TRUE)
|
||||
{
|
||||
EnableButton( giMapBorderButtons[ MAP_BORDER_ITEM_BTN ]);
|
||||
}
|
||||
else
|
||||
{
|
||||
DisableButton( giMapBorderButtons[ MAP_BORDER_ITEM_BTN ]);
|
||||
}
|
||||
#endif
|
||||
|
||||
InitializeMapBorderButtonStates( );
|
||||
|
||||
return( TRUE );
|
||||
|
||||
@@ -54,6 +54,13 @@
|
||||
#include "game init.h"
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
#include "MapScreen Quotes.h"
|
||||
#include "SaveLoadGame.h"
|
||||
#include "strategicmap.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
/* CHRISL: Adjusted settings to allow new Map_Screen_Bottom_800x600.sti to work. This is needed if we
|
||||
@@ -1329,11 +1336,15 @@ BOOLEAN AllowedToTimeCompress( void )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 no meanwhiles
|
||||
#else
|
||||
// meanwhile coming up
|
||||
if ( gfMeanwhileTryingToStart )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
#endif
|
||||
|
||||
// someone has something to say
|
||||
if ( !DialogueQueueIsEmpty() )
|
||||
@@ -1419,7 +1430,18 @@ BOOLEAN AllowedToTimeCompress( void )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
//if the player hasnt been to the initial sector yet
|
||||
if( !GetSectorFlagStatus( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY, 0, SF_HAS_ENTERED_TACTICAL ) ) //7, 8
|
||||
{
|
||||
//if there is something that jerry wants to say
|
||||
if( !WillJerryMiloAllowThePlayerToCompressTimeAtBeginingOfGame() )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
@@ -1734,8 +1756,11 @@ BOOLEAN AnyUsableRealMercenariesOnTeam( void )
|
||||
|
||||
void RequestTriggerExitFromMapscreen( INT8 bExitToWhere )
|
||||
{
|
||||
Assert( ( bExitToWhere >= MAP_EXIT_TO_LAPTOP ) && ( bExitToWhere <= MAP_EXIT_TO_MAINMENU ) );
|
||||
|
||||
#ifdef JA2UB
|
||||
Assert( ( bExitToWhere >= MAP_EXIT_TO_LAPTOP ) && ( bExitToWhere <= MAP_EXIT_TO_INTRO_SCREEN ));//MAP_EXIT_TO_MAINMENU ) );
|
||||
#else
|
||||
Assert( ( bExitToWhere >= MAP_EXIT_TO_LAPTOP ) && ( bExitToWhere <= MAP_EXIT_TO_MAINMENU ));
|
||||
#endif
|
||||
// if allowed to do so
|
||||
if ( AllowedToExitFromMapscreenTo( bExitToWhere ) )
|
||||
{
|
||||
@@ -1777,8 +1802,11 @@ void RequestTriggerExitFromMapscreen( INT8 bExitToWhere )
|
||||
|
||||
BOOLEAN AllowedToExitFromMapscreenTo( INT8 bExitToWhere )
|
||||
{
|
||||
#ifdef JA2UB
|
||||
Assert( ( bExitToWhere >= MAP_EXIT_TO_LAPTOP ) && ( bExitToWhere <= MAP_EXIT_TO_INTRO_SCREEN)); //MAP_EXIT_TO_MAINMENU ) );
|
||||
#else
|
||||
Assert( ( bExitToWhere >= MAP_EXIT_TO_LAPTOP ) && ( bExitToWhere <= MAP_EXIT_TO_MAINMENU ) );
|
||||
|
||||
#endif
|
||||
// if already leaving, disallow any other attempts to exit
|
||||
if ( fLeavingMapScreen )
|
||||
{
|
||||
@@ -1813,11 +1841,15 @@ BOOLEAN AllowedToExitFromMapscreenTo( INT8 bExitToWhere )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 No meanwhiles
|
||||
#else
|
||||
// meanwhile coming up
|
||||
if ( gfMeanwhileTryingToStart )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
#endif
|
||||
|
||||
// if we're locked into paused time compression by some event that enforces that
|
||||
if ( PauseStateLocked() )
|
||||
@@ -1953,6 +1985,13 @@ void HandleExitsFromMapScreen( void )
|
||||
ReStartingGame();
|
||||
SetPendingNewScreen( MAINMENU_SCREEN );
|
||||
break;
|
||||
#ifdef JA2UB
|
||||
//JA25 ub
|
||||
case MAP_EXIT_TO_INTRO_SCREEN:
|
||||
// SetPendingNewScreen( INTRO_SCREEN );
|
||||
BeginLoadScreen();
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
// invalid exit type
|
||||
Assert( FALSE );
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
#else
|
||||
#define MAX_MESSAGES_ON_MAP_BOTTOM 9
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
extern INT8 gbExitingMapScreenToWhere;
|
||||
#endif
|
||||
// exit to where defines
|
||||
enum{
|
||||
MAP_EXIT_TO_LAPTOP = 0,
|
||||
@@ -18,6 +20,9 @@ enum{
|
||||
MAP_EXIT_TO_OPTIONS,
|
||||
MAP_EXIT_TO_LOAD,
|
||||
MAP_EXIT_TO_SAVE,
|
||||
#ifdef JA2UB
|
||||
MAP_EXIT_TO_INTRO_SCREEN,
|
||||
#endif
|
||||
// OJW - 20090210 - clean resources on disconnect
|
||||
MAP_EXIT_TO_MAINMENU
|
||||
};
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "InterfaceItemImages.h"
|
||||
#include "SaveLoadGame.h"//dnl ch51 081009
|
||||
#include "Map Information.h"//dnl ch51 091009
|
||||
#include "Interface Items.h"
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
|
||||
@@ -593,6 +593,71 @@ void AnimateRoute( PathStPtr pPath );
|
||||
extern void EndConfirmMapMoveMode( void );
|
||||
extern BOOLEAN CanDrawSectorCursor( void );
|
||||
|
||||
void DrawIconL(INT32 MAP_GRID_X2, INT32 MAP_GRID_Y2, INT32 i, INT32 Sector_X , INT32 Sector_Y ); //Legion
|
||||
UINT32 guiIcon2[256];
|
||||
ICON_FILE gHiddenIcon[ 256 ];
|
||||
|
||||
#ifdef JA2UB
|
||||
void SetUpValidCampaignSectors( void );
|
||||
#endif
|
||||
|
||||
BOOLEAN LoadHiddenTownFromLoadGameFile( HWFILE hFile );
|
||||
BOOLEAN SaveHiddenTownToSaveGameFile( HWFILE hFile );
|
||||
|
||||
//--------------Legion 2----Jazz-----------
|
||||
|
||||
void DrawIconL(INT32 MAP_GRID_X2, INT32 MAP_GRID_Y2, INT32 i, INT32 Sector_X , INT32 Sector_Y )
|
||||
{
|
||||
UINT8 *pDestBuf2;
|
||||
UINT32 uiDestPitchBYTES;
|
||||
INT16 sX, sY;
|
||||
HVOBJECT hHandle;
|
||||
INT8 ubVidObjIndex = 0;
|
||||
|
||||
if( fZoomFlag )
|
||||
{
|
||||
pDestBuf2 = LockVideoSurface( guiSAVEBUFFER, &uiDestPitchBYTES );
|
||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, MAP_VIEW_START_X+MAP_GRID_X - 1, MAP_VIEW_START_Y+MAP_GRID_Y - 1, MAP_VIEW_WIDTH+1,MAP_VIEW_HEIGHT-9 );
|
||||
UnLockVideoSurface(guiSAVEBUFFER);
|
||||
|
||||
GetScreenXYFromMapXYStationary( Sector_X, Sector_Y, &sX, &sY );
|
||||
sX += -MAP_GRID_X + MAP_GRID_X2;
|
||||
sY += -MAP_GRID_Y - MAP_GRID_Y2;
|
||||
ubVidObjIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetScreenXYFromMapXY( Sector_X, Sector_Y, &sX, &sY );
|
||||
|
||||
sX = (UINT16) (MAP_VIEW_START_X + MAP_GRID_X + (MAP_GRID_X2 * MAP_GRID_X) / 10);
|
||||
sY = (UINT16) (MAP_VIEW_START_Y + MAP_GRID_Y + ((MAP_GRID_Y2 * MAP_GRID_Y) / 10) + 1);
|
||||
|
||||
/*
|
||||
if (iResolution == 0)
|
||||
{
|
||||
sY += MAP_GRID_Y2;
|
||||
sX += MAP_GRID_X2;
|
||||
}
|
||||
else if (iResolution == 1)
|
||||
{
|
||||
sY += + 5 + MAP_GRID_Y2;
|
||||
sX += - MAP_GRID_X2 + 3;
|
||||
}
|
||||
else if (iResolution == 2)
|
||||
{
|
||||
sY += + 10 + MAP_GRID_Y2;
|
||||
sX += - MAP_GRID_X2 + 10;
|
||||
}
|
||||
*/
|
||||
ubVidObjIndex = 1;
|
||||
}
|
||||
|
||||
// draw Tixa in its sector
|
||||
GetVideoObject( &hHandle, guiIcon2[i]);
|
||||
BltVideoObject( guiSAVEBUFFER, hHandle, ubVidObjIndex, sX, sY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
}
|
||||
|
||||
//-----------------------------------
|
||||
|
||||
// This method outputs the numbers (1-16) and letters (A - P)
|
||||
void DrawMapIndexBigMap( BOOLEAN fSelectedCursorIsYellow )
|
||||
@@ -724,6 +789,9 @@ UINT32 DrawMap( void )
|
||||
SGPRect clip;
|
||||
INT16 cnt, cnt2;
|
||||
INT32 iCounter = 0;
|
||||
INT32 iCounter2 = 0;
|
||||
INT16 pSectorX = 0, pSectorY = 0;
|
||||
INT16 sBaseSectorValue = 0;
|
||||
|
||||
//MAP_VIEW_START_X = (SCREEN_WIDTH - 370);
|
||||
//MAP_VIEW_START_Y = 10;
|
||||
@@ -932,7 +1000,27 @@ UINT32 DrawMap( void )
|
||||
// UNFORTUNATELY, WE CAN'T SHADE THESE ICONS AS PART OF SHADING THE MAP, BECAUSE FOR AIRSPACE, THE SHADE FUNCTION
|
||||
// DOESN'T MERELY SHADE THE EXISTING MAP SURFACE, BUT INSTEAD GRABS THE ORIGINAL GRAPHICS FROM BIGMAP, AND CHANGES
|
||||
// THEIR PALETTE. BLITTING ICONS PRIOR TO SHADING WOULD MEAN THEY DON'T SHOW UP IN AIRSPACE VIEW AT ALL.
|
||||
|
||||
for (cnt = 1; cnt < NUM_TOWNS; cnt++)
|
||||
{
|
||||
if ( gfHiddenTown[ cnt ] == TRUE )
|
||||
{
|
||||
if ( gfIconTown[ cnt ] == TRUE && gfDrawHiddenTown[ cnt ] == TRUE )
|
||||
{
|
||||
sBaseSectorValue = sBaseSectorList[ cnt-1 ];
|
||||
pSectorX = SECTORX( sBaseSectorValue );
|
||||
pSectorY = SECTORY( sBaseSectorValue );
|
||||
|
||||
INT8 bTownId = GetTownIdForSector( pSectorX, pSectorY );
|
||||
if ( /*bTownId != 0 &&*/ bTownId < NUM_TOWNS )
|
||||
{
|
||||
DrawIconL(gHiddenIcon[cnt].IconX, gHiddenIcon[cnt].IconY, cnt, pSectorX, pSectorY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
// if Orta found
|
||||
if( fFoundOrta )
|
||||
{
|
||||
@@ -944,7 +1032,8 @@ UINT32 DrawMap( void )
|
||||
{
|
||||
DrawTixa();
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
// draw SAM sites
|
||||
ShowSAMSitesOnStrategicMap( );
|
||||
|
||||
@@ -1081,7 +1170,8 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Map Screen1");
|
||||
for( bTown = FIRST_TOWN; bTown < NUM_TOWNS; bTown++)
|
||||
{
|
||||
// skip Orta/Tixa until found
|
||||
if( ( ( fFoundOrta != FALSE ) || ( bTown != ORTA ) ) && ( ( bTown != TIXA ) || ( fFoundTixa != FALSE) ) )
|
||||
//if( ( ( fFoundOrta != FALSE ) || ( bTown != ORTA ) ) && ( ( bTown != TIXA ) || ( fFoundTixa != FALSE) ) )
|
||||
if( gfHiddenTown[ bTown ] == TRUE )
|
||||
{
|
||||
swprintf( sString, L"%s", pTownNames[ bTown ] );
|
||||
|
||||
@@ -4212,6 +4302,18 @@ void DisplayThePotentialPathForHelicopter(INT16 sMapX, INT16 sMapY )
|
||||
|
||||
BOOLEAN IsTheCursorAllowedToHighLightThisSector( INT16 sSectorX, INT16 sSectorY )
|
||||
{
|
||||
//Ja25UB
|
||||
// check to see if this sector is a blocked out sector?
|
||||
/* if ( !SectorInfo[ ( SECTOR( sSectorX, sSectorY ) ) ].fValidSector )
|
||||
{
|
||||
return ( FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
// return cursor is allowed to highlight this sector
|
||||
return ( TRUE );
|
||||
}
|
||||
*/
|
||||
// check to see if this sector is a blocked out sector?
|
||||
|
||||
if( sBadSectorsList[ sSectorX ][ sSectorY ] )
|
||||
@@ -4793,7 +4895,7 @@ void DisplayPositionOfHelicopter( void )
|
||||
RemoveVehicleFromList (iHelicopterVehicleId);
|
||||
InitAVehicle (iHelicopterVehicleId, 13, MAP_ROW_B);
|
||||
fSkyRiderSetUp = FALSE;
|
||||
SetUpHelicopterForPlayer( 13, MAP_ROW_B , SKYRIDER );
|
||||
SetUpHelicopterForPlayer( 13, MAP_ROW_B, gNewVehicle[ HELICOPTER ].NewPilot, HELICOPTER );
|
||||
pGroup = GetGroup( pVehicleList[ iHelicopterVehicleId ].ubMovementGroup );
|
||||
if (!pGroup) {
|
||||
static bool heliMsg2Given = false;
|
||||
@@ -5186,7 +5288,8 @@ void BlitTownGridMarkers( void )
|
||||
while( pTownNamesList[ iCounter ] != 0 )
|
||||
{
|
||||
// skip Orta/Tixa until found
|
||||
if( ( ( fFoundOrta != FALSE ) || ( pTownNamesList[ iCounter ] != ORTA ) ) && ( ( pTownNamesList[ iCounter ] != TIXA ) || ( fFoundTixa != FALSE) ) )
|
||||
//if( ( ( fFoundOrta != FALSE ) || ( pTownNamesList[ iCounter ] != ORTA ) ) && ( ( pTownNamesList[ iCounter ] != TIXA ) || ( fFoundTixa != FALSE) ) )
|
||||
if( gfHiddenTown[ pTownNamesList[ iCounter ] ] == TRUE )
|
||||
{
|
||||
if( fZoomFlag )
|
||||
{
|
||||
@@ -7548,9 +7651,17 @@ void HideExistenceOfUndergroundMapSector( UINT8 ubSectorX, UINT8 ubSectorY )
|
||||
void InitMapSecrets( void )
|
||||
{
|
||||
//UINT8 ubSamIndex;
|
||||
INT32 iCounter2 = 0;
|
||||
|
||||
fFoundTixa = FALSE;
|
||||
fFoundOrta = FALSE;
|
||||
|
||||
for( iCounter2 = 1; iCounter2 < NUM_TOWNS; iCounter2++ )
|
||||
{
|
||||
gfHiddenTown [ iCounter2 ] = gfHiddenTownTemp [ iCounter2 ];
|
||||
gfDrawHiddenTown[ iCounter2 ] = FALSE;
|
||||
gfIconTown [ iCounter2 ] = gfIconTownTemp [ iCounter2 ];
|
||||
}
|
||||
|
||||
//for( ubSamIndex = 0; ubSamIndex < NUMBER_OF_SAMS; ubSamIndex++ )
|
||||
//{
|
||||
@@ -7655,3 +7766,152 @@ void MilitiaDisbandYesNoBoxCallback( UINT8 bExitValue )
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
void SetUpValidCampaignSectors( void )
|
||||
{
|
||||
/*
|
||||
INT32 iRow, iCol;
|
||||
|
||||
for( iRow=1; iRow<=16; iRow++ )
|
||||
{
|
||||
for( iCol=1; iCol<=16; iCol++ )
|
||||
{
|
||||
SectorInfo[ ( SECTOR( iCol , iRow ) ) ].fValidSector = FALSE;
|
||||
sBadSectorsList[iCol][iRow] = 1;
|
||||
// SectorInfo[ ( SECTOR( iCol , iRow ) ) ].fCampaignSector = FALSE;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#ifdef JA2UB_PRESS_PREVIEW
|
||||
|
||||
INT32 iRow, iCol;
|
||||
|
||||
for( iRow=1; iRow<=16; iRow++ )
|
||||
{
|
||||
for( iCol=1; iCol<=16; iCol++ )
|
||||
{
|
||||
SectorInfo[ ( SECTOR( iCol , iRow ) ) ].fValidSector = FALSE;
|
||||
SectorInfo[ ( SECTOR( iCol , iRow ) ) ].fCampaignSector = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
SectorInfo[ ( SECTOR( 7 , 8 ) ) ].fValidSector = TRUE; //H7
|
||||
SectorInfo[ ( SECTOR( 7 , 8 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
SectorInfo[ ( SECTOR( 8 , 8 ) ) ].fValidSector = TRUE; //H8
|
||||
SectorInfo[ ( SECTOR( 8 , 8 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
SectorInfo[ ( SECTOR( 9 , 8 ) ) ].fValidSector = TRUE; //H9
|
||||
SectorInfo[ ( SECTOR( 9 , 8 ) ) ].fCampaignSector = TRUE; //H9
|
||||
|
||||
SectorInfo[ ( SECTOR( 10 , 8 ) ) ].fValidSector = TRUE; //H10
|
||||
SectorInfo[ ( SECTOR( 10 , 8 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
#ifndef JA2UB_PRESS_PREVIEW
|
||||
|
||||
SectorInfo[ ( SECTOR( 11, 8 ) ) ].fValidSector = TRUE; //H11
|
||||
SectorInfo[ ( SECTOR( 11, 8 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
#endif
|
||||
|
||||
SectorInfo[ ( SECTOR( 9 , 9 ) ) ].fValidSector = TRUE; //I9
|
||||
SectorInfo[ ( SECTOR( 9 , 9 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
SectorInfo[ ( SECTOR( 10 , 9 ) ) ].fValidSector = TRUE; //I10
|
||||
SectorInfo[ ( SECTOR( 10 , 9 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
#ifndef JA2UB_PRESS_PREVIEW
|
||||
|
||||
SectorInfo[ ( SECTOR( 11 , 9 ) ) ].fValidSector = TRUE; //I11
|
||||
SectorInfo[ ( SECTOR( 11 , 9 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
SectorInfo[ ( SECTOR( 12 , 9 ) ) ].fValidSector = TRUE; //I12
|
||||
SectorInfo[ ( SECTOR( 12 , 9 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
SectorInfo[ ( SECTOR( 13 , 9 ) ) ].fValidSector = TRUE; //I13
|
||||
SectorInfo[ ( SECTOR( 13 , 9 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
SectorInfo[ ( SECTOR( 11 , 10 ) ) ].fValidSector = TRUE; //J11
|
||||
SectorInfo[ ( SECTOR( 11 , 10 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
SectorInfo[ ( SECTOR( 12 , 10 ) ) ].fValidSector = TRUE; //J12
|
||||
SectorInfo[ ( SECTOR( 12 , 10 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
SectorInfo[ ( SECTOR( 13 , 10 ) ) ].fValidSector = TRUE; //J13
|
||||
SectorInfo[ ( SECTOR( 13 , 10 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
SectorInfo[ ( SECTOR( 14 , 10 ) ) ].fValidSector = TRUE; //J14
|
||||
SectorInfo[ ( SECTOR( 14 , 10 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
SectorInfo[ ( SECTOR( 14 , 11 ) ) ].fValidSector = TRUE; //K14
|
||||
SectorInfo[ ( SECTOR( 14 , 11 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
SectorInfo[ ( SECTOR( 15 , 11 ) ) ].fValidSector = TRUE; //K15
|
||||
SectorInfo[ ( SECTOR( 15 , 11 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
SectorInfo[ ( SECTOR( 16 , 11 ) ) ].fValidSector = TRUE; //K16
|
||||
SectorInfo[ ( SECTOR( 16 , 11 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
SectorInfo[ ( SECTOR( 15 , 12 ) ) ].fValidSector = TRUE; //L15
|
||||
SectorInfo[ ( SECTOR( 15 , 12 ) ) ].fCampaignSector = TRUE;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOLEAN SaveHiddenTownToSaveGameFile( HWFILE hFile )
|
||||
{
|
||||
UINT32 uiNumBytesWritten;
|
||||
|
||||
FileWrite( hFile, &gfHiddenTown, sizeof( gfHiddenTown), &uiNumBytesWritten );
|
||||
if( uiNumBytesWritten != sizeof( gfHiddenTown ) )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
FileWrite( hFile, &gfDrawHiddenTown, sizeof( gfDrawHiddenTown), &uiNumBytesWritten );
|
||||
if( uiNumBytesWritten != sizeof( gfDrawHiddenTown ) )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
FileWrite( hFile, &gfIconTown, sizeof( gfIconTown), &uiNumBytesWritten );
|
||||
if( uiNumBytesWritten != sizeof( gfIconTown ) )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
BOOLEAN LoadHiddenTownFromLoadGameFile( HWFILE hFile )
|
||||
{
|
||||
UINT32 uiNumBytesRead;
|
||||
|
||||
FileRead( hFile, &gfHiddenTown, sizeof( gfHiddenTown), &uiNumBytesRead );
|
||||
if( uiNumBytesRead != sizeof( gfHiddenTown ) )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
FileRead( hFile, &gfDrawHiddenTown, sizeof( gfDrawHiddenTown), &uiNumBytesRead );
|
||||
if( uiNumBytesRead != sizeof( gfDrawHiddenTown ) )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
FileRead( hFile, &gfIconTown, sizeof( gfIconTown), &uiNumBytesRead );
|
||||
if( uiNumBytesRead != sizeof( gfIconTown ) )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
@@ -11,6 +11,22 @@ void DrawMapIndexBigMap( 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 );
|
||||
|
||||
@@ -307,4 +323,8 @@ extern UINT32 guiSubLevel1, guiSubLevel2, guiSubLevel3;
|
||||
extern INT16 sBaseSectorList[ MAX_TOWNS - 1 ];
|
||||
extern POINT pTownPoints[ MAX_TOWNS ];
|
||||
|
||||
#endif
|
||||
#ifdef JA2UB
|
||||
extern void SetUpValidCampaignSectors( void );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -303,13 +303,15 @@ void AddTextToTownBox( void )
|
||||
AddMonoString( &hStringHandle, pLandTypeStrings[ CAMBRIA_HOSPITAL_SITE ] );
|
||||
break;
|
||||
case SEC_J9: //Tixa
|
||||
if( !fFoundTixa )
|
||||
//if( !fFoundTixa )
|
||||
if( gfHiddenTown[ TIXA ] == FALSE )
|
||||
AddMonoString( &hStringHandle, pLandTypeStrings[ SAND ] );
|
||||
else
|
||||
AddMonoString( &hStringHandle, pTownNames[ TIXA ] );
|
||||
break;
|
||||
case SEC_K4: //Orta
|
||||
if( !fFoundOrta )
|
||||
//if( !fFoundOrta )
|
||||
if( gfHiddenTown[ ORTA ] == FALSE )
|
||||
AddMonoString( &hStringHandle, pLandTypeStrings[ SWAMP ] );
|
||||
else
|
||||
AddMonoString( &hStringHandle, pTownNames[ ORTA ] );
|
||||
|
||||
@@ -3932,11 +3932,13 @@ void AddStringsToMoveBox( void )
|
||||
// add this vehicle
|
||||
if( fVehicleIsMoving[ iCount ] )
|
||||
{
|
||||
swprintf( sString, L"*%s*", pVehicleStrings[ pVehicleList[ iVehicleMovingList[ iCount ] ].ubVehicleType ] );
|
||||
// swprintf( sString, L"*%s*", pVehicleStrings[ pVehicleList[ iVehicleMovingList[ iCount ] ].ubVehicleType ] );
|
||||
swprintf( sString, L"*%s*", gNewVehicle[ pVehicleList[ iVehicleMovingList[ iCount ] ].ubVehicleType ].NewVehicleStrings );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( sString, L"%s", pVehicleStrings[ pVehicleList[ iVehicleMovingList[ iCount ] ].ubVehicleType ] );
|
||||
// swprintf( sString, L"%s", pVehicleStrings[ pVehicleList[ iVehicleMovingList[ iCount ] ].ubVehicleType ] );
|
||||
swprintf( sString, L"%s", gNewVehicle[ pVehicleList[ iVehicleMovingList[ iCount ] ].ubVehicleType ].NewVehicleStrings);
|
||||
}
|
||||
AddMonoString(&hStringHandle, sString );
|
||||
|
||||
@@ -5781,8 +5783,8 @@ BOOLEAN HandleTimeCompressWithTeamJackedInAndGearedToGo( void )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
gubPBSectorX = gGameExternalOptions.ubDefaultArrivalSectorX;
|
||||
gubPBSectorY = gGameExternalOptions.ubDefaultArrivalSectorY;
|
||||
gubPBSectorX = (UINT8)gGameExternalOptions.ubDefaultArrivalSectorX;
|
||||
gubPBSectorY = (UINT8)gGameExternalOptions.ubDefaultArrivalSectorY;
|
||||
}
|
||||
gubPBSectorZ = 0;
|
||||
|
||||
@@ -5805,10 +5807,13 @@ BOOLEAN HandleTimeCompressWithTeamJackedInAndGearedToGo( void )
|
||||
FadeInGameScreen( );
|
||||
|
||||
SetUpShutDownMapScreenHelpTextScreenMask( );
|
||||
|
||||
#ifdef JA2UB
|
||||
//no ja25 UB
|
||||
#else
|
||||
// Add e-mail message
|
||||
AddEmail(ENRICO_CONGRATS,ENRICO_CONGRATS_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
|
||||
AddEmail(ENRICO_CONGRATS,ENRICO_CONGRATS_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
|
||||
#endif
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
@@ -5919,12 +5924,19 @@ BOOLEAN NotifyPlayerWhenEnemyTakesControlOfImportantSector( INT16 sSectorX, INT1
|
||||
|
||||
if( fContested && bTownId )
|
||||
{
|
||||
#ifdef JA2UB
|
||||
// no UB
|
||||
#else
|
||||
if( bTownId == SAN_MONA )
|
||||
{ //San Mona isn't important.
|
||||
return( TRUE );
|
||||
}
|
||||
#endif
|
||||
swprintf( sStringB, pMapErrorString[ 25 ], sString );
|
||||
|
||||
#ifdef JA2UB
|
||||
HandleDisplayingOfPlayerLostDialogue( );
|
||||
#endif
|
||||
// put up the message informing the player of the event
|
||||
DoScreenIndependantMessageBox( sStringB, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
|
||||
return( TRUE );
|
||||
|
||||
@@ -0,0 +1,486 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Strategic All.h"
|
||||
#else
|
||||
#include "Map Screen Interface.h"
|
||||
#include "string.h"
|
||||
#include "Map Screen Interface Map.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Font Control.h"
|
||||
#include "Assignments.h"
|
||||
#include "Soldier Control.h"
|
||||
#include "Overhead.h"
|
||||
#include "Squads.h"
|
||||
#include "Sound Control.h"
|
||||
#include "Soundman.h"
|
||||
#include "Message.h"
|
||||
#include "PopUpBox.h"
|
||||
#include "Game Clock.h"
|
||||
#include "Handle Items.h"
|
||||
#include "Interface Items.h"
|
||||
#include "Isometric Utils.h"
|
||||
#include "Interface.h"
|
||||
#include "Game Event Hook.h"
|
||||
#include "Tactical Save.h"
|
||||
#include "Quests.h"
|
||||
#include "Strategicmap.h"
|
||||
#include "Soldier Profile.h"
|
||||
#include "Strategic Movement.h"
|
||||
#include "Dialogue Control.h"
|
||||
#include "Map Screen Interface Border.h"
|
||||
#include "Map Screen Interface Bottom.h"
|
||||
#include "Vehicles.h"
|
||||
#include "LINE.H"
|
||||
#include "Text.h"
|
||||
#include "gameloop.h"
|
||||
#include "Map Screen Helicopter.h"
|
||||
#include "PreBattle Interface.h"
|
||||
#include "WordWrap.h"
|
||||
#include "interface control.h"
|
||||
#include "GameSettings.h"
|
||||
#include "Campaign Types.h"
|
||||
#include "Map Screen Interface Map Inventory.h"
|
||||
#include "strategic.h"
|
||||
#include "Keys.h"
|
||||
#include "Soldier macros.h"
|
||||
#include "Militia Control.h"
|
||||
#include "Random.h"
|
||||
#include "Cursor Control.h"
|
||||
#include "renderworld.h"
|
||||
#include "Game Init.h"
|
||||
#include "Strategic Mines.h"
|
||||
#include "finances.h"
|
||||
#include "strategic.h"
|
||||
#include "Air Raid.h"
|
||||
#include "Queen Command.h"
|
||||
#include "Render Fun.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
#ifdef JA2UB
|
||||
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
#include "Ja25_Tactical.h"
|
||||
#include "ub_config.h"
|
||||
#include "Ja25Update.h"
|
||||
|
||||
|
||||
#include "MapScreen Quotes.h"
|
||||
//****** Global Variables *****************************************
|
||||
|
||||
UINT16 gusWaitingQuote=MILO_NO_QUOTE;
|
||||
UINT16 gusJerryDialogueDelay = 0;
|
||||
|
||||
|
||||
|
||||
//******* Function Prototypes ***************************************
|
||||
|
||||
BOOLEAN Internal_JerryMeloCharacterDialogue( UINT16 usQuoteNum );
|
||||
BOOLEAN DoesPlayerHaveMoreThen6MercsAndJerryHasntComplained();
|
||||
BOOLEAN DoesPlayerHaveMoreThen6MercsAndJerryHasntComplained2ndTime();
|
||||
BOOLEAN DoesPlayerHaveMoreThen6MercsAndJerryHasComplained2ndTime();
|
||||
BOOLEAN DoesPlayerHaveLessThen6MercsAndJerryHasNotDoubleCheckedYet();
|
||||
//BOOLEAN DoesPlayerHaveExactly6MercsOrLessThen6MercsAndJerryHasDoubleChecked();
|
||||
BOOLEAN DoesPlayerHaveLessThen6MercsAndJerryHasDoubleChecked();
|
||||
BOOLEAN DoesPlayerHaveExactly6MercsAndNotSaidQuoteBefore();
|
||||
BOOLEAN HasJerryAlreadySaidTheMapScreenIntroSequence();
|
||||
BOOLEAN HasJerrySaidTheLetsGoToTraconaQuote();
|
||||
|
||||
|
||||
//ppp
|
||||
|
||||
//******* Functions **************************************************
|
||||
|
||||
|
||||
//void JerryMiloTalk( UINT16 usQuoteNum, UINT32 uiDelay )
|
||||
void JerryMiloTalk( UINT16 usQuoteNum )
|
||||
{
|
||||
// gusWaitingQuote = usQuoteNum;
|
||||
|
||||
// have skyrider talk to player
|
||||
Internal_JerryMeloCharacterDialogue( usQuoteNum );
|
||||
|
||||
//set that jerry has said the quote
|
||||
JerryMiloSaidQuote( usQuoteNum );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void JerryMiloDelayedTalk( UINT16 usQuoteNum, UINT32 uiDelay )
|
||||
{
|
||||
gusWaitingQuote = usQuoteNum;
|
||||
gusJerryDialogueDelay = uiDelay;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void HandleJerryMiloQuotes( BOOLEAN fReset )
|
||||
{
|
||||
|
||||
static UINT32 uiLastCount;
|
||||
UINT32 uiCurrentTime = GetJA2Clock();
|
||||
|
||||
|
||||
if( fReset )
|
||||
{
|
||||
uiLastCount = 0;
|
||||
gusWaitingQuote = MILO_NO_QUOTE;
|
||||
return;
|
||||
}
|
||||
|
||||
// if ( gGameUBOptions.InGameHeliCrash == TRUE )
|
||||
// {
|
||||
|
||||
// return;//AA
|
||||
if( gusWaitingQuote == MILO_NO_QUOTE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( uiLastCount == 0 )
|
||||
{
|
||||
uiLastCount = GetJA2Clock();
|
||||
return;
|
||||
}
|
||||
|
||||
if( ( uiCurrentTime - uiLastCount ) > gusJerryDialogueDelay )
|
||||
{
|
||||
JerryMiloTalk( gusWaitingQuote );
|
||||
|
||||
//if the quote waiting to be said was the opening quote
|
||||
if( gusWaitingQuote == MILO_QUOTE__OPENING_GREETING_PART_1 )
|
||||
{
|
||||
//say the follow up part
|
||||
if( DoesPlayerHaveExactly6MercsAndNotSaidQuoteBefore() )
|
||||
{
|
||||
JerryMiloTalk( MILO_QUOTE__ALREADY_HAS_6_MERCS );
|
||||
}
|
||||
else
|
||||
{
|
||||
JerryMiloTalk( MILO_QUOTE__OPENING_GREETING_PART_2 );
|
||||
}
|
||||
}
|
||||
|
||||
gusWaitingQuote = MILO_NO_QUOTE;
|
||||
|
||||
uiLastCount = uiCurrentTime;
|
||||
}
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
BOOLEAN Internal_JerryMeloCharacterDialogue( UINT16 usQuoteNum )
|
||||
{
|
||||
BOOLEAN fRetVal = FALSE;
|
||||
fTeamPanelDirty = TRUE;
|
||||
|
||||
fRetVal = CharacterDialogue( 76, usQuoteNum, uiExternalStaticNPCFacesUB[ JERRY_MELO_FACE ], DIALOGUE_EXTERNAL_NPC_UI, FALSE, FALSE );
|
||||
|
||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_JERRY_MILO, usQuoteNum, 0, 0, uiExternalStaticNPCFacesUB[ JERRY_MELO_FACE ], DIALOGUE_EXTERNAL_NPC_UI );
|
||||
|
||||
return( fRetVal );
|
||||
}
|
||||
|
||||
BOOLEAN HasJerryMiloSaidQuoteBefore( UINT32 uiQuoteID )
|
||||
{
|
||||
//has the quote been said
|
||||
return( ( gJa25SaveStruct.uiJerryMiloQuotesFlags & ( 1 << uiQuoteID ) ) != 0 );
|
||||
}
|
||||
|
||||
|
||||
void JerryMiloSaidQuote( UINT32 uiQuoteID )
|
||||
{
|
||||
gJa25SaveStruct.uiJerryMiloQuotesFlags |= ( 1 << uiQuoteID );
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN WillJerryMiloAllowThePlayerToCompressTimeAtBeginingOfGame()
|
||||
{
|
||||
|
||||
if ( gGameUBOptions.JerryQuotes == TRUE )
|
||||
{
|
||||
//to speed things up, has jerry finished the intro speech?
|
||||
if( HasJerryAlreadySaidTheMapScreenIntroSequence() )
|
||||
return( TRUE );
|
||||
|
||||
|
||||
//if the player has more then 6merc and Jerry hasnt complained the first time
|
||||
if( DoesPlayerHaveMoreThen6MercsAndJerryHasntComplained() )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
//if the player has over 6 mercs and jerry HAS NOT complained the 2nd time
|
||||
if( DoesPlayerHaveMoreThen6MercsAndJerryHasntComplained2ndTime() )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
//if the player has over 6 mercs and jerry HAS complained the 2nd time
|
||||
if( DoesPlayerHaveMoreThen6MercsAndJerryHasComplained2ndTime() )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
//if the player has less then 6 mercs, and hasnt double checked yet
|
||||
if( DoesPlayerHaveLessThen6MercsAndJerryHasNotDoubleCheckedYet() )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
/*
|
||||
//if the player has exactly 6 mercs OR the player has less then 6 AND has double checked
|
||||
if( DoesPlayerHaveExactly6MercsOrLessThen6MercsAndJerryHasDoubleChecked() )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
*/
|
||||
|
||||
//if the player has exactly 6 mercs OR the player has less then 6 AND has double checked
|
||||
if( DoesPlayerHaveLessThen6MercsAndJerryHasDoubleChecked() )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
//if the player has exactly 6 mercs OR the player has less then 6 AND has double checked
|
||||
if( DoesPlayerHaveExactly6MercsAndNotSaidQuoteBefore() )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
|
||||
if( !HasJerrySaidTheLetsGoToTraconaQuote() )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
BOOLEAN HasJerrySaidTheLetsGoToTraconaQuote()
|
||||
{
|
||||
return( HasJerryMiloSaidQuoteBefore( MILO_QUOTE__HEADED_TO_TRACONA_QUOTE ) );
|
||||
}
|
||||
|
||||
void HaveJerrySayWhyPlayerCantTimeCompressAtBeginningOfGame()
|
||||
{
|
||||
if( !gfFirstTimeInGameHeliCrash)
|
||||
{
|
||||
INT32 i=0;
|
||||
}
|
||||
|
||||
/*
|
||||
if (gGameOptions.ubSquadSize > 6)
|
||||
{
|
||||
if( DoesPlayerHaveLessThen6MercsAndJerryHasNotDoubleCheckedYet() )
|
||||
{
|
||||
JerryMiloTalk( MILO_QUOTE__PLAYER_HAS_LESS_THEN_6_MERCS );
|
||||
return;
|
||||
}
|
||||
//else if the player has less then 6 mercs, and hasnt double checked yet
|
||||
else if( DoesPlayerHaveLessThen6MercsAndJerryHasNotDoubleCheckedYet() )
|
||||
{
|
||||
JerryMiloTalk( MILO_QUOTE__PLAYER_HAS_LESS_THEN_6_MERCS );
|
||||
return;
|
||||
}
|
||||
//if the player has less then 6 AND has double checked
|
||||
else if( DoesPlayerHaveLessThen6MercsAndJerryHasDoubleChecked() )
|
||||
{
|
||||
JerryMiloTalk( MILO_QUOTE__HEADED_TO_TRACONA_QUOTE );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
JerryMiloTalk( MILO_QUOTE__HEADED_TO_TRACONA_QUOTE );
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
*/
|
||||
{
|
||||
//if the player has more then 6merc and Jerry hasnt complained the first time
|
||||
if( DoesPlayerHaveMoreThen6MercsAndJerryHasntComplained() )
|
||||
{
|
||||
JerryMiloTalk( MILO_QUOTE__PLAYER_HAS_MORE_THEN_6_MERCS );
|
||||
return;
|
||||
}
|
||||
|
||||
//else if the player has over 6 mercs and jerry HAS NOT complained the 2nd time
|
||||
else if( DoesPlayerHaveMoreThen6MercsAndJerryHasntComplained2ndTime() )
|
||||
{
|
||||
JerryMiloTalk( MILO_QUOTE__PLAYER_HAS_MORE_THEN_6_MERCS_2ND_TIME );
|
||||
return;
|
||||
}
|
||||
|
||||
//else if the player has over 6 mercs and jerry HAS complained the 2nd time
|
||||
else if( DoesPlayerHaveMoreThen6MercsAndJerryHasComplained2ndTime() )
|
||||
{
|
||||
JerryMiloTalk( MILO_QUOTE__PLAYER_HAS_MORE_THEN_6_MERCS_2ND_TIME );
|
||||
return;
|
||||
}
|
||||
|
||||
//else if the player has less then 6 mercs, and hasnt double checked yet
|
||||
else if( DoesPlayerHaveLessThen6MercsAndJerryHasNotDoubleCheckedYet() )
|
||||
{
|
||||
JerryMiloTalk( MILO_QUOTE__PLAYER_HAS_LESS_THEN_6_MERCS );
|
||||
return;
|
||||
}
|
||||
|
||||
//if the player has less then 6 AND has double checked
|
||||
else if( DoesPlayerHaveLessThen6MercsAndJerryHasDoubleChecked() )
|
||||
{
|
||||
JerryMiloTalk( MILO_QUOTE__HEADED_TO_TRACONA_QUOTE );
|
||||
return;
|
||||
}
|
||||
|
||||
else if( !HasJerrySaidTheLetsGoToTraconaQuote() )
|
||||
{
|
||||
JerryMiloTalk( MILO_QUOTE__HEADED_TO_TRACONA_QUOTE );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//shoud satisfy condition above
|
||||
Assert( 0 );
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN DoesPlayerHaveMoreThen6MercsAndJerryHasntComplained()
|
||||
{
|
||||
UINT8 ubNumMercsOnTeam = NumberOfMercsOnPlayerTeam();
|
||||
|
||||
//if the player has over 6 mercs, and jerry hasnt complained about that yet
|
||||
if( ubNumMercsOnTeam > 6 && !HasJerryMiloSaidQuoteBefore( MILO_QUOTE__PLAYER_HAS_MORE_THEN_6_MERCS ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
BOOLEAN DoesPlayerHaveMoreThen6MercsAndJerryHasntComplained2ndTime()
|
||||
{
|
||||
UINT8 ubNumMercsOnTeam = NumberOfMercsOnPlayerTeam();
|
||||
|
||||
//if the player has over 6 mercs and jerry HAS NOT complained the 2nd time
|
||||
if( ubNumMercsOnTeam > 6 && !HasJerryMiloSaidQuoteBefore( MILO_QUOTE__PLAYER_HAS_MORE_THEN_6_MERCS_2ND_TIME ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
BOOLEAN DoesPlayerHaveMoreThen6MercsAndJerryHasComplained2ndTime()
|
||||
{
|
||||
UINT8 ubNumMercsOnTeam = NumberOfMercsOnPlayerTeam();
|
||||
|
||||
//if the player has over 6 mercs and jerry HAS complained the 2nd time
|
||||
if( ubNumMercsOnTeam > 6 && HasJerryMiloSaidQuoteBefore( MILO_QUOTE__PLAYER_HAS_MORE_THEN_6_MERCS_2ND_TIME ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
BOOLEAN DoesPlayerHaveLessThen6MercsAndJerryHasNotDoubleCheckedYet()
|
||||
{
|
||||
UINT8 ubNumMercsOnTeam = NumberOfMercsOnPlayerTeam();
|
||||
|
||||
//if the player has less then 6 mercs, and hasnt double checked yet
|
||||
if( ubNumMercsOnTeam < 6 && !HasJerryMiloSaidQuoteBefore( MILO_QUOTE__PLAYER_HAS_LESS_THEN_6_MERCS ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
BOOLEAN DoesPlayerHaveExactly6MercsAndNotSaidQuoteBefore()
|
||||
{
|
||||
UINT8 ubNumMercsOnTeam = NumberOfMercsOnPlayerTeam();
|
||||
|
||||
//if the player has exactly 6 mercs OR the player has less then 6 AND has double checked
|
||||
if( ubNumMercsOnTeam == 6 && !HasJerryMiloSaidQuoteBefore( MILO_QUOTE__ALREADY_HAS_6_MERCS ) && !HasJerryMiloSaidQuoteBefore( MILO_QUOTE__PLAYER_HAS_LESS_THEN_6_MERCS ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN DoesPlayerHaveLessThen6MercsAndJerryHasDoubleChecked()
|
||||
{
|
||||
UINT8 ubNumMercsOnTeam = NumberOfMercsOnPlayerTeam();
|
||||
|
||||
//if the player has exactly 6 mercs OR the player has less then 6 AND has double checked
|
||||
if( ubNumMercsOnTeam < 6 && HasJerryMiloSaidQuoteBefore( MILO_QUOTE__PLAYER_HAS_LESS_THEN_6_MERCS ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN DoesPlayerHaveNoMercsHiredAndJerryHasntSaidQuoteYet()
|
||||
{
|
||||
UINT8 ubNumMercsOnTeam = NumberOfMercsOnPlayerTeam();
|
||||
|
||||
//if the player has less then 6 mercs, and hasnt double checked yet
|
||||
//if( ubNumMercsOnTeam == 0 && !HasJerryMiloSaidQuoteBefore( MILO_QUOTE__PLAYER_HAS_NO_MERCS ) )
|
||||
if( ubNumMercsOnTeam == 0 )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
BOOLEAN DidPlayerInitiallyHaveLessThen6MercsAndNowHaveExactly6AndHasntSaidFullLoadQuote()
|
||||
{
|
||||
UINT8 ubNumMercsOnTeam = NumberOfMercsOnPlayerTeam();
|
||||
|
||||
//If we have been to the sector, make sure we dont say it
|
||||
|
||||
//if( SectorInfo[ SEC_H7].uiFlags & SF_HAS_ENTERED_TACTICAL )
|
||||
if( SectorInfo[ (UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY ) ].uiFlags & SF_HAS_ENTERED_TACTICAL )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
//if the player has 6 mercs, and has said the regular opening line ( not the line with 6 mercs )
|
||||
if( ubNumMercsOnTeam == 6 &&
|
||||
HasJerryMiloSaidQuoteBefore( MILO_QUOTE__OPENING_GREETING_PART_2 ) &&
|
||||
!HasJerryMiloSaidQuoteBefore( MILO_QUOTE__ALREADY_HAS_6_MERCS ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
|
||||
void InitJerryQuotes()
|
||||
{
|
||||
//Clear out the quote flags
|
||||
gJa25SaveStruct.uiJerryMiloQuotesFlags = 0;
|
||||
}
|
||||
|
||||
BOOLEAN HasJerryAlreadySaidTheMapScreenIntroSequence()
|
||||
{
|
||||
// return TRUE; //AA
|
||||
if( HasJerryMiloSaidQuoteBefore( MILO_QUOTE__HEADED_TO_TRACONA_QUOTE ) || gGameUBOptions.InGameHeliCrash == FALSE )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,62 @@
|
||||
#ifndef _MAPSCREEN_QUOTES__H_
|
||||
#define _MAPSCREEN_QUOTES__H_
|
||||
|
||||
|
||||
//Enums for the quotes Jerry Milo can say
|
||||
enum
|
||||
{
|
||||
MILO_QUOTE__OPENING_GREETING_PART_1,
|
||||
MILO_QUOTE__OPENING_GREETING_PART_2,
|
||||
MILO_QUOTE__FRIENDLY_APPROACH_NOTHING_TO_SAY,
|
||||
MILO_QUOTE__FRIENDLY_APPROACH_NOTHING_TO_SAY_ALT,
|
||||
MILO_QUOTE__REFUSE_TO_ACCEPT_ITEM,
|
||||
MILO_QUOTE__DIRECT_APPROACH_NOTHING_TO_SAY, //5
|
||||
MILO_QUOTE__THREATEN_APPROACH_NOTHING_TO_SAY,
|
||||
MILO_QUOTE__RECRUITMENT_REFUSAL,
|
||||
MILO_QUOTE__WOUNDED,
|
||||
MILO_QUOTE__GET_LOST,
|
||||
MILO_QUOTE__ACCEPT_MONEY, //10
|
||||
MILO_QUOTE__PLAYER_HAS_MORE_THEN_6_MERCS,
|
||||
MILO_QUOTE__PLAYER_HAS_MORE_THEN_6_MERCS_2ND_TIME,
|
||||
MILO_QUOTE__PLAYER_HAS_LESS_THEN_6_MERCS,
|
||||
MILO_QUOTE__CRASH_QUOTE,
|
||||
MILO_QUOTE__FOLLOWS_PC_ANSWER_TO_14_PART_1, //15
|
||||
MILO_QUOTE__FOLLOWS_PC_ANSWER_TO_14_PART_2,
|
||||
MILO_QUOTE__FOLLOWS_PC_ANSWER_TO_14_PART_3,
|
||||
MILO_QUOTE__ALTERNATE_DIRECT_DEFAULT,
|
||||
MILO_QUOTE__FIRST_RESPONSE_TO_THREATENING,
|
||||
MILO_QUOTE__DEFAULT_COWERING_QUOTE, //20
|
||||
MILO_QUOTE__HEADED_TO_TRACONA_QUOTE,
|
||||
MILO_QUOTE__JERRY_HEALED,
|
||||
MILO_QUOTE__JERRY_BECOMES_ENEMY,
|
||||
MILO_QUOTE__ALREADY_HAS_6_MERCS,
|
||||
MILO_QUOTE__PLAYER_HAS_NO_MERCS,
|
||||
|
||||
|
||||
MILO_NO_QUOTE = 0xFFFF,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
void JerryMiloTalk( UINT16 usQuoteNum );
|
||||
|
||||
BOOLEAN HasJerryMiloSaidQuoteBefore( UINT32 uiQuoteID );
|
||||
|
||||
void JerryMiloSaidQuote( UINT32 uiQuoteID );
|
||||
|
||||
BOOLEAN WillJerryMiloAllowThePlayerToCompressTimeAtBeginingOfGame();
|
||||
|
||||
void HaveJerrySayWhyPlayerCantTimeCompressAtBeginningOfGame();
|
||||
|
||||
BOOLEAN DoesPlayerHaveNoMercsHiredAndJerryHasntSaidQuoteYet();
|
||||
|
||||
void HandleJerryMiloQuotes( BOOLEAN fReset );
|
||||
|
||||
void JerryMiloDelayedTalk( UINT16 usQuoteNum, UINT32 uiDelay );
|
||||
|
||||
void InitJerryQuotes();
|
||||
|
||||
BOOLEAN DidPlayerInitiallyHaveLessThen6MercsAndNowHaveExactly6AndHasntSaidFullLoadQuote();
|
||||
|
||||
#endif
|
||||
@@ -44,6 +44,10 @@
|
||||
#include "GameSettings.h"
|
||||
#include "connect.h"
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "ub_config.h"
|
||||
#endif
|
||||
|
||||
void CalculateMedicalDepositRefund( SOLDIERTYPE *pSoldier );
|
||||
void NotifyPlayerOfMercDepartureAndPromptEquipmentPlacement( SOLDIERTYPE *pSoldier, BOOLEAN fAddRehireButton );
|
||||
void MercDepartEquipmentBoxCallBack( UINT8 bExitValue );
|
||||
@@ -1036,7 +1040,16 @@ void CalculateMedicalDepositRefund( SOLDIERTYPE *pSoldier )
|
||||
AddTransactionToPlayersBook(FULL_MEDICAL_REFUND, pSoldier->ubProfile, GetWorldTotalMin(), pSoldier->usMedicalDeposit );
|
||||
|
||||
//add an email
|
||||
AddEmailWithSpecialData( AIM_MEDICAL_DEPOSIT_REFUND, AIM_MEDICAL_DEPOSIT_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile );
|
||||
#ifdef JA2UB
|
||||
//no UB
|
||||
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
||||
{
|
||||
if ( gGameUBOptions.fDeadMerc == TRUE )
|
||||
AddEmailWithSpecialData( 27, AIM_MEDICAL_DEPOSIT_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile, TYPE_EMAIL_DEAD_MERC_AIM_SITE_EMAIL_JA2_EDT, TYPE_E_AIM_L2 );
|
||||
}
|
||||
#else
|
||||
AddEmailWithSpecialData( AIM_MEDICAL_DEPOSIT_REFUND, AIM_MEDICAL_DEPOSIT_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE );
|
||||
#endif
|
||||
}
|
||||
//else if the merc is a dead, refund NOTHING!!
|
||||
else if( pSoldier->stats.bLife <= 0 )
|
||||
@@ -1045,8 +1058,16 @@ void CalculateMedicalDepositRefund( SOLDIERTYPE *pSoldier )
|
||||
//AddTransactionToPlayersBook( NO_MEDICAL_REFUND, pSoldier->ubProfile, GetWorldTotalMin(), 0 );
|
||||
|
||||
//add an email
|
||||
AddEmailWithSpecialData( AIM_MEDICAL_DEPOSIT_NO_REFUND, AIM_MEDICAL_DEPOSIT_NO_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile );
|
||||
|
||||
#ifdef JA2UB
|
||||
//no UB
|
||||
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
||||
{
|
||||
if ( gGameUBOptions.fDeadMerc == TRUE )
|
||||
AddEmailWithSpecialData( 217, AIM_MEDICAL_DEPOSIT_NO_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile, TYPE_EMAIL_DEAD_MERC_AIM_SITE_EMAIL_JA2_EDT, TYPE_E_AIM_L3 );
|
||||
}
|
||||
#else
|
||||
AddEmailWithSpecialData( AIM_MEDICAL_DEPOSIT_NO_REFUND, AIM_MEDICAL_DEPOSIT_NO_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE );
|
||||
#endif
|
||||
}
|
||||
//else the player is injured, refund a partial amount
|
||||
else
|
||||
@@ -1058,7 +1079,16 @@ void CalculateMedicalDepositRefund( SOLDIERTYPE *pSoldier )
|
||||
AddTransactionToPlayersBook( PARTIAL_MEDICAL_REFUND, pSoldier->ubProfile, GetWorldTotalMin(), iRefundAmount );
|
||||
|
||||
//add an email
|
||||
AddEmailWithSpecialData( AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND, AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), iRefundAmount, pSoldier->ubProfile );
|
||||
#ifdef JA2UB
|
||||
// no UB
|
||||
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
||||
{
|
||||
if ( gGameUBOptions.fDeadMerc == TRUE )
|
||||
AddEmailWithSpecialData( 214, AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), iRefundAmount, pSoldier->ubProfile, TYPE_EMAIL_DEAD_MERC_AIM_SITE_EMAIL_JA2_EDT, TYPE_E_AIM_L4 );
|
||||
}
|
||||
#else
|
||||
AddEmailWithSpecialData( AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND, AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), iRefundAmount, pSoldier->ubProfile, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -180,11 +180,15 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
||||
INT8 bTownId = 0;
|
||||
UINT8 ubSectorID;
|
||||
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25: No meanwhiles
|
||||
#else
|
||||
if( AreInMeanwhile( ) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if( bMapZ == 0 )
|
||||
{
|
||||
@@ -222,7 +226,11 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
||||
//If the player has been to Bobbyr when it was down, and we havent already sent email, send him an email
|
||||
if( LaptopSaveInfo.ubHaveBeenToBobbyRaysAtLeastOnceWhileUnderConstruction == BOBBYR_BEEN_TO_SITE_ONCE && LaptopSaveInfo.ubHaveBeenToBobbyRaysAtLeastOnceWhileUnderConstruction != BOBBYR_ALREADY_SENT_EMAIL )
|
||||
{
|
||||
AddEmail( BOBBYR_NOW_OPEN, BOBBYR_NOW_OPEN_LENGTH, BOBBY_R, GetWorldTotalMin(), -1, -1);
|
||||
#ifdef JA2UB
|
||||
// no UB
|
||||
#else
|
||||
AddEmail( BOBBYR_NOW_OPEN, BOBBYR_NOW_OPEN_LENGTH, BOBBY_R, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
#endif
|
||||
LaptopSaveInfo.ubHaveBeenToBobbyRaysAtLeastOnceWhileUnderConstruction = BOBBYR_ALREADY_SENT_EMAIL;
|
||||
}
|
||||
}
|
||||
@@ -258,8 +266,12 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
||||
if( !bMapZ && ubSectorID != SEC_J9 && ubSectorID != SEC_K4 )
|
||||
{
|
||||
HandleMoraleEvent( NULL, MORALE_TOWN_LIBERATED, sMapX, sMapY, bMapZ );
|
||||
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_TOWN_SECTOR, sMapX, sMapY, bMapZ );
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25: no loyalty
|
||||
#else
|
||||
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_TOWN_SECTOR, sMapX, sMapY, bMapZ );
|
||||
#endif
|
||||
// liberation by definition requires that the place was enemy controlled in the first place
|
||||
CheckIfEntireTownHasBeenLiberated( bTownId, sMapX, sMapY );
|
||||
}
|
||||
@@ -272,7 +284,11 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
||||
if ( GetTotalLeftInMine( GetMineIndexForSector( sMapX, sMapY ) ) > 0)
|
||||
{
|
||||
HandleMoraleEvent( NULL, MORALE_MINE_LIBERATED, sMapX, sMapY, bMapZ );
|
||||
#ifdef JA2UB
|
||||
// Ja25: no loyalty
|
||||
#else
|
||||
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_MINE, sMapX, sMapY, bMapZ );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,13 +298,20 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
||||
if ( 1 /*!GetSectorFlagStatus( sMapX, sMapY, bMapZ, SF_SECTOR_HAS_BEEN_LIBERATED_ONCE ) */)
|
||||
{
|
||||
// SAM site liberated for first time, schedule meanwhile
|
||||
#ifdef JA2UB
|
||||
//JA25 No meanwhiles
|
||||
#else
|
||||
HandleMeanWhileEventPostingForSAMLiberation( GetSAMIdFromSector( sMapX, sMapY, bMapZ ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
HandleMoraleEvent( NULL, MORALE_SAM_SITE_LIBERATED, sMapX, sMapY, bMapZ );
|
||||
#ifdef JA2UB
|
||||
// Ja25: no loyalty
|
||||
#else
|
||||
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_SAM, sMapX, sMapY, bMapZ );
|
||||
UpdateAirspaceControl( );
|
||||
|
||||
#endif
|
||||
// if Skyrider has been delivered to chopper, and already mentioned Drassen SAM site, but not used this quote yet
|
||||
if ( IsHelicopterPilotAvailable( ) && ( guiHelicopterSkyriderTalkState >= 1 ) && ( !gfSkyriderSaidCongratsOnTakingSAM ) )
|
||||
{
|
||||
@@ -319,21 +342,35 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
||||
// SetSectorFlag( sMapX, sMapY, bMapZ, SF_SECTOR_HAS_BEEN_LIBERATED_ONCE );
|
||||
if ( bMapZ == 0 && ( ( sMapY == MAP_ROW_M && (sMapX >= 2 && sMapX <= 6) ) || sMapY == MAP_ROW_N && sMapX == 6) )
|
||||
{
|
||||
HandleOutskirtsOfMedunaMeanwhileScene( );
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 No meanwhiles
|
||||
#else
|
||||
HandleOutskirtsOfMedunaMeanwhileScene();
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 No strategic ai
|
||||
#else
|
||||
if( fContested )
|
||||
{
|
||||
StrategicHandleQueenLosingControlOfSector( (UINT8)sMapX, (UINT8)sMapY, (UINT8)bMapZ );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef JA2UB
|
||||
//Ja25 No strategic ai
|
||||
#else
|
||||
|
||||
if( sMapX == 3 && sMapY == 16 && bMapZ == 1 )
|
||||
{ //Basement sector (P3_b1)
|
||||
gfUseAlternateQueenPosition = TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// also set fact the player knows they own it
|
||||
|
||||
@@ -49,6 +49,10 @@
|
||||
#include "message.h"
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "ub_config.h"
|
||||
#endif
|
||||
|
||||
extern void InitializeTacticalStatusAtBattleStart();
|
||||
extern BOOLEAN gfDelayAutoResolveStart;
|
||||
extern BOOLEAN gfTransitionMapscreenToAutoResolve;
|
||||
@@ -861,6 +865,10 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
||||
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
|
||||
#ifdef JA2UB
|
||||
if ( gGameUBOptions.AutoResolve == FALSE )
|
||||
DisableButton( iPBButton[0] );
|
||||
#endif
|
||||
DoTransitionFromMapscreenToPreBattleInterface();
|
||||
}
|
||||
|
||||
|
||||
+151
-3
@@ -52,6 +52,17 @@
|
||||
#include "connect.h"
|
||||
#include "Reinforcement.h"
|
||||
#include "MilitiaSquads.h"
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "Explosion Control.h"
|
||||
#include "Ja25_Tactical.h"
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
#include "MapScreen Quotes.h"
|
||||
#include "email.h"
|
||||
#include "interface Dialogue.h"
|
||||
#include "Arms Dealer Init.h"
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
|
||||
//The sector information required for the strategic AI. Contains the number of enemy troops,
|
||||
@@ -75,6 +86,13 @@ extern BOOLEAN gfOverrideSector;
|
||||
|
||||
INT32 gsInterrogationGridNo[3] = { 7756, 7757, 7758 };
|
||||
|
||||
#ifdef JA2UB
|
||||
INT32 gsGridNoForMapEdgePointInfo=-1;
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
void HandleBloodCatDeaths( SECTORINFO *pSector );
|
||||
#endif
|
||||
|
||||
extern void Ensure_RepairedGarrisonGroup( GARRISON_GROUP **ppGarrison, INT32 *pGarraySize );
|
||||
|
||||
@@ -883,6 +901,37 @@ void ProcessQueenCmdImplicationsOfDeath( SOLDIERTYPE *pSoldier )
|
||||
|
||||
switch( pSoldier->ubProfile )
|
||||
{
|
||||
#ifdef JA2UB
|
||||
case 75://MORRIS:
|
||||
|
||||
if( !pSoldier->bSectorZ )
|
||||
{
|
||||
pSector = &SectorInfo[ SECTOR( pSoldier->sSectorX, pSoldier->sSectorY ) ];
|
||||
if( pSector->ubNumElites )
|
||||
{
|
||||
pSector->ubNumElites--;
|
||||
}
|
||||
if( pSector->ubElitesInBattle )
|
||||
{
|
||||
pSector->ubElitesInBattle--;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UNDERGROUND_SECTORINFO *pUnderground;
|
||||
pUnderground = FindUnderGroundSector( (UINT8)pSoldier->sSectorX, (UINT8)pSoldier->sSectorY, (UINT8)pSoldier->bSectorZ );
|
||||
Assert( pUnderground );
|
||||
if( pUnderground->ubNumElites )
|
||||
{
|
||||
pUnderground->ubNumElites--;
|
||||
}
|
||||
if( pUnderground->ubElitesInBattle )
|
||||
{
|
||||
pUnderground->ubElitesInBattle--;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case MIKE:
|
||||
case IGGY:
|
||||
if( pSoldier->ubProfile == IGGY && !gubFact[ FACT_IGGY_AVAILABLE_TO_ARMY ] )
|
||||
@@ -1154,6 +1203,11 @@ void ProcessQueenCmdImplicationsOfDeath( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
pSector->bBloodCats--;
|
||||
}
|
||||
#ifdef JA2UB
|
||||
//JA25 UB
|
||||
//handle anything important when bloodcats die
|
||||
HandleBloodCatDeaths( pSector );
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1303,6 +1357,10 @@ void AddPossiblePendingEnemiesToBattle()
|
||||
if(!(gWorldSectorX > 0 && gWorldSectorY > 0 && gbWorldSectorZ == 0))//dnl ch57 161009
|
||||
return;
|
||||
|
||||
#ifdef JA2UB
|
||||
BOOLEAN fMagicallyAppeared=FALSE;
|
||||
#endif
|
||||
|
||||
UINT8 ubSlots, ubNumAvailable;
|
||||
UINT8 ubNumElites, ubNumTroops, ubNumAdmins;
|
||||
UINT8 ubNumGroupsInSector;
|
||||
@@ -1410,6 +1468,14 @@ void AddPossiblePendingEnemiesToBattle()
|
||||
ubStrategicInsertionCode = INSERTION_CODE_SOUTH;
|
||||
else if( NumEnemiesInSector( gWorldSectorX, gWorldSectorY - 1 ) )
|
||||
ubStrategicInsertionCode = INSERTION_CODE_NORTH;
|
||||
#ifdef JA2UB
|
||||
else if( gsGridNoForMapEdgePointInfo != -1 )
|
||||
{
|
||||
//Ja25: it doesnt matter the entry point at this point, it will become GRIDNO at a later point
|
||||
ubStrategicInsertionCode = INSERTION_CODE_NORTH;
|
||||
fMagicallyAppeared = FALSE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if( ubStrategicInsertionCode == 255 )
|
||||
@@ -1609,6 +1675,11 @@ void AddEnemiesToBattle( GROUP *pGroup, UINT8 ubStrategicInsertionCode, UINT8 ub
|
||||
UINT8 ubCurrSlot;
|
||||
UINT8 ubTotalSoldiers;
|
||||
UINT8 bDesiredDirection=0;
|
||||
|
||||
#ifdef JA2UB
|
||||
UINT8 ubCnt;
|
||||
#endif
|
||||
|
||||
switch( ubStrategicInsertionCode )
|
||||
{
|
||||
case INSERTION_CODE_NORTH: bDesiredDirection = SOUTHEAST; break;
|
||||
@@ -1651,8 +1722,40 @@ void AddEnemiesToBattle( GROUP *pGroup, UINT8 ubStrategicInsertionCode, UINT8 ub
|
||||
}
|
||||
|
||||
ubTotalSoldiers = ubNumAdmins + ubNumTroops + ubNumElites;
|
||||
|
||||
#ifdef JA2UB
|
||||
if( gsGridNoForMapEdgePointInfo != -1 )
|
||||
{
|
||||
ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
if( ubStrategicInsertionCode == INSERTION_CODE_GRIDNO )
|
||||
{
|
||||
if( gsGridNoForMapEdgePointInfo == -1 )
|
||||
{
|
||||
Assert( 0 );
|
||||
gsGridNoForMapEdgePointInfo=0;
|
||||
}
|
||||
|
||||
ChooseMapEdgepoints( &MapEdgepointInfo, ubStrategicInsertionCode, (UINT8)(ubNumAdmins+ubNumElites+ubNumTroops) );
|
||||
for( ubCnt=0; ubCnt<32;ubCnt++)
|
||||
{
|
||||
MapEdgepointInfo.sGridNo[ ubCnt ] = gsGridNoForMapEdgePointInfo;
|
||||
}
|
||||
|
||||
MapEdgepointInfo.ubNumPoints = 32;
|
||||
MapEdgepointInfo.ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
||||
}
|
||||
else
|
||||
{
|
||||
ChooseMapEdgepoints( &MapEdgepointInfo, ubStrategicInsertionCode, (UINT8)(ubNumAdmins+ubNumElites+ubNumTroops) );
|
||||
}
|
||||
#else
|
||||
ChooseMapEdgepoints( &MapEdgepointInfo, ubStrategicInsertionCode, (UINT8)(ubNumAdmins+ubNumElites+ubNumTroops) );
|
||||
#endif
|
||||
|
||||
|
||||
ubCurrSlot = 0;
|
||||
while( ubTotalSoldiers )
|
||||
{
|
||||
@@ -1731,6 +1834,10 @@ void AddEnemiesToBattle( GROUP *pGroup, UINT8 ubStrategicInsertionCode, UINT8 ub
|
||||
pSoldier->bActionPoints = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
gsGridNoForMapEdgePointInfo = -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1875,7 +1982,10 @@ void BeginCaptureSquence( )
|
||||
|
||||
void EndCaptureSequence( )
|
||||
{
|
||||
|
||||
#ifdef JA2UB
|
||||
// no UB
|
||||
#else
|
||||
|
||||
// Set flag...
|
||||
if( !( gStrategicStatus.uiFlags & STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE ) || !(gStrategicStatus.uiFlags & STRATEGIC_PLAYER_CAPTURED_FOR_ESCAPE) )
|
||||
{
|
||||
@@ -1917,7 +2027,7 @@ void EndCaptureSequence( )
|
||||
gStrategicStatus.uiFlags |= STRATEGIC_PLAYER_CAPTURED_FOR_ESCAPE;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
|
||||
@@ -2272,3 +2382,41 @@ BOOLEAN CheckPendingEnemies()
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
void HandleBloodCatDeaths( SECTORINFO *pSector )
|
||||
{
|
||||
//if the current sector is the first part of the town
|
||||
if( gWorldSectorX == 10 && gWorldSectorY == 9 && gbWorldSectorZ == 0 )
|
||||
{
|
||||
//if ALL the bloodcats are killed
|
||||
if( pSector->bBloodCats == 0 )
|
||||
{
|
||||
UINT8 bId1=-1;
|
||||
UINT8 bId2=-1;
|
||||
UINT8 bNum=0;
|
||||
|
||||
SetFactTrue( FACT_PLAYER_KILLED_ALL_BETTYS_BLOODCATS );
|
||||
|
||||
//Instantly have betties missing items show up
|
||||
//DailyCheckOnItemQuantities( TRUE );
|
||||
|
||||
// Now have a merc say the killed bloodcat quote
|
||||
bNum = Get3RandomQualifiedMercs( &bId1, &bId2, NULL );
|
||||
|
||||
//if there are some qualified mercs
|
||||
if( bNum != 0 )
|
||||
{
|
||||
//must make sure TEX doesnt say the quote
|
||||
if( bId1 != NOBODY && Menptr[ bId1 ].ubProfile != 64 )
|
||||
{
|
||||
TacticalCharacterDialogue( &Menptr[ bId1 ], QUOTE_RENEW_REFUSAL_DUE_TO_LACK_OF_FUNDS );
|
||||
}
|
||||
else if( bId2 != NOBODY && Menptr[ bId2 ].ubProfile != 64 )
|
||||
{
|
||||
TacticalCharacterDialogue( &Menptr[ bId2 ], QUOTE_RENEW_REFUSAL_DUE_TO_LACK_OF_FUNDS );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -56,6 +56,10 @@ BOOLEAN OnlyHostileCivsInSector();
|
||||
|
||||
extern INT32 gsInterrogationGridNo[3];
|
||||
|
||||
#ifdef JA2UB
|
||||
extern INT32 gsGridNoForMapEdgePointInfo;
|
||||
#endif
|
||||
|
||||
BOOLEAN CheckPendingEnemies();
|
||||
|
||||
#endif
|
||||
+126
-9
@@ -36,6 +36,15 @@
|
||||
#include "BobbyRMailOrder.h"
|
||||
#include "connect.h"
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "email.h"
|
||||
#include "Strategic Merc Handler.h"
|
||||
#include "laptop.h"
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
#include "ub_config.h"
|
||||
#endif
|
||||
|
||||
#include "LuaInitNPCs.h"
|
||||
|
||||
#define TESTQUESTS
|
||||
|
||||
@@ -655,14 +664,23 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Quests");
|
||||
|
||||
BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
|
||||
{
|
||||
|
||||
|
||||
// LuaCheckFact ( usFact, ubProfileID, 0 );
|
||||
|
||||
//#if 0
|
||||
INT8 bTown = -1;
|
||||
|
||||
|
||||
switch( usFact )
|
||||
{
|
||||
#ifdef JA2UB
|
||||
//Ja25 No dimitri
|
||||
#else
|
||||
case FACT_DIMITRI_DEAD:
|
||||
gubFact[ usFact ] = (gMercProfiles[ DIMITRI ].bMercStatus == MERC_IS_DEAD );
|
||||
break;
|
||||
#endif
|
||||
case FACT_CURRENT_SECTOR_IS_SAFE:
|
||||
gubFact[FACT_CURRENT_SECTOR_IS_SAFE] = !( ( (gTacticalStatus.fEnemyInSector && NPCHeardShot( ubProfileID ) ) || gTacticalStatus.uiFlags & INCOMBAT ) );
|
||||
break;
|
||||
@@ -705,6 +723,9 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
|
||||
case FACT_NPC_WOUNDED_BY_PLAYER:
|
||||
gubFact[FACT_NPC_WOUNDED_BY_PLAYER] = CheckNPCWounded( ubProfileID, TRUE );
|
||||
break;
|
||||
#ifdef JA2UB
|
||||
// no ja25 UB
|
||||
#else
|
||||
case FACT_IRA_NOT_PRESENT:
|
||||
gubFact[FACT_IRA_NOT_PRESENT] = !CheckNPCWithin( ubProfileID, IRA, 10 );
|
||||
break;
|
||||
@@ -721,6 +742,7 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
|
||||
gubFact[FACT_IRA_UNHIRED_AND_ALIVE] = FALSE;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case FACT_NPC_BLEEDING:
|
||||
gubFact[FACT_NPC_BLEEDING] = CheckNPCBleeding( ubProfileID );
|
||||
break;
|
||||
@@ -734,7 +756,9 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
|
||||
gubFact[FACT_NPC_BLEEDING_BUT_OKAY] = FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25: NO Carmen
|
||||
#else
|
||||
case FACT_PLAYER_HAS_HEAD_AND_CARMEN_IN_SAN_MONA:
|
||||
gubFact[usFact] = (CheckNPCSector( CARMEN, 5, MAP_ROW_C, 0 ) && CheckPlayerHasHead() );
|
||||
break;
|
||||
@@ -746,7 +770,7 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
|
||||
case FACT_PLAYER_HAS_HEAD_AND_CARMEN_IN_DRASSEN:
|
||||
gubFact[usFact] = (CheckNPCSector( CARMEN, 13, MAP_ROW_C, 0 ) && CheckPlayerHasHead() );
|
||||
break;
|
||||
|
||||
#endif
|
||||
case FACT_NPC_OWED_MONEY:
|
||||
gubFact[FACT_NPC_OWED_MONEY] = (gMercProfiles[ubProfileID].iBalance < 0);
|
||||
break;
|
||||
@@ -783,7 +807,7 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
|
||||
break;
|
||||
/*
|
||||
case FACT_SKYRIDER_CLOSE_TO_CHOPPER:
|
||||
SetUpHelicopterForPlayer( 13, MAP_ROW_B , SKYRIDER );
|
||||
SetUpHelicopterForPlayer( 13, MAP_ROW_B, gNewVehicle[ HELICOPTER ].NewPilot, HELICOPTER );
|
||||
break;
|
||||
*/
|
||||
case FACT_SPIKE_AT_DOOR:
|
||||
@@ -870,9 +894,13 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
|
||||
case FACT_SHANK_NOT_IN_SECTOR:
|
||||
gubFact[usFact] = ( FindSoldierByProfileID( SHANK, FALSE ) == NULL );
|
||||
break;
|
||||
#ifdef JA2UB
|
||||
//Ja25 No queen
|
||||
#else
|
||||
case FACT_QUEEN_DEAD:
|
||||
gubFact[usFact] = (gMercProfiles[ QUEEN ].bMercStatus == MERC_IS_DEAD);
|
||||
break;
|
||||
#endif
|
||||
case FACT_MINE_EMPTY:
|
||||
gubFact[usFact] = IsHisMineEmpty( ubProfileID );
|
||||
break;
|
||||
@@ -1011,21 +1039,33 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
|
||||
break;
|
||||
|
||||
case FACT_PLAYER_OWNS_2_TOWNS_INCLUDING_OMERTA:
|
||||
#ifdef JA2UB
|
||||
//UB
|
||||
#else
|
||||
gubFact[usFact] = ( ( GetNumberOfWholeTownsUnderControl() == gGameExternalOptions.ubEarlyRebelsRecruitment[1] || gGameExternalOptions.ubEarlyRebelsRecruitment[0] == 1
|
||||
|| ( gubQuest[QUEST_FOOD_ROUTE] == QUESTDONE && gGameExternalOptions.ubEarlyRebelsRecruitment[0] == 4 ) ) && IsTownUnderCompleteControlByPlayer( OMERTA ) );
|
||||
#endif
|
||||
break;
|
||||
|
||||
case FACT_PLAYER_OWNS_3_TOWNS_INCLUDING_OMERTA:
|
||||
#ifdef JA2UB
|
||||
//UB
|
||||
#else
|
||||
gubFact[usFact] = ( ( GetNumberOfWholeTownsUnderControl() == gGameExternalOptions.ubEarlyRebelsRecruitment[2] || gGameExternalOptions.ubEarlyRebelsRecruitment[0] == 1
|
||||
|| ( gubQuest[QUEST_FOOD_ROUTE] == QUESTDONE && gGameExternalOptions.ubEarlyRebelsRecruitment[0] == 4 ) ) && IsTownUnderCompleteControlByPlayer( OMERTA ) );
|
||||
#endif
|
||||
break;
|
||||
|
||||
case FACT_PLAYER_OWNS_4_TOWNS_INCLUDING_OMERTA:
|
||||
#ifdef JA2UB
|
||||
//UB
|
||||
#else
|
||||
gubFact[usFact] = ( ( GetNumberOfWholeTownsUnderControl() >= gGameExternalOptions.ubEarlyRebelsRecruitment[3] || gGameExternalOptions.ubEarlyRebelsRecruitment[0] == 1
|
||||
|| ( gubQuest[QUEST_FOOD_ROUTE] == QUESTDONE && gGameExternalOptions.ubEarlyRebelsRecruitment[0] == 4 ) ) && IsTownUnderCompleteControlByPlayer( OMERTA ) );
|
||||
// silversurfer: this is the highest requirement and therefore we will automatically enable recruitment of Miguel
|
||||
if ( gubFact[usFact] )
|
||||
SetFactTrue(40); // Miguel will now be willing to join and so will the other RPC
|
||||
#endif
|
||||
break;
|
||||
|
||||
case FACT_PLAYER_FOUGHT_THREE_TIMES_TODAY:
|
||||
@@ -1132,11 +1172,13 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
|
||||
case FACT_WALDO_ALIVE:
|
||||
gubFact[usFact] = gMercProfiles[ WALDO ].bMercStatus != MERC_IS_DEAD;
|
||||
break;
|
||||
|
||||
#ifdef JA2UB
|
||||
//UB
|
||||
#else
|
||||
case FACT_PERKO_ALIVE:
|
||||
gubFact[usFact] = gMercProfiles[ PERKO ].bMercStatus != MERC_IS_DEAD;
|
||||
break;
|
||||
|
||||
#endif
|
||||
case FACT_TONY_ALIVE:
|
||||
gubFact[usFact] = gMercProfiles[ TONY ].bMercStatus != MERC_IS_DEAD;
|
||||
break;
|
||||
@@ -1262,6 +1304,8 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
//#endif
|
||||
return( gubFact[usFact] );
|
||||
}
|
||||
|
||||
@@ -1346,9 +1390,13 @@ void InternalEndQuest( UINT8 ubQuest, INT16 sSectorX, INT16 sSectorY, BOOLEAN fU
|
||||
else
|
||||
GiveQuestRewardPoint( sSectorX, sSectorY, 9, NO_PROFILE );
|
||||
break;
|
||||
#ifdef JA2UB
|
||||
//off
|
||||
#else
|
||||
case QUEST_KILL_DEIDRANNA :
|
||||
GiveQuestRewardPoint( sSectorX, sSectorY, 25, NO_PROFILE );
|
||||
break;
|
||||
#endif
|
||||
default :
|
||||
GiveQuestRewardPoint( sSectorX, sSectorY, 4, NO_PROFILE );
|
||||
break;
|
||||
@@ -1376,6 +1424,58 @@ void InternalEndQuest( UINT8 ubQuest, INT16 sSectorX, INT16 sSectorY, BOOLEAN fU
|
||||
gMercProfiles[ MADAME ].bNPCData = 0;
|
||||
gMercProfiles[ MADAME ].bNPCData2 = 0;
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
//if the quest is the FIX LAPTOP quest
|
||||
if( ubQuest == QUEST_FIX_LAPTOP && gGameUBOptions.LaptopQuestEnabled == TRUE )
|
||||
{
|
||||
//Set the fact that AIM and MERC should start selling
|
||||
gJa25SaveStruct.fHaveAimandMercOffferItems = TRUE;
|
||||
|
||||
//Remeber that we should send email in the next sector
|
||||
gJa25SaveStruct.fSendEmail_10_NextSector = TRUE;
|
||||
|
||||
AddEmail( EMAIL_PILOTMISSING, EMAIL_PILOTMISSING_LENGTH, MAIL_ENRICO, GetWorldTotalMin() ,-1,-1, TYPE_EMAIL_EMAIL_EDT);
|
||||
AddEmail( EMAIL_MAKECONTACT, EMAIL_MAKECONTACT_LENGTH, MAIL_ENRICO, GetWorldTotalMin() ,-1,-1, TYPE_EMAIL_EMAIL_EDT);
|
||||
|
||||
//Merc and Aim emails
|
||||
AddEmail( EMAIL_AIM_PROMOTION_1, EMAIL_AIM_PROMOTION_1_LENGTH, AIM_SITE, GetWorldTotalMin(),-1 ,-1, TYPE_EMAIL_EMAIL_EDT);
|
||||
AddEmail( EMAIL_MERC_PROMOTION_1, EMAIL_MERC_PROMOTION_1_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(),-1,-1, TYPE_EMAIL_EMAIL_EDT);
|
||||
AddEmail( EMAIL_AIM_PROMOTION_2, EMAIL_AIM_PROMOTION_2_LENGTH, AIM_SITE, GetWorldTotalMin(),-1 ,-1, TYPE_EMAIL_EMAIL_EDT);
|
||||
|
||||
//Manuel
|
||||
{
|
||||
SOLDIERTYPE *pSoldier=NULL;
|
||||
|
||||
pSoldier = FindSoldierByProfileID( 60 , TRUE ); //MANUEL
|
||||
|
||||
if( pSoldier != NULL )
|
||||
{
|
||||
//Add the Manuel email
|
||||
AddEmail( EMAIL_MANUEL, EMAIL_MANUEL_LENGTH, MAIL_ENRICO, GetWorldTotalMin() ,-1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
}
|
||||
}
|
||||
|
||||
//Miguel
|
||||
{
|
||||
//if miguel was dead, when importing the save
|
||||
if( gubFact[ FACT_PLAYER_IMPORTED_SAVE_MIGUEL_DEAD ] == FALSE )
|
||||
{
|
||||
//Add the miguel email
|
||||
AddEmail( EMAIL_MIGUELHELLO, EMAIL_MIGUELHELLO_LENGTH, MAIL_MIGUEL, GetWorldTotalMin(),-1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
}
|
||||
}
|
||||
|
||||
//If any aim mercs were asked to send emails when the get back from duty elsewhere
|
||||
HandleAddingAnyAimAwayEmailsWhenLaptopGoesOnline();
|
||||
|
||||
//Should we send the IMP reminder email when we go back online
|
||||
ShouldImpReminderEmailBeSentWhenLaptopBackOnline();
|
||||
|
||||
//Force which ever of these emails that needed to be sent, to be sent
|
||||
HandleEmailBeingSentWhenEnteringSector( 0, 0, 0, TRUE );
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
void InitQuestEngine()
|
||||
@@ -1411,6 +1511,21 @@ void CheckForQuests( UINT32 uiDay )
|
||||
ScreenMsg( MSG_FONT_RED, MSG_DEBUG, L"Checking For Quests, Day %d", uiDay );
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
// -------------------------------------------------------------------------------
|
||||
// QUEST 23 : Detroy missles
|
||||
// -------------------------------------------------------------------------------
|
||||
// The game always starts with destrouy missles quest, so turn it on if it hasn't
|
||||
// already started
|
||||
if( gubQuest[ QUEST_DESTROY_MISSLES ] == QUESTNOTSTARTED )
|
||||
{
|
||||
StartQuest( QUEST_DESTROY_MISSLES, -1, -1 );
|
||||
#ifdef TESTQUESTS
|
||||
ScreenMsg( MSG_FONT_RED, MSG_DEBUG, L"Started DESTORY MISSLES quest");
|
||||
#endif
|
||||
}
|
||||
//Ja25: No deliver letter quest, dont start it
|
||||
#else
|
||||
// -------------------------------------------------------------------------------
|
||||
// QUEST 0 : DELIVER LETTER
|
||||
// -------------------------------------------------------------------------------
|
||||
@@ -1425,7 +1540,7 @@ void CheckForQuests( UINT32 uiDay )
|
||||
ScreenMsg( MSG_FONT_RED, MSG_DEBUG, L"Started DELIVER LETTER quest");
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
// This quest gets turned OFF through conversation with Miguel - when user hands
|
||||
// Miguel the letter
|
||||
}
|
||||
@@ -1454,13 +1569,15 @@ BOOLEAN SaveQuestInfoToSavedGameFile( HWFILE hFile )
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN LoadQuestInfoFromSavedGameFile( HWFILE hFile )
|
||||
BOOLEAN LoadQuestInfoFromSavedGameFile( HWFILE hFile, UINT8 MaxQuest )
|
||||
{
|
||||
UINT32 uiNumBytesRead;
|
||||
|
||||
//Save all the states if the Quests
|
||||
FileRead( hFile, gubQuest, MAX_QUESTS, &uiNumBytesRead );
|
||||
if( uiNumBytesRead != MAX_QUESTS )
|
||||
//FileRead( hFile, gubQuest, MAX_QUESTS, &uiNumBytesRead );
|
||||
//if( uiNumBytesRead != MAX_QUESTS )
|
||||
FileRead( hFile, gubQuest, MaxQuest, &uiNumBytesRead );
|
||||
if( uiNumBytesRead != MaxQuest )
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
+39
-2
@@ -9,7 +9,8 @@
|
||||
#define QUESTINPROGRESS 1
|
||||
#define QUESTDONE 2
|
||||
|
||||
#define MAX_QUESTS 30
|
||||
#define MAX_QUESTS 255
|
||||
#define MAX_OLD_QUESTS 30
|
||||
#define MAX_FACTS 65536
|
||||
#define NUM_FACTS 500 //If you increase this number, add entries to the fact text list in QuestText.c
|
||||
|
||||
@@ -67,7 +68,15 @@ enum Quests
|
||||
QUEST_FREE_CHILDREN, // 20
|
||||
QUEST_LEATHER_SHOP_DREAM,
|
||||
|
||||
#ifdef JA2UB
|
||||
QUEST_DESTROY_MISSLES = 23,
|
||||
QUEST_FIX_LAPTOP,
|
||||
QUEST_GET_RID_BLOODCATS_AT_BETTYS,
|
||||
QUEST_FIND_ANTIQUE_MUSKET_FOR_RAUL,
|
||||
#else
|
||||
QUEST_KILL_DEIDRANNA = 25
|
||||
|
||||
#endif
|
||||
} ;
|
||||
/*
|
||||
// The first quest is mandatory. Player must find Miguel and deliver letter to him. The tough
|
||||
@@ -518,6 +527,34 @@ enum Facts
|
||||
FACT_PLAYER_KILLED_BOXERS = 368,
|
||||
// HEADROCK HAM 4: Seen Mobile Militia screen after having at least one mobile unit?
|
||||
FACT_MOBILE_RESTRICTIONS_VIEWED = 369,
|
||||
#ifdef JA2UB
|
||||
//Ja25 UB
|
||||
FACT_IMPORTED_SAVE_AND_MARY_WAS_DEAD = 400,
|
||||
FACT_JOHN_KULBA_OFFERED_TO_BE_RECRUITED,// 401,
|
||||
FACT_TEX_IS_IN_GAME_AND_ALIVE_IN_STORE,// 402,
|
||||
FACT_PLAYER_PAID_BETTY_MORE_THEN_X_FOR_ITEM = 403,
|
||||
FACT_PLAYER_BOUGHT_A_TEX_VIDEO_FROM_BETTY,// 404,
|
||||
FACT_RAULS_INVENTORY_CHANGED_SINCE_LAST_VISIT,// 405
|
||||
FACT_PLAYER_THREATENED_RAUL_COUPLE_TIMES,// 406
|
||||
FACT_PLAYER_BOUGHT_SOMETHING_FROM_RAUL,// 407
|
||||
// FACT_SKYRIDER_IN_C16,// 408
|
||||
// FACT_SKYRIDER_IN_C16,// 409
|
||||
// FACT_SKYRIDER_IN_C16,// 410
|
||||
// FACT_SKYRIDER_IN_C16,// 411
|
||||
FACT_PLAYER_BOUGHT_BARRET_FROM_RAUL = 412,
|
||||
FACT_MERC_SAY_QUOTE_WHEN_TALK_MENU_CLOSES,// 413
|
||||
FACT_PLAYER_IMPORTED_SAVE_MIGUEL_DEAD,// 414
|
||||
FACT_PLAYER_IMPORTED_SAVE_FATIMA_OR_PACOS_DEAD,// 415
|
||||
FACT_PLAYER_IMPORTED_SAVE_CARLOS_DEAD,// 416
|
||||
FACT_PLAYER_IMPORTED_SAVE_IRA_DEAD,// 417
|
||||
FACT_PLAYER_IMPORTED_SAVE_DIMITRI_DEAD,// 418
|
||||
FACT_PLAYER_IMPORTED_SAVE,// 419
|
||||
FACT_PLAYER_KILLED_ALL_BETTYS_BLOODCATS,// 420
|
||||
FACT_BIGGENS_IS_ON_TEAM,// 421
|
||||
FACT_FAN_STOPPPED,// 422
|
||||
FACT_BIGGENS_ON_TEAM_AND_FAN_STOPPED,// 423
|
||||
FACT_PLAYER_KNOWS_ABOUT_FAN_STOPPING,// 424
|
||||
#endif
|
||||
} ;
|
||||
//** END FACTS *************************
|
||||
|
||||
@@ -562,7 +599,7 @@ extern void CheckForQuests( UINT32 uiDay );
|
||||
|
||||
void InitQuestEngine();
|
||||
|
||||
BOOLEAN LoadQuestInfoFromSavedGameFile( HWFILE hFile );
|
||||
BOOLEAN LoadQuestInfoFromSavedGameFile( HWFILE hFile, UINT8 MaxQuest );
|
||||
BOOLEAN SaveQuestInfoToSavedGameFile( HWFILE hFile );
|
||||
|
||||
// added by SANDRO
|
||||
|
||||
@@ -1167,7 +1167,7 @@ void PostNextSchedule( SOLDIERTYPE *pSoldier )
|
||||
usBestTime = NUM_MIN_IN_DAY - (usTime - pSchedule->usTime[ i ]);
|
||||
iBestIndex = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// WANNE: Removed the assertion and added the check instead
|
||||
//Assert( iBestIndex >= 0 );
|
||||
|
||||
@@ -419,6 +419,9 @@ void BobbyRayPurchaseEventCallback( UINT8 ubOrderID )
|
||||
|
||||
void HandleDelayedItemsArrival( UINT32 uiReason )
|
||||
{
|
||||
|
||||
// LuaHandleDelayedItemsArrival( uiReason, 0);
|
||||
|
||||
// This function moves all the items that Pablos has stolen
|
||||
// (or items that were delayed) to the arrival location for new shipments,
|
||||
INT32 sStartGridNo;
|
||||
@@ -426,6 +429,10 @@ void HandleDelayedItemsArrival( UINT32 uiReason )
|
||||
BOOLEAN fOk;
|
||||
WORLDITEM * pTemp = 0;
|
||||
UINT8 ubLoop;
|
||||
|
||||
|
||||
|
||||
//#if 0
|
||||
if (uiReason == NPC_SYSTEM_EVENT_ACTION_PARAM_BONUS + NPC_ACTION_RETURN_STOLEN_SHIPMENT_ITEMS )
|
||||
{
|
||||
if ( gMercProfiles[ PABLO ].bMercStatus == MERC_IS_DEAD )
|
||||
@@ -523,19 +530,27 @@ void HandleDelayedItemsArrival( UINT32 uiReason )
|
||||
if (pTemp) {
|
||||
delete [] pTemp;
|
||||
}
|
||||
|
||||
//#endif
|
||||
|
||||
}
|
||||
|
||||
void AddSecondAirportAttendant( void )
|
||||
{
|
||||
|
||||
//LetLuaHandleEarlyMorningEvents(2);
|
||||
//#if 0
|
||||
// add the second airport attendant to the Drassen airport...
|
||||
gMercProfiles[99].sSectorX = BOBBYR_SHIPPING_DEST_SECTOR_X;
|
||||
gMercProfiles[99].sSectorY = BOBBYR_SHIPPING_DEST_SECTOR_Y;
|
||||
gMercProfiles[99].bSectorZ = BOBBYR_SHIPPING_DEST_SECTOR_Z;
|
||||
//#endif
|
||||
}
|
||||
|
||||
void SetPabloToUnbribed( void )
|
||||
{
|
||||
// LetLuaHandleEarlyMorningEvents(3);
|
||||
//#if 0
|
||||
if (guiPabloExtraDaysBribed > 0)
|
||||
{
|
||||
// set new event for later on, because the player gave Pablo more money!
|
||||
@@ -546,10 +561,13 @@ void SetPabloToUnbribed( void )
|
||||
{
|
||||
SetFactFalse( FACT_PABLOS_BRIBED );
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
||||
void HandlePossiblyDamagedPackage( void )
|
||||
{
|
||||
// LetLuaHandleEarlyMorningEvents(1);
|
||||
//#if 0
|
||||
if (Random( 100 ) < 70)
|
||||
{
|
||||
SetFactTrue( FACT_PACKAGE_DAMAGED );
|
||||
@@ -562,10 +580,14 @@ void HandlePossiblyDamagedPackage( void )
|
||||
}
|
||||
// whatever happened, the shipment is no longer delayed
|
||||
SetFactFalse( FACT_SHIPMENT_DELAYED_24_HOURS );
|
||||
//#endif
|
||||
}
|
||||
|
||||
void CheckForKingpinsMoneyMissing( BOOLEAN fFirstCheck )
|
||||
{
|
||||
|
||||
// LuaCheckForKingpinsMoneyMissing ( fFirstCheck , 0 );
|
||||
//#if 0
|
||||
UINT32 uiLoop;
|
||||
UINT32 uiTotalCash = 0;
|
||||
BOOLEAN fKingpinWillDiscover = FALSE, fKingpinDiscovers = FALSE;
|
||||
@@ -644,11 +666,14 @@ void CheckForKingpinsMoneyMissing( BOOLEAN fFirstCheck )
|
||||
// he sends email to the player
|
||||
AddFutureDayStrategicEvent( EVENT_SET_BY_NPC_SYSTEM, Random( 120 ), FACT_KINGPIN_KNOWS_MONEY_GONE, 2 );
|
||||
}
|
||||
|
||||
//#endif
|
||||
}
|
||||
|
||||
void HandleNPCSystemEvent( UINT32 uiEvent )
|
||||
{
|
||||
|
||||
// LetLuaHandleNPCSystemEvent( uiEvent, 0 );
|
||||
//#if 0
|
||||
if (uiEvent < NPC_SYSTEM_EVENT_ACTION_PARAM_BONUS)
|
||||
{
|
||||
switch( uiEvent )
|
||||
@@ -687,7 +712,12 @@ void HandleNPCSystemEvent( UINT32 uiEvent )
|
||||
{
|
||||
// KP knows money is gone, hasn't told player, if this event is called then the 2
|
||||
// days are up... send email
|
||||
AddEmail( KING_PIN_LETTER, KING_PIN_LETTER_LENGTH, KING_PIN, GetWorldTotalMin(), -1, -1 );
|
||||
|
||||
#ifdef JA2UB
|
||||
// no UB
|
||||
#else
|
||||
AddEmail( KING_PIN_LETTER, KING_PIN_LETTER_LENGTH, KING_PIN, GetWorldTotalMin(), -1, -1 , TYPE_EMAIL_EMAIL_EDT );
|
||||
#endif
|
||||
StartQuest( QUEST_KINGPIN_MONEY, 5, MAP_ROW_D );
|
||||
// add event to send terrorists two days from now
|
||||
AddFutureDayStrategicEvent( EVENT_SET_BY_NPC_SYSTEM, Random( 120 ), FACT_KINGPIN_KNOWS_MONEY_GONE, 2 );
|
||||
@@ -786,7 +816,11 @@ void HandleNPCSystemEvent( UINT32 uiEvent )
|
||||
break;
|
||||
|
||||
case NPC_ACTION_SEND_ENRICO_MIGUEL_EMAIL:
|
||||
AddEmail( ENRICO_MIGUEL, ENRICO_MIGUEL_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1 );
|
||||
#ifdef JA2UB
|
||||
// no UB
|
||||
#else
|
||||
AddEmail( ENRICO_MIGUEL, ENRICO_MIGUEL_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1 , TYPE_EMAIL_EMAIL_EDT);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case NPC_ACTION_TIMER_FOR_VEHICLE:
|
||||
@@ -801,6 +835,8 @@ void HandleNPCSystemEvent( UINT32 uiEvent )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//#endif
|
||||
}
|
||||
|
||||
void HandleEarlyMorningEvents( void )
|
||||
|
||||
@@ -48,6 +48,9 @@
|
||||
#include "Town Militia.h"
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "ub_config.h"
|
||||
#endif
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
@@ -464,12 +467,36 @@ void MercDailyUpdate()
|
||||
|
||||
//remove the Flag, so if the merc goes on another assignment, the player can leave an email.
|
||||
pProfile->ubMiscFlags3 &= ~PROFILE_MISC_FLAG3_PLAYER_LEFT_MSG_FOR_MERC_AT_AIM;
|
||||
#ifdef JA2UB
|
||||
|
||||
// Read from Email.edt
|
||||
//if the Laptop is NOT broken
|
||||
if( gubQuest[ QUEST_FIX_LAPTOP ] != QUESTINPROGRESS && gGameUBOptions.LaptopQuestEnabled == TRUE )
|
||||
{
|
||||
#endif
|
||||
// Read from EmailMercAvailable.xml
|
||||
UINT8 pMerc = 0;
|
||||
UINT8 iMerc = 0;
|
||||
UINT8 oMerc = 0;
|
||||
|
||||
if ( ReadXMLEmail == TRUE )
|
||||
{
|
||||
oMerc = cnt;
|
||||
iMerc = oMerc * 1;
|
||||
|
||||
if ( oMerc != 0 )
|
||||
pMerc = oMerc + 1;
|
||||
else
|
||||
pMerc = 0;
|
||||
if ( gProfilesAIM[cnt].ProfilId == cnt )
|
||||
AddEmailTypeXML( pMerc, iMerc, iMerc, GetWorldTotalMin(), -1 , TYPE_EMAIL_AIM_AVAILABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Read from Email.edt and sender (nickname) from MercProfiles.xml
|
||||
if (cnt < 170)
|
||||
{
|
||||
// TO DO: send E-mail to player telling him the merc has returned from an assignment
|
||||
AddEmail( ( UINT8 )( iOffset + ( cnt * AIM_REPLY_LENGTH_BARRY ) ), AIM_REPLY_LENGTH_BARRY, ( UINT8 )( 6 + cnt ), GetWorldTotalMin(), -1, -1 );
|
||||
AddEmail( ( UINT8 )( iOffset + ( cnt * AIM_REPLY_LENGTH_BARRY ) ), AIM_REPLY_LENGTH_BARRY, (UINT8) cnt, GetWorldTotalMin(), -1, -1 , TYPE_EMAIL_EMAIL_EDT_NAME_MERC);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -477,25 +504,29 @@ void MercDailyUpdate()
|
||||
if (cnt < 178)
|
||||
{
|
||||
UINT16 iMsgLength = cnt;
|
||||
UINT8 sender = cnt - 119; // SenderNameList.xml
|
||||
//UINT8 sender = cnt - 119; // SenderNameList.xml
|
||||
|
||||
// Fake Barry Unger mail, but with the msgLength of the WF merc ID -> Correct in PreProcessEmail()
|
||||
AddEmailWFMercAvailable( ( UINT8 )( iOffset + 0 * AIM_REPLY_LENGTH_BARRY ), iMsgLength, sender, GetWorldTotalMin(), -1 );
|
||||
AddEmailWFMercAvailable( ( UINT8 )( iOffset + 0 * AIM_REPLY_LENGTH_BARRY ), iMsgLength, cnt, GetWorldTotalMin(), -1 , TYPE_EMAIL_EMAIL_EDT_NAME_MERC);
|
||||
}
|
||||
// Generic mail
|
||||
else
|
||||
{
|
||||
// TODO.RW: Send generic mail
|
||||
UINT16 iMsgLength = cnt;
|
||||
UINT8 sender = cnt - 119; // SenderNameList.xml
|
||||
//UINT8 sender = cnt - 119; // SenderNameList.xml
|
||||
|
||||
// Fake Barry Unger mail, but with the msgLength of the WF merc ID -> Correct in PreProcessEmail()
|
||||
AddEmailWFMercAvailable( ( UINT8 )( iOffset + 0 * AIM_REPLY_LENGTH_BARRY ), iMsgLength, sender, GetWorldTotalMin(), -1 );
|
||||
AddEmailWFMercAvailable( ( UINT8 )( iOffset + 0 * AIM_REPLY_LENGTH_BARRY ), iMsgLength, cnt, GetWorldTotalMin(), -1 , TYPE_EMAIL_EMAIL_EDT_NAME_MERC);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// WANNE: Should we stop time compression. I don't know.
|
||||
//StopTimeCompression();
|
||||
#ifdef JA2UB
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -546,8 +577,11 @@ void MercDailyUpdate()
|
||||
|
||||
// build quit list
|
||||
//BuildMercQuitList( pQuitList );
|
||||
#ifdef JA2UB
|
||||
//no UB
|
||||
#else
|
||||
HandleSlayDailyEvent( );
|
||||
|
||||
#endif
|
||||
// rebuild list for mapscreen
|
||||
ReBuildCharactersList( );
|
||||
// HEADROCK HAM B1: Run a function to redefine Roaming Militia Restrictions.
|
||||
@@ -1042,8 +1076,11 @@ void UpdateBuddyAndHatedCounters( void )
|
||||
pProfile->bHated[2] = pProfile->bLearnToHate;
|
||||
pProfile->bMercOpinion[ubOtherProfileID] = HATED_OPINION;
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
if (pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__MERC || (pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__NPC && ( /* pSoldier->ubProfile == DEVIN || */ pSoldier->ubProfile == SLAY || pSoldier->ubProfile == IGGY || pSoldier->ubProfile == CONRAD ) ) )
|
||||
#else
|
||||
if (pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__MERC || (pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__NPC && (pSoldier->ubProfile == DEVIN || pSoldier->ubProfile == SLAY || pSoldier->ubProfile == IGGY || pSoldier->ubProfile == CONRAD ) ) )
|
||||
#endif
|
||||
{
|
||||
// Leave now! ( handle equipment too )....
|
||||
TacticalCharacterDialogue( pSoldier, QUOTE_MERC_QUIT_LEARN_TO_HATE );
|
||||
@@ -1374,3 +1411,56 @@ void HourlyCamouflageUpdate( void )
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef JA2UB
|
||||
void HandleAddingAnyAimAwayEmailsWhenLaptopGoesOnline()
|
||||
{
|
||||
UINT32 cnt;
|
||||
INT32 iOffset;
|
||||
MERCPROFILESTRUCT *pProfile;
|
||||
|
||||
|
||||
//Loop through all the profiles
|
||||
for( cnt = 0; cnt < NUM_PROFILES; cnt++)
|
||||
{
|
||||
pProfile = &(gMercProfiles[ cnt ]);
|
||||
|
||||
if (pProfile->uiDayBecomesAvailable == 0)
|
||||
{
|
||||
//if the merc CAN become ready
|
||||
if( pProfile->bMercStatus != MERC_FIRED_AS_A_POW )
|
||||
{
|
||||
// if the player has left a message for this merc
|
||||
if ( pProfile->ubMiscFlags3 & PROFILE_MISC_FLAG3_PLAYER_LEFT_MSG_FOR_MERC_AT_AIM )
|
||||
{
|
||||
iOffset = AIM_REPLY_BARRY;
|
||||
|
||||
//remove the Flag, so if the merc goes on another assignment, the player can leave an email.
|
||||
pProfile->ubMiscFlags3 &= ~PROFILE_MISC_FLAG3_PLAYER_LEFT_MSG_FOR_MERC_AT_AIM;
|
||||
|
||||
UINT8 pMerc = 0;
|
||||
UINT8 iMerc = 0;
|
||||
UINT8 oMerc = 0;
|
||||
|
||||
if ( ReadXMLEmail == TRUE )
|
||||
{
|
||||
oMerc = cnt;
|
||||
iMerc = oMerc * 1;
|
||||
|
||||
if ( oMerc != 0 )
|
||||
pMerc = oMerc + 1;
|
||||
else
|
||||
pMerc = 0;
|
||||
if ( gProfilesAIM[cnt].ProfilId == cnt )
|
||||
AddEmailTypeXML( pMerc, iMerc, iMerc, GetWorldTotalMin(), -1 , TYPE_EMAIL_AIM_AVAILABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TO DO: send E-mail to player telling him the merc has returned from an assignment
|
||||
AddEmail( ( UINT8 )( iOffset + ( cnt * AIM_REPLY_LENGTH_BARRY ) ), AIM_REPLY_LENGTH_BARRY, ( UINT8 )( 6 + cnt ), GetWorldTotalMin(),-1 ,-1, TYPE_EMAIL_EMAIL_EDT_NAME_MERC);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -12,4 +12,10 @@ void MercComplainAboutEquipment( UINT8 ubProfileID );
|
||||
BOOLEAN SoldierHasWorseEquipmentThanUsedTo( SOLDIERTYPE *pSoldier );
|
||||
void UpdateBuddyAndHatedCounters( void );
|
||||
void HourlyCamouflageUpdate( void );
|
||||
|
||||
#ifdef JA2UB
|
||||
//ja25 UB
|
||||
void HandleAddingAnyAimAwayEmailsWhenLaptopGoesOnline();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -52,6 +52,14 @@
|
||||
#include "MilitiaSquads.h"
|
||||
#include "Vehicles.h"
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "Ja25Update.h"
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
//#include "Map Screen Interface Map.h"
|
||||
|
||||
//extern JA25_SECTOR_AI *gJa25AiSectorStruct;
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
@@ -1700,7 +1708,11 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe
|
||||
if( fExceptionQueue || fCheckForBattle && gTacticalStatus.fEnemyInSector &&
|
||||
FindMovementGroupInSector( (UINT8)gWorldSectorX, (UINT8)gWorldSectorY, TRUE ) &&
|
||||
(pGroup->ubNextX != gWorldSectorX || pGroup->ubNextY != gWorldSectorY || gbWorldSectorZ > 0 ) ||
|
||||
#ifdef JA2UB
|
||||
//Ja25: NO meanwhiles
|
||||
#else
|
||||
AreInMeanwhile() ||
|
||||
#endif
|
||||
//KM : Aug 11, 1999 -- Patch fix: Added additional checks to prevent a 2nd battle in the case
|
||||
// where the player is involved in a potential battle with bloodcats/civilians
|
||||
fCheckForBattle && HostileCiviliansPresent() ||
|
||||
@@ -1710,12 +1722,16 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe
|
||||
//QUEUE BATTLE!
|
||||
//Delay arrival by a random value ranging from 3-5 minutes, so it doesn't get the player
|
||||
//too suspicious after it happens to him a few times, which, by the way, is a rare occurrence.
|
||||
#ifdef JA2UB
|
||||
/*Ja25: No meanwhiles*/
|
||||
#else
|
||||
if( AreInMeanwhile() )
|
||||
{
|
||||
pGroup->uiArrivalTime ++; //tack on only 1 minute if we are in a meanwhile scene. This effectively
|
||||
//prevents any battle from occurring while inside a meanwhile scene.
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
pGroup->uiArrivalTime += Random(3) + 3;
|
||||
}
|
||||
@@ -1802,13 +1818,27 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe
|
||||
{
|
||||
// check for discovering secret locations
|
||||
INT8 bTownId = GetTownIdForSector( pGroup->ubSectorX, pGroup->ubSectorY );
|
||||
|
||||
|
||||
if ( gfHiddenTown[ bTownId ] == FALSE )
|
||||
{
|
||||
gfHiddenTown[ bTownId ] = TRUE;
|
||||
|
||||
if ( gfIconTown[ bTownId ] == TRUE )
|
||||
gfDrawHiddenTown[ bTownId ] = TRUE;
|
||||
}
|
||||
#ifdef JA2UB
|
||||
//Ja25: No tixa, orta or sam site
|
||||
#else
|
||||
/*
|
||||
if( bTownId == TIXA )
|
||||
SetTixaAsFound();
|
||||
else if( bTownId == ORTA )
|
||||
SetOrtaAsFound();
|
||||
else if( IsThisSectorASAMSector( pGroup->ubSectorX, pGroup->ubSectorY, 0 ) )
|
||||
else
|
||||
*/
|
||||
if( IsThisSectorASAMSector( pGroup->ubSectorX, pGroup->ubSectorY, 0 ) )
|
||||
SetSAMSiteAsFound( GetSAMIdFromSector( pGroup->ubSectorX, pGroup->ubSectorY, 0 ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1982,7 +2012,8 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe
|
||||
if ( GroupAtFinalDestination( pGroup ) && ( pGroup->ubSectorZ == 0 ) && !fNeverLeft )
|
||||
{
|
||||
// HEADROCK HAM 3.6: Messages are no longer yellow by default.
|
||||
ScreenMsg( FONT_MCOLOR_LTGREEN, MSG_INTERFACE, pMessageStrings[ MSG_ARRIVE ], pVehicleStrings[ pVehicleList[ iVehId ].ubVehicleType ], pMapVertIndex[ pGroup->ubSectorY ], pMapHortIndex[ pGroup->ubSectorX ] );
|
||||
// ScreenMsg( FONT_MCOLOR_LTGREEN, MSG_INTERFACE, pMessageStrings[ MSG_ARRIVE ], pVehicleStrings[ pVehicleList[ iVehId ].ubVehicleType ], pMapVertIndex[ pGroup->ubSectorY ], pMapHortIndex[ pGroup->ubSectorX ] );
|
||||
ScreenMsg( FONT_MCOLOR_LTGREEN, MSG_INTERFACE, pMessageStrings[ MSG_ARRIVE ], gNewVehicle[ pVehicleList[ iVehId ].ubVehicleType ].NewVehicleStrings, pMapVertIndex[ pGroup->ubSectorY ], pMapHortIndex[ pGroup->ubSectorX ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2053,6 +2084,41 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
/*
|
||||
//if the enemy group is at its final destination
|
||||
if( !pGroup->fPlayer && GroupAtFinalDestination( pGroup ) )
|
||||
{
|
||||
// Check to see if this is an AI sector
|
||||
INT16 sJa25SaiSectorValue = GetJA25SectorID( pGroup->ubSectorX, pGroup->ubSectorY, pGroup->ubSectorZ );
|
||||
|
||||
if ( sJa25SaiSectorValue != -1 )
|
||||
{
|
||||
// If we were told to attack, reset flag
|
||||
if ( gJa25AiSectorStruct[ sJa25SaiSectorValue ].fEnemyEnrouteToAttack )
|
||||
{
|
||||
gJa25AiSectorStruct[ sJa25SaiSectorValue ].fEnemyEnrouteToAttack = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
//add the enemies to the sector
|
||||
/*
|
||||
SectorInfo[ SECTOR( pGroup->ubSectorX, pGroup->ubSectorY ) ].ubNumAdmins += pGroup->pEnemyGroup->ubNumAdmins;
|
||||
SectorInfo[ SECTOR( pGroup->ubSectorX, pGroup->ubSectorY ) ].ubNumTroops += pGroup->pEnemyGroup->ubNumTroops;
|
||||
SectorInfo[ SECTOR( pGroup->ubSectorX, pGroup->ubSectorY ) ].ubNumElites += pGroup->pEnemyGroup->ubNumElites;
|
||||
if( fBattleGoingToStart )
|
||||
{
|
||||
SectorInfo[ SECTOR( pGroup->ubSectorX, pGroup->ubSectorY ) ].ubAdminsInBattle = pGroup->pEnemyGroup->ubNumAdmins;
|
||||
SectorInfo[ SECTOR( pGroup->ubSectorX, pGroup->ubSectorY ) ].ubTroopsInBattle = pGroup->pEnemyGroup->ubNumTroops;
|
||||
SectorInfo[ SECTOR( pGroup->ubSectorX, pGroup->ubSectorY ) ].ubElitesInBattle = pGroup->pEnemyGroup->ubNumElites;
|
||||
}
|
||||
*/
|
||||
//}
|
||||
|
||||
#endif
|
||||
|
||||
gfWaitingForInput = FALSE;
|
||||
}
|
||||
|
||||
@@ -2063,10 +2129,15 @@ void HandleNonCombatGroupArrival( GROUP *pGroup, BOOLEAN fMainGroup, BOOLEAN fNe
|
||||
{
|
||||
// if any mercs are actually in the group
|
||||
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 No strategic ai
|
||||
#else
|
||||
if( StrategicAILookForAdjacentGroups( pGroup ) )
|
||||
{ //The routine actually just deleted the enemy group (player's don't get deleted), so we are done!
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if( pGroup->fPlayer )
|
||||
{
|
||||
@@ -2679,7 +2750,11 @@ void RemovePGroup( GROUP *pGroup )
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef JA2UB
|
||||
//Ja25 No strategic ai
|
||||
#else
|
||||
RemoveGroupFromStrategicAILists( pGroup->ubGroupID );
|
||||
#endif
|
||||
MemFree( pGroup->pEnemyGroup );
|
||||
}
|
||||
|
||||
@@ -2983,6 +3058,7 @@ INT32 GetSectorMvtTimeForGroup( UINT8 ubSector, UINT8 ubDirection, GROUP *pGroup
|
||||
|
||||
//Determine the group's method(s) of tranportation. If more than one,
|
||||
//we will always use the highest time.
|
||||
// WANNE: If we have an old savegame (from the dev. trunk, where the skyrider can only move on roads), just change the "pGroup->ubTransportationMask" to 16 for the heli to fix it in the savegame
|
||||
fFoot = (UINT8)(pGroup->ubTransportationMask & FOOT);
|
||||
fCar = (UINT8)(pGroup->ubTransportationMask & CAR);
|
||||
fTruck = (UINT8)(pGroup->ubTransportationMask & TRUCK);
|
||||
@@ -4349,7 +4425,12 @@ void ResetMovementForEnemyGroup( GROUP *pGroup )
|
||||
}
|
||||
if( !pGroup->fBetweenSectors || !pGroup->ubNextX || !pGroup->ubNextY )
|
||||
{ //Reset the group's assignment by moving it to the group's original sector as it's pending group.
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 No strategic ai
|
||||
#else
|
||||
RepollSAIGroup( pGroup );
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4751,6 +4832,11 @@ void RandomizePatrolGroupLocation( GROUP *pGroup )
|
||||
//roll the dice to see if this will become an ambush random encounter.
|
||||
BOOLEAN TestForBloodcatAmbush( GROUP *pGroup )
|
||||
{
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25: No BLoodcat ambushes
|
||||
return( FALSE );
|
||||
#else
|
||||
SECTORINFO *pSector;
|
||||
INT32 iHoursElapsed;
|
||||
UINT8 ubSectorID;
|
||||
@@ -4929,6 +5015,7 @@ BOOLEAN TestForBloodcatAmbush( GROUP *pGroup )
|
||||
gubEnemyEncounterCode = NO_ENCOUNTER_CODE;
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void NotifyPlayerOfBloodcatBattle( UINT8 ubSectorX, UINT8 ubSectorY )
|
||||
@@ -5132,7 +5219,13 @@ BOOLEAN HandlePlayerGroupEnteringSectorToCheckForNPCsOfNote( GROUP *pGroup )
|
||||
|
||||
// get the strategic sector value
|
||||
sStrategicSector = sSectorX + MAP_WORLD_X * sSectorY;
|
||||
|
||||
#ifdef JA2UB
|
||||
// ATE: if this is a custom map, return Ja25 UB
|
||||
if ( SectorInfo[ SECTOR( sSectorY, sSectorX ) ].fCustomSector )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
#endif
|
||||
// skip towns/pseudo-towns (anything that shows up on the map as being special)
|
||||
if( StrategicMap[ sStrategicSector ].bNameId != BLANK_SECTOR )
|
||||
{
|
||||
@@ -5397,4 +5490,65 @@ BOOLEAN ScoutIsPresentInSquad( INT16 ubSectorNumX, INT16 ubSectorNumY )
|
||||
}
|
||||
|
||||
return ( fScoutPresent );
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
GROUP* CreateNewEnemyGroupDepartingFromSectorUsingZLevel( UINT32 uiSector, UINT8 ubSectorZ, UINT8 ubNumAdmins, UINT8 ubNumTroops, UINT8 ubNumElites )
|
||||
{
|
||||
GROUP *pNew;
|
||||
AssertMsg( uiSector >= 0 && uiSector <= 255, String( "CreateNewEnemyGroup with out of range value of %d", uiSector ) );
|
||||
pNew = (GROUP*)MemAlloc( sizeof( GROUP ) );
|
||||
AssertMsg( pNew, "MemAlloc failure during CreateNewEnemyGroup." );
|
||||
memset( pNew, 0, sizeof( GROUP ) );
|
||||
pNew->pEnemyGroup = (ENEMYGROUP*)MemAlloc( sizeof( ENEMYGROUP ) );
|
||||
AssertMsg( pNew->pEnemyGroup, "MemAlloc failure during enemy group creation." );
|
||||
memset( pNew->pEnemyGroup, 0, sizeof( ENEMYGROUP ) );
|
||||
pNew->pWaypoints = NULL;
|
||||
pNew->ubSectorX = (UINT8)SECTORX( uiSector );
|
||||
pNew->ubSectorY = (UINT8)SECTORY( uiSector );
|
||||
pNew->ubSectorZ = ubSectorZ;
|
||||
pNew->ubOriginalSector = (UINT8)uiSector;
|
||||
pNew->fPlayer = FALSE;
|
||||
pNew->ubMoveType = CIRCULAR;
|
||||
pNew->ubNextWaypointID = 0;
|
||||
pNew->ubFatigueLevel = 100;
|
||||
pNew->ubRestAtFatigueLevel = 0;
|
||||
pNew->pEnemyGroup->ubNumAdmins = ubNumAdmins;
|
||||
pNew->pEnemyGroup->ubNumTroops = ubNumTroops;
|
||||
pNew->pEnemyGroup->ubNumElites = ubNumElites;
|
||||
pNew->ubGroupSize = (UINT8)(ubNumAdmins + ubNumTroops + ubNumElites);
|
||||
pNew->ubTransportationMask = FOOT;
|
||||
pNew->fVehicle = FALSE;
|
||||
pNew->ubCreatedSectorID = pNew->ubOriginalSector;
|
||||
pNew->ubSectorIDOfLastReassignment = 255;
|
||||
/*
|
||||
#ifdef JA2BETAVERSION
|
||||
{
|
||||
UINT16 str[ 512 ];
|
||||
//if( PlayerMercsInSector( pNew->ubSectorX, pNew->ubSectorY, pNew->ubSectorZ ) || CountAllMilitiaInSector( pNew->ubSectorX, pNew->ubSectorY ) )
|
||||
//{
|
||||
// swprintf( str, L"Attempting to send enemy troops from player occupied location. "
|
||||
// L"Please ALT+TAB out of the game before doing anything else and send 'Strategic Decisions.txt' "
|
||||
// L"and this message. You'll likely need to revert to a previous save. If you can reproduce this "
|
||||
// L"with a save close to this event, that would really help me! -- KM:0" );
|
||||
// DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, NULL );
|
||||
//}
|
||||
if( pNew->ubGroupSize > 25 )
|
||||
{
|
||||
swprintf( str, L"Strategic AI warning: Creating an enemy group containing %d soldiers "
|
||||
L"(%d admins, %d troops, %d elites) in sector %c%d. This message is a temporary test message "
|
||||
L"to evaluate a potential problems with very large enemy groups.",
|
||||
pNew->ubGroupSize, ubNumAdmins, ubNumTroops, ubNumElites,
|
||||
pNew->ubSectorY + 'A' - 1, pNew->ubSectorX );
|
||||
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, NULL );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
if( AddGroupToList( pNew ) )
|
||||
return pNew;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -179,6 +179,9 @@ BOOLEAN SetGroupPatrolParameters( UINT8 ubGroupID, UINT8 ubRestAtFL, UINT8 ubRes
|
||||
//Enemy grouping functions -- private use by the strategic AI.
|
||||
//............................................................
|
||||
GROUP* CreateNewEnemyGroupDepartingFromSector( UINT32 uiSector, UINT8 ubNumAdmins, UINT8 ubNumTroops, UINT8 ubNumElites );
|
||||
#ifdef JA2UB
|
||||
GROUP* CreateNewEnemyGroupDepartingFromSectorUsingZLevel( UINT32 uiSector, UINT8 ubSectorZ, UINT8 ubNumAdmins, UINT8 ubNumTroops, UINT8 ubNumElites );
|
||||
#endif
|
||||
|
||||
//ARRIVALCALLBACK -- None of these functions should be called directly.
|
||||
//...............
|
||||
|
||||
@@ -208,10 +208,13 @@ void HandleEnricoEmail(void)
|
||||
UINT8 ubCurrentProgress = CurrentPlayerProgressPercentage();
|
||||
UINT8 ubHighestProgress = HighestPlayerProgressPercentage();
|
||||
|
||||
#ifdef JA2UB
|
||||
//JA25 UB
|
||||
#else
|
||||
// if creatures have attacked a mine (doesn't care if they're still there or not at the moment)
|
||||
if (HasAnyMineBeenAttackedByMonsters() && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_CREATURES))
|
||||
{
|
||||
AddEmail(ENRICO_CREATURES, ENRICO_CREATURES_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
|
||||
AddEmail(ENRICO_CREATURES, ENRICO_CREATURES_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_CREATURES;
|
||||
return; // avoid any other E-mail at the same time
|
||||
}
|
||||
@@ -219,21 +222,21 @@ void HandleEnricoEmail(void)
|
||||
|
||||
if ((ubCurrentProgress >= SOME_PROGRESS_THRESHOLD) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_SOME_PROGRESS))
|
||||
{
|
||||
AddEmail(ENRICO_PROG_20, ENRICO_PROG_20_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
|
||||
AddEmail(ENRICO_PROG_20, ENRICO_PROG_20_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_SOME_PROGRESS;
|
||||
return; // avoid any setback E-mail at the same time
|
||||
}
|
||||
|
||||
if ((ubCurrentProgress >= ABOUT_HALFWAY_THRESHOLD) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_ABOUT_HALFWAY))
|
||||
{
|
||||
AddEmail(ENRICO_PROG_55, ENRICO_PROG_55_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
|
||||
AddEmail(ENRICO_PROG_55, ENRICO_PROG_55_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_ABOUT_HALFWAY;
|
||||
return; // avoid any setback E-mail at the same time
|
||||
}
|
||||
|
||||
if ((ubCurrentProgress >= NEARLY_DONE_THRESHOLD) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_NEARLY_DONE))
|
||||
{
|
||||
AddEmail(ENRICO_PROG_80, ENRICO_PROG_80_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
|
||||
AddEmail(ENRICO_PROG_80, ENRICO_PROG_80_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_NEARLY_DONE;
|
||||
return; // avoid any setback E-mail at the same time
|
||||
}
|
||||
@@ -243,7 +246,7 @@ void HandleEnricoEmail(void)
|
||||
(((ubHighestProgress - ubCurrentProgress) >= MINOR_SETBACK_THRESHOLD) && (gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_FLAG_SETBACK_OVER))) &&
|
||||
!(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_MAJOR_SETBACK))
|
||||
{
|
||||
AddEmail(ENRICO_SETBACK, ENRICO_SETBACK_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
|
||||
AddEmail(ENRICO_SETBACK, ENRICO_SETBACK_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_MAJOR_SETBACK;
|
||||
}
|
||||
else
|
||||
@@ -251,7 +254,7 @@ void HandleEnricoEmail(void)
|
||||
if (((ubHighestProgress - ubCurrentProgress) >= MINOR_SETBACK_THRESHOLD) &&
|
||||
!(gStrategicStatus.usEnricoEmailFlags & (ENRICO_EMAIL_SENT_MINOR_SETBACK | ENRICO_EMAIL_SENT_MAJOR_SETBACK)))
|
||||
{
|
||||
AddEmail(ENRICO_SETBACK_2, ENRICO_SETBACK_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
|
||||
AddEmail(ENRICO_SETBACK_2, ENRICO_SETBACK_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_MINOR_SETBACK;
|
||||
}
|
||||
else
|
||||
@@ -314,15 +317,15 @@ void HandleEnricoEmail(void)
|
||||
switch( bComplaint )
|
||||
{
|
||||
case 3:
|
||||
AddEmail(LACK_PLAYER_PROGRESS_3, LACK_PLAYER_PROGRESS_3_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
|
||||
AddEmail(LACK_PLAYER_PROGRESS_3, LACK_PLAYER_PROGRESS_3_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_LACK_PROGRESS3;
|
||||
break;
|
||||
case 2:
|
||||
AddEmail(LACK_PLAYER_PROGRESS_2, LACK_PLAYER_PROGRESS_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
|
||||
AddEmail(LACK_PLAYER_PROGRESS_2, LACK_PLAYER_PROGRESS_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_LACK_PROGRESS2;
|
||||
break;
|
||||
default:
|
||||
AddEmail(LACK_PLAYER_PROGRESS_1, LACK_PLAYER_PROGRESS_1_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
|
||||
AddEmail(LACK_PLAYER_PROGRESS_1, LACK_PLAYER_PROGRESS_1_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_LACK_PROGRESS1;
|
||||
break;
|
||||
|
||||
@@ -343,7 +346,7 @@ void HandleEnricoEmail(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
// reset # of new sectors visited 'today'
|
||||
// grant some leeway for the next day, could have started moving
|
||||
// at night...
|
||||
|
||||
@@ -1840,7 +1840,11 @@ void CheckIfEntireTownHasBeenLiberated( INT8 bTownId, INT16 sSectorX, INT16 sSec
|
||||
// set fact is has been lib'ed and set history event
|
||||
AddHistoryToPlayersLog( HISTORY_LIBERATED_TOWN, bTownId, GetWorldTotalMin(), sSectorX, sSectorY );
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25: No meanhwiles
|
||||
#else
|
||||
HandleMeanWhileEventPostingForTownLiberation( bTownId );
|
||||
#endif
|
||||
}
|
||||
|
||||
// even taking over non-trainable "towns" like Orta/Tixa for the first time should count as "player activity"
|
||||
@@ -1869,11 +1873,16 @@ void CheckIfEntireTownHasBeenLost( INT8 bTownId, INT16 sSectorX, INT16 sSectorY
|
||||
// reported here (and they're the only ones you can protect)
|
||||
if ( MilitiaTrainingAllowedInSector( sSectorX, sSectorY, 0 ) && IsTownUnderCompleteControlByEnemy(bTownId) )
|
||||
{
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 No meanwhile
|
||||
#else
|
||||
// the whole town is under enemy control, check if we libed this town before
|
||||
if ( gTownLoyalty[ bTownId ].fLiberatedAlready )
|
||||
{
|
||||
HandleMeanWhileEventPostingForTownLoss( bTownId );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1919,12 +1928,14 @@ void HandleLoyaltyChangeForNPCAction( UINT8 ubNPCProfileId )
|
||||
// NOTE: This affects Chitzena,too, a second time, so first value is discounted for it
|
||||
IncrementTownLoyaltyEverywhere( LOYALTY_BONUS_YANNI_WHEN_CHALICE_RETURNED_GLOBAL );
|
||||
break;
|
||||
|
||||
#ifdef JA2UB
|
||||
// ja25 UB
|
||||
#else
|
||||
case AUNTIE:
|
||||
// Bloodcats killed
|
||||
IncrementTownLoyalty( ALMA, LOYALTY_BONUS_AUNTIE_WHEN_BLOODCATS_KILLED );
|
||||
break;
|
||||
|
||||
#endif
|
||||
case MATT:
|
||||
// Brother Dynamo freed
|
||||
IncrementTownLoyalty( ALMA, LOYALTY_BONUS_MATT_WHEN_DYNAMO_FREED );
|
||||
|
||||
@@ -378,6 +378,10 @@
|
||||
RelativePath=".\Game Init.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Ja25 Strategic Ai.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Luaglobal.h"
|
||||
>
|
||||
@@ -414,6 +418,10 @@
|
||||
RelativePath=".\Map Screen Interface.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\MapScreen Quotes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mapscreen.h"
|
||||
>
|
||||
@@ -576,6 +584,10 @@
|
||||
RelativePath=".\Hourly Update.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Ja25 Strategic Ai.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Luaglobal.cpp"
|
||||
>
|
||||
@@ -612,6 +624,10 @@
|
||||
RelativePath=".\Map Screen Interface.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\MapScreen Quotes.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mapscreen.cpp"
|
||||
>
|
||||
|
||||
@@ -379,6 +379,10 @@
|
||||
RelativePath="Game Init.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Ja25 Strategic Ai.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Luaglobal.h"
|
||||
>
|
||||
@@ -415,6 +419,10 @@
|
||||
RelativePath="Map Screen Interface.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\MapScreen Quotes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="mapscreen.h"
|
||||
>
|
||||
@@ -575,6 +583,10 @@
|
||||
RelativePath="Hourly Update.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Ja25 Strategic Ai.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Luaglobal.cpp"
|
||||
>
|
||||
@@ -611,6 +623,10 @@
|
||||
RelativePath="Map Screen Interface.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\MapScreen Quotes.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="mapscreen.cpp"
|
||||
>
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<ClInclude Include="Game Event Hook.h" />
|
||||
<ClInclude Include="Game Events.h" />
|
||||
<ClInclude Include="Game Init.h" />
|
||||
<ClInclude Include="Ja25 Strategic Ai.h" />
|
||||
<ClInclude Include="Luaglobal.h" />
|
||||
<ClInclude Include="LuaInitNPCs.h" />
|
||||
<ClInclude Include="Map Screen Helicopter.h" />
|
||||
@@ -42,6 +43,7 @@
|
||||
<ClInclude Include="Map Screen Interface Map.h" />
|
||||
<ClInclude Include="Map Screen Interface TownMine Info.h" />
|
||||
<ClInclude Include="Map Screen Interface.h" />
|
||||
<ClInclude Include="MapScreen Quotes.h" />
|
||||
<ClInclude Include="mapscreen.h" />
|
||||
<ClInclude Include="Meanwhile.h" />
|
||||
<ClInclude Include="Merc Contract.h" />
|
||||
@@ -83,6 +85,7 @@
|
||||
<ClCompile Include="Game Events.cpp" />
|
||||
<ClCompile Include="Game Init.cpp" />
|
||||
<ClCompile Include="Hourly Update.cpp" />
|
||||
<ClCompile Include="Ja25 Strategic Ai.cpp" />
|
||||
<ClCompile Include="Luaglobal.cpp" />
|
||||
<ClCompile Include="LuaInitNPCs.cpp" />
|
||||
<ClCompile Include="Map Screen Helicopter.cpp" />
|
||||
@@ -92,6 +95,7 @@
|
||||
<ClCompile Include="Map Screen Interface Map.cpp" />
|
||||
<ClCompile Include="Map Screen Interface TownMine Info.cpp" />
|
||||
<ClCompile Include="Map Screen Interface.cpp" />
|
||||
<ClCompile Include="MapScreen Quotes.cpp" />
|
||||
<ClCompile Include="mapscreen.cpp" />
|
||||
<ClCompile Include="Meanwhile.cpp" />
|
||||
<ClCompile Include="Merc Contract.cpp" />
|
||||
|
||||
@@ -150,6 +150,12 @@
|
||||
<ClInclude Include="Strategic Mines LUA.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Ja25 Strategic Ai.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MapScreen Quotes.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AI Viewer.cpp">
|
||||
@@ -323,5 +329,11 @@
|
||||
<ClCompile Include="Strategic Mines LUA.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Ja25 Strategic Ai.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MapScreen Quotes.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1519,7 +1519,11 @@ void HandleContinueOfTownTraining( void )
|
||||
if( pSoldier->bActive )
|
||||
{
|
||||
fContinueEventPosted = TRUE;
|
||||
#ifdef JA2UB
|
||||
//no UB
|
||||
#else
|
||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_CONTINUE_TRAINING_MILITIA, pSoldier->ubProfile, 0, 0, 0, 0 );
|
||||
#endif
|
||||
|
||||
// now set all of these peoples assignment done too
|
||||
//HandleInterfaceMessageForContinuingTrainingMilitia( pSoldier );
|
||||
|
||||
@@ -55,7 +55,7 @@ BOOLEAN LuaUnderground::InitializeSectorList()
|
||||
{
|
||||
// WANNE: Skip initialization in a multiplayer game, because some variables are not yet set
|
||||
// No problem: Underground sectors are not currently used in a multiplayer game
|
||||
if (!is_networked || gGameOptions.ubDifficultyLevel > 0)
|
||||
if ( !is_networked || gGameOptions.ubDifficultyLevel > 0)
|
||||
{
|
||||
LuaState L = GetLuaState();
|
||||
|
||||
@@ -65,7 +65,7 @@ BOOLEAN LuaUnderground::InitializeSectorList()
|
||||
.TableOpen()
|
||||
.TParam("difficultyLevel", int(gGameOptions.ubDifficultyLevel))
|
||||
.TParam("gameStyle", int(gGameOptions.ubGameStyle))
|
||||
.TableClose();
|
||||
.TableClose();
|
||||
|
||||
SGP_THROW_IFFALSE(initsectorlist_func.Call(1), "call to lua function BuildUndergroundSectorList failed");
|
||||
|
||||
|
||||
+253
-17
@@ -119,8 +119,21 @@
|
||||
#include "connect.h" //hayden
|
||||
#include "fresh_header.h"
|
||||
#include "InterfaceItemImages.h"
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "laptop.h"
|
||||
|
||||
#include "Strategic Movement.h"
|
||||
|
||||
|
||||
//#include "Strategic Movement Costs.h"
|
||||
// DEFINES
|
||||
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
#include "MapScreen Quotes.h"
|
||||
#include "ub_config.h"
|
||||
#include "LuaInitNPCs.h"
|
||||
#endif
|
||||
|
||||
#define MAX_SORT_METHODS 6
|
||||
|
||||
@@ -153,6 +166,10 @@
|
||||
|
||||
#define MINS_TO_FLASH_CONTRACT_TIME (4 * 60)
|
||||
|
||||
#ifdef JA2UB
|
||||
void MakeBadSectorListFromMapsOnHardDrive( BOOLEAN fDisplayMessages ); // ja25 UB
|
||||
#endif
|
||||
|
||||
// CHRISL: Reclassify all coordinates as int variables and declare their values in an initialization function.
|
||||
int TOWN_INFO_X;
|
||||
int TOWN_INFO_Y;
|
||||
@@ -1002,6 +1019,9 @@ extern INT32 GetNumberOfMercsInUpdateList( void );
|
||||
extern INT32 SellItem( OBJECTTYPE& object, BOOLEAN useModifier = TRUE );
|
||||
void DeleteAllItemsInInventoryPool();
|
||||
|
||||
#ifdef JA2UB
|
||||
void HandleWhenPlayerHasNoMercsAndNoLaptop();
|
||||
#endif
|
||||
|
||||
#ifdef JA2TESTVERSION
|
||||
void TestDumpStatChanges( void );
|
||||
@@ -2760,7 +2780,8 @@ void DrawCharacterInfo(INT16 sCharNumber)
|
||||
if( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE )
|
||||
{
|
||||
// vehicle
|
||||
wcscpy(sString, pShortVehicleStrings[ pVehicleList[ pSoldier->bVehicleID ].ubVehicleType ]);
|
||||
// wcscpy(sString, pShortVehicleStrings[ pVehicleList[ pSoldier->bVehicleID ].ubVehicleType ]);
|
||||
wcscpy(sString, gNewVehicle[ pVehicleList[ pSoldier->bVehicleID ].ubVehicleType ].NewShortVehicleStrings);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2776,7 +2797,9 @@ void DrawCharacterInfo(INT16 sCharNumber)
|
||||
if( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE )
|
||||
{
|
||||
// vehicle
|
||||
wcscpy(sString, pVehicleStrings[ pVehicleList[ pSoldier->bVehicleID ].ubVehicleType ]);
|
||||
//wcscpy(sString, pVehicleStrings[ pVehicleList[ pSoldier->bVehicleID ].ubVehicleType ]);
|
||||
wcscpy(sString, gNewVehicle[ pVehicleList[ pSoldier->bVehicleID ].ubVehicleType ].NewVehicleStrings);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2792,7 +2815,8 @@ void DrawCharacterInfo(INT16 sCharNumber)
|
||||
if( pSoldier->bAssignment == VEHICLE )
|
||||
{
|
||||
// show vehicle type
|
||||
wcscpy( sString, pShortVehicleStrings[ pVehicleList[ pSoldier->iVehicleId ].ubVehicleType ] );
|
||||
// wcscpy( sString, pShortVehicleStrings[ pVehicleList[ pSoldier->iVehicleId ].ubVehicleType ] );
|
||||
wcscpy( sString, gNewVehicle[ pVehicleList[ pSoldier->iVehicleId ].ubVehicleType ].NewShortVehicleStrings );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2845,7 +2869,8 @@ void DrawCharacterInfo(INT16 sCharNumber)
|
||||
else if ( pSoldier->bVehicleUnderRepairID != -1 )
|
||||
{
|
||||
// vehicle
|
||||
wcscpy( sString, pShortVehicleStrings[ pVehicleList[ pSoldier->bVehicleUnderRepairID ].ubVehicleType ] );
|
||||
// wcscpy( sString, pShortVehicleStrings[ pVehicleList[ pSoldier->bVehicleUnderRepairID ].ubVehicleType ] );
|
||||
wcscpy( sString, gNewVehicle[ pVehicleList[ pSoldier->bVehicleUnderRepairID ].ubVehicleType ].NewShortVehicleStrings );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4462,7 +4487,8 @@ UINT32 MapScreenHandle(void)
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
// static BOOLEAN fSecondFrame = FALSE;
|
||||
INT32 iCounter = 0;
|
||||
|
||||
INT32 iCounter2 = 0;
|
||||
char fileName[500];
|
||||
|
||||
|
||||
//DO NOT MOVE THIS FUNCTION CALL!!!
|
||||
@@ -4853,6 +4879,59 @@ UINT32 MapScreenHandle(void)
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("INTERFACE\\prison.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiTIXAICON));
|
||||
|
||||
//----------- legion 2
|
||||
for( iCounter2 = 1; iCounter2 < NUM_TOWNS; iCounter2++ )
|
||||
{
|
||||
//if ( gfDrawHiddenTown[iCounter2] == TRUE )
|
||||
//{
|
||||
//VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||
//FilenameForBPP("INTERFACE\\PRISON.sti", VObjectDesc.ImageFile);
|
||||
|
||||
/*
|
||||
if (iResolution == 0)
|
||||
{
|
||||
strcpy(fileName, gHiddenIcon[iCounter2].IconSti);
|
||||
strcat(fileName,".sti");
|
||||
}
|
||||
if (iResolution == 1)
|
||||
{
|
||||
strcpy(fileName, gHiddenIcon[iCounter2].IconSti);
|
||||
strcat(fileName,"_800x600.sti");
|
||||
}
|
||||
if (iResolution == 2)
|
||||
{
|
||||
strcpy(fileName, gHiddenIcon[iCounter2].IconSti);
|
||||
strcat(fileName,"_1024x768.sti");
|
||||
}
|
||||
|
||||
if ( gfIconTown[iCounter2] == TRUE )
|
||||
strcpy(VObjectDesc.ImageFile, fileName);
|
||||
else
|
||||
FilenameForBPP("INTERFACE\\PRISON.sti", VObjectDesc.ImageFile);
|
||||
*/
|
||||
|
||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||
|
||||
if ( gfIconTown[iCounter2] == TRUE )
|
||||
{
|
||||
strcpy(VObjectDesc.ImageFile, gHiddenIcon[iCounter2].IconSti);
|
||||
}
|
||||
else
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\PRISON.sti", VObjectDesc.ImageFile);
|
||||
}
|
||||
|
||||
if (!FileExists(VObjectDesc.ImageFile))
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\PRISON.sti", VObjectDesc.ImageFile);
|
||||
}
|
||||
|
||||
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiIcon2[iCounter2]));
|
||||
//}
|
||||
}
|
||||
//-------
|
||||
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("INTERFACE\\merc_between_sector_icons.sti", VObjectDesc.ImageFile);
|
||||
@@ -4880,6 +4959,7 @@ UINT32 MapScreenHandle(void)
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMapBorderHeliSectors));
|
||||
|
||||
|
||||
|
||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("INTERFACE\\secondary_gun_hidden.sti", VObjectDesc.ImageFile);
|
||||
CHECKF( AddVideoObject( &VObjectDesc, &guiSecItemHiddenVO ) );
|
||||
@@ -4991,6 +5071,18 @@ UINT32 MapScreenHandle(void)
|
||||
{
|
||||
fFirstTimeInMapScreen = FALSE;
|
||||
// fShowMapScreenHelpText = TRUE;
|
||||
#ifdef JA2UB
|
||||
//JA25 UB
|
||||
//Get Jerry Milo to say his opening quote, if he hasnt said it before
|
||||
if( !HasJerryMiloSaidQuoteBefore( MILO_QUOTE__OPENING_GREETING_PART_1 ) )
|
||||
JerryMiloDelayedTalk( MILO_QUOTE__OPENING_GREETING_PART_1, 1100 );
|
||||
}
|
||||
//Should Jerry popup a new quote now
|
||||
else if( DidPlayerInitiallyHaveLessThen6MercsAndNowHaveExactly6AndHasntSaidFullLoadQuote() )
|
||||
{
|
||||
//Get Jerry Milo to say his opening quote
|
||||
JerryMiloDelayedTalk( MILO_QUOTE__ALREADY_HAS_6_MERCS, 500 );
|
||||
#endif
|
||||
}
|
||||
|
||||
fShowMapInventoryPool = FALSE;
|
||||
@@ -5164,7 +5256,16 @@ UINT32 MapScreenHandle(void)
|
||||
return( MAP_SCREEN );
|
||||
}
|
||||
}
|
||||
#ifdef JA2UB
|
||||
//Ja25 UB
|
||||
if ( gfProcessCustomMaps )
|
||||
{
|
||||
MakeBadSectorListFromMapsOnHardDrive( TRUE );
|
||||
LetLuaMakeBadSectorListFromMapsOnHardDrive( 0 );
|
||||
|
||||
gfProcessCustomMaps = FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
// check to see if we need to rebuild the characterlist for map screen
|
||||
HandleRebuildingOfMapScreenCharacterList( );
|
||||
@@ -5334,11 +5435,26 @@ UINT32 MapScreenHandle(void)
|
||||
|
||||
InterruptTimeForMenus( );
|
||||
|
||||
#ifdef JA2UB
|
||||
//JA25 UB
|
||||
//Handle Jerry Milo quotes
|
||||
if ( gGameUBOptions.JerryQuotes == TRUE )
|
||||
HandleJerryMiloQuotes( FALSE );
|
||||
#endif
|
||||
|
||||
// place down background
|
||||
BlitBackgroundToSaveBuffer( );
|
||||
|
||||
if( fLeavingMapScreen == TRUE )
|
||||
{
|
||||
|
||||
#ifdef JA2UB
|
||||
//JA25 UB
|
||||
//specify that we are leaving mapscreen
|
||||
if ( gGameUBOptions.JerryQuotes == TRUE )
|
||||
HandleJerryMiloQuotes( TRUE );
|
||||
#endif
|
||||
|
||||
return( MAP_SCREEN );
|
||||
}
|
||||
|
||||
@@ -5653,8 +5769,11 @@ UINT32 MapScreenHandle(void)
|
||||
RenderKeyRingPopup( FALSE );
|
||||
}
|
||||
|
||||
CheckForMeanwhileOKStart( );
|
||||
|
||||
#ifdef JA2UB
|
||||
/* UB */
|
||||
#else
|
||||
CheckForMeanwhileOKStart( );
|
||||
#endif
|
||||
// save background rects
|
||||
// ATE: DO this BEFORE rendering help text....
|
||||
SaveBackgroundRects( );
|
||||
@@ -5767,6 +5886,15 @@ UINT32 MapScreenHandle(void)
|
||||
HandleExitsFromMapScreen( );
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 ub
|
||||
//Handle the strategic AI
|
||||
JA25_HandleUpdateOfStrategicAi();
|
||||
|
||||
//Should the msg box come up telling the user that they lost?
|
||||
if (gGameUBOptions.InGameHeliCrash == TRUE )
|
||||
HandleWhenPlayerHasNoMercsAndNoLaptop(); //AA
|
||||
#endif
|
||||
|
||||
return( MAP_SCREEN );
|
||||
}
|
||||
@@ -6674,6 +6802,8 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
BOOLEAN fCtrl, fAlt;
|
||||
|
||||
INT16 sMapX, sMapY;
|
||||
|
||||
INT32 iCounter2 = 0;
|
||||
|
||||
fCtrl = _KeyDown( CTRL );
|
||||
fAlt = _KeyDown( ALT );
|
||||
@@ -7344,7 +7474,15 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
CopySectorInventoryToInventoryPoolQ(0);
|
||||
break;
|
||||
}
|
||||
RequestContractMenu();
|
||||
//Ja25 UB
|
||||
//if ( fAlt )
|
||||
//{
|
||||
// MakeBadSectorListFromMapsOnHardDrive( TRUE );
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
RequestContractMenu();
|
||||
//}
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
@@ -7518,7 +7656,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
if( fAlt )
|
||||
{
|
||||
// set up the helicopter over Omerta (if it's not already set up)
|
||||
SetUpHelicopterForPlayer( 9,1 , SKYRIDER );
|
||||
SetUpHelicopterForPlayer( 9,1 , SKYRIDER, HELICOPTER );
|
||||
// raise Drassen loyalty to minimum that will allow Skyrider to fly
|
||||
if ( gTownLoyalty[ DRASSEN ].fStarted && ( gTownLoyalty[ DRASSEN ].ubRating < LOYALTY_LOW_THRESHOLD ) )
|
||||
{
|
||||
@@ -7582,7 +7720,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
break;
|
||||
|
||||
// haydent
|
||||
case 'k':
|
||||
case 'k':
|
||||
if(gGameExternalOptions.fEnableInventoryPoolQ && fShowMapInventoryPool == TRUE)//dnl ch51 081009
|
||||
{
|
||||
CopySectorInventoryToInventoryPoolQs(0);
|
||||
@@ -7612,6 +7750,28 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
}
|
||||
break;
|
||||
case 'm':
|
||||
//JA25 UB
|
||||
// only handle border button keyboard equivalents if the button is visible!
|
||||
/*if ( fAlt )
|
||||
{
|
||||
INT16 sMapX, sMapY;
|
||||
|
||||
// Get sector that is hilighted...
|
||||
if ( GetMouseMapXY(&sMapX, &sMapY) )
|
||||
{
|
||||
AddCustomMap( sMapY, sMapX, TRUE, TRUE );
|
||||
UpdateCustomMapMovementCosts();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !fShowMapInventoryPool )
|
||||
{
|
||||
// toggle show mines flag
|
||||
ToggleShowMinesMode();
|
||||
}
|
||||
}
|
||||
*/
|
||||
// only handle border button keyboard equivalents if the button is visible!
|
||||
if ( !fShowMapInventoryPool )
|
||||
{
|
||||
@@ -7654,6 +7814,12 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
#ifdef JA2TESTVERSION
|
||||
fFoundOrta = !fFoundOrta;
|
||||
fFoundTixa = !fFoundTixa;
|
||||
|
||||
for( iCounter2 = 1; iCounter2 < NUM_TOWNS; iCounter2++ )
|
||||
{
|
||||
gfHiddenTown [ iCounter2 ] = TRUE;
|
||||
}
|
||||
|
||||
fMapPanelDirty = TRUE;
|
||||
#endif
|
||||
}
|
||||
@@ -8082,6 +8248,9 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
|
||||
void EndMapScreen( BOOLEAN fDuringFade )
|
||||
{
|
||||
|
||||
INT32 iCounter2 = 0;
|
||||
|
||||
if ( fInMapMode == FALSE )
|
||||
{
|
||||
// shouldn't be here
|
||||
@@ -8259,6 +8428,14 @@ void EndMapScreen( BOOLEAN fDuringFade )
|
||||
DeleteVideoObjectFromIndex( guiHelicopterIcon );
|
||||
DeleteVideoObjectFromIndex( guiMINEICON );
|
||||
DeleteVideoObjectFromIndex( guiSectorLocatorGraphicID );
|
||||
|
||||
//----------- Legion 2
|
||||
for( iCounter2 = 1; iCounter2 < NUM_TOWNS; iCounter2++ )
|
||||
{
|
||||
//if ( gfDrawHiddenTown[iCounter2] == TRUE )
|
||||
DeleteVideoObjectFromIndex(guiIcon2[iCounter2]);
|
||||
}
|
||||
//-------
|
||||
|
||||
DeleteVideoObjectFromIndex( guiBULLSEYE );
|
||||
|
||||
@@ -12897,6 +13074,8 @@ BOOLEAN AnyMercsLeavingRealSoon()
|
||||
void HandleRemovalOfPreLoadedMapGraphics( void )
|
||||
{
|
||||
|
||||
INT32 iCounter2 = 0;
|
||||
|
||||
if( fPreLoadedMapGraphics == TRUE )
|
||||
{
|
||||
DeleteMapBottomGraphics( );
|
||||
@@ -12938,6 +13117,14 @@ void HandleRemovalOfPreLoadedMapGraphics( void )
|
||||
DeleteVideoObjectFromIndex( guiNewMailIcons );
|
||||
|
||||
DeleteVideoObjectFromIndex( guiBULLSEYE );
|
||||
|
||||
//----------- Legion 2
|
||||
for( iCounter2 = 1; iCounter2 < NUM_TOWNS; iCounter2++ )
|
||||
{
|
||||
//if ( gfDrawHiddenTown[iCounter2] == TRUE )
|
||||
DeleteVideoObjectFromIndex(guiIcon2[iCounter2]);
|
||||
}
|
||||
//-------
|
||||
|
||||
|
||||
// remove the graphic for the militia pop up box
|
||||
@@ -13133,6 +13320,13 @@ void TellPlayerWhyHeCantCompressTime( void )
|
||||
ScreenMsg( FONT_MCOLOR_RED, MSG_BETAVERSION, L"(BETA) If permanent, take screenshot now, send with *previous* save & describe what happened since.");
|
||||
#endif
|
||||
}
|
||||
#ifdef JA2UB
|
||||
else if( DoesPlayerHaveNoMercsHiredAndJerryHasntSaidQuoteYet() )
|
||||
{
|
||||
JerryMiloTalk( MILO_QUOTE__PLAYER_HAS_NO_MERCS );
|
||||
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pMapScreenJustStartedHelpText[ 0 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
|
||||
}
|
||||
#endif
|
||||
else if( gfAtLeastOneMercWasHired == FALSE )
|
||||
{
|
||||
// no mercs hired, ever
|
||||
@@ -13181,6 +13375,15 @@ void TellPlayerWhyHeCantCompressTime( void )
|
||||
{
|
||||
DoMapMessageBox( MSG_BOX_BASIC_STYLE, gzLateLocalizedString[ 55 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
|
||||
}
|
||||
#ifdef JA2UB
|
||||
//JA25 UB
|
||||
else if( !WillJerryMiloAllowThePlayerToCompressTimeAtBeginingOfGame() )
|
||||
{
|
||||
// TODO.RW: JA2UB
|
||||
//Have jerry say why the player cant compress time
|
||||
HaveJerrySayWhyPlayerCantTimeCompressAtBeginningOfGame();
|
||||
}
|
||||
#endif
|
||||
// ARM: THIS TEST SHOULD BE THE LAST ONE, BECAUSE IT ACTUALLY RESULTS IN SOMETHING HAPPENING NOW.
|
||||
// KM: Except if we are in a creature lair and haven't loaded the sector yet (no battle yet)
|
||||
else if( gTacticalStatus.uiFlags & INCOMBAT || gTacticalStatus.fEnemyInSector )
|
||||
@@ -14354,11 +14557,15 @@ BOOLEAN HandleCtrlOrShiftInTeamPanel( INT8 bCharNumber, BOOLEAN fFromRightClickA
|
||||
|
||||
INT32 GetContractExpiryTime( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
#ifdef JA2UB
|
||||
/* JA25 UB */
|
||||
#else
|
||||
if( ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__AIM_MERC ) || ( pSoldier->ubProfile == SLAY ) )
|
||||
{
|
||||
return ( pSoldier->iEndofContractTime );
|
||||
}
|
||||
else
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// never - really high number
|
||||
return ( 999999 );
|
||||
@@ -14947,7 +15154,7 @@ void DestinationPlottingCompleted( void )
|
||||
void HandleMilitiaRedistributionClick( void )
|
||||
{
|
||||
INT8 bTownId;
|
||||
BOOLEAN fTownStillHidden;
|
||||
//BOOLEAN fTownStillHidden;
|
||||
CHAR16 sString[ 128 ];
|
||||
|
||||
|
||||
@@ -14955,9 +15162,12 @@ void HandleMilitiaRedistributionClick( void )
|
||||
if ( iCurrentMapSectorZ == 0 )
|
||||
{
|
||||
bTownId = GetTownIdForSector( sSelMapX, sSelMapY );
|
||||
fTownStillHidden = ( ( bTownId == TIXA ) && !fFoundTixa ) || ( ( bTownId == ORTA ) && !fFoundOrta );
|
||||
|
||||
if( ( bTownId != BLANK_SECTOR ) && !fTownStillHidden )
|
||||
//fTownStillHidden = ( ( bTownId == TIXA ) && !fFoundTixa ) || ( ( bTownId == ORTA ) && !fFoundOrta );
|
||||
|
||||
// fTownStillHidden = ( ( bTownId == TIXA ) && !gfHiddenTown[ TIXA ] ) || ( ( bTownId == ORTA ) && !gfHiddenTown[ ORTA ] );
|
||||
|
||||
// WANNE: if gfHiddenTown[townID] == TRUE, then it is not HIDDEN!!!
|
||||
if( ( bTownId != BLANK_SECTOR ) && gfHiddenTown[ bTownId ] ) //&& !fTownStillHidden )
|
||||
{
|
||||
if ( MilitiaTrainingAllowedInSector( sSelMapX, sSelMapY, ( INT8 )iCurrentMapSectorZ ) )
|
||||
{
|
||||
@@ -15190,7 +15400,8 @@ void GetMapscreenMercAssignmentString( SOLDIERTYPE *pSoldier, CHAR16 sString[] )
|
||||
{
|
||||
if ( pSoldier->bAssignment == VEHICLE )
|
||||
{
|
||||
wcscpy( sString, pShortVehicleStrings[ pVehicleList[ pSoldier->iVehicleId ].ubVehicleType ] );
|
||||
// wcscpy( sString, pShortVehicleStrings[ pVehicleList[ pSoldier->iVehicleId ].ubVehicleType ] );
|
||||
wcscpy( sString, gNewVehicle[ pVehicleList[ pSoldier->iVehicleId ].ubVehicleType ].NewShortVehicleStrings);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -15304,8 +15515,12 @@ void GetMapscreenMercDepartureString( SOLDIERTYPE *pSoldier, CHAR16 sString[], U
|
||||
INT32 iDaysRemaining = 0;
|
||||
INT32 iHoursRemaining = 0;
|
||||
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25: Removed the aim merc check because aim mercs are hired for a 1 time fee
|
||||
if( ( pSoldier->ubProfile != SLAY ) || pSoldier->stats.bLife == 0 )
|
||||
#else
|
||||
if( ( pSoldier->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC && pSoldier->ubProfile != SLAY ) || pSoldier->stats.bLife == 0 )
|
||||
#endif
|
||||
{
|
||||
swprintf( sString, L"%s", gpStrategicString[ STR_PB_NOTAPPLICABLE_ABBREVIATION ] );
|
||||
}
|
||||
@@ -15817,3 +16032,24 @@ INT32 GetTotalContractExpenses ( void )
|
||||
}
|
||||
return (iTotalCost);
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
void HandleWhenPlayerHasNoMercsAndNoLaptop()
|
||||
{
|
||||
const UINT8 ubNumLoopsToDisplay=50;
|
||||
|
||||
if( gJa25SaveStruct.ubDisplayPlayerLostMsgBox == 0 ||
|
||||
gJa25SaveStruct.ubDisplayPlayerLostMsgBox >= ubNumLoopsToDisplay ||
|
||||
guiCurrentScreen == MSG_BOX_SCREEN )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
gJa25SaveStruct.ubDisplayPlayerLostMsgBox += 1;
|
||||
|
||||
if( gJa25SaveStruct.ubDisplayPlayerLostMsgBox == ubNumLoopsToDisplay )
|
||||
{
|
||||
DoMapMessageBox( MSG_BOX_BASIC_STYLE, zNewTacticalMessages[ TCTL_MSG__PLAYER_LOST_SHOULD_RESTART ], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
+1289
-34
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,8 @@
|
||||
#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
|
||||
|
||||
@@ -28,6 +30,13 @@ 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
|
||||
@@ -142,9 +151,13 @@ UINT8 GetMilitiaCountAtLevelAnywhereInTown( UINT8 ubTownValue, UINT8 ubLevelValu
|
||||
|
||||
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 );
|
||||
|
||||
@@ -188,4 +201,13 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user