- When ordering a merc to interrogate, one can now select what type of prisoners should be interrogated primarily. Thus one no longer has to empty the prison just to get to the one remaining officer.

- Generals are now a separate prisoner type. They cannot join militia, but yield an impressive ransom.
- various prisoner fixes

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7327 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-07-10 21:19:26 +00:00
parent 7fb31cc9c8
commit 0efc3b7241
31 changed files with 1000 additions and 310 deletions
+632 -143
View File
File diff suppressed because it is too large Load Diff
+8
View File
@@ -275,6 +275,9 @@ extern INT32 ghSnitchBox;
extern INT32 ghSnitchToggleBox;
extern INT32 ghSnitchSectorBox;
// Flugente: prisoner menu
extern INT32 ghPrisonerBox;
extern MOUSE_REGION gAssignmentScreenMaskRegion;
@@ -356,6 +359,11 @@ void CreateDestroyMouseRegionsForSnitchSectorMenu( void );
void SnitchSectorMenuMvtCallBack(MOUSE_REGION * pRegion, INT32 iReason );
void SnitchSectorMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason );
// Flugente: prisoner menu
void CreateDestroyMouseRegionsForPrisonerMenu();
void PrisonerMenuMvtCallBack( MOUSE_REGION * pRegion, INT32 iReason );
void PrisonerMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason );
// contract menu
void CreateDestroyMouseRegionsForContractMenu( void );
void ContractMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason );
+9 -4
View File
@@ -425,6 +425,11 @@ typedef enum
PRISONER_REGULAR,
PRISONER_ELITE,
PRISONER_OFFICER,
PRISONER_GENERAL, // generals can be captured too, interogating them gives special rewards
PRISONER_THUG, // captured enemies not affiliated to the army fall into this category
PRISONER_SECRET1, // tbA
PRISONER_SECRET2, // tbA
PRISONER_MAX,
} PrisonerType;
@@ -495,15 +500,15 @@ typedef struct SECTORINFO
BOOLEAN fCampaignSector;
#endif
UINT8 uiNumberOfPrisonersOfWar[PRISONER_MAX];
UINT8 uiInterrogationHundredsLeft;
UINT8 uiNumberOfPrisonersOfWar[PRISONER_MAX]; // TODO: PRISONER_MAX got expanded - Varaiblen werden falsch ausgelesen!!!
UINT8 uiInterrogationHundredsLeft[PRISONER_MAX];
UINT32 uiTimeAIArtillerywasOrdered; // Flugente: updated every time an artillery strike is ordered from the militia
UINT8 ubNumTanks;
UINT8 ubTanksInBattle;
INT8 bPadding[ 27 ];
INT8 bPadding[ 20 ];
}SECTORINFO;
@@ -545,7 +550,7 @@ typedef struct UNDERGROUND_SECTORINFO
UINT8 ubNumTanks;
UINT8 ubTanksInBattle;
INT8 bPadding[30];
INT8 bPadding[26];
//no padding left!
}UNDERGROUND_SECTORINFO;
@@ -434,8 +434,8 @@ void AddTextToTownBox( void )
}
// Flugente: if this is a prison we control, display number of prisoners here
UINT8 prisoners[PRISONER_MAX] = { 0 };
UINT16 numprisoners = GetNumberOfPrisoners( &(SectorInfo[SECTOR( bCurrentTownMineSectorX, bCurrentTownMineSectorY )]), &prisoners[PRISONER_OFFICER], &prisoners[PRISONER_ELITE], &prisoners[PRISONER_REGULAR], &prisoners[PRISONER_ADMIN] );
INT16 aPrisoners[PRISONER_MAX] = {0};
UINT16 numprisoners = GetNumberOfPrisoners( &(SectorInfo[SECTOR( bCurrentTownMineSectorX, bCurrentTownMineSectorY )]), aPrisoners );
if ( numprisoners )
{
// determine prison capacity
@@ -457,7 +457,7 @@ void AddTextToTownBox( void )
// prisoners
swprintf( wString, L"%s:", pwTownInfoStrings[13] );
AddMonoString( &hStringHandle, wString );
swprintf( wString, L"%d/%d - %dA %dR %dE %dO", numprisoners, capacity, prisoners[PRISONER_ADMIN], prisoners[PRISONER_REGULAR], prisoners[PRISONER_ELITE], prisoners[PRISONER_OFFICER] );
swprintf( wString, L"%d/%d - %dA %dR %dE %dO %dG", numprisoners, capacity, aPrisoners[PRISONER_ADMIN], aPrisoners[PRISONER_REGULAR], aPrisoners[PRISONER_ELITE], aPrisoners[PRISONER_OFFICER], aPrisoners[PRISONER_GENERAL] );
AddSecondColumnMonoString( &hStringHandle, wString );
}
}
+16 -4
View File
@@ -349,6 +349,9 @@ SGPRect SnitchToggleDimensions={0,0,80,80};
SGPPoint SnitchSectorPosition={320,150};
SGPRect SnitchSectorDimensions={0,0,80,80};
SGPPoint PrisonerPosition = {320, 150};
SGPRect PrisonerDimensions = {0, 0, 80, 80};
//lal
SGPPoint MilitiaControlPosition={120,150};
SGPRect MilitiaControlDimensions={0,0,100,95};
@@ -377,6 +380,8 @@ SGPPoint OrigSnitchPosition={160,150};
SGPPoint OrigSnitchTogglePosition={320,150};
SGPPoint OrigSnitchSectorPosition={320,150};
SGPPoint OrigPrisonerPosition = {320, 150};
SQUAD_NAMES SquadNames[20];
//extern BOOLEAN fMapExitDueToMessageBox;
@@ -939,6 +944,10 @@ void RestoreBackgroundForAssignmentGlowRegionList( void )
ForceUpDateOfBox( ghSnitchSectorBox );
}
}
else if ( fShowPrisonerMenu )
{
ForceUpDateOfBox( ghPrisonerBox );
}
}
if( fDisableDueToBattleRoster )
@@ -959,9 +968,6 @@ void RestoreBackgroundForAssignmentGlowRegionList( void )
// set old to current
iOldAssignmentLine = giAssignHighLine;
}
// leave
return;
}
void RestoreBackgroundForDestinationGlowRegionList( void )
@@ -2336,7 +2342,13 @@ void UpdateMapScreenAssignmentPositions( void )
SetBoxPosition( ghFacilityAssignmentBox, pPoint );
}
return;
if ( fShowPrisonerMenu )
{
GetBoxPosition( ghPrisonerBox, &pPoint );
pPoint.iY = giBoxY + (GetFontHeight( MAP_SCREEN_FONT ) + 2) * ASSIGN_MENU_FACILITY;
SetBoxPosition( ghPrisonerBox, pPoint );
}
}
+19
View File
@@ -158,6 +158,17 @@ enum {
MAX_SNITCH_SECTOR_MENU_STRING_COUNT,
};
// Flugente: prisoner menu defines
enum {
PRISONER_MENU_ADMIN = 0,
PRISONER_MENU_TROOP,
PRISONER_MENU_ELITE,
PRISONER_MENU_OFFICER,
PRISONER_MENU_GENERAL,
PRISONER_MENU_CANCEL,
MAX_PRISONER_MENU_STRING_COUNT,
};
// training assignment menu defines
enum {
TRAIN_MENU_SELF,
@@ -305,6 +316,9 @@ extern BOOLEAN fShowSnitchMenu;
extern BOOLEAN fShowSnitchToggleMenu;
extern BOOLEAN fShowSnitchSectorMenu;
// Flugente: prisoner menu
extern BOOLEAN fShowPrisonerMenu;
extern BOOLEAN fFirstTimeInMapScreen;
extern BOOLEAN fLockOutMapScreenInterface;
@@ -365,6 +379,9 @@ extern SGPRect SnitchToggleDimensions;
extern SGPPoint SnitchSectorPosition;
extern SGPRect SnitchSectorDimensions;
extern SGPPoint PrisonerPosition;
extern SGPRect PrisonerDimensions;
extern SGPPoint MilitiaControlPosition; //lal
extern SGPRect MilitiaControlDimensions;
@@ -385,6 +402,8 @@ extern SGPPoint OrigSnitchPosition;
extern SGPPoint OrigSnitchTogglePosition;
extern SGPPoint OrigSnitchSectorPosition;
extern SGPPoint OrigPrisonerPosition;
// disble team info panel due to showing of battle roster
extern BOOLEAN fDisableDueToBattleRoster;
+16 -3
View File
@@ -5403,13 +5403,26 @@ BOOLEAN LoadStrategicInfoFromSavedFile( HWFILE hFile )
StrategicMap[i].usFlags = 0;
}
}
// Load the Sector Info
for (int sectorID = 0; sectorID <= 255; ++ sectorID) {
for (int sectorID = 0; sectorID <= 255; ++sectorID)
{
FileRead( hFile, &SectorInfo[sectorID], sizeof( SECTORINFO ), &uiNumBytesRead );
if( uiNumBytesRead != sizeof( SECTORINFO )) {
if( uiNumBytesRead != sizeof( SECTORINFO ))
{
return(FALSE);
}
// Flugente: changes in SECTORINFO require a weird-looking remapping
if ( guiCurrentSaveGameVersion < PRISONER_EXPANSION )
{
SectorInfo[sectorID].uiNumberOfPrisonersOfWar[PRISONER_GENERAL] = 0;
SectorInfo[sectorID].uiNumberOfPrisonersOfWar[PRISONER_THUG] = 0;
SectorInfo[sectorID].uiNumberOfPrisonersOfWar[PRISONER_SECRET1] = 0;
SectorInfo[sectorID].uiNumberOfPrisonersOfWar[PRISONER_SECRET2] = 0;
SectorInfo[sectorID].ubNumTanks = SectorInfo[sectorID].uiInterrogationHundredsLeft[PRISONER_GENERAL];
SectorInfo[sectorID].ubTanksInBattle = SectorInfo[sectorID].uiInterrogationHundredsLeft[PRISONER_THUG];
}
}
// uiSize = sizeof( SECTORINFO ) * 256;
// FileRead( hFile, SectorInfo, uiSize, &uiNumBytesRead );