home *** CD-ROM | disk | FTP | other *** search
/ WarCraft 2000 - Nuclear Epidemic / W2000.nrg / SOURCE.War2000 / walls.h < prev    next >
C/C++ Source or Header  |  1998-07-23  |  1KB  |  68 lines

  1. #pragma pack(1)
  2. struct WallDiscr{
  3.     union
  4.     {
  5.         struct{
  6.             int Good[16];
  7.             int Bad[16];
  8.             int Broken[16];
  9.         };
  10.             int All[48];
  11.     };
  12. };
  13. struct WallCell{
  14.     byte x;
  15.     byte y;
  16.     word Stage;
  17.     word Tile;
  18.     word Health;
  19.     word MaxHealth;
  20.     word WorkerID;
  21.     byte WorkTime;
  22.     byte WorkNeed;
  23.     byte DamNeed;
  24.     word BuildProgress;
  25. };
  26. class WallCluster{
  27. public:
  28.     int ClusterSize;
  29.     WallCell* Cells;
  30.     byte OwnerID;
  31.     byte Type;
  32.     int Index;
  33.     WallCluster();
  34. void AddWall(byte x,byte y);
  35. void PreArrangeTiles();
  36. void ArrangeTiles();
  37. int CheckPoint(byte x,byte y);
  38. void ShowCluster();
  39. void Stand();
  40. void Init();
  41. int    GetDataSize();
  42. void CreateData(byte NI,byte* lpData);
  43. int FindWorkPoint(byte x,byte y,word ID);
  44. int FindDamagePoint(byte x,byte y,word ID);
  45. };
  46. class GWSys{
  47. public:
  48.     WallCluster* GWC;
  49.     int MaxWall;
  50.     GWSys();
  51.     word AddCluster(byte* Data);
  52.     void ProcessClusters();
  53.     void BuildCell(byte x,byte y,byte Owner,byte Incr,word WorkerID);
  54.     void DamageCell(byte x,byte y,byte Owner,word Incr);
  55. };
  56. extern int NDWalls;
  57. extern int NDWBUF[8];
  58. extern word Links[256][256];
  59. extern word LIndex[256][256];
  60. extern WallDiscr Walls[2];
  61. //GLOBAL WALLS SYSTEM
  62. extern GWSys GWALLS;
  63. extern WallCluster TMPCluster;
  64. extern bool BuildWall;
  65. extern bool WStarted;
  66. void SetBuildWallMode();
  67. void WallHandleMouse(int x,int y);
  68. void LoadWalls();