From 1687c148f96283cdcd56c29f8658609227477f12 Mon Sep 17 00:00:00 2001 From: Wanne Date: Fri, 9 Sep 2011 06:50:17 +0000 Subject: [PATCH] - New Feature: Added option to disable the automatic cursor swap (between exchanging positions and other actions eg. talking). (by tazpn) o if enabled in the option screen, the cursor will not change periodically to the exchange position. o if enabled, you can manually exchange positions by pressing 'x' o see here: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=290487#Post290487 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4643 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameSettings.cpp | 4 ++++ GameSettings.h | 2 ++ Tactical/Handle UI.cpp | 29 ++++++++++++++++++++--------- 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 ++ Utils/_TaiwaneseText.cpp | 2 ++ 12 files changed, 44 insertions(+), 9 deletions(-) diff --git a/GameSettings.cpp b/GameSettings.cpp index 2b80fa73d..9f13da2d7 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -201,6 +201,7 @@ BOOLEAN LoadGameSettings() gGameSettings.fOptions[TOPTION_MERC_CASTS_LIGHT] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_MERC_CASTS_LIGHT" , TRUE ); gGameSettings.fOptions[TOPTION_HIDE_BULLETS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_HIDE_BULLETS" , FALSE ); gGameSettings.fOptions[TOPTION_TRACKING_MODE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_TRACKING_MODE" , TRUE ); + gGameSettings.fOptions[TOPTION_DISABLE_CURSOR_SWAP] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_DISABLE_CURSOR_SWAP" , FALSE ); gGameSettings.fOptions[NUM_ALL_GAME_OPTIONS] = iniReader.ReadBoolean("JA2 Game Settings","NUM_ALL_GAME_OPTIONS" , FALSE ); @@ -357,6 +358,7 @@ BOOLEAN SaveGameSettings() settings << "TOPTION_USE_NCTH = " << (gGameSettings.fOptions[TOPTION_USE_NCTH] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_SHOW_TACTICAL_FACE_GEAR = " << (gGameSettings.fOptions[TOPTION_SHOW_TACTICAL_FACE_GEAR] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_SHOW_TACTICAL_FACE_ICONS = " << (gGameSettings.fOptions[TOPTION_SHOW_TACTICAL_FACE_ICONS] ? "TRUE" : "FALSE" ) << endl; + settings << "TOPTION_DISABLE_CURSOR_SWAP = " << (gGameSettings.fOptions[TOPTION_DISABLE_CURSOR_SWAP] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_CHEAT_MODE_OPTIONS_HEADER = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_HEADER] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_FORCE_BOBBY_RAY_SHIPMENTS = " << (gGameSettings.fOptions[TOPTION_FORCE_BOBBY_RAY_SHIPMENTS] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_CHEAT_MODE_OPTIONS_END = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_END] ? "TRUE" : "FALSE" ) << endl; @@ -477,6 +479,8 @@ void InitGameSettings() gGameSettings.fOptions[ TOPTION_REPORT_MISS_MARGIN ] = FALSE; + gGameSettings.fOptions[ TOPTION_DISABLE_CURSOR_SWAP ] = FALSE; + // arynn: Cheat/Debug Menu gGameSettings.fOptions[ TOPTION_CHEAT_MODE_OPTIONS_HEADER ] = FALSE; gGameSettings.fOptions[ TOPTION_FORCE_BOBBY_RAY_SHIPMENTS ] = FALSE; // force all pending Bobby Ray shipments diff --git a/GameSettings.h b/GameSettings.h index 60432f356..da5b8e8b8 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -76,6 +76,8 @@ enum TOPTION_SHOW_TACTICAL_FACE_GEAR, TOPTION_SHOW_TACTICAL_FACE_ICONS, + TOPTION_DISABLE_CURSOR_SWAP, // Disable cursor swapping every second between talk and quick exchange + // arynn: Debug/Cheat TOPTION_CHEAT_MODE_OPTIONS_HEADER, TOPTION_FORCE_BOBBY_RAY_SHIPMENTS, // force all pending Bobby Ray shipments diff --git a/Tactical/Handle UI.cpp b/Tactical/Handle UI.cpp index 1871c7367..a6a1b7f4b 100644 --- a/Tactical/Handle UI.cpp +++ b/Tactical/Handle UI.cpp @@ -586,10 +586,13 @@ UINT32 HandleTacticalUI( void ) } } - if ( ( GetJA2Clock( ) - guiUIInterfaceSwapCursorsTime ) > 1000 ) + if ( !gGameSettings.fOptions[TOPTION_DISABLE_CURSOR_SWAP] ) { - gfOKForExchangeCursor = !gfOKForExchangeCursor; - guiUIInterfaceSwapCursorsTime = GetJA2Clock( ); + if ( ( GetJA2Clock( ) - guiUIInterfaceSwapCursorsTime ) > 1000 ) + { + gfOKForExchangeCursor = !gfOKForExchangeCursor; + guiUIInterfaceSwapCursorsTime = GetJA2Clock( ); + } } // OK, do a check for on an int tile... @@ -6553,13 +6556,21 @@ BOOLEAN ValidQuickExchangePosition( ) } } - if ( fOldOnValidGuy != fOnValidGuy ) + if ( gGameSettings.fOptions[TOPTION_DISABLE_CURSOR_SWAP] ) { - // Update timer.... - // ATE: Adjust clock for automatic swapping so that the 'feel' is there.... - guiUIInterfaceSwapCursorsTime = GetJA2Clock( ); - // Default it! - gfOKForExchangeCursor = TRUE; + gfOKForExchangeCursor = FALSE; + fOnValidGuy = FALSE; + } + else + { + if ( fOldOnValidGuy != fOnValidGuy ) + { + // Update timer.... + // ATE: Adjust clock for automatic swapping so that the 'feel' is there.... + guiUIInterfaceSwapCursorsTime = GetJA2Clock( ); + // Default it! + gfOKForExchangeCursor = TRUE; + } } // Update old value..... diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index 0c4696d08..5d436e490 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -4906,6 +4906,7 @@ STR16 zOptionsToggleText[] = L"开启新的 CTH 系统", // use NCTH L"显示脸部装备图", L"显示脸部装备图标", + L"Disable Cursor Swap", // Disable Cursor Swap // TODO.Translate L"--作弊模式选项--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"强制 Bobby Ray 送货", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -5010,6 +5011,7 @@ STR16 zOptionsScreenHelpText[] = L"当启用时, 使用新命中率系统和光标。", L"当启用时, 将会看到佣兵脸部装备图。", L"当启用时, 将在佣兵肖像右下角显示脸部装备图标", + L"When ON, the cursor will not toggle between exchange position and other actions. Press |x to initiate quick exchange.", // TODO.Translate L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"强制 Bobby Ray 出货", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index 62017f07f..413fffefd 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -4903,6 +4903,7 @@ STR16 zOptionsToggleText[] = L"Activate New CTH system", // use NCTH L"Show Face gear graphics", // TODO.Translate L"Show Face gear icons", + L"Disable Cursor Swap", // Disable Cursor Swap // TODO.Translate L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -5007,6 +5008,7 @@ STR16 zOptionsScreenHelpText[] = L"When ON, New CTH system and cursor is used.", L"When ON, you will see the equipped face gear on the merc portraits.", // TODO.Translate L"When ON, you will see icons for the equipped face gear on the merc portraits in the lower right corner.", + L"When ON, the cursor will not toggle between exchange position and other actions. Press |x to initiate quick exchange.", // TODO.Translate L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Force all pending Bobby Ray shipments", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index 8347488b1..751a65a39 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -4907,6 +4907,7 @@ STR16 zOptionsToggleText[] = L"Use new Chance to Hit System", // use NCTH L"Show Face Gear Graphics", L"Show Face Gear Icons", + L"Disable Cursor Swap", // Disable Cursor Swap L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -5011,6 +5012,7 @@ STR16 zOptionsScreenHelpText[] = L"When ON, the new chance to hit system and cursor is used.", L"When ON, you will see the equipped face gear on the merc portraits.", L"When ON, you will see icons for the equipped face gear on the merc portraits in the lower right corner.", + L"When ON, the cursor will not toggle between exchange position and other actions. Press |x to initiate quick exchange.", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Force all pending Bobby Ray shipments", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index 61e9e0bb2..649d5ea6f 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -4908,6 +4908,7 @@ STR16 zOptionsToggleText[] = L"Activate New CTH system", // use NCTH L"Show Face gear graphics", // TODO.Translate L"Show Face gear icons", + L"Disable Cursor Swap", // Disable Cursor Swap // TODO.Translate L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -5012,6 +5013,7 @@ STR16 zOptionsScreenHelpText[] = L"When ON, New CTH system and cursor is used.", L"When ON, you will see the equipped face gear on the merc portraits.", // TODO.Translate L"When ON, you will see icons for the equipped face gear on the merc portraits in the lower right corner.", + L"When ON, the cursor will not toggle between exchange position and other actions. Press |x to initiate quick exchange.", // TODO.Translate L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Force all pending Bobby Ray shipments", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 2d15ced61..70f5dd1b6 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -4753,6 +4753,7 @@ STR16 zOptionsToggleText[] = L"Neues Zielsystem verwenden", // use NCTH L"Gesichtsequipment-Grafiken", L"Gesichtsequipment-Icons", + L"Cursor-Wechsel deaktivieren", // Disable Cursor Swap // TODO.Translate L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Erzwinge BR Lieferung", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -4857,6 +4858,7 @@ STR16 zOptionsScreenHelpText[] = L"Wenn diese Funktion aktiviert ist, wird das neue Zielsystem und der neue Zielcursor verwendet.", L"Wenn diese Funktion aktiviert ist, sehen sie das Gesichtsequipment Ihrer Sldner direkt auf dem Portrait.", L"Wenn diese Funktion aktiviert ist, sehen sie Icons fr das Gesichtsequipment in der rechten unteren Ecke des Portraits.", + L"Wenn diese Funktion aktiviert ist, wird der Mauscursor nicht automatisch wechseln zwischen Personen-Positionswechsel und weiteren Aktionen.\nFr manuellen Positionswechsel drcken Sie |x.", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Force all pending Bobby Ray shipments", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index bfbf47276..6bee48006 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -4895,6 +4895,7 @@ STR16 zOptionsToggleText[] = L"Activate New CTH system", // use NCTH L"Show Face gear graphics", // TODO.Translate L"Show Face gear icons", + L"Disable Cursor Swap", // Disable Cursor Swap // TODO.Translate L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -4999,6 +5000,7 @@ STR16 zOptionsScreenHelpText[] = L"When ON, New CTH system and cursor is used.", L"When ON, you will see the equipped face gear on the merc portraits.", // TODO.Translate L"When ON, you will see icons for the equipped face gear on the merc portraits in the lower right corner.", + L"When ON, the cursor will not toggle between exchange position and other actions. Press |x to initiate quick exchange.", // TODO.Translate L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Force all pending Bobby Ray shipments", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index bb84f3e98..0ab336786 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -4907,6 +4907,7 @@ STR16 zOptionsToggleText[] = L"Activate New CTH system", // use NCTH L"Show Face gear graphics", // TODO.Translate L"Show Face gear icons", + L"Disable Cursor Swap", // Disable Cursor Swap // TODO.Translate L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -5011,6 +5012,7 @@ STR16 zOptionsScreenHelpText[] = L"When ON, New CTH system and cursor is used.", L"When ON, you will see the equipped face gear on the merc portraits.", // TODO.Translate L"When ON, you will see icons for the equipped face gear on the merc portraits in the lower right corner.", + L"When ON, the cursor will not toggle between exchange position and other actions. Press |x to initiate quick exchange.", // TODO.Translate L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Wymu wszystkie oczekiwane dostawy od Bobby Ray's.", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 19ae3b715..c4bc1a549 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -4896,6 +4896,7 @@ STR16 zOptionsToggleText[] = L"Новая система прицеливания", // use NCTH L"Показать снаряжение на голове", //Show Face gear graphics L"Показать иконки снаряжения", + L"Disable Cursor Swap", // Disable Cursor Swap // TODO.Translate L"--Читерские настройки--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Ускорить доставку Бобби Рэя", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -5000,6 +5001,7 @@ STR16 zOptionsScreenHelpText[] = L"Если включено, будет задействована новая система прицеливания \nи новый курсор прицеливания.", L"Если включено, на портрете наёмника будет отображено одетое головное снаряжение.", L"Если включено, в правом нижнем углу \nна портрете наёмника будут отображены иконки \nодетого головного снаряжения.", + L"When ON, the cursor will not toggle between exchange position and other actions. Press |x to initiate quick exchange.", // TODO.Translate L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Выберите этот пункт чтобы груз Бобби Рэя прибыл немедленно.", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", diff --git a/Utils/_TaiwaneseText.cpp b/Utils/_TaiwaneseText.cpp index b3a88bcd0..217ad2721 100644 --- a/Utils/_TaiwaneseText.cpp +++ b/Utils/_TaiwaneseText.cpp @@ -4908,6 +4908,7 @@ STR16 zOptionsToggleText[] = L"Activate New CTH system", // use NCTH L"Show Face gear graphics", // TODO.Translate L"Show Face gear icons", + L"Disable Cursor Swap", // Disable Cursor Swap // TODO.Translate L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -5012,6 +5013,7 @@ STR16 zOptionsScreenHelpText[] = L"When ON, New CTH system and cursor is used.", L"When ON, you will see the equipped face gear on the merc portraits.", // TODO.Translate L"When ON, you will see icons for the equipped face gear on the merc portraits in the lower right corner.", + L"When ON, the cursor will not toggle between exchange position and other actions. Press |x to initiate quick exchange.", // TODO.Translate L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Force all pending Bobby Ray shipments", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",