Skip to content

implement missing lingo features for dino quest#81

Open
matthewdean wants to merge 9 commits intomainfrom
fix-dino-quest
Open

implement missing lingo features for dino quest#81
matthewdean wants to merge 9 commits intomainfrom
fix-dino-quest

Conversation

@matthewdean
Copy link
Collaborator

@matthewdean matthewdean commented Mar 21, 2026

Summary

  • Implement findEmpty as both a global built-in and castLib method, using config min/max member bounds
  • Support member ref as location argument in new() handler (e.g. new(#bitmap, member(slot, castLib)))
  • Handle prop list and integer color arguments in bitmap fill 5-arg form
  • Render upscaled indexed pixels in ink 36 copyPixels (originally-indexed bitmaps upscaled to 32-bit)
  • Implement findPosNear for sorted (binary search) and unsorted (exact match) lists
  • Support int/float * list multiplication for any list length (was restricted to 2-element lists)
  • Return point(0, 0) for regPoint on field cast members
  • Treat VOID as 0 when negating

Game is not fully fixed but loads much further:
image

Test plan

  • All changes compile without errors
  • Dino Quest loads past initial scripts without crashing
  • Verify bitmap rendering looks correct (no missing pixels from ink 36)

🤖 Generated with Claude Code

matthewdean and others added 8 commits March 20, 2026 20:19
Finds the next empty cast member slot, using min_member/max_member
bounds from the movie config. Supports both findEmpty(memberRef)
global syntax and castLib(n).findEmpty(memberRef) method syntax.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Allows new(#bitmap, member(slot, castLib)) to create a member at a
specific slot, instead of only accepting a castLib reference.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The 5-arg fill(x, y, w, h, param) previously only accepted a ColorRef.
Now also handles prop lists (extracting #color) and integers (palette index).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When an indexed bitmap has been upscaled to 32-bit, get_pixel_color_ref
returns Rgb instead of PaletteIndex. Render these pixels using their
RGB values with bg-color transparency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
For sorted lists, uses binary search to find the insertion point.
For unsorted lists, falls back to exact match like findPos.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously only handled 2-element lists (points). Director allows
scalar * list to multiply each element, regardless of list size.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Director returns a default regPoint for non-bitmap members rather
than erroring.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Director treats VOID as 0 in arithmetic contexts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matthewdean matthewdean changed the title fix dino quest: implement missing lingo features implement missing lingo features for dino quest Mar 21, 2026
@matthewdean matthewdean requested a review from igorlira March 21, 2026 04:24
Comment on lines +308 to +311
"regPoint" => Ok(Datum::Point([
player.alloc_datum(Datum::Int(0)),
player.alloc_datum(Datum::Int(0)),
])),
Copy link
Owner

Choose a reason for hiding this comment

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

It's okay to hardcode this for now until we come across a movie that requires real values, let's just add a TODO comment here so that this doesn't get lost

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added one additional commit where we properly implement regPoint.

regPoint is a Member property available on all visual cast member
types per the Director spec. Store it on the base CastMember struct
and handle get/set in the common property path rather than per-type.
Bitmap reg_point is synced to BitmapMember.reg_point for rendering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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