Complete the overworld foundation
Checks / web (push) Canceled after 0s

Port forced movement (turn delays, bumps, ice, currents, pits), dynamic
return warps, elevators, Surf, Cut, Strength and cycling rules, working
map blocks with changeblock/changemapblocks, and the remaining NPC
movement types and movement commands.

Add tileset animation from the ROM's command tables, grass sprite
priority and special map palettes; room decorations with ownership, the
bedroom PC and save migration; and Key Items access to the Bicycle.

Fourteen original-engine traces compare positions, facing, actors, event
flags and scripted poses. Tile animation matches original VRAM for four
tilesets, and LoadMapPals matches 192 palette cases. skyfall_top now
keeps the $60 sprite offset its step function leaves behind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sébastien QUEROLandClaude Opus 5.5 committed 2026-09-25 16:47:29 +02:00
1 parent 9ac111f262
commit 451464f7c6
38 files changed
+5600 -490

No files matched your search

+14 -1
View File
@@ -10,7 +10,15 @@ export function drawTile(
x: number,
y: number,
palette: Palette,
options: { transparent?: boolean; flipX?: boolean; flipY?: boolean } = {},
options: {
transparent?: boolean;
flipX?: boolean;
flipY?: boolean;
/** Background color indices per pixel: a background tile records them;
* an OAM_PRIO sprite (`behind`) only draws over color 0. */
indices?: Uint8Array;
behind?: boolean;
} = {},
) {
const offset = tile * 16;
if (offset < 0 || offset + 16 > graphics.length) return;
@@ -25,6 +33,11 @@ export function drawTile(
const px = x + col,
py = y + row;
if (px < 0 || py < 0 || px >= width || py >= height) continue;
if (options.indices) {
if (options.behind) {
if (options.indices[py * width + px]) continue;
} else if (!options.transparent) options.indices[py * width + px] = index;
}
const destination = (py * width + px) * 4,
color = palette[index];
target[destination] = color[0];