
Originally Posted by
DragonLord
This is getting really sad at this point.
You guys have the source available and you're making all this enormous mess and pointless threads.
Every .dat file is essentially an .obj container.
By default, the first entry of a .dat file is the map info itself, and it consists of the following:
Code:
struct MAP_DATA
{
float fTileSize;
int nVertexNumber;
int nTileInfoNumber;
int nObjectNumber;
};
struct VERTEXINFO
{
float[3] pos;
float[3] nor;
};
struct TILEINFOCLIENT
{
int useTexNumber;
unsigned int dwWaterType;
int waterHeight;
short waterTexNumber;
unsigned char bMove;
int bEnableLand;
unsigned char bEventType;
}
struct OBJECTINFOCLIENT
{
unsigned int dwObjType;
int nObjCount;
float[3] vPos;
float[3] vVel;
float[3] vUp;
unsigned int dwObjectMonsterUniqueNumber;
unsigned char bObjectTexIndex;
unsigned int nObjectSrcIndex;
unsigned char bBodyCondition;
int bIsEvent;
unsigned char bEventType;
short sEventIndexFrom;
short sEventIndexTo;
short sEventIndex3;
char strEventParam[40];
}
MAP_DATA, followed by
VERTEXINFO * nVertexNumber, followed by
TILEINFOCLIENT * nTileInfoNumber, and finally
OBJECTINFOCLIENT * nObjectNumber.
Was it really so hard to gather all this information from the source?
The problem here is that i see a lot of guys reading the structures value by value like this:
Code:
using (BinaryReader BR = new BinaryReader(Path, Encoding.ASCII))
{
MyStruct str = new MyStruct();
str.x = BR.ReadInt etc etc.;
str.j = BR.ReadBoolean etc etc;
}
and after complaining because it dont work <_<