mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Merged Multiplayer UI patch from Zathras:
New Features - Added hits, misses, accuracy to scoreboard - Added in-game chat with history - Added more options from the ini to the host screen, Use NIV and Enable civillians bugfixes - Clients connecting at the same time controlling the wrong client - Team Deathmatch working again - Refreshing the player list after a player changes team / edge - AI is always on for Co-op now - There is now always a scoreboard in Co-op even when you lose. - scores on the Co-op scoreboard have been fixed for all deaths including bleeding - Start Game button now only appears for server - Fixed cleaning up game resources on disconnection - Disabled the 1,2,3,4 keys for connecting / disconnecting - Fixed victory conditions for all game modes - Fixed players names getting copied into TeamTurnString each game resulting in multiple names - Fixed Assertion bug caused by the game sometimes calling SetCurrentWorldSector more than once before placement of mercs - Fixed a bug that was possible when merging items such as M14 and EBR stock on mapscreen. - Fixed bug with game starting while a player was in chat, closes chat window when game is starting - Fixed bug with game starting while a player was in the options screen, if the player leaves the mapscreen while ready, they are set to unready - Team and Spawn direction popups changed to use buttons to open/close them - Disabled players joining after the laptop has been unlocked, as they would be out of state with any hires git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2628 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -933,7 +933,7 @@ void BtnDifficultyTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
BOOLEAN fAnyChecked=FALSE;
|
BOOLEAN fAnyChecked=FALSE;
|
||||||
|
|
||||||
//if none of the other boxes are checked, do not uncheck this box
|
//if none of the other boxes are checked, do not uncheck this box
|
||||||
for( cnt=0; cnt<NUM_GUN_OPTIONS; cnt++)
|
for( cnt=0; cnt<NUM_DIFF_SETTINGS; cnt++) // OJW - 20081129 - fixed a bug
|
||||||
{
|
{
|
||||||
|
|
||||||
if( ButtonList[ guiDifficultySettingsToggles[ cnt ] ]->uiFlags & BUTTON_CLICKED_ON )
|
if( ButtonList[ guiDifficultySettingsToggles[ cnt ] ]->uiFlags & BUTTON_CLICKED_ON )
|
||||||
|
|||||||
@@ -987,6 +987,7 @@ void LoadGameAPBPConstants()
|
|||||||
|
|
||||||
void FreeGameExternalOptions()
|
void FreeGameExternalOptions()
|
||||||
{
|
{
|
||||||
|
if (gGameExternalOptions.iaIMPSlots != NULL) // OJW - 20081129 - Fix memory leak when calling LoadGameExternalOptions twice
|
||||||
MemFree( gGameExternalOptions.iaIMPSlots);
|
MemFree( gGameExternalOptions.iaIMPSlots);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -28,11 +28,11 @@ CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
//RELEASE BUILD VERSION
|
//RELEASE BUILD VERSION
|
||||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.2620" };
|
CHAR16 zVersionLabel[256] = { L"Release v1.13.2628" };
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CHAR8 czVersionNumber[16] = { "Build 09.03.12" }; //YY.MM.DD
|
CHAR8 czVersionNumber[16] = { "Build 09.03.19" }; //YY.MM.DD
|
||||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+24
@@ -1864,6 +1864,18 @@
|
|||||||
BrowseInformation="1"/>
|
BrowseInformation="1"/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPChatScreen.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPHostScreen.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPJoinScreen.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPScoreScreen.cpp">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="Options Screen.cpp">
|
RelativePath="Options Screen.cpp">
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
@@ -2285,6 +2297,18 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="MessageBoxScreen.h">
|
RelativePath="MessageBoxScreen.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPChatScreen.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPHostScreen.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPJoinScreen.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPScoreScreen.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="Options Screen.h">
|
RelativePath="Options Screen.h">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
@@ -1025,6 +1025,11 @@ void ExitLaptop()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gfEnterLapTop)
|
||||||
|
{
|
||||||
|
// we have already exited the laptop, its not currently initialised
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ( DidGameJustStart() )
|
if ( DidGameJustStart() )
|
||||||
{
|
{
|
||||||
SetMusicMode( MUSIC_LAPTOP );
|
SetMusicMode( MUSIC_LAPTOP );
|
||||||
|
|||||||
+1569
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,27 @@
|
|||||||
|
#ifndef _MP_CHAT_SCREEN_H_
|
||||||
|
#define _MP_CHAT_SCREEN_H_
|
||||||
|
|
||||||
|
#include "MessageBoxScreen.h"
|
||||||
|
|
||||||
|
UINT32 MPChatScreenInit( void );
|
||||||
|
UINT32 MPChatScreenHandle( void );
|
||||||
|
UINT32 MPChatScreenShutdown( void );
|
||||||
|
|
||||||
|
extern CHAR16 gszChatBoxInputString[255];
|
||||||
|
extern BOOLEAN gbChatSendToAll;
|
||||||
|
extern MESSAGE_BOX_STRUCT gChatBox;
|
||||||
|
extern BOOLEAN gfInChatBox;
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
// ubStyle: Determines the look of graphics including buttons
|
||||||
|
// zString: 16-bit string
|
||||||
|
// uiExitScreen The screen to exit to
|
||||||
|
// ubFlags Some flags for button style
|
||||||
|
// ReturnCallback Callback for return. Can be NULL. Returns any above return value
|
||||||
|
// pCenteringRect Rect to send if MSG_BOX_FLAG_USE_CENTERING_RECT set. Can be NULL
|
||||||
|
////////////////////////////////
|
||||||
|
|
||||||
|
INT32 DoChatBox( bool bIncludeChatLog, const STR16 zString, UINT32 uiExitScreen, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
|
||||||
|
void ChatLogMessage( UINT16 usColor, UINT8 ubPriority, STR16 pStringA, ...);
|
||||||
|
|
||||||
|
#endif
|
||||||
+1507
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
|||||||
|
#ifndef _MP_HOST_SCREEN_H_
|
||||||
|
#define _MP_HOST_SCREEN_H_
|
||||||
|
|
||||||
|
|
||||||
|
UINT32 MPHostScreenInit( void );
|
||||||
|
UINT32 MPHostScreenHandle( void );
|
||||||
|
UINT32 MPHostScreenShutdown( void );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,742 @@
|
|||||||
|
#ifdef PRECOMPILEDHEADERS
|
||||||
|
#include "JA2 All.h"
|
||||||
|
#include "Intro.h"
|
||||||
|
#else
|
||||||
|
#include "Types.h"
|
||||||
|
#include "MPJoinScreen.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
|
#include "Utilities.h"
|
||||||
|
#include "wCheck.h"
|
||||||
|
#include "Font Control.h"
|
||||||
|
#include "WordWrap.h"
|
||||||
|
#include "Render Dirty.h"
|
||||||
|
#include "Input.h"
|
||||||
|
#include "Options Screen.h"
|
||||||
|
#include "English.h"
|
||||||
|
#include "Sysutil.h"
|
||||||
|
#include "Fade Screen.h"
|
||||||
|
#include "Cursor Control.h"
|
||||||
|
#include "Music Control.h"
|
||||||
|
#include "cursors.h"
|
||||||
|
#include "Intro.h"
|
||||||
|
#include "Text.h"
|
||||||
|
#include "Text Input.h"
|
||||||
|
#include "_Ja25EnglishText.h"
|
||||||
|
#include "Soldier Profile.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "gameloop.h"
|
||||||
|
#include "connect.h"
|
||||||
|
#include "network.h" // for client name
|
||||||
|
#include "saveloadscreen.h"
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Global Defines
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////
|
||||||
|
|
||||||
|
#define MPJ_TITLE_FONT FONT14ARIAL//FONT16ARIAL
|
||||||
|
#define MPJ_TITLE_COLOR FONT_MCOLOR_WHITE
|
||||||
|
|
||||||
|
#define MPJ_LABEL_TEXT_FONT FONT12ARIAL//FONT16ARIAL
|
||||||
|
#define MPJ_LABEL_TEXT_COLOR FONT_MCOLOR_WHITE
|
||||||
|
|
||||||
|
//buttons
|
||||||
|
#define MPJ_BTN_JOIN_X iScreenWidthOffset + 320 + 143
|
||||||
|
#define MPJ_BTN_JOIN_Y iScreenHeightOffset + 435
|
||||||
|
#define MPJ_BTN_HOST_X MPJ_BTN_JOIN_X-180
|
||||||
|
#define MPJ_BTN_HOST_Y iScreenHeightOffset + 435
|
||||||
|
#define MPJ_CANCEL_X iScreenWidthOffset + ((320 - 115) / 2)
|
||||||
|
|
||||||
|
//textboxes
|
||||||
|
#define MPJ_TXT_HANDLE_X iScreenWidthOffset + 100
|
||||||
|
#define MPJ_TXT_HANDLE_Y iScreenHeightOffset + 60
|
||||||
|
#define MPJ_TXT_HANDLE_WIDTH 120
|
||||||
|
#define MPJ_TXT_HANDLE_HEIGHT 17
|
||||||
|
#define MPJ_TXT_IP_X iScreenWidthOffset + 100
|
||||||
|
#define MPJ_TXT_IP_Y iScreenHeightOffset + 400
|
||||||
|
#define MPJ_TXT_IP_WIDTH 100
|
||||||
|
#define MPJ_TXT_IP_HEIGHT 17
|
||||||
|
#define MPJ_TXT_PORT_X MPJ_TXT_IP_X + MPJ_TXT_IP_WIDTH + 40
|
||||||
|
#define MPJ_TXT_PORT_Y iScreenHeightOffset + 400
|
||||||
|
#define MPJ_TXT_PORT_WIDTH 40
|
||||||
|
#define MPJ_TXT_PORT_HEIGHT 17
|
||||||
|
|
||||||
|
|
||||||
|
//main title
|
||||||
|
#define MPJ_MAIN_TITLE_X 0
|
||||||
|
#define MPJ_MAIN_TITLE_Y iScreenHeightOffset + 10
|
||||||
|
#define MPJ_MAIN_TITLE_WIDTH SCREEN_WIDTH
|
||||||
|
|
||||||
|
//labels
|
||||||
|
#define MPJ_LABEL_HANDLE_X MPJ_TXT_HANDLE_X - 80
|
||||||
|
#define MPJ_LABEL_HANDLE_Y MPJ_TXT_HANDLE_Y + 3
|
||||||
|
#define MPJ_LABEL_HANDLE_WIDTH 80
|
||||||
|
#define MPJ_LABEL_HANDLE_HEIGHT 17
|
||||||
|
#define MPJ_LABEL_IP_X MPJ_TXT_IP_X - 80
|
||||||
|
#define MPJ_LABEL_IP_Y MPJ_TXT_IP_Y + 3
|
||||||
|
#define MPJ_LABEL_IP_WIDTH 80
|
||||||
|
#define MPJ_LABEL_IP_HEIGHT 17
|
||||||
|
#define MPJ_LABEL_PORT_X MPJ_TXT_PORT_X - 30
|
||||||
|
#define MPJ_LABEL_PORT_Y MPJ_TXT_PORT_Y + 3
|
||||||
|
#define MPJ_LABEL_PORT_WIDTH 80
|
||||||
|
#define MPJ_LABEL_PORT_HEIGHT 17
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Global Variables
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////
|
||||||
|
|
||||||
|
BOOLEAN gfMPJScreenEntry = TRUE;
|
||||||
|
BOOLEAN gfMPJScreenExit = FALSE;
|
||||||
|
BOOLEAN gfReRenderMPJScreen=TRUE;
|
||||||
|
BOOLEAN gfMPJButtonsAllocated = FALSE;
|
||||||
|
|
||||||
|
//enum for different states of screen
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MPJ_NOTHING,
|
||||||
|
MPJ_CANCEL,
|
||||||
|
MPJ_EXIT,
|
||||||
|
MPJ_HOST,
|
||||||
|
MPJ_JOIN
|
||||||
|
};
|
||||||
|
|
||||||
|
UINT8 gubMPJScreenHandler=MPJ_NOTHING; // State changer for HandleMPJScreen()
|
||||||
|
|
||||||
|
UINT32 gubMPJExitScreen = MP_JOIN_SCREEN; // The screen that is in control next iteration of the game_loop
|
||||||
|
|
||||||
|
UINT32 guiMPJMainBackGroundImage;
|
||||||
|
|
||||||
|
// Wide-char strings that will hold the variables until they are transferred to the CHAR ascii fields
|
||||||
|
CHAR16 gzPlayerHandleField[ 30 ] = {0} ;
|
||||||
|
CHAR16 gzServerIPField[ 15 ] = {0} ;
|
||||||
|
CHAR16 gzServerPortField[ 5 ] = {0} ;
|
||||||
|
|
||||||
|
////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Screen Controls
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////
|
||||||
|
|
||||||
|
// Join Button
|
||||||
|
void BtnMPJoinCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
|
UINT32 guiMPJoinButton;
|
||||||
|
INT32 giMPJoinBtnImage;
|
||||||
|
|
||||||
|
// Host Button
|
||||||
|
void BtnMPJHostCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
|
UINT32 guiMPJHostButton;
|
||||||
|
INT32 giMPJHostBtnImage;
|
||||||
|
|
||||||
|
// Cancel Button
|
||||||
|
void BtnMPJCancelCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
|
UINT32 guiMPJCancelButton;
|
||||||
|
INT32 giMPJCancelBtnImage;
|
||||||
|
|
||||||
|
// Message Box handle
|
||||||
|
INT8 giMPJMessageBox = -1;
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Local Function Prototypes
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////
|
||||||
|
|
||||||
|
extern void ClearMainMenu();
|
||||||
|
|
||||||
|
BOOLEAN EnterMPJScreen();
|
||||||
|
BOOLEAN ExitMPJScreen();
|
||||||
|
void HandleMPJScreen();
|
||||||
|
BOOLEAN RenderMPJScreen();
|
||||||
|
void GetMPJScreenUserInput();
|
||||||
|
void SaveJoinSettings();
|
||||||
|
bool ValidateJoinSettings(bool bSkipServerAddress);
|
||||||
|
BOOLEAN DoMPJMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||||
|
void DoneFadeOutForExitMPJScreen( void );
|
||||||
|
void DoneFadeInForExitMPJScreen( void );
|
||||||
|
|
||||||
|
|
||||||
|
UINT32 MPJoinScreenInit( void )
|
||||||
|
{
|
||||||
|
// read settings from JA2 ini
|
||||||
|
GetPrivateProfileStringW( L"Ja2_mp Settings",L"SERVER_IP", L"", gzServerIPField, 15, L"..\\Ja2_mp.ini" );
|
||||||
|
GetPrivateProfileStringW( L"Ja2_mp Settings",L"SERVER_PORT", L"", gzServerPortField, 5, L"..\\Ja2_mp.ini" );
|
||||||
|
GetPrivateProfileStringW( L"Ja2_mp Settings",L"CLIENT_NAME", L"Fresh Meat", gzPlayerHandleField, 30 , L"..\\Ja2_mp.ini" );
|
||||||
|
return( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveJoinSettings()
|
||||||
|
{
|
||||||
|
Get16BitStringFromField( 0, gzPlayerHandleField ); // these indexes are based on the order created
|
||||||
|
Get16BitStringFromField( 1, gzServerIPField );
|
||||||
|
Get16BitStringFromField( 2, gzServerPortField );
|
||||||
|
|
||||||
|
// save settings to JA2_mp.ini
|
||||||
|
WritePrivateProfileStringW( L"Ja2_mp Settings",L"SERVER_IP", gzServerIPField, L"..\\Ja2_mp.ini" );
|
||||||
|
WritePrivateProfileStringW( L"Ja2_mp Settings",L"SERVER_PORT", gzServerPortField, L"..\\Ja2_mp.ini" );
|
||||||
|
WritePrivateProfileStringW( L"Ja2_mp Settings",L"CLIENT_NAME", gzPlayerHandleField , L"..\\Ja2_mp.ini" );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ValidateJoinSettings(bool bSkipServerAddress)
|
||||||
|
{
|
||||||
|
// Check a Server name is entered
|
||||||
|
Get16BitStringFromField( 0, gzPlayerHandleField ); // these indexes are based on the order created
|
||||||
|
if (wcscmp(gzPlayerHandleField,L"")<=0)
|
||||||
|
{
|
||||||
|
DoMPJMessageBox( MSG_BOX_BASIC_STYLE, gzMPJScreenText[MPJ_HANDLE_INVALID], MP_JOIN_SCREEN, MSG_BOX_FLAG_OK, NULL );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// dont check server address if we are going to HOST
|
||||||
|
if (bSkipServerAddress)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// Verify the IP Address
|
||||||
|
Get16BitStringFromField( 1, gzServerIPField );
|
||||||
|
|
||||||
|
// loop through octets and check
|
||||||
|
int numOctets = 0;
|
||||||
|
wchar_t* tok;
|
||||||
|
tok = wcstok(gzServerIPField,L".");
|
||||||
|
while (tok != NULL)
|
||||||
|
{
|
||||||
|
numOctets++;
|
||||||
|
INT32 oct = _wtoi(tok);
|
||||||
|
// check for invalid conversion, ie alpha chars
|
||||||
|
// wtoi returns 0 if it cant convert, but we need this value
|
||||||
|
// therefore if tok <> 0 then it was a bad convert.
|
||||||
|
if (oct == 0 && wcscmp(tok,L"0") != 0)
|
||||||
|
{
|
||||||
|
// force error
|
||||||
|
numOctets=0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (oct < 0 || oct > 254) // dont allow broadcast nums
|
||||||
|
{
|
||||||
|
// bad octet, error
|
||||||
|
numOctets=0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// get next octet
|
||||||
|
tok = wcstok(NULL,L".");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (numOctets != 4)
|
||||||
|
{
|
||||||
|
// not a valid ip address
|
||||||
|
DoMPJMessageBox( MSG_BOX_BASIC_STYLE, gzMPJScreenText[MPJ_SERVERIP_INVALID], MP_JOIN_SCREEN, MSG_BOX_FLAG_OK, NULL );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verify the Server Port
|
||||||
|
Get16BitStringFromField( 2, gzServerPortField );
|
||||||
|
INT32 svrPort = _wtoi(gzServerPortField);
|
||||||
|
if (svrPort < 1 || svrPort > 65535)
|
||||||
|
{
|
||||||
|
DoMPJMessageBox( MSG_BOX_BASIC_STYLE, gzMPJScreenText[MPJ_SERVERPORT_INVALID], MP_JOIN_SCREEN, MSG_BOX_FLAG_OK, NULL );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT32 MPJoinScreenHandle( void )
|
||||||
|
{
|
||||||
|
StartFrameBufferRender();
|
||||||
|
|
||||||
|
if( gfMPJScreenEntry )
|
||||||
|
{
|
||||||
|
// PauseGame();
|
||||||
|
|
||||||
|
EnterMPJScreen();
|
||||||
|
gfMPJScreenEntry = FALSE;
|
||||||
|
gfMPJScreenExit = FALSE;
|
||||||
|
InvalidateRegion( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
|
}
|
||||||
|
|
||||||
|
GetMPJScreenUserInput();
|
||||||
|
|
||||||
|
|
||||||
|
HandleMPJScreen();
|
||||||
|
|
||||||
|
// render buttons marked dirty
|
||||||
|
MarkButtonsDirty( );
|
||||||
|
RenderButtons( );
|
||||||
|
|
||||||
|
// render text boxes
|
||||||
|
RenderAllTextFields(); // textbox system call
|
||||||
|
|
||||||
|
// render help
|
||||||
|
// RenderFastHelp( );
|
||||||
|
// RenderButtonsFastHelp( );
|
||||||
|
|
||||||
|
|
||||||
|
ExecuteBaseDirtyRectQueue();
|
||||||
|
EndFrameBufferRender();
|
||||||
|
|
||||||
|
// handle fades in and out
|
||||||
|
if ( HandleFadeOutCallback( ) )
|
||||||
|
{
|
||||||
|
ClearMainMenu();
|
||||||
|
return( gubMPJExitScreen );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( HandleBeginFadeOut( gubMPJExitScreen ) )
|
||||||
|
{
|
||||||
|
return( gubMPJExitScreen );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( HandleFadeInCallback( ) )
|
||||||
|
{
|
||||||
|
// Re-render the scene!
|
||||||
|
RenderMPJScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( HandleBeginFadeIn( gubMPJExitScreen ) )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if( gfMPJScreenExit ) // we are exiting this screen
|
||||||
|
{
|
||||||
|
ExitMPJScreen(); // perform destruction
|
||||||
|
}
|
||||||
|
|
||||||
|
return( gubMPJExitScreen );
|
||||||
|
} // end MPJoinScreenHandle()
|
||||||
|
|
||||||
|
|
||||||
|
UINT32 MPJoinScreenShutdown( void )
|
||||||
|
{
|
||||||
|
return( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOLEAN EnterMPJScreen()
|
||||||
|
{
|
||||||
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
UINT16 cnt;
|
||||||
|
UINT16 usPosY;
|
||||||
|
|
||||||
|
if( gfMPJButtonsAllocated )
|
||||||
|
return( TRUE );
|
||||||
|
|
||||||
|
SetCurrentCursorFromDatabase( CURSOR_NORMAL );
|
||||||
|
|
||||||
|
// load the Main trade screen backgroiund image
|
||||||
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
|
if (iResolution == 0)
|
||||||
|
{
|
||||||
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround.sti", VObjectDesc.ImageFile);
|
||||||
|
}
|
||||||
|
else if (iResolution == 1)
|
||||||
|
{
|
||||||
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_800x600.sti", VObjectDesc.ImageFile);
|
||||||
|
}
|
||||||
|
else if (iResolution == 2)
|
||||||
|
{
|
||||||
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_1024x768.sti", VObjectDesc.ImageFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
CHECKF(AddVideoObject(&VObjectDesc, &guiMPJMainBackGroundImage ));
|
||||||
|
|
||||||
|
//Join button
|
||||||
|
giMPJoinBtnImage = LoadButtonImage("INTERFACE\\PreferencesButtons.sti", -1,0,-1,2,-1 );
|
||||||
|
guiMPJoinButton = CreateIconAndTextButton( giMPJoinBtnImage, gzMPJScreenText[MPJ_JOIN_TEXT], OPT_BUTTON_FONT,
|
||||||
|
OPT_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
||||||
|
OPT_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
||||||
|
TEXT_CJUSTIFIED,
|
||||||
|
MPJ_BTN_JOIN_X, MPJ_BTN_JOIN_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
|
DEFAULT_MOVE_CALLBACK, BtnMPJoinCallback);
|
||||||
|
|
||||||
|
SpecifyButtonSoundScheme( guiMPJoinButton, BUTTON_SOUND_SCHEME_BIGSWITCH3 );
|
||||||
|
SpecifyDisabledButtonStyle( guiMPJoinButton, DISABLED_STYLE_NONE );
|
||||||
|
|
||||||
|
//Host button
|
||||||
|
giMPJHostBtnImage = UseLoadedButtonImage( giMPJoinBtnImage, -1,1,-1,3,-1 );
|
||||||
|
guiMPJHostButton = CreateIconAndTextButton( giMPJHostBtnImage, gzMPJScreenText[MPJ_HOST_TEXT], OPT_BUTTON_FONT,
|
||||||
|
OPT_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
||||||
|
OPT_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
||||||
|
TEXT_CJUSTIFIED,
|
||||||
|
MPJ_BTN_HOST_X, MPJ_BTN_HOST_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
|
DEFAULT_MOVE_CALLBACK, BtnMPJHostCallback);
|
||||||
|
|
||||||
|
SpecifyButtonSoundScheme( guiMPJHostButton, BUTTON_SOUND_SCHEME_BIGSWITCH3 );
|
||||||
|
SpecifyDisabledButtonStyle( guiMPJHostButton, DISABLED_STYLE_NONE );
|
||||||
|
|
||||||
|
//Cancel button
|
||||||
|
giMPJCancelBtnImage = UseLoadedButtonImage( giMPJoinBtnImage, -1,1,-1,3,-1 );
|
||||||
|
guiMPJCancelButton = CreateIconAndTextButton( giMPJCancelBtnImage, gzMPJScreenText[MPJ_CANCEL_TEXT], OPT_BUTTON_FONT,
|
||||||
|
OPT_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
||||||
|
OPT_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
||||||
|
TEXT_CJUSTIFIED,
|
||||||
|
MPJ_CANCEL_X, MPJ_BTN_JOIN_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
|
DEFAULT_MOVE_CALLBACK, BtnMPJCancelCallback );
|
||||||
|
SpecifyButtonSoundScheme( guiMPJCancelButton, BUTTON_SOUND_SCHEME_BIGSWITCH3 );
|
||||||
|
|
||||||
|
// Initialise Text Boxes
|
||||||
|
InitTextInputMode(); // API call to initialise text input mode for this screen
|
||||||
|
// does not mean we are inputting text right away
|
||||||
|
|
||||||
|
// Player Name field
|
||||||
|
SetTextInputCursor( CUROSR_IBEAM_WHITE );
|
||||||
|
SetTextInputFont( (UINT16) FONT12ARIALFIXEDWIDTH ); //FONT12ARIAL //FONT12ARIALFIXEDWIDTH
|
||||||
|
Set16BPPTextFieldColor( Get16BPPColor(FROMRGB( 0, 0, 0) ) );
|
||||||
|
SetBevelColors( Get16BPPColor(FROMRGB(136, 138, 135)), Get16BPPColor(FROMRGB(24, 61, 81)) );
|
||||||
|
SetTextInputRegularColors( FONT_WHITE, 2 );
|
||||||
|
SetTextInputHilitedColors( 2, FONT_WHITE, FONT_WHITE );
|
||||||
|
SetCursorColor( Get16BPPColor(FROMRGB(255, 255, 255) ) );
|
||||||
|
|
||||||
|
//AddUserInputField( NULL ); // API Call that sets a special input-handling routine and method for the TAB key
|
||||||
|
|
||||||
|
//Add Player Name textbox
|
||||||
|
AddTextInputField( MPJ_TXT_HANDLE_X,
|
||||||
|
MPJ_TXT_HANDLE_Y,
|
||||||
|
MPJ_TXT_HANDLE_WIDTH,
|
||||||
|
MPJ_TXT_HANDLE_HEIGHT,
|
||||||
|
MSYS_PRIORITY_HIGH+2,
|
||||||
|
gzPlayerHandleField,
|
||||||
|
30,
|
||||||
|
INPUTTYPE_ASCII );//23
|
||||||
|
|
||||||
|
//Add Server IP textbox
|
||||||
|
AddTextInputField( MPJ_TXT_IP_X,
|
||||||
|
MPJ_TXT_IP_Y,
|
||||||
|
MPJ_TXT_IP_WIDTH,
|
||||||
|
MPJ_TXT_IP_HEIGHT,
|
||||||
|
MSYS_PRIORITY_HIGH+2,
|
||||||
|
gzServerIPField,
|
||||||
|
15,
|
||||||
|
INPUTTYPE_ASCII );//23
|
||||||
|
|
||||||
|
//Add Server Port textbox
|
||||||
|
AddTextInputField( MPJ_TXT_PORT_X,
|
||||||
|
MPJ_TXT_PORT_Y,
|
||||||
|
MPJ_TXT_PORT_WIDTH,
|
||||||
|
MPJ_TXT_PORT_HEIGHT,
|
||||||
|
MSYS_PRIORITY_HIGH+2,
|
||||||
|
gzServerPortField,
|
||||||
|
5,
|
||||||
|
INPUTTYPE_ASCII );//23
|
||||||
|
|
||||||
|
SetActiveField( 0 ); // Playername textbox has focus
|
||||||
|
|
||||||
|
//Reset the exit screen - screen the main game loop will call next iteration
|
||||||
|
gubMPJExitScreen = MP_JOIN_SCREEN;
|
||||||
|
|
||||||
|
//REnder the screen once so we can blt ot to ths save buffer
|
||||||
|
RenderMPJScreen();
|
||||||
|
|
||||||
|
BlitBufferToBuffer(guiRENDERBUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
|
|
||||||
|
gfMPJButtonsAllocated = TRUE;
|
||||||
|
|
||||||
|
return( TRUE );
|
||||||
|
|
||||||
|
} // End of EnterMPJScreen()
|
||||||
|
|
||||||
|
|
||||||
|
BOOLEAN ExitMPJScreen()
|
||||||
|
{
|
||||||
|
UINT16 cnt;
|
||||||
|
|
||||||
|
if( !gfMPJButtonsAllocated )
|
||||||
|
return( TRUE );
|
||||||
|
|
||||||
|
//Delete the main options screen background
|
||||||
|
DeleteVideoObjectFromIndex( guiMPJMainBackGroundImage );
|
||||||
|
|
||||||
|
RemoveButton( guiMPJoinButton );
|
||||||
|
RemoveButton( guiMPJHostButton );
|
||||||
|
RemoveButton( guiMPJCancelButton );
|
||||||
|
|
||||||
|
|
||||||
|
UnloadButtonImage( giMPJCancelBtnImage );
|
||||||
|
UnloadButtonImage( giMPJHostBtnImage );
|
||||||
|
UnloadButtonImage( giMPJoinBtnImage );
|
||||||
|
|
||||||
|
// exit text input mode in this screen and clean up text boxes
|
||||||
|
KillAllTextInputModes();
|
||||||
|
SetTextInputCursor( CURSOR_IBEAM );
|
||||||
|
|
||||||
|
gfMPJButtonsAllocated = FALSE;
|
||||||
|
|
||||||
|
//If we are starting the game stop playing the music
|
||||||
|
// <TODO> review this, i think MPJ_EXIT is the proceed mode...
|
||||||
|
//if( gubMPJScreenHandler == MPJ_EXIT )
|
||||||
|
// SetMusicMode( MUSIC_NONE );
|
||||||
|
|
||||||
|
gfMPJScreenExit = FALSE;
|
||||||
|
gfMPJScreenEntry = TRUE;
|
||||||
|
|
||||||
|
return( TRUE );
|
||||||
|
|
||||||
|
} // End of ExitMPJScreen()
|
||||||
|
|
||||||
|
|
||||||
|
void HandleMPJScreen()
|
||||||
|
{
|
||||||
|
if( gubMPJScreenHandler != MPJ_NOTHING )
|
||||||
|
{
|
||||||
|
switch( gubMPJScreenHandler )
|
||||||
|
{
|
||||||
|
case MPJ_CANCEL:
|
||||||
|
gubMPJExitScreen = MAINMENU_SCREEN;
|
||||||
|
gfMPJScreenExit = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MPJ_HOST:
|
||||||
|
gubMPJExitScreen = MP_HOST_SCREEN;
|
||||||
|
gfMPJScreenExit = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case MPJ_JOIN:
|
||||||
|
{
|
||||||
|
//if we are already fading out, get out of here
|
||||||
|
if( gFadeOutDoneCallback != DoneFadeOutForExitMPJScreen )
|
||||||
|
{
|
||||||
|
//Disable the ok button
|
||||||
|
DisableButton( guiMPJoinButton );
|
||||||
|
DisableButton( guiMPJHostButton );
|
||||||
|
|
||||||
|
gFadeOutDoneCallback = DoneFadeOutForExitMPJScreen;
|
||||||
|
|
||||||
|
FadeOutNextFrame( );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
gubMPJScreenHandler = MPJ_NOTHING;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if( gfReRenderMPJScreen )
|
||||||
|
{
|
||||||
|
RenderMPJScreen();
|
||||||
|
gfReRenderMPJScreen = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// <TODO> add restore backgrounds in...
|
||||||
|
//RestoreGIOButtonBackGrounds();
|
||||||
|
} // end of HandleMPJScreen
|
||||||
|
|
||||||
|
|
||||||
|
BOOLEAN RenderMPJScreen()
|
||||||
|
{
|
||||||
|
HVOBJECT hPixHandle;
|
||||||
|
UINT16 usPosY;
|
||||||
|
|
||||||
|
//Get the main background screen graphic and blt it
|
||||||
|
GetVideoObject(&hPixHandle, guiMPJMainBackGroundImage );
|
||||||
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,0,0, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
//Shade the background
|
||||||
|
ShadowVideoSurfaceRect( FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, iScreenWidthOffset + 640, iScreenHeightOffset + 480 );
|
||||||
|
|
||||||
|
//Display the title
|
||||||
|
DrawTextToScreen( gzMPJScreenText[ MPJ_TITLE_TEXT ], MPJ_MAIN_TITLE_X, MPJ_MAIN_TITLE_Y, MPJ_MAIN_TITLE_WIDTH, MPJ_TITLE_FONT, MPJ_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||||
|
|
||||||
|
// Player name text label
|
||||||
|
DisplayWrappedString( MPJ_LABEL_HANDLE_X, MPJ_LABEL_HANDLE_Y, MPJ_LABEL_HANDLE_WIDTH, 2, MPJ_LABEL_TEXT_FONT, MPJ_LABEL_TEXT_COLOR, gzMPJScreenText[ MPJ_HANDLE_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Server IP text label
|
||||||
|
DisplayWrappedString( MPJ_LABEL_IP_X, MPJ_LABEL_IP_Y, MPJ_LABEL_IP_WIDTH, 2, MPJ_LABEL_TEXT_FONT, MPJ_LABEL_TEXT_COLOR, gzMPJScreenText[ MPJ_SERVERIP_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Server Port text label
|
||||||
|
DisplayWrappedString( MPJ_LABEL_PORT_X, MPJ_LABEL_PORT_Y, MPJ_LABEL_PORT_WIDTH, 2, MPJ_LABEL_TEXT_FONT, MPJ_LABEL_TEXT_COLOR, gzMPJScreenText[ MPJ_SERVERPORT_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
return( TRUE );
|
||||||
|
} // end of RenderMPJScreen()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void GetMPJScreenUserInput()
|
||||||
|
{
|
||||||
|
InputAtom Event;
|
||||||
|
// POINT MousePos;
|
||||||
|
|
||||||
|
// GetCursorPos(&MousePos);
|
||||||
|
|
||||||
|
while( DequeueEvent( &Event ) )
|
||||||
|
{
|
||||||
|
// check if this event is swallowed by text input, otherwise process key
|
||||||
|
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
||||||
|
{
|
||||||
|
switch( Event.usParam )
|
||||||
|
{
|
||||||
|
|
||||||
|
case ESC:
|
||||||
|
//Exit out of the screen
|
||||||
|
gubMPJScreenHandler = MPJ_CANCEL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ENTER:
|
||||||
|
if (ValidateJoinSettings(false))
|
||||||
|
{
|
||||||
|
SaveJoinSettings();
|
||||||
|
gubMPJScreenHandler = MPJ_JOIN;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // end of GetMPJScreenUserInput()
|
||||||
|
|
||||||
|
|
||||||
|
// CALLBACKS
|
||||||
|
|
||||||
|
void BtnMPJoinCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
|
{
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
|
{
|
||||||
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
|
}
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
|
{
|
||||||
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
|
|
||||||
|
if (ValidateJoinSettings(false))
|
||||||
|
{
|
||||||
|
SaveJoinSettings();
|
||||||
|
gubMPJScreenHandler = MPJ_JOIN;
|
||||||
|
//gubMPJScreenHandler = MPJ_JOIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void BtnMPJHostCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
|
{
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
|
{
|
||||||
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
|
}
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
|
{
|
||||||
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
|
|
||||||
|
if (ValidateJoinSettings(true))
|
||||||
|
{
|
||||||
|
SaveJoinSettings();
|
||||||
|
gubMPJScreenHandler = MPJ_HOST;
|
||||||
|
}
|
||||||
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void BtnMPJCancelCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
|
{
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
|
{
|
||||||
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
|
}
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
|
{
|
||||||
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
|
|
||||||
|
gubMPJScreenHandler = MPJ_CANCEL;
|
||||||
|
|
||||||
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOLEAN DoMPJMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||||
|
{
|
||||||
|
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1 };
|
||||||
|
|
||||||
|
// reset exit mode
|
||||||
|
// gfExitGioDueToMessageBox = TRUE;
|
||||||
|
|
||||||
|
// do message box and return
|
||||||
|
giMPJMessageBox = DoMessageBox( ubStyle, zString, uiExitScreen, ( UINT16 ) ( usFlags| MSG_BOX_FLAG_USE_CENTERING_RECT ), ReturnCallback, &CenteringRect );
|
||||||
|
|
||||||
|
// send back return state
|
||||||
|
return( ( giMPJMessageBox != -1 ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void DoneFadeOutForExitMPJScreen( void )
|
||||||
|
{
|
||||||
|
// As we bypassed the GIO screen, set up some game options for multiplayer here
|
||||||
|
// <TODO> most things i have left as thier defaults here for testing.
|
||||||
|
is_networked = true;
|
||||||
|
is_host = false; // we want to be a client, not we ARE a client yet (is_client)
|
||||||
|
auto_retry = true;
|
||||||
|
giNumTries = 5;
|
||||||
|
|
||||||
|
// loop through and get the status of all the buttons
|
||||||
|
// Madd
|
||||||
|
/*gGameOptions.fGunNut = GetCurrentGunButtonSetting();
|
||||||
|
gGameOptions.ubGameStyle = GetCurrentGameStyleButtonSetting();
|
||||||
|
gGameOptions.ubDifficultyLevel = GetCurrentDifficultyButtonSetting() + 1;*/
|
||||||
|
// JA2Gold: no more timed turns setting
|
||||||
|
//gGameOptions.fTurnTimeLimit = GetCurrentTimedTurnsButtonSetting();//hayden : re-enabled
|
||||||
|
|
||||||
|
if (is_networked)
|
||||||
|
gGameOptions.fTurnTimeLimit = TRUE;
|
||||||
|
else
|
||||||
|
gGameOptions.fTurnTimeLimit = FALSE;
|
||||||
|
|
||||||
|
// JA2Gold: iron man
|
||||||
|
//gGameOptions.fIronManMode = GetCurrentGameSaveButtonSetting();
|
||||||
|
|
||||||
|
// Bobby Rays - why would we want anything less than the best
|
||||||
|
gGameOptions.ubBobbyRay = BR_AWESOME;
|
||||||
|
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
/*if(IsNIVModeValid() == TRUE){
|
||||||
|
switch ( GetCurrentINVOptionButtonSetting() )
|
||||||
|
{
|
||||||
|
case GIO_INV_OLD:
|
||||||
|
gGameOptions.ubInventorySystem = INVENTORY_OLD;
|
||||||
|
break;
|
||||||
|
case GIO_INV_NEW:
|
||||||
|
gGameOptions.ubInventorySystem = INVENTORY_NEW;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
// gubGIOExitScreen = INIT_SCREEN;
|
||||||
|
gubMPJExitScreen = INTRO_SCREEN;
|
||||||
|
|
||||||
|
//set the fact that we should do the intro videos
|
||||||
|
// gbIntroScreenMode = INTRO_BEGINING;
|
||||||
|
#ifdef JA2TESTVERSION
|
||||||
|
if( gfKeyState[ ALT ] )
|
||||||
|
{
|
||||||
|
if( gfKeyState[ CTRL ] )
|
||||||
|
{
|
||||||
|
gMercProfiles[ MIGUEL ].bMercStatus = MERC_IS_DEAD;
|
||||||
|
gMercProfiles[ SKYRIDER ].bMercStatus = MERC_IS_DEAD;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetIntroType( INTRO_ENDING );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
SetIntroType( INTRO_BEGINING );
|
||||||
|
|
||||||
|
ExitMPJScreen(); // cleanup please, if we called a fadeout then we didnt do it above
|
||||||
|
|
||||||
|
SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR );
|
||||||
|
}
|
||||||
|
|
||||||
|
void DoneFadeInForExitMPJScreen( void )
|
||||||
|
{
|
||||||
|
SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR );
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#ifndef _MP_JOIN_SCREEN_H_
|
||||||
|
#define _MP_JOIN_SCREEN_H_
|
||||||
|
|
||||||
|
|
||||||
|
UINT32 MPJoinScreenInit( void );
|
||||||
|
UINT32 MPJoinScreenHandle( void );
|
||||||
|
UINT32 MPJoinScreenShutdown( void );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,642 @@
|
|||||||
|
#ifdef PRECOMPILEDHEADERS
|
||||||
|
#include "JA2 All.h"
|
||||||
|
#include "Intro.h"
|
||||||
|
#else
|
||||||
|
#include "Types.h"
|
||||||
|
#include "MPScoreScreen.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
|
#include "Utilities.h"
|
||||||
|
#include "wCheck.h"
|
||||||
|
#include "Font Control.h"
|
||||||
|
#include "WordWrap.h"
|
||||||
|
#include "Render Dirty.h"
|
||||||
|
#include "Input.h"
|
||||||
|
#include "Options Screen.h"
|
||||||
|
#include "English.h"
|
||||||
|
#include "Sysutil.h"
|
||||||
|
#include "Fade Screen.h"
|
||||||
|
#include "Cursor Control.h"
|
||||||
|
#include "Music Control.h"
|
||||||
|
#include "cursors.h"
|
||||||
|
#include "Intro.h"
|
||||||
|
#include "Text.h"
|
||||||
|
#include "Text Input.h"
|
||||||
|
#include "_Ja25EnglishText.h"
|
||||||
|
#include "Soldier Profile.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "gameloop.h"
|
||||||
|
#include "Game Init.h"
|
||||||
|
#include "connect.h"
|
||||||
|
#include "network.h" // for client name
|
||||||
|
#include "saveloadscreen.h"
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Global Defines
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////
|
||||||
|
|
||||||
|
#define MPS_TITLE_FONT FONT14ARIAL//FONT16ARIAL
|
||||||
|
#define MPS_TITLE_COLOR FONT_MCOLOR_WHITE
|
||||||
|
|
||||||
|
#define MPS_LABEL_TEXT_FONT FONT12ARIAL//FONT16ARIAL
|
||||||
|
#define MPS_LABEL_TEXT_COLOR FONT_MCOLOR_WHITE
|
||||||
|
|
||||||
|
//buttons
|
||||||
|
#define MPS_BTN_CONTINUE_X iScreenWidthOffset + 320 + 143
|
||||||
|
#define MPS_BTN_CONTINUE_Y iScreenHeightOffset + 435
|
||||||
|
//#define MPJ_BTN_HOST_X MPJ_BTN_JOIN_X-180
|
||||||
|
//#define MPJ_BTN_HOST_Y iScreenHeightOffset + 435
|
||||||
|
#define MPS_BTN_CANCEL_X iScreenWidthOffset + ((320 - 115) / 2)
|
||||||
|
#define MPS_BTN_CANCEL_Y MPS_BTN_CONTINUE_Y
|
||||||
|
|
||||||
|
//main title
|
||||||
|
#define MPS_MAIN_TITLE_X 0
|
||||||
|
#define MPS_MAIN_TITLE_Y iScreenHeightOffset + 10
|
||||||
|
#define MPS_MAIN_TITLE_WIDTH SCREEN_WIDTH
|
||||||
|
|
||||||
|
//labels
|
||||||
|
#define MPS_LABEL_PLAYER_X iScreenWidthOffset + 80
|
||||||
|
#define MPS_LABEL_PLAYER_Y iScreenHeightOffset + 80
|
||||||
|
#define MPS_LABEL_PLAYER_WIDTH 80
|
||||||
|
#define MPS_LABEL_KILLS_X MPS_LABEL_PLAYER_X + MPS_LABEL_PLAYER_WIDTH + 20
|
||||||
|
#define MPS_LABEL_KILLS_Y MPS_LABEL_PLAYER_Y
|
||||||
|
#define MPS_LABEL_KILLS_WIDTH 50
|
||||||
|
#define MPS_LABEL_DEATHS_X MPS_LABEL_KILLS_X + MPS_LABEL_KILLS_WIDTH + 20
|
||||||
|
#define MPS_LABEL_DEATHS_Y MPS_LABEL_PLAYER_Y
|
||||||
|
#define MPS_LABEL_DEATHS_WIDTH 50
|
||||||
|
#define MPS_LABEL_HITS_X MPS_LABEL_DEATHS_X + MPS_LABEL_DEATHS_WIDTH + 20
|
||||||
|
#define MPS_LABEL_HITS_Y MPS_LABEL_PLAYER_Y
|
||||||
|
#define MPS_LABEL_HITS_WIDTH 50
|
||||||
|
#define MPS_LABEL_MISSES_X MPS_LABEL_HITS_X + MPS_LABEL_HITS_WIDTH + 20
|
||||||
|
#define MPS_LABEL_MISSES_Y MPS_LABEL_PLAYER_Y
|
||||||
|
#define MPS_LABEL_MISSES_WIDTH 50
|
||||||
|
#define MPS_LABEL_ACCURACY_X MPS_LABEL_MISSES_X + MPS_LABEL_MISSES_WIDTH + 20
|
||||||
|
#define MPS_LABEL_ACCURACY_Y MPS_LABEL_PLAYER_Y
|
||||||
|
#define MPS_LABEL_ACCURACY_WIDTH 70
|
||||||
|
|
||||||
|
|
||||||
|
#define MPS_PLAYERLIST_Y MPS_LABEL_PLAYER_Y + 30
|
||||||
|
#define MPS_PLAYER_GAP 17
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Global Variables
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////
|
||||||
|
|
||||||
|
BOOLEAN gfMPSScreenEntry = TRUE;
|
||||||
|
BOOLEAN gfMPSScreenExit = FALSE;
|
||||||
|
BOOLEAN gfReRenderMPSScreen=TRUE;
|
||||||
|
BOOLEAN gfMPSButtonsAllocated = FALSE;
|
||||||
|
|
||||||
|
//enum for different states of screen
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MPS_NOTHING,
|
||||||
|
MPS_CANCEL,
|
||||||
|
MPS_CONTINUE,
|
||||||
|
};
|
||||||
|
|
||||||
|
UINT8 gubMPSScreenHandler=MPS_NOTHING; // State changer for HandleMPJScreen()
|
||||||
|
|
||||||
|
UINT32 gubMPSExitScreen = MP_SCORE_SCREEN; // The screen that is in control next iteration of the game_loop
|
||||||
|
|
||||||
|
UINT32 guiMPSMainBackGroundImage;
|
||||||
|
|
||||||
|
////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Screen Controls
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////
|
||||||
|
|
||||||
|
// Cancel Button
|
||||||
|
void BtnMPSCancelCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
|
UINT32 guiMPSCancelButton;
|
||||||
|
INT32 giMPSCancelBtnImage;
|
||||||
|
|
||||||
|
// Continue Button
|
||||||
|
void BtnMPSContinueCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
|
UINT32 guiMPSContinueButton;
|
||||||
|
INT32 giMPSContinueBtnImage;
|
||||||
|
|
||||||
|
// Message Box handle
|
||||||
|
INT8 giMPSMessageBox = -1;
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Local Function Prototypes
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////
|
||||||
|
|
||||||
|
extern void ClearMainMenu();
|
||||||
|
|
||||||
|
BOOLEAN EnterMPSScreen();
|
||||||
|
BOOLEAN ExitMPSScreen();
|
||||||
|
void HandleMPSScreen();
|
||||||
|
BOOLEAN RenderMPSScreen();
|
||||||
|
|
||||||
|
void GetMPSScreenUserInput();
|
||||||
|
void DoneFadeOutForExitMPSScreen( void );
|
||||||
|
void DoneFadeInForExitMPSScreen( void );
|
||||||
|
|
||||||
|
UINT32 MPScoreScreenInit( void )
|
||||||
|
{
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT32 MPScoreScreenHandle( void )
|
||||||
|
{
|
||||||
|
StartFrameBufferRender();
|
||||||
|
|
||||||
|
if( gfMPSScreenEntry )
|
||||||
|
{
|
||||||
|
// PauseGame();
|
||||||
|
|
||||||
|
EnterMPSScreen();
|
||||||
|
gfMPSScreenEntry = FALSE;
|
||||||
|
gfMPSScreenExit = FALSE;
|
||||||
|
InvalidateRegion( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
|
}
|
||||||
|
|
||||||
|
GetMPSScreenUserInput();
|
||||||
|
|
||||||
|
|
||||||
|
HandleMPSScreen();
|
||||||
|
|
||||||
|
// render buttons marked dirty
|
||||||
|
MarkButtonsDirty( );
|
||||||
|
RenderButtons( );
|
||||||
|
|
||||||
|
// render text boxes
|
||||||
|
RenderAllTextFields(); // textbox system call
|
||||||
|
|
||||||
|
// render help
|
||||||
|
// RenderFastHelp( );
|
||||||
|
// RenderButtonsFastHelp( );
|
||||||
|
|
||||||
|
|
||||||
|
ExecuteBaseDirtyRectQueue();
|
||||||
|
EndFrameBufferRender();
|
||||||
|
|
||||||
|
// handle fades in and out
|
||||||
|
if ( HandleFadeOutCallback( ) )
|
||||||
|
{
|
||||||
|
ClearMainMenu();
|
||||||
|
return( gubMPSExitScreen );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( HandleBeginFadeOut( gubMPSExitScreen ) )
|
||||||
|
{
|
||||||
|
return( gubMPSExitScreen );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( HandleFadeInCallback( ) )
|
||||||
|
{
|
||||||
|
// Re-render the scene!
|
||||||
|
RenderMPSScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( HandleBeginFadeIn( gubMPSExitScreen ) )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if( gfMPSScreenExit ) // we are exiting this screen
|
||||||
|
{
|
||||||
|
ExitMPSScreen(); // perform destruction
|
||||||
|
}
|
||||||
|
|
||||||
|
return( gubMPSExitScreen );
|
||||||
|
} // end MPScoreScreenHandle()
|
||||||
|
|
||||||
|
UINT32 MPScoreScreenShutdown( void )
|
||||||
|
{
|
||||||
|
return( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOLEAN EnterMPSScreen()
|
||||||
|
{
|
||||||
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
UINT16 cnt;
|
||||||
|
UINT16 usPosY;
|
||||||
|
|
||||||
|
if( gfMPSButtonsAllocated )
|
||||||
|
return( TRUE );
|
||||||
|
|
||||||
|
SetCurrentCursorFromDatabase( CURSOR_NORMAL );
|
||||||
|
|
||||||
|
// load the Main trade screen backgroiund image
|
||||||
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
|
if (iResolution == 0)
|
||||||
|
{
|
||||||
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround.sti", VObjectDesc.ImageFile);
|
||||||
|
}
|
||||||
|
else if (iResolution == 1)
|
||||||
|
{
|
||||||
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_800x600.sti", VObjectDesc.ImageFile);
|
||||||
|
}
|
||||||
|
else if (iResolution == 2)
|
||||||
|
{
|
||||||
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_1024x768.sti", VObjectDesc.ImageFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
CHECKF(AddVideoObject(&VObjectDesc, &guiMPSMainBackGroundImage ));
|
||||||
|
|
||||||
|
//Cancel button
|
||||||
|
giMPSCancelBtnImage = LoadButtonImage("INTERFACE\\PreferencesButtons.sti", -1,0,-1,2,-1 );
|
||||||
|
guiMPSCancelButton = CreateIconAndTextButton( giMPSCancelBtnImage, gzMPSScreenText[MPS_CANCEL_TEXT], OPT_BUTTON_FONT,
|
||||||
|
OPT_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
||||||
|
OPT_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
||||||
|
TEXT_CJUSTIFIED,
|
||||||
|
MPS_BTN_CANCEL_X, MPS_BTN_CANCEL_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
|
DEFAULT_MOVE_CALLBACK, BtnMPSCancelCallback);
|
||||||
|
|
||||||
|
SpecifyButtonSoundScheme( guiMPSCancelButton, BUTTON_SOUND_SCHEME_BIGSWITCH3 );
|
||||||
|
SpecifyDisabledButtonStyle( guiMPSCancelButton, DISABLED_STYLE_NONE );
|
||||||
|
|
||||||
|
//Continue button
|
||||||
|
giMPSContinueBtnImage = UseLoadedButtonImage( giMPSCancelBtnImage, -1,1,-1,3,-1 );
|
||||||
|
guiMPSContinueButton = CreateIconAndTextButton( giMPSContinueBtnImage, gzMPSScreenText[MPS_CONTINUE_TEXT], OPT_BUTTON_FONT,
|
||||||
|
OPT_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
||||||
|
OPT_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
||||||
|
TEXT_CJUSTIFIED,
|
||||||
|
MPS_BTN_CONTINUE_X, MPS_BTN_CONTINUE_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
|
DEFAULT_MOVE_CALLBACK, BtnMPSContinueCallback);
|
||||||
|
|
||||||
|
SpecifyButtonSoundScheme( guiMPSContinueButton, BUTTON_SOUND_SCHEME_BIGSWITCH3 );
|
||||||
|
SpecifyDisabledButtonStyle( guiMPSContinueButton, DISABLED_STYLE_NONE );
|
||||||
|
|
||||||
|
//Reset the exit screen - screen the main game loop will call next iteration
|
||||||
|
gubMPSExitScreen = MP_SCORE_SCREEN;
|
||||||
|
|
||||||
|
//REnder the screen once so we can blt ot to ths save buffer
|
||||||
|
RenderMPSScreen();
|
||||||
|
|
||||||
|
BlitBufferToBuffer(guiRENDERBUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
|
|
||||||
|
gfMPSButtonsAllocated = TRUE;
|
||||||
|
|
||||||
|
return( TRUE );
|
||||||
|
|
||||||
|
} // End of EnterMPSScreen()
|
||||||
|
|
||||||
|
|
||||||
|
BOOLEAN ExitMPSScreen()
|
||||||
|
{
|
||||||
|
UINT16 cnt;
|
||||||
|
|
||||||
|
if( !gfMPSButtonsAllocated )
|
||||||
|
return( TRUE );
|
||||||
|
|
||||||
|
//Delete the main options screen background
|
||||||
|
DeleteVideoObjectFromIndex( guiMPSMainBackGroundImage );
|
||||||
|
|
||||||
|
RemoveButton( guiMPSContinueButton );
|
||||||
|
RemoveButton( guiMPSCancelButton );
|
||||||
|
|
||||||
|
|
||||||
|
UnloadButtonImage( giMPSCancelBtnImage );
|
||||||
|
UnloadButtonImage( giMPSContinueBtnImage );
|
||||||
|
|
||||||
|
// exit text input mode in this screen and clean up text boxes
|
||||||
|
//KillAllTextInputModes();
|
||||||
|
SetTextInputCursor( CURSOR_IBEAM );
|
||||||
|
|
||||||
|
gfMPSButtonsAllocated = FALSE;
|
||||||
|
|
||||||
|
//If we are starting the game stop playing the music
|
||||||
|
if( gubMPSScreenHandler == MPS_CONTINUE )
|
||||||
|
SetMusicMode( MUSIC_NONE );
|
||||||
|
|
||||||
|
gfMPSScreenExit = FALSE;
|
||||||
|
gfMPSScreenEntry = TRUE;
|
||||||
|
|
||||||
|
return( TRUE );
|
||||||
|
|
||||||
|
} // End of ExitMPJScreen()
|
||||||
|
|
||||||
|
|
||||||
|
void HandleMPSScreen()
|
||||||
|
{
|
||||||
|
if( gubMPSScreenHandler != MPS_NOTHING )
|
||||||
|
{
|
||||||
|
switch( gubMPSScreenHandler )
|
||||||
|
{
|
||||||
|
case MPS_CANCEL:
|
||||||
|
gubMPSExitScreen = MAINMENU_SCREEN;
|
||||||
|
gfMPSScreenExit = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
/*case MPJ_HOST:
|
||||||
|
gubMPJExitScreen = MP_HOST_SCREEN;
|
||||||
|
gfMPJScreenExit = TRUE;
|
||||||
|
break;*/
|
||||||
|
|
||||||
|
|
||||||
|
case MPS_CONTINUE:
|
||||||
|
{
|
||||||
|
//if we are already fading out, get out of here
|
||||||
|
if( gFadeOutDoneCallback != DoneFadeOutForExitMPSScreen )
|
||||||
|
{
|
||||||
|
//Disable the ok button
|
||||||
|
DisableButton( guiMPSCancelButton );
|
||||||
|
DisableButton( guiMPSContinueButton );
|
||||||
|
|
||||||
|
gFadeOutDoneCallback = DoneFadeOutForExitMPSScreen;
|
||||||
|
|
||||||
|
FadeOutNextFrame( );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
gubMPSScreenHandler = MPS_NOTHING;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if( gfReRenderMPSScreen )
|
||||||
|
{
|
||||||
|
RenderMPSScreen();
|
||||||
|
gfReRenderMPSScreen = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// <TODO> add restore backgrounds in...
|
||||||
|
//RestoreGIOButtonBackGrounds();
|
||||||
|
} // end of HandleMPJScreen
|
||||||
|
|
||||||
|
|
||||||
|
BOOLEAN RenderMPSScreen()
|
||||||
|
{
|
||||||
|
HVOBJECT hPixHandle;
|
||||||
|
UINT16 usPosY;
|
||||||
|
|
||||||
|
//Get the main background screen graphic and blt it
|
||||||
|
GetVideoObject(&hPixHandle, guiMPSMainBackGroundImage );
|
||||||
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,0,0, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
//Shade the background
|
||||||
|
ShadowVideoSurfaceRect( FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, iScreenWidthOffset + 640, iScreenHeightOffset + 480 );
|
||||||
|
|
||||||
|
//Display the title
|
||||||
|
DrawTextToScreen( gzMPSScreenText[ MPS_TITLE_TEXT ], MPS_MAIN_TITLE_X, MPS_MAIN_TITLE_Y, MPS_MAIN_TITLE_WIDTH, MPS_TITLE_FONT, MPS_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||||
|
|
||||||
|
// Player Column
|
||||||
|
DisplayWrappedString( MPS_LABEL_PLAYER_X, MPS_LABEL_PLAYER_Y, MPS_LABEL_PLAYER_WIDTH, 2, MPS_TITLE_FONT, MPS_TITLE_COLOR, gzMPSScreenText[ MPS_PLAYER_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
// Kills Column
|
||||||
|
DisplayWrappedString( MPS_LABEL_KILLS_X, MPS_LABEL_KILLS_Y, MPS_LABEL_KILLS_WIDTH, 2, MPS_TITLE_FONT, MPS_TITLE_COLOR, gzMPSScreenText[ MPS_KILLS_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
// Deaths Column
|
||||||
|
DisplayWrappedString( MPS_LABEL_DEATHS_X, MPS_LABEL_DEATHS_Y, MPS_LABEL_DEATHS_WIDTH, 2, MPS_TITLE_FONT, MPS_TITLE_COLOR, gzMPSScreenText[ MPS_DEATHS_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
// Hits Column
|
||||||
|
DisplayWrappedString( MPS_LABEL_HITS_X, MPS_LABEL_HITS_Y, MPS_LABEL_HITS_WIDTH, 2, MPS_TITLE_FONT, MPS_TITLE_COLOR, gzMPSScreenText[ MPS_HITS_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
// Misses Column
|
||||||
|
DisplayWrappedString( MPS_LABEL_MISSES_X, MPS_LABEL_MISSES_Y, MPS_LABEL_MISSES_WIDTH, 2, MPS_TITLE_FONT, MPS_TITLE_COLOR, gzMPSScreenText[ MPS_MISSES_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
// Accuracy Column
|
||||||
|
DisplayWrappedString( MPS_LABEL_ACCURACY_X, MPS_LABEL_ACCURACY_Y, MPS_LABEL_ACCURACY_WIDTH, 2, MPS_TITLE_FONT, MPS_TITLE_COLOR, gzMPSScreenText[ MPS_ACCURACY_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Draw players
|
||||||
|
wchar_t szPlayerName[30];
|
||||||
|
wchar_t szPlayerKills[3];
|
||||||
|
wchar_t szPlayerDeaths[3];
|
||||||
|
wchar_t szPlayerHits[3];
|
||||||
|
wchar_t szPlayerMisses[3];
|
||||||
|
wchar_t szPlayerAccuracy[8];
|
||||||
|
float flAccuracy = 0;
|
||||||
|
for(int i=0; i < 4; i++)
|
||||||
|
{
|
||||||
|
if (client_names[i] != NULL)
|
||||||
|
{
|
||||||
|
if (strcmp(client_names[i],"")!=0)
|
||||||
|
{
|
||||||
|
// valid player
|
||||||
|
usPosY = MPS_PLAYERLIST_Y + (i * MPS_PLAYER_GAP);
|
||||||
|
|
||||||
|
// Draw Player Name Column
|
||||||
|
memset(szPlayerName,0,30*sizeof(wchar_t));
|
||||||
|
mbstowcs( szPlayerName,client_names[i],30);
|
||||||
|
|
||||||
|
DisplayWrappedString( MPS_LABEL_PLAYER_X, usPosY, MPS_LABEL_PLAYER_WIDTH, 2, MPS_LABEL_TEXT_FONT, MPS_LABEL_TEXT_COLOR, szPlayerName, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Draw Kills Column
|
||||||
|
memset(szPlayerKills,0,3*sizeof(wchar_t));
|
||||||
|
_itow(gMPPlayerStats[i].kills,szPlayerKills,10);
|
||||||
|
DisplayWrappedString( MPS_LABEL_KILLS_X, usPosY, MPS_LABEL_KILLS_WIDTH, 2, MPS_LABEL_TEXT_FONT, MPS_LABEL_TEXT_COLOR, szPlayerKills, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Draw Deaths Column
|
||||||
|
memset(szPlayerDeaths,0,3*sizeof(wchar_t));
|
||||||
|
_itow(gMPPlayerStats[i].deaths,szPlayerDeaths,10);
|
||||||
|
DisplayWrappedString( MPS_LABEL_DEATHS_X, usPosY, MPS_LABEL_DEATHS_WIDTH, 2, MPS_LABEL_TEXT_FONT, MPS_LABEL_TEXT_COLOR, szPlayerDeaths, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Draw Hits Column
|
||||||
|
memset(szPlayerHits,0,3*sizeof(wchar_t));
|
||||||
|
_itow(gMPPlayerStats[i].hits,szPlayerHits,10);
|
||||||
|
DisplayWrappedString( MPS_LABEL_HITS_X, usPosY, MPS_LABEL_HITS_WIDTH, 2, MPS_LABEL_TEXT_FONT, MPS_LABEL_TEXT_COLOR, szPlayerHits, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Draw Misses Column
|
||||||
|
memset(szPlayerMisses,0,3*sizeof(wchar_t));
|
||||||
|
_itow(gMPPlayerStats[i].misses,szPlayerMisses,10);
|
||||||
|
DisplayWrappedString( MPS_LABEL_MISSES_X, usPosY, MPS_LABEL_MISSES_WIDTH, 2, MPS_LABEL_TEXT_FONT, MPS_LABEL_TEXT_COLOR, szPlayerMisses, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Draw Accuracy Column
|
||||||
|
if ( gMPPlayerStats[i].misses + gMPPlayerStats[i].hits > 0 )
|
||||||
|
flAccuracy = ((float)gMPPlayerStats[i].hits / (float)(gMPPlayerStats[i].misses + gMPPlayerStats[i].hits)) * 100.0f;
|
||||||
|
else
|
||||||
|
flAccuracy = 0;
|
||||||
|
memset(szPlayerAccuracy,0,8*sizeof(wchar_t));
|
||||||
|
swprintf(szPlayerAccuracy,L"%i%%%%%%%%",(int)flAccuracy); // this thing goes through like three printfs before being rendered....
|
||||||
|
DisplayWrappedString( MPS_LABEL_ACCURACY_X, usPosY, MPS_LABEL_ACCURACY_WIDTH, 2, MPS_LABEL_TEXT_FONT, MPS_LABEL_TEXT_COLOR, szPlayerAccuracy, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PLAYER_BSIDE==MP_TYPE_COOP)
|
||||||
|
{
|
||||||
|
// CO-OP Mode, show stats for queens army
|
||||||
|
usPosY = MPS_PLAYERLIST_Y + (5 * MPS_PLAYER_GAP); // leave a space between players and AI
|
||||||
|
|
||||||
|
// Draw AI Team Name
|
||||||
|
DisplayWrappedString( MPS_LABEL_PLAYER_X, usPosY, MPS_LABEL_PLAYER_WIDTH, 2, MPS_LABEL_TEXT_FONT, MPS_LABEL_TEXT_COLOR, gzMPSScreenText[MPS_AITEAM_TEXT], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Draw Kills Column
|
||||||
|
memset(szPlayerKills,0,3*sizeof(wchar_t));
|
||||||
|
_itow(gMPPlayerStats[4].kills,szPlayerKills,10);
|
||||||
|
DisplayWrappedString( MPS_LABEL_KILLS_X, usPosY, MPS_LABEL_KILLS_WIDTH, 2, MPS_LABEL_TEXT_FONT, MPS_LABEL_TEXT_COLOR, szPlayerKills, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Draw Deaths Column
|
||||||
|
memset(szPlayerDeaths,0,3*sizeof(wchar_t));
|
||||||
|
_itow(gMPPlayerStats[4].deaths,szPlayerDeaths,10);
|
||||||
|
DisplayWrappedString( MPS_LABEL_DEATHS_X, usPosY, MPS_LABEL_DEATHS_WIDTH, 2, MPS_LABEL_TEXT_FONT, MPS_LABEL_TEXT_COLOR, szPlayerDeaths, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Draw Hits Column
|
||||||
|
memset(szPlayerHits,0,3*sizeof(wchar_t));
|
||||||
|
_itow(gMPPlayerStats[4].hits,szPlayerHits,10);
|
||||||
|
DisplayWrappedString( MPS_LABEL_HITS_X, usPosY, MPS_LABEL_HITS_WIDTH, 2, MPS_LABEL_TEXT_FONT, MPS_LABEL_TEXT_COLOR, szPlayerHits, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Draw Misses Column
|
||||||
|
memset(szPlayerMisses,0,3*sizeof(wchar_t));
|
||||||
|
_itow(gMPPlayerStats[4].misses,szPlayerMisses,10);
|
||||||
|
DisplayWrappedString( MPS_LABEL_MISSES_X, usPosY, MPS_LABEL_MISSES_WIDTH, 2, MPS_LABEL_TEXT_FONT, MPS_LABEL_TEXT_COLOR, szPlayerMisses, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Draw Accuracy Column
|
||||||
|
if ( gMPPlayerStats[4].misses + gMPPlayerStats[4].hits > 0 )
|
||||||
|
flAccuracy = ((float)gMPPlayerStats[4].hits / (float)(gMPPlayerStats[4].misses + gMPPlayerStats[4].hits)) * 100.0f;
|
||||||
|
else
|
||||||
|
flAccuracy = 0;
|
||||||
|
memset(szPlayerAccuracy,0,8*sizeof(wchar_t));
|
||||||
|
swprintf(szPlayerAccuracy,L"%i%%%%%%%%",(int)flAccuracy);
|
||||||
|
DisplayWrappedString( MPS_LABEL_ACCURACY_X, usPosY, MPS_LABEL_ACCURACY_WIDTH, 2, MPS_LABEL_TEXT_FONT, MPS_LABEL_TEXT_COLOR, szPlayerAccuracy, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Player name text label
|
||||||
|
DisplayWrappedString( MPJ_LABEL_HANDLE_X, MPJ_LABEL_HANDLE_Y, MPJ_LABEL_HANDLE_WIDTH, 2, MPJ_LABEL_TEXT_FONT, MPJ_LABEL_TEXT_COLOR, gzMPJScreenText[ MPJ_HANDLE_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Server IP text label
|
||||||
|
DisplayWrappedString( MPJ_LABEL_IP_X, MPJ_LABEL_IP_Y, MPJ_LABEL_IP_WIDTH, 2, MPJ_LABEL_TEXT_FONT, MPJ_LABEL_TEXT_COLOR, gzMPJScreenText[ MPJ_SERVERIP_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// Server Port text label
|
||||||
|
DisplayWrappedString( MPJ_LABEL_PORT_X, MPJ_LABEL_PORT_Y, MPJ_LABEL_PORT_WIDTH, 2, MPJ_LABEL_TEXT_FONT, MPJ_LABEL_TEXT_COLOR, gzMPJScreenText[ MPJ_SERVERPORT_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
*/
|
||||||
|
return( TRUE );
|
||||||
|
} // end of RenderMPSScreen()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void GetMPSScreenUserInput()
|
||||||
|
{
|
||||||
|
InputAtom Event;
|
||||||
|
// POINT MousePos;
|
||||||
|
|
||||||
|
// GetCursorPos(&MousePos);
|
||||||
|
|
||||||
|
while( DequeueEvent( &Event ) )
|
||||||
|
{
|
||||||
|
// check if this event is swallowed by text input, otherwise process key
|
||||||
|
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
||||||
|
{
|
||||||
|
switch( Event.usParam )
|
||||||
|
{
|
||||||
|
|
||||||
|
case ESC:
|
||||||
|
//Exit out of the screen
|
||||||
|
gubMPSScreenHandler = MPS_CANCEL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ENTER:
|
||||||
|
/*if (ValidateJoinSettings(false))
|
||||||
|
{
|
||||||
|
SaveJoinSettings();
|
||||||
|
gubMPSScreenHandler = MPS_JOIN;
|
||||||
|
}*/
|
||||||
|
gubMPSScreenHandler = MPS_CONTINUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // end of GetMPSScreenUserInput()
|
||||||
|
|
||||||
|
void DoneFadeOutForExitMPSScreen( void )
|
||||||
|
{
|
||||||
|
// As we bypassed the GIO screen, set up some game options for multiplayer here
|
||||||
|
// <TODO> most things i have left as thier defaults here for testing.
|
||||||
|
is_networked = true;
|
||||||
|
|
||||||
|
ReStartingGame();
|
||||||
|
|
||||||
|
if (is_client)
|
||||||
|
{
|
||||||
|
client_disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(is_server)
|
||||||
|
{
|
||||||
|
server_disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
//NetworkAutoStart will handle reconnection in Map Screen
|
||||||
|
// reset client auto_retry for NetworkAutoStart called in MapScreenHandle
|
||||||
|
auto_retry = true;
|
||||||
|
giNumTries = 5;
|
||||||
|
|
||||||
|
if (is_networked)
|
||||||
|
gGameOptions.fTurnTimeLimit = TRUE;
|
||||||
|
else
|
||||||
|
gGameOptions.fTurnTimeLimit = FALSE;
|
||||||
|
|
||||||
|
// Bobby Rays - why would we want anything less than the best
|
||||||
|
gGameOptions.ubBobbyRay = BR_AWESOME;
|
||||||
|
|
||||||
|
|
||||||
|
gubMPSExitScreen = INTRO_SCREEN;
|
||||||
|
|
||||||
|
//set the fact that we should do the intro videos
|
||||||
|
// gbIntroScreenMode = INTRO_BEGINING;
|
||||||
|
#ifdef JA2TESTVERSION
|
||||||
|
if( gfKeyState[ ALT ] )
|
||||||
|
{
|
||||||
|
if( gfKeyState[ CTRL ] )
|
||||||
|
{
|
||||||
|
gMercProfiles[ MIGUEL ].bMercStatus = MERC_IS_DEAD;
|
||||||
|
gMercProfiles[ SKYRIDER ].bMercStatus = MERC_IS_DEAD;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetIntroType( INTRO_ENDING );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
SetIntroType( INTRO_BEGINING );
|
||||||
|
|
||||||
|
ExitMPSScreen(); // cleanup please, if we called a fadeout then we didnt do it above
|
||||||
|
|
||||||
|
SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR );
|
||||||
|
}
|
||||||
|
|
||||||
|
void DoneFadeInForExitMPSScreen( void )
|
||||||
|
{
|
||||||
|
SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR );
|
||||||
|
}
|
||||||
|
|
||||||
|
void BtnMPSCancelCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
|
{
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
|
{
|
||||||
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
|
}
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
|
{
|
||||||
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
|
|
||||||
|
gubMPSScreenHandler = MPS_CANCEL;
|
||||||
|
|
||||||
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void BtnMPSContinueCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
|
{
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
|
{
|
||||||
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
|
}
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
|
{
|
||||||
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
|
|
||||||
|
gubMPSScreenHandler = MPS_CONTINUE;
|
||||||
|
|
||||||
|
|
||||||
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#ifndef _MP_SCORE_SCREEN_H_
|
||||||
|
#define _MP_SCORE_SCREEN_H_
|
||||||
|
|
||||||
|
|
||||||
|
UINT32 MPScoreScreenInit( void );
|
||||||
|
UINT32 MPScoreScreenHandle( void );
|
||||||
|
UINT32 MPScoreScreenShutdown( void );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
+3
-1
@@ -388,6 +388,7 @@ void ExitMainMenu( )
|
|||||||
void InitDependingGameStyleOptions(BOOLEAN isNetworked)
|
void InitDependingGameStyleOptions(BOOLEAN isNetworked)
|
||||||
{
|
{
|
||||||
// Load the ja2_options.ini
|
// Load the ja2_options.ini
|
||||||
|
FreeGameExternalOptions();
|
||||||
LoadGameExternalOptions();
|
LoadGameExternalOptions();
|
||||||
|
|
||||||
ReStartingGame();
|
ReStartingGame();
|
||||||
@@ -449,7 +450,8 @@ void MenuButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
//if something didnt work, dont even know how to make error code...//hayden
|
//if something didnt work, dont even know how to make error code...//hayden
|
||||||
}
|
}
|
||||||
|
|
||||||
SetMainMenuExitScreen( GAME_INIT_OPTIONS_SCREEN );
|
SetMainMenuExitScreen( MP_JOIN_SCREEN ); // OJW - 20081129
|
||||||
|
//SetMainMenuExitScreen( GAME_INIT_OPTIONS_SCREEN );
|
||||||
}
|
}
|
||||||
else if( gbHandledMainMenu == LOAD_GAME )
|
else if( gbHandledMainMenu == LOAD_GAME )
|
||||||
{
|
{
|
||||||
|
|||||||
+80
-6
@@ -23,6 +23,7 @@
|
|||||||
#include "cursor control.h"
|
#include "cursor control.h"
|
||||||
#include "laptop.h"
|
#include "laptop.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
|
#include "Text Input.h"
|
||||||
#include "overhead map.h"
|
#include "overhead map.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -49,6 +50,8 @@ BOOLEAN gfInMsgBox = FALSE;
|
|||||||
extern BOOLEAN fInMapMode;
|
extern BOOLEAN fInMapMode;
|
||||||
extern BOOLEAN gfOverheadMapDirty;
|
extern BOOLEAN gfOverheadMapDirty;
|
||||||
|
|
||||||
|
//OJW - 20090208
|
||||||
|
CHAR16 gszMsgBoxInputString[255];
|
||||||
|
|
||||||
void OKMsgBoxCallback(GUI_BUTTON *btn, INT32 reason );
|
void OKMsgBoxCallback(GUI_BUTTON *btn, INT32 reason );
|
||||||
void YESMsgBoxCallback(GUI_BUTTON *btn, INT32 reason );
|
void YESMsgBoxCallback(GUI_BUTTON *btn, INT32 reason );
|
||||||
@@ -350,6 +353,51 @@ INT32 DoMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UIN
|
|||||||
ForceButtonUnDirty( gMsgBox.uiButton[1] );
|
ForceButtonUnDirty( gMsgBox.uiButton[1] );
|
||||||
ForceButtonUnDirty( gMsgBox.uiButton[0] );
|
ForceButtonUnDirty( gMsgBox.uiButton[0] );
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (usFlags & MSG_BOX_FLAG_INPUTBOX)
|
||||||
|
{
|
||||||
|
// Initialise Text Boxes
|
||||||
|
InitTextInputMode(); // API call to initialise text input mode for this screen
|
||||||
|
// does not mean we are inputting text right away
|
||||||
|
|
||||||
|
// Player Name field
|
||||||
|
SetTextInputCursor( CUROSR_IBEAM_WHITE );
|
||||||
|
SetTextInputFont( (UINT16) FONT12ARIALFIXEDWIDTH ); //FONT12ARIAL //FONT12ARIALFIXEDWIDTH
|
||||||
|
Set16BPPTextFieldColor( Get16BPPColor(FROMRGB( 0, 0, 0) ) );
|
||||||
|
SetBevelColors( Get16BPPColor(FROMRGB(136, 138, 135)), Get16BPPColor(FROMRGB(24, 61, 81)) );
|
||||||
|
SetTextInputRegularColors( FONT_WHITE, 2 );
|
||||||
|
SetTextInputHilitedColors( 2, FONT_WHITE, FONT_WHITE );
|
||||||
|
SetCursorColor( Get16BPPColor(FROMRGB(255, 255, 255) ) );
|
||||||
|
|
||||||
|
int ibx = gMsgBox.sX + 10;
|
||||||
|
int iby = gMsgBox.sY +(usTextBoxHeight - 20 - 10);
|
||||||
|
//Add Player Name textbox
|
||||||
|
AddTextInputField( ibx,
|
||||||
|
iby,
|
||||||
|
usTextBoxWidth - 20,
|
||||||
|
20,
|
||||||
|
MSYS_PRIORITY_HIGH+2,
|
||||||
|
gszMsgBoxInputString,
|
||||||
|
255,
|
||||||
|
INPUTTYPE_ASCII );//23
|
||||||
|
|
||||||
|
// exit text input mode in this screen and clean up text boxes
|
||||||
|
SetActiveField( 0 );
|
||||||
|
|
||||||
|
// initialise the chat toggle boxes
|
||||||
|
/*int usPosY = gMsgBox.sY + (usTextBoxHeight - 45);
|
||||||
|
int usPosX = gMsgBox.sX + (usTextBoxWidth / 3);
|
||||||
|
|
||||||
|
guiChatToggles[ 0 ] = CreateCheckBoxButton( usPosX, usPosY,
|
||||||
|
"INTERFACE\\OptionsCheckBoxes_12x12.sti", MSYS_PRIORITY_HIGH+10,
|
||||||
|
BtnChatTogglesCallback );
|
||||||
|
MSYS_SetBtnUserData( guiOptionsToggles[ 0 ], 0, 0 );
|
||||||
|
|
||||||
|
guiChatToggles[ 1 ] = CreateCheckBoxButton( usPosX, usPosY,
|
||||||
|
"INTERFACE\\OptionsCheckBoxes_12x12.sti", MSYS_PRIORITY_HIGH+10,
|
||||||
|
BtnChatTogglesCallback );
|
||||||
|
MSYS_SetBtnUserData( guiOptionsToggles[ 1 ], 0, 1 );*/
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -810,6 +858,12 @@ UINT32 ExitMsgBox( INT8 ubExitCode )
|
|||||||
RemoveButton( gMsgBox.uiButton[2] );
|
RemoveButton( gMsgBox.uiButton[2] );
|
||||||
RemoveButton( gMsgBox.uiButton[3] );
|
RemoveButton( gMsgBox.uiButton[3] );
|
||||||
}
|
}
|
||||||
|
// OJW - 20090208 - Add text input box type
|
||||||
|
else if (gMsgBox.usFlags & MSG_BOX_FLAG_INPUTBOX)
|
||||||
|
{
|
||||||
|
// exit text input mode in this screen and clean up text boxes
|
||||||
|
KillAllTextInputModes();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( gMsgBox.usFlags & MSG_BOX_FLAG_OK )
|
if ( gMsgBox.usFlags & MSG_BOX_FLAG_OK )
|
||||||
@@ -1102,21 +1156,33 @@ UINT32 MessageBoxScreenHandle( )
|
|||||||
// Render buttons
|
// Render buttons
|
||||||
RenderButtons( );
|
RenderButtons( );
|
||||||
|
|
||||||
|
if (gMsgBox.usFlags & MSG_BOX_FLAG_INPUTBOX)
|
||||||
|
{
|
||||||
|
// render text boxes
|
||||||
|
RenderAllTextFields(); // textbox system call
|
||||||
|
}
|
||||||
EndFrameBufferRender( );
|
EndFrameBufferRender( );
|
||||||
|
|
||||||
// carter, need key shortcuts for clearing up message boxes
|
// carter, need key shortcuts for clearing up message boxes
|
||||||
// Check for esc
|
// Check for esc
|
||||||
while (DequeueEvent(&InputEvent) == TRUE)
|
while (DequeueEvent(&InputEvent) == TRUE)
|
||||||
{
|
{
|
||||||
if( InputEvent.usEvent == KEY_UP )
|
if( !HandleTextInput( &InputEvent ) && InputEvent.usEvent == KEY_DOWN )
|
||||||
{
|
{
|
||||||
if( ( InputEvent.usParam == ESC ) || ( InputEvent.usParam == 'n') )
|
if( ( InputEvent.usParam == ESC ) || ( InputEvent.usParam == 'n') )
|
||||||
{
|
{
|
||||||
if ( gMsgBox.usFlags & MSG_BOX_FLAG_YESNO )
|
if ( gMsgBox.usFlags & MSG_BOX_FLAG_YESNO )
|
||||||
{
|
{
|
||||||
// Exit messagebox
|
// Exit messagebox
|
||||||
gMsgBox.bHandled = MSG_BOX_RETURN_NO;
|
gMsgBox.bHandled = MSG_BOX_RETURN_NO;
|
||||||
}
|
}
|
||||||
|
//OJW - 20090208 - Input Box
|
||||||
|
else if( gMsgBox.usFlags & MSG_BOX_FLAG_INPUTBOX )
|
||||||
|
{
|
||||||
|
// Exit messagebox
|
||||||
|
gMsgBox.bHandled = MSG_BOX_RETURN_NO;
|
||||||
|
memset(gszMsgBoxInputString,0,sizeof(CHAR16)*255);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( InputEvent.usParam == ENTER )
|
if( InputEvent.usParam == ENTER )
|
||||||
@@ -1136,6 +1202,14 @@ UINT32 MessageBoxScreenHandle( )
|
|||||||
// Exit messagebox
|
// Exit messagebox
|
||||||
gMsgBox.bHandled = MSG_BOX_RETURN_OK;
|
gMsgBox.bHandled = MSG_BOX_RETURN_OK;
|
||||||
}
|
}
|
||||||
|
//OJW - 20090208 - Input Box
|
||||||
|
else if( gMsgBox.usFlags & MSG_BOX_FLAG_INPUTBOX )
|
||||||
|
{
|
||||||
|
// retrieve the string from the text box
|
||||||
|
Get16BitStringFromField( 0, gszMsgBoxInputString ); // these indexes are based on the order created
|
||||||
|
// Exit messagebox
|
||||||
|
gMsgBox.bHandled = MSG_BOX_RETURN_OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if( InputEvent.usParam == 'o' )
|
if( InputEvent.usParam == 'o' )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
#define MSG_BOX_FLAG_OKSKIP 0x0200 // Displays ok or skip (meanwhile) buttons
|
#define MSG_BOX_FLAG_OKSKIP 0x0200 // Displays ok or skip (meanwhile) buttons
|
||||||
#define MSG_BOX_FLAG_GENERICCONTRACT 0x0400 // displays contract buttoin + 2 user-defined text buttons
|
#define MSG_BOX_FLAG_GENERICCONTRACT 0x0400 // displays contract buttoin + 2 user-defined text buttons
|
||||||
#define MSG_BOX_FLAG_GENERIC 0x0800 // 2 user-defined text buttons
|
#define MSG_BOX_FLAG_GENERIC 0x0800 // 2 user-defined text buttons
|
||||||
|
// OJW - Adding text chatbox
|
||||||
|
#define MSG_BOX_FLAG_INPUTBOX 0x1000 // has a text input field
|
||||||
|
|
||||||
// message box return codes
|
// message box return codes
|
||||||
#define MSG_BOX_RETURN_OK 1 // ENTER or on OK button
|
#define MSG_BOX_RETURN_OK 1 // ENTER or on OK button
|
||||||
@@ -83,6 +85,8 @@ extern BOOLEAN fRestoreBackgroundForMessageBox;
|
|||||||
//this variable can be unset if ur in a non gamescreen and DONT want the msg box to use the save buffer
|
//this variable can be unset if ur in a non gamescreen and DONT want the msg box to use the save buffer
|
||||||
extern BOOLEAN gfDontOverRideSaveBuffer;
|
extern BOOLEAN gfDontOverRideSaveBuffer;
|
||||||
|
|
||||||
|
//OJW - 20090208
|
||||||
|
extern CHAR16 gszMsgBoxInputString[255];
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
// ubStyle: Determines the look of graphics including buttons
|
// ubStyle: Determines the look of graphics including buttons
|
||||||
// zString: 16-bit string
|
// zString: 16-bit string
|
||||||
|
|||||||
+1000
-192
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,7 @@ extern bool is_connecting;
|
|||||||
extern bool is_client;
|
extern bool is_client;
|
||||||
extern bool is_server;
|
extern bool is_server;
|
||||||
extern bool is_networked;
|
extern bool is_networked;
|
||||||
|
extern bool is_host; // OJW - added 20081129
|
||||||
|
|
||||||
extern int PLAYER_TEAM_TIMER_SEC_PER_TICKS;
|
extern int PLAYER_TEAM_TIMER_SEC_PER_TICKS;
|
||||||
|
|
||||||
@@ -23,6 +24,7 @@ extern int CIV_ENABLED;
|
|||||||
|
|
||||||
extern int MAX_CLIENTS;
|
extern int MAX_CLIENTS;
|
||||||
extern int SAME_MERC;
|
extern int SAME_MERC;
|
||||||
|
extern int PLAYER_BSIDE;
|
||||||
|
|
||||||
extern bool allowlaptop;
|
extern bool allowlaptop;
|
||||||
|
|
||||||
@@ -30,6 +32,13 @@ extern UINT8 netbTeam;
|
|||||||
extern UINT8 ubID_prefix;
|
extern UINT8 ubID_prefix;
|
||||||
extern FLOAT DAMAGE_MULTIPLIER;
|
extern FLOAT DAMAGE_MULTIPLIER;
|
||||||
|
|
||||||
|
//OJW - 20081218
|
||||||
|
extern int RANDOM_SPAWN;
|
||||||
|
extern int RANDOM_MERCS;
|
||||||
|
|
||||||
|
//OJW - 20090317
|
||||||
|
extern bool is_game_started;
|
||||||
|
|
||||||
extern UINT16 crate_usMapPos;
|
extern UINT16 crate_usMapPos;
|
||||||
|
|
||||||
//extern int INTERRUPTS;
|
//extern int INTERRUPTS;
|
||||||
@@ -60,6 +69,8 @@ void start_server (void);
|
|||||||
void client_packet ( void );
|
void client_packet ( void );
|
||||||
void server_packet ( void );
|
void server_packet ( void );
|
||||||
|
|
||||||
|
void NetworkAutoStart(); // OJW - 20081130 - Automate connection functions
|
||||||
|
|
||||||
void server_disconnect (void);
|
void server_disconnect (void);
|
||||||
void client_disconnect (void);
|
void client_disconnect (void);
|
||||||
|
|
||||||
@@ -85,11 +96,53 @@ void send_stop (EV_S_STOP_MERC *SStopMerc);
|
|||||||
|
|
||||||
void send_interrupt(SOLDIERTYPE *pSoldier);
|
void send_interrupt(SOLDIERTYPE *pSoldier);
|
||||||
|
|
||||||
|
void OpenChatMsgBox(void);
|
||||||
|
|
||||||
BOOLEAN CheckConditionsForBattle( GROUP *pGroup ); // this comes from strategic movement.cpp
|
BOOLEAN CheckConditionsForBattle( GROUP *pGroup ); // this comes from strategic movement.cpp
|
||||||
|
|
||||||
extern char client_names[4][30];
|
extern char client_names[4][30];
|
||||||
|
// OJW - 20081204
|
||||||
|
// I need to keep track of all the clients readyness, spawn edge and team
|
||||||
|
// <TODO> want to change this all to use client_info, but dont want to make sweeping
|
||||||
|
// changes to the codebase without talking to the other devs
|
||||||
|
extern int client_ready[4];
|
||||||
|
extern int client_teams[4];
|
||||||
|
extern int client_edges[4];
|
||||||
|
|
||||||
|
extern char SERVER_NAME[30];
|
||||||
|
|
||||||
|
//OJW - 20081224
|
||||||
|
extern bool auto_retry;
|
||||||
|
extern int giNumTries;
|
||||||
|
|
||||||
void send_settings();
|
void send_settings();
|
||||||
|
|
||||||
|
void send_mapchange(); // added 20081201 by OJW
|
||||||
|
void send_teamchange( int newteam ); // send team a change
|
||||||
|
void send_edgechange( int newedge ); // send an edge change
|
||||||
|
bool can_teamchange(); // UI Checks
|
||||||
|
bool can_edgechange(); // UI Checks
|
||||||
|
|
||||||
|
|
||||||
void StartInterrupt( void );
|
void StartInterrupt( void );
|
||||||
|
|
||||||
|
// MP GameTypes
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MP_TYPE_DEATHMATCH,
|
||||||
|
MP_TYPE_TEAMDEATMATCH,
|
||||||
|
MP_TYPE_COOP,
|
||||||
|
NUM_MP_GAMETYPE
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int kills;
|
||||||
|
int deaths;
|
||||||
|
int hits;
|
||||||
|
int misses;
|
||||||
|
} player_stats;
|
||||||
|
|
||||||
|
extern player_stats gMPPlayerStats[5];
|
||||||
|
|
||||||
|
extern void game_over( void );
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ typedef struct
|
|||||||
{
|
{
|
||||||
UINT16 soldier_id;
|
UINT16 soldier_id;
|
||||||
UINT16 attacker_id;
|
UINT16 attacker_id;
|
||||||
|
UINT8 attacker_team;
|
||||||
|
UINT8 soldier_team;
|
||||||
}death_struct;
|
}death_struct;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
//this one just for structs, variables and functions used between the client and server scripts...
|
//this one just for structs, variables and functions used between the client and server scripts...
|
||||||
|
|
||||||
extern char CLIENT_NAME[30];
|
extern char CLIENT_NAME[30];
|
||||||
|
extern char SERVER_NAME[30];
|
||||||
extern bool Sawarded;
|
extern bool Sawarded;
|
||||||
|
|
||||||
|
|
||||||
@@ -41,6 +42,10 @@ typedef struct
|
|||||||
UINT8 client_num;
|
UINT8 client_num;
|
||||||
char client_name[30];
|
char client_name[30];
|
||||||
char client_names[4][30];
|
char client_names[4][30];
|
||||||
|
// OJW - added 20081204
|
||||||
|
int client_edges[4];
|
||||||
|
int client_teams[4];
|
||||||
|
char server_name[30];
|
||||||
//int cl_ops[4];
|
//int cl_ops[4];
|
||||||
int team;
|
int team;
|
||||||
int TESTING;
|
int TESTING;
|
||||||
@@ -52,8 +57,34 @@ typedef struct
|
|||||||
int WEAPON_READIED_BONUS;
|
int WEAPON_READIED_BONUS;
|
||||||
int ALLOW_CUSTOM_NIV;
|
int ALLOW_CUSTOM_NIV;
|
||||||
int DISABLE_SPEC_MODE;
|
int DISABLE_SPEC_MODE;
|
||||||
|
// OJW - added 20081220
|
||||||
|
int RANDOM_SPAWN;
|
||||||
|
int RANDOM_MERCS;
|
||||||
|
int random_mercs[7];
|
||||||
} settings_struct;
|
} settings_struct;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// added 080101 by OJW
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
INT16 gsMercArriveSectorX;
|
||||||
|
INT16 gsMercArriveSectorY;
|
||||||
|
float TIME;
|
||||||
|
} mapchange_struct;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
UINT8 client_num;
|
||||||
|
UINT8 newedge;
|
||||||
|
} edgechange_struct;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
UINT8 client_num;
|
||||||
|
UINT8 newteam;
|
||||||
|
} teamchange_struct;
|
||||||
|
|
||||||
//typedef struct
|
//typedef struct
|
||||||
//{
|
//{
|
||||||
// int clnum;
|
// int clnum;
|
||||||
|
|||||||
+361
-95
@@ -13,6 +13,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <list>
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "gamesettings.h"
|
#include "gamesettings.h"
|
||||||
@@ -26,11 +28,12 @@ int gsREPORT_NAME;
|
|||||||
#include "game init.h"
|
#include "game init.h"
|
||||||
|
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
|
#include "network.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "network.h"
|
|
||||||
#include "overhead.h"
|
#include "overhead.h"
|
||||||
#include "fresh_header.h"
|
#include "fresh_header.h"
|
||||||
|
#include "Debug Control.h"
|
||||||
UINT16 nc; //number of open connection
|
UINT16 nc; //number of open connection
|
||||||
UINT16 ncr; //number of ready confirmed connections
|
UINT16 ncr; //number of ready confirmed connections
|
||||||
//something keep record of ready connections ..
|
//something keep record of ready connections ..
|
||||||
@@ -74,6 +77,68 @@ typedef struct
|
|||||||
|
|
||||||
client_data client_d[4];
|
client_data client_d[4];
|
||||||
|
|
||||||
|
// OJW - 20081223
|
||||||
|
// Random Merc teams
|
||||||
|
// First attempt at "balanced" teams
|
||||||
|
int random_merc_teams[4][7] =
|
||||||
|
{
|
||||||
|
{ 16, 10, 19, 25, 4 , 11, 39 } , // Gus , Shadow, Spider , Raven , Vicki , Red , Meltdown
|
||||||
|
{ 29, 36, 28, 2 , 22, 8 , 32 } , // Magic , Scope, Danny , Lynx , Hitman , Steroid , Malice
|
||||||
|
{ 12, 5 , 20, 23, 48, 34, 17 } , // Reaper , Trevor, Cliff , Buzz , Cougar , Nails , Buns
|
||||||
|
{ 31, 7 , 33, 35, 27, 37, 1 } // Scully , Ivan , Dr Q , Thor , Len , Wolf , Blood
|
||||||
|
};
|
||||||
|
|
||||||
|
int client_mercteam[4] = { 0 , 1 , 2 , 3 }; // random index of random_merc_teams per player
|
||||||
|
|
||||||
|
bool inline can_joingame();
|
||||||
|
|
||||||
|
int f_rec_num(int mode, SystemAddress sender)//from client data
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
client_data cl_record;
|
||||||
|
for ( x=0; x<4;x++)
|
||||||
|
{
|
||||||
|
cl_record = client_d[x];
|
||||||
|
|
||||||
|
if(mode==0)//find empty slot for new record
|
||||||
|
{
|
||||||
|
if(cl_record.address.binaryAddress==0)
|
||||||
|
return(x);
|
||||||
|
}
|
||||||
|
if(mode==1)//wipe clean all
|
||||||
|
{
|
||||||
|
client_d[x].address.binaryAddress=0;
|
||||||
|
client_d[x].address.port=0;
|
||||||
|
client_d[x].cl_number=0;
|
||||||
|
}
|
||||||
|
if(mode==2)//clear one record
|
||||||
|
{
|
||||||
|
if(cl_record.address.binaryAddress==sender.binaryAddress && cl_record.address.port==sender.port)
|
||||||
|
{
|
||||||
|
client_d[x].address.port=0;
|
||||||
|
client_d[x].cl_number=0;
|
||||||
|
client_d[x].address.binaryAddress=0;
|
||||||
|
return(254);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// OJW - 090212 - look up client number
|
||||||
|
if (mode == 3)
|
||||||
|
{
|
||||||
|
if(cl_record.address.binaryAddress==sender.binaryAddress && cl_record.address.port==sender.port)
|
||||||
|
{
|
||||||
|
return (x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(mode == 0)//'no free slots'
|
||||||
|
{
|
||||||
|
ScreenMsg( FONT_RED, MSG_CHAT, L"Client Record Error, Restart Server, and Report Error." );
|
||||||
|
return (255);
|
||||||
|
}
|
||||||
|
return(254);
|
||||||
|
}
|
||||||
|
|
||||||
// use UNASSIGNED_SYSTEM_ADDRESS instead of rpcParameters->sender to send it back to yourself (the sender)
|
// use UNASSIGNED_SYSTEM_ADDRESS instead of rpcParameters->sender to send it back to yourself (the sender)
|
||||||
// there is very little in here dependant on the game engine and originally started out as an independant dedicated server .exe, and could if go ther again ... hayden.
|
// there is very little in here dependant on the game engine and originally started out as an independant dedicated server .exe, and could if go ther again ... hayden.
|
||||||
//********* RPC SECTION ************
|
//********* RPC SECTION ************
|
||||||
@@ -100,6 +165,15 @@ void sendFIRE(RPCParameters *rpcParameters)
|
|||||||
|
|
||||||
void sendHIT(RPCParameters *rpcParameters)
|
void sendHIT(RPCParameters *rpcParameters)
|
||||||
{
|
{
|
||||||
|
EV_S_WEAPONHIT* hit = (EV_S_WEAPONHIT*)rpcParameters->input;
|
||||||
|
|
||||||
|
int team = MercPtrs[ hit->ubAttackerID ]->bTeam;
|
||||||
|
if (team == 1) team = 5;
|
||||||
|
else if (team >= 6) team -= 6;
|
||||||
|
else if (team == 0) team = CLIENT_NUM-1; // this case should not be possible, including as a precaution
|
||||||
|
|
||||||
|
gMPPlayerStats[team].hits++;
|
||||||
|
|
||||||
server->RPC("recieveHIT",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
server->RPC("recieveHIT",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,18 +231,69 @@ void sendSTATE(RPCParameters *rpcParameters)
|
|||||||
}
|
}
|
||||||
void sendDEATH(RPCParameters *rpcParameters)
|
void sendDEATH(RPCParameters *rpcParameters)
|
||||||
{
|
{
|
||||||
|
// the master copy of the scoreboard is kept on the server
|
||||||
|
death_struct* nDeath = (death_struct*)rpcParameters->input;
|
||||||
|
|
||||||
|
// Save Stats on the server side
|
||||||
|
gMPPlayerStats[nDeath->soldier_team-1].deaths++;
|
||||||
|
gMPPlayerStats[nDeath->attacker_team-1].kills++;
|
||||||
|
|
||||||
|
|
||||||
|
// get the client number of the client sending the message
|
||||||
|
int iCLnum = f_rec_num(3,rpcParameters->sender)+1;
|
||||||
|
|
||||||
server->RPC("recieveDEATH",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
server->RPC("recieveDEATH",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||||
|
|
||||||
|
#if _DEBUG
|
||||||
|
wchar_t ateam[5];
|
||||||
|
wchar_t steam[5];
|
||||||
|
wchar_t clnum[5];
|
||||||
|
_itow(nDeath->attacker_team,ateam,10);
|
||||||
|
_itow(nDeath->soldier_team,steam,10);
|
||||||
|
_itow(iCLnum,clnum,10);
|
||||||
|
ScreenMsg( FONT_LTBLUE, MSG_CHAT, L"DEBUG: Soldier Killed : Attacking team %s , Soldier Team %s, Sender %s",ateam,steam,clnum);
|
||||||
|
char logmsg[100];
|
||||||
|
sprintf(logmsg, "MP DEBUG: Soldier Killed #%i : Attacking team %i , Soldier Team %i, Sender %i\n",nDeath->soldier_id,nDeath->attacker_team,nDeath->soldier_team,iCLnum);
|
||||||
|
MPDebugMsg( logmsg );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
void sendhitSTRUCT(RPCParameters *rpcParameters)
|
void sendhitSTRUCT(RPCParameters *rpcParameters)
|
||||||
{
|
{
|
||||||
|
EV_S_STRUCTUREHIT* miss = (EV_S_STRUCTUREHIT*)rpcParameters->input;
|
||||||
|
|
||||||
|
int team = MercPtrs[ miss->ubAttackerID ]->bTeam;
|
||||||
|
if (team == 1) team = 5;
|
||||||
|
else if (team >= 6) team -= 6;
|
||||||
|
else if (team == 0) team = CLIENT_NUM-1; // this case should not be possible, including as a precaution
|
||||||
|
|
||||||
|
gMPPlayerStats[team].misses++;
|
||||||
|
|
||||||
server->RPC("recievehitSTRUCT",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
server->RPC("recievehitSTRUCT",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||||
}
|
}
|
||||||
void sendhitWINDOW(RPCParameters *rpcParameters)
|
void sendhitWINDOW(RPCParameters *rpcParameters)
|
||||||
{
|
{
|
||||||
|
EV_S_WINDOWHIT* miss = (EV_S_WINDOWHIT*)rpcParameters->input;
|
||||||
|
|
||||||
|
int team = MercPtrs[ miss->ubAttackerID ]->bTeam;
|
||||||
|
if (team == 1) team = 5;
|
||||||
|
else if (team >= 6) team -= 6;
|
||||||
|
else if (team == 0) team = CLIENT_NUM-1; // this case should not be possible, including as a precaution
|
||||||
|
|
||||||
|
gMPPlayerStats[team].misses++;
|
||||||
|
|
||||||
server->RPC("recievehitWINDOW",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
server->RPC("recievehitWINDOW",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||||
}
|
}
|
||||||
void sendMISS(RPCParameters *rpcParameters)
|
void sendMISS(RPCParameters *rpcParameters)
|
||||||
{
|
{
|
||||||
|
EV_S_MISS* miss = (EV_S_MISS*)rpcParameters->input;
|
||||||
|
|
||||||
|
int team = MercPtrs[ miss->ubAttackerID ]->bTeam;
|
||||||
|
if (team == 1) team = 5;
|
||||||
|
else if (team >= 6) team -= 6;
|
||||||
|
else if (team == 0) team = CLIENT_NUM-1; // this case should not be possible, including as a precaution
|
||||||
|
|
||||||
|
gMPPlayerStats[team].misses++;
|
||||||
|
|
||||||
server->RPC("recieveMISS",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
server->RPC("recieveMISS",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||||
}
|
}
|
||||||
void updatenetworksoldier(RPCParameters *rpcParameters)
|
void updatenetworksoldier(RPCParameters *rpcParameters)
|
||||||
@@ -205,6 +330,18 @@ void sendHEAL(RPCParameters *rpcParameters)
|
|||||||
{
|
{
|
||||||
server->RPC("recieve_heal",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
server->RPC("recieve_heal",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OJW - edge and team changes
|
||||||
|
void sendEDGECHANGE(RPCParameters *rpcParameters)
|
||||||
|
{
|
||||||
|
server->RPC("recieveEDGECHANGE",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sendTEAMCHANGE(RPCParameters *rpcParameters)
|
||||||
|
{
|
||||||
|
server->RPC("recieveTEAMCHANGE",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
//void rINT(RPCParameters *rpcParameters)//who is first
|
//void rINT(RPCParameters *rpcParameters)//who is first
|
||||||
//{
|
//{
|
||||||
@@ -276,119 +413,218 @@ void sendREAL(RPCParameters *rpcParameters)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
int f_rec_num(int mode, SystemAddress sender)//from client data
|
|
||||||
|
// 20081222 - OJW
|
||||||
|
void sendGAMEOVER(RPCParameters *rpcParameters)
|
||||||
{
|
{
|
||||||
|
// ignore the RPCParams and send the server side scoreboard
|
||||||
|
server->RPC("recieveGAMEOVER",(const char*)gMPPlayerStats, sizeof(gMPPlayerStats)*8, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sendCHATMSG(RPCParameters *rpcParameters)
|
||||||
|
{
|
||||||
|
// ignore the RPCParams and send the server side scoreboard
|
||||||
|
server->RPC("recieveCHATMSG",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// OJW - 20081223
|
||||||
|
// fix client disconnecting mid game, allowing the game to proceed
|
||||||
|
void HandleDisconnect(SystemAddress sender)
|
||||||
|
{
|
||||||
|
// find the CLIENT_NUM of the player
|
||||||
int x;
|
int x;
|
||||||
client_data cl_record;
|
client_data cl_record;
|
||||||
|
|
||||||
for ( x=0; x<4;x++)
|
for ( x=0; x<4;x++)
|
||||||
{
|
{
|
||||||
cl_record = client_d[x];
|
cl_record = client_d[x];
|
||||||
|
if(cl_record.address.binaryAddress==sender.binaryAddress && cl_record.address.port==sender.port)
|
||||||
if(mode==0)//find empty slot for new record
|
|
||||||
{
|
{
|
||||||
if(cl_record.address.binaryAddress==0)
|
// notify all the clients of the disconnect
|
||||||
return(x);
|
server->RPC("recieveDISCONNECT",(const char*)&cl_record.cl_number , sizeof(int)*8, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||||
|
f_rec_num(2,sender); // remove from server's client list
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if(mode==1)//wipe clean all
|
|
||||||
{
|
|
||||||
client_d[x].address.binaryAddress=0;
|
|
||||||
client_d[x].address.port=0;
|
|
||||||
client_d[x].cl_number=0;
|
|
||||||
}
|
|
||||||
if(mode==2)//clear one record
|
|
||||||
{
|
|
||||||
if(cl_record.address.binaryAddress==sender.binaryAddress && cl_record.address.port==sender.port)
|
|
||||||
{
|
|
||||||
client_d[x].address.port=0;
|
|
||||||
client_d[x].cl_number=0;
|
|
||||||
client_d[x].address.binaryAddress=0;
|
|
||||||
return(254);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if(mode == 0)//'no free slots'
|
|
||||||
{
|
|
||||||
ScreenMsg( FONT_RED, MSG_CHAT, L"Client Record Error, Restart Server, and Report Error." );
|
|
||||||
return (255);
|
|
||||||
}
|
|
||||||
return(254);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OJW - 20081218
|
||||||
|
// shuffle an integer array
|
||||||
|
//<TODO> remove shuffledList and put directly into arr[]
|
||||||
|
void rSortArray(int* arr, int len)
|
||||||
|
{
|
||||||
|
std::list<int> tmpList;
|
||||||
|
std::list<int> shuffledList;
|
||||||
|
std::list<int>::iterator Iter;
|
||||||
|
int i=0;
|
||||||
|
|
||||||
|
// add all our array items
|
||||||
|
for(i=0; i<len; i++)
|
||||||
|
tmpList.push_front(arr[i]);
|
||||||
|
|
||||||
|
// shuffle the items
|
||||||
|
while(tmpList.size())
|
||||||
|
{
|
||||||
|
int iRandPos = rand() % tmpList.size();
|
||||||
|
for(Iter = tmpList.begin(); iRandPos>0; iRandPos--, Iter++);
|
||||||
|
//Iter += iRandPos;
|
||||||
|
shuffledList.push_front(*Iter);
|
||||||
|
tmpList.erase(Iter);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add all our elements
|
||||||
|
for(i=0; i<len; i++)
|
||||||
|
{
|
||||||
|
arr[i] = shuffledList.back();
|
||||||
|
shuffledList.pop_back();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//************************* //UNASSIGNED_SYSTEM_ADDRESS
|
//************************* //UNASSIGNED_SYSTEM_ADDRESS
|
||||||
//START INTERNAL SERVER
|
//START INTERNAL SERVER
|
||||||
//*************************
|
//*************************
|
||||||
//void send_settings (void)//send server settings to client
|
//void send_settings (void)//send server settings to client
|
||||||
void requestSETTINGS(RPCParameters *rpcParameters )
|
void requestSETTINGS(RPCParameters *rpcParameters )
|
||||||
{
|
{
|
||||||
|
// dont generate or send settings to a new user if they are about to be disconnected
|
||||||
|
// because no more players can join the the game
|
||||||
|
if (can_joingame())
|
||||||
|
{
|
||||||
|
client_info* clinf = (client_info*)rpcParameters->input;
|
||||||
|
|
||||||
client_info* clinf = (client_info*)rpcParameters->input;
|
//server assigned client numbers - hayden.
|
||||||
|
SystemAddress sender = rpcParameters->sender;//get senders address
|
||||||
//server assigned client numbers - hayden.
|
int bslot = f_rec_num(0,blank);//get empty record slot
|
||||||
SystemAddress sender = rpcParameters->sender;//get senders address
|
client_d[bslot].address=sender; //record clients address
|
||||||
int bslot = f_rec_num(0,blank);//get empty record slot
|
int new_cl_num = bslot+1;//client number to assign
|
||||||
client_d[bslot].address=sender; //record clients address
|
client_d[bslot].cl_number=new_cl_num; //record clients number
|
||||||
int new_cl_num = bslot+1;//client number to assign
|
|
||||||
client_d[bslot].cl_number=new_cl_num; //record clients number
|
|
||||||
|
|
||||||
|
|
||||||
settings_struct lan;
|
settings_struct lan;
|
||||||
|
|
||||||
//lan.client_num = clinf->client_num;//old client assigned number
|
//lan.client_num = clinf->client_num;//old client assigned number
|
||||||
lan.client_num = new_cl_num; //new server assigned number
|
lan.client_num = new_cl_num; //new server assigned number
|
||||||
strcpy(lan.client_name , clinf->client_name);
|
strcpy(lan.client_name , clinf->client_name);
|
||||||
|
|
||||||
lan.max_clients = gsMAX_CLIENTS;
|
// OJW - 20081204
|
||||||
memcpy(lan.kitbag , kbag,sizeof (char)*100);
|
strcpy(lan.server_name , SERVER_NAME);
|
||||||
lan.damage_multiplier = gsDAMAGE_MULTIPLIER;
|
memcpy(lan.client_edges,client_edges,sizeof(int)*4);
|
||||||
|
memcpy(lan.client_teams,client_teams,sizeof(int)*4);
|
||||||
|
|
||||||
|
lan.RANDOM_SPAWN = RANDOM_SPAWN;
|
||||||
|
lan.RANDOM_MERCS = RANDOM_MERCS;
|
||||||
|
|
||||||
|
lan.max_clients = gsMAX_CLIENTS;
|
||||||
|
memcpy(lan.kitbag , kbag,sizeof (char)*100);
|
||||||
|
lan.damage_multiplier = gsDAMAGE_MULTIPLIER;
|
||||||
|
|
||||||
|
lan.same_merc = gsSAME_MERC;
|
||||||
|
lan.gsMercArriveSectorX=gsMercArriveSectorX;
|
||||||
|
lan.gsMercArriveSectorY=gsMercArriveSectorY;
|
||||||
|
|
||||||
|
lan.ENEMY_ENABLED=ENEMY_ENABLED;
|
||||||
|
lan.CREATURE_ENABLED=CREATURE_ENABLED;
|
||||||
|
lan.MILITIA_ENABLED=MILITIA_ENABLED;
|
||||||
|
lan.CIV_ENABLED=CIV_ENABLED;
|
||||||
|
|
||||||
|
lan.gsPLAYER_BSIDE=gsPLAYER_BSIDE;
|
||||||
|
|
||||||
|
lan.emorale=gsMORALE;
|
||||||
|
lan.gsREPORT_NAME=gsREPORT_NAME;
|
||||||
|
//something new
|
||||||
|
lan.secs_per_tick=gssecs_per_tick;
|
||||||
|
lan.soubBobbyRay=gGameOptions.ubBobbyRay;
|
||||||
|
lan.sofGunNut=gGameOptions.fGunNut;
|
||||||
|
lan.soubGameStyle=gGameOptions.ubGameStyle;
|
||||||
|
lan.soubDifficultyLevel=gGameOptions.ubDifficultyLevel;
|
||||||
|
lan.sofTurnTimeLimit=gGameOptions.fTurnTimeLimit;
|
||||||
|
lan.sofIronManMode=gGameOptions.fIronManMode;
|
||||||
|
lan.starting_balance=gsstarting_balance;
|
||||||
|
|
||||||
|
// OJW - 20090319 - Changing allow custom NIV to force NIV on all clients
|
||||||
|
// as with the new join screen setup, no way for the individual client to choose
|
||||||
|
// whether or not to use NIV. If this is wrong, its easily fixed...
|
||||||
|
// just change description text for the toggle option on the host screen to
|
||||||
|
// "Allow custom inventory" and delete this if statement.
|
||||||
|
if (sALLOW_CUSTOM_NIV==1)
|
||||||
|
gGameOptions.ubInventorySystem = INVENTORY_NEW;
|
||||||
|
|
||||||
|
lan.sofNewInv=gGameOptions.ubInventorySystem;
|
||||||
|
|
||||||
|
lan.soDis_Bobby=gsDis_Bobby;
|
||||||
|
lan.soDis_Equip=gsDis_Equip;
|
||||||
|
|
||||||
|
lan.gsMAX_MERCS=gsMAX_MERCS;
|
||||||
|
|
||||||
|
memcpy( lan.client_names , client_names, sizeof( char ) * 4 * 30 );
|
||||||
|
lan.team=clinf->team;
|
||||||
|
|
||||||
|
lan.TESTING=gsTESTING;
|
||||||
|
|
||||||
|
// OJW - 20081218
|
||||||
|
if (RANDOM_SPAWN)
|
||||||
|
lan.cl_edge = client_edges[lan.client_num-1];
|
||||||
|
else
|
||||||
|
lan.cl_edge=clinf->cl_edge;
|
||||||
|
|
||||||
|
// OJW - 20081223
|
||||||
|
if (RANDOM_MERCS)
|
||||||
|
{
|
||||||
|
memcpy(lan.random_mercs, random_merc_teams[client_mercteam[lan.client_num - 1]], sizeof(int) * 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
lan.TIME=TIME;
|
||||||
|
lan.WEAPON_READIED_BONUS=sWEAPON_READIED_BONUS;
|
||||||
|
lan.ALLOW_CUSTOM_NIV=sALLOW_CUSTOM_NIV;
|
||||||
|
lan.DISABLE_SPEC_MODE=sDISABLE_SPEC_MODE;
|
||||||
|
|
||||||
|
|
||||||
|
server->RPC("recieveSETTINGS",(const char*)&lan, (int)sizeof(settings_struct)*8, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||||
|
} // end if(can_joingame)
|
||||||
|
}
|
||||||
|
|
||||||
|
// added 081201 by Owen , allow the server to change the map while its still not in laptop mode
|
||||||
|
void send_mapchange(void)
|
||||||
|
{
|
||||||
|
if (is_server && !allowlaptop)
|
||||||
|
{
|
||||||
|
mapchange_struct lan;
|
||||||
|
|
||||||
lan.same_merc = gsSAME_MERC;
|
|
||||||
lan.gsMercArriveSectorX=gsMercArriveSectorX;
|
lan.gsMercArriveSectorX=gsMercArriveSectorX;
|
||||||
lan.gsMercArriveSectorY=gsMercArriveSectorY;
|
lan.gsMercArriveSectorY=gsMercArriveSectorY;
|
||||||
|
lan.TIME=TIME;
|
||||||
|
|
||||||
lan.ENEMY_ENABLED=ENEMY_ENABLED;
|
server->RPC("recieveMAPCHANGE",(const char*)&lan, (int)sizeof(mapchange_struct)*8, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||||
lan.CREATURE_ENABLED=CREATURE_ENABLED;
|
}
|
||||||
lan.MILITIA_ENABLED=MILITIA_ENABLED;
|
else
|
||||||
lan.CIV_ENABLED=CIV_ENABLED;
|
{
|
||||||
|
ScreenMsg( FONT_LTBLUE, MSG_CHAT, MPServerMessage[45]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lan.gsPLAYER_BSIDE=gsPLAYER_BSIDE;
|
// OJW 090212
|
||||||
|
bool inline can_joingame()
|
||||||
lan.emorale=gsMORALE;
|
{
|
||||||
lan.gsREPORT_NAME=gsREPORT_NAME;
|
return !allowlaptop;
|
||||||
//something new
|
}
|
||||||
lan.secs_per_tick=gssecs_per_tick;
|
|
||||||
lan.soubBobbyRay=gGameOptions.ubBobbyRay;
|
|
||||||
lan.sofGunNut=gGameOptions.fGunNut;
|
|
||||||
lan.soubGameStyle=gGameOptions.ubGameStyle;
|
|
||||||
lan.soubDifficultyLevel=gGameOptions.ubDifficultyLevel;
|
|
||||||
lan.sofTurnTimeLimit=gGameOptions.fTurnTimeLimit;
|
|
||||||
lan.sofIronManMode=gGameOptions.fIronManMode;
|
|
||||||
lan.starting_balance=gsstarting_balance;
|
|
||||||
|
|
||||||
lan.sofNewInv=gGameOptions.ubInventorySystem;
|
|
||||||
|
|
||||||
lan.soDis_Bobby=gsDis_Bobby;
|
|
||||||
lan.soDis_Equip=gsDis_Equip;
|
|
||||||
|
|
||||||
lan.gsMAX_MERCS=gsMAX_MERCS;
|
|
||||||
|
|
||||||
memcpy( lan.client_names , client_names, sizeof( char ) * 4 * 30 );
|
|
||||||
lan.team=clinf->team;
|
|
||||||
|
|
||||||
|
|
||||||
lan.TESTING=gsTESTING;
|
|
||||||
|
|
||||||
lan.cl_edge=clinf->cl_edge;
|
|
||||||
lan.TIME=TIME;
|
|
||||||
lan.WEAPON_READIED_BONUS=sWEAPON_READIED_BONUS;
|
|
||||||
lan.ALLOW_CUSTOM_NIV=sALLOW_CUSTOM_NIV;
|
|
||||||
lan.DISABLE_SPEC_MODE=sDISABLE_SPEC_MODE;
|
|
||||||
|
|
||||||
|
|
||||||
server->RPC("recieveSETTINGS",(const char*)&lan, (int)sizeof(settings_struct)*8, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID,0);
|
|
||||||
|
|
||||||
|
// Allow server to disconnect incoming clients after the game has started
|
||||||
|
void CheckIncomingConnection(Packet* p)
|
||||||
|
{
|
||||||
|
// some clients might reconnect after disconnecting, either after the laptop is unlocked
|
||||||
|
// or after the game has started
|
||||||
|
// we dont want to allow this as thier game will be out of state
|
||||||
|
if (!can_joingame())
|
||||||
|
{
|
||||||
|
ScreenMsg( FONT_LTBLUE, MSG_CHAT, L"CONNECTION REJECTED - GAME HAS STARTED");
|
||||||
|
// disconnect this client, no need to notify them as they will know if they disconnected
|
||||||
|
// before receiving a settings packet that they were not allowed to join
|
||||||
|
server->CloseConnection(p->systemAddress, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -428,10 +664,18 @@ void start_server (void)
|
|||||||
char time_div[30];
|
char time_div[30];
|
||||||
char mor[30];
|
char mor[30];
|
||||||
|
|
||||||
|
char sRandomMercs[30];
|
||||||
|
char sRandomEdges[30];
|
||||||
|
|
||||||
|
// OJW - 20081204
|
||||||
|
GetPrivateProfileString( "Ja2_mp Settings","SERVER_NAME", "", SERVER_NAME, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||||
|
|
||||||
GetPrivateProfileString( "Ja2_mp Settings","SAME_MERC", "", hire_same_merc, MAX_PATH, "..\\Ja2_mp.ini" );
|
GetPrivateProfileString( "Ja2_mp Settings","SAME_MERC", "", hire_same_merc, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||||
GetPrivateProfileString( "Ja2_mp Settings","DISABLE_MORALE", "", mor, MAX_PATH, "..\\Ja2_mp.ini" );
|
GetPrivateProfileString( "Ja2_mp Settings","DISABLE_MORALE", "", mor, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||||
GetPrivateProfileString( "Ja2_mp Settings","MAX_CLIENTS", "", maxclients, MAX_PATH, "..\\Ja2_mp.ini" );
|
GetPrivateProfileString( "Ja2_mp Settings","MAX_CLIENTS", "", maxclients, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||||
GetPrivateProfileString( "Ja2_mp Settings","DAMAGE_MULTIPLIER", "", net_div, MAX_PATH, "..\\Ja2_mp.ini" );
|
GetPrivateProfileString( "Ja2_mp Settings","DAMAGE_MULTIPLIER", "", net_div, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||||
|
GetPrivateProfileString( "Ja2_mp Settings","RANDOM_MERCS", "", sRandomMercs, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||||
|
GetPrivateProfileString( "Ja2_mp Settings","RANDOM_EDGES", "", sRandomEdges, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||||
|
|
||||||
GetPrivateProfileString( "Ja2_mp Settings","ENEMY_ENABLED", "", bteam1_enabled, MAX_PATH, "..\\Ja2_mp.ini" );
|
GetPrivateProfileString( "Ja2_mp Settings","ENEMY_ENABLED", "", bteam1_enabled, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||||
//GetPrivateProfileString( "Ja2_mp Settings","CREATURE_ENABLED", "", bteam2_enabled, MAX_PATH, "..\\Ja2_mp.ini" );
|
//GetPrivateProfileString( "Ja2_mp Settings","CREATURE_ENABLED", "", bteam2_enabled, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||||
@@ -479,14 +723,30 @@ void start_server (void)
|
|||||||
MILITIA_ENABLED=0;
|
MILITIA_ENABLED=0;
|
||||||
CIV_ENABLED=0;
|
CIV_ENABLED=0;
|
||||||
|
|
||||||
if(gsPLAYER_BSIDE==2)//only enable ai during coop
|
RANDOM_MERCS = atoi(sRandomMercs);
|
||||||
{
|
RANDOM_SPAWN = atoi(sRandomEdges);
|
||||||
ENEMY_ENABLED =atoi(bteam1_enabled);
|
|
||||||
//CREATURE_ENABLED =atoi(bteam2_enabled);
|
|
||||||
MILITIA_ENABLED =atoi(bteam3_enabled);
|
|
||||||
CIV_ENABLED =atoi(bteam4_enabled);
|
|
||||||
|
|
||||||
}
|
if (RANDOM_SPAWN)
|
||||||
|
{
|
||||||
|
// create random starting edges
|
||||||
|
int spawns[4] = { 0 , 1 , 2 , 3 };
|
||||||
|
rSortArray(spawns,4);
|
||||||
|
memcpy(client_edges,spawns,sizeof(int)*4);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RANDOM_MERCS)
|
||||||
|
{
|
||||||
|
// randomly sort team indexes to give client
|
||||||
|
// one of four random merc teams
|
||||||
|
rSortArray(client_mercteam,4);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(gsPLAYER_BSIDE==2)//only enable ai during coop
|
||||||
|
{
|
||||||
|
ENEMY_ENABLED = 1; // always enable enemies in co-op
|
||||||
|
MILITIA_ENABLED = atoi(bteam3_enabled);
|
||||||
|
CIV_ENABLED = atoi(bteam4_enabled);
|
||||||
|
}
|
||||||
|
|
||||||
gsSAME_MERC = atoi(hire_same_merc);
|
gsSAME_MERC = atoi(hire_same_merc);
|
||||||
gsDAMAGE_MULTIPLIER =(FLOAT)atof(net_div);
|
gsDAMAGE_MULTIPLIER =(FLOAT)atof(net_div);
|
||||||
@@ -560,6 +820,10 @@ if(gsPLAYER_BSIDE==2)//only enable ai during coop
|
|||||||
REGISTER_STATIC_RPC(server, startCOMBAT);
|
REGISTER_STATIC_RPC(server, startCOMBAT);
|
||||||
REGISTER_STATIC_RPC(server, sendWIPE);
|
REGISTER_STATIC_RPC(server, sendWIPE);
|
||||||
REGISTER_STATIC_RPC(server, sendHEAL);
|
REGISTER_STATIC_RPC(server, sendHEAL);
|
||||||
|
REGISTER_STATIC_RPC(server, sendEDGECHANGE);
|
||||||
|
REGISTER_STATIC_RPC(server, sendTEAMCHANGE);
|
||||||
|
REGISTER_STATIC_RPC(server, sendGAMEOVER);
|
||||||
|
REGISTER_STATIC_RPC(server, sendCHATMSG);
|
||||||
//REGISTER_STATIC_RPC(server, rINT);
|
//REGISTER_STATIC_RPC(server, rINT);
|
||||||
//
|
//
|
||||||
|
|
||||||
@@ -614,7 +878,7 @@ void server_packet ( void )
|
|||||||
case ID_DISCONNECTION_NOTIFICATION://client disconnected purposefullly
|
case ID_DISCONNECTION_NOTIFICATION://client disconnected purposefullly
|
||||||
// Connection lost normally
|
// Connection lost normally
|
||||||
ScreenMsg( FONT_LTBLUE, MSG_CHAT, L"ID_DISCONNECTION_NOTIFICATION");
|
ScreenMsg( FONT_LTBLUE, MSG_CHAT, L"ID_DISCONNECTION_NOTIFICATION");
|
||||||
f_rec_num(2, p->systemAddress);//clear record
|
HandleDisconnect(p->systemAddress);//clear record
|
||||||
break;
|
break;
|
||||||
case ID_ALREADY_CONNECTED:
|
case ID_ALREADY_CONNECTED:
|
||||||
// Connection lost normally
|
// Connection lost normally
|
||||||
@@ -641,7 +905,7 @@ void server_packet ( void )
|
|||||||
// Couldn't deliver a reliable packet - i.e. the other system was abnormally
|
// Couldn't deliver a reliable packet - i.e. the other system was abnormally
|
||||||
// terminated
|
// terminated
|
||||||
ScreenMsg( FONT_LTBLUE, MSG_CHAT, L"ID_CONNECTION_LOST");//client dropped
|
ScreenMsg( FONT_LTBLUE, MSG_CHAT, L"ID_CONNECTION_LOST");//client dropped
|
||||||
f_rec_num(2, p->systemAddress);//clear record
|
HandleDisconnect(p->systemAddress);//clear record
|
||||||
break;
|
break;
|
||||||
case ID_CONNECTION_REQUEST_ACCEPTED:
|
case ID_CONNECTION_REQUEST_ACCEPTED:
|
||||||
// This tells the client they have connected
|
// This tells the client they have connected
|
||||||
@@ -650,6 +914,8 @@ void server_packet ( void )
|
|||||||
case ID_NEW_INCOMING_CONNECTION:
|
case ID_NEW_INCOMING_CONNECTION:
|
||||||
//tells server client has connected
|
//tells server client has connected
|
||||||
ScreenMsg( FONT_LTBLUE, MSG_CHAT, L"ID_NEW_INCOMING_CONNECTION");
|
ScreenMsg( FONT_LTBLUE, MSG_CHAT, L"ID_NEW_INCOMING_CONNECTION");
|
||||||
|
// make sure they can connect
|
||||||
|
CheckIncomingConnection(p);
|
||||||
//send_settings();//send off server set settings
|
//send_settings();//send off server set settings
|
||||||
break;
|
break;
|
||||||
case ID_MODIFIED_PACKET:
|
case ID_MODIFIED_PACKET:
|
||||||
|
|||||||
@@ -253,7 +253,6 @@ void RenderOptionsScreen();
|
|||||||
void ExitOptionsScreen();
|
void ExitOptionsScreen();
|
||||||
void HandleOptionsScreen();
|
void HandleOptionsScreen();
|
||||||
void GetOptionsScreenUserInput();
|
void GetOptionsScreenUserInput();
|
||||||
void SetOptionsExitScreen( UINT32 uiExitScreen );
|
|
||||||
|
|
||||||
|
|
||||||
void SoundFXSliderChangeCallBack( INT32 iNewValue );
|
void SoundFXSliderChangeCallBack( INT32 iNewValue );
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ UINT32 OptionsScreenInit( void );
|
|||||||
|
|
||||||
void SetOptionsScreenToggleBoxes();
|
void SetOptionsScreenToggleBoxes();
|
||||||
void GetOptionsScreenToggleBoxes();
|
void GetOptionsScreenToggleBoxes();
|
||||||
|
// OJW - moved this here so can exit options screen on client disconnect
|
||||||
|
void SetOptionsExitScreen( UINT32 uiExitScreen );
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
BOOLEAN DoOptionsMessageBox( UINT8 ubStyle, STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||||
|
|||||||
+4
-1
@@ -55,7 +55,10 @@ Screens GameScreens[MAX_SCREENS] =
|
|||||||
{ DemoExitScreenInit, DemoExitScreenHandle, DemoExitScreenShutdown },
|
{ DemoExitScreenInit, DemoExitScreenHandle, DemoExitScreenShutdown },
|
||||||
{ IntroScreenInit, IntroScreenHandle, IntroScreenShutdown },
|
{ IntroScreenInit, IntroScreenHandle, IntroScreenShutdown },
|
||||||
{ CreditScreenInit, CreditScreenHandle, CreditScreenShutdown },
|
{ CreditScreenInit, CreditScreenHandle, CreditScreenShutdown },
|
||||||
|
{ MPJoinScreenInit, MPJoinScreenHandle, MPJoinScreenShutdown }, // OJW - 20081129
|
||||||
|
{ MPHostScreenInit, MPHostScreenHandle, MPHostScreenShutdown },
|
||||||
|
{ MPScoreScreenInit, MPScoreScreenHandle, MPScoreScreenShutdown }, // OJW - 20081222
|
||||||
|
{ MPChatScreenInit, MPChatScreenHandle, MPChatScreenShutdown }, // OJW - 20090314
|
||||||
|
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
{ AIViewerScreenInit, AIViewerScreenHandle, AIViewerScreenShutdown },
|
{ AIViewerScreenInit, AIViewerScreenHandle, AIViewerScreenShutdown },
|
||||||
|
|||||||
@@ -2467,6 +2467,43 @@ BOOLEAN SpecifyButtonIcon( INT32 iButtonID, INT32 iVideoObjectID, UINT16 usVideo
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//OJW - 20081224
|
||||||
|
BOOLEAN SpecifyButtonImage( INT32 iButtonID, UINT32 iButtonImageID)
|
||||||
|
{
|
||||||
|
GUI_BUTTON *b;
|
||||||
|
|
||||||
|
Assert( iButtonID >= 0 );
|
||||||
|
Assert( iButtonID < MAX_BUTTONS );
|
||||||
|
b = ButtonList[ iButtonID ];
|
||||||
|
Assert( b );
|
||||||
|
|
||||||
|
// Is there a QuickButton image in the given image slot?
|
||||||
|
if(ButtonPictures[iButtonImageID].vobj == NULL)
|
||||||
|
{
|
||||||
|
DbgMessage(TOPIC_BUTTON_HANDLER,DBG_LEVEL_0,"QuickCreateButton: Invalid button image number");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
b->ImageNum = iButtonImageID;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOLEAN SpecifyButtonImage( GUI_BUTTON *b, UINT32 iButtonImageID)
|
||||||
|
{
|
||||||
|
Assert( b );
|
||||||
|
|
||||||
|
// Is there a QuickButton image in the given image slot?
|
||||||
|
if(ButtonPictures[iButtonImageID].vobj == NULL)
|
||||||
|
{
|
||||||
|
DbgMessage(TOPIC_BUTTON_HANDLER,DBG_LEVEL_0,"QuickCreateButton: Invalid button image number");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
b->ImageNum = iButtonImageID;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
void RemoveTextFromButton( INT32 iButtonID )
|
void RemoveTextFromButton( INT32 iButtonID )
|
||||||
{
|
{
|
||||||
GUI_BUTTON *b;
|
GUI_BUTTON *b;
|
||||||
|
|||||||
@@ -287,6 +287,9 @@ void SpecifyButtonTextSubOffsets( INT32 iButtonID, INT8 bTextXOffset, INT8 bText
|
|||||||
void SpecifyButtonTextWrappedWidth(INT32 iButtonID, INT16 sWrappedWidth);
|
void SpecifyButtonTextWrappedWidth(INT32 iButtonID, INT16 sWrappedWidth);
|
||||||
|
|
||||||
void SpecifyButtonSoundScheme( INT32 iButtonID, INT8 bSoundScheme );
|
void SpecifyButtonSoundScheme( INT32 iButtonID, INT8 bSoundScheme );
|
||||||
|
//OJW - 20081224
|
||||||
|
BOOLEAN SpecifyButtonImage( INT32 iButtonID, UINT32 iButtonImageID);
|
||||||
|
BOOLEAN SpecifyButtonImage( GUI_BUTTON *b, UINT32 iButtonImageID);
|
||||||
void PlayButtonSound( INT32 iButtonID, INT32 iSoundType );
|
void PlayButtonSound( INT32 iButtonID, INT32 iSoundType );
|
||||||
|
|
||||||
void AllowDisabledButtonFastHelp( INT32 iButtonID, BOOLEAN fAllow );
|
void AllowDisabledButtonFastHelp( INT32 iButtonID, BOOLEAN fAllow );
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "_Ja25EnglishText.h"
|
#include "_Ja25EnglishText.h"
|
||||||
#include "SaveLoadScreen.h"
|
#include "SaveLoadScreen.h"
|
||||||
|
#include "game init.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
@@ -1649,7 +1650,7 @@ BOOLEAN AnyUsableRealMercenariesOnTeam( void )
|
|||||||
|
|
||||||
void RequestTriggerExitFromMapscreen( INT8 bExitToWhere )
|
void RequestTriggerExitFromMapscreen( INT8 bExitToWhere )
|
||||||
{
|
{
|
||||||
Assert( ( bExitToWhere >= MAP_EXIT_TO_LAPTOP ) && ( bExitToWhere <= MAP_EXIT_TO_SAVE ) );
|
Assert( ( bExitToWhere >= MAP_EXIT_TO_LAPTOP ) && ( bExitToWhere <= MAP_EXIT_TO_MAINMENU ) );
|
||||||
|
|
||||||
// if allowed to do so
|
// if allowed to do so
|
||||||
if ( AllowedToExitFromMapscreenTo( bExitToWhere ) )
|
if ( AllowedToExitFromMapscreenTo( bExitToWhere ) )
|
||||||
@@ -1665,6 +1666,18 @@ void RequestTriggerExitFromMapscreen( INT8 bExitToWhere )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!(bExitToWhere == MAP_EXIT_TO_TACTICAL || bExitToWhere == MAP_EXIT_TO_MAINMENU))
|
||||||
|
{
|
||||||
|
// OJW - 20090301
|
||||||
|
if (is_networked && is_client)
|
||||||
|
{
|
||||||
|
if (client_ready[CLIENT_NUM-1]==1 && is_game_started == false)
|
||||||
|
{
|
||||||
|
// un-ready if we are not on map screen
|
||||||
|
start_battle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// permit it, and get the ball rolling
|
// permit it, and get the ball rolling
|
||||||
gbExitingMapScreenToWhere = bExitToWhere;
|
gbExitingMapScreenToWhere = bExitToWhere;
|
||||||
@@ -1680,7 +1693,7 @@ void RequestTriggerExitFromMapscreen( INT8 bExitToWhere )
|
|||||||
|
|
||||||
BOOLEAN AllowedToExitFromMapscreenTo( INT8 bExitToWhere )
|
BOOLEAN AllowedToExitFromMapscreenTo( INT8 bExitToWhere )
|
||||||
{
|
{
|
||||||
Assert( ( bExitToWhere >= MAP_EXIT_TO_LAPTOP ) && ( bExitToWhere <= MAP_EXIT_TO_SAVE ) );
|
Assert( ( bExitToWhere >= MAP_EXIT_TO_LAPTOP ) && ( bExitToWhere <= MAP_EXIT_TO_MAINMENU ) );
|
||||||
|
|
||||||
// if already leaving, disallow any other attempts to exit
|
// if already leaving, disallow any other attempts to exit
|
||||||
if ( fLeavingMapScreen )
|
if ( fLeavingMapScreen )
|
||||||
@@ -1688,6 +1701,13 @@ BOOLEAN AllowedToExitFromMapscreenTo( INT8 bExitToWhere )
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OJW - 20090210 - clean resources on disconnect
|
||||||
|
if (bExitToWhere == MAP_EXIT_TO_MAINMENU)
|
||||||
|
{
|
||||||
|
// always allow this
|
||||||
|
return( TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
// WANNE: At least one merc must be hired so we can go to tactical.
|
// WANNE: At least one merc must be hired so we can go to tactical.
|
||||||
// This was an exploit. If you go to tactical in Omerta and have not hired any merc
|
// This was an exploit. If you go to tactical in Omerta and have not hired any merc
|
||||||
// then go back to laptop and hire a merc. After the merc arrives the heli landing was not
|
// then go back to laptop and hire a merc. After the merc arrives the heli landing was not
|
||||||
@@ -1839,7 +1859,12 @@ void HandleExitsFromMapScreen( void )
|
|||||||
guiPreviousOptionScreen = guiCurrentScreen;
|
guiPreviousOptionScreen = guiCurrentScreen;
|
||||||
SetPendingNewScreen( SAVE_LOAD_SCREEN );
|
SetPendingNewScreen( SAVE_LOAD_SCREEN );
|
||||||
break;
|
break;
|
||||||
|
// OJW - 20090210 - clean resources on disconnect
|
||||||
|
case MAP_EXIT_TO_MAINMENU:
|
||||||
|
// Re-initialise the game
|
||||||
|
ReStartingGame();
|
||||||
|
SetPendingNewScreen( MAINMENU_SCREEN );
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// invalid exit type
|
// invalid exit type
|
||||||
Assert( FALSE );
|
Assert( FALSE );
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ enum{
|
|||||||
MAP_EXIT_TO_OPTIONS,
|
MAP_EXIT_TO_OPTIONS,
|
||||||
MAP_EXIT_TO_LOAD,
|
MAP_EXIT_TO_LOAD,
|
||||||
MAP_EXIT_TO_SAVE,
|
MAP_EXIT_TO_SAVE,
|
||||||
|
// OJW - 20090210 - clean resources on disconnect
|
||||||
|
MAP_EXIT_TO_MAINMENU
|
||||||
};
|
};
|
||||||
|
|
||||||
// there's no button for entering SAVE/LOAD screen directly...
|
// there's no button for entering SAVE/LOAD screen directly...
|
||||||
|
|||||||
+927
-28
File diff suppressed because it is too large
Load Diff
@@ -42,6 +42,7 @@ extern INT8 NUM_TOWNS;
|
|||||||
extern BOOLEAN fCharacterInfoPanelDirty;
|
extern BOOLEAN fCharacterInfoPanelDirty;
|
||||||
extern BOOLEAN fTeamPanelDirty;
|
extern BOOLEAN fTeamPanelDirty;
|
||||||
extern BOOLEAN fMapPanelDirty;
|
extern BOOLEAN fMapPanelDirty;
|
||||||
|
extern BOOLEAN fDrawCharacterList; // OJW - 20081204
|
||||||
|
|
||||||
extern BOOLEAN fMapInventoryItem;
|
extern BOOLEAN fMapInventoryItem;
|
||||||
extern BOOLEAN gfInConfirmMapMoveMode;
|
extern BOOLEAN gfInConfirmMapMoveMode;
|
||||||
|
|||||||
+39
-13
@@ -6218,21 +6218,29 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
// We can only check for end of battle if in combat mode or there are enemies
|
// OJW - 090212 - Fix end conditions for multiplayer - TeamDM
|
||||||
// present (they might bleed to death or run off the map!)
|
if(is_server)
|
||||||
if ( ! ( gTacticalStatus.uiFlags & INCOMBAT ) )
|
|
||||||
{
|
{
|
||||||
if ( ! (gTacticalStatus.fEnemyInSector) )
|
// check the server's conditions for continueing the game, if the server wants to continue the game it returns true
|
||||||
|
// hence we return false that the battle has ended. If not, when this function returns below we will force the game to end.
|
||||||
|
if ( check_status() )
|
||||||
|
return(FALSE);
|
||||||
|
// the block of code below would always cause this function to exit before checking the servers desires
|
||||||
|
// in cases of team deathmatch where there were no more enemies
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// We can only check for end of battle if in combat mode or there are enemies
|
||||||
|
// present (they might bleed to death or run off the map!)
|
||||||
|
if ( ! ( gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||||
{
|
{
|
||||||
return( FALSE );
|
if ( ! (gTacticalStatus.fEnemyInSector) )
|
||||||
|
{
|
||||||
|
return( FALSE );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_server && check_status())
|
|
||||||
{
|
|
||||||
return(FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ATE: If attack busy count.. get out...
|
// ATE: If attack busy count.. get out...
|
||||||
if ( (gTacticalStatus.ubAttackBusyCount > 0 ) )
|
if ( (gTacticalStatus.ubAttackBusyCount > 0 ) )
|
||||||
{
|
{
|
||||||
@@ -6329,6 +6337,10 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
|||||||
//Whenever returning TRUE, make sure you clear gfBlitBattleSectorLocator;
|
//Whenever returning TRUE, make sure you clear gfBlitBattleSectorLocator;
|
||||||
LogBattleResults( LOG_DEFEAT );
|
LogBattleResults( LOG_DEFEAT );
|
||||||
gfBlitBattleSectorLocator = FALSE;
|
gfBlitBattleSectorLocator = FALSE;
|
||||||
|
// If we are the server, we escape this function at the top if we think the game should still be running
|
||||||
|
// hence if we get here the game is over for all clients and we should report it
|
||||||
|
if (is_networked && is_server)
|
||||||
|
game_over();
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6438,11 +6450,15 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
|||||||
{
|
{
|
||||||
SetMusicMode( MUSIC_TACTICAL_VICTORY );
|
SetMusicMode( MUSIC_TACTICAL_VICTORY );
|
||||||
|
|
||||||
ShouldBeginAutoBandage( );
|
// OJW - 20081222 - dont auto-bandage if networked
|
||||||
|
if (!is_networked)
|
||||||
|
ShouldBeginAutoBandage( );
|
||||||
}
|
}
|
||||||
else if ( gfLastMercTalkedAboutKillingID != NOBODY && ( MercPtrs[ gfLastMercTalkedAboutKillingID ]->flags.uiStatusFlags & SOLDIER_MONSTER ) )
|
else if ( gfLastMercTalkedAboutKillingID != NOBODY && ( MercPtrs[ gfLastMercTalkedAboutKillingID ]->flags.uiStatusFlags & SOLDIER_MONSTER ) )
|
||||||
{
|
{
|
||||||
ShouldBeginAutoBandage( );
|
// OJW - 20081222 - dont auto-bandage if networked
|
||||||
|
if (!is_networked)
|
||||||
|
ShouldBeginAutoBandage( );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Say battle end quote....
|
// Say battle end quote....
|
||||||
@@ -6474,7 +6490,9 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
|||||||
{
|
{
|
||||||
// Change to nothing music...
|
// Change to nothing music...
|
||||||
SetMusicMode( MUSIC_TACTICAL_NOTHING );
|
SetMusicMode( MUSIC_TACTICAL_NOTHING );
|
||||||
ShouldBeginAutoBandage();
|
// OJW - 20081222 - dont auto bandage if networked
|
||||||
|
if (!is_networked)
|
||||||
|
ShouldBeginAutoBandage();
|
||||||
}
|
}
|
||||||
|
|
||||||
HandleMilitiaStatusInCurrentMapBeforeLoadingNewMap();
|
HandleMilitiaStatusInCurrentMapBeforeLoadingNewMap();
|
||||||
@@ -6550,8 +6568,16 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
|||||||
if(gGameExternalOptions.gfRevealItems)
|
if(gGameExternalOptions.gfRevealItems)
|
||||||
RevealAllDroppedEnemyItems();
|
RevealAllDroppedEnemyItems();
|
||||||
|
|
||||||
|
// If we are the server, we escape this function at the top if we think the game should still be running
|
||||||
|
// hence if we get here the game is over for all clients and we should report it
|
||||||
|
if (is_networked && is_server)
|
||||||
|
game_over();
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
// If we are the server, we escape this function at the top if we think the game should still be running
|
||||||
|
// hence if we get here the game is over for all clients and we should report it
|
||||||
|
if (is_networked && is_server)
|
||||||
|
game_over();
|
||||||
|
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3692,6 +3692,13 @@ BOOLEAN CheckForAndHandleSoldierDyingNotFromHit( SOLDIERTYPE *pSoldier )
|
|||||||
// Increment being attacked count
|
// Increment being attacked count
|
||||||
// pSoldier->bBeingAttackedCount++;
|
// pSoldier->bBeingAttackedCount++;
|
||||||
|
|
||||||
|
// OJW - Send bleeding death
|
||||||
|
if (is_networked)
|
||||||
|
{
|
||||||
|
if(pSoldier->bTeam==0) send_death(pSoldier);
|
||||||
|
else if(pSoldier->bTeam <6 && ((gTacticalStatus.ubTopMessageType == PLAYER_TURN_MESSAGE) || (gTacticalStatus.ubTopMessageType == PLAYER_INTERRUPT_MESSAGE)))send_death(pSoldier);
|
||||||
|
else if (pSoldier->bTeam < 6 && (is_server)) send_death(pSoldier);
|
||||||
|
}
|
||||||
if ( gGameSettings.fOptions[ TOPTION_BLOOD_N_GORE ] )
|
if ( gGameSettings.fOptions[ TOPTION_BLOOD_N_GORE ] )
|
||||||
{
|
{
|
||||||
switch( pSoldier->usAnimState )
|
switch( pSoldier->usAnimState )
|
||||||
|
|||||||
@@ -530,8 +530,7 @@ void BeginTeamTurn( UINT8 ubTeam )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else if (ubTeam > 4 || (is_client && !is_server )) //hayden
|
||||||
if (ubTeam > 4 || (is_client && !is_server )) //hayden
|
|
||||||
{
|
{
|
||||||
|
|
||||||
InitEnemyUIBar( 0, 0 );
|
InitEnemyUIBar( 0, 0 );
|
||||||
|
|||||||
@@ -1643,7 +1643,14 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// OJW - 090209 - ingame chat
|
||||||
|
if (InputEvent.usEvent == KEY_UP && InputEvent.usParam == 'y')
|
||||||
|
{
|
||||||
|
OpenChatMsgBox();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} // end is_networked
|
||||||
|
|
||||||
|
|
||||||
// Break of out IN CONV...
|
// Break of out IN CONV...
|
||||||
|
|||||||
@@ -67,3 +67,13 @@ void LiveMessage( CHAR8 *strMessage)
|
|||||||
fclose(OutFile);
|
fclose(OutFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void MPDebugMsg( CHAR8 *strMessage)
|
||||||
|
{
|
||||||
|
FILE *OutFile;
|
||||||
|
|
||||||
|
if ((OutFile = fopen("MPDebug.txt", "a+t")) != NULL)
|
||||||
|
{
|
||||||
|
fprintf(OutFile, "%s\n", strMessage);
|
||||||
|
fclose(OutFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
void LiveMessage( CHAR8 *strMessage);
|
void LiveMessage( CHAR8 *strMessage);
|
||||||
|
|
||||||
|
void MPDebugMsg( CHAR8 *strMessage);
|
||||||
|
|
||||||
#ifdef _ANIMSUBSYSTEM_DEBUG
|
#ifdef _ANIMSUBSYSTEM_DEBUG
|
||||||
|
|
||||||
|
|||||||
@@ -1436,7 +1436,104 @@ enum
|
|||||||
};
|
};
|
||||||
extern STR16 gzGIOScreenText[];
|
extern STR16 gzGIOScreenText[];
|
||||||
|
|
||||||
|
// OJW - 20081129
|
||||||
|
// Multiplayer Join Screen
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MPJ_TITLE_TEXT,
|
||||||
|
MPJ_JOIN_TEXT,
|
||||||
|
MPJ_HOST_TEXT,
|
||||||
|
MPJ_CANCEL_TEXT,
|
||||||
|
MPJ_REFRESH_TEXT,
|
||||||
|
MPJ_HANDLE_TEXT,
|
||||||
|
MPJ_SERVERIP_TEXT,
|
||||||
|
MPJ_SERVERPORT_TEXT,
|
||||||
|
MPJ_SERVERNAME_TEXT,
|
||||||
|
MPJ_NUMPLAYERS_TEXT,
|
||||||
|
MPJ_SERVERVER_TEXT,
|
||||||
|
MPJ_GAMETYPE_TEXT,
|
||||||
|
MPJ_PING_TEXT,
|
||||||
|
MPJ_HANDLE_INVALID,
|
||||||
|
MPJ_SERVERIP_INVALID,
|
||||||
|
MPJ_SERVERPORT_INVALID
|
||||||
|
};
|
||||||
|
|
||||||
|
extern STR16 gzMPJScreenText[];
|
||||||
|
//Multiplayer Host Screen
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MPH_TITLE_TEXT,
|
||||||
|
MPH_START_TEXT,
|
||||||
|
MPH_CANCEL_TEXT,
|
||||||
|
MPH_SERVERNAME_TEXT,
|
||||||
|
MPH_GAMETYPE_TEXT,
|
||||||
|
MPH_DEATHMATCH_TEXT,
|
||||||
|
MPH_TEAMDM_TEXT,
|
||||||
|
MPH_COOP_TEXT,
|
||||||
|
MPH_NUMPLAYERS_TEXT,
|
||||||
|
MPH_SQUADSIZE_TEXT,
|
||||||
|
MPH_MERCSELECT_TEXT,
|
||||||
|
MPH_RANDOMMERCS_TEXT,
|
||||||
|
MPH_PLAYERMERCS_TEXT,
|
||||||
|
MPH_BALANCE_TEXT,
|
||||||
|
MPH_SAMEMERC_TEXT,
|
||||||
|
MPH_RPTMERC_TEXT,
|
||||||
|
MPH_BOBBYRAY_TEXT,
|
||||||
|
MPH_RNDMSTART_TEXT,
|
||||||
|
MPH_SERVERNAME_INVALID,
|
||||||
|
MPH_MAXPLAYERS_INVALID,
|
||||||
|
MPH_SQUADSIZE_INVALID,
|
||||||
|
MPH_TIME_TEXT,
|
||||||
|
MPH_TIME_INVALID,
|
||||||
|
MPH_CASH_INVALID,
|
||||||
|
MPH_DMG_TEXT,
|
||||||
|
MPH_DMG_INVALID,
|
||||||
|
MPH_TIMER_TEXT,
|
||||||
|
MPH_TIMER_INVALID,
|
||||||
|
MPH_ENABLECIV_TEXT,
|
||||||
|
MPH_USENIV_TEXT,
|
||||||
|
};
|
||||||
|
extern STR16 gzMPHScreenText[];
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MPS_TITLE_TEXT,
|
||||||
|
MPS_CONTINUE_TEXT,
|
||||||
|
MPS_CANCEL_TEXT,
|
||||||
|
MPS_PLAYER_TEXT,
|
||||||
|
MPS_KILLS_TEXT,
|
||||||
|
MPS_DEATHS_TEXT,
|
||||||
|
MPS_AITEAM_TEXT,
|
||||||
|
MPS_HITS_TEXT,
|
||||||
|
MPS_MISSES_TEXT,
|
||||||
|
MPS_ACCURACY_TEXT,
|
||||||
|
MPS_DMGDONE_TEXT,
|
||||||
|
MPS_DMGTAKEN_TEXT,
|
||||||
|
};
|
||||||
|
extern STR16 gzMPSScreenText[];
|
||||||
|
// Multiplayer Starting Edges
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MP_EDGE_NORTH,
|
||||||
|
MP_EDGE_SOUTH,
|
||||||
|
MP_EDGE_EAST,
|
||||||
|
MP_EDGE_WEST,
|
||||||
|
MAX_EDGES,
|
||||||
|
};
|
||||||
|
extern STR16 gszMPEdgesText[];
|
||||||
|
// MP TEAM NAMES
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MP_TEAM_1,
|
||||||
|
MP_TEAM_2,
|
||||||
|
MP_TEAM_3,
|
||||||
|
MP_TEAM_4,
|
||||||
|
MAX_MP_TEAMS,
|
||||||
|
};
|
||||||
|
extern STR16 gszMPTeamNames[];
|
||||||
|
|
||||||
|
extern STR16 gzMPChatToggleText[];
|
||||||
|
|
||||||
|
extern STR16 gzMPChatboxText[];
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@@ -1608,4 +1705,6 @@ enum
|
|||||||
NIV_NO_CLIMB,
|
NIV_NO_CLIMB,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// OJW - MP
|
||||||
|
extern STR16 gszMPMapscreenText[];
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ void CheckCustomizableTimer( void );
|
|||||||
|
|
||||||
//Don't modify this value
|
//Don't modify this value
|
||||||
extern UINT32 guiBaseJA2Clock;
|
extern UINT32 guiBaseJA2Clock;
|
||||||
|
extern UINT32 guiBaseJA2NoPauseClock;
|
||||||
extern CUSTOMIZABLE_TIMER_CALLBACK gpCustomizableTimerCallback;
|
extern CUSTOMIZABLE_TIMER_CALLBACK gpCustomizableTimerCallback;
|
||||||
|
|
||||||
// MACROS
|
// MACROS
|
||||||
|
|||||||
@@ -371,6 +371,7 @@ UINT32 gCheckFileMinSizes[] =
|
|||||||
187000000,
|
187000000,
|
||||||
236000000
|
236000000
|
||||||
};
|
};
|
||||||
|
#define NOCDCHECK
|
||||||
|
|
||||||
#if defined( JA2TESTVERSION ) || defined( _DEBUG )
|
#if defined( JA2TESTVERSION ) || defined( _DEBUG )
|
||||||
#define NOCDCHECK
|
#define NOCDCHECK
|
||||||
|
|||||||
@@ -4572,6 +4572,60 @@ STR16 gzGIOScreenText[] =
|
|||||||
L"游戏初始设置(仅在服务器设置时有效)",
|
L"游戏初始设置(仅在服务器设置时有效)",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gzMPJScreenText[] =
|
||||||
|
{
|
||||||
|
L"MULTIPLAYER",
|
||||||
|
L"Join",
|
||||||
|
L"Host",
|
||||||
|
L"Cancel",
|
||||||
|
L"Refresh",
|
||||||
|
L"Player Name",
|
||||||
|
L"Server IP",
|
||||||
|
L"Port",
|
||||||
|
L"Server Name",
|
||||||
|
L"# Plrs",
|
||||||
|
L"Version",
|
||||||
|
L"Game Type",
|
||||||
|
L"Ping",
|
||||||
|
L"You must enter a player name",
|
||||||
|
L"You must enter a valid server IP address.\n (eg 192.168.0.1)",
|
||||||
|
L"You must enter a valid Server Port between 1 and 65535"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPHScreenText[] =
|
||||||
|
{
|
||||||
|
L"HOST GAME",
|
||||||
|
L"Start",
|
||||||
|
L"Cancel",
|
||||||
|
L"Server Name",
|
||||||
|
L"Game Type",
|
||||||
|
L"Deathmatch",
|
||||||
|
L"Team Deathmatch",
|
||||||
|
L"Co-operative",
|
||||||
|
L"Max Players",
|
||||||
|
L"Squad Size",
|
||||||
|
L"Merc Selection",
|
||||||
|
L"Random Mercs",
|
||||||
|
L"Hired by Player",
|
||||||
|
L"Starting Balance",
|
||||||
|
L"Can Hire Same Merc",
|
||||||
|
L"Report Hired Mercs",
|
||||||
|
L"Allow Bobby Rays",
|
||||||
|
L"Randomise Starting Edge",
|
||||||
|
L"You must enter a server name",
|
||||||
|
L"Max Players must be between 2 and 4",
|
||||||
|
L"Squad size must be between 1 and 6",
|
||||||
|
L"Time of Day",
|
||||||
|
L"Time of Day must be a 24 hr time (HH:MM)\n\n eg. 13:30 = 1.30pm",
|
||||||
|
L"Starting Cash must be a valid dollar amount ( no cents )\n\n eg. 150000" ,
|
||||||
|
L"Damage Multiplier",
|
||||||
|
L"Damage Multiplier must be a number between 0 and 5",
|
||||||
|
L"Turn Timer Multiplier",
|
||||||
|
L"Turn Timer multiplier must be a number between 1 and 200",
|
||||||
|
L"Enable Civilians in CO-OP",
|
||||||
|
L"Use New Inventory (NIV)",
|
||||||
|
};
|
||||||
|
|
||||||
STR16 pDeliveryLocationStrings[] =
|
STR16 pDeliveryLocationStrings[] =
|
||||||
{
|
{
|
||||||
L"奥斯汀", //"Austin", //Austin, Texas, USA
|
L"奥斯汀", //"Austin", //Austin, Texas, USA
|
||||||
@@ -5477,6 +5531,22 @@ STR16 MPClientMessage[] =
|
|||||||
L"你已被击败!",
|
L"你已被击败!",
|
||||||
L"对不起, 在多人游戏中无法攀登。",
|
L"对不起, 在多人游戏中无法攀登。",
|
||||||
L"你雇佣了 '%s'",
|
L"你雇佣了 '%s'",
|
||||||
|
// 45
|
||||||
|
L"You cant change the map once purchasing has commenced",
|
||||||
|
L"Map changed to '%s'",
|
||||||
|
L"Client '%s' disconnected, removing from game",
|
||||||
|
L"You were disconnected from the game, returning to the Main Menu",
|
||||||
|
L"Connection failed, Retrying in 5 seconds, %i retries left...",
|
||||||
|
//50
|
||||||
|
L"Connection failed, giving up...",
|
||||||
|
L"You cannot start the game until another player has connected",
|
||||||
|
L"%s : %s",
|
||||||
|
L"Send to All",
|
||||||
|
L"Allies only",
|
||||||
|
// 55
|
||||||
|
L"Cannot join game. This game has already started.",
|
||||||
|
L"%s (team): %s",
|
||||||
|
L"Client #%i - '%s'",
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 MPHelp[] =
|
STR16 MPHelp[] =
|
||||||
@@ -5504,6 +5574,62 @@ STR16 MPHelp[] =
|
|||||||
L"'F1' - 显示基本帮助",
|
L"'F1' - 显示基本帮助",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gszMPEdgesText[] =
|
||||||
|
{
|
||||||
|
L"N",
|
||||||
|
L"S",
|
||||||
|
L"E",
|
||||||
|
L"W"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPTeamNames[] =
|
||||||
|
{
|
||||||
|
L"Foxtrot",
|
||||||
|
L"Bravo",
|
||||||
|
L"Delta",
|
||||||
|
L"Charlie"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPMapscreenText[] =
|
||||||
|
{
|
||||||
|
L"Game Type: ",
|
||||||
|
L"Players: ",
|
||||||
|
L"Mercs each: ",
|
||||||
|
L"You cannot change starting edge once Laptop is unlocked",
|
||||||
|
L"You cannot change teams once the Laptop is unlocked",
|
||||||
|
L"Random Mercs: ",
|
||||||
|
L"Y",
|
||||||
|
L"Difficulty:"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPSScreenText[] =
|
||||||
|
{
|
||||||
|
L"Scoreboard",
|
||||||
|
L"Continue",
|
||||||
|
L"Cancel",
|
||||||
|
L"Player",
|
||||||
|
L"Kills",
|
||||||
|
L"Deaths",
|
||||||
|
L"Queen's Army",
|
||||||
|
L"Hits",
|
||||||
|
L"Misses",
|
||||||
|
L"Accuracy",
|
||||||
|
L"Damage Dealt",
|
||||||
|
L"Damage Taken"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatToggleText[] =
|
||||||
|
{
|
||||||
|
L"Send to All",
|
||||||
|
L"Send to Allies only",
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatboxText[] =
|
||||||
|
{
|
||||||
|
L"Multiplayer Chat",
|
||||||
|
L"Chat: press ENTER to send of ESC to cancel",
|
||||||
|
};
|
||||||
|
|
||||||
// WANNE: Some Chinese specific strings that needs to be in unicode!
|
// WANNE: Some Chinese specific strings that needs to be in unicode!
|
||||||
STR16 ChineseSpecString1 = L"%%"; //defined in _ChineseText.cpp as this file is already unicode
|
STR16 ChineseSpecString1 = L"%%"; //defined in _ChineseText.cpp as this file is already unicode
|
||||||
STR16 ChineseSpecString2 = L"*%3d%%%%"; //defined in _ChineseText.cpp as this file is already unicode
|
STR16 ChineseSpecString2 = L"*%3d%%%%"; //defined in _ChineseText.cpp as this file is already unicode
|
||||||
|
|||||||
@@ -3797,6 +3797,60 @@ STR16 gzGIOScreenText[] =
|
|||||||
L"INITIAL GAME SETTINGS (Only the server settings take effect)",
|
L"INITIAL GAME SETTINGS (Only the server settings take effect)",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gzMPJScreenText[] =
|
||||||
|
{
|
||||||
|
L"MULTIPLAYER",
|
||||||
|
L"Join",
|
||||||
|
L"Host",
|
||||||
|
L"Cancel",
|
||||||
|
L"Refresh",
|
||||||
|
L"Player Name",
|
||||||
|
L"Server IP",
|
||||||
|
L"Port",
|
||||||
|
L"Server Name",
|
||||||
|
L"# Plrs",
|
||||||
|
L"Version",
|
||||||
|
L"Game Type",
|
||||||
|
L"Ping",
|
||||||
|
L"You must enter a player name",
|
||||||
|
L"You must enter a valid server IP address.\n (eg 192.168.0.1)",
|
||||||
|
L"You must enter a valid Server Port between 1 and 65535"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPHScreenText[] =
|
||||||
|
{
|
||||||
|
L"HOST GAME",
|
||||||
|
L"Start",
|
||||||
|
L"Cancel",
|
||||||
|
L"Server Name",
|
||||||
|
L"Game Type",
|
||||||
|
L"Deathmatch",
|
||||||
|
L"Team Deathmatch",
|
||||||
|
L"Co-operative",
|
||||||
|
L"Max Players",
|
||||||
|
L"Squad Size",
|
||||||
|
L"Merc Selection",
|
||||||
|
L"Random Mercs",
|
||||||
|
L"Hired by Player",
|
||||||
|
L"Starting Balance",
|
||||||
|
L"Can Hire Same Merc",
|
||||||
|
L"Report Hired Mercs",
|
||||||
|
L"Allow Bobby Rays",
|
||||||
|
L"Randomise Starting Edge",
|
||||||
|
L"You must enter a server name",
|
||||||
|
L"Max Players must be between 2 and 4",
|
||||||
|
L"Squad size must be between 1 and 6",
|
||||||
|
L"Time of Day",
|
||||||
|
L"Time of Day must be a 24 hr time (HH:MM)\n\n eg. 13:30 = 1.30pm",
|
||||||
|
L"Starting Cash must be a valid dollar amount ( no cents )\n\n eg. 150000" ,
|
||||||
|
L"Damage Multiplier",
|
||||||
|
L"Damage Multiplier must be a number between 0 and 5",
|
||||||
|
L"Turn Timer Multiplier",
|
||||||
|
L"Turn Timer multiplier must be a number between 1 and 200",
|
||||||
|
L"Enable Civilians in CO-OP",
|
||||||
|
L"Use New Inventory (NIV)",
|
||||||
|
};
|
||||||
|
|
||||||
STR16 pDeliveryLocationStrings[] =
|
STR16 pDeliveryLocationStrings[] =
|
||||||
{
|
{
|
||||||
L"Austin", //Austin, Texas, USA
|
L"Austin", //Austin, Texas, USA
|
||||||
@@ -4530,6 +4584,22 @@ STR16 MPClientMessage[] =
|
|||||||
L"You have been defeated!",
|
L"You have been defeated!",
|
||||||
L"Sorry, climbing is disable in MP",
|
L"Sorry, climbing is disable in MP",
|
||||||
L"You Hired '%s'",
|
L"You Hired '%s'",
|
||||||
|
// 45
|
||||||
|
L"You cant change the map once purchasing has commenced",
|
||||||
|
L"Map changed to '%s'",
|
||||||
|
L"Client '%s' disconnected, removing from game",
|
||||||
|
L"You were disconnected from the game, returning to the Main Menu",
|
||||||
|
L"Connection failed, Retrying in 5 seconds, %i retries left...",
|
||||||
|
//50
|
||||||
|
L"Connection failed, giving up...",
|
||||||
|
L"You cannot start the game until another player has connected",
|
||||||
|
L"%s : %s",
|
||||||
|
L"Send to All",
|
||||||
|
L"Allies only",
|
||||||
|
// 55
|
||||||
|
L"Cannot join game. This game has already started.",
|
||||||
|
L"%s (team): %s",
|
||||||
|
L"Client #%i - '%s'",
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 MPHelp[] =
|
STR16 MPHelp[] =
|
||||||
@@ -4557,4 +4627,60 @@ STR16 MPHelp[] =
|
|||||||
L"'F1' - Display primary help",
|
L"'F1' - Display primary help",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gszMPEdgesText[] =
|
||||||
|
{
|
||||||
|
L"N",
|
||||||
|
L"S",
|
||||||
|
L"E",
|
||||||
|
L"W"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPTeamNames[] =
|
||||||
|
{
|
||||||
|
L"Foxtrot",
|
||||||
|
L"Bravo",
|
||||||
|
L"Delta",
|
||||||
|
L"Charlie"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPMapscreenText[] =
|
||||||
|
{
|
||||||
|
L"Game Type: ",
|
||||||
|
L"Players: ",
|
||||||
|
L"Mercs each: ",
|
||||||
|
L"You cannot change starting edge once Laptop is unlocked",
|
||||||
|
L"You cannot change teams once the Laptop is unlocked",
|
||||||
|
L"Random Mercs: ",
|
||||||
|
L"Y",
|
||||||
|
L"Difficulty:"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPSScreenText[] =
|
||||||
|
{
|
||||||
|
L"Scoreboard",
|
||||||
|
L"Continue",
|
||||||
|
L"Cancel",
|
||||||
|
L"Player",
|
||||||
|
L"Kills",
|
||||||
|
L"Deaths",
|
||||||
|
L"Queen's Army",
|
||||||
|
L"Hits",
|
||||||
|
L"Misses",
|
||||||
|
L"Accuracy",
|
||||||
|
L"Damage Dealt",
|
||||||
|
L"Damage Taken"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatToggleText[] =
|
||||||
|
{
|
||||||
|
L"Send to All",
|
||||||
|
L"Send to Allies only",
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatboxText[] =
|
||||||
|
{
|
||||||
|
L"Multiplayer Chat",
|
||||||
|
L"Chat: press ENTER to send of ESC to cancel",
|
||||||
|
};
|
||||||
|
|
||||||
#endif //DUTCH
|
#endif //DUTCH
|
||||||
|
|||||||
@@ -3810,6 +3810,60 @@ STR16 gzGIOScreenText[] =
|
|||||||
L"INITIAL GAME SETTINGS (Only the server settings take effect)",
|
L"INITIAL GAME SETTINGS (Only the server settings take effect)",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gzMPJScreenText[] =
|
||||||
|
{
|
||||||
|
L"MULTIPLAYER",
|
||||||
|
L"Join",
|
||||||
|
L"Host",
|
||||||
|
L"Cancel",
|
||||||
|
L"Refresh",
|
||||||
|
L"Player Name",
|
||||||
|
L"Server IP",
|
||||||
|
L"Port",
|
||||||
|
L"Server Name",
|
||||||
|
L"# Plrs",
|
||||||
|
L"Version",
|
||||||
|
L"Game Type",
|
||||||
|
L"Ping",
|
||||||
|
L"You must enter a player name",
|
||||||
|
L"You must enter a valid server IP address.\n (eg 192.168.0.1)",
|
||||||
|
L"You must enter a valid Server Port between 1 and 65535"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPHScreenText[] =
|
||||||
|
{
|
||||||
|
L"HOST GAME",
|
||||||
|
L"Start",
|
||||||
|
L"Cancel",
|
||||||
|
L"Server Name",
|
||||||
|
L"Game Type",
|
||||||
|
L"Deathmatch",
|
||||||
|
L"Team Deathmatch",
|
||||||
|
L"Co-operative",
|
||||||
|
L"Max Players",
|
||||||
|
L"Squad Size",
|
||||||
|
L"Merc Selection",
|
||||||
|
L"Random Mercs",
|
||||||
|
L"Hired by Player",
|
||||||
|
L"Starting Balance",
|
||||||
|
L"Can Hire Same Merc",
|
||||||
|
L"Report Hired Mercs",
|
||||||
|
L"Allow Bobby Rays",
|
||||||
|
L"Randomise Starting Edge",
|
||||||
|
L"You must enter a server name",
|
||||||
|
L"Max Players must be between 2 and 4",
|
||||||
|
L"Squad size must be between 1 and 6",
|
||||||
|
L"Time of Day",
|
||||||
|
L"Time of Day must be a 24 hr time (HH:MM)\n\n eg. 13:30 = 1.30pm",
|
||||||
|
L"Starting Cash must be a valid dollar amount ( no cents )\n\n eg. 150000" ,
|
||||||
|
L"Damage Multiplier",
|
||||||
|
L"Damage Multiplier must be a number between 0 and 5",
|
||||||
|
L"Turn Timer Multiplier",
|
||||||
|
L"Turn Timer multiplier must be a number between 1 and 200",
|
||||||
|
L"Enable Civilians in CO-OP",
|
||||||
|
L"Use New Inventory (NIV)",
|
||||||
|
};
|
||||||
|
|
||||||
STR16 pDeliveryLocationStrings[] =
|
STR16 pDeliveryLocationStrings[] =
|
||||||
{
|
{
|
||||||
L"Austin", //Austin, Texas, USA
|
L"Austin", //Austin, Texas, USA
|
||||||
@@ -4543,6 +4597,22 @@ STR16 MPClientMessage[] =
|
|||||||
L"You have been defeated!",
|
L"You have been defeated!",
|
||||||
L"Sorry, climbing is disable in MP",
|
L"Sorry, climbing is disable in MP",
|
||||||
L"You Hired '%s'",
|
L"You Hired '%s'",
|
||||||
|
// 45
|
||||||
|
L"You cant change the map once purchasing has commenced",
|
||||||
|
L"Map changed to '%s'",
|
||||||
|
L"Client '%s' disconnected, removing from game",
|
||||||
|
L"You were disconnected from the game, returning to the Main Menu",
|
||||||
|
L"Connection failed, Retrying in 5 seconds, %i retries left...",
|
||||||
|
//50
|
||||||
|
L"Connection failed, giving up...",
|
||||||
|
L"You cannot start the game until another player has connected",
|
||||||
|
L"%s : %s",
|
||||||
|
L"Send to All",
|
||||||
|
L"Allies only",
|
||||||
|
// 55
|
||||||
|
L"Cannot join game. This game has already started.",
|
||||||
|
L"%s (team): %s",
|
||||||
|
L"Client #%i - '%s'",
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 MPHelp[] =
|
STR16 MPHelp[] =
|
||||||
@@ -4570,4 +4640,59 @@ STR16 MPHelp[] =
|
|||||||
L"'F1' - Display primary help",
|
L"'F1' - Display primary help",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gszMPEdgesText[] =
|
||||||
|
{
|
||||||
|
L"N",
|
||||||
|
L"S",
|
||||||
|
L"E",
|
||||||
|
L"W"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPTeamNames[] =
|
||||||
|
{
|
||||||
|
L"Foxtrot",
|
||||||
|
L"Bravo",
|
||||||
|
L"Delta",
|
||||||
|
L"Charlie"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPMapscreenText[] =
|
||||||
|
{
|
||||||
|
L"Game Type: ",
|
||||||
|
L"Players: ",
|
||||||
|
L"Mercs each: ",
|
||||||
|
L"You cannot change starting edge once Laptop is unlocked",
|
||||||
|
L"You cannot change teams once the Laptop is unlocked",
|
||||||
|
L"Random Mercs: ",
|
||||||
|
L"Y",
|
||||||
|
L"Difficulty:"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPSScreenText[] =
|
||||||
|
{
|
||||||
|
L"Scoreboard",
|
||||||
|
L"Continue",
|
||||||
|
L"Cancel",
|
||||||
|
L"Player",
|
||||||
|
L"Kills",
|
||||||
|
L"Deaths",
|
||||||
|
L"Queen's Army",
|
||||||
|
L"Hits",
|
||||||
|
L"Misses",
|
||||||
|
L"Accuracy",
|
||||||
|
L"Damage Dealt",
|
||||||
|
L"Damage Taken"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatToggleText[] =
|
||||||
|
{
|
||||||
|
L"Send to All",
|
||||||
|
L"Send to Allies only",
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatboxText[] =
|
||||||
|
{
|
||||||
|
L"Multiplayer Chat",
|
||||||
|
L"Chat: press ENTER to send of ESC to cancel",
|
||||||
|
};
|
||||||
#endif //ENGLISH
|
#endif //ENGLISH
|
||||||
|
|||||||
@@ -3811,6 +3811,60 @@ STR16 gzGIOScreenText[] =
|
|||||||
L"CONFIGURATION DU JEU (Les paramètres serveur seulement prennent effet)",
|
L"CONFIGURATION DU JEU (Les paramètres serveur seulement prennent effet)",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gzMPJScreenText[] =
|
||||||
|
{
|
||||||
|
L"MULTIPLAYER",
|
||||||
|
L"Join",
|
||||||
|
L"Host",
|
||||||
|
L"Cancel",
|
||||||
|
L"Refresh",
|
||||||
|
L"Player Name",
|
||||||
|
L"Server IP",
|
||||||
|
L"Port",
|
||||||
|
L"Server Name",
|
||||||
|
L"# Plrs",
|
||||||
|
L"Version",
|
||||||
|
L"Game Type",
|
||||||
|
L"Ping",
|
||||||
|
L"You must enter a player name",
|
||||||
|
L"You must enter a valid server IP address.\n (eg 192.168.0.1)",
|
||||||
|
L"You must enter a valid Server Port between 1 and 65535"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPHScreenText[] =
|
||||||
|
{
|
||||||
|
L"HOST GAME",
|
||||||
|
L"Start",
|
||||||
|
L"Cancel",
|
||||||
|
L"Server Name",
|
||||||
|
L"Game Type",
|
||||||
|
L"Deathmatch",
|
||||||
|
L"Team Deathmatch",
|
||||||
|
L"Co-operative",
|
||||||
|
L"Max Players",
|
||||||
|
L"Squad Size",
|
||||||
|
L"Merc Selection",
|
||||||
|
L"Random Mercs",
|
||||||
|
L"Hired by Player",
|
||||||
|
L"Starting Balance",
|
||||||
|
L"Can Hire Same Merc",
|
||||||
|
L"Report Hired Mercs",
|
||||||
|
L"Allow Bobby Rays",
|
||||||
|
L"Randomise Starting Edge",
|
||||||
|
L"You must enter a server name",
|
||||||
|
L"Max Players must be between 2 and 4",
|
||||||
|
L"Squad size must be between 1 and 6",
|
||||||
|
L"Time of Day",
|
||||||
|
L"Time of Day must be a 24 hr time (HH:MM)\n\n eg. 13:30 = 1.30pm",
|
||||||
|
L"Starting Cash must be a valid dollar amount ( no cents )\n\n eg. 150000" ,
|
||||||
|
L"Damage Multiplier",
|
||||||
|
L"Damage Multiplier must be a number between 0 and 5",
|
||||||
|
L"Turn Timer Multiplier",
|
||||||
|
L"Turn Timer multiplier must be a number between 1 and 200",
|
||||||
|
L"Enable Civilians in CO-OP",
|
||||||
|
L"Use New Inventory (NIV)",
|
||||||
|
};
|
||||||
|
|
||||||
STR16 pDeliveryLocationStrings[] =
|
STR16 pDeliveryLocationStrings[] =
|
||||||
{
|
{
|
||||||
L"Austin", //Austin, Texas, USA
|
L"Austin", //Austin, Texas, USA
|
||||||
@@ -4544,6 +4598,22 @@ STR16 MPClientMessage[] =
|
|||||||
L"You have been defeated!",
|
L"You have been defeated!",
|
||||||
L"Sorry, climbing is disable in MP",
|
L"Sorry, climbing is disable in MP",
|
||||||
L"You Hired '%s'",
|
L"You Hired '%s'",
|
||||||
|
// 45
|
||||||
|
L"You cant change the map once purchasing has commenced",
|
||||||
|
L"Map changed to '%s'",
|
||||||
|
L"Client '%s' disconnected, removing from game",
|
||||||
|
L"You were disconnected from the game, returning to the Main Menu",
|
||||||
|
L"Connection failed, Retrying in 5 seconds, %i retries left...",
|
||||||
|
//50
|
||||||
|
L"Connection failed, giving up...",
|
||||||
|
L"You cannot start the game until another player has connected",
|
||||||
|
L"%s : %s",
|
||||||
|
L"Send to All",
|
||||||
|
L"Allies only",
|
||||||
|
// 55
|
||||||
|
L"Cannot join game. This game has already started.",
|
||||||
|
L"%s (team): %s",
|
||||||
|
L"Client #%i - '%s'",
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 MPHelp[] =
|
STR16 MPHelp[] =
|
||||||
@@ -4571,4 +4641,60 @@ STR16 MPHelp[] =
|
|||||||
L"'F1' - Display primary help",
|
L"'F1' - Display primary help",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gszMPEdgesText[] =
|
||||||
|
{
|
||||||
|
L"N",
|
||||||
|
L"S",
|
||||||
|
L"E",
|
||||||
|
L"W"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPTeamNames[] =
|
||||||
|
{
|
||||||
|
L"Foxtrot",
|
||||||
|
L"Bravo",
|
||||||
|
L"Delta",
|
||||||
|
L"Charlie"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPMapscreenText[] =
|
||||||
|
{
|
||||||
|
L"Game Type: ",
|
||||||
|
L"Players: ",
|
||||||
|
L"Mercs each: ",
|
||||||
|
L"You cannot change starting edge once Laptop is unlocked",
|
||||||
|
L"You cannot change teams once the Laptop is unlocked",
|
||||||
|
L"Random Mercs: ",
|
||||||
|
L"Y",
|
||||||
|
L"Difficulty:"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPSScreenText[] =
|
||||||
|
{
|
||||||
|
L"Scoreboard",
|
||||||
|
L"Continue",
|
||||||
|
L"Cancel",
|
||||||
|
L"Player",
|
||||||
|
L"Kills",
|
||||||
|
L"Deaths",
|
||||||
|
L"Queen's Army",
|
||||||
|
L"Hits",
|
||||||
|
L"Misses",
|
||||||
|
L"Accuracy",
|
||||||
|
L"Damage Dealt",
|
||||||
|
L"Damage Taken"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatToggleText[] =
|
||||||
|
{
|
||||||
|
L"Send to All",
|
||||||
|
L"Send to Allies only",
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatboxText[] =
|
||||||
|
{
|
||||||
|
L"Multiplayer Chat",
|
||||||
|
L"Chat: press ENTER to send of ESC to cancel",
|
||||||
|
};
|
||||||
|
|
||||||
#endif //FRENCH
|
#endif //FRENCH
|
||||||
|
|||||||
@@ -3615,6 +3615,60 @@ STR16 gzGIOScreenText[] =
|
|||||||
L"GRUNDEINSTELLUNGEN (Nur Servereinstellungen werden verwendet)",
|
L"GRUNDEINSTELLUNGEN (Nur Servereinstellungen werden verwendet)",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gzMPJScreenText[] =
|
||||||
|
{
|
||||||
|
L"MULTIPLAYER",
|
||||||
|
L"Join",
|
||||||
|
L"Host",
|
||||||
|
L"Cancel",
|
||||||
|
L"Refresh",
|
||||||
|
L"Player Name",
|
||||||
|
L"Server IP",
|
||||||
|
L"Port",
|
||||||
|
L"Server Name",
|
||||||
|
L"# Plrs",
|
||||||
|
L"Version",
|
||||||
|
L"Game Type",
|
||||||
|
L"Ping",
|
||||||
|
L"You must enter a player name",
|
||||||
|
L"You must enter a valid server IP address.\n (eg 192.168.0.1)",
|
||||||
|
L"You must enter a valid Server Port between 1 and 65535"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPHScreenText[] =
|
||||||
|
{
|
||||||
|
L"HOST GAME",
|
||||||
|
L"Start",
|
||||||
|
L"Cancel",
|
||||||
|
L"Server Name",
|
||||||
|
L"Game Type",
|
||||||
|
L"Deathmatch",
|
||||||
|
L"Team Deathmatch",
|
||||||
|
L"Co-operative",
|
||||||
|
L"Max Players",
|
||||||
|
L"Squad Size",
|
||||||
|
L"Merc Selection",
|
||||||
|
L"Random Mercs",
|
||||||
|
L"Hired by Player",
|
||||||
|
L"Starting Balance",
|
||||||
|
L"Can Hire Same Merc",
|
||||||
|
L"Report Hired Mercs",
|
||||||
|
L"Allow Bobby Rays",
|
||||||
|
L"Randomise Starting Edge",
|
||||||
|
L"You must enter a server name",
|
||||||
|
L"Max Players must be between 2 and 4",
|
||||||
|
L"Squad size must be between 1 and 6",
|
||||||
|
L"Time of Day",
|
||||||
|
L"Time of Day must be a 24 hr time (HH:MM)\n\n eg. 13:30 = 1.30pm",
|
||||||
|
L"Starting Cash must be a valid dollar amount ( no cents )\n\n eg. 150000" ,
|
||||||
|
L"Damage Multiplier",
|
||||||
|
L"Damage Multiplier must be a number between 0 and 5",
|
||||||
|
L"Turn Timer Multiplier",
|
||||||
|
L"Turn Timer multiplier must be a number between 1 and 200",
|
||||||
|
L"Enable Civilians in CO-OP",
|
||||||
|
L"Use New Inventory (NIV)",
|
||||||
|
};
|
||||||
|
|
||||||
STR16 pDeliveryLocationStrings[] =
|
STR16 pDeliveryLocationStrings[] =
|
||||||
{
|
{
|
||||||
L"Austin", //Austin, Texas, USA
|
L"Austin", //Austin, Texas, USA
|
||||||
@@ -4343,6 +4397,22 @@ STR16 MPClientMessage[] =
|
|||||||
L"Sie wurden besiegt!",
|
L"Sie wurden besiegt!",
|
||||||
L"Auf Dächer klettern ist nicht erlaubt in einem Mehrspieler Spiel",
|
L"Auf Dächer klettern ist nicht erlaubt in einem Mehrspieler Spiel",
|
||||||
L"Sie haben '%s' angeheuert.",
|
L"Sie haben '%s' angeheuert.",
|
||||||
|
// 45
|
||||||
|
L"You cant change the map once purchasing has commenced",
|
||||||
|
L"Map changed to '%s'",
|
||||||
|
L"Client '%s' disconnected, removing from game",
|
||||||
|
L"You were disconnected from the game, returning to the Main Menu",
|
||||||
|
L"Connection failed, Retrying in 5 seconds, %i retries left...",
|
||||||
|
//50
|
||||||
|
L"Connection failed, giving up...",
|
||||||
|
L"You cannot start the game until another player has connected",
|
||||||
|
L"%s : %s",
|
||||||
|
L"Send to All",
|
||||||
|
L"Allies only",
|
||||||
|
// 55
|
||||||
|
L"Cannot join game. This game has already started.",
|
||||||
|
L"%s (team): %s",
|
||||||
|
L"Client #%i - '%s'",
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 MPHelp[] =
|
STR16 MPHelp[] =
|
||||||
@@ -4370,4 +4440,60 @@ STR16 MPHelp[] =
|
|||||||
L"'F1' - Anzeige der primären Hilfe",
|
L"'F1' - Anzeige der primären Hilfe",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gszMPEdgesText[] =
|
||||||
|
{
|
||||||
|
L"N",
|
||||||
|
L"S",
|
||||||
|
L"E",
|
||||||
|
L"W"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPTeamNames[] =
|
||||||
|
{
|
||||||
|
L"Foxtrot",
|
||||||
|
L"Bravo",
|
||||||
|
L"Delta",
|
||||||
|
L"Charlie"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPMapscreenText[] =
|
||||||
|
{
|
||||||
|
L"Game Type: ",
|
||||||
|
L"Players: ",
|
||||||
|
L"Mercs each: ",
|
||||||
|
L"You cannot change starting edge once Laptop is unlocked",
|
||||||
|
L"You cannot change teams once the Laptop is unlocked",
|
||||||
|
L"Random Mercs: ",
|
||||||
|
L"Y",
|
||||||
|
L"Difficulty:"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPSScreenText[] =
|
||||||
|
{
|
||||||
|
L"Scoreboard",
|
||||||
|
L"Continue",
|
||||||
|
L"Cancel",
|
||||||
|
L"Player",
|
||||||
|
L"Kills",
|
||||||
|
L"Deaths",
|
||||||
|
L"Queen's Army",
|
||||||
|
L"Hits",
|
||||||
|
L"Misses",
|
||||||
|
L"Accuracy",
|
||||||
|
L"Damage Dealt",
|
||||||
|
L"Damage Taken"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatToggleText[] =
|
||||||
|
{
|
||||||
|
L"Send to All",
|
||||||
|
L"Send to Allies only",
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatboxText[] =
|
||||||
|
{
|
||||||
|
L"Multiplayer Chat",
|
||||||
|
L"Chat: press ENTER to send of ESC to cancel",
|
||||||
|
};
|
||||||
|
|
||||||
#endif //GERMAN
|
#endif //GERMAN
|
||||||
|
|||||||
@@ -3790,6 +3790,60 @@ STR16 gzGIOScreenText[] =
|
|||||||
L"INITIAL GAME SETTINGS (Only the server settings take effect)",
|
L"INITIAL GAME SETTINGS (Only the server settings take effect)",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gzMPJScreenText[] =
|
||||||
|
{
|
||||||
|
L"MULTIPLAYER",
|
||||||
|
L"Join",
|
||||||
|
L"Host",
|
||||||
|
L"Cancel",
|
||||||
|
L"Refresh",
|
||||||
|
L"Player Name",
|
||||||
|
L"Server IP",
|
||||||
|
L"Port",
|
||||||
|
L"Server Name",
|
||||||
|
L"# Plrs",
|
||||||
|
L"Version",
|
||||||
|
L"Game Type",
|
||||||
|
L"Ping",
|
||||||
|
L"You must enter a player name",
|
||||||
|
L"You must enter a valid server IP address.\n (eg 192.168.0.1)",
|
||||||
|
L"You must enter a valid Server Port between 1 and 65535"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPHScreenText[] =
|
||||||
|
{
|
||||||
|
L"HOST GAME",
|
||||||
|
L"Start",
|
||||||
|
L"Cancel",
|
||||||
|
L"Server Name",
|
||||||
|
L"Game Type",
|
||||||
|
L"Deathmatch",
|
||||||
|
L"Team Deathmatch",
|
||||||
|
L"Co-operative",
|
||||||
|
L"Max Players",
|
||||||
|
L"Squad Size",
|
||||||
|
L"Merc Selection",
|
||||||
|
L"Random Mercs",
|
||||||
|
L"Hired by Player",
|
||||||
|
L"Starting Balance",
|
||||||
|
L"Can Hire Same Merc",
|
||||||
|
L"Report Hired Mercs",
|
||||||
|
L"Allow Bobby Rays",
|
||||||
|
L"Randomise Starting Edge",
|
||||||
|
L"You must enter a server name",
|
||||||
|
L"Max Players must be between 2 and 4",
|
||||||
|
L"Squad size must be between 1 and 6",
|
||||||
|
L"Time of Day",
|
||||||
|
L"Time of Day must be a 24 hr time (HH:MM)\n\n eg. 13:30 = 1.30pm",
|
||||||
|
L"Starting Cash must be a valid dollar amount ( no cents )\n\n eg. 150000" ,
|
||||||
|
L"Damage Multiplier",
|
||||||
|
L"Damage Multiplier must be a number between 0 and 5",
|
||||||
|
L"Turn Timer Multiplier",
|
||||||
|
L"Turn Timer multiplier must be a number between 1 and 200",
|
||||||
|
L"Enable Civilians in CO-OP",
|
||||||
|
L"Use New Inventory (NIV)",
|
||||||
|
};
|
||||||
|
|
||||||
STR16 pDeliveryLocationStrings[] =
|
STR16 pDeliveryLocationStrings[] =
|
||||||
{
|
{
|
||||||
L"Austin", //Austin, Texas, USA
|
L"Austin", //Austin, Texas, USA
|
||||||
@@ -4528,6 +4582,22 @@ STR16 MPClientMessage[] =
|
|||||||
L"You have been defeated!",
|
L"You have been defeated!",
|
||||||
L"Sorry, climbing is disable in MP",
|
L"Sorry, climbing is disable in MP",
|
||||||
L"You Hired '%s'",
|
L"You Hired '%s'",
|
||||||
|
// 45
|
||||||
|
L"You cant change the map once purchasing has commenced",
|
||||||
|
L"Map changed to '%s'",
|
||||||
|
L"Client '%s' disconnected, removing from game",
|
||||||
|
L"You were disconnected from the game, returning to the Main Menu",
|
||||||
|
L"Connection failed, Retrying in 5 seconds, %i retries left...",
|
||||||
|
//50
|
||||||
|
L"Connection failed, giving up...",
|
||||||
|
L"You cannot start the game until another player has connected",
|
||||||
|
L"%s : %s",
|
||||||
|
L"Send to All",
|
||||||
|
L"Allies only",
|
||||||
|
// 55
|
||||||
|
L"Cannot join game. This game has already started.",
|
||||||
|
L"%s (team): %s",
|
||||||
|
L"Client #%i - '%s'",
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 MPHelp[] =
|
STR16 MPHelp[] =
|
||||||
@@ -4555,4 +4625,60 @@ STR16 MPHelp[] =
|
|||||||
L"'F1' - Display primary help",
|
L"'F1' - Display primary help",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gszMPEdgesText[] =
|
||||||
|
{
|
||||||
|
L"N",
|
||||||
|
L"S",
|
||||||
|
L"E",
|
||||||
|
L"W"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPTeamNames[] =
|
||||||
|
{
|
||||||
|
L"Foxtrot",
|
||||||
|
L"Bravo",
|
||||||
|
L"Delta",
|
||||||
|
L"Charlie"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPMapscreenText[] =
|
||||||
|
{
|
||||||
|
L"Game Type: ",
|
||||||
|
L"Players: ",
|
||||||
|
L"Mercs each: ",
|
||||||
|
L"You cannot change starting edge once Laptop is unlocked",
|
||||||
|
L"You cannot change teams once the Laptop is unlocked",
|
||||||
|
L"Random Mercs: ",
|
||||||
|
L"Y",
|
||||||
|
L"Difficulty:"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPSScreenText[] =
|
||||||
|
{
|
||||||
|
L"Scoreboard",
|
||||||
|
L"Continue",
|
||||||
|
L"Cancel",
|
||||||
|
L"Player",
|
||||||
|
L"Kills",
|
||||||
|
L"Deaths",
|
||||||
|
L"Queen's Army",
|
||||||
|
L"Hits",
|
||||||
|
L"Misses",
|
||||||
|
L"Accuracy",
|
||||||
|
L"Damage Dealt",
|
||||||
|
L"Damage Taken"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatToggleText[] =
|
||||||
|
{
|
||||||
|
L"Send to All",
|
||||||
|
L"Send to Allies only",
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatboxText[] =
|
||||||
|
{
|
||||||
|
L"Multiplayer Chat",
|
||||||
|
L"Chat: press ENTER to send of ESC to cancel",
|
||||||
|
};
|
||||||
|
|
||||||
#endif //ITALIAN
|
#endif //ITALIAN
|
||||||
|
|||||||
@@ -3803,6 +3803,60 @@ STR16 gzGIOScreenText[] =
|
|||||||
L"POCZĄTKOWE USTAWIENIA GRY (Only the server settings take effect)",
|
L"POCZĄTKOWE USTAWIENIA GRY (Only the server settings take effect)",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gzMPJScreenText[] =
|
||||||
|
{
|
||||||
|
L"MULTIPLAYER",
|
||||||
|
L"Join",
|
||||||
|
L"Host",
|
||||||
|
L"Cancel",
|
||||||
|
L"Refresh",
|
||||||
|
L"Player Name",
|
||||||
|
L"Server IP",
|
||||||
|
L"Port",
|
||||||
|
L"Server Name",
|
||||||
|
L"# Plrs",
|
||||||
|
L"Version",
|
||||||
|
L"Game Type",
|
||||||
|
L"Ping",
|
||||||
|
L"You must enter a player name",
|
||||||
|
L"You must enter a valid server IP address.\n (eg 192.168.0.1)",
|
||||||
|
L"You must enter a valid Server Port between 1 and 65535"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPHScreenText[] =
|
||||||
|
{
|
||||||
|
L"HOST GAME",
|
||||||
|
L"Start",
|
||||||
|
L"Cancel",
|
||||||
|
L"Server Name",
|
||||||
|
L"Game Type",
|
||||||
|
L"Deathmatch",
|
||||||
|
L"Team Deathmatch",
|
||||||
|
L"Co-operative",
|
||||||
|
L"Max Players",
|
||||||
|
L"Squad Size",
|
||||||
|
L"Merc Selection",
|
||||||
|
L"Random Mercs",
|
||||||
|
L"Hired by Player",
|
||||||
|
L"Starting Balance",
|
||||||
|
L"Can Hire Same Merc",
|
||||||
|
L"Report Hired Mercs",
|
||||||
|
L"Allow Bobby Rays",
|
||||||
|
L"Randomise Starting Edge",
|
||||||
|
L"You must enter a server name",
|
||||||
|
L"Max Players must be between 2 and 4",
|
||||||
|
L"Squad size must be between 1 and 6",
|
||||||
|
L"Time of Day",
|
||||||
|
L"Time of Day must be a 24 hr time (HH:MM)\n\n eg. 13:30 = 1.30pm",
|
||||||
|
L"Starting Cash must be a valid dollar amount ( no cents )\n\n eg. 150000" ,
|
||||||
|
L"Damage Multiplier",
|
||||||
|
L"Damage Multiplier must be a number between 0 and 5",
|
||||||
|
L"Turn Timer Multiplier",
|
||||||
|
L"Turn Timer multiplier must be a number between 1 and 200",
|
||||||
|
L"Enable Civilians in CO-OP",
|
||||||
|
L"Use New Inventory (NIV)",
|
||||||
|
};
|
||||||
|
|
||||||
STR16 pDeliveryLocationStrings[] =
|
STR16 pDeliveryLocationStrings[] =
|
||||||
{
|
{
|
||||||
L"Austin", //Austin, Texas, USA
|
L"Austin", //Austin, Texas, USA
|
||||||
@@ -4535,6 +4589,22 @@ STR16 MPClientMessage[] =
|
|||||||
L"Zostałeś pokonany!",
|
L"Zostałeś pokonany!",
|
||||||
L"Wspinanie wyłączone w MP",
|
L"Wspinanie wyłączone w MP",
|
||||||
L"Wynajęto '%s'",
|
L"Wynajęto '%s'",
|
||||||
|
// 45
|
||||||
|
L"You cant change the map once purchasing has commenced",
|
||||||
|
L"Map changed to '%s'",
|
||||||
|
L"Client '%s' disconnected, removing from game",
|
||||||
|
L"You were disconnected from the game, returning to the Main Menu",
|
||||||
|
L"Connection failed, Retrying in 5 seconds, %i retries left...",
|
||||||
|
//50
|
||||||
|
L"Connection failed, giving up...",
|
||||||
|
L"You cannot start the game until another player has connected",
|
||||||
|
L"%s : %s",
|
||||||
|
L"Send to All",
|
||||||
|
L"Allies only",
|
||||||
|
// 55
|
||||||
|
L"Cannot join game. This game has already started.",
|
||||||
|
L"%s (team): %s",
|
||||||
|
L"Client #%i - '%s'",
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 MPHelp[] =
|
STR16 MPHelp[] =
|
||||||
@@ -4562,4 +4632,60 @@ STR16 MPHelp[] =
|
|||||||
L"'F1' - Wyświetl 1. pomoc",
|
L"'F1' - Wyświetl 1. pomoc",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gszMPEdgesText[] =
|
||||||
|
{
|
||||||
|
L"N",
|
||||||
|
L"S",
|
||||||
|
L"E",
|
||||||
|
L"W"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPTeamNames[] =
|
||||||
|
{
|
||||||
|
L"Foxtrot",
|
||||||
|
L"Bravo",
|
||||||
|
L"Delta",
|
||||||
|
L"Charlie"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPMapscreenText[] =
|
||||||
|
{
|
||||||
|
L"Game Type: ",
|
||||||
|
L"Players: ",
|
||||||
|
L"Mercs each: ",
|
||||||
|
L"You cannot change starting edge once Laptop is unlocked",
|
||||||
|
L"You cannot change teams once the Laptop is unlocked",
|
||||||
|
L"Random Mercs: ",
|
||||||
|
L"Y",
|
||||||
|
L"Difficulty:"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPSScreenText[] =
|
||||||
|
{
|
||||||
|
L"Scoreboard",
|
||||||
|
L"Continue",
|
||||||
|
L"Cancel",
|
||||||
|
L"Player",
|
||||||
|
L"Kills",
|
||||||
|
L"Deaths",
|
||||||
|
L"Queen's Army",
|
||||||
|
L"Hits",
|
||||||
|
L"Misses",
|
||||||
|
L"Accuracy",
|
||||||
|
L"Damage Dealt",
|
||||||
|
L"Damage Taken"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatToggleText[] =
|
||||||
|
{
|
||||||
|
L"Send to All",
|
||||||
|
L"Send to Allies only",
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatboxText[] =
|
||||||
|
{
|
||||||
|
L"Multiplayer Chat",
|
||||||
|
L"Chat: press ENTER to send of ESC to cancel",
|
||||||
|
};
|
||||||
|
|
||||||
#endif //POLISH
|
#endif //POLISH
|
||||||
|
|||||||
@@ -3805,6 +3805,60 @@ STR16 gzGIOScreenText[] =
|
|||||||
L"УСТАНОВКИ ИГРЫ (будут заменены настройками сервера)",
|
L"УСТАНОВКИ ИГРЫ (будут заменены настройками сервера)",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gzMPJScreenText[] =
|
||||||
|
{
|
||||||
|
L"MULTIPLAYER",
|
||||||
|
L"Join",
|
||||||
|
L"Host",
|
||||||
|
L"Cancel",
|
||||||
|
L"Refresh",
|
||||||
|
L"Player Name",
|
||||||
|
L"Server IP",
|
||||||
|
L"Port",
|
||||||
|
L"Server Name",
|
||||||
|
L"# Plrs",
|
||||||
|
L"Version",
|
||||||
|
L"Game Type",
|
||||||
|
L"Ping",
|
||||||
|
L"You must enter a player name",
|
||||||
|
L"You must enter a valid server IP address.\n (eg 192.168.0.1)",
|
||||||
|
L"You must enter a valid Server Port between 1 and 65535"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPHScreenText[] =
|
||||||
|
{
|
||||||
|
L"HOST GAME",
|
||||||
|
L"Start",
|
||||||
|
L"Cancel",
|
||||||
|
L"Server Name",
|
||||||
|
L"Game Type",
|
||||||
|
L"Deathmatch",
|
||||||
|
L"Team Deathmatch",
|
||||||
|
L"Co-operative",
|
||||||
|
L"Max Players",
|
||||||
|
L"Squad Size",
|
||||||
|
L"Merc Selection",
|
||||||
|
L"Random Mercs",
|
||||||
|
L"Hired by Player",
|
||||||
|
L"Starting Balance",
|
||||||
|
L"Can Hire Same Merc",
|
||||||
|
L"Report Hired Mercs",
|
||||||
|
L"Allow Bobby Rays",
|
||||||
|
L"Randomise Starting Edge",
|
||||||
|
L"You must enter a server name",
|
||||||
|
L"Max Players must be between 2 and 4",
|
||||||
|
L"Squad size must be between 1 and 6",
|
||||||
|
L"Time of Day",
|
||||||
|
L"Time of Day must be a 24 hr time (HH:MM)\n\n eg. 13:30 = 1.30pm",
|
||||||
|
L"Starting Cash must be a valid dollar amount ( no cents )\n\n eg. 150000" ,
|
||||||
|
L"Damage Multiplier",
|
||||||
|
L"Damage Multiplier must be a number between 0 and 5",
|
||||||
|
L"Turn Timer Multiplier",
|
||||||
|
L"Turn Timer multiplier must be a number between 1 and 200",
|
||||||
|
L"Enable Civilians in CO-OP",
|
||||||
|
L"Use New Inventory (NIV)",
|
||||||
|
};
|
||||||
|
|
||||||
STR16 pDeliveryLocationStrings[] =
|
STR16 pDeliveryLocationStrings[] =
|
||||||
{
|
{
|
||||||
L"Остин", //Austin, Texas, USA
|
L"Остин", //Austin, Texas, USA
|
||||||
@@ -4539,6 +4593,22 @@ STR16 MPClientMessage[] =
|
|||||||
L"Вы потерпели поражение!",
|
L"Вы потерпели поражение!",
|
||||||
L"Извините, залезать на крышу в сетевой игре запрещено.",
|
L"Извините, залезать на крышу в сетевой игре запрещено.",
|
||||||
L"Вы наняли %s.",
|
L"Вы наняли %s.",
|
||||||
|
// 45
|
||||||
|
L"You cant change the map once purchasing has commenced",
|
||||||
|
L"Map changed to '%s'",
|
||||||
|
L"Client '%s' disconnected, removing from game",
|
||||||
|
L"You were disconnected from the game, returning to the Main Menu",
|
||||||
|
L"Connection failed, Retrying in 5 seconds, %i retries left...",
|
||||||
|
//50
|
||||||
|
L"Connection failed, giving up...",
|
||||||
|
L"You cannot start the game until another player has connected",
|
||||||
|
L"%s : %s",
|
||||||
|
L"Send to All",
|
||||||
|
L"Allies only",
|
||||||
|
// 55
|
||||||
|
L"Cannot join game. This game has already started.",
|
||||||
|
L"%s (team): %s",
|
||||||
|
L"Client #%i - '%s'",
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 MPHelp[] =
|
STR16 MPHelp[] =
|
||||||
@@ -4566,4 +4636,60 @@ STR16 MPHelp[] =
|
|||||||
L"'F1' - Показать основную помощь.",
|
L"'F1' - Показать основную помощь.",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gszMPEdgesText[] =
|
||||||
|
{
|
||||||
|
L"N",
|
||||||
|
L"S",
|
||||||
|
L"E",
|
||||||
|
L"W"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPTeamNames[] =
|
||||||
|
{
|
||||||
|
L"Foxtrot",
|
||||||
|
L"Bravo",
|
||||||
|
L"Delta",
|
||||||
|
L"Charlie"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPMapscreenText[] =
|
||||||
|
{
|
||||||
|
L"Game Type: ",
|
||||||
|
L"Players: ",
|
||||||
|
L"Mercs each: ",
|
||||||
|
L"You cannot change starting edge once Laptop is unlocked",
|
||||||
|
L"You cannot change teams once the Laptop is unlocked",
|
||||||
|
L"Random Mercs: ",
|
||||||
|
L"Y",
|
||||||
|
L"Difficulty:"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPSScreenText[] =
|
||||||
|
{
|
||||||
|
L"Scoreboard",
|
||||||
|
L"Continue",
|
||||||
|
L"Cancel",
|
||||||
|
L"Player",
|
||||||
|
L"Kills",
|
||||||
|
L"Deaths",
|
||||||
|
L"Queen's Army",
|
||||||
|
L"Hits",
|
||||||
|
L"Misses",
|
||||||
|
L"Accuracy",
|
||||||
|
L"Damage Dealt",
|
||||||
|
L"Damage Taken"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatToggleText[] =
|
||||||
|
{
|
||||||
|
L"Send to All",
|
||||||
|
L"Send to Allies only",
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatboxText[] =
|
||||||
|
{
|
||||||
|
L"Multiplayer Chat",
|
||||||
|
L"Chat: press ENTER to send of ESC to cancel",
|
||||||
|
};
|
||||||
|
|
||||||
#endif //RUSSIAN
|
#endif //RUSSIAN
|
||||||
|
|||||||
@@ -3810,6 +3810,60 @@ STR16 gzGIOScreenText[] =
|
|||||||
L"INITIAL GAME SETTINGS (Only the server settings take effect)",
|
L"INITIAL GAME SETTINGS (Only the server settings take effect)",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gzMPJScreenText[] =
|
||||||
|
{
|
||||||
|
L"MULTIPLAYER",
|
||||||
|
L"Join",
|
||||||
|
L"Host",
|
||||||
|
L"Cancel",
|
||||||
|
L"Refresh",
|
||||||
|
L"Player Name",
|
||||||
|
L"Server IP",
|
||||||
|
L"Port",
|
||||||
|
L"Server Name",
|
||||||
|
L"# Plrs",
|
||||||
|
L"Version",
|
||||||
|
L"Game Type",
|
||||||
|
L"Ping",
|
||||||
|
L"You must enter a player name",
|
||||||
|
L"You must enter a valid server IP address.\n (eg 192.168.0.1)",
|
||||||
|
L"You must enter a valid Server Port between 1 and 65535"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPHScreenText[] =
|
||||||
|
{
|
||||||
|
L"HOST GAME",
|
||||||
|
L"Start",
|
||||||
|
L"Cancel",
|
||||||
|
L"Server Name",
|
||||||
|
L"Game Type",
|
||||||
|
L"Deathmatch",
|
||||||
|
L"Team Deathmatch",
|
||||||
|
L"Co-operative",
|
||||||
|
L"Max Players",
|
||||||
|
L"Squad Size",
|
||||||
|
L"Merc Selection",
|
||||||
|
L"Random Mercs",
|
||||||
|
L"Hired by Player",
|
||||||
|
L"Starting Balance",
|
||||||
|
L"Can Hire Same Merc",
|
||||||
|
L"Report Hired Mercs",
|
||||||
|
L"Allow Bobby Rays",
|
||||||
|
L"Randomise Starting Edge",
|
||||||
|
L"You must enter a server name",
|
||||||
|
L"Max Players must be between 2 and 4",
|
||||||
|
L"Squad size must be between 1 and 6",
|
||||||
|
L"Time of Day",
|
||||||
|
L"Time of Day must be a 24 hr time (HH:MM)\n\n eg. 13:30 = 1.30pm",
|
||||||
|
L"Starting Cash must be a valid dollar amount ( no cents )\n\n eg. 150000" ,
|
||||||
|
L"Damage Multiplier",
|
||||||
|
L"Damage Multiplier must be a number between 0 and 5",
|
||||||
|
L"Turn Timer Multiplier",
|
||||||
|
L"Turn Timer multiplier must be a number between 1 and 200",
|
||||||
|
L"Enable Civilians in CO-OP",
|
||||||
|
L"Use New Inventory (NIV)",
|
||||||
|
};
|
||||||
|
|
||||||
STR16 pDeliveryLocationStrings[] =
|
STR16 pDeliveryLocationStrings[] =
|
||||||
{
|
{
|
||||||
L"Austin", //Austin, Texas, USA
|
L"Austin", //Austin, Texas, USA
|
||||||
@@ -4542,6 +4596,22 @@ STR16 MPClientMessage[] =
|
|||||||
L"You have been defeated!",
|
L"You have been defeated!",
|
||||||
L"Sorry, climbing is disable in MP",
|
L"Sorry, climbing is disable in MP",
|
||||||
L"You Hired '%s'",
|
L"You Hired '%s'",
|
||||||
|
// 45
|
||||||
|
L"You cant change the map once purchasing has commenced",
|
||||||
|
L"Map changed to '%s'",
|
||||||
|
L"Client '%s' disconnected, removing from game",
|
||||||
|
L"You were disconnected from the game, returning to the Main Menu",
|
||||||
|
L"Connection failed, Retrying in 5 seconds, %i retries left...",
|
||||||
|
//50
|
||||||
|
L"Connection failed, giving up...",
|
||||||
|
L"You cannot start the game until another player has connected",
|
||||||
|
L"%s : %s",
|
||||||
|
L"Send to All",
|
||||||
|
L"Allies only",
|
||||||
|
// 55
|
||||||
|
L"Cannot join game. This game has already started.",
|
||||||
|
L"%s (team): %s",
|
||||||
|
L"Client #%i - '%s'",
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 MPHelp[] =
|
STR16 MPHelp[] =
|
||||||
@@ -4569,4 +4639,60 @@ STR16 MPHelp[] =
|
|||||||
L"'F1' - Display primary help",
|
L"'F1' - Display primary help",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
STR16 gszMPEdgesText[] =
|
||||||
|
{
|
||||||
|
L"N",
|
||||||
|
L"S",
|
||||||
|
L"E",
|
||||||
|
L"W"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPTeamNames[] =
|
||||||
|
{
|
||||||
|
L"Foxtrot",
|
||||||
|
L"Bravo",
|
||||||
|
L"Delta",
|
||||||
|
L"Charlie"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gszMPMapscreenText[] =
|
||||||
|
{
|
||||||
|
L"Game Type: ",
|
||||||
|
L"Players: ",
|
||||||
|
L"Mercs each: ",
|
||||||
|
L"You cannot change starting edge once Laptop is unlocked",
|
||||||
|
L"You cannot change teams once the Laptop is unlocked",
|
||||||
|
L"Random Mercs: ",
|
||||||
|
L"Y",
|
||||||
|
L"Difficulty:"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPSScreenText[] =
|
||||||
|
{
|
||||||
|
L"Scoreboard",
|
||||||
|
L"Continue",
|
||||||
|
L"Cancel",
|
||||||
|
L"Player",
|
||||||
|
L"Kills",
|
||||||
|
L"Deaths",
|
||||||
|
L"Queen's Army",
|
||||||
|
L"Hits",
|
||||||
|
L"Misses",
|
||||||
|
L"Accuracy",
|
||||||
|
L"Damage Dealt",
|
||||||
|
L"Damage Taken"
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatToggleText[] =
|
||||||
|
{
|
||||||
|
L"Send to All",
|
||||||
|
L"Send to Allies only",
|
||||||
|
};
|
||||||
|
|
||||||
|
STR16 gzMPChatboxText[] =
|
||||||
|
{
|
||||||
|
L"Multiplayer Chat",
|
||||||
|
L"Chat: press ENTER to send of ESC to cancel",
|
||||||
|
};
|
||||||
|
|
||||||
#endif //TAIWANESE
|
#endif //TAIWANESE
|
||||||
|
|||||||
@@ -69,6 +69,15 @@ UINT8 GetRangeOfMapScreenMessages( void );
|
|||||||
|
|
||||||
void EnableDisableScrollStringVideoOverlay( BOOLEAN fEnable );
|
void EnableDisableScrollStringVideoOverlay( BOOLEAN fEnable );
|
||||||
|
|
||||||
|
// OJW - 20090315 - Allow access to these functions outside of message
|
||||||
|
// adding chat log
|
||||||
|
ScrollStringStPtr GetNextString(ScrollStringStPtr pStringSt);
|
||||||
|
ScrollStringStPtr GetPrevString(ScrollStringStPtr pStringSt);
|
||||||
|
void SetStringPosition(ScrollStringStPtr pStringSt, UINT16 x, UINT16 y);
|
||||||
|
void SetStringColor(ScrollStringStPtr pStringSt, UINT16 color);
|
||||||
|
ScrollStringStPtr SetStringNext(ScrollStringStPtr pStringSt, ScrollStringStPtr pNext);
|
||||||
|
ScrollStringStPtr SetStringPrev(ScrollStringStPtr pStringSt, ScrollStringStPtr pPrev);
|
||||||
|
void SetString(ScrollStringStPtr pStringSt, STR16 String);
|
||||||
// will go and clear all displayed strings off the screen
|
// will go and clear all displayed strings off the screen
|
||||||
void ClearDisplayedListOfTacticalStrings( void );
|
void ClearDisplayedListOfTacticalStrings( void );
|
||||||
|
|
||||||
|
|||||||
+12
-3
@@ -56,6 +56,7 @@ extern BOOLEAN gfTacticalPlacementGUIActive;
|
|||||||
extern BOOLEAN gfTacticalPlacementGUIDirty;
|
extern BOOLEAN gfTacticalPlacementGUIDirty;
|
||||||
extern BOOLEAN gfValidLocationsChanged;
|
extern BOOLEAN gfValidLocationsChanged;
|
||||||
extern BOOLEAN gfInMsgBox;
|
extern BOOLEAN gfInMsgBox;
|
||||||
|
extern BOOLEAN gfInChatBox; // OJW - 20090314 - new chatbox
|
||||||
extern void InitSightRange(); //lal
|
extern void InitSightRange(); //lal
|
||||||
|
|
||||||
|
|
||||||
@@ -152,7 +153,10 @@ BOOLEAN InitializeGame(void)
|
|||||||
//InitGameOptions();
|
//InitGameOptions();
|
||||||
|
|
||||||
// preload mapscreen graphics
|
// preload mapscreen graphics
|
||||||
HandlePreloadOfMapGraphics( );
|
// OJW - Temporarily disabliing this as is_networked is not set up yet
|
||||||
|
// <TODO> see if there is a better place we can pre-load the gfx if nessesary
|
||||||
|
// or perhaps just reload the bits that will change
|
||||||
|
//HandlePreloadOfMapGraphics( );
|
||||||
|
|
||||||
guiCurrentScreen = INIT_SCREEN;
|
guiCurrentScreen = INIT_SCREEN;
|
||||||
|
|
||||||
@@ -300,6 +304,11 @@ void GameLoop(void)
|
|||||||
guiPendingScreen = MSG_BOX_SCREEN;
|
guiPendingScreen = MSG_BOX_SCREEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OJW - 20090314 - new chatbox
|
||||||
|
if (gfInChatBox)
|
||||||
|
{
|
||||||
|
guiPendingScreen = MP_CHAT_SCREEN;
|
||||||
|
}
|
||||||
if ( guiPendingScreen != NO_PENDING_SCREEN )
|
if ( guiPendingScreen != NO_PENDING_SCREEN )
|
||||||
{
|
{
|
||||||
// Based on active screen, deinit!
|
// Based on active screen, deinit!
|
||||||
@@ -308,7 +317,7 @@ void GameLoop(void)
|
|||||||
switch( guiCurrentScreen )
|
switch( guiCurrentScreen )
|
||||||
{
|
{
|
||||||
case MAP_SCREEN:
|
case MAP_SCREEN:
|
||||||
if( guiPendingScreen != MSG_BOX_SCREEN )
|
if( guiPendingScreen != MSG_BOX_SCREEN && guiPendingScreen != MP_CHAT_SCREEN )
|
||||||
{
|
{
|
||||||
EndMapScreen( FALSE );
|
EndMapScreen( FALSE );
|
||||||
}
|
}
|
||||||
@@ -411,7 +420,7 @@ extern UINT32 guiRainLoop;
|
|||||||
void HandleNewScreenChange( UINT32 uiNewScreen, UINT32 uiOldScreen )
|
void HandleNewScreenChange( UINT32 uiNewScreen, UINT32 uiOldScreen )
|
||||||
{
|
{
|
||||||
//if we are not going into the message box screen, and we didnt just come from it
|
//if we are not going into the message box screen, and we didnt just come from it
|
||||||
if( ( uiNewScreen != MSG_BOX_SCREEN && uiOldScreen != MSG_BOX_SCREEN ) )
|
if( ( uiNewScreen != MSG_BOX_SCREEN && uiOldScreen != MSG_BOX_SCREEN && uiNewScreen != MP_CHAT_SCREEN && uiOldScreen != MP_CHAT_SCREEN ) )
|
||||||
{
|
{
|
||||||
//reset the help screen
|
//reset the help screen
|
||||||
NewScreenSoResetHelpScreen( );
|
NewScreenSoResetHelpScreen( );
|
||||||
|
|||||||
+1
-1
@@ -654,7 +654,7 @@ UINT32 MainGameScreenHandle(void)
|
|||||||
return( GAME_SCREEN );
|
return( GAME_SCREEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( guiCurrentScreen != MSG_BOX_SCREEN )
|
if ( guiCurrentScreen != MSG_BOX_SCREEN && guiCurrentScreen != MP_CHAT_SCREEN )
|
||||||
{
|
{
|
||||||
if ( HandleBeginFadeOut( GAME_SCREEN ) )
|
if ( HandleBeginFadeOut( GAME_SCREEN ) )
|
||||||
{
|
{
|
||||||
|
|||||||
+34
-2
@@ -66,7 +66,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="Winmm.lib .\Multiplayer\raknet\RakNetLibStaticDebug.lib ws2_32.lib"
|
AdditionalDependencies="Winmm.lib .\Multiplayer\raknet\RakNetLibStaticDebug.lib ws2_32.lib"
|
||||||
OutputFile="$(OutDir)\ja2_debug_2620_en.exe"
|
OutputFile="$(OutDir)\ja2_debug_2628_en.exe"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="Winmm.lib .\Multiplayer\raknet\RakNetLibStatic.lib ws2_32.lib"
|
AdditionalDependencies="Winmm.lib .\Multiplayer\raknet\RakNetLibStatic.lib ws2_32.lib"
|
||||||
OutputFile="$(OutDir)\ja2_release_2620_en.exe"
|
OutputFile="$(OutDir)\ja2_release_2628_en.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
GenerateMapFile="true"
|
GenerateMapFile="true"
|
||||||
@@ -424,6 +424,22 @@
|
|||||||
RelativePath=".\MessageBoxScreen.cpp"
|
RelativePath=".\MessageBoxScreen.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPChatScreen.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPHostScreen.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPJoinScreen.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPScoreScreen.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Options Screen.cpp"
|
RelativePath=".\Options Screen.cpp"
|
||||||
>
|
>
|
||||||
@@ -550,6 +566,22 @@
|
|||||||
RelativePath=".\MessageBoxScreen.h"
|
RelativePath=".\MessageBoxScreen.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPChatScreen.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPHostScreen.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPJoinScreen.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPScoreScreen.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Options Screen.h"
|
RelativePath=".\Options Screen.h"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -435,6 +435,22 @@
|
|||||||
RelativePath="MessageBoxScreen.h"
|
RelativePath="MessageBoxScreen.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPChatScreen.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPHostScreen.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPJoinScreen.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPScoreScreen.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="Options Screen.h"
|
RelativePath="Options Screen.h"
|
||||||
>
|
>
|
||||||
@@ -597,6 +613,22 @@
|
|||||||
RelativePath="MessageBoxScreen.cpp"
|
RelativePath="MessageBoxScreen.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPChatScreen.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPHostScreen.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPJoinScreen.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\MPScoreScreen.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="Options Screen.cpp"
|
RelativePath="Options Screen.cpp"
|
||||||
>
|
>
|
||||||
|
|||||||
+18
@@ -118,6 +118,24 @@ extern UINT32 CreditScreenInit( void );
|
|||||||
extern UINT32 CreditScreenHandle( void );
|
extern UINT32 CreditScreenHandle( void );
|
||||||
extern UINT32 CreditScreenShutdown( void );
|
extern UINT32 CreditScreenShutdown( void );
|
||||||
|
|
||||||
|
// OJW - 20081129
|
||||||
|
extern UINT32 MPJoinScreenInit( void );
|
||||||
|
extern UINT32 MPJoinScreenHandle( void );
|
||||||
|
extern UINT32 MPJoinScreenShutdown( void );
|
||||||
|
|
||||||
|
extern UINT32 MPHostScreenInit( void );
|
||||||
|
extern UINT32 MPHostScreenHandle( void );
|
||||||
|
extern UINT32 MPHostScreenShutdown( void );
|
||||||
|
|
||||||
|
// OJW - 20081222
|
||||||
|
extern UINT32 MPScoreScreenInit( void );
|
||||||
|
extern UINT32 MPScoreScreenHandle( void );
|
||||||
|
extern UINT32 MPScoreScreenShutdown( void );
|
||||||
|
|
||||||
|
// OJW - 20090314
|
||||||
|
extern UINT32 MPChatScreenInit( void );
|
||||||
|
extern UINT32 MPChatScreenHandle( void );
|
||||||
|
extern UINT32 MPChatScreenShutdown( void );
|
||||||
|
|
||||||
// External functions
|
// External functions
|
||||||
void DisplayFrameRate( );
|
void DisplayFrameRate( );
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ typedef enum ScreenTypes
|
|||||||
DEMO_EXIT_SCREEN,
|
DEMO_EXIT_SCREEN,
|
||||||
INTRO_SCREEN,
|
INTRO_SCREEN,
|
||||||
CREDIT_SCREEN,
|
CREDIT_SCREEN,
|
||||||
|
MP_JOIN_SCREEN, // OJW - 20081129
|
||||||
|
MP_HOST_SCREEN,
|
||||||
|
MP_SCORE_SCREEN, // OJW - 20081222
|
||||||
|
MP_CHAT_SCREEN, // OJW - 20090315
|
||||||
|
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
AIVIEWER_SCREEN,
|
AIVIEWER_SCREEN,
|
||||||
|
|||||||
Reference in New Issue
Block a user