From 9e393cd5e3f04c67810fe9801fc2bf93a67b3818 Mon Sep 17 00:00:00 2001 From: Flugente Date: Wed, 26 Feb 2014 20:59:25 +0000 Subject: [PATCH] Merged revision(s) 6985 from branches/ja2_source_official_2014: - Fix: battle reports no longer report that a team came from north if it was already in sector. - Fix: red lines at wrong locations git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6986 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Laptop/CampaignHistory_Summary.cpp | 8 ++------ Laptop/CampaignStats.cpp | 4 ++++ Tactical/Soldier Add.cpp | 6 +++--- Utils/Text.h | 1 + Utils/_ChineseText.cpp | 1 + Utils/_DutchText.cpp | 1 + Utils/_EnglishText.cpp | 3 ++- Utils/_FrenchText.cpp | 2 ++ Utils/_GermanText.cpp | 1 + Utils/_ItalianText.cpp | 1 + Utils/_PolishText.cpp | 1 + Utils/_RussianText.cpp | 1 + Utils/_TaiwaneseText.cpp | 1 + 13 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Laptop/CampaignHistory_Summary.cpp b/Laptop/CampaignHistory_Summary.cpp index d6a17fe4..dd46a271 100644 --- a/Laptop/CampaignHistory_Summary.cpp +++ b/Laptop/CampaignHistory_Summary.cpp @@ -144,9 +144,7 @@ void RenderCampaignHistorySummary() DrawTextToScreen( sText, usPosX, usPosY, LAPTOP_SCREEN_LR_X-LAPTOP_SCREEN_UL_X, INS_FONT_SMALL, CAMPAIGN_HISTORY_FONT_COLOR_REGULAR, FONT_MCOLOR_BLACK, FALSE, 0 ); usPosX = LAPTOP_SCREEN_UL_X; - // closing line that separates header from individual page - DisplaySmallRedLineWithShadow( usPosX, usPosY+15, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, usPosY+15); - + usPosY += 20; for(int i = CAMPAIGNHISTORY_SD_MERC; i < CAMPAIGNHISTORY_SD_MAX; ++i) @@ -515,9 +513,7 @@ void RenderCampaignHistory_MostImportant() DrawTextToScreen( sText, usPosX, usPosY, LAPTOP_SCREEN_LR_X-LAPTOP_SCREEN_UL_X, INS_FONT_SMALL, CAMPAIGN_HISTORY_FONT_COLOR_REGULAR, FONT_MCOLOR_BLACK, FALSE, 0 ); usPosX = LAPTOP_SCREEN_UL_X; - // closing line that separates header from individual page - DisplaySmallRedLineWithShadow( usPosX, usPosY+15, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, usPosY+15); - + usPosY += 20; for(int i = CAMPAIGNHISTORY_SD_MERC; i < CAMPAIGNHISTORY_SD_MAX; ++i) diff --git a/Laptop/CampaignStats.cpp b/Laptop/CampaignStats.cpp index a5738685..d7d29750 100644 --- a/Laptop/CampaignStats.cpp +++ b/Laptop/CampaignStats.cpp @@ -445,6 +445,10 @@ Incident_Stats::GetAttackerDirString( BOOLEAN fAttacker ) swprintf(helperstr, L"%s", dir1 ); break; + case 0: + swprintf(helperstr, szCampaignHistoryDetail[TEXT_CAMPAIGNHISTORY_DETAIL_UNKNOWNLOCATION] ); + break; + default: break; } diff --git a/Tactical/Soldier Add.cpp b/Tactical/Soldier Add.cpp index 5fbcc2a4..878530e8 100644 --- a/Tactical/Soldier Add.cpp +++ b/Tactical/Soldier Add.cpp @@ -1202,9 +1202,9 @@ BOOLEAN InternalAddSoldierToSector( UINT8 ubID, BOOLEAN fCalculateDirection, BOO if ( pSoldier->bSoldierFlagMask & SOLDIER_AIRDROP ) gCurrentIncident.usIncidentFlags |= INCIDENT_AIRDROP; - // problem: soldiers already present in a sector have ubStrategicInsertionCode = 0, which is INSERTION_CODE_NORTH - but they don't actually coem from north, as they are already present - // we thus count them as coming from north if they either already have a gridno, or usStrategicInsertionData - if ( pSoldier->ubStrategicInsertionCode == INSERTION_CODE_NORTH && pSoldier->usStrategicInsertionData || pSoldier->sGridNo != NOWHERE ) + // problem: soldiers already present in a sector have ubStrategicInsertionCode = 0, which is INSERTION_CODE_NORTH - but they don't actually come from north, as they are already present + // we thus count them as coming from north if they have valid usStrategicInsertionData + if ( pSoldier->ubStrategicInsertionCode == INSERTION_CODE_NORTH && pSoldier->usStrategicInsertionData )//|| pSoldier->sGridNo != NOWHERE ) { if ( pSoldier->bSide == gbPlayerNum ) gCurrentIncident.usIncidentFlags |= INCIDENT_ATTACKDIR_NORTH; diff --git a/Utils/Text.h b/Utils/Text.h index 339d5098..91181da6 100644 --- a/Utils/Text.h +++ b/Utils/Text.h @@ -2576,6 +2576,7 @@ enum TEXT_CAMPAIGNHISTORY_DETAIL_SOUTH, TEXT_CAMPAIGNHISTORY_DETAIL_WEST, TEXT_CAMPAIGNHISTORY_DETAIL_AND, // " and " text + TEXT_CAMPAIGNHISTORY_DETAIL_UNKNOWNLOCATION, TEXT_CAMPAIGNHISTORY_DETAIL_BUILDINGDAMAGE, TEXT_CAMPAIGNHISTORY_DETAIL_REINFORCE_BOTH, diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index f4d455a8..bdf5dc6e 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -8331,6 +8331,7 @@ STR16 szCampaignHistoryDetail[]= L"南方", L"西方", L"和", + L"an unknown location", // TODO.Translate L"该分区的建筑受损。%d名市民被杀,%d名市民受伤。", L"在战斗中,%s和%s呼叫了支援。", diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index 2f9fe97e..f5f326a1 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -8345,6 +8345,7 @@ STR16 szCampaignHistoryDetail[]= L"south", L"west", L"and", + L"an unknown location", // TODO.Translate L"Buildings in the sector were damaged. %d civilians were killed and %d wounded.", L"During the attack, %s and %s called reinforcements.", diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index 1db6f6f1..926e210b 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -8320,7 +8320,7 @@ STR16 szCampaignHistoryDetail[]= L"attacked", L"ambushed", L"airdropped", - + L"The attack came from %s.", L"%s were reinforced from %s.", L"The attack came from %s, %s were reinforced from %s.", @@ -8329,6 +8329,7 @@ STR16 szCampaignHistoryDetail[]= L"south", L"west", L"and", + L"an unknown location", L"Buildings in the sector were damaged. %d civilians were killed and %d wounded.", L"During the attack, %s and %s called reinforcements.", diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index f6058761..1a6e1863 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -8328,6 +8328,8 @@ STR16 szCampaignHistoryDetail[]= L"du sud", L"de l'ouest", L"et", + L"an unknown location", // TODO.Translate + L"Des bâtiments ont été endommagés. Il y a eu %d civils tués et %d blessés.", L"Pendant l'attaque, %s et %s ont appelé des renforts.", L"Pendant l'attaque, %s a appelé des renforts.", diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index e5edebfd..d8c6e0ed 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -8155,6 +8155,7 @@ STR16 szCampaignHistoryDetail[]= L"south", L"west", L"and", + L"an unknown location", // TODO.Translate L"Buildings in the sector were damaged. %d civilians were killed and %d wounded.", L"During the attack, %s and %s called reinforcements.", diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 4312c0cc..3873f97e 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -8337,6 +8337,7 @@ STR16 szCampaignHistoryDetail[]= L"south", L"west", L"and", + L"an unknown location", // TODO.Translate L"Buildings in the sector were damaged. %d civilians were killed and %d wounded.", L"During the attack, %s and %s called reinforcements.", diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index 9dc27f54..21733def 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -8355,6 +8355,7 @@ STR16 szCampaignHistoryDetail[]= L"south", L"west", L"and", + L"an unknown location", // TODO.Translate L"Buildings in the sector were damaged. %d civilians were killed and %d wounded.", L"During the attack, %s and %s called reinforcements.", diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 178813cc..15174bd1 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -8333,6 +8333,7 @@ STR16 szCampaignHistoryDetail[]= L"south", L"west", L"and", + L"an unknown location", // TODO.Translate L"Buildings in the sector were damaged. %d civilians were killed and %d wounded.", L"During the attack, %s and %s called reinforcements.", diff --git a/Utils/_TaiwaneseText.cpp b/Utils/_TaiwaneseText.cpp index e6b082b6..84deba88 100644 --- a/Utils/_TaiwaneseText.cpp +++ b/Utils/_TaiwaneseText.cpp @@ -8345,6 +8345,7 @@ STR16 szCampaignHistoryDetail[]= L"south", L"west", L"and", + L"an unknown location", // TODO.Translate L"Buildings in the sector were damaged. %d civilians were killed and %d wounded.", L"During the attack, %s and %s called reinforcements.",