diff --git a/MainMenuScreen.cpp b/MainMenuScreen.cpp index a1bcd5e5..3de79e7f 100644 --- a/MainMenuScreen.cpp +++ b/MainMenuScreen.cpp @@ -38,6 +38,11 @@ #include "mercs.h" #include "gamesettings.h" #include "connect.h" +#include "strategic.h" +#include "strategic movement.h" +#include "overhead.h" +#include "init.h" +#include "xml.h" #include #include @@ -401,6 +406,11 @@ void ExitMainMenu( ) // differently for single and multiplayer void InitDependingGameStyleOptions() { + // Yes, also initialize these ones, because of SP and MP game! + InitStrategicEngine(); + InitStrategicMovementCosts(); + InitializeFaceGearGraphics(); + // WANNE: Initialize again, because if differs from SP to MP game! LoadGameSettings(); @@ -469,6 +479,9 @@ void MenuButtonCallback(GUI_BUTTON *btn,INT32 reason) //if something didnt work, dont even know how to make error code...//hayden } + // Reload the external gameplay data, because maybe we started a MP game before! + LoadExternalGameplayData(TABLEDATA_DIRECTORY); + SetMainMenuExitScreen( MP_JOIN_SCREEN ); // OJW - 20081129 //SetMainMenuExitScreen( GAME_INIT_OPTIONS_SCREEN ); } diff --git a/Multiplayer/client.cpp b/Multiplayer/client.cpp index 1ca3d2b2..e807f4f3 100644 --- a/Multiplayer/client.cpp +++ b/Multiplayer/client.cpp @@ -2494,6 +2494,8 @@ void recieveSETTINGS (RPCParameters *rpcParameters) //recive settings from serve // they depend on the inventory! LoadMercProfiles(); + InitializeFaceGearGraphics(); + ScreenMsg( FONT_LTGREEN, MSG_MPSYSTEM, MPClientMessage[26],cl_lan->client_num,szDefault ); fDrawCharacterList = true; // set the character list to be redrawn @@ -2689,6 +2691,8 @@ void reapplySETTINGS() // WANNE - MP: We also have to reinitialize the merc profiles because // they depend on the inventory! LoadMercProfiles(); + + InitializeFaceGearGraphics(); fDrawCharacterList = true; // set the character list to be redrawn } diff --git a/Options Screen.cpp b/Options Screen.cpp index 3c283d36..76b4553f 100644 Binary files a/Options Screen.cpp and b/Options Screen.cpp differ diff --git a/Strategic/Map Screen Interface Bottom.h b/Strategic/Map Screen Interface Bottom.h index 2cbf9180..b1a175f9 100644 --- a/Strategic/Map Screen Interface Bottom.h +++ b/Strategic/Map Screen Interface Bottom.h @@ -6,7 +6,7 @@ #ifdef CHINESE //zwwoooooo: Chinese fonts relatively high , so to reduce the number of rows -#define MAX_MESSAGES_ON_MAP_BOTTOM 7 +#define MAX_MESSAGES_ON_MAP_BOTTOM 6 #else #define MAX_MESSAGES_ON_MAP_BOTTOM 9 #endif diff --git a/Tactical/Interface.cpp b/Tactical/Interface.cpp index ad0dded2..bd93092c 100644 --- a/Tactical/Interface.cpp +++ b/Tactical/Interface.cpp @@ -273,6 +273,47 @@ void DoorMenuBackregionCallback( MOUSE_REGION * pRegion, INT32 iReason ); UINT32 CalcUIMessageDuration( STR16 wString ); +BOOLEAN InitializeFaceGearGraphics() +{ + VSURFACE_DESC vs_desc; + VOBJECT_DESC VObjectDesc; + + char fileName[500]; + + for(UINT32 iCounter2 = 1; iCounter2 < MAXITEMS; iCounter2++ ) + { + VObjectDesc.fCreateFlags = VSURFACE_CREATE_FROMFILE; + + #define SCSTI ".STI" + + if ( zNewFaceGear[iCounter2].Type > 0 ) + { + strcpy(fileName, zNewFaceGear[iCounter2].szFile); + strcat(fileName, SCSTI); + strcpy(VObjectDesc.ImageFile, fileName); + CHECKF(AddVideoObject(&VObjectDesc,&zNewFaceGear[iCounter2].uiIndex)); + + } + } + + for(UINT32 iCounter2 = 1; iCounter2 < MAXITEMS; iCounter2++ ) + { + VObjectDesc.fCreateFlags = VSURFACE_CREATE_FROMFILE; + + #define SCSTI_IMP "_IMP.STI" + + if ( zNewFaceGear[iCounter2].Type > 0 ) + { + //IMP + strcpy(fileName, zNewFaceGear[iCounter2].szFile); + strcat(fileName, SCSTI_IMP); + strcpy(VObjectDesc.ImageFile, fileName); + CHECKF(AddVideoObject(&VObjectDesc,&zNewFaceGearIMP[iCounter2].uiIndex)); + } + } + + return ( TRUE ); +} BOOLEAN InitializeTacticalPortraits( ) { @@ -471,60 +512,43 @@ BOOLEAN InitializeTacticalInterface( ) //CHRISL: Moved to seperate function so we can call seperately InitializeTacticalPortraits(); - - //legion - if (gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_GEAR ] == TRUE) + + InitializeFaceGearGraphics(); + + /* + for( iCounter2 = 1; iCounter2 < MAXITEMS; iCounter2++ ) { - /* - FilenameForBPP("INTERFACE\\portraiticons_NV.sti", VObjectDesc.ImageFile); - if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS_NV ) ) - AssertMsg(0, "Missing INTERFACE\\portraiticons_NV.sti" ); - - FilenameForBPP("INTERFACE\\portraiticons_NV_IMP.sti", VObjectDesc.ImageFile); - if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS_NV_IMP ) ) - AssertMsg(0, "Missing INTERFACE\\portraiticons_NV_IMP.sti" ); - - FilenameForBPP("INTERFACE\\portraiticons_GAS_MASK.sti", VObjectDesc.ImageFile); - if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS_GAS_MASK ) ) - AssertMsg(0, "Missing INTERFACE\\portraiticons_GAS_MASK.sti" ); - - FilenameForBPP("INTERFACE\\portraiticons_GAS_MASK_IMP.sti", VObjectDesc.ImageFile); - if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS_GAS_MASK_IMP ) ) - AssertMsg(0, "Missing INTERFACE\\portraiticons_GAS_MASK_IMP.sti" ); - */ - for( iCounter2 = 1; iCounter2 < MAXITEMS; iCounter2++ ) - { - VObjectDesc.fCreateFlags = VSURFACE_CREATE_FROMFILE; + VObjectDesc.fCreateFlags = VSURFACE_CREATE_FROMFILE; - #define SCSTI ".STI" - - if ( zNewFaceGear[iCounter2].Type > 0 ) - { - strcpy(fileName, zNewFaceGear[iCounter2].szFile); - strcat(fileName, SCSTI); - strcpy(VObjectDesc.ImageFile, fileName); - CHECKF(AddVideoObject(&VObjectDesc,&zNewFaceGear[iCounter2].uiIndex)); - - } - } + #define SCSTI ".STI" - for( iCounter2 = 1; iCounter2 < MAXITEMS; iCounter2++ ) + if ( zNewFaceGear[iCounter2].Type > 0 ) { - VObjectDesc.fCreateFlags = VSURFACE_CREATE_FROMFILE; - - #define SCSTI_IMP "_IMP.STI" - - if ( zNewFaceGear[iCounter2].Type > 0 ) - { - //IMP - strcpy(fileName, zNewFaceGear[iCounter2].szFile); - strcat(fileName, SCSTI_IMP); - strcpy(VObjectDesc.ImageFile, fileName); - CHECKF(AddVideoObject(&VObjectDesc,&zNewFaceGearIMP[iCounter2].uiIndex)); - } + strcpy(fileName, zNewFaceGear[iCounter2].szFile); + strcat(fileName, SCSTI); + strcpy(VObjectDesc.ImageFile, fileName); + CHECKF(AddVideoObject(&VObjectDesc,&zNewFaceGear[iCounter2].uiIndex)); + } } - + + for( iCounter2 = 1; iCounter2 < MAXITEMS; iCounter2++ ) + { + VObjectDesc.fCreateFlags = VSURFACE_CREATE_FROMFILE; + + #define SCSTI_IMP "_IMP.STI" + + if ( zNewFaceGear[iCounter2].Type > 0 ) + { + //IMP + strcpy(fileName, zNewFaceGear[iCounter2].szFile); + strcat(fileName, SCSTI_IMP); + strcpy(VObjectDesc.ImageFile, fileName); + CHECKF(AddVideoObject(&VObjectDesc,&zNewFaceGearIMP[iCounter2].uiIndex)); + } + } + */ + // LOAD RADIO VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE; FilenameForBPP("INTERFACE\\radio.sti", VObjectDesc.ImageFile); diff --git a/Tactical/Interface.h b/Tactical/Interface.h index 620d0c01..3f4008f6 100644 --- a/Tactical/Interface.h +++ b/Tactical/Interface.h @@ -205,6 +205,7 @@ typedef enum } InterfacePanelDefines; BOOLEAN InitializeTacticalPortraits( ); +BOOLEAN InitializeFaceGearGraphics( ); BOOLEAN InitializeTacticalInterface( ); BOOLEAN ShutdownTacticalInterface( ); extern BOOLEAN fInterfacePanelDirty; diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index bc94202f..af5ac1a2 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -4919,7 +4919,7 @@ STR16 gzMPHScreenText[] = L"Spieltyp", L"Deathmatch", L"Team-Deathmatch", - L"Kooperativ (CO-OP)", + L"Kooperativ", L"Maximale Spieler", L"Maximale Söldner", L"Söldnerauswahl",