Merge branch 'master' into ExtraMercs

This commit is contained in:
Asdow
2024-11-09 13:44:53 +02:00
371 changed files with 6539 additions and 13390 deletions
+44 -26
View File
@@ -3369,7 +3369,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.AGL.iX;
const auto y = UI_CHARPANEL.Attr.AGL.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sAgilityGain+1)) / SubpointsPerPoint(AGILAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sAgilityGain+1)) / SubpointsPerPoint(AGILAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3384,7 +3384,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.DEX.iX;
const auto y = UI_CHARPANEL.Attr.DEX.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sDexterityGain+1)) / SubpointsPerPoint(DEXTAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sDexterityGain+1)) / SubpointsPerPoint(DEXTAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3399,7 +3399,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.STR.iX;
const auto y = UI_CHARPANEL.Attr.STR.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sStrengthGain+1)) / SubpointsPerPoint(STRAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sStrengthGain+1)) / SubpointsPerPoint(STRAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3414,7 +3414,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.WIS.iX;
const auto y = UI_CHARPANEL.Attr.WIS.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sWisdomGain+1)) / SubpointsPerPoint(WISDOMAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sWisdomGain+1)) / SubpointsPerPoint(WISDOMAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3429,7 +3429,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.MRK.iX;
const auto y = UI_CHARPANEL.Attr.MRK.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sMarksmanshipGain+1)) / SubpointsPerPoint(MARKAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sMarksmanshipGain+1)) / SubpointsPerPoint(MARKAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3444,7 +3444,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.LDR.iX;
const auto y = UI_CHARPANEL.Attr.LDR.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sLeadershipGain+1)) / SubpointsPerPoint(LDRAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sLeadershipGain+1)) / SubpointsPerPoint(LDRAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3459,7 +3459,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.MEC.iX;
const auto y = UI_CHARPANEL.Attr.MEC.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sMechanicGain+1)) / SubpointsPerPoint(MECHANAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sMechanicGain+1)) / SubpointsPerPoint(MECHANAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3474,7 +3474,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.EXP.iX;
const auto y = UI_CHARPANEL.Attr.EXP.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sExplosivesGain+1)) / SubpointsPerPoint(EXPLODEAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sExplosivesGain+1)) / SubpointsPerPoint(EXPLODEAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3489,7 +3489,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.MED.iX;
const auto y = UI_CHARPANEL.Attr.MED.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sMedicalGain+1)) / SubpointsPerPoint(MEDICALAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sMedicalGain+1)) / SubpointsPerPoint(MEDICALAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3504,7 +3504,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.LVL.iX;
const auto y = UI_CHARPANEL.Attr.LVL.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sExpLevelGain+1)) / SubpointsPerPoint(EXPERAMT, pSoldier->stats.bExpLevel);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sExpLevelGain+1)) / SubpointsPerPoint(EXPERAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -5712,7 +5712,7 @@ UINT32 MapScreenHandle(void)
HandleCharBarRender( );
}
if( (fShowInventoryFlag && !isWidescreenUI()) || fDisableDueToBattleRoster )
if( ( fShowInventoryFlag || fDisableDueToBattleRoster ) && !isWidescreenUI() )
{
for( iCounter = 0; iCounter < MAX_SORT_METHODS; iCounter++ )
{
@@ -5828,9 +5828,6 @@ UINT32 MapScreenHandle(void)
HandleContractRenewalSequence( );
// handle dialog
HandleDialogue( );
// handle display of inventory pop up
// HEADROCK HAM 3.5: Externalize!
HandleDisplayOfItemPopUpForSector( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY, startingZ );
@@ -6069,6 +6066,8 @@ UINT32 MapScreenHandle(void)
//InvalidateRegion( 0,0, 640, 480);
EndFrameBufferRender( );
// handle dialog
HandleDialogue();
// if not going anywhere else
if ( guiPendingScreen == NO_PENDING_SCREEN )
@@ -7229,14 +7228,29 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
break;
case PGUP:
// WANNE: Jump to first merc in list
fResetMapCoords = TRUE;
GoToFirstCharacterInList( );
if (gfPreBattleInterfaceActive)
{
ScrollPreBattleInterface(TRUE);
}
else
{
// WANNE: Jump to first merc in list
fResetMapCoords = TRUE;
GoToFirstCharacterInList();
}
break;
case PGDN:
// WANNE: Jump to last merc in list
fResetMapCoords = TRUE;
GoToLastCharacterInList( );
if (gfPreBattleInterfaceActive)
{
ScrollPreBattleInterface(FALSE);
}
else
{
// WANNE: Jump to last merc in list
fResetMapCoords = TRUE;
GoToLastCharacterInList();
}
break;
case SHIFT_PGUP:
@@ -9787,12 +9801,12 @@ void BltCharInvPanel()
UINT32 fontColour = FONT_MCOLOR_RED;
// robot targeting bonus
if (Item[pSoldier->inv[ROBOT_TARGETING_SLOT].usItem].fProvidesRobotLaserBonus)
if (ItemProvidesRobotLaserBonus(pSoldier->inv[ROBOT_TARGETING_SLOT].usItem))
{
swprintf(text, szRobotText[ROBOT_TEXT_LASER]);
fontColour = FONT_MCOLOR_LTGREEN;
}
else if (Item[pSoldier->inv[ROBOT_TARGETING_SLOT].usItem].fProvidesRobotNightVision)
else if (ItemProvidesRobotNightvision(pSoldier->inv[ROBOT_TARGETING_SLOT].usItem))
{
swprintf(text, szRobotText[ROBOT_TEXT_NIGHT_VISION]);
fontColour = FONT_MCOLOR_LTGREEN;
@@ -9815,7 +9829,7 @@ void BltCharInvPanel()
swprintf(text, szRobotText[ROBOT_TEXT_STAT_BONUSES]);
fontColour = FONT_MCOLOR_LTGREEN;
}
else if (Item[pSoldier->inv[ROBOT_CHASSIS_SLOT].usItem].fProvidesRobotCamo)
else if (ItemProvidesRobotCamo(pSoldier->inv[ROBOT_CHASSIS_SLOT].usItem))
{
swprintf(text, szRobotText[ROBOT_TEXT_CAMO]);
fontColour = FONT_MCOLOR_LTGREEN;
@@ -9848,12 +9862,12 @@ void BltCharInvPanel()
swprintf(text, L"%s", szRobotText[ROBOT_TEXT_RADIO]);
fontColour = FONT_MCOLOR_LTGREEN;
}
else if (Item[pSoldier->inv[ROBOT_UTILITY_SLOT].usItem].metaldetector == 1)
else if (ItemIsMetalDetector(pSoldier->inv[ROBOT_UTILITY_SLOT].usItem))
{
swprintf(text, L"%s", szRobotText[ROBOT_TEXT_METAL_DETECTOR]);
fontColour = FONT_MCOLOR_LTGREEN;
}
else if (Item[pSoldier->inv[ROBOT_UTILITY_SLOT].usItem].xray == 1)
else if (ItemHasXRay(pSoldier->inv[ROBOT_UTILITY_SLOT].usItem))
{
swprintf(text, L"%s", szRobotText[ROBOT_TEXT_XRAY]);
fontColour = FONT_MCOLOR_LTGREEN;
@@ -10432,7 +10446,7 @@ void MAPInvClickCallback( MOUSE_REGION *pRegion, INT32 iReason )
{
if ( !InItemDescriptionBox( ) )
{
if ( _KeyDown(SHIFT) && gpItemPointer == NULL && Item[pSoldier->inv[ uiHandPos ].usItem].usItemClass == IC_GUN && (pSoldier->inv[ uiHandPos ])[uiHandPos]->data.gun.ubGunShotsLeft > 0 && !(Item[pSoldier->inv[ uiHandPos ].usItem].singleshotrocketlauncher) )
if ( _KeyDown(SHIFT) && gpItemPointer == NULL && Item[pSoldier->inv[ uiHandPos ].usItem].usItemClass == IC_GUN && (pSoldier->inv[ uiHandPos ])[uiHandPos]->data.gun.ubGunShotsLeft > 0 && !ItemIsSingleShotRocketLauncher(pSoldier->inv[ uiHandPos ].usItem) )
{
EmptyWeaponMagazine( &(pSoldier->inv[ uiHandPos ]), &gItemPointer, uiHandPos );
InternalMAPBeginItemPointer( pSoldier );
@@ -10931,6 +10945,10 @@ void BlitBackgroundToSaveBuffer( void )
ForceButtonUnDirty( giMapContractButton );
ForceButtonUnDirty( giCharInfoButton[ 0 ] );
ForceButtonUnDirty( giCharInfoButton[ 1 ] );
if (isWidescreenUI())
{
ForceButtonUnDirty(giMapInvDoneButton);
}
RenderPreBattleInterface();
}