From 8a00c339464cc185da7b3655db1f1f1369afde51 Mon Sep 17 00:00:00 2001 From: Flugente Date: Sun, 26 Feb 2017 19:25:11 +0000 Subject: [PATCH] Added AP modifiers for forest and plain sectors. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8390 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Interface.h | 2 ++ Tactical/Soldier Control.cpp | 10 ++++++++++ Tactical/XML_Background.cpp | 12 ++++++++++++ Utils/_ChineseText.cpp | 2 ++ Utils/_DutchText.cpp | 2 ++ Utils/_EnglishText.cpp | 2 ++ Utils/_FrenchText.cpp | 2 ++ Utils/_GermanText.cpp | 2 ++ Utils/_ItalianText.cpp | 2 ++ Utils/_PolishText.cpp | 2 ++ Utils/_RussianText.cpp | 2 ++ 11 files changed, 40 insertions(+) diff --git a/Tactical/Interface.h b/Tactical/Interface.h index 0c21829b0..fe888d270 100644 --- a/Tactical/Interface.h +++ b/Tactical/Interface.h @@ -116,6 +116,8 @@ enum { BG_DESERT, BG_SWAMP, BG_URBAN, + BG_FOREST, + BG_PLAINS, BG_RIVER, BG_TROPICAL, BG_COASTAL, diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 414f0e337..5e6680772 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -17107,6 +17107,16 @@ INT16 SOLDIERTYPE::GetAPBonus( ) case TROPICS_ROAD: bonus += this->GetBackgroundValue( BG_TROPICAL ); break; + case PLAINS: + case PLAINS_ROAD: + case FARMLAND: + case FARMLAND_ROAD: + bonus += this->GetBackgroundValue( BG_PLAINS ); + break; + case DENSE: + case DENSE_ROAD: + bonus += this->GetBackgroundValue( BG_FOREST ); + break; case HILLS: case HILLS_ROAD: bonus += this->GetBackgroundValue( BG_MOUNTAIN ); diff --git a/Tactical/XML_Background.cpp b/Tactical/XML_Background.cpp index 1d7d509be..2fc7685b5 100644 --- a/Tactical/XML_Background.cpp +++ b/Tactical/XML_Background.cpp @@ -68,6 +68,8 @@ backgroundStartElementHandle(void *userData, const XML_Char *name, const XML_Cha strcmp(name, "ap_desert") == 0 || strcmp(name, "ap_swamp") == 0 || strcmp(name, "ap_urban") == 0 || + strcmp(name, "ap_forest" ) == 0 || + strcmp(name, "ap_plains" ) == 0 || strcmp(name, "ap_river") == 0 || strcmp(name, "ap_coastal") == 0 || strcmp(name, "ap_tropical") == 0 || @@ -245,6 +247,16 @@ backgroundEndElementHandle(void *userData, const XML_Char *name) pData->curElement = ELEMENT; pData->curBackground.value[BG_URBAN] = min(XML_BACKGROUND_AP_MAX, max(-XML_BACKGROUND_AP_MAX, (INT8) atol(pData->szCharData) )); } + else if ( strcmp( name, "ap_forest" ) == 0 ) + { + pData->curElement = ELEMENT; + pData->curBackground.value[BG_FOREST] = min( XML_BACKGROUND_AP_MAX, max( -XML_BACKGROUND_AP_MAX, (INT8)atol( pData->szCharData ) ) ); + } + else if ( strcmp( name, "ap_plains" ) == 0 ) + { + pData->curElement = ELEMENT; + pData->curBackground.value[BG_PLAINS] = min( XML_BACKGROUND_AP_MAX, max( -XML_BACKGROUND_AP_MAX, (INT8)atol( pData->szCharData ) ) ); + } else if(strcmp(name, "ap_river") == 0) { pData->curElement = ELEMENT; diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index 20528b95f..2317a521a 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -8908,6 +8908,8 @@ STR16 szBackgroundText_Value[]= L" 在沙漠地区%s%d%%AP\n", //L" %s%d%% APs in desert sectors\n", L" 在沼泽地区%s%d%%AP\n", //L" %s%d%% APs in swamp sectors\n", L" 在城镇地区%s%d%%AP\n", //L" %s%d%% APs in urban sectors\n", + L" %s%d%% APs in forest sectors\n", // TODO.Translate + L" %s%d%% APs in plain sectors\n", L" 在河流地区%s%d%%AP\n", // L" %s%d%% APs in river sectors\n", L" 在热带地区%s%d%%AP\n", //L" %s%d%% APs in tropical sectors\n", L" 在海岸地区%s%d%%AP\n", //L" %s%d%% APs in coastal sectors\n", diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index b7f299907..fb2d21972 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -8928,6 +8928,8 @@ STR16 szBackgroundText_Value[]= L" %s%d%% APs in desert sectors\n", L" %s%d%% APs in swamp sectors\n", L" %s%d%% APs in urban sectors\n", + L" %s%d%% APs in forest sectors\n", // TODO.Translate + L" %s%d%% APs in plain sectors\n", L" %s%d%% APs in river sectors\n", L" %s%d%% APs in tropical sectors\n", L" %s%d%% APs in coastal sectors\n", diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index 021ad8eaa..fe51a45f1 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -8910,6 +8910,8 @@ STR16 szBackgroundText_Value[]= L" %s%d%% APs in desert sectors\n", L" %s%d%% APs in swamp sectors\n", L" %s%d%% APs in urban sectors\n", + L" %s%d%% APs in forest sectors\n", + L" %s%d%% APs in plain sectors\n", L" %s%d%% APs in river sectors\n", L" %s%d%% APs in tropical sectors\n", L" %s%d%% APs in coastal sectors\n", diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index 4ef7d7f73..80eb73487 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -8910,6 +8910,8 @@ STR16 szBackgroundText_Value[]= L" %s%d%% de PA dans les secteurs désertiques\n", L" %s%d%% de PA dans les secteurs marécageux\n", L" %s%d%% de PA dans les secteurs urbains\n", + L" %s%d%% APs in forest sectors\n", // TODO.Translate + L" %s%d%% APs in plain sectors\n", L" %s%d%% de PA dans les secteurs fluviaux\n", L" %s%d%% de PA dans les secteurs tropicaux\n", L" %s%d%% de PA dans les secteurs côtiers\n", diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 1a8ebe12d..198fb903c 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -8740,6 +8740,8 @@ STR16 szBackgroundText_Value[]= L" %s%d%% APs in desert sectors\n", L" %s%d%% APs in swamp sectors\n", L" %s%d%% APs in urban sectors\n", + L" %s%d%% APs in forest sectors\n", + L" %s%d%% APs in plain sectors\n", L" %s%d%% APs in river sectors\n", L" %s%d%% APs in tropical sectors\n", L" %s%d%% APs in coastal sectors\n", diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 645efc134..50de71bb3 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -8919,6 +8919,8 @@ STR16 szBackgroundText_Value[]= L" %s%d%% APs in desert sectors\n", L" %s%d%% APs in swamp sectors\n", L" %s%d%% APs in urban sectors\n", + L" %s%d%% APs in forest sectors\n", + L" %s%d%% APs in plain sectors\n", L" %s%d%% APs in river sectors\n", L" %s%d%% APs in tropical sectors\n", L" %s%d%% APs in coastal sectors\n", diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index 20babf3f2..b8b69f9f7 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -8932,6 +8932,8 @@ STR16 szBackgroundText_Value[]= L" %s%d%% APs in desert sectors\n", L" %s%d%% APs in swamp sectors\n", L" %s%d%% APs in urban sectors\n", + L" %s%d%% APs in forest sectors\n", + L" %s%d%% APs in plain sectors\n", L" %s%d%% APs in river sectors\n", L" %s%d%% APs in tropical sectors\n", L" %s%d%% APs in coastal sectors\n", diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 712d318e6..642ac032b 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -8909,6 +8909,8 @@ STR16 szBackgroundText_Value[]= L" %s%d%% ОД в пустынных секторах\n", L" %s%d%% ОД в болотных секторах\n", L" %s%d%% ОД в городских секторах\n", + L" %s%d%% APs in forest sectors\n", // TODO.Translate + L" %s%d%% APs in plain sectors\n", L" %s%d%% ОД в речных секторах\n", L" %s%d%% ОД в тропических секторах\n", L" %s%d%% ОД в секторах на побережье\n",