Skip to content

Bridges support#425

Open
fmodesto wants to merge 3 commits into
OpenTTD:masterfrom
fmodesto:bridges
Open

Bridges support#425
fmodesto wants to merge 3 commits into
OpenTTD:masterfrom
fmodesto:bridges

Conversation

@fmodesto
Copy link
Copy Markdown

@fmodesto fmodesto commented May 2, 2026

Motivation

Add bridge support to NML

Description

  • Added Feature 0x06 bridge property mappings in Action0.
  • Wired bridge graphics handling into item processing so bridge graphics blocks are collected and emitted through the bridge Action0 path.
  • Bridge sprite algorithm step 1: ActionD reserves GRM generic sprites and stores the base in parameter 0x3F.
  • Bridge sprite algorithm step 2: ActionA emits the bridge sprite chunks.
  • Bridge sprite algorithm step 3: Action6 patches table offsets so references resolve to absolute GRM-based sprite IDs.
  • Bridge table output uses prop 0x0D with tables 0-5 for bridge parts and table 6 for bridge ends.

Open Questions

  • Should regression tests use proper bridge graphics instead of 1px placeholder sprites?
  • Is the current role split (back, front, pillars, head) the right abstraction, or should naming be changed?
  • Should we refactor shared item-processing code instead of keeping the current bridge-specific special case?

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