From 8e36b221c2c54443c0efca77925470fa3a15c6e4 Mon Sep 17 00:00:00 2001 From: Wanne Date: Sun, 8 Jun 2008 13:10:17 +0000 Subject: [PATCH] - removed inventory choice from "start new game" screen in multiplayer mode -> now the inventory choice is defined in "ja2_mp.ini" - added new headline text in the "start new game" screen for multiplayer mode git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2221 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameInitOptionsScreen.cpp | 76 ++++++++++++++++++++++++--------------- Multiplayer/client.cpp | 54 +++++++++++++--------------- Utils/Text.h | 2 ++ Utils/_DutchText.cpp | 5 +-- Utils/_EnglishText.cpp | 7 +--- Utils/_FrenchText.cpp | 5 +-- Utils/_GermanText.cpp | 5 +-- Utils/_ItalianText.cpp | 5 +-- Utils/_PolishText.cpp | 5 +-- Utils/_RussianText.cpp | 5 +-- Utils/_TaiwaneseText.cpp | 5 +-- 11 files changed, 82 insertions(+), 92 deletions(-) diff --git a/GameInitOptionsScreen.cpp b/GameInitOptionsScreen.cpp index c0b66e17..7227d0b7 100644 --- a/GameInitOptionsScreen.cpp +++ b/GameInitOptionsScreen.cpp @@ -406,7 +406,7 @@ BOOLEAN EnterGIOScreen() if(is_networked) { MPgiGIOCancelBtnImage = UseLoadedButtonImage( giGIODoneBtnImage, -1,1,-1,3,-1 ); - MPguiGIOCancelButton = CreateIconAndTextButton( giGIOCancelBtnImage, gzGIOScreenText[30], OPT_BUTTON_FONT, + MPguiGIOCancelButton = CreateIconAndTextButton( giGIOCancelBtnImage, gzGIOScreenText[GIO_LOAD_MP_GAME], OPT_BUTTON_FONT, OPT_BUTTON_ON_COLOR, DEFAULT_SHADOW, OPT_BUTTON_OFF_COLOR, DEFAULT_SHADOW, TEXT_CJUSTIFIED, @@ -496,25 +496,28 @@ BOOLEAN EnterGIOScreen() } // CHRISL: New inventory options - if(IsNIVModeValid() == TRUE){ - usPosY = GIO_INV_SETTING_Y - GIO_OFFSET_TO_TOGGLE_BOX_Y; - for( cnt=0; cntuiFlags |= BUTTON_CLICKED_ON; - break; - case INVENTORY_NEW: - ButtonList[ guiINVOptionToggles[ GIO_INV_NEW ] ]->uiFlags |= BUTTON_CLICKED_ON; - break; + usPosY += GIO_GAP_BN_SETTINGS-5; + } + switch( gGameOptions.ubInventorySystem ) + { + case INVENTORY_OLD: + ButtonList[ guiINVOptionToggles[ GIO_INV_OLD ] ]->uiFlags |= BUTTON_CLICKED_ON; + break; + case INVENTORY_NEW: + ButtonList[ guiINVOptionToggles[ GIO_INV_NEW ] ]->uiFlags |= BUTTON_CLICKED_ON; + break; + } } } @@ -641,9 +644,12 @@ BOOLEAN ExitGIOScreen() RemoveButton( guiBROptionToggles[ cnt ] ); // CHRISL - if(IsNIVModeValid() == TRUE){ - for( cnt=0; cntALLOW_CUSTOM_NIV; DISABLE_SPEC_MODE=cl_lan->DISABLE_SPEC_MODE; - + // We have to take the selected inventory mode from the server if(ALLOW_CUSTOM_NIV==0) { - // WANNE - MP: If the clients has selected another inventory than the server had choosen. - if (gGameOptions.ubInventorySystem != cl_lan->sofNewInv) - { - gGameOptions.ubInventorySystem=cl_lan->sofNewInv; - - // WANNE - MP: We have to re-initialize the correct interface - if((UsingNewInventorySystem() == true) && IsNIVModeValid(true)) - { - InitNewInventorySystem(); - InitializeSMPanelCoordsNew(); - InitializeInvPanelCoordsNew(); - } - else - { - gGameOptions.ubInventorySystem = 0; - InitOldInventorySystem(); - InitializeSMPanelCoordsOld(); - InitializeInvPanelCoordsOld(); - } - - // WANNE - MP: We also have to reinitialize the merc profiles because - // they depend on the inventory! - LoadMercProfiles(); - } + gGameOptions.ubInventorySystem=cl_lan->sofNewInv; } - + // WANNE - MP: We have to re-initialize the correct interface + if((UsingNewInventorySystem() == true) && IsNIVModeValid(true)) + { + InitNewInventorySystem(); + InitializeSMPanelCoordsNew(); + InitializeInvPanelCoordsNew(); + } + else + { + gGameOptions.ubInventorySystem = INVENTORY_OLD; + InitOldInventorySystem(); + InitializeSMPanelCoordsOld(); + InitializeInvPanelCoordsOld(); + } + + // WANNE - MP: We also have to reinitialize the merc profiles because + // they depend on the inventory! + LoadMercProfiles(); + ScreenMsg( FONT_LTGREEN, MSG_CHAT, MPClientMessage[26],cl_lan->client_num,szDefault,cl_lan->cl_edge,cl_lan->team ); // if(PLAYER_BSIDE==0)ScreenMsg(FONT_LTGREEN,MSG_CHAT,MPClientMessage[27],cl_lan->cl_ops[0],cl_lan->cl_ops[1],cl_lan->cl_ops[2],cl_lan->cl_ops[3]); //ScreenMsg(FONT_LTGREEN,MSG_CHAT,MPClientMessage[27],cl_lan->team); - strcpy(client_names[cl_lan->client_num-1],szDefault); + strcpy(client_names[cl_lan->client_num-1],szDefault); } else @@ -2805,8 +2801,8 @@ void connect_client ( void ) GetPrivateProfileString( "Ja2_mp Settings","CLIENT_NAME", "", clname, MAX_PATH, "..\\Ja2_mp.ini" ); - - + + gGameOptions.ubInventorySystem = GetPrivateProfileInt( "Ja2_mp Settings","INVENTORY_MODE", INVENTORY_OLD, "..\\Ja2_mp.ini" ); diff --git a/Utils/Text.h b/Utils/Text.h index a7045e7e..ca491f45 100644 --- a/Utils/Text.h +++ b/Utils/Text.h @@ -1419,6 +1419,8 @@ enum GIO_INV_TEXT, GIO_INV_OLD_TEXT, GIO_INV_NEW_TEXT, + GIO_LOAD_MP_GAME, + GIO_INITIAL_GAME_SETTINGS_MP, }; extern STR16 gzGIOScreenText[]; diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index fbf796f8..cd6b1c43 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -3616,11 +3616,8 @@ STR16 gzGIOScreenText[] = L"Inventory System", L"Old", L"New", - - L"Timed Turns",//hayden - L"Not Timed", - L"Timed Player Turns", L"Load MP Game", + L"INITIAL GAME SETTINGS (Only the server settings take effect)", }; STR16 pDeliveryLocationStrings[] = diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index 1f24ce9a..1abfc93a 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -3611,7 +3611,6 @@ STR16 gzGIOScreenText[] = L"Save Anytime", L"Iron Man", L"Disabled for Demo", - L"Bobby Ray's Selection", L"Normal", L"Great", @@ -3620,12 +3619,8 @@ STR16 gzGIOScreenText[] = L"Inventory System", L"Old", L"New", - - L"Timed Turns",//hayden - L"Not Timed", - L"Timed Player Turns", L"Load MP Game", - + L"INITIAL GAME SETTINGS (Only the server settings take effect)", }; STR16 pDeliveryLocationStrings[] = diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index d4ca90fe..e2ec19ae 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -3606,11 +3606,8 @@ STR16 gzGIOScreenText[] = L"Inventory System", L"Old", L"New", - - L"Timed Turns",//hayden - L"Not Timed", - L"Timed Player Turns", L"Load MP Game", + L"INITIAL GAME SETTINGS (Only the server settings take effect)", }; STR16 pDeliveryLocationStrings[] = diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 769d3bf9..1499ef99 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -3421,11 +3421,8 @@ STR16 gzGIOScreenText[] = L"Inventar System", L"Alt", L"Neu", - - L"Timed Turns",//hayden - L"Not Timed", - L"Timed Player Turns", L"Lade MP Spiel", + L"GRUNDEINSTELLUNGEN (Nur Servereinstellungen werden verwendet)", }; STR16 pDeliveryLocationStrings[] = diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index d036a781..fbe79214 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -3597,11 +3597,8 @@ STR16 gzGIOScreenText[] = L"Inventory System", L"Old", L"New", - - L"Timed Turns",//hayden - L"Not Timed", - L"Timed Player Turns", L"Load MP Game", + L"INITIAL GAME SETTINGS (Only the server settings take effect)", }; STR16 pDeliveryLocationStrings[] = diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index b911139b..19e98dcd 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -3597,11 +3597,8 @@ STR16 gzGIOScreenText[] = L"Inventory System", L"Old", L"New", - - L"Timed Turns",//hayden - L"Not Timed", - L"Timed Player Turns", L"Load MP Game", + L"INITIAL GAME SETTINGS (Only the server settings take effect)", }; STR16 pDeliveryLocationStrings[] = diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 9779e124..eb58b8e4 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -3613,11 +3613,8 @@ STR16 gzGIOScreenText[] = L"Ðåæèì èíâåíòàðÿ", L"Êëàññè÷åñêèé", L"Íîâûé âàðèàíò", - - L"Timed Turns",//hayden - L"Not Timed", - L"Timed Player Turns", L"Çàãðóçèòü", + L"ÓÑÒÀÍÎÂÊÀ ÍÀ×ÀËÀ ÈÃÐÛ (Only the server settings take effect)", }; STR16 pDeliveryLocationStrings[] = diff --git a/Utils/_TaiwaneseText.cpp b/Utils/_TaiwaneseText.cpp index 46633a2b..01cbe89e 100644 --- a/Utils/_TaiwaneseText.cpp +++ b/Utils/_TaiwaneseText.cpp @@ -3619,11 +3619,8 @@ STR16 gzGIOScreenText[] = L"Inventory System", L"Old", L"New", - - L"Timed Turns",//hayden - L"Not Timed", - L"Timed Player Turns", L"Load MP Game", + L"INITIAL GAME SETTINGS (Only the server settings take effect)", }; STR16 pDeliveryLocationStrings[] =