Skip to content

Windows#1

Merged
rozensoftware merged 6 commits into
masterfrom
windows
Jun 20, 2026
Merged

Windows#1
rozensoftware merged 6 commits into
masterfrom
windows

Conversation

@rozensoftware

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 20, 2026 19:01
@rozensoftware rozensoftware merged commit 22dd6e3 into master Jun 20, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a small GUI/widget layer (message boxes, buttons, mouse hit-testing) on top of the existing Amiga graphics runtime, plus demos and build helpers to compile/link examples against the lib/*.s runtime objects.

Changes:

  • Introduces lib/gui.s + lib/gui.i implementing rectangle fill/boxes, word-wrapped text, message boxes, buttons, and basic mouse polling/hit-testing.
  • Exposes graphics runtime symbols needed by the GUI text renderer (_DrawChar and cursor globals).
  • Adds a new msgbox_demo example and expands the stars demo Makefile to build all .has demos (plus a convenience build script for the msgbox demo).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
scripts/build_msgbox_demo.sh New helper script to compile + assemble + link the msgbox demo with runtime objects.
lib/gui.s New 68000 GUI/widget library (FillRect, DrawBox, word-wrap, widgets, mouse helpers).
lib/gui.i New include with GADGET struct offsets/constants and XREFs for gui entry points.
lib/graphics.s Exports _DrawChar and text cursor globals for external GUI code.
examples/msgbox_demo.has New demo showcasing DrawMsgBox/DrawButton + mouse interaction and sprite cursor.
examples/demos/stars/Texts.has New “Print/Text regression” demo for text cursor/wrapping behavior.
examples/demos/stars/Makefile Generalizes stars demo build to compile/link every .has demo and adds font object.

Comment thread lib/gui.s
Comment on lines +151 to +158
move.l d7,d0
mulu.w -6(a6),d0 ; d0 = row * row_stride
move.l d5,d1
mulu.w -4(a6),d1 ; d1 = plane * width_bytes
add.l d1,d0
add.l a2,d0 ; d0 += left_byte
move.l a0,a1
add.l d0,a1 ; a1 = address of first byte for this row/plane
Comment thread lib/gui.s
Comment on lines +205 to +208
; Middle full bytes: count = right_byte - left_byte - 1
move.l a3,d2
sub.l a2,d2 ; d2 = right_byte - left_byte
subq.l #1,d2 ; d2 = middle byte count (may be 0)
Comment thread lib/gui.i
Comment on lines +54 to +56
XREF GuiPollMouse
XREF GuiHitTest
XREF GuiHitTestRect
Comment thread examples/msgbox_demo.has
Comment on lines +14 to +17
// Build (link gui.s, graphics.s, font8x8.s alongside the generated .s):
// python -m hasc.cli examples/msgbox_demo.has -o build/msgbox_demo.s
// vasmm68k_mot -Fhunkexe -I lib/ -o build/msgbox_demo.o build/msgbox_demo.s lib/gui.s lib/graphics.s lib/font8x8.s lib/helpers.s
// vlink -bamigahunk build/msgbox_demo.o -o build/msgbox_demo.exe
Comment thread examples/msgbox_demo.has
Comment on lines +133 to +137
my = GetGuiMouseY();
call SetSpritePosition(0, mx, my);
if (GuiHitTestRect(100, 132, 120, 24) == 1) {
frame = 1; // Exit button clicked: leave the loop
}
Comment on lines +28 to +40
# Allow override: VASM=/path/to/vasmm68k_mot ./scripts/build_msgbox_demo.sh
VASM="${VASM:-vasmm68k_mot}"

if ! command -v "$VASM" &>/dev/null; then
# Fall back to the bundled vasm from the Amiga Assembly VS Code extension
BUNDLED="$HOME/.vscode/extensions/prb28.amiga-assembly-1.8.13/resources/bin/linux/vasmm68k_mot"
if [[ -x "$BUNDLED" ]]; then
VASM="$BUNDLED"
else
echo "ERROR: vasmm68k_mot not found. Set VASM=/path/to/vasmm68k_mot." >&2
exit 1
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants