Jump to content

Talk:WORLD.DAT: Difference between revisions

From UFOpaedia
No edit summary
m Structure
Line 1: Line 1:
// World.Dat = World Map Terrain
  // World.Dat = World Map Terrain
 
 
typedef struct worlddat
  typedef struct worlddat
{
  {
  short        QuadData[4][2]; // Coordinates of quadrilateral
      short        QuadData[4][2]; // Coordinates of quadrilateral
  unsigned long texture;        // Terrain texture of quad
      unsigned long texture;        // Terrain texture of quad
} WorldDat;
  } WorldDat;
 
 
#define MaxQuads 768      // Observed values, XCOM = 666, TFTD = 733
  #define MaxQuads 768      // Observed values, XCOM = 666, TFTD = 733


QuadData/8 = realworld latitude and longitude numbers.
QuadData/8 = realworld latitude and longitude numbers.
Line 14: Line 14:


This may not be usefull for the wiki but I once wrote a program to detect what world.dat entry a givin ship was located in and therefor what texture/terrain file used to create the battlescape map. I have the function if anyone is interested in the math.
This may not be usefull for the wiki but I once wrote a program to detect what world.dat entry a givin ship was located in and therefor what texture/terrain file used to create the battlescape map. I have the function if anyone is interested in the math.
--[[User:BladeFireLight|BladeFireLight]] 21:22, 20 January 2007 (PST)
--[[User:BladeFireLight|BladeFireLight]] 21:24, 20 January 2007 (PST)

Revision as of 05:24, 21 January 2007

  // World.Dat = World Map Terrain
  
  typedef struct worlddat
  {
     short         QuadData[4][2]; // Coordinates of quadrilateral
     unsigned long texture;        // Terrain texture of quad
  } WorldDat;
  
  #define MaxQuads 768      // Observed values, XCOM = 666, TFTD = 733

QuadData/8 = realworld latitude and longitude numbers.

if QuadData[3][1] = -1 then the shape is a triangle and that entery is not used. (for you non programers QuadData[0] is the first so [3] is the forth.)

This may not be usefull for the wiki but I once wrote a program to detect what world.dat entry a givin ship was located in and therefor what texture/terrain file used to create the battlescape map. I have the function if anyone is interested in the math. --BladeFireLight 21:24, 20 January 2007 (PST)