data.asm 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. ; $Id$
  2. ; MegaZeux
  3. ;
  4. ; Copyright (C) 1996 Greg Janson
  5. ; Copyright (C) 1998 Matthew D. Williams - dbwilli@scsn.net
  6. ;
  7. ; This program is free software; you can redistribute it and/or
  8. ; modify it under the terms of the GNU General Public License as
  9. ; published by the Free Software Foundation; either version 2 of
  10. ; the License, or (at your option) any later version.
  11. ;
  12. ; This program is distributed in the hope that it will be useful,
  13. ; but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. ; General Public License for more details.
  16. ;
  17. ; You should have received a copy of the GNU General Public License
  18. ; along with this program; if not, write to the Free Software
  19. ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. ;
  21. ; This file contains most global data, initialized and uninitialized, far.
  22. ;
  23. Ideal
  24. include "data.inc"
  25. include "const.inc"
  26. p186
  27. JUMPS
  28. include "model.inc"
  29. Dataseg
  30. ALIGN BYTE
  31. board_where db NUM_BOARDS dup ( W_NOWHERE ) ;Array of where boards are
  32. curr_board db 0 ;Current board
  33. curr_file db "CAVERNS.MZX",0,FILENAME_SIZE-12 dup ( ? )
  34. ;Current MZX file
  35. ;(or startup file)
  36. curr_sav db "SAVED.SAV",0,FILENAME_SIZE-10 dup ( ? )
  37. ;Current SAV file
  38. help_file db 0,PATHNAME_SIZE dup ( ? ) ;Drive + Path + Filename
  39. config_file db 0,PATHNAME_SIZE dup ( ? ) ;Drive + Path + Filename
  40. MSE_file db 0,PATHNAME_SIZE dup ( ? ) ;Drive + Path + Filename
  41. mzx_blank_mod_file db 0,PATHNAME_SIZE dup ( ? ) ;Drive + Path + Filename
  42. mzx_convert_mod_file db 0,PATHNAME_SIZE dup ( ? ) ;Drive + Path + Filename
  43. megazeux_dir db 0,PATHNAME_SIZE dup ( ? ) ;Directory started in
  44. current_dir db 0,PATHNAME_SIZE dup ( ? ) ;Current directory
  45. megazeux_drive db 2 ;Startup drive (0=A...)
  46. current_drive db 2 ;Current drive (0=A...)
  47. quicksave_file db 0,FILENAME_SIZE dup ( ? ) ;Current quicksave filename
  48. board_xsiz dw 80 ;Size of board in memory
  49. board_ysiz dw 25
  50. overlay_mode db OVERLAY_OFF ;Mode for overlay
  51. max_bsiz_mode db 2
  52. max_bxsiz dw 100
  53. max_bysiz dw 100
  54. ; Mouse state stuff
  55. saved_mouse_x dw 0
  56. saved_mouse_y dw 0
  57. saved_mouse_buttons dw 0
  58. ; Board "save chunk"
  59. mod_playing db 0,FILENAME_SIZE-1 dup ( ? ) ;Mod currently playing
  60. real_mod_playing db 0,FILENAME_SIZE-1 dup ( ? ) ;Real mod currently playing
  61. refresh_mod_playing db 1 ;Load mod no matter what
  62. viewport_x db 3 ;X pos of UL corner of view
  63. viewport_y db 2
  64. viewport_xsiz db 74 ;Size of view
  65. viewport_ysiz db 21
  66. can_shoot db 1 ;Allowed to shoot on board
  67. can_bomb db 1 ;Allowed to bomb on board
  68. fire_burn_brown db 0
  69. fire_burn_space db 1
  70. fire_burn_fakes db 1
  71. fire_burn_trees db 1
  72. explosions_leave db EXPL_LEAVE_ASH
  73. save_mode db CAN_SAVE
  74. forest_becomes db FOREST_TO_EMPTY
  75. collect_bombs db 1 ;If zero, bombs auto set
  76. fire_burns db FIRE_BURNS_FOREVER
  77. board_dir db 4 dup ( NO_BOARD ) ;Boards to dirs
  78. restart_if_zapped db 0
  79. time_limit dw 0 ;Stays the same, for
  80. ;resetting time when it
  81. ;runs out.
  82. last_key db '?' ;Last key pressed
  83. num_input dw 0 ;Numeric form of input
  84. input_size db 0 ;Size of input
  85. input_string db 0,80 dup ( ? ) ;Last inputted string
  86. player_last_dir db 16 ;Last direction of player
  87. bottom_mesg db 0,80 dup ( ? ) ;Message at bottom of screen
  88. b_mesg_timer db 0 ;Timer for bottom message
  89. lazwall_start db 7 ;Current LazWalls to fire
  90. b_mesg_row db 24 ;Row to display message on
  91. b_mesg_col db 255 ;Column (255=centered)
  92. scroll_x dw 0 ;+/- to x from scrollview
  93. scroll_y dw 0 ;+/- to y
  94. locked_x dw -1 ;Position in array of ul
  95. locked_y dw -1 ;corner of viewport when
  96. ;scroll locked (-1=none)
  97. player_ns_locked db 0
  98. player_ew_locked db 0
  99. player_attack_locked db 0
  100. volume db 127
  101. volume_inc db 0 ;For fading (negative okay)
  102. volume_target db 127 ;Target volume for fading
  103. ; World "save chunk"
  104. edge_color db 8 ;Color OUTSIDE viewport
  105. first_board db 0 ;First board to play
  106. endgame_board db NO_ENDGAME_BOARD ;No board=Game Over
  107. death_board db NO_DEATH_BOARD ;No board=Restart same
  108. endgame_x dw 0
  109. endgame_y dw 0
  110. game_over_sfx db 1
  111. death_x dw 0
  112. death_y dw 0
  113. starting_lives dw 5
  114. lives_limit dw 99 ;Limit's Limit- 65535
  115. starting_health dw 100
  116. health_limit dw 200 ;Limit's Limit- 65535
  117. enemy_hurt_enemy db 0
  118. clear_on_exit db 0 ;1=Clear message/projeciles between screens
  119. only_from_swap db 0 ;Set if only playable from
  120. ;a SWAP robot command
  121. ; Save game "save chunk"
  122. keys db NUM_KEYS dup ( NO_KEY) ;Array of keys
  123. score dd 0
  124. blind_dur db 0 ;Cycles left
  125. firewalker_dur db 0
  126. freeze_time_dur db 0
  127. slow_time_dur db 0
  128. wind_dur db 0
  129. pl_saved_x dw 0,0,0,0,0,0,0,0 ;Array of 8
  130. pl_saved_y dw 0,0,0,0,0,0,0,0 ;Array of 8
  131. pl_saved_board db 0,0,0,0,0,0,0,0 ;Array of 8
  132. saved_pl_color db 27 ;Saves color for energizer
  133. under_player_id db 0
  134. under_player_color db 7
  135. under_player_param db 0
  136. mesg_edges db 1
  137. ;
  138. current_page db 0 ;0 or 1
  139. current_pg_seg dw VIDEO_SEG ;Segment of 0 or 1
  140. status_shown_counters db NUM_STATUS_CNTRS dup ( 0,COUNTER_NAME_SIZE-1 dup ( ? ) )
  141. ;Counters shown on status screen
  142. music_on db 1 ;If music is on
  143. sfx_on db 1 ;If pc sfx is on
  144. music_device db 0 ;Music device
  145. mixing_rate dw 30 ;Mixing rate
  146. sfx_channels db 2 ;# of sfx channels
  147. music_gvol db 8 ;Global Music volume (x/8)
  148. sound_gvol db 8 ;Global Sound volume (x/8)
  149. overall_speed db 4 ;1 through 7
  150. player_x dw 0 ;Not updated during "update"
  151. player_y dw 0 ; " " " "
  152. scroll_color db 15 ;Current scroll color
  153. protection_method db NO_PROTECTION
  154. password db 0,15 dup ( ? )
  155. cheats_active db 0 ;(additive flag)
  156. current_help_sec db 0 ;Use for context-sens.help
  157. label flags word ; Aray of thing's flags (Note- A_ITEM is
  158. ; simply a A_SPEC_TOUCH) A_SPEC_PUSH
  159. ; implies A_PUSHABLE in most cases.
  160. dw A_UNDER ; Space
  161. dw 0,0,0,0,0 ; Normal, Solid, Tree, Line, CustomBlock
  162. dw 2 dup (A_SHOOTABLE+A_BLOW_UP) ; Breakaway, CustomBreak
  163. dw 3 dup (A_PUSHABLE+A_BLOW_UP) ; Boulder, Crate, CustomPush
  164. dw 2 dup (A_PUSHABLE) ; Box, CustomSolidPush
  165. dw 5 dup (A_UNDER) ; Fake, Carpet, Floor, Tiles, CustomFloor
  166. dw 2 dup (A_UNDER+A_BLOW_UP) ; Web, ThickWeb
  167. dw A_UNDER ; StillWater (20)
  168. dw 4 dup (A_UNDER+A_AFFECT_IF_STOOD) ; NWater, SWater, EWater, WWater
  169. dw 2 dup (A_UNDER+A_AFFECT_IF_STOOD+A_UPDATE) ; Ice, Lava
  170. dw A_ITEM+A_BLOW_UP ; Chest
  171. dw 2 dup (A_ITEM+A_PUSHABLE+A_BLOW_UP+A_SHOOTABLE) ; Gem, MagicGem
  172. dw A_ITEM+A_PUSHABLE ; Health
  173. dw 2 dup (A_ITEM+A_PUSHABLE) ; Ring, Potion
  174. dw A_ITEM+A_PUSHABLE+A_UPDATE ; Energizer
  175. dw A_UNDER+A_ITEM ; Goop
  176. dw A_ITEM+A_PUSHABLE ; Ammo
  177. dw A_ITEM+A_PUSHABLE+A_EXPLODE ; Bomb
  178. dw A_PUSHABLE+A_EXPLODE+A_UPDATE ; LitBomb
  179. dw A_HURTS+A_UPDATE ; Explosion
  180. dw A_ITEM+A_PUSHABLE ; Key
  181. dw A_ITEM ; Lock (40)
  182. dw A_ITEM ; Door
  183. dw A_UPDATE ; Opening/closing door
  184. dw 2 dup (A_ENTRANCE+A_UNDER) ; Stairs, Cave
  185. dw 2 dup (A_UPDATE) ; Cw, Ccw
  186. dw A_ITEM ; Gate
  187. dw A_UPDATE+A_UNDER ; OpenGate
  188. dw A_SPEC_PUSH+A_ITEM+A_UPDATE ; Transport
  189. dw A_ITEM+A_PUSHABLE ; Coin
  190. dw 4 dup (A_UPDATE) ; MovingWall -NSEW-
  191. dw A_ITEM+A_PUSHABLE+A_BLOW_UP ; Pouch
  192. dw A_UPDATE ; Pusher
  193. dw A_PUSHNS ; SliderNS
  194. dw A_PUSHEW ; SliderEW
  195. dw A_UPDATE+A_HURTS ; Lazer
  196. dw A_UPDATE ; LazerWallShooter (60)
  197. dw A_UPDATE+A_BLOW_UP+A_SHOOTABLE+A_ITEM+A_ENEMY ; Bullet
  198. dw A_UPDATE+A_HURTS+A_EXPLODE ; Missile
  199. dw A_UPDATE+A_UNDER+A_AFFECT_IF_STOOD ; Fire
  200. dw 0 ; 64='?'
  201. dw A_ITEM ; Forest
  202. dw A_PUSHABLE+A_ITEM+A_UPDATE ; Life
  203. dw 4 dup (A_UPDATE+A_UNDER+A_ENTRANCE) ; Whirlpool -1234-
  204. dw A_ITEM ; Invisible
  205. dw A_SPEC_SHOT ; RicochetPanel
  206. dw A_SPEC_SHOT ; Ricochet
  207. dw A_ITEM+A_SPEC_SHOT+A_SPEC_BOMB+A_UPDATE ; Mine
  208. dw 2 dup (A_HURTS) ; Spike, CustomHurt
  209. dw 0 ; Text
  210. dw A_UPDATE+A_ENEMY+A_BLOW_UP ; ShootingFire
  211. dw A_UPDATE+A_ENEMY+A_BLOW_UP+A_PUSHABLE ; Seeker
  212. dw A_UPDATE+A_PUSHABLE+A_ENEMY+A_SHOOTABLE+A_BLOW_UP ; Snake (80)
  213. dw A_UPDATE+A_EXPLODE+A_ITEM+A_SPEC_SHOT+A_PUSHABLE ; Eye
  214. dw A_UPDATE+A_BLOW_UP+A_PUSHABLE+A_ITEM+A_SHOOTABLE ; Thief
  215. dw A_UPDATE+A_ITEM+A_SPEC_BOMB+A_SPEC_SHOT ; SlimeBlob
  216. dw A_UPDATE+A_ENEMY+A_BLOW_UP+A_PUSHABLE+A_SPEC_SHOT ; Runner
  217. dw A_UPDATE+A_ITEM+A_PUSHABLE+A_SPEC_BOMB+A_SPEC_SHOT ; Ghost
  218. dw A_UPDATE+A_SPEC_SHOT+A_SPEC_BOMB+A_ITEM ; Dragon
  219. dw A_UPDATE+A_ITEM+A_BLOW_UP+A_SPEC_SHOT+A_PUSHABLE ; Fish
  220. dw A_UPDATE+A_BLOW_UP+A_SHOOTABLE+A_ENEMY ; Shark
  221. dw A_UPDATE+A_ENEMY+A_BLOW_UP+A_SPEC_SHOT+A_PUSHABLE ; Spider
  222. dw A_UPDATE+A_ENEMY+A_SHOOTABLE+A_PUSHABLE+A_BLOW_UP ; Goblin (90)
  223. dw A_UPDATE+A_PUSHABLE+A_SHOOTABLE+A_ENEMY+A_BLOW_UP ; Tiger
  224. dw 2 dup (A_UPDATE) ; BulletGun, SpinningGun
  225. dw A_UPDATE+A_ENEMY+A_SPEC_SHOT+A_PUSHABLE+A_BLOW_UP ; Bear
  226. dw A_UPDATE+A_BLOW_UP+A_ENEMY+A_SHOOTABLE+A_PUSHABLE ; BearCub
  227. dw 0 ; 96='?'
  228. dw A_UPDATE ; MissileGun
  229. dw 24 dup (0) ; 98-121='?'
  230. dw A_SPEC_STOOD+A_SPEC_PUSH ; Sensor
  231. dw A_ITEM+A_UPDATE+A_SPEC_SHOT+A_SPEC_BOMB+A_SPEC_PUSH ; Robot (pushable)
  232. dw A_ITEM+A_UPDATE+A_SPEC_SHOT+A_SPEC_BOMB ; Robot
  233. dw A_ITEM ; Sign
  234. dw A_ITEM+A_PUSHABLE ; Scroll
  235. dw A_SPEC_SHOT+A_SPEC_PUSH+A_SPEC_BOMB ; Player (127) (SPEC_PUSH in case
  236. ; there is a sensor beneath)
  237. board_list dd 0 ; Far pointer to array of board names
  238. board_offsets dd 0 ; Far pointer to array of mem/file offsets
  239. board_sizes dd 0 ; Far pointer to array of sizes
  240. board_filenames dd 0 ; Far pointer to array of filenames
  241. level_id dd 0 ; Far pointer to array of 100x100
  242. level_color dd 0
  243. level_param dd 0
  244. level_under_id dd 0
  245. level_under_color dd 0
  246. level_under_param dd 0
  247. overlay dd 0
  248. overlay_color dd 0
  249. update_done dd 0 ; Whether it's been updated
  250. ends
  251. end