const.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /* $Id$
  2. * MegaZeux
  3. *
  4. * Copyright (C) 1996 Greg Janson
  5. * Copyright (C) 1998 Matthew D. Williams - dbwilli@scsn.net
  6. * Copyright (C) 1999 Charles Goetzman
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. */
  22. /* Constants */
  23. #ifndef __CONST_H
  24. #define __CONST_H
  25. #define OVERLAY_OFF 0
  26. #define OVERLAY_ON 1
  27. #define OVERLAY_STATIC 2
  28. #define OVERLAY_TRANS 3
  29. #define EXPL_LEAVE_SPACE 0
  30. #define EXPL_LEAVE_ASH 1
  31. #define EXPL_LEAVE_FIRE 2
  32. #define CAN_SAVE 0
  33. #define CANT_SAVE 1
  34. #define CAN_SAVE_ON_SENSOR 2
  35. #define FOREST_TO_EMPTY 0
  36. #define FOREST_TO_FLOOR 1
  37. #define FIRE_BURNS_LIMITED 0
  38. #define FIRE_BURNS_FOREVER 1
  39. #define NO_BOARD 255
  40. #define NO_ENDGAME_BOARD 255
  41. #define NO_DEATH_BOARD 255
  42. #define DEATH_SAME_POS 254
  43. #define PLAYER_BULLET 0
  44. #define NEUTRAL_BULLET 1
  45. #define ENEMY_BULLET 2
  46. #define DIR_IDLE 0
  47. #define DIR_NONE 0
  48. #define DIR_N 1
  49. #define DIR_S 2
  50. #define DIR_E 3
  51. #define DIR_W 4
  52. #define DIR_RANDNS 5
  53. #define DIR_RANDEW 6
  54. #define DIR_RANDNE 7
  55. #define DIR_RANDNB 8
  56. #define DIR_SEEK 9
  57. #define DIR_RANDANY 10
  58. #define DIR_UNDER 11
  59. #define DIR_ANYDIR 12
  60. #define DIR_FLOW 13
  61. #define DIR_NODIR 14
  62. #define DIR_RANDB 15
  63. //These are added to the above or checked using AND.
  64. #define DIR_RANDP 16
  65. #define DIR_CW 32
  66. #define DIR_OPP 64
  67. #define DIR_CCW 96
  68. #define DIR_RANDNOT 128
  69. #define HORIZONTAL 0
  70. #define VERTICAL 1
  71. #define NO_KEY 127
  72. #define NO_PROTECTION 0
  73. #define NO_SAVING 1
  74. #define NO_EDITING 2
  75. #define NO_PLAYING 3
  76. //"SIZE" includes terminating \0
  77. #define PATHNAME_SIZE 129
  78. #define FILENAME_SIZE 13
  79. #define NUM_BOARDS 150 //Haven't increased this yet, over 255 causes mzx to crash on load
  80. //Each board requires considerable amount of conventional mem Spid
  81. #define BOARD_NAME_SIZE 25
  82. #define COUNTER_NAME_SIZE 15 //Possibly decrease counter name size to gain conventional mem? Spid
  83. #define NUM_KEYS 16
  84. //Where something is in memory (CURRENT means it is in special variables for
  85. //the current "whatever", MEMORY means stored in conventional memory,
  86. //GROUPTEMPFILE means stored in a tempfile along with others of the same
  87. //type, NOWHERE means it doesn't exist or is in it's original file)
  88. //IMPORT means it is waiting for import.
  89. #define W_NOWHERE 0
  90. #define W_CURRENT 1
  91. #define W_MEMORY 2
  92. #define W_TEMPFILE 3
  93. #define W_GROUPTEMPFILE 4
  94. #define W_EMS 5
  95. #define W_IMPORT 6
  96. #define ARRAY_DIR_N -100
  97. #define ARRAY_DIR_S 100
  98. #define ARRAY_DIR_E 1
  99. #define ARRAY_DIR_W -1
  100. //Attribute flags
  101. #define A_PUSHNS 1
  102. #define A_PUSHEW 2
  103. #define A_PUSHABLE 3
  104. #define A_ITEM 4
  105. #define A_UPDATE 8
  106. #define A_HURTS 16
  107. #define A_UNDER 32
  108. #define A_ENTRANCE 64
  109. #define A_EXPLODE 128
  110. #define A_BLOW_UP 256
  111. #define A_SHOOTABLE 512
  112. #define A_ENEMY 1024
  113. #define A_AFFECT_IF_STOOD 2048
  114. #define A_SPEC_SHOT 4096
  115. #define A_SPEC_PUSH 8192
  116. #define A_SPEC_BOMB 16384
  117. #define A_SPEC_STOOD 32768
  118. //VIDEO_SEG is the segment of the first video page. VIDEO_ADD is what to
  119. //add per page.
  120. #define VIDEO_SEG 0x0b800
  121. #define VIDEO_ADD 0x0100
  122. //VIDEO_NUM2SEG gives video segment of 0 or 1. Add a ! before your number
  123. //for the segment of the opposite number.
  124. #define VIDEO_NUM2SEG(x) ((x)?VIDEO_SEG+VIDEO_ADD:VIDEO_SEG)
  125. //Actual number is one less due to reservation of ID #TEMP_STORAGE.
  126. #define NUM_ROBOTS 200
  127. #define NUM_SCROLLS 50
  128. #define NUM_SENSORS 20
  129. #define NUM_COUNTERS 1020 // This is a decent # for now. Spid
  130. #define NUM_STATUS_CNTRS 6
  131. //The first n counters are reserved for internal use (GEMS, etc)
  132. #define RESERVED_COUNTERS 9
  133. //ID number for storage of the only copy of the current robot/scroll/sensor
  134. #define TEMP_STORAGE 0
  135. //ID number for storage of the global robot
  136. #define GLOBAL_ROBOT NUM_ROBOTS
  137. //Number of musical devices
  138. #define NUM_DEVICES 7
  139. //Device code for no music
  140. #define NO_MUSIC 0
  141. //Max/min sizes
  142. #define MAX_ARRAY_X max_bxsiz
  143. #define MAX_ARRAY_Y max_bysiz
  144. #define MAX_VIEWPORT_X 80
  145. #define MAX_VIEWPORT_Y 25
  146. #define MIN_ARRAY_X 1
  147. #define MIN_ARRAY_Y 1
  148. #define MIN_VIEWPORT_X 1
  149. #define MIN_VIEWPORT_Y 1
  150. #endif