Permalink
Browse files

fixed some non-critical problems in dat/*

  • Loading branch information...
1 parent 0ecb08d commit db007e7cd18cb0b503d07d0c53ef21910f1f0f1d @apreiml committed Feb 17, 2012
@@ -28,7 +28,7 @@
#include "genie/Types.h"
#include "genie/file/ISerializable.h"
-#include "TerrainRestriction.h"
+// #include "TerrainRestriction.h"
#include "PlayerColour.h"
#include "Sound.h"
#include "Graphic.h"
@@ -49,6 +49,8 @@ struct zlib_params;
namespace genie
{
+
+class TerrainRestriction;
class DatFile : public ISerializable
{
View
@@ -31,6 +31,7 @@
#include <boost/iostreams/copy.hpp>
#include "genie/Types.h"
+#include "genie/dat/TerrainRestriction.h"
namespace genie
{
View
@@ -26,7 +26,7 @@
namespace genie
{
-Graphic::Graphic() : Coordinates(getCoordinatesSize()), CstrName(0), CstrName2(0)
+Graphic::Graphic() : CstrName(0), CstrName2(0)
{
Name = "";
Name2 = "";
View
@@ -24,10 +24,7 @@ namespace genie
{
//------------------------------------------------------------------------------
-Research::Research() : RequiredTechs(getRequiredTechsSize(), -1),
- ResourceCosts(getResourceCostsSize()),
- Pointers(getPointersSize())
-
+Research::Research()
{
RequiredTechCount = 0;
Civ = -1;
View
@@ -61,7 +61,8 @@ void TechTree::serializeObject(void )
serializeSub<ResearchConnection>(ResearchConnections, total_research_count_);
}
-TechTreeAge::TechTreeAge() : Zeroes(getZeroesSize())
+//------------------------------------------------------------------------------
+TechTreeAge::TechTreeAge()
{
Unknown1 = 0;
ID = 0;
@@ -70,10 +71,12 @@ TechTreeAge::TechTreeAge() : Zeroes(getZeroesSize())
Unknown4 = 0;
}
+//------------------------------------------------------------------------------
TechTreeAge::~TechTreeAge()
{
}
+//------------------------------------------------------------------------------
unsigned short TechTreeAge::getZeroesSize()
{
if (getGameVersion() >= genie::GV_AoK)
@@ -88,6 +91,7 @@ unsigned short TechTreeAge::getZeroesSize()
}
+//------------------------------------------------------------------------------
void TechTreeAge::serializeObject(void )
{
serialize<long>(Unknown1);
@@ -109,7 +113,8 @@ void TechTreeAge::serializeObject(void )
serialize<short>(Zeroes, getZeroesSize());
}
-BuildingConnection::BuildingConnection() : Unknown2a(getUnknown2aSize()), Unknown2b(getUnknown2bSize()), Unknown3(getUnknown3Size())
+//------------------------------------------------------------------------------
+BuildingConnection::BuildingConnection()
{
ID = 0;
Unknown1 = 2;
@@ -123,10 +128,12 @@ BuildingConnection::BuildingConnection() : Unknown2a(getUnknown2aSize()), Unknow
EnablingResearch = -1;
}
+//------------------------------------------------------------------------------
BuildingConnection::~BuildingConnection()
{
}
+//------------------------------------------------------------------------------
unsigned int BuildingConnection::getUnknown2aSize()
{
if (getGameVersion() >= genie::GV_SWGB)
@@ -135,6 +142,7 @@ unsigned int BuildingConnection::getUnknown2aSize()
return 8;
}
+//------------------------------------------------------------------------------
unsigned int BuildingConnection::getUnknown2bSize()
{
if (getGameVersion() >= genie::GV_SWGB)
@@ -143,6 +151,7 @@ unsigned int BuildingConnection::getUnknown2bSize()
return 7;
}
+//------------------------------------------------------------------------------
void BuildingConnection::serializeObject(void)
{
serialize<long>(ID);
@@ -175,7 +184,8 @@ void BuildingConnection::serializeObject(void)
serialize<long>(EnablingResearch);
}
-UnitConnection::UnitConnection() : Unknown2a(getUnknown2aSize()), Unknown2b(getUnknown2bSize())
+//------------------------------------------------------------------------------
+UnitConnection::UnitConnection()
{
ID = 0;
Unknown1 = 2;
@@ -193,10 +203,12 @@ UnitConnection::UnitConnection() : Unknown2a(getUnknown2aSize()), Unknown2b(getU
EnablingResearch = -1;
}
+//------------------------------------------------------------------------------
UnitConnection::~UnitConnection()
{
}
+//------------------------------------------------------------------------------
unsigned int UnitConnection::getUnknown2aSize()
{
if (getGameVersion() >= genie::GV_SWGB)
@@ -205,6 +217,7 @@ unsigned int UnitConnection::getUnknown2aSize()
return 8;
}
+//------------------------------------------------------------------------------
unsigned int UnitConnection::getUnknown2bSize()
{
if (getGameVersion() >= genie::GV_SWGB)
@@ -213,6 +226,7 @@ unsigned int UnitConnection::getUnknown2bSize()
return 7;
}
+//------------------------------------------------------------------------------
void UnitConnection::serializeObject(void)
{
serialize<long>(ID);
@@ -242,7 +256,8 @@ void UnitConnection::serializeObject(void)
serialize<long>(EnablingResearch);
}
-ResearchConnection::ResearchConnection() : Unknown2a(getUnknown2aSize()), Unknown2b(getUnknown2bSize())
+//------------------------------------------------------------------------------
+ResearchConnection::ResearchConnection()
{
ID = 0;
Unknown1 = 2;
@@ -256,10 +271,12 @@ ResearchConnection::ResearchConnection() : Unknown2a(getUnknown2aSize()), Unknow
Unknown9 = 0;
}
+//------------------------------------------------------------------------------
ResearchConnection::~ResearchConnection()
{
}
+//------------------------------------------------------------------------------
unsigned int ResearchConnection::getUnknown2aSize()
{
if (getGameVersion() >= genie::GV_SWGB)
@@ -268,6 +285,7 @@ unsigned int ResearchConnection::getUnknown2aSize()
return 9;
}
+//------------------------------------------------------------------------------
unsigned int ResearchConnection::getUnknown2bSize()
{
if (getGameVersion() >= genie::GV_SWGB)
@@ -276,6 +294,7 @@ unsigned int ResearchConnection::getUnknown2bSize()
return 8;
}
+//------------------------------------------------------------------------------
void ResearchConnection::serializeObject(void)
{
serialize<long>(ID);
@@ -23,6 +23,7 @@
namespace genie
{
+//------------------------------------------------------------------------------
TechageEffect::TechageEffect()
{
Type = -1;
@@ -32,11 +33,13 @@ TechageEffect::TechageEffect()
D = 0;
}
+//------------------------------------------------------------------------------
TechageEffect::~TechageEffect()
{
}
+//------------------------------------------------------------------------------
void TechageEffect::serializeObject(void )
{
serialize<char>(Type);
View
@@ -23,12 +23,9 @@
namespace genie
{
-Terrain::Terrain() : Colours(getColorSize()),
- Unknown7(UNKNOWN7_LEN), Unknown8(UNKNOWN8_LEN),
+//------------------------------------------------------------------------------
+Terrain::Terrain() : Unknown7(UNKNOWN7_LEN), Unknown8(UNKNOWN8_LEN),
Unknown9(UNKNOWN9_LEN),
- Unknown10(getUnknown10Size()),
- TerrainUnitID(getTerrainUnitSize()),
- TerrainUnitDensity(getTerrainUnitSize()),
Unknown11(UNKNOWN11_LEN),
SWGBUnknown1(SWGBUNKNOWN1_LEN)
{
@@ -49,10 +46,12 @@ Terrain::Terrain() : Colours(getColorSize()),
TerrainDimensions.first = TerrainDimensions.second = -1;
}
+//------------------------------------------------------------------------------
Terrain::~Terrain()
{
}
+//------------------------------------------------------------------------------
short Terrain::getNameSize()
{
if (getGameVersion() >= genie::GV_SWGB)
@@ -61,16 +60,19 @@ short Terrain::getNameSize()
return 13;
}
+//------------------------------------------------------------------------------
short Terrain::getColorSize()
{
return 3;
}
+//------------------------------------------------------------------------------
short Terrain::getTerrainUnitSize()
{
return 30;
}
+//------------------------------------------------------------------------------
short Terrain::getUnknown10Size(void)
{
if (getGameVersion() >= genie::GV_TC)
@@ -79,6 +81,7 @@ short Terrain::getUnknown10Size(void)
return 64;
}
+//------------------------------------------------------------------------------
void Terrain::serializeObject(void )
{
serialize<short>(Unknown1);
@@ -23,24 +23,29 @@
namespace genie
{
+//------------------------------------------------------------------------------
TerrainBorder::TerrainBorder() : Colors(3)
{
}
+//------------------------------------------------------------------------------
TerrainBorder::~TerrainBorder()
{
}
+//------------------------------------------------------------------------------
unsigned int TerrainBorder::getNameSize()
{
return 13;
}
+//------------------------------------------------------------------------------
unsigned int TerrainBorder::getUnknown3Size()
{
return 1410;
}
+//------------------------------------------------------------------------------
void TerrainBorder::serializeObject(void )
{
//serialize<short>(Unknown1);
@@ -71,16 +76,19 @@ void TerrainBorder::serializeObject(void )
}
+//------------------------------------------------------------------------------
TBFrameData::TBFrameData()
{
}
+//------------------------------------------------------------------------------
TBFrameData::~TBFrameData()
{
}
+//------------------------------------------------------------------------------
void TBFrameData::serializeObject(void )
{
serialize<short>(FrameID);
@@ -26,6 +26,7 @@
namespace genie
{
+//------------------------------------------------------------------------------
TerrainPassGraphic::TerrainPassGraphic()
{
Buildable = 0;
@@ -34,10 +35,12 @@ TerrainPassGraphic::TerrainPassGraphic()
ReplicationAmount = 0;
}
+//------------------------------------------------------------------------------
TerrainPassGraphic::~TerrainPassGraphic()
{
}
+//------------------------------------------------------------------------------
void TerrainPassGraphic::serializeObject()
{
serialize<long>(Buildable);
@@ -27,22 +27,24 @@ namespace genie
short TerrainRestriction::Terrain_Count_ = 0;
-TerrainRestriction::TerrainRestriction() : TerrainAccessible(Terrain_Count_),
- TerrainPassGraphics(Terrain_Count_)
+//------------------------------------------------------------------------------
+TerrainRestriction::TerrainRestriction()
{
}
+//------------------------------------------------------------------------------
TerrainRestriction::~TerrainRestriction()
{
}
+//------------------------------------------------------------------------------
void TerrainRestriction::setTerrainCount(short int Terrain_Count)
{
Terrain_Count_ = Terrain_Count;
}
-
+//------------------------------------------------------------------------------
void TerrainRestriction::serializeObject(void)
{
serialize<float>(TerrainAccessible, Terrain_Count_);
Oops, something went wrong.

0 comments on commit db007e7

Please sign in to comment.