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

** 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
+16 -17
View File
@@ -16,7 +16,6 @@
#include "VFS/vfs.h"
#include "XMLWriter.h"
// THIS FILE CONTAINS DEFINITIONS FOR TILESET FILES
void SetTilesetThreeTerrainValues();
@@ -48,7 +47,7 @@ void InitEngineTilesets( )
return;
}
xmlw.OpenNode("JA2SET");
xmlw.openNode("JA2SET");
// READ # TILESETS and compare
// fread( &gubNumSets, sizeof( gubNumSets ), 1, hfile );
@@ -60,7 +59,7 @@ void InitEngineTilesets( )
SET_ERROR( "Too many tilesets in the data file" );
return;
}
xmlw.AddAttributeToNextValue("numTilesets",(int)gubNumSets);
xmlw.addAttributeToNextValue("numTilesets",(int)gubNumSets);
// READ #files
// fread( &uiNumFiles, sizeof( uiNumFiles ), 1, hfile );
@@ -73,27 +72,27 @@ void InitEngineTilesets( )
SET_ERROR( "Number of tilesets slots in code does not match data file" );
return;
}
xmlw.AddAttributeToNextValue("numFiles",(int)uiNumFiles);
xmlw.OpenNode("tilesets");
xmlw.addAttributeToNextValue("numFiles",(int)uiNumFiles);
xmlw.openNode("tilesets");
// Loop through each tileset, load name then files
for ( cnt = 0; cnt < gubNumSets; cnt++ )
{
xmlw.AddAttributeToNextValue("index",(int)cnt);
xmlw.OpenNode("Tileset");
xmlw.addAttributeToNextValue("index",(int)cnt);
xmlw.openNode("Tileset");
//Read name
// fread( &zName, sizeof( zName ), 1, hfile );
FileRead( hfile, &zName, sizeof( zName ), &uiNumBytesRead );
xmlw.AddValue("Name",std::string(zName));
xmlw.addValue("Name",std::string(zName));
// Read ambience value
// fread( &(gTilesets[ cnt ].ubAmbientID), sizeof( UINT8), 1, hfile );
FileRead( hfile, &(gTilesets[ cnt ].ubAmbientID), sizeof( UINT8 ), &uiNumBytesRead );
xmlw.AddValue("AmbientID",(int)gTilesets[ cnt ].ubAmbientID);
xmlw.addValue("AmbientID",(int)gTilesets[ cnt ].ubAmbientID);
// Set into tileset
swprintf( gTilesets[ cnt ].zName, L"%S", zName );
xmlw.OpenNode("Files");
xmlw.openNode("Files");
// Loop for files
for ( cnt2 = 0; cnt2 < uiNumFiles; cnt2++ )
{
@@ -102,25 +101,25 @@ void InitEngineTilesets( )
FileRead( hfile, &zName, sizeof( zName ), &uiNumBytesRead );
if(!std::string(zName).empty())
{
xmlw.AddAttributeToNextValue("index",(int)cnt2);
xmlw.AddValue("file",std::string(zName));
xmlw.addAttributeToNextValue("index",(int)cnt2);
xmlw.addValue("file",std::string(zName));
}
// Set into database
strcpy( gTilesets[ cnt ].TileSurfaceFilenames[ cnt2 ], zName );
}
xmlw.CloseNode(); // Files
xmlw.CloseNode(); // tileset
xmlw.closeNode(); // Files
xmlw.closeNode(); // tileset
}
xmlw.CloseNode();
xmlw.closeNode();
// fclose( hfile );
FileClose( hfile );
xmlw.CloseNode();
xmlw.closeNode();
#ifdef USE_VFS
xmlw.WriteToFile("Ja2Set.dat.xml");
xmlw.writeToFile("Ja2Set.dat.xml");
#endif
// SET CALLBACK FUNTIONS!!!!!!!!!!!!!
gTilesets[ TLS_CAVES_1 ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetTwoTerrainValues;