From 3caf86649df3047091927ad6f862334c6ce77d22 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Sat, 19 Jan 2019 09:41:24 -0800 Subject: [PATCH] use icon macro for volume icons now too --- desktop.inc | 14 +++++++++++-- desktop/desktop_main.s | 3 +++ desktop/desktop_res.s | 46 ++++++------------------------------------ 3 files changed, 21 insertions(+), 42 deletions(-) diff --git a/desktop.inc b/desktop.inc index 086ed00..802d34f 100644 --- a/desktop.inc +++ b/desktop.inc @@ -272,11 +272,21 @@ GLYPH_SAPPLE = $1E reserved .byte ; 0 maprect .tag MGTK::Rect ; x1,y1 must be 0,0 - ;; Next part is link to mask - not used for volume - ;; icons (which currently lack a mask). + ;; Next part is address of mask bits; must be same + ;; dimensions as rect of icon. maskbits .addr .endstruct +.macro DEFICON mapbits, mapwidth, dx, dy, maskbits + ;; First part is MGTK::MapInfo without leading viewloc + .addr mapbits + .byte mapwidth + .byte 0 ; reserved + .word 0, 0, dx, dy ; maprect + ;; Next part is link to mask + .addr maskbits +.endmacro + .struct FileRecord name .res 16 file_type .byte ; 16 $10 diff --git a/desktop/desktop_main.s b/desktop/desktop_main.s index 26a0b27..6723377 100644 --- a/desktop/desktop_main.s +++ b/desktop/desktop_main.s @@ -66,6 +66,9 @@ JT_RESTORE_OVL: jmp restore_dynamic_routine JT_COLOR_MODE: jmp set_color_mode ; * JT_MONO_MODE: jmp set_mono_mode ; * + .assert JUMP_TABLE_MAIN_LOOP = JT_MAIN_LOOP, error, "Jump table mismatch" + .assert JUMP_TABLE_MONO_MODE = JT_MONO_MODE, error, "Jump table mismatch" + ;; Main Loop .proc enter_main_loop cli diff --git a/desktop/desktop_res.s b/desktop/desktop_res.s index e99c15a..c815f56 100644 --- a/desktop/desktop_res.s +++ b/desktop/desktop_res.s @@ -816,51 +816,27 @@ is_iic_plus_flag: ;;; 5.25" Floppy Disk floppy140_icon: - .addr desktop_aux::floppy140_pixels; mapbits - .byte 4 ; mapwidth - .byte 0 ; reserved - DEFINE_RECT 0, 0, 26, 14 ; maprect - .addr desktop_aux::floppy140_mask + DEFICON desktop_aux::floppy140_pixels, 4, 26, 14, desktop_aux::floppy140_mask ;;; RAM Disk ramdisk_icon: - .addr desktop_aux::ramdisk_pixels ; mapbits - .byte 6 ; mapwidth - .byte 0 ; reserved - DEFINE_RECT 0, 0, 39, 11 ; maprect - .addr desktop_aux::ramdisk_mask + DEFICON desktop_aux::ramdisk_pixels, 6, 39, 11, desktop_aux::ramdisk_mask ;;; 3.5" Floppy Disk floppy800_icon: - .addr desktop_aux::floppy800_pixels; mapbits - .byte 3 ; mapwidth - .byte 0 ; reserved - DEFINE_RECT 0, 0, 20, 11 ; maprect - .addr desktop_aux::floppy800_mask + DEFICON desktop_aux::floppy800_pixels, 3, 20, 11, desktop_aux::floppy800_mask ;;; Hard Disk profile_icon: - .addr desktop_aux::profile_pixels ; mapbits - .byte 8 ; mapwidth - .byte 0 ; reserved - DEFINE_RECT 0, 0, 52, 9 ; maprect - .addr desktop_aux::profile_mask + DEFICON desktop_aux::profile_pixels, 8, 52, 9, desktop_aux::profile_mask ;;; File Share fileshare_icon: - .addr desktop_aux::fileshare_pixels ; mapbits - .byte 5 ; mapwidth - .byte 0 ; reserved - DEFINE_RECT 0, 0, 34, 14 ; maprect - .addr desktop_aux::fileshare_mask + DEFICON desktop_aux::fileshare_pixels, 5, 34, 14, desktop_aux::fileshare_mask ;;; Trash Can trash_icon: - .addr desktop_aux::trash_pixels ; mapbits - .byte 3 ; mapwidth - .byte 0 ; reserved - DEFINE_RECT 0, 0, 20, 17 ; maprect - .addr desktop_aux::trash_mask + DEFICON desktop_aux::trash_pixels, 3, 20, 17, desktop_aux::trash_mask ;;; ============================================================ @@ -1481,16 +1457,6 @@ type_icons_table: ; map into definitions below .addr asp ; appleworks sp .addr app ; system (see below) -.macro DEFICON mapbits, mapwidth, dx, dy, maskbits - ;; First part is MGTK::MapInfo without leading viewloc - .addr mapbits - .byte mapwidth - .byte 0 ; reserved - .word 0, 0, dx, dy ; maprect - ;; Next part is link to mask - .addr maskbits -.endmacro - gen: DEFICON generic_icon, 4, 27, 15, generic_mask src: DEFICON desktop_aux::iigs_file_icon, 4, 27, 15, generic_mask rel: DEFICON desktop_aux::rel_file_icon, 4, 27, 14, binary_mask