- Bugfixes:

o MP: Fixed crash when hiring a merc with graphical face gear and then closing the laptop (the problem was, that an initializing function was not called in a MP game)
o Fixed init problem when starting a new single player game after playing a MP game
o Reducted message lines in a chinese game in strategic view
o Shortened german text


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4861 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2011-12-27 13:21:27 +00:00
parent 7c028b4a68
commit cd9f86bb01
7 changed files with 92 additions and 50 deletions
+13
View File
@@ -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 <vfs/Core/vfs.h>
#include <vfs/Core/vfs_profile.h>
@@ -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 );
}
+4
View File
@@ -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
}
Binary file not shown.
+1 -1
View File
@@ -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
+72 -48
View File
@@ -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);
+1
View File
@@ -205,6 +205,7 @@ typedef enum
} InterfacePanelDefines;
BOOLEAN InitializeTacticalPortraits( );
BOOLEAN InitializeFaceGearGraphics( );
BOOLEAN InitializeTacticalInterface( );
BOOLEAN ShutdownTacticalInterface( );
extern BOOLEAN fInterfacePanelDirty;
+1 -1
View File
@@ -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",