mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
New Feature: dynamic dialogue is played when dynamic opinions are active. Mercs can comment on each others actions, and this can influence their opinions further. IMP character answers can even be chosen by the player.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7297 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+38
-23
@@ -35,6 +35,7 @@
|
||||
#include "Game Clock.h"
|
||||
#include "Init.h"
|
||||
#include "InterfaceItemImages.h"
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#include "KeyMap.h"
|
||||
@@ -1875,8 +1876,12 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.sMoraleModSexism = iniReader.ReadInteger("Morale Settings","MORALE_MOD_SEXISM", 1, 0, 5);
|
||||
gGameExternalOptions.sMoraleModXenophobicBackGround = iniReader.ReadInteger("Morale Settings","MORALE_MOD_BACKGROUND_XENOPHOBIC", 5, 0, 15);
|
||||
|
||||
gGameExternalOptions.fDynamicOpinions = iniReader.ReadBoolean("Morale Settings","DYNAMIC_OPINIONS", TRUE );
|
||||
gGameExternalOptions.fDynamicWageFactor = iniReader.ReadFloat("Morale Settings","WAGE_ACCEPTANCE_FACTOR", 1.5f, 0.1f, 10.0f );
|
||||
gGameExternalOptions.fDynamicOpinions = iniReader.ReadBoolean("Dynamic Opinion Settings","DYNAMIC_OPINIONS", TRUE );
|
||||
gGameExternalOptions.fDynamicOpinionsShowChange = iniReader.ReadBoolean("Dynamic Opinion Settings", "DYNAMIC_OPINIONS_SHOWCHANGE", TRUE );
|
||||
gGameExternalOptions.fDynamicWageFactor = iniReader.ReadFloat("Dynamic Opinion Settings","WAGE_ACCEPTANCE_FACTOR", 1.5f, 0.1f, 10.0f );
|
||||
|
||||
gGameExternalOptions.fDynamicDialogue = iniReader.ReadBoolean("Dynamic Dialogue Settings", "DYNAMIC_DIALOGUE", TRUE );
|
||||
gGameExternalOptions.usDynamicDialogueTimeOffset = iniReader.ReadInteger("Dynamic Dialogue Settings", "DYNAMIC_DIALOGUE_TIME_OFFSET", 3000, 500, 10000 );
|
||||
|
||||
//################# Laptop Settings ##################
|
||||
|
||||
@@ -3521,6 +3526,8 @@ void LoadHelicopterRepairRefuelSettings()
|
||||
gHelicopterSettings.fHelicopterTownLoyaltyCheck = iniReader.ReadBoolean("Helicopter Other Settings","HELICOPTER_TOWN_LOYALTY_CHECK", TRUE );
|
||||
}
|
||||
|
||||
extern DynamicOpinionEvent gDynamicOpinionEvent[OPINIONEVENT_MAX];
|
||||
|
||||
void LoadMoraleSettings()
|
||||
{
|
||||
CIniReader iniReader(MORALE_SETTINGS_FILE);
|
||||
@@ -3612,27 +3619,35 @@ void LoadMoraleSettings()
|
||||
|
||||
gMoraleSettings.bModifiers[MORALE_MODIFIER_MALICIOUS_HOURLY_DECAY] = iniReader.ReadInteger("Morale Modifiers Settings","MORALE_MODIFIER_MALICIOUS_HOURLY_DECAY", -1, -100, 100);
|
||||
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_FRIENDLYFIRE] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_FRIENDLYFIRE", -10, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_SNITCHSOLDMEOUT] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_SNITCHSOLDMEOUT", -3, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_SNITCHINTERFERENCE] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_FRIENDLYFIRE", -5, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_FRIENDSWITHHATED] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_FRIENDSWITHHATED", -4, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_CONTRACTEXTENSION] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_CONTRACTEXTENSION", -2, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_ORDEREDRETREAT] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_ORDEREDRETREAT", -6, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_CIVKILLER] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_CIVKILLER", -8, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_SLOWSUSDOWN] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_SLOWSUSDOWN", -2, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_NOSHARINGFOOD] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_NOSHARINGFOOD", -1, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_ANNOYINGDISABILITY] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_ANNOYINGDISABILITY", -2, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_ADDICT] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_ADDICT", -6, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_THIEF] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_THIEF", -5, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_WORSTCOMMANDEREVER] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_WORSTCOMMANDEREVER", -7, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_RICHGUY] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_RICHGUY", -1, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_BETTERGEAR] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_BETTERGEAR", -2, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS",-3, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_BANDAGED] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_BANDAGED", 1, 0, 50 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_DRINKBUDDIES_GOOD] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_DRINKBUDDIES_GOOD", 1, 0, 50 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_DRINKBUDDIES_SUPER] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_DRINKBUDDIES_SUPER", 4, 0, 50 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_DRINKBUDDIES_BAD] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_DRINKBUDDIES_BAD", - 1, -50, 0 );
|
||||
gMoraleSettings.bDynamicOpinionModifiers[OPINIONEVENT_DRINKBUDDIES_WORSE] = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_DRINKBUDDIES_WORSE", -4, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_FRIENDLYFIRE].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_FRIENDLYFIRE", -10, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_SNITCHSOLDMEOUT].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_SNITCHSOLDMEOUT", -3, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_SNITCHINTERFERENCE].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_FRIENDLYFIRE", -5, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_FRIENDSWITHHATED].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_FRIENDSWITHHATED", -4, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_CONTRACTEXTENSION].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_CONTRACTEXTENSION", -2, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_ORDEREDRETREAT].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_ORDEREDRETREAT", -6, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_CIVKILLER].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_CIVKILLER", -8, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_SLOWSUSDOWN].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_SLOWSUSDOWN", -2, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_NOSHARINGFOOD].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_NOSHARINGFOOD", -1, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_ANNOYINGDISABILITY].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_ANNOYINGDISABILITY", -2, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_ADDICT].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_ADDICT", -6, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_THIEF].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_THIEF", -5, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_WORSTCOMMANDEREVER].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_WORSTCOMMANDEREVER", -7, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_RICHGUY].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_RICHGUY", -1, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_BETTERGEAR].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_BETTERGEAR", -2, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS", -3, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_BANDAGED].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_BANDAGED", 1, 0, 50 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_DRINKBUDDIES_GOOD].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_DRINKBUDDIES_GOOD", 1, 0, 50 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_DRINKBUDDIES_SUPER].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_DRINKBUDDIES_SUPER", 4, 0, 50 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_DRINKBUDDIES_BAD].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_DRINKBUDDIES_BAD", -1, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_DRINKBUDDIES_WORSE].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_DRINKBUDDIES_WORSE", -4, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_AGAINST_US].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_AGAINST_US", -2, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_FOR_US].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_FOR_US", 2, 0, 50 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_AGAINST_ENEMY].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_AGAINST_ENEMY", 1, 0, 50 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_FOR_ENEMY].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_FOR_ENEMY", -1, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_SOLVECONFLICT_REASON_GOOD].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_SOLVECONFLICT_REASON_GOOD", 2, 0, 50 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_SOLVECONFLICT_REASON_BAD].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_SOLVECONFLICT_REASON_BAD", -2, -50, 0 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_SOLVECONFLICT_AGGRESSIVE_GOOD].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_SOLVECONFLICT_AGGRESSIVE_GOOD", 3, 0, 50 );
|
||||
gDynamicOpinionEvent[OPINIONEVENT_SOLVECONFLICT_AGGRESSIVE_BAD].sOpinionModifier = iniReader.ReadInteger( "Dynamic Opinion Modifiers Settings", "OPINIONEVENT_SOLVECONFLICT_AGGRESSIVE_BAD", -3, -50, 0 );
|
||||
}
|
||||
|
||||
void LoadReputationSettings()
|
||||
|
||||
+6
-30
@@ -1390,8 +1390,13 @@ typedef struct
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
BOOLEAN fDynamicOpinions;
|
||||
BOOLEAN fDynamicOpinionsShowChange;
|
||||
FLOAT fDynamicWageFactor;
|
||||
|
||||
// Flugente: dynamic dialogue
|
||||
BOOLEAN fDynamicDialogue;
|
||||
UINT32 usDynamicDialogueTimeOffset;
|
||||
|
||||
// Flugente: enemy roles
|
||||
BOOLEAN fEnemyRoles;
|
||||
UINT8 usTurnsToUncover;
|
||||
@@ -1407,7 +1412,7 @@ typedef struct
|
||||
FLOAT dEnemyOfficerMoraleModifier;
|
||||
FLOAT dEnemyOfficerSurrenderStrengthBonus;
|
||||
BOOLEAN fEnemyGenerals;
|
||||
UINT16 usEnemyGeneralsNumber;
|
||||
UINT8 usEnemyGeneralsNumber;
|
||||
UINT16 usEnemyGeneralsBodyGuardsNumber;
|
||||
FLOAT fEnemyGeneralStrategicDecisionSpeedBonus;
|
||||
FLOAT fEnemyGeneralStrategicMovementSpeedBonus;
|
||||
@@ -1564,34 +1569,6 @@ typedef struct
|
||||
|
||||
} HELICOPTER_SETTINGS;
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
enum
|
||||
{
|
||||
OPINIONEVENT_FRIENDLYFIRE,
|
||||
OPINIONEVENT_SNITCHSOLDMEOUT,
|
||||
OPINIONEVENT_SNITCHINTERFERENCE,
|
||||
OPINIONEVENT_FRIENDSWITHHATED,
|
||||
OPINIONEVENT_CONTRACTEXTENSION,
|
||||
OPINIONEVENT_ORDEREDRETREAT,
|
||||
OPINIONEVENT_CIVKILLER,
|
||||
OPINIONEVENT_SLOWSUSDOWN,
|
||||
OPINIONEVENT_NOSHARINGFOOD,
|
||||
OPINIONEVENT_ANNOYINGDISABILITY,
|
||||
OPINIONEVENT_ADDICT,
|
||||
OPINIONEVENT_THIEF,
|
||||
OPINIONEVENT_WORSTCOMMANDEREVER,
|
||||
OPINIONEVENT_RICHGUY,
|
||||
OPINIONEVENT_BETTERGEAR,
|
||||
OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS,
|
||||
OPINIONEVENT_BANDAGED,
|
||||
OPINIONEVENT_DRINKBUDDIES_GOOD,
|
||||
OPINIONEVENT_DRINKBUDDIES_SUPER,
|
||||
OPINIONEVENT_DRINKBUDDIES_BAD,
|
||||
OPINIONEVENT_DRINKBUDDIES_WORSE,
|
||||
|
||||
OPINIONEVENT_MAX
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT8 ubDefaultMorale;
|
||||
@@ -1599,7 +1576,6 @@ typedef struct
|
||||
INT8 bValues[64];
|
||||
INT8 bModifiers[32];
|
||||
INT16 sDrugAndAlcoholModifiers[2];
|
||||
INT8 bDynamicOpinionModifiers[OPINIONEVENT_MAX];
|
||||
} MORALE_SETTINGS;
|
||||
|
||||
typedef struct
|
||||
|
||||
+9
-9
@@ -15,9 +15,9 @@
|
||||
#ifdef JA2EDITOR
|
||||
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.7240 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.7297 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.7240 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.7297 (Development Build)" };
|
||||
#endif
|
||||
|
||||
// ------------------------------
|
||||
@@ -27,11 +27,11 @@
|
||||
|
||||
//DEBUG BUILD VERSION
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.7240 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.7297 (Development Build)" };
|
||||
#elif defined (JA113DEMO)
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.7240 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.7297 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.7240 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.7297 (Development Build)" };
|
||||
#endif
|
||||
|
||||
#elif defined CRIPPLED_VERSION
|
||||
@@ -46,16 +46,16 @@
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.7240 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.7297 (Development Build)" };
|
||||
#elif defined (JA113DEMO)
|
||||
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.7240 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.7297 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.7240 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.7297 (Development Build)" };
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
CHAR8 czVersionNumber[16] = { "Build 14.05.29" }; //YY.MM.DD
|
||||
CHAR8 czVersionNumber[16] = { "Build 14.06.27" }; //YY.MM.DD
|
||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||
|
||||
// SAVE_GAME_VERSION is defined in header, change it there
|
||||
|
||||
+2
-1
@@ -21,6 +21,7 @@ extern CHAR16 zTrackingNumber[16];
|
||||
// Keeps track of the saved game version. Increment the saved game version whenever
|
||||
// you will invalidate the saved game file
|
||||
|
||||
#define DYNAMIC_DIALOGUE 157 // Flugente: mercs have dynamic dialogue depending on nely formed opinions, an the player can interact with them
|
||||
#define DYNAMIC_OPINIONS 156 // Flugente: mercs can form opinions on other people depending on their behaviour
|
||||
#define INCREASED_REFUEL_SITES 155 // Flugente: increased the number of helicopter refuel sites
|
||||
#define ENEMY_VIPS 154 // Flugente: enemy generals are placed randomly in the map
|
||||
@@ -75,7 +76,7 @@ extern CHAR16 zTrackingNumber[16];
|
||||
#define AP100_SAVEGAME_DATATYPE_CHANGE 105 // Before this, we didn't have the 100AP structure changes
|
||||
#define NIV_SAVEGAME_DATATYPE_CHANGE 102 // Before this, we used the old structure system
|
||||
|
||||
#define SAVE_GAME_VERSION DYNAMIC_OPINIONS
|
||||
#define SAVE_GAME_VERSION DYNAMIC_DIALOGUE
|
||||
|
||||
//#define RUSSIANGOLD
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
#include "BriefingRoom_Data.h"
|
||||
#include "AimArchives.h"
|
||||
#include "connect.h"
|
||||
#include "DynamicDialogueWidget.h" // added by Flugente for InitMyBoxes()
|
||||
|
||||
extern INT16 APBPConstants[TOTAL_APBP_VALUES] = {0};
|
||||
extern INT16 gubMaxActionPoints[28];//MAXBODYTYPES = 28... JUST GETTING IT TO WORK NOW. GOTTHARD 7/2/08
|
||||
@@ -1530,6 +1531,8 @@ UINT32 InitializeJA2(void)
|
||||
|
||||
InitMercPopupBox( );
|
||||
|
||||
InitMyBoxes();
|
||||
|
||||
// Set global volume
|
||||
MusicSetVolume( gGameSettings.ubMusicVolumeSetting );
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "Laptop.h"
|
||||
#include "LaptopSave.h"
|
||||
#include "email.h"
|
||||
#include "DynamicDialogue.h"
|
||||
|
||||
Campaign_Stats gCampaignStats;
|
||||
Incident_Stats gCurrentIncident; // we might save during an incident, thus we have to store the ongoing incident
|
||||
|
||||
+3
-3
@@ -479,7 +479,7 @@ DropDownBase::SelectDropDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason
|
||||
else if (iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
UINT8 ubSelected = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||
mSelectedEntry = min(ubSelected + mFirstShownEntry, max(0, mEntryVector.size() -1) );
|
||||
mSelectedEntry = min(ubSelected + mFirstShownEntry, (UINT8)(max(0, mEntryVector.size() -1)) );
|
||||
|
||||
Destroy_Drop();
|
||||
}
|
||||
@@ -549,10 +549,10 @@ DropDownBase::SelectScrollAreaDropDownMovementCallBack(MOUSE_REGION * pRegion, I
|
||||
}
|
||||
else if( mFirstShownEntry + ubCityNum > mSelectedEntry )
|
||||
{
|
||||
mSelectedEntry = min( mFirstShownEntry + ubCityNum, max( 0, mEntryVector.size( ) - 1 ) );
|
||||
mSelectedEntry = min( mFirstShownEntry + ubCityNum, (UINT8)(max( 0, mEntryVector.size( ) - 1 )) );
|
||||
|
||||
if ( ubCityNum == mNumDisplayedEntries - 1 )
|
||||
mFirstShownEntry = min( mFirstShownEntry + 1, max( 0, mEntryVector.size( ) - 1 ) );
|
||||
mFirstShownEntry = min( mFirstShownEntry + 1, (UINT8)(max( 0, mEntryVector.size( ) - 1 )) );
|
||||
}
|
||||
|
||||
InvalidateRegion(pRegion->RegionTopLeftX, pRegion->RegionTopLeftY, pRegion->RegionBottomRightX, pRegion->RegionBottomRightY);
|
||||
|
||||
+14
-3
@@ -16,7 +16,7 @@ void Display2Line2ShadowVertical( UINT16 usStartX, UINT16 usStartY, UINT16 EndX,
|
||||
void Display2Line2ShadowHorizontal( UINT16 usStartX, UINT16 usStartY, UINT16 EndY, UINT16 usColor1, UINT16 usColor2 );
|
||||
|
||||
/*
|
||||
* A simple class that takes coordiantes and colors.
|
||||
* A simple class that takes coordinates and colors.
|
||||
* It simply exists to provide these simple methods for other classes.
|
||||
*/
|
||||
class WidgetBase
|
||||
@@ -28,9 +28,17 @@ public:
|
||||
* X and Y-Coordinates define the upper left corner
|
||||
*/
|
||||
void SetX( UINT16 aVal ) { musStartX = aVal; }
|
||||
UINT16 GetX( ) { return musStartX; }
|
||||
virtual UINT16 GetX( ) { return musStartX; }
|
||||
void SetY( UINT16 aVal ) { musStartY = aVal; }
|
||||
UINT16 GetY( ) { return musStartY; }
|
||||
virtual UINT16 GetY( ) { return musStartY; }
|
||||
|
||||
/*
|
||||
* X and Y-Coordinates for text
|
||||
*/
|
||||
void SetX_Text( UINT16 aVal ) { musStartX_Text = aVal; }
|
||||
virtual UINT16 GetX_Text( ) { return musStartX_Text; }
|
||||
void SetY_Text( UINT16 aVal ) { musStartY_Text = aVal; }
|
||||
virtual UINT16 GetY_Text( ) { return musStartY_Text; }
|
||||
|
||||
/*
|
||||
* Color of boundary line
|
||||
@@ -65,6 +73,9 @@ private:
|
||||
UINT16 musStartX;
|
||||
UINT16 musStartY;
|
||||
|
||||
UINT16 musStartX_Text;
|
||||
UINT16 musStartY_Text;
|
||||
|
||||
UINT16 mColorLine; // color of boundary lines
|
||||
UINT16 mColorLineShadow; // color of boundary line shadows
|
||||
UINT16 mColorMarked; // color of marked entries
|
||||
|
||||
@@ -0,0 +1,685 @@
|
||||
/**
|
||||
* @file
|
||||
* @author Flugente (bears-pit.com)
|
||||
* @brief This file contains definitions of classes and functions used for dynamic dialogue
|
||||
*/
|
||||
|
||||
#include "DynamicDialogueWidget.h"
|
||||
|
||||
#include "WCheck.h"
|
||||
#include "renderworld.h"
|
||||
#include "Font Control.h"
|
||||
#include "Utilities.h"
|
||||
#include "WordWrap.h"
|
||||
|
||||
#include "Soldier Profile.h"
|
||||
#include "Cursors.h"
|
||||
#include "random.h"
|
||||
#include "faces.h"
|
||||
|
||||
extern FACETYPE *gpCurrentTalkingFace;
|
||||
|
||||
// whether we are showing the inventory pool graphic
|
||||
extern BOOLEAN fShowMapInventoryPool;
|
||||
|
||||
extern void Display2Line2ShadowVertical( UINT16 usStartX, UINT16 usStartY, UINT16 EndX, UINT16 usColor1, UINT16 usColor2 );
|
||||
extern void Display2Line2ShadowHorizontal( UINT16 usStartX, UINT16 usStartY, UINT16 EndY, UINT16 usColor1, UINT16 usColor2 );
|
||||
|
||||
#define MYBOX_NUMBER 10
|
||||
|
||||
#define MYBOX_FONT_DEF FONT12ARIAL
|
||||
|
||||
#define IMPDIALOGUECHOOSEBOX_BAR_Y_OFFSET 20
|
||||
#define IMPDIALOGUECHOOSEBOX_BAR_MAXLENGTH 500
|
||||
|
||||
DDBox::DDBox( UINT8 aID )
|
||||
: WidgetBase( )
|
||||
{
|
||||
// default settings
|
||||
musHeight = 0;
|
||||
musWidth = 0; // width of text field
|
||||
|
||||
swprintf( mText, L"" );
|
||||
|
||||
musCreationTime = musEndTime = GetJA2Clock( );
|
||||
|
||||
musID = aID;
|
||||
|
||||
mfInit = FALSE;
|
||||
mfDisplayed = FALSE;
|
||||
mfFaceImageExists = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
DDBox::Init( UINT16 sX, UINT16 sY )
|
||||
{
|
||||
SetX( sX );
|
||||
SetY( sY );
|
||||
|
||||
SetX_Text( GetX( ) + MYBOX_FACE_OFFSET );
|
||||
SetY_Text( GetY( ) );
|
||||
|
||||
musWidth = min( MYBOX_TEXT_MAXWIDTH, StringPixLength( mText, MYBOX_FONT_DEF ) );
|
||||
|
||||
musHeight = IanWrappedStringHeight( GetX_Text( ), GetY_Text( ) + 7, musWidth, 2, MYBOX_FONT_DEF, FONT_BLACK, mText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
|
||||
musFontHeight = GetFontHeight( MYBOX_FONT_DEF ); // does not work on init of static objects, as the fonts do not yet exist!
|
||||
|
||||
musEndTime = musCreationTime = GetJA2Clock( );
|
||||
|
||||
musFaceImage = 0;
|
||||
|
||||
mfInit = TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
DDBox::Create( UINT16 sX, UINT16 sY )
|
||||
{
|
||||
Destroy( );
|
||||
|
||||
Init( sX, sY );
|
||||
|
||||
mfDisplayed = TRUE;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DDBox::Destroy( )
|
||||
{
|
||||
if ( !IsInit( ) )
|
||||
return;
|
||||
|
||||
DeleteVideoObjectFromIndex( musFaceImage );
|
||||
|
||||
musFaceImage = 0;
|
||||
|
||||
mfInit = FALSE;
|
||||
mfDisplayed = FALSE;
|
||||
mfFaceImageExists = FALSE;
|
||||
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
|
||||
Refresh( );
|
||||
|
||||
RemoveDDBox( GetID( ) );
|
||||
}
|
||||
|
||||
void
|
||||
DDBox::Display( )
|
||||
{
|
||||
if ( !IsDisplayed( ) )
|
||||
return;
|
||||
|
||||
// it is possible that we cannot instantly create the video object. Thus we try until we are sucessful
|
||||
if ( !mfFaceImageExists )
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
char sTemp[100];
|
||||
|
||||
// Load face file
|
||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||
|
||||
// IMP faces are stored elsewhere
|
||||
if ( gProfilesIMP[mEvent.usSpeaker].ProfilId == mEvent.usSpeaker )
|
||||
{
|
||||
sprintf( sTemp, "IMPFACES\\%02d.sti", gMercProfiles[mEvent.usSpeaker].ubFaceIndex );
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( sTemp, "FACES\\%02d.sti", mEvent.usSpeaker );
|
||||
}
|
||||
|
||||
FilenameForBPP( sTemp, VObjectDesc.ImageFile );
|
||||
|
||||
if ( AddVideoObject( &VObjectDesc, &musFaceImage ) )
|
||||
mfFaceImageExists = TRUE;
|
||||
}
|
||||
|
||||
if ( mfFaceImageExists )
|
||||
{
|
||||
HVOBJECT hPixHandle;
|
||||
//Get the merc's face
|
||||
if ( GetVideoObject( &hPixHandle, musFaceImage ) )
|
||||
{
|
||||
//if the merc is dead, shade the face red
|
||||
if ( IsMercDead( mEvent.usSpeaker ) )
|
||||
{
|
||||
// if the merc is dead, shade the face red, (to signify that he is dead)
|
||||
hPixHandle->pShades[0] = Create16BPPPaletteShaded( hPixHandle->pPaletteEntry, 255, 55, 55, TRUE );
|
||||
|
||||
//set the red pallete to the face
|
||||
SetObjectHandleShade( musFaceImage, 0 );
|
||||
}
|
||||
|
||||
//Get and display the mercs face
|
||||
BltVideoObject( FRAME_BUFFER, hPixHandle, 0, GetX( ), GetY( ), VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
//Display the background
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, GetX_Text( ), GetY( ), GetX_Text( ) + musWidth, GetY( ) + musFontHeight, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||
|
||||
DrawTopEntry( );
|
||||
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
}
|
||||
|
||||
void
|
||||
DDBox::Refresh( )
|
||||
{
|
||||
// nothing to do if not initialized
|
||||
if ( !IsInit( ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// if still being displayed
|
||||
else if ( IsDisplayed( ) )
|
||||
{
|
||||
// if not to be shown yet, hide
|
||||
if ( musCreationTime > GetJA2Clock( ) )
|
||||
{
|
||||
;
|
||||
}
|
||||
// outdated -> destroy
|
||||
else if ( musEndTime < GetJA2Clock( ) )
|
||||
{
|
||||
Destroy( );
|
||||
}
|
||||
else
|
||||
{
|
||||
Display( );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Destroy( );
|
||||
}
|
||||
}
|
||||
|
||||
UINT16
|
||||
DDBox::GetY( )
|
||||
{
|
||||
UINT16 sY = WidgetBase::GetY( );
|
||||
|
||||
if ( mEvent.usSide == DOST_POSITION_LEFT && gpCurrentTalkingFace )
|
||||
sY += 130;
|
||||
|
||||
return sY;
|
||||
}
|
||||
|
||||
UINT16
|
||||
DDBox::GetY_Text( )
|
||||
{
|
||||
UINT16 sY = WidgetBase::GetY_Text( );
|
||||
|
||||
if ( mEvent.usSide == DOST_POSITION_LEFT && gpCurrentTalkingFace )
|
||||
sY += 130;
|
||||
|
||||
return sY;
|
||||
}
|
||||
|
||||
void
|
||||
DDBox::DrawTopEntry( )
|
||||
{
|
||||
//display the name in the list
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, GetX_Text( ) - 4, GetY_Text( ) - 4, GetX_Text( ) + musWidth + 4, GetY_Text( ) + musHeight + 4, GetColorMarked( ) );
|
||||
|
||||
SetFontShadow( NO_SHADOW );
|
||||
|
||||
DisplayWrappedString( GetX_Text( ), GetY_Text( ) + 4, musWidth, 2, MYBOX_FONT_DEF, FONT_BLACK, mText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
|
||||
SetFontShadow( DEFAULT_SHADOW );
|
||||
}
|
||||
|
||||
void
|
||||
DDBox::ResetCreationTime( )
|
||||
{
|
||||
musCreationTime = GetJA2Clock( );
|
||||
}
|
||||
|
||||
|
||||
// the list of boxes
|
||||
DDBox *gDDBoxList[MYBOX_NUMBER];
|
||||
|
||||
BOOLEAN
|
||||
InitMyBoxes( )
|
||||
{
|
||||
// init the pop up box list
|
||||
for ( UINT8 i = 0; i < MYBOX_NUMBER; ++i )
|
||||
{
|
||||
// set ptr to null
|
||||
gDDBoxList[i] = NULL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
DDBox*
|
||||
GetDDBox( UINT8 aID )
|
||||
{
|
||||
// now find this box in the list
|
||||
for ( UINT8 i = 0; i < MYBOX_NUMBER; ++i )
|
||||
{
|
||||
if ( gDDBoxList[i] != NULL && gDDBoxList[i]->GetID( ) == aID )
|
||||
{
|
||||
return gDDBoxList[i];
|
||||
}
|
||||
}
|
||||
|
||||
// create box
|
||||
DDBox* gDDBox = new DDBox( aID );
|
||||
|
||||
if ( gDDBox )
|
||||
{
|
||||
// attempt to add box to list
|
||||
for ( UINT8 i = 0; i < MYBOX_NUMBER; ++i )
|
||||
{
|
||||
if ( gDDBoxList[i] == NULL )
|
||||
{
|
||||
// found a spot, insert
|
||||
gDDBoxList[i] = gDDBox;
|
||||
|
||||
return gDDBoxList[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
BOOLEAN RemoveDDBox( UINT8 aID )
|
||||
{
|
||||
// now find this box in the list
|
||||
for ( UINT8 i = 0; i < MYBOX_NUMBER; ++i )
|
||||
{
|
||||
if ( gDDBoxList[i] != NULL && gDDBoxList[i]->GetID( ) == aID )
|
||||
{
|
||||
gDDBoxList[i]->Destroy( );
|
||||
|
||||
MemFree( gDDBoxList[i] );
|
||||
|
||||
gDDBoxList[i] = NULL;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void RefreshBoxes( )
|
||||
{
|
||||
// if feature is not on, don't bother with this
|
||||
if ( !gGameExternalOptions.fDynamicDialogue )
|
||||
return;
|
||||
|
||||
static UINT32 lasttimenhere = GetJA2Clock( );
|
||||
|
||||
// dialogue should only happen in GAME_SCREEN or MAP_SCREEN, at other times it would be too distracting
|
||||
// also halt dialogue if sector inventory is open
|
||||
if ( guiCurrentScreen == GAME_SCREEN || guiCurrentScreen == MAP_SCREEN && !fShowMapInventoryPool )
|
||||
{
|
||||
// refresh all boxes, and while you're at it, check wether there are any
|
||||
BOOLEAN fFound = FALSE;
|
||||
for ( UINT8 i = 0; i < MYBOX_NUMBER; ++i )
|
||||
{
|
||||
if ( gDDBoxList[i] != NULL )
|
||||
{
|
||||
gDDBoxList[i]->Refresh( );
|
||||
|
||||
fFound = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if ( IMPDialogueChooseBox_Static::getInstance( ).IsDisplayed( ) )
|
||||
{
|
||||
IMPDialogueChooseBox_Static::getInstance( ).Refresh( );
|
||||
|
||||
fFound = TRUE;
|
||||
}
|
||||
|
||||
// if no box is active, we are free to start another dialogue
|
||||
if ( !fFound )
|
||||
HandleDynamicOpinionSpeechEvents( );
|
||||
else
|
||||
{
|
||||
// boxes are active, thus we have to refresh them
|
||||
fMapPanelDirty = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Our dynamic dialogue boxes are destroyed as time progresses. As we do not display them at the moment, we have to update their creation and end time.
|
||||
// As a result, no time will be lost for our dialogues if we are in a different screen
|
||||
UINT32 timepassednotdisplaying = max( 0, GetJA2Clock( ) - lasttimenhere );
|
||||
|
||||
if ( timepassednotdisplaying )
|
||||
DelayBoxDestructionBy( timepassednotdisplaying );
|
||||
}
|
||||
|
||||
lasttimenhere = GetJA2Clock( );
|
||||
}
|
||||
|
||||
void DelayBoxDestruction( UINT32 aVal )
|
||||
{
|
||||
// now find this box in the list
|
||||
for ( UINT8 i = 0; i < MYBOX_NUMBER; ++i )
|
||||
{
|
||||
if ( gDDBoxList[i] != NULL && gDDBoxList[i]->IsDisplayed( ) )
|
||||
{
|
||||
gDDBoxList[i]->SetEndTime( aVal );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DelayBoxDestructionBy( UINT32 aVal )
|
||||
{
|
||||
// now find this box in the list
|
||||
for ( UINT8 i = 0; i < MYBOX_NUMBER; ++i )
|
||||
{
|
||||
if ( gDDBoxList[i] != NULL && gDDBoxList[i]->IsDisplayed( ) )
|
||||
{
|
||||
gDDBoxList[i]->SetStartTime( gDDBoxList[i]->GetStartTime( ) + aVal );
|
||||
gDDBoxList[i]->SetEndTime( gDDBoxList[i]->GetEndTime( ) + aVal );
|
||||
}
|
||||
}
|
||||
|
||||
if ( IMPDialogueChooseBox_Static::getInstance( ).IsDisplayed( ) )
|
||||
{
|
||||
IMPDialogueChooseBox_Static::getInstance( ).SetStartTime( IMPDialogueChooseBox_Static::getInstance( ).GetStartTime( ) + aVal );
|
||||
IMPDialogueChooseBox_Static::getInstance( ).SetEndTime( IMPDialogueChooseBox_Static::getInstance( ).GetEndTime( ) + aVal );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IMPDialogueChooseBox::IMPDialogueChooseBox( )
|
||||
{
|
||||
// default settings
|
||||
musWidth = 0; // width of text field
|
||||
|
||||
mEntryVector.clear( );
|
||||
|
||||
swprintf( mText, L"" );
|
||||
|
||||
mSelectedEntry = 0;
|
||||
|
||||
for ( UINT8 i = 0; i < DOST_CHOICE_MAX; ++i )
|
||||
mChoiceRegionDefined[i] = FALSE;
|
||||
|
||||
musCreationTime = musEndTime = GetJA2Clock( );
|
||||
|
||||
mfInit = FALSE;
|
||||
mfDisplayed = FALSE;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
IMPDialogueChooseBox::Init( UINT16 sX, UINT16 sY )
|
||||
{
|
||||
SetX( sX );
|
||||
SetY( sY );
|
||||
|
||||
SetX_Text( GetX( ) + MYBOX_FACE_OFFSET );
|
||||
SetY_Text( GetY( ) );
|
||||
|
||||
mSelectedEntry = 0;
|
||||
|
||||
musWidth = 0;
|
||||
UINT8 size = mEntryVector.size( );
|
||||
for ( UINT8 i = 0; i < size; ++i )
|
||||
{
|
||||
musWidth = max( musWidth, StringPixLength( mEntryVector[i].second, MYBOX_FONT_DEF ) );
|
||||
}
|
||||
|
||||
musFontHeight = GetFontHeight( MYBOX_FONT_DEF ); // does not work on init of static objects, as the fonts do not yet exist!
|
||||
|
||||
musCreationTime = GetJA2Clock( );
|
||||
|
||||
musEndTime = musCreationTime;
|
||||
|
||||
mfInit = TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
IMPDialogueChooseBox::Create( UINT16 sX, UINT16 sY )
|
||||
{
|
||||
Destroy( );
|
||||
|
||||
Init( sX, sY );
|
||||
|
||||
sY += IMPDIALOGUECHOOSEBOX_BAR_Y_OFFSET;
|
||||
|
||||
UINT8 size = mEntryVector.size( );
|
||||
for ( UINT8 i = 0; i < size; ++i )
|
||||
{
|
||||
if ( !mChoiceRegionDefined[i] )
|
||||
{
|
||||
MSYS_DefineRegion( &mChoiceRegion[i], GetX( ) - 4, sY, GetX( ) + musWidth + 4, sY + musFontHeight, MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, CallBackWrapper( (void*) this, DROPDOWN_REGION, &IMPDialogueChooseBox::Dummyfunc ) );
|
||||
MSYS_AddRegion( &mChoiceRegion[i] );
|
||||
MSYS_SetRegionUserData( &mChoiceRegion[i], 0, i );
|
||||
|
||||
mChoiceRegionDefined[i] = TRUE;
|
||||
}
|
||||
|
||||
sY += musFontHeight + 2;
|
||||
}
|
||||
|
||||
mfDisplayed = TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
IMPDialogueChooseBox::Destroy( )
|
||||
{
|
||||
if ( !IsInit( ) )
|
||||
return;
|
||||
|
||||
for ( UINT8 i = 0; i < DOST_CHOICE_MAX; ++i )
|
||||
{
|
||||
if ( mChoiceRegionDefined[i] )
|
||||
{
|
||||
MSYS_RemoveRegion( &mChoiceRegion[i] );
|
||||
mChoiceRegionDefined[i] = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
mfInit = FALSE;
|
||||
mfDisplayed = FALSE;
|
||||
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
|
||||
Refresh( );
|
||||
}
|
||||
|
||||
void
|
||||
IMPDialogueChooseBox::Display( )
|
||||
{
|
||||
if ( !IsDisplayed( ) )
|
||||
return;
|
||||
|
||||
// we draw a line that shwos us how much time we have for the decision
|
||||
UINT32 totaltime = max( 0, musEndTime - musCreationTime );
|
||||
|
||||
if ( totaltime )
|
||||
{
|
||||
UINT32 timeleft = musEndTime - GetJA2Clock( );
|
||||
FLOAT factor = (FLOAT)timeleft / (FLOAT)totaltime;
|
||||
|
||||
UINT32 maxwidth = min( IMPDIALOGUECHOOSEBOX_BAR_MAXLENGTH, SCREEN_WIDTH / 2 );
|
||||
|
||||
UINT16 colour = Get16BPPColor( FROMRGB( 255 * (1 - factor), 255 * factor, 0 ) );
|
||||
UINT16 colourshadow = Get16BPPColor( FROMRGB( 127 * (1 - factor), 127 * factor, 0 ) );
|
||||
|
||||
Display2Line2ShadowHorizontal( GetX_Text( ) + maxwidth / 2 - factor * maxwidth / 2, GetY( ), GetX_Text( ) + maxwidth / 2 + factor * maxwidth / 2, colour, colourshadow );
|
||||
}
|
||||
|
||||
DrawTopEntry( );
|
||||
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
}
|
||||
|
||||
void
|
||||
IMPDialogueChooseBox::Refresh( )
|
||||
{
|
||||
// nothing to do if not initialized
|
||||
if ( !IsInit( ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// if still being displayed
|
||||
else if ( IsDisplayed( ) )
|
||||
{
|
||||
// if not to be shown yet, hide
|
||||
if ( musCreationTime > GetJA2Clock( ) )
|
||||
{
|
||||
;
|
||||
}
|
||||
// outdated -> destroy
|
||||
else if ( musEndTime < GetJA2Clock( ) )
|
||||
{
|
||||
TimeOut( );
|
||||
Destroy( );
|
||||
}
|
||||
else
|
||||
{
|
||||
Display( );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Destroy( );
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
IMPDialogueChooseBox::DrawTopEntry( )
|
||||
{
|
||||
// make sure we don't get bogus values
|
||||
mSelectedEntry = min( mSelectedEntry, mEntryVector.size( ) - 1 );
|
||||
|
||||
UINT16 sY = GetY( ) + IMPDIALOGUECHOOSEBOX_BAR_Y_OFFSET;
|
||||
|
||||
UINT8 cnt = 0;
|
||||
std::vector<std::pair<INT16, STR16> >::iterator itend = mEntryVector.end( );
|
||||
for ( std::vector<std::pair<INT16, STR16> >::iterator it = mEntryVector.begin( ); it != itend; ++it )
|
||||
{
|
||||
//display the name in the list
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, GetX( ) - 4, sY, GetX( ) + musWidth + 4, sY + musFontHeight, cnt == mSelectedEntry ? GetColorHighLight( ) : GetColorMarked( ) );
|
||||
|
||||
SetFontShadow( NO_SHADOW );
|
||||
|
||||
DrawTextToScreen( (*it).second, GetX( ), sY, 0, MYBOX_FONT_DEF, cnt == mSelectedEntry ? FONT_DKGREEN : FONT_BLACK, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
SetFontShadow( DEFAULT_SHADOW );
|
||||
|
||||
sY += musFontHeight + 2;
|
||||
|
||||
++cnt;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
IMPDialogueChooseBox::SelectDropDownRegionCallBack( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if ( iReason & MSYS_CALLBACK_REASON_INIT )
|
||||
{
|
||||
}
|
||||
else if ( iReason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
mSelectedEntry = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
IMPDialogueChooseBox::ResetCreationTime( )
|
||||
{
|
||||
musCreationTime = GetJA2Clock( );
|
||||
}
|
||||
|
||||
void
|
||||
IMPDialogueChooseBox::TimeOut( )
|
||||
{
|
||||
// if we are destroyed, we set up dialogues according to the players choices
|
||||
RemoveDDBox( mEvent.usSpeaker );
|
||||
|
||||
DynamicOpinionSpeechEvent event = mEvent;
|
||||
|
||||
switch ( mSelectedEntry )
|
||||
{
|
||||
case DOST_CHOICE_NOTHING:
|
||||
event.ubEventType = DOST_INTERJECTOR_NOTHING;
|
||||
break;
|
||||
|
||||
// if we side with the victim or the cause, we either support them or take a stand against the other
|
||||
// for now, the choice is random
|
||||
case DOST_CHOICE_SIDEWITH_VICTIM:
|
||||
if ( Random( 2 ) )
|
||||
event.ubEventType = DOST_INTERJECTOR_TO_VICTIM_AGREE;
|
||||
else
|
||||
event.ubEventType = DOST_INTERJECTOR_TO_CAUSE_DENY;
|
||||
|
||||
event.usSide = DOST_POSITION_LEFT;
|
||||
break;
|
||||
|
||||
case DOST_CHOICE_SIDEWITH_CAUSE:
|
||||
if ( Random( 2 ) )
|
||||
event.ubEventType = DOST_INTERJECTOR_TO_CAUSE_AGREE;
|
||||
else
|
||||
event.ubEventType = DOST_INTERJECTOR_TO_VICTIM_DENY;
|
||||
event.usSide = DOST_POSITION_RIGHT;
|
||||
break;
|
||||
|
||||
case DOST_CHOICE_REASON:
|
||||
event.ubEventType = DOST_INTERJECTOR_SOLVE_REASON;
|
||||
break;
|
||||
|
||||
case DOST_CHOICE_AGGRESSIVE:
|
||||
event.ubEventType = DOST_INTERJECTOR_SOLVE_AGGRESSIVE;
|
||||
break;
|
||||
}
|
||||
|
||||
event.usQueueNumber++;
|
||||
event.usStarttime = GetJA2Clock( );
|
||||
event.usNumonside = (UINT8)GetSidePosition( event.usSide );
|
||||
|
||||
AddDynamicOpinionEvent_Continue( event );
|
||||
}
|
||||
|
||||
|
||||
void* IMPDialogueChooseBox_Static::mpSelf = NULL;
|
||||
|
||||
// are there still dynamic dialogue boxes active? We use this to check wether we can start new dialogue
|
||||
BOOLEAN DynamicDialogueBoxesActive( )
|
||||
{
|
||||
// now find this box in the list
|
||||
for ( UINT8 i = 0; i < MYBOX_NUMBER; ++i )
|
||||
{
|
||||
if ( gDDBoxList[i] != NULL )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ( IMPDialogueChooseBox_Static::getInstance( ).IsInit( ) )
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// used fo example when we load a game - dialogue has to start anew, so all boxes must be wiped
|
||||
void DestroyAllDynamicDialogueBoxes( )
|
||||
{
|
||||
// now find this box in the list
|
||||
for ( UINT8 i = 0; i < MYBOX_NUMBER; ++i )
|
||||
{
|
||||
if ( gDDBoxList[i] != NULL )
|
||||
{
|
||||
gDDBoxList[i]->Destroy( );
|
||||
|
||||
MemFree( gDDBoxList[i] );
|
||||
|
||||
gDDBoxList[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
IMPDialogueChooseBox_Static::getInstance( ).Destroy( );
|
||||
}
|
||||
@@ -0,0 +1,322 @@
|
||||
#ifndef __DYNAMICDIALOGUEWIDGET_H
|
||||
#define __DYNAMICDIALOGUEWIDGET_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @author Flugente (bears-pit.com)
|
||||
* @brief This file contains declarations of classes and functions used for dynamic dialogue
|
||||
*/
|
||||
|
||||
// Flugente: stuff
|
||||
#include "Morale.h"
|
||||
#include "DropDown.h"
|
||||
#include "DynamicDialogue.h"
|
||||
|
||||
#define MYBOX_TEXT_MAXWIDTH 200
|
||||
#define MYBOX_FACE_OFFSET 53
|
||||
|
||||
/*
|
||||
* A class for dynamic dialogue boxes
|
||||
* These boxes consist of a box with a merc's face in it, and text right next to it
|
||||
*/
|
||||
class DDBox : public WidgetBase
|
||||
{
|
||||
public:
|
||||
DDBox( UINT8 aID );
|
||||
|
||||
/*
|
||||
* Create a Dropdown with upper left coordinates
|
||||
*/
|
||||
void Create( UINT16 sX, UINT16 sY );
|
||||
|
||||
/*
|
||||
* Destroy Dropdown, for example once a website isn't displayed anymore
|
||||
*/
|
||||
void Destroy( );
|
||||
|
||||
/*
|
||||
* Display DropDownBase. Use this when refreshing
|
||||
*/
|
||||
void Display( );
|
||||
|
||||
void Refresh( );
|
||||
|
||||
// we need to redo these functions, as the position can change dynamically
|
||||
virtual UINT16 GetY( );
|
||||
virtual UINT16 GetY_Text( );
|
||||
|
||||
/*
|
||||
* Set help text decribing what can be selected
|
||||
*/
|
||||
void SetText( STR16 aText )
|
||||
{
|
||||
swprintf( mText, L"" );
|
||||
wcscat( mText, aText );
|
||||
}
|
||||
|
||||
/*
|
||||
* Get width of entire DropDownBase
|
||||
*/
|
||||
UINT16 GetTotalWidth( ) { return musWidth; }
|
||||
|
||||
/*
|
||||
* Get right x coordinate
|
||||
*/
|
||||
UINT16 GetLastX( ) { return GetX( ) + GetTotalWidth( ); }
|
||||
|
||||
BOOLEAN IsInit( ) { return mfInit; }
|
||||
|
||||
/*
|
||||
* Are we displayed?
|
||||
*/
|
||||
BOOLEAN IsDisplayed( ) { return mfDisplayed; }
|
||||
|
||||
void SetEndTime( UINT32 aVal ) { musEndTime = aVal; }
|
||||
UINT32 GetEndTime( ) { return musEndTime; }
|
||||
|
||||
void SetStartTime( UINT32 aVal ) { musCreationTime = aVal; }
|
||||
UINT32 GetStartTime( ) { return musCreationTime; }
|
||||
|
||||
UINT8 GetID( ) { return musID; }
|
||||
|
||||
void SetEvent( DynamicOpinionSpeechEvent& aEvent ) { mEvent = aEvent; }
|
||||
|
||||
void ResetCreationTime( );
|
||||
|
||||
private:
|
||||
// declare but don't define
|
||||
DDBox( DDBox const& );
|
||||
void operator=(DDBox const&);
|
||||
|
||||
/*
|
||||
* Initialise variables. Called after each creationm which allows moving a dropdown
|
||||
*/
|
||||
void Init( UINT16 sX, UINT16 sY );
|
||||
|
||||
void DrawTopEntry( );
|
||||
|
||||
private:
|
||||
UINT16 musHeight;
|
||||
UINT16 musWidth;
|
||||
|
||||
UINT16 musFontHeight;
|
||||
|
||||
BOOLEAN mfInit;
|
||||
BOOLEAN mfDisplayed;
|
||||
BOOLEAN mfFaceImageExists;
|
||||
|
||||
CHAR16 mText[500];
|
||||
|
||||
UINT32 musCreationTime;
|
||||
UINT32 musEndTime;
|
||||
|
||||
UINT8 musID;
|
||||
|
||||
UINT32 musFaceImage;
|
||||
|
||||
DynamicOpinionSpeechEvent mEvent;
|
||||
};
|
||||
|
||||
BOOLEAN InitMyBoxes( );
|
||||
|
||||
DDBox* GetDDBox( UINT8 aID );
|
||||
BOOLEAN RemoveDDBox( UINT8 aID );
|
||||
|
||||
void RefreshBoxes( );
|
||||
void DelayBoxDestruction( UINT32 aVal );
|
||||
void DelayBoxDestructionBy( UINT32 aVal );
|
||||
|
||||
|
||||
class IMPDialogueChooseBox : public WidgetBase
|
||||
{
|
||||
public:
|
||||
IMPDialogueChooseBox( );
|
||||
|
||||
/*
|
||||
* Create a Dropdown with upper left coordinates
|
||||
*/
|
||||
void Create( UINT16 sX, UINT16 sY );
|
||||
|
||||
/*
|
||||
* Destroy Dropdown, for example once a website isn't displayed anymore
|
||||
*/
|
||||
void Destroy( );
|
||||
|
||||
/*
|
||||
* Display DropDownBase. Use this when refreshing
|
||||
*/
|
||||
void Display( );
|
||||
|
||||
void Refresh( );
|
||||
|
||||
// internal callback types
|
||||
enum {
|
||||
DROPDOWN_REGION,
|
||||
};
|
||||
|
||||
/*
|
||||
* Set the content of a dropdown. Each entry consists of an INT16 key, by which you can later identify which entry was selected, and a STR16 that will be displayed.
|
||||
* There can be multiple instances of the same key or name.
|
||||
*/
|
||||
void SetEntries( std::vector<std::pair<INT16, STR16> >& arEntryVec ) { mEntryVector = arEntryVec; }
|
||||
|
||||
/*
|
||||
* Set help text decribing what can be selected
|
||||
*/
|
||||
void SetText( STR16 aText )
|
||||
{
|
||||
swprintf( mText, L"" );
|
||||
wcscat( mText, aText );
|
||||
}
|
||||
|
||||
/*
|
||||
* Set help text decribing what can be selected
|
||||
*/
|
||||
void SetHelpText( STR16 aText ) { swprintf( mHelpText, L"" ); wcscat( mHelpText, aText ); }
|
||||
|
||||
/*
|
||||
* Get key of selected entry
|
||||
*/
|
||||
INT16 GetSelectedEntryKey( ) { return mEntryVector[mSelectedEntry].first; }
|
||||
|
||||
/*
|
||||
* Get width of entire DropDownBase
|
||||
*/
|
||||
UINT16 GetTotalWidth( ) { return musWidth; }
|
||||
|
||||
/*
|
||||
* Get right x coordinate
|
||||
*/
|
||||
UINT16 GetLastX( ) { return GetX( ) + GetTotalWidth( ); }
|
||||
|
||||
BOOLEAN IsInit( ) { return mfInit; }
|
||||
|
||||
/*
|
||||
* Are we displayed?
|
||||
*/
|
||||
BOOLEAN IsDisplayed( ) { return mfDisplayed; }
|
||||
|
||||
/*
|
||||
* Do we have data to display?
|
||||
*/
|
||||
BOOLEAN HasEntries( ) { return !mEntryVector.empty( ); }
|
||||
|
||||
void SelectDropDownRegionCallBack( MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
/*
|
||||
* This function is implemented again in DropDownTemplate
|
||||
*/
|
||||
virtual MOUSE_CALLBACK CallBackWrapper( void* pt2Object, UINT8 arg, void( *pt2Function )(MOUSE_REGION * pRegion, INT32 iReason) ) {
|
||||
return Dummyfunc;
|
||||
}
|
||||
|
||||
void SetEndTime( UINT32 aVal ) { musEndTime = aVal; }
|
||||
UINT32 GetEndTime( ) { return musEndTime; }
|
||||
|
||||
void SetStartTime( UINT32 aVal ) { musCreationTime = aVal; }
|
||||
UINT32 GetStartTime( ) { return musCreationTime; }
|
||||
|
||||
void SetEvent( DynamicOpinionSpeechEvent& aEvent ) { mEvent = aEvent; }
|
||||
|
||||
void ResetCreationTime( );
|
||||
|
||||
UINT32 GetTimeLeft( ) { return musEndTime - musCreationTime; }
|
||||
|
||||
private:
|
||||
// declare but don't define
|
||||
IMPDialogueChooseBox( IMPDialogueChooseBox const& );
|
||||
void operator=(IMPDialogueChooseBox const&);
|
||||
|
||||
/*
|
||||
* Initialise variables. Called after each creationm which allows moving a dropdown
|
||||
*/
|
||||
void Init( UINT16 sX, UINT16 sY );
|
||||
|
||||
/*
|
||||
* This dummy is needed internally and does nothing when called
|
||||
*/
|
||||
static void Dummyfunc( MOUSE_REGION * pRegion, INT32 iReason ) {}
|
||||
|
||||
/*
|
||||
* Stuff to do once the time is up
|
||||
*/
|
||||
void TimeOut( );
|
||||
|
||||
void DrawTopEntry( );
|
||||
|
||||
private:
|
||||
UINT16 musHeight;
|
||||
UINT16 musWidth;
|
||||
|
||||
UINT16 musFontHeight;
|
||||
|
||||
BOOLEAN mfInit;
|
||||
BOOLEAN mfDisplayed;
|
||||
|
||||
BOOLEAN mfMouseRegionsCreated;
|
||||
|
||||
// a mouse region for every possible choice
|
||||
MOUSE_REGION mChoiceRegion[DOST_CHOICE_MAX];
|
||||
BOOLEAN mChoiceRegionDefined[DOST_CHOICE_MAX];
|
||||
|
||||
std::vector<std::pair<INT16, STR16> > mEntryVector;
|
||||
|
||||
CHAR16 mHelpText[200];
|
||||
|
||||
UINT8 mSelectedEntry; // keeps track of the currently selected city
|
||||
|
||||
CHAR16 mText[500];
|
||||
|
||||
UINT32 musCreationTime;
|
||||
UINT32 musEndTime;
|
||||
|
||||
DynamicOpinionSpeechEvent mEvent;
|
||||
};
|
||||
|
||||
class IMPDialogueChooseBox_Static : public IMPDialogueChooseBox
|
||||
{
|
||||
public:
|
||||
static IMPDialogueChooseBox_Static& getInstance( )
|
||||
{
|
||||
static IMPDialogueChooseBox_Static instance; // Guaranteed to be destroyed.
|
||||
|
||||
// Instantiated on first use.
|
||||
return instance;
|
||||
}
|
||||
|
||||
static void SelectRegionDropDown_DropDown( MOUSE_REGION * pRegion, INT32 iReason ) { return static_cast<IMPDialogueChooseBox*>(mpSelf)->SelectDropDownRegionCallBack( pRegion, iReason ); }
|
||||
|
||||
MOUSE_CALLBACK
|
||||
CallBackWrapper( void* pt2Object, UINT8 arg, void( *pt2Function )(MOUSE_REGION * pRegion, INT32 iReason) )
|
||||
{
|
||||
mpSelf = pt2Object;
|
||||
|
||||
switch ( arg )
|
||||
{
|
||||
case DROPDOWN_REGION:
|
||||
return &SelectRegionDropDown_DropDown;
|
||||
break;
|
||||
}
|
||||
|
||||
return *pt2Function;
|
||||
}
|
||||
|
||||
private:
|
||||
static void* mpSelf;
|
||||
|
||||
private:
|
||||
IMPDialogueChooseBox_Static( ) {}; // private constructor, so we cannot create more instances
|
||||
|
||||
// declare but don't define
|
||||
IMPDialogueChooseBox_Static( IMPDialogueChooseBox_Static const& );
|
||||
void operator=(IMPDialogueChooseBox_Static const&);
|
||||
};
|
||||
|
||||
// are there still dynamic dialogue boxes active? We use this to check wether we can start new dialogue
|
||||
BOOLEAN DynamicDialogueBoxesActive( );
|
||||
|
||||
// used fo example when we load a game - dialogue has to start anew, so all boxes must be wiped
|
||||
void DestroyAllDynamicDialogueBoxes( );
|
||||
|
||||
|
||||
#endif
|
||||
@@ -442,6 +442,10 @@
|
||||
RelativePath=".\DropDown.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DynamicDialogueWidget.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\email.h"
|
||||
>
|
||||
@@ -768,6 +772,10 @@
|
||||
RelativePath=".\DropDown.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DynamicDialogueWidget.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\email.cpp"
|
||||
>
|
||||
|
||||
@@ -442,6 +442,10 @@
|
||||
RelativePath="DropDown.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DynamicDialogueWidget.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="email.h"
|
||||
>
|
||||
@@ -758,6 +762,10 @@
|
||||
RelativePath="DropDown.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DynamicDialogueWidget.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="email.cpp"
|
||||
>
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<ClInclude Include="CampaignStats.h" />
|
||||
<ClInclude Include="CharProfile.h" />
|
||||
<ClInclude Include="DropDown.h" />
|
||||
<ClInclude Include="DynamicDialogueWidget.h" />
|
||||
<ClInclude Include="email.h" />
|
||||
<ClInclude Include="Encyclopedia_Data_new.h" />
|
||||
<ClInclude Include="Encyclopedia_new.h" />
|
||||
@@ -131,6 +132,7 @@
|
||||
<ClCompile Include="CampaignStats.cpp" />
|
||||
<ClCompile Include="CharProfile.cpp" />
|
||||
<ClCompile Include="DropDown.cpp" />
|
||||
<ClInclude Include="DynamicDialogueWidget.cpp" />
|
||||
<ClCompile Include="email.cpp" />
|
||||
<ClCompile Include="Encyclopedia_Data_new.cpp" />
|
||||
<ClCompile Include="Encyclopedia_new.cpp" />
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<ClInclude Include="CampaignStats.h" />
|
||||
<ClInclude Include="CharProfile.h" />
|
||||
<ClInclude Include="DropDown.h" />
|
||||
<ClInclude Include="DynamicDialogueWidget.h" />
|
||||
<ClInclude Include="email.h" />
|
||||
<ClInclude Include="Encyclopedia_Data_new.h" />
|
||||
<ClInclude Include="Encyclopedia_new.h" />
|
||||
@@ -131,6 +132,7 @@
|
||||
<ClCompile Include="CampaignStats.cpp" />
|
||||
<ClCompile Include="CharProfile.cpp" />
|
||||
<ClCompile Include="DropDown.cpp" />
|
||||
<ClCompile Include="DynamicDialogueWidget.cpp" />
|
||||
<ClCompile Include="email.cpp" />
|
||||
<ClCompile Include="Encyclopedia_Data_new.cpp" />
|
||||
<ClCompile Include="Encyclopedia_new.cpp" />
|
||||
|
||||
@@ -252,6 +252,9 @@
|
||||
<ClInclude Include="merccompare.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="DynamicDialogueWidget.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="aim.cpp">
|
||||
@@ -515,5 +518,8 @@
|
||||
<ClCompile Include="merccompare.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DynamicDialogueWidget.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -21,6 +21,8 @@
|
||||
// HEADROCK HAM 3.6: Militia upkeep
|
||||
#include "Town Militia.h"
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
|
||||
#endif
|
||||
|
||||
// the global defines
|
||||
|
||||
+248
-330
File diff suppressed because it is too large
Load Diff
+29
-8
@@ -26,6 +26,7 @@
|
||||
#include "DropDown.h"
|
||||
#include "Overhead.h"
|
||||
#include "Map Screen Interface.h"
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
|
||||
@@ -343,14 +344,13 @@ void RenderMercCompareCustomers( )
|
||||
|
||||
// choose 3 random customer quotes out of the pool of all quotes
|
||||
std::set<UINT8> quoteset;
|
||||
//while ( quoteset.size( ) < min( 3, TEXT_MERCCOMPARE_CUSTOMERSTATEMENTS ) )
|
||||
//quoteset.insert( Random( TEXT_MERCCOMPARE_CUSTOMERSTATEMENTS ) );
|
||||
|
||||
// showoff hack
|
||||
quoteset.insert( 0 );
|
||||
quoteset.insert( 1 );
|
||||
quoteset.insert( 2 );
|
||||
|
||||
UINT8 safetycounter = 0;
|
||||
while ( quoteset.size( ) < min( 3, TEXT_MERCCOMPARE_CUSTOMERSTATEMENTS ) && safetycounter < 30 )
|
||||
{
|
||||
quoteset.insert( Random( TEXT_MERCCOMPARE_CUSTOMERSTATEMENTS ) );
|
||||
++safetycounter;
|
||||
}
|
||||
|
||||
std::set<UINT8>::iterator itend = quoteset.end();
|
||||
for ( std::set<UINT8>::iterator it = quoteset.begin(); it != itend; ++it )
|
||||
{
|
||||
@@ -933,6 +933,27 @@ BOOLEAN DisplayMercData( UINT8 usProfileA, UINT8 usProfileB )
|
||||
}
|
||||
}
|
||||
|
||||
// long-term memory
|
||||
val = gMercProfiles[usProfileA].sDynamicOpinionLongTerm[usProfileB];
|
||||
|
||||
if ( val )
|
||||
{
|
||||
swprintf( sText, L"Past grievances" );
|
||||
DisplayWrappedString( usPosX, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
swprintf( sText, L"%d", val );
|
||||
usPosY += DisplayWrappedString( usPosX + MCA_NUMBEROFFSET, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, (val > 0) ? FONT_MCOLOR_LTGREEN : (val < 0) ? FONT_MCOLOR_LTRED : MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
}
|
||||
|
||||
val = gMercProfiles[usProfileB].sDynamicOpinionLongTerm[usProfileA];
|
||||
|
||||
if ( val )
|
||||
{
|
||||
swprintf( sText, L"Past grievances" );
|
||||
DisplayWrappedString( usPosX + MCA_SIDEOFFSET, usPosY2, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
swprintf( sText, L"%d", val );
|
||||
usPosY2 += DisplayWrappedString( usPosX + MCA_SIDEOFFSET + MCA_NUMBEROFFSET, usPosY2, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, (val > 0) ? FONT_MCOLOR_LTGREEN : (val < 0) ? FONT_MCOLOR_LTRED : MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
}
|
||||
|
||||
// draw the final verdict
|
||||
val = SoldierRelation( pSoldierA, pSoldierB );
|
||||
|
||||
|
||||
+58
-3
@@ -114,6 +114,7 @@
|
||||
#include "Items.h"
|
||||
#include "Encyclopedia_new.h"
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#include "BobbyR.h"
|
||||
@@ -1539,9 +1540,35 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
|
||||
|
||||
if ( guiCurrentSaveGameVersion >= DYNAMIC_OPINIONS )
|
||||
{
|
||||
if ( !FileRead( hFile, &this->usDynamicOpinionFlagmask, sizeof(usDynamicOpinionFlagmask), &uiNumBytesRead ) )
|
||||
if ( guiCurrentSaveGameVersion >= DYNAMIC_DIALOGUE )
|
||||
{
|
||||
return(FALSE);
|
||||
if ( !FileRead( hFile, &this->usDynamicOpinionFlagmask, sizeof(usDynamicOpinionFlagmask), &uiNumBytesRead ) )
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
if ( !FileRead( hFile, &this->sDynamicOpinionLongTerm, sizeof(sDynamicOpinionLongTerm), &uiNumBytesRead ) )
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT32 tmp[NUM_PROFILES][3];
|
||||
if ( !FileRead( hFile, &tmp, sizeof(tmp), &uiNumBytesRead ) )
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
for ( UINT16 profile = 0; profile < NUM_PROFILES; ++profile )
|
||||
{
|
||||
for ( UINT8 i = 0; i < 3; ++i )
|
||||
{
|
||||
this->usDynamicOpinionFlagmask[profile][i] = tmp[profile][i];
|
||||
}
|
||||
|
||||
sDynamicOpinionLongTerm[profile] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1644,6 +1671,11 @@ BOOLEAN MERCPROFILESTRUCT::Save(HWFILE hFile)
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
if ( !FileWrite( hFile, &this->sDynamicOpinionLongTerm, sizeof(sDynamicOpinionLongTerm), &uiNumBytesWritten ) )
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -4185,7 +4217,7 @@ BOOLEAN SaveGame( int ubSaveGameID, STR16 pGameDesc )
|
||||
|
||||
}
|
||||
|
||||
if( !SaveNewEmailDataToSaveGameFile( hFile ) )
|
||||
if( !SaveNewEmailDataToSaveGameFile( hFile ) )
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_WHITE, MSG_ERROR, L"ERROR writing save data");
|
||||
goto FAILED_TO_SAVE;
|
||||
@@ -4234,6 +4266,13 @@ if( !SaveNewEmailDataToSaveGameFile( hFile ) )
|
||||
goto FAILED_TO_SAVE;
|
||||
}
|
||||
|
||||
// Flugente: dynamic dialogue
|
||||
if ( !SaveDynamicDialogue( hFile ) )
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_WHITE, MSG_ERROR, L"ERROR writing Dynamic Dialogue" );
|
||||
goto FAILED_TO_SAVE;
|
||||
}
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
SaveGameFilePosition( FileGetPos( hFile ), "Campaign Stats" );
|
||||
#endif
|
||||
@@ -5867,6 +5906,7 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
||||
}
|
||||
else
|
||||
EncyclopediaInitItemsVisibility();
|
||||
|
||||
if( guiCurrentSaveGameVersion >= CAMPAIGNSTATS )
|
||||
{
|
||||
uiRelEndPerc += 1;
|
||||
@@ -5890,6 +5930,21 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
||||
}
|
||||
}
|
||||
|
||||
if ( guiCurrentSaveGameVersion >= DYNAMIC_DIALOGUE )
|
||||
{
|
||||
uiRelEndPerc += 1;
|
||||
SetRelativeStartAndEndPercentage( 0, uiRelStartPerc, uiRelEndPerc, L"Load Dynamic Dialogue..." );
|
||||
RenderProgressBar( 0, 100 );
|
||||
uiRelStartPerc = uiRelEndPerc;
|
||||
|
||||
if ( !LoadDynamicDialogue( hFile ) )
|
||||
{
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "Dynamic Dialogue Load failed" ) );
|
||||
FileClose( hFile );
|
||||
return(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//Close the saved game file
|
||||
//
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
#include "Tactical Save.h" // added by Flugente
|
||||
#include "Campaign Types.h" // added by Flugente
|
||||
#include "Strategic Town Loyalty.h"
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
@@ -5151,7 +5152,7 @@ void FatigueCharacter( SOLDIERTYPE *pSoldier )
|
||||
bMaxBreathLoss = (float)min( 127, iBreathLoss );
|
||||
|
||||
// Flugente: dynamic opinions: other mercs might get annoyed, because we are slowing down the team
|
||||
HandleDynamicOpinionSlowdown( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_SLOWSUSDOWN, TRUE, TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
#include "AIInternals.h" // added by SANDRO
|
||||
#include "Bullets.h" // HEADROCK HAM 5, for use with Bullet Impact.
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#include "Reinforcement.h"
|
||||
@@ -4695,7 +4696,7 @@ void AttackTarget( SOLDIERCELL *pAttacker, SOLDIERCELL *pTarget )
|
||||
gMercProfiles[ pAttacker->pSoldier->ubProfile ].records.usKillsOthers++;
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
HandleDynamicOpinionCivKill( pAttacker->pSoldier );
|
||||
HandleDynamicOpinionChange( pAttacker->pSoldier, OPINIONEVENT_CIVKILLER, TRUE, TRUE );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
#include "history.h"
|
||||
#include "Dialogue Control.h"
|
||||
#include "Strategic AI.h"
|
||||
#include "Tactical Save.h" // added by Flugente
|
||||
#include "Tactical Save.h" // added by Flugente
|
||||
#include "DynamicDialogue.h" // added by Flugente for HandleDynamicOpinions()
|
||||
#endif
|
||||
|
||||
#include "Luaglobal.h"
|
||||
@@ -475,7 +476,7 @@ void HourlyLarryUpdate()
|
||||
}
|
||||
|
||||
// Flugente: dynamic opinion
|
||||
HandleDynamicOpinionAddict( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ADDICT, TRUE, FALSE );
|
||||
|
||||
if ( fBar )
|
||||
{
|
||||
@@ -673,7 +674,7 @@ void HourlyStealUpdate()
|
||||
AutoPlaceObject( pSoldier, pTargetObj, TRUE );
|
||||
|
||||
// Flugente: dynamic opinion
|
||||
HandleDynamicOpinionThief( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_THIEF, TRUE, FALSE );
|
||||
}
|
||||
|
||||
// save the changed inventory
|
||||
|
||||
@@ -5742,7 +5742,7 @@ void RequestHighPriorityGarrisonReinforcements( INT32 iGarrisonID, UINT8 ubSoldi
|
||||
if ( giReinforcementPool > 0 )
|
||||
{
|
||||
pGroup = CreateNewEnemyGroupDepartingFromSector( SECTOR( gModSettings.ubSAISpawnSectorX, gModSettings.ubSAISpawnSectorY ),
|
||||
0, min( ubSoldiersRequested, giReinforcementPool ), 0 );
|
||||
0, min( ubSoldiersRequested, giReinforcementPool ), 0, 0 );
|
||||
pGroup->ubMoveType = ONE_WAY;
|
||||
pGroup->pEnemyGroup->ubIntention = REINFORCEMENTS;
|
||||
gGarrisonGroup[ iGarrisonID ].ubPendingGroupID = pGroup->ubGroupID;
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "Facilities.h"
|
||||
// HEADROCK HAM 3.6: And another include, for militia upkeep costs.
|
||||
#include "Town Militia.h"
|
||||
#include "DynamicDialogue.h" // added by Flugente for HandleDynamicOpinionsDailyRefresh()
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
@@ -612,7 +613,7 @@ void MercDailyUpdate()
|
||||
HandleSnitchCheck();
|
||||
|
||||
// Flugente: dynmaic opinion rollover
|
||||
HandleDynamicOpinions();
|
||||
HandleDynamicOpinionsDailyRefresh( );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
// HEADROCK HAM 3.6: Include for Facility Debt
|
||||
#include "Facilities.h"
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#include "Luaglobal.h"
|
||||
|
||||
@@ -1365,10 +1365,9 @@ void HandleDialogue( )
|
||||
gubCurrentTalkingID = QItem->iFaceIndex;
|
||||
|
||||
//ExecuteCharacterDialogue( QItem->ubCharacterNum, QItem->usQuoteNum, QItem->iFaceIndex, DIALOGUE_TACTICAL_UI, TRUE );
|
||||
|
||||
//ExecuteCharacterDialogue( QItem->ubCharacterNum, QItem->usQuoteNum, QItem->iFaceIndex, DIALOGUE_TACTICAL_UI, TRUE);
|
||||
ExecuteSnitchCharacterDialogue( QItem->ubCharacterNum, QItem->usQuoteNum, QItem->iFaceIndex, QItem->bUIHandlerID, QItem->uiSpecialEventData2, QItem->uiSpecialEventData3, QItem->uiSpecialEventData4 );
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
//JA25 UB
|
||||
if ( QItem->uiSpecialEventData & MULTIPURPOSE_SPECIAL_EVENT_TEAM_MEMBERS_DONE_TALKING )
|
||||
@@ -1465,8 +1464,6 @@ void HandleDialogue( )
|
||||
|
||||
BOOLEAN GetDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iDataSize, STR16 zDialogueText, UINT32 *puiSoundID, CHAR8 *zSoundString );
|
||||
|
||||
BOOLEAN SnitchDialogueReplaceMercNicksWithProperData( CHAR16 *pFinishedString, UINT8 ubTargetProfile, UINT8 ubSecondaryTargetProfile );
|
||||
|
||||
BOOLEAN GetSnitchDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iDataSize, STR16 zDialogueText, UINT32 *puiSound1ID, UINT32 *puiSound2ID, UINT32 *puiSound3ID, CHAR8 zSoundFiles[][64], UINT8 ubTargetProfile, UINT8 ubSecondaryTargetProfile );
|
||||
|
||||
BOOLEAN DelayedTacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteNum )
|
||||
@@ -1817,17 +1814,17 @@ BOOLEAN SnitchCharacterDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, INT32
|
||||
QItem = (DIALOGUE_Q_STRUCT *) MemAlloc( sizeof( DIALOGUE_Q_STRUCT ) );
|
||||
memset( QItem, 0, sizeof( DIALOGUE_Q_STRUCT ) );
|
||||
|
||||
QItem->ubCharacterNum = ubCharacterNum;
|
||||
QItem->ubCharacterNum = ubCharacterNum;
|
||||
QItem->usQuoteNum = usQuoteNum;
|
||||
QItem->uiSpecialEventFlag = uiSpecialEventFlag;
|
||||
QItem->uiSpecialEventData = uiSpecialEventData1;
|
||||
QItem->uiSpecialEventFlag = uiSpecialEventFlag;
|
||||
QItem->uiSpecialEventData = uiSpecialEventData1;
|
||||
QItem->uiSpecialEventData2 = uiSpecialEventData2;
|
||||
QItem->uiSpecialEventData3 = uiSpecialEventData3;
|
||||
QItem->uiSpecialEventData4 = uiSpecialEventData4;
|
||||
QItem->iFaceIndex = iFaceIndex;
|
||||
QItem->bUIHandlerID = bUIHandlerID;
|
||||
QItem->bUIHandlerID = bUIHandlerID;
|
||||
QItem->iTimeStamp = GetJA2Clock( );
|
||||
QItem->fFromSoldier = fFromSoldier;
|
||||
QItem->fFromSoldier = fFromSoldier;
|
||||
QItem->fDelayed = fDelayed;
|
||||
|
||||
// check if pause already locked, if so, then don't mess with it
|
||||
@@ -2533,21 +2530,17 @@ BOOLEAN GetDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iDataSize,
|
||||
return (*puiSoundID != NO_SAMPLE) || fTextAvailable;
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN SnitchDialogueReplaceMercNicksWithProperData( CHAR16 *pFinishedString, UINT8 ubTargetProfile, UINT8 ubSecondaryTargetProfile )
|
||||
BOOLEAN ReplaceTextWithOtherText( CHAR16 *pFinishedString, CHAR16 compare[32], CHAR16 replace[32] )
|
||||
{
|
||||
CHAR16 pTempString[ 320 ];
|
||||
INT32 iLength =0;
|
||||
INT32 iCurLocInSourceString =0 ;
|
||||
INT32 iLengthOfSourceString = wcslen( pFinishedString ); //Get the length of the source string
|
||||
CHAR16 *pMercNickString = NULL;
|
||||
CHAR16 *pOtherMercNickString = NULL;
|
||||
CHAR16 pTempString[320];
|
||||
INT32 iLength = 0;
|
||||
INT32 iCurLocInSourceString = 0;
|
||||
INT32 iLengthOfSourceString = wcslen( pFinishedString ); //Get the length of the source string
|
||||
CHAR16 *pNickString = NULL;
|
||||
|
||||
CHAR16 *pSubString = NULL;
|
||||
BOOLEAN fReplacingMercName = TRUE;
|
||||
CHAR16 *pSubString = NULL;
|
||||
BOOLEAN fReplacingMercName = TRUE;
|
||||
|
||||
CHAR16 sMercNick[ 32 ] = L"$MERCNICK$"; //Will be replaced by the mercs name
|
||||
CHAR16 sOtherMercNick[ 32 ] = L"$MERCNICK2$"; //Will be replaced by the mercs name
|
||||
CHAR16 sSearchString[32];
|
||||
|
||||
//Copy the original string over to the temp string
|
||||
@@ -2557,43 +2550,19 @@ BOOLEAN SnitchDialogueReplaceMercNicksWithProperData( CHAR16 *pFinishedString, U
|
||||
pFinishedString[0] = L'\0';
|
||||
|
||||
//Keep looping through to replace all references to the keyword
|
||||
while( iCurLocInSourceString < iLengthOfSourceString )
|
||||
while ( iCurLocInSourceString < iLengthOfSourceString )
|
||||
{
|
||||
iLength = 0;
|
||||
pSubString = NULL;
|
||||
|
||||
//Find out if the $MERCNICK$ is in the string
|
||||
pMercNickString = wcsstr( &pTempString[ iCurLocInSourceString ], sMercNick );
|
||||
pNickString = wcsstr( &pTempString[iCurLocInSourceString], compare );
|
||||
|
||||
//Find out if the $MERCNICK2$ is in the string
|
||||
pOtherMercNickString = wcsstr( &pTempString[ iCurLocInSourceString ], sOtherMercNick );
|
||||
|
||||
if( pMercNickString != NULL && pOtherMercNickString != NULL )
|
||||
{
|
||||
if( pMercNickString < pOtherMercNickString )
|
||||
{
|
||||
fReplacingMercName = TRUE;
|
||||
pSubString = pMercNickString;
|
||||
wcscpy( sSearchString, sMercNick);
|
||||
}
|
||||
else
|
||||
{
|
||||
fReplacingMercName = FALSE;
|
||||
pSubString = pOtherMercNickString;
|
||||
wcscpy( sSearchString, sOtherMercNick);
|
||||
}
|
||||
}
|
||||
else if( pMercNickString != NULL )
|
||||
if ( pNickString != NULL )
|
||||
{
|
||||
fReplacingMercName = TRUE;
|
||||
pSubString = pMercNickString;
|
||||
wcscpy( sSearchString, sMercNick);
|
||||
}
|
||||
else if( pOtherMercNickString != NULL )
|
||||
{
|
||||
fReplacingMercName = FALSE;
|
||||
pSubString = pOtherMercNickString;
|
||||
wcscpy( sSearchString, sOtherMercNick);
|
||||
pSubString = pNickString;
|
||||
wcscpy( sSearchString, compare );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2601,37 +2570,32 @@ BOOLEAN SnitchDialogueReplaceMercNicksWithProperData( CHAR16 *pFinishedString, U
|
||||
}
|
||||
|
||||
// if there is a substring
|
||||
if( pSubString != NULL )
|
||||
if ( pSubString != NULL )
|
||||
{
|
||||
iLength = pSubString - &pTempString[ iCurLocInSourceString ];
|
||||
iLength = pSubString - &pTempString[iCurLocInSourceString];
|
||||
|
||||
//Copy the part of the source string up to the keyword
|
||||
wcsncat( pFinishedString, &pTempString[ iCurLocInSourceString ], iLength );
|
||||
wcsncat( pFinishedString, &pTempString[iCurLocInSourceString], iLength );
|
||||
|
||||
//increment the source string counter by how far in the keyword is and by the length of the keyword
|
||||
iCurLocInSourceString+= iLength + wcslen( sSearchString );
|
||||
iCurLocInSourceString += iLength + wcslen( sSearchString );
|
||||
|
||||
if( fReplacingMercName )
|
||||
if ( fReplacingMercName )
|
||||
{
|
||||
//add the mercs name to the string
|
||||
wcscat( pFinishedString, gMercProfiles[ ubTargetProfile ].zNickname );
|
||||
}
|
||||
else
|
||||
{
|
||||
//add the mercs name to the string
|
||||
wcscat( pFinishedString, gMercProfiles[ ubSecondaryTargetProfile ].zNickname );
|
||||
wcscat( pFinishedString, replace );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//add the rest of the string
|
||||
wcscat( pFinishedString, &pTempString[ iCurLocInSourceString ] );
|
||||
wcscat( pFinishedString, &pTempString[iCurLocInSourceString] );
|
||||
|
||||
iCurLocInSourceString += wcslen( &pTempString[ iCurLocInSourceString ] );
|
||||
iCurLocInSourceString += wcslen( &pTempString[iCurLocInSourceString] );
|
||||
}
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
// anv: special version of GetDialogue, message is put together from parts
|
||||
@@ -2653,23 +2617,11 @@ BOOLEAN GetSnitchDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iData
|
||||
{
|
||||
|
||||
LoadEncryptedDataFromFile( pFilename1, zDialogueText, usQuoteNum * iDataSize, iDataSize );
|
||||
//LoadEncryptedDataFromFile( pFilename2, zDialogueText2, ubSnitchTarget * iDataSize, iDataSize );
|
||||
//LoadEncryptedDataFromFile( pFilename3, zDialogueText3, ubSecondarySnitchTarget * iDataSize, iDataSize );
|
||||
SnitchDialogueReplaceMercNicksWithProperData( zDialogueText, ubTargetProfile, ubSecondaryTargetProfile );
|
||||
//if( ubSnitchTargetID != NOBODY )
|
||||
//{
|
||||
// wcscpy( zDialogueTextTemp, gMercProfiles[ubTargetProfile].zNickname );
|
||||
// wcscat( zDialogueTextTemp, zDialogueText );
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// wcscpy( zDialogueTextTemp, zDialogueText );
|
||||
//}
|
||||
//if( ubSecondarySnitchTargetID != NOBODY )
|
||||
//{
|
||||
// wcscat( zDialogueTextTemp, gMercProfiles[ubSecondaryTargetProfile].zNickname );
|
||||
//}
|
||||
//wcscpy( zDialogueText, zDialogueTextTemp );
|
||||
|
||||
// Flugente: replaced SnitchDialogueReplaceMercNicksWithProperData with ReplaceTextWithOtherText - less complicated an can be used for other things than merc names
|
||||
ReplaceTextWithOtherText( zDialogueText, L"$MERCNICK$", gMercProfiles[ubTargetProfile].zNickname );
|
||||
ReplaceTextWithOtherText( zDialogueText, L"$MERCNICK2$", gMercProfiles[ubSecondaryTargetProfile].zNickname );
|
||||
|
||||
if(zDialogueText[0] == 0)
|
||||
{
|
||||
swprintf( zDialogueText, L"I have no text in the EDT file ( %d ) %S", usQuoteNum, pFilename1 );
|
||||
@@ -2785,7 +2737,7 @@ void HandleTacticalTextUI( INT32 iFaceIndex, SOLDIERTYPE *pSoldier, STR16 zQuote
|
||||
// TODO.RW: Wenn wir in tactical sind, dann normal. In strategy den offset dazurechnen!
|
||||
if ( guiCurrentScreen == GAME_SCREEN )
|
||||
{
|
||||
sLeft = 110;
|
||||
sLeft = 110;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2969,8 +2921,8 @@ void HandleTacticalSpeechUI( UINT8 ubCharacterNum, INT32 iFaceIndex )
|
||||
}
|
||||
|
||||
// Setup video overlay!
|
||||
VideoOverlayDesc.sLeft = 10;
|
||||
VideoOverlayDesc.sTop = 20;
|
||||
VideoOverlayDesc.sLeft = 10;
|
||||
VideoOverlayDesc.sTop = 20;
|
||||
VideoOverlayDesc.sRight = VideoOverlayDesc.sLeft + 99;
|
||||
VideoOverlayDesc.sBottom = VideoOverlayDesc.sTop + 98;
|
||||
VideoOverlayDesc.sX = VideoOverlayDesc.sLeft;
|
||||
|
||||
@@ -344,6 +344,9 @@ BOOLEAN TacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteNum );
|
||||
|
||||
BOOLEAN SnitchTacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteNum, UINT8 ubEventType, UINT8 ubTargetProfile, UINT8 ubSecondaryTargetProfile );
|
||||
|
||||
// Flugente: replace text with other text
|
||||
BOOLEAN ReplaceTextWithOtherText( CHAR16 *pFinishedString, CHAR16 compare[32], CHAR16 replace[32] );
|
||||
|
||||
// A higher level function used for tactical quotes
|
||||
BOOLEAN DelayedTacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteNum );
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "Food.h" // added by Flugente
|
||||
#include "Animation data.h" // added by Flugente for SoldierBodyTypes
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#include "DynamicDialogue.h"// added by Flugente
|
||||
#endif
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,432 @@
|
||||
#ifndef __DYNAMICDIALOGUE_H
|
||||
#define __DYNAMICDIALOGUE_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @author Flugente (bears-pit.com)
|
||||
* @brief This file contains declarations of classes and functions used for dynamic dialogue
|
||||
*/
|
||||
|
||||
#include "Types.h"
|
||||
#include "Soldier Control.h"
|
||||
|
||||
// Flugente: calculate A's opinion of B
|
||||
INT8 SoldierRelation( SOLDIERTYPE* pSoldierA, SOLDIERTYPE* pSoldierB );
|
||||
INT8 SoldierRelation( UINT8 usProfileA, UINT8 usProfileB );
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
enum
|
||||
{
|
||||
OPINIONEVENT_FRIENDLYFIRE,
|
||||
OPINIONEVENT_SNITCHSOLDMEOUT,
|
||||
OPINIONEVENT_SNITCHINTERFERENCE,
|
||||
OPINIONEVENT_FRIENDSWITHHATED,
|
||||
|
||||
OPINIONEVENT_CONTRACTEXTENSION,
|
||||
OPINIONEVENT_ORDEREDRETREAT,
|
||||
OPINIONEVENT_CIVKILLER,
|
||||
OPINIONEVENT_SLOWSUSDOWN,
|
||||
|
||||
OPINIONEVENT_NOSHARINGFOOD,
|
||||
OPINIONEVENT_ANNOYINGDISABILITY,
|
||||
OPINIONEVENT_ADDICT,
|
||||
OPINIONEVENT_THIEF,
|
||||
|
||||
OPINIONEVENT_WORSTCOMMANDEREVER,
|
||||
OPINIONEVENT_RICHGUY,
|
||||
OPINIONEVENT_BETTERGEAR,
|
||||
OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS,
|
||||
|
||||
OPINIONEVENT_BANDAGED,
|
||||
OPINIONEVENT_DRINKBUDDIES_GOOD,
|
||||
OPINIONEVENT_DRINKBUDDIES_SUPER,
|
||||
OPINIONEVENT_DRINKBUDDIES_BAD,
|
||||
|
||||
OPINIONEVENT_DRINKBUDDIES_WORSE,
|
||||
// events from dialogue
|
||||
OPINIONEVENT_AGAINST_US, // other guy was against us in dialogue
|
||||
OPINIONEVENT_FOR_US, // other guy was for us in dialogue
|
||||
OPINIONEVENT_AGAINST_ENEMY, // other guy was against our dialogue enemy in dialogue
|
||||
|
||||
OPINIONEVENT_FOR_ENEMY, // other guy was for our dialogue enemy in dialogue
|
||||
OPINIONEVENT_SOLVECONFLICT_REASON_GOOD, // other guy attempted to solve the conflict reasonably, and we thought that was good
|
||||
OPINIONEVENT_SOLVECONFLICT_REASON_BAD, // other guy attempted to solve the conflict reasonably, and we thought that was bad
|
||||
OPINIONEVENT_SOLVECONFLICT_AGGRESSIVE_GOOD, // other guy attempted to solve the conflict agressively, and we thought that was good
|
||||
|
||||
OPINIONEVENT_SOLVECONFLICT_AGGRESSIVE_BAD, // other guy attempted to solve the conflict agressively, and we thought that was bad
|
||||
|
||||
OPINIONEVENT_MAX
|
||||
};
|
||||
|
||||
typedef struct DynamicOpinionEvent
|
||||
{
|
||||
UINT8 ubEventId;
|
||||
INT8 sOpinionModifier;
|
||||
BOOLEAN fSameSector;
|
||||
BOOLEAN fSameAssignment;
|
||||
BOOLEAN fAwake;
|
||||
BOOLEAN fSquadsOnly;
|
||||
} DynamicOpinionEvent;
|
||||
|
||||
extern DynamicOpinionEvent gDynamicOpinionEvent[OPINIONEVENT_MAX];
|
||||
|
||||
// -------- added by Flugente: flags for opinions --------
|
||||
// easier than adding 32 differently named variables. DO NOT CHANGE THEM, UNLESS YOU KNOW WHAT YOU ARE DOING!!!
|
||||
// if someone influences our opinion, STAGE1 gets set. Every day, stages move up one step, until we 'forget' them
|
||||
// these flags describe what the other guy did to us....
|
||||
// flagmask 1
|
||||
#define OPINIONFLAG_STAGE1_FRIENDLYFIRE 0x00000001 //1 // fired on us
|
||||
#define OPINIONFLAG_STAGE2_FRIENDLYFIRE 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_FRIENDLYFIRE 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_FRIENDLYFIRE 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SNITCHSOLDMEOUT 0x00000010 //16 // has been snitching to the player about us
|
||||
#define OPINIONFLAG_STAGE2_SNITCHSOLDMEOUT 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_SNITCHSOLDMEOUT 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_SNITCHSOLDMEOUT 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_INTERFERENCE 0x00000100 //256 // is interfering with us (stopped us from taking drugs or stealing)
|
||||
#define OPINIONFLAG_STAGE2_INTERFERENCE 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_INTERFERENCE 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_INTERFERENCE 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_FRIENDSWITHHATED 0x00001000 //4096 // is friends with someone we hate
|
||||
#define OPINIONFLAG_STAGE2_FRIENDSWITHHATED 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_FRIENDSWITHHATED 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_FRIENDSWITHHATED 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_CONTRACTEXTENSION 0x00010000 //65536 // got his contract extended before we did, even though we had less time left
|
||||
#define OPINIONFLAG_STAGE2_CONTRACTEXTENSION 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_CONTRACTEXTENSION 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_CONTRACTEXTENSION 0x00080000 //524288
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ORDEREDRETREAT 0x00100000 //1048576 // was commander (most senior merc around) and ordered retreat
|
||||
#define OPINIONFLAG_STAGE2_ORDEREDRETREAT 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_ORDEREDRETREAT 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_ORDEREDRETREAT 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_CIVKILLER 0x01000000 //16777216 // killed an unarmed civilian
|
||||
#define OPINIONFLAG_STAGE2_CIVKILLER 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_CIVKILLER 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_CIVKILLER 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SLOWSUSDOWN 0x10000000 //268435456 // is overloaded and thus slows us down
|
||||
#define OPINIONFLAG_STAGE2_SLOWSUSDOWN 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_SLOWSUSDOWN 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_SLOWSUSDOWN 0x80000000 //2147483648
|
||||
|
||||
// flagmask 2
|
||||
#define OPINIONFLAG_STAGE1_NOSHARINGFOOD 0x00000001 //1 // had water/food when we needed it. So he did not share!
|
||||
#define OPINIONFLAG_STAGE2_NOSHARINGFOOD 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_NOSHARINGFOOD 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_NOSHARINGFOOD 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ANNOYINGDISABILITY 0x00000010 //16 // disability kicked in at a bad time, putting the team at risk (forgeful, nervous, psycho...)
|
||||
#define OPINIONFLAG_STAGE2_ANNOYINGDISABILITY 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_ANNOYINGDISABILITY 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_ANNOYINGDISABILITY 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ADDICT 0x00000100 //256 // is taking drugs
|
||||
#define OPINIONFLAG_STAGE2_ADDICT 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_ADDICT 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_ADDICT 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_THIEF 0x00001000 //4096 // is stealing items
|
||||
#define OPINIONFLAG_STAGE2_THIEF 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_THIEF 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_THIEF 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_WORSTCOMMANDEREVER 0x00010000 //65536 // was commander (most senior merc around) when a lot of our people (including militia) died
|
||||
#define OPINIONFLAG_STAGE2_WORSTCOMMANDEREVER 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_WORSTCOMMANDEREVER 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_WORSTCOMMANDEREVER 0x00080000 //524288
|
||||
|
||||
#define OPINIONFLAG_STAGE1_RICHGUY 0x00100000 //1048576 // gets paid a lot more than we do
|
||||
#define OPINIONFLAG_STAGE2_RICHGUY 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_RICHGUY 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_RICHGUY 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_BETTERGEAR 0x01000000 //16777216 // has a lot better gear than we do
|
||||
#define OPINIONFLAG_STAGE2_BETTERGEAR 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_BETTERGEAR 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_BETTERGEAR 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_YOUMOUNTEDAGUNONMYBREASTS 0x10000000 //268435456 // used our body to rest his gun on
|
||||
#define OPINIONFLAG_STAGE2_YOUMOUNTEDAGUNONMYBREASTS 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_YOUMOUNTEDAGUNONMYBREASTS 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_YOUMOUNTEDAGUNONMYBREASTS 0x80000000 //2147483648
|
||||
|
||||
// flagmask 3
|
||||
#define OPINIONFLAG_STAGE1_BANDAGED 0x00000001 //1 // bandaged our wounds
|
||||
#define OPINIONFLAG_STAGE2_BANDAGED 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_BANDAGED 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_BANDAGED 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD 0x00000010 //16 // had a drink with him, he's okay.
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_GOOD 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_GOOD 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_GOOD 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_SUPER 0x00000100 //256 // had a drink with him, he's super okay
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_SUPER 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_SUPER 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_SUPER 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD 0x00001000 //4096 // had a drink with him, don't like him
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_BAD 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_BAD 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_BAD 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_WORSE 0x00010000 //65536 // had a drink with him, and I REALLY don't like him now
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_WORSE 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_WORSE 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_WORSE 0x00080000 //524288
|
||||
|
||||
#define OPINIONFLAG_STAGE1_AGAINST_US 0x00100000 //1048576 // was against us in dialogue
|
||||
#define OPINIONFLAG_STAGE2_AGAINST_US 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_AGAINST_US 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_AGAINST_US 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_FOR_US 0x01000000 //16777216 // other guy was for us in dialogue
|
||||
#define OPINIONFLAG_STAGE2_FOR_US 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_FOR_US 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_FOR_US 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_AGAINST_ENEMY 0x10000000 //268435456 // was against our dialogue enemy in dialogue
|
||||
#define OPINIONFLAG_STAGE2_AGAINST_ENEMY 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_AGAINST_ENEMY 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_AGAINST_ENEMY 0x80000000 //2147483648
|
||||
|
||||
// flagmask 4
|
||||
#define OPINIONFLAG_STAGE1_FOR_ENEMY 0x00000001 //1 // was for our dialogue enemy in dialogue
|
||||
#define OPINIONFLAG_STAGE2_FOR_ENEMY 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_FOR_ENEMY 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_FOR_ENEMY 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SOLVECONFLICT_REASON_GOOD 0x00000010 //16 // attempted to solve the conflict reasonably, and we thought that was good
|
||||
#define OPINIONFLAG_STAGE2_SOLVECONFLICT_REASON_GOOD 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_SOLVECONFLICT_REASON_GOOD 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_SOLVECONFLICT_REASON_GOOD 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SOLVECONFLICT_REASON_BAD 0x00000100 //256 // attempted to solve the conflict reasonably, and we thought that was bad
|
||||
#define OPINIONFLAG_STAGE2_SOLVECONFLICT_REASON_BAD 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_SOLVECONFLICT_REASON_BAD 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_SOLVECONFLICT_REASON_BAD 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SOLVECONFLICT_AGGRESSIVE_GOOD 0x00001000 //4096 // attempted to solve the conflict agressively, and we thought that was good
|
||||
#define OPINIONFLAG_STAGE2_SOLVECONFLICT_AGGRESSIVE_GOOD 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_SOLVECONFLICT_AGGRESSIVE_GOOD 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_SOLVECONFLICT_AGGRESSIVE_GOOD 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SOLVECONFLICT_AGGRESSIVE_BAD 0x00010000 //65536 // attempted to solve the conflict agressively, and we thought that was bad
|
||||
#define OPINIONFLAG_STAGE2_SOLVECONFLICT_AGGRESSIVE_BAD 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_SOLVECONFLICT_AGGRESSIVE_BAD 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_SOLVECONFLICT_AGGRESSIVE_BAD 0x00080000 //524288
|
||||
|
||||
/*#define OPINIONFLAG_STAGE1_AGAINST_US 0x00100000 //1048576 // was against us in dialogue
|
||||
#define OPINIONFLAG_STAGE2_AGAINST_US 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_AGAINST_US 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_AGAINST_US 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_FOR_US 0x01000000 //16777216 // other guy was for us in dialogue
|
||||
#define OPINIONFLAG_STAGE2_FOR_US 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_FOR_US 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_FOR_US 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_AGAINST_ENEMY 0x10000000 //268435456 // was against our dialogue enemy in dialogue
|
||||
#define OPINIONFLAG_STAGE2_AGAINST_ENEMY 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_AGAINST_ENEMY 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_AGAINST_ENEMY 0x80000000 //2147483648*/
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ALL 0x11111111 // flags of all first stages, used when rolling over
|
||||
#define OPINIONFLAG_STAGE4_ALL 0x88888888 // flags of all final stages, used when rolling over
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
|
||||
// we have several 'roles' in a dialogue for now:
|
||||
// victim - a merc initiating dialogue because an event has happened to him (can also be a positive thing)
|
||||
// cause - the merc that caused the event through his behaviour
|
||||
// interjector - an person that is neither victim nor cause and attemtps to solve the situation, the player can control his/her actions
|
||||
// speaker - whoever speaks the current line, for no one of the above
|
||||
typedef enum
|
||||
{
|
||||
// opinion event has occured and a merc points that out to ...
|
||||
DOST_VICTIM_INITIATE, // victim begins dialogue
|
||||
|
||||
DOST_VICTIM_TO_INTERJECTOR_DENY, // victim denies what interjector said
|
||||
DOST_VICTIM_TO_INTERJECTOR_AGREE, // victim agrees what interjector said
|
||||
|
||||
DOST_CAUSE_TO_VICTIM_DENY, // cause denies victim's accusation
|
||||
DOST_CAUSE_TO_VICTIM_AGREE, // cause accepts responsibility to victim
|
||||
|
||||
DOST_CAUSE_TO_INTERJECTOR_DENY, // cause denies what interjector said
|
||||
DOST_CAUSE_TO_INTERJECTOR_AGREE, // cause agrees what interjector said
|
||||
|
||||
DOST_INTERJECTOR_DIALOGUESELECTION, // special: creates the interjector dialogue selection
|
||||
|
||||
DOST_INTERJECTOR_TO_VICTIM_DENY, // interjector denies victim's accusation
|
||||
DOST_INTERJECTOR_TO_VICTIM_AGREE, // interjectorinterjector agrees to victim that cause is to blame
|
||||
|
||||
DOST_INTERJECTOR_TO_CAUSE_DENY, // interjector denies victim denial
|
||||
DOST_INTERJECTOR_TO_CAUSE_AGREE, // interjector agrees that victim is not to blame
|
||||
|
||||
DOST_INTERJECTOR_SOLVE_REASON, // interjector tries to solve the situation peacefully
|
||||
DOST_INTERJECTOR_SOLVE_AGGRESSIVE, // interjector tries to solve the situation aggressively
|
||||
|
||||
DOST_INTERJECTOR_NOTHING, // interjector decides to say nothing
|
||||
|
||||
DOST_SIDEWITH_VICTIM, // another person sides with victim
|
||||
DOST_SIDEWITH_CAUSE, // another person sides with cause
|
||||
|
||||
DOST_MAX,
|
||||
|
||||
} DynamicOpinionSpeechType;
|
||||
|
||||
// the different choices we can take when selecting what approach to use in dialogue
|
||||
enum
|
||||
{
|
||||
DOST_CHOICE_NOTHING = 0,
|
||||
DOST_CHOICE_SIDEWITH_VICTIM,
|
||||
DOST_CHOICE_SIDEWITH_CAUSE,
|
||||
DOST_CHOICE_REASON,
|
||||
DOST_CHOICE_AGGRESSIVE,
|
||||
|
||||
DOST_CHOICE_MAX
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
DOST_POSITION_LEFT,
|
||||
DOST_POSITION_RIGHT,
|
||||
DOST_POSITION_MIDDLE,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
DOST_PRIORITY_LOW, // can be handled hours later if needed
|
||||
DOST_PRIORITY_NORMAL, // normal priority
|
||||
DOST_PRIORITY_HIGH, // urgent, handle as soon as possible
|
||||
|
||||
DOST_PRIORITY_MAX
|
||||
};
|
||||
|
||||
typedef struct OpinionEvent
|
||||
{
|
||||
OpinionEvent( ) :
|
||||
ubEventId( 0 ),
|
||||
ubProfileComplainant( NO_PROFILE ),
|
||||
ubProfileCause( NO_PROFILE ),
|
||||
usSector( 0 )
|
||||
{}
|
||||
|
||||
UINT8 ubEventId; // the dynamic opinion event this is all about
|
||||
UINT8 ubProfileComplainant; // the merc who started this dialogue by complaining
|
||||
UINT8 ubProfileCause; // the merc who caused the event
|
||||
UINT8 usSector; // sector of incident
|
||||
} OpinionEvent;
|
||||
|
||||
#define DOST_INTERJECTORS_MAX 4
|
||||
|
||||
typedef struct DynamicOpinionSpeechEvent_EventData
|
||||
{
|
||||
DynamicOpinionSpeechEvent_EventData( ) :
|
||||
event( ),
|
||||
usId( 0 ),
|
||||
usPriority( 0 ),
|
||||
ubProfileINTERJECTOR( NO_PROFILE )
|
||||
{}
|
||||
|
||||
OpinionEvent event; // the event that this is all about
|
||||
|
||||
UINT16 usId; // id that signifies wether dialogue belongs to this event or another one
|
||||
UINT8 usPriority; // priority of event, used when determining which event will be handled next
|
||||
|
||||
// other mercs an interfere in the dialogue
|
||||
UINT8 ubProfileINTERJECTOR; // if an INTERJECTOR tries to solve the situation, it'll be this guy
|
||||
|
||||
// several other mercs can agree with either cause or complainant. Most of the time, these guys will have similar events at the time, which will simply be merged
|
||||
// the goal is to have less dialogue events while making them somewhat deeper
|
||||
UINT8 ubProfileSideCause[DOST_INTERJECTORS_MAX];
|
||||
UINT8 ubProfileSideComplainant[DOST_INTERJECTORS_MAX];
|
||||
|
||||
} DynamicOpinionSpeechEvent_EventData;
|
||||
|
||||
typedef struct DynamicOpinionSpeechEvent
|
||||
{
|
||||
DynamicOpinionSpeechEvent( ) :
|
||||
data( ),
|
||||
usStarttime( 0 ),
|
||||
ubEventType( DOST_INTERJECTOR_NOTHING ),
|
||||
usQueueNumber( 0 ),
|
||||
usSpeaker( NO_PROFILE ),
|
||||
usSide( DOST_POSITION_LEFT ),
|
||||
usNumonside( 0 )
|
||||
{}
|
||||
|
||||
DynamicOpinionSpeechEvent_EventData data;
|
||||
|
||||
UINT32 usStarttime; // time this dialogue should be displayed
|
||||
|
||||
UINT8 ubEventType; // kind of speech event (from DynamicOpinionSpeechType)
|
||||
UINT8 usQueueNumber; // number of this dialogue bit in the event's queue
|
||||
UINT8 usSpeaker; // the merc who says this
|
||||
UINT8 usSide; // side with ubProfileComplainant (DOST_POSITION_LEFT), ubProfileCause (DOST_POSITION_RIGHT) or stay neutral (DOST_POSITION_MIDDLE)
|
||||
|
||||
UINT8 usNumonside; // this argument is the x'th on this side
|
||||
UINT8 usFiller[3]; // to appease the petty gods of padding AGAIN
|
||||
} DynamicOpinionSpeechEvent;
|
||||
|
||||
|
||||
|
||||
void CleanDynamicOpinionSpeechEvents( );
|
||||
void AddDynamicOpinionEvent_New( OpinionEvent aEvent );
|
||||
void AddDynamicOpinionEvent_Continue( DynamicOpinionSpeechEvent aEvent );
|
||||
void CreateSpeechEventsFromDynamicOpinionEvent( DynamicOpinionSpeechEvent aEvent );
|
||||
void HandleDynamicOpinionSpeechEvents( );
|
||||
void StartDynamicOpinionDialogue( );
|
||||
void PerformPossibleDynamicOpinionEventMerges( );
|
||||
|
||||
BOOLEAN DynamicOpinionTacticalCharacterDialogue( DynamicOpinionSpeechEvent& aEvent );
|
||||
|
||||
INT8 GetSidePosition( UINT8 aDostPosition );
|
||||
|
||||
BOOLEAN DynamicOpinionSpeechInProgress( );
|
||||
void SetfDynamicOpinionSpeechInProgress( BOOLEAN aVal );
|
||||
|
||||
BOOLEAN SaveDynamicDialogue( HWFILE hwFile );
|
||||
BOOLEAN LoadDynamicDialogue( HWFILE hwFile );
|
||||
|
||||
|
||||
// modify usProfileA's opinion of usProfileB because of usEvent
|
||||
void AddOpinionEvent( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent, BOOLEAN fStartDialogue = TRUE );
|
||||
|
||||
// get usProfileA's opinion of usProfileB on one of the last 4 days
|
||||
INT8 GetDynamicOpinionDay( UINT8 usProfileA, UINT8 usProfileB, UINT8 usDay );
|
||||
|
||||
// get usProfileA's opinion of usProfileB concerning usEvent
|
||||
INT8 GetDynamicOpinion( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent );
|
||||
|
||||
// daily rollover of opinions
|
||||
void HandleDynamicOpinionsDailyRefresh( );
|
||||
|
||||
// a day has passed, 'age' opinions
|
||||
void RolloverDynamicOpinions( UINT8 usProfileA );
|
||||
|
||||
// check wether other people are friends with someone else we hate. All persons must be in Arulco
|
||||
void CheckForFriendsofHated( SOLDIERTYPE* pSoldier );
|
||||
|
||||
void HandleDynamicOpinionOnContractExtension( UINT8 ubCode, UINT8 usProfile );
|
||||
void HandleDynamicOpinionBattleLosses( );
|
||||
void HandleDynamicOpinionRetreat( );
|
||||
void HandleDynamicOpinionTeamDrinking( SOLDIERTYPE* pSoldier );
|
||||
|
||||
// get id of a random merc in a sector, provided one exists
|
||||
UINT8 GetRandomMercInSectorNotInList( INT16 sX, INT16 sY, INT8 sZ, std::vector<UINT8> aTaboo, BOOLEAN fImpOnly );
|
||||
|
||||
UINT8 GetFittingInterjectorProfile( UINT8 usEvent, UINT8 usProfileVictim, UINT8 usProfileCause );
|
||||
|
||||
UINT8 HighestInventoryCoolness( SOLDIERTYPE* pSoldier );
|
||||
|
||||
void HandleDynamicOpinionChange( SOLDIERTYPE* pSoldier, UINT8 usEvent, BOOLEAN fOffender, BOOLEAN fStartDialogue );
|
||||
|
||||
#endif
|
||||
+2
-4
@@ -3182,11 +3182,11 @@ void SetupFinalTalkingDelay( FACETYPE *pFace )
|
||||
if ( gGameSettings.fOptions[ TOPTION_SUBTITLES ] )
|
||||
{
|
||||
//pFace->uiTalkingDuration = FINAL_TALKING_DURATION;
|
||||
pFace->uiTalkingDuration = 300;
|
||||
pFace->uiTalkingDuration = 5000;
|
||||
}
|
||||
else
|
||||
{
|
||||
pFace->uiTalkingDuration = 300;
|
||||
pFace->uiTalkingDuration = 5000;
|
||||
}
|
||||
|
||||
pFace->sMouthFrame = 0;
|
||||
@@ -3220,6 +3220,4 @@ void SetupFinalTalkingDelay( FACETYPE *pFace )
|
||||
|
||||
// Set final delay!
|
||||
pFace->fValidSpeech = FALSE;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+2
-1
@@ -25,6 +25,7 @@
|
||||
#include "Facilities.h"
|
||||
#include "Soldier macros.h"
|
||||
#include "strategicmap.h"
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
@@ -618,7 +619,7 @@ void HourlyFoodAutoDigestion( SOLDIERTYPE *pSoldier )
|
||||
}
|
||||
|
||||
// dynamic opinions: if we're still really hungry an someone in this sector has food, we get a lwoer opinion of him, as he obviously doesn't share
|
||||
HandleDynamicOpinionFoodSharing( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_NOSHARINGFOOD, FALSE, FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "Map Screen Interface Bottom.h"
|
||||
#include "Quests.h"
|
||||
#include "GameSettings.h"
|
||||
#include "DynamicDialogue.h"// added by Flugente
|
||||
#endif
|
||||
#include "connect.h"
|
||||
|
||||
|
||||
+36
-922
@@ -31,6 +31,7 @@
|
||||
#include "finances.h" // added by Flugente for EXTENDED_CONTRACT_BY_1_DAY
|
||||
#include "Soldier Add.h" // added by Flugente for MERC_TYPE__AIM_MERC
|
||||
#include "CampaignStats.h" // added by Flugente for gCurrentIncident
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
@@ -112,6 +113,40 @@ MoraleEvent gbMoraleEvent[NUM_MORALE_EVENTS] =
|
||||
{ STRATEGIC_MORALE_EVENT, -1}, //MORALE_PREVENTED_MISBEHAVIOUR,
|
||||
};
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
DynamicOpinionEvent gDynamicOpinionEvent[OPINIONEVENT_MAX] =
|
||||
{
|
||||
{ OPINIONEVENT_FRIENDLYFIRE, -10, TRUE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_SNITCHSOLDMEOUT, -3, FALSE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_SNITCHINTERFERENCE, -5, FALSE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_FRIENDSWITHHATED, -4, FALSE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_CONTRACTEXTENSION, -2, FALSE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_ORDEREDRETREAT, -6, TRUE, FALSE, TRUE, TRUE },
|
||||
{ OPINIONEVENT_CIVKILLER, -8, FALSE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_SLOWSUSDOWN, -2, FALSE, TRUE, FALSE, TRUE },
|
||||
{ OPINIONEVENT_NOSHARINGFOOD, -1, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_ANNOYINGDISABILITY, -2, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_ADDICT, -6, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_THIEF, -5, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_WORSTCOMMANDEREVER, -7, TRUE, FALSE, FALSE, TRUE },
|
||||
{ OPINIONEVENT_RICHGUY, -1, FALSE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_BETTERGEAR, -2, TRUE, FALSE, FALSE, TRUE },
|
||||
{ OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS, -3, TRUE, FALSE, FALSE, TRUE },
|
||||
{ OPINIONEVENT_BANDAGED, 1, TRUE, FALSE, FALSE, FALSE },
|
||||
{ OPINIONEVENT_DRINKBUDDIES_GOOD, 1, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_DRINKBUDDIES_SUPER, 4, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_DRINKBUDDIES_BAD, -1, TRUE, FALSE, TRUE, FALSE },
|
||||
{ OPINIONEVENT_DRINKBUDDIES_WORSE, -4, TRUE, FALSE, TRUE, FALSE },
|
||||
{OPINIONEVENT_AGAINST_US, -2, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_FOR_US, 2, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_AGAINST_ENEMY, 1, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_FOR_ENEMY, -1, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_SOLVECONFLICT_REASON_GOOD, 2, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_SOLVECONFLICT_REASON_BAD, -2, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_SOLVECONFLICT_AGGRESSIVE_GOOD, 3, TRUE, FALSE, TRUE, FALSE},
|
||||
{OPINIONEVENT_SOLVECONFLICT_AGGRESSIVE_BAD, -3, TRUE, FALSE, TRUE, FALSE},
|
||||
};
|
||||
|
||||
BOOLEAN gfSomeoneSaidMoraleQuote = FALSE;
|
||||
|
||||
BOOLEAN IsShowOffNearBy( SOLDIERTYPE * pSoldier ); // Added by SANDRO
|
||||
@@ -295,7 +330,7 @@ void DecayTacticalMoraleModifiers( void )
|
||||
HandleMoraleEvent( pSoldier, MORALE_NERVOUS_ALONE, pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ );
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
HandleDynamicOpinionDisability( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1656,924 +1691,3 @@ BOOLEAN IsShowOffNearBy( SOLDIERTYPE * pSoldier )
|
||||
|
||||
return( fYesHeIs );
|
||||
}
|
||||
|
||||
// Flugente: calculate A's opinion of B
|
||||
INT8 SoldierRelation( SOLDIERTYPE* pSoldierA, SOLDIERTYPE* pSoldierB)
|
||||
{
|
||||
INT8 bOpinion = 0;
|
||||
|
||||
if ( !OKToCheckOpinion(pSoldierA->ubProfile) || !OKToCheckOpinion(pSoldierB->ubProfile) )
|
||||
return 0;
|
||||
|
||||
MERCPROFILESTRUCT* pProfile = &(gMercProfiles[ pSoldierA->ubProfile ]);
|
||||
|
||||
bOpinion = pProfile->bMercOpinion[ pSoldierB->ubProfile ];
|
||||
|
||||
// Flugente: evaluate appearance/refinement/hated nationalities
|
||||
|
||||
// some people loathe ugly people and like beautiful people. It's a mean world.
|
||||
// we also handle sexism here
|
||||
switch ( gMercProfiles[ pSoldierB->ubProfile ].bAppearance )
|
||||
{
|
||||
case APPEARANCE_UGLY:
|
||||
{
|
||||
if ( pProfile->bAppearanceCareLevel == CARELEVEL_SOME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModAppearance * 2;
|
||||
else if ( pProfile->bAppearanceCareLevel == CARELEVEL_EXTREME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModAppearance * 4;
|
||||
|
||||
// some people are sexists
|
||||
if ( pProfile->bSexist && gMercProfiles[ pSoldierB->ubProfile ].bSex != pProfile->bSex )
|
||||
{
|
||||
if ( pProfile->bSexist == SOMEWHAT_SEXIST )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModSexism * 2;
|
||||
else if ( pProfile->bSexist == VERY_SEXIST )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModSexism * 4;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case APPEARANCE_HOMELY:
|
||||
{
|
||||
if ( pProfile->bAppearanceCareLevel == CARELEVEL_SOME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModAppearance;
|
||||
else if ( pProfile->bAppearanceCareLevel == CARELEVEL_EXTREME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModAppearance * 2;
|
||||
|
||||
// some people are sexists
|
||||
if ( pProfile->bSexist && gMercProfiles[ pSoldierB->ubProfile ].bSex != pProfile->bSex )
|
||||
{
|
||||
if ( pProfile->bSexist == SOMEWHAT_SEXIST )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModSexism;
|
||||
else if ( pProfile->bSexist == VERY_SEXIST )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModSexism * 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case APPEARANCE_ATTRACTIVE:
|
||||
{
|
||||
if ( pProfile->bAppearanceCareLevel == CARELEVEL_SOME )
|
||||
bOpinion += gGameExternalOptions.sMoraleModAppearance;
|
||||
else if ( pProfile->bAppearanceCareLevel == CARELEVEL_EXTREME )
|
||||
bOpinion += gGameExternalOptions.sMoraleModAppearance * 2;
|
||||
|
||||
// some people are sexists
|
||||
if ( pProfile->bSexist && gMercProfiles[ pSoldierB->ubProfile ].bSex != pProfile->bSex )
|
||||
{
|
||||
if ( pProfile->bSexist == SOMEWHAT_SEXIST )
|
||||
bOpinion += gGameExternalOptions.sMoraleModSexism;
|
||||
else if ( pProfile->bSexist == VERY_SEXIST )
|
||||
bOpinion += gGameExternalOptions.sMoraleModSexism * 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case APPEARANCE_BABE:
|
||||
{
|
||||
if ( pProfile->bAppearanceCareLevel == CARELEVEL_SOME )
|
||||
bOpinion += gGameExternalOptions.sMoraleModAppearance * 2;
|
||||
else if ( pProfile->bAppearanceCareLevel == CARELEVEL_EXTREME )
|
||||
bOpinion += gGameExternalOptions.sMoraleModAppearance * 4;
|
||||
|
||||
// some people are sexists
|
||||
if ( pProfile->bSexist && gMercProfiles[ pSoldierB->ubProfile ].bSex != pProfile->bSex )
|
||||
{
|
||||
if ( pProfile->bSexist == SOMEWHAT_SEXIST )
|
||||
bOpinion += gGameExternalOptions.sMoraleModSexism * 2;
|
||||
else if ( pProfile->bSexist == VERY_SEXIST )
|
||||
bOpinion += gGameExternalOptions.sMoraleModSexism * 4;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// some people care about how distuingished other people are. Malus if on different ends of the spectrum, a small bonus if on the same and its really important to the person
|
||||
// also give a malus if the other person is a slob or snob and we are average but care extremely (we don't like people who behave differently)
|
||||
// if we don't care, doesn't matter
|
||||
if ( pProfile->bRefinementCareLevel == CARELEVEL_NONE )
|
||||
{
|
||||
// nothing to do...
|
||||
}
|
||||
// if we care somewhat, malus on slob/snob
|
||||
else if ( pProfile->bRefinementCareLevel == CARELEVEL_SOME )
|
||||
{
|
||||
if ( pProfile->bRefinement * gMercProfiles[pSoldierB->ubProfile].bRefinement == 2 )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModRefinement;
|
||||
}
|
||||
// if we care extremely, reward for similarity, malus otherwise
|
||||
else //if( pProfile->bRefinementCareLevel == CARELEVEL_EXTREME )
|
||||
{
|
||||
if ( pProfile->bRefinement * gMercProfiles[pSoldierB->ubProfile].bRefinement == 2 )
|
||||
bOpinion -= 2 * gGameExternalOptions.sMoraleModRefinement;
|
||||
else if ( pProfile->bRefinement * gMercProfiles[pSoldierB->ubProfile].bRefinement == 0 )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModRefinement;
|
||||
else
|
||||
bOpinion += gGameExternalOptions.sMoraleModRefinement;
|
||||
}
|
||||
|
||||
// some people hate other nationalities (do not mix up with racism, which uses bRace)
|
||||
if ( pProfile->bHatedNationality > -1 && gMercProfiles[ pSoldierB->ubProfile ].bNationality == pProfile->bHatedNationality )
|
||||
{
|
||||
if ( pProfile->bHatedNationalityCareLevel == CARELEVEL_SOME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModHatedNationality;
|
||||
else if ( pProfile->bHatedNationalityCareLevel == CARELEVEL_EXTREME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModHatedNationality * 2;
|
||||
}
|
||||
|
||||
// some people are racists
|
||||
if ( pProfile->bRacist && gMercProfiles[ pSoldierB->ubProfile ].bRace != pProfile->bRace )
|
||||
{
|
||||
if ( pProfile->bRacist == RACIST_SOME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModRacism;
|
||||
else if ( pProfile->bRacist == RACIST_VERY )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModRacism * 2;
|
||||
}
|
||||
|
||||
// Flugente: backgrounds
|
||||
if ( pSoldierA->GetBackgroundValue( BG_DISLIKEBG ) && pSoldierA->GetBackgroundValue( BG_DISLIKEBG ) == -pSoldierB->GetBackgroundValue( BG_DISLIKEBG ) )
|
||||
{
|
||||
bOpinion -= 2;
|
||||
}
|
||||
|
||||
if ( pSoldierA->HasBackgroundFlag( BACKGROUND_XENOPHOBIC ) && pSoldierB->ubProfile != NO_PROFILE && gMercProfiles[pSoldierA->ubProfile].usBackground != gMercProfiles[pSoldierB->ubProfile].usBackground )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModXenophobicBackGround;
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
if ( gGameExternalOptions.fDynamicOpinions )
|
||||
{
|
||||
for ( UINT8 opinionevent = OPINIONEVENT_FRIENDLYFIRE; opinionevent < OPINIONEVENT_MAX; ++opinionevent )
|
||||
{
|
||||
bOpinion += GetDynamicOpinion( pSoldierA->ubProfile, pSoldierB->ubProfile, opinionevent );
|
||||
}
|
||||
}
|
||||
|
||||
// reasonable values
|
||||
bOpinion = min( BUDDY_OPINION, bOpinion );
|
||||
bOpinion = max( HATED_OPINION, bOpinion );
|
||||
|
||||
return bOpinion;
|
||||
}
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
void AddOpinionEvent( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent )
|
||||
{
|
||||
if ( usProfileA == NO_PROFILE || usProfileA == NO_PROFILE )
|
||||
return;
|
||||
|
||||
if ( usEvent >= OPINIONEVENT_MAX )
|
||||
return;
|
||||
|
||||
// we add a flag signifiying that an event happened today
|
||||
switch ( usEvent )
|
||||
{
|
||||
case OPINIONEVENT_FRIENDLYFIRE: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_FRIENDLYFIRE; break;
|
||||
case OPINIONEVENT_SNITCHSOLDMEOUT: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_SNITCHSOLDMEOUT; break;
|
||||
case OPINIONEVENT_SNITCHINTERFERENCE: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_INTERFERENCE; break;
|
||||
case OPINIONEVENT_FRIENDSWITHHATED: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_FRIENDSWITHHATED; break;
|
||||
case OPINIONEVENT_CONTRACTEXTENSION: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_CONTRACTEXTENSION; break;
|
||||
case OPINIONEVENT_ORDEREDRETREAT: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_ORDEREDRETREAT; break;
|
||||
case OPINIONEVENT_CIVKILLER: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_CIVKILLER; break;
|
||||
case OPINIONEVENT_SLOWSUSDOWN: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] |= OPINIONFLAG_STAGE1_SLOWSUSDOWN; break;
|
||||
|
||||
case OPINIONEVENT_NOSHARINGFOOD: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_NOSHARINGFOOD; break;
|
||||
case OPINIONEVENT_ANNOYINGDISABILITY: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_ANNOYINGDISABILITY; break;
|
||||
case OPINIONEVENT_ADDICT: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_ADDICT; break;
|
||||
case OPINIONEVENT_THIEF: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_THIEF; break;
|
||||
case OPINIONEVENT_WORSTCOMMANDEREVER: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_WORSTCOMMANDEREVER; break;
|
||||
case OPINIONEVENT_RICHGUY: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_RICHGUY; break;
|
||||
case OPINIONEVENT_BETTERGEAR: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_BETTERGEAR; break;
|
||||
case OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] |= OPINIONFLAG_STAGE1_YOUMOUNTEDAGUNONMYBREASTS; break;
|
||||
|
||||
case OPINIONEVENT_BANDAGED: gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] |= OPINIONFLAG_STAGE1_BANDAGED; break;
|
||||
|
||||
// drinking flags are a bit different - drinking can apply the GOOD or BAD flag, and they cancel each other out.
|
||||
// GOOD on GOOD causes SUPER, which cannot be removed (and stops this for today)
|
||||
// BAD on BAD causes WORSE, which cannot be removed (and stops this for today)
|
||||
case OPINIONEVENT_DRINKBUDDIES_GOOD:
|
||||
// if we do not already have the SUPER flag...
|
||||
if ( !(gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & (OPINIONFLAG_STAGE1_DRINKBUDDIES_SUPER | OPINIONFLAG_STAGE1_DRINKBUDDIES_WORSE)) )
|
||||
{
|
||||
// if we already have GOOD, get SUPER
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD )
|
||||
{
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] |= OPINIONFLAG_STAGE1_DRINKBUDDIES_SUPER;
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] &= ~OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD;
|
||||
}
|
||||
// if we have BAD, cancel it out
|
||||
else if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD )
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] &= ~OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD;
|
||||
// if we have nothing, get GOOD
|
||||
else
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] |= OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD;
|
||||
}
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_DRINKBUDDIES_BAD:
|
||||
// if we do not already have the SUPER flag...
|
||||
if ( !(gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & (OPINIONFLAG_STAGE1_DRINKBUDDIES_SUPER | OPINIONFLAG_STAGE1_DRINKBUDDIES_WORSE)) )
|
||||
{
|
||||
// if we already have BAD, get WORSE
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD )
|
||||
{
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] |= OPINIONFLAG_STAGE1_DRINKBUDDIES_WORSE;
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] &= ~OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD;
|
||||
}
|
||||
// if we have GOOD, cancel it out
|
||||
else if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD )
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] &= ~OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD;
|
||||
// if we have nothing, get BAD
|
||||
else
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] |= OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD;
|
||||
}
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
// get usProfileA's opinion of usProfileB concerning usEvent
|
||||
INT8 GetDynamicOpinion( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent )
|
||||
{
|
||||
INT32 opinion = 0;
|
||||
|
||||
if ( usProfileA == NO_PROFILE || usProfileA == NO_PROFILE )
|
||||
return opinion;
|
||||
|
||||
if ( usEvent >= OPINIONEVENT_MAX )
|
||||
return opinion;
|
||||
|
||||
// count how many relevant flags are set
|
||||
UINT8 numflags = 0;
|
||||
switch ( usEvent )
|
||||
{
|
||||
case OPINIONEVENT_FRIENDLYFIRE:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_FRIENDLYFIRE) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_FRIENDLYFIRE ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_FRIENDLYFIRE ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_FRIENDLYFIRE ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_SNITCHSOLDMEOUT:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_SNITCHSOLDMEOUT ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_SNITCHSOLDMEOUT ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_SNITCHSOLDMEOUT ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_SNITCHSOLDMEOUT ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_SNITCHINTERFERENCE:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_INTERFERENCE ) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_INTERFERENCE) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_INTERFERENCE ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_INTERFERENCE ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_FRIENDSWITHHATED:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_FRIENDSWITHHATED ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_FRIENDSWITHHATED ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_FRIENDSWITHHATED ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_FRIENDSWITHHATED ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_CONTRACTEXTENSION:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_CONTRACTEXTENSION ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_CONTRACTEXTENSION ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_CONTRACTEXTENSION ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_CONTRACTEXTENSION ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_ORDEREDRETREAT:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_ORDEREDRETREAT ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_ORDEREDRETREAT ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_ORDEREDRETREAT ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_ORDEREDRETREAT ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_CIVKILLER:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_CIVKILLER ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_CIVKILLER ) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_CIVKILLER) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_CIVKILLER) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_SLOWSUSDOWN:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE1_SLOWSUSDOWN) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE2_SLOWSUSDOWN) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE3_SLOWSUSDOWN) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][0] & OPINIONFLAG_STAGE4_SLOWSUSDOWN) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_NOSHARINGFOOD:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_NOSHARINGFOOD) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_NOSHARINGFOOD) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_NOSHARINGFOOD) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_NOSHARINGFOOD) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_ANNOYINGDISABILITY:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_ANNOYINGDISABILITY) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_ANNOYINGDISABILITY) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_ANNOYINGDISABILITY) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_ANNOYINGDISABILITY) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_ADDICT:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_ADDICT) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_ADDICT) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_ADDICT) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_ADDICT) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_THIEF:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_THIEF) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_THIEF) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_THIEF) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_THIEF) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_WORSTCOMMANDEREVER:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_WORSTCOMMANDEREVER) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_WORSTCOMMANDEREVER) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_WORSTCOMMANDEREVER) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_WORSTCOMMANDEREVER) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_RICHGUY:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_RICHGUY) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_RICHGUY) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_RICHGUY) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_RICHGUY) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_BETTERGEAR:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_BETTERGEAR) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_BETTERGEAR) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_BETTERGEAR) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_BETTERGEAR) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS:
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE1_YOUMOUNTEDAGUNONMYBREASTS) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE2_YOUMOUNTEDAGUNONMYBREASTS) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE3_YOUMOUNTEDAGUNONMYBREASTS) ++numflags;
|
||||
if (gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][1] & OPINIONFLAG_STAGE4_YOUMOUNTEDAGUNONMYBREASTS) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_BANDAGED:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_BANDAGED ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE2_BANDAGED ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE3_BANDAGED ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE4_BANDAGED ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_DRINKBUDDIES_GOOD:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE2_DRINKBUDDIES_GOOD ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE3_DRINKBUDDIES_GOOD ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE4_DRINKBUDDIES_GOOD ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_DRINKBUDDIES_SUPER:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_SUPER ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE2_DRINKBUDDIES_SUPER ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE3_DRINKBUDDIES_SUPER ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE4_DRINKBUDDIES_SUPER ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_DRINKBUDDIES_BAD:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE2_DRINKBUDDIES_BAD ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE3_DRINKBUDDIES_BAD ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE4_DRINKBUDDIES_BAD ) ++numflags;
|
||||
break;
|
||||
|
||||
case OPINIONEVENT_DRINKBUDDIES_WORSE:
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE1_DRINKBUDDIES_WORSE ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE2_DRINKBUDDIES_WORSE ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE3_DRINKBUDDIES_WORSE ) ++numflags;
|
||||
if ( gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][2] & OPINIONFLAG_STAGE4_DRINKBUDDIES_WORSE ) ++numflags;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// event opinion is number of times this happened times opinion modifer
|
||||
opinion = numflags * gMoraleSettings.bDynamicOpinionModifiers[usEvent];
|
||||
|
||||
// cut it down to INT8
|
||||
return (INT8)opinion;
|
||||
}
|
||||
|
||||
// daily rollover of opinions
|
||||
void HandleDynamicOpinions( )
|
||||
{
|
||||
for ( UINT8 usProfile = 0; usProfile < NUM_PROFILES; ++usProfile )
|
||||
{
|
||||
// each profile has its opinions on everyone else renewed
|
||||
RolloverDynamicOpinions( usProfile );
|
||||
}
|
||||
|
||||
SOLDIERTYPE* pSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pSoldier++ )
|
||||
{
|
||||
if ( pSoldier->bActive && pSoldier->ubProfile != NO_PROFILE &&
|
||||
!(pSoldier->bAssignment == IN_TRANSIT ||
|
||||
pSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
// or each profile, check wether everyone else is a friend of someone else we hate
|
||||
CheckForFriendsofHated( pSoldier );
|
||||
|
||||
// get annoyed on mercs that receive a lot more money than we do
|
||||
HandleDynamicOpinionWageJealousy( pSoldier );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// a day has passed, 'age' opinions
|
||||
void RolloverDynamicOpinions( UINT8 usProfileA )
|
||||
{
|
||||
for ( UINT8 usProfileB = 0; usProfileB < NUM_PROFILES; ++usProfileB )
|
||||
{
|
||||
for ( UINT8 i = 0; i < OPINION_FLAGMASKS_NUMBER; ++i )
|
||||
{
|
||||
// events that are at stage 4 are forgotten
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][i] &= ~OPINIONFLAG_STAGE4_ALL;
|
||||
|
||||
// all other events move up one stage
|
||||
gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][i] = gMercProfiles[usProfileA].usDynamicOpinionFlagmask[usProfileB][i] << 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check wether other people are friends with someone else we hate. All persons must be in Arulco
|
||||
void CheckForFriendsofHated( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
INT8 bMercID, bOtherID, bThirdID;
|
||||
INT8 bOpinion = -1;
|
||||
INT8 bSecondOpinion = -1;
|
||||
INT8 bLastTeamID;
|
||||
SOLDIERTYPE* pOtherSoldier;
|
||||
SOLDIERTYPE* pThirdSoldier;
|
||||
|
||||
bMercID = pSoldier->ubID;
|
||||
bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
|
||||
// loop through all other mercs
|
||||
bOtherID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
for ( pOtherSoldier = MercPtrs[bOtherID]; bOtherID <= bLastTeamID; ++bOtherID, pOtherSoldier++ )
|
||||
{
|
||||
// skip past ourselves and all inactive mercs
|
||||
if ( bOtherID != bMercID && pOtherSoldier->bActive && pOtherSoldier->ubProfile != NO_PROFILE &&
|
||||
!(pOtherSoldier->bAssignment == IN_TRANSIT ||
|
||||
pOtherSoldier->bAssignment == ASSIGNMENT_DEAD ) )
|
||||
{
|
||||
bOpinion = SoldierRelation( pSoldier, pOtherSoldier );
|
||||
|
||||
// we cannot simply check for HATED_OPINION here - this very feature makes opinions not so easy anymore. Simply check for a range
|
||||
if ( bOpinion < -20 )
|
||||
{
|
||||
// there is someone in our team that we hate. We dislike his friends somewhat, purely because they like our foe
|
||||
// loop through all other mercs
|
||||
bThirdID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
for ( pThirdSoldier = MercPtrs[bThirdID]; bThirdID <= bLastTeamID; ++bThirdID, pThirdSoldier++ )
|
||||
{
|
||||
// skip past ourselves and all inactive mercs
|
||||
if ( bThirdID != bMercID && bThirdID != bOtherID && pThirdSoldier->bActive && pThirdSoldier->ubProfile != NO_PROFILE &&
|
||||
!(pThirdSoldier->bAssignment == IN_TRANSIT ||
|
||||
pThirdSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
bSecondOpinion = SoldierRelation( pThirdSoldier, pOtherSoldier );
|
||||
|
||||
if ( bSecondOpinion > 20 )
|
||||
{
|
||||
// this guy is friends with someone we hate! We dislike him a bit for that
|
||||
AddOpinionEvent( pSoldier->ubProfile, pThirdSoldier->ubProfile, OPINIONEVENT_FRIENDSWITHHATED );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionOnContractExtension( UINT8 ubCode, UINT8 usProfile )
|
||||
{
|
||||
if ( usProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
if ( ubCode == EXTENDED_CONTRACT_BY_1_DAY || ubCode == EXTENDED_CONTRACT_BY_1_WEEK || ubCode == EXTENDED_CONTRACT_BY_2_WEEKS )
|
||||
{
|
||||
INT16 id = GetSoldierIDFromMercID( usProfile );
|
||||
if ( id > -1 )
|
||||
{
|
||||
SOLDIERTYPE* pSoldierWhoGotPaid = MercPtrs[id];
|
||||
|
||||
// only for AIM mercs
|
||||
if ( pSoldierWhoGotPaid->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC )
|
||||
return;
|
||||
|
||||
// determine the remaining length of his contract BEFORE it go renewed
|
||||
INT32 oldcontract = pSoldierWhoGotPaid->iEndofContractTime;
|
||||
if ( ubCode == EXTENDED_CONTRACT_BY_1_DAY )
|
||||
oldcontract -= 1440;
|
||||
else if ( ubCode == EXTENDED_CONTRACT_BY_1_WEEK )
|
||||
oldcontract -= 7 * 1440;
|
||||
else if ( ubCode == EXTENDED_CONTRACT_BY_2_WEEKS )
|
||||
oldcontract -= 14 * 1440;
|
||||
|
||||
// someones contract got extended. Other mercs who have less time on their contract will be annoyed by this, as they feel they shoul be paid first
|
||||
SOLDIERTYPE* pSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pSoldier++ )
|
||||
{
|
||||
if ( pSoldier->bActive && pSoldier->ubProfile != NO_PROFILE && pSoldier->ubProfile != usProfile &&
|
||||
!(pSoldier->bAssignment == IN_TRANSIT ||
|
||||
pSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
// only for AIM mercs
|
||||
if ( pSoldier->ubProfile == NO_PROFILE || pSoldier->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC )
|
||||
continue;
|
||||
|
||||
if ( pSoldier->iEndofContractTime < oldcontract )
|
||||
{
|
||||
// this guy got paid at a point where we had less time than he did! Favouritism!
|
||||
AddOpinionEvent( pSoldier->ubProfile, usProfile, OPINIONEVENT_CONTRACTEXTENSION );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionCivKill( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
if ( (gMercProfiles[pTeamSoldier->ubProfile].ubMiscFlags3 & PROFILE_MISC_FLAG3_GOODGUY) )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_CIVKILLER );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionSlowdown( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
INT32 iPercentEncumbranceOffended = CalculateCarriedWeight( pSoldier );
|
||||
if ( iPercentEncumbranceOffended > 100 )
|
||||
{
|
||||
// everyone else on the same squad gets annoyed, if they aren't overencumbered themselves, or at least not as much as the offender
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile && pTeamSoldier->bAssignment == pSoldier->bAssignment &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
INT32 iPercentEncumbrance = CalculateCarriedWeight( pTeamSoldier );
|
||||
|
||||
if ( iPercentEncumbrance < 100 || iPercentEncumbrance < 0.7 * iPercentEncumbranceOffended )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_SLOWSUSDOWN );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionWageJealousy( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
if ( !pSoldier->iTotalContractLength || (pSoldier->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC && pSoldier->ubWhatKindOfMercAmI != MERC_TYPE__MERC && pSoldier->ubWhatKindOfMercAmI != MERC_TYPE__NPC_WITH_UNEXTENDABLE_CONTRACT) )
|
||||
return;
|
||||
|
||||
// determine our mean daily wage
|
||||
UINT32 meanwage = gMercProfiles[pSoldier->ubProfile].uiTotalCostToDate / pSoldier->iTotalContractLength;
|
||||
|
||||
UINT8 explevel = pSoldier->stats.bExpLevel;
|
||||
|
||||
// hu?
|
||||
if ( !explevel )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
if ( !pTeamSoldier->iTotalContractLength || (pTeamSoldier->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC && pTeamSoldier->ubWhatKindOfMercAmI != MERC_TYPE__MERC && pTeamSoldier->ubWhatKindOfMercAmI != MERC_TYPE__NPC_WITH_UNEXTENDABLE_CONTRACT) )
|
||||
continue;
|
||||
|
||||
// their wage
|
||||
UINT32 theirmeanwage = gMercProfiles[pTeamSoldier->ubProfile].uiTotalCostToDate / pTeamSoldier->iTotalContractLength;
|
||||
|
||||
// adjust this for experience levels
|
||||
FLOAT explevelfactor = gGameExternalOptions.fDynamicWageFactor * pTeamSoldier->stats.bExpLevel / explevel;
|
||||
|
||||
if ( theirmeanwage > explevelfactor * meanwage )
|
||||
{
|
||||
AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_RICHGUY );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionDisability( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
pTeamSoldier->sSectorX == pSoldier->sSectorX && pTeamSoldier->sSectorY == pSoldier->sSectorY && pTeamSoldier->bSectorZ == pSoldier->bSectorZ &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_ANNOYINGDISABILITY );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionAddict( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_ADDICT );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionThief( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
pTeamSoldier->sSectorX == pSoldier->sSectorX && pTeamSoldier->sSectorY == pSoldier->sSectorY && pTeamSoldier->bSectorZ == pSoldier->bSectorZ &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_THIEF );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionFoodSharing( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE )
|
||||
return;
|
||||
|
||||
BOOLEAN fCheckFood = (pSoldier->bFoodLevel < FoodMoraleMods[FOOD_MERC_START_SHOW_HUNGER_SYMBOL].bThreshold);
|
||||
BOOLEAN fCheckDrink = (pSoldier->bDrinkLevel < FoodMoraleMods[FOOD_MERC_START_SHOW_HUNGER_SYMBOL].bThreshold);
|
||||
|
||||
// no hunger - no problem
|
||||
if ( !fCheckFood && !fCheckDrink )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
pTeamSoldier->sSectorX == pSoldier->sSectorX && pTeamSoldier->sSectorY == pSoldier->sSectorY && pTeamSoldier->bSectorZ == pSoldier->bSectorZ &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
if ( HasFoodInInventory( pTeamSoldier, fCheckFood, fCheckDrink ) )
|
||||
{
|
||||
AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_NOSHARINGFOOD );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionGear( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
// only in combat squads
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE || pSoldier->bAssignment >= ON_DUTY )
|
||||
return;
|
||||
|
||||
UINT8 highestcoolness = HighestInventoryCoolness( pSoldier );
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
pTeamSoldier->sSectorX == pSoldier->sSectorX && pTeamSoldier->sSectorY == pSoldier->sSectorY && pTeamSoldier->bSectorZ == pSoldier->bSectorZ &&
|
||||
pTeamSoldier->bAssignment < ON_DUTY &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
if ( HighestInventoryCoolness( pTeamSoldier ) > highestcoolness + 2 )
|
||||
{
|
||||
AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_BETTERGEAR );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionBattleLosses()
|
||||
{
|
||||
UINT32 badstuff = 0;
|
||||
|
||||
for ( UINT16 i = 0; i < CAMPAIGNHISTORY_SD_CIV; ++i )
|
||||
{
|
||||
badstuff += 5 * gCurrentIncident.usKills[i];
|
||||
badstuff += gCurrentIncident.usWounds[i];
|
||||
badstuff += 4 * gCurrentIncident.usPrisoners[i];
|
||||
}
|
||||
|
||||
if ( badstuff > 100 )
|
||||
{
|
||||
// this was a disaster (Ignoring of how high the enemies losses were to create drama :-) )! Someone needs to be blamed!
|
||||
SOLDIERTYPE* pScapeGoat = NULL;
|
||||
FLOAT bestdommanderrating = 0.0f;
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE &&
|
||||
pTeamSoldier->sSectorX == SECTORX( gCurrentIncident.usSector ) && pTeamSoldier->sSectorY == SECTORY( gCurrentIncident.usSector ) && pTeamSoldier->bSectorZ == gCurrentIncident.usLevel &&
|
||||
pTeamSoldier->bAssignment < ON_DUTY &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
FLOAT commanderrating = pTeamSoldier->stats.bExpLevel + NUM_SKILL_TRAITS( pTeamSoldier, SQUADLEADER_NT );
|
||||
|
||||
if ( commanderrating > bestdommanderrating )
|
||||
{
|
||||
bestdommanderrating = commanderrating;
|
||||
|
||||
pScapeGoat = pTeamSoldier;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we've found someone competent. Let's all blame him for this disaster!
|
||||
if ( bestdommanderrating > 0.0f )
|
||||
{
|
||||
bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE &&
|
||||
pTeamSoldier->ubProfile != pScapeGoat->ubProfile &&
|
||||
pTeamSoldier->sSectorX == SECTORX( gCurrentIncident.usSector ) && pTeamSoldier->sSectorY == SECTORY( gCurrentIncident.usSector ) && pTeamSoldier->bSectorZ == gCurrentIncident.usLevel &&
|
||||
pTeamSoldier->bAssignment < ON_DUTY &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pScapeGoat->ubProfile, OPINIONEVENT_WORSTCOMMANDEREVER );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionRetreat()
|
||||
{
|
||||
// this was a disaster (Ignoring of how high the enemies losses were to create drama :-) )! Someone needs to be blamed!
|
||||
SOLDIERTYPE* pScapeGoat = NULL;
|
||||
FLOAT bestdommanderrating = 0.0f;
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE &&
|
||||
pTeamSoldier->sSectorX == gWorldSectorX && pTeamSoldier->sSectorY == gWorldSectorY && (pTeamSoldier->bSectorZ == gbWorldSectorZ) &&
|
||||
pTeamSoldier->bAssignment < ON_DUTY &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
FLOAT commanderrating = pTeamSoldier->stats.bExpLevel + NUM_SKILL_TRAITS( pTeamSoldier, SQUADLEADER_NT );
|
||||
|
||||
if ( commanderrating > bestdommanderrating )
|
||||
{
|
||||
bestdommanderrating = commanderrating;
|
||||
|
||||
pScapeGoat = pTeamSoldier;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we've found someone competent. Let's all blame him for this disaster!
|
||||
if ( bestdommanderrating > 0.0f )
|
||||
{
|
||||
bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector gets annoyed
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE &&
|
||||
pTeamSoldier->ubProfile != pScapeGoat->ubProfile &&
|
||||
pTeamSoldier->sSectorX == gWorldSectorX && pTeamSoldier->sSectorY == gWorldSectorY && (pTeamSoldier->bSectorZ == gbWorldSectorZ) &&
|
||||
pTeamSoldier->bAssignment < ON_DUTY &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pScapeGoat->ubProfile, OPINIONEVENT_ORDEREDRETREAT );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDynamicOpinionTeamDrinking( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
// need to be drunk for this
|
||||
if ( !pSoldier || pSoldier->ubProfile == NO_PROFILE || !MercUnderTheInfluence( pSoldier, DRUG_TYPE_ALCOHOL ) )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||
for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ )
|
||||
{
|
||||
// everybody other merc in the same sector can get updated if they are drugged too
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->ubProfile != NO_PROFILE && pTeamSoldier->ubProfile != pSoldier->ubProfile &&
|
||||
pTeamSoldier->sSectorX == pSoldier->sSectorX && pTeamSoldier->sSectorY == pSoldier->sSectorY && pTeamSoldier->bSectorZ == pSoldier->bSectorZ &&
|
||||
MercUnderTheInfluence( pTeamSoldier, DRUG_TYPE_ALCOHOL ) &&
|
||||
!(pTeamSoldier->bAssignment == IN_TRANSIT ||
|
||||
pTeamSoldier->bAssignment == ASSIGNMENT_DEAD) )
|
||||
{
|
||||
// both mercs drink together, they opinion either improve or worsen
|
||||
if ( Chance( 67 ) )
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_GOOD );
|
||||
else
|
||||
AddOpinionEvent( pTeamSoldier->ubProfile, pSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_BAD );
|
||||
|
||||
if ( Chance( 67 ) )
|
||||
AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_GOOD );
|
||||
else
|
||||
AddOpinionEvent( pSoldier->ubProfile, pTeamSoldier->ubProfile, OPINIONEVENT_DRINKBUDDIES_BAD );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UINT8 HighestInventoryCoolness( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
UINT8 coolness = 0;
|
||||
|
||||
if ( !pSoldier )
|
||||
return coolness;
|
||||
|
||||
// search for food in our inventory
|
||||
INT8 invsize = (INT8)pSoldier->inv.size( ); // remember inventorysize, so we don't call size() repeatedly
|
||||
for ( INT8 bLoop = 0; bLoop < invsize; ++bLoop ) // ... for all items in our inventory ...
|
||||
{
|
||||
// ... if Item exists and is food ...
|
||||
if ( pSoldier->inv[bLoop].exists( ) )
|
||||
{
|
||||
coolness = max( coolness, Item[pSoldier->inv[bLoop].usItem].ubCoolness );
|
||||
}
|
||||
}
|
||||
|
||||
return coolness;
|
||||
}
|
||||
@@ -118,10 +118,6 @@ typedef struct MoraleEvent
|
||||
INT8 bChange;
|
||||
} MoraleEvent;
|
||||
|
||||
#define MAX_SNITCH_EVENTS 64;
|
||||
#define MAX_SNITCHES 16;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SNITCH_INTRODUCTION= 0,
|
||||
@@ -148,135 +144,6 @@ typedef struct SnitchEvent
|
||||
UINT8 ubSecondaryTargetProfile;
|
||||
} SnitchEvent;
|
||||
|
||||
// -------- added by Flugente: flags for opinions --------
|
||||
// easier than adding 32 differently named variables. DO NOT CHANGE THEM, UNLESS YOU KNOW WHAT YOU ARE DOING!!!
|
||||
// if someone influences our opinion, STAGE1 gets set. Every day, stages move up one step, until we 'forget' them
|
||||
// these flags describe what the other guy did to us....
|
||||
// flagmask 1
|
||||
#define OPINIONFLAG_STAGE1_FRIENDLYFIRE 0x00000001 //1 // fired on us
|
||||
#define OPINIONFLAG_STAGE2_FRIENDLYFIRE 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_FRIENDLYFIRE 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_FRIENDLYFIRE 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SNITCHSOLDMEOUT 0x00000010 //16 // has been snitching to the player about us
|
||||
#define OPINIONFLAG_STAGE2_SNITCHSOLDMEOUT 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_SNITCHSOLDMEOUT 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_SNITCHSOLDMEOUT 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_INTERFERENCE 0x00000100 //256 // is interfering with us (stopped us from taking drugs or stealing)
|
||||
#define OPINIONFLAG_STAGE2_INTERFERENCE 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_INTERFERENCE 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_INTERFERENCE 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_FRIENDSWITHHATED 0x00001000 //4096 // is friends with someone we hate
|
||||
#define OPINIONFLAG_STAGE2_FRIENDSWITHHATED 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_FRIENDSWITHHATED 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_FRIENDSWITHHATED 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_CONTRACTEXTENSION 0x00010000 //65536 // got his contract extended before we did, even though we had less time left
|
||||
#define OPINIONFLAG_STAGE2_CONTRACTEXTENSION 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_CONTRACTEXTENSION 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_CONTRACTEXTENSION 0x00080000 //524288
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ORDEREDRETREAT 0x00100000 //1048576 // was commander (most senior merc around) and ordered retreat
|
||||
#define OPINIONFLAG_STAGE2_ORDEREDRETREAT 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_ORDEREDRETREAT 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_ORDEREDRETREAT 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_CIVKILLER 0x01000000 //16777216 // killed an unarmed civilian
|
||||
#define OPINIONFLAG_STAGE2_CIVKILLER 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_CIVKILLER 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_CIVKILLER 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_SLOWSUSDOWN 0x10000000 //268435456 // is overloaded and thus slows us down
|
||||
#define OPINIONFLAG_STAGE2_SLOWSUSDOWN 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_SLOWSUSDOWN 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_SLOWSUSDOWN 0x80000000 //2147483648
|
||||
|
||||
// flagmask 2
|
||||
#define OPINIONFLAG_STAGE1_NOSHARINGFOOD 0x00000001 //1 // had water/food when we needed it. So he did not share!
|
||||
#define OPINIONFLAG_STAGE2_NOSHARINGFOOD 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_NOSHARINGFOOD 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_NOSHARINGFOOD 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ANNOYINGDISABILITY 0x00000010 //16 // disability kicked in at a bad time, putting the team at risk (forgeful, nervous, psycho...)
|
||||
#define OPINIONFLAG_STAGE2_ANNOYINGDISABILITY 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_ANNOYINGDISABILITY 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_ANNOYINGDISABILITY 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_ADDICT 0x00000100 //256 // is taking drugs
|
||||
#define OPINIONFLAG_STAGE2_ADDICT 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_ADDICT 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_ADDICT 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_THIEF 0x00001000 //4096 // is stealing items
|
||||
#define OPINIONFLAG_STAGE2_THIEF 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_THIEF 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_THIEF 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_WORSTCOMMANDEREVER 0x00010000 //65536 // was commander (most senior merc around) when a lot of our people (including militia) died
|
||||
#define OPINIONFLAG_STAGE2_WORSTCOMMANDEREVER 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_WORSTCOMMANDEREVER 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_WORSTCOMMANDEREVER 0x00080000 //524288
|
||||
|
||||
#define OPINIONFLAG_STAGE1_RICHGUY 0x00100000 //1048576 // gets paid a lot more than we do
|
||||
#define OPINIONFLAG_STAGE2_RICHGUY 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_RICHGUY 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_RICHGUY 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_BETTERGEAR 0x01000000 //16777216 // has a lot better gear than we do
|
||||
#define OPINIONFLAG_STAGE2_BETTERGEAR 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_BETTERGEAR 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_BETTERGEAR 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_YOUMOUNTEDAGUNONMYBREASTS 0x10000000 //268435456 // used our body to rest his gun on
|
||||
#define OPINIONFLAG_STAGE2_YOUMOUNTEDAGUNONMYBREASTS 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_YOUMOUNTEDAGUNONMYBREASTS 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_YOUMOUNTEDAGUNONMYBREASTS 0x80000000 //2147483648
|
||||
|
||||
// flagmask 3
|
||||
#define OPINIONFLAG_STAGE1_BANDAGED 0x00000001 //1 // bandaged our wounds
|
||||
#define OPINIONFLAG_STAGE2_BANDAGED 0x00000002 //2
|
||||
#define OPINIONFLAG_STAGE3_BANDAGED 0x00000004 //4
|
||||
#define OPINIONFLAG_STAGE4_BANDAGED 0x00000008 //8
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_GOOD 0x00000010 //16 // had a drink with him, he's okay.
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_GOOD 0x00000020 //32
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_GOOD 0x00000040 //64
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_GOOD 0x00000080 //128
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_SUPER 0x00000100 //256 // had a drink with him, he's super okay
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_SUPER 0x00000200 //512
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_SUPER 0x00000400 //1024
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_SUPER 0x00000800 //2048
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_BAD 0x00001000 //4096 // had a drink with him, don't like him
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_BAD 0x00002000 //8192
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_BAD 0x00004000 //16384
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_BAD 0x00008000 //32768
|
||||
|
||||
#define OPINIONFLAG_STAGE1_DRINKBUDDIES_WORSE 0x00010000 //65536 // had a drink with him, and I REALLY don't like him now
|
||||
#define OPINIONFLAG_STAGE2_DRINKBUDDIES_WORSE 0x00020000 //131072
|
||||
#define OPINIONFLAG_STAGE3_DRINKBUDDIES_WORSE 0x00040000 //262144
|
||||
#define OPINIONFLAG_STAGE4_DRINKBUDDIES_WORSE 0x00080000 //524288
|
||||
|
||||
/*#define OPINIONFLAG_STAGE1_RICHGUY 0x00100000 //1048576 // gets paid a lot more than we do
|
||||
#define OPINIONFLAG_STAGE2_RICHGUY 0x00200000 //2097152
|
||||
#define OPINIONFLAG_STAGE3_RICHGUY 0x00400000 //4194304
|
||||
#define OPINIONFLAG_STAGE4_RICHGUY 0x00800000 //8388608
|
||||
|
||||
#define OPINIONFLAG_STAGE1_BETTERGEAR 0x01000000 //16777216 // has a lot better gear than we do
|
||||
#define OPINIONFLAG_STAGE2_BETTERGEAR 0x02000000 //33554432
|
||||
#define OPINIONFLAG_STAGE3_BETTERGEAR 0x04000000 //67108864
|
||||
#define OPINIONFLAG_STAGE4_BETTERGEAR 0x08000000 //134217728
|
||||
|
||||
#define OPINIONFLAG_STAGE1_YOUMOUNTEDAGUNONMYBREASTS 0x10000000 //268435456 // used our body to rest his gun on
|
||||
#define OPINIONFLAG_STAGE2_YOUMOUNTEDAGUNONMYBREASTS 0x20000000 //536870912
|
||||
#define OPINIONFLAG_STAGE3_YOUMOUNTEDAGUNONMYBREASTS 0x40000000 //1073741824
|
||||
#define OPINIONFLAG_STAGE4_YOUMOUNTEDAGUNONMYBREASTS 0x80000000 //2147483648*/
|
||||
|
||||
#define OPINIONFLAG_STAGE4_ALL 0x88888888 // flags of all final stages, used when rolling over
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
extern void HandleMoraleEvent( SOLDIERTYPE * pSoldier, INT8 bMoraleEvent, INT16 sMapX, INT16 sMapY, INT8 bMapZ );
|
||||
extern void RefreshSoldierMorale( SOLDIERTYPE * pSoldier );
|
||||
@@ -290,40 +157,4 @@ void DailyMoraleUpdate( SOLDIERTYPE *pSoldier );
|
||||
|
||||
void DecayTacticalMoraleModifiers( void );
|
||||
|
||||
// Flugente: calculate A's opinion of B
|
||||
INT8 SoldierRelation( SOLDIERTYPE* pSoldierA, SOLDIERTYPE* pSoldierB);
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
// modify usProfileA's opinion of usProfileB because of usEvent
|
||||
void AddOpinionEvent( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent );
|
||||
|
||||
// get usProfileA's opinion of usProfileB concerning usEvent
|
||||
INT8 GetDynamicOpinion( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent );
|
||||
|
||||
// daily rollover of opinions
|
||||
void HandleDynamicOpinions();
|
||||
|
||||
// a day has passed, 'age' opinions
|
||||
void RolloverDynamicOpinions( UINT8 usProfileA );
|
||||
|
||||
// check wether other people are friends with someone else we hate. All persons must be in Arulco
|
||||
void CheckForFriendsofHated( SOLDIERTYPE* pSoldier );
|
||||
|
||||
void HandleDynamicOpinionOnContractExtension( UINT8 ubCode, UINT8 usProfile );
|
||||
void HandleDynamicOpinionCivKill( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionSlowdown( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionWageJealousy( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionDisability( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionAddict( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionThief( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionFoodSharing( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionGear( SOLDIERTYPE* pSoldier );
|
||||
void HandleDynamicOpinionBattleLosses();
|
||||
void HandleDynamicOpinionRetreat();
|
||||
void HandleDynamicOpinionTeamDrinking( SOLDIERTYPE* pSoldier );
|
||||
|
||||
UINT8 HighestInventoryCoolness( SOLDIERTYPE* pSoldier );
|
||||
|
||||
void HandleDynamicOpinionDialogue();
|
||||
|
||||
#endif
|
||||
@@ -111,6 +111,7 @@
|
||||
#include "bullets.h"
|
||||
#include "Inventory Choosing.h" // added by Flugente for TakeMilitiaEquipmentfromSector()
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#include "DynamicDialogue.h" // added by Flugente for HandleDynamicOpinions()
|
||||
#endif
|
||||
#include "connect.h"
|
||||
|
||||
@@ -2482,7 +2483,7 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
UnSetUIBusy( pSoldier->ubID );
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
HandleDynamicOpinionDisability( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3224,7 +3225,7 @@ void InternalSelectSoldier( UINT16 usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fF
|
||||
pSoldier->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
HandleDynamicOpinionDisability( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -3237,7 +3238,7 @@ void InternalSelectSoldier( UINT16 usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fF
|
||||
pSoldier->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
HandleDynamicOpinionDisability( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
#include "GameSettings.h"
|
||||
#include "Animation Data.h"
|
||||
#include "Soldier Control.h"
|
||||
#include "Interface.h" // added by Flugente for zBackground
|
||||
#include "Interface.h" // added by Flugente for zBackground
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
extern void ReducePointsForHunger( SOLDIERTYPE *pSoldier, UINT32 *pusPoints );
|
||||
@@ -785,7 +786,7 @@ INT32 SkillCheck( SOLDIERTYPE * pSoldier, INT8 bReason, INT8 bChanceMod )
|
||||
TacticalCharacterDialogue( pSoldier, QUOTE_PERSONALITY_TRAIT );
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
HandleDynamicOpinionDisability( pSoldier );
|
||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE );
|
||||
}
|
||||
// do we realize that we just can't do this?
|
||||
if ( (100 - (pSoldier->ubSkillCheckAttempts - 2) * 20) < EffectiveWisdom( pSoldier ) )
|
||||
|
||||
@@ -1839,7 +1839,7 @@ INT16 GetSoldierIDFromMercID(UINT8 ubMercID)
|
||||
ubLastTeamID = gTacticalStatus.Team[ OUR_TEAM ].bLastID;
|
||||
|
||||
// look for all mercs on the same team,
|
||||
for ( pTeamSoldier = MercPtrs[ cnt ]; cnt <= ubLastTeamID; cnt++,pTeamSoldier++)
|
||||
for ( pTeamSoldier = MercPtrs[ cnt ]; cnt <= ubLastTeamID; ++cnt, pTeamSoldier++)
|
||||
{
|
||||
if ( pTeamSoldier->ubProfile == ubMercID )
|
||||
{
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
#include "Strategic Status.h"
|
||||
#include "Food.h"
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#include "DynamicDialogue.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
// anv: for enemy taunts
|
||||
@@ -3939,7 +3940,7 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsOthers++;
|
||||
|
||||
// Flugente: dynamic opinions
|
||||
HandleDynamicOpinionCivKill( MercPtrs[ubAttacker] );
|
||||
HandleDynamicOpinionChange( MercPtrs[ubAttacker], OPINIONEVENT_CIVKILLER, TRUE, TRUE );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
+4256
-4254
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,10 @@
|
||||
#define OLD_MAXPATROLGRIDS 10
|
||||
#define MAXPATROLGRIDS OLD_MAXPATROLGRIDS
|
||||
|
||||
// WANNE: Yes I know, we support up to 254 profiles, but because of compatibility, profile Id = 200
|
||||
// is not a valid profil. We in MercProfiles.xml, the profile id = 200 should not be used!
|
||||
#define NO_PROFILE 200
|
||||
|
||||
#include "Animation Cache.h"
|
||||
#include "Timer Control.h"
|
||||
#include "vobject.h"
|
||||
@@ -41,10 +45,6 @@ extern UINT16 CivLastNames[MAXCIVLASTNAMES][10];
|
||||
|
||||
#define LOCKED_NO_NEWGRIDNO 2
|
||||
|
||||
// WANNE: Yes I know, we support up to 254 profiles, but because of compatibility, profile Id = 200
|
||||
// is not a valid profil. We in MercProfiles.xml, the profile id = 200 should not be used!
|
||||
#define NO_PROFILE 200
|
||||
|
||||
#define BATTLE_SND_LOWER_VOLUME 1
|
||||
|
||||
#define TAKE_DAMAGE_GUNFIRE 1
|
||||
|
||||
@@ -809,6 +809,8 @@ BOOLEAN LoadMercProfiles(void)
|
||||
gMercProfiles[uiLoop].usBackground = 0;
|
||||
|
||||
memset( &gMercProfiles[uiLoop].usDynamicOpinionFlagmask, 0, sizeof(gMercProfiles[uiLoop].usDynamicOpinionFlagmask) );
|
||||
|
||||
memset( &gMercProfiles[uiLoop].sDynamicOpinionLongTerm, 0, sizeof(gMercProfiles[uiLoop].sDynamicOpinionLongTerm) );
|
||||
}
|
||||
|
||||
// WANNE - BMP: DONE!
|
||||
|
||||
@@ -402,6 +402,10 @@
|
||||
RelativePath=".\Drugs And Alcohol.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DynamicDialogue.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\End Game.h"
|
||||
>
|
||||
@@ -748,6 +752,10 @@
|
||||
RelativePath=".\Drugs And Alcohol.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DynamicDialogue.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\End Game.cpp"
|
||||
>
|
||||
|
||||
@@ -406,6 +406,10 @@
|
||||
RelativePath="Drugs And Alcohol.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DynamicDialogue.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="End Game.h"
|
||||
>
|
||||
@@ -750,6 +754,10 @@
|
||||
RelativePath="Drugs And Alcohol.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DynamicDialogue.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="End Game.cpp"
|
||||
>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<ClInclude Include="Dialogue Control.h" />
|
||||
<ClInclude Include="DisplayCover.h" />
|
||||
<ClInclude Include="Drugs And Alcohol.h" />
|
||||
<ClInclude Include="DynamicDialogue.h" />
|
||||
<ClInclude Include="End Game.h" />
|
||||
<ClInclude Include="Enemy Soldier Save.h" />
|
||||
<ClInclude Include="EnemyItemDrops.h" />
|
||||
@@ -125,6 +126,7 @@
|
||||
<ClCompile Include="Dialogue Control.cpp" />
|
||||
<ClCompile Include="DisplayCover.cpp" />
|
||||
<ClCompile Include="Drugs And Alcohol.cpp" />
|
||||
<ClInclude Include="DynamicDialogue.cpp" />
|
||||
<ClCompile Include="End Game.cpp" />
|
||||
<ClCompile Include="Enemy Soldier Save.cpp" />
|
||||
<ClCompile Include="EnemyItemDrops.cpp" />
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<ClInclude Include="Dialogue Control.h" />
|
||||
<ClInclude Include="DisplayCover.h" />
|
||||
<ClInclude Include="Drugs And Alcohol.h" />
|
||||
<ClInclude Include="DynamicDialogue.h" />
|
||||
<ClInclude Include="End Game.h" />
|
||||
<ClInclude Include="Enemy Soldier Save.h" />
|
||||
<ClInclude Include="EnemyItemDrops.h" />
|
||||
@@ -105,7 +106,7 @@
|
||||
<ClInclude Include="TeamTurns.h" />
|
||||
<ClInclude Include="UI Cursors.h" />
|
||||
<ClInclude Include="Vehicles.h" />
|
||||
<ClInclude Include="VehicleMenu.h" />
|
||||
<ClInclude Include="VehicleMenu.h" />
|
||||
<ClInclude Include="Weapons.h" />
|
||||
<ClInclude Include="World Items.h" />
|
||||
<ClInclude Include="XML.h" />
|
||||
@@ -126,6 +127,7 @@
|
||||
<ClCompile Include="Dialogue Control.cpp" />
|
||||
<ClCompile Include="DisplayCover.cpp" />
|
||||
<ClCompile Include="Drugs And Alcohol.cpp" />
|
||||
<ClCompile Include="DynamicDialogue.cpp" />
|
||||
<ClCompile Include="End Game.cpp" />
|
||||
<ClCompile Include="Enemy Soldier Save.cpp" />
|
||||
<ClCompile Include="EnemyItemDrops.cpp" />
|
||||
@@ -188,7 +190,7 @@
|
||||
<ClCompile Include="Turn Based Input.cpp" />
|
||||
<ClCompile Include="UI Cursors.cpp" />
|
||||
<ClCompile Include="Vehicles.cpp" />
|
||||
<ClCompile Include="VehicleMenu.cpp" />
|
||||
<ClCompile Include="VehicleMenu.cpp" />
|
||||
<ClCompile Include="Weapons.cpp" />
|
||||
<ClCompile Include="World Items.cpp" />
|
||||
<ClCompile Include="XML_AmmoStrings.cpp" />
|
||||
@@ -219,13 +221,13 @@
|
||||
<ClCompile Include="XML_IMPItemChoices.cpp" />
|
||||
<ClCompile Include="XML_IncompatibleAttachments.cpp" />
|
||||
<ClCompile Include="XML_ItemAdjustments.cpp" />
|
||||
<ClCompile Include="XML_Keys.cpp" />
|
||||
<ClCompile Include="XML_Keys.cpp" />
|
||||
<ClCompile Include="XML_Launchable.cpp" />
|
||||
<ClCompile Include="XML_LBEPocket.cpp" />
|
||||
<ClCompile Include="XML_LBEPocketPopup.cpp" />
|
||||
<ClCompile Include="XML_LoadBearingEquipment.cpp" />
|
||||
<ClCompile Include="XML_LoadScreenHints.cpp" />
|
||||
<ClCompile Include="XML_Locks.cpp" />
|
||||
<ClCompile Include="XML_Locks.cpp" />
|
||||
<ClCompile Include="XML_Magazine.cpp" />
|
||||
<ClCompile Include="XML_Merchants.cpp" />
|
||||
<ClCompile Include="XML_MercStartingGear.cpp" />
|
||||
@@ -243,7 +245,7 @@
|
||||
<ClCompile Include="XML_Sounds.cpp" />
|
||||
<ClCompile Include="XML_SpreadPatterns.cpp" />
|
||||
<ClCompile Include="XML_Taunts.cpp" />
|
||||
<ClCompile Include="XML_AdditionalTileProperties.cpp" />
|
||||
<ClCompile Include="XML_AdditionalTileProperties.cpp" />
|
||||
<ClCompile Include="XML_TonyInventory.cpp" />
|
||||
<ClCompile Include="XML_Vehicles.cpp" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
<ClInclude Include="Vehicles.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="VehicleMenu.h">
|
||||
<ClInclude Include="VehicleMenu.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Weapons.h">
|
||||
@@ -270,6 +270,9 @@
|
||||
<ClInclude Include="SkillMenu.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="DynamicDialogue.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Air Raid.cpp">
|
||||
@@ -488,7 +491,7 @@
|
||||
<ClCompile Include="Vehicles.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="VehicleMenu.cpp">
|
||||
<ClCompile Include="VehicleMenu.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Weapons.cpp">
|
||||
@@ -665,14 +668,17 @@
|
||||
<ClCompile Include="RandomMerc.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_AdditionalTileProperties.cpp">
|
||||
<ClCompile Include="XML_AdditionalTileProperties.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_Locks.cpp">
|
||||
<ClCompile Include="XML_Locks.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_Keys.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DynamicDialogue.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -308,7 +308,7 @@ typedef enum
|
||||
} RacistLevels;
|
||||
|
||||
// Flugente: dynamic opinons: number of profile flagmasks
|
||||
#define OPINION_FLAGMASKS_NUMBER 3
|
||||
#define OPINION_FLAGMASKS_NUMBER 5
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -958,6 +958,8 @@ public:
|
||||
// Flugente: flagmasks for dynamic opinions on each and every other person. Yes, this is significant in size
|
||||
UINT32 usDynamicOpinionFlagmask[NUM_PROFILES][OPINION_FLAGMASKS_NUMBER];
|
||||
|
||||
INT8 sDynamicOpinionLongTerm[NUM_PROFILES];
|
||||
|
||||
}; // MERCPROFILESTRUCT;
|
||||
|
||||
// WANNE - BMP: DONE!
|
||||
|
||||
+25
-48
@@ -29,7 +29,7 @@
|
||||
#define MERC_BACKGROUND_WIDTH 350
|
||||
#define MERC_BACKGROUND_HEIGHT 207
|
||||
|
||||
// the max number of pop up boxes availiable to user
|
||||
// the max number of pop up boxes available to user
|
||||
#define MAX_NUMBER_OF_POPUP_BOXES 10
|
||||
|
||||
// attempt to add box to pop up box list
|
||||
@@ -50,8 +50,6 @@ STR8 zMercBorderPopupFilenames[ ] = {
|
||||
"INTERFACE\\TactBluePopUp.sti",
|
||||
"INTERFACE\\TactPopUpMain.sti",
|
||||
"INTERFACE\\LaptopPopup.sti",
|
||||
|
||||
|
||||
};
|
||||
|
||||
// filenames for background popup .pcx's
|
||||
@@ -71,7 +69,6 @@ MercPopUpBox gBasicPopUpTextBox;
|
||||
// the current pop up box
|
||||
MercPopUpBox *gPopUpTextBox = NULL;
|
||||
|
||||
|
||||
// the old one
|
||||
MercPopUpBox *gOldPopUpTextBox = NULL;
|
||||
|
||||
@@ -106,7 +103,6 @@ BOOLEAN SetCurrentPopUpBox( UINT32 uiId )
|
||||
|
||||
BOOLEAN OverrideMercPopupBox( MercPopUpBox *pMercBox )
|
||||
{
|
||||
|
||||
// store old box and set current this passed one
|
||||
gOldPopUpTextBox = gPopUpTextBox;
|
||||
|
||||
@@ -146,17 +142,15 @@ BOOLEAN InitMercPopupBox( )
|
||||
FilenameForBPP("INTERFACE\\msgboxiconskull.sti", VObjectDesc.ImageFile);
|
||||
if( !AddVideoObject( &VObjectDesc, &guiSkullIcons ) )
|
||||
AssertMsg(0, "Missing INTERFACE\\msgboxiconskull.sti" );
|
||||
|
||||
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN ShutDownPopUpBoxes( )
|
||||
{
|
||||
|
||||
INT32 iCounter = 0;
|
||||
for( iCounter = 0; iCounter < MAX_NUMBER_OF_POPUP_BOXES ; iCounter++ )
|
||||
for( iCounter = 0; iCounter < MAX_NUMBER_OF_POPUP_BOXES ; ++iCounter )
|
||||
{
|
||||
// now attempt to remove this box
|
||||
RemoveMercPopupBoxFromIndex( iCounter );
|
||||
@@ -212,14 +206,10 @@ void RemoveTextMercPopupImages( )
|
||||
gPopUpTextBox->fMercTextPopupInitialized = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
// done
|
||||
return;
|
||||
}
|
||||
|
||||
BOOLEAN RenderMercPopUpBoxFromIndex( INT32 iBoxId, INT16 sDestX, INT16 sDestY, UINT32 uiBuffer )
|
||||
{
|
||||
|
||||
// set the current box
|
||||
if( SetCurrentPopUpBox( iBoxId ) == FALSE )
|
||||
{
|
||||
@@ -236,8 +226,7 @@ BOOLEAN RenderMercPopupBox(INT16 sDestX, INT16 sDestY, UINT32 uiBuffer )
|
||||
// UINT32 uiSrcPitchBYTES;
|
||||
// UINT16 *pDestBuf;
|
||||
// UINT16 *pSrcBuf;
|
||||
|
||||
|
||||
|
||||
// will render/transfer the image from the buffer in the data structure to the buffer specified by user
|
||||
BOOLEAN fReturnValue = TRUE;
|
||||
|
||||
@@ -246,15 +235,13 @@ BOOLEAN RenderMercPopupBox(INT16 sDestX, INT16 sDestY, UINT32 uiBuffer )
|
||||
|
||||
// now lock it
|
||||
// pSrcBuf = ( UINT16* )LockVideoSurface( gPopUpTextBox->uiSourceBufferIndex, &uiSrcPitchBYTES);
|
||||
|
||||
|
||||
|
||||
//check to see if we are wanting to blit a transparent background
|
||||
if ( gPopUpTextBox->uiFlags & MERC_POPUP_PREPARE_FLAGS_TRANS_BACK )
|
||||
BltVideoSurface( uiBuffer, gPopUpTextBox->uiSourceBufferIndex, 0, sDestX, sDestY, VS_BLT_FAST | VS_BLT_USECOLORKEY, NULL );
|
||||
else
|
||||
BltVideoSurface( uiBuffer, gPopUpTextBox->uiSourceBufferIndex, 0, sDestX, sDestY, VS_BLT_FAST, NULL );
|
||||
|
||||
|
||||
|
||||
// blt, and grab return value
|
||||
// fReturnValue = Blt16BPPTo16BPP(pDestBuf, uiDestPitchBYTES, pSrcBuf, uiSrcPitchBYTES, sDestX, sDestY, 0, 0, gPopUpTextBox->sWidth, gPopUpTextBox->sHeight);
|
||||
|
||||
@@ -289,7 +276,7 @@ INT32 AddPopUpBoxToList( MercPopUpBox *pPopUpTextBox )
|
||||
}
|
||||
|
||||
// attempt to add box to list
|
||||
for( iCounter = 0; iCounter < MAX_NUMBER_OF_POPUP_BOXES; iCounter++ )
|
||||
for( iCounter = 0; iCounter < MAX_NUMBER_OF_POPUP_BOXES; ++iCounter )
|
||||
{
|
||||
if( gpPopUpBoxList[ iCounter ] == NULL )
|
||||
{
|
||||
@@ -360,7 +347,6 @@ INT32 PrepareMercPopupBox( INT32 iBoxId, UINT8 ubBackgroundIndex, UINT8 ubBorder
|
||||
MemFree( pPopUpTextBox );
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -429,6 +415,7 @@ INT32 PrepareMercPopupBox( INT32 iBoxId, UINT8 ubBackgroundIndex, UINT8 ubBorder
|
||||
|
||||
if( usWidth >= MERC_BACKGROUND_WIDTH )
|
||||
usWidth = MERC_BACKGROUND_WIDTH-1;
|
||||
|
||||
//make sure the area isnt bigger then the background texture
|
||||
if( ( usWidth >= MERC_BACKGROUND_WIDTH ) || usHeight >= MERC_BACKGROUND_HEIGHT)
|
||||
{
|
||||
@@ -439,6 +426,7 @@ INT32 PrepareMercPopupBox( INT32 iBoxId, UINT8 ubBackgroundIndex, UINT8 ubBorder
|
||||
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
// Create a background video surface to blt the face onto
|
||||
memset( &vs_desc, 0, sizeof( VSURFACE_DESC ) );
|
||||
vs_desc.fCreateFlags = VSURFACE_CREATE_DEFAULT | VSURFACE_SYSTEM_MEM_USAGE;
|
||||
@@ -454,7 +442,6 @@ INT32 PrepareMercPopupBox( INT32 iBoxId, UINT8 ubBackgroundIndex, UINT8 ubBorder
|
||||
*pActualWidth = usWidth;
|
||||
*pActualHeight = usHeight;
|
||||
|
||||
|
||||
DestRect.iLeft = 0;
|
||||
DestRect.iTop = 0;
|
||||
DestRect.iRight = DestRect.iLeft + usWidth;
|
||||
@@ -466,18 +453,17 @@ INT32 PrepareMercPopupBox( INT32 iBoxId, UINT8 ubBackgroundIndex, UINT8 ubBorder
|
||||
// Set source transparcenty
|
||||
SetVideoSurfaceTransparency( pPopUpTextBox->uiSourceBufferIndex, FROMRGB( 255, 255, 0 ) );
|
||||
|
||||
pDestBuf = (UINT16*)LockVideoSurface( pPopUpTextBox->uiSourceBufferIndex, &uiDestPitchBYTES);
|
||||
pDestBuf = (UINT16*)LockVideoSurface( pPopUpTextBox->uiSourceBufferIndex, &uiDestPitchBYTES);
|
||||
|
||||
usColorVal = Get16BPPColor( FROMRGB( 255, 255, 0 ) );
|
||||
usLoopEnd = ( usWidth * usHeight );
|
||||
|
||||
for ( i = 0; i <usLoopEnd; i++ )
|
||||
for ( i = 0; i <usLoopEnd; ++i )
|
||||
{
|
||||
pDestBuf[ i ] = usColorVal;
|
||||
}
|
||||
|
||||
UnLockVideoSurface(pPopUpTextBox->uiSourceBufferIndex);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -503,17 +489,17 @@ INT32 PrepareMercPopupBox( INT32 iBoxId, UINT8 ubBackgroundIndex, UINT8 ubBorder
|
||||
for(i=TEXT_POPUP_GAP_BN_LINES; i< usWidth-TEXT_POPUP_GAP_BN_LINES; i+=TEXT_POPUP_GAP_BN_LINES)
|
||||
{
|
||||
//TOP ROW
|
||||
BltVideoObject(pPopUpTextBox->uiSourceBufferIndex, hImageHandle, 1,i, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
BltVideoObject(pPopUpTextBox->uiSourceBufferIndex, hImageHandle, 1,i, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
//BOTTOM ROW
|
||||
BltVideoObject(pPopUpTextBox->uiSourceBufferIndex, hImageHandle, 6,i, usHeight - TEXT_POPUP_GAP_BN_LINES+6, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
BltVideoObject(pPopUpTextBox->uiSourceBufferIndex, hImageHandle, 6,i, usHeight - TEXT_POPUP_GAP_BN_LINES+6, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
}
|
||||
|
||||
//blit the left and right row of images
|
||||
usPosX = 0;
|
||||
for(i=TEXT_POPUP_GAP_BN_LINES; i< usHeight-TEXT_POPUP_GAP_BN_LINES; i+=TEXT_POPUP_GAP_BN_LINES)
|
||||
{
|
||||
BltVideoObject(pPopUpTextBox->uiSourceBufferIndex, hImageHandle, 3,usPosX, i, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
BltVideoObject(pPopUpTextBox->uiSourceBufferIndex, hImageHandle, 4,usPosX+usWidth-4, i, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
BltVideoObject(pPopUpTextBox->uiSourceBufferIndex, hImageHandle, 3,usPosX, i, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
BltVideoObject(pPopUpTextBox->uiSourceBufferIndex, hImageHandle, 4,usPosX+usWidth-4, i, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
}
|
||||
|
||||
//blt the corner images for the row
|
||||
@@ -549,8 +535,7 @@ INT32 PrepareMercPopupBox( INT32 iBoxId, UINT8 ubBackgroundIndex, UINT8 ubBorder
|
||||
{
|
||||
sDispTextXPos += 30;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//if language represents words with a single char
|
||||
#ifdef SINGLE_CHAR_WORDS
|
||||
{
|
||||
@@ -572,8 +557,7 @@ INT32 PrepareMercPopupBox( INT32 iBoxId, UINT8 ubBackgroundIndex, UINT8 ubBorder
|
||||
DisplayWrappedString( sDispTextXPos, (INT16)(( MERC_TEXT_POPUP_WINDOW_TEXT_OFFSET_Y + usMarginTopY ) ), usTextWidth, 2, MERC_TEXT_FONT, ubFontColor, pString, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||
SetFontShadow(DEFAULT_SHADOW);
|
||||
|
||||
@@ -582,19 +566,17 @@ INT32 PrepareMercPopupBox( INT32 iBoxId, UINT8 ubBackgroundIndex, UINT8 ubBorder
|
||||
// now return attemp to add to pop up box list, if successful will return index
|
||||
return( AddPopUpBoxToList( pPopUpTextBox ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
// set as current box
|
||||
SetCurrentPopUpBox( iBoxId );
|
||||
|
||||
return( iBoxId );
|
||||
}
|
||||
|
||||
// set as current box
|
||||
SetCurrentPopUpBox( iBoxId );
|
||||
|
||||
return( iBoxId );
|
||||
}
|
||||
|
||||
//Deletes the surface thats contains the border, background and the text.
|
||||
BOOLEAN RemoveMercPopupBox()
|
||||
{
|
||||
|
||||
INT32 iCounter = 0;
|
||||
|
||||
// make sure the current box does in fact exist
|
||||
@@ -607,16 +589,16 @@ BOOLEAN RemoveMercPopupBox()
|
||||
// now check to see if inited...
|
||||
if( gPopUpTextBox->fMercTextPopupSurfaceInitialized )
|
||||
{
|
||||
|
||||
// now find this box in the list
|
||||
for( iCounter = 0; iCounter < MAX_NUMBER_OF_POPUP_BOXES; iCounter++ )
|
||||
for( iCounter = 0; iCounter < MAX_NUMBER_OF_POPUP_BOXES; ++iCounter )
|
||||
{
|
||||
if( gpPopUpBoxList[ iCounter ] == gPopUpTextBox )
|
||||
{
|
||||
gpPopUpBoxList[ iCounter ] = NULL;
|
||||
iCounter = MAX_NUMBER_OF_POPUP_BOXES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// yep, get rid of the bloody...
|
||||
DeleteVideoSurfaceFromIndex(gPopUpTextBox->uiSourceBufferIndex);
|
||||
|
||||
@@ -628,11 +610,8 @@ BOOLEAN RemoveMercPopupBox()
|
||||
|
||||
// reset current ptr
|
||||
gPopUpTextBox = NULL;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
@@ -689,8 +668,6 @@ BOOLEAN SetPrepareMercPopupFlags( UINT32 uiFlags )
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN SetPrepareMercPopUpFlagsFromIndex( UINT32 uiFlags, UINT32 uiId )
|
||||
{
|
||||
// find this box, set it to current, and delete it
|
||||
|
||||
@@ -2778,6 +2778,27 @@ extern STR16 szTacticalInventoryDialogString[];
|
||||
extern STR16 szTacticalCoverDialogString[];
|
||||
extern STR16 szTacticalCoverDialogPrintString[];
|
||||
|
||||
// Flugente: dynamic dialogue
|
||||
extern STR16 szDynamicDialogueText_DOST_VICTIM_INITIATE[];
|
||||
extern STR16 szDynamicDialogueText_DOST_VICTIM_TO_INTERJECTOR_DENY[];
|
||||
extern STR16 szDynamicDialogueText_DOST_VICTIM_TO_INTERJECTOR_AGREE[];
|
||||
extern STR16 szDynamicDialogueText_DOST_CAUSE_TO_VICTIM_DENY[];
|
||||
extern STR16 szDynamicDialogueText_DOST_CAUSE_TO_VICTIM_AGREE[];
|
||||
extern STR16 szDynamicDialogueText_DOST_CAUSE_TO_INTERJECTOR_DENY[];
|
||||
extern STR16 szDynamicDialogueText_DOST_CAUSE_TO_INTERJECTOR_AGREE[];
|
||||
extern STR16 szDynamicDialogueText_DOST_INTERJECTOR_DIALOGUESELECTION[];
|
||||
extern STR16 szDynamicDialogueText_DOST_INTERJECTOR_TO_VICTIM_DENY[];
|
||||
extern STR16 szDynamicDialogueText_DOST_INTERJECTOR_TO_VICTIM_AGREE[];
|
||||
extern STR16 szDynamicDialogueText_DOST_INTERJECTOR_TO_CAUSE_DENY[];
|
||||
extern STR16 szDynamicDialogueText_DOST_INTERJECTOR_TO_CAUSE_AGREE[];
|
||||
extern STR16 szDynamicDialogueText_DOST_INTERJECTOR_SOLVE_REASON[];
|
||||
extern STR16 szDynamicDialogueText_DOST_INTERJECTOR_SOLVE_AGGRESSIVE[];
|
||||
extern STR16 szDynamicDialogueText_DOST_SIDEWITH_VICTIM[];
|
||||
extern STR16 szDynamicDialogueText_DOST_SIDEWITH_CAUSE[];
|
||||
|
||||
extern STR16 szDynamicDialogueText_DOST_INTERJECTOR_DIALOGUESELECTION_SHORTTEXT[];
|
||||
extern STR16 szDynamicDialogueText_GenderText[];
|
||||
|
||||
#define TACTICAL_INVENTORY_DIALOG_NUM 16
|
||||
#define TACTICAL_COVER_DIALOG_NUM 16
|
||||
|
||||
|
||||
@@ -8646,6 +8646,16 @@ STR16 szMercCompareEventText[]=
|
||||
L"%s is annoying when drunk",
|
||||
|
||||
L"%s is an idiot when drunk",
|
||||
L"%s opposed our view in an argument",
|
||||
L"%s supported our position",
|
||||
L"%s agrees to our reasoning",
|
||||
|
||||
L"%s's beliefs are contrary to ours",
|
||||
L"%s knows how to calm down people",
|
||||
L"%s is insensitive",
|
||||
L"%s puts people in their places",
|
||||
|
||||
L"%s is way too impulsive",
|
||||
};
|
||||
|
||||
STR16 szTacticalInventoryDialogString[]=
|
||||
@@ -8722,5 +8732,560 @@ STR16 szTacticalCoverDialogPrintString[]=
|
||||
L"Display trap network D",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_VICTIM_INITIATE[] =
|
||||
{
|
||||
L"What the hell! $CAUSE$ shot me!",
|
||||
L"Hey! Keep your mouth shut, $CAUSE$! Freakin' snitch!",
|
||||
L"$CAUSE$ is bullying me again!",
|
||||
L"Hmpf. Typical $CAUSE$, figured $CAUSE_GENDER$ would hang out with the wrong crowd!",
|
||||
|
||||
L"Yeah, sure. My contract's about to end, but no, gotta take care of $CAUSE$ first.",
|
||||
L"Nice command, $CAUSE$! Why would you order retreat?",
|
||||
L"What the hell is wrong with you, $CAUSE$? You just killed an innocent!",
|
||||
L"Can we get rid of $CAUSE$, please? That slowpoke is holding us back.",
|
||||
|
||||
L"Damn $CAUSE$, $CAUSE_GENDER$ is keeping all that tasty food to $CAUSE_PRONOUN$self...",
|
||||
L"Oh, come on, $CAUSE$. It's not a good moment!",
|
||||
L"$CAUSE$ is high like a zeppelin! How am I supposed to work with that junkie?",
|
||||
L"What the... Hey! $CAUSE$! Give it back, you damn thief!",
|
||||
|
||||
L"What a disaster. That was worst command ever, $CAUSE$!",
|
||||
L"How can $CAUSE$ earn this much? It's not fair!",
|
||||
L"$CAUSE$ is stocking the good gear for $CAUSE_PRONOUN$self. Not fair!",
|
||||
L"Do I look like a bipod? Get that thing off me, $CAUSE$!",
|
||||
|
||||
L"Thanks, $CAUSE$. I thought I was gonna bleed out.",
|
||||
L"Yeah, $CAUSE$! You get it! How 'bout next round?",
|
||||
L"$CAUSE$... you're... you are... hic... you're the best!",
|
||||
L"Damn, $CAUSE$! You... you got enough... Learn to keep your liquor...",
|
||||
|
||||
L"What the hell, $CAUSE$! Ugh... I'm never drinking with you again, you sicko.",
|
||||
L"I knew I couldn't depend on you, $CAUSE$!",
|
||||
L"Ha! See? $CAUSE$ agrees with me.",
|
||||
L"Yeah, even $CAUSE$ saw you do it!",
|
||||
|
||||
L"I can't believe you wouldn't agree with me on this, $CAUSE$.",
|
||||
L"Yeah... you're right, $CAUSE$. Peace?",
|
||||
L"No. This is a matter of principle.",
|
||||
L"Alright alright. Jeez. I'm over it, okay?",
|
||||
|
||||
L"Who do you think you are, $CAUSE$? No, I won't be quiet about this!",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_VICTIM_TO_INTERJECTOR_DENY[] =
|
||||
{
|
||||
L"What?!",
|
||||
L"No!",
|
||||
L"That is false!",
|
||||
L"That is not true!",
|
||||
|
||||
L"Lies, lies, lies. Nothing but lies!",
|
||||
L"Liar!",
|
||||
L"Traitor!",
|
||||
L"You watch your mouth!",
|
||||
|
||||
L"This is none of your business.",
|
||||
L"Who ever invited you?",
|
||||
L"Nobody asked for your opinion, $INTERJECTOR$.",
|
||||
L"You stay away from me.",
|
||||
|
||||
L"Why are you all against me?",
|
||||
L"Why are you against me, $INTERJECTOR$?",
|
||||
L"I knew it! $CAUSE$ and $INTERJECTOR$ are in cahoots!",
|
||||
L"Not listening...!",
|
||||
|
||||
L"I hate this psycho circus.",
|
||||
L"I hate this freak show.",
|
||||
L"Back off!",
|
||||
L"Lies, lies, lies...",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_VICTIM_TO_INTERJECTOR_AGREE[] =
|
||||
{
|
||||
L"Ha!",
|
||||
L"See?",
|
||||
L"I knew you'd back me, $INTERJECTOR$",
|
||||
L"I knew $INTERJECTOR$ would back me.",
|
||||
|
||||
L"Thanks, $INTERJECTOR$!",
|
||||
L"Once again I'm right!",
|
||||
L"See, $CAUSE$? I am right!",
|
||||
L"Once again $SPEAKER$ is right!",
|
||||
|
||||
L"Indeed.",
|
||||
L"Yup.",
|
||||
L"Aye.",
|
||||
L"What $INTERJECTOR$ said.",
|
||||
};
|
||||
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_CAUSE_TO_VICTIM_DENY[] =
|
||||
{
|
||||
L"What? Me? No way, I'm shooting at the enemy!",
|
||||
L"I would if you weren't such a wussy!",
|
||||
L"You're jeopardising the entire mission, and I won't let that stand any longer!",
|
||||
L"My friends are none of your business!",
|
||||
|
||||
L"Oh yeah? I'm actually useful. Perhaps that's why you didn't get an extension.",
|
||||
L"I just got us out of that hellhole, you should thank me for saving your life.",
|
||||
L"He had a gun, I saw it!",
|
||||
L"I wouldn't if you would carry your fair share of the gear, $VICTIM$!",
|
||||
|
||||
L"Not my problem if you already ate all your rations.",
|
||||
L"Just what I need. Good advice. Thanks, $VICTIM$, you are a big help.",
|
||||
L"Taking the stick out of your butt would be a starter, jeez...",
|
||||
L"Have you been drinking? What the hell is your problem?",
|
||||
|
||||
L"I don't have to take that from a grunt like you!",
|
||||
L"Dream on, $VICTIM$. I'm worth every penny, and you know it!",
|
||||
L"Contrary to you, I actually know how to use them.",
|
||||
L"Don't be such a wuss. This is war!",
|
||||
|
||||
L"I'm doing my job. Get back to yours!",
|
||||
L"Pah. I think you've had enough.",
|
||||
L"Tehehe. $VICTIM$, you are soooo wasted. You.. hic. You need to restrain yourself. Discipline, you know? Like me!",
|
||||
L"Cut it out, $VICTIM$! You clearly don't know when to stop!",
|
||||
|
||||
L"Oh SHUT UP $VICTIM$! You don't know how to beh.. beha... beha? Ehm... You make no sense. At all. Yeah. You're no fun.",
|
||||
L"Depend? It was all your fault!",
|
||||
L"'Even'? What does that mean?",
|
||||
L"No I did not!",
|
||||
|
||||
L"It's because you're wrong, that's why.",
|
||||
L"No. I won't let this go.",
|
||||
L"As if you had any to start with.",
|
||||
L"Cut it, drama queen.",
|
||||
|
||||
L"I'm the one who tells you to shut up! I'm your superior, $VICTIM$!",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_CAUSE_TO_VICTIM_AGREE[] =
|
||||
{
|
||||
L"Oops.",
|
||||
L"You heard that? Dammit.",
|
||||
L"Hey, it's for your own good. You'll thank me later.",
|
||||
L"Can't you two all get along, $VICTIM$?",
|
||||
|
||||
L"I'm sure you'll get your extension soon. You know how odd online banking can be.",
|
||||
L"They were flanking us, there was no other way!",
|
||||
L"Oh god. No! What have I done?",
|
||||
L"It's all this stuff, it's so heavy!",
|
||||
|
||||
L"Oh $VICTIM$, why didn't you say something then?",
|
||||
L"It's my only weakness, I can't help it!",
|
||||
L"Hey, I've seen some things man. And some stuff!",
|
||||
L"You noticed? Dammit... 50/50?",
|
||||
|
||||
L"Well, yeah, NOW that's obvious. Back then it wasn't.",
|
||||
L"You don't expect me to complain, do you?",
|
||||
L"Well, someone has to use it, right? Better luck next time!",
|
||||
L"Oh. Didn't see you for a minute there.",
|
||||
|
||||
L"Hey, we have to look after each other. You'd do the same, $VICTIM$.",
|
||||
L"Sure. Bring it on!",
|
||||
L"Hic... yeah. You too, $VICTIM$. You. hic.. too!",
|
||||
L"Tehehe. You are RIGHT. Hehe. Always right. Hic!",
|
||||
|
||||
L"Well you're no fu... fu... fu? Fun! You are not. Hic!. No.",
|
||||
L"Touched a nerve there, didn't I?",
|
||||
L"Yeah. I'm 100%% with $VICTIM$ on this.",
|
||||
L"And we won't be quiet about it, no sir!",
|
||||
|
||||
L"I'm surpried too, but that's how it is.",
|
||||
L"Hmm... ok!",
|
||||
L"Suit yourself then..",
|
||||
L"As long as it does not happen again.",
|
||||
|
||||
L"The two of us are going to have real problem soon, $VICTIM$.",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_CAUSE_TO_INTERJECTOR_DENY[] =
|
||||
{
|
||||
L"What?!",
|
||||
L"No!",
|
||||
L"That is false!",
|
||||
L"That is not true!",
|
||||
|
||||
L"Lies, lies, lies. Nothing but lies!",
|
||||
L"Liar!",
|
||||
L"Traitor!",
|
||||
L"You watch your mouth!",
|
||||
|
||||
L"This is none of your business.",
|
||||
L"Who ever invited you?",
|
||||
L"Nobody asked for your opinion, $INTERJECTOR$.",
|
||||
L"You stay away from me.",
|
||||
|
||||
L"Why are you all against me?",
|
||||
L"Why are you against me, $INTERJECTOR$?",
|
||||
L"I knew it! $VICTIM$ and $INTERJECTOR$ are in cahoots!",
|
||||
L"Not listening...!",
|
||||
|
||||
L"I hate this psycho circus.",
|
||||
L"I hate this freak show.",
|
||||
L"Back off!",
|
||||
L"Lies, lies, lies...",
|
||||
|
||||
L"I know what I saw.",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_CAUSE_TO_INTERJECTOR_AGREE[] =
|
||||
{
|
||||
L"Ha!",
|
||||
L"See?",
|
||||
L"I knew you'd back me, $INTERJECTOR$",
|
||||
L"I knew $INTERJECTOR$ would back me.",
|
||||
|
||||
L"Thanks, $INTERJECTOR$!",
|
||||
L"Once again I'm right!",
|
||||
L"See, $VICTIM$? I am right!",
|
||||
L"Once again $SPEAKER$ is right!",
|
||||
|
||||
L"Indeed.",
|
||||
L"Yup.",
|
||||
L"Aye.",
|
||||
L"What $INTERJECTOR$ said.",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_INTERJECTOR_DIALOGUESELECTION[] =
|
||||
{
|
||||
L"$CAUSE$ has shot $VICTIM$. What do you do?",
|
||||
L"$VICTIM$ is angry with $CAUSE$ because $CAUSE_GENDER$ spoke to you. What do you do?",
|
||||
L"$CAUSE$ has stopped $VICTIM$ from misbehaving, and $VICTIM_GENDER$ is out for revenge. What do you do?",
|
||||
L"$VICTIM$ doesn't like $CAUSE$'s friend. What do you do?",
|
||||
|
||||
L"$VICTIM$ is jealous as we extended $CAUSE$'s contract early. What do you do?",
|
||||
L"$VICTIM$ dislikes the retreat command $CAUSE$ gave. What do you do?",
|
||||
L"$VICTIM$ is furious: $CAUSE$ killed a civilian. What do you do?",
|
||||
L"$VICTIM$ feels $CAUSE$ slows down the team. What do you do?",
|
||||
|
||||
L"$VICTIM$ wants $CAUSE$'s food. What do you do?",
|
||||
L"$CAUSE$' tick is getting on $VICTIM$'s nerves. What do you do?",
|
||||
L"$CAUSE$ took drugs and $VICTIM$ saw it. What do you do?",
|
||||
L"$VICTIM$ saw $CAUSE$ steal an item. What do you do?",
|
||||
|
||||
L"$CAUSE$ does not trust $VICTIM$'s orders. What do you do?",
|
||||
L"$CAUSE$ is jealous of $VICTIM$'s paycheck. What do you do?",
|
||||
L"$CAUSE$ is jealous of $VICTIM$'s equipment. What do you do?",
|
||||
L"$CAUSE$ used $VICTIM$'s chest as a gun rack. How odd. What do you do?",
|
||||
|
||||
L"$CAUSE$ has bandaged $VICTIM$. What do you do?",
|
||||
L"Drunk $VICTIM$ likes $CAUSE$. What do you do?",
|
||||
L"Drunk $VICTIM$ dislikes $CAUSE$. What do you do?",
|
||||
L"$VICTIM$ is wasted and wants to be $VICTIM$'s buddy. What do you do?",
|
||||
|
||||
L"$VICTIM$ is wasted and wants to tear $VICTIM$ a new one. What do you do?",
|
||||
L"$VICTIM$ does not like was $CAUSE$ has to say. What do you do?",
|
||||
L"$VICTIM$ likes what $CAUSE$ has to say about $VICTIM_GENDER$. What do you do?",
|
||||
L"$VICTIM$ likes what $CAUSE$ said about the others. What do you do?",
|
||||
|
||||
L"$VICTIM$ does not like $CAUSE$ siding with the others. What do you do?",
|
||||
L"$VICTIM$ appreciates $CAUSE$'s conflict resolution. What do you do?",
|
||||
L"$VICTIM$ does not like $CAUSE$'s appeal. What do you do?",
|
||||
L"$VICTIM$ was reined in by $CAUSE$. What do you do?",
|
||||
|
||||
L"$VICTIM$ did not take $CAUSE$'s words of action well. What do you do?",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_INTERJECTOR_TO_VICTIM_DENY[] =
|
||||
{
|
||||
L"Nah, that must have been enemy fire!",
|
||||
L"Nono, $CAUSE$, speak up... What did $VICTIM$ do?",
|
||||
L"Then stop giving reasons for that!",
|
||||
L"Everybody can hang out with whom $CAUSE_GENDER$ wants!",
|
||||
|
||||
L"You are still getting paid, no? What does it matter as long as you get the money?",
|
||||
L"You know you can go back if you want... nobody's stopping you.",
|
||||
L"Better safe than sorry I say...",
|
||||
L"We leave nobody behind, not even $CAUSE$!",
|
||||
|
||||
L"We all get the same. If you used up yours already that's your problem.",
|
||||
L"What does it even matter to you? Don't you have something to do?",
|
||||
L"Hey, $CAUSE$ needs to ease the stress, ok?",
|
||||
L"If you don't have any proof, don't throw around accusations, $VICTIM$.",
|
||||
|
||||
L"Someone had take the lead and $CAUSE$ did it. Did you have a better plan?",
|
||||
L"Quit whining about the money, you get more than enough yourself!",
|
||||
L"You're just making up an excuse for your poor marksmanship.",
|
||||
L"Don't be such a wuss. This is war!",
|
||||
|
||||
L"Patched together again? Good, now move!",
|
||||
L"Yeah, enough booze for you today.",
|
||||
L"Whatever. We still have a job to do, so this party is over for you, $VICTIM$.",
|
||||
L"Relax, it's just a bit of booze",
|
||||
|
||||
L"Jeez $VICTIM$, why so uptight all of a sudden? Anything happened?",
|
||||
L"So you depend on others to do your job? Then what good are you?!",
|
||||
L"Don't let it go to your head.",
|
||||
L"I don't think so...",
|
||||
|
||||
L"Ugh. What now...",
|
||||
L"You're not getting away this easy.",
|
||||
L"You're just asking for trouble, right?",
|
||||
L"No reason to be so stiff about it.",
|
||||
|
||||
L"Pfft. Don't make a fuss out of it.",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_INTERJECTOR_TO_VICTIM_AGREE[] =
|
||||
{
|
||||
L"Yeah, I saw it too!",
|
||||
L"Yeah, mind your own business, $CAUSE$!",
|
||||
L"Drop it, $CAUSE$, who are you to tell us hat to do?!",
|
||||
L"Yeah, you guys are ugly!",
|
||||
|
||||
L"And your contract ends so soon, $CAUSE$... I hope you get an extension.",
|
||||
L"We were rockin' it until that point.",
|
||||
L"Yeah. The poor sod never had a chance. Damn.",
|
||||
L"We have to move fast, the enemy won't wait for us!",
|
||||
|
||||
L"If $CAUSE$ shares, I want some too!",
|
||||
L"Really $CAUSE$. This is a military organization and not a ward.",
|
||||
L"How unprofessional.",
|
||||
L"So thats the kind of people were stuck with, $VICIM$? I better watch my wallet then.",
|
||||
|
||||
L"Well, we aren't going to win this war at this rate...",
|
||||
L"In all honesty, $VICTIM$, I think you should adjust your rate!",
|
||||
L"Yeah, this smells of cronyism to me.",
|
||||
L"Wow. Are you trying to be a jerk, $CAUSE$, or is this normal for you?",
|
||||
|
||||
L"It'S good to have someone watching your back. That's what teamwork is all about.",
|
||||
L"Hoho, party!",
|
||||
L"Heeeey... this is actually kinda nice for a change.",
|
||||
L"Hey keep it down over there, okay?",
|
||||
|
||||
L"This party was cool until $CAUSE$ ruined it!",
|
||||
L"Indeed. Way to let $VICTIM$ hang!",
|
||||
L"Hey, don't forget about me!",
|
||||
L"Yeah, totally!",
|
||||
|
||||
L"Hum. Never saw that coming.",
|
||||
L"Glad you guys are not angry anymore.",
|
||||
L"Guess you're not getting away that easy, $CAUSE$.",
|
||||
L"Yeah, keep it down, will ya?",
|
||||
|
||||
L"Yeah, you won't boss us around anymore!",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_INTERJECTOR_TO_CAUSE_DENY[] =
|
||||
{
|
||||
L"Don't play stupid, $CAUSE$. You had a clear line of sight! What side are you on?",
|
||||
L"This isn't girls college, keep your snickerin to yourself, &CAUSE$.",
|
||||
L"You won't let that stand? Cute. Who ever made you the boss?",
|
||||
L"Then you should change your business. 'Cause its bad.",
|
||||
|
||||
L"Yeah. All that worth hasn't shown yet though.",
|
||||
L"Oh, now YOU got us out? By being the first to leave? How noble of you.",
|
||||
L"Don't talk crap. That was an unarmed civillian. We are here to protect these people!",
|
||||
L"Everybody carries his gear. How do you expect to fight if you can't even carry your gun?",
|
||||
|
||||
L"Why do you have so much food anyway? Do I smell extra rations there?.",
|
||||
L"Well, we are pros, an you're not, $CAUSE$.",
|
||||
L"This is war and not a stoner party. Cut it out, $CAUSE$!",
|
||||
L"HEY! You put that back right now!",
|
||||
|
||||
L"Then take it from me... that wasn't 'commanding' as much as 'handwaving'.",
|
||||
L"Worth it? All you do is pose!",
|
||||
L"If by 'use' you mean 'waste a lot bullets', then yeah, you are a pro.",
|
||||
L"You are and always will be an insensitive jerk, $CAUSE$.",
|
||||
|
||||
L"Jeez. Woken up on the wrong foot today?",
|
||||
L"Party pooper!",
|
||||
L"'I know discipline', said the clueless drunk...",
|
||||
L"You're just as drunk. Beat it, &CAUSE$!",
|
||||
|
||||
L"$CAUSE$! Shut it! You are a disgrace for this unit. Get out and sober up!",
|
||||
L"This isn't some schoolyard sympathy crap. It WAS your fault!",
|
||||
L"Apparently, sometimes even $CAUSE$ is deemed important...",
|
||||
L"Hu? You said you did.",
|
||||
|
||||
L"Oh come down from your high horse, $CAUSE$.",
|
||||
L"Oh come on. $VICTIM$ is letting it go, what's your issue now?",
|
||||
L"Don't be so flippant.",
|
||||
L"Pah. You're the one making all the fuss about it...",
|
||||
|
||||
L"You are certainly nobodies superior!",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_INTERJECTOR_TO_CAUSE_AGREE[] =
|
||||
{
|
||||
L"I saw it, it was clearly enemy fire!",
|
||||
L"Yeah. Man up!",
|
||||
L"Agreed. We can't let our guard down for a single moment!",
|
||||
L"What's that to you, $VICTIM$?",
|
||||
|
||||
L"Aww, that burns, doesn't it, $VICTIM$?",
|
||||
L"I sure di, $CAUSE$. Man, I don't want to go back THERE again.",
|
||||
L"An you took him down nice and clean, good job!",
|
||||
L"Aye, stop complaining. We go through this together or we don't do it at all.",
|
||||
|
||||
L"Right, everyone got enough back at the base...",
|
||||
L"Don't be such a snob, $VICTIM$.",
|
||||
L"Hehe. So true.",
|
||||
L"No idea. All of a sudden $VICTIM$ is all drama.",
|
||||
|
||||
L"We have a clear chain of command, and you sure as hell aren't on top, $VICTIM$!",
|
||||
L"Relax. At least some of us appreciate your service, $CAUSE$.",
|
||||
L"I'll second that!",
|
||||
L"Sometimes you just have to use your surroundings!",
|
||||
|
||||
L"Talk about a no-nonsense approach...",
|
||||
L"You sure like to keep a cool head, $CAUSE$.",
|
||||
L"Yeargh. Dis... gulp! Disciplined like... ehm... us!",
|
||||
L"Leave alcohol to the big ones, okay?",
|
||||
|
||||
L"Word!",
|
||||
L"Yeah, what's with the attitude?",
|
||||
L"Do I smell trouble here??",
|
||||
L"Yeah, don't twist what happened!",
|
||||
|
||||
L"Yeah, you are wrong, $VICTIM$!",
|
||||
L"You tell 'em, $CAUSE$!",
|
||||
L"Who needs principles anyway?",
|
||||
L"Yeah, drop that attitude, $VICTIM$.",
|
||||
|
||||
L"Not sure about that, but yep!",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_INTERJECTOR_SOLVE_REASON[] =
|
||||
{
|
||||
L"In the heat of battle, this can happen. Just be more careful next time, $CAUSE$.",
|
||||
L"I'm not sure wether it was the correct way, but $CAUSE_GENDER$ does have a point...",
|
||||
L"Can't you two sort this out?",
|
||||
L"Yeah yeah, very dramatic. Are you sure that is the MOST PRESSING issue right now?",
|
||||
|
||||
L"We have limited funds. Someone needs to get paid first, right?",
|
||||
L"We're still alive, this is what counts.",
|
||||
L"This is war. People die all the time... though I'd prefer it if it were less obvious that we are so, ehm, proactive.",
|
||||
L"If you are so annoyed that $CAUSE$ is slow, $VICTIM$, maybe you could lend a hand.",
|
||||
|
||||
L"There's enough food left at the base, so no need to fight, ok?",
|
||||
L"Uhm. Is $CAUSE_GENDER$ okay?",
|
||||
L"I am sure there is a good explanation for this. Am I right, $CAUSE$?",
|
||||
L"Perhaps we could get a raise to resolve this... issue?",
|
||||
|
||||
L"We will not forget their sacrifice. They died so we could fight on.",
|
||||
L"Perhaps $CAUSE_GENDER$ is just good at salary negotiations?",
|
||||
L"Is that so? Well, I expect superior marksmanship from $CAUSE_GENDER$ in the next battle then.",
|
||||
L"Ehm... what are you two DOING?",
|
||||
|
||||
L"How did you even get wounded? Where did the attack come from?",
|
||||
L"Alright, ladies, party's over, move on!",
|
||||
L"Drink one for me too! But not now, because war.",
|
||||
L"Later, ok?",
|
||||
|
||||
L"Why don#t you two sober up? You're pretty wasted...",
|
||||
L"Zip it, both of you!",
|
||||
L"$VICTIM$! $CAUSE$! Less talk, more action, please!",
|
||||
L"Who cares? We have a job to do.",
|
||||
|
||||
L"Can I shut down squad radio, so I don't have to listen to you?",
|
||||
L"Yes, please. Discuss your petty grievings in full detail, we are all DYING to hear it.",
|
||||
L"Shut up, both of you!",
|
||||
L"Sigh. More of this?",
|
||||
|
||||
L"Hey. Hey! Both of you, cut it out! What are you doing?",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_INTERJECTOR_SOLVE_AGGRESSIVE[] =
|
||||
{
|
||||
L"This is war! People get shot all the time! Speaking of... engage!",
|
||||
L"This again? Keep your bickering to yourself, we have no time for this!",
|
||||
L"Meh meh meh. Have any of you losers lsot their bib? You're pathetic. ",
|
||||
L"Nobody wants to hear all this crap...",
|
||||
|
||||
L"You'll all get paid in time. Unless you continue like this. I'm sure there are less annoying mercs out there.",
|
||||
L"The more pressing issue is when will we go back, and finish the job?",
|
||||
L"Who cares? Can't make a cake without breaking a few eggs.",
|
||||
L"If you still have enough breath left to complain, $VICTIM$, you should lend $CAUSE_GENDER$ a hand.",
|
||||
|
||||
L"I wouldn't call that stuff 'tasty', but if you ladies wanna fight about it, fine by me.",
|
||||
L"Bla bla blah. Another notable moment of the crazies squad.",
|
||||
L"You can inject yourself with whatever you like, but only after the battle is over.",
|
||||
L"Shut up! There is more than enough loot for all of us!",
|
||||
|
||||
L"What? This is the business. Screw up and you're dead. They knew the risks. Move on.",
|
||||
L"Everybody gets what the deserve. If you complain, you deserve less.",
|
||||
L"Did it ever occur to you that our supplies are limited? We can't ALL get the one good gun.",
|
||||
L"This is hardly the time to fondle each other, dammit.",
|
||||
|
||||
L"How did you even get wounded? Where did the attack come from?",
|
||||
L"Alright, ladies, party's over, move on!",
|
||||
L"You celebrate already? This in't over yet. Not by a longshot!",
|
||||
L"We might've won this battle, but not this godamn war. So move it, soldier!",
|
||||
|
||||
L"Both of you, shut up! You are a disgrace to this unit!",
|
||||
L"Zip it, both of you!",
|
||||
L"$VICTIM$! $CAUSE$! Less talk, more action, please!",
|
||||
L"Who cares? We have a job to do.",
|
||||
|
||||
L"Can I shut down squad radio, so I don't have to listen to you?",
|
||||
L"Yes, please. Discuss your petty grievings in full detail, we are all DYING to hear it.",
|
||||
L"shut up, both of you!",
|
||||
L"Sigh. More of this?",
|
||||
|
||||
L"If anybody is superior here, then that's me... and I'm ordering you to stand down!",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_SIDEWITH_VICTIM[] =
|
||||
{
|
||||
L"That's right!",
|
||||
L"Indeed!",
|
||||
L"Exactly that.",
|
||||
L"$CAUSE$ does that all the time.",
|
||||
|
||||
L"$VICTIM$ is right!",
|
||||
L"I was gonna' point that out, too!",
|
||||
L"Glad to see I'm not the only one spooked by $CAUSE$.",
|
||||
L"Ha! So it WAS you, $CAUSE$.",
|
||||
|
||||
L"You're not exactly a teamplayer, huh, $CAUSE$?",
|
||||
L"Now THIS is goin to be interesting...",
|
||||
L"You tell'em, $VICTIM$!",
|
||||
L"Agreeing with $VICTIM$ here...",
|
||||
|
||||
L"Once again, $CAUSE$ is to blame.",
|
||||
L"I couldn't have said it better myself.",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_SIDEWITH_CAUSE[] =
|
||||
{
|
||||
L"Now wait a minute...",
|
||||
L"Wait a sec, that's not what right...",
|
||||
L"What? No.",
|
||||
L"That is not what happened.",
|
||||
|
||||
L"Hey, stop blaming $CAUSE$!",
|
||||
L"Oh shut up, $VICTIM$!",
|
||||
L"Nonono, you got that wrong.",
|
||||
L"Whoa. Why so stiff all of a sudden, $VICTIM$?",
|
||||
|
||||
L"And I suppose you never did, $VICTIM$?",
|
||||
L"Hmmmm... no.",
|
||||
L"Great. Let's have an argument. It's not like we have other things to do...",
|
||||
L"You are mistaken!",
|
||||
|
||||
L"You are wrong!",
|
||||
L"Me and $CAUSE$ would never do such a thing.",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_DOST_INTERJECTOR_DIALOGUESELECTION_SHORTTEXT[] =
|
||||
{
|
||||
L"Keep silent",
|
||||
L"Support $VICTIM$",
|
||||
L"Support $CAUSE$",
|
||||
L"Appeal to reason",
|
||||
L"Shut them up",
|
||||
};
|
||||
|
||||
STR16 szDynamicDialogueText_GenderText[] =
|
||||
{
|
||||
L"he",
|
||||
L"she",
|
||||
L"him",
|
||||
L"her",
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif //ENGLISH
|
||||
|
||||
@@ -234,6 +234,8 @@ void ShutdownGame(void)
|
||||
// rain
|
||||
static BOOLEAN gfSkipFrame = FALSE;
|
||||
|
||||
extern void RefreshBoxes( );
|
||||
|
||||
void GameLoop(void)
|
||||
{
|
||||
// DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"GameLoop");
|
||||
@@ -406,6 +408,9 @@ void GameLoop(void)
|
||||
// rain
|
||||
RenderRain();
|
||||
|
||||
// Flugente: dynamic opinions: Dialogue Boxes need to be refreshed
|
||||
RefreshBoxes( );
|
||||
|
||||
//DEBUG MODE : DEBUG RENDER ENTRY : point to drop in debugging render code
|
||||
if( (gGameSettings.fOptions[TOPTION_RETAIN_DEBUG_OPTIONS_IN_RELEASE]) || (JA2BETAVERSION_FLAG))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user