mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
- colour TestTable scrollbar
- militia website sector filter uses longer names - prisoner surrender dialogue explains how many prisoners were captured, and allows selecting prison via dropdown selection - explain soldier relation boundaries on Melody website git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8228 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -657,12 +657,19 @@ TestTable::Display( )
|
|||||||
UINT32 scrollareaheigth = (scrollbarheigth * shownentries) / totalentries;
|
UINT32 scrollareaheigth = (scrollbarheigth * shownentries) / totalentries;
|
||||||
UINT32 areabegin = (scrollbarheigth * mFirstEntryShown) / totalentries;
|
UINT32 areabegin = (scrollbarheigth * mFirstEntryShown) / totalentries;
|
||||||
|
|
||||||
|
ColorFillVideoSurfaceArea( FRAME_BUFFER,
|
||||||
|
GetX( ) + GetWidth( ) - SCROLLARROW_WIDTH - 2,
|
||||||
|
GetY( ) + SCROLLARROW_HEIGTH,
|
||||||
|
GetX( ) + GetWidth( ) - 2,
|
||||||
|
GetY( ) + SCROLLARROW_HEIGTH + GetHeight( ) - SCROLLARROW_HEIGTH,
|
||||||
|
GetColorLineShadow( ) );
|
||||||
|
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER,
|
ColorFillVideoSurfaceArea( FRAME_BUFFER,
|
||||||
GetX( ) + GetWidth( ) - SCROLLARROW_WIDTH - 2,
|
GetX( ) + GetWidth( ) - SCROLLARROW_WIDTH - 2,
|
||||||
GetY( ) + SCROLLARROW_HEIGTH + areabegin,
|
GetY( ) + SCROLLARROW_HEIGTH + areabegin,
|
||||||
GetX( ) + GetWidth( ) - 2,
|
GetX( ) + GetWidth( ) - 2,
|
||||||
GetY( ) + SCROLLARROW_HEIGTH + areabegin + scrollareaheigth,
|
GetY( ) + SCROLLARROW_HEIGTH + areabegin + scrollareaheigth,
|
||||||
Get16BPPColor( FROMRGB( 20, 250, 50 ) ) );
|
GetColorLine() );
|
||||||
|
|
||||||
CreateScrollAreaButtons( );
|
CreateScrollAreaButtons( );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ enum InidivualMilitiaOriginState
|
|||||||
IMOS_DEFECTOR
|
IMOS_DEFECTOR
|
||||||
};
|
};
|
||||||
|
|
||||||
CHAR16 gInidividualMilitiaWebsiteSectorNamesstr[256][10];
|
CHAR16 gInidividualMilitiaWebsiteSectorNamesstr[256][128];
|
||||||
|
|
||||||
std::vector<std::pair<INT16, STR16> > GetMilitiaSectorDropVector( )
|
std::vector<std::pair<INT16, STR16> > GetMilitiaSectorDropVector( )
|
||||||
{
|
{
|
||||||
@@ -256,7 +256,7 @@ std::vector<std::pair<INT16, STR16> > GetMilitiaSectorDropVector( )
|
|||||||
|
|
||||||
for ( std::set<UINT8>::iterator it = sectorset.begin( ); it != sectorset.end(); ++it )
|
for ( std::set<UINT8>::iterator it = sectorset.begin( ); it != sectorset.end(); ++it )
|
||||||
{
|
{
|
||||||
GetShortSectorString( SECTORX( (*it) ), SECTORY( (*it) ), gInidividualMilitiaWebsiteSectorNamesstr[(*it)] );
|
GetSectorIDString( SECTORX( (*it) ), SECTORY( (*it) ), 0, gInidividualMilitiaWebsiteSectorNamesstr[(*it)], FALSE );
|
||||||
|
|
||||||
sectorvector.push_back( std::make_pair( (INT16)(*it), gInidividualMilitiaWebsiteSectorNamesstr[(*it)] ) );
|
sectorvector.push_back( std::make_pair( (INT16)(*it), gInidividualMilitiaWebsiteSectorNamesstr[(*it)] ) );
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-2
@@ -921,21 +921,36 @@ BOOLEAN DisplayMercData( UINT8 usProfileA, UINT8 usProfileB )
|
|||||||
|
|
||||||
// draw the final verdict
|
// draw the final verdict
|
||||||
val = SoldierRelation( pSoldierA, pSoldierB );
|
val = SoldierRelation( pSoldierA, pSoldierB );
|
||||||
|
BOOLEAN addhint1 = ( val >= BUDDY_OPINION || val <= HATED_OPINION );
|
||||||
|
|
||||||
swprintf( sText, gzMercCompare[15] );
|
swprintf( sText, gzMercCompare[15] );
|
||||||
DisplayWrappedString( usPosX + MCA_NUMBEROFFSET - 10, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
DisplayWrappedString( usPosX + MCA_NUMBEROFFSET - 10, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||||
usPosY += 12;
|
usPosY += 12;
|
||||||
swprintf( sText, L"%d", val );
|
if ( addhint1 )
|
||||||
|
swprintf( sText, L"%d * ", val );
|
||||||
|
else
|
||||||
|
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 );
|
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 = SoldierRelation( pSoldierB, pSoldierA );
|
val = SoldierRelation( pSoldierB, pSoldierA );
|
||||||
|
BOOLEAN addhint2 = (val >= BUDDY_OPINION || val <= HATED_OPINION);
|
||||||
|
|
||||||
swprintf( sText, gzMercCompare[15] );
|
swprintf( sText, gzMercCompare[15] );
|
||||||
DisplayWrappedString( usPosX + MCA_SIDEOFFSET + MCA_NUMBEROFFSET - 10, usPosY2, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
DisplayWrappedString( usPosX + MCA_SIDEOFFSET + MCA_NUMBEROFFSET - 10, usPosY2, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||||
usPosY2 += 12;
|
usPosY2 += 12;
|
||||||
swprintf( sText, L"%d", val );
|
if ( addhint2 )
|
||||||
|
swprintf( sText, L"%d * ", val );
|
||||||
|
else
|
||||||
|
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 );
|
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 );
|
||||||
|
|
||||||
|
// add a note that opinion is always between HATED_OPINION and BUDDY_OPINION otherwise players will shout 'bug!'
|
||||||
|
if ( addhint1 || addhint2 )
|
||||||
|
{
|
||||||
|
swprintf( sText, gzMercCompare[17], HATED_OPINION, BUDDY_OPINION );
|
||||||
|
DisplayWrappedString( usPosX, LAPTOP_SCREEN_LR_Y, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, FONT10ARIAL, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+33
-18
@@ -250,7 +250,7 @@ INT32 DoMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UIN
|
|||||||
if ( gMsgBox.usFlags & MSG_BOX_FLAG_IMAGE )
|
if ( gMsgBox.usFlags & MSG_BOX_FLAG_IMAGE )
|
||||||
heightincrease = 130;
|
heightincrease = 130;
|
||||||
|
|
||||||
if ( usFlags & MSG_BOX_FLAG_DROPDOWN )
|
if ( usFlags & ( MSG_BOX_FLAG_DROPDOWN_1 | MSG_BOX_FLAG_DROPDOWN_2 ) )
|
||||||
heightincrease = 130;
|
heightincrease = 130;
|
||||||
|
|
||||||
UINT16 usMBWidth=MSGBOX_DEFAULT_WIDTH;
|
UINT16 usMBWidth=MSGBOX_DEFAULT_WIDTH;
|
||||||
@@ -919,9 +919,13 @@ INT32 DoMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UIN
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN )
|
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN_1 )
|
||||||
{
|
{
|
||||||
DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).Create( (INT16)(gMsgBox.sX + 15), (INT16)(gMsgBox.sY + 35) );
|
DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).Create( (INT16)(gMsgBox.sX + 15), (INT16)(gMsgBox.sY + 35) );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN_2 )
|
||||||
|
{
|
||||||
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).Create( (INT16)(gMsgBox.sX + 15), (INT16)(gMsgBox.sY + 66) );
|
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).Create( (INT16)(gMsgBox.sX + 15), (INT16)(gMsgBox.sY + 66) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -954,28 +958,31 @@ template<> void DropDownTemplate<DROPDOWNNR_MSGBOX_1>::SetRefresh()
|
|||||||
{
|
{
|
||||||
INT16 box1key = DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).GetSelectedEntryKey( );
|
INT16 box1key = DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).GetSelectedEntryKey( );
|
||||||
|
|
||||||
std::vector<std::pair<INT16, STR16> > dropdownvector_2 = GetTileSetIndexVector( box1key );
|
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN_2 )
|
||||||
|
|
||||||
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).SetEntries( dropdownvector_2 );
|
|
||||||
|
|
||||||
if ( !dropdownvector_2.empty( ) )
|
|
||||||
{
|
{
|
||||||
BOOLEAN found = FALSE;
|
std::vector<std::pair<INT16, STR16> > dropdownvector_2 = GetTileSetIndexVector( box1key );
|
||||||
for ( std::vector<std::pair<INT16, STR16> >::iterator it = dropdownvector_2.begin( ); it != dropdownvector_2.end( ); ++it )
|
|
||||||
|
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).SetEntries( dropdownvector_2 );
|
||||||
|
|
||||||
|
if ( !dropdownvector_2.empty( ) )
|
||||||
{
|
{
|
||||||
if ( (*it).first == guiMessageBoxImageIndex )
|
BOOLEAN found = FALSE;
|
||||||
|
for ( std::vector<std::pair<INT16, STR16> >::iterator it = dropdownvector_2.begin( ); it != dropdownvector_2.end( ); ++it )
|
||||||
{
|
{
|
||||||
found = TRUE;
|
if ( (*it).first == guiMessageBoxImageIndex )
|
||||||
break;
|
{
|
||||||
|
found = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !found )
|
||||||
|
guiMessageBoxImageIndex = dropdownvector_2[0].first;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !found )
|
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).SetSelectedEntryKey( guiMessageBoxImageIndex );
|
||||||
guiMessageBoxImageIndex = dropdownvector_2[0].first;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).SetSelectedEntryKey( guiMessageBoxImageIndex );
|
|
||||||
|
|
||||||
if ( gMsgBox.usFlags & MSG_BOX_FLAG_IMAGE )
|
if ( gMsgBox.usFlags & MSG_BOX_FLAG_IMAGE )
|
||||||
{
|
{
|
||||||
DeleteVideoObjectFromIndex( guiMessageBoxImage );
|
DeleteVideoObjectFromIndex( guiMessageBoxImage );
|
||||||
@@ -1249,9 +1256,13 @@ UINT32 ExitMsgBox( INT8 ubExitCode )
|
|||||||
DeleteVideoObjectFromIndex( guiMessageBoxImage );
|
DeleteVideoObjectFromIndex( guiMessageBoxImage );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN )
|
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN_1 )
|
||||||
{
|
{
|
||||||
DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).Destroy( );
|
DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).Destroy( );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN_2 )
|
||||||
|
{
|
||||||
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).Destroy( );
|
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).Destroy( );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1666,9 +1677,13 @@ UINT32 MessageBoxScreenHandle( )
|
|||||||
BltVideoObject( FRAME_BUFFER, hIconHandle, guiMessageBoxImageIndex, gMsgBox.sX + 70, gMsgBox.sY + 90, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObject( FRAME_BUFFER, hIconHandle, guiMessageBoxImageIndex, gMsgBox.sX + 70, gMsgBox.sY + 90, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN )
|
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN_1 )
|
||||||
{
|
{
|
||||||
DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).Display( );
|
DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).Display( );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN_2 )
|
||||||
|
{
|
||||||
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).Display( );
|
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).Display( );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -23,8 +23,9 @@
|
|||||||
#define MSG_BOX_FLAG_GENERIC_EIGHT_BUTTONS 0x00004000 // Displays eight numbered buttons with definable labels
|
#define MSG_BOX_FLAG_GENERIC_EIGHT_BUTTONS 0x00004000 // Displays eight numbered buttons with definable labels
|
||||||
#define MSG_BOX_FLAG_GENERIC_SIXTEEN_BUTTONS 0x00008000 // Displays sixteen numbered buttons with definable labels
|
#define MSG_BOX_FLAG_GENERIC_SIXTEEN_BUTTONS 0x00008000 // Displays sixteen numbered buttons with definable labels
|
||||||
|
|
||||||
#define MSG_BOX_FLAG_DROPDOWN 0x00010000 // Displays an aditional dropdown box
|
#define MSG_BOX_FLAG_DROPDOWN_1 0x00010000 // Displays an additional dropdown box
|
||||||
#define MSG_BOX_FLAG_IMAGE 0x00020000 // Displays an image
|
#define MSG_BOX_FLAG_DROPDOWN_2 0x00020000 // Displays another additional dropdown box
|
||||||
|
#define MSG_BOX_FLAG_IMAGE 0x00040000 // Displays an image
|
||||||
|
|
||||||
// message box return codes
|
// message box return codes
|
||||||
#define MSG_BOX_RETURN_OK 1 // ENTER or on OK button
|
#define MSG_BOX_RETURN_OK 1 // ENTER or on OK button
|
||||||
|
|||||||
+27
-45
@@ -112,6 +112,7 @@
|
|||||||
#include "Inventory Choosing.h" // added by Flugente for TakeMilitiaEquipmentfromSector()
|
#include "Inventory Choosing.h" // added by Flugente for TakeMilitiaEquipmentfromSector()
|
||||||
#include "CampaignStats.h" // added by Flugente
|
#include "CampaignStats.h" // added by Flugente
|
||||||
#include "DynamicDialogue.h" // added by Flugente for HandleDynamicOpinions()
|
#include "DynamicDialogue.h" // added by Flugente for HandleDynamicOpinions()
|
||||||
|
#include "DropDown.h" // added by Flugente
|
||||||
#endif
|
#endif
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
|
|
||||||
@@ -6707,7 +6708,7 @@ void DeathNoMessageTimerCallback( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get a vector of all player-controlled sectors with prison facilities. It is assumed that a sector has max. one of these
|
// get a vector of all player-controlled sectors with prison facilities. It is assumed that a sector has max. one of these
|
||||||
BOOLEAN GetPlayerControlledPrisonList( std::vector<UINT32>& arSectorIDVector )
|
BOOLEAN GetPlayerControlledPrisonList( std::vector<UINT8>& arSectorIDVector )
|
||||||
{
|
{
|
||||||
arSectorIDVector.clear();
|
arSectorIDVector.clear();
|
||||||
|
|
||||||
@@ -6755,25 +6756,7 @@ INT16 gsNumPrisoner[PRISONER_MAX] = {0};
|
|||||||
|
|
||||||
void PrisonerMessageBoxCallBack( UINT8 ubExitValue )
|
void PrisonerMessageBoxCallBack( UINT8 ubExitValue )
|
||||||
{
|
{
|
||||||
UINT32 usSectorID = 0;
|
UINT8 usSectorID = (UINT8)(DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).GetSelectedEntryKey( ));
|
||||||
|
|
||||||
// Get a list of all available prisons, and create a fitting messagebox
|
|
||||||
std::vector<UINT32> prisonsectorvector;
|
|
||||||
if ( GetPlayerControlledPrisonList( prisonsectorvector ) )
|
|
||||||
{
|
|
||||||
UINT8 cnt = 1;
|
|
||||||
std::vector<UINT32>::iterator itend = prisonsectorvector.end( );
|
|
||||||
for ( std::vector<UINT32>::iterator it = prisonsectorvector.begin( ); it != itend; ++it )
|
|
||||||
{
|
|
||||||
if ( ubExitValue == cnt )
|
|
||||||
{
|
|
||||||
usSectorID = (*it);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
++cnt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// if sector is still not set, then we did not select one - release prisoners
|
// if sector is still not set, then we did not select one - release prisoners
|
||||||
if ( usSectorID == 0 )
|
if ( usSectorID == 0 )
|
||||||
@@ -6796,8 +6779,8 @@ void PrisonerMessageBoxCallBack( UINT8 ubExitValue )
|
|||||||
|
|
||||||
ChangeNumberOfPrisoners( pPrisonSectorInfo, gsNumPrisoner );
|
ChangeNumberOfPrisoners( pPrisonSectorInfo, gsNumPrisoner );
|
||||||
|
|
||||||
CHAR16 wString[64];
|
CHAR16 wString[128];
|
||||||
GetShortSectorString( SECTORX( usSectorID ), SECTORY( usSectorID ), wString );
|
GetSectorIDString( SECTORX( usSectorID ), SECTORY( usSectorID ), 0, wString, TRUE );
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_SENTTOSECTOR], prisonerstobemoved, wString );
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_SENTTOSECTOR], prisonerstobemoved, wString );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6813,6 +6796,9 @@ void PrisonerMessageBoxCallBack( UINT8 ubExitValue )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CHAR16 gPrisonSectorNamesStr[256][128];
|
||||||
|
|
||||||
void RemoveCapturedEnemiesFromSectorInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
void RemoveCapturedEnemiesFromSectorInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
||||||
{
|
{
|
||||||
SOLDIERTYPE* pTeamSoldier;
|
SOLDIERTYPE* pTeamSoldier;
|
||||||
@@ -6941,35 +6927,31 @@ void RemoveCapturedEnemiesFromSectorInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
|||||||
AllSoldiersLookforItems( TRUE );
|
AllSoldiersLookforItems( TRUE );
|
||||||
|
|
||||||
// Get a list of all available prisons, and create a fitting messagebox
|
// Get a list of all available prisons, and create a fitting messagebox
|
||||||
std::vector<UINT32> prisonsectorvector;
|
std::vector<UINT8> prisonsectorvector;
|
||||||
if ( GetPlayerControlledPrisonList( prisonsectorvector ) )
|
if ( GetPlayerControlledPrisonList( prisonsectorvector ) )
|
||||||
{
|
{
|
||||||
UINT8 cnt = 0;
|
|
||||||
std::vector<UINT32>::iterator itend = prisonsectorvector.end( );
|
|
||||||
for ( std::vector<UINT32>::iterator it = prisonsectorvector.begin( ); it != itend; ++it )
|
|
||||||
{
|
|
||||||
UINT32 usSectorID = (*it);
|
|
||||||
CHAR16 zShortTownIDString[50];
|
|
||||||
|
|
||||||
GetShortSectorString( SECTORX( usSectorID ), SECTORY( usSectorID ), zShortTownIDString );
|
|
||||||
|
|
||||||
// Set string for generic button
|
|
||||||
swprintf( gzUserDefinedButton[cnt++], L"%s", zShortTownIDString );
|
|
||||||
|
|
||||||
if ( cnt >= 7 )
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for ( ; cnt < 8; ++cnt )
|
|
||||||
{
|
|
||||||
wcscpy( gzUserDefinedButton[cnt], TacticalStr[PRISONER_LETGO_STR] );
|
|
||||||
}
|
|
||||||
|
|
||||||
// remember all prisoners...
|
// remember all prisoners...
|
||||||
for ( int i = PRISONER_ADMIN; i < PRISONER_MAX; ++i )
|
for ( int i = PRISONER_ADMIN; i < PRISONER_MAX; ++i )
|
||||||
gsNumPrisoner[i] = sNumPrisoner[i];
|
gsNumPrisoner[i] = sNumPrisoner[i];
|
||||||
|
|
||||||
DoMessageBox( MSG_BOX_BASIC_MEDIUM_BUTTONS, TacticalStr[ PRISONER_DECIDE_STR ], GAME_SCREEN, MSG_BOX_FLAG_GENERIC_EIGHT_BUTTONS, PrisonerMessageBoxCallBack, NULL );
|
std::vector<std::pair<INT16, STR16> > dropdownvector_1;
|
||||||
|
|
||||||
|
std::vector<UINT8>::iterator itend = prisonsectorvector.end( );
|
||||||
|
for ( std::vector<UINT8>::iterator it = prisonsectorvector.begin( ); it != itend; ++it )
|
||||||
|
{
|
||||||
|
UINT8 usSectorID = (*it);
|
||||||
|
|
||||||
|
GetSectorIDString( SECTORX( usSectorID ), SECTORY( usSectorID ), 0, gPrisonSectorNamesStr[usSectorID], FALSE );
|
||||||
|
|
||||||
|
dropdownvector_1.push_back( std::make_pair( (INT16)(usSectorID), gPrisonSectorNamesStr[usSectorID] ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).SetEntries( dropdownvector_1 );
|
||||||
|
|
||||||
|
CHAR16 sString[256];
|
||||||
|
swprintf( sString, TacticalStr[PRISONER_DECIDE_STR], ubNumPrisoners );
|
||||||
|
|
||||||
|
DoMessageBox( MSG_BOX_BASIC_MEDIUM_BUTTONS, sString, GAME_SCREEN, (MSG_BOX_FLAG_OK | MSG_BOX_FLAG_DROPDOWN_1), PrisonerMessageBoxCallBack, NULL );
|
||||||
}
|
}
|
||||||
// if we control no prison, we have to let them go...
|
// if we control no prison, we have to let them go...
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -3081,7 +3081,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
AddVideoObject( &VObjectDesc, &guiMessageBoxImage );
|
AddVideoObject( &VObjectDesc, &guiMessageBoxImage );
|
||||||
}
|
}
|
||||||
|
|
||||||
DoMessageBox( MSG_BOX_BASIC_STYLE, text, GAME_SCREEN, (MSG_BOX_FLAG_OK | MSG_BOX_FLAG_DROPDOWN | MSG_BOX_FLAG_IMAGE), FortificationSettingCallBack, NULL );
|
DoMessageBox( MSG_BOX_BASIC_STYLE, text, GAME_SCREEN, (MSG_BOX_FLAG_OK | MSG_BOX_FLAG_DROPDOWN_1 | MSG_BOX_FLAG_DROPDOWN_2 | MSG_BOX_FLAG_IMAGE), FortificationSettingCallBack, NULL );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( fCtrl )
|
else if ( fCtrl )
|
||||||
|
|||||||
@@ -3962,8 +3962,8 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
|||||||
|
|
||||||
// added by Flugente: decide what to do with prisoners
|
// added by Flugente: decide what to do with prisoners
|
||||||
L"你现在没有可用的监狱关押这些俘虏,你不得不放他们走。", //L"You have no prison for these prisoners, you have to let them go",
|
L"你现在没有可用的监狱关押这些俘虏,你不得不放他们走。", //L"You have no prison for these prisoners, you have to let them go",
|
||||||
L"将俘虏送入监狱", //L"Let them go",
|
L"Where do you want to send the %d prisoners?", // TODO.Translate
|
||||||
L"放俘虏离开这里",
|
L"Let them go",
|
||||||
L"你想要做什么?",
|
L"你想要做什么?",
|
||||||
L"劝说敌人投降",
|
L"劝说敌人投降",
|
||||||
L"劝降", //L"Offer surrender",
|
L"劝降", //L"Offer surrender",
|
||||||
@@ -8640,6 +8640,7 @@ STR16 gzMercCompare[] =
|
|||||||
L"Past grievances",
|
L"Past grievances",
|
||||||
L"____", // 15
|
L"____", // 15
|
||||||
L"/",
|
L"/",
|
||||||
|
L"* Opinion is always in [%d; %d]", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
||||||
|
|||||||
@@ -3961,7 +3961,7 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
|||||||
|
|
||||||
// added by Flugente: decide what to do with prisoners
|
// added by Flugente: decide what to do with prisoners
|
||||||
L"You have no prison for these prisoners, you have to let them go",
|
L"You have no prison for these prisoners, you have to let them go",
|
||||||
L"Where do you want to send the prisoners?",
|
L"Where do you want to send the %d prisoners?", // TODO.Translate
|
||||||
L"Let them go",
|
L"Let them go",
|
||||||
L"What do you want to do?",
|
L"What do you want to do?",
|
||||||
L"Demand surrender",
|
L"Demand surrender",
|
||||||
@@ -8653,6 +8653,7 @@ STR16 gzMercCompare[] =
|
|||||||
L"Past grievances",
|
L"Past grievances",
|
||||||
L"____", // 15
|
L"____", // 15
|
||||||
L"/",
|
L"/",
|
||||||
|
L"* Opinion is always in [%d; %d]", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
||||||
|
|||||||
@@ -3960,7 +3960,7 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
|||||||
|
|
||||||
// added by Flugente: decide what to do with prisoners
|
// added by Flugente: decide what to do with prisoners
|
||||||
L"You have no prison for these prisoners, you have to let them go",
|
L"You have no prison for these prisoners, you have to let them go",
|
||||||
L"Where do you want to send the prisoners?",
|
L"Where do you want to send the %d prisoners?",
|
||||||
L"Let them go",
|
L"Let them go",
|
||||||
L"What do you want to do?",
|
L"What do you want to do?",
|
||||||
L"Demand surrender",
|
L"Demand surrender",
|
||||||
@@ -8638,6 +8638,7 @@ STR16 gzMercCompare[] =
|
|||||||
L"Past grievances",
|
L"Past grievances",
|
||||||
L"____", // 15
|
L"____", // 15
|
||||||
L"/",
|
L"/",
|
||||||
|
L"* Opinion is always in [%d; %d]",
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
||||||
|
|||||||
@@ -3966,7 +3966,7 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
|||||||
|
|
||||||
// added by Flugente: decide what to do with prisoners
|
// added by Flugente: decide what to do with prisoners
|
||||||
L"Vous n'avez pas de prison. Vous les laissez partir.",
|
L"Vous n'avez pas de prison. Vous les laissez partir.",
|
||||||
L"Où voulez-vous envoyer les prisonniers ?",
|
L"Où voulez-vous envoyer les %d prisonniers ?",
|
||||||
L"Les relâcher",
|
L"Les relâcher",
|
||||||
L"Voulez-vous proposer ?",
|
L"Voulez-vous proposer ?",
|
||||||
L"Leur reddition",
|
L"Leur reddition",
|
||||||
@@ -8638,6 +8638,7 @@ STR16 gzMercCompare[] =
|
|||||||
L"Past grievances",
|
L"Past grievances",
|
||||||
L"____", // 15
|
L"____", // 15
|
||||||
L"/",
|
L"/",
|
||||||
|
L"* Opinion is always in [%d; %d]", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
||||||
|
|||||||
@@ -3968,7 +3968,7 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
|||||||
|
|
||||||
// added by Flugente: decide what to do with prisoners
|
// added by Flugente: decide what to do with prisoners
|
||||||
L"Sie haben kein Gefängnis für die Gefangenen und müssen diese nun laufen lassen",
|
L"Sie haben kein Gefängnis für die Gefangenen und müssen diese nun laufen lassen",
|
||||||
L"Wohin mit den Gefangenen?",
|
L"Wohin mit den %d Gefangenen?",
|
||||||
L"Freilassen",
|
L"Freilassen",
|
||||||
L"Was möchten Sie tun?",
|
L"Was möchten Sie tun?",
|
||||||
L"Kapitulation fordern",
|
L"Kapitulation fordern",
|
||||||
@@ -8468,6 +8468,7 @@ STR16 gzMercCompare[] =
|
|||||||
L"Past grievances",
|
L"Past grievances",
|
||||||
L"____", // 15
|
L"____", // 15
|
||||||
L"/",
|
L"/",
|
||||||
|
L"* Opinion is always in [%d; %d]", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
||||||
|
|||||||
@@ -3955,7 +3955,7 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
|||||||
|
|
||||||
// added by Flugente: decide what to do with prisoners
|
// added by Flugente: decide what to do with prisoners
|
||||||
L"You have no prison for these prisoners, you have to let them go",
|
L"You have no prison for these prisoners, you have to let them go",
|
||||||
L"Where do you want to send the prisoners?",
|
L"Where do you want to send the %d prisoners?", // TODO.Translate
|
||||||
L"Let them go",
|
L"Let them go",
|
||||||
L"What do you want to do?",
|
L"What do you want to do?",
|
||||||
L"Demand surrender",
|
L"Demand surrender",
|
||||||
@@ -8643,6 +8643,7 @@ STR16 gzMercCompare[] =
|
|||||||
L"Past grievances",
|
L"Past grievances",
|
||||||
L"____", // 15
|
L"____", // 15
|
||||||
L"/",
|
L"/",
|
||||||
|
L"* Opinion is always in [%d; %d]", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
||||||
|
|||||||
@@ -3966,7 +3966,7 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
|||||||
|
|
||||||
// added by Flugente: decide what to do with prisoners
|
// added by Flugente: decide what to do with prisoners
|
||||||
L"You have no prison for these prisoners, you have to let them go",
|
L"You have no prison for these prisoners, you have to let them go",
|
||||||
L"Where do you want to send the prisoners?",
|
L"Where do you want to send the %d prisoners?", // TODO.Translate
|
||||||
L"Let them go",
|
L"Let them go",
|
||||||
L"What do you want to do?",
|
L"What do you want to do?",
|
||||||
L"Demand surrender",
|
L"Demand surrender",
|
||||||
@@ -8655,6 +8655,7 @@ STR16 gzMercCompare[] =
|
|||||||
L"Past grievances",
|
L"Past grievances",
|
||||||
L"____", // 15
|
L"____", // 15
|
||||||
L"/",
|
L"/",
|
||||||
|
L"* Opinion is always in [%d; %d]", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
||||||
|
|||||||
@@ -3960,7 +3960,7 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
|||||||
|
|
||||||
// added by Flugente: decide what to do with prisoners
|
// added by Flugente: decide what to do with prisoners
|
||||||
L"У вас нет тюрьмы для содержания заключённых, придётся отпустить их",
|
L"У вас нет тюрьмы для содержания заключённых, придётся отпустить их",
|
||||||
L"В какую тюрьму отправить пленных?",
|
L"Where do you want to send the %d prisoners?", // TODO.Translate
|
||||||
L"Отпустить",
|
L"Отпустить",
|
||||||
L"Что вы хотите сделать?",
|
L"Что вы хотите сделать?",
|
||||||
L"Требовать сдаться",
|
L"Требовать сдаться",
|
||||||
@@ -8638,6 +8638,7 @@ STR16 gzMercCompare[] =
|
|||||||
L"Затаил обиду", //Past grievances
|
L"Затаил обиду", //Past grievances
|
||||||
L"____", // 15
|
L"____", // 15
|
||||||
L"/",
|
L"/",
|
||||||
|
L"* Opinion is always in [%d; %d]", // TODO.Translate
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
// Flugente: Temperature-based text similar to HAM 4's condition-based text.
|
||||||
|
|||||||
Reference in New Issue
Block a user