Fetcher: Use sleep_task

This commit is contained in:
Ry 2023-10-11 16:32:24 -07:00
parent d61c54d985
commit beb7a8f479
3 changed files with 3 additions and 12 deletions

View File

@ -241,7 +241,7 @@ MODULE Browser;
w := RSH(384 *| (16 - i) + 32 *| i, 4); w := RSH(384 *| (16 - i) + 32 *| i, 4);
h := RSH(192 *| (16 - i) + 32 *| i, 4); h := RSH(192 *| (16 - i) + 32 *| i, 4);
DrawWireframeBox(get_window_overlay_number(desktopWin), x, y, w, h, 020F0F0F0H); DrawWireframeBox(get_window_overlay_number(desktopWin), x, y, w, h, 020F0F0F0H);
Eep(10); sleep_task(10);
draw_filled_rectangle_to_overlay(x, y, w, h, 0, get_window_overlay_number(desktopWin)); draw_filled_rectangle_to_overlay(x, y, w, h, 0, get_window_overlay_number(desktopWin));
i := i + 1; i := i + 1;
END; END;

View File

@ -49,7 +49,7 @@ MODULE Desktop;
w := RSH(32 *| (16 - i) + 384 *| i, 4); w := RSH(32 *| (16 - i) + 384 *| i, 4);
h := RSH(32 *| (16 - i) + 192 *| i, 4); h := RSH(32 *| (16 - i) + 192 *| i, 4);
DrawWireframeBox(get_window_overlay_number(PTROF(desktopWindow)), x, y, w, h, 020F0F0F0H); DrawWireframeBox(get_window_overlay_number(PTROF(desktopWindow)), x, y, w, h, 020F0F0F0H);
Eep(10); sleep_task(10);
draw_filled_rectangle_to_overlay(x, y, w, h, 0, get_window_overlay_number(PTROF(desktopWindow))); draw_filled_rectangle_to_overlay(x, y, w, h, 0, get_window_overlay_number(PTROF(desktopWindow)));
i := i + 1; i := i + 1;
END; END;

View File

@ -8,7 +8,7 @@ MODULE OS;
save_state_and_yield_task, start_dragging_window, handle_widget_click, fill_window, fill_overlay, save_state_and_yield_task, start_dragging_window, handle_widget_click, fill_window, fill_overlay,
set_window_flags, menu_update_event, menu_bar_click_event, close_menu, new_messagebox, set_window_flags, menu_update_event, menu_bar_click_event, close_menu, new_messagebox,
launch_fxf_from_disk, get_boot_disk_id, string_to_int, set_tilemap, draw_tile_to_overlay, launch_fxf_from_disk, get_boot_disk_id, string_to_int, set_tilemap, draw_tile_to_overlay,
ryfs_get_file_list, copy_memory_bytes, IsRomDiskAvailable, end_current_task: INT; ryfs_get_file_list, copy_memory_bytes, IsRomDiskAvailable, end_current_task, sleep_task: INT;
EXTERN PROCEDURE brk: INT; EXTERN PROCEDURE brk: INT;
@ -30,15 +30,6 @@ MODULE OS;
width, height, x, y: SHORT; width, height, x, y: SHORT;
END; END;
PROCEDURE Eep(ms: INT;); (* the furry version of sleep :3 *)
VAR deadline: INT;
BEGIN
deadline := ms + PortIn(80000706H);
WHILE PortIn(80000706H) <| deadline DO
save_state_and_yield_task();
END;
END;
PROCEDURE DrawWireframeBox(overlay, x, y, w, h, color: INT;); PROCEDURE DrawWireframeBox(overlay, x, y, w, h, color: INT;);
BEGIN BEGIN
draw_filled_rectangle_to_overlay(x, y, w, 1, color, overlay); draw_filled_rectangle_to_overlay(x, y, w, 1, color, overlay);