Skip to content

fixes for bionicle atticmedia#73

Closed
matthewdean wants to merge 47 commits intoigorlira:mainfrom
matthewdean:bionicle-atticmedia
Closed

fixes for bionicle atticmedia#73
matthewdean wants to merge 47 commits intoigorlira:mainfrom
matthewdean:bionicle-atticmedia

Conversation

@matthewdean
Copy link
Collaborator

I've developed all of these fixes in order to make Bionicle Atticmedia playable. I am confident about most of these changes but they will almost certainly introduce regressions in other games; I've flagged the changes I'm most suspicious of under the first section below.

In the future I'll try to split out and make smaller PRs for sets of related changes - can do that for this PR if desirable.

Most deserving of scrutiny

  • handle bare go command as gotoLoop
  • implement inks 37 (Light) and 39 (Dark)
  • use spriteListIdx to load behaviors, fall back to using channels only when needed (multiple commits)

matthewdean and others added 30 commits March 12, 2026 00:44
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ame_intervals

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
matthewdean and others added 14 commits March 12, 2026 00:47
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When Lingo sets sprite properties (blend, width, height, loc, member,
ink, foreColor, backColor, moveable, editable), those properties become
immune to score overwriting on frame transitions. This matches Director's
auto-puppet behavior where go-to-the-frame loops no longer reset
Lingo-modified properties each frame.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move the SIZE_CHANGED_BY_LINGO check before NON_PROPORTIONAL_SCALE in
get_concrete_sprite_rect. Integer truncation from multiplicative growth
(e.g. width *= 1.1) caused the non-proportional check to override
Lingo-set dimensions with the bitmap's natural size.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dimensions

Score data often stores approximate bounding-box dimensions (e.g. 316x24)
rather than the bitmap's true size (400x29). Previously has_size_changed
was set both by score initialization and Lingo setters, causing score
bounding-box dimensions to be incorrectly trusted. The new has_lingo_size
flag is only set by Lingo property setters (width, height, right, bottom),
so the render heuristic in get_concrete_sprite_rect can correctly fall
through to NON_PROPORTIONAL_SCALE for score-set dimensions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Director's ink type 2 is "Background Transparent" but was falling through
to Copy ink in all rendering paths. Add ink 2 to every check that already
handled ink 36, across GPU shaders, software rendering, and button/text paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ngs corrupting frame_count

Accept any entry >= 40 bytes with u32 alignment as a SpriteInfo candidate,
but validate start_frame (1-100000) and end_frame (>= start_frame, <= 100000).
This prevents name strings or parameter data from being misinterpreted as
SpriteInfo, which produced garbage frame numbers (e.g. 0x6F6E6674 = "onft").

Also skip 3-entry groups (SpriteInfo, behaviors, name) with i += 3 instead
of lookahead scanning, and remove a duplicate logging block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d event dispatch

Parse channel 0 into a dedicated FrameScriptData struct instead of stuffing it
into ScoreFrameChannelData. Attach behaviors from sprite_details via
scriptSpriteListIdx. Dispatch beginSprite/enterFrame/exitFrame to channel 0
behavior instances.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously only lists of length 2 were handled (as pseudo-points).
Now element-wise multiplication works for lists of any size,
fixing errors like [142, 166, 69] * 14.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@matthewdean matthewdean changed the title Bionicle Atticmedia fixes fixes for bionicle atticmedia Mar 12, 2026
@matthewdean matthewdean requested a review from igorlira March 12, 2026 07:52
The word_boundary commit accidentally dropped the required WHITESPACE+
separator, causing put_into/before/after chunk expression tests to fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@matthewdean matthewdean marked this pull request as ready for review March 12, 2026 08:05
matthewdean and others added 2 commits March 12, 2026 10:00
The -zstack-size flag is only valid for wasm targets but was being
emitted unconditionally, preventing native cargo test from linking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…head

word_boundary checks in non-atomic rules were broken by pest's implicit
whitespace insertion — the implicit WHITESPACE* between keyword and
boundary check consumed the space, causing the boundary check to see the
next token and fail. This broke parsing of "castLib 1", "char 1 of x",
"go "choose toa"", etc.

Replace with &reserved_keyword positive lookahead which runs atomically
(no implicit WS), confirms keyword boundary, then consumes nothing.
Also adds "member" and "put" to reserved_keyword, simplifies handler_call
and command_inline by relying on lang_ident to reject reserved keywords.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@matthewdean
Copy link
Collaborator Author

Still has errors on e.g. the contact info submission screen but got to a good stopping place

@matthewdean
Copy link
Collaborator Author

Will open a few more reasonably-sized PRs instead

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.

1 participant