palette_setup.s 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952
  1. ************************************
  2. **** SET UP PALETTE WINDOW ****
  3. ************************************
  4. set_up_palette_window
  5. move.l #backup_palette,a1
  6. move.l page_pointer,a0
  7. move.l screen_palette(a0),a0
  8. move.w #31,d0
  9. copy_palette
  10. move.w (a0)+,(a1)+
  11. dbra d0,copy_palette
  12. move.l #pal_butts,a0
  13. moveq #0,d0
  14. move.w colour_selected,d0
  15. asl.w #2,d0
  16. move.l (a0,d0),a0
  17. move.b #DEPRESSED,button_start(a0)
  18. move.l #palette_window,a0
  19. bsr create_window
  20. move.l #palette_button_list,a0
  21. bsr display_button_list
  22. move.l #Palette_Window,a0 ; write in filename
  23. move.l #palette_text,a1
  24. move.w #2,d2
  25. move.w #6,d0
  26. move.w #6,d1
  27. bsr Write_Text
  28. bsr get_colour_attribs
  29. bsr display_colour_attributes
  30. rts
  31. ************************************
  32. **** CANCEL PALETTE WINDOW ****
  33. ************************************
  34. cancel_palette_window
  35. move.l page_pointer,a2
  36. move.l screen_palette(a2),a0
  37. move.l #backup_palette,a1
  38. move.w #31,d0
  39. copy_back_palette
  40. move.w (a1)+,(a0)+
  41. dbra d0,copy_back_palette
  42. move.l screen_palette(a2),a1
  43. bsr setup_screen_colours
  44. bsr remove_palette_window
  45. rts
  46. ************************************
  47. **** REMOVE PALETTE WINDOW ****
  48. ************************************
  49. remove_palette_window
  50. move.l #palette_button_list,a0
  51. bsr remove_button_list
  52. move.l #palette_window,a0
  53. bsr destroy_window
  54. rts
  55. ************************************
  56. **** DISPLAY COLOUR ATTRIBUTES ****
  57. ************************************
  58. display_colour_attributes
  59. move.l #Palette_Window,a0 ; write in filename
  60. move.l #palette_numbers,a1
  61. move.w #2,d2
  62. move.w #106,d0
  63. move.w #9+20,d1
  64. move.w #1,d3
  65. bsr Write_Text
  66. rts
  67. ************************************
  68. **** DELETE COLOUR ATTRIBUTES ****
  69. ************************************
  70. delete_colour_attributes
  71. move.l #Palette_Window,a0 ; write in filename
  72. move.l #palette_numbers,a1
  73. move.w #2,d2
  74. move.w #106,d0
  75. move.w #9+20,d1
  76. move.w #0,d3
  77. bsr Write_Text
  78. rts
  79. convert_col_to_hex
  80. cmp.w #9,d1
  81. ble.s all_num
  82. add.w #48+7,d1
  83. bra.s done_convert_col
  84. all_num
  85. add.w #48,d1
  86. done_convert_col
  87. rts
  88. ************************************
  89. **** GET COLOUR ATTRIBS ****
  90. ************************************
  91. get_colour_attribs
  92. moveq #0,d0
  93. move.w colour_selected,d0
  94. move.l page_pointer,a0
  95. move.l screen_palette(a0),a0
  96. asl.w #1,d0
  97. move.w (a0,d0),d0 ; current colour
  98. move.w d0,d1
  99. andi.w #$0f00,d1
  100. asr.w #8,d1
  101. bsr convert_col_to_hex
  102. move.b d1,red_inten
  103. move.w d0,d1
  104. andi.w #$00f0,d1
  105. asr.w #4,d1
  106. bsr convert_col_to_hex
  107. move.b d1,green_inten
  108. andi.w #$00f,d0
  109. move.w d0,d1
  110. bsr convert_col_to_hex
  111. move.b d1,blue_inten
  112. rts
  113. ************************************
  114. **** COLOUR UP ****
  115. ************************************
  116. colour_up
  117. move.l clicked_button,a0
  118. moveq #0,d0
  119. move.b button_data(a0),d0
  120. move.w colour_selected,d1
  121. asl.w #1,d1
  122. move.l page_pointer,a0
  123. move.l screen_palette(a0),a0
  124. move.w (a0,d1),d2 ; colour
  125. cmp.w #0,d0
  126. bne.s could_be_green
  127. andi.w #$f00,d2
  128. asr.w #8,d2
  129. cmp.w #$f,d2
  130. beq.s done_colour_update
  131. addq.w #1,d2
  132. asl.w #8,d2
  133. andi.w #$0ff,(a0,d1)
  134. or.w d2,(a0,d1)
  135. bra.s done_colour_update
  136. could_be_green
  137. cmp.w #1,d0
  138. bne.s must_be_blue
  139. andi.w #$0f0,d2
  140. asr.w #4,d2
  141. cmp.w #$f,d2
  142. beq.s done_colour_update
  143. addq.w #1,d2
  144. asl.w #4,d2
  145. andi.w #$f0f,(a0,d1)
  146. or.w d2,(a0,d1)
  147. bra.s done_colour_update
  148. must_be_blue
  149. andi.w #$00f,d2
  150. cmp.w #$f,d2
  151. beq.s done_colour_update
  152. addq.w #1,d2
  153. andi.w #$ff0,(a0,d1)
  154. or.w d2,(a0,d1)
  155. done_colour_update
  156. bsr delete_colour_attributes
  157. bsr get_colour_attribs
  158. bsr display_colour_attributes
  159. bsr set_current_page_colours
  160. rts
  161. **************************************
  162. ***** SET CURRENT PAGE COLOURS *****
  163. **************************************
  164. set_current_page_colours
  165. move.l page_pointer,a0
  166. move.l screen_palette(a0),a0
  167. move.l a0,a1
  168. bsr setup_screen_colours
  169. rts
  170. **************************************
  171. ***** SET ORIGINAL COLOURS *****
  172. **************************************
  173. set_original_colours
  174. move.l #main_screen_colour_map,a1
  175. move.l #main_screen_colours+2,a3
  176. move.w #8-1,d0
  177. fill_ori_colours
  178. move.w (a1)+,(a3)
  179. add.l #4,a3
  180. dbra d0,fill_ori_colours
  181. rts
  182. ************************************
  183. **** COLOUR DOWN ****
  184. ************************************
  185. colour_down
  186. move.l clicked_button,a0
  187. moveq #0,d0
  188. move.b button_data(a0),d0
  189. move.w colour_selected,d1
  190. asl.w #1,d1
  191. move.l page_pointer,a0
  192. move.l screen_palette(a0),a0
  193. move.w (a0,d1),d2 ; colour
  194. cmp.w #0,d0
  195. bne.s dcould_be_green
  196. andi.w #$f00,d2
  197. asr.w #8,d2
  198. cmp.w #$0,d2
  199. beq.s ddone_colour_update
  200. subq.w #1,d2
  201. asl.w #8,d2
  202. andi.w #$0ff,(a0,d1)
  203. or.w d2,(a0,d1)
  204. bra.s ddone_colour_update
  205. dcould_be_green
  206. cmp.w #1,d0
  207. bne.s dmust_be_blue
  208. andi.w #$0f0,d2
  209. asr.w #4,d2
  210. cmp.w #$0,d2
  211. beq.s ddone_colour_update
  212. subq.w #1,d2
  213. asl.w #4,d2
  214. andi.w #$f0f,(a0,d1)
  215. or.w d2,(a0,d1)
  216. bra.s ddone_colour_update
  217. dmust_be_blue
  218. andi.w #$00f,d2
  219. cmp.w #$0,d2
  220. beq.s ddone_colour_update
  221. subq.w #1,d2
  222. andi.w #$ff0,(a0,d1)
  223. or.w d2,(a0,d1)
  224. ddone_colour_update
  225. bsr delete_colour_attributes
  226. bsr get_colour_attribs
  227. bsr display_colour_attributes
  228. move.l page_pointer,a0
  229. move.l screen_palette(a0),a0
  230. move.l a0,a1
  231. bsr setup_screen_colours
  232. rts
  233. ************************************
  234. **** SET NEW COLOUR ****
  235. ************************************
  236. set_new_colour
  237. move.l clicked_button,a0
  238. moveq #0,d0
  239. move.b button_data(a0),d0
  240. move.l #pal_butts,a0
  241. cmp.w colour_selected,d0
  242. bne.s new_colour_selected
  243. move.w colour_selected,d1
  244. asl.w #2,d1
  245. move.l (a0,d1),a0
  246. move.b #DEPRESSED,button_start(a0)
  247. bra.s redisplay_colour
  248. new_colour_selected
  249. move.w colour_selected,d1
  250. asl.w #2,d1
  251. move.l (a0,d1),a0
  252. move.b #NOT_DEPRESSED,button_start(a0)
  253. move.w d0,colour_selected
  254. redisplay_colour
  255. bsr remove_button
  256. bsr display_button
  257. bsr delete_colour_attributes
  258. bsr get_colour_attribs
  259. bsr display_colour_attributes
  260. rts
  261. *****************************palette stuff
  262. palette_text
  263. dc.b " Intensitys ",$a,$a
  264. dc.b " Red : ",$a,$a
  265. dc.b " Green : ",$a,$a
  266. dc.b " Blue : ",0
  267. EVEN
  268. palette_numbers
  269. red_inten
  270. dc.b 0,$a,$a
  271. green_inten
  272. dc.b 0,$a,$a
  273. blue_inten
  274. dc.b 0,0
  275. EVEN
  276. colour_selected
  277. dc.w 0
  278. **********palette window
  279. Palette_Window
  280. dc.w 240
  281. dc.w 144
  282. dc.w 40
  283. dc.w 20
  284. dc.l 0
  285. dc.l 0
  286. dc.b "PALETTE EDITOR",0
  287. even
  288. palette_button_list
  289. dc.l palette_ok_button,palette_cancel_button
  290. dc.l red_up_button,red_down_button
  291. dc.l blue_up_button,blue_down_button
  292. dc.l green_up_button,green_down_button
  293. pal_butts
  294. dc.l palette_colour0_button
  295. dc.l palette_colour1_button
  296. dc.l palette_colour2_button
  297. dc.l palette_colour3_button
  298. dc.l palette_colour4_button
  299. dc.l palette_colour5_button
  300. dc.l palette_colour6_button
  301. dc.l palette_colour7_button
  302. dc.l palette_colour8_button
  303. dc.l palette_colour9_button
  304. dc.l palette_colour10_button
  305. dc.l palette_colour11_button
  306. dc.l palette_colour12_button
  307. dc.l palette_colour13_button
  308. dc.l palette_colour14_button
  309. dc.l palette_colour15_button
  310. dc.l palette_colour16_button
  311. dc.l palette_colour17_button
  312. dc.l palette_colour18_button
  313. dc.l palette_colour19_button
  314. dc.l palette_colour20_button
  315. dc.l palette_colour21_button
  316. dc.l palette_colour22_button
  317. dc.l palette_colour23_button
  318. dc.l palette_colour24_button
  319. dc.l palette_colour25_button
  320. dc.l palette_colour26_button
  321. dc.l palette_colour27_button
  322. dc.l palette_colour28_button
  323. dc.l palette_colour29_button
  324. dc.l palette_colour30_button
  325. dc.l palette_colour31_button
  326. dc.l -1
  327. *****palette buttons
  328. palette_Ok_Button
  329. dc.w 24
  330. dc.w 110
  331. dc.w WINDOW ;frame type
  332. dc.b CUSTOM_BUTTON ;standard
  333. dc.b NOT_DEPRESSED
  334. dc.b 0
  335. dc.b 0 ;not used
  336. dc.l ok_custom_button
  337. dc.l 0 ;not used
  338. dc.l remove_palette_window
  339. dc.b 0
  340. even
  341. palette_cancel_Button
  342. dc.w 240-104
  343. dc.w 110
  344. dc.w WINDOW ;frame type
  345. dc.b CUSTOM_BUTTON ;standard
  346. dc.b NOT_DEPRESSED
  347. dc.b 0
  348. dc.b 0 ;not used
  349. dc.l cancel_custom_button
  350. dc.l 0 ;not used
  351. dc.l cancel_palette_window
  352. dc.b 0
  353. even
  354. Red_Up_Button
  355. dc.w 130
  356. dc.w 30
  357. dc.w WINDOW ;frame type
  358. dc.b CUSTOM_BUTTON+HOLD_BUTTON ;standard
  359. dc.b NOT_DEPRESSED
  360. dc.b 0
  361. dc.b 0 ;not used
  362. dc.l arrow_up
  363. dc.l 0 ;not used
  364. dc.l colour_up
  365. dc.b 0
  366. EVEN
  367. Red_Down_Button
  368. dc.w 130+20
  369. dc.w 30
  370. dc.w WINDOW ;frame type
  371. dc.b CUSTOM_BUTTON+HOLD_BUTTON ;standard
  372. dc.b NOT_DEPRESSED
  373. dc.b 0
  374. dc.b 0 ;not used
  375. dc.l arrow_down
  376. dc.l 0 ;not used
  377. dc.l colour_down
  378. dc.b 0
  379. EVEN
  380. Green_Up_Button
  381. dc.w 130
  382. dc.w 50
  383. dc.w WINDOW ;frame type
  384. dc.b CUSTOM_BUTTON+HOLD_BUTTON ;standard
  385. dc.b NOT_DEPRESSED
  386. dc.b 1
  387. dc.b 0 ;not used
  388. dc.l arrow_up
  389. dc.l 0 ;not used
  390. dc.l colour_up
  391. dc.b 0
  392. EVEN
  393. Green_Down_Button
  394. dc.w 130+20
  395. dc.w 50
  396. dc.w WINDOW ;frame type
  397. dc.b CUSTOM_BUTTON+HOLD_BUTTON ;standard
  398. dc.b NOT_DEPRESSED
  399. dc.b 1
  400. dc.b 0 ;not used
  401. dc.l arrow_down
  402. dc.l 0 ;not used
  403. dc.l colour_down
  404. dc.b 0
  405. EVEN
  406. Blue_Up_Button
  407. dc.w 130
  408. dc.w 70
  409. dc.w WINDOW ;frame type
  410. dc.b CUSTOM_BUTTON+HOLD_BUTTON ;standard
  411. dc.b NOT_DEPRESSED
  412. dc.b 2
  413. dc.b 0 ;not used
  414. dc.l arrow_up
  415. dc.l 0 ;not used
  416. dc.l colour_up
  417. dc.b 0
  418. EVEN
  419. Blue_Down_Button
  420. dc.w 130+20
  421. dc.w 70
  422. dc.w WINDOW ;frame type
  423. dc.b CUSTOM_BUTTON+HOLD_BUTTON ;standard
  424. dc.b NOT_DEPRESSED
  425. dc.b 2
  426. dc.b 0 ;not used
  427. dc.l arrow_down
  428. dc.l 0 ;not used
  429. dc.l colour_down
  430. dc.b 0
  431. EVEN
  432. palette_colour0_button
  433. dc.w 56
  434. dc.w 90
  435. dc.w WINDOW ;frame type
  436. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  437. dc.b NOT_DEPRESSED
  438. dc.b 0
  439. dc.b 0 ;not used
  440. dc.l colour0_button
  441. dc.l 0 ;not used
  442. dc.l set_new_colour
  443. dc.b 0
  444. EVEN
  445. palette_colour1_button
  446. dc.w 56+8
  447. dc.w 90
  448. dc.w WINDOW ;frame type
  449. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  450. dc.b NOT_DEPRESSED
  451. dc.b 1
  452. dc.b 0 ;not used
  453. dc.l colour1_button
  454. dc.l 0 ;not used
  455. dc.l set_new_colour
  456. dc.b 0
  457. EVEN
  458. palette_colour2_button
  459. dc.w 56+16
  460. dc.w 90
  461. dc.w WINDOW ;frame type
  462. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  463. dc.b NOT_DEPRESSED
  464. dc.b 2
  465. dc.b 0 ;not used
  466. dc.l colour2_button
  467. dc.l 0 ;not used
  468. dc.l set_new_colour
  469. dc.b 0
  470. EVEN
  471. palette_colour3_button
  472. dc.w 56+24
  473. dc.w 90
  474. dc.w WINDOW ;frame type
  475. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  476. dc.b NOT_DEPRESSED
  477. dc.b 3
  478. dc.b 0 ;not used
  479. dc.l colour3_button
  480. dc.l 0 ;not used
  481. dc.l set_new_colour
  482. dc.b 0
  483. EVEN
  484. palette_colour4_button
  485. dc.w 56+32
  486. dc.w 90
  487. dc.w WINDOW ;frame type
  488. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  489. dc.b NOT_DEPRESSED
  490. dc.b 4
  491. dc.b 0 ;not used
  492. dc.l colour4_button
  493. dc.l 0 ;not used
  494. dc.l set_new_colour
  495. dc.b 0
  496. EVEN
  497. palette_colour5_button
  498. dc.w 56+40
  499. dc.w 90
  500. dc.w WINDOW ;frame type
  501. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  502. dc.b NOT_DEPRESSED
  503. dc.b 5
  504. dc.b 0 ;not used
  505. dc.l colour5_button
  506. dc.l 0 ;not used
  507. dc.l set_new_colour
  508. dc.b 0
  509. EVEN
  510. palette_colour6_button
  511. dc.w 56+48
  512. dc.w 90
  513. dc.w WINDOW ;frame type
  514. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  515. dc.b NOT_DEPRESSED
  516. dc.b 6
  517. dc.b 0 ;not used
  518. dc.l colour6_button
  519. dc.l 0 ;not used
  520. dc.l set_new_colour
  521. dc.b 0
  522. EVEN
  523. palette_colour7_button
  524. dc.w 56+56
  525. dc.w 90
  526. dc.w WINDOW ;frame type
  527. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  528. dc.b NOT_DEPRESSED
  529. dc.b 7
  530. dc.b 0 ;not used
  531. dc.l colour7_button
  532. dc.l 0 ;not used
  533. dc.l set_new_colour
  534. dc.b 0
  535. EVEN
  536. palette_colour8_button
  537. dc.w 56+64
  538. dc.w 90
  539. dc.w WINDOW ;frame type
  540. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  541. dc.b NOT_DEPRESSED
  542. dc.b 8
  543. dc.b 0 ;not used
  544. dc.l colour8_button
  545. dc.l 0 ;not used
  546. dc.l set_new_colour
  547. dc.b 0
  548. EVEN
  549. palette_colour9_button
  550. dc.w 56+64
  551. dc.w 90
  552. dc.w WINDOW ;frame type
  553. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  554. dc.b NOT_DEPRESSED
  555. dc.b 9
  556. dc.b 0 ;not used
  557. dc.l colour9_button
  558. dc.l 0 ;not used
  559. dc.l set_new_colour
  560. dc.b 0
  561. EVEN
  562. palette_colour10_button
  563. dc.w 56+72
  564. dc.w 90
  565. dc.w WINDOW ;frame type
  566. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  567. dc.b NOT_DEPRESSED
  568. dc.b 10
  569. dc.b 0 ;not used
  570. dc.l colour10_button
  571. dc.l 0 ;not used
  572. dc.l set_new_colour
  573. dc.b 0
  574. EVEN
  575. palette_colour11_button
  576. dc.w 56+80
  577. dc.w 90
  578. dc.w WINDOW ;frame type
  579. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  580. dc.b NOT_DEPRESSED
  581. dc.b 11
  582. dc.b 0 ;not used
  583. dc.l colour11_button
  584. dc.l 0 ;not used
  585. dc.l set_new_colour
  586. dc.b 0
  587. EVEN
  588. palette_colour12_button
  589. dc.w 56+88
  590. dc.w 90
  591. dc.w WINDOW ;frame type
  592. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  593. dc.b NOT_DEPRESSED
  594. dc.b 12
  595. dc.b 0 ;not used
  596. dc.l colour12_button
  597. dc.l 0 ;not used
  598. dc.l set_new_colour
  599. dc.b 0
  600. EVEN
  601. palette_colour13_button
  602. dc.w 56+96
  603. dc.w 90
  604. dc.w WINDOW ;frame type
  605. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  606. dc.b NOT_DEPRESSED
  607. dc.b 13
  608. dc.b 0 ;not used
  609. dc.l colour13_button
  610. dc.l 0 ;not used
  611. dc.l set_new_colour
  612. dc.b 0
  613. EVEN
  614. palette_colour14_button
  615. dc.w 56+104
  616. dc.w 90
  617. dc.w WINDOW ;frame type
  618. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  619. dc.b NOT_DEPRESSED
  620. dc.b 14
  621. dc.b 0 ;not used
  622. dc.l colour14_button
  623. dc.l 0 ;not used
  624. dc.l set_new_colour
  625. dc.b 0
  626. EVEN
  627. palette_colour15_button
  628. dc.w 56+112
  629. dc.w 90
  630. dc.w WINDOW ;frame type
  631. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  632. dc.b NOT_DEPRESSED
  633. dc.b 15
  634. dc.b 0 ;not used
  635. dc.l colour15_button
  636. dc.l 0 ;not used
  637. dc.l set_new_colour
  638. dc.b 0
  639. EVEN
  640. palette_colour16_button
  641. dc.w 56
  642. dc.w 98
  643. dc.w WINDOW ;frame type
  644. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  645. dc.b NOT_DEPRESSED
  646. dc.b 16
  647. dc.b 0 ;not used
  648. dc.l colour16_button
  649. dc.l 0 ;not used
  650. dc.l set_new_colour
  651. dc.b 0
  652. EVEN
  653. palette_colour17_button
  654. dc.w 56+8
  655. dc.w 98
  656. dc.w WINDOW ;frame type
  657. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  658. dc.b NOT_DEPRESSED
  659. dc.b 17
  660. dc.b 0 ;not used
  661. dc.l colour17_button
  662. dc.l 0 ;not used
  663. dc.l set_new_colour
  664. dc.b 0
  665. EVEN
  666. palette_colour18_button
  667. dc.w 56+16
  668. dc.w 98
  669. dc.w WINDOW ;frame type
  670. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  671. dc.b NOT_DEPRESSED
  672. dc.b 18
  673. dc.b 0 ;not used
  674. dc.l colour18_button
  675. dc.l 0 ;not used
  676. dc.l set_new_colour
  677. dc.b 0
  678. EVEN
  679. palette_colour19_button
  680. dc.w 56+24
  681. dc.w 98
  682. dc.w WINDOW ;frame type
  683. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  684. dc.b NOT_DEPRESSED
  685. dc.b 19
  686. dc.b 0 ;not used
  687. dc.l colour19_button
  688. dc.l 0 ;not used
  689. dc.l set_new_colour
  690. dc.b 0
  691. EVEN
  692. palette_colour20_button
  693. dc.w 56+32
  694. dc.w 98
  695. dc.w WINDOW ;frame type
  696. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  697. dc.b NOT_DEPRESSED
  698. dc.b 20
  699. dc.b 0 ;not used
  700. dc.l colour20_button
  701. dc.l 0 ;not used
  702. dc.l set_new_colour
  703. dc.b 0
  704. EVEN
  705. palette_colour21_button
  706. dc.w 56+40
  707. dc.w 98
  708. dc.w WINDOW ;frame type
  709. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  710. dc.b NOT_DEPRESSED
  711. dc.b 21
  712. dc.b 0 ;not used
  713. dc.l colour21_button
  714. dc.l 0 ;not used
  715. dc.l set_new_colour
  716. dc.b 0
  717. EVEN
  718. palette_colour22_button
  719. dc.w 56+48
  720. dc.w 98
  721. dc.w WINDOW ;frame type
  722. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  723. dc.b NOT_DEPRESSED
  724. dc.b 22
  725. dc.b 0 ;not used
  726. dc.l colour22_button
  727. dc.l 0 ;not used
  728. dc.l set_new_colour
  729. dc.b 0
  730. EVEN
  731. palette_colour23_button
  732. dc.w 56+56
  733. dc.w 98
  734. dc.w WINDOW ;frame type
  735. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  736. dc.b NOT_DEPRESSED
  737. dc.b 23
  738. dc.b 0 ;not used
  739. dc.l colour23_button
  740. dc.l 0 ;not used
  741. dc.l set_new_colour
  742. dc.b 0
  743. EVEN
  744. palette_colour24_button
  745. dc.w 56+64
  746. dc.w 98
  747. dc.w WINDOW ;frame type
  748. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  749. dc.b NOT_DEPRESSED
  750. dc.b 24
  751. dc.b 0 ;not used
  752. dc.l colour24_button
  753. dc.l 0 ;not used
  754. dc.l set_new_colour
  755. dc.b 0
  756. EVEN
  757. palette_colour25_button
  758. dc.w 56+64
  759. dc.w 98
  760. dc.w WINDOW ;frame type
  761. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  762. dc.b NOT_DEPRESSED
  763. dc.b 25
  764. dc.b 0 ;not used
  765. dc.l colour25_button
  766. dc.l 0 ;not used
  767. dc.l set_new_colour
  768. dc.b 0
  769. EVEN
  770. palette_colour26_button
  771. dc.w 56+72
  772. dc.w 98
  773. dc.w WINDOW ;frame type
  774. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  775. dc.b NOT_DEPRESSED
  776. dc.b 26
  777. dc.b 0 ;not used
  778. dc.l colour26_button
  779. dc.l 0 ;not used
  780. dc.l set_new_colour
  781. dc.b 0
  782. EVEN
  783. palette_colour27_button
  784. dc.w 56+80
  785. dc.w 98
  786. dc.w WINDOW ;frame type
  787. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  788. dc.b NOT_DEPRESSED
  789. dc.b 27
  790. dc.b 0 ;not used
  791. dc.l colour27_button
  792. dc.l 0 ;not used
  793. dc.l set_new_colour
  794. dc.b 0
  795. EVEN
  796. palette_colour28_button
  797. dc.w 56+88
  798. dc.w 98
  799. dc.w WINDOW ;frame type
  800. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  801. dc.b NOT_DEPRESSED
  802. dc.b 28
  803. dc.b 0 ;not used
  804. dc.l colour28_button
  805. dc.l 0 ;not used
  806. dc.l set_new_colour
  807. dc.b 0
  808. EVEN
  809. palette_colour29_button
  810. dc.w 56+96
  811. dc.w 98
  812. dc.w WINDOW ;frame type
  813. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  814. dc.b NOT_DEPRESSED
  815. dc.b 29
  816. dc.b 0 ;not used
  817. dc.l colour29_button
  818. dc.l 0 ;not used
  819. dc.l set_new_colour
  820. dc.b 0
  821. EVEN
  822. palette_colour30_button
  823. dc.w 56+104
  824. dc.w 98
  825. dc.w WINDOW ;frame type
  826. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  827. dc.b NOT_DEPRESSED
  828. dc.b 30
  829. dc.b 0 ;not used
  830. dc.l colour30_button
  831. dc.l 0 ;not used
  832. dc.l set_new_colour
  833. dc.b 0
  834. EVEN
  835. palette_colour31_button
  836. dc.w 56+112
  837. dc.w 98
  838. dc.w WINDOW ;frame type
  839. dc.b CUSTOM_BUTTON+TOGGLE_BUTTON
  840. dc.b NOT_DEPRESSED
  841. dc.b 31
  842. dc.b 0 ;not used
  843. dc.l colour31_button
  844. dc.l 0 ;not used
  845. dc.l set_new_colour
  846. dc.b 0
  847. EVEN
  848. backup_palette
  849. ds.w 32