dungeon_obj.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. /* =============================================================================
  2. * PROGRAM: ularn
  3. * FILENAME: dungeon_obj.h
  4. *
  5. * DESCRIPTION:
  6. * This module contains functions for handling the effects of static objects
  7. * in the dungeon.
  8. * (ie. Objects that cannot be picked up such as stairs, fountains etc.)
  9. *
  10. * =============================================================================
  11. * EXPORTED VARIABLES
  12. *
  13. * None
  14. *
  15. * =============================================================================
  16. * EXPORTED FUNCTIONS
  17. *
  18. * oopendoor - processes the player opening a closed door
  19. * oaltar - processes player stepping onto an alter
  20. * othrone - processes player stepping onto a throne
  21. * odeadthrone - processes player stepping onto a dead throne
  22. * ofountain - processes player stepping onto a fountain
  23. * ostairs - processes player stepping onto the stairs (up or down)
  24. * oteleport - processes player stepping onto a teleport trap, and all other
  25. * reasons for teleporting the player
  26. * opit - processes player stepping onto a pit
  27. * oelevator - processes player stepping onto an elevator
  28. * ostatue - processes player stepping onto a statue
  29. * omirror - processes player stepping onto a mirror
  30. *
  31. * =============================================================================
  32. */
  33. #ifndef __DUNGEON_OBJ_H
  34. #define __DUNGEON_OBJ_H
  35. #define ALTAR_PRO_BOOST 3
  36. /* =============================================================================
  37. * FUNCTION: oopendoor
  38. *
  39. * DESCRIPTION:
  40. * Process the player opening the door at the specified location.
  41. *
  42. * PARAMETERS:
  43. *
  44. * x : The x coordinate of the door to open
  45. *
  46. * y : The y coordinate of the door to open
  47. *
  48. * RETURN VALUE:
  49. *
  50. * None.
  51. */
  52. void oopendoor(int x, int y);
  53. /* =============================================================================
  54. * FUNCTION: oalter
  55. *
  56. * DESCRIPTION:
  57. * Asks if player wants to pray, desecrate or ignore an alter and
  58. * performs effects based on the selection.
  59. *
  60. * PARAMETERS:
  61. *
  62. * None.
  63. *
  64. * RETURN VALUE:
  65. *
  66. * None.
  67. */
  68. void oaltar(void);
  69. /* =============================================================================
  70. * FUNCTION: othrone
  71. *
  72. * DESCRIPTION:
  73. * Asks if the player wants to pry jewels, sit on or ignore a throne and
  74. * performs effects based on the selection.
  75. * If a jewel is successfully pried from the throne then the throne is
  76. * changed to a dead throne.
  77. * If the gnome king is summoned to defend his throne from vandals or usurpers
  78. * then the throne is transformed to an OTHRONE2 to indicate that the king
  79. * of this throne has been summoned.
  80. *
  81. * PARAMETERS:
  82. *
  83. * arg : This flag indicates if a gnome king has already been summoned for
  84. * the throne.
  85. * arg == 0 => king not summoned
  86. * arg == 1 => king has already been summoned.
  87. *
  88. * RETURN VALUE:
  89. *
  90. * None.
  91. */
  92. void othrone(int arg);
  93. /* =============================================================================
  94. * FUNCTION: odeadthrone
  95. *
  96. * DESCRIPTION:
  97. * Asks if the player wants to sit on or ignore a dead throne (already had a
  98. * jewel removed) and performs effects based on the selection.
  99. *
  100. * PARAMETERS:
  101. *
  102. * None.
  103. *
  104. * RETURN VALUE:
  105. *
  106. * None.
  107. */
  108. void odeadthrone(void);
  109. /* =============================================================================
  110. * FUNCTION: ofountain
  111. *
  112. * DESCRIPTION:
  113. * Asks if the player wants to drink, wash or ignore the fountain and performs
  114. * effects based on the selection.
  115. *
  116. * PARAMETERS:
  117. *
  118. * None.
  119. *
  120. * RETURN VALUE:
  121. *
  122. * None.
  123. */
  124. void ofountain(void);
  125. /* =============================================================================
  126. * FUNCTION: ostairs
  127. *
  128. * DESCRIPTION:
  129. * This functions process the stair cases.
  130. * Asks if the player wants to stay here, or go up or down as appropriate.
  131. * If the player changes dungeon level then the level change is processed.
  132. *
  133. * PARAMETERS:
  134. *
  135. * dir : Indicates the direction the staircase leads.
  136. * dir > 0 => up
  137. * dir < 0 => down
  138. *
  139. * RETURN VALUE:
  140. *
  141. * None.
  142. */
  143. void ostairs(int dir);
  144. /* =============================================================================
  145. * FUNCTION: oteleport
  146. *
  147. * DESCRIPTION:
  148. * Handles teleporting the player for teleport traps, scrolls and innate
  149. * teleport capability.
  150. *
  151. * PARAMETERS:
  152. *
  153. * err : Indicates if the teleport may land the player in an untenable
  154. * position.
  155. * err == 0 => teleport without error (always safe)
  156. * err != 0 => teleport may level player stuck in rock.
  157. *
  158. * RETURN VALUE:
  159. *
  160. * None.
  161. */
  162. void oteleport(int err);
  163. /* =============================================================================
  164. * FUNCTION: opit
  165. *
  166. * DESCRIPTION:
  167. * Handles the processing of a player stepping onto a pit.
  168. * If the player changes dunction level the the level change is processed.
  169. *
  170. * PARAMETERS:
  171. *
  172. * None.
  173. *
  174. * RETURN VALUE:
  175. *
  176. * None.
  177. */
  178. void opit(void);
  179. /* =============================================================================
  180. * FUNCTION: oelevator
  181. *
  182. * DESCRIPTION:
  183. * Performs the processing for a player stepping onto an elevator.
  184. * If the player changes dungron level the the level change is processed.
  185. *
  186. * PARAMETERS:
  187. *
  188. * dir : The direction of the elevator.
  189. * dir == 1 => up
  190. * dir != 1 => down
  191. *
  192. * RETURN VALUE:
  193. *
  194. * None.
  195. */
  196. void oelevator(int dir);
  197. /* =============================================================================
  198. * FUNCTION: ostatue
  199. *
  200. * DESCRIPTION:
  201. * Performs the processing for when a player steps onto a statue.
  202. *
  203. * PARAMETERS:
  204. *
  205. * None.
  206. *
  207. * RETURN VALUE:
  208. *
  209. * None.
  210. */
  211. void ostatue(void);
  212. /* =============================================================================
  213. * FUNCTION: omirror
  214. *
  215. * DESCRIPTION:
  216. * Performs the processing for when a player steps onto a mirror.
  217. *
  218. * PARAMETERS:
  219. *
  220. * None.
  221. *
  222. * RETURN VALUE:
  223. *
  224. * None.
  225. */
  226. void omirror(void);
  227. #endif