- Fixed compilation errors in VS 2005

- Updated Revision number: 2996

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2996 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2009-06-10 10:13:02 +00:00
parent 1c69e1a019
commit 76b990f133
5 changed files with 35 additions and 16 deletions
+20 -1
View File
@@ -20,6 +20,8 @@
#endif
#include "connect.h"
#include "VFS/vfs.h"
#include "XMLWriter.h"
extern BOOLEAN InitStrategicMovementCosts();
void InitKnowFacilitiesFlags( );
@@ -205,6 +207,7 @@ BOOLEAN ReadInAltSectors(STR fileName)
BOOLEAN WriteInAltSectors(STR fileName)
{
#ifndef USE_VFS
// Lets output the current Strategic map format using the XML structure I've devised.
FILE *outfile = fopen(fileName, "wt");
@@ -223,7 +226,23 @@ BOOLEAN WriteInAltSectors(STR fileName)
fprintf (outfile, "</ALT_SECTORS_LIST>\n");
fclose(outfile);
#else
XMLWriter xmlw;
xmlw.OpenNode(L"ALT_SECTORS_LIST");
UINT32 x, y;
for(y = 1;y <= 16;y++)
{
xmlw.AddAttributeToNextValue(L"y",(char)(y+0x40));
std::stringstream ss;
for(x = 1;x <= 16; x++)
{
ss << " " << RandomSector[ ((y - 1) * 16) + (x - 1) ];
}
xmlw.AddValue(L"ROW", ss.str());
}
xmlw.CloseNode();
xmlw.WriteToFile(fileName);
#endif
return (TRUE);
}