39 Commits

Author SHA1 Message Date
YourWishes 7ee04c78cd Rebuild UI as a scriptable element tree, archive the old system
The old UI system (X-macro static element list, hand-authored C
screens/widgets/focus stack) is archived under archive/ rather than
deleted, since it's a useful reference during the rewrite.

New native UI element pool (src/dusk/ui): a flat UI_ELEMENTS[128] pool
of tagged-union elements (Label, Rectangle, Scripted), a real
persistent parent/child tree (children[8] per element, cycle- and
capacity-checked uiElementSetParent), always-fresh worldX/worldY
(cheap enough to recompute on every read, no dirty-flag cache needed),
and cascading dispose. Rendering stays manual/immediate: a scripted
element with no render() override auto-renders its children by
default, but overriding render() takes full control (an override must
call renderChildren() itself to opt back in) -- this is deliberately
preserved end to end via a render()-shadow trampoline so overriding
render() always keeps working the same way regardless of how a node
is reached.

New scripting layer (src/dusk/script/module/ui): UIElement/Label/
Rectangle JS classes (Label/Rectangle share UIElement's prototype via
manual chaining, not JS `extends`), exposing x/y/worldX/worldY/parent/
add()/remove()/render()/renderChildren()/dispose(). UI.add()/
UI.remove() manage top-level render roots, mutually exclusive with
being someone's child.

Also: Scene gains a lateUpdate() hook (called once per frame after
every other update, for things like camera-follow that need to react
to where everything else ended up); several duskrpg call sites
(cutscene items, entityinteractable, entityplayer) that depended on
the now-archived RPG textbox are stubbed to console output instead of
a dialogue box, pending the new UI reaching that far.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 11:13:23 -05:00
YourWishes 335d79f2c4 NUked archive 2026-06-25 18:01:11 -05:00
YourWishes 26fcaf6e75 Restored some stuff 2026-06-25 11:53:15 -05:00
YourWishes e1498f538d Optimize chunk tile mesh 2026-06-11 14:45:53 -05:00
YourWishes f841a35a53 Revert "Disable old ent code"
This reverts commit efd31237be.
2026-05-21 11:07:21 -05:00
YourWishes efd31237be Disable old ent code 2026-05-21 10:18:20 -05:00
YourWishes 6d9e2dd3e1 UI first pass 2026-05-03 21:52:12 -05:00
YourWishes 0778ffb57a ECS POC 2026-04-10 07:31:31 -05:00
YourWishes da1a5a3f1b Asset refactor 2026-04-03 12:56:04 -05:00
YourWishes ca0e9fc3b2 Implement spritebatch properly. 2026-03-22 09:13:42 -05:00
YourWishes 8efdf59ebd More fixes 2026-03-08 10:20:55 -05:00
YourWishes dd048d9b0d Moved a bunch of code around 2026-03-07 09:35:56 -06:00
YourWishes 93074d653e idk 2026-03-06 16:34:45 -06:00
YourWishes 9ee446431b Moved build stuff to docker 2026-03-02 06:59:51 -06:00
YourWishes df106e3988 "progress" 2026-02-28 09:55:21 -06:00
YourWishes e5e8c49f6c Mostly nuking old system
Build Dusk / build-linux (push) Failing after 1m24s
Build Dusk / run-tests (push) Failing after 1m17s
Build Dusk / build-psp (push) Failing after 1m34s
Build Dusk / build-dolphin (push) Failing after 2m5s
2026-02-13 19:13:26 -06:00
YourWishes 13c4df0d85 Compiles on dolphin, finally
Build Dusk / run-tests (push) Successful in 1m39s
Build Dusk / build-linux (push) Successful in 1m34s
Build Dusk / build-psp (push) Successful in 2m7s
Build Dusk / build-dolphin (push) Successful in 1m48s
2026-02-08 19:30:02 -06:00
YourWishes 1c32158142 DOlphin progress 2026-02-04 10:16:16 -06:00
YourWishes 5cea284906 Map loading
Build Dusk / run-tests (push) Successful in 1m15s
Build Dusk / build-linux (push) Successful in 1m33s
Build Dusk / build-psp (push) Successful in 1m56s
2026-02-03 19:20:50 -06:00
YourWishes 053778a502 Refactored and simplified lua stuff a lot.
Build Dusk / run-tests (push) Failing after 1m23s
Build Dusk / build-linux (push) Failing after 1m47s
Build Dusk / build-psp (push) Failing after 1m41s
2026-02-01 21:28:21 -06:00
YourWishes 794e0574ad Moved a few things around, definitely not clean but better.
Build Dusk / run-tests (push) Failing after 2m3s
Build Dusk / build-linux (push) Successful in 2m13s
Build Dusk / build-psp (push) Successful in 1m56s
2026-01-28 15:00:59 -06:00
YourWishes af5bf987c8 Add inventory.
Build Dusk / run-tests (push) Successful in 2m12s
Build Dusk / build-linux (push) Successful in 1m49s
Build Dusk / build-psp (push) Successful in 1m52s
2026-01-06 07:47:16 -06:00
YourWishes 1ce1fdff8d Refactor asset loading 2025-11-04 22:23:44 -06:00
YourWishes 7c11a7e5bc Started asset refact 2025-11-04 10:15:19 -06:00
YourWishes 3feb43fdad idk 2025-10-26 08:06:39 -05:00
YourWishes fc52afdb00 Refator pass 1 2025-10-06 19:14:52 -05:00
YourWishes 22e2f703db Refact 2025-10-01 13:20:34 -05:00
YourWishes 16a0403fd4 Working on cmd bind 2025-09-07 23:53:21 -05:00
YourWishes 87f18d0e13 Rendering on PSP again. 2025-09-02 21:14:07 -05:00
YourWishes 14c41d33a7 Asset manager refactor begin. 2025-09-01 21:00:50 -05:00
YourWishes 3e61d6f84d Palette assets improved. 2025-09-01 20:07:12 -05:00
YourWishes af1329710d Made a big mess of the codebase 2025-08-28 07:14:13 -05:00
YourWishes 479aad2f06 Going to redo assets. 2025-08-24 13:57:12 -05:00
YourWishes 1dfde00317 Removed DUSK_ prefix 2025-08-23 10:13:49 -05:00
YourWishes f9385ed233 ECS rendering 2025-08-22 16:15:42 -05:00
YourWishes 94ad64675d cleaned more stuff 2025-08-22 12:40:18 -05:00
YourWishes fbfcbe9578 archivemuh 2025-08-20 19:18:38 -05:00
YourWishes d48d927202 textbox renders. 2025-08-17 17:58:53 -05:00
YourWishes 26ecf67472 Suspiciously everything worked when changing to floats 2025-08-10 09:00:00 -05:00