From 1b1c8cb8568dc4d1899eb58a4017f783c7cc89f6 Mon Sep 17 00:00:00 2001 From: Ry Date: Sat, 14 Oct 2023 18:08:26 -0700 Subject: [PATCH] Fetcher: Use `msc` resource as the icon for misc files --- Makefile | 6 +++--- applications/fetcher/About.okm | 9 ++++++++- applications/fetcher/Browser.okm | 7 +++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 490a916..43c16b4 100644 --- a/Makefile +++ b/Makefile @@ -68,9 +68,9 @@ base_image/startup.cfg: base_image/startup.cfg.default cp $< $@ ICONS := \ - applications/icons/cfg_icon.inc \ - applications/icons/dsk_icon.inc \ - applications/icons/fxf_icon.inc + applications/icons/dsk.inc \ + applications/icons/fxf.inc \ + applications/icons/msc.inc applications/icons/%.inc: applications/icons/%.png $(GFX2INC) 32 32 $< $@ diff --git a/applications/fetcher/About.okm b/applications/fetcher/About.okm index 3589a89..4fd93a3 100644 --- a/applications/fetcher/About.okm +++ b/applications/fetcher/About.okm @@ -1,5 +1,5 @@ MODULE About; - IMPORT OS; + IMPORT OS, Browser; VAR aboutRunning: CHAR; aboutWindow: ARRAY WINDOW_STRUCT_SIZE OF CHAR; @@ -26,11 +26,18 @@ MODULE About; PROCEDURE DrawAboutWindow(); VAR overlay: INT; + tempAbtResPtr: PTR; BEGIN overlay := get_window_overlay_number(PTROF(aboutWindow)); fill_overlay(0FF674764H, overlay); draw_str_to_overlay("fox32", 16, 16, 0FFFFFFFFH, 0FF674764H, overlay); draw_str_to_overlay("the computer made with love", 16, 32, 0FFFFFFFFH, 0FF674764H, overlay); draw_filled_rectangle_to_overlay(4, 56, 248, 2, 0FFFFFFFFH, overlay); + + tempAbtResPtr := get_resource(browserIconsResPtr, "abt", 64); + IF tempAbtResPtr THEN + draw_str_to_overlay(tempAbtResPtr, 16, 176, 0FFFFFFFFH, 0FF674764H, overlay); + free_memory(tempAbtResPtr); + END; END; END. diff --git a/applications/fetcher/Browser.okm b/applications/fetcher/Browser.okm index 7e7ed01..677efdf 100644 --- a/applications/fetcher/Browser.okm +++ b/applications/fetcher/Browser.okm @@ -148,6 +148,13 @@ MODULE Browser; set_tilemap(tempFileIconResPtr, 32, 32); draw_tile_to_overlay(0, icon^.x, icon^.y, overlay); free_memory(tempFileIconResPtr); + ELSE + tempFileIconResPtr := get_resource(browserIconsResPtr, "msc", 4096); + IF tempFileIconResPtr THEN + set_tilemap(tempFileIconResPtr, 32, 32); + draw_tile_to_overlay(0, icon^.x, icon^.y, overlay); + free_memory(tempFileIconResPtr); + END; END; i := i + 1; END;