mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Merge branch 'master' into ExtraMercs
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "WordWrap.h"
|
||||
#include "Message.h"
|
||||
#include "Text.h"
|
||||
#include "Loading Screen.h"
|
||||
|
||||
double rStart, rEnd;
|
||||
double rActual;
|
||||
@@ -63,10 +64,31 @@ void CreateLoadingScreenProgressBar(BOOLEAN resetLoadScreenHint)
|
||||
// CreateProgressBar(0, 259 + ((SCREEN_WIDTH - 1024) / 2), 683 + ((SCREEN_HEIGHT - 768) / 2), 767 + ((SCREEN_WIDTH - 1024) / 2), 708 + ((SCREEN_HEIGHT - 768) / 2));
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
CreateProgressBar(0, SCREEN_WIDTH*162/640, SCREEN_HEIGHT*427/480, SCREEN_WIDTH*480/640, SCREEN_HEIGHT*443/480);
|
||||
FLOAT fScreenAspectRatio = (FLOAT)SCREEN_WIDTH / (FLOAT)SCREEN_HEIGHT;
|
||||
|
||||
if (gGameExternalOptions.ubLoadscreenStretchMode == 1 ||
|
||||
(gGameExternalOptions.ubLoadscreenStretchMode == 2 && fLoadingScreenAspectRatio > fScreenAspectRatio))
|
||||
{
|
||||
// match height, preserve aspect ratioernalOptions.ubLoadscreenStretchMode == 2 && fLoadingScreenAspectRatio > fScreenAspectRatio))
|
||||
INT32 iCalculatedWidth = (INT32)(SCREEN_HEIGHT * fLoadingScreenAspectRatio + 0.5f);
|
||||
|
||||
UINT16 usLeft = (UINT16)((SCREEN_WIDTH - iCalculatedWidth) / 2 + (iCalculatedWidth * 162.0f / 640.0f) + 0.5f);
|
||||
UINT16 usTop = (UINT16)((SCREEN_HEIGHT * 427.0f / 480.0f) + 0.5f);
|
||||
UINT16 usRight = (UINT16)((SCREEN_WIDTH - iCalculatedWidth) / 2 + (iCalculatedWidth * 478.0f / 640.0f) + 0.5f);
|
||||
UINT16 usBottom = (UINT16)((SCREEN_HEIGHT * 443.0f / 480.0f) + 0.5f);
|
||||
|
||||
CreateProgressBar(0, usLeft, usTop, usRight, usBottom);
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT16 usLeft = (UINT16)((SCREEN_WIDTH * 162.0f / 640.0f) + 0.5f);
|
||||
UINT16 usTop = (UINT16)((SCREEN_HEIGHT * 427.0f / 480.0f) + 0.5f);
|
||||
UINT16 usRight = (UINT16)((SCREEN_WIDTH * 478.0f / 640.0f) + 0.5f);
|
||||
UINT16 usBottom = (UINT16)((SCREEN_HEIGHT * 443.0f / 480.0f) + 0.5f);
|
||||
|
||||
CreateProgressBar(0, usLeft, usTop, usRight, usBottom);
|
||||
}
|
||||
|
||||
SetProgressBarUseBorder(0, FALSE );
|
||||
}
|
||||
@@ -334,6 +356,8 @@ void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT16 uiRelStartPerc, UINT16
|
||||
pCurr->rStart = (double)uiRelStartPerc*0.01f;
|
||||
pCurr->rEnd = (double)uiRelEndPerc*0.01f;
|
||||
|
||||
UINT8 yTextOffset = (UINT8)(3.0f * SCREEN_HEIGHT / 480.0f + 0.5f);
|
||||
|
||||
//Render the entire panel now, as it doesn't need update during the normal rendering
|
||||
if( pCurr->fPanel )
|
||||
{
|
||||
@@ -352,7 +376,7 @@ void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT16 uiRelStartPerc, UINT16
|
||||
usStartX = pCurr->usPanelLeft + // left position
|
||||
(pCurr->usPanelRight - pCurr->usPanelLeft)/2 - // + half width
|
||||
StringPixLength( pCurr->swzTitle, pCurr->usTitleFont ) / 2; // - half string width
|
||||
usStartY = pCurr->usPanelTop + 3;
|
||||
usStartY = pCurr->usPanelTop + yTextOffset;
|
||||
SetFont( pCurr->usTitleFont );
|
||||
SetFontForeground( pCurr->ubTitleFontForeColor );
|
||||
SetFontShadow( pCurr->ubTitleFontShadowColor );
|
||||
@@ -370,21 +394,21 @@ void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT16 uiRelStartPerc, UINT16
|
||||
{
|
||||
UINT16 usFontHeight = GetFontHeight( pCurr->usMsgFont );
|
||||
|
||||
RestoreExternBackgroundRect( pCurr->usBarLeft, pCurr->usBarBottom, (INT16)(pCurr->usBarRight-pCurr->usBarLeft), (INT16)(usFontHeight + 3) );
|
||||
RestoreExternBackgroundRect( pCurr->usBarLeft, pCurr->usBarBottom, (INT16)(pCurr->usBarRight-pCurr->usBarLeft), (INT16)(usFontHeight + yTextOffset) );
|
||||
}
|
||||
|
||||
SetFont( pCurr->usMsgFont );
|
||||
SetFontForeground( pCurr->ubMsgFontForeColor );
|
||||
SetFontShadow( pCurr->ubMsgFontShadowColor );
|
||||
SetFontBackground( 0 );
|
||||
mprintf( pCurr->usBarLeft, pCurr->usBarBottom + 3, str );
|
||||
mprintf( pCurr->usBarLeft, pCurr->usBarBottom + yTextOffset, str );
|
||||
}
|
||||
}
|
||||
|
||||
// Flugente: loadscreen hints
|
||||
if (gGameExternalOptions.gfUseLoadScreenHints && usCurrentLoadScreenHint )
|
||||
{
|
||||
ShowLoadScreenHintInLoadScreen(pCurr->usBarBottom + 3 - 100);
|
||||
ShowLoadScreenHintInLoadScreen(pCurr->usBarBottom + yTextOffset - 100);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,25 +432,24 @@ void RenderProgressBar( UINT8 ubID, UINT32 uiPercentage )
|
||||
|
||||
if( pCurr )
|
||||
{
|
||||
rActual = pCurr->rStart+(pCurr->rEnd-pCurr->rStart)*uiPercentage*0.01;
|
||||
rActual = pCurr->rStart + (pCurr->rEnd - pCurr->rStart) * uiPercentage * 0.01;
|
||||
|
||||
if( fabs(rActual - pCurr->rLastActual) < 0.01 )
|
||||
pCurr->rLastActual = (DOUBLE)((INT32)(std::round(rActual * 100)) * 0.01);
|
||||
|
||||
end = (INT32)(pCurr->usBarLeft + std::round(rActual * (pCurr->usBarRight - pCurr->usBarLeft)));
|
||||
if (end < pCurr->usBarLeft)
|
||||
{
|
||||
return;
|
||||
end = pCurr->usBarLeft;
|
||||
}
|
||||
|
||||
pCurr->rLastActual = ( DOUBLE )( ( INT32)( rActual * 100 ) * 0.01 );
|
||||
|
||||
end = (INT32)(pCurr->usBarLeft+2.0+rActual*(pCurr->usBarRight-pCurr->usBarLeft-4));
|
||||
if( end < pCurr->usBarLeft+2 || end > pCurr->usBarRight-2 )
|
||||
else if (end > pCurr->usBarRight)
|
||||
{
|
||||
return;
|
||||
end = pCurr->usBarRight;
|
||||
}
|
||||
if( !pCurr->fDrawBorder )
|
||||
{
|
||||
ColorFillVideoSurfaceArea( pCurr->uiFrameBuffer, //FRAME_BUFFER,
|
||||
pCurr->usBarLeft, pCurr->usBarTop, end, pCurr->usBarBottom,
|
||||
Get16BPPColor(FROMRGB( pCurr->ubColorFillRed, pCurr->ubColorFillGreen, pCurr->ubColorFillBlue )) );
|
||||
Get16BPPColor(FROMRGB(pCurr->ubColorFillRed, pCurr->ubColorFillGreen, pCurr->ubColorFillBlue)));
|
||||
//if( pCurr->usBarRight > gusLeftmostShaded )
|
||||
//{
|
||||
// ShadowVideoSurfaceRect( FRAME_BUFFER, gusLeftmostShaded+1, pCurr->usBarTop, end, pCurr->usBarBottom );
|
||||
@@ -493,7 +516,7 @@ void SetProgressBarTextDisplayFlag( UINT8 ubID, BOOLEAN fDisplayText, BOOLEAN fU
|
||||
//if we are to use the save buffer, blit the portion of the screen to the save buffer
|
||||
if( fSaveScreenToFrameBuffer )
|
||||
{
|
||||
UINT16 usFontHeight = GetFontHeight( pCurr->usMsgFont )+3;
|
||||
UINT16 usFontHeight = GetFontHeight(pCurr->usMsgFont) + (UINT8)(3.0f * SCREEN_HEIGHT / 480.f + 0.5f);
|
||||
|
||||
//blit everything to the save buffer ( cause the save buffer can bleed through )
|
||||
BlitBufferToBuffer(guiRENDERBUFFER, guiSAVEBUFFER, pCurr->usBarLeft, pCurr->usBarBottom, (UINT16)(pCurr->usBarRight-pCurr->usBarLeft), usFontHeight );
|
||||
|
||||
@@ -6,7 +6,6 @@ set(UtilsSrc
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Debug Control.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/dsutil.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Encrypted File.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Event Manager.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Event Pump.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/ExportStrings.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Font Control.cpp"
|
||||
|
||||
@@ -171,17 +171,6 @@ BINKFLIC *BinkOpenFlic( const CHAR8 *cFilename )
|
||||
ErrorMsg("BINK ERROR: Out of flic slots, cannot open another");
|
||||
return(NULL);
|
||||
}
|
||||
#ifndef USE_VFS
|
||||
// Attempt opening the filename
|
||||
if(!(pBink->hFileHandle = FileOpen( const_cast<CHAR8*>(cFilename), FILE_OPEN_EXISTING | FILE_ACCESS_READ, FALSE ) ) )
|
||||
{
|
||||
ErrorMsg("BINK ERROR: Can't open the BINK file");
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
//Get the real file handle for the file man handle for the smacker file
|
||||
HANDLE hFile = GetRealFileHandleFromFileManFileHandle( pBink->hFileHandle );
|
||||
#else
|
||||
vfs::Path introname(cFilename);
|
||||
vfs::Path dir,filename;
|
||||
introname.splitLast(dir,filename);
|
||||
@@ -207,11 +196,7 @@ BINKFLIC *BinkOpenFlic( const CHAR8 *cFilename )
|
||||
SGP_RETHROW(_BS(L"Intro file \"") << filename << L"\" could not be extracted" << _BS::wget, ex);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef USE_VFS
|
||||
if( !( pBink->BinkHandle = BinkOpen((CHAR8 *)hFile, BINKFILEHANDLE ) ) ) //| SMACKTRACKS
|
||||
#else
|
||||
vfs::Path tempfilename;
|
||||
try
|
||||
{
|
||||
@@ -226,7 +211,6 @@ BINKFLIC *BinkOpenFlic( const CHAR8 *cFilename )
|
||||
SGP_RETHROW(L"Temporary intro file could not be read", ex);
|
||||
}
|
||||
if( !( pBink->BinkHandle = BinkOpen(tempfilename.to_string().c_str(), BINKNOTHREADEDIO /*BINKFILEHANDLE*/ ) ) ) //| SMACKTRACKS
|
||||
#endif
|
||||
{
|
||||
ErrorMsg("BINK ERROR: Bink won't open the BINK file");
|
||||
return(NULL);
|
||||
|
||||
@@ -194,19 +194,6 @@ SMKFLIC *SmkOpenFlic(const CHAR8 *cFilename)
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
#ifndef USE_VFS
|
||||
// Attempt opening the filename
|
||||
if(!(pSmack->hFileHandle=FileOpen(cFilename, FILE_OPEN_EXISTING | FILE_ACCESS_READ, FALSE)))
|
||||
{
|
||||
ErrorMsg("SMK ERROR: Can't open the SMK file");
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
HANDLE hFile;
|
||||
|
||||
//Get the real file handle for the file man handle for the smacker file
|
||||
hFile = GetRealFileHandleFromFileManFileHandle( pSmack->hFileHandle );
|
||||
#else
|
||||
vfs::Path introname(cFilename);
|
||||
vfs::Path dir,filename;
|
||||
introname.splitLast(dir,filename);
|
||||
@@ -232,7 +219,6 @@ SMKFLIC *SmkOpenFlic(const CHAR8 *cFilename)
|
||||
SGP_RETHROW(_BS(L"Intro file \"") << filename << L"\" could not be extracted" << _BS::wget, ex);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Allocate a Smacker buffer for video decompression
|
||||
if(!(pSmack->SmackBuffer=SmackBufferOpen(hDisplayWindow,SMACKAUTOBLIT,SCREEN_WIDTH,SCREEN_HEIGHT,0,0)))
|
||||
@@ -240,9 +226,6 @@ SMKFLIC *SmkOpenFlic(const CHAR8 *cFilename)
|
||||
ErrorMsg("SMK ERROR: Can't allocate a Smacker decompression buffer");
|
||||
return(NULL);
|
||||
}
|
||||
#ifndef USE_VFS
|
||||
if(!(pSmack->SmackHandle=SmackOpen((CHAR8 *)hFile, SMACKFILEHANDLE | SMACKTRACKS, SMACKAUTOEXTRA)))
|
||||
#else
|
||||
// if(!(pSmack->SmackHandle=SmackOpen(cFilename, SMACKTRACKS, SMACKAUTOEXTRA)))
|
||||
vfs::Path tempfilename;
|
||||
try
|
||||
@@ -258,7 +241,6 @@ SMKFLIC *SmkOpenFlic(const CHAR8 *cFilename)
|
||||
SGP_RETHROW(L"Temporary intro file could not be read", ex);
|
||||
}
|
||||
if(!(pSmack->SmackHandle=SmackOpen(tempfilename.to_string().c_str(), SMACKTRACKS, SMACKAUTOEXTRA)))
|
||||
#endif
|
||||
{
|
||||
ErrorMsg("SMK ERROR: Smacker won't open the SMK file");
|
||||
return(NULL);
|
||||
|
||||
@@ -62,30 +62,10 @@ static struct LiveLog {
|
||||
|
||||
void LiveMessage( CHAR8 *strMessage)
|
||||
{
|
||||
#ifndef USE_VFS
|
||||
FILE *OutFile;
|
||||
|
||||
if ((OutFile = fopen("Log.txt", "a+t")) != NULL)
|
||||
{
|
||||
fprintf(OutFile, "%s\n", strMessage);
|
||||
fclose(OutFile);
|
||||
}
|
||||
#else
|
||||
SGP_LOG(s_LiveLog.id, strMessage);
|
||||
#endif
|
||||
}
|
||||
void MPDebugMsg( CHAR8 *strMessage)
|
||||
{
|
||||
#ifndef USE_VFS
|
||||
FILE *OutFile;
|
||||
|
||||
if ((OutFile = fopen("MPDebug.txt", "a+t")) != NULL)
|
||||
{
|
||||
fprintf(OutFile, "%s\n", strMessage);
|
||||
fclose(OutFile);
|
||||
}
|
||||
#else
|
||||
static vfs::Log& mpMsg = *vfs::Log::create(L"MPDebug.txt", true);
|
||||
mpMsg << strMessage << vfs::Log::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,234 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include "sgp.h"
|
||||
#include "container.h"
|
||||
#include "wcheck.h"
|
||||
#include "Event Manager.h"
|
||||
#include "Timer Control.h"
|
||||
|
||||
HLIST hEventQueue = NULL;
|
||||
HLIST hDelayEventQueue = NULL;
|
||||
HLIST hDemandEventQueue = NULL;
|
||||
|
||||
#define QUEUE_RESIZE 20
|
||||
|
||||
// LOCAL FUNCTIONS
|
||||
HLIST GetQueue( UINT8 ubQueueID );
|
||||
void SetQueue( UINT8 ubQueueID, HLIST hQueue );
|
||||
|
||||
|
||||
BOOLEAN InitializeEventManager( )
|
||||
{
|
||||
// Create Queue
|
||||
hEventQueue = CreateList( QUEUE_RESIZE, sizeof( PTR ) );
|
||||
|
||||
if ( hEventQueue == NULL )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// Create Delay Queue
|
||||
hDelayEventQueue = CreateList( QUEUE_RESIZE, sizeof( PTR ) );
|
||||
|
||||
if ( hDelayEventQueue == NULL )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// Create Demand Queue (events on this queue are only processed when specifically
|
||||
// called for by code)
|
||||
hDemandEventQueue = CreateList( QUEUE_RESIZE, sizeof( PTR ) );
|
||||
|
||||
if ( hDemandEventQueue == NULL )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
BOOLEAN ShutdownEventManager( )
|
||||
{
|
||||
if ( hEventQueue != NULL )
|
||||
{
|
||||
DeleteList( hEventQueue );
|
||||
}
|
||||
|
||||
if ( hDelayEventQueue != NULL )
|
||||
{
|
||||
DeleteList( hDelayEventQueue );
|
||||
}
|
||||
|
||||
if ( hDemandEventQueue != NULL )
|
||||
{
|
||||
DeleteList( hDemandEventQueue );
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN AddEvent( UINT32 uiEvent, UINT16 usDelay, PTR pEventData, UINT32 uiDataSize, UINT8 ubQueueID )
|
||||
{
|
||||
EVENT *pEvent;
|
||||
UINT32 uiEventSize = sizeof( EVENT );
|
||||
HLIST hQueue;
|
||||
|
||||
// Allocate new event
|
||||
pEvent = (EVENT *) MemAlloc( uiEventSize + uiDataSize );
|
||||
|
||||
CHECKF( pEvent != NULL );
|
||||
|
||||
// Set values
|
||||
pEvent->TimeStamp = GetJA2Clock( );
|
||||
pEvent->usDelay = usDelay;
|
||||
pEvent->uiEvent = uiEvent;
|
||||
pEvent->uiFlags = 0;
|
||||
pEvent->uiDataSize = uiDataSize;
|
||||
pEvent->pData = (BYTE*)pEvent;
|
||||
pEvent->pData = pEvent->pData + uiEventSize;
|
||||
|
||||
memcpy( pEvent->pData, pEventData, uiDataSize );
|
||||
|
||||
// Add event to queue
|
||||
hQueue = GetQueue( ubQueueID );
|
||||
hQueue = AddtoList( hQueue, &pEvent, ListSize( hQueue ) );
|
||||
SetQueue( ubQueueID, hQueue );
|
||||
|
||||
return( TRUE );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN RemoveEvent( EVENT **ppEvent, UINT32 uiIndex, UINT8 ubQueueID )
|
||||
{
|
||||
UINT32 uiQueueSize;
|
||||
HLIST hQueue;
|
||||
|
||||
// Get an event from queue, if one exists
|
||||
//
|
||||
|
||||
hQueue = GetQueue( ubQueueID );
|
||||
|
||||
|
||||
// Get Size
|
||||
uiQueueSize = ListSize( hQueue );
|
||||
|
||||
if ( uiQueueSize > 0 )
|
||||
{
|
||||
// Get
|
||||
CHECKF( RemfromList( hQueue , ppEvent, uiIndex ) != FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN PeekEvent( EVENT **ppEvent, UINT32 uiIndex , UINT8 ubQueueID )
|
||||
{
|
||||
UINT32 uiQueueSize;
|
||||
HLIST hQueue;
|
||||
|
||||
// Get an event from queue, if one exists
|
||||
//
|
||||
|
||||
hQueue = GetQueue( ubQueueID );
|
||||
|
||||
|
||||
// Get Size
|
||||
uiQueueSize = ListSize( hQueue );
|
||||
|
||||
if ( uiQueueSize > 0 )
|
||||
{
|
||||
// Get
|
||||
CHECKF( PeekList( hQueue, ppEvent, uiIndex ) != FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN FreeEvent( EVENT *pEvent )
|
||||
{
|
||||
CHECKF( pEvent != NULL );
|
||||
|
||||
// Delete event
|
||||
MemFree( pEvent );
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
UINT32 EventQueueSize( UINT8 ubQueueID )
|
||||
{
|
||||
UINT32 uiQueueSize;
|
||||
HLIST hQueue;
|
||||
|
||||
// Get an event from queue, if one exists
|
||||
//
|
||||
|
||||
hQueue = GetQueue( ubQueueID );
|
||||
|
||||
// Get Size
|
||||
uiQueueSize = ListSize( hQueue );
|
||||
|
||||
return( uiQueueSize );
|
||||
}
|
||||
|
||||
|
||||
HLIST GetQueue( UINT8 ubQueueID )
|
||||
{
|
||||
switch( ubQueueID )
|
||||
{
|
||||
case PRIMARY_EVENT_QUEUE:
|
||||
return( hEventQueue );
|
||||
break;
|
||||
|
||||
case SECONDARY_EVENT_QUEUE:
|
||||
return( hDelayEventQueue );
|
||||
break;
|
||||
|
||||
case DEMAND_EVENT_QUEUE:
|
||||
return( hDemandEventQueue );
|
||||
break;
|
||||
|
||||
default:
|
||||
Assert( FALSE );
|
||||
return( 0 );
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void SetQueue( UINT8 ubQueueID, HQUEUE hQueue )
|
||||
{
|
||||
switch( ubQueueID )
|
||||
{
|
||||
case PRIMARY_EVENT_QUEUE:
|
||||
hEventQueue = hQueue;
|
||||
break;
|
||||
|
||||
case SECONDARY_EVENT_QUEUE:
|
||||
hDelayEventQueue = hQueue;
|
||||
break;
|
||||
|
||||
case DEMAND_EVENT_QUEUE:
|
||||
hDemandEventQueue = hQueue;
|
||||
break;
|
||||
|
||||
default:
|
||||
Assert( FALSE );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
#ifndef __EVENT_MANAGER_H
|
||||
#define __EVENT_MANAGER_H
|
||||
|
||||
typedef struct
|
||||
{
|
||||
TIMER TimeStamp;
|
||||
UINT32 uiFlags;
|
||||
UINT16 usDelay;
|
||||
UINT32 uiEvent;
|
||||
UINT32 uiDataSize;
|
||||
BYTE *pData;
|
||||
|
||||
} EVENT;
|
||||
|
||||
#define PRIMARY_EVENT_QUEUE 0
|
||||
#define SECONDARY_EVENT_QUEUE 1
|
||||
#define DEMAND_EVENT_QUEUE 2
|
||||
|
||||
#define EVENT_EXPIRED 0x00000002
|
||||
|
||||
// Management fucntions
|
||||
BOOLEAN InitializeEventManager( );
|
||||
BOOLEAN ShutdownEventManager( );
|
||||
|
||||
BOOLEAN AddEvent( UINT32 uiEvent, UINT16 usDelay, PTR pEventData, UINT32 uiDataSize, UINT8 ubQueueID );
|
||||
BOOLEAN RemoveEvent( EVENT **ppEvent, UINT32 uiIndex , UINT8 ubQueueID );
|
||||
BOOLEAN PeekEvent( EVENT **ppEvent, UINT32 uiIndex , UINT8 ubQueueID );
|
||||
BOOLEAN FreeEvent( EVENT *pEvent );
|
||||
UINT32 EventQueueSize( UINT8 ubQueueID );
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+254
-115
@@ -1,21 +1,25 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include "sgp.h"
|
||||
#include "container.h"
|
||||
#include "wcheck.h"
|
||||
#include "Event Pump.h"
|
||||
#include "Timer.h"
|
||||
#include "Sound Control.h"
|
||||
#include "Overhead.h"
|
||||
#include "weapons.h"
|
||||
#include "Animation Control.h"
|
||||
#include "opplist.h"
|
||||
#include "Tactical Save.h"
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include "sgp.h"
|
||||
#include "wcheck.h"
|
||||
#include "Event Pump.h"
|
||||
#include "Timer.h"
|
||||
#include "Sound Control.h"
|
||||
#include "Overhead.h"
|
||||
#include "weapons.h"
|
||||
#include "Animation Control.h"
|
||||
#include "opplist.h"
|
||||
#include "Tactical Save.h"
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
|
||||
#ifdef NETWORKED
|
||||
#include "Networking.h"
|
||||
#include "NetworkEvent.h"
|
||||
#endif
|
||||
#include "MemMan.h"
|
||||
#include "Timer Control.h"
|
||||
#include "DEBUG.H"
|
||||
|
||||
UINT8 gubEncryptionArray4[ BASE_NUMBER_OF_ROTATION_ARRAYS * 3 ][ NEW_ROTATION_ARRAY_SIZE ] =
|
||||
{
|
||||
@@ -590,6 +594,44 @@ UINT8 gubEncryptionArray4[ BASE_NUMBER_OF_ROTATION_ARRAYS * 3 ][ NEW_ROTATION_AR
|
||||
},
|
||||
};
|
||||
|
||||
struct EVENT
|
||||
{
|
||||
TIMER TimeStamp;
|
||||
UINT32 uiFlags;
|
||||
UINT16 usDelay;
|
||||
UINT32 uiEvent;
|
||||
UINT32 uiDataSize;
|
||||
BYTE* pData;
|
||||
|
||||
EVENT(UINT16 delay, UINT32 event, UINT32 dataSize, BYTE* eventData) :
|
||||
TimeStamp(GetJA2Clock()),
|
||||
uiFlags(0),
|
||||
usDelay(delay),
|
||||
uiEvent(event),
|
||||
uiDataSize(dataSize),
|
||||
pData{ eventData }
|
||||
{
|
||||
}
|
||||
|
||||
EVENT() :
|
||||
TimeStamp(GetJA2Clock()),
|
||||
uiFlags(0),
|
||||
usDelay(0),
|
||||
uiEvent(0),
|
||||
uiDataSize(0),
|
||||
pData{ nullptr }
|
||||
{}
|
||||
};
|
||||
|
||||
#define PRIMARY_EVENT_QUEUE 0
|
||||
#define SECONDARY_EVENT_QUEUE 1
|
||||
#define DEMAND_EVENT_QUEUE 2
|
||||
#define EVENT_EXPIRED 0x00000002
|
||||
|
||||
std::queue<EVENT> hEventQueue;
|
||||
std::vector<EVENT> hDelayEventQueue;
|
||||
std::queue<EVENT> hDemandEventQueue;
|
||||
|
||||
// GLobals used here, for each event structure used,
|
||||
// Used as globals for stack reasons
|
||||
EV_E_PLAYSOUND EPlaySound;
|
||||
@@ -601,68 +643,144 @@ EV_S_GETNEWPATH SGetNewPath;
|
||||
EV_S_BEGINTURN SBeginTurn;
|
||||
EV_S_CHANGESTANCE SChangeStance;
|
||||
EV_S_SETDIRECTION SSetDirection;
|
||||
EV_S_SETDESIREDDIRECTION SSetDesiredDirection;
|
||||
EV_S_BEGINFIREWEAPON SBeginFireWeapon;
|
||||
EV_S_SETDESIREDDIRECTION SSetDesiredDirection;
|
||||
EV_S_BEGINFIREWEAPON SBeginFireWeapon;
|
||||
EV_S_FIREWEAPON SFireWeapon;
|
||||
EV_S_WEAPONHIT SWeaponHit;
|
||||
EV_S_STRUCTUREHIT SStructureHit;
|
||||
EV_S_WINDOWHIT SWindowHit;
|
||||
EV_S_MISS SMiss;
|
||||
EV_S_NOISE SNoise;
|
||||
EV_S_MISS SMiss;
|
||||
EV_S_NOISE SNoise;
|
||||
EV_S_STOP_MERC SStopMerc;
|
||||
EV_S_SENDPATHTONETWORK SUpdateNetworkSoldier;
|
||||
EV_S_SENDPATHTONETWORK SUpdateNetworkSoldier;
|
||||
|
||||
extern BOOLEAN gfAmINetworked;
|
||||
|
||||
BOOLEAN AddGameEventToQueue( UINT32 uiEvent, UINT16 usDelay, PTR pEventData, UINT8 ubQueueID );
|
||||
|
||||
BOOLEAN ExecuteGameEvent( EVENT *pEvent );
|
||||
|
||||
|
||||
BOOLEAN AddGameEvent( UINT32 uiEvent, UINT16 usDelay, PTR pEventData )
|
||||
BOOLEAN AddEvent(UINT32 uiEvent, UINT16 usDelay, PTR pEventData, UINT32 uiDataSize, UINT8 ubQueueID)
|
||||
{
|
||||
if (usDelay == DEMAND_EVENT_DELAY)
|
||||
BYTE* pData = (BYTE*)MemAlloc(uiDataSize);
|
||||
Assert(pData);
|
||||
memcpy(pData, pEventData, uiDataSize);
|
||||
|
||||
// Add event to queue
|
||||
switch (ubQueueID)
|
||||
{
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("AddGameEvent: Sending Local and network #%d", uiEvent));
|
||||
#ifdef NETWORKED
|
||||
if(gfAmINetworked)
|
||||
SendEventToNetwork(uiEvent, usDelay, pEventData);
|
||||
#endif
|
||||
return( AddGameEventToQueue( uiEvent, 0, pEventData, DEMAND_EVENT_QUEUE ) );
|
||||
case PRIMARY_EVENT_QUEUE:
|
||||
hEventQueue.emplace(usDelay, uiEvent, uiDataSize, pData);
|
||||
break;
|
||||
|
||||
case SECONDARY_EVENT_QUEUE:
|
||||
hDelayEventQueue.emplace_back(usDelay, uiEvent, uiDataSize, pData);
|
||||
break;
|
||||
|
||||
case DEMAND_EVENT_QUEUE:
|
||||
hDemandEventQueue.emplace(usDelay, uiEvent, uiDataSize, pData);
|
||||
break;
|
||||
|
||||
default:
|
||||
Assert(FALSE);
|
||||
break;
|
||||
}
|
||||
else if( uiEvent < EVENTS_LOCAL_AND_NETWORK)
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
static BOOLEAN RemoveEventFromSecondaryEventQueue(EVENT* ppEvent, UINT32 uiIndex)
|
||||
{
|
||||
if (uiIndex >= hDelayEventQueue.size())
|
||||
{
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("AddGameEvent: Sending Local and network #%d", uiEvent));
|
||||
#ifdef NETWORKED
|
||||
if(gfAmINetworked)
|
||||
SendEventToNetwork(uiEvent, usDelay, pEventData);
|
||||
#endif
|
||||
return( AddGameEventToQueue( uiEvent, usDelay, pEventData, PRIMARY_EVENT_QUEUE ) );
|
||||
}
|
||||
else if( uiEvent < EVENTS_ONLY_USED_LOCALLY)
|
||||
{
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("AddGameEvent: Sending Local #%d", uiEvent));
|
||||
return( AddGameEventToQueue( uiEvent, usDelay, pEventData, PRIMARY_EVENT_QUEUE ) );
|
||||
}
|
||||
else if( uiEvent < EVENTS_ONLY_SENT_OVER_NETWORK)
|
||||
{
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("AddGameEvent: Sending network #%d", uiEvent));
|
||||
#ifdef NETWORKED
|
||||
if(gfAmINetworked)
|
||||
SendEventToNetwork(uiEvent, usDelay, pEventData);
|
||||
#endif
|
||||
return(TRUE);
|
||||
}
|
||||
// There is an error with the event
|
||||
else
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
*ppEvent = hDelayEventQueue[uiIndex];
|
||||
hDelayEventQueue.erase(hDelayEventQueue.begin() + uiIndex);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
BOOLEAN AddGameEventFromNetwork( UINT32 uiEvent, UINT16 usDelay, PTR pEventData )
|
||||
|
||||
static BOOLEAN PopEvent(EVENT* ppEvent, UINT8 ubQueueID)
|
||||
{
|
||||
return( AddGameEventToQueue( uiEvent, usDelay, pEventData, PRIMARY_EVENT_QUEUE ) );
|
||||
// Get an event from queue, if one exists
|
||||
//
|
||||
switch (ubQueueID)
|
||||
{
|
||||
case PRIMARY_EVENT_QUEUE:
|
||||
if (!hEventQueue.empty())
|
||||
{
|
||||
*ppEvent = hEventQueue.front();
|
||||
hEventQueue.pop();
|
||||
return(TRUE);
|
||||
}
|
||||
break;
|
||||
|
||||
case SECONDARY_EVENT_QUEUE:
|
||||
if (!hDelayEventQueue.empty())
|
||||
{
|
||||
*ppEvent = hDelayEventQueue.front();
|
||||
hDelayEventQueue.erase(hDelayEventQueue.begin());
|
||||
return(TRUE);
|
||||
}
|
||||
break;
|
||||
|
||||
case DEMAND_EVENT_QUEUE:
|
||||
if (!hDemandEventQueue.empty())
|
||||
{
|
||||
*ppEvent = hDemandEventQueue.front();
|
||||
hDemandEventQueue.pop();
|
||||
return(TRUE);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
Assert(FALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
BOOLEAN AddGameEventToQueue( UINT32 uiEvent, UINT16 usDelay, PTR pEventData, UINT8 ubQueueID )
|
||||
|
||||
static BOOLEAN FreeEventData(EVENT* pEvent)
|
||||
{
|
||||
CHECKF(pEvent != NULL);
|
||||
|
||||
MemFree(pEvent->pData);
|
||||
//MemFree(pEvent);
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
UINT32 EventQueueSize(UINT8 ubQueueID)
|
||||
{
|
||||
switch (ubQueueID)
|
||||
{
|
||||
case PRIMARY_EVENT_QUEUE:
|
||||
return(hEventQueue.size());
|
||||
break;
|
||||
|
||||
case SECONDARY_EVENT_QUEUE:
|
||||
return(hDelayEventQueue.size());
|
||||
break;
|
||||
|
||||
case DEMAND_EVENT_QUEUE:
|
||||
return(hDemandEventQueue.size());
|
||||
break;
|
||||
|
||||
default:
|
||||
Assert(FALSE);
|
||||
return(-1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static BOOLEAN AddGameEventToQueue( UINT32 uiEvent, UINT16 usDelay, PTR pEventData, UINT8 ubQueueID )
|
||||
{
|
||||
UINT32 uiDataSize;
|
||||
|
||||
@@ -783,18 +901,65 @@ BOOLEAN AddGameEventToQueue( UINT32 uiEvent, UINT16 usDelay, PTR pEventData, UIN
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN AddGameEvent(UINT32 uiEvent, UINT16 usDelay, PTR pEventData)
|
||||
{
|
||||
if (usDelay == DEMAND_EVENT_DELAY)
|
||||
{
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("AddGameEvent: Sending Local and network #%d", uiEvent));
|
||||
#ifdef NETWORKED
|
||||
if (gfAmINetworked)
|
||||
SendEventToNetwork(uiEvent, usDelay, pEventData);
|
||||
#endif
|
||||
return(AddGameEventToQueue(uiEvent, 0, pEventData, DEMAND_EVENT_QUEUE));
|
||||
}
|
||||
else if (uiEvent < EVENTS_LOCAL_AND_NETWORK)
|
||||
{
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("AddGameEvent: Sending Local and network #%d", uiEvent));
|
||||
#ifdef NETWORKED
|
||||
if (gfAmINetworked)
|
||||
SendEventToNetwork(uiEvent, usDelay, pEventData);
|
||||
#endif
|
||||
return(AddGameEventToQueue(uiEvent, usDelay, pEventData, PRIMARY_EVENT_QUEUE));
|
||||
}
|
||||
else if (uiEvent < EVENTS_ONLY_USED_LOCALLY)
|
||||
{
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("AddGameEvent: Sending Local #%d", uiEvent));
|
||||
return(AddGameEventToQueue(uiEvent, usDelay, pEventData, PRIMARY_EVENT_QUEUE));
|
||||
}
|
||||
else if (uiEvent < EVENTS_ONLY_SENT_OVER_NETWORK)
|
||||
{
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("AddGameEvent: Sending network #%d", uiEvent));
|
||||
#ifdef NETWORKED
|
||||
if (gfAmINetworked)
|
||||
SendEventToNetwork(uiEvent, usDelay, pEventData);
|
||||
#endif
|
||||
return(TRUE);
|
||||
}
|
||||
// There is an error with the event
|
||||
else
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN AddGameEventFromNetwork(UINT32 uiEvent, UINT16 usDelay, PTR pEventData)
|
||||
{
|
||||
return(AddGameEventToQueue(uiEvent, usDelay, pEventData, PRIMARY_EVENT_QUEUE));
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN DequeAllGameEvents( BOOLEAN fExecute )
|
||||
{
|
||||
EVENT *pEvent;
|
||||
UINT32 uiQueueSize, cnt;
|
||||
BOOLEAN fCompleteLoop = FALSE;
|
||||
EVENT pEvent;
|
||||
UINT32 uiQueueSize, i;
|
||||
BOOLEAN fCompleteLoop = FALSE;
|
||||
|
||||
|
||||
// First dequeue all primary events
|
||||
|
||||
|
||||
while( EventQueueSize( PRIMARY_EVENT_QUEUE ) > 0 )
|
||||
{
|
||||
// Get Event
|
||||
if ( RemoveEvent( &pEvent, 0, PRIMARY_EVENT_QUEUE) == FALSE )
|
||||
if (PopEvent( &pEvent, PRIMARY_EVENT_QUEUE) == FALSE )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
@@ -802,90 +967,66 @@ BOOLEAN DequeAllGameEvents( BOOLEAN fExecute )
|
||||
if ( fExecute )
|
||||
{
|
||||
// Check if event has a delay and add to secondary queue if so
|
||||
if ( pEvent->usDelay > 0 )
|
||||
if ( pEvent.usDelay > 0 )
|
||||
{
|
||||
AddGameEventToQueue( pEvent->uiEvent, pEvent->usDelay, pEvent->pData, SECONDARY_EVENT_QUEUE );
|
||||
AddGameEventToQueue( pEvent.uiEvent, pEvent.usDelay, pEvent.pData, SECONDARY_EVENT_QUEUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
ExecuteGameEvent( pEvent );
|
||||
ExecuteGameEvent( &pEvent );
|
||||
}
|
||||
}
|
||||
|
||||
// Delete event
|
||||
FreeEvent( pEvent );
|
||||
|
||||
FreeEventData( &pEvent );
|
||||
};
|
||||
|
||||
// NOW CHECK SECONDARY QUEUE FOR ANY EXPRIED EVENTS
|
||||
// Get size of queue
|
||||
|
||||
// NOW CHECK SECONDARY QUEUE FOR EVENTS
|
||||
uiQueueSize = EventQueueSize( SECONDARY_EVENT_QUEUE );
|
||||
|
||||
for ( cnt = 0; cnt < uiQueueSize; cnt++ )
|
||||
for ( i = 0; i < uiQueueSize; i++ )
|
||||
{
|
||||
if ( PeekEvent( &pEvent, cnt, SECONDARY_EVENT_QUEUE) == FALSE )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
EVENT& pEventRef = hDelayEventQueue[i];
|
||||
// Check time
|
||||
if ( ( GetJA2Clock() - pEvent->TimeStamp ) > pEvent->usDelay )
|
||||
if ( ( GetJA2Clock() - pEventRef.TimeStamp ) > pEventRef.usDelay )
|
||||
{
|
||||
if ( fExecute )
|
||||
{
|
||||
ExecuteGameEvent( pEvent );
|
||||
ExecuteGameEvent( &pEventRef );
|
||||
}
|
||||
|
||||
// FLag as expired
|
||||
pEvent->uiFlags = EVENT_EXPIRED;
|
||||
|
||||
pEventRef.uiFlags = EVENT_EXPIRED;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
do
|
||||
// Remove expired events from secondary event queue
|
||||
uiQueueSize = EventQueueSize(SECONDARY_EVENT_QUEUE);
|
||||
for (INT32 i = uiQueueSize-1; i >= 0; i--)
|
||||
{
|
||||
uiQueueSize = EventQueueSize( SECONDARY_EVENT_QUEUE );
|
||||
|
||||
for ( cnt = 0; cnt < uiQueueSize; cnt++ )
|
||||
EVENT& pEventRef = hDelayEventQueue[i];
|
||||
if (pEventRef.uiFlags & EVENT_EXPIRED)
|
||||
{
|
||||
if ( PeekEvent( &pEvent, cnt, SECONDARY_EVENT_QUEUE) == FALSE )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// Check time
|
||||
if ( pEvent->uiFlags & EVENT_EXPIRED )
|
||||
{
|
||||
RemoveEvent( &pEvent, cnt, SECONDARY_EVENT_QUEUE );
|
||||
FreeEvent( pEvent );
|
||||
// Restart loop
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
RemoveEventFromSecondaryEventQueue(&pEventRef, i);
|
||||
FreeEventData(&pEventRef);
|
||||
}
|
||||
|
||||
if ( cnt == uiQueueSize )
|
||||
{
|
||||
fCompleteLoop = TRUE;
|
||||
}
|
||||
|
||||
} while( fCompleteLoop == FALSE );
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN DequeueAllDemandGameEvents( BOOLEAN fExecute )
|
||||
{
|
||||
EVENT *pEvent;
|
||||
EVENT pEvent;
|
||||
|
||||
// Dequeue all events on the demand queue (only)
|
||||
|
||||
while( EventQueueSize( DEMAND_EVENT_QUEUE ) > 0 )
|
||||
{
|
||||
// Get Event
|
||||
if ( RemoveEvent( &pEvent, 0, DEMAND_EVENT_QUEUE) == FALSE )
|
||||
if ( PopEvent( &pEvent, DEMAND_EVENT_QUEUE) == FALSE )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
@@ -893,18 +1034,18 @@ BOOLEAN DequeueAllDemandGameEvents( BOOLEAN fExecute )
|
||||
if ( fExecute )
|
||||
{
|
||||
// Check if event has a delay and add to secondary queue if so
|
||||
if ( pEvent->usDelay > 0 )
|
||||
if ( pEvent.usDelay > 0 )
|
||||
{
|
||||
AddGameEventToQueue( pEvent->uiEvent, pEvent->usDelay, pEvent->pData, SECONDARY_EVENT_QUEUE );
|
||||
AddGameEventToQueue( pEvent.uiEvent, pEvent.usDelay, pEvent.pData, SECONDARY_EVENT_QUEUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
ExecuteGameEvent( pEvent );
|
||||
ExecuteGameEvent( &pEvent );
|
||||
}
|
||||
}
|
||||
|
||||
// Delete event
|
||||
FreeEvent( pEvent );
|
||||
FreeEventData( &pEvent );
|
||||
|
||||
};
|
||||
|
||||
@@ -912,7 +1053,6 @@ BOOLEAN DequeueAllDemandGameEvents( BOOLEAN fExecute )
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN ExecuteGameEvent( EVENT *pEvent )
|
||||
{
|
||||
SOLDIERTYPE *pSoldier;
|
||||
@@ -1237,17 +1377,16 @@ BOOLEAN ExecuteGameEvent( EVENT *pEvent )
|
||||
BOOLEAN ClearEventQueue( void )
|
||||
{
|
||||
// clear out the event queue
|
||||
EVENT *pEvent;
|
||||
EVENT pEvent;
|
||||
while( EventQueueSize( PRIMARY_EVENT_QUEUE ) > 0 )
|
||||
{
|
||||
// Get Event
|
||||
if ( RemoveEvent( &pEvent, 0, PRIMARY_EVENT_QUEUE) == FALSE )
|
||||
if (PopEvent( &pEvent, PRIMARY_EVENT_QUEUE) == FALSE )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
FreeEventData(&pEvent);
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-5
@@ -1,7 +1,6 @@
|
||||
#ifndef EVENT_PROCESSOR_H
|
||||
#define EVENT_PROCESSOR_H
|
||||
|
||||
#include "Event Manager.h"
|
||||
#include "Overhead Types.h"
|
||||
|
||||
|
||||
@@ -271,8 +270,6 @@ BOOLEAN AddGameEventFromNetwork( UINT32 uiEvent, UINT16 usDelay, PTR pEventData
|
||||
BOOLEAN DequeAllGameEvents( BOOLEAN fExecute );
|
||||
BOOLEAN DequeueAllDemandGameEvents( BOOLEAN fExecute );
|
||||
|
||||
// clean out the evetn queue
|
||||
// clean out the event queue
|
||||
BOOLEAN ClearEventQueue( void );
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+1
-110
@@ -12,9 +12,7 @@
|
||||
|
||||
#include <vfs/Core/vfs.h>
|
||||
|
||||
#ifdef USE_VFS
|
||||
std::set<vfs::Path,vfs::Path::Less> CIniReader::m_merge_files;
|
||||
#endif
|
||||
std::stack<std::string> iniErrorMessages;
|
||||
|
||||
template<typename ValueType>
|
||||
@@ -32,26 +30,14 @@ void PushErrorMessage(std::string const& filename,
|
||||
iniErrorMessages.push(errMessage.str());
|
||||
}
|
||||
|
||||
#ifdef USE_VFS
|
||||
void CIniReader::RegisterFileForMerging(vfs::Path const& filename)
|
||||
{
|
||||
m_merge_files.insert(filename);
|
||||
}
|
||||
#endif
|
||||
|
||||
CIniReader::CIniReader(const STR8 szFileName)
|
||||
{
|
||||
memset(m_szFileName,0,sizeof(m_szFileName));
|
||||
#ifndef USE_VFS
|
||||
// Snap: Look for the INI file in the custom Data directory.
|
||||
// If not there, leave at default location.
|
||||
if ( gCustomDataCat.FindFile(szFileName) ) {
|
||||
sprintf(m_szFileName, "%s\\%s", gCustomDataCat.GetRootDir().c_str(), szFileName);
|
||||
}
|
||||
else {
|
||||
sprintf(m_szFileName, "%s\\%s", gDefaultDataCat.GetRootDir().c_str(), szFileName);
|
||||
}
|
||||
#else
|
||||
strncpy(m_szFileName,szFileName, std::min<int>(strlen(szFileName), sizeof(m_szFileName)-1));
|
||||
if(m_merge_files.find(szFileName) == m_merge_files.end())
|
||||
{
|
||||
@@ -81,7 +67,6 @@ CIniReader::CIniReader(const STR8 szFileName)
|
||||
if(getVFS()->fileExists(OvrFileName))
|
||||
m_oProps.initFromIniFile(vfs::Path(OvrFileName));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
CIniReader::CIniReader(const STR8 szFileName, BOOLEAN Force_Custom_Data_Path)
|
||||
@@ -89,32 +74,6 @@ CIniReader::CIniReader(const STR8 szFileName, BOOLEAN Force_Custom_Data_Path)
|
||||
memset(m_szFileName,0,sizeof(m_szFileName));
|
||||
// ary-05/05/2009 : force custom data path for potential non existing file -or- force default data path
|
||||
// : Also, flag file detection to allow functions to determine course of action for case of file [not found/is found].
|
||||
#ifndef USE_VFS
|
||||
if ( Force_Custom_Data_Path )
|
||||
{
|
||||
if ( gCustomDataCat.FindFile(szFileName) )
|
||||
{
|
||||
CIniReader_File_Found = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
CIniReader_File_Found = FALSE;
|
||||
}
|
||||
sprintf(m_szFileName, "%s\\%s", gCustomDataCat.GetRootDir().c_str(), szFileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( gDefaultDataCat.FindFile(szFileName) )
|
||||
{
|
||||
CIniReader_File_Found = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
CIniReader_File_Found = FALSE;
|
||||
}
|
||||
sprintf(m_szFileName, "%s\\%s", gDefaultDataCat.GetRootDir().c_str(), szFileName);
|
||||
}
|
||||
#else
|
||||
strncpy(m_szFileName,szFileName, std::min<int>(strlen(szFileName), sizeof(m_szFileName)-1));
|
||||
if(m_merge_files.find(szFileName) == m_merge_files.end())
|
||||
{
|
||||
@@ -137,38 +96,24 @@ CIniReader::CIniReader(const STR8 szFileName, BOOLEAN Force_Custom_Data_Path)
|
||||
rev_order.pop();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void CIniReader::Clear()
|
||||
{
|
||||
#ifndef USE_VFS
|
||||
memset(m_szFileName, 0, MAX_PATH);
|
||||
#else
|
||||
memset(m_szFileName, 0, MAX_PATH);
|
||||
m_oProps.clearContainer();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int CIniReader::ReadInteger(const STR8 szSection, const STR8 szKey, int iDefaultValue)
|
||||
{
|
||||
#ifndef USE_VFS
|
||||
return GetPrivateProfileInt(szSection, szKey, iDefaultValue, m_szFileName);
|
||||
#else
|
||||
return (int)(m_oProps.getIntProperty(szSection, szKey, iDefaultValue));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int CIniReader::ReadInteger(const STR8 szSection, const STR8 szKey, int defaultValue, int minValue, int maxValue)
|
||||
{
|
||||
#ifndef USE_VFS
|
||||
int iniValueReadFromFile = (int)(GetPrivateProfileInt(szSection, szKey, defaultValue, m_szFileName));
|
||||
#else
|
||||
int iniValueReadFromFile = (int)(m_oProps.getIntProperty(szSection, szKey, defaultValue));
|
||||
#endif
|
||||
//AssertGE(iniValueReadFromFile, minValue);
|
||||
//AssertLE(iniValueReadFromFile, maxValue);
|
||||
if (iniValueReadFromFile < minValue)
|
||||
@@ -200,15 +145,7 @@ int CIniReader::ReadInteger(const STR8 szSection, const STR8 szKey, int defaultV
|
||||
double CIniReader::ReadDouble(const STR8 szSection, const STR8 szKey, double defaultValue, double minValue, double maxValue)
|
||||
{
|
||||
double iniValueReadFromFile;
|
||||
#ifndef USE_VFS
|
||||
char szResult[255];
|
||||
char szDefault[255];
|
||||
sprintf(szDefault, "%f", defaultValue);
|
||||
GetPrivateProfileString(szSection, szKey, szDefault, szResult, 255, m_szFileName);
|
||||
iniValueReadFromFile = (float) atof(szResult);
|
||||
#else
|
||||
iniValueReadFromFile = m_oProps.getFloatProperty(szSection, szKey, defaultValue);
|
||||
#endif
|
||||
//AssertGE(iniValueReadFromFile, minValue);
|
||||
//AssertLE(iniValueReadFromFile, maxValue);
|
||||
if (iniValueReadFromFile < minValue)
|
||||
@@ -227,15 +164,7 @@ double CIniReader::ReadDouble(const STR8 szSection, const STR8 szKey, double def
|
||||
FLOAT CIniReader::ReadFloat(const STR8 szSection, const STR8 szKey, FLOAT defaultValue, FLOAT minValue, FLOAT maxValue)
|
||||
{
|
||||
FLOAT iniValueReadFromFile;
|
||||
#ifndef USE_VFS
|
||||
char szResult[255];
|
||||
char szDefault[255];
|
||||
sprintf(szDefault, "%f", defaultValue);
|
||||
GetPrivateProfileString(szSection, szKey, szDefault, szResult, 255, m_szFileName);
|
||||
iniValueReadFromFile = (FLOAT) atof(szResult);
|
||||
#else
|
||||
iniValueReadFromFile = (FLOAT) m_oProps.getFloatProperty(szSection, szKey, (float)defaultValue);
|
||||
#endif
|
||||
|
||||
//AssertGE(iniValueReadFromFile, minValue);
|
||||
//AssertLE(iniValueReadFromFile, maxValue);
|
||||
@@ -329,18 +258,6 @@ void CIniReader::ReadINT32Array(const STR8 szSection, const STR8 szKey, std::vec
|
||||
|
||||
BOOLEAN CIniReader::ReadBoolean(const STR8 szSection, const STR8 szKey, bool defaultValue, bool bolDisplayError)
|
||||
{
|
||||
#ifndef USE_VFS
|
||||
char szResult[255];
|
||||
char szDefault[255];
|
||||
sprintf(szDefault, "%s", defaultValue? "TRUE" : "FALSE");
|
||||
GetPrivateProfileString(szSection, szKey, szDefault, szResult, 255, m_szFileName);
|
||||
for (int idx=0; (szResult[idx] != 0) && (idx < 255); ++idx)
|
||||
szResult[idx] = toupper(szResult[idx]);
|
||||
if (strcmp(szResult, "TRUE") == 0)
|
||||
return TRUE;
|
||||
else if (strcmp(szResult, "FALSE") == 0)
|
||||
return FALSE;
|
||||
#else
|
||||
vfs::String str = m_oProps.getStringProperty(szSection, szKey, L"");
|
||||
if( vfs::StrCmp::Equal(str, L"true") )
|
||||
{
|
||||
@@ -353,7 +270,7 @@ BOOLEAN CIniReader::ReadBoolean(const STR8 szSection, const STR8 szKey, bool def
|
||||
std::string szResult = str.utf8();
|
||||
char szDefault[255];
|
||||
sprintf(szDefault, "%s", defaultValue? "TRUE" : "FALSE");
|
||||
#endif
|
||||
|
||||
if(bolDisplayError){
|
||||
std::stringstream errMessage;
|
||||
errMessage << "The value [" << szSection << "][" << szKey << "] = \"" << szResult << "\" "
|
||||
@@ -370,14 +287,10 @@ BOOLEAN CIniReader::ReadBoolean(const STR8 szSection, const STR8 szKey, bool def
|
||||
|
||||
void CIniReader::ReadString(const STR8 szSection, const STR8 szKey, const STR8 szDefaultValue, STR8 input_buffer, size_t buffer_size)
|
||||
{
|
||||
#ifndef USE_VFS
|
||||
GetPrivateProfileString(szSection, szKey, szDefaultValue, input_buffer, buffer_size, m_szFileName);
|
||||
#else
|
||||
std::string s = m_oProps.getStringProperty(szSection, szKey, szDefaultValue).utf8();
|
||||
int len = std::min<unsigned int>(s.length(),buffer_size-1);
|
||||
strncpy(input_buffer, s.c_str(), len);
|
||||
input_buffer[len] = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// WANNE - MP: Old version, currently used by Multiplayer
|
||||
@@ -386,12 +299,8 @@ STR8 CIniReader::ReadString(const STR8 szSection, const STR8 szKey, const STR8 s
|
||||
// >>>>> Memory Leak <<<<<
|
||||
STR8 szResult = new char[255];
|
||||
memset(szResult, 0x00, 255);
|
||||
#ifndef USE_VFS
|
||||
GetPrivateProfileString(szSection, szKey, szDefaultValue, szResult, 255, m_szFileName);
|
||||
#else
|
||||
std::string s = m_oProps.getStringProperty(szSection, szKey, szDefaultValue).utf8();
|
||||
strncpy(szResult, s.c_str(), std::min<int>(s.length(),254));
|
||||
#endif
|
||||
return szResult;
|
||||
}
|
||||
|
||||
@@ -429,20 +338,7 @@ UINT32 CIniReader::ReadUINT32(const STR8 szSection, const STR8 szKey, UINT32 def
|
||||
UINT32 CIniReader::ReadUINT(const STR8 szSection, const STR8 szKey, UINT32 defaultValue, UINT32 minValue, UINT32 maxValue )
|
||||
{
|
||||
UINT32 iniValueReadFromFile;
|
||||
#ifndef USE_VFS
|
||||
STR8 szResult = new char[255];
|
||||
STR8 szDefault = new char[255];
|
||||
|
||||
memset(szResult, 0x00, 255);
|
||||
memset(szDefault, 0x00, 255);
|
||||
|
||||
sprintf(szDefault, "%u", defaultValue);
|
||||
|
||||
this->ReadString (szSection , szKey , szDefault, szResult, (size_t) 255 );
|
||||
iniValueReadFromFile = (UINT32) strtoul(szResult,NULL,0);
|
||||
#else
|
||||
iniValueReadFromFile = (UINT32) m_oProps.getUIntProperty(szSection, szKey, defaultValue);
|
||||
#endif
|
||||
//AssertGE(iniValueReadFromFile, minValue);
|
||||
//AssertLE(iniValueReadFromFile, maxValue);
|
||||
|
||||
@@ -457,10 +353,5 @@ UINT32 CIniReader::ReadUINT(const STR8 szSection, const STR8 szKey, UINT32 defau
|
||||
iniValueReadFromFile = maxValue;
|
||||
}
|
||||
|
||||
#ifndef USE_VFS
|
||||
delete [] szResult ;
|
||||
delete [] szDefault ;
|
||||
#endif
|
||||
return iniValueReadFromFile;
|
||||
|
||||
}
|
||||
|
||||
+1
-5
@@ -56,18 +56,14 @@ public:
|
||||
BOOLEAN Is_CIniReader_File_Found(void) {return (CIniReader_File_Found);}
|
||||
void Clear();
|
||||
|
||||
#ifdef USE_VFS
|
||||
static void RegisterFileForMerging(vfs::Path const& filename);
|
||||
#endif
|
||||
private:
|
||||
vfs::PropertyContainer m_oProps;
|
||||
char m_szFileName[MAX_PATH];
|
||||
BOOLEAN CIniReader_File_Found;
|
||||
|
||||
UINT32 ReadUINT(const STR8 szSection, const STR8 szKey, UINT32 defaultValue, UINT32 minValue, UINT32 maxValue);
|
||||
#ifdef USE_VFS
|
||||
static std::set<vfs::Path, vfs::Path::Less> m_merge_files;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif//INIREADER_H
|
||||
#endif//INIREADER_H
|
||||
|
||||
@@ -76,6 +76,15 @@ BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
|
||||
case MLG_PREBATTLEPANEL:
|
||||
sprintf( filename, "INTERFACE\\PreBattlePanel.sti" );
|
||||
return TRUE;
|
||||
case MLG_PREBATTLEPANEL_800x600:
|
||||
sprintf(filename, "INTERFACE\\PreBattlePanel_800x600.sti");
|
||||
return TRUE;
|
||||
case MLG_PREBATTLEPANEL_1024x768:
|
||||
sprintf(filename, "INTERFACE\\PreBattlePanel_1024x768.sti");
|
||||
return TRUE;
|
||||
case MLG_PREBATTLEPANEL_1280x720:
|
||||
sprintf(filename, "INTERFACE\\PreBattlePanel_1280x720.sti");
|
||||
return TRUE;
|
||||
case MLG_SMALLTITLE:
|
||||
sprintf( filename, "LAPTOP\\SmallTitle.sti" );
|
||||
return TRUE;
|
||||
@@ -203,6 +212,15 @@ BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
|
||||
case MLG_PREBATTLEPANEL:
|
||||
sprintf( filename, "GERMAN\\PreBattlePanel_german.sti" );
|
||||
return TRUE;
|
||||
case MLG_PREBATTLEPANEL_800x600:
|
||||
sprintf(filename, "GERMAN\\PreBattlePanel_800x600_german.sti");
|
||||
return TRUE;
|
||||
case MLG_PREBATTLEPANEL_1024x768:
|
||||
sprintf(filename, "GERMAN\\PreBattlePanel_1024x768_german.sti");
|
||||
return TRUE;
|
||||
case MLG_PREBATTLEPANEL_1280x720:
|
||||
sprintf(filename, "GERMAN\\PreBattlePanel_1280x720_german.sti");
|
||||
return TRUE;
|
||||
case MLG_SMALLTITLE:
|
||||
sprintf( filename, "GERMAN\\SmallTitle_german.sti" );
|
||||
return TRUE;
|
||||
@@ -368,6 +386,15 @@ BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
|
||||
case MLG_PREBATTLEPANEL:
|
||||
sprintf( filename, "%s\\PreBattlePanel_%s.sti", zLanguage, zLanguage );
|
||||
break;
|
||||
case MLG_PREBATTLEPANEL_800x600:
|
||||
sprintf(filename, "%s\\PreBattlePanel_800x600_%s.sti", zLanguage, zLanguage);
|
||||
break;
|
||||
case MLG_PREBATTLEPANEL_1024x768:
|
||||
sprintf(filename, "%s\\PreBattlePanel_1024x768_%s.sti", zLanguage, zLanguage);
|
||||
break;
|
||||
case MLG_PREBATTLEPANEL_1280x720:
|
||||
sprintf(filename, "%s\\PreBattlePanel_1280x720_%s.sti", zLanguage, zLanguage);
|
||||
break;
|
||||
case MLG_SMALLTITLE:
|
||||
sprintf( filename, "%s\\SmallTitle_%s.sti", zLanguage, zLanguage );
|
||||
break;
|
||||
@@ -492,6 +519,15 @@ BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
|
||||
case MLG_PREBATTLEPANEL:
|
||||
sprintf( filename, "INTERFACE\\PreBattlePanel.sti" );
|
||||
return TRUE;
|
||||
case MLG_PREBATTLEPANEL_800x600:
|
||||
sprintf(filename, "INTERFACE\\PreBattlePanel_800x600.sti");
|
||||
return TRUE;
|
||||
case MLG_PREBATTLEPANEL_1024x768:
|
||||
sprintf(filename, "INTERFACE\\PreBattlePanel_1024x768.sti");
|
||||
return TRUE;
|
||||
case MLG_PREBATTLEPANEL_1280x720:
|
||||
sprintf(filename, "INTERFACE\\PreBattlePanel_1280x720.sti");
|
||||
return TRUE;
|
||||
case MLG_SMALLTITLE:
|
||||
sprintf( filename, "LAPTOP\\SmallTitle.sti" );
|
||||
return TRUE;
|
||||
|
||||
@@ -26,6 +26,9 @@ enum
|
||||
MLG_OPTIONHEADER, //OptionScreenAddOns
|
||||
MLG_ORDERGRID,
|
||||
MLG_PREBATTLEPANEL,
|
||||
MLG_PREBATTLEPANEL_800x600,
|
||||
MLG_PREBATTLEPANEL_1024x768,
|
||||
MLG_PREBATTLEPANEL_1280x720,
|
||||
MLG_SECTORINVENTORY,
|
||||
MLG_SMALLFLORISTSYMBOL, //SmallSymbol
|
||||
MLG_SMALLTITLE,
|
||||
|
||||
+167
-398
@@ -8,7 +8,7 @@
|
||||
#include "strategicmap.h"
|
||||
|
||||
#include "Overhead Types.h"
|
||||
//extern int iScreenMode;
|
||||
#include <Game Clock.h>
|
||||
|
||||
static UINT32 uiMusicHandle = NO_SAMPLE;
|
||||
static BOOLEAN fMusicPlaying = FALSE;
|
||||
@@ -26,31 +26,36 @@ static UINT8 gubOldMusicMode = 0;
|
||||
static INT8 gbVictorySongCount = 0;
|
||||
static INT8 gbDeathSongCount = 0;
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
static INT32 bNothingModeSong = NOTHING_A_MUSIC;
|
||||
static INT32 bEnemyModeSong = TENSOR_A_MUSIC;
|
||||
static INT32 bBattleModeSong = BATTLE_A_MUSIC;
|
||||
|
||||
static INT32 NewSoundID = -1;
|
||||
static BOOLEAN SetSoundID = FALSE;
|
||||
|
||||
static INT32 gubOldMusicMode2 = 0;
|
||||
#else
|
||||
static INT8 bNothingModeSong;
|
||||
static INT8 bEnemyModeSong;
|
||||
static INT8 bBattleModeSong;
|
||||
#endif
|
||||
|
||||
static BOOLEAN gfUseCreatureMusic = FALSE;
|
||||
|
||||
static INT8 gbFadeSpeed = 1;
|
||||
|
||||
static BOOLEAN gfDontRestartSong = FALSE;
|
||||
// unused
|
||||
//BOOLEAN gfForceMusicToTense = FALSE;
|
||||
|
||||
|
||||
CHAR8 *szMusicList[NUM_MUSIC]=
|
||||
// Original music and their hardcoded paths
|
||||
enum MusicList
|
||||
{
|
||||
MARIMBAD2_MUSIC,
|
||||
MENUMIX_MUSIC,
|
||||
NOTHING_A_MUSIC,
|
||||
NOTHING_B_MUSIC,
|
||||
NOTHING_C_MUSIC,
|
||||
NOTHING_D_MUSIC,
|
||||
TENSOR_A_MUSIC,
|
||||
TENSOR_B_MUSIC,
|
||||
TENSOR_C_MUSIC,
|
||||
TRIUMPH_MUSIC,
|
||||
DEATH_MUSIC,
|
||||
BATTLE_A_MUSIC,
|
||||
BATTLE_B_MUSIC, //same as tensor B
|
||||
CREEPY_MUSIC,
|
||||
CREATURE_BATTLE_MUSIC,
|
||||
MUSIC_DIR,
|
||||
NUM_MUSIC
|
||||
};
|
||||
|
||||
CHAR8* szMusicList[NUM_MUSIC] =
|
||||
{
|
||||
"MUSIC\\marimbad 2",
|
||||
"MUSIC\\menumix1",
|
||||
@@ -64,12 +69,122 @@ CHAR8 *szMusicList[NUM_MUSIC]=
|
||||
"MUSIC\\triumph",
|
||||
"MUSIC\\death",
|
||||
"MUSIC\\battle A",
|
||||
"MUSIC\\tensor B",
|
||||
"MUSIC\\battle B",
|
||||
"MUSIC\\creepy",
|
||||
"MUSIC\\creature battle",
|
||||
"MUSIC",
|
||||
};
|
||||
|
||||
|
||||
std::vector<STR> MusicLists[MAX_MUSIC];
|
||||
|
||||
static void AddMusicToList(STR fileName, NewMusicList mode)
|
||||
{
|
||||
UINT8 constexpr buf = 64;
|
||||
CHAR8 musicFile[buf];
|
||||
|
||||
if (SoundFileExists(fileName, musicFile))
|
||||
{
|
||||
STR music = (STR)MemAlloc(buf * sizeof(CHAR8));
|
||||
Assert(music);
|
||||
memset(music, 0, sizeof(CHAR8) * buf);
|
||||
strcpy(music, musicFile);
|
||||
|
||||
MusicLists[mode].push_back(music);
|
||||
}
|
||||
}
|
||||
|
||||
void InitializeMusicLists()
|
||||
{
|
||||
UINT8 constexpr buf = 64;
|
||||
CHAR8 fileName[buf];
|
||||
|
||||
// Special casing original music so they can be easily replaced with new files
|
||||
AddMusicToList(szMusicList[MENUMIX_MUSIC], MUSICLIST_MAIN_MENU);
|
||||
AddMusicToList(szMusicList[MARIMBAD2_MUSIC], MUSICLIST_LAPTOP);
|
||||
|
||||
AddMusicToList(szMusicList[NOTHING_A_MUSIC], MUSICLIST_TACTICAL_NOTHING);
|
||||
AddMusicToList(szMusicList[NOTHING_B_MUSIC], MUSICLIST_TACTICAL_NOTHING);
|
||||
AddMusicToList(szMusicList[NOTHING_C_MUSIC], MUSICLIST_TACTICAL_NOTHING);
|
||||
AddMusicToList(szMusicList[NOTHING_D_MUSIC], MUSICLIST_TACTICAL_NOTHING);
|
||||
|
||||
AddMusicToList(szMusicList[TENSOR_A_MUSIC], MUSICLIST_TACTICAL_ENEMYPRESENT);
|
||||
AddMusicToList(szMusicList[TENSOR_B_MUSIC], MUSICLIST_TACTICAL_ENEMYPRESENT);
|
||||
AddMusicToList(szMusicList[TENSOR_C_MUSIC], MUSICLIST_TACTICAL_ENEMYPRESENT);
|
||||
|
||||
AddMusicToList(szMusicList[BATTLE_A_MUSIC], MUSICLIST_TACTICAL_BATTLE);
|
||||
if (SoundFileExists(szMusicList[BATTLE_B_MUSIC], fileName))
|
||||
{
|
||||
AddMusicToList(szMusicList[BATTLE_B_MUSIC], MUSICLIST_TACTICAL_BATTLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddMusicToList(szMusicList[TENSOR_B_MUSIC], MUSICLIST_TACTICAL_BATTLE);
|
||||
}
|
||||
|
||||
AddMusicToList(szMusicList[TRIUMPH_MUSIC], MUSICLIST_TACTICAL_VICTORY);
|
||||
AddMusicToList(szMusicList[DEATH_MUSIC], MUSICLIST_TACTICAL_DEATH);
|
||||
AddMusicToList(szMusicList[CREEPY_MUSIC], MUSICLIST_TACTICAL_CREEPY);
|
||||
AddMusicToList(szMusicList[CREATURE_BATTLE_MUSIC], MUSICLIST_TACTICAL_CREEPY_BATTLE);
|
||||
|
||||
|
||||
// Read music files into list
|
||||
for (size_t j = MUSICLIST_MAIN_MENU; j < MAX_MUSIC; j++)
|
||||
{
|
||||
STR baseFilename;
|
||||
switch (j)
|
||||
{
|
||||
case MUSICLIST_MAIN_MENU:
|
||||
baseFilename = "MUSIC\\Mainmenu_";
|
||||
break;
|
||||
case MUSICLIST_LAPTOP:
|
||||
baseFilename = "MUSIC\\Laptop_";
|
||||
break;
|
||||
case MUSICLIST_TACTICAL_NOTHING:
|
||||
baseFilename = "MUSIC\\Tactical_";
|
||||
break;
|
||||
case MUSICLIST_TACTICAL_ENEMYPRESENT:
|
||||
baseFilename = "MUSIC\\Enemy_";
|
||||
break;
|
||||
case MUSICLIST_TACTICAL_BATTLE:
|
||||
baseFilename = "MUSIC\\Battle_";
|
||||
break;
|
||||
case MUSICLIST_TACTICAL_ENEMYPRESENT_NIGHT:
|
||||
baseFilename = "MUSIC\\EnemyNight_";
|
||||
break;
|
||||
case MUSICLIST_TACTICAL_BATTLE_NIGHT:
|
||||
baseFilename = "MUSIC\\BattleNight_";
|
||||
break;
|
||||
case MUSICLIST_TACTICAL_VICTORY:
|
||||
baseFilename = "MUSIC\\Victory_";
|
||||
break;
|
||||
case MUSICLIST_TACTICAL_DEATH:
|
||||
baseFilename = "MUSIC\\Death_";
|
||||
break;
|
||||
case MUSICLIST_TACTICAL_CREEPY:
|
||||
baseFilename = "MUSIC\\Creepy_";
|
||||
break;
|
||||
case MUSICLIST_TACTICAL_CREEPY_BATTLE:
|
||||
baseFilename = "MUSIC\\CreepyBattle_";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < 100; i++)
|
||||
{
|
||||
sprintf(fileName, "%s%02d", baseFilename, i);
|
||||
AddMusicToList(fileName, static_cast<NewMusicList>(j));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static STR PickRandomSongFromList(NewMusicList mode)
|
||||
{
|
||||
return MusicLists[mode][Random(MusicLists[mode].size())];
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN StartMusicBasedOnMode(void);
|
||||
void DoneFadeOutDueToEndMusic(void);
|
||||
void MusicStopCallback(void *pData);
|
||||
@@ -77,37 +192,6 @@ BOOLEAN MusicStop(void);
|
||||
BOOLEAN MusicFadeOut(void);
|
||||
BOOLEAN MusicFadeIn(void);
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
MUSIC_SOUND_VALUES MusicSoundValues[256];
|
||||
INT32 GlobalSoundID = -1;
|
||||
#endif
|
||||
//extern void HandleEndDemoInCreatureLevel( );
|
||||
|
||||
//BOOLEAN NoEnemiesInSight( )
|
||||
//{
|
||||
// SOLDIERTYPE *pSoldier;
|
||||
// INT32 cnt;
|
||||
//
|
||||
// // Loop through our guys
|
||||
// // End the turn of player charactors
|
||||
// cnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID;
|
||||
//
|
||||
// // look for all mercs on the same team,
|
||||
// for ( pSoldier = MercPtrs[ cnt ]; cnt <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; cnt++, pSoldier++ )
|
||||
// {
|
||||
// if ( pSoldier->bActive && pSoldier->stats.bLife >= OKLIFE )
|
||||
// {
|
||||
// if ( pSoldier->aiData.bOppCnt != 0 )
|
||||
// {
|
||||
// return( FALSE );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return( TRUE );
|
||||
//}
|
||||
|
||||
|
||||
|
||||
//********************************************************************************
|
||||
// MusicPlay
|
||||
@@ -117,65 +201,22 @@ INT32 GlobalSoundID = -1;
|
||||
// Returns: TRUE if the music was started, FALSE if an error occurred
|
||||
//
|
||||
//********************************************************************************
|
||||
#ifdef NEWMUSIC
|
||||
BOOLEAN MusicPlay(UINT32 uiNum, UINT32 MusicMode, BOOLEAN NewSound )
|
||||
#else
|
||||
BOOLEAN MusicPlay(UINT32 uiNum)
|
||||
#endif
|
||||
static BOOLEAN MusicPlay(STR zFileName)
|
||||
{
|
||||
// WANNE: We want music in windowed mode
|
||||
//if( 1==iScreenMode ) /* on Windowed mode, skip the music? was coded for WINDOWED_MODE that way...*/
|
||||
//return FALSE;
|
||||
|
||||
static CHAR8 zFileName[164];
|
||||
SOUNDPARMS spParms;
|
||||
|
||||
if(fMusicPlaying)
|
||||
if (fMusicPlaying)
|
||||
MusicStop();
|
||||
|
||||
memset(&spParms, 0xff, sizeof(SOUNDPARMS));
|
||||
spParms.uiPriority = PRIORITY_MAX;
|
||||
spParms.uiVolume = 0;
|
||||
spParms.uiLoop = 1; // Lesh: only 1 line added
|
||||
|
||||
spParms.uiLoop = 1;
|
||||
spParms.EOSCallback = MusicStopCallback;
|
||||
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, "About to call SoundPlayStreamedFile" );
|
||||
|
||||
// Lesh: patch to allow playback ogg files
|
||||
#ifdef NEWMUSIC
|
||||
if ( NewSound == FALSE && MusicMode == MUSIC_OLD_TYPE )
|
||||
{
|
||||
#endif
|
||||
SoundFileExists( szMusicList[uiNum], zFileName );
|
||||
#ifdef NEWMUSIC
|
||||
}
|
||||
else if ( NewSound == TRUE )
|
||||
{
|
||||
CHAR8 modstr[32] = "";
|
||||
CHAR8 modstr2[164] = "";
|
||||
|
||||
switch ( MusicMode )
|
||||
{
|
||||
case MUSIC_TACTICAL_NOTHING: sprintf( modstr, "NOTHING_" ); break;
|
||||
case MUSIC_TACTICAL_ENEMYPRESENT: sprintf( modstr, "TENSOR_" ); break;
|
||||
case MUSIC_TACTICAL_BATTLE: sprintf( modstr, "BATTLE_" ); break;
|
||||
case MUSIC_TACTICAL_VICTORY: sprintf( modstr, "TRIUMPH_" ); break;
|
||||
case MUSIC_TACTICAL_BATTLE_MUSIC: sprintf( modstr, "CREATURE_BATTLE_" ); break;
|
||||
case MUSIC_TACTICAL_CREEPY_MUSIC: sprintf( modstr, "CREEPY_" ); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
sprintf( modstr2, "%s\\%s%d", szMusicList[15], modstr, uiNum );
|
||||
|
||||
SoundFileExists( modstr2, zFileName );
|
||||
}
|
||||
#endif
|
||||
uiMusicHandle = SoundPlayStreamedFile(zFileName, &spParms);
|
||||
|
||||
if(uiMusicHandle != SOUND_ERROR)
|
||||
if (uiMusicHandle != SOUND_ERROR)
|
||||
{
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "Music PLay %d %d", uiMusicHandle, gubMusicMode ) );
|
||||
|
||||
gfMusicEnded = FALSE;
|
||||
fMusicPlaying = TRUE;
|
||||
@@ -183,10 +224,19 @@ BOOLEAN MusicPlay(UINT32 uiNum)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "Music PLay %d %d", uiMusicHandle, gubMusicMode ) );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN MusicPlay(NewMusicList mode, UINT8 songIndex)
|
||||
{
|
||||
if (mode >= MAX_MUSIC || songIndex >= MusicLists[mode].size())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
MusicPlay(MusicLists[mode][songIndex]);
|
||||
}
|
||||
|
||||
//********************************************************************************
|
||||
// MusicSetVolume
|
||||
//
|
||||
@@ -410,78 +460,11 @@ BOOLEAN MusicPoll(BOOLEAN /*fForce*/)
|
||||
//DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"MusicPoll done");
|
||||
return TRUE;
|
||||
}
|
||||
#ifdef NEWMUSIC
|
||||
static BOOLEAN SetMusicModeID(UINT8 ubMusicMode, INT32 SoundID, BOOLEAN fForce)
|
||||
{
|
||||
static INT8 bPreviousMode = 0;
|
||||
|
||||
static INT32 bPreviousMusic = 0;
|
||||
|
||||
// OK, check if we want to restore
|
||||
if (ubMusicMode == MUSIC_RESTORE)
|
||||
{
|
||||
if (bPreviousMode == MUSIC_TACTICAL_VICTORY || bPreviousMode == MUSIC_TACTICAL_DEATH)
|
||||
{
|
||||
bPreviousMode = MUSIC_TACTICAL_NOTHING;
|
||||
}
|
||||
|
||||
ubMusicMode = bPreviousMode;
|
||||
SoundID = bPreviousMusic;
|
||||
GlobalSoundID = SoundID;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Save previous mode...
|
||||
bPreviousMode = gubOldMusicMode;
|
||||
bPreviousMusic = SoundID;
|
||||
GlobalSoundID = SoundID;
|
||||
}
|
||||
|
||||
// if different, start a new music song
|
||||
//if ( ( fForce || gubOldMusicMode != ubMusicMode ) && SoundID != -1)
|
||||
if ( fForce || SoundID != -1 )
|
||||
{
|
||||
// Set mode....
|
||||
gubMusicMode = ubMusicMode;
|
||||
NewSoundID = SoundID;
|
||||
GlobalSoundID = SoundID;
|
||||
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "Music New Mode %d %d", uiMusicHandle, gubMusicMode ) );
|
||||
|
||||
gbVictorySongCount = 0;
|
||||
gbDeathSongCount = 0;
|
||||
|
||||
if(uiMusicHandle != NO_SAMPLE)
|
||||
{
|
||||
// Fade out old music
|
||||
MusicFadeOut();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Change music!
|
||||
StartMusicBasedOnMode();
|
||||
}
|
||||
}
|
||||
|
||||
gubOldMusicMode = gubMusicMode;
|
||||
gubOldMusicMode2 = SoundID;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static BOOLEAN SetMusicMode(UINT8 ubMusicMode, BOOLEAN fForce)
|
||||
{
|
||||
static INT8 bPreviousMode = 0;
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
SetSoundID = FALSE;
|
||||
//GlobalSoundID = -1;
|
||||
|
||||
if ( SetSoundID == FALSE )
|
||||
NewSoundID = -1;
|
||||
#endif
|
||||
|
||||
// OK, check if we want to restore
|
||||
if (ubMusicMode == MUSIC_RESTORE)
|
||||
{
|
||||
@@ -489,24 +472,7 @@ static BOOLEAN SetMusicMode(UINT8 ubMusicMode, BOOLEAN fForce)
|
||||
{
|
||||
bPreviousMode = MUSIC_TACTICAL_NOTHING;
|
||||
}
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
if ( GlobalSoundID == -1 )
|
||||
{
|
||||
SetSoundID = FALSE;
|
||||
GlobalSoundID = -1;
|
||||
NewSoundID = -1;
|
||||
}
|
||||
else if ( GlobalSoundID != -1)
|
||||
{
|
||||
SetSoundID = TRUE;
|
||||
NewSoundID = gubOldMusicMode2;
|
||||
GlobalSoundID = NewSoundID;
|
||||
}
|
||||
#endif
|
||||
ubMusicMode = bPreviousMode;
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -515,11 +481,7 @@ static BOOLEAN SetMusicMode(UINT8 ubMusicMode, BOOLEAN fForce)
|
||||
}
|
||||
|
||||
// if different, start a new music song
|
||||
#ifdef NEWMUSIC
|
||||
if (fForce || gubOldMusicMode != ubMusicMode || GlobalSoundID == -1 || SetSoundID == TRUE )
|
||||
#else
|
||||
if (fForce || gubOldMusicMode != ubMusicMode)
|
||||
#endif
|
||||
{
|
||||
// Set mode....
|
||||
gubMusicMode = ubMusicMode;
|
||||
@@ -546,36 +508,19 @@ static BOOLEAN SetMusicMode(UINT8 ubMusicMode, BOOLEAN fForce)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
static BOOLEAN StartMusicBasedOnMode(void)
|
||||
{
|
||||
static BOOLEAN fFirstTime = TRUE;
|
||||
|
||||
|
||||
if (fFirstTime)
|
||||
{
|
||||
fFirstTime = FALSE;
|
||||
|
||||
bNothingModeSong = (INT8) (NOTHING_A_MUSIC + Random(4));
|
||||
bEnemyModeSong = (INT8) (TENSOR_A_MUSIC + Random(3));
|
||||
bBattleModeSong = (INT8) (BATTLE_A_MUSIC + Random(2));
|
||||
}
|
||||
|
||||
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "StartMusicBasedOnMode() %d %d", uiMusicHandle, gubMusicMode ) );
|
||||
|
||||
// Setup a song based on mode we're in!
|
||||
switch(gubMusicMode)
|
||||
{
|
||||
case MUSIC_MAIN_MENU:
|
||||
// ATE: Don't fade in
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
MusicPlay(MENUMIX_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
||||
MusicPlay(PickRandomSongFromList(MUSICLIST_MAIN_MENU));
|
||||
break;
|
||||
|
||||
case MUSIC_LAPTOP:
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
MusicPlay(MARIMBAD2_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
||||
MusicPlay(PickRandomSongFromList(MUSICLIST_LAPTOP));
|
||||
break;
|
||||
|
||||
case MUSIC_TACTICAL_NOTHING:
|
||||
@@ -583,31 +528,11 @@ static BOOLEAN StartMusicBasedOnMode(void)
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
if(gfUseCreatureMusic)
|
||||
{
|
||||
if ( NewSoundID == -1)
|
||||
{
|
||||
SetSoundID = FALSE;
|
||||
MusicPlay(CREEPY_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetSoundID = TRUE;
|
||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_CREEPY_MUSIC,TRUE);
|
||||
}
|
||||
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_CREEPY));
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( NewSoundID == -1)
|
||||
{
|
||||
SetSoundID = FALSE;
|
||||
MusicPlay(bNothingModeSong,MUSIC_OLD_TYPE,FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetSoundID = TRUE;
|
||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_NOTHING,TRUE);
|
||||
}
|
||||
|
||||
bNothingModeSong = (INT8) (NOTHING_A_MUSIC + Random(4));
|
||||
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_NOTHING));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -616,30 +541,15 @@ static BOOLEAN StartMusicBasedOnMode(void)
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
if(gfUseCreatureMusic)
|
||||
{
|
||||
if ( NewSoundID == -1)
|
||||
{
|
||||
SetSoundID = FALSE;
|
||||
MusicPlay(CREEPY_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
||||
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_CREEPY));
|
||||
}
|
||||
else if (NightTime() && MusicLists[MUSICLIST_TACTICAL_ENEMYPRESENT_NIGHT].size() > 0)
|
||||
{
|
||||
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_ENEMYPRESENT_NIGHT));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetSoundID = TRUE;
|
||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_ENEMYPRESENT,TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( NewSoundID == -1)
|
||||
{
|
||||
SetSoundID = FALSE;
|
||||
MusicPlay(bEnemyModeSong,MUSIC_OLD_TYPE,FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetSoundID = TRUE;
|
||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_ENEMYPRESENT,TRUE);
|
||||
}
|
||||
bEnemyModeSong = (INT8) (TENSOR_A_MUSIC + Random(3));
|
||||
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_ENEMYPRESENT));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -648,47 +558,23 @@ static BOOLEAN StartMusicBasedOnMode(void)
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
if(gfUseCreatureMusic)
|
||||
{
|
||||
if ( NewSoundID == -1)
|
||||
{
|
||||
SetSoundID = FALSE;
|
||||
MusicPlay(CREATURE_BATTLE_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetSoundID = TRUE;
|
||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_BATTLE_MUSIC,TRUE);
|
||||
}
|
||||
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_CREEPY_BATTLE));
|
||||
}
|
||||
else if (NightTime() && MusicLists[MUSICLIST_TACTICAL_BATTLE_NIGHT].size() > 0)
|
||||
{
|
||||
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_BATTLE_NIGHT));
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( NewSoundID == -1)
|
||||
{
|
||||
SetSoundID = FALSE;
|
||||
MusicPlay(bBattleModeSong,MUSIC_OLD_TYPE,FALSE);
|
||||
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_BATTLE));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetSoundID = TRUE;
|
||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_BATTLE,TRUE);
|
||||
}
|
||||
}
|
||||
bBattleModeSong = (INT8) (BATTLE_A_MUSIC + Random(2));
|
||||
break;
|
||||
|
||||
case MUSIC_TACTICAL_VICTORY:
|
||||
|
||||
// ATE: Don't fade in EnemyPresent...
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
if ( NewSoundID == -1)
|
||||
{
|
||||
SetSoundID = FALSE;
|
||||
MusicPlay(TRIUMPH_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetSoundID = TRUE;
|
||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_VICTORY,TRUE);
|
||||
}
|
||||
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_VICTORY));
|
||||
gbVictorySongCount++;
|
||||
|
||||
if(gfUseCreatureMusic && !gbWorldSectorZ)
|
||||
@@ -702,16 +588,7 @@ static BOOLEAN StartMusicBasedOnMode(void)
|
||||
|
||||
// ATE: Don't fade in EnemyPresent...
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
if ( NewSoundID == -1)
|
||||
{
|
||||
SetSoundID = FALSE;
|
||||
MusicPlay(DEATH_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetSoundID = TRUE;
|
||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_DEATH,TRUE);
|
||||
}
|
||||
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_DEATH));
|
||||
gbDeathSongCount++;
|
||||
break;
|
||||
|
||||
@@ -722,121 +599,13 @@ static BOOLEAN StartMusicBasedOnMode(void)
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#else
|
||||
static BOOLEAN StartMusicBasedOnMode(void)
|
||||
{
|
||||
static BOOLEAN fFirstTime = TRUE;
|
||||
|
||||
if (fFirstTime)
|
||||
{
|
||||
fFirstTime = FALSE;
|
||||
|
||||
bNothingModeSong = (INT8) (NOTHING_A_MUSIC + Random(4));
|
||||
bEnemyModeSong = (INT8) (TENSOR_A_MUSIC + Random(3));
|
||||
bBattleModeSong = (INT8) (BATTLE_A_MUSIC + Random(2));
|
||||
}
|
||||
|
||||
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "StartMusicBasedOnMode() %d %d", uiMusicHandle, gubMusicMode ) );
|
||||
|
||||
// Setup a song based on mode we're in!
|
||||
switch(gubMusicMode)
|
||||
{
|
||||
case MUSIC_MAIN_MENU:
|
||||
// ATE: Don't fade in
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
MusicPlay(MENUMIX_MUSIC);
|
||||
break;
|
||||
|
||||
case MUSIC_LAPTOP:
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
MusicPlay(MARIMBAD2_MUSIC);
|
||||
break;
|
||||
|
||||
case MUSIC_TACTICAL_NOTHING:
|
||||
// ATE: Don't fade in
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
if(gfUseCreatureMusic)
|
||||
{
|
||||
MusicPlay(CREEPY_MUSIC);
|
||||
}
|
||||
else
|
||||
{
|
||||
MusicPlay(bNothingModeSong);
|
||||
bNothingModeSong = (INT8) (NOTHING_A_MUSIC + Random(4));
|
||||
}
|
||||
break;
|
||||
|
||||
case MUSIC_TACTICAL_ENEMYPRESENT:
|
||||
// ATE: Don't fade in EnemyPresent...
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
if(gfUseCreatureMusic)
|
||||
{
|
||||
MusicPlay(CREEPY_MUSIC);
|
||||
}
|
||||
else
|
||||
{
|
||||
MusicPlay(bEnemyModeSong);
|
||||
bEnemyModeSong = (INT8) (TENSOR_A_MUSIC + Random(3));
|
||||
}
|
||||
break;
|
||||
|
||||
case MUSIC_TACTICAL_BATTLE:
|
||||
// ATE: Don't fade in
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
if(gfUseCreatureMusic)
|
||||
{
|
||||
MusicPlay(CREATURE_BATTLE_MUSIC);
|
||||
}
|
||||
else
|
||||
{
|
||||
MusicPlay(bBattleModeSong);
|
||||
}
|
||||
bBattleModeSong = (INT8) (BATTLE_A_MUSIC + Random(2));
|
||||
break;
|
||||
|
||||
case MUSIC_TACTICAL_VICTORY:
|
||||
|
||||
// ATE: Don't fade in EnemyPresent...
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
MusicPlay(TRIUMPH_MUSIC);
|
||||
gbVictorySongCount++;
|
||||
|
||||
if(gfUseCreatureMusic && !gbWorldSectorZ)
|
||||
{
|
||||
//We just killed all the creatures that just attacked the town.
|
||||
gfUseCreatureMusic = FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case MUSIC_TACTICAL_DEATH:
|
||||
|
||||
// ATE: Don't fade in EnemyPresent...
|
||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||
MusicPlay(DEATH_MUSIC);
|
||||
gbDeathSongCount++;
|
||||
break;
|
||||
|
||||
default:
|
||||
MusicFadeOut();
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOLEAN SetMusicMode(UINT8 ubMusicMode)
|
||||
{
|
||||
return SetMusicMode(ubMusicMode, FALSE);
|
||||
}
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
BOOLEAN SetMusicModeID(UINT8 ubMusicMode, INT32 SoundID)
|
||||
{
|
||||
return SetMusicModeID(ubMusicMode, SoundID, FALSE);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void MusicStopCallback(void *pData)
|
||||
{
|
||||
|
||||
+18
-49
@@ -3,27 +3,6 @@
|
||||
|
||||
#include "Overhead Types.h"
|
||||
|
||||
enum MusicList
|
||||
{
|
||||
MARIMBAD2_MUSIC,
|
||||
MENUMIX_MUSIC,
|
||||
NOTHING_A_MUSIC,
|
||||
NOTHING_B_MUSIC,
|
||||
NOTHING_C_MUSIC,
|
||||
NOTHING_D_MUSIC,
|
||||
TENSOR_A_MUSIC,
|
||||
TENSOR_B_MUSIC,
|
||||
TENSOR_C_MUSIC,
|
||||
TRIUMPH_MUSIC,
|
||||
DEATH_MUSIC,
|
||||
BATTLE_A_MUSIC,
|
||||
BATTLE_B_MUSIC, //same as tensor B
|
||||
CREEPY_MUSIC,
|
||||
CREATURE_BATTLE_MUSIC,
|
||||
MUSIC_DIR,
|
||||
NUM_MUSIC
|
||||
};
|
||||
|
||||
enum MusicMode
|
||||
{
|
||||
MUSIC_NONE,
|
||||
@@ -42,43 +21,33 @@ enum MusicMode
|
||||
MUSIC_TACTICAL_CIV_GROUP_BATTLE,
|
||||
};
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
typedef struct
|
||||
enum NewMusicList
|
||||
{
|
||||
UINT16 uiIndex;
|
||||
INT32 SoundTacticalVictory[4];
|
||||
INT32 SoundTacticalBattle[4];
|
||||
INT32 SoundTacticalNothing[4];
|
||||
INT32 SoundTacticalTensor[4];
|
||||
INT32 SoundTacticalDeath[4];
|
||||
INT32 SoundTacticalBattleCreature[4];
|
||||
INT32 SoundTacticalBattleCreepy[4];
|
||||
INT32 SoundTacticalBattleGroup[NUM_CIV_GROUPS];
|
||||
MUSICLIST_MAIN_MENU,
|
||||
MUSICLIST_LAPTOP,
|
||||
MUSICLIST_TACTICAL_NOTHING,
|
||||
MUSICLIST_TACTICAL_ENEMYPRESENT,
|
||||
MUSICLIST_TACTICAL_BATTLE,
|
||||
MUSICLIST_TACTICAL_ENEMYPRESENT_NIGHT,
|
||||
MUSICLIST_TACTICAL_BATTLE_NIGHT,
|
||||
MUSICLIST_TACTICAL_VICTORY,
|
||||
MUSICLIST_TACTICAL_DEATH,
|
||||
MUSICLIST_TACTICAL_CREEPY,
|
||||
MUSICLIST_TACTICAL_CREEPY_BATTLE,
|
||||
|
||||
} MUSIC_SOUND_VALUES;
|
||||
MAX_MUSIC,
|
||||
};
|
||||
|
||||
extern MUSIC_SOUND_VALUES MusicSoundValues[256];
|
||||
extern INT32 GlobalSoundID;
|
||||
#endif
|
||||
extern std::vector<STR> MusicLists[MAX_MUSIC];
|
||||
|
||||
//extern UINT32 uiMusicHandle;
|
||||
//extern BOOLEAN fMusicPlaying;
|
||||
//extern UINT8 gubMusicMode;
|
||||
//extern BOOLEAN gfForceMusicToTense;
|
||||
void InitializeMusicLists();
|
||||
|
||||
UINT8 GetMusicMode(void);
|
||||
BOOLEAN SetMusicMode(UINT8 ubMusicMode);
|
||||
|
||||
// only for editor (editscreen.cpp)
|
||||
#ifdef NEWMUSIC
|
||||
BOOLEAN MusicPlay(UINT32 uiNum, UINT32 MusicMode, BOOLEAN NewSound);
|
||||
#else
|
||||
BOOLEAN MusicPlay(UINT32 uiNum);
|
||||
#endif
|
||||
// Used in lua scripting and editscreen.cpp
|
||||
BOOLEAN MusicPlay(NewMusicList mode, UINT8 songIndex);
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
BOOLEAN SetMusicModeID(UINT8 ubMusicMode, INT32 SoundID);
|
||||
#endif
|
||||
UINT32 MusicGetVolume(void);
|
||||
BOOLEAN MusicSetVolume(UINT32 uiVolume);
|
||||
|
||||
|
||||
@@ -3084,6 +3084,36 @@ extern STR16 szSMilitiaResourceText[];
|
||||
extern STR16 szInteractiveActionText[];
|
||||
|
||||
extern STR16 szLaptopStatText[];
|
||||
enum
|
||||
{
|
||||
LAPTOP_STAT_TEXT_THREATEN_EFFECTIVENESS,
|
||||
LAPTOP_STAT_TEXT_LEADERSHIP,
|
||||
LAPTOP_STAT_TEXT_APPROACH_MODIFIER,
|
||||
LAPTOP_STAT_TEXT_BACKGROUND_MODIFIER,
|
||||
LAPTOP_STAT_TEXT_ASSERTIVE,
|
||||
LAPTOP_STAT_TEXT_MALICIOUS,
|
||||
LAPTOP_STAT_TEXT_GOOD_GUY,
|
||||
LAPTOP_STAT_TEXT_REFUSES_TO_ATTACK_NON_HOSTILES,
|
||||
LAPTOP_STAT_TEXT_FRIENDLY_APPROACH,
|
||||
LAPTOP_STAT_TEXT_DIRECT_APPROACH,
|
||||
LAPTOP_STAT_TEXT_THREATEN_APPROACH,
|
||||
LAPTOP_STAT_TEXT_RECRUIT_APPROACH,
|
||||
LAPTOP_STAT_TEXT_MERC_REGRESSES,
|
||||
LAPTOP_STAT_TEXT_FAST,
|
||||
LAPTOP_STAT_TEXT_AVERAGE,
|
||||
LAPTOP_STAT_TEXT_SLOW,
|
||||
LAPTOP_STAT_TEXT_HEALTH_SPEED,
|
||||
LAPTOP_STAT_TEXT_STRENGTH_SPEED,
|
||||
LAPTOP_STAT_TEXT_AGILITY_SPEED,
|
||||
LAPTOP_STAT_TEXT_DEXTERITY_SPEED,
|
||||
LAPTOP_STAT_TEXT_WISDOM_SPEED,
|
||||
LAPTOP_STAT_TEXT_MARKSMANSHIP_SPEED,
|
||||
LAPTOP_STAT_TEXT_EXPLOSIVES_SPEED,
|
||||
LAPTOP_STAT_TEXT_LEADERSHIP_SPEED,
|
||||
LAPTOP_STAT_TEXT_MEDICAL_SPEED,
|
||||
LAPTOP_STAT_TEXT_MECHANICAL_SPEED,
|
||||
LAPTOP_STAT_TEXT_EXPERIENCE_SPEED,
|
||||
};
|
||||
|
||||
// Flugente: gear templates
|
||||
extern STR16 szGearTemplateText[];
|
||||
|
||||
+1
-2
@@ -30,7 +30,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
#include "container.h"
|
||||
#include "wcheck.h"
|
||||
#include "Event Manager.h"
|
||||
#include "Event Pump.h"
|
||||
@@ -108,4 +107,4 @@
|
||||
//#include <windowsx.h>
|
||||
//#include <mmsystem.h>
|
||||
//#include <dsound.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
#define __WORDWRAP_H_
|
||||
|
||||
#include "types.h"
|
||||
#include "LAPTOP\files.h"
|
||||
#include "LAPTOP\email.h"
|
||||
#include "files.h"
|
||||
#include "email.h"
|
||||
|
||||
//Flags for DrawTextToScreen()
|
||||
|
||||
|
||||
+231
-196
@@ -306,7 +306,6 @@ itemStartElementHandle(void *userData, const XML_Char *name, const XML_Char **at
|
||||
strcmp(name, "ProvidesRobotCamo") == 0 ||
|
||||
strcmp(name, "ProvidesRobotNightVision") == 0 ||
|
||||
strcmp(name, "ProvidesRobotLaserBonus") == 0 ||
|
||||
strcmp(name, "FoodSystemExclusive") == 0 ||
|
||||
strcmp(name, "DiseaseSystemExclusive") == 0 ||
|
||||
strcmp(name, "TransportGroupMinProgress") == 0 ||
|
||||
strcmp(name, "TransportGroupMaxProgress") == 0
|
||||
@@ -562,90 +561,101 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.bRepairEase = (INT8) atol(pData->szCharData);
|
||||
}
|
||||
//else if(strcmp(name, "fFlags") == 0)
|
||||
//{
|
||||
// pData->curElement = ELEMENT;
|
||||
// pData->curItem.fFlags = (BOOLEAN) atol(pData->szCharData);
|
||||
//}
|
||||
else if(strcmp(name, "Damageable") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.damageable = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_damageable;
|
||||
}
|
||||
else if(strcmp(name, "Repairable") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.repairable = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_repairable;
|
||||
}
|
||||
else if(strcmp(name, "WaterDamages") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.waterdamages = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_waterdamages;
|
||||
}
|
||||
else if(strcmp(name, "Metal") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.metal = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_metal;
|
||||
}
|
||||
else if(strcmp(name, "Sinks") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.sinks = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_sinks;
|
||||
}
|
||||
else if(strcmp(name, "ShowStatus") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.showstatus = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_showstatus;
|
||||
}
|
||||
else if(strcmp(name, "HiddenAddon") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.hiddenaddon = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_hiddenaddon;
|
||||
}
|
||||
else if(strcmp(name, "TwoHanded") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.twohanded = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_twohanded;
|
||||
}
|
||||
else if(strcmp(name, "NotBuyable") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.notbuyable = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_notbuyable;
|
||||
}
|
||||
else if(strcmp(name, "Attachment") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.attachment = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_attachment;
|
||||
}
|
||||
else if(strcmp(name, "HiddenAttachment") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.hiddenattachment = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_hiddenattachment;
|
||||
}
|
||||
else if(strcmp(name, "BigGunList") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.biggunlist = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_biggunlist;
|
||||
}
|
||||
else if(strcmp(name, "NotInEditor") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.notineditor = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_notineditor;
|
||||
}
|
||||
else if(strcmp(name, "DefaultUndroppable") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.defaultundroppable = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_defaultundroppable;
|
||||
}
|
||||
else if(strcmp(name, "Unaerodynamic") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.unaerodynamic = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_unaerodynamic;
|
||||
}
|
||||
else if(strcmp(name, "Electronic") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.electronic = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_electronic;
|
||||
}
|
||||
else if(strcmp(name, "Inseparable") == 0)
|
||||
{
|
||||
@@ -700,7 +710,8 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "GasMask") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.gasmask = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_gasmask;
|
||||
}
|
||||
else if(strcmp(name, "Bipod") == 0)
|
||||
{
|
||||
@@ -803,47 +814,56 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "GrenadeLauncher") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.grenadelauncher = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_grenadelauncher;
|
||||
}
|
||||
else if(strcmp(name, "LockBomb") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.lockbomb = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_lockbomb;
|
||||
}
|
||||
else if(strcmp(name, "Flare") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.flare = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_flare;
|
||||
}
|
||||
else if(strcmp(name, "Duckbill") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.duckbill = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_duckbill;
|
||||
}
|
||||
else if(strcmp(name, "Detonator") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.detonator = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_detonator;
|
||||
}
|
||||
else if(strcmp(name, "RemoteDetonator") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.remotedetonator = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_remotedetonator;
|
||||
}
|
||||
else if(strcmp(name, "ThermalOptics") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.thermaloptics = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_thermaloptics;
|
||||
}
|
||||
else if(strcmp(name, "SciFi") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.scifi = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_scifi;
|
||||
}
|
||||
else if(strcmp(name, "NewInv") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.newinv = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_newinv;
|
||||
}
|
||||
else if(strcmp(name, "AttachmentSystem") == 0)
|
||||
{
|
||||
@@ -853,17 +873,20 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "HideMuzzleFlash") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.hidemuzzleflash = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_hidemuzzleflash;
|
||||
}
|
||||
else if(strcmp(name, "Cannon") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.cannon = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_cannon;
|
||||
}
|
||||
else if(strcmp(name, "RocketRifle") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.rocketrifle = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_rocketrifle;
|
||||
}
|
||||
else if(strcmp(name, "Alcohol") == 0)
|
||||
{
|
||||
@@ -875,12 +898,14 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "Hardware") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.hardware = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_hardware;
|
||||
}
|
||||
else if(strcmp(name, "Medical") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.medical = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_medical;
|
||||
}
|
||||
else if(strcmp(name, "DamageBonus") == 0)
|
||||
{
|
||||
@@ -895,28 +920,26 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "Mortar") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.mortar = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_mortar;
|
||||
}
|
||||
else if(strcmp(name, "RocketLauncher") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.rocketlauncher = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_rocketlauncher;
|
||||
}
|
||||
else if(strcmp(name, "SingleShotRocketLauncher") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.singleshotrocketlauncher = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_singleshotrocketlauncher;
|
||||
}
|
||||
else if(strcmp(name, "DiscardedLauncherItem") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.discardedlauncheritem = (UINT16) atol(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "SingleShotRocketLauncher") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.singleshotrocketlauncher = (BOOLEAN) atol(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "BloodiedItem") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
@@ -935,22 +958,26 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "BrassKnuckles") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.brassknuckles = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_brassknuckles;
|
||||
}
|
||||
else if(strcmp(name, "Crowbar") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.crowbar = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_crowbar;
|
||||
}
|
||||
else if(strcmp(name, "GLGrenade") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.glgrenade = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_glgrenade;
|
||||
}
|
||||
else if(strcmp(name, "FlakJacket") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.flakjacket = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_flakjacket;
|
||||
}
|
||||
else if(strcmp(name, "HearingRangeBonus") == 0)
|
||||
{
|
||||
@@ -990,117 +1017,140 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "LeatherJacket") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.leatherjacket = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_leatherjacket;
|
||||
}
|
||||
else if(strcmp(name, "NeedsBatteries") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.needsbatteries = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_needsbatteries;
|
||||
}
|
||||
else if(strcmp(name, "Batteries") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.batteries = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_batteries;
|
||||
}
|
||||
else if(strcmp(name, "XRay") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.xray = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_xray;
|
||||
}
|
||||
else if(strcmp(name, "WireCutters") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.wirecutters = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_wirecutters;
|
||||
}
|
||||
else if(strcmp(name, "Toolkit") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.toolkit = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_toolkit;
|
||||
}
|
||||
else if(strcmp(name, "Canteen") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.canteen = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_canteen;
|
||||
}
|
||||
else if(strcmp(name, "Marbles") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.marbles = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_marbles;
|
||||
}
|
||||
else if(strcmp(name, "Walkman") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.walkman = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_walkman;
|
||||
}
|
||||
else if(strcmp(name, "RemoteTrigger") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.remotetrigger = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_remotetrigger;
|
||||
}
|
||||
else if(strcmp(name, "RobotRemoteControl") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.robotremotecontrol = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_robotremotecontrol;
|
||||
}
|
||||
else if(strcmp(name, "CamouflageKit") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.camouflagekit = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_camouflagekit;
|
||||
}
|
||||
else if(strcmp(name, "LocksmithKit") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.locksmithkit = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_locksmithkit;
|
||||
}
|
||||
else if(strcmp(name, "Mine") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.mine = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_mine;
|
||||
}
|
||||
else if ( strcmp( name, "antitankmine" ) == 0 )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.antitankmine = (BOOLEAN)atol( pData->szCharData );
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_antitankmine;
|
||||
}
|
||||
else if(strcmp(name, "GasCan") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.gascan = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_gascan;
|
||||
}
|
||||
else if(strcmp(name, "CanAndString") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.canandstring = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_canandstring;
|
||||
}
|
||||
else if(strcmp(name, "ContainsLiquid") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.containsliquid = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_containsliquid;
|
||||
}
|
||||
else if(strcmp(name, "FingerPrintID") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.fingerprintid = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_fingerprintid;
|
||||
}
|
||||
else if(strcmp(name, "Rock") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.rock = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_rock;
|
||||
}
|
||||
else if(strcmp(name, "MedicalKit") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.medicalkit = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_medicalkit;
|
||||
}
|
||||
else if(strcmp(name, "FirstAidKit") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.firstaidkit = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_firstaidkit;
|
||||
}
|
||||
else if(strcmp(name, "MetalDetector") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.metaldetector = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_metaldetector;
|
||||
}
|
||||
if(strcmp(name, "PercentTunnelVision") == 0) //Madd: had to scrap the "else" due to a compiler limit
|
||||
{
|
||||
@@ -1110,7 +1160,8 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
if(strcmp(name, "Jar") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.jar = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_jar;
|
||||
}
|
||||
if(strcmp(name, "BestLaserRange") == 0)
|
||||
{
|
||||
@@ -1229,7 +1280,8 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "barrel") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.barrel = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_barrel;
|
||||
}
|
||||
else if(strcmp(name, "usOverheatingCooldownFactor") == 0)
|
||||
{
|
||||
@@ -1264,17 +1316,20 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "TripWireActivation") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.tripwireactivation = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_tripwireactivation;
|
||||
}
|
||||
else if(strcmp(name, "TripWire") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.tripwire = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_tripwire;
|
||||
}
|
||||
else if(strcmp(name, "Directional") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.directional = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_directional;
|
||||
}
|
||||
else if(strcmp(name, "DrugType") == 0)
|
||||
{
|
||||
@@ -1284,7 +1339,8 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "BlockIronSight") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.blockironsight = (BOOLEAN) atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_blockironsight;
|
||||
}
|
||||
else if(strcmp(name, "ItemFlag") == 0)
|
||||
{
|
||||
@@ -1395,12 +1451,14 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if (strcmp(name, "fAllowClimbing") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.fAllowClimbing = (BOOLEAN)atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_fAllowClimbing;
|
||||
}
|
||||
else if ( strcmp( name, "cigarette" ) == 0 )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.cigarette = (BOOLEAN)atol( pData->szCharData );
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_cigarette;
|
||||
}
|
||||
else if ( strcmp( name, "usPortionSize" ) == 0 )
|
||||
{
|
||||
@@ -1503,29 +1561,26 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if (strcmp(name, "ProvidesRobotCamo") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.fProvidesRobotCamo = (BOOLEAN)atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_fProvidesRobotCamo;
|
||||
}
|
||||
else if (strcmp(name, "ProvidesRobotNightVision") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.fProvidesRobotNightVision = (BOOLEAN)atol(pData->szCharData);
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_fProvidesRobotNightVision;
|
||||
}
|
||||
else if (strcmp(name, "ProvidesRobotLaserBonus") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.fProvidesRobotLaserBonus = (BOOLEAN)atol(pData->szCharData);
|
||||
}
|
||||
else if (strcmp(name, "FoodSystemExclusive") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
if (atol(pData->szCharData))
|
||||
pData->curItem.usLimitedToSystem|= FOOD_SYSTEM_FLAG;
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_fProvidesRobotLaserBonus;
|
||||
}
|
||||
else if (strcmp(name, "DiseaseSystemExclusive") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
if (atol(pData->szCharData))
|
||||
pData->curItem.usLimitedToSystem|= DISEASE_SYSTEM_FLAG;
|
||||
pData->curElement = ELEMENT;
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag2 |= ITEM_DiseaseSystemExclusive;
|
||||
}
|
||||
else if (strcmp(name, "TransportGroupMinProgress") == 0)
|
||||
{
|
||||
@@ -1600,9 +1655,12 @@ BOOLEAN ReadInItemStats(STR fileName, BOOLEAN localizedVersion )
|
||||
MemFree(lpcBuffer);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// item read was x -> x+1 items
|
||||
++gMAXITEMS_READ;
|
||||
|
||||
if (localizedTextOnly == false)
|
||||
{
|
||||
// item read was x -> x+1 items
|
||||
++gMAXITEMS_READ;
|
||||
}
|
||||
|
||||
MemFree(lpcBuffer);
|
||||
|
||||
@@ -1912,12 +1970,6 @@ BOOLEAN WriteItemStats()
|
||||
}
|
||||
FilePrintf(hFile,"</szBRDesc>\r\n");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
FilePrintf(hFile,"\t\t<usItemClass>%d</usItemClass>\r\n", Item[cnt].usItemClass);
|
||||
FilePrintf(hFile,"\t\t<nasAttachmentClass>%d</nasAttachmentClass>\r\n", Item[cnt].nasAttachmentClass);
|
||||
FilePrintf(hFile,"\t\t<nasLayoutClass>%d</nasLayoutClass>\r\n", Item[cnt].nasLayoutClass);
|
||||
@@ -1934,41 +1986,27 @@ BOOLEAN WriteItemStats()
|
||||
FilePrintf(hFile,"\t\t<bReliability>%d</bReliability>\r\n", Item[cnt].bReliability);
|
||||
FilePrintf(hFile,"\t\t<bRepairEase>%d</bRepairEase>\r\n", Item[cnt].bRepairEase);
|
||||
|
||||
//FilePrintf(hFile,"\t\t<damageable>%d</damageable>\r\n", Item[cnt].fFlags & ITEM_DAMAGEABLE ? TRUE : FALSE);
|
||||
//FilePrintf(hFile,"\t\t<repairable>%d</repairable>\r\n", Item[cnt].fFlags & ITEM_REPAIRABLE ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<waterdamages>%d</waterdamages>\r\n", Item[cnt].fFlags & ITEM_WATER_DAMAGES ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<metal>%d</metal>\r\n", Item[cnt].fFlags & ITEM_METAL ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<sinks>%d</sinks>\r\n", Item[cnt].fFlags & ITEM_SINKS ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<showstatus>%d</showstatus>\r\n", Item[cnt].fFlags & ITEM_SHOW_STATUS ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<hiddenaddon>%d</hiddenaddon>\r\n", Item[cnt].fFlags & ITEM_HIDDEN_ADDON ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<twohanded>%d</twohanded>\r\n", Item[cnt].fFlags & ITEM_TWO_HANDED ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<notbuyable>%d</notbuyable>\r\n", Item[cnt].fFlags & ITEM_NOT_BUYABLE ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<attachment>%d</attachment>\r\n", Item[cnt].fFlags & ITEM_ATTACHMENT ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<biggunlist>%d</biggunlist>\r\n", Item[cnt].fFlags & ITEM_BIGGUNLIST ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<notineditor>%d</notineditor>\r\n", Item[cnt].fFlags & ITEM_NOT_EDITOR ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<defaultundroppable>%d</defaultundroppable>\r\n", Item[cnt].fFlags & ITEM_DEFAULT_UNDROPPABLE ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<unaerodynamic>%d</unaerodynamic>\r\n", Item[cnt].fFlags & ITEM_UNAERODYNAMIC ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<electronic>%d</electronic>\r\n", Item[cnt].fFlags & ITEM_ELECTRONIC ? TRUE : FALSE );
|
||||
//FilePrintf(hFile,"\t\t<inseparable>%d</inseparable>\r\n", Item[cnt].fFlags & ITEM_INSEPARABLE ? TRUE : FALSE );
|
||||
if (ItemIsDamageable(cnt)) FilePrintf(hFile, "\t\t<Damageable>%d</Damageable>\r\n", 1);
|
||||
if (ItemIsRepairable(cnt)) FilePrintf(hFile, "\t\t<Repairable>%d</Repairable>\r\n", 1);
|
||||
if (ItemIsDamagedByWater(cnt)) FilePrintf(hFile, "\t\t<WaterDamages>%d</WaterDamages>\r\n", 1);
|
||||
if (ItemIsMetal(cnt)) FilePrintf(hFile, "\t\t<Metal>%d</Metal>\r\n", 1);
|
||||
if (ItemSinks(cnt)) FilePrintf(hFile, "\t\t<Sinks>%d</Sinks>\r\n", 1);
|
||||
if (HasItemFlag2(cnt, ITEM_showstatus)) FilePrintf(hFile, "\t\t<ShowStatus>%d</ShowStatus>\r\n", 1);
|
||||
if (ItemIsHiddenAddon(cnt)) FilePrintf(hFile, "\t\t<HiddenAddon>%d</HiddenAddon>\r\n", 1);
|
||||
if (ItemIsTwoHanded(cnt)) FilePrintf(hFile, "\t\t<TwoHanded>%d</TwoHanded>\r\n", 1);
|
||||
if (ItemIsNotBuyable(cnt)) FilePrintf(hFile, "\t\t<NotBuyable>%d</NotBuyable>\r\n", 1);
|
||||
if (ItemIsAttachment(cnt)) FilePrintf(hFile, "\t\t<Attachment>%d</Attachment>\r\n", 1);
|
||||
if (ItemIsHiddenAttachment(cnt)) FilePrintf(hFile, "\t\t<HiddenAttachment>%d</HiddenAttachment>\r\n", 1);
|
||||
if (ItemIsOnlyInTonsOfGuns(cnt)) FilePrintf(hFile, "\t\t<BigGunList>%d</BigGunList>\r\n", 1);
|
||||
if (ItemIsOnlyInScifi(cnt)) FilePrintf(hFile, "\t\t<SciFi>%d</SciFi>\r\n", 1);
|
||||
if (ItemIsOnlyInNIV(cnt)) FilePrintf(hFile, "\t\t<NewInv>%d</NewInv>\r\n", 1);
|
||||
if (ItemIsNotInEditor(cnt)) FilePrintf(hFile, "\t\t<NotInEditor>%d</NotInEditor>\r\n", 1);
|
||||
if (ItemIsUndroppableByDefault(cnt)) FilePrintf(hFile, "\t\t<DefaultUndroppable>%d</DefaultUndroppable>\r\n", 1);
|
||||
if (ItemIsUnaerodynamic(cnt)) FilePrintf(hFile, "\t\t<Unaerodynamic>%d</Unaerodynamic>\r\n", 1);
|
||||
if (ItemIsElectronic(cnt)) FilePrintf(hFile, "\t\t<Electronic>%d</Electronic>\r\n", 1);
|
||||
if (ItemHasHiddenMuzzleFlash(cnt)) FilePrintf(hFile, "\t\t<HideMuzzleFlash>%d</HideMuzzleFlash>\r\n", 1);
|
||||
|
||||
FilePrintf(hFile,"\t\t<Damageable>%d</Damageable>\r\n", Item[cnt].damageable );
|
||||
FilePrintf(hFile,"\t\t<Repairable>%d</Repairable>\r\n", Item[cnt].repairable );
|
||||
FilePrintf(hFile,"\t\t<WaterDamages>%d</WaterDamages>\r\n", Item[cnt].waterdamages );
|
||||
FilePrintf(hFile,"\t\t<Metal>%d</Metal>\r\n", Item[cnt].metal );
|
||||
FilePrintf(hFile,"\t\t<Sinks>%d</Sinks>\r\n", Item[cnt].sinks );
|
||||
FilePrintf(hFile,"\t\t<ShowStatus>%d</ShowStatus>\r\n", Item[cnt].showstatus );
|
||||
FilePrintf(hFile,"\t\t<HiddenAddon>%d</HiddenAddon>\r\n", Item[cnt].hiddenaddon );
|
||||
FilePrintf(hFile,"\t\t<TwoHanded>%d</TwoHanded>\r\n", Item[cnt].twohanded );
|
||||
FilePrintf(hFile,"\t\t<NotBuyable>%d</NotBuyable>\r\n", Item[cnt].notbuyable );
|
||||
FilePrintf(hFile,"\t\t<Attachment>%d</Attachment>\r\n", Item[cnt].attachment );
|
||||
FilePrintf(hFile,"\t\t<BigGunList>%d</BigGunList>\r\n", Item[cnt].biggunlist );
|
||||
FilePrintf(hFile,"\t\t<SciFi>%d</SciFi>\r\n", Item[cnt].scifi );
|
||||
FilePrintf(hFile,"\t\t<NewInv>%d</NewInv>\r\n", Item[cnt].newinv );
|
||||
FilePrintf(hFile,"\t\t<AttachmentSystem>%d</AttachmentSystem>\r\n", Item[cnt].ubAttachmentSystem );
|
||||
FilePrintf(hFile,"\t\t<NotInEditor>%d</NotInEditor>\r\n", Item[cnt].notineditor );
|
||||
FilePrintf(hFile,"\t\t<DefaultUndroppable>%d</DefaultUndroppable>\r\n", Item[cnt].defaultundroppable );
|
||||
FilePrintf(hFile,"\t\t<Unaerodynamic>%d</Unaerodynamic>\r\n", Item[cnt].unaerodynamic );
|
||||
FilePrintf(hFile,"\t\t<Electronic>%d</Electronic>\r\n", Item[cnt].electronic );
|
||||
FilePrintf(hFile,"\t\t<Inseparable>%d</Inseparable>\r\n", Item[cnt].inseparable );
|
||||
|
||||
FilePrintf(hFile,"\t\t<BR_NewInventory>%d</BR_NewInventory>\r\n", StoreInventory[cnt][0] );
|
||||
@@ -1976,7 +2014,6 @@ BOOLEAN WriteItemStats()
|
||||
FilePrintf(hFile,"\t\t<BR_ROF>%d</BR_ROF>\r\n", WeaponROF[cnt]);
|
||||
|
||||
FilePrintf(hFile,"\t\t<PercentNoiseReduction>%d</PercentNoiseReduction>\r\n", Item[cnt].percentnoisereduction );
|
||||
FilePrintf(hFile,"\t\t<HideMuzzleFlash>%d</HideMuzzleFlash>\r\n", Item[cnt].hidemuzzleflash );
|
||||
FilePrintf(hFile,"\t\t<Bipod>%d</Bipod>\r\n", Item[cnt].bipod );
|
||||
FilePrintf(hFile,"\t\t<RangeBonus>%d</RangeBonus>\r\n", Item[cnt].rangebonus );
|
||||
FilePrintf(hFile,"\t\t<PercentRangeBonus>%d</PercentRangeBonus>\r\n", Item[cnt].rangebonus );
|
||||
@@ -2002,17 +2039,19 @@ BOOLEAN WriteItemStats()
|
||||
|
||||
FilePrintf(hFile,"\t\t<DamageBonus>%d</DamageBonus>\r\n", Item[cnt].damagebonus );
|
||||
FilePrintf(hFile,"\t\t<MeleeDamageBonus>%d</MeleeDamageBonus>\r\n", Item[cnt].meleedamagebonus );
|
||||
FilePrintf(hFile,"\t\t<GrenadeLauncher>%d</GrenadeLauncher>\r\n", Item[cnt].grenadelauncher );
|
||||
FilePrintf(hFile,"\t\t<Duckbill>%d</Duckbill>\r\n", Item[cnt].duckbill );
|
||||
FilePrintf(hFile,"\t\t<GLGrenade>%d</GLGrenade>\r\n", Item[cnt].glgrenade );
|
||||
FilePrintf(hFile,"\t\t<Mine>%d</Mine>\r\n", Item[cnt].mine );
|
||||
FilePrintf(hFile,"\t\t<antitankmine>%d</antitankmine>\r\n", Item[cnt].antitankmine );
|
||||
FilePrintf(hFile,"\t\t<Mortar>%d</Mortar>\r\n", Item[cnt].mortar );
|
||||
FilePrintf(hFile,"\t\t<RocketLauncher>%d</RocketLauncher>\r\n", Item[cnt].rocketlauncher );
|
||||
FilePrintf(hFile,"\t\t<SingleShotRocketLauncher>%d</SingleShotRocketLauncher>\r\n", Item[cnt].singleshotrocketlauncher );
|
||||
FilePrintf(hFile,"\t\t<DiscardedLauncherItem>%d</DiscardedLauncherItem>\r\n", Item[cnt].discardedlauncheritem );
|
||||
FilePrintf(hFile,"\t\t<RocketRifle>%d</RocketRifle>\r\n", Item[cnt].rocketrifle);
|
||||
FilePrintf(hFile,"\t\t<Cannon>%d</Cannon>\r\n", Item[cnt].cannon);
|
||||
|
||||
if (ItemIsMortar(cnt)) FilePrintf(hFile, "\t\t<Mortar>%d</Mortar>\r\n", 1);
|
||||
if (ItemIsRocketLauncher(cnt)) FilePrintf(hFile, "\t\t<RocketLauncher>%d</RocketLauncher>\r\n", 1);
|
||||
if (ItemIsSingleShotRocketLauncher(cnt)) FilePrintf(hFile, "\t\t<SingleShotRocketLauncher>%d</SingleShotRocketLauncher>\r\n", 1);
|
||||
if (ItemIsGrenadeLauncher(cnt)) FilePrintf(hFile, "\t\t<GrenadeLauncher>%d</GrenadeLauncher>\r\n", 1);
|
||||
if (ItemIsDuckbill(cnt)) FilePrintf(hFile, "\t\t<Duckbill>%d</Duckbill>\r\n", 1);
|
||||
if (ItemIsGLgrenade(cnt)) FilePrintf(hFile, "\t\t<GLGrenade>%d</GLGrenade>\r\n", 1);
|
||||
if (ItemIsMine(cnt)) FilePrintf(hFile, "\t\t<Mine>%d</Mine>\r\n", 1);
|
||||
if (ItemIsATMine(cnt)) FilePrintf(hFile, "\t\t<antitankmine>%d</antitankmine>\r\n", 1);
|
||||
if (ItemIsRocketRifle(cnt)) FilePrintf(hFile, "\t\t<RocketRifle>%d</RocketRifle>\r\n", 1);
|
||||
if (ItemHasFingerPrintID(cnt)) FilePrintf(hFile, "\t\t<FingerPrintID>%d</FingerPrintID>\r\n", 1);
|
||||
if (ItemIsCannon(cnt)) FilePrintf(hFile, "\t\t<Cannon>%d</Cannon>\r\n", 1);
|
||||
|
||||
for(UINT8 cnt2 = 0; cnt2 < MAX_DEFAULT_ATTACHMENTS; cnt2++){
|
||||
if(Item[cnt].defaultattachments[cnt2] != 0){
|
||||
@@ -2020,29 +2059,30 @@ BOOLEAN WriteItemStats()
|
||||
}
|
||||
}
|
||||
|
||||
FilePrintf(hFile,"\t\t<BrassKnuckles>%d</BrassKnuckles>\r\n", Item[cnt].brassknuckles );
|
||||
FilePrintf(hFile,"\t\t<Crowbar>%d</Crowbar>\r\n", Item[cnt].crowbar );
|
||||
FilePrintf(hFile,"\t\t<BloodiedItem>%d</BloodiedItem>\r\n", Item[cnt].bloodieditem );
|
||||
FilePrintf(hFile,"\t\t<Rock>%d</Rock>\r\n", Item[cnt].rock );
|
||||
if (ItemIsBrassKnuckles(cnt)) FilePrintf(hFile, "\t\t<BrassKnuckles>%d</BrassKnuckles>\r\n", 1);
|
||||
if (ItemIsCrowbar(cnt)) FilePrintf(hFile, "\t\t<Crowbar>%d</Crowbar>\r\n", 1);
|
||||
if (ItemIsRock(cnt)) FilePrintf(hFile, "\t\t<Rock>%d</Rock>\r\n", 1);
|
||||
|
||||
FilePrintf(hFile,"\t\t<BloodiedItem>%d</BloodiedItem>\r\n", Item[cnt].bloodieditem );
|
||||
FilePrintf(hFile,"\t\t<CamoBonus>%d</CamoBonus>\r\n", Item[cnt].camobonus );
|
||||
FilePrintf(hFile,"\t\t<UrbanCamoBonus>%d</UrbanCamoBonus>\r\n", Item[cnt].urbanCamobonus );
|
||||
FilePrintf(hFile,"\t\t<DesertCamoBonus>%d</DesertCamoBonus>\r\n", Item[cnt].desertCamobonus );
|
||||
FilePrintf(hFile,"\t\t<SnowCamoBonus>%d</SnowCamoBonus>\r\n", Item[cnt].snowCamobonus );
|
||||
FilePrintf(hFile,"\t\t<StealthBonus>%d</StealthBonus>\r\n", Item[cnt].stealthbonus );
|
||||
FilePrintf(hFile,"\t\t<FlakJacket>%d</FlakJacket>\r\n", Item[cnt].flakjacket );
|
||||
FilePrintf(hFile,"\t\t<LeatherJacket>%d</LeatherJacket>\r\n", Item[cnt].leatherjacket );
|
||||
|
||||
FilePrintf(hFile,"\t\t<Detonator>%d</Detonator>\r\n", Item[cnt].detonator );
|
||||
FilePrintf(hFile,"\t\t<RemoteDetonator>%d</RemoteDetonator>\r\n", Item[cnt].remotedetonator );
|
||||
FilePrintf(hFile,"\t\t<RemoteTrigger>%d</RemoteTrigger>\r\n", Item[cnt].remotetrigger );
|
||||
FilePrintf(hFile,"\t\t<LockBomb>%d</LockBomb>\r\n", Item[cnt].lockbomb );
|
||||
FilePrintf(hFile,"\t\t<Flare>%d</Flare>\r\n", Item[cnt].flare );
|
||||
if (ItemIsFlakJacket(cnt)) FilePrintf(hFile, "\t\t<FlakJacket>%d</FlakJacket>\r\n", 1);
|
||||
if (ItemIsLeatherJacket(cnt)) FilePrintf(hFile, "\t\t<LeatherJacket>%d</LeatherJacket>\r\n", 1);
|
||||
if (ItemIsDetonator(cnt)) FilePrintf(hFile, "\t\t<Detonator>%d</Detonator>\r\n", 1);
|
||||
if (ItemIsRemoteDetonator(cnt)) FilePrintf(hFile, "\t\t<RemoteDetonator>%d</RemoteDetonator>\r\n", 1);
|
||||
if (ItemIsRemoteTrigger(cnt)) FilePrintf(hFile, "\t\t<RemoteTrigger>%d</RemoteTrigger>\r\n", 1);
|
||||
if (ItemIsLockBomb(cnt)) FilePrintf(hFile, "\t\t<LockBomb>%d</LockBomb>\r\n", 1);
|
||||
if (ItemIsFlare(cnt)) FilePrintf(hFile, "\t\t<Flare>%d</Flare>\r\n", 1);
|
||||
if (ItemIsRobotRemote(cnt)) FilePrintf(hFile, "\t\t<RobotRemoteControl>%d</RobotRemoteControl>\r\n", 1);
|
||||
if (ItemIsWalkman(cnt)) FilePrintf(hFile, "\t\t<Walkman>%d</Walkman>\r\n", 1);
|
||||
if (ItemIsThermalOptics(cnt)) FilePrintf(hFile, "\t\t<ThermalOptics>%d</ThermalOptics>\r\n", 1);
|
||||
if (ItemIsGasmask(cnt)) FilePrintf(hFile, "\t\t<GasMask>%d</GasMask>\r\n", 1);
|
||||
|
||||
FilePrintf(hFile,"\t\t<RobotRemoteControl>%d</RobotRemoteControl>\r\n", Item[cnt].robotremotecontrol );
|
||||
FilePrintf(hFile,"\t\t<Walkman>%d</Walkman>\r\n", Item[cnt].walkman );
|
||||
FilePrintf(hFile,"\t\t<HearingRangeBonus>%d</HearingRangeBonus>\r\n", Item[cnt].hearingrangebonus );
|
||||
|
||||
FilePrintf(hFile,"\t\t<VisionRangeBonus>%d</VisionRangeBonus>\r\n", Item[cnt].visionrangebonus );
|
||||
FilePrintf(hFile,"\t\t<NightVisionRangeBonus>%d</NightVisionRangeBonus>\r\n", Item[cnt].nightvisionrangebonus );
|
||||
FilePrintf(hFile,"\t\t<DayVisionRangeBonus>%d</DayVisionRangeBonus>\r\n", Item[cnt].dayvisionrangebonus );
|
||||
@@ -2050,30 +2090,26 @@ BOOLEAN WriteItemStats()
|
||||
FilePrintf(hFile,"\t\t<BrightLightVisionRangeBonus>%d</BrightLightVisionRangeBonus>\r\n", Item[cnt].brightlightvisionrangebonus );
|
||||
FilePrintf(hFile,"\t\t<ItemSizeBonus>%d</ItemSizeBonus>\r\n", Item[cnt].itemsizebonus );
|
||||
FilePrintf(hFile,"\t\t<PercentTunnelVision>%d</PercentTunnelVision>\r\n", Item[cnt].percenttunnelvision );
|
||||
FilePrintf(hFile,"\t\t<ThermalOptics>%d</ThermalOptics>\r\n", Item[cnt].thermaloptics );
|
||||
FilePrintf(hFile,"\t\t<GasMask>%d</GasMask>\r\n", Item[cnt].gasmask );
|
||||
|
||||
|
||||
FilePrintf(hFile,"\t\t<Alcohol>%3.2f</Alcohol>\r\n", Item[cnt].alcohol );
|
||||
FilePrintf(hFile,"\t\t<Hardware>%d</Hardware>\r\n", Item[cnt].hardware );
|
||||
FilePrintf(hFile,"\t\t<Medical>%d</Medical>\r\n", Item[cnt].medical );
|
||||
FilePrintf(hFile,"\t\t<CamouflageKit>%d</CamouflageKit>\r\n", Item[cnt].camouflagekit );
|
||||
FilePrintf(hFile,"\t\t<LocksmithKit>%d</LocksmithKit>\r\n", Item[cnt].locksmithkit );
|
||||
FilePrintf(hFile,"\t\t<Toolkit>%d</Toolkit>\r\n", Item[cnt].toolkit );
|
||||
FilePrintf(hFile,"\t\t<FirstAidKit>%d</FirstAidKit>\r\n", Item[cnt].firstaidkit );
|
||||
FilePrintf(hFile,"\t\t<MedicalKit>%d</MedicalKit>\r\n", Item[cnt].medicalkit );
|
||||
FilePrintf(hFile,"\t\t<WireCutters>%d</WireCutters>\r\n", Item[cnt].wirecutters );
|
||||
FilePrintf(hFile,"\t\t<Canteen>%d</Canteen>\r\n", Item[cnt].canteen );
|
||||
FilePrintf(hFile,"\t\t<GasCan>%d</GasCan>\r\n", Item[cnt].gascan );
|
||||
FilePrintf(hFile,"\t\t<Marbles>%d</Marbles>\r\n", Item[cnt].marbles );
|
||||
FilePrintf(hFile,"\t\t<CanAndString>%d</CanAndString>\r\n", Item[cnt].canandstring );
|
||||
FilePrintf(hFile,"\t\t<Jar>%d</Jar>\r\n", Item[cnt].jar );
|
||||
FilePrintf(hFile,"\t\t<XRay>%d</XRay>\r\n", Item[cnt].xray );
|
||||
FilePrintf(hFile,"\t\t<Batteries>%d</Batteries>\r\n", Item[cnt].batteries );
|
||||
FilePrintf(hFile,"\t\t<NeedsBatteries>%d</NeedsBatteries>\r\n", Item[cnt].needsbatteries );
|
||||
FilePrintf(hFile,"\t\t<ContainsLiquid>%d</ContainsLiquid>\r\n", Item[cnt].containsliquid );
|
||||
FilePrintf(hFile,"\t\t<MetalDetector>%d</MetalDetector>\r\n", Item[cnt].metaldetector );
|
||||
FilePrintf(hFile,"\t\t<FingerPrintID>%d</FingerPrintID>\r\n", Item[cnt].fingerprintid );
|
||||
|
||||
if (ItemIsHardware(cnt)) FilePrintf(hFile, "\t\t<Hardware>%d</Hardware>\r\n", 1);
|
||||
if (ItemIsMedical(cnt)) FilePrintf(hFile, "\t\t<Medical>%d</Medical>\r\n", 1);
|
||||
if (ItemIsCamoKit(cnt)) FilePrintf(hFile, "\t\t<CamouflageKit>%d</CamouflageKit>\r\n", 1);
|
||||
if (ItemIsLocksmithKit(cnt)) FilePrintf(hFile, "\t\t<LocksmithKit>%d</LocksmithKit>\r\n", 1);
|
||||
if (ItemIsToolkit(cnt)) FilePrintf(hFile, "\t\t<Toolkit>%d</Toolkit>\r\n", 1);
|
||||
if (ItemIsFirstAidKit(cnt)) FilePrintf(hFile, "\t\t<FirstAidKit>%d</FirstAidKit>\r\n", 1);
|
||||
if (ItemIsMedicalKit(cnt)) FilePrintf(hFile, "\t\t<MedicalKit>%d</MedicalKit>\r\n", 1);
|
||||
if (ItemIsWirecutters(cnt)) FilePrintf(hFile, "\t\t<WireCutters>%d</WireCutters>\r\n", 1);
|
||||
if (ItemIsCanteen(cnt)) FilePrintf(hFile, "\t\t<Canteen>%d</Canteen>\r\n", 1);
|
||||
if (ItemIsGascan(cnt)) FilePrintf(hFile, "\t\t<GasCan>%d</GasCan>\r\n", 1);
|
||||
if (ItemIsMarbles(cnt)) FilePrintf(hFile, "\t\t<Marbles>%d</Marbles>\r\n", 1);
|
||||
if (ItemIsCanAndString(cnt)) FilePrintf(hFile, "\t\t<CanAndString>%d</CanAndString>\r\n", 1);
|
||||
if (ItemIsJar(cnt)) FilePrintf(hFile, "\t\t<Jar>%d</Jar>\r\n", 1);
|
||||
if (ItemHasXRay(cnt)) FilePrintf(hFile, "\t\t<XRay>%d</XRay>\r\n", 1);
|
||||
if (ItemIsBatteries(cnt)) FilePrintf(hFile, "\t\t<Batteries>%d</Batteries>\r\n", 1);
|
||||
if (ItemNeedsBatteries(cnt)) FilePrintf(hFile, "\t\t<NeedsBatteries>%d</NeedsBatteries>\r\n", 1);
|
||||
if (ItemContainsLiquid(cnt)) FilePrintf(hFile, "\t\t<ContainsLiquid>%d</ContainsLiquid>\r\n", 1);
|
||||
if (ItemIsMetalDetector(cnt)) FilePrintf(hFile, "\t\t<MetalDetector>%d</MetalDetector>\r\n", 1);
|
||||
|
||||
// HEADROCK HAM 4: Print out new values
|
||||
FilePrintf(hFile,"\t\t<ScopeMagFactor>%d</ScopeMagFactor>\r\n", Item[cnt].scopemagfactor );
|
||||
@@ -2124,7 +2160,7 @@ BOOLEAN WriteItemStats()
|
||||
FilePrintf(hFile,"\t\t</PRONE_MODIFIERS>\r\n");
|
||||
|
||||
// Flugente FTW 1.2
|
||||
FilePrintf(hFile,"\t\t<barrel>%d</barrel>\r\n", Item[cnt].barrel );
|
||||
if (ItemIsBarrel(cnt)) FilePrintf(hFile, "\t\t<barrel>%d</barrel>\r\n", 1);
|
||||
FilePrintf(hFile,"\t\t<usOverheatingCooldownFactor>%4.2f</usOverheatingCooldownFactor>\r\n", Item[cnt].usOverheatingCooldownFactor );
|
||||
FilePrintf(hFile,"\t\t<overheatTemperatureModificator>%4.2f</overheatTemperatureModificator>\r\n", Item[cnt].overheatTemperatureModificator );
|
||||
FilePrintf(hFile,"\t\t<overheatCooldownModificator>%4.2f</overheatCooldownModificator>\r\n", Item[cnt].overheatCooldownModificator );
|
||||
@@ -2133,16 +2169,13 @@ BOOLEAN WriteItemStats()
|
||||
|
||||
FilePrintf(hFile,"\t\t<AttachmentClass>%4.2f</AttachmentClass>\r\n", Item[cnt].attachmentclass );
|
||||
|
||||
FilePrintf(hFile,"\t\t<TripwireActivation>%d</TripwireActivation>\r\n", Item[cnt].tripwireactivation );
|
||||
FilePrintf(hFile,"\t\t<TripWire>%d</TripWire>\r\n", Item[cnt].tripwire );
|
||||
FilePrintf(hFile,"\t\t<Directional>%d</Directional>\r\n", Item[cnt].directional );
|
||||
if (ItemHasTripwireActivation(cnt)) FilePrintf(hFile, "\t\t<TripwireActivation>%d</TripwireActivation>\r\n", 1);
|
||||
if (ItemIsTripwire(cnt)) FilePrintf(hFile, "\t\t<TripWire>%d</TripWire>\r\n", 1);
|
||||
if (ItemIsDirectional(cnt)) FilePrintf(hFile, "\t\t<Directional>%d</Directional>\r\n", 1);
|
||||
if (ItemBlocksIronsight(cnt)) FilePrintf(hFile, "\t\t<BlockIronSight>%d</BlockIronSight>\r\n", 1);
|
||||
|
||||
FilePrintf(hFile,"\t\t<DrugType>%d</DrugType>\r\n", Item[cnt].drugtype );
|
||||
|
||||
FilePrintf(hFile,"\t\t<BlockIronSight>%d</BlockIronSight>\r\n", Item[cnt].blockironsight );
|
||||
|
||||
FilePrintf(hFile,"\t\t<ItemFlag>%d</ItemFlag>\r\n", Item[cnt].usItemFlag );
|
||||
|
||||
FilePrintf(hFile,"\t\t<DrugType>%d</DrugType>\r\n", Item[cnt].drugtype );
|
||||
FilePrintf(hFile,"\t\t<FoodType>%d</FoodType>\r\n", Item[cnt].foodtype );
|
||||
|
||||
//JMich_SkillModifiers: Adding the values here as well
|
||||
@@ -2166,10 +2199,10 @@ BOOLEAN WriteItemStats()
|
||||
FilePrintf(hFile,"\t\t<SleepModifier>%d</SleepModifier>\r\n", Item[cnt].ubSleepModifier );
|
||||
FilePrintf(hFile,"\t\t<usSpotting>%d</usSpotting>\r\n", Item[cnt].usSpotting );
|
||||
FilePrintf(hFile,"\t\t<sBackpackWeightModifier>%d</sBackpackWeightModifier>\r\n", Item[cnt].sBackpackWeightModifier);
|
||||
FilePrintf(hFile,"\t\t<fAllowClimbing>%d</fAllowClimbing>\r\n", Item[cnt].fAllowClimbing);
|
||||
FilePrintf(hFile,"\t\t<cigarette>%d</cigarette>\r\n", Item[cnt].cigarette );
|
||||
FilePrintf(hFile,"\t\t<usPortionSize>%d</usPortionSize>\r\n", Item[cnt].usPortionSize );
|
||||
|
||||
if (ItemAllowsClimbing(cnt)) FilePrintf(hFile, "\t\t<fAllowClimbing>%d</fAllowClimbing>\r\n", 1);
|
||||
if (ItemIsCigarette(cnt)) FilePrintf(hFile, "\t\t<cigarette>%d</cigarette>\r\n", 1);
|
||||
if ( HasItemFlag( cnt, DISEASEPROTECTION_1 ) ) FilePrintf( hFile, "\t\t<diseaseprotectionface>%d</diseaseprotectionface>\r\n", 1 );
|
||||
if ( HasItemFlag( cnt, DISEASEPROTECTION_2 ) ) FilePrintf( hFile, "\t\t<diseaseprotectionhand>%d</diseaseprotectionhand>\r\n", 1 );
|
||||
if ( HasItemFlag( cnt, BLOOD_BAG) ) FilePrintf( hFile, "\t\t<bloodbag>%d</bloodbag>\r\n", 1 );
|
||||
@@ -2187,9 +2220,11 @@ BOOLEAN WriteItemStats()
|
||||
FilePrintf(hFile,"\t\t<RobotTargetingSkillGrant>%d</RobotTargetingSkillGrant>\r\n", Item[cnt].bRobotTargetingSkillGrant );
|
||||
FilePrintf(hFile,"\t\t<RobotChassisSkillGrant>%d</RobotChassisSkillGrant>\r\n", Item[cnt].bRobotChassisSkillGrant );
|
||||
FilePrintf(hFile,"\t\t<RobotUtilitySkillGrant>%d</RobotUtilitySkillGrant>\r\n", Item[cnt].bRobotUtilitySkillGrant );
|
||||
FilePrintf(hFile,"\t\t<ProvidesRobotCamo>%d</ProvidesRobotCamo>\r\n", Item[cnt].fProvidesRobotCamo );
|
||||
FilePrintf(hFile,"\t\t<ProvidesRobotNightVision>%d</ProvidesRobotNightVision>\r\n", Item[cnt].fProvidesRobotNightVision );
|
||||
FilePrintf(hFile,"\t\t<ProvidesRobotLaserBonus>%d</ProvidesRobotLaserBonus>\r\n", Item[cnt].fProvidesRobotLaserBonus );
|
||||
|
||||
if (ItemProvidesRobotCamo(cnt)) FilePrintf(hFile, "\t\t<ProvidesRobotCamo>%d</ProvidesRobotCamo>\r\n", 1);
|
||||
if (ItemProvidesRobotNightvision(cnt)) FilePrintf(hFile, "\t\t<ProvidesRobotNightVision>%d</ProvidesRobotNightVision>\r\n", 1);
|
||||
if (ItemProvidesRobotLaserBonus(cnt)) FilePrintf(hFile, "\t\t<ProvidesRobotLaserBonus>%d</ProvidesRobotLaserBonus>\r\n", 1);
|
||||
if (ItemIsOnlyInDisease(cnt)) FilePrintf(hFile, "\t\t<DiseaseSystemExclusive>%d</DiseaseSystemExclusive>\r\n", 1);
|
||||
|
||||
FilePrintf(hFile,"\t</ITEM>\r\n");
|
||||
}
|
||||
|
||||
+26
-18
@@ -3568,8 +3568,8 @@ STR16 gpStrategicString[] =
|
||||
L"僵尸", //L"Zombie",
|
||||
L"土匪", //L"Bandit",
|
||||
L"土匪杀死了%d名平民,在%s分区。", //注:这里的%d和%s不可以随意放前面或后面,一定要按英文顺序,不然会出错。(%d和%s 在中文中不能反过来。) L"Bandits attack and kill %d civilians in sector %s.",
|
||||
L"Transport group",
|
||||
L"Transport group en route",
|
||||
L"运输队", //L"Transport group",
|
||||
L"运输队已出发", //L"Transport group en route",
|
||||
};
|
||||
|
||||
STR16 gpGameClockString[] =
|
||||
@@ -6264,7 +6264,7 @@ STR16 z113FeaturesToggleText[] =
|
||||
L"天气功能:暴风雪", //L"Weather: Snow",
|
||||
L"随机事件功能", //L"Mini Events",
|
||||
L"反抗军司令部功能", //L"Arulco Rebel Command",
|
||||
L"Strategic Transport Groups",
|
||||
L"战略运输队", //L"Strategic Transport Groups",
|
||||
};
|
||||
|
||||
STR16 z113FeaturesHelpText[] =
|
||||
@@ -6312,7 +6312,7 @@ STR16 z113FeaturesHelpText[] =
|
||||
L"|天|气|功|能|:|暴|风|雪\n \n覆盖 [Tactical Weather Settings] ALLOW_SNOW\n \n暴风雪降低了能见度。\n \n配置选项:\nSNOW_EVENTS_PER_DAY\nSNOW_CHANCE_PER_DAY\nSNOW_MIN_LENGTH_IN_MINUTES\nSNOW_MAX_LENGTH_IN_MINUTES\nWEAPON_RELIABILITY_REDUCTION_SNOW\nBREATH_GAIN_REDUCTION_SNOW\nVISUAL_DISTANCE_DECREASE_SNOW\nHEARING_REDUCTION_SNOW\n \n", //L"|W|e|a|t|h|e|r|: |S|n|o|w\nOverrides [Tactical Weather Settings] ALLOW_SNOW\n \nSnowstorms decrease visibility.\n \nConfigurable Options:\nSNOW_EVENTS_PER_DAY\nSNOW_CHANCE_PER_DAY\nSNOW_MIN_LENGTH_IN_MINUTES\nSNOW_MAX_LENGTH_IN_MINUTES\nWEAPON_RELIABILITY_REDUCTION_SNOW\nBREATH_GAIN_REDUCTION_SNOW\nVISUAL_DISTANCE_DECREASE_SNOW\nHEARING_REDUCTION_SNOW",
|
||||
L"|随|机|事|件|功|能\n \n覆盖 [Mini Events Settings] MINI_EVENTS_ENABLED\n \n可能发生一些随机互动事件。\n \n配置选项:\nMINI_EVENTS_MIN_HOURS_BETWEEN_EVENTS\nMINI_EVENTS_MAX_HOURS_BETWEEN_EVENTS\n \n详细信息请查看MiniEvents.lua。\n \n", //L"|M|i|n|i |E|v|e|n|t|s\nOverrides [Mini Events Settings] MINI_EVENTS_ENABLED\n \nRandom events can occur.\n \nConfigurable Options:\nMINI_EVENTS_MIN_HOURS_BETWEEN_EVENTS\nMINI_EVENTS_MAX_HOURS_BETWEEN_EVENTS\n \nSee MiniEvents.lua for more details.",
|
||||
L"|反|抗|军|司|令|部|功|能\n \n覆盖 [Rebel Command Settings] REBEL_COMMAND_ENABLED\n \n允许你升级占领的城镇,控制反抗军在战略层面上运作。\n \n详细的内容设定请查看RebelCommand_Settings.ini。\n \n", //L"|A|R|C\nOverrides [Rebel Command Settings] REBEL_COMMAND_ENABLED\n \nCommand the rebel movement at the strategic level, and upgrade captured towns.\n \nFor tweakable values, see RebelCommand_Settings.ini.",
|
||||
L"|S|t|r|a|t|e|g|i|c |T|r|a|n|s|p|o|r|t |G|r|o|u|p|s\nOverrides [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \nTransport groups carry valuable equipment across the map.\n \nConfigurable Options:\nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS",
|
||||
L"|战|略|运|输|队\n \n覆盖 [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \n运输队在地图上运送有价值的装备。\n \n配置选项: \nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS", //L"|S|t|r|a|t|e|g|i|c |T|r|a|n|s|p|o|r|t |G|r|o|u|p|s\nOverrides [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \nTransport groups carry valuable equipment across the map.\n \nConfigurable Options:\nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS",
|
||||
};
|
||||
|
||||
STR16 z113FeaturesPanelText[] =
|
||||
@@ -6360,7 +6360,7 @@ STR16 z113FeaturesPanelText[] =
|
||||
L"启用暴风雪功能。在暴风雪中,更难被看到,武器退化更快,呼吸也更困难。", //L"Toggle snow. In a snowstorm, it is harder to see, weapons degrade faster, and it is a little harder to regain breath.",
|
||||
L"在游戏过程中,可能会弹出简短的事件。您可以从两个选项中选择一个,这可能会产生积极或消极的影响。事件可以影响各种各样的事情,但主要是你的佣兵。", //L"During the course of a campaign, brief events can pop up. You can select one of two responses, which may have positive and/or negative effects. Events can affect a wide variety of things, but mostly your mercs.",
|
||||
L"在完成反抗军食物运送任务后,你可以访问他们的(A.R.C)指挥部网站。在这里你可以设定反抗军的政策,也可以为占领区单独设置地方政策。这将带来丰厚的奖励。作为代价,城镇的民忠会上升得更慢,所以你需要更加努力地让当地人信任你。", //L"After completing the food delivery quest for the rebels, they will grant you access to their command website (A.R.C.). You can set the rebels' country-wide directive there, and capturing towns allows you to enact policies in that region that provide powerful bonuses. This comes at a price - town loyalty will rise slower, so you will need to work harder to have the locals trust you.",
|
||||
L"The enemy sends groups across the map. If you can find and intercept them, they will probably have valuable gear. However, depending on your difficulty, each group that completes its transport mission provides the AI with strategic resources. Best experienced with Arulco Strategic Division enabled.",
|
||||
L"敌人会在地图上派遣战略运输队,如果你能找到并截获它们就可能获取有价值的装备。但是,如果让敌人的运输队完成运输任务,那么就会给敌人提供战略资源(具体视难度而定)。要想获得最好体验,建议开启\"敌军战略司令部功能\"。", //L"The enemy sends groups across the map. If you can find and intercept them, they will probably have valuable gear. However, depending on your difficulty, each group that completes its transport mission provides the AI with strategic resources. Best experienced with Arulco Strategic Division enabled.",
|
||||
};
|
||||
|
||||
|
||||
@@ -7672,7 +7672,7 @@ STR16 New113Message[] =
|
||||
L"无线电操作失败!",
|
||||
L"迫击炮弹不足,无法在分区发动密集轰炸!",
|
||||
L"Items.xml里没有定义信号弹物品!",
|
||||
L"No High-Explosive shell item found in Items.xml!",
|
||||
L"Items.xml里没有定义高爆弹物品!", //L"No High-Explosive shell item found in Items.xml!",
|
||||
L"未发现迫击炮,无法执行密集轰炸!",
|
||||
L"干扰信号成功,不需要重复操作!",
|
||||
L"正在监听周围声音,无需重复操作!",
|
||||
@@ -8693,7 +8693,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]=
|
||||
L"|医|用|夹|板", //L"|M|e|d|i|c|a|l |S|p|l|i|n|t",
|
||||
L"|阻|燃|弹|药", //L"|F|i|r|e |R|e|t|a|r|d|a|n|t |A|m|m|o",
|
||||
L"|燃|烧|弹|药", //L"|I|n|c|e|n|d|i|a|r|y |A|m|m|o",
|
||||
L"|B|e|l|t| |F|e|d",
|
||||
L"|弹|链|供|弹", //L"|B|e|l|t| |F|e|d",
|
||||
};
|
||||
|
||||
STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
|
||||
@@ -8749,7 +8749,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
|
||||
L"\n \n一旦应用, 这个物品可以提高对你的手臂\n或者腿部重伤的治疗速率。", //L"\n \nOnce applied, this item increases the healing\nspeed of severe wounds to either your arms or legs.",
|
||||
L"\n \n这种弹药可以灭火。", //L"\n \nThis ammo can extinguish fire.",
|
||||
L"\n \n这种弹药会引起燃烧(火灾)。", //L"\n \nThis ammo can cause fire.",
|
||||
L"\n \nThis gun can be belt fed\nfrom a compatible LBE\nor by another merc.",
|
||||
L"\n \n这种枪可以使用弹链供弹\n或者由LBE弹链供弹\n又或者由另一位佣兵供弹。", //L"\n \nThis gun can be belt fed\nfrom a compatible LBE\nor by another merc.",
|
||||
};
|
||||
|
||||
STR16 szUDBAdvStatsTooltipText[]=
|
||||
@@ -9330,7 +9330,7 @@ STR16 szBackgroundText_Value[]=
|
||||
L" 对某些其他背景的厌恶 \n", //L" dislikes some other backgrounds\n",
|
||||
L" 吸烟者", //L"Smoker",
|
||||
L" 非吸烟者", //L"Nonsmoker",
|
||||
L" %s%d%% 蹲伏在可靠掩体后面对敌人的命中率 \n", //L" %s%d%% enemy CTH if crouched against thick cover in their direction\n",
|
||||
L" %s%d%% 敌军对蹲伏在掩体后佣兵的命中率 \n", //L" %s%d%% enemy CTH if crouched against thick cover in their direction\n",
|
||||
L" %s%d%% 建设速度 \n",//L" %s%d%% building speed\n",
|
||||
L" 黑客技能:%s%d ",//L" hacking skill: %s%d ",
|
||||
L" %s%d%% 掩埋尸体速度 \n", //L" %s%d%% burial speed\n",
|
||||
@@ -11655,13 +11655,21 @@ STR16 szLaptopStatText[] =
|
||||
L"威胁对话", //L"Threaten approach",
|
||||
L"招募对话", //L"Recruit approach",
|
||||
|
||||
L"%s正以正常速度学习。", //L"%s learns with normal speed.",
|
||||
L"%s根本没有在学习。", //L"%s does not learn at all.",
|
||||
L"%s遗忘了技能。", //L"%s unlearns his skills.",
|
||||
L"%s正以3/4的速度学习。", //L"%s learns with 3/4 speed.",
|
||||
|
||||
L"%s正以1/2的速度学习。", //L"%s learns with 1/2 speed.",
|
||||
L"%s正以1/4的速度学习。", //L"%s learns with 1/4 speed.",
|
||||
L"统计倒退数据。", //L"Stats will regress.",
|
||||
L"快速", //L"Fast",
|
||||
L"平均", //L"Average",
|
||||
L"慢速", //L"Slow",
|
||||
L"生命成长", //L"Health growth",
|
||||
L"力量成长", //L"Strength growth",
|
||||
L"敏捷成长", //L"Agility growth",
|
||||
L"灵巧成长", //L"Dexterity growth",
|
||||
L"智慧成长", //L"Wisdom growth",
|
||||
L"枪法成长", //L"Marksmanship growth",
|
||||
L"爆破成长", //L"Explosives growth",
|
||||
L"领导成长", //L"Leadership growth",
|
||||
L"医疗成长", //L"Medical growth",
|
||||
L"机械成长", //L"Mechanical growth",
|
||||
L"等级成长", //L"Experience growth",
|
||||
};
|
||||
|
||||
STR16 szGearTemplateText[] =
|
||||
@@ -12103,8 +12111,8 @@ STR16 szRebelCommandAgentMissionsText[] =
|
||||
L"协同行动,悄悄地抵进敌军,但是要小心:这可能会让你部署在劣势区域。当进攻敌军部队时,部署区会更大。", //L"Coordinate efforts to find ways to sneak up on the enemy, but be careful: it's equally possible to put yourself in a disadvantaged deployment area. When attacking enemy forces, the deployment area is much larger.",
|
||||
L"扰乱ASD", //L"Disrupt ASD",
|
||||
L"破坏Arulco特种部门(ASD)的日常行动。临时阻止ASD部署更多的机械化单位,并且大幅度降低他们的每日收入。", //L"Wreak havoc on the day-to-day operations of the Arulco Special Division. Temporarily prevent the ASD from deploying additional mechanised units, and drastically reduce their daily income.",
|
||||
L"Forge Transport Orders",
|
||||
L"Create a bogus supply request. An enemy transport group will be ordered to rendezvous at this agent's location.",
|
||||
L"伪造运输订单", //L"Forge Transport Orders",
|
||||
L"创建一个虚假的运输请求,敌方的运输队就会在这个地点位置集合。", //L"Create a bogus supply request. An enemy transport group will be ordered to rendezvous at this agent's location.",
|
||||
L"战略情报", //L"Strategic Intel",
|
||||
L"侦听敌人,发现敌军的攻击目标。当在战略地图上观察队伍时,敌军优先进攻的目标区域会被标红。", //L"Intercept plans and discover where enemies intend to strike. When viewing teams on the strategic map, sectors prioritised by the enemy will be marked in red.",
|
||||
L"强化本地商店", //L"Improve Local Shops",
|
||||
|
||||
+15
-7
@@ -11664,13 +11664,21 @@ STR16 szLaptopStatText[] = // TODO.Translate
|
||||
L"Threaten approach",
|
||||
L"Recruit approach",
|
||||
|
||||
L"%s learns with normal speed.", // TODO.Translate
|
||||
L"%s does not learn at all.",
|
||||
L"%s unlearns his skills.",
|
||||
L"%s learns with 3/4 speed.",
|
||||
|
||||
L"%s learns with 1/2 speed.",
|
||||
L"%s learns with 1/4 speed.",
|
||||
L"Stats will regress.",
|
||||
L"Fast",
|
||||
L"Average",
|
||||
L"Slow",
|
||||
L"Health growth",
|
||||
L"Strength growth",
|
||||
L"Agility growth",
|
||||
L"Dexterity growth",
|
||||
L"Wisdom growth",
|
||||
L"Marksmanship growth",
|
||||
L"Explosives growth",
|
||||
L"Leadership growth",
|
||||
L"Medical growth",
|
||||
L"Mechanical growth",
|
||||
L"Experience growth",
|
||||
};
|
||||
|
||||
STR16 szGearTemplateText[] = // TODO.Translate
|
||||
|
||||
+17
-9
@@ -8736,8 +8736,8 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
|
||||
L"\n \nThis item requires both hands to be used.",
|
||||
L"\n \nThis item will block your iron sights\nso you cannot use them.",
|
||||
L"\n \nThis ammo can destroy light walls\nand various other objects.",
|
||||
L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.",
|
||||
L"\n \nIf kept in your inventory, this will lower\nthe chance to be infected by other people.",
|
||||
L"\n \nIf kept ready in your inventory,\nthis will lower the chance to be infected\nby airborne transmitted pathogens of other people.",
|
||||
L"\n \nIf kept ready in your inventory,\nthis will lower the chance to be infected\nby contact transmitted pathogens of other people.",
|
||||
L"\n \nIf equipped in a hand, this will block incoming damage.",
|
||||
L"\n \nYou can take photos with this.",
|
||||
L"\n \nThis item makes you more effective at burying corpses.",
|
||||
@@ -11655,13 +11655,21 @@ STR16 szLaptopStatText[] =
|
||||
L"Threaten approach",
|
||||
L"Recruit approach",
|
||||
|
||||
L"%s learns with normal speed.",
|
||||
L"%s does not learn at all.",
|
||||
L"%s unlearns his skills.",
|
||||
L"%s learns with 3/4 speed.",
|
||||
|
||||
L"%s learns with 1/2 speed.",
|
||||
L"%s learns with 1/4 speed.",
|
||||
L"Stats will regress.",
|
||||
L"Fast",
|
||||
L"Average",
|
||||
L"Slow",
|
||||
L"Health growth",
|
||||
L"Strength growth",
|
||||
L"Agility growth",
|
||||
L"Dexterity growth",
|
||||
L"Wisdom growth",
|
||||
L"Marksmanship growth",
|
||||
L"Explosives growth",
|
||||
L"Leadership growth",
|
||||
L"Medical growth",
|
||||
L"Mechanical growth",
|
||||
L"Experience growth",
|
||||
};
|
||||
|
||||
STR16 szGearTemplateText[] =
|
||||
|
||||
+15
-7
@@ -11646,13 +11646,21 @@ STR16 szLaptopStatText[] = // TODO.Translate
|
||||
L"Threaten approach",
|
||||
L"Recruit approach",
|
||||
|
||||
L"%s learns with normal speed.", // TODO.Translate
|
||||
L"%s does not learn at all.",
|
||||
L"%s unlearns his skills.",
|
||||
L"%s learns with 3/4 speed.",
|
||||
|
||||
L"%s learns with 1/2 speed.",
|
||||
L"%s learns with 1/4 speed.",
|
||||
L"Stats will regress.",
|
||||
L"Fast",
|
||||
L"Average",
|
||||
L"Slow",
|
||||
L"Health growth",
|
||||
L"Strength growth",
|
||||
L"Agility growth",
|
||||
L"Dexterity growth",
|
||||
L"Wisdom growth",
|
||||
L"Marksmanship growth",
|
||||
L"Explosives growth",
|
||||
L"Leadership growth",
|
||||
L"Medical growth",
|
||||
L"Mechanical growth",
|
||||
L"Experience growth",
|
||||
};
|
||||
|
||||
STR16 szGearTemplateText[] = // TODO.Translate
|
||||
|
||||
+15
-7
@@ -11560,13 +11560,21 @@ STR16 szLaptopStatText[] =
|
||||
L"Threaten approach",
|
||||
L"Recruit approach",
|
||||
|
||||
L"%s learns with normal speed.", // TODO.Translate
|
||||
L"%s does not learn at all.",
|
||||
L"%s unlearns his skills.",
|
||||
L"%s learns with 3/4 speed.",
|
||||
|
||||
L"%s learns with 1/2 speed.",
|
||||
L"%s learns with 1/4 speed.",
|
||||
L"Stats will regress.",
|
||||
L"Fast",
|
||||
L"Average",
|
||||
L"Slow",
|
||||
L"Health growth",
|
||||
L"Strength growth",
|
||||
L"Agility growth",
|
||||
L"Dexterity growth",
|
||||
L"Wisdom growth",
|
||||
L"Marksmanship growth",
|
||||
L"Explosives growth",
|
||||
L"Leadership growth",
|
||||
L"Medical growth",
|
||||
L"Mechanical growth",
|
||||
L"Experience growth",
|
||||
};
|
||||
|
||||
// TODO.Translate
|
||||
|
||||
+15
-7
@@ -11655,13 +11655,21 @@ STR16 szLaptopStatText[] = // TODO.Translate
|
||||
L"Threaten approach",
|
||||
L"Recruit approach",
|
||||
|
||||
L"%s learns with normal speed.", // TODO.Translate
|
||||
L"%s does not learn at all.",
|
||||
L"%s unlearns his skills.",
|
||||
L"%s learns with 3/4 speed.",
|
||||
|
||||
L"%s learns with 1/2 speed.",
|
||||
L"%s learns with 1/4 speed.",
|
||||
L"Stats will regress.",
|
||||
L"Fast",
|
||||
L"Average",
|
||||
L"Slow",
|
||||
L"Health growth",
|
||||
L"Strength growth",
|
||||
L"Agility growth",
|
||||
L"Dexterity growth",
|
||||
L"Wisdom growth",
|
||||
L"Marksmanship growth",
|
||||
L"Explosives growth",
|
||||
L"Leadership growth",
|
||||
L"Medical growth",
|
||||
L"Mechanical growth",
|
||||
L"Experience growth",
|
||||
};
|
||||
|
||||
STR16 szGearTemplateText[] = // TODO.Translate
|
||||
|
||||
@@ -310,6 +310,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
|
||||
L"飞刀致命一击的额外伤害倍率 +%d\n",// L"+%d critical hit by throwing blade multiplier\n",
|
||||
L"飞刀的最大精瞄次数 +%d\n",// L"Adds %d more aim click for throwing blades\n",
|
||||
L"飞刀的最大精瞄次数 +%d\n",// L"Adds %d more aim clicks for throwing blades\n",
|
||||
L"投掷手榴弹所需行动点 -%d%s\n",// L"-%d%s APs needed to throw grenades\n",
|
||||
L"手榴弹最远投掷距离 +%d%s\n",// L"+%d%s max range when throwing grenades\n",
|
||||
L"手榴弹的命中率 +%d%s\n",// L"+%d%s chance to hit when throwing grenades\n",
|
||||
};
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
|
||||
@@ -346,9 +349,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
|
||||
{
|
||||
L"投掷手榴弹所需行动点 -%d%s\n",// L"-%d%s APs needed to throw grenades\n",
|
||||
L"手榴弹最远投掷距离 +%d%s\n",// L"+%d%s max range when throwing grenades\n",
|
||||
L"手榴弹的命中率 +%d%s\n",// L"+%d%s chance to hit when throwing grenades\n",
|
||||
L"安置的炸弹和地雷的伤害 +%d%s\n",// L"+%d%s damage of set bombs and mines\n",
|
||||
L"组合炸弹的成功率 +%d%s\n",// L"+%d%s to attaching detonators check\n",
|
||||
L"安置/拆除炸弹成功率 +%d%s\n",// L"+%d%s to planting/removing bombs check\n",
|
||||
|
||||
@@ -310,6 +310,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
|
||||
L"+%d critical hit with throwing blade multiplier\n",
|
||||
L"Adds %d more aim click for throwing blades\n",
|
||||
L"Adds %d more aim clicks for throwing blades\n",
|
||||
L"-%d%s APs to throw grenades\n",
|
||||
L"+%d%s max range when throwing grenades\n",
|
||||
L"+%d%s CtH when throwing grenades\n",
|
||||
};
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
|
||||
@@ -346,9 +349,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
|
||||
{
|
||||
L"-%d%s APs to throw grenades\n",
|
||||
L"+%d%s max range when throwing grenades\n",
|
||||
L"+%d%s CtH when throwing grenades\n",
|
||||
L"+%d%s damage for set bombs and mines\n",
|
||||
L"+%d%s to attaching detonators check\n",
|
||||
L"+%d%s to planting/removing bombs check\n",
|
||||
|
||||
@@ -310,6 +310,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
|
||||
L"+%d critical hit with throwing blade multiplier\n",
|
||||
L"Adds %d more aim click for throwing blades\n",
|
||||
L"Adds %d more aim clicks for throwing blades\n",
|
||||
L"-%d%s APs to throw grenades\n",
|
||||
L"+%d%s max range when throwing grenades\n",
|
||||
L"+%d%s CtH when throwing grenades\n",
|
||||
};
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
|
||||
@@ -346,9 +349,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
|
||||
{
|
||||
L"-%d%s APs to throw grenades\n",
|
||||
L"+%d%s max range when throwing grenades\n",
|
||||
L"+%d%s CtH when throwing grenades\n",
|
||||
L"+%d%s damage for set bombs and mines\n",
|
||||
L"+%d%s to attaching detonators check\n",
|
||||
L"+%d%s to planting/removing bombs check\n",
|
||||
|
||||
@@ -309,6 +309,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
|
||||
L"+%d de dégâts critiques, si vous lancez plusieurs couteaux\n",
|
||||
L"Ajoute %d niveau(x) de visée pour lancer un couteau\n",
|
||||
L"Ajoute %d niveau(x) de visée pour lancer un couteau\n",
|
||||
L"-%d%s du nombre de PA nécessaire pour lancer une grenade\n",
|
||||
L"+%d%s de la portée maximale d'une grenade\n",
|
||||
L"+%d%s de chance de toucher votre cible avec une grenade\n",
|
||||
|
||||
};
|
||||
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
|
||||
@@ -344,9 +347,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
|
||||
};
|
||||
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
|
||||
{
|
||||
L"-%d%s du nombre de PA nécessaire pour lancer une grenade\n",
|
||||
L"+%d%s de la portée maximale d'une grenade\n",
|
||||
L"+%d%s de chance de toucher votre cible avec une grenade\n",
|
||||
L"+%d%s de dégâts causés par un explosif ou une mine\n",
|
||||
L"+%d%s pour contrôler un détonateur\n",
|
||||
L"+%d%s pour placer/retirer un contrôleur d'explosif\n",
|
||||
|
||||
@@ -263,7 +263,7 @@ STR16 gzIMPMajorTraitsHelpTextsRadioOperator[]=
|
||||
L"Kann Artillerieunterstützung von Verbündeten in Nachbarsektoren anfordern\n",
|
||||
L"Kann Funkfrequenzen abhören und feindliche Truppen aufspüren\n",
|
||||
L"Kann den Funkverkehr im ganzen Sektor stören\n",
|
||||
L"Kann nach feindlichen Störsendern suchen, wenn solche aktiv sind\n"
|
||||
L"Kann nach feindlichen Störsendern suchen, wenn solche aktiv sind\n",
|
||||
L"Kann Unterstützung durch Milizen aus Nachbarsektoren anfordern\n",
|
||||
};
|
||||
|
||||
@@ -310,6 +310,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
|
||||
L"+%d Multiplikator für kritische Treffer durch Wurfwaffen\n",
|
||||
L"Gibt einen weiteren Zielklick beim Einsatz von Wurfwaffen\n",
|
||||
L"Gibt %d weitere Zielklicks beim Einsatz von Wurfwaffen\n",
|
||||
L"-%d%s APs benötigt um Handgranaten (und ähnliche Objekte) zu werfen\n",
|
||||
L"+%d%s höhere Reichweite beim Werfen von Handgranaten (und ähnliche Objekten)\n",
|
||||
L"+%d%s höhere Trefferwahrscheinlichkeit beim Werfen von Handgranaten (und ähnlichen Objekten)\n",
|
||||
};
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
|
||||
@@ -346,9 +349,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
|
||||
{
|
||||
L"-%d%s APs benötigt um Handgranaten (und ähnliche Objekte) zu werfen\n",
|
||||
L"+%d%s höhere Reichweite beim Werfen von Handgranaten (und ähnliche Objekten)\n",
|
||||
L"+%d%s höhere Trefferwahrscheinlichkeit beim Werfen von Handgranaten (und ähnlichen Objekten)\n",
|
||||
L"+%d%s höherer Schaden für gelegte Bomben und Minen\n",
|
||||
L"+%d%s mehr Erfolg beim Anbringen von Zündern\n",
|
||||
L"+%d%s mehr Erfolg beim Legen und Entschärfen von Bomben\n",
|
||||
|
||||
@@ -308,6 +308,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
|
||||
L"+%d critical hit with throwing blade multiplier\n",
|
||||
L"Adds %d more aim click for throwing blades\n",
|
||||
L"Adds %d more aim clicks for throwing blades\n",
|
||||
L"-%d%s APs to throw grenades\n",
|
||||
L"+%d%s max range when throwing grenades\n",
|
||||
L"+%d%s CtH when throwing grenades\n",
|
||||
};
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
|
||||
@@ -344,9 +347,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
|
||||
{
|
||||
L"-%d%s APs to throw grenades\n",
|
||||
L"+%d%s max range when throwing grenades\n",
|
||||
L"+%d%s CtH when throwing grenades\n",
|
||||
L"+%d%s damage for set bombs and mines\n",
|
||||
L"+%d%s to attaching detonators check\n",
|
||||
L"+%d%s to planting/removing bombs check\n",
|
||||
|
||||
@@ -310,6 +310,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
|
||||
L"+%d critical hit with throwing blade multiplier\n",
|
||||
L"Adds %d more aim click for throwing blades\n",
|
||||
L"Adds %d more aim clicks for throwing blades\n",
|
||||
L"-%d%s APs to throw grenades\n",
|
||||
L"+%d%s max range when throwing grenades\n",
|
||||
L"+%d%s CtH when throwing grenades\n",
|
||||
};
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
|
||||
@@ -346,9 +349,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
|
||||
{
|
||||
L"-%d%s APs to throw grenades\n",
|
||||
L"+%d%s max range when throwing grenades\n",
|
||||
L"+%d%s CtH when throwing grenades\n",
|
||||
L"+%d%s damage for set bombs and mines\n",
|
||||
L"+%d%s to attaching detonators check\n",
|
||||
L"+%d%s to planting/removing bombs check\n",
|
||||
|
||||
@@ -310,6 +310,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
|
||||
L"+%d к множителю критического урона при броске ножа\n",
|
||||
L"+%d клик прицеливания для метательных ножей\n",
|
||||
L"+%d кликов прицеливания для метательных ножей\n",
|
||||
L"-%d%s ОД для броска гранаты\n",
|
||||
L"+%d%s к максимальной дальности броска гранаты\n",
|
||||
L"+%d%s к точности броска гранаты\n",
|
||||
};
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
|
||||
@@ -346,9 +349,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
|
||||
|
||||
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
|
||||
{
|
||||
L"-%d%s ОД для броска гранаты\n",
|
||||
L"+%d%s к максимальной дальности броска гранаты\n",
|
||||
L"+%d%s к точности броска гранаты\n",
|
||||
L"+%d%s к урону для установленных бомб и мин\n",
|
||||
L"+%d%s к умению устанавливать детонатор\n",
|
||||
L"+%d%s к установке/разминированию бомб\n",
|
||||
|
||||
+15
-7
@@ -11668,13 +11668,21 @@ STR16 szLaptopStatText[] = // TODO.Translate
|
||||
L"Threaten approach",
|
||||
L"Recruit approach",
|
||||
|
||||
L"%s learns with normal speed.", // TODO.Translate
|
||||
L"%s does not learn at all.",
|
||||
L"%s unlearns his skills.",
|
||||
L"%s learns with 3/4 speed.",
|
||||
|
||||
L"%s learns with 1/2 speed.",
|
||||
L"%s learns with 1/4 speed.",
|
||||
L"Stats will regress.",
|
||||
L"Fast",
|
||||
L"Average",
|
||||
L"Slow",
|
||||
L"Health growth",
|
||||
L"Strength growth",
|
||||
L"Agility growth",
|
||||
L"Dexterity growth",
|
||||
L"Wisdom growth",
|
||||
L"Marksmanship growth",
|
||||
L"Explosives growth",
|
||||
L"Leadership growth",
|
||||
L"Medical growth",
|
||||
L"Mechanical growth",
|
||||
L"Experience growth",
|
||||
};
|
||||
|
||||
STR16 szGearTemplateText[] = // TODO.Translate
|
||||
|
||||
+15
-7
@@ -11650,13 +11650,21 @@ STR16 szLaptopStatText[] = // TODO.Translate
|
||||
L"Threaten approach",
|
||||
L"Recruit approach",
|
||||
|
||||
L"%s learns with normal speed.", // TODO.Translate
|
||||
L"%s does not learn at all.",
|
||||
L"%s unlearns his skills.",
|
||||
L"%s learns with 3/4 speed.",
|
||||
|
||||
L"%s learns with 1/2 speed.",
|
||||
L"%s learns with 1/4 speed.",
|
||||
L"Stats will regress.",
|
||||
L"Fast",
|
||||
L"Average",
|
||||
L"Slow",
|
||||
L"Health growth",
|
||||
L"Strength growth",
|
||||
L"Agility growth",
|
||||
L"Dexterity growth",
|
||||
L"Wisdom growth",
|
||||
L"Marksmanship growth",
|
||||
L"Explosives growth",
|
||||
L"Leadership growth",
|
||||
L"Medical growth",
|
||||
L"Mechanical growth",
|
||||
L"Experience growth",
|
||||
};
|
||||
|
||||
STR16 szGearTemplateText[] = // TODO.Translate
|
||||
|
||||
@@ -1522,22 +1522,8 @@ static struct DebugMessageLog {
|
||||
void WriteMessageToFile( const STR16 pString )
|
||||
{
|
||||
#ifdef JA2BETAVERSION
|
||||
#ifndef USE_VFS
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen( "DebugMessage.txt", "a" );
|
||||
|
||||
if( fp == NULL )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
fprintf( fp, "%S\n", pString );
|
||||
fclose( fp );
|
||||
#else
|
||||
SGP_LOG(s_DebugMessageLog.id, pString);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user