Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. static const int MAX_TITLE_LENGTH = 128;
  2. static const int MAX_AUTHOR_LENGTH = 128;
  3. static const int MAX_DESCRIPTION_LENGTH = 256;
  4. static const int MAX_DESCRIPTION_LENGTH_VERSION2 = 128;
  5.  
  6. static const int MIN_MAP_CELL_DIMENSION = 16;
  7. static const int MAX_MAP_CELL_DIMENSION = 1024;
  8.  
  9. static const int MIN_MAP_CELL_HEIGHT = 0;
  10. static const int MAX_MAP_CELL_HEIGHT = 20;
  11. static const int DEFAULT_MAP_CELL_HEIGHT = 10;
  12.  
  13. static const int MIN_MAP_FACTIONCOUNT = 1;
  14. static const int MAX_MAP_FACTIONCOUNT = 8;
  15. static const int DEFAULT_MAP_FACTIONCOUNT = 8;
  16.  
  17. static const int DEFAULT_MAP_CELL_WIDTH = 128;
  18. static const int DEFAULT_MAP_CELL_LENGTH = 128;
  19.  
  20. static const MapSurfaceType DEFAULT_MAP_CELL_SURFACE_TYPE = st_Grass;
  21.  
  22. static const int DEFAULT_MAP_CELL_HEIGHT_FACTOR = 3;
  23. static const int DEFAULT_MAP_WATER_DEPTH = 4;
  24. static const int DEFAULT_CLIFF_HEIGHT = 0;
  25.  
  26. static const int MAP_FORMAT_VERSION=2;
  27.  
  28. struct MapFileHeader {
  29. int32 version;
  30. int32 maxFactions;
  31. int32 width;
  32. int32 height;
  33. int32 heightFactor;
  34. int32 waterLevel;
  35. int8 title[MAX_TITLE_LENGTH];
  36. int8 author[MAX_AUTHOR_LENGTH];
  37. union {
  38. int8 description[MAX_DESCRIPTION_LENGTH];
  39. #pragma pack(push, 1)
  40. struct {
  41. int8 short_desc[MAX_DESCRIPTION_LENGTH_VERSION2];
  42. int32 magic; // 0x01020304 for meta
  43. int32 cliffLevel;
  44. int8 meta[120];
  45. } version2;
  46. #pragma pack(pop)
  47. };
  48. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement