**********************************************************

** Big Maps Projects code (incl. Multiplayer v1.5 **
**********************************************************
- Merged Big Maps Project code from BMP+MP trunk (Revision: 3340)
o Complete SVN Revision history: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP
- Before THIS merge, I made a branch of the existing 1.13 source
o SVN Branch: https://81.169.133.124/source/ja2/branches/JA2_rev.3336/src
- Removed old VS 6.0 and VS 2003 project and solutions files, because compilation is broken long time ago
- I will add VS 2010 projects and solution file in the next few days

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3341 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2010-02-28 18:38:52 +00:00
parent a98c44ac78
commit 14750c6903
461 changed files with 23615 additions and 120157 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ void RemoveProgressBar( UINT8 ubID )
//As the process animates using UpdateProgressBar( 0 to 100 ), the total progress bar will only reach 30%
//at the 100% mark within UpdateProgressBar. At that time, you would go onto the next step, resetting the
//relative start and end percentage from 30 to whatever, until your done.
void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT32 uiRelStartPerc, UINT32 uiRelEndPerc, STR16 str)
void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT16 uiRelStartPerc, UINT16 uiRelEndPerc, STR16 str)
{
PROGRESSBAR *pCurr;
UINT16 usStartX, usStartY;
+1 -1
View File
@@ -63,7 +63,7 @@ void RemoveProgressBar( UINT8 ubID );
//As the process animates using UpdateProgressBar( 0 to 100 ), the total progress bar will only reach 30%
//at the 100% mark within UpdateProgressBar. At that time, you would go onto the next step, resetting the
//relative start and end percentage from 30 to whatever, until your done.
void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT32 uiRelStartPerc, UINT32 uiRelEndPerc, STR16 str);
void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT16 uiRelStartPerc, UINT16 uiRelEndPerc, STR16 str);
//This part renders the progress bar at the percentage level that you specify. If you have set relative
//percentage values in the above function, then the uiPercentage will be reflected based off of the relative
+11 -11
View File
@@ -193,6 +193,7 @@ SMKFLIC *pSmack;
SMKFLIC *SmkOpenFlic(CHAR8 *cFilename)
{
SMKFLIC *pSmack;
// Get an available flic slot from the list
if(!(pSmack=SmkGetFreeFlic()))
@@ -216,30 +217,29 @@ SMKFLIC *SmkOpenFlic(CHAR8 *cFilename)
#else
vfs::Path introname(cFilename);
vfs::Path dir,filename;
introname.SplitLast(dir,filename);
introname.splitLast(dir,filename);
vfs::Path tempfile = vfs::Path(L"Temp") + filename;
if(!GetVFS()->FileExists(tempfile))
if(!getVFS()->fileExists(tempfile))
{
try
{
if(!GetVFS()->FileExists(introname))
if(!getVFS()->fileExists(introname))
{
return NULL;
}
vfs::COpenReadFile rfile(introname);
vfs::UInt32 size = rfile.file().GetFileSize();
vfs::size_t size = rfile.file().getSize();
std::vector<vfs::Byte> data(size);
vfs::UInt32 io;
rfile.file().Read(&data[0],size,io);
rfile.file().read(&data[0],size);
vfs::COpenWriteFile wfile(tempfile,true);
wfile.file().Write(&data[0],size,io);
wfile.file().write(&data[0],size);
}
catch(CBasicException& ex)
{
std::wstringstream wss;
wss << L"Intro file \"" << filename() << L"\" could not be extracted";
RETHROWEXCEPTION(wss.str().c_str(),&ex);
BuildString bs;
bs.add(L"Intro file \"").add(filename()).add(L"\" could not be extracted");
RETHROWEXCEPTION(bs.get(), &ex);
}
}
#endif
@@ -267,7 +267,7 @@ SMKFLIC *SmkOpenFlic(CHAR8 *cFilename)
{
RETHROWEXCEPTION(L"Temporary intro file could not be read", &ex);
}
if(!(pSmack->SmackHandle=SmackOpen(tempfilename().utf8().c_str(), SMACKTRACKS, SMACKAUTOEXTRA)))
if(!(pSmack->SmackHandle=SmackOpen(tempfilename.to_string().c_str(), SMACKTRACKS, SMACKAUTOEXTRA)))
#endif
{
ErrorMsg("SMK ERROR: Smacker won't open the SMK file");
+4 -4
View File
@@ -69,8 +69,8 @@ void LiveMessage( CHAR8 *strMessage)
fclose(OutFile);
}
#else
static CLog& liveMsg = *CLog::Create(L"LiveLog.txt",true);
liveMsg << strMessage << CLog::endl;
static CLog& liveMsg = *CLog::create(L"LiveLog.txt",true);
liveMsg << strMessage << CLog::ENDL;
#endif
}
void MPDebugMsg( CHAR8 *strMessage)
@@ -84,7 +84,7 @@ void MPDebugMsg( CHAR8 *strMessage)
fclose(OutFile);
}
#else
static CLog& mpMsg = *CLog::Create(L"MPDebug.txt", true);
mpMsg << strMessage << CLog::endl;
static CLog& mpMsg = *CLog::create(L"MPDebug.txt", true);
mpMsg << strMessage << CLog::ENDL;
#endif
}
+12 -12
View File
@@ -68,7 +68,7 @@ typedef struct
UINT16 usStartingAniCode;
BOOLEAN fForce;
UINT8 usNewDirection;//hayden
UINT16 usTargetGridNo; // WANNE - MP: Used for manipulating the target grid no
UINT32 usTargetGridNo; // WANNE - MP: Used for manipulating the target grid no
} EV_S_CHANGESTATE;
@@ -77,7 +77,7 @@ typedef struct
{
UINT16 usSoldierID;
UINT32 uiUniqueId;
UINT16 usNewDestination;
INT32 usNewDestination;
} EV_S_CHANGEDEST;
@@ -94,7 +94,7 @@ typedef struct
{
UINT16 usSoldierID;
UINT32 uiUniqueId;
INT16 sDestGridNo;
INT32 sDestGridNo;
UINT16 usMovementAnim;
} EV_S_GETNEWPATH;
@@ -136,7 +136,7 @@ typedef struct
{
UINT16 usSoldierID;
UINT32 uiUniqueId;
INT16 sTargetGridNo;
INT32 sTargetGridNo;
INT8 bTargetLevel;
INT8 bTargetCubeLevel;
} EV_S_BEGINFIREWEAPON;
@@ -146,7 +146,7 @@ typedef struct
{
UINT16 usSoldierID;
UINT32 uiUniqueId;
INT16 sTargetGridNo;
INT32 sTargetGridNo;
INT8 bTargetLevel;
INT8 bTargetCubeLevel;
} EV_S_FIREWEAPON;
@@ -189,11 +189,11 @@ typedef struct
typedef struct
{
INT16 sGridNo;
INT32 sGridNo;
UINT16 usStructureID;
BOOLEAN fBlowWindowSouth;
BOOLEAN fLargeForce;
INT8 ubAttackerID;
UINT8 ubAttackerID;
INT32 iBullet;
} EV_S_WINDOWHIT;
@@ -206,7 +206,7 @@ typedef struct
typedef struct
{
UINT8 ubNoiseMaker;
INT16 sGridNo;
INT32 sGridNo;
UINT8 bLevel;
UINT8 ubTerrType;
UINT8 ubVolume;
@@ -219,7 +219,7 @@ typedef struct
UINT16 usSoldierID;
UINT32 uiUniqueId;
UINT8 ubDirection;
INT16 sGridNo;
INT32 sGridNo;
INT16 sXPos;
INT16 sYPos;
BOOLEAN fset;
@@ -233,11 +233,11 @@ typedef struct
UINT8 usSoldierID;
// UINT32 uiUniqueId;
UINT16 usPathDataSize; // Size of Path
INT16 sAtGridNo; // Owner merc is at this tile when sending packet
INT32 sAtGridNo; // Owner merc is at this tile when sending packet
UINT16 usCurrentPathIndex; // Index the owner of the merc is at when sending packet
UINT16 usPathData[ MAX_PATH_LIST_SIZE ]; // make define // Next X tile to go to
UINT16 ubNewState; // new movment Anim
INT16 sDestGridNo;
INT32 sDestGridNo;
// INT8 bActionPoints;
// INT8 bBreath; // current breath value
// INT8 bDesiredDirection;
@@ -250,7 +250,7 @@ typedef struct
{
UINT8 usSoldierID;
//UINT32 uiUniqueId;
INT16 sAtGridNo; // Owner merc is at this tile when sending packet
INT32 sAtGridNo; // Owner merc is at this tile when sending packet
INT8 bActionPoints; // current A.P. value
INT8 bBreath; // current breath value
//hayden
+11 -11
View File
@@ -43,7 +43,7 @@ CIniReader::CIniReader(const STR8 szFileName)
}
#else
strncpy(m_szFileName,szFileName, std::min<int>(strlen(szFileName), sizeof(m_szFileName)-1));
m_oProps.InitFromIniFile(vfs::Path(szFileName));
m_oProps.initFromIniFile(vfs::Path(szFileName));
#endif
}
@@ -79,7 +79,7 @@ CIniReader::CIniReader(const STR8 szFileName, BOOLEAN Force_Custom_Data_Path)
}
#else
strncpy(m_szFileName,szFileName, std::min<int>(strlen(szFileName), sizeof(m_szFileName)-1));
CIniReader_File_Found = m_oProps.InitFromIniFile(vfs::Path(szFileName));
CIniReader_File_Found = m_oProps.initFromIniFile(vfs::Path(szFileName));
#endif
}
@@ -89,7 +89,7 @@ void CIniReader::Clear()
memset(m_szFileName, 0, MAX_PATH);
#else
memset(m_szFileName, 0, MAX_PATH);
m_oProps.ClearContainer();
m_oProps.clearContainer();
#endif
}
@@ -99,7 +99,7 @@ int CIniReader::ReadInteger(const STR8 szSection, const STR8 szKey, int iDefault
#ifndef USE_VFS
return GetPrivateProfileInt(szSection, szKey, iDefaultValue, m_szFileName);
#else
return m_oProps.GetIntProperty(szSection, szKey, iDefaultValue);
return m_oProps.getIntProperty(szSection, szKey, iDefaultValue);
#endif
}
@@ -109,7 +109,7 @@ int CIniReader::ReadInteger(const STR8 szSection, const STR8 szKey, int defaultV
#ifndef USE_VFS
int iniValueReadFromFile = GetPrivateProfileInt(szSection, szKey, defaultValue, m_szFileName);
#else
int iniValueReadFromFile = m_oProps.GetIntProperty(szSection, szKey, defaultValue);
int iniValueReadFromFile = m_oProps.getIntProperty(szSection, szKey, defaultValue);
#endif
//AssertGE(iniValueReadFromFile, minValue);
//AssertLE(iniValueReadFromFile, maxValue);
@@ -149,7 +149,7 @@ double CIniReader::ReadDouble(const STR8 szSection, const STR8 szKey, double def
GetPrivateProfileString(szSection, szKey, szDefault, szResult, 255, m_szFileName);
iniValueReadFromFile = (float) atof(szResult);
#else
iniValueReadFromFile = m_oProps.GetFloatProperty(szSection, szKey, defaultValue);
iniValueReadFromFile = m_oProps.getFloatProperty(szSection, szKey, defaultValue);
#endif
//AssertGE(iniValueReadFromFile, minValue);
//AssertLE(iniValueReadFromFile, maxValue);
@@ -176,7 +176,7 @@ FLOAT CIniReader::ReadFloat(const STR8 szSection, const STR8 szKey, FLOAT defaul
GetPrivateProfileString(szSection, szKey, szDefault, szResult, 255, m_szFileName);
iniValueReadFromFile = (FLOAT) atof(szResult);
#else
iniValueReadFromFile = (FLOAT) m_oProps.GetFloatProperty(szSection, szKey, (float)defaultValue);
iniValueReadFromFile = (FLOAT) m_oProps.getFloatProperty(szSection, szKey, (float)defaultValue);
#endif
//AssertGE(iniValueReadFromFile, minValue);
@@ -209,7 +209,7 @@ BOOLEAN CIniReader::ReadBoolean(const STR8 szSection, const STR8 szKey, bool def
else if (strcmp(szResult, "FALSE") == 0)
return FALSE;
#else
utf8string str = m_oProps.GetStringProperty(szSection, szKey, L"");
utf8string str = m_oProps.getStringProperty(szSection, szKey, L"");
if( StrCmp::Equal(str, L"true") )
{
return TRUE;
@@ -239,7 +239,7 @@ void CIniReader::ReadString(const STR8 szSection, const STR8 szKey, const STR8 s
#ifndef USE_VFS
GetPrivateProfileString(szSection, szKey, szDefaultValue, input_buffer, buffer_size, m_szFileName);
#else
std::string s = m_oProps.GetStringProperty(szSection, szKey, szDefaultValue).utf8();
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;
@@ -255,7 +255,7 @@ STR8 CIniReader::ReadString(const STR8 szSection, const STR8 szKey, const STR8 s
#ifndef USE_VFS
GetPrivateProfileString(szSection, szKey, szDefaultValue, szResult, 255, m_szFileName);
#else
std::string s = m_oProps.GetStringProperty(szSection, szKey, szDefaultValue).utf8();
std::string s = m_oProps.getStringProperty(szSection, szKey, szDefaultValue).utf8();
strncpy(szResult, s.c_str(), std::min<int>(s.length(),254));
#endif
return szResult;
@@ -307,7 +307,7 @@ UINT32 CIniReader::ReadUINT(const STR8 szSection, const STR8 szKey, UINT32 defau
this->ReadString (szSection , szKey , szDefault, szResult, (size_t) 255 );
iniValueReadFromFile = (UINT32) strtoul(szResult,NULL,0);
#else
iniValueReadFromFile = (UINT32) m_oProps.GetUIntProperty(szSection, szKey, defaultValue);
iniValueReadFromFile = (UINT32) m_oProps.getUIntProperty(szSection, szKey, defaultValue);
#endif
//AssertGE(iniValueReadFromFile, minValue);
//AssertLE(iniValueReadFromFile, maxValue);
+163 -229
View File
@@ -1,214 +1,178 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "Utils All.h"
#else
#include "sgp.h"
#ifdef JA2EDITOR
#include "Screens.h"
#include "Maputility.h"
#include "worlddef.h"
#include "overhead.h"
#include "fileman.h"
#include "loadscreen.h"
#include "overhead map.h"
#include "radar screen.h"
#include "vobject_blitters.h"
#include "sticonvert.h"
#include "font control.h"
#include "worlddat.h"
#include "english.h"
#include "map information.h"
#include "line.h"
#endif
#include "sgp.h"
#endif
#ifdef JA2EDITOR
#include "Screens.h"
#include "Maputility.h"
#include "worlddef.h"
#include "overhead.h"
#include "fileman.h"
#include "loadscreen.h"
#include "overhead map.h"
#include "radar screen.h"
#include "vobject_blitters.h"
#include "sticonvert.h"
#include "font control.h"
#include "worlddat.h"
#include "english.h"
#include "map information.h"
#include "line.h"
#include "quantize wrap.h"
#define MINIMAP_X_SIZE 88
#define MINIMAP_Y_SIZE 44
#define WINDOW_SIZE 2
FLOAT gdXStep, gdYStep;
INT32 giMiniMap, gi8BitMiniMap;
HVSURFACE ghvSurface;
#define MINIMAP_X_SIZE 88//RADAR_WINDOW_WIDTH
#define MINIMAP_Y_SIZE 44//RADAR_WINDOW_HEIGHT
#define WINDOW_SIZE 2
extern BOOLEAN fEditModeFirstTime;
extern BOOLEAN gfOverheadMapDirty;
extern UINT16 iOffsetHorizontal;
extern UINT16 iOffsetVertical;
// Utililty file for sub-sampling/creating our radar screen maps
// Loops though our maps directory and reads all .map files, subsamples an area, color
// quantizes it into an 8-bit image ans writes it to an sti file in radarmaps.
extern FDLG_LIST* FileList;
typedef struct
{
INT8 r;
INT8 g;
INT8 b;
INT8 r;
INT8 g;
INT8 b;
}RGBValues;
} RGBValues;
FLOAT gdXStep, gdYStep;
INT32 giMiniMap, gi8BitMiniMap;
HVSURFACE ghVSurface = NULL;
RGBValues* p24BitValues = NULL;
FDLG_LIST* FListNode = NULL;
UINT32 MapUtilScreenInit( )
void GenerateAllMapsInit(void)
{
return( TRUE );
GETFILESTRUCT FileInfo;
TrashFDlgList(FileList);
if(GetFileFirst("MAPS\\*.dat", &FileInfo))
{
FileList = AddToFDlgList(FileList, &FileInfo);
while(GetFileNext(&FileInfo))
FileList = AddToFDlgList(FileList, &FileInfo);
GetFileClose(&FileInfo);
}
FListNode = FileList;
}
UINT32 MapUtilScreenHandle( )
// Utililty file for sub-sampling/creating our radar screen maps.
// Loops through our maps directory and reads all *.map files, subsamples an area, color quantizes into an 8-bit image and writes to sti file in radarmaps.
// From editor will create radar map for you current map.
UINT32 MapUtilScreenInit(void)
{
static INT16 fNewMap = TRUE;
static INT16 sFileNum = 0;
InputAtom InputEvent;
GETFILESTRUCT FileInfo;
static FDLG_LIST *FListNode;
static INT16 sFiles = 0, sCurFile = 0;
static FDLG_LIST *FileList = NULL;
CHAR8 zFilename[ 260 ], zFilename2[ 260 ];
VSURFACE_DESC vs_desc;
UINT16 usWidth;
UINT16 usHeight;
UINT8 ubBitDepth;
UINT32 uiDestPitchBYTES, uiSrcPitchBYTES;
UINT16 *pDestBuf, *pSrcBuf;
UINT8 *pDataPtr;
static UINT8 *p24BitDest = NULL;
static RGBValues *p24BitValues=NULL;
UINT32 uiRGBColor;
UINT32 bR, bG, bB, bAvR, bAvG, bAvB;
INT16 s16BPPSrc, sDest16BPPColor;
INT32 cnt;
INT16 sX1, sX2, sY1, sY2, sTop, sBottom, sLeft, sRight;
FLOAT dX, dY, dStartX, dStartY;
INT32 iX, iY, iSubX1, iSubY1, iSubX2, iSubY2, iWindowX, iWindowY, iCount;
SGPPaletteEntry pPalette[ 256 ];
UINT8 ubBitDepth;
UINT16 usWidth, usHeight;
VSURFACE_DESC vs_desc;
// Create render buffer
GetCurrentVideoSettings(&usWidth, &usHeight, &ubBitDepth);
vs_desc.fCreateFlags = VSURFACE_CREATE_DEFAULT | VSURFACE_SYSTEM_MEM_USAGE;
vs_desc.usWidth = MINIMAP_X_SIZE;
vs_desc.usHeight = MINIMAP_Y_SIZE;
vs_desc.ubBitDepth = ubBitDepth;
if(AddVideoSurface(&vs_desc, (UINT32*)&giMiniMap) == FALSE)
return(ERROR_SCREEN);
// Allocate 24 bit Surface
p24BitValues = (RGBValues*)MemAlloc(MINIMAP_X_SIZE * MINIMAP_Y_SIZE * sizeof(RGBValues));
//Allocate 8-bit surface
vs_desc.fCreateFlags = VSURFACE_CREATE_DEFAULT | VSURFACE_SYSTEM_MEM_USAGE;
vs_desc.usWidth = MINIMAP_X_SIZE;
vs_desc.usHeight = MINIMAP_Y_SIZE;
vs_desc.ubBitDepth = 8;
if(AddVideoSurface(&vs_desc, (UINT32*)&gi8BitMiniMap) == FALSE)
return(ERROR_SCREEN);
GetVideoSurface(&ghVSurface, gi8BitMiniMap);
return(TRUE);
}
UINT32 MapUtilScreenHandle(void)
{
InputAtom InputEvent;
SGPPaletteEntry pPalette[256];
CHAR8 zFilename[260], zFilename2[260];
UINT8 *pDataPtr;
UINT16 *pDestBuf, *pSrcBuf;
UINT32 uiDestPitchBYTES, uiSrcPitchBYTES, uiRGBColor, bR, bG, bB, bAvR, bAvG, bAvB;
INT16 s16BPPSrc, sDest16BPPColor, sX1, sX2, sY1, sY2, sTop, sBottom, sLeft, sRight;
INT32 cnt, iX, iY, iSubX1, iSubY1, iSubX2, iSubY2, iWindowX, iWindowY, iCount;
FLOAT dX, dY, dStartX, dStartY;
while(DequeueEvent(&InputEvent) == TRUE)
{
if(InputEvent.usParam == ESC)
{
// Exit the program
if(fEditModeFirstTime == FALSE)
{
TrashFDlgList(FileList);
FileList = FListNode = NULL;
return(EDIT_SCREEN);
}
else
{
gfProgramIsRunning = FALSE;
return(MAPUTILITY_SCREEN);
}
}
}
sDest16BPPColor = -1;
bAvR = bAvG = bAvB = 0;
// Zero out area!
ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, (INT16)(SCREEN_WIDTH), (INT16)(SCREEN_HEIGHT), Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
if ( fNewMap )
ColorFillVideoSurfaceArea(FRAME_BUFFER, 0, 0, (INT16)(SCREEN_WIDTH), (INT16)(SCREEN_HEIGHT), Get16BPPColor(FROMRGB(0, 0, 0)));
if(fEditModeFirstTime == FALSE && gfWorldLoaded && FListNode == NULL)// Just create radarmap for current loaded world
sprintf(zFilename, "%s", gubFilename);
else
{
fNewMap = FALSE;
// Create render buffer
GetCurrentVideoSettings( &usWidth, &usHeight, &ubBitDepth );
vs_desc.fCreateFlags = VSURFACE_CREATE_DEFAULT | VSURFACE_SYSTEM_MEM_USAGE;
vs_desc.usWidth = 88;
vs_desc.usHeight = 44;
vs_desc.ubBitDepth = ubBitDepth;
if ( AddVideoSurface( &vs_desc, (UINT32 *)&giMiniMap ) == FALSE )
// OK, we are here, now loop through files
if(FListNode == NULL)
{
return( ERROR_SCREEN );
gfProgramIsRunning = FALSE;
return(MAPUTILITY_SCREEN);
}
// USING BRET's STUFF FOR LOOPING FILES/CREATING LIST, hence AddToFDlgList.....
if( GetFileFirst("MAPS\\*.dat", &FileInfo) )
{
FileList = AddToFDlgList( FileList, &FileInfo );
sFiles++;
while( GetFileNext(&FileInfo) )
{
FileList = AddToFDlgList( FileList, &FileInfo );
sFiles++;
}
GetFileClose(&FileInfo);
}
FListNode = FileList;
//Allocate 24 bit Surface
p24BitValues = (RGBValues *) MemAlloc( MINIMAP_X_SIZE * MINIMAP_Y_SIZE * sizeof( RGBValues ) );
p24BitDest = (UINT8*)p24BitValues;
//Allocate 8-bit surface
vs_desc.fCreateFlags = VSURFACE_CREATE_DEFAULT | VSURFACE_SYSTEM_MEM_USAGE;
vs_desc.usWidth = 88;
vs_desc.usHeight = 44;
vs_desc.ubBitDepth = 8;
if ( AddVideoSurface( &vs_desc, (UINT32 *)&gi8BitMiniMap ) == FALSE )
{
return( ERROR_SCREEN );
}
GetVideoSurface( &ghvSurface, gi8BitMiniMap );
sprintf(zFilename, "%s", FListNode->FileInfo.zFileName);
// OK, load maps and do overhead shrinkage of them...
if(!LoadWorld(zFilename))
return(ERROR_SCREEN);
}
//OK, we are here, now loop through files
if ( sCurFile == sFiles || FListNode== NULL )
{
gfProgramIsRunning = FALSE;
return( MAPUTILITY_SCREEN );
}
sprintf( zFilename, "%s", FListNode->FileInfo.zFileName );
// OK, load maps and do overhead shrinkage of them...
if ( !LoadWorld( zFilename ) )
{
return( ERROR_SCREEN );
}
// Render small map
InitNewOverheadDB( (UINT8)giCurrentTilesetID );
iOffsetHorizontal = (SCREEN_WIDTH / 2) - (640 / 2);// Horizontal start postion of the overview map
iOffsetVertical = (SCREEN_HEIGHT - 160) / 2 - 160;// Vertical start position of the overview map
InitNewOverheadDB((UINT8)giCurrentTilesetID);
gfOverheadMapDirty = TRUE;
RenderOverheadMap( 0, (WORLD_COLS / 2), iOffsetHorizontal,
iOffsetVertical, 640 + iOffsetHorizontal, 320 + iOffsetVertical, FALSE );
TrashOverheadMap( );
RenderOverheadMap(0, (WORLD_COLS/2), iOffsetHorizontal, iOffsetVertical, iOffsetHorizontal+640, iOffsetVertical+320, TRUE);
TrashOverheadMap();
// OK, NOW PROCESS OVERHEAD MAP ( SHOUIDL BE ON THE FRAMEBUFFER )
gdXStep = (float)640/(float)88;
gdYStep = (float)320/(float)44;
dStartX = dStartY = 0;
gdXStep = (FLOAT)640 / (FLOAT)MINIMAP_X_SIZE;
gdYStep = (FLOAT)320 / (FLOAT)MINIMAP_Y_SIZE;
dStartX = iOffsetHorizontal;
dStartY = iOffsetVertical;
// Adjust if we are using a restricted map...
if ( gMapInformation.ubRestrictedScrollID != 0 )
if(gMapInformation.ubRestrictedScrollID != 0)
{
CalculateRestrictedMapCoords( NORTH, &sX1, &sY1, &sX2, &sTop, iOffsetHorizontal + 640, iOffsetVertical + 320 );
CalculateRestrictedMapCoords( SOUTH, &sX1, &sBottom, &sX2, &sY2, iOffsetHorizontal + 640, iOffsetVertical + 320 );
CalculateRestrictedMapCoords( WEST, &sX1, &sY1, &sLeft, &sY2, iOffsetHorizontal + 640, iOffsetVertical + 320 );
CalculateRestrictedMapCoords( EAST, &sRight, &sY1, &sX2, &sY2, iOffsetHorizontal + 640, iOffsetVertical + 320 );
gdXStep = (float)( sRight - sLeft )/(float)88;
gdYStep = (float)( sBottom - sTop )/(float)44;
CalculateRestrictedMapCoords(NORTH, &sX1, &sY1, &sX2, &sTop, iOffsetHorizontal+640, iOffsetVertical+320);
CalculateRestrictedMapCoords(SOUTH, &sX1, &sBottom, &sX2, &sY2, iOffsetHorizontal+640, iOffsetVertical+320);
CalculateRestrictedMapCoords(WEST, &sX1, &sY1, &sLeft, &sY2, iOffsetHorizontal+640, iOffsetVertical+320);
CalculateRestrictedMapCoords(EAST, &sRight, &sY1, &sX2, &sY2, iOffsetHorizontal+640, iOffsetVertical+320);
gdXStep = (FLOAT)(sRight - sLeft) / (FLOAT)MINIMAP_X_SIZE;
gdYStep = (FLOAT)(sBottom - sTop) / (FLOAT)MINIMAP_Y_SIZE;
dStartX = sLeft;
dStartY = sTop;
}
//LOCK BUFFERS
dX = dStartX;
dY = dStartY;
pDestBuf = (UINT16*)LockVideoSurface(giMiniMap, &uiDestPitchBYTES);
pSrcBuf = (UINT16*)LockVideoSurface(FRAME_BUFFER, &uiSrcPitchBYTES);
for ( iX = 0; iX < 88; iX++ )
for ( iX = 0; iX < MINIMAP_X_SIZE; iX++ )
{
dY = dStartY;
for ( iY = 0; iY < 44; iY++ )
for ( iY = 0; iY < MINIMAP_Y_SIZE; iY++ )
{
//OK, AVERAGE PIXELS
iSubX1 = (INT32)dX - WINDOW_SIZE;
@@ -226,7 +190,7 @@ UINT32 MapUtilScreenHandle( )
{
for ( iWindowY = iSubY1; iWindowY < iSubY2; iWindowY++ )
{
if ( iWindowX >=0 && iWindowX < 640 && iWindowY >=0 && iWindowY < 320 )
if ( iWindowX >= iOffsetHorizontal && iWindowX < (iOffsetHorizontal+640) && iWindowY >= iOffsetVertical && iWindowY < (iOffsetVertical+320) )
{
s16BPPSrc = pSrcBuf[ ( iWindowY * (uiSrcPitchBYTES/2) ) + iWindowX ];
@@ -240,7 +204,6 @@ UINT32 MapUtilScreenHandle( )
iCount++;
}
}
}
if ( iCount > 0 )
@@ -261,91 +224,62 @@ UINT32 MapUtilScreenHandle( )
//Increment
dY += gdYStep;
}
//Increment
dX += gdXStep;
}
UnLockVideoSurface(giMiniMap);
UnLockVideoSurface(FRAME_BUFFER);
// RENDER!
BltVideoSurface( FRAME_BUFFER, giMiniMap, 0, 20, 360, VS_BLT_FAST | VS_BLT_USECOLORKEY, NULL );
BltVideoSurface(FRAME_BUFFER, giMiniMap, 0, iOffsetHorizontal+10, iOffsetVertical+360, VS_BLT_FAST|VS_BLT_USECOLORKEY, NULL);
//QUantize!
pDataPtr = (UINT8*)LockVideoSurface(gi8BitMiniMap, &uiSrcPitchBYTES);
pDestBuf = (UINT16*)LockVideoSurface(FRAME_BUFFER, &uiDestPitchBYTES);
QuantizeImage( pDataPtr, p24BitDest, MINIMAP_X_SIZE, MINIMAP_Y_SIZE, pPalette );
SetVideoSurfacePalette( ghvSurface, pPalette );
QuantizeImage(pDataPtr, (UINT8*)p24BitValues, MINIMAP_X_SIZE, MINIMAP_Y_SIZE, pPalette);
SetVideoSurfacePalette(ghVSurface, pPalette);
// Blit!
Blt8BPPDataTo16BPPBuffer( pDestBuf, uiDestPitchBYTES, ghvSurface, pDataPtr, 300, 360);
Blt8BPPDataTo16BPPBuffer(pDestBuf, uiDestPitchBYTES, ghVSurface, pDataPtr, iOffsetHorizontal+10+MINIMAP_X_SIZE+20, iOffsetVertical+360);
// Write palette!
iX = iOffsetHorizontal + 10;
iY = iOffsetVertical + 420;
SetClippingRegionAndImageWidth(uiDestPitchBYTES, 0, 0, iOffsetHorizontal+640, iOffsetVertical+480);
for(cnt=0; cnt<256; cnt++)
{
INT32 cnt;
INT32 sX = 0, sY = 420;
UINT16 usLineColor;
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, 640, 480 );
for ( cnt = 0; cnt < 256; cnt++ )
{
usLineColor = Get16BPPColor( FROMRGB( pPalette[ cnt ].peRed, pPalette[ cnt ].peGreen, pPalette[ cnt ].peBlue ) );
RectangleDraw( TRUE, sX, sY, sX, (INT16)( sY+10 ), usLineColor, (UINT8*)pDestBuf );
sX++;
RectangleDraw( TRUE, sX, sY, sX, (INT16)( sY+10 ), usLineColor, (UINT8*)pDestBuf );
sX++;
}
UINT16 usLineColor = Get16BPPColor(FROMRGB(pPalette[cnt].peRed, pPalette[cnt].peGreen, pPalette[cnt].peBlue));
RectangleDraw(TRUE, iX, iY, iX, (INT16)(iY+10), usLineColor, (UINT8*)pDestBuf);
iX++;
RectangleDraw(TRUE, iX, iY, iX, (INT16)(iY+10), usLineColor, (UINT8*)pDestBuf);
iX++;
}
UnLockVideoSurface(FRAME_BUFFER);
// Remove extension
for ( cnt = strlen( zFilename )-1; cnt >=0; cnt-- )
{
if ( zFilename[ cnt ] == '.' )
{
zFilename[ cnt ] = '\0';
}
}
sprintf( zFilename2, "RADARMAPS\\%s.STI", zFilename );
WriteSTIFile( (INT8 *)pDataPtr, pPalette, MINIMAP_X_SIZE, MINIMAP_Y_SIZE, (STR) zFilename2, CONVERT_ETRLE_COMPRESS, 0 );
for(cnt=strlen(zFilename)-1; cnt>=0; cnt--)
if(zFilename[cnt] == '.')
zFilename[cnt] = '\0';
sprintf(zFilename2, "RADARMAPS\\%s.STI", zFilename);
WriteSTIFile((INT8*)pDataPtr, pPalette, MINIMAP_X_SIZE, MINIMAP_Y_SIZE, (STR)zFilename2, CONVERT_ETRLE_COMPRESS, 0);
UnLockVideoSurface(gi8BitMiniMap);
SetFont( TINYFONT1 );
SetFontBackground( FONT_MCOLOR_BLACK );
SetFontForeground( FONT_MCOLOR_DKGRAY );
mprintf( 10, 340, L"Writing radar image %S", zFilename2 );
mprintf( 10, 350, L"Using tileset %s", gTilesets[ giCurrentTilesetID ].zName );
InvalidateScreen( );
while (DequeueEvent(&InputEvent) == TRUE)
{
if ((InputEvent.usEvent == KEY_DOWN)&&(InputEvent.usParam == ESC))
{ // Exit the program
gfProgramIsRunning = FALSE;
}
}
SetFont(TINYFONT1);
SetFontBackground(FONT_MCOLOR_BLACK);
SetFontForeground(FONT_MCOLOR_DKGRAY);
mprintf(iOffsetHorizontal+10, iOffsetVertical+330, L"Writing radar image %S", zFilename2);
mprintf(iOffsetHorizontal+10, iOffsetVertical+340, L"Using tileset %s", gTilesets[giCurrentTilesetID].zName);
InvalidateScreen();
// Set next
FListNode = FListNode->pNext;
sCurFile++;
return( MAPUTILITY_SCREEN );
if(FListNode)
FListNode = FListNode->pNext;
if(fEditModeFirstTime == FALSE && FListNode == NULL)
return(EDIT_SCREEN);
return(MAPUTILITY_SCREEN);
}
UINT32 MapUtilScreenShutdown( )
UINT32 MapUtilScreenShutdown(void)
{
return( TRUE );
TrashFDlgList(FileList);
MemFree(p24BitValues);
return(TRUE);
}
#else //non-editor version
+28 -92
View File
@@ -16,9 +16,6 @@
#include "wcheck.h"
#endif
#include "VFS/vfs.h"
#include "VFS/vfs_file_raii.h"
//CONVERT_TO_16_BIT
BOOLEAN ConvertToETRLE( UINT8 ** ppDest, UINT32 * puiDestLen, UINT8 ** ppSubImageBuffer, UINT16 * pusNumberOfSubImages, UINT8 * p8BPPBuffer, UINT16 usWidth, UINT16 usHeight, UINT32 fFlags );
@@ -104,7 +101,6 @@ void ConvertRGBDistribution555To565( UINT16 * p16BPPData, UINT32 uiNumberOfPixel
void WriteSTIFile( INT8 *pData, SGPPaletteEntry *pPalette, INT16 sWidth, INT16 sHeight, STR cOutputName, UINT32 fFlags, UINT32 uiAppDataSize )
{
UINT32 uiOriginalSize;
UINT8 * pOutputBuffer = NULL;
UINT32 uiCompressedSize;
@@ -153,6 +149,7 @@ void WriteSTIFile( INT8 *pData, SGPPaletteEntry *pPalette, INT16 sWidth, INT16 s
{
if( !ConvertToETRLE( &pOutputBuffer, &uiCompressedSize, (UINT8 **) &pSubImageBuffer, &usNumberOfSubImages, (UINT8 *)pData, sWidth, sHeight, fFlags ) )
{
pOutputBuffer = NULL;//dnl ch49 061009 pOutputBuffer already MemFree this buffer
}
uiSubImageBufferSize = (UINT32) usNumberOfSubImages * STCI_SUBIMAGE_SIZE;
@@ -161,108 +158,47 @@ void WriteSTIFile( INT8 *pData, SGPPaletteEntry *pPalette, INT16 sWidth, INT16 s
Header.fFlags |= STCI_ETRLE_COMPRESSED;
}
//
// save file
//
#ifndef USE_VFS
FILE * pOutput;
pOutput = fopen( cOutputName, "wb" );
if (pOutput == NULL )
{
//dnl ch49 061009
FileDelete(cOutputName);// If file exist FileOpen will not truncate, so delete.
HWFILE hFile = FileOpen(cOutputName, FILE_ACCESS_WRITE|FILE_CREATE_ALWAYS, FALSE);
if(!hFile)
return;
}
// write header
fwrite( &Header, STCI_HEADER_SIZE, 1, pOutput );
#else
vfs::COpenWriteFile wfile(cOutputName,true,true);
// write header
vfs::UInt32 io;
wfile.file().Write( (vfs::Byte*)&Header, STCI_HEADER_SIZE, io );
#endif
// write palette and subimage structs, if any
if (Header.fFlags & STCI_INDEXED)
FileWrite(hFile, &Header, STCI_HEADER_SIZE, NULL);
// Write palette and subimage structs, if any
if(Header.fFlags & STCI_INDEXED)
{
if (pPalette != NULL)
if(pPalette != NULL)
{
// have to convert palette to STCI format!
// Have to convert palette to STCI format!
pSGPPaletteEntry = pPalette;
for (uiLoop = 0; uiLoop < 256; uiLoop++)
for(uiLoop = 0; uiLoop < 256; uiLoop++)
{
STCIPaletteEntry.ubRed = pSGPPaletteEntry[uiLoop].peRed;
STCIPaletteEntry.ubGreen = pSGPPaletteEntry[uiLoop].peGreen;
STCIPaletteEntry.ubBlue = pSGPPaletteEntry[uiLoop].peBlue;
#ifndef USE_VFS
fwrite( &STCIPaletteEntry, STCI_PALETTE_ELEMENT_SIZE, 1, pOutput );
#else
wfile.file().Write( (vfs::Byte*)&STCIPaletteEntry, STCI_PALETTE_ELEMENT_SIZE, io );
#endif
FileWrite(hFile, &STCIPaletteEntry, STCI_PALETTE_ELEMENT_SIZE, NULL);
}
}
if (Header.fFlags & STCI_ETRLE_COMPRESSED)
{
#ifndef USE_VFS
fwrite( pSubImageBuffer, uiSubImageBufferSize, 1, pOutput );
#else
wfile.file().Write( (vfs::Byte*)pSubImageBuffer, uiSubImageBufferSize, io );
#endif
}
if(Header.fFlags & STCI_ETRLE_COMPRESSED)
FileWrite(hFile, pSubImageBuffer, uiSubImageBufferSize, NULL);
}
#ifndef USE_VFS
// write file data
if (Header.fFlags & STCI_ZLIB_COMPRESSED || Header.fFlags & STCI_ETRLE_COMPRESSED)
// Write file data
if(Header.fFlags & STCI_ZLIB_COMPRESSED || Header.fFlags & STCI_ETRLE_COMPRESSED)
FileWrite(hFile, pOutputBuffer, Header.uiStoredSize, NULL);
else
FileWrite(hFile, Image.pImageData, Header.uiStoredSize, NULL);
// Write app-specific data (blanked to 0)
if(Image.pAppData == NULL)
{
fwrite( pOutputBuffer, Header.uiStoredSize, 1, pOutput );
if(Header.uiAppDataSize > 0)
for(uiLoop=0; uiLoop<Header.uiAppDataSize; uiLoop++)
FileWrite(hFile, "", 1, NULL);
}
else
{
fwrite( Image.pImageData, Header.uiStoredSize, 1, pOutput );
}
#else
// write file data
if (Header.fFlags & STCI_ZLIB_COMPRESSED || Header.fFlags & STCI_ETRLE_COMPRESSED)
{
wfile.file().Write( (vfs::Byte*)pOutputBuffer, Header.uiStoredSize, io );
}
else
{
wfile.file().Write( (vfs::Byte*)Image.pImageData, Header.uiStoredSize, io );
}
#endif
// write app-specific data (blanked to 0)
if (Image.pAppData == NULL )
{
if (Header.uiAppDataSize > 0)
{
for (uiLoop = 0; uiLoop < Header.uiAppDataSize; uiLoop++)
{
#ifndef USE_VFS
fputc( 0, pOutput );
#else
vfs::Byte c = 0;
wfile.file().Write( &c, sizeof(c), io );
#endif
}
}
}
else
{
#ifndef USE_VFS
fwrite( Image.pAppData, Header.uiAppDataSize, 1, pOutput );
#else
wfile.file().Write( (vfs::Byte*)Image.pAppData, Header.uiAppDataSize, io );
#endif
}
#ifndef USE_VFS
fclose( pOutput );
if( pOutputBuffer != NULL )
{
MemFree( pOutputBuffer );
}
#endif
FileWrite(hFile, Image.pAppData, Header.uiAppDataSize, NULL);
FileClose(hFile);
if(pOutputBuffer != NULL)
MemFree(pOutputBuffer);
}
+24 -24
View File
@@ -657,16 +657,16 @@ int x,dif,absDif;
#endif
// == Lesh slightly changed this function ============
INT32 SoundDir( INT16 sGridNo )
INT32 SoundDir( INT32 sGridNo )
{
INT16 sWorldX, sWorldY;
INT16 sScreenX, sScreenY;
INT16 sMiddleX;
INT16 sDif, sAbsDif;
if ( sGridNo == NOWHERE )
if (TileIsOutOfBounds(sGridNo))
{
return( MIDDLEPAN );
return( MIDDLEPAN );
}
// OK, get screen position of gridno.....
@@ -680,7 +680,7 @@ INT32 SoundDir( INT16 sGridNo )
sDif = sMiddleX - sScreenX;
if ( ( sAbsDif = (INT16) abs( sDif ) ) > 64 )
if ( ( sAbsDif = abs( sDif ) ) > 64 )
{
// OK, NOT the middle.
// Is it outside the screen?
@@ -709,15 +709,15 @@ INT32 SoundDir( INT16 sGridNo )
}
INT32 SoundVolume( INT8 bInitialVolume, INT16 sGridNo )
INT32 SoundVolume( INT8 bInitialVolume, INT32 sGridNo )
{
INT16 sWorldX, sWorldY;
INT16 sScreenX, sScreenY;
INT16 sMiddleX, sMiddleY;
INT16 sDifX, sAbsDifX;
INT16 sDifY, sAbsDifY;
if ( sGridNo == NOWHERE )
if (TileIsOutOfBounds(sGridNo))
{
return( bInitialVolume );
}
@@ -735,8 +735,8 @@ INT32 SoundVolume( INT8 bInitialVolume, INT16 sGridNo )
sDifX = sMiddleX - sScreenX;
sDifY = sMiddleY - sScreenY;
sAbsDifX = (INT16) abs( sDifX );
sAbsDifY = (INT16) abs( sDifY );
sAbsDifX = abs( sDifX );
sAbsDifY = abs( sDifY );
if ( sAbsDifX > 64 || sAbsDifY > 64 )
{
@@ -792,7 +792,7 @@ void DelayedSoundTimerCallback( void )
typedef struct
{
UINT32 uiFlags;
INT16 sGridNo;
INT32 sGridNo;
INT32 iSoundSampleID;
INT32 iSoundToPlay;
UINT32 uiData;
@@ -844,7 +844,7 @@ void RecountPositionSnds( void )
}
INT32 NewPositionSnd( INT16 sGridNo, UINT32 uiFlags, UINT32 uiData, UINT32 iSoundToPlay )
INT32 NewPositionSnd( INT32 sGridNo, UINT32 uiFlags, UINT32 uiData, UINT32 iSoundToPlay )
{
POSITIONSND *pPositionSnd;
INT32 iPositionSndIndex;
@@ -902,7 +902,7 @@ void DeletePositionSnd( INT32 iPositionSndIndex )
}
}
void SetPositionSndGridNo( INT32 iPositionSndIndex, INT16 sGridNo )
void SetPositionSndGridNo( INT32 iPositionSndIndex, INT32 sGridNo )
{
POSITIONSND *pPositionSnd;
@@ -968,16 +968,16 @@ void SetPositionSndsInActive( )
}
// == Lesh slightly changed this function ============
UINT8 PositionSoundDir( INT16 sGridNo )
UINT8 PositionSoundDir( INT32 sGridNo )
{
INT16 sWorldX, sWorldY;
INT16 sScreenX, sScreenY;
INT16 sMiddleX;
INT16 sDif, sAbsDif;
if ( sGridNo == NOWHERE )
if (TileIsOutOfBounds(sGridNo))
{
return( MIDDLEPAN );
return( MIDDLEPAN );
}
// OK, get screen position of gridno.....
@@ -991,7 +991,7 @@ UINT8 PositionSoundDir( INT16 sGridNo )
sDif = sMiddleX - sScreenX;
if ( ( sAbsDif = (INT16) abs( sDif ) ) > 64 )
if ( ( sAbsDif = abs( sDif ) ) > 64 )
{
// OK, NOT the middle.
@@ -1022,7 +1022,7 @@ UINT8 PositionSoundDir( INT16 sGridNo )
}
INT8 PositionSoundVolume( INT8 bInitialVolume, INT16 sGridNo )
INT8 PositionSoundVolume( INT8 bInitialVolume, INT32 sGridNo )
{
INT16 sWorldX, sWorldY;
INT16 sScreenX, sScreenY;
@@ -1031,10 +1031,10 @@ INT8 PositionSoundVolume( INT8 bInitialVolume, INT16 sGridNo )
INT16 sDifY, sAbsDifY;
INT16 sMaxDistX, sMaxDistY;
double sMaxSoundDist, sSoundDist;
if ( sGridNo == NOWHERE )
if (TileIsOutOfBounds(sGridNo))
{
return( bInitialVolume );
return( bInitialVolume );
}
// OK, get screen position of gridno.....
@@ -1050,8 +1050,8 @@ INT8 PositionSoundVolume( INT8 bInitialVolume, INT16 sGridNo )
sDifX = sMiddleX - sScreenX;
sDifY = sMiddleY - sScreenY;
sAbsDifX = (INT16) abs( sDifX );
sAbsDifY = (INT16) abs( sDifY );
sAbsDifX = abs( sDifX );
sAbsDifY = abs( sDifY );
sMaxDistX = (INT16)( ( gsBottomRightWorldX - gsTopLeftWorldX ) * 1.5 );
sMaxDistY = (INT16)( ( gsBottomRightWorldY - gsTopLeftWorldY ) * 1.5 );
+4 -4
View File
@@ -439,8 +439,8 @@ UINT32 CalculateSpeechVolume( UINT32 uiVolume );
//Calculates a volume based on the current Sound Effects Volume level
UINT32 CalculateSoundEffectsVolume( UINT32 uiVolume );
INT32 SoundDir( INT16 sGridNo );
INT32 SoundVolume( INT8 bInitialVolume, INT16 sGridNo );
INT32 SoundDir( INT32 sGridNo );
INT32 SoundVolume( INT8 bInitialVolume, INT32 sGridNo );
// ATE: Warning! Use this sparingly! NOT very robust - can
// have only 1 delayed sound at a time, and uses the global custom
@@ -451,12 +451,12 @@ void PlayDelayedJA2Sample( UINT32 uiDelay, UINT32 usNum, UINT32 usRate, UINT32 u
#define POSITION_SOUND_FROM_SOLDIER 0x00000001
#define POSITION_SOUND_STATIONATY_OBJECT 0x00000002
INT32 NewPositionSnd( INT16 sGridNo, UINT32 uiFlags, UINT32 uiData, UINT32 iSoundToPlay );
INT32 NewPositionSnd( INT32 sGridNo, UINT32 uiFlags, UINT32 uiData, UINT32 iSoundToPlay );
void DeletePositionSnd( INT32 iPositionSndIndex );
void SetPositionSndsActive( );
void SetPositionSndsInActive( );
void SetPositionSndsVolumeAndPanning( );
void SetPositionSndGridNo( INT32 iPositionSndIndex, INT16 sGridNo );
void SetPositionSndGridNo( INT32 iPositionSndIndex, INT32 sGridNo );
+32 -24
View File
@@ -281,7 +281,7 @@ void AddTextInputField( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 sHeight, IN
if( szInitText )
{
pNode->ubStrLen = (UINT8)wcslen( szInitText );
Assert( pNode->ubStrLen <= ubMaxChars );//dnl Warning if filename is longer this will throw assertion, need to be consider in future!!!
Assert( pNode->ubStrLen <= ubMaxChars );
swprintf( pNode->szString, szInitText );
}
else
@@ -1093,37 +1093,33 @@ void HandleExclusiveInput( UINT32 uiKey )
}
}
void AddChar( UINT32 uiKey )
//dnl ch39 180909
void AddChar(UINT32 uiKey)
{
PlayJA2Sample( ENTERING_TEXT, RATE_11025, BTNVOLUME, 1, MIDDLEPAN );
if( gpActive->ubStrLen >= gpActive->ubMaxChars )
{ //max length reached. Just replace the last character with new one.
/*dnl this part has no sense and is wrong escpecially when you insert characters then last was always replace
gpActive->ubStrLen = gpActive->ubMaxChars;
gpActive->szString[ gpActive->ubStrLen-1 ] = (UINT16)uiKey;
gpActive->szString[ gpActive->ubStrLen ] = '\0';
*/
PlayJA2Sample(ENTERING_TEXT, RATE_11025, BTNVOLUME, 1, MIDDLEPAN);
if(gpActive->ubStrLen >= gpActive->ubMaxChars)
return;
}
else if( gubCursorPos == gpActive->ubStrLen )
{ //add character to end
gpActive->szString[ gpActive->ubStrLen ] = (UINT16)uiKey;
gpActive->szString[ gpActive->ubStrLen + 1 ] = '\0';
else if(gubCursorPos == gpActive->ubStrLen)
{
// Add character to end
gpActive->szString[gpActive->ubStrLen] = (UINT16)uiKey;
gpActive->szString[gpActive->ubStrLen+1] = L'\0';
gpActive->ubStrLen++;
gubCursorPos = gpActive->ubStrLen;
}
else
{ //insert character after cursor
{
// Insert character after cursor
INT16 sChar;
sChar = (INT16)gpActive->ubStrLen;//dnl sChar = (INT16)(gpActive->ubStrLen + 1); disbanded because was lead into heap breach detected by debugger because gpActive->szString[ sChar + 1 ] was always overlap 2 bytes out of allocation region
while( sChar >= gubCursorPos )
sChar = (INT16)gpActive->ubStrLen;
while(sChar >= gubCursorPos)
{
gpActive->szString[ sChar + 1 ] = gpActive->szString[ sChar ];
gpActive->szString[sChar+1] = gpActive->szString[sChar];
sChar--;
}
gpActive->szString[ gubCursorPos ] = (UINT16)uiKey;
gpActive->szString[gubCursorPos] = (UINT16)uiKey;
gpActive->ubStrLen++;
gpActive->szString[ gpActive->ubStrLen ] = '\0';//dnl
gpActive->szString[gpActive->ubStrLen] = L'\0';
gubCursorPos++;
}
}
@@ -1328,10 +1324,14 @@ void RenderActiveTextField()
if ( strPixLen > regionXLen )
{
// if the cursor is left of the visible position
if (gubCursorPos < gubParkingPos)
if (gubCursorPos <= gubParkingPos)
{
// shift the visible string left
gubParkingPos = gubCursorPos;
//dnl ch39 190909
UINT16 visPixLengthToCursor = 0;
while(visPixLengthToCursor < (3*regionXLen/4) && gubParkingPos > 0)
visPixLengthToCursor = SubstringPixLength(gpActive->szString, --gubParkingPos, gubCursorPos, pColors->usFont);
}
// if the cursor is right of the visible position
else if (gubCursorPos > gubParkingPos)
@@ -1353,13 +1353,19 @@ void RenderActiveTextField()
gubParkingPos += j + 1;
}
}
scrollCursorPos = gubCursorPos - gubParkingPos; // set the relative cursor position (for drawing only)
scrollStrLen = gpActive->ubStrLen - gubParkingPos;
//dnl ch39 190909
scrollStrLen = gpActive->ubStrLen;
while(scrollStrLen > gubParkingPos && SubstringPixLength(gpActive->szString, gubParkingPos, scrollStrLen, pColors->usFont) > (gpActive->region.RegionBottomRightX-gpActive->region.RegionTopLeftX))
--scrollStrLen;
scrollStrLen -= gubParkingPos;
while(gubCursorPos > (gubParkingPos + scrollStrLen))
++scrollStrLen;
memcpy(scrollStr,&gpActive->szString[gubParkingPos], scrollStrLen*sizeof(CHAR16));
}
else
{
gubParkingPos = 0;//dnl ch39 190909
scrollCursorPos = gubCursorPos;
scrollStrLen = gpActive->ubStrLen;
memcpy(scrollStr,gpActive->szString, scrollStrLen*sizeof(CHAR16));
@@ -1374,6 +1380,8 @@ void RenderActiveTextField()
if( gubStartHilite < gubEndHilite )
{
// translate hilite positions into the shifted string
if(gubStartHilite < gubParkingPos)//dnl ch39 190909
gubStartHilite = gubParkingPos;
usStart = gubStartHilite - gubParkingPos;
usEnd = gubEndHilite - gubParkingPos;
}
+1
View File
@@ -1554,6 +1554,7 @@ enum
MP_EDGE_SOUTH,
MP_EDGE_EAST,
MP_EDGE_WEST,
MP_EDGE_CENTER,
MAX_EDGES,
};
extern STR16 gszMPEdgesText[];
-3573
View File
File diff suppressed because it is too large Load Diff
-478
View File
@@ -1,478 +0,0 @@
# Microsoft Developer Studio Project File - Name="Utils" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=Utils - Win32 Demo Bounds Checker
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Utils.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Utils.mak" CFG="Utils - Win32 Demo Bounds Checker"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Utils - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "Utils - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "Utils - Win32 Release with Debug Info" (based on "Win32 (x86) Static Library")
!MESSAGE "Utils - Win32 Bounds Checker" (based on "Win32 (x86) Static Library")
!MESSAGE "Utils - Win32 Debug Demo" (based on "Win32 (x86) Static Library")
!MESSAGE "Utils - Win32 Release Demo" (based on "Win32 (x86) Static Library")
!MESSAGE "Utils - Win32 Demo Release with Debug Info" (based on "Win32 (x86) Static Library")
!MESSAGE "Utils - Win32 Demo Bounds Checker" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA"
# PROP Scc_LocalPath "..\..\..\ja2\build"
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "Utils - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ".\Release"
# PROP BASE Intermediate_Dir ".\Release"
# PROP BASE Target_Dir "."
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir "."
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "CALLBACKTIMER" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"Utils All.h" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Utils - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ".\Debug"
# PROP BASE Intermediate_Dir ".\Debug"
# PROP BASE Target_Dir "."
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir "."
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "CALLBACKTIMER" /D "PRECOMPILEDHEADERS" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "_VTUNE_PROFILING" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"Utils All.h" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Utils - Win32 Release with Debug Info"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release with Debug Info"
# PROP BASE Intermediate_Dir "Release with Debug Info"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release with Debug"
# PROP Intermediate_Dir "Release with Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "\ja2\Build\Communications" /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\Tactical" /I "\ja2\Build\TileEngine" /I "\ja2\build\strategic" /I "\ja2\build\editor" /D "NDEBUG" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /FR /YX /FD /c
# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "..\Standard Gaming Platform" /I "..\\" /I "..\Tactical" /I "..\TileEngine" /I "..\strategic" /I "..\editor" /I ".\\" /D "NDEBUG" /D "RELEASE_WITH_DEBUG_INFO" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "_VTUNE_PROFILING" /D "XML_STATIC" /D "CINTERFACE" /Fr /YX"Utils All.h" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Utils - Win32 Bounds Checker"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Utils__0"
# PROP BASE Intermediate_Dir "Utils__0"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Bounds Checker"
# PROP Intermediate_Dir "Bounds Checker"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\ja2\build\communications" /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\Tactical" /I "\ja2\Build\TileEngine" /I "\ja2\build\strategic" /I "\ja2\build\editor" /D "_DEBUG" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /FR /YX /FD /c
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\ja2\build\communications" /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\Tactical" /I "\ja2\Build\TileEngine" /I "\ja2\build\strategic" /I "\ja2\build\editor" /D "_DEBUG" /D "BOUNDS_CHECKER" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "_VTUNE_PROFILING" /FR /YX"Utils All.h" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Utils - Win32 Debug Demo"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Utils___"
# PROP BASE Intermediate_Dir "Utils___"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug Demo"
# PROP Intermediate_Dir "Debug Demo"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\ja2\build\communications" /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\Tactical" /I "\ja2\Build\TileEngine" /I "\ja2\build\strategic" /I "\ja2\build\editor" /D "_DEBUG" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /FR /YX /FD /c
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\ja2\build\communications" /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\Tactical" /I "\ja2\Build\TileEngine" /I "\ja2\build\strategic" /I "\ja2\build\editor" /D "_DEBUG" /D "JA2DEMO" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"Utils All.h" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Utils - Win32 Release Demo"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Utils__1"
# PROP BASE Intermediate_Dir "Utils__1"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release Demo"
# PROP Intermediate_Dir "Release Demo"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W4 /GX /Zi /O2 /I "\ja2\Build\Communications" /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\Tactical" /I "\ja2\Build\TileEngine" /I "\ja2\build\strategic" /I "\ja2\build\editor" /D "NDEBUG" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "RELEASE_WITH_DEBUG_INFO" /Fr /YX /FD /c
# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "\ja2\Build\Communications" /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\Tactical" /I "\ja2\Build\TileEngine" /I "\ja2\build\strategic" /I "\ja2\build\editor" /D "RELEASE_WITH_DEBUG_INFO" /D "NDEBUG" /D "JA2DEMO" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /Fr /YX"Utils All.h" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Utils - Win32 Demo Release with Debug Info"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Utils__2"
# PROP BASE Intermediate_Dir "Utils__2"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Demo Release with Debug"
# PROP Intermediate_Dir "Demo Release with Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W4 /GX /Zi /O2 /I "\ja2\Build\Communications" /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\Tactical" /I "\ja2\Build\TileEngine" /I "\ja2\build\strategic" /I "\ja2\build\editor" /D "NDEBUG" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "RELEASE_WITH_DEBUG_INFO" /Fr /YX /FD /c
# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "..\Standard Gaming Platform" /I "..\\" /I "..\Tactical" /I "..\TileEngine" /I "..\strategic" /I "..\editor" /I ".\\" /D "RELEASE_WITH_DEBUG_INFO" /D "NDEBUG" /D "JA2DEMO" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "XML_STATIC" /D "CINTERFACE" /Fr /YX"Utils All.h" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Utils - Win32 Demo Bounds Checker"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Utils__3"
# PROP BASE Intermediate_Dir "Utils__3"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Demo Bounds Checker"
# PROP Intermediate_Dir "Demo Bounds Checker"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\ja2\build\communications" /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\Tactical" /I "\ja2\Build\TileEngine" /I "\ja2\build\strategic" /I "\ja2\build\editor" /D "CALLBACKTIMER" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "BOUNDS_CHECKER" /FR /YX /FD /c
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\ja2\build\communications" /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\Tactical" /I "\ja2\Build\TileEngine" /I "\ja2\build\strategic" /I "\ja2\build\editor" /D "_DEBUG" /D "BOUNDS_CHECKER" /D "JA2DEMO" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"Utils All.h" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "Utils - Win32 Release"
# Name "Utils - Win32 Debug"
# Name "Utils - Win32 Release with Debug Info"
# Name "Utils - Win32 Bounds Checker"
# Name "Utils - Win32 Debug Demo"
# Name "Utils - Win32 Release Demo"
# Name "Utils - Win32 Demo Release with Debug Info"
# Name "Utils - Win32 Demo Bounds Checker"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
# Begin Source File
SOURCE=.\_DutchText.cpp
# End Source File
# Begin Source File
SOURCE=.\_EnglishText.cpp
# End Source File
# Begin Source File
SOURCE=.\_FrenchText.cpp
# End Source File
# Begin Source File
SOURCE=.\_GermanText.cpp
# End Source File
# Begin Source File
SOURCE=.\_ItalianText.cpp
# End Source File
# Begin Source File
SOURCE=.\_Ja25EnglishText.cpp
# End Source File
# Begin Source File
SOURCE=.\_Ja25GermanText.cpp
# End Source File
# Begin Source File
SOURCE=.\_PolishText.cpp
# End Source File
# Begin Source File
SOURCE=.\_RussianText.cpp
# End Source File
# Begin Source File
SOURCE=".\Animated ProgressBar.cpp"
# End Source File
# Begin Source File
SOURCE=.\Cinematics.cpp
# End Source File
# Begin Source File
SOURCE=.\Cursors.cpp
# End Source File
# Begin Source File
SOURCE=".\Debug Control.cpp"
# End Source File
# Begin Source File
SOURCE=.\dsutil.cpp
# End Source File
# Begin Source File
SOURCE=".\Encrypted File.cpp"
# End Source File
# Begin Source File
SOURCE=".\Event Manager.cpp"
# End Source File
# Begin Source File
SOURCE=".\Event Pump.cpp"
# End Source File
# Begin Source File
SOURCE=".\Font Control.cpp"
# End Source File
# Begin Source File
SOURCE=.\INIReader.cpp
# End Source File
# Begin Source File
SOURCE=.\MapUtility.cpp
# End Source File
# Begin Source File
SOURCE=.\MercTextBox.cpp
# End Source File
# Begin Source File
SOURCE=.\message.cpp
# End Source File
# Begin Source File
SOURCE=".\Multi Language Graphic Utils.cpp"
# End Source File
# Begin Source File
SOURCE=".\Multilingual Text Code Generator.cpp"
# End Source File
# Begin Source File
SOURCE=".\Music Control.cpp"
# End Source File
# Begin Source File
SOURCE=.\PopUpBox.cpp
# End Source File
# Begin Source File
SOURCE=".\Quantize Wrap.cpp"
# End Source File
# Begin Source File
SOURCE=.\Quantize.cpp
# End Source File
# Begin Source File
SOURCE=.\Slider.cpp
# End Source File
# Begin Source File
SOURCE=".\Sound Control.cpp"
# End Source File
# Begin Source File
SOURCE=.\STIConvert.cpp
# End Source File
# Begin Source File
SOURCE=".\Text Input.cpp"
# End Source File
# Begin Source File
SOURCE=".\Text Utils.cpp"
# End Source File
# Begin Source File
SOURCE=".\Timer Control.cpp"
# End Source File
# Begin Source File
SOURCE=.\Utilities.cpp
# End Source File
# Begin Source File
SOURCE=.\WordWrap.cpp
# End Source File
# Begin Source File
SOURCE=.\XML_Items.cpp
# End Source File
# Begin Source File
SOURCE=.\XML_Strings.cpp
# End Source File
# Begin Source File
SOURCE=.\XML_Strings2.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=.\_Ja25GermanText.h
# End Source File
# Begin Source File
SOURCE=".\Animated ProgressBar.h"
# End Source File
# Begin Source File
SOURCE=.\cursors.h
# End Source File
# Begin Source File
SOURCE=".\Debug Control.h"
# End Source File
# Begin Source File
SOURCE=.\dsutil.h
# End Source File
# Begin Source File
SOURCE=".\Event Manager.h"
# End Source File
# Begin Source File
SOURCE=".\Event Pump.h"
# End Source File
# Begin Source File
SOURCE=".\Font Control.h"
# End Source File
# Begin Source File
SOURCE=.\INIReader.h
# End Source File
# Begin Source File
SOURCE=.\message.h
# End Source File
# Begin Source File
SOURCE=".\Multi Language Graphic Utils.h"
# End Source File
# Begin Source File
SOURCE=".\Multilingual Text Code Generator.h"
# End Source File
# Begin Source File
SOURCE=".\Music Control.h"
# End Source File
# Begin Source File
SOURCE=".\Sound Control.h"
# End Source File
# Begin Source File
SOURCE=".\Text Input.h"
# End Source File
# Begin Source File
SOURCE=.\Text.h
# End Source File
# Begin Source File
SOURCE=".\Timer Control.h"
# End Source File
# Begin Source File
SOURCE=.\utilities.h
# End Source File
# Begin Source File
SOURCE=".\Utils All.h"
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project
-1684
View File
File diff suppressed because it is too large Load Diff
-3149
View File
File diff suppressed because it is too large Load Diff
+62
View File
@@ -267,6 +267,68 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release_WithDebugInfo|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="..\ja2_2005Express.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
Optimization="0"
AdditionalIncludeDirectories="..\Multiplayer;..\VFS"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
RuntimeLibrary="0"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
+65
View File
@@ -270,6 +270,71 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release_WithDebugInfo|Win32"
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="..\ja2_VS2008.vsprops"
CharacterSet="0"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="false"
UsePrecompiledHeader="0"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
+38 -38
View File
@@ -15,7 +15,7 @@ CPropertyContainer::TagMap::TagMap()
_map[L"Key"] = L"Key";
_map[L"KeyID"] = L"name";
}
utf8string const& CPropertyContainer::TagMap::Container(utf8string::char_t* container)
utf8string const& CPropertyContainer::TagMap::container(utf8string::char_t* container)
{
if(container)
{
@@ -23,7 +23,7 @@ utf8string const& CPropertyContainer::TagMap::Container(utf8string::char_t* cont
}
return _map[L"Container"];
}
utf8string const& CPropertyContainer::TagMap::Section(utf8string::char_t* section)
utf8string const& CPropertyContainer::TagMap::section(utf8string::char_t* section)
{
if(section)
{
@@ -31,7 +31,7 @@ utf8string const& CPropertyContainer::TagMap::Section(utf8string::char_t* sectio
}
return _map[L"Section"];
}
utf8string const& CPropertyContainer::TagMap::SectionID(utf8string::char_t* section_id)
utf8string const& CPropertyContainer::TagMap::sectionID(utf8string::char_t* section_id)
{
if(section_id)
{
@@ -39,7 +39,7 @@ utf8string const& CPropertyContainer::TagMap::SectionID(utf8string::char_t* sect
}
return _map[L"SectionID"];
}
utf8string const& CPropertyContainer::TagMap::Key(utf8string::char_t* key)
utf8string const& CPropertyContainer::TagMap::key(utf8string::char_t* key)
{
if(key)
{
@@ -47,7 +47,7 @@ utf8string const& CPropertyContainer::TagMap::Key(utf8string::char_t* key)
}
return _map[L"Key"];
}
utf8string const& CPropertyContainer::TagMap::KeyID(utf8string::char_t* key_id)
utf8string const& CPropertyContainer::TagMap::keyID(utf8string::char_t* key_id)
{
if(key_id)
{
@@ -56,33 +56,33 @@ utf8string const& CPropertyContainer::TagMap::KeyID(utf8string::char_t* key_id)
return _map[L"KeyID"];
}
bool CPropertyContainer::WriteToXMLFile(vfs::Path const& sFileName, CPropertyContainer::TagMap& tagmap)
bool CPropertyContainer::writeToXMLFile(vfs::Path const& sFileName, CPropertyContainer::TagMap& tagmap)
{
XMLWriter xmlw;
xmlw.OpenNode(tagmap.Container());
xmlw.openNode(tagmap.container());
tSections::iterator sit = m_mapProps.begin();
for(; sit != m_mapProps.end(); ++sit)
{
xmlw.AddAttributeToNextValue(tagmap.SectionID(),sit->first.utf8());
xmlw.OpenNode(tagmap.Section());
xmlw.addAttributeToNextValue(tagmap.sectionID(),sit->first.utf8());
xmlw.openNode(tagmap.section());
CPropertyContainer::CSection& section = sit->second;
CPropertyContainer::CSection::tProps::iterator kit = section.mapProps.begin();
for(; kit != section.mapProps.end(); ++kit)
{
xmlw.AddAttributeToNextValue(tagmap.KeyID(), kit->first.utf8());
xmlw.AddValue(tagmap.Key(), kit->second.utf8());
xmlw.addAttributeToNextValue(tagmap.keyID(), kit->first.utf8());
xmlw.addValue(tagmap.key(), kit->second.utf8());
}
xmlw.CloseNode();
xmlw.closeNode();
}
xmlw.CloseNode();
xmlw.closeNode();
return xmlw.WriteToFile(sFileName);
return xmlw.writeToFile(sFileName);
}
/*********************************************************************************/
@@ -108,9 +108,9 @@ public:
_tagmap(tagmap),
current_state(DO_ELEMENT_NONE) // doesn't matter where we come from, we start fresh
{};
virtual void OnStartElement(const XML_Char* name, const XML_Char** atts);
virtual void OnEndElement(const XML_Char* name);
virtual void OnTextElement(const XML_Char *str, int len);
virtual void onStartElement(const XML_Char* name, const XML_Char** atts);
virtual void onEndElement(const XML_Char* name);
virtual void onTextElement(const XML_Char *str, int len);
private:
CPropertyContainer& _container;
CPropertyContainer::TagMap& _tagmap;
@@ -120,45 +120,45 @@ private:
};
void CPropertyXMLParser::OnStartElement(const XML_Char *name, const XML_Char **atts)
void CPropertyXMLParser::onStartElement(const XML_Char *name, const XML_Char **atts)
{
utf8string utf8_name(name);
if(current_state == DO_ELEMENT_NONE && StrCmp::Equal(utf8_name,_tagmap.Container()))
if(current_state == DO_ELEMENT_NONE && StrCmp::Equal(utf8_name,_tagmap.container()))
{
current_state = DO_ELEMENT_Container;
}
else if(current_state == DO_ELEMENT_Container && StrCmp::Equal(utf8_name, _tagmap.Section()))
else if(current_state == DO_ELEMENT_Container && StrCmp::Equal(utf8_name, _tagmap.section()))
{
current_state = DO_ELEMENT_Section;
current_section = this->GetAttribute(_tagmap.SectionID().utf8().c_str(),atts);
current_section = this->getAttribute(_tagmap.sectionID().utf8().c_str(),atts);
}
else if(current_state == DO_ELEMENT_Section && StrCmp::Equal(utf8_name, _tagmap.Key()))
else if(current_state == DO_ELEMENT_Section && StrCmp::Equal(utf8_name, _tagmap.key()))
{
current_state = DO_ELEMENT_Key;
current_key = this->GetAttribute(_tagmap.KeyID().utf8().c_str(),atts);
current_key = this->getAttribute(_tagmap.keyID().utf8().c_str(),atts);
}
sCharData = "";
}
void CPropertyXMLParser::OnEndElement(const XML_Char* name)
void CPropertyXMLParser::onEndElement(const XML_Char* name)
{
utf8string utf8_name(name);
if(current_state == DO_ELEMENT_Key && StrCmp::Equal(utf8_name, _tagmap.Key()))
if(current_state == DO_ELEMENT_Key && StrCmp::Equal(utf8_name, _tagmap.key()))
{
_container.SetStringProperty(current_section, current_key, vfs::TrimString(sCharData,0,sCharData.length()));
_container.setStringProperty(current_section, current_key, vfs::trimString(sCharData,0,sCharData.length()));
current_state = DO_ELEMENT_Section;
}
else if(current_state == DO_ELEMENT_Section && StrCmp::Equal(utf8_name, _tagmap.Section()))
else if(current_state == DO_ELEMENT_Section && StrCmp::Equal(utf8_name, _tagmap.section()))
{
current_state = DO_ELEMENT_Container;
}
else if(current_state == DO_ELEMENT_Container && StrCmp::Equal(utf8_name, _tagmap.Container()))
else if(current_state == DO_ELEMENT_Container && StrCmp::Equal(utf8_name, _tagmap.container()))
{
current_state = DO_ELEMENT_NONE;
}
}
void CPropertyXMLParser::OnTextElement(const XML_Char *str, int len)
void CPropertyXMLParser::onTextElement(const XML_Char *str, int len)
{
if(current_state == DO_ELEMENT_Key)
{
@@ -166,7 +166,7 @@ void CPropertyXMLParser::OnTextElement(const XML_Char *str, int len)
}
}
bool CPropertyContainer::InitFromXMLFile(vfs::Path const& sFileName, CPropertyContainer::TagMap& tagmap)
bool CPropertyContainer::initFromXMLFile(vfs::Path const& sFileName, CPropertyContainer::TagMap& tagmap)
{
vfs::tReadableFile *file = NULL;
bool delete_file = false;
@@ -178,12 +178,13 @@ bool CPropertyContainer::InitFromXMLFile(vfs::Path const& sFileName, CPropertyCo
}
catch(CBasicException& ex)
{
logException(ex);
vfs::CFile* rfile = new vfs::CFile(sFileName);
delete_file = true;
file = vfs::tReadableFile::Cast(rfile);
if(!file->OpenRead())
file = vfs::tReadableFile::cast(rfile);
if(!file->openRead())
{
file->Close();
file->close();
delete file;
return false;
}
@@ -193,21 +194,20 @@ bool CPropertyContainer::InitFromXMLFile(vfs::Path const& sFileName, CPropertyCo
return false;
}
vfs::UInt32 size = file->GetFileSize();
vfs::size_t size = file->getSize();
std::vector<vfs::Byte> buffer(size+1);
vfs::UInt32 has_read;
file->Read(&buffer[0],size,has_read);
TRYCATCH_RETHROW( file->read(&buffer[0],size), L"" );
buffer[size] = 0;
file->Close();
file->close();
if(delete_file) delete file;
XML_Parser parser = XML_ParserCreate(NULL);
CPropertyXMLParser pp(*this,tagmap,parser,NULL);
pp.GrabParser();
pp.grabParser();
if(!XML_Parse(parser, &buffer[0], size, TRUE))
{
+41 -36
View File
@@ -3,29 +3,29 @@
#include "VFS/vfs_file_raii.h"
#include "VFS/File/vfs_file.h"
void XMLWriter::AddValue(utf8string const& key)
void XMLWriter::addValue(utf8string const& key)
{
m_ssBuffer << Indent() << "<" << key.utf8();
InsertAttributesIntoBuffer();
m_ssBuffer << indent() << "<" << key.utf8();
insertAttributesIntoBuffer();
m_ssBuffer << " />\n";
}
void XMLWriter::AddComment(utf8string const& comment)
void XMLWriter::addComment(utf8string const& comment)
{
m_ssBuffer << Indent() << "<!-- " << comment.utf8() << " -->\n";
m_ssBuffer << indent() << "<!-- " << comment.utf8() << " -->\n";
}
void XMLWriter::OpenNode(utf8string const& key)
void XMLWriter::openNode(utf8string const& key)
{
std::string utf8key = key.utf8();
m_ssBuffer << Indent() << "<" << utf8key;
InsertAttributesIntoBuffer();
m_ssBuffer << indent() << "<" << utf8key;
insertAttributesIntoBuffer();
m_ssBuffer << ">\n";
m_iIndentLevel += 1;
m_stOpenNodes.push(utf8key);
}
bool XMLWriter::CloseNode()
bool XMLWriter::closeNode()
{
if(m_iIndentLevel < 1)
{
@@ -37,42 +37,47 @@ bool XMLWriter::CloseNode()
return false;
}
m_iIndentLevel -= 1;
m_ssBuffer << Indent() << "</" << m_stOpenNodes.top() << ">\n";
m_ssBuffer << indent() << "</" << m_stOpenNodes.top() << ">\n";
m_stOpenNodes.pop();
return true;
}
bool XMLWriter::WriteToFile(vfs::Path const& sFileName)
bool XMLWriter::writeToFile(vfs::Path const& sFileName)
{
try
{
vfs::COpenWriteFile file(sFileName,true,true);
return WriteToFile( &file.file() );
return writeToFile( &file.file() );
}
catch(CBasicException& ex)
{
logException(ex);
vfs::CFile file(sFileName);
if(file.OpenWrite(true,true))
if(file.openWrite(true,true))
{
return WriteToFile(vfs::tWriteableFile::Cast(&file));
return writeToFile(vfs::tWritableFile::cast(&file));
}
}
return false;
}
bool XMLWriter::WriteToFile(vfs::tWriteableFile* pFile)
bool XMLWriter::writeToFile(vfs::tWritableFile* pFile)
{
vfs::COpenWriteFile file(pFile);
vfs::UInt32 written;
std::string &str = m_ssBuffer.str();
if(!pFile->Write(str.c_str(), str.length() * sizeof(std::string::value_type), written))
try
{
vfs::COpenWriteFile file(pFile);
std::string &str = m_ssBuffer.str();
pFile->write(str.c_str(), str.length() * sizeof(std::string::value_type));
return true;
}
catch(CBasicException& ex)
{
logException(ex);
return false;
}
return true;
}
std::string XMLWriter::Indent()
std::string XMLWriter::indent()
{
std::string indent_string;
for(int i=0; i < m_iIndentLevel; ++i)
@@ -82,7 +87,7 @@ std::string XMLWriter::Indent()
return indent_string;
}
void XMLWriter::InsertAttributesIntoBuffer()
void XMLWriter::insertAttributesIntoBuffer()
{
if(!m_stNextValAttributes.empty())
{
@@ -95,7 +100,7 @@ void XMLWriter::InsertAttributesIntoBuffer()
m_stNextValAttributes.clear();
}
std::string XMLWriter::HandleSpecialCharacters(std::string const& str)
std::string XMLWriter::handleSpecialCharacters(std::string const& str)
{
std::stringstream ss;
unsigned int current = 0, old = 0;
@@ -141,20 +146,20 @@ void testMXLWriter()
{
//XMLWriter<char> xmlw;
XMLWriter xmlw;
//xmlw.OpenNode(L"root");
xmlw.OpenNode("root");
xmlw.AddAttributeToNextValue("attr1",10);
xmlw.AddAttributeToNextValue("attr2","string");
//xmlw.openNode(L"root");
xmlw.openNode("root");
xmlw.addAttributeToNextValue("attr1",10);
xmlw.addAttributeToNextValue("attr2","string");
//xmlw.AddValue(L"val1",10);
xmlw.AddValue("val1",10);
xmlw.addValue("val1",10);
xmlw.AddAttributeToNextValue("node_attr",17);
xmlw.AddComment("bbb -->\n <a> comment</a> <!-- aaa");
xmlw.OpenNode("test");
//xmlw.AddValue(L"val2",10.5);
xmlw.AddValue("val2",10.5);
xmlw.CloseNode();
xmlw.CloseNode();
xmlw.addAttributeToNextValue("node_attr",17);
xmlw.addComment("bbb -->\n <a> comment</a> <!-- aaa");
xmlw.openNode("test");
//xmlw.addValue(L"val2",10.5);
xmlw.addValue("val2",10.5);
xmlw.closeNode();
xmlw.closeNode();
//xmlw.WriteToFile(WideString("xml_output/test.xml")());
xmlw.WriteToFile("xml_output/test.xml");
xmlw.writeToFile("xml_output/test.xml");
}
+17 -17
View File
@@ -23,7 +23,7 @@ public:
{};
template<typename ValueType>
void AddAttributeToNextValue(utf8string const& attribute, ValueType const& value)
void addAttributeToNextValue(utf8string const& attribute, ValueType const& value)
{
std::stringstream temp_buffer;
temp_buffer << value;
@@ -31,36 +31,36 @@ public:
}
template<typename ValueType>
void AddValue(utf8string const& key, ValueType const& value)
void addValue(utf8string const& key, ValueType const& value)
{
std::string utf8key = key.utf8();
m_ssBuffer << Indent() << "<" << utf8key;
InsertAttributesIntoBuffer();
m_ssBuffer << indent() << "<" << utf8key;
insertAttributesIntoBuffer();
m_ssBuffer << "> " << value << " </" << utf8key << ">\n";
}
template<>
void AddValue<std::string >(utf8string const& key, std::string const& value)
void addValue<std::string >(utf8string const& key, std::string const& value)
{
std::string utf8key = key.utf8();
m_ssBuffer << Indent() << "<" << utf8key;
InsertAttributesIntoBuffer();
m_ssBuffer << "> " << HandleSpecialCharacters(value) << " </" << utf8key << ">\n";
m_ssBuffer << indent() << "<" << utf8key;
insertAttributesIntoBuffer();
m_ssBuffer << "> " << handleSpecialCharacters(value) << " </" << utf8key << ">\n";
}
void AddValue(utf8string const& key);
void AddComment(utf8string const& comment);
void addValue(utf8string const& key);
void addComment(utf8string const& comment);
void OpenNode(utf8string const& key);
bool CloseNode();
void openNode(utf8string const& key);
bool closeNode();
bool WriteToFile(vfs::Path const& sFileName);
bool WriteToFile(vfs::tWriteableFile* pFile);
bool writeToFile(vfs::Path const& sFileName);
bool writeToFile(vfs::tWritableFile* pFile);
private:
std::string Indent();
std::string HandleSpecialCharacters(std::string const& str);
void InsertAttributesIntoBuffer();
std::string indent();
std::string handleSpecialCharacters(std::string const& str);
void insertAttributesIntoBuffer();
private:
std::stringstream m_ssBuffer;
std::stack<std::string> m_stOpenNodes;
+1 -1
View File
@@ -215,7 +215,7 @@ itemStartElementHandle(void *userData, const XML_Char *name, const XML_Char **at
strcmp(name, "NewInv") == 0 ||
//zilpin: pellet spread patterns externalized in XML
strcmp(name, "spreadPattern") == 0 ||
strcmp(name, "fFlags") == 0 ))
strcmp(name, "fFlags") == 0 ))
{
pData->curElement = ELEMENT_PROPERTY;
//DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("itemStartElementHandle: going into element, name = %s",name) );
+19 -19
View File
@@ -16,41 +16,41 @@ public:
/**
* Interface
*/
static void OnStartCallback(void *userData, const XML_Char* name, const XML_Char** atts)
static void onStartCallback(void *userData, const XML_Char* name, const XML_Char** atts)
{
((IXMLParser*)userData)->OnStartElement(name,atts);
((IXMLParser*)userData)->onStartElement(name,atts);
}
static void OnEndCallback(void *userData, const XML_Char* name)
static void onEndCallback(void *userData, const XML_Char* name)
{
((IXMLParser*)userData)->OnEndElement(name);
((IXMLParser*)userData)->onEndElement(name);
// test if we are done here
if( ((IXMLParser*)userData)->_caller && (strcmp(name, ((IXMLParser*)userData)->ElementName) == 0) )
{
((IXMLParser*)userData)->_caller->GrabParser();
((IXMLParser*)userData)->_caller->grabParser();
}
}
static void OnTextCallback(void *userData, const XML_Char *str, int len)
static void onTextCallback(void *userData, const XML_Char *str, int len)
{
((IXMLParser*)userData)->OnTextElement(str,len);
((IXMLParser*)userData)->onTextElement(str,len);
}
void GrabParser()
void grabParser()
{
XML_SetUserData(_parser,this);
XML_SetElementHandler(_parser, IXMLParser::OnStartCallback, IXMLParser::OnEndCallback);
XML_SetCharacterDataHandler(_parser, IXMLParser::OnTextCallback);
XML_SetElementHandler(_parser, IXMLParser::onStartCallback, IXMLParser::onEndCallback);
XML_SetCharacterDataHandler(_parser, IXMLParser::onTextCallback);
}
/**
* Override these methods in your parser
*/
virtual void OnStartElement(const XML_Char* name, const XML_Char** atts)
virtual void onStartElement(const XML_Char* name, const XML_Char** atts)
{};
virtual void OnEndElement(const XML_Char* name)
virtual void onEndElement(const XML_Char* name)
{};
virtual void OnTextElement(const XML_Char *str, int len)
virtual void onTextElement(const XML_Char *str, int len)
{};
protected:
XML_Char const* GetAttribute(const XML_Char* attr_name, const XML_Char** atts)
XML_Char const* getAttribute(const XML_Char* attr_name, const XML_Char** atts)
{
while(*atts)
{
@@ -62,9 +62,9 @@ protected:
}
return "";
}
bool GetAttributeAsInt(const XML_Char* attr_name, const XML_Char** attr, int &value)
bool getAttributeAsInt(const XML_Char* attr_name, const XML_Char** attr, int &value)
{
XML_Char const* result = GetAttribute(attr_name,attr);
XML_Char const* result = getAttribute(attr_name,attr);
if( strcmp(result,"") != 0)
{
value = (int)atol(result);
@@ -72,9 +72,9 @@ protected:
}
return false;
}
bool GetAttributeAsFloat(const XML_Char* attr_name, const XML_Char** attr, float &value)
bool getAttributeAsFloat(const XML_Char* attr_name, const XML_Char** attr, float &value)
{
XML_Char const* result = GetAttribute(attr_name,attr);
XML_Char const* result = getAttribute(attr_name,attr);
if( strcmp(result,"") != 0)
{
value = (float)atof(result);
@@ -83,7 +83,7 @@ protected:
return false;
}
int GetCurrentLineNumber()
int getCurrentLineNumber()
{
return XML_GetCurrentLineNumber(this->_parser);
}
+8 -5
View File
@@ -3905,14 +3905,14 @@ STR16 gzMPHScreenText[] =
L"随机选择起始位置",//L"Randomise Starting Edge",
L"必须输入服务器名",//L"You must enter a server name",
L"最大玩家数必须在2-4之间",//L"Max Players must be between 2 and 4",
L"队伍大小必须在1-5之间",//L"Squad size must be between 1 and 5",
L"队伍大小必须在1-6之间",//L"Squad size must be between 1 and 6",
L"当日时间",//L"Time of Day",
L"当日时间必须是24小时制 (HH:MM)",//L"Time of Day must be a 24 hr time (HH:MM)\n\n eg. 13:30 = 1.30pm",
L"开始资金必须是整数(最小单位为1美元)" ,//L"Starting Cash must be a valid dollar amount ( no cents )\n\n eg. 150000" ,
L"伤害系数",//L"Damage Multiplier",
L"伤害系数必须于0-5之间",//L"Damage Multiplier must be a number between 0 and 5",
L"回合计时器",//L"Turn Timer Multiplier",
L"计时器必须设定在1-200之间",//L"Turn Timer multiplier must be a number between 1 and 200",
L"计时器必须设定在0-200之间",//L"Turn Timer multiplier must be a number between 0 (no timed turns) and 200 (short timed turns)",
L"合作模式中允许平民",//L"Enable Civilians in CO-OP",
L"使用新携行模式(NIV)",//L"Use New Inventory (NIV)",
L"强制执行最大AI敌人数量",//L"Enforce Maximum AI Enemies",
@@ -4731,6 +4731,7 @@ STR16 MPClientMessage[] =
L"点击 '准备' 进入战术画面。",// L"Press 'Ready' to enter tactical screen.",
L"不能连接到服务器,因为你的版本 %S 和服务器端的版本 %S 不同。",
L"你击毙了一个敌人。",
L"Cannot start the game, because all teams are the same.", // TODO.Translate
};
STR16 MPHelp[] =
@@ -4758,12 +4759,14 @@ STR16 MPHelp[] =
L"'F1' - 显示基本帮助",
};
// TODO.Translate
STR16 gszMPEdgesText[] =
{
L"N",
L"S",
L"E",
L"W"
L"W",
L"C", // "C"enter
};
STR16 gszMPTeamNames[] =
@@ -4771,7 +4774,8 @@ STR16 gszMPTeamNames[] =
L"Foxtrot",
L"Bravo",
L"Delta",
L"Charlie"
L"Charlie",
L"N/A", // Acronym of Not Applicable
};
STR16 gszMPMapscreenText[] =
@@ -5009,7 +5013,6 @@ STR16 gzFacilityAssignmentStrings[]=
L"训练领导",
L"训练爆破",
};
STR16 Additional113Text[]=
{
L"Jagged Alliance 2 v1.13 窗口模式需要一个16bpp或更少的颜色深度。",
+10 -7
View File
@@ -376,10 +376,10 @@ STR16 pAssignmentStrings[] =
L"Onderweg", // in transit - abbreviated form
L"Repareer", // repairing
L"Oefenen", // training themselves
L"Militie", // training a town to revolt
L"Militie", // training a town to revolt
L"M.Militia", //training moving militia units // TODO.Translate
L"Trainer", // training a teammate
L"Student", // being trained by someone else
L"Student", // being trained by someone else
L"Staff", // operating a strategic facility // TODO.Translate
L"Rest", // Resting at a facility // TODO.Translate
L"Dood", // dead
@@ -684,7 +684,7 @@ STR16 pAttributeMenuStrings[] =
STR16 pTrainingMenuStrings[] =
{
L"Oefenen", // train yourself
L"Militie", // train the town
L"Militie", // train the town
L"Mobile Militia", // TODO.Translate
L"Trainer", // train your teammates
L"Student", // be trained by an instructor
@@ -3890,14 +3890,14 @@ STR16 gzMPHScreenText[] =
L"Randomise Starting Edge",
L"You must enter a server name",
L"Max Players must be between 2 and 4",
L"Squad size must be between 1 and 5",
L"Squad size must be between 1 and 6",
L"Time of Day",
L"Time of Day must be a 24 hour time (HH:MM)\n\n eg. 13:30 = 1.30pm",
L"Starting Cash must be a valid dollar amount ( no cents )\n\n eg. 150000" ,
L"Damage Multiplier",
L"Damage Multiplier must be a number between 0 and 5",
L"Turn Timer Multiplier",
L"Turn Timer multiplier must be a number between 1 and 200",
L"Turn Timer multiplier must be a number between 0 (no timed turns) and 200 (short timed turns)",
L"Enable Civilians in CO-OP",
L"Use New Inventory (NIV)",
L"Enforce Maximum AI Enemies",
@@ -4717,6 +4717,7 @@ STR16 MPClientMessage[] =
L"Press 'Ready' to enter tactical screen.",
L"Cannot connect because your version %S is different from the server version %S.",
L"You killed an enemy soldier.",
L"Cannot start the game, because all teams are the same.",
};
STR16 MPHelp[] =
@@ -4749,7 +4750,8 @@ STR16 gszMPEdgesText[] =
L"N",
L"S",
L"E",
L"W"
L"W",
L"C", // "C"enter
};
STR16 gszMPTeamNames[] =
@@ -4757,7 +4759,8 @@ STR16 gszMPTeamNames[] =
L"Foxtrot",
L"Bravo",
L"Delta",
L"Charlie"
L"Charlie",
L"Nvt", // Acronym of Not Applicable
};
STR16 gszMPMapscreenText[] =
+10 -11
View File
@@ -359,7 +359,6 @@ STR16 sTimeStrings[] =
// Assignment Strings: what assignment does the merc have right now? For example, are they on a squad, training,
// administering medical aid (doctor) or training a town. All are abbreviated. 8 letters is the longest it can be.
// HEADROCK HAM 3.6: Added string for Mobile Militia Training ("M.Militia"), string for Facility Staffing ("Facility")
STR16 pAssignmentStrings[] =
{
L"Squad 1",
@@ -389,7 +388,7 @@ STR16 pAssignmentStrings[] =
L"In Trans", // in transit - abbreviated form
L"Repair", // repairing
L"Practice", // training themselves
L"Militia", // training a town to revolt
L"Militia", // training a town to revolt
L"M.Militia", //training moving militia units
L"Trainer", // training a teammate
L"Student", // being trained by someone else
@@ -693,7 +692,6 @@ STR16 pAttributeMenuStrings[] =
L"Cancel",
};
// HEADROCK HAM 3.6: Splitting Garrison and Mobile training.
STR16 pTrainingMenuStrings[] =
{
L"Practice", // train yourself
@@ -1156,7 +1154,7 @@ STR16 gzWeaponStatsFasthelp[ 29 ] =
L"No Auto Mode!",
L"APs to Bash",
L"Autofire Penalty (Lower is better)",
L"Burst Penalty (Lower is better)"
L"Burst Penalty (Lower is better)",
};
STR16 gzWeaponStatsFasthelpTactical[ 29 ] =
@@ -1189,7 +1187,7 @@ STR16 gzWeaponStatsFasthelpTactical[ 29 ] =
L"No Auto Mode!",
L"APs to Bash",
L"Autofire Penalty (Lower is better)",
L"Burst Penalty (Lower is better)"
L"Burst Penalty (Lower is better)",
};
STR16 gzAmmoStatsFasthelp[ 20 ] =
@@ -1742,7 +1740,6 @@ STR16 gsTimeStrings[] =
// text for the various facilities in the sector
// HEADROCK HAM 3.4: Changed "Industry" into "Factory"
STR16 sFacilitiesStrings[] =
{
L"None",
@@ -3908,14 +3905,14 @@ STR16 gzMPHScreenText[] =
L"Randomise Starting Edge",
L"You must enter a server name",
L"Max Players must be between 2 and 4",
L"Squad size must be between 1 and 5",
L"Squad size must be between 1 and 6",
L"Time of Day",
L"Time of Day must be a 24 hour time (HH:MM)",
L"Starting Cash must be a valid dollar amount (no cents)" ,
L"Damage Multiplier",
L"Damage Multiplier must be a number between 0 and 5",
L"Turn Timer Multiplier",
L"Turn Timer multiplier must be a number between 1 and 200",
L"Turn Timer multiplier must be a number between 0 (no timed turns) and 200 (short timed turns)",
L"Enable Civilians in CO-OP",
L"Use New Inventory (NIV)",
L"Enforce Maximum AI Enemies",
@@ -4738,6 +4735,7 @@ STR16 MPClientMessage[] =
L"Press 'Ready' to enter tactical screen.",
L"Cannot connect because your version %S is different from the server version %S.",
L"You killed an enemy soldier.",
L"Cannot start the game, because all teams are the same.",
};
STR16 MPHelp[] =
@@ -4770,7 +4768,8 @@ STR16 gszMPEdgesText[] =
L"N",
L"S",
L"E",
L"W"
L"W",
L"C", // "C"enter
};
STR16 gszMPTeamNames[] =
@@ -4778,7 +4777,8 @@ STR16 gszMPTeamNames[] =
L"Foxtrot",
L"Bravo",
L"Delta",
L"Charlie"
L"Charlie",
L"N/A", // Acronym of Not Applicable
};
STR16 gszMPMapscreenText[] =
@@ -5007,7 +5007,6 @@ STR16 gzFacilityAssignmentStrings[]=
L"Trainer Leadership",
L"Trainer Explosives",
};
STR16 Additional113Text[]=
{
L"Jagged Alliance 2 v1.13 windowed mode requires a color depth of 16bpp or less.",
+8 -6
View File
@@ -693,7 +693,7 @@ STR16 pAttributeMenuStrings[] =
STR16 pTrainingMenuStrings[] =
{
L"Formation", // train yourself
L"Milice", // train the town
L"Milice", // train the town
L"Mobile Militia", // TODO.Translate
L"Entraîneur", // train your teammates
L"Elève", // be trained by an instructor
@@ -3901,14 +3901,14 @@ STR16 gzMPHScreenText[] =
L"Randomise Starting Edge",
L"You must enter a server name",
L"Max Players must be between 2 and 4",
L"Squad size must be between 1 and 5",
L"Squad size must be between 1 and 6",
L"Time of Day",
L"Time of Day must be a 24 hour time (HH:MM)",
L"Starting Cash must be a valid dollar amount (no cents)" ,
L"Damage Multiplier",
L"Damage Multiplier must be a number between 0 and 5",
L"Turn Timer Multiplier",
L"Turn Timer multiplier must be a number between 1 and 200",
L"Turn Timer multiplier must be a number between 0 (no timed turns) and 200 (short timed turns)",
L"Enable Civilians in CO-OP",
L"Use New Inventory (NIV)",
L"Enforce Maximum AI Enemies",
@@ -4728,6 +4728,7 @@ STR16 MPClientMessage[] =
L"Press 'Ready' to enter tactical screen.",
L"Cannot connect because your version %S is different from the server version %S.",
L"You killed an enemy soldier.",
L"Cannot start the game, because all teams are the same.",
};
STR16 MPHelp[] =
@@ -4760,7 +4761,8 @@ STR16 gszMPEdgesText[] =
L"N",
L"S",
L"E",
L"W"
L"W",
L"C", // "C"enter
};
STR16 gszMPTeamNames[] =
@@ -4768,7 +4770,8 @@ STR16 gszMPTeamNames[] =
L"Foxtrot",
L"Bravo",
L"Delta",
L"Charlie"
L"Charlie",
L"N/A", // Acronym of Not Applicable
};
STR16 gszMPMapscreenText[] =
@@ -5000,7 +5003,6 @@ STR16 gzFacilityAssignmentStrings[]=
L"Trainer Leadership",
L"Trainer Explosives",
};
STR16 Additional113Text[]=
{
L"Jagged Alliance 2 v1.13 mode fenêtré exige une profondeur de couleur de 16 bit ou moins.",
+13 -10
View File
@@ -375,10 +375,10 @@ STR16 pAssignmentStrings[] =
L"Transit", // in transit - abbreviated form
L"Repar.", // repairing
L"Üben", // training themselves
L"Miliz", // training a town to revolt
L"Miliz", // training a town to revolt
L"M.Militia", //training moving militia units // TODO.Translate
L"Trainer", // training a teammate
L"Rekrut", // being trained by someone else
L"Rekrut", // being trained by someone else
L"Staff", // operating a strategic facility // TODO.Translate
L"Rest", // Resting at a facility // TODO.Translate
L"Tot", // dead
@@ -671,7 +671,7 @@ STR16 pAttributeMenuStrings[] =
STR16 pTrainingMenuStrings[] =
{
L"Üben", // train yourself
L"Miliz", // train the town
L"Miliz", // train the town
L"Mobile Militia", // TODO.Translate
L"Trainer", // train your teammates
L"Rekrut", // be trained by an instructor
@@ -2396,7 +2396,7 @@ STR16 pHistoryStrings[] =
STR16 pHistoryLocations[] =
{
L"n.a", // N/A is an acronym for Not Applicable
L"n.a.", // N/A is an acronym for Not Applicable
};
// icon text strings that appear on the laptop
@@ -3461,7 +3461,7 @@ STR16 pMilitiaConfirmStrings[] =
L"Milizen in %d Sektoren zu trainieren kostet $ %d. %s", // cost to train sveral sectors at once
L"Sie können sich keine $%d für die Miliz hier leisten.",
L"%s benötigt eine Loyalität von %d Prozent, um mit dem Milizen-Training fortzufahren.",
L"Sie können die Miliz in %s nicht mehr trainieren.",
L"Sie können die Miliz in %s nicht mehr trainieren.",
L"You cannot afford the $%d to train mobile militia here.", // HEADROCK HAM 3.6: Mobile Militia TODO.Translate
L"Continue training mobile militia in %s (%s %d)?", // HEADROCK HAM 3.6: Mobile Militia TODO.Translate
L"Training mobile militia in %d sectors will cost $ %d. %s", // HEADROCK HAM 3.6: Mobile Militia TODO.Translate
@@ -3706,14 +3706,14 @@ STR16 gzMPHScreenText[] =
L"Zufällige Startzone",
L"Sie müssen einen Server Namen eingeben.",
L"Max. Spieleranzahl muss zwischen 2 und 4 sein.",
L"Teamgröße muss zwischen 1 und 5 sein.",
L"Teamgröße muss zwischen 1 und 6 sein.",
L"Tageszeit",
L"Tageszeit muss eine 24h Zeit (SS:MM) sein.",
L"Startkapital muss ein gültiger Dollerwert (keine Cents) sein." ,
L"Schaden Multiplikator",
L"Schaden Multiplikator muss zwischen 0 and 5 sein.",
L"Zeit Multiplikator",
L"Zeit Multiplikator muss zwischen 1 and 200 sein.",
L"Zeit Multiplikator muss zwischen 0 (keine Zeitbegrenzung) and 200 (max. Zeitbegrenzung) sein.",
L"Erlaube Zivilisten in CO-OP",
L"Verwende neues Inventar (NIV)",
L"Erzwinge maximale AI Gegner",
@@ -3823,7 +3823,7 @@ STR16 pMessageStrings[] =
L"Pfd", //Abbreviation for pounds (Imperial weight measurement unit)
L"Home", //Home as in homepage on the internet.
L"US$", //Abbreviation for US Dollars
L"n.a", //Lowercase acronym for not applicable.
L"n.a.", //Lowercase acronym for not applicable.
L"Inzwischen", //Meanwhile
L"%s ist angekommen im Sektor %s%s", //30 Name/Squad has arrived in sector A9. Order must not change without notifying SirTech
L"Version",
@@ -4522,6 +4522,7 @@ STR16 MPClientMessage[] =
L"Drücken Sie 'Bereit' um in den taktischen Bildschirm zu gelangen.",
L"Kann keine Verbindung herstellen, weil Ihre Version %S unterschiedlich zur Server Version %S ist.",
L"Sie haben einen gegnerischen Soldaten getötet.",
L"Spiel kann nicht gestartet werden, weil es keine unterschiedlichen Teams gibt.",
};
STR16 MPHelp[] =
@@ -4554,7 +4555,8 @@ STR16 gszMPEdgesText[] =
L"N",
L"S",
L"O",
L"W"
L"W",
L"M", // "C"enter
};
STR16 gszMPTeamNames[] =
@@ -4562,7 +4564,8 @@ STR16 gszMPTeamNames[] =
L"Foxtrot",
L"Bravo",
L"Delta",
L"Charlie"
L"Charlie",
L"n.a.", // Acronym of Not Applicable
};
STR16 gszMPMapscreenText[] =
+10 -7
View File
@@ -372,10 +372,10 @@ STR16 pAssignmentStrings[] =
L"Transito", // in transit - abbreviated form
L"Riparare", // repairing
L"Esercit.", // training themselves
L"Esercit.", // training a town to revolt
L"Esercit.", // training a town to revolt
L"M.Militia", //training moving militia units // TODO.Translate
L"Istrutt.", // training a teammate
L"Studente", // being trained by someone else
L"Studente", // being trained by someone else
L"Staff", // operating a strategic facility // TODO.Translate
L"Rest", // Resting at a facility // TODO.Translate
L"Morto", // dead
@@ -679,7 +679,7 @@ STR16 pAttributeMenuStrings[] =
STR16 pTrainingMenuStrings[] =
{
L"Allenati", // train yourself
L"Esercito", // train the town
L"Esercito", // train the town
L"Mobile Militia", // TODO.Translate
L"Allenatore", // train your teammates
L"Studente", // be trained by an instructor
@@ -3883,14 +3883,14 @@ STR16 gzMPHScreenText[] =
L"Randomise Starting Edge",
L"You must enter a server name",
L"Max Players must be between 2 and 4",
L"Squad size must be between 1 and 5",
L"Squad size must be between 1 and 6",
L"Time of Day",
L"Time of Day must be a 24 hour time (HH:MM)",
L"Starting Cash must be a valid dollar amount (no cents)" ,
L"Damage Multiplier",
L"Damage Multiplier must be a number between 0 and 5",
L"Turn Timer Multiplier",
L"Turn Timer multiplier must be a number between 1 and 200",
L"Turn Timer multiplier must be a number between 0 (no timed turns) and 200 (short timed turns)",
L"Enable Civilians in CO-OP",
L"Use New Inventory (NIV)",
L"Enforce Maximum AI Enemies",
@@ -4715,6 +4715,7 @@ STR16 MPClientMessage[] =
L"Press 'Ready' to enter tactical screen.",
L"Cannot connect because your version %S is different from the server version %S.",
L"You killed an enemy soldier.",
L"Cannot start the game, because all teams are the same.",
};
STR16 MPHelp[] =
@@ -4747,7 +4748,8 @@ STR16 gszMPEdgesText[] =
L"N",
L"S",
L"E",
L"W"
L"W",
L"C", // "C"enter
};
STR16 gszMPTeamNames[] =
@@ -4755,7 +4757,8 @@ STR16 gszMPTeamNames[] =
L"Foxtrot",
L"Bravo",
L"Delta",
L"Charlie"
L"Charlie",
L"N/A", // Acronym of Not Applicable
};
STR16 gszMPMapscreenText[] =
+10 -7
View File
@@ -381,10 +381,10 @@ STR16 pAssignmentStrings[] =
L"Podró¿", // in transit - abbreviated form
L"Naprawa", // repairing
L"Praktyka", // training themselves
L"Samoobr.", // training a town to revolt
L"Samoobr.", // training a town to revolt
L"M.Militia", //training moving militia units // TODO.Translate
L"Instruk.", // training a teammate
L"Uczeñ", // being trained by someone else
L"Uczeñ", // being trained by someone else
L"Staff", // operating a strategic facility // TODO.Translate
L"Rest", // Resting at a facility // TODO.Translate
L"Nie ¿yje", // dead
@@ -688,7 +688,7 @@ STR16 pAttributeMenuStrings[] =
STR16 pTrainingMenuStrings[] =
{
L"Praktyka", // train yourself
L"Samoobrona", // train the town
L"Samoobrona", // train the town
L"Mobile Militia", // TODO.Translate
L"Instruktor", // train your teammates
L"Uczeñ", // be trained by an instructor
@@ -3895,14 +3895,14 @@ STR16 gzMPHScreenText[] =
L"Randomise Starting Edge",
L"You must enter a server name",
L"Max Players must be between 2 and 4",
L"Squad size must be between 1 and 5",
L"Squad size must be between 1 and 6",
L"Time of Day",
L"Time of Day must be a 24 hour time (HH:MM)",
L"Starting Cash must be a valid dollar amount (no cents)" ,
L"Damage Multiplier",
L"Damage Multiplier must be a number between 0 and 5",
L"Turn Timer Multiplier",
L"Turn Timer multiplier must be a number between 1 and 200",
L"Turn Timer multiplier must be a number between 0 (no timed turns) and 200 (short timed turns)",
L"Enable Civilians in CO-OP",
L"Use New Inventory (NIV)",
L"Sync. MP Clients Directory",
@@ -4720,6 +4720,7 @@ STR16 MPClientMessage[] =
L"Press 'Ready' to enter tactical screen.",
L"Cannot connect because your version %S is different from the server version %S.",
L"You killed an enemy soldier.",
L"Cannot start the game, because all teams are the same.",
};
STR16 MPHelp[] =
@@ -4752,7 +4753,8 @@ STR16 gszMPEdgesText[] =
L"N",
L"S",
L"E",
L"W"
L"W",
L"C", // "C"enter
};
STR16 gszMPTeamNames[] =
@@ -4760,7 +4762,8 @@ STR16 gszMPTeamNames[] =
L"Foxtrot",
L"Bravo",
L"Delta",
L"Charlie"
L"Charlie",
L"N/D", // Acronym of Not Applicable
};
STR16 gszMPMapscreenText[] =
+10 -7
View File
@@ -386,10 +386,10 @@ STR16 pAssignmentStrings[] =
L"Â ïóòè", // in transit - abbreviated form
L"Ðåìîíò", // repairing
L"Ïðàêòèêà", // training themselves
L"Îïîë÷åíèå", // training a town to revolt
L"Îïîë÷åíèå", // training a town to revolt
L"M.Militia", //training moving militia units // TODO.Translate
L"Òðåíåð", // training a teammate
L"Ó÷åíèê", // being trained by someone else
L"Ó÷åíèê", // being trained by someone else
L"Staff", // operating a strategic facility // TODO.Translate
L"Rest", // Resting at a facility // TODO.Translate
L"Ìåðòâ", // dead
@@ -693,7 +693,7 @@ STR16 pAttributeMenuStrings[] =
STR16 pTrainingMenuStrings[] =
{
L"Ïðàêòèêà", // train yourself
L"Îïîë÷åíèå", // train the town
L"Îïîë÷åíèå", // train the town
L"Mobile Militia", // TODO.Translate
L"Òðåíåð", // train your teammates
L"Ó÷åíèê", // be trained by an instructor
@@ -3897,14 +3897,14 @@ STR16 gzMPHScreenText[] =
L"Âûñàäêà ñî ñëó÷àéíîé ñòîðîíû", //Randomise Starting Edge
L"Âïèøèòå èìÿ ñåðâåðà", //You must enter a server name
L"Êîëè÷åñòâî èãðîêîâ äîëæíî áûòü â äèàïàçîíå îò 2 äî 4", //Max Players must be between 2 and 4
L"Êîëè÷åñòâî áîéöîâ â îòðÿäå äîëæíî áûòü îò 1-ãî äî 5", //Squad size must be between 1 and 6
L"Êîëè÷åñòâî áîéöîâ â îòðÿäå äîëæíî áûòü îò 1-ãî äî 6", //Squad size must be between 1 and 6
L"Âðåìÿ âûñàäêè", //Time of Day
L"Âðåìÿ âûñàäêè äîëæíî áûòü â 24-õ ÷àñîâîì ôîðìàòå (××:ÌÌ)", //Time of Day must be a 24 hr time (HH:MM)\n\n eg. 13:30 = 1.30pm
L"Ñòàðòîâûé áàëàíñ äîëæåí áûòü öåëûì ÷èñëîì", //Starting Cash must be a valid dollar amount ( no cents )\n\n eg. 150000
L"Ìíîæèòåëü óðîíà", //Damage Multiplier
L"Ìíîæèòåëü óðîíà äîëæåí íàõîäèòüñÿ â ïðîìåæóòêå îò 0 äî 5.", //Damage Multiplier must be a number between 0 and 5
L"Ìíîæèòåëü âðåìÿ õîäà", //Turn Timer Multiplier
L"Ìíîæèòåëü âðåìÿ õîäà äîëæåí áûòü ÷èñëîì â ïðîìåæóòêå îò 1 äî 200.", //Turn Timer multiplier must be a number between 1 and 200
L"Turn Timer multiplier must be a number between 0 (no timed turns) and 200 (short timed turns)",
L"Ïðèñóòñòâóþò ãðàæäàíñêèå â CO-OP", //Enable Civilians in CO-OP
L"Ðåàëèñòè÷íàÿ ñèñòåìà èíâåíòàðÿ (NIV)", //Use New Inventory (NIV)
L"Enforce Maximum AI Enemies",
@@ -4725,6 +4725,7 @@ STR16 MPClientMessage[] =
L"Íàæìèòå 'Ãîòîâ' äëÿ âõîäà íà òàêòè÷åñêóþ êàðòó.", //Press 'Ready' to enter tactical screen.
L"Íå óäà¸òñÿ ïîäêëþ÷èòüñÿ. Âåðñèÿ âàøåãî êëèåíòà (%S) îòëè÷àåòñÿ îò âåðñèè ñåðâåðà (%S).", //Cannot connect because your version %S is different from the server version %S.
L"Âû óáèëè âðàæåñêîãî ñîëäàòà.", //You killed an enemy soldier
L"Cannot start the game, because all teams are the same.",
};
STR16 MPHelp[] =
@@ -4757,7 +4758,8 @@ STR16 gszMPEdgesText[] =
L"Ñ", //N
L"Þ", //S
L"Â", //E
L"Ç" //W
L"Ç", //W
L"C", // "C"enter
};
STR16 gszMPTeamNames[] =
@@ -4765,7 +4767,8 @@ STR16 gszMPTeamNames[] =
L"Ôîêñòðîò", //Foxtrot
L"Áðàâî", //Bravo
L"Äåëüòà", //Delta
L"×àðëè" //Charlie
L"×àðëè", //Charlie
L"Í/Ä", // Acronym of Not Applicable
};
STR16 gszMPMapscreenText[] =
+10 -7
View File
@@ -387,10 +387,10 @@ STR16 pAssignmentStrings[] =
L"In Trans", // in transit - abbreviated form
L"Repair", // repairing
L"Practice", // training themselves
L"Militia", // training a town to revolt
L"Militia", // training a town to revolt
L"M.Militia", //training moving militia units // TODO.Translate
L"Trainer", // training a teammate
L"Student", // being trained by someone else
L"Student", // being trained by someone else
L"Staff", // operating a strategic facility // TODO.Translate
L"Rest", // Resting at a facility // TODO.Translate
L"Dead", // dead
@@ -694,7 +694,7 @@ STR16 pAttributeMenuStrings[] =
STR16 pTrainingMenuStrings[] =
{
L"Practice", // train yourself
L"Militia", // train the town
L"Militia", // train the town
L"Mobile Militia", // TODO.Translate
L"Trainer", // train your teammates
L"Student", // be trained by an instructor
@@ -3903,14 +3903,14 @@ STR16 gzMPHScreenText[] =
L"Randomise Starting Edge",
L"You must enter a server name",
L"Max Players must be between 2 and 4",
L"Squad size must be between 1 and 5",
L"Squad size must be between 1 and 6",
L"Time of Day",
L"Time of Day must be a 24 hour time (HH:MM)",
L"Starting Cash must be a valid dollar amount (no cents)" ,
L"Damage Multiplier",
L"Damage Multiplier must be a number between 0 and 5",
L"Turn Timer Multiplier",
L"Turn Timer multiplier must be a number between 1 and 200",
L"Turn Timer multiplier must be a number between 0 (no timed turns) and 200 (short timed turns)",
L"Enable Civilians in CO-OP",
L"Use New Inventory (NIV)",
L"Sync. MP Clients Directory",
@@ -4728,6 +4728,7 @@ STR16 MPClientMessage[] =
L"Press 'Ready' to enter tactical screen.",
L"Cannot connect because your version %S is different from the server version %S.",
L"You killed an enemy soldier.",
L"Cannot start the game, because all teams are the same.",
};
STR16 MPHelp[] =
@@ -4760,7 +4761,8 @@ STR16 gszMPEdgesText[] =
L"N",
L"S",
L"E",
L"W"
L"W",
L"C", // "C"enter
};
STR16 gszMPTeamNames[] =
@@ -4768,7 +4770,8 @@ STR16 gszMPTeamNames[] =
L"Foxtrot",
L"Bravo",
L"Delta",
L"Charlie"
L"Charlie",
L"N/A", // Acronym of Not Applicable
};
STR16 gszMPMapscreenText[] =
+1 -1
View File
@@ -2,7 +2,7 @@
#ifndef __MAPUTILITY_H
#define __MAPUTILITY_H
void GenerateAllMapsInit(void);
#endif
#endif
+4 -3
View File
@@ -342,7 +342,7 @@ void ClearDisplayedListOfTacticalStrings( void )
{
// this function will go through list of display strings and clear them all out
UINT32 cnt;
// HEADROCK HAM 3.6: Number of messages to display now depends on external options.
//for ( cnt = 0; cnt < MAX_LINE_COUNT; cnt++ )
for ( cnt = 0; cnt < gGameExternalOptions.ubMaxMessagesTactical; cnt++ )
@@ -377,6 +377,7 @@ void ScrollString( )
INT16 iMsgYStart = ((UsingNewInventorySystem() == false)) ? SCREEN_HEIGHT - 150 : SCREEN_HEIGHT - 210;
// UPDATE TIMER
suiTimer=GetJA2Clock();
@@ -1530,8 +1531,8 @@ void WriteMessageToFile( const STR16 pString )
fprintf( fp, "%S\n", pString );
fclose( fp );
#else
static CLog& debugMessage = *CLog::Create(L"DebugMessage.txt", true, CLog::FLUSH_IMMEDIATELY);
debugMessage << pString << CLog::endl;
static CLog& debugMessage = *CLog::create(L"DebugMessage.txt", true, CLog::FLUSH_IMMEDIATELY);
debugMessage << pString << CLog::ENDL;
#endif
#endif
}