WALLTILE.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /*
  2. * Seven Kingdoms: Ancient Adversaries
  3. *
  4. * Copyright 1997,1998 Enlight Software Ltd.
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. */
  20. // Filename : WALLTILE.H
  21. // Description: constant for wall tiles
  22. // Ownership : Gilbert
  23. #ifndef __WALLTILE_H
  24. #define __WALLTILE_H
  25. // North gate, west tower
  26. #define NGATE_WTOWER_NW 0x01
  27. #define NGATE_WTOWER_NE 0x02
  28. #define NGATE_WTOWER_SW 0x03
  29. #define NGATE_WTOWER_SE 0x04
  30. // North gate, east tower
  31. #define NGATE_ETOWER_NW 0x05
  32. #define NGATE_ETOWER_NE 0x06
  33. #define NGATE_ETOWER_SW 0x07
  34. #define NGATE_ETOWER_SE 0x08
  35. // South gate, east tower
  36. #define SGATE_WTOWER_NW 0x09
  37. #define SGATE_WTOWER_NE 0x0a
  38. #define SGATE_WTOWER_SW 0x0b
  39. #define SGATE_WTOWER_SE 0x0c
  40. // South gate, west tower
  41. #define SGATE_ETOWER_NW 0x0d
  42. #define SGATE_ETOWER_NE 0x0e
  43. #define SGATE_ETOWER_SW 0x0f
  44. #define SGATE_ETOWER_SE 0x10
  45. // West gate, north tower
  46. #define WGATE_NTOWER_NW 0x11
  47. #define WGATE_NTOWER_NE 0x12
  48. #define WGATE_NTOWER_SW 0x13
  49. #define WGATE_NTOWER_SE 0x14
  50. // West gate, south tower
  51. #define WGATE_STOWER_NW 0x15
  52. #define WGATE_STOWER_NE 0x16
  53. #define WGATE_STOWER_SW 0x17
  54. #define WGATE_STOWER_SE 0x18
  55. // East gate, north tower
  56. #define EGATE_NTOWER_NW 0x19
  57. #define EGATE_NTOWER_NE 0x1a
  58. #define EGATE_NTOWER_SW 0x1b
  59. #define EGATE_NTOWER_SE 0x1c
  60. // East gate, south tower
  61. #define EGATE_STOWER_NW 0x1d
  62. #define EGATE_STOWER_NE 0x1e
  63. #define EGATE_STOWER_SW 0x1f
  64. #define EGATE_STOWER_SE 0x20
  65. // Guard tower
  66. #define NWTOWER 0x21
  67. #define NETOWER 0x22
  68. #define SWTOWER 0x23
  69. #define SETOWER 0x24
  70. #define NTOWER 0x21
  71. #define STOWER 0x23
  72. #define WTOWER 0x23
  73. #define ETOWER 0x24
  74. #define SINGLE_TOWER 0x23
  75. // Wall tiles
  76. #define NSWALL 0x25
  77. #define NSWALL_SHADOW 0x26
  78. #define EWWALL 0x27
  79. #define EWWALL_SHADOW 0x28
  80. // constructing wall tiles
  81. #define NSWALL_CON1 0x51
  82. #define NSWALL_CON2 0x52
  83. #define NSWALL_CON3 0x53
  84. #define EWWALL_CON1 0x54
  85. #define EWWALL_CON2 0x55
  86. #define EWWALL_CON3 0x56
  87. #define TOWER_CON1 0x57
  88. #define TOWER_CON2 0x58
  89. #define TOWER_CON3 0x59
  90. // destructing wall tiles
  91. #define NSWALL_DES1 0x5a
  92. #define NSWALL_DES2 0x5b
  93. #define NSWALL_DES3 0x5c
  94. #define EWWALL_DES1 0x5d
  95. #define EWWALL_DES2 0x5e
  96. #define EWWALL_DES3 0x5f
  97. #define TOWER_DES1 0x60
  98. #define TOWER_DES2 0x61
  99. #define TOWER_DES3 0x62
  100. inline int is_wall_rubble(int w)
  101. {
  102. return (w >= 0x51 && w <= 0x62);
  103. }
  104. // Gate tiles
  105. /*inline int is_gate(char wallId)
  106. {
  107. return wallId > 0x30;
  108. }
  109. */
  110. // north gate 31-38
  111. #define NGATE_BASE 0x31
  112. #define NGATE_W 0x35
  113. #define NGATE_E 0x38
  114. // south gate 39-40
  115. #define SGATE_BASE 0x39
  116. #define SGATE_W 0x39
  117. #define SGATE_E 0x3c
  118. // west gate 41-48
  119. #define WGATE_BASE 0x41
  120. #define WGATE_N 0x42
  121. #define WGATE_S 0x48
  122. // east gate 49-50
  123. #define EGATE_BASE 0x49
  124. #define EGATE_N 0x49
  125. #define EGATE_S 0x4f
  126. #define GATE_LENGTH 8
  127. #define GATE_WIDTH 2
  128. #endif