mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ff8476c15 | ||
|
|
6a9df9f22c | ||
|
|
c3a34a660d | ||
|
|
1074e9c408 | ||
|
|
4537f5d4dc | ||
|
|
4ae331c19e | ||
|
|
b85380c958 | ||
|
|
eb3f62c3d5 | ||
|
|
8644e5f8b9 | ||
|
|
872a356e82 | ||
|
|
7bb7c54317 | ||
|
|
49a56d01ac | ||
|
|
09ce332721 | ||
|
|
5e2c61ef12 | ||
|
|
4d948fda06 | ||
|
|
2ae110971b | ||
|
|
9a78e7dfa0 | ||
|
|
d95bae2bf6 | ||
|
|
a1bb85ca95 | ||
|
|
d9391de58a | ||
|
|
c02bbc90cb | ||
|
|
efb54202ea | ||
|
|
11caa6529c | ||
|
|
e2f296c42c | ||
|
|
ee2807ae64 | ||
|
|
b23c9ac8b1 | ||
|
|
fa0c5a2862 | ||
|
|
db6da100e1 | ||
|
|
a3e7ce5794 | ||
|
|
5062ae74f2 | ||
|
|
dd58f904f4 | ||
|
|
8dcb431ef2 | ||
|
|
5f45d06852 | ||
|
|
92103e36a6 | ||
|
|
8f98a9b985 | ||
|
|
c2e78d0461 | ||
|
|
3e45217a9a |
@@ -200,6 +200,7 @@ jobs:
|
|||||||
git push --delete origin refs/tags/latest || true
|
git push --delete origin refs/tags/latest || true
|
||||||
git tag latest
|
git tag latest
|
||||||
git push --force origin refs/tags/latest
|
git push --force origin refs/tags/latest
|
||||||
|
sleep 15 # make sure github can find the tag for gh release
|
||||||
gh release create latest ../dist/* \
|
gh release create latest ../dist/* \
|
||||||
--generate-notes \
|
--generate-notes \
|
||||||
--title "Latest (unstable)" \
|
--title "Latest (unstable)" \
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ foreach(app IN LISTS ApplicationTargets)
|
|||||||
)
|
)
|
||||||
target_link_libraries(${exe} PRIVATE ${Ja2_Libraries} $<IF:${usingMsBuild},legacy_stdio_definitions.lib,>)
|
target_link_libraries(${exe} PRIVATE ${Ja2_Libraries} $<IF:${usingMsBuild},legacy_stdio_definitions.lib,>)
|
||||||
target_link_options(${exe} PRIVATE $<IF:${usingMsBuild},/SAFESEH:NO,>)
|
target_link_options(${exe} PRIVATE $<IF:${usingMsBuild},/SAFESEH:NO,>)
|
||||||
|
target_compile_definitions(${exe} PRIVATE ${compilationFlags} ${debugFlags})
|
||||||
|
|
||||||
# language library for an application, e.g. JA2MAPEDITOR_ENGLISH_i18n
|
# language library for an application, e.g. JA2MAPEDITOR_ENGLISH_i18n
|
||||||
set(language_library ${exe}_i18n)
|
set(language_library ${exe}_i18n)
|
||||||
|
|||||||
@@ -1830,7 +1830,7 @@ void BtnGIOSquadSizeSelectionRightCallback( GUI_BUTTON *btn,INT32 reason )
|
|||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_REPEAT )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_REPEAT )
|
||||||
{
|
{
|
||||||
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
||||||
if (iResolution >= _800x600 && iResolution < _1024x768)
|
if (iResolution >= _800x600 && iResolution < _1280x720)
|
||||||
maxSquadSize = GIO_SQUAD_SIZE_8;
|
maxSquadSize = GIO_SQUAD_SIZE_8;
|
||||||
|
|
||||||
if ( iCurrentSquadSize < maxSquadSize )
|
if ( iCurrentSquadSize < maxSquadSize )
|
||||||
@@ -1850,7 +1850,7 @@ void BtnGIOSquadSizeSelectionRightCallback( GUI_BUTTON *btn,INT32 reason )
|
|||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
|
|
||||||
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
||||||
if (iResolution >= _800x600 && iResolution < _1024x768)
|
if (iResolution >= _800x600 && iResolution < _1280x720 )
|
||||||
maxSquadSize = GIO_SQUAD_SIZE_8;
|
maxSquadSize = GIO_SQUAD_SIZE_8;
|
||||||
|
|
||||||
if ( iCurrentSquadSize < maxSquadSize )
|
if ( iCurrentSquadSize < maxSquadSize )
|
||||||
|
|||||||
@@ -1998,6 +1998,7 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.fFoodDecayInSectors = iniReader.ReadBoolean("Tactical Food Settings", "FOOD_DECAY_IN_SECTORS", TRUE);
|
gGameExternalOptions.fFoodDecayInSectors = iniReader.ReadBoolean("Tactical Food Settings", "FOOD_DECAY_IN_SECTORS", TRUE);
|
||||||
gGameExternalOptions.sFoodDecayModificator = iniReader.ReadFloat("Tactical Food Settings", "FOOD_DECAY_MODIFICATOR", 1.0f, 0.1f, 10.0f);
|
gGameExternalOptions.sFoodDecayModificator = iniReader.ReadFloat("Tactical Food Settings", "FOOD_DECAY_MODIFICATOR", 1.0f, 0.1f, 10.0f);
|
||||||
gGameExternalOptions.fFoodEatingSounds = iniReader.ReadBoolean("Tactical Food Settings", "FOOD_EATING_SOUNDS", TRUE);
|
gGameExternalOptions.fFoodEatingSounds = iniReader.ReadBoolean("Tactical Food Settings", "FOOD_EATING_SOUNDS", TRUE);
|
||||||
|
gGameExternalOptions.fAlwaysFood = iniReader.ReadBoolean("Tactical Food Settings", "ALWAYS_FOOD", FALSE);
|
||||||
|
|
||||||
//################# Disease Settings ##################
|
//################# Disease Settings ##################
|
||||||
gGameExternalOptions.fDisease = iniReader.ReadBoolean( "Disease Settings", "DISEASE", FALSE );
|
gGameExternalOptions.fDisease = iniReader.ReadBoolean( "Disease Settings", "DISEASE", FALSE );
|
||||||
|
|||||||
@@ -506,6 +506,7 @@ typedef struct
|
|||||||
FLOAT sFoodDecayModificator;
|
FLOAT sFoodDecayModificator;
|
||||||
|
|
||||||
BOOLEAN fFoodEatingSounds;
|
BOOLEAN fFoodEatingSounds;
|
||||||
|
BOOLEAN fAlwaysFood;
|
||||||
|
|
||||||
// Flugente: disease settings
|
// Flugente: disease settings
|
||||||
BOOLEAN fDisease;
|
BOOLEAN fDisease;
|
||||||
|
|||||||
+2
-2
@@ -22,7 +22,7 @@ extern CHAR16 zBuildInformation[256];
|
|||||||
//
|
//
|
||||||
// Keeps track of the saved game version. Increment the saved game version whenever
|
// Keeps track of the saved game version. Increment the saved game version whenever
|
||||||
// you will invalidate the saved game file
|
// you will invalidate the saved game file
|
||||||
|
#define MERC_PROFILE_INSERTION_DATA 185 // Bigmap support for AddProfileToMap function
|
||||||
#define GROWTH_MODIFIERS 184
|
#define GROWTH_MODIFIERS 184
|
||||||
#define REBELCOMMAND 183
|
#define REBELCOMMAND 183
|
||||||
#define DRAGSTRUCTURE 182 // Flugente: we can drag structures behind us
|
#define DRAGSTRUCTURE 182 // Flugente: we can drag structures behind us
|
||||||
@@ -105,7 +105,7 @@ extern CHAR16 zBuildInformation[256];
|
|||||||
#define AP100_SAVEGAME_DATATYPE_CHANGE 105 // Before this, we didn't have the 100AP structure changes
|
#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 NIV_SAVEGAME_DATATYPE_CHANGE 102 // Before this, we used the old structure system
|
||||||
|
|
||||||
#define SAVE_GAME_VERSION GROWTH_MODIFIERS
|
#define SAVE_GAME_VERSION MERC_PROFILE_INSERTION_DATA
|
||||||
|
|
||||||
//#define RUSSIANGOLD
|
//#define RUSSIANGOLD
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
+11
-1
@@ -1467,7 +1467,17 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
|
|||||||
numBytesRead = ReadFieldByField( hFile, &this->ubLastDateSpokenTo, sizeof(this->ubLastDateSpokenTo), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->ubLastDateSpokenTo, sizeof(this->ubLastDateSpokenTo), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bLastQuoteSaidWasSpecial, sizeof(this->bLastQuoteSaidWasSpecial), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bLastQuoteSaidWasSpecial, sizeof(this->bLastQuoteSaidWasSpecial), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bSectorZ, sizeof(this->bSectorZ), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bSectorZ, sizeof(this->bSectorZ), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->usStrategicInsertionData, sizeof(this->usStrategicInsertionData), sizeof(UINT16), numBytesRead);
|
|
||||||
|
if ( guiCurrentSaveGameVersion >= MERC_PROFILE_INSERTION_DATA )
|
||||||
|
{
|
||||||
|
numBytesRead = ReadFieldByField( hFile, &this->usStrategicInsertionData, sizeof( this->usStrategicInsertionData ), sizeof( UINT32 ), numBytesRead );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
numBytesRead = ReadFieldByField( hFile, &this->usStrategicInsertionData, sizeof(UINT16), sizeof(UINT16), numBytesRead);
|
||||||
|
buffer += 4; // To make numBytesRead check match the struct size. 2 bytes from uint32 - uint16 and 2 bytes due to struct memory layout change when usStrategicInsertionData was increased to uint32
|
||||||
|
}
|
||||||
|
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bFriendlyOrDirectDefaultResponseUsedRecently, sizeof(this->bFriendlyOrDirectDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bFriendlyOrDirectDefaultResponseUsedRecently, sizeof(this->bFriendlyOrDirectDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bRecruitDefaultResponseUsedRecently, sizeof(this->bRecruitDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bRecruitDefaultResponseUsedRecently, sizeof(this->bRecruitDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bThreatenDefaultResponseUsedRecently, sizeof(this->bThreatenDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bThreatenDefaultResponseUsedRecently, sizeof(this->bThreatenDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
||||||
|
|||||||
@@ -239,6 +239,7 @@ void LoadGameUBOptions()
|
|||||||
gGameUBOptions.PowergenSectorGridNo4 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_GRIDNO_4", 13980);
|
gGameUBOptions.PowergenSectorGridNo4 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_GRIDNO_4", 13980);
|
||||||
|
|
||||||
gGameUBOptions.PowergenSectorExitgridGridNo = iniReader.ReadInteger( "Unfinished Business Settings", "POWERGEN_SECTOR_EXITGRID_GRIDNO", 19749 );
|
gGameUBOptions.PowergenSectorExitgridGridNo = iniReader.ReadInteger( "Unfinished Business Settings", "POWERGEN_SECTOR_EXITGRID_GRIDNO", 19749 );
|
||||||
|
gGameUBOptions.PowergenSectorExitgridSrcGridNo = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_EXITGRID_SRC_GRIDNO", 10979 );
|
||||||
gGameUBOptions.PowergenFanSoundGridNo1 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_FAN_SOUND_GRIDNO_1", 10979);
|
gGameUBOptions.PowergenFanSoundGridNo1 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_FAN_SOUND_GRIDNO_1", 10979);
|
||||||
gGameUBOptions.PowergenFanSoundGridNo2 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_FAN_SOUND_GRIDNO_2", 19749);
|
gGameUBOptions.PowergenFanSoundGridNo2 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_FAN_SOUND_GRIDNO_2", 19749);
|
||||||
gGameUBOptions.StartFanbackupAgainGridNo = iniReader.ReadInteger("Unfinished Business Settings","START_FANBACKUP_AGAIN_GRIDNO", 10980);
|
gGameUBOptions.StartFanbackupAgainGridNo = iniReader.ReadInteger("Unfinished Business Settings","START_FANBACKUP_AGAIN_GRIDNO", 10980);
|
||||||
@@ -356,6 +357,11 @@ void LoadGameUBOptions()
|
|||||||
gGameUBOptions.H10SectorPlayerQuoteZ = iniReader.ReadInteger("Unfinished Business Settings","H10_SECTOR_PLAYER_QUOTE_Z", 0);
|
gGameUBOptions.H10SectorPlayerQuoteZ = iniReader.ReadInteger("Unfinished Business Settings","H10_SECTOR_PLAYER_QUOTE_Z", 0);
|
||||||
|
|
||||||
|
|
||||||
|
gGameUBOptions.BettyBloodCatSectorX = iniReader.ReadInteger( "Unfinished Business Settings", "BETTY_BLOODCAT_SECTOR_X", 10 );
|
||||||
|
gGameUBOptions.BettyBloodCatSectorY = iniReader.ReadInteger( "Unfinished Business Settings", "BETTY_BLOODCAT_SECTOR_Y", 9 );
|
||||||
|
gGameUBOptions.BettyBloodCatSectorZ = iniReader.ReadInteger( "Unfinished Business Settings", "BETTY_BLOODCAT_SECTOR_Z", 0 );
|
||||||
|
|
||||||
|
|
||||||
if ( gGameUBOptions.InGameHeli == TRUE )
|
if ( gGameUBOptions.InGameHeli == TRUE )
|
||||||
gGameUBOptions.InGameHeliCrash = FALSE;
|
gGameUBOptions.InGameHeliCrash = FALSE;
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ typedef struct
|
|||||||
UINT32 PowergenSectorGridNo3;
|
UINT32 PowergenSectorGridNo3;
|
||||||
UINT32 PowergenSectorGridNo4;
|
UINT32 PowergenSectorGridNo4;
|
||||||
UINT32 PowergenSectorExitgridGridNo;
|
UINT32 PowergenSectorExitgridGridNo;
|
||||||
|
UINT32 PowergenSectorExitgridSrcGridNo;
|
||||||
UINT32 PowergenFanSoundGridNo1;
|
UINT32 PowergenFanSoundGridNo1;
|
||||||
UINT32 PowergenFanSoundGridNo2;
|
UINT32 PowergenFanSoundGridNo2;
|
||||||
UINT32 StartFanbackupAgainGridNo;
|
UINT32 StartFanbackupAgainGridNo;
|
||||||
@@ -220,6 +221,9 @@ typedef struct
|
|||||||
|
|
||||||
UINT8 MaxNumberOfMercs;
|
UINT8 MaxNumberOfMercs;
|
||||||
|
|
||||||
|
INT16 BettyBloodCatSectorX;
|
||||||
|
INT16 BettyBloodCatSectorY;
|
||||||
|
INT8 BettyBloodCatSectorZ;
|
||||||
} GAME_UB_OPTIONS;
|
} GAME_UB_OPTIONS;
|
||||||
|
|
||||||
extern GAME_UB_OPTIONS gGameUBOptions;
|
extern GAME_UB_OPTIONS gGameUBOptions;
|
||||||
|
|||||||
+106
-30
@@ -418,6 +418,34 @@ BOOLEAN EnterMercsFiles()
|
|||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void TryToHireMERC()
|
||||||
|
{
|
||||||
|
if ( (gMercProfiles[GetAvailableMercIDFromMERCArray( gubCurMercIndex )].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
||||||
|
{
|
||||||
|
//bought gear before
|
||||||
|
fMercBuyEquipment = 0;
|
||||||
|
MercProcessHireAfterGear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#ifdef JA2UB
|
||||||
|
if ( gSelectedMercKit == 0 ) // First kit is free, due to M.E.R.C special offer
|
||||||
|
{
|
||||||
|
fMercBuyEquipment = 1;
|
||||||
|
MercProcessHireAfterGear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//prompt to buy gear
|
||||||
|
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[MERC_FILES_BUY_GEAR], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
//prompt to buy gear
|
||||||
|
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[MERC_FILES_BUY_GEAR], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
||||||
|
#endif // JA2UB
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SelectMercsFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
void SelectMercsFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||||
{
|
{
|
||||||
if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||||
@@ -442,15 +470,7 @@ void SelectMercsFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
//else try to hire the merc
|
//else try to hire the merc
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( (gMercProfiles[ GetAvailableMercIDFromMERCArray( gubCurMercIndex ) ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
TryToHireMERC();
|
||||||
{
|
|
||||||
//bought gear before
|
|
||||||
fMercBuyEquipment = 0;
|
|
||||||
MercProcessHireAfterGear();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
//prompt to buy gear
|
|
||||||
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[ MERC_FILES_BUY_GEAR ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -701,15 +721,7 @@ void BtnMercHireButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
//else try to hire the merc
|
//else try to hire the merc
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( (gMercProfiles[ GetAvailableMercIDFromMERCArray( gubCurMercIndex ) ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
TryToHireMERC();
|
||||||
{
|
|
||||||
//bought gear before
|
|
||||||
fMercBuyEquipment = 0;
|
|
||||||
MercProcessHireAfterGear();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
//prompt to buy gear
|
|
||||||
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[ MERC_FILES_BUY_GEAR ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
@@ -1040,7 +1052,16 @@ void DisplayMercsStats( UINT8 ubMercID )
|
|||||||
DrawNumeralsToScreen(gMercProfiles[ ubMercID ].bMedical, 3, MERC_STATS_SECOND_NUM_COL_X, usPosY, MERC_STATS_FONT, ubColor);
|
DrawNumeralsToScreen(gMercProfiles[ ubMercID ].bMedical, 3, MERC_STATS_SECOND_NUM_COL_X, usPosY, MERC_STATS_FONT, ubColor);
|
||||||
usPosY += MERC_SPACE_BN_LINES;
|
usPosY += MERC_SPACE_BN_LINES;
|
||||||
|
|
||||||
//Daily Salary
|
//Merc Salary
|
||||||
|
#ifdef JA2UB
|
||||||
|
// One time "Fee" instead of "Salary" per day
|
||||||
|
DrawTextToScreen( CharacterInfo[AIM_MEMBER_FEE], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_TITLE_FONT, MERC_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
usPosX = MERC_STATS_SECOND_COL_X + StringPixLength( CharacterInfo[AIM_MEMBER_FEE], MERC_NAME_FONT );
|
||||||
|
swprintf( sString, L"%d", gMercProfiles[ubMercID].uiWeeklySalary );
|
||||||
|
InsertCommasForDollarFigure( sString );
|
||||||
|
InsertDollarSignInToString( sString );
|
||||||
|
#else
|
||||||
DrawTextToScreen( MercInfo[MERC_FILES_SALARY], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_STATS_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
DrawTextToScreen( MercInfo[MERC_FILES_SALARY], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_STATS_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
usPosX = MERC_STATS_SECOND_COL_X + StringPixLength( MercInfo[MERC_FILES_SALARY], MERC_NAME_FONT );
|
usPosX = MERC_STATS_SECOND_COL_X + StringPixLength( MercInfo[MERC_FILES_SALARY], MERC_NAME_FONT );
|
||||||
@@ -1048,6 +1069,8 @@ void DisplayMercsStats( UINT8 ubMercID )
|
|||||||
InsertCommasForDollarFigure( sString );
|
InsertCommasForDollarFigure( sString );
|
||||||
InsertDollarSignInToString( sString );
|
InsertDollarSignInToString( sString );
|
||||||
swprintf( sTemp, L" %s", MercInfo[MERC_FILES_PER_DAY] );
|
swprintf( sTemp, L" %s", MercInfo[MERC_FILES_PER_DAY] );
|
||||||
|
#endif // JA2UB
|
||||||
|
|
||||||
wcscat( sString, sTemp );
|
wcscat( sString, sTemp );
|
||||||
DrawTextToScreen( sString, usPosX, usPosY, 95, MERC_NAME_FONT, MERC_DYNAMIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
DrawTextToScreen( sString, usPosX, usPosY, 95, MERC_NAME_FONT, MERC_DYNAMIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||||
|
|
||||||
@@ -1059,12 +1082,25 @@ void DisplayMercsStats( UINT8 ubMercID )
|
|||||||
if (gubCurMercFilesTogglePage == MERC_FILES_INV_PAGE)
|
if (gubCurMercFilesTogglePage == MERC_FILES_INV_PAGE)
|
||||||
{
|
{
|
||||||
//Gear Cost
|
//Gear Cost
|
||||||
usPosY = usPosY + 145;
|
usPosY = usPosY + 148;
|
||||||
DrawTextToScreen( MercInfo[MERC_FILES_GEAR], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_STATS_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
DrawTextToScreen( MercInfo[MERC_FILES_GEAR], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_STATS_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
|
||||||
if ( (gMercProfiles[ubMercID].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS)
|
if ( (gMercProfiles[ubMercID].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS)
|
||||||
&& (!(gMercProfiles[ubMercID].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID) || gGameExternalOptions.fGearKitsAlwaysAvailable) )
|
&& (!(gMercProfiles[ubMercID].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID) || gGameExternalOptions.fGearKitsAlwaysAvailable) )
|
||||||
|
{
|
||||||
gMercProfiles[ ubMercID ].usOptionalGearCost = 0;
|
gMercProfiles[ ubMercID ].usOptionalGearCost = 0;
|
||||||
|
}
|
||||||
|
#ifdef JA2UB
|
||||||
|
if ( gSelectedMercKit == 0 ) // First kit is free, due to M.E.R.C special offer
|
||||||
|
{
|
||||||
|
gMercProfiles[ubMercID].usOptionalGearCost = 0;
|
||||||
|
|
||||||
|
// Special offer text above the gear cost
|
||||||
|
const auto y = usPosY - MERC_SPACE_BN_LINES + 2;
|
||||||
|
swprintf( NsString, MercInfo[MERC_FILES_SPECIAL_OFFER] );
|
||||||
|
DrawTextToScreen( NsString, usPosX, y, 95, MERC_TITLE_FONT, MERC_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||||
|
}
|
||||||
|
#endif // JA2UB
|
||||||
|
|
||||||
swprintf( NsString, L"+ " );
|
swprintf( NsString, L"+ " );
|
||||||
swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost);
|
swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost);
|
||||||
@@ -1078,7 +1114,11 @@ void DisplayMercsStats( UINT8 ubMercID )
|
|||||||
DrawTextToScreen( MercInfo[MERC_FILES_TOTAL], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_NAME_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
DrawTextToScreen( MercInfo[MERC_FILES_TOTAL], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_NAME_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
|
||||||
swprintf(N2sString, L"= ");
|
swprintf(N2sString, L"= ");
|
||||||
|
#ifdef JA2UB
|
||||||
|
swprintf( sTemp, L"%d", gMercProfiles[ubMercID].usOptionalGearCost + gMercProfiles[ubMercID].uiWeeklySalary );
|
||||||
|
#else
|
||||||
swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost+gMercProfiles[ ubMercID ].sSalary);
|
swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost+gMercProfiles[ ubMercID ].sSalary);
|
||||||
|
#endif
|
||||||
InsertCommasForDollarFigure( sTemp );
|
InsertCommasForDollarFigure( sTemp );
|
||||||
InsertDollarSignInToString( sTemp );
|
InsertDollarSignInToString( sTemp );
|
||||||
wcscat( N2sString, sTemp );
|
wcscat( N2sString, sTemp );
|
||||||
@@ -1175,6 +1215,22 @@ BOOLEAN MercFilesHireMerc(UINT8 ubMercID)
|
|||||||
return(FALSE);//not enough big ones $$$sATMText
|
return(FALSE);//not enough big ones $$$sATMText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
Namount = 0;
|
||||||
|
Namount += gMercProfiles[ubMercID].uiWeeklySalary;
|
||||||
|
if ( gSelectedMercKit > 0 )
|
||||||
|
{
|
||||||
|
Namount += gMercProfiles[ubMercID].usOptionalGearCost;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( Namount > LaptopSaveInfo.iCurrentBalance )
|
||||||
|
{
|
||||||
|
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, sATMText[4], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL );
|
||||||
|
return(FALSE);//not enough big ones $$$sATMText
|
||||||
|
}
|
||||||
|
#endif // JA2UB
|
||||||
|
|
||||||
|
|
||||||
bReturnCode = HireMerc( &HireMercStruct );
|
bReturnCode = HireMerc( &HireMercStruct );
|
||||||
|
|
||||||
//already have limit of mercs on the team
|
//already have limit of mercs on the team
|
||||||
@@ -1198,14 +1254,23 @@ BOOLEAN MercFilesHireMerc(UINT8 ubMercID)
|
|||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
//add an entry in the finacial page for the hiring of the merc
|
//add an entry in the finacial page for the hiring of the merc
|
||||||
AddTransactionToPlayersBook(PAY_SPECK_FOR_MERC, ubMercID, GetWorldTotalMin(), -(INT32)( gMercProfiles[ubMercID].uiWeeklySalary ) );
|
INT32 totalCost = gMercProfiles[ubMercID].uiWeeklySalary;
|
||||||
|
if ( gSelectedMercKit > 0 ) // First kit is included in the initial fee
|
||||||
|
{
|
||||||
|
totalCost += gMercProfiles[ubMercID].usOptionalGearCost;
|
||||||
|
}
|
||||||
|
AddTransactionToPlayersBook(PAY_SPECK_FOR_MERC, ubMercID, GetWorldTotalMin(), -totalCost );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//JMich_MMG: Setting the flag that we bought the gear and still haven't paid for it if we succesfully hired the merc
|
//JMich_MMG: Setting the flag that we bought the gear and still haven't paid for it if we succesfully hired the merc
|
||||||
if ( fMercBuyEquipment )
|
if ( fMercBuyEquipment )
|
||||||
{
|
{
|
||||||
gMercProfiles[ ubMercID ].ubMiscFlags |= PROFILE_MISC_FLAG_ALREADY_USED_ITEMS;
|
gMercProfiles[ ubMercID ].ubMiscFlags |= PROFILE_MISC_FLAG_ALREADY_USED_ITEMS;
|
||||||
|
#ifdef JA2UB
|
||||||
|
// Gear cost gets added to initial hiring fee in UB
|
||||||
|
#else
|
||||||
gMercProfiles[ ubMercID ].ubMiscFlags2 |= PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID;
|
gMercProfiles[ ubMercID ].ubMiscFlags2 |= PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID;
|
||||||
|
#endif // JA2UB
|
||||||
}
|
}
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
@@ -1305,15 +1370,7 @@ void HandleMercsFilesKeyBoardInput( )
|
|||||||
//else try to hire the merc
|
//else try to hire the merc
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//bought gear before
|
TryToHireMERC();
|
||||||
if ( (gMercProfiles[ GetAvailableMercIDFromMERCArray( gubCurMercIndex ) ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
|
||||||
{
|
|
||||||
fMercBuyEquipment = 0;
|
|
||||||
MercProcessHireAfterGear();
|
|
||||||
}
|
|
||||||
//prompt to buy gear
|
|
||||||
else
|
|
||||||
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[ MERC_FILES_BUY_GEAR ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1784,10 +1841,21 @@ void MercHireButtonGearYesNoCallback (UINT8 bExitValue)
|
|||||||
{
|
{
|
||||||
//yes, buy gear
|
//yes, buy gear
|
||||||
if ( bExitValue == MSG_BOX_RETURN_YES )
|
if ( bExitValue == MSG_BOX_RETURN_YES )
|
||||||
|
{
|
||||||
fMercBuyEquipment = 1;
|
fMercBuyEquipment = 1;
|
||||||
|
}
|
||||||
//no, no gear
|
//no, no gear
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
#ifdef JA2UB
|
||||||
|
// Switch to the free, first kit
|
||||||
|
gSelectedMercKit = 0;
|
||||||
|
MercWeaponKitSelectionUpdate( gSelectedMercKit );
|
||||||
|
fMercBuyEquipment = 1;
|
||||||
|
#else
|
||||||
fMercBuyEquipment = 0;
|
fMercBuyEquipment = 0;
|
||||||
|
#endif // JA2UB
|
||||||
|
}
|
||||||
|
|
||||||
MercProcessHireAfterGear();
|
MercProcessHireAfterGear();
|
||||||
}
|
}
|
||||||
@@ -1810,6 +1878,10 @@ void MercProcessHireAfterGear()
|
|||||||
|
|
||||||
void NextMercMember()
|
void NextMercMember()
|
||||||
{
|
{
|
||||||
|
// Reset selected kit, cannot assume next merc has more than 1 kit
|
||||||
|
gSelectedMercKit = 0;
|
||||||
|
MercWeaponKitSelectionUpdate( gSelectedMercKit );
|
||||||
|
|
||||||
if (gfKeyState [ CTRL ])
|
if (gfKeyState [ CTRL ])
|
||||||
gubCurMercIndex = LaptopSaveInfo.gubLastMercIndex;
|
gubCurMercIndex = LaptopSaveInfo.gubLastMercIndex;
|
||||||
else if (gfKeyState [ SHIFT ])
|
else if (gfKeyState [ SHIFT ])
|
||||||
@@ -1840,6 +1912,10 @@ void NextMercMember()
|
|||||||
|
|
||||||
void PrevMercMember()
|
void PrevMercMember()
|
||||||
{
|
{
|
||||||
|
// Reset selected kit, cannot assume next merc has more than 1 kit
|
||||||
|
gSelectedMercKit = 0;
|
||||||
|
MercWeaponKitSelectionUpdate( gSelectedMercKit );
|
||||||
|
|
||||||
if (gfKeyState [ CTRL ])
|
if (gfKeyState [ CTRL ])
|
||||||
gubCurMercIndex = 0;
|
gubCurMercIndex = 0;
|
||||||
else if (gfKeyState [ SHIFT ])
|
else if (gfKeyState [ SHIFT ])
|
||||||
|
|||||||
@@ -1278,8 +1278,7 @@ void LandHelicopter( void )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
Assert( 0 );
|
//No meanwhiles in UB
|
||||||
//No meanwhiles
|
|
||||||
#else
|
#else
|
||||||
// play meanwhile scene if it hasn't been used yet
|
// play meanwhile scene if it hasn't been used yet
|
||||||
HandleKillChopperMeanwhileScene();
|
HandleKillChopperMeanwhileScene();
|
||||||
|
|||||||
@@ -5283,12 +5283,12 @@ BOOLEAN LoadMilitiaPopUpBox( void )
|
|||||||
// load the militia pop up box
|
// load the militia pop up box
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
if (iResolution >= _640x480 && iResolution < _800x600)
|
if ( isWidescreenUI() || iResolution >= _1024x768)
|
||||||
FilenameForBPP("INTERFACE\\Militia.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\Militia_1024x768.sti", VObjectDesc.ImageFile);
|
||||||
else if (iResolution < _1024x768)
|
else if (iResolution >= _800x600)
|
||||||
FilenameForBPP("INTERFACE\\Militia_800x600.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\Militia_800x600.sti", VObjectDesc.ImageFile);
|
||||||
else
|
else
|
||||||
FilenameForBPP("INTERFACE\\Militia_1024x768.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\Militia.sti", VObjectDesc.ImageFile);
|
||||||
|
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMilitia));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiMilitia));
|
||||||
|
|
||||||
|
|||||||
@@ -342,8 +342,8 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
|||||||
// Ja25: no loyalty
|
// Ja25: no loyalty
|
||||||
#else
|
#else
|
||||||
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_SAM, sMapX, sMapY, bMapZ );
|
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_SAM, sMapX, sMapY, bMapZ );
|
||||||
UpdateAirspaceControl( );
|
|
||||||
#endif
|
#endif
|
||||||
|
UpdateAirspaceControl( );
|
||||||
// if Skyrider has been delivered to chopper, and already mentioned Drassen SAM site, but not used this quote yet
|
// if Skyrider has been delivered to chopper, and already mentioned Drassen SAM site, but not used this quote yet
|
||||||
if ( IsHelicopterPilotAvailable( ) && ( guiHelicopterSkyriderTalkState >= 1 ) && ( !gfSkyriderSaidCongratsOnTakingSAM ) )
|
if ( IsHelicopterPilotAvailable( ) && ( guiHelicopterSkyriderTalkState >= 1 ) && ( !gfSkyriderSaidCongratsOnTakingSAM ) )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3171,7 +3171,7 @@ BOOLEAN CheckPendingNonPlayerTeam( UINT8 usTeam )
|
|||||||
void HandleBloodCatDeaths( SECTORINFO *pSector )
|
void HandleBloodCatDeaths( SECTORINFO *pSector )
|
||||||
{
|
{
|
||||||
//if the current sector is the first part of the town
|
//if the current sector is the first part of the town
|
||||||
if( gWorldSectorX == 10 && gWorldSectorY == 9 && gbWorldSectorZ == 0 )
|
if( gWorldSectorX == BETTY_BLOODCAT_SECTOR_X && gWorldSectorY == BETTY_BLOODCAT_SECTOR_Y && gbWorldSectorZ == BETTY_BLOODCAT_SECTOR_Z )
|
||||||
{
|
{
|
||||||
//if ALL the bloodcats are killed
|
//if ALL the bloodcats are killed
|
||||||
if( pSector->bBloodCats == 0 )
|
if( pSector->bBloodCats == 0 )
|
||||||
|
|||||||
@@ -1610,6 +1610,11 @@ void InitStrategicAI()
|
|||||||
case 1:
|
case 1:
|
||||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||||
{
|
{
|
||||||
|
// (0,0) coordinates signify a not used cache sector
|
||||||
|
if ( gModSettings.ubWeaponCache1X == 0 || gModSettings.ubWeaponCache1Y == 0 )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
|
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
|
||||||
@@ -1628,6 +1633,10 @@ void InitStrategicAI()
|
|||||||
case 2:
|
case 2:
|
||||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||||
{
|
{
|
||||||
|
if ( gModSettings.ubWeaponCache2X == 0 || gModSettings.ubWeaponCache2Y == 0 )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache2X, gModSettings.ubWeaponCache2Y ) ]; //SEC_H5
|
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache2X, gModSettings.ubWeaponCache2Y ) ]; //SEC_H5
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops2 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops2 * 2);
|
||||||
@@ -1646,6 +1655,10 @@ void InitStrategicAI()
|
|||||||
case 3:
|
case 3:
|
||||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||||
{
|
{
|
||||||
|
if ( gModSettings.ubWeaponCache3X == 0 || gModSettings.ubWeaponCache3Y == 0 )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache3X, gModSettings.ubWeaponCache3Y ) ]; //SEC_H10
|
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache3X, gModSettings.ubWeaponCache3Y ) ]; //SEC_H10
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops3 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops3 * 2);
|
||||||
@@ -1664,6 +1677,10 @@ void InitStrategicAI()
|
|||||||
case 4:
|
case 4:
|
||||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||||
{
|
{
|
||||||
|
if ( gModSettings.ubWeaponCache4X == 0 || gModSettings.ubWeaponCache4Y == 0 )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache4X, gModSettings.ubWeaponCache4Y ) ]; //SEC_J12
|
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache4X, gModSettings.ubWeaponCache4Y ) ]; //SEC_J12
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops4 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops4 * 2);
|
||||||
@@ -1682,6 +1699,10 @@ void InitStrategicAI()
|
|||||||
case 5:
|
case 5:
|
||||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||||
{
|
{
|
||||||
|
if ( gModSettings.ubWeaponCache5X == 0 || gModSettings.ubWeaponCache5Y == 0 )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache5X, gModSettings.ubWeaponCache5Y ) ]; //SEC_M9
|
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache5X, gModSettings.ubWeaponCache5Y ) ]; //SEC_M9
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops5 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops5 * 2);
|
||||||
@@ -1705,26 +1726,41 @@ void InitStrategicAI()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if ( gModSettings.ubWeaponCache1X != 0 && gModSettings.ubWeaponCache1Y != 0 )
|
||||||
{
|
{
|
||||||
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y )]; //SEC_E11
|
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y )]; //SEC_E11
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( gModSettings.ubWeaponCache2X != 0 && gModSettings.ubWeaponCache2Y != 0 )
|
||||||
|
{
|
||||||
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache2X, gModSettings.ubWeaponCache2Y )]; //SEC_H5
|
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache2X, gModSettings.ubWeaponCache2Y )]; //SEC_H5
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops2 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops2 * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( gModSettings.ubWeaponCache3X != 0 && gModSettings.ubWeaponCache3Y != 0 )
|
||||||
|
{
|
||||||
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache3X, gModSettings.ubWeaponCache3Y )]; //SEC_H10
|
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache3X, gModSettings.ubWeaponCache3Y )]; //SEC_H10
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops3 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops3 * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( gModSettings.ubWeaponCache4X != 0 && gModSettings.ubWeaponCache4Y != 0 )
|
||||||
|
{
|
||||||
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache4X, gModSettings.ubWeaponCache4Y )]; //SEC_J12
|
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache4X, gModSettings.ubWeaponCache4Y )]; //SEC_J12
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops4 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops4 * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( gModSettings.ubWeaponCache5X != 0 && gModSettings.ubWeaponCache5Y != 0 )
|
||||||
|
{
|
||||||
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache5X, gModSettings.ubWeaponCache5Y )]; //SEC_M9
|
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache5X, gModSettings.ubWeaponCache5Y )]; //SEC_M9
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops5 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops5 * 2);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
|
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
|
||||||
@@ -7115,15 +7151,16 @@ void InitializeGroup( const GROUP_TYPE groupType, const UINT8 groupSize, UINT8 &
|
|||||||
tankCount++;
|
tankCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( gGameExternalOptions.fASDAssignsJeeps && ASDSoldierUpgradeToJeep( ) )
|
if ( troopCount > 0 && gGameExternalOptions.fASDAssignsJeeps && ASDSoldierUpgradeToJeep( ) )
|
||||||
{
|
{
|
||||||
troopCount--;
|
troopCount--;
|
||||||
jeepCount++;
|
jeepCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( gGameExternalOptions.fASDAssignsRobots && ASDSoldierUpgradeToRobot() )
|
if ( troopCount > 0 && gGameExternalOptions.fASDAssignsRobots && ASDSoldierUpgradeToRobot() )
|
||||||
{
|
{
|
||||||
const int numRobots = 1 + Random(difficultyMod);
|
// Limit amount of robots, if randomized difficulty bonus would cause us to go over the troopCount amount
|
||||||
|
const int numRobots = min( (1 + Random(difficultyMod)), troopCount);
|
||||||
troopCount -= numRobots;
|
troopCount -= numRobots;
|
||||||
robotCount += numRobots;
|
robotCount += numRobots;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2644,6 +2644,7 @@ BOOLEAN PossibleToCoordinateSimultaneousGroupArrivals( GROUP *pFirstGroup )
|
|||||||
{
|
{
|
||||||
if ( pGroup != pFirstGroup && (pGroup->usGroupTeam == OUR_TEAM || pGroup->usGroupTeam == MILITIA_TEAM) && pGroup->fBetweenSectors &&
|
if ( pGroup != pFirstGroup && (pGroup->usGroupTeam == OUR_TEAM || pGroup->usGroupTeam == MILITIA_TEAM) && pGroup->fBetweenSectors &&
|
||||||
pGroup->ubNextX == pFirstGroup->ubSectorX && pGroup->ubNextY == pFirstGroup->ubSectorY &&
|
pGroup->ubNextX == pFirstGroup->ubSectorX && pGroup->ubNextY == pFirstGroup->ubSectorY &&
|
||||||
|
pFirstGroup->ubSectorZ == pGroup->ubSectorZ &&
|
||||||
!(pGroup->uiFlags & GROUPFLAG_SIMULTANEOUSARRIVAL_CHECKED) &&
|
!(pGroup->uiFlags & GROUPFLAG_SIMULTANEOUSARRIVAL_CHECKED) &&
|
||||||
!IsGroupTheHelicopterGroup( pGroup ) )
|
!IsGroupTheHelicopterGroup( pGroup ) )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7778,6 +7778,7 @@ void HandleMovingEnemiesCloseToEntranceInSecondTunnelMap( )
|
|||||||
|
|
||||||
void HandlePowerGenFanSoundModification( )
|
void HandlePowerGenFanSoundModification( )
|
||||||
{
|
{
|
||||||
|
extern UINT32 POWERGENSECTOREXITGRID_SRC_GRIDNO;
|
||||||
SetTileAnimCounter( TILE_ANIM__FAST_SPEED );
|
SetTileAnimCounter( TILE_ANIM__FAST_SPEED );
|
||||||
|
|
||||||
switch ( gJa25SaveStruct.ubStateOfFanInPowerGenSector )
|
switch ( gJa25SaveStruct.ubStateOfFanInPowerGenSector )
|
||||||
@@ -7786,7 +7787,7 @@ void HandlePowerGenFanSoundModification( )
|
|||||||
HandleAddingPowerGenFanSound( );
|
HandleAddingPowerGenFanSound( );
|
||||||
|
|
||||||
//MAKE SURE the fan does not have an exit grid
|
//MAKE SURE the fan does not have an exit grid
|
||||||
RemoveExitGridFromWorld( PGF__FAN_EXIT_GRID_GRIDNO );
|
RemoveExitGridFromWorld( POWERGENSECTOREXITGRID_SRC_GRIDNO );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PGF__STOPPED:
|
case PGF__STOPPED:
|
||||||
|
|||||||
@@ -1345,10 +1345,10 @@ void HandleDialogue( )
|
|||||||
{
|
{
|
||||||
HandleEveryoneDoneTheirEndGameQuotes();
|
HandleEveryoneDoneTheirEndGameQuotes();
|
||||||
}
|
}
|
||||||
else
|
else if ( QItem.uiSpecialEventData & MULTIPURPOSE_SPECIAL_EVENT_GETUP_AFTER_HELI_CRASH )
|
||||||
{
|
{
|
||||||
// grab soldier ptr from profile ID
|
// grab soldier ptr from profile ID
|
||||||
pSoldier = FindSoldierByProfileID( (UINT8)QItem.uiSpecialEventData, FALSE );
|
pSoldier = FindSoldierByProfileID( (UINT8)QItem.uiSpecialEventData2, FALSE );
|
||||||
|
|
||||||
// FindSoldier was returning a lot of nullptrs which would crash the game very quickly after Jerry gets up. This check is here to circumvent that.
|
// FindSoldier was returning a lot of nullptrs which would crash the game very quickly after Jerry gets up. This check is here to circumvent that.
|
||||||
if (pSoldier != nullptr)
|
if (pSoldier != nullptr)
|
||||||
|
|||||||
@@ -262,6 +262,7 @@ enum DialogQuoteIDs
|
|||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#define MULTIPURPOSE_SPECIAL_EVENT_TEAM_MEMBERS_DONE_TALKING 0x20000000
|
#define MULTIPURPOSE_SPECIAL_EVENT_TEAM_MEMBERS_DONE_TALKING 0x20000000
|
||||||
#define MULTIPURPOSE_SPECIAL_EVENT_DONE_KILLING_DEIDRANNA 0x10000000
|
#define MULTIPURPOSE_SPECIAL_EVENT_DONE_KILLING_DEIDRANNA 0x10000000
|
||||||
|
#define MULTIPURPOSE_SPECIAL_EVENT_GETUP_AFTER_HELI_CRASH 0x08000000
|
||||||
#else
|
#else
|
||||||
#define MULTIPURPOSE_SPECIAL_EVENT_DONE_KILLING_DEIDRANNA 0x00000001
|
#define MULTIPURPOSE_SPECIAL_EVENT_DONE_KILLING_DEIDRANNA 0x00000001
|
||||||
#define MULTIPURPOSE_SPECIAL_EVENT_TEAM_MEMBERS_DONE_TALKING 0x00000002
|
#define MULTIPURPOSE_SPECIAL_EVENT_TEAM_MEMBERS_DONE_TALKING 0x00000002
|
||||||
|
|||||||
@@ -2353,7 +2353,8 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
|||||||
break;
|
break;
|
||||||
case NPC_ACTION_HAVE_PACOS_FOLLOW:
|
case NPC_ACTION_HAVE_PACOS_FOLLOW:
|
||||||
pSoldier = FindSoldierByProfileID( 114, FALSE );
|
pSoldier = FindSoldierByProfileID( 114, FALSE );
|
||||||
sGridNo = 18193; //dnl!!!
|
sGridNo = 8537; //dnl!!!
|
||||||
|
//kitty: changed gridno from 18193 to 8537, that's at entrance door to rebel basement, where Fatima and Dimitri dialogue happens
|
||||||
if (pSoldier)
|
if (pSoldier)
|
||||||
{
|
{
|
||||||
if (NewOKDestination( pSoldier, sGridNo, TRUE, 0 ) )
|
if (NewOKDestination( pSoldier, sGridNo, TRUE, 0 ) )
|
||||||
@@ -4331,7 +4332,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
|||||||
case NPC_ACTION_PUT_PACOS_IN_BASEMENT:
|
case NPC_ACTION_PUT_PACOS_IN_BASEMENT:
|
||||||
gMercProfiles[ PACOS ].sSectorX = 10;
|
gMercProfiles[ PACOS ].sSectorX = 10;
|
||||||
gMercProfiles[ PACOS ].sSectorY = MAP_ROW_A;
|
gMercProfiles[ PACOS ].sSectorY = MAP_ROW_A;
|
||||||
gMercProfiles[ PACOS ].bSectorZ = 0;
|
gMercProfiles[ PACOS ].bSectorZ = 1; //kitty: fixed - first level underground is 1, not 0
|
||||||
break;
|
break;
|
||||||
case NPC_ACTION_HISTORY_ASSASSIN:
|
case NPC_ACTION_HISTORY_ASSASSIN:
|
||||||
AddHistoryToPlayersLog( HISTORY_ASSASSIN, 0, GetWorldTotalMin(), gWorldSectorX, gWorldSectorY );
|
AddHistoryToPlayersLog( HISTORY_ASSASSIN, 0, GetWorldTotalMin(), gWorldSectorX, gWorldSectorY );
|
||||||
|
|||||||
@@ -1271,14 +1271,21 @@ BOOLEAN ItemIsLegal( UINT16 usItemIndex, BOOLEAN fIgnoreCoolness )
|
|||||||
if ( Item[usItemIndex].ubCoolness == 0 && !fIgnoreCoolness )
|
if ( Item[usItemIndex].ubCoolness == 0 && !fIgnoreCoolness )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
// kitty: players might want food items in game for roleplay reasons, i.e. when interacting with npc-dealer in restaurant, no food might seems odd
|
||||||
|
// with the option "ALWAYS_FOOD" set TRUE, food items will show even without using the foodsystem
|
||||||
|
// should it be set to FALSE, no food items will be shown without using the foodsystem
|
||||||
|
if (!gGameExternalOptions.fAlwaysFood)
|
||||||
|
{
|
||||||
// silversurfer: no food items if the food system is off
|
// silversurfer: no food items if the food system is off
|
||||||
if (!UsingFoodSystem() && Item[usItemIndex].foodtype > 0 )
|
if (!UsingFoodSystem() && Item[usItemIndex].foodtype > 0 )
|
||||||
{
|
{
|
||||||
// silversurfer: Only restrict food for now. Water can be used to replenish lost energy so it is useful even without the food system.
|
// silversurfer: Only restrict food for now. Water can be used to replenish lost energy so it is useful even without the food system.
|
||||||
// kitty: and only if food isn't a drug at the same time, to make sure using those drugs without food system is possible
|
// kitty: and only if food isn't a drug at the same time, to make sure using those drugs without food system is possible
|
||||||
if (Food[Item[usItemIndex].foodtype].bFoodPoints > 0 && Item[usItemIndex].drugtype == 0 )
|
if (Food[Item[usItemIndex].foodtype].bFoodPoints > 0 && Item[usItemIndex].drugtype == 0 )
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// kitty: no disease items if the disease system is off
|
// kitty: no disease items if the disease system is off
|
||||||
// whether the item is exclusive is defined by tag
|
// whether the item is exclusive is defined by tag
|
||||||
|
|||||||
+29
-17
@@ -293,7 +293,8 @@ UINT32 POWERGENSECTOR_GRIDNO1 = 15100;
|
|||||||
UINT32 POWERGENSECTOR_GRIDNO2 = 12220;
|
UINT32 POWERGENSECTOR_GRIDNO2 = 12220;
|
||||||
UINT32 POWERGENSECTOR_GRIDNO3 = 14155;
|
UINT32 POWERGENSECTOR_GRIDNO3 = 14155;
|
||||||
UINT32 POWERGENSECTOR_GRIDNO4 = 13980;
|
UINT32 POWERGENSECTOR_GRIDNO4 = 13980;
|
||||||
UINT32 POWERGENSECTOREXITGRID_GRIDNO1 = 19749;
|
UINT32 POWERGENSECTOREXITGRID_SRC_GRIDNO = 10979;
|
||||||
|
UINT32 POWERGENSECTOREXITGRID_DST_GRIDNO = 19749;
|
||||||
UINT32 POWERGENFANSOUND_GRIDNO1 = 10979;
|
UINT32 POWERGENFANSOUND_GRIDNO1 = 10979;
|
||||||
UINT32 POWERGENFANSOUND_GRIDNO2 = 19749;
|
UINT32 POWERGENFANSOUND_GRIDNO2 = 19749;
|
||||||
UINT32 STARTFANBACKUPAGAIN_GRIDNO = 10980;
|
UINT32 STARTFANBACKUPAGAIN_GRIDNO = 10980;
|
||||||
@@ -304,17 +305,22 @@ UINT32 SECTOR_LAUNCH_MISSLES_Y = 12;
|
|||||||
UINT32 SECTOR_LAUNCH_MISSLES_Z = 3;
|
UINT32 SECTOR_LAUNCH_MISSLES_Z = 3;
|
||||||
//J13-0
|
//J13-0
|
||||||
UINT32 SECTOR_FAN_X = 13;
|
UINT32 SECTOR_FAN_X = 13;
|
||||||
UINT32 SECTOR_FAN_Z = 10;
|
UINT32 SECTOR_FAN_Y = 10;
|
||||||
UINT32 SECTOR_FAN_Y = 0;
|
UINT32 SECTOR_FAN_Z = 0;
|
||||||
//K14-1
|
//K14-1
|
||||||
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_X = 14;
|
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_X = 14;
|
||||||
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Y = 11;
|
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Y = 11;
|
||||||
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Z = 1;
|
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Z = 1;
|
||||||
|
// Destination sector for fan exitgrid
|
||||||
//J14-1
|
//J14-1
|
||||||
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_X = 14;
|
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_X = 14;
|
||||||
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y = 10;
|
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y = 10;
|
||||||
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z = 1;
|
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z = 1;
|
||||||
|
|
||||||
|
INT16 BETTY_BLOODCAT_SECTOR_X = 10;
|
||||||
|
INT16 BETTY_BLOODCAT_SECTOR_Y = 9;
|
||||||
|
INT8 BETTY_BLOODCAT_SECTOR_Z = 0;
|
||||||
|
|
||||||
void InitGridNoUB()
|
void InitGridNoUB()
|
||||||
{
|
{
|
||||||
SWITCHINMORRISAREA_GRIDNO = gGameUBOptions.SwitchInMorrisAreaGridNo; //= 15231;
|
SWITCHINMORRISAREA_GRIDNO = gGameUBOptions.SwitchInMorrisAreaGridNo; //= 15231;
|
||||||
@@ -326,7 +332,8 @@ void InitGridNoUB()
|
|||||||
POWERGENSECTOR_GRIDNO2 = gGameUBOptions.PowergenSectorGridNo2; //= 12220;
|
POWERGENSECTOR_GRIDNO2 = gGameUBOptions.PowergenSectorGridNo2; //= 12220;
|
||||||
POWERGENSECTOR_GRIDNO3 = gGameUBOptions.PowergenSectorGridNo3; //= 14155;
|
POWERGENSECTOR_GRIDNO3 = gGameUBOptions.PowergenSectorGridNo3; //= 14155;
|
||||||
POWERGENSECTOR_GRIDNO4 = gGameUBOptions.PowergenSectorGridNo4; //= 13980;
|
POWERGENSECTOR_GRIDNO4 = gGameUBOptions.PowergenSectorGridNo4; //= 13980;
|
||||||
POWERGENSECTOREXITGRID_GRIDNO1 = gGameUBOptions.PowergenSectorExitgridGridNo; // = 19749;
|
POWERGENSECTOREXITGRID_SRC_GRIDNO = gGameUBOptions.PowergenSectorExitgridSrcGridNo; //= 10979; // Exitgrid location in the sector it is created in
|
||||||
|
POWERGENSECTOREXITGRID_DST_GRIDNO = gGameUBOptions.PowergenSectorExitgridGridNo; // = 19749; // Exitgrid location in the destination sector
|
||||||
POWERGENFANSOUND_GRIDNO1 = gGameUBOptions.PowergenFanSoundGridNo1; //= 10979;
|
POWERGENFANSOUND_GRIDNO1 = gGameUBOptions.PowergenFanSoundGridNo1; //= 10979;
|
||||||
POWERGENFANSOUND_GRIDNO2 = gGameUBOptions.PowergenFanSoundGridNo2; //= 19749;
|
POWERGENFANSOUND_GRIDNO2 = gGameUBOptions.PowergenFanSoundGridNo2; //= 19749;
|
||||||
STARTFANBACKUPAGAIN_GRIDNO = gGameUBOptions.StartFanbackupAgainGridNo; //= 10980;
|
STARTFANBACKUPAGAIN_GRIDNO = gGameUBOptions.StartFanbackupAgainGridNo; //= 10980;
|
||||||
@@ -338,8 +345,8 @@ void InitGridNoUB()
|
|||||||
SECTOR_LAUNCH_MISSLES_Z = gGameUBOptions.SectorLaunchMisslesZ; //3;
|
SECTOR_LAUNCH_MISSLES_Z = gGameUBOptions.SectorLaunchMisslesZ; //3;
|
||||||
//J13-0
|
//J13-0
|
||||||
SECTOR_FAN_X = gGameUBOptions.SectorFanX; //13;
|
SECTOR_FAN_X = gGameUBOptions.SectorFanX; //13;
|
||||||
SECTOR_FAN_Z = gGameUBOptions.SectorFanY; //10;
|
SECTOR_FAN_Y = gGameUBOptions.SectorFanY; //10;
|
||||||
SECTOR_FAN_Y = gGameUBOptions.SectorFanZ; //0;
|
SECTOR_FAN_Z = gGameUBOptions.SectorFanZ; //0;
|
||||||
//K14-1
|
//K14-1
|
||||||
SECTOR_OPEN_GATE_IN_TUNNEL_X = gGameUBOptions.SectorOpenGateInTunnelX; //14;
|
SECTOR_OPEN_GATE_IN_TUNNEL_X = gGameUBOptions.SectorOpenGateInTunnelX; //14;
|
||||||
SECTOR_OPEN_GATE_IN_TUNNEL_Y = gGameUBOptions.SectorOpenGateInTunnelY; //11;
|
SECTOR_OPEN_GATE_IN_TUNNEL_Y = gGameUBOptions.SectorOpenGateInTunnelY; //11;
|
||||||
@@ -349,6 +356,11 @@ void InitGridNoUB()
|
|||||||
EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y = gGameUBOptions.ExitForFanToPowerGenSectorY; //10;
|
EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y = gGameUBOptions.ExitForFanToPowerGenSectorY; //10;
|
||||||
EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z = gGameUBOptions.ExitForFanToPowerGenSectorZ; //1;
|
EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z = gGameUBOptions.ExitForFanToPowerGenSectorZ; //1;
|
||||||
|
|
||||||
|
BETTY_BLOODCAT_SECTOR_X = gGameUBOptions.BettyBloodCatSectorX;
|
||||||
|
BETTY_BLOODCAT_SECTOR_Y = gGameUBOptions.BettyBloodCatSectorY;
|
||||||
|
BETTY_BLOODCAT_SECTOR_Z = gGameUBOptions.BettyBloodCatSectorZ;
|
||||||
|
|
||||||
|
|
||||||
MANUEL_UB = gGameUBOptions.ubMANUEL_UB;
|
MANUEL_UB = gGameUBOptions.ubMANUEL_UB;
|
||||||
BIGGENS_UB = gGameUBOptions.ubBIGGENS_UB;
|
BIGGENS_UB = gGameUBOptions.ubBIGGENS_UB;
|
||||||
JOHN_K_UB = gGameUBOptions.ubJOHN_K_UB;
|
JOHN_K_UB = gGameUBOptions.ubJOHN_K_UB;
|
||||||
@@ -646,7 +658,7 @@ void HandleWhenCertainPercentageOfEnemiesDie()
|
|||||||
UINT32 uiPercentEnemiesKilled;
|
UINT32 uiPercentEnemiesKilled;
|
||||||
UINT8 ubSectorID;
|
UINT8 ubSectorID;
|
||||||
|
|
||||||
//if there isnt enemies in the sector
|
//if there isn't enemies in the sector
|
||||||
if( ( gTacticalStatus.Team[ ENEMY_TEAM ].bMenInSector + gTacticalStatus.ubArmyGuysKilled ) == 0 )
|
if( ( gTacticalStatus.Team[ ENEMY_TEAM ].bMenInSector + gTacticalStatus.ubArmyGuysKilled ) == 0 )
|
||||||
{
|
{
|
||||||
//get out
|
//get out
|
||||||
@@ -663,7 +675,7 @@ void HandleWhenCertainPercentageOfEnemiesDie()
|
|||||||
switch( ubSectorID )
|
switch( ubSectorID )
|
||||||
{
|
{
|
||||||
case SEC_K15:
|
case SEC_K15:
|
||||||
//all enemies are dead and if the quote hasnt been said yet
|
//all enemies are dead and if the quote hasn't been said yet
|
||||||
if( uiPercentEnemiesKilled >= 100 && !( gJa25SaveStruct.uiJa25GeneralFlags & JA_GF__ALL_DEAD_TOP_LEVEL_OF_COMPLEX ) )
|
if( uiPercentEnemiesKilled >= 100 && !( gJa25SaveStruct.uiJa25GeneralFlags & JA_GF__ALL_DEAD_TOP_LEVEL_OF_COMPLEX ) )
|
||||||
{
|
{
|
||||||
INT16 bProfile = RandomProfileIdFromNewMercsOnPlayerTeam();
|
INT16 bProfile = RandomProfileIdFromNewMercsOnPlayerTeam();
|
||||||
@@ -703,7 +715,7 @@ void StopPowerGenFan()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Remeber how the player got through
|
//Remember how the player got through
|
||||||
SetJa25GeneralFlag( JA_GF__POWER_GEN_FAN_HAS_BEEN_STOPPED );
|
SetJa25GeneralFlag( JA_GF__POWER_GEN_FAN_HAS_BEEN_STOPPED );
|
||||||
|
|
||||||
gJa25SaveStruct.ubStateOfFanInPowerGenSector = PGF__STOPPED;
|
gJa25SaveStruct.ubStateOfFanInPowerGenSector = PGF__STOPPED;
|
||||||
@@ -721,7 +733,7 @@ void StopPowerGenFan()
|
|||||||
//Turn off the power gen fan sound
|
//Turn off the power gen fan sound
|
||||||
HandleRemovingPowerGenFanSound();
|
HandleRemovingPowerGenFanSound();
|
||||||
|
|
||||||
//remeber which turn the fan stopped on
|
//remember which turn the fan stopped on
|
||||||
gJa25SaveStruct.uiTurnPowerGenFanWentDown = gJa25SaveStruct.uiTacticalTurnCounter;
|
gJa25SaveStruct.uiTurnPowerGenFanWentDown = gJa25SaveStruct.uiTacticalTurnCounter;
|
||||||
|
|
||||||
|
|
||||||
@@ -729,7 +741,7 @@ void StopPowerGenFan()
|
|||||||
// Replace the Fan graphic
|
// Replace the Fan graphic
|
||||||
//
|
//
|
||||||
|
|
||||||
// Turn on permenant changes....
|
// Turn on permanent changes....
|
||||||
ApplyMapChangesToMapTempFile( TRUE );
|
ApplyMapChangesToMapTempFile( TRUE );
|
||||||
|
|
||||||
//Add the exit grid to the power gen fan
|
//Add the exit grid to the power gen fan
|
||||||
@@ -784,7 +796,7 @@ void StartFanBackUpAgain()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Remeber how the player got through
|
//Remember how the player got through
|
||||||
gJa25SaveStruct.ubStateOfFanInPowerGenSector = PGF__RUNNING_NORMALLY;
|
gJa25SaveStruct.ubStateOfFanInPowerGenSector = PGF__RUNNING_NORMALLY;
|
||||||
|
|
||||||
|
|
||||||
@@ -796,7 +808,7 @@ void StartFanBackUpAgain()
|
|||||||
// Replace the Fan graphic
|
// Replace the Fan graphic
|
||||||
//
|
//
|
||||||
|
|
||||||
// Turn on permenant changes....
|
// Turn on permanent changes....
|
||||||
ApplyMapChangesToMapTempFile( TRUE );
|
ApplyMapChangesToMapTempFile( TRUE );
|
||||||
|
|
||||||
// Remove it!
|
// Remove it!
|
||||||
@@ -821,7 +833,7 @@ void StartFanBackUpAgain()
|
|||||||
gTacticalStatus.uiFlags |= NOHIDE_REDUNDENCY;
|
gTacticalStatus.uiFlags |= NOHIDE_REDUNDENCY;
|
||||||
|
|
||||||
//Remove the exit grid
|
//Remove the exit grid
|
||||||
RemoveExitGridFromWorld( PGF__FAN_EXIT_GRID_GRIDNO );
|
RemoveExitGridFromWorld( POWERGENSECTOREXITGRID_SRC_GRIDNO );
|
||||||
|
|
||||||
// FOR THE NEXT RENDER LOOP, RE-EVALUATE REDUNDENT TILES
|
// FOR THE NEXT RENDER LOOP, RE-EVALUATE REDUNDENT TILES
|
||||||
SetRenderFlags(RENDER_FLAG_FULL);
|
SetRenderFlags(RENDER_FLAG_FULL);
|
||||||
@@ -914,7 +926,7 @@ void HandleAddingPowerGenFanSound()
|
|||||||
sGridNo = POWERGENFANSOUND_GRIDNO2;
|
sGridNo = POWERGENFANSOUND_GRIDNO2;
|
||||||
|
|
||||||
//Create the new ambient fan sound
|
//Create the new ambient fan sound
|
||||||
//gJa25SaveStruct.iPowerGenFanPositionSndID = NewPositionSnd( sGridNo, POSITION_SOUND_STATIONATY_OBJECT, 0, POWER_GEN_FAN_SOUND );
|
gJa25SaveStruct.iPowerGenFanPositionSndID = NewPositionSnd( sGridNo, POSITION_SOUND_STATIONATY_OBJECT, 0, POWER_GEN_FAN_SOUND, 30 );
|
||||||
|
|
||||||
SetPositionSndsInActive( );
|
SetPositionSndsInActive( );
|
||||||
SetPositionSndsActive( );
|
SetPositionSndsActive( );
|
||||||
@@ -942,10 +954,10 @@ void AddExitGridForFanToPowerGenSector()
|
|||||||
ExitGrid.ubGotoSectorX = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_X; //14;
|
ExitGrid.ubGotoSectorX = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_X; //14;
|
||||||
ExitGrid.ubGotoSectorY = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y; //MAP_ROW_J;
|
ExitGrid.ubGotoSectorY = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y; //MAP_ROW_J;
|
||||||
ExitGrid.ubGotoSectorZ = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z; //1;
|
ExitGrid.ubGotoSectorZ = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z; //1;
|
||||||
ExitGrid.usGridNo = POWERGENSECTOREXITGRID_GRIDNO1;
|
ExitGrid.usGridNo = POWERGENSECTOREXITGRID_DST_GRIDNO;
|
||||||
|
|
||||||
//Add the exit grid when the fan is either stopped or blown up
|
//Add the exit grid when the fan is either stopped or blown up
|
||||||
AddExitGridToWorld( PGF__FAN_EXIT_GRID_GRIDNO, &ExitGrid );
|
AddExitGridToWorld( POWERGENSECTOREXITGRID_SRC_GRIDNO, &ExitGrid );
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN HandlePlayerSayingQuoteWhenFailingToOpenGateInTunnel( SOLDIERTYPE *pSoldierAtDoor, BOOLEAN fSayQuoteOnlyOnce )
|
BOOLEAN HandlePlayerSayingQuoteWhenFailingToOpenGateInTunnel( SOLDIERTYPE *pSoldierAtDoor, BOOLEAN fSayQuoteOnlyOnce )
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
#include "MapScreen Quotes.h"
|
#include "MapScreen Quotes.h"
|
||||||
|
|
||||||
#define PGF__FAN_EXIT_GRID_GRIDNO 10979
|
|
||||||
|
|
||||||
#define NUM_MERCS_WITH_NEW_QUOTES 20//7
|
#define NUM_MERCS_WITH_NEW_QUOTES 20//7
|
||||||
|
|
||||||
@@ -144,6 +143,10 @@ extern UINT8 RAUL_UB;
|
|||||||
extern UINT8 MORRIS_UB;
|
extern UINT8 MORRIS_UB;
|
||||||
extern UINT8 RUDY_UB;
|
extern UINT8 RUDY_UB;
|
||||||
|
|
||||||
|
extern INT16 BETTY_BLOODCAT_SECTOR_X;
|
||||||
|
extern INT16 BETTY_BLOODCAT_SECTOR_Y;
|
||||||
|
extern INT8 BETTY_BLOODCAT_SECTOR_Z;
|
||||||
|
|
||||||
extern void Old_UB_Inventory ();
|
extern void Old_UB_Inventory ();
|
||||||
extern void New_UB_Inventory ();
|
extern void New_UB_Inventory ();
|
||||||
|
|
||||||
|
|||||||
@@ -1043,7 +1043,7 @@ void UpdateJerryMiloInInitialSector()
|
|||||||
//SectorInfo[ SEC_H7 ].fSurfaceWasEverPlayerControlled = TRUE;
|
//SectorInfo[ SEC_H7 ].fSurfaceWasEverPlayerControlled = TRUE;
|
||||||
SectorInfo[(UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY )].fSurfaceWasEverPlayerControlled = TRUE;
|
SectorInfo[(UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY )].fSurfaceWasEverPlayerControlled = TRUE;
|
||||||
//SectorInfo[ SEC_H7 ].ubNumAdmins = 2;
|
//SectorInfo[ SEC_H7 ].ubNumAdmins = 2;
|
||||||
StrategicMap[ (UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY ) ].fEnemyControlled = FALSE;
|
StrategicMap[CALCULATE_STRATEGIC_INDEX( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY )].fEnemyControlled = FALSE;
|
||||||
|
|
||||||
if ( gGameUBOptions.InGameHeli == TRUE )
|
if ( gGameUBOptions.InGameHeli == TRUE )
|
||||||
return; //AA
|
return; //AA
|
||||||
@@ -1071,7 +1071,7 @@ if ( gGameUBOptions.InGameHeliCrash == TRUE )
|
|||||||
//Record the initial sector as ours
|
//Record the initial sector as ours
|
||||||
//SectorInfo[ SEC_H7 ].fSurfaceWasEverPlayerControlled = TRUE;
|
//SectorInfo[ SEC_H7 ].fSurfaceWasEverPlayerControlled = TRUE;
|
||||||
SectorInfo[(UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY )].fSurfaceWasEverPlayerControlled = TRUE;
|
SectorInfo[(UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY )].fSurfaceWasEverPlayerControlled = TRUE;
|
||||||
StrategicMap[ (UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY ) ].fEnemyControlled = FALSE;
|
StrategicMap[CALCULATE_STRATEGIC_INDEX( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY )].fEnemyControlled = FALSE;
|
||||||
|
|
||||||
if ( gGameUBOptions.InJerry == TRUE )
|
if ( gGameUBOptions.InJerry == TRUE )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1077,7 +1077,7 @@ BOOLEAN ExecuteOverhead( )
|
|||||||
pSoldier->DoMercBattleSound( BATTLE_SOUND_CURSE1 );
|
pSoldier->DoMercBattleSound( BATTLE_SOUND_CURSE1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_MULTIPURPOSE, pSoldier->ubProfile, 0, 0, pSoldier->iFaceIndex, 0 );
|
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_MULTIPURPOSE, MULTIPURPOSE_SPECIAL_EVENT_GETUP_AFTER_HELI_CRASH, pSoldier->ubProfile, 0, pSoldier->iFaceIndex, 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -7915,7 +7915,7 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
|||||||
if ( CheckFact( FACT_FIRST_BATTLE_BEING_FOUGHT, 0 ) )
|
if ( CheckFact( FACT_FIRST_BATTLE_BEING_FOUGHT, 0 ) )
|
||||||
{
|
{
|
||||||
// ATE: Need to trigger record for this event .... for NPC scripting
|
// ATE: Need to trigger record for this event .... for NPC scripting
|
||||||
TriggerNPCRecord( PACOS, 18 );
|
TriggerNPCRecord( PACOS, 20 );
|
||||||
|
|
||||||
// this is our first battle... and we won!
|
// this is our first battle... and we won!
|
||||||
SetFactTrue( FACT_FIRST_BATTLE_FOUGHT );
|
SetFactTrue( FACT_FIRST_BATTLE_FOUGHT );
|
||||||
|
|||||||
@@ -909,7 +909,9 @@ DragSelection::Setup( UINT32 aVal )
|
|||||||
|
|
||||||
if ( xmlentry >= 0 )
|
if ( xmlentry >= 0 )
|
||||||
{
|
{
|
||||||
swprintf( pStr, L"%hs (%s)", gStructureMovePossible[xmlentry].szTileSetDisplayName, FaceDirs[gOneCDirection[ubDirection]] );
|
WCHAR buf[256];
|
||||||
|
MultiByteToWideChar(CP_UTF8, 0, gStructureMovePossible[xmlentry].szTileSetDisplayName, -1, buf, 256);
|
||||||
|
swprintf(pStr, L"%s (%s)", buf, FaceDirs[gOneCDirection[ubDirection]]);
|
||||||
|
|
||||||
// we have to use an offset of NOBODY in order to differentiate between person and corpse
|
// we have to use an offset of NOBODY in order to differentiate between person and corpse
|
||||||
pOption = new POPUP_OPTION( &std::wstring( pStr ), new popupCallbackFunction<void, UINT32>( &Wrapper_Function_DragSelection_GridNo, sTempGridNo ) );
|
pOption = new POPUP_OPTION( &std::wstring( pStr ), new popupCallbackFunction<void, UINT32>( &Wrapper_Function_DragSelection_GridNo, sTempGridNo ) );
|
||||||
|
|||||||
@@ -2445,7 +2445,7 @@ BOOLEAN SOLDIERTYPE::CreateSoldierCommon( UINT8 ubBodyType, UINT16 usSoldierID,
|
|||||||
|
|
||||||
if ( this->ubBodyType == QUEENMONSTER )
|
if ( this->ubBodyType == QUEENMONSTER )
|
||||||
{
|
{
|
||||||
this->iPositionSndID = NewPositionSnd( NOWHERE, POSITION_SOUND_FROM_SOLDIER, (UINT32)this, QUEEN_AMBIENT_NOISE );
|
this->iPositionSndID = NewPositionSnd( NOWHERE, POSITION_SOUND_FROM_SOLDIER, (UINT32)this, QUEEN_AMBIENT_NOISE, 15 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9957,10 +9957,6 @@ BOOLEAN IsGunBurstCapable(OBJECTTYPE* pObject, BOOLEAN fNotify, SOLDIERTYPE* pSo
|
|||||||
fCapable = TRUE;
|
fCapable = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Weapon[pObject->usItem].fBurstOnlyByFanTheHammer)
|
|
||||||
{
|
|
||||||
fCapable = FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -934,7 +934,7 @@ public:
|
|||||||
UINT8 ubLastDateSpokenTo;
|
UINT8 ubLastDateSpokenTo;
|
||||||
UINT8 bLastQuoteSaidWasSpecial;
|
UINT8 bLastQuoteSaidWasSpecial;
|
||||||
INT8 bSectorZ;
|
INT8 bSectorZ;
|
||||||
UINT16 usStrategicInsertionData;
|
UINT32 usStrategicInsertionData;
|
||||||
INT8 bFriendlyOrDirectDefaultResponseUsedRecently;
|
INT8 bFriendlyOrDirectDefaultResponseUsedRecently;
|
||||||
INT8 bRecruitDefaultResponseUsedRecently;
|
INT8 bRecruitDefaultResponseUsedRecently;
|
||||||
INT8 bThreatenDefaultResponseUsedRecently;
|
INT8 bThreatenDefaultResponseUsedRecently;
|
||||||
|
|||||||
@@ -5164,6 +5164,8 @@ INT16 ubMinAPCost;
|
|||||||
|
|
||||||
// offer surrender?
|
// offer surrender?
|
||||||
#ifndef JA2UB
|
#ifndef JA2UB
|
||||||
|
if ( !is_networked ) // No surrender in multiplayer
|
||||||
|
{
|
||||||
if ( pSoldier->bTeam == ENEMY_TEAM && pSoldier->bVisible == TRUE && !(gTacticalStatus.fEnemyFlags & ENEMY_OFFERED_SURRENDER) && pSoldier->stats.bLife >= pSoldier->stats.bLifeMax / 2 && !ARMED_VEHICLE( pSoldier ) && !ENEMYROBOT( pSoldier ) )
|
if ( pSoldier->bTeam == ENEMY_TEAM && pSoldier->bVisible == TRUE && !(gTacticalStatus.fEnemyFlags & ENEMY_OFFERED_SURRENDER) && pSoldier->stats.bLife >= pSoldier->stats.bLifeMax / 2 && !ARMED_VEHICLE( pSoldier ) && !ENEMYROBOT( pSoldier ) )
|
||||||
{
|
{
|
||||||
if ( gTacticalStatus.Team[ MILITIA_TEAM ].bMenInSector == 0 && gTacticalStatus.Team[ CREATURE_TEAM ].bMenInSector == 0 && NumPCsInSector() < 4 && gTacticalStatus.Team[ ENEMY_TEAM ].bMenInSector >= NumPCsInSector() * 3 )
|
if ( gTacticalStatus.Team[ MILITIA_TEAM ].bMenInSector == 0 && gTacticalStatus.Team[ CREATURE_TEAM ].bMenInSector == 0 && NumPCsInSector() < 4 && gTacticalStatus.Team[ ENEMY_TEAM ].bMenInSector >= NumPCsInSector() * 3 )
|
||||||
@@ -5174,6 +5176,7 @@ INT16 ubMinAPCost;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -9584,6 +9587,8 @@ INT8 ArmedVehicleDecideActionBlack( SOLDIERTYPE *pSoldier )
|
|||||||
|
|
||||||
// offer surrender?
|
// offer surrender?
|
||||||
#ifndef JA2UB
|
#ifndef JA2UB
|
||||||
|
if ( !is_networked ) // No surrender in multiplayer
|
||||||
|
{
|
||||||
if ( pSoldier->bTeam == ENEMY_TEAM && pSoldier->bVisible == TRUE && !(gTacticalStatus.fEnemyFlags & ENEMY_OFFERED_SURRENDER) && pSoldier->stats.bLife >= pSoldier->stats.bLifeMax / 2 && !ARMED_VEHICLE( pSoldier ) && !ENEMYROBOT( pSoldier ) )
|
if ( pSoldier->bTeam == ENEMY_TEAM && pSoldier->bVisible == TRUE && !(gTacticalStatus.fEnemyFlags & ENEMY_OFFERED_SURRENDER) && pSoldier->stats.bLife >= pSoldier->stats.bLifeMax / 2 && !ARMED_VEHICLE( pSoldier ) && !ENEMYROBOT( pSoldier ) )
|
||||||
{
|
{
|
||||||
if ( gTacticalStatus.Team[MILITIA_TEAM].bMenInSector == 0 && gTacticalStatus.Team[CREATURE_TEAM].bMenInSector == 0 && NumPCsInSector() < 4 && gTacticalStatus.Team[ENEMY_TEAM].bMenInSector >= NumPCsInSector() * 3 )
|
if ( gTacticalStatus.Team[MILITIA_TEAM].bMenInSector == 0 && gTacticalStatus.Team[CREATURE_TEAM].bMenInSector == 0 && NumPCsInSector() < 4 && gTacticalStatus.Team[ENEMY_TEAM].bMenInSector >= NumPCsInSector() * 3 )
|
||||||
@@ -9594,6 +9599,7 @@ INT8 ArmedVehicleDecideActionBlack( SOLDIERTYPE *pSoldier )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#pragma optimize("", off)
|
|
||||||
#include "builddefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
|
|||||||
@@ -2929,7 +2929,7 @@ BOOLEAN LoadWorld(const STR8 puiFilename, FLOAT* pMajorMapVersion, UINT8* pMinor
|
|||||||
SetWorldSize(iRowSize, iColSize);
|
SetWorldSize(iRowSize, iColSize);
|
||||||
|
|
||||||
// We still have the "normal" map size AND the map is saved in vanilla format
|
// We still have the "normal" map size AND the map is saved in vanilla format
|
||||||
if ((iRowSize <= OLD_WORLD_ROWS && iRowSize <= OLD_WORLD_COLS) && (dMajorMapVersion == VANILLA_MAJOR_MAP_VERSION && ubMinorMapVersion == VANILLA_MINOR_MAP_VERSION))
|
if ((iRowSize <= OLD_WORLD_ROWS && iColSize <= OLD_WORLD_COLS) && (dMajorMapVersion == VANILLA_MAJOR_MAP_VERSION && ubMinorMapVersion == VANILLA_MINOR_MAP_VERSION))
|
||||||
{
|
{
|
||||||
// Check "vanilla map saving"
|
// Check "vanilla map saving"
|
||||||
gfVanillaMode = TRUE;//dnl ch74 191013
|
gfVanillaMode = TRUE;//dnl ch74 191013
|
||||||
|
|||||||
+12
-3
@@ -774,6 +774,7 @@ typedef struct
|
|||||||
UINT32 uiData;
|
UINT32 uiData;
|
||||||
BOOLEAN fAllocated;
|
BOOLEAN fAllocated;
|
||||||
BOOLEAN fInActive;
|
BOOLEAN fInActive;
|
||||||
|
UINT8 volume;
|
||||||
|
|
||||||
} POSITIONSND;
|
} POSITIONSND;
|
||||||
|
|
||||||
@@ -820,7 +821,7 @@ void RecountPositionSnds( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT32 NewPositionSnd( INT32 sGridNo, UINT32 uiFlags, UINT32 uiData, UINT32 iSoundToPlay )
|
INT32 NewPositionSnd( INT32 sGridNo, UINT32 uiFlags, UINT32 uiData, UINT32 iSoundToPlay, UINT8 volume )
|
||||||
{
|
{
|
||||||
POSITIONSND *pPositionSnd;
|
POSITIONSND *pPositionSnd;
|
||||||
INT32 iPositionSndIndex;
|
INT32 iPositionSndIndex;
|
||||||
@@ -849,6 +850,7 @@ INT32 NewPositionSnd( INT32 sGridNo, UINT32 uiFlags, UINT32 uiData, UINT32 iSoun
|
|||||||
pPositionSnd->uiFlags = uiFlags;
|
pPositionSnd->uiFlags = uiFlags;
|
||||||
pPositionSnd->fAllocated = TRUE;
|
pPositionSnd->fAllocated = TRUE;
|
||||||
pPositionSnd->iSoundToPlay = iSoundToPlay;
|
pPositionSnd->iSoundToPlay = iSoundToPlay;
|
||||||
|
pPositionSnd->volume = volume;
|
||||||
|
|
||||||
pPositionSnd->iSoundSampleID = NO_SAMPLE;
|
pPositionSnd->iSoundSampleID = NO_SAMPLE;
|
||||||
|
|
||||||
@@ -911,11 +913,18 @@ void SetPositionSndsActive( )
|
|||||||
|
|
||||||
// Begin sound effect
|
// Begin sound effect
|
||||||
// Volume 0
|
// Volume 0
|
||||||
|
if ( pPositionSnd->iSoundToPlay == POWER_GEN_FAN_SOUND )
|
||||||
|
{
|
||||||
|
pPositionSnd->iSoundSampleID = PlayJA2SampleFromFile( "Sounds\\POWERGENFAN.WAV", RATE_11025, 0, 0, MIDDLEPAN );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
pPositionSnd->iSoundSampleID = PlayJA2Sample( pPositionSnd->iSoundToPlay, RATE_11025, 0, 0, MIDDLEPAN );
|
pPositionSnd->iSoundSampleID = PlayJA2Sample( pPositionSnd->iSoundToPlay, RATE_11025, 0, 0, MIDDLEPAN );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SetPositionSndsInActive()
|
void SetPositionSndsInActive()
|
||||||
@@ -1068,7 +1077,7 @@ void SetPositionSndsVolumeAndPanning( )
|
|||||||
{
|
{
|
||||||
if ( pPositionSnd->iSoundSampleID != NO_SAMPLE )
|
if ( pPositionSnd->iSoundSampleID != NO_SAMPLE )
|
||||||
{
|
{
|
||||||
bVolume = PositionSoundVolume( 15, pPositionSnd->sGridNo );
|
bVolume = PositionSoundVolume( pPositionSnd->volume, pPositionSnd->sGridNo );
|
||||||
|
|
||||||
if ( pPositionSnd->uiFlags & POSITION_SOUND_FROM_SOLDIER )
|
if ( pPositionSnd->uiFlags & POSITION_SOUND_FROM_SOLDIER )
|
||||||
{
|
{
|
||||||
@@ -1084,7 +1093,7 @@ void SetPositionSndsVolumeAndPanning( )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if the sound is from a stationay object
|
//if the sound is from a stationary object
|
||||||
if ( pPositionSnd->uiFlags & POSITION_SOUND_STATIONATY_OBJECT )
|
if ( pPositionSnd->uiFlags & POSITION_SOUND_STATIONATY_OBJECT )
|
||||||
{
|
{
|
||||||
// make sure you can always hear it
|
// make sure you can always hear it
|
||||||
|
|||||||
@@ -379,7 +379,9 @@ enum SoundDefines
|
|||||||
S_VAL,
|
S_VAL,
|
||||||
//BREAK_LIGHT_IGNITING,
|
//BREAK_LIGHT_IGNITING,
|
||||||
|
|
||||||
NUM_SAMPLES
|
NUM_SAMPLES,
|
||||||
|
POWER_GEN_FAN_SOUND = 5001 // This is a workaround to get the generator fan positional sound working in UB campaign.
|
||||||
|
// Had to special case it because sound effects have been externalized.
|
||||||
};
|
};
|
||||||
|
|
||||||
enum AmbientDefines
|
enum AmbientDefines
|
||||||
@@ -453,7 +455,7 @@ void PlayDelayedJA2Sample( UINT32 uiDelay, UINT32 usNum, UINT32 usRate, UINT32 u
|
|||||||
#define POSITION_SOUND_FROM_SOLDIER 0x00000001
|
#define POSITION_SOUND_FROM_SOLDIER 0x00000001
|
||||||
#define POSITION_SOUND_STATIONATY_OBJECT 0x00000002
|
#define POSITION_SOUND_STATIONATY_OBJECT 0x00000002
|
||||||
|
|
||||||
INT32 NewPositionSnd( INT32 sGridNo, UINT32 uiFlags, UINT32 uiData, UINT32 iSoundToPlay );
|
INT32 NewPositionSnd( INT32 sGridNo, UINT32 uiFlags, UINT32 uiData, UINT32 iSoundToPlay, UINT8 volume );
|
||||||
void DeletePositionSnd( INT32 iPositionSndIndex );
|
void DeletePositionSnd( INT32 iPositionSndIndex );
|
||||||
void SetPositionSndsActive( );
|
void SetPositionSndsActive( );
|
||||||
void SetPositionSndsInActive( );
|
void SetPositionSndsInActive( );
|
||||||
|
|||||||
@@ -5478,6 +5478,7 @@ STR16 MercInfo[] =
|
|||||||
L"未结账单", //L"Unsettled Bills",
|
L"未结账单", //L"Unsettled Bills",
|
||||||
L"生平", //L"Bio",
|
L"生平", //L"Bio",
|
||||||
L"物品", //L"Inv",
|
L"物品", //L"Inv",
|
||||||
|
L"Special Offer!",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5481,6 +5481,7 @@ STR16 MercInfo[] =
|
|||||||
L"Unsettled Bills", // TODO.Translate
|
L"Unsettled Bills", // TODO.Translate
|
||||||
L"Bio", // TODO.Translate
|
L"Bio", // TODO.Translate
|
||||||
L"Inv",
|
L"Inv",
|
||||||
|
L"Special Offer!",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5478,6 +5478,7 @@ STR16 MercInfo[] =
|
|||||||
L"Unsettled Bills",
|
L"Unsettled Bills",
|
||||||
L"Bio",
|
L"Bio",
|
||||||
L"Inv",
|
L"Inv",
|
||||||
|
L"Special Offer!",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5485,6 +5485,7 @@ STR16 MercInfo[] =
|
|||||||
L"Payez sa solde",
|
L"Payez sa solde",
|
||||||
L"Biographie",
|
L"Biographie",
|
||||||
L"Inventaire",
|
L"Inventaire",
|
||||||
|
L"Special Offer!",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5429,6 +5429,7 @@ STR16 MercInfo[] =
|
|||||||
L"Offene Beträge",
|
L"Offene Beträge",
|
||||||
L"Bio",
|
L"Bio",
|
||||||
L"Inv",
|
L"Inv",
|
||||||
|
L"Special Offer!",
|
||||||
};
|
};
|
||||||
|
|
||||||
// For use at the M.E.R.C. web site. Text relating to opening an account with MERC
|
// For use at the M.E.R.C. web site. Text relating to opening an account with MERC
|
||||||
|
|||||||
@@ -5468,6 +5468,7 @@ STR16 MercInfo[] =
|
|||||||
L"Unsettled Bills", // TODO.Translate
|
L"Unsettled Bills", // TODO.Translate
|
||||||
L"Bio", // TODO.Translate
|
L"Bio", // TODO.Translate
|
||||||
L"Inv",
|
L"Inv",
|
||||||
|
L"Special Offer!",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5481,6 +5481,7 @@ STR16 MercInfo[] =
|
|||||||
L"Unsettled Bills", // TODO.Translate
|
L"Unsettled Bills", // TODO.Translate
|
||||||
L"Bio", // TODO.Translate
|
L"Bio", // TODO.Translate
|
||||||
L"Inv",
|
L"Inv",
|
||||||
|
L"Special Offer!",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5474,6 +5474,7 @@ STR16 MercInfo[] =
|
|||||||
L"Неоплаченные счета",
|
L"Неоплаченные счета",
|
||||||
L"Информация",
|
L"Информация",
|
||||||
L"Снаряжение",
|
L"Снаряжение",
|
||||||
|
L"Special Offer!",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1262,6 +1262,7 @@ enum
|
|||||||
MERC_FILES_MERC_OUTSTANDING,
|
MERC_FILES_MERC_OUTSTANDING,
|
||||||
MERC_FILES_BIO, //JMich_MMG: Adding two new texts for the small button, assuming we manage to add a silhouette with the gear, add it after this.
|
MERC_FILES_BIO, //JMich_MMG: Adding two new texts for the small button, assuming we manage to add a silhouette with the gear, add it after this.
|
||||||
MERC_FILES_INVENTORY,
|
MERC_FILES_INVENTORY,
|
||||||
|
MERC_FILES_SPECIAL_OFFER,
|
||||||
TEXT_NUM_MERC_FILES,
|
TEXT_NUM_MERC_FILES,
|
||||||
};
|
};
|
||||||
extern STR16 MercInfo[];
|
extern STR16 MercInfo[];
|
||||||
|
|||||||
Reference in New Issue
Block a user