Skip to content

Commit

Permalink
Fetcher: Use msc resource as the icon for misc files
Browse files Browse the repository at this point in the history
  • Loading branch information
ry755 committed Oct 15, 2023
1 parent 4b57165 commit 1b1c8cb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 $< $@
Expand Down
9 changes: 8 additions & 1 deletion applications/fetcher/About.okm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MODULE About;
IMPORT OS;
IMPORT OS, Browser;

VAR aboutRunning: CHAR;
aboutWindow: ARRAY WINDOW_STRUCT_SIZE OF CHAR;
Expand All @@ -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.
7 changes: 7 additions & 0 deletions applications/fetcher/Browser.okm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1b1c8cb

Please sign in to comment.