block_data_manip.s 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477
  1. *----------------------------------------------------*
  2. *--- Routines to handle block data manipulation ---*
  3. *----------------------------------------------------*
  4. *** Note at present the block manipulation routines are
  5. *** set up to deal with 16 pixel blocks for ABII,the
  6. *** code is therefore a bit hardwired - but it should be
  7. *** easy to convert it to handle 8,16 or 32
  8. DELETE_TEXT EQU 0
  9. DRAW_TEXT EQU 1
  10. FORWARD EQU 0
  11. FORWARD_FIRST EQU 1
  12. REVERSE EQU 2
  13. ******************************************
  14. **** DISPLAY EDIT WINDOW *****
  15. ******************************************
  16. display_edit_window
  17. clr.w Edit_Blk_Mode
  18. move.l #edit_block_data_window,a0
  19. jsr create_window
  20. move.l #edit_block_data_buttons,a0
  21. jsr display_button_list
  22. move.l #edit_block_other_buttons,a0
  23. jsr display_button_list
  24. move.l #edit_blk_attr_buttons,a0
  25. jsr display_button_list
  26. rts
  27. ******************************************
  28. ***** REMOVE EDIT BLOCK WINDOW *****
  29. ******************************************
  30. remove_edit_block_window
  31. move.l #edit_block_data_buttons,a0
  32. jsr remove_button_list
  33. move.l #edit_block_other_buttons,a0
  34. jsr remove_button_list
  35. move.l #edit_blk_attr_buttons,a0
  36. jsr remove_button_list
  37. move.l #edit_block_data_window,a0
  38. jsr destroy_window
  39. jsr Display_Graphic_Page
  40. rts
  41. ******************************************
  42. **** VIEW BLOCK ATTRIBUTES *****
  43. ******************************************
  44. View_Block_Attributes
  45. clr.w CompareData
  46. move.w #1,Edit_Blk_Mode ;set flag
  47. move.l #edit_block_data_window,a0
  48. jsr create_window
  49. move.l #view_block_data_buttons,a0
  50. jsr display_button_list
  51. move.l #edit_block_other_buttons,a0
  52. jsr display_button_list
  53. move.l #edit_blk_attr_buttons,a0
  54. jsr display_button_list
  55. clr.w Standing_Menu_Pos
  56. clr.w Shooting_Menu_Pos
  57. clr.w Standing_Choice
  58. clr.w Shooting_Choice
  59. bsr Display_Attr_Titles
  60. move.w #DRAW_TEXT,d3
  61. bsr Display_Standing_Menu
  62. bsr Display_Shooting_Menu
  63. bsr Display_Standing_Choice
  64. bsr Display_Shooting_Choice
  65. rts
  66. ******************************************
  67. ***** REMOVE VIEW BLOCK WINDOW *****
  68. ******************************************
  69. remove_view_block_window
  70. move.l #view_block_data_buttons,a0
  71. jsr remove_button_list
  72. move.l #edit_block_other_buttons,a0
  73. jsr remove_button_list
  74. move.l #edit_blk_attr_buttons,a0
  75. jsr remove_button_list
  76. move.l #edit_block_data_window,a0
  77. jsr destroy_window
  78. move.l clicked_button,a0
  79. moveq #0,d1
  80. tst.b button_data(a0)
  81. bne.s dont_add_any_data
  82. bsr Add_Specified_Blks_To_Group
  83. jsr Display_Graphic_Page
  84. dont_add_any_data
  85. rts
  86. ******************************************
  87. ***** ADD SPECIFIED BLKS TO GROUP *****
  88. ******************************************
  89. Add_Specified_Blks_To_Group
  90. move.l block_data_ptr,a0
  91. move.l #block_group_data,a1
  92. move.w CompareData,d1
  93. move.w #MAX_DATA_BLOCKS-1,d0
  94. view_loop
  95. cmp.w (a0)+,d1
  96. beq.s add_block_to_group
  97. clr.b (a1)
  98. bra.s test_next_blk
  99. add_block_to_group
  100. move.b #1,(a1)
  101. test_next_blk
  102. add.l #1,a1
  103. dbra d0,view_loop
  104. rts
  105. ******************************************
  106. **** ENTER BLOCK INTO GROUP *****
  107. ******************************************
  108. Enter_Block_Into_Group
  109. *If block already selected - remove from group
  110. jsr convert_mouse_and_store
  111. move.l page_pointer,a0
  112. clr.l d2
  113. move.w screen_y_pos(a0),d2
  114. add.w d1,d2 ;giving y position down screen
  115. move.l current_map_ptr,a1
  116. divu map_block_size(a1),d2
  117. mulu num_x_blocks_in_page,d2
  118. divu map_block_size(a1),d0 ;blocks in
  119. add.w d2,d0
  120. move.w current_page,d1
  121. mulu num_blocks_in_page,d1
  122. add.w d1,d0 ;gives us the block
  123. cmp.w #MAX_DATA_BLOCKS,d0
  124. blt.s within_block_range
  125. move.w #MAX_DATA_BLOCKS-1,d0
  126. within_block_range
  127. ext.l d0
  128. move.l #block_group_data,a0
  129. tst.b (a0,d0)
  130. beq.s set_block_as_highlighted
  131. clr.b (a0,d0)
  132. jsr display_graphic_page
  133. rts
  134. set_block_as_highlighted
  135. move.b #1,(a0,d0)
  136. display_highlight
  137. divu #320,d0
  138. clr.w d0
  139. swap d0 ;gives modulo
  140. move.l page_pointer,a1
  141. move.w screen_y_pos(a1),d2
  142. ext.l d2
  143. move.l current_map_ptr,a1
  144. divu.w map_block_size(a1),d2
  145. mulu num_x_blocks_in_page,d2
  146. sub.l d2,d0
  147. bsr Highlight_Block
  148. rts
  149. ******************************************
  150. **** DISPLAY OVERLAYS *****
  151. ******************************************
  152. Display_Overlays
  153. move.w current_page,d0
  154. move.l #block_group_data,a0
  155. mulu #320,d0
  156. add.l d0,a0 ;get page pos
  157. move.l page_pointer,a1
  158. move.w screen_y_pos(a1),d2
  159. ext.l d2
  160. move.l current_map_ptr,a1
  161. divu.w map_block_size(a1),d2
  162. mulu num_x_blocks_in_page,d2
  163. add.l d2,a0
  164. move.w #320-1,d1
  165. sub.w d2,d1
  166. clr.w d0
  167. check_for_display
  168. tst.b (a0)+
  169. beq.s dont_display_ov
  170. movem.l d0-d1/a0,-(sp)
  171. bsr HighLight_Block
  172. movem.l (sp)+,d0-d1/a0
  173. dont_display_ov
  174. addq.w #1,d0
  175. dbra d1,check_for_display
  176. rts
  177. ******************************************
  178. **** HIGHLIGHT BLOCK *****
  179. ******************************************
  180. HighLight_Block
  181. *send block in d0
  182. move.l #main_screen_struct,a0
  183. move.l screen_mem(a0),a0
  184. divu num_x_blocks_in_page,d0
  185. moveq #0,d1
  186. move.w d0,d1 ;lines down
  187. lsl.w #4,d1 ;pixels down
  188. clr.w d0
  189. swap d0 ;gives blocks in
  190. lsl.w #4,d0 ;gives pixels in
  191. move.l current_map_ptr,a1
  192. move.w map_planes(a1),d5
  193. subq.w #1,d5
  194. draw_blk_lines
  195. move.w d0,d2
  196. move.w d1,d3
  197. move.l current_map_ptr,a1
  198. add.w map_block_size(a1),d2
  199. add.w map_block_size(a1),d3
  200. movem.l a6/d5,-(sp)
  201. movem.l a0/d0-d3,-(sp)
  202. jsr Dark_Line
  203. movem.l (sp)+,a0/d0-d3
  204. movem.l a0/d0-d3,-(sp)
  205. move.l current_map_ptr,a1
  206. add.w map_block_size(a1),d1
  207. sub.w map_block_size(a1),d3
  208. jsr Dark_Line
  209. movem.l (sp)+,a0/d0-d3
  210. move.l #main_screen_struct,a2
  211. move.w screen_x_size(a2),d4
  212. asr.w #3,d4
  213. mulu screen_y_size(a2),d4
  214. add.l d4,a0
  215. movem.l (sp)+,a6/d5
  216. dbra d5,draw_blk_lines
  217. rts
  218. block_group_data
  219. ds.b MAX_DATA_BLOCKS ;max number of blocks
  220. ***************************************
  221. ***** LOAD BLOCK DATA ****
  222. ***************************************
  223. Load_Block_Data
  224. move.l #Load_Block_Data_Into_Memory,File_Routine_Pointer
  225. jsr display_file_request
  226. rts
  227. ***************************************
  228. ***** LOAD BLOCK DATA INTO MEMORY ****
  229. ***************************************
  230. Load_Block_Data_Into_Memory
  231. movem.l a6,-(sp)
  232. jsr remove_file_request
  233. move.l #Current_Filename,d1
  234. move.l #MODE_OLD,d2
  235. move.l dosbase,a6
  236. jsr Open(a6)
  237. tst.l d0
  238. beq.s could_not_load_block_data
  239. move.l d0,d1 ;filehandle
  240. move.w #16-1,d0
  241. move.l #Blk_Standing_Strings,d2
  242. load_stand_strings
  243. move.l dosbase,a6
  244. move.l #11,d3
  245. movem.l d0-d3,-(sp)
  246. jsr read(a6)
  247. movem.l (sp)+,d0-d3
  248. add.l #12,d2
  249. dbra d0,load_stand_strings
  250. move.w #16-1,d0
  251. move.l #Blk_Shooting_Strings,d2
  252. load_shoot_strings
  253. move.l dosbase,a6
  254. move.l #11,d3
  255. movem.l d0-d3,-(sp)
  256. jsr read(a6)
  257. movem.l (sp)+,d0-d3
  258. add.l #12,d2
  259. dbra d0,load_shoot_strings
  260. move.w #8-1,d0
  261. move.l #Blk_Bit_Attrs,d2
  262. load_attr_strings
  263. move.l dosbase,a6
  264. move.l #11,d3
  265. movem.l d0-d3,-(sp)
  266. jsr read(a6)
  267. movem.l (sp)+,d0-d3
  268. add.l #12,d2
  269. dbra d0,load_attr_strings
  270. move.l block_data_ptr,d2
  271. move.l #MAX_BLOCKS_MEM,d3
  272. move.l dosbase,a6
  273. move.l d1,-(sp)
  274. jsr read(a6)
  275. move.l (sp)+,d1
  276. move.l dosbase,a6
  277. jsr close(a6)
  278. bra.s exit_load_block_data
  279. could_not_load_block_data
  280. jsr display_error
  281. exit_load_block_data
  282. movem.l (sp)+,a6
  283. rts
  284. ***************************************
  285. ***** SAVE BLOCK DATA ****
  286. ***************************************
  287. Save_Block_Data
  288. move.l #Save_Block_Data_To_Disk,File_Routine_Pointer
  289. jsr display_file_request
  290. rts
  291. ***************************************
  292. ***** SAVE BLOCK DATA TO DISK ****
  293. ***************************************
  294. Save_Block_Data_To_Disk
  295. movem.l a6,-(sp)
  296. jsr remove_file_request
  297. move.l #Current_Filename,d1
  298. move.l #MODE_NEW,d2
  299. move.l dosbase,a6
  300. jsr Open(a6)
  301. tst.l d0
  302. beq.s could_not_save_block_data
  303. move.l d0,d1 ;filehandle
  304. move.w #16-1,d0
  305. move.l #Blk_Standing_Strings,d2
  306. save_stand_strings
  307. move.l dosbase,a6
  308. move.l #11,d3
  309. movem.l d0-d3,-(sp)
  310. jsr write(a6)
  311. movem.l (sp)+,d0-d3
  312. add.l #12,d2
  313. dbra d0,save_stand_strings
  314. move.w #16-1,d0
  315. move.l #Blk_Shooting_Strings,d2
  316. save_shoot_strings
  317. move.l dosbase,a6
  318. move.l #11,d3
  319. movem.l d0-d3,-(sp)
  320. jsr read(a6)
  321. movem.l (sp)+,d0-d3
  322. add.l #12,d2
  323. dbra d0,save_shoot_strings
  324. move.w #8-1,d0
  325. move.l #Blk_Bit_Attrs,d2
  326. save_attr_strings
  327. move.l dosbase,a6
  328. move.l #11,d3
  329. movem.l d0-d3,-(sp)
  330. jsr read(a6)
  331. movem.l (sp)+,d0-d3
  332. add.l #12,d2
  333. dbra d0,save_attr_strings
  334. move.l block_data_ptr,d2
  335. move.l #MAX_BLOCKS_MEM,d3
  336. move.l dosbase,a6
  337. move.l d1,-(sp)
  338. jsr write(a6)
  339. move.l (sp)+,d1
  340. move.l dosbase,a6
  341. jsr close(a6)
  342. bra.s exit_save_block_data
  343. could_not_save_block_data
  344. jsr display_error
  345. exit_save_block_data
  346. movem.l (sp)+,a6
  347. rts
  348. ******************************************
  349. **** EDIT BLOCK GROUP *****
  350. ******************************************
  351. Edit_Block_Group
  352. move.l #block_group_data,block_group_ptr
  353. clr.w currently_selected_block
  354. move.w #FORWARD_FIRST,d7
  355. bsr Find_Next_Block
  356. tst.w currently_selected_block
  357. bmi.s dont_open_window
  358. bsr Set_New_Attributes
  359. bsr Display_Edit_Window
  360. bsr Display_Attr_Titles
  361. move.w #DRAW_TEXT,d3
  362. bsr Display_Standing_Menu
  363. bsr Display_Shooting_Menu
  364. bsr Display_Standing_Choice
  365. bsr Display_Shooting_Choice
  366. dont_open_window
  367. rts
  368. block_group_ptr
  369. dc.l 0
  370. current_block_ptr
  371. dc.l 0
  372. ******************************************
  373. **** SELECT BLOCK ATTR *****
  374. ******************************************
  375. Select_Block_Attr
  376. move.l clicked_button,a0
  377. moveq #0,d1
  378. move.b button_data(a0),d1
  379. tst.w Edit_Blk_Mode
  380. bne.s Set_Data_For_View
  381. clr.l d0
  382. move.w currently_selected_block,d0
  383. move.l block_data_ptr,a0
  384. lsl d0
  385. bset.b d1,1(a0,d0)
  386. bra.s End_Select_Block_Attr
  387. set_data_for_view
  388. bset.b d1,CompareData+1
  389. End_Select_Block_Attr
  390. rts
  391. Edit_Blk_Mode dc.w 0
  392. CompareData dc.w 0
  393. STANDING_MENU_X EQU 10+16
  394. STANDING_MENU_Y EQU 20
  395. SHOOTING_MENU_X EQU 130+16
  396. SHOOTING_MENU_Y EQU 20
  397. MENU_CHOICES EQU 5
  398. ATTR_Y_POS EQU 108
  399. *******************************************
  400. ****** DISPLAY ATTR TITLES ******
  401. *******************************************
  402. Display_Attr_Titles
  403. move.w #DRAW_TEXT,d3
  404. move.l #Standing_Title,a1
  405. move.l #edit_block_data_window,a0
  406. move.w #STANDING_MENU_X+32,d0
  407. move.w #2,d1
  408. move.w #2,d2
  409. jsr write_text
  410. move.l #Shooting_Title,a1
  411. move.l #edit_block_data_window,a0
  412. move.w #SHOOTING_MENU_X+32,d0
  413. move.w #2,d1
  414. move.w #2,d2
  415. jsr write_text
  416. move.l #Blk_Bit_Attrs,a1
  417. move.w #4-1,d7
  418. move.w #DRAW_TEXT,d3
  419. move.w #STANDING_MENU_X,d0
  420. move.w #ATTR_Y_POS,d1
  421. move.w #2,d2
  422. display_blk_set1
  423. jsr write_text
  424. add.w #FONT_HEIGHT,d1
  425. add.l #12,a1
  426. dbra d7,display_blk_set1
  427. move.l #Blk_Bit_Attrs2,a1
  428. move.w #4-1,d7
  429. move.w #DRAW_TEXT,d3
  430. move.w #SHOOTING_MENU_X+16,d0
  431. move.w #ATTR_Y_POS,d1
  432. move.w #2,d2
  433. display_blk_set2
  434. jsr write_text
  435. add.w #FONT_HEIGHT,d1
  436. add.l #12,a1
  437. dbra d7,display_blk_set2
  438. rts
  439. *******************************************
  440. ****** SCROLL STANDING_UP ******
  441. *******************************************
  442. Scroll_Standing_Up
  443. tst.w Standing_Menu_Pos
  444. beq.s cannot_move_standing_up
  445. move.w #DELETE_TEXT,d3
  446. bsr Display_Standing_Menu
  447. subq.w #1,Standing_Menu_Pos
  448. move.w #DRAW_TEXT,d3
  449. bsr Display_Standing_Menu
  450. cannot_move_standing_up
  451. rts
  452. *******************************************
  453. ****** SCROLL STANDING DOWN ******
  454. *******************************************
  455. Scroll_Standing_Down
  456. cmp.w #11,Standing_Menu_Pos
  457. beq.s cannot_move_standing_down
  458. move.w #DELETE_TEXT,d3
  459. bsr Display_Standing_Menu
  460. addq.w #1,Standing_Menu_Pos
  461. move.w #DRAW_TEXT,d3
  462. bsr Display_Standing_Menu
  463. cannot_move_standing_down
  464. rts
  465. *******************************************
  466. ****** SCROLL SHOOTING_UP ******
  467. *******************************************
  468. Scroll_Shooting_Up
  469. tst.w Shooting_Menu_Pos
  470. beq.s cannot_move_shooting_up
  471. move.w #DELETE_TEXT,d3
  472. bsr Display_Shooting_Menu
  473. subq.w #1,Shooting_Menu_Pos
  474. move.w #DRAW_TEXT,d3
  475. bsr Display_Shooting_Menu
  476. cannot_move_shooting_up
  477. rts
  478. *******************************************
  479. ****** SCROLL SHOOTING DOWN ******
  480. *******************************************
  481. Scroll_Shooting_Down
  482. cmp.w #11,Shooting_Menu_Pos
  483. beq.s cannot_move_shooting_down
  484. move.w #DELETE_TEXT,d3
  485. bsr Display_Shooting_Menu
  486. addq.w #1,Shooting_Menu_Pos
  487. move.w #DRAW_TEXT,d3
  488. bsr Display_Shooting_Menu
  489. cannot_move_shooting_down
  490. rts
  491. *******************************************
  492. ****** DISPLAY STANDING MENU ******
  493. *******************************************
  494. Display_Standing_Menu
  495. *send delete or draw in d3
  496. move.w Standing_Menu_Pos,d0
  497. mulu #12,d0
  498. move.l #Blk_Standing_Strings,a1
  499. add.l d0,a1
  500. move.l #edit_block_data_window,a0
  501. move.w #STANDING_MENU_X,d0
  502. move.w #STANDING_MENU_Y,d1
  503. move.w #4,d2
  504. move.w #MENU_CHOICES-1,d7
  505. draw_up_standing_menu
  506. jsr write_text
  507. add.l #12,a1
  508. add.w #FONT_HEIGHT,d1
  509. dbra d7,draw_up_standing_menu
  510. rts
  511. *******************************************
  512. ****** DISPLAY STANDING CHOICE ******
  513. *******************************************
  514. Display_Standing_Choice
  515. *send delete or draw in d3
  516. move.w Standing_Choice,d0
  517. mulu #12,d0
  518. move.l #Blk_Standing_Strings,a1
  519. add.l d0,a1
  520. move.l #edit_block_data_window,a0
  521. move.w #STANDING_MENU_X,d0
  522. move.w #STANDING_MENU_Y+(MENU_CHOICES+1)*FONT_HEIGHT,d1
  523. move.w #1,d2
  524. jsr write_text
  525. rts
  526. *******************************************
  527. ****** DISPLAY SHOOTING CHOICE ******
  528. *******************************************
  529. Display_Shooting_Choice
  530. *send delete or draw in d3
  531. move.w Shooting_Choice,d0
  532. mulu #12,d0
  533. move.l #Blk_Shooting_Strings,a1
  534. add.l d0,a1
  535. move.l #edit_block_data_window,a0
  536. move.w #SHOOTING_MENU_X,d0
  537. move.w #SHOOTING_MENU_Y+(MENU_CHOICES+1)*FONT_HEIGHT,d1
  538. move.w #1,d2
  539. jsr write_text
  540. rts
  541. *******************************************
  542. ****** FIND NEXT BLOCK ******
  543. *******************************************
  544. Find_Next_Block
  545. *Direction in d7
  546. move.l block_group_ptr,a0
  547. move.w currently_selected_block,d0
  548. cmp.w #FORWARD_FIRST,d7
  549. beq.s Skip_First_Time
  550. cmp.w #FORWARD,d7
  551. beq.s Test_Forward
  552. find_block_reverse_loop
  553. subq.w #1,d0
  554. subq.l #1,a0
  555. tst.w d0
  556. bge.s not_at_start_of_list
  557. move.w #MAX_DATA_BLOCKS-1,d0
  558. move.l #block_group_data+MAX_DATA_BLOCKS-1,a0
  559. not_at_start_of_list
  560. tst.b (a0)
  561. bne.s found_a_block
  562. cmp.w currently_selected_block,d0 ;full circle?
  563. beq.s no_blocks_found
  564. bra.s find_block_reverse_loop
  565. Test_Forward
  566. addq.w #1,d0
  567. addq.l #1,a0
  568. cmp.w #MAX_DATA_BLOCKS,d0
  569. bne.s not_at_end_of_list
  570. clr.w d0
  571. move.l #block_group_data,a0
  572. not_at_end_of_list
  573. cmp.w currently_selected_block,d0 ;full circle?
  574. beq.s no_blocks_found
  575. Skip_First_Time
  576. tst.b (a0)
  577. beq.s Test_Forward
  578. found_a_block
  579. move.l a0,block_group_ptr
  580. move.w d0,currently_selected_block
  581. rts
  582. no_blocks_found
  583. move.w #-1,currently_selected_block
  584. rts
  585. currently_selected_block dc.w 0
  586. *******************************************
  587. ****** SET NEW ATTRIBUTES ******
  588. *******************************************
  589. Set_New_Attributes
  590. move.w currently_selected_block,d0
  591. moveq #0,d1
  592. moveq #0,d2
  593. move.l block_data_ptr,a0
  594. ext.l d0
  595. lsl d0
  596. move.b (a0,d0),d1 ;block data, first byte = stand shoot
  597. move.b 1(a0,d0),d3
  598. move.w d1,d2
  599. andi.w #$f0,d1
  600. lsr #4,d1
  601. move.w d1,standing_choice
  602. andi.w #$f,d2
  603. move.w d2,shooting_choice
  604. move.l #Block_Attr1,a0
  605. move.w #8-1,d0
  606. set_attr_bits
  607. lsr d3
  608. bcc.s set_button_clear
  609. move.b #1,button_start(a0)
  610. bra.s set_next_button
  611. set_button_clear
  612. clr.b button_start(a0)
  613. set_next_button
  614. add.l #block_butt_size,a0
  615. dbra d0,set_attr_bits
  616. rts
  617. *******************************************
  618. ****** DISPLAY SHOOTING MENU ******
  619. *******************************************
  620. Display_Shooting_Menu
  621. *send delete or draw in d3
  622. move.w Shooting_Menu_Pos,d0
  623. mulu #12,d0
  624. move.l #Blk_Shooting_Strings,a1
  625. add.l d0,a1
  626. move.l #edit_block_data_window,a0
  627. move.w #SHOOTING_MENU_X,d0
  628. move.w #SHOOTING_MENU_Y,d1
  629. move.w #4,d2
  630. move.w #MENU_CHOICES-1,d7
  631. draw_up_shooting_menu
  632. jsr write_text
  633. add.l #12,a1
  634. add.w #FONT_HEIGHT,d1
  635. dbra d7,draw_up_shooting_menu
  636. rts
  637. *******************************************
  638. ****** SELECT STANDING CHOICE ******
  639. *******************************************
  640. Select_Standing_Choice
  641. move.w #DELETE_TEXT,d3
  642. bsr Display_Standing_Choice
  643. move.l clicked_button,a0
  644. moveq #0,d1
  645. move.b button_data(a0),d1
  646. add.w Standing_Menu_Pos,d1
  647. move.w d1,Standing_Choice
  648. move.w #DRAW_TEXT,d3
  649. bsr Display_Standing_Choice
  650. tst.w Edit_Blk_Mode
  651. bne.s Set_StandData_For_View
  652. move.w Standing_Choice,d1
  653. lsl #4,d1
  654. clr.l d0
  655. move.w currently_selected_block,d0
  656. move.l block_data_ptr,a0
  657. lsl d0
  658. move.b (a0,d0),d2
  659. andi.b #$0f,d2
  660. or.b d1,d2
  661. move.b d2,(a0,d0)
  662. bra.s End_Select_Stand_Block
  663. Set_StandData_for_view
  664. move.b CompareData,d2
  665. andi.b #$0f,d2
  666. move.w Standing_Choice,d1
  667. lsl.b #4,d1
  668. or.w d1,d2
  669. move.b d2,CompareData
  670. End_Select_Stand_Block
  671. rts
  672. *******************************************
  673. ****** SELECT SHOOTING CHOICE ******
  674. *******************************************
  675. Select_Shooting_Choice
  676. move.w #DELETE_TEXT,d3
  677. bsr Display_Shooting_Choice
  678. move.l clicked_button,a0
  679. moveq #0,d1
  680. move.b button_data(a0),d1
  681. add.w Shooting_Menu_Pos,d1
  682. move.w d1,Shooting_Choice
  683. move.w #DRAW_TEXT,d3
  684. bsr Display_Shooting_Choice
  685. tst.w Edit_Blk_Mode
  686. bne.s Set_ShootData_For_View
  687. move.w Shooting_Choice,d1
  688. clr.l d0
  689. move.w currently_selected_block,d0
  690. move.l block_data_ptr,a0
  691. lsl d0
  692. move.b (a0,d0),d2
  693. andi.b #$f0,d2
  694. or.b d1,d2
  695. move.b d2,(a0,d0)
  696. bra.s End_Select_Shoot_Block
  697. Set_ShootData_for_view
  698. move.b CompareData,d2
  699. andi.b #$f,d2
  700. move.w Shooting_Choice,d1
  701. or.w d1,d2
  702. move.b d2,CompareData
  703. End_Select_Shoot_Block
  704. rts
  705. *******************************************
  706. ****** SELECT PREV BLOCK ******
  707. *******************************************
  708. Select_Prev_Block
  709. move.w #DELETE_TEXT,d3
  710. bsr Display_Standing_Choice
  711. bsr Display_Shooting_Choice
  712. move.l #edit_blk_attr_buttons,a0
  713. jsr Remove_Button_List
  714. move.w #REVERSE,d7
  715. bsr Find_Next_Block
  716. bsr Set_New_Attributes
  717. move.w #DRAW_TEXT,d3
  718. bsr Display_Standing_Choice
  719. bsr Display_Shooting_Choice
  720. move.l #edit_blk_attr_buttons,a0
  721. jsr Display_Button_List
  722. rts
  723. *******************************************
  724. ****** SELECT NEXT BLOCK ******
  725. *******************************************
  726. Select_Next_Block
  727. move.w #DELETE_TEXT,d3
  728. bsr Display_Standing_Choice
  729. bsr Display_Shooting_Choice
  730. move.l #edit_blk_attr_buttons,a0
  731. jsr Remove_Button_List
  732. move.w #FORWARD,d7
  733. bsr Find_Next_Block
  734. tst.w currently_selected_block
  735. bmi.s block_find_error
  736. bsr Set_New_Attributes
  737. move.w #DRAW_TEXT,d3
  738. bsr Display_Standing_Choice
  739. bsr Display_Shooting_Choice
  740. move.l #edit_blk_attr_buttons,a0
  741. jsr Display_Button_List
  742. rts
  743. block_find_error
  744. bsr Remove_Edit_Block_Window
  745. rts
  746. *******************************************
  747. ****** APPLY DATA TO BLOCK GROUP ******
  748. *******************************************
  749. Apply_Data_To_Block_Group
  750. move.l block_group_ptr,a1 ;save
  751. move.w currently_selected_block,d5
  752. clr.l d6
  753. move.w d5,d6
  754. move.l block_data_ptr,a2
  755. lsl d6
  756. move.w (a2,d6),d6 ;contains data
  757. move.w #FORWARD,d7
  758. Apply_Loop
  759. bsr Find_Next_Block
  760. moveq #0,d4
  761. move.w currently_selected_block,d4
  762. bmi.s end_of_apply
  763. cmp.w d4,d5
  764. beq.s end_of_apply
  765. move.l block_data_ptr,a2
  766. lsl d4
  767. move.w d6,(a2,d4)
  768. bra.s Apply_Loop
  769. end_of_apply
  770. move.w d5,currently_selected_block
  771. move.l a1,a0
  772. rts
  773. *******************************************
  774. ****** REMOVE BLOCK FROM GROUP ******
  775. *******************************************
  776. Remove_Block_From_Group
  777. move.l block_group_ptr,a0
  778. clr.b (a0) ;remove from group
  779. bsr Select_Next_Block
  780. move.w #FORWARD,d7
  781. rts
  782. *******************************************
  783. ****** Add_Current_Attr_To_Group ******
  784. *******************************************
  785. Add_Current_Attr_To_Group
  786. clr.l d0
  787. move.w currently_selected_block,d0
  788. move.l block_data_ptr,a0
  789. lsl d0
  790. move.w (a0,d0),CompareData
  791. bsr Add_Specified_Blks_To_Group
  792. rts
  793. Standing_Menu_Pos dc.w 0
  794. Shooting_Menu_Pos dc.w 0
  795. Standing_Choice dc.w 0
  796. Shooting_Choice dc.w 0
  797. edit_block_data_window
  798. dc.w 320
  799. dc.w 192 ;full screen
  800. dc.w 0
  801. dc.w 0
  802. dc.l 0
  803. dc.l 0
  804. dc.b "BLOCK ATTRIBUTES",0
  805. even
  806. view_block_data_buttons
  807. dc.l view_block_data_ok,view_block_data_cancel
  808. dc.l -1
  809. edit_block_data_buttons
  810. dc.l edit_block_data_ok
  811. dc.l Block_Left_Arrow,Block_Right_Arrow
  812. dc.l Apply_Button,Remove_Blk_Button,Set_Group_Blk_Button
  813. dc.l -1
  814. edit_blk_attr_buttons
  815. dc.l Block_Attr1,Block_Attr2,Block_Attr3,Block_Attr4
  816. dc.l Block_Attr5,Block_Attr6,Block_Attr7,Block_Attr8
  817. dc.l -1
  818. edit_block_other_buttons
  819. dc.l Standing_Up_Arrow,Standing_Down_Arrow
  820. dc.l Shooting_Up_Arrow,Shooting_Down_Arrow
  821. dc.l StandMenu1,StandMenu2,StandMenu3,StandMenu4,StandMenu5
  822. dc.l ShootMenu1,ShootMenu2,ShootMenu3,ShootMenu4,ShootMenu5
  823. dc.l -1
  824. edit_block_data_ok
  825. dc.w (320/2)-48
  826. dc.w 128+32
  827. dc.w WINDOW ;frame type
  828. dc.b CUSTOM_BUTTON ;standard
  829. dc.b NOT_DEPRESSED
  830. dc.b 0
  831. dc.b 0 ;not used
  832. dc.l ok_custom_button
  833. dc.l 0 ;not used
  834. dc.l remove_edit_block_window
  835. dc.b 0
  836. even
  837. view_block_data_ok
  838. dc.w 32
  839. dc.w 128+32
  840. dc.w WINDOW ;frame type
  841. dc.b CUSTOM_BUTTON ;standard
  842. dc.b NOT_DEPRESSED
  843. dc.b 0
  844. dc.b 0 ;not used
  845. dc.l ok_custom_button
  846. dc.l 0 ;not used
  847. dc.l remove_view_block_window
  848. dc.b 0
  849. even
  850. view_block_data_cancel
  851. dc.w 320-128
  852. dc.w 128+32
  853. dc.w WINDOW ;frame type
  854. dc.b CUSTOM_BUTTON ;standard
  855. dc.b NOT_DEPRESSED
  856. dc.b 1
  857. dc.b 0 ;not used
  858. dc.l cancel_custom_button
  859. dc.l 0 ;not used
  860. dc.l remove_view_block_window
  861. dc.b 0
  862. even
  863. edit_data_button
  864. dc.w BUTTON_3
  865. dc.w FOURTH_ROW
  866. dc.w MAIN_BUTTON_SCREEN ;frame type
  867. dc.b STANDARD_BUTTON ;standard
  868. dc.b NOT_DEPRESSED
  869. dc.b MODE_EDIT_BLOCK
  870. dc.b 0 ;not used
  871. dc.l 0 ;not used
  872. dc.l 0 ;not used
  873. dc.l edit_block_group
  874. dc.b "EDIT BLKS",0
  875. EVEN
  876. select_data_button
  877. dc.w BUTTON_4
  878. dc.w THIRD_ROW
  879. dc.w MAIN_BUTTON_SCREEN ;frame type
  880. dc.b STANDARD_BUTTON ;standard
  881. dc.b NOT_DEPRESSED
  882. dc.b MODE_EDIT_BLOCK
  883. dc.b 0 ;not used
  884. dc.l 0 ;not used
  885. dc.l 0 ;not used
  886. dc.l select_block_mode
  887. dc.b "SEL BLKS",0
  888. EVEN
  889. view_data_button
  890. dc.w BUTTON_4
  891. dc.w FOURTH_ROW
  892. dc.w MAIN_BUTTON_SCREEN ;frame type
  893. dc.b STANDARD_BUTTON ;standard
  894. dc.b NOT_DEPRESSED
  895. dc.b MODE_EDIT_BLOCK
  896. dc.b 0 ;not used
  897. dc.l 0 ;not used
  898. dc.l 0 ;not used
  899. dc.l view_block_attributes
  900. dc.b "VIEW ATTR",0
  901. EVEN
  902. *-------------------Window buttons------------------*
  903. Block_Attr1
  904. dc.w STANDING_MENU_X-16
  905. dc.w ATTR_Y_POS
  906. dc.w WINDOW ;frame type
  907. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  908. dc.b NOT_DEPRESSED
  909. dc.b 0 ;index
  910. dc.b 0 ;not used
  911. dc.l tick_box_button ;not used
  912. dc.l 0 ;not used
  913. dc.l Select_Block_Attr
  914. dc.b 0
  915. EVEN
  916. Block_Butt_Size equ *-Block_Attr1
  917. Block_Attr2
  918. dc.w STANDING_MENU_X-16
  919. dc.w ATTR_Y_POS+FONT_HEIGHT
  920. dc.w WINDOW ;frame type
  921. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  922. dc.b NOT_DEPRESSED
  923. dc.b 1 ;index
  924. dc.b 0 ;not used
  925. dc.l tick_box_button ;not used
  926. dc.l 0 ;not used
  927. dc.l Select_Block_Attr
  928. dc.b 0
  929. EVEN
  930. Block_Attr3
  931. dc.w STANDING_MENU_X-16
  932. dc.w ATTR_Y_POS+FONT_HEIGHT*2
  933. dc.w WINDOW ;frame type
  934. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  935. dc.b NOT_DEPRESSED
  936. dc.b 2 ;index
  937. dc.b 0 ;not used
  938. dc.l tick_box_button ;not used
  939. dc.l 0 ;not used
  940. dc.l Select_Block_Attr
  941. dc.b 0
  942. EVEN
  943. Block_Attr4
  944. dc.w STANDING_MENU_X-16
  945. dc.w ATTR_Y_POS+FONT_HEIGHT*3
  946. dc.w WINDOW ;frame type
  947. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  948. dc.b NOT_DEPRESSED
  949. dc.b 3 ;index
  950. dc.b 0 ;not used
  951. dc.l tick_box_button ;not used
  952. dc.l 0 ;not used
  953. dc.l Select_Block_Attr
  954. dc.b 0
  955. EVEN
  956. Block_Attr5
  957. dc.w SHOOTING_MENU_X
  958. dc.w ATTR_Y_POS
  959. dc.w WINDOW ;frame type
  960. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  961. dc.b NOT_DEPRESSED
  962. dc.b 4 ;index
  963. dc.b 0 ;not used
  964. dc.l tick_box_button ;not used
  965. dc.l 0 ;not used
  966. dc.l Select_Block_Attr
  967. dc.b 0
  968. EVEN
  969. Block_Attr6
  970. dc.w SHOOTING_MENU_X
  971. dc.w ATTR_Y_POS+FONT_HEIGHT
  972. dc.w WINDOW ;frame type
  973. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  974. dc.b NOT_DEPRESSED
  975. dc.b 5 ;index
  976. dc.b 0 ;not used
  977. dc.l tick_box_button ;not used
  978. dc.l 0 ;not used
  979. dc.l Select_Block_Attr
  980. dc.b 0
  981. EVEN
  982. Block_Attr7
  983. dc.w SHOOTING_MENU_X
  984. dc.w ATTR_Y_POS+FONT_HEIGHT*2
  985. dc.w WINDOW ;frame type
  986. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  987. dc.b NOT_DEPRESSED
  988. dc.b 6 ;index
  989. dc.b 0 ;not used
  990. dc.l tick_box_button ;not used
  991. dc.l 0 ;not used
  992. dc.l Select_Block_Attr
  993. dc.b 0
  994. EVEN
  995. Block_Attr8
  996. dc.w SHOOTING_MENU_X
  997. dc.w ATTR_Y_POS+FONT_HEIGHT*3
  998. dc.w WINDOW ;frame type
  999. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  1000. dc.b NOT_DEPRESSED
  1001. dc.b 7 ;index
  1002. dc.b 0 ;not used
  1003. dc.l tick_box_button ;not used
  1004. dc.l 0 ;not used
  1005. dc.l Select_Block_Attr
  1006. dc.b 0
  1007. EVEN
  1008. Standing_Up_Arrow
  1009. dc.w 2
  1010. dc.w STANDING_MENU_Y+FONT_HEIGHT
  1011. dc.w WINDOW ;frame type
  1012. dc.b CUSTOM_BUTTON+HOLD_BUTTON ;standard
  1013. dc.b NOT_DEPRESSED
  1014. dc.b 0
  1015. dc.b 0 ;not used
  1016. dc.l arrow_up
  1017. dc.l 0 ;not used
  1018. dc.l scroll_standing_up
  1019. dc.b 0
  1020. EVEN
  1021. Standing_Down_Arrow
  1022. dc.w 2
  1023. dc.w STANDING_MENU_Y+FONT_HEIGHT*3
  1024. dc.w WINDOW ;frame type
  1025. dc.b CUSTOM_BUTTON+HOLD_BUTTON ;standard
  1026. dc.b NOT_DEPRESSED
  1027. dc.b 0
  1028. dc.b 0 ;not used
  1029. dc.l arrow_down
  1030. dc.l 0 ;not used
  1031. dc.l scroll_standing_down
  1032. dc.b 0
  1033. EVEN
  1034. Shooting_Up_Arrow
  1035. dc.w 320-62
  1036. dc.w STANDING_MENU_Y+FONT_HEIGHT
  1037. dc.w WINDOW ;frame type
  1038. dc.b CUSTOM_BUTTON+HOLD_BUTTON ;standard
  1039. dc.b NOT_DEPRESSED
  1040. dc.b 0
  1041. dc.b 0 ;not used
  1042. dc.l arrow_up
  1043. dc.l 0 ;not used
  1044. dc.l scroll_shooting_up
  1045. dc.b 0
  1046. EVEN
  1047. Shooting_Down_Arrow
  1048. dc.w 320-62
  1049. dc.w STANDING_MENU_Y+FONT_HEIGHT*3
  1050. dc.w WINDOW ;frame type
  1051. dc.b CUSTOM_BUTTON+HOLD_BUTTON ;standard
  1052. dc.b NOT_DEPRESSED
  1053. dc.b 0
  1054. dc.b 0 ;not used
  1055. dc.l arrow_down
  1056. dc.l 0 ;not used
  1057. dc.l scroll_shooting_down
  1058. dc.b 0
  1059. EVEN
  1060. Block_Left_Arrow
  1061. dc.w 192-8
  1062. dc.w 128+32
  1063. dc.w WINDOW ;frame type
  1064. dc.b CUSTOM_BUTTON+HOLD_BUTTON ;standard
  1065. dc.b NOT_DEPRESSED
  1066. dc.b 0
  1067. dc.b 0 ;not used
  1068. dc.l arrow_left
  1069. dc.l 0 ;not used
  1070. dc.l select_prev_block
  1071. dc.b 0
  1072. EVEN
  1073. Block_Right_Arrow
  1074. dc.w 210
  1075. dc.w 128+32
  1076. dc.w WINDOW ;frame type
  1077. dc.b CUSTOM_BUTTON+HOLD_BUTTON ;standard
  1078. dc.b NOT_DEPRESSED
  1079. dc.b 0
  1080. dc.b 0 ;not used
  1081. dc.l arrow_right
  1082. dc.l 0 ;not used
  1083. dc.l select_next_block
  1084. dc.b 0
  1085. EVEN
  1086. StandMenu1
  1087. dc.w STANDING_MENU_X
  1088. dc.w STANDING_MENU_Y
  1089. dc.w WINDOW ;frame type
  1090. dc.b CUSTOM_BUTTON ;standard
  1091. dc.b NOT_DEPRESSED
  1092. dc.b 0
  1093. dc.b 0 ;not used
  1094. dc.l MenuButton ;not used
  1095. dc.l 0 ;not used
  1096. dc.l Select_Standing_Choice
  1097. dc.b 0
  1098. EVEN
  1099. StandMenu2
  1100. dc.w STANDING_MENU_X
  1101. dc.w STANDING_MENU_Y+FONT_HEIGHT
  1102. dc.w WINDOW ;frame type
  1103. dc.b CUSTOM_BUTTON ;standard
  1104. dc.b NOT_DEPRESSED
  1105. dc.b 1
  1106. dc.b 0 ;not used
  1107. dc.l MenuButton ;not used
  1108. dc.l 0 ;not used
  1109. dc.l Select_Standing_Choice
  1110. dc.b 0
  1111. EVEN
  1112. StandMenu3
  1113. dc.w STANDING_MENU_X
  1114. dc.w STANDING_MENU_Y+FONT_HEIGHT*2
  1115. dc.w WINDOW ;frame type
  1116. dc.b CUSTOM_BUTTON ;standard
  1117. dc.b NOT_DEPRESSED
  1118. dc.b 2
  1119. dc.b 0 ;not used
  1120. dc.l MenuButton ;not used
  1121. dc.l 0 ;not used
  1122. dc.l Select_Standing_Choice
  1123. dc.b 0
  1124. EVEN
  1125. StandMenu4
  1126. dc.w STANDING_MENU_X
  1127. dc.w STANDING_MENU_Y+FONT_HEIGHT*3
  1128. dc.w WINDOW ;frame type
  1129. dc.b CUSTOM_BUTTON ;standard
  1130. dc.b NOT_DEPRESSED
  1131. dc.b 3
  1132. dc.b 0 ;not used
  1133. dc.l MenuButton ;not used
  1134. dc.l 0 ;not used
  1135. dc.l Select_Standing_Choice
  1136. dc.b 0
  1137. EVEN
  1138. StandMenu5
  1139. dc.w STANDING_MENU_X
  1140. dc.w STANDING_MENU_Y+FONT_HEIGHT*4
  1141. dc.w WINDOW ;frame type
  1142. dc.b CUSTOM_BUTTON ;standard
  1143. dc.b NOT_DEPRESSED
  1144. dc.b 4
  1145. dc.b 0 ;not used
  1146. dc.l MenuButton ;not used
  1147. dc.l 0 ;not used
  1148. dc.l Select_Standing_Choice
  1149. dc.b 0
  1150. EVEN
  1151. ShootMenu1
  1152. dc.w SHOOTING_MENU_X
  1153. dc.w SHOOTING_MENU_Y
  1154. dc.w WINDOW ;frame type
  1155. dc.b CUSTOM_BUTTON ;standard
  1156. dc.b NOT_DEPRESSED
  1157. dc.b 0
  1158. dc.b 0 ;not used
  1159. dc.l MenuButton ;not used
  1160. dc.l 0 ;not used
  1161. dc.l Select_Shooting_Choice
  1162. dc.b 0
  1163. EVEN
  1164. ShootMenu2
  1165. dc.w SHOOTING_MENU_X
  1166. dc.w SHOOTING_MENU_Y+FONT_HEIGHT
  1167. dc.w WINDOW ;frame type
  1168. dc.b CUSTOM_BUTTON ;standard
  1169. dc.b NOT_DEPRESSED
  1170. dc.b 1
  1171. dc.b 0 ;not used
  1172. dc.l MenuButton ;not used
  1173. dc.l 0 ;not used
  1174. dc.l Select_Shooting_Choice
  1175. dc.b 0
  1176. EVEN
  1177. ShootMenu3
  1178. dc.w SHOOTING_MENU_X
  1179. dc.w SHOOTING_MENU_Y+FONT_HEIGHT*2
  1180. dc.w WINDOW ;frame type
  1181. dc.b CUSTOM_BUTTON ;standard
  1182. dc.b NOT_DEPRESSED
  1183. dc.b 2
  1184. dc.b 0 ;not used
  1185. dc.l MenuButton ;not used
  1186. dc.l 0 ;not used
  1187. dc.l Select_Shooting_Choice
  1188. dc.b 0
  1189. EVEN
  1190. ShootMenu4
  1191. dc.w SHOOTING_MENU_X
  1192. dc.w SHOOTING_MENU_Y+FONT_HEIGHT*3
  1193. dc.w WINDOW ;frame type
  1194. dc.b CUSTOM_BUTTON ;standard
  1195. dc.b NOT_DEPRESSED
  1196. dc.b 3
  1197. dc.b 0 ;not used
  1198. dc.l MenuButton ;not used
  1199. dc.l 0 ;not used
  1200. dc.l Select_Shooting_Choice
  1201. dc.b 0
  1202. EVEN
  1203. ShootMenu5
  1204. dc.w SHOOTING_MENU_X
  1205. dc.w SHOOTING_MENU_Y+FONT_HEIGHT*4
  1206. dc.w WINDOW ;frame type
  1207. dc.b CUSTOM_BUTTON ;standard
  1208. dc.b NOT_DEPRESSED
  1209. dc.b 4
  1210. dc.b 0 ;not used
  1211. dc.l MenuButton ;not used
  1212. dc.l 0 ;not used
  1213. dc.l Select_Shooting_Choice
  1214. dc.b 0
  1215. EVEN
  1216. Apply_Button
  1217. dc.w 5
  1218. dc.w 128+32
  1219. dc.w WINDOW ;frame type
  1220. dc.b CUSTOM_BUTTON ;standard
  1221. dc.b NOT_DEPRESSED
  1222. dc.b 0
  1223. dc.b 0 ;not used
  1224. dc.l apply_custom_button ;not used
  1225. dc.l 0 ;not used
  1226. dc.l Apply_Data_To_Block_Group
  1227. dc.b 0
  1228. EVEN
  1229. Remove_Blk_Button
  1230. dc.w 5+36
  1231. dc.w 128+32
  1232. dc.w WINDOW ;frame type
  1233. dc.b CUSTOM_BUTTON ;standard
  1234. dc.b NOT_DEPRESSED
  1235. dc.b 0
  1236. dc.b 0 ;not used
  1237. dc.l remove_custom_button ;not used
  1238. dc.l 0 ;not used
  1239. dc.l Remove_Block_From_Group
  1240. dc.b 0
  1241. EVEN
  1242. Set_Group_Blk_Button
  1243. dc.w 5+36+36
  1244. dc.w 128+32
  1245. dc.w WINDOW ;frame type
  1246. dc.b CUSTOM_BUTTON ;standard
  1247. dc.b NOT_DEPRESSED
  1248. dc.b 0
  1249. dc.b 0 ;not used
  1250. dc.l setgroup_custom_button ;not used
  1251. dc.l 0 ;not used
  1252. dc.l Add_Current_Attr_To_Group
  1253. dc.b 0
  1254. EVEN
  1255. Blk_Standing_Strings
  1256. dc.b "Null ",0
  1257. dc.b "Wood ",0
  1258. dc.b "Undefined ",0
  1259. dc.b "Undefined ",0
  1260. dc.b "Undefined ",0
  1261. dc.b "Switch ",0
  1262. dc.b "Activate ",0
  1263. dc.b "Activate D ",0
  1264. dc.b "Activate D2",0
  1265. dc.b "Activate BD",0
  1266. dc.b "Hostage Chk",0
  1267. dc.b "Undefined ",0
  1268. dc.b "Undefined ",0
  1269. dc.b "Undefined ",0
  1270. dc.b "Undefined ",0
  1271. Blk_Shooting_Strings
  1272. dc.b "Null ",0
  1273. dc.b "Empty Pot ",0 ;0 not available
  1274. dc.b "Blt Switch1",0
  1275. dc.b "Blt Switch2",0
  1276. dc.b "Blt Switch3",0
  1277. dc.b "Blt Switch4",0
  1278. dc.b "Pot Gold ",0
  1279. dc.b "Pot Silver ",0
  1280. dc.b "Pot Explo ",0
  1281. dc.b "Pot Maggot ",0
  1282. dc.b "Pot Energy ",0
  1283. dc.b "Wall Gold ",0
  1284. dc.b "Wall Silver",0
  1285. dc.b "Wall Double",0
  1286. dc.b "Wall Potion",0
  1287. dc.b "Chink Block",0
  1288. Blk_Bit_Attrs
  1289. dc.b "Solid ",0
  1290. dc.b "Water ",0
  1291. dc.b "Undefined ",0
  1292. dc.b "Undefined",0
  1293. Blk_Bit_Attrs2
  1294. dc.b "Bullet Kill",0
  1295. dc.b "Undefined ",0
  1296. dc.b "Undefined ",0
  1297. dc.b "Undefined ",0
  1298. even
  1299. Shooting_Title
  1300. dc.b "SHOOT",0
  1301. Standing_Title
  1302. dc.b "STAND",0