Skip to Content
The Alchemy Project

struct MAP_LAYER

One background layer of the field map: its scroll position, origin, parallax against the view, drift and wrap, and its window of metatiles.

Declared in map_grid.h.

Fields

NameDescription
FIXEDx, y , y16.16 fixed-point pixels.
FIXEDoffsetX, offsetY , offsetY16.16 fixed-point pixels.
FIXEDscaleX, scaleY , scaleY16.16 fixed point, toFIXED(1) moves with the view.
FIXEDspeedX, speedY , speedY16.16 fixed-point pixels per tick.
FIXEDphaseX, phaseY , phaseY16.16 fixed-point pixels.
Uint16maskX, maskY , maskYThe window's wrap masks over its metatile columns and rows, maskY's a row times MAPGRID_SIZE: MAPGRID_SIZE - 1 and MAPGRID_ROW_MASK for the whole grid.
Uint16originX, originY , originYThe metatile column and row of the layer's window.
MAP_METATILE *metatilesThe layer's first metatile in the map
Uint8 *terrainIdsmetatile buffer.

Description

One background layer of the field map: its scroll position, origin, parallax against the view, drift and wrap, and its window of metatiles.

struct MAP_LAYER

Referenced by fdCycloneCopyTouchedMetatiles(), fdMapGridCopyDrawnPicturesRect(), fdMapGridCopyMetatileTilesIndicesRect(), fdMapGridGetLayer(), fdMapGridLoadMap(), fdMapGridRenderMetatileTilesColumn(), fdMapGridRenderMetatileTilesRow(), fdMapGridSetCameraCenter(), fdMapGridUpdateLayerScroll(), fdTileCopiesCopyTouchedMetatiles(), scAirsRockDriftFog(), scAirsRockLiftFog(), scAirsRockWhirlwindClearsFog(), scAnkohlRuinsDrawSand(), scAnkohlRuinsInitSand(), scAquaRockInsideAddSpouts(), scAquaRockInsideBlockMoaiWithPillar(), scAquaRockInsideDouseFloodedHallEastMoai(), scAquaRockInsideDouseFloodedHallWestMoai(), scAquaRockInsideDouseLowerExitMoai(), scAquaRockInsideDouseWaterfallMoai(), scAquaRockInsideWaterSinks(), scCrackedTileFind(), scDriftScenePrepare(), scEasternAlhafraFillWaveLines(), scGabombaStatueChamberInitLift(), scGabombaStatueChamberRideLiftBackUp(), scGabombaStatueChamberRideLiftDown(), scGaiaRockInsideBlankLayer(), scGaiaRockInsideDrawMazeRoom(), scGarohMatchSecondLayer(), scGarohWavePathLayer(), scIdejimaUpdateWaveLines(), scIsletsFillWaveLines(), scJupiterLighthouseLowerElevator(), scJupiterLighthouseRaiseElevator(), scLayerTrackScroll(), scLemuriaFillRippleLines(), scLemurianShipDeckBobDeck(), scLemurianShipDeckScrollWaves(), scLemuriaSpringDrainSpring(), scMagmaRockInsideRaiseLava(), scPrepareMap(), scSeaOfTimeAnimateSea(), scShamanVillageDriftSandLayer(), scShrineOfTheSeaGodInitRightProng(), scShrineOfTheSeaGodLiftWithWater(), scShrineOfTheSeaGodLowerWater(), scShrineOfTheSeaGodLowerWaterBand(), scShrineOfTheSeaGodLowerWaterLayer() and 6 more.

Definition at line 181 of file map_grid.h.

Fields in detail

x, y

FIXED x, y

16.16 fixed-point pixels.

offsetX, offsetY

FIXED offsetX, offsetY

16.16 fixed-point pixels.

scaleX, scaleY

FIXED scaleX, scaleY

16.16 fixed point, toFIXED(1) moves with the view.

speedX, speedY

FIXED speedX, speedY

16.16 fixed-point pixels per tick.

phaseX, phaseY

FIXED phaseX, phaseY

16.16 fixed-point pixels.

maskX, maskY

Uint16 maskX, maskY

The window's wrap masks over its metatile columns and rows, maskY's a row times MAPGRID_SIZE: MAPGRID_SIZE - 1 and MAPGRID_ROW_MASK for the whole grid.

originX, originY

Uint16 originX, originY

The metatile column and row of the layer's window.

metatiles

MAP_METATILE *metatiles

The layer's first metatile in the map

terrainIds

Uint8 *terrainIds

metatile buffer.