From f8531461d39760abf77d773efd010877d7e1b552 Mon Sep 17 00:00:00 2001 From: Wanne Date: Sat, 19 Jan 2013 20:08:11 +0000 Subject: [PATCH] Added ingame option to invert mouse wheel direction (by Iop) o Howto get synaptic touchpad working with 1.13: http://www.bears-pit.com/board/ubbthreads.php/topics/314276/Synaptic_touchpad_with_JA2_v1_.html#Post314276 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5792 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameSettings.cpp | 3 +++ GameSettings.h | 1 + Tactical/Real Time Input.cpp | 1 + Tactical/Turn Based Input.cpp | 1 + Utils/_ChineseText.cpp | 2 ++ Utils/_DutchText.cpp | 2 ++ Utils/_EnglishText.cpp | 2 ++ Utils/_FrenchText.cpp | 2 ++ Utils/_GermanText.cpp | 6 ++++-- Utils/_ItalianText.cpp | 2 ++ Utils/_PolishText.cpp | 2 ++ Utils/_RussianText.cpp | 2 ++ Utils/_TaiwaneseText.cpp | 2 ++ 13 files changed, 26 insertions(+), 2 deletions(-) diff --git a/GameSettings.cpp b/GameSettings.cpp index 454269b1..11945284 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -259,6 +259,7 @@ BOOLEAN LoadGameSettings() gGameSettings.fOptions[TOPTION_SHOW_LAST_ENEMY] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_LAST_ENEMY" , FALSE ); gGameSettings.fOptions[TOPTION_SHOW_LBE_CONTENT] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_LBE_CONTENT" , TRUE ); + gGameSettings.fOptions[TOPTION_INVERT_WHEEL] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_INVERT_WHEEL" , FALSE ); gGameSettings.fOptions[NUM_ALL_GAME_OPTIONS] = iniReader.ReadBoolean("JA2 Game Settings","NUM_ALL_GAME_OPTIONS" , FALSE ); @@ -419,6 +420,7 @@ BOOLEAN SaveGameSettings() settings << "TOPTION_AUTO_FAST_FORWARD_MODE = " << (gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_SHOW_LAST_ENEMY = " << (gGameSettings.fOptions[TOPTION_SHOW_LAST_ENEMY] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_SHOW_LBE_CONTENT = " << (gGameSettings.fOptions[TOPTION_SHOW_LBE_CONTENT] ? "TRUE" : "FALSE" ) << endl; + settings << "TOPTION_INVERT_WHEEL = " << (gGameSettings.fOptions[TOPTION_INVERT_WHEEL] ? "TRUE" : "FALSE" ) << endl; #ifdef ENABLE_ZOMBIES settings << "TOPTION_ZOMBIES = " << (gGameSettings.fOptions[TOPTION_ZOMBIES] ? "TRUE" : "FALSE" ) << endl; @@ -556,6 +558,7 @@ void InitGameSettings() gGameSettings.fOptions[TOPTION_SHOW_LAST_ENEMY] = FALSE; gGameSettings.fOptions[TOPTION_SHOW_LBE_CONTENT] = TRUE; + gGameSettings.fOptions[TOPTION_INVERT_WHEEL] = FALSE; #ifdef ENABLE_ZOMBIES gGameSettings.fOptions[ TOPTION_ZOMBIES ] = FALSE; // Flugente Zombies 1.0 diff --git a/GameSettings.h b/GameSettings.h index d3253a82..bfc0999d 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -94,6 +94,7 @@ enum TOPTION_SHOW_LAST_ENEMY, //DBrot: show approximate locations for the last enemies TOPTION_SHOW_LBE_CONTENT, //DBrot: toggle between the content of an lbe and its attachments + TOPTION_INVERT_WHEEL, //jikuja: invert mouse wheel // arynn: Debug/Cheat TOPTION_CHEAT_MODE_OPTIONS_HEADER, diff --git a/Tactical/Real Time Input.cpp b/Tactical/Real Time Input.cpp index 401b6c34..3523c491 100644 --- a/Tactical/Real Time Input.cpp +++ b/Tactical/Real Time Input.cpp @@ -1736,6 +1736,7 @@ void QueryRTWheels( UINT32 *puiNewEvent ) INT32 sMapPos=0; UINT8 bID; + gViewportRegion.WheelState = gViewportRegion.WheelState * ( gGameSettings.fOptions[TOPTION_INVERT_WHEEL] ? -1 : 1 ); if ( gViewportRegion.uiFlags & MSYS_MOUSE_IN_AREA ) { if (!GetMouseMapPos( &sMapPos ) ) diff --git a/Tactical/Turn Based Input.cpp b/Tactical/Turn Based Input.cpp index 61ba194a..1f8d4ffe 100644 --- a/Tactical/Turn Based Input.cpp +++ b/Tactical/Turn Based Input.cpp @@ -6822,6 +6822,7 @@ void QueryTBWheel( UINT32 *puiNewEvent ) INT32 usMapPos=0; UINT8 bID; + gViewportRegion.WheelState = gViewportRegion.WheelState * ( gGameSettings.fOptions[TOPTION_INVERT_WHEEL] ? -1 : 1 ); // stub if ( gViewportRegion.uiFlags & MSYS_MOUSE_IN_AREA ) { diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index 4638d55c..3de18f47 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -5137,6 +5137,7 @@ STR16 zOptionsToggleText[] = L"区域物品栏弹窗匹配拾取", // the_bob : enable popups for picking items from sector inv L"标记剩余敌人", L"显示LBE(携行具)物品", + L"Invert mouse wheel", // TODO.Translate L"--作弊模式选项--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"强制 Bobby Ray 送货", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -5252,6 +5253,7 @@ STR16 zOptionsScreenHelpText[] = L"打开时,在区域物品栏界面,点击佣兵身上空白的携行具位置会弹窗匹配拾取物品。", L"打开时,会直接显示该区域最后一个敌人的大致位置。", L"打开时,在区域物品栏界面,右键点击装有物品的携行具时可直接显示包含的物品。", + L"When ON, inverts mouse wheel directions.", // 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 8ce0e555..1a2e3dd2 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -5137,6 +5137,7 @@ STR16 zOptionsToggleText[] = L"Enable inventory popups", // the_bob : enable popups for picking items from sector inv // TODO.Translate L"Mark Remaining Hostiles", //TODO.Translate L"Show LBE Content", //TODO.Translate + L"Invert mouse wheel", // 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 @@ -5252,6 +5253,7 @@ STR16 zOptionsScreenHelpText[] = L"When ON, enables popup boxes that appear when you left click on empty merc inventory slots while viewing sector inventory in mapscreen.", // TODO.Translate L"When ON, approximate locations of the last enemies in the sector are highlighted.", //TODO.Translate L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate + L"When ON, inverts mouse wheel directions.", // 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 35431996..27f1b702 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -5135,6 +5135,7 @@ STR16 zOptionsToggleText[] = L"Enable inventory popups", // the_bob : enable popups for picking items from sector inv L"Mark Remaining Hostiles", L"Show LBE Content", + L"Invert mouse wheel", 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 @@ -5250,6 +5251,7 @@ STR16 zOptionsScreenHelpText[] = L"When ON, enables popup boxes that appear when you left click on empty merc inventory slots while viewing sector inventory in mapscreen.", L"When ON, approximate locations of the last enemies in the sector are highlighted.", L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", + L"When ON, inverts mouse wheel directions.", 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 0118859d..2b3c06ca 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -5132,6 +5132,7 @@ STR16 zOptionsToggleText[] = L"Enable inventory popups", // the_bob : enable popups for picking items from sector inv // TODO.Translate L"Mark Remaining Hostiles", //TODO.Translate L"Show LBE Content", //TODO.Translate + L"Invert mouse wheel", // TODO.Translate L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Forcer envois Bobby Ray", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -5246,6 +5247,7 @@ STR16 zOptionsScreenHelpText[] = L"When ON, enables popup boxes that appear when you left click on empty merc inventory slots while viewing sector inventory in mapscreen.", // TODO.Translate L"When ON, approximate locations of the last enemies in the sector are highlighted.", //TODO.Translate L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate + L"When ON, inverts mouse wheel directions.", // TODO.Translate L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Forcer tous les envois en attente de Bobby Ray", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 60a520b0..202504c5 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -4982,7 +4982,8 @@ STR16 zOptionsToggleText[] = #endif L"Inventar Popup-Menüs", // the_bob : enable popups for picking items from sector inv L"Übrige Feinde markieren", - L"Tascheninhalt anzeigen", + L"Tascheninhalt anzeigen", + L"Mausradrichtung umkehren", 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 @@ -5097,7 +5098,8 @@ STR16 zOptionsScreenHelpText[] = #endif L"Wenn diese Funktion aktiviert ist, und Sie mit der linken Maustaste auf einen freien Söldner-Inventarplatz klicken (während das Sektor-Inventar angezeigt wird), wird ein hilfreiches Popup-Menü eingeblendet.", L"Wenn diese Funktion aktiviert ist, wird die ungefähre Postion der verbleibenden Feinde auf der Übersichtskarte schraffiert", - L"Wenn diese Funktion aktiviert ist, wird in der erweiterten Beschreibung von Tashen statt den Anbauteilen deren Inhalt angezeigt.", + L"Wenn diese Funktion aktiviert ist, wird in der erweiterten Beschreibung von Taschen statt den Anbauteilen deren Inhalt angezeigt.", + L"Wenn diese Funktion aktiviert ist, wird die Mausradrichtung umgekehrt", 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 291c4f00..454b1af7 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -5121,6 +5121,7 @@ STR16 zOptionsToggleText[] = L"Enable inventory popups", // the_bob : enable popups for picking items from sector inv // TODO.Translate L"Mark Remaining Hostiles", //TODO.Translate L"Show LBE Content", //TODO.Translate + L"Invert mouse wheel", // 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 @@ -5236,6 +5237,7 @@ STR16 zOptionsScreenHelpText[] = L"When ON, enables popup boxes that appear when you left click on empty merc inventory slots while viewing sector inventory in mapscreen.", // TODO.Translate L"When ON, approximate locations of the last enemies in the sector are highlighted.", //TODO.Translate L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate + L"When ON, inverts mouse wheel directions.", // 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 ff28628c..6ce9ef86 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -5135,6 +5135,7 @@ STR16 zOptionsToggleText[] = L"Enable inventory popups", // the_bob : enable popups for picking items from sector inv // TODO.Translate L"Mark Remaining Hostiles", //TODO.Translate L"Show LBE Content", //TODO.Translate + L"Invert mouse wheel", // 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 @@ -5250,6 +5251,7 @@ STR16 zOptionsScreenHelpText[] = L"When ON, enables popup boxes that appear when you left click on empty merc inventory slots while viewing sector inventory in mapscreen.", // TODO.Translate L"When ON, approximate locations of the last enemies in the sector are highlighted.", //TODO.Translate L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate + L"When ON, inverts mouse wheel directions.", // 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 5693335c..d5555626 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -5104,6 +5104,7 @@ STR16 zOptionsToggleText[] = L"Enable inventory popups", // the_bob : enable popups for picking items from sector inv // TODO.Translate L"Mark Remaining Hostiles", //TODO.Translate L"Show LBE Content", //TODO.Translate + L"Invert mouse wheel", // TODO.Translate L"--Читерские настройки--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Ускорить доставку Бобби Рэя", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -5219,6 +5220,7 @@ STR16 zOptionsScreenHelpText[] = L"When ON, enables popup boxes that appear when you left click on empty merc inventory slots while viewing sector inventory in mapscreen.", // TODO.Translate L"When ON, approximate locations of the last enemies in the sector are highlighted.", //TODO.Translate L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate + L"When ON, inverts mouse wheel directions.", // 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 0c07f340..1563a411 100644 --- a/Utils/_TaiwaneseText.cpp +++ b/Utils/_TaiwaneseText.cpp @@ -5139,6 +5139,7 @@ STR16 zOptionsToggleText[] = L"Enable inventory popups", // the_bob : enable popups for picking items from sector inv // TODO.Translate L"Mark Remaining Hostiles", //TODO.Translate L"Show LBE Content", //TODO.Translate + L"Invert mouse wheel", // 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 @@ -5254,6 +5255,7 @@ STR16 zOptionsScreenHelpText[] = L"When ON, enables popup boxes that appear when you left click on empty merc inventory slots while viewing sector inventory in mapscreen.", // TODO.Translate L"When ON, approximate locations of the last enemies in the sector are highlighted.", //TODO.Translate L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate + L"When ON, inverts mouse wheel directions.", // 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",