From 5d25e2b6a79fb44042b8fa50f5b35e28d779e8f6 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Thu, 10 Oct 2024 18:36:19 -0700 Subject: [PATCH] DeskTop: Shave 23 bytes using smaller rect offset code No functional changes. --- desktop/desktop.s | 2 +- desktop/main.s | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/desktop/desktop.s b/desktop/desktop.s index a944a16e..570a6431 100644 --- a/desktop/desktop.s +++ b/desktop/desktop.s @@ -30,7 +30,7 @@ DEFSEG SegmentLoader, $2000, $0200 DEFSEG SegmentDeskTopAux, $4000, $8000 DEFSEG SegmentDeskTopLC, $D000, $2000 - DEFSEG SegmentDeskTopMain, $4000, $7900 + DEFSEG SegmentDeskTopMain, $4000, $7800 DEFSEG SegmentInitializer, $0800, $0900 DEFSEG SegmentInvoker, $0290, $0160 diff --git a/desktop/main.s b/desktop/main.s index b56a9d91..2d5b4315 100644 --- a/desktop/main.s +++ b/desktop/main.s @@ -3558,10 +3558,17 @@ common: copy #(560 / kDeltaX), iter_count rect_loop: - add16 delta_x, tmp_rect+MGTK::Rect::x1, tmp_rect+MGTK::Rect::x1 - add16 delta_x, tmp_rect+MGTK::Rect::x2, tmp_rect+MGTK::Rect::x2 - add16 delta_y, tmp_rect+MGTK::Rect::y1, tmp_rect+MGTK::Rect::y1 - add16 delta_y, tmp_rect+MGTK::Rect::y2, tmp_rect+MGTK::Rect::y2 + ;; Offset rect + ptr := $06 + copy16 #tmp_rect, ptr + ldy #0 + ldx #2 +: add16in (ptr),y, delta_x, (ptr),y + iny + add16in (ptr),y, delta_y, (ptr),y + iny + dex + bne :- copy #0, index icon_loop: