block_data_manip.s 33 KB

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