From aba5c67ec819c6aeddef100825bf46aba998bdba Mon Sep 17 00:00:00 2001 From: Wanne Date: Thu, 12 Sep 2013 11:09:25 +0000 Subject: [PATCH] - Improved LoadScreenHint feature o The load screen hint is now also shown in strategic log and tactical log git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6396 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- MPConnectScreen.cpp | 2 +- Options Screen.cpp | Bin 129144 -> 129160 bytes SaveLoadGame.cpp | 2 +- Strategic/mapscreen.cpp | 1 + Strategic/strategicmap.cpp | 2 +- Utils/Animated ProgressBar.cpp | 47 ++++++++++++++++++++++++++++++--- Utils/Animated ProgressBar.h | 5 +++- Utils/Text.h | 2 ++ Utils/_ChineseText.cpp | 1 + Utils/_DutchText.cpp | 1 + Utils/_EnglishText.cpp | 1 + Utils/_FrenchText.cpp | 1 + Utils/_GermanText.cpp | 1 + Utils/_ItalianText.cpp | 1 + Utils/_PolishText.cpp | 1 + Utils/_RussianText.cpp | 1 + Utils/_TaiwaneseText.cpp | 1 + gamescreen.cpp | 7 ++--- 18 files changed, 67 insertions(+), 10 deletions(-) diff --git a/MPConnectScreen.cpp b/MPConnectScreen.cpp index 100e2230..baa7c02e 100644 --- a/MPConnectScreen.cpp +++ b/MPConnectScreen.cpp @@ -238,7 +238,7 @@ BOOLEAN EnterMPCScreen() CHECKF(AddVideoObject(&VObjectDesc, &guiMPCMainBackGroundImage )); - CreateLoadingScreenProgressBar(); + CreateLoadingScreenProgressBar(TRUE); // default to red connecting color SetProgressBarColor(0,150,0,0); SetRelativeStartAndEndPercentage(0,0,100,L""); diff --git a/Options Screen.cpp b/Options Screen.cpp index fcc055fdb56c8051c16726aa0702281b9a05eaba..89e8e52aa4d4879afade4f6ff7b77b89bdee5a5d 100644 GIT binary patch delta 51 zcmV-30L=gR@CS(T2Y|Ezd=Qh4%?g)(5CJli4B8Ht2oV7=lg`){mrfA@E|cEb4wBm# Jw@?uQDCa0s6k-4X delta 43 zcmV+`0M!48@dx num_found_loadscreenhints) + { + sel = Random(num_found_loadscreenhints); + if (sel == 0) + sel++; + } + zLoadScreenHint[sel].fAlreadyShown = TRUE; usCurrentLoadScreenHint = sel; @@ -349,7 +390,7 @@ void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT16 uiRelStartPerc, UINT16 // Flugente: loadscreen hints if (gGameExternalOptions.gfUseLoadScreenHints && usCurrentLoadScreenHint ) { - DisplayWrappedString( 10, pCurr->usBarBottom + 3 - 100, SCREEN_WIDTH - 10, 2, FONT12ARIAL, FONT_MCOLOR_WHITE, zLoadScreenHint[usCurrentLoadScreenHint].szName, FONT_MCOLOR_BLACK, FALSE, INVALIDATE_TEXT | CENTER_JUSTIFIED ); + ShowLoadScreenHintInLoadScreen(pCurr->usBarBottom + 3 - 100); } } diff --git a/Utils/Animated ProgressBar.h b/Utils/Animated ProgressBar.h index 48291336..2ce25127 100644 --- a/Utils/Animated ProgressBar.h +++ b/Utils/Animated ProgressBar.h @@ -47,6 +47,9 @@ extern LOADSCREENHINT_STRUCT zLoadScreenHint[LOADSCREENHINT_MAX]; // Flugente: this function selects the next hint to display, and makes sure it is not played again during this run of the exe void SetNewLoadScreenHint(); void ResetLoadScreenHint(); +void ShowLoadScreenHintInLoadScreen(UINT16 bottomPosition); +void ShowLoadScreenHintInStrategicLog(); +void ShowLoadScreenHintInTacticalLog(); // -------- added by Flugente: various flags for loadscreen hints-------- // easier than adding 32 differently named variables. DO NOT CHANGE THEM, UNLESS YOU KNOW WHAT YOU ARE DOING!!! @@ -90,7 +93,7 @@ void ResetLoadScreenHint(); #define WH40K_SOLDIER_ILLUSION 0x40000000 //1073741824 // Soldier is an Illusion #define WH40K_SOLDIER_KILLSTREAK 0x80000000 //2147483648 // Soldier is on a kill streak*/ -void CreateLoadingScreenProgressBar(); +void CreateLoadingScreenProgressBar(BOOLEAN resetLoadScreenHint); void RemoveLoadingScreenProgressBar(); diff --git a/Utils/Text.h b/Utils/Text.h index 53f6449e..627ef2f3 100644 --- a/Utils/Text.h +++ b/Utils/Text.h @@ -2316,6 +2316,8 @@ enum MSG113_INVENTORY_APS_INSUFFICIENT, + MSG113_HINT_TEXT, + TEXT_NUM_MSG113, }; diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index c5759976..00ffd31b 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -6220,6 +6220,7 @@ STR16 New113Message[] = L"注意: 敌人尸体被发现!!!", L"%s [%d rnds]\n%s %1.1f %s", L"AP不够!需要%d,你只有%d。", //L"Insufficient AP Points! Cost %d, you have %d.", + L"Hint: %s", // TODO.Translate }; STR16 New113HAMMessage[] = diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index 26781850..c3b78a5e 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -6225,6 +6225,7 @@ STR16 New113Message[] = L"Warning: enemy corpse found!!!", L"%s [%d rnds]\n%s %1.1f %s", L"Insufficient AP Points! Cost %d, you have %d.", // TODO.Translate + L"Hint: %s", // TODO.Translate }; // TODO.Translate diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index 0c743c0f..dfdef38b 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -6219,6 +6219,7 @@ STR16 New113Message[] = L"Warning: enemy corpse found!!!", L"%s [%d rnds]\n%s %1.1f %s", L"Insufficient AP Points! Cost %d, you have %d.", + L"Hint: %s", }; STR16 New113HAMMessage[] = diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index e146009f..360f34ea 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -6216,6 +6216,7 @@ STR16 New113Message[] = L"Attention: Cadavre ennemi trouvé !!!", L"%s [%d rnds]\n%s %1.1f %s", L"Insufficient AP Points! Cost %d, you have %d.", // TODO.Translate + L"Hint: %s", // TODO.Translate }; STR16 New113HAMMessage[] = diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 0f9275a6..8fa969ad 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -6047,6 +6047,7 @@ STR16 New113Message[] = L"Warning: enemy corpse found!!!", L"%s [%d rnds]\n%s %1.1f %s", L"Zu wenig APs! Es werden %d APs benötigt, Sie haben aber nur %d APs.", + L"Tipp: %s", }; STR16 New113HAMMessage[] = diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 54b093f2..ae777810 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -6212,6 +6212,7 @@ STR16 New113Message[] = L"Warning: enemy corpse found!!!", L"%s [%d rnds]\n%s %1.1f %s", L"Insufficient AP Points! Cost %d, you have %d.", // TODO.Translate + L"Hint: %s", // TODO.Translate }; // TODO.Translate diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index a22ccb14..06c5bb32 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -6227,6 +6227,7 @@ STR16 New113Message[] = L"Warning: enemy corpse found!!!", L"%s [%d rnds]\n%s %1.1f %s", L"Insufficient AP Points! Cost %d, you have %d.", // TODO.Translate + L"Hint: %s", // TODO.Translate }; STR16 New113HAMMessage[] = diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 9008a255..bf817637 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -6219,6 +6219,7 @@ STR16 New113Message[] = L"Внимание: враг обнаружил труп!!!", L"%s [%d патр.]\n%s %1.1f %s", L"Insufficient AP Points! Cost %d, you have %d.", // TODO.Translate + L"Hint: %s", // TODO.Translate }; STR16 New113HAMMessage[] = diff --git a/Utils/_TaiwaneseText.cpp b/Utils/_TaiwaneseText.cpp index e456199c..ea873025 100644 --- a/Utils/_TaiwaneseText.cpp +++ b/Utils/_TaiwaneseText.cpp @@ -6229,6 +6229,7 @@ STR16 New113Message[] = L"Warning: enemy corpse found!!!", L"%s [%d rnds]\n%s %1.1f %s", L"Insufficient AP Points! Cost %d, you have %d.", // TODO.Translate + L"Hint: %s", // TODO.Translate }; // TODO.Translate diff --git a/gamescreen.cpp b/gamescreen.cpp index a3446287..b4b67d9c 100644 --- a/gamescreen.cpp +++ b/gamescreen.cpp @@ -83,6 +83,7 @@ #include "Random.h" #include "editscreen.h" #include "Scheduling.h" + #include "Animated ProgressBar.h" #endif #include "connect.h" @@ -241,7 +242,7 @@ void FadeOutGameScreen( ) } void EnterTacticalScreen( ) -{ +{ DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("EnterTacticalScreen")); guiTacticalLeaveScreen = FALSE; @@ -359,8 +360,7 @@ void EnterTacticalScreen( ) // ATE: Enable messages again... EnableScrollMessages( ); - DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("EnterTacticalScreen: done")); - + DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("EnterTacticalScreen: done")); } void LeaveTacticalScreen( UINT32 uiNewScreen ) @@ -678,6 +678,7 @@ UINT32 MainGameScreenHandle(void) { DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("maingamescreenhandle: entertacticalscreen")); EnterTacticalScreen( ); + ShowLoadScreenHintInTacticalLog(); // Select a guy if he hasn;' if( !gfTacticalPlacementGUIActive )