SGDK
A free and open development kit for the Sega Mega Drive
Loading...
Searching...
No Matches
Map Struct Reference

Map structure containing information for large background/plane update based on MapDefinition. More...

#include <map.h>

Public Attributes

u16 w
u16 h
u16metaTiles
void * blocks
void * blockIndexes
u16blockRowOffsets
VDPPlane plane
u16 baseTile
u32 posX
u32 posY
u16 wMask
u16 hMask
u16 planeWidth
u16 planeHeight
u16 planeWidthMaskAdj
u16 planeHeightMaskAdj
u16 planeWidthSftAdj
u16 firstUpdate
u16 lastXT
u16 lastYT
u16 hScrollTable [240]
u16 vScrollTable [20]
void(* prepareMapDataColumnCB )(Map *map, u16 *bufCol1, u16 *bufCol2, u16 xm, u16 ym, u16 height)
void(* prepareMapDataRowCB )(Map *map, u16 *bufRow1, u16 *bufRow2, u16 xm, u16 ym, u16 width)
MapDataPatchCallbackmapDataPatchCB
u16(* getMetaTileCB )(Map *map, u16 x, u16 y)
void(* getMetaTilemapRectCB )(Map *map, u16 x, u16 y, u16 w, u16 h, u16 *dest)

Detailed Description

Map structure containing information for large background/plane update based on MapDefinition.

Parameters
wmap width in block (128x128 pixels block)
hmap height in block (128x128 pixels block)
metaTilesinternal - unpacked data of MapDefinition.metaTiles
blocksinternal - unpacked data of MapDefinition.blocks
blockIndexesinternal - unpacked data of MapDefinition.blockIndexes
blockRowOffsetsinternal - direct access of MapDefinition.blockRowOffsets
planeVDP plane where MAP is draw
baseTileBase tile attributes used to provide base tile index offset and base palette index (see TILE_ATTR_FULL() macro)
posXcurrent view position X set using MAP_scrollTo(..) method
posYcurrent view position Y set using MAP_scrollTo(..) method
wMaskinternal
hMaskinternal
planeWidthMaskinternal
planeHeightMaskinternal
lastXTinternal
lastYTinternal
hScrollTableinternal
vScrollTableinternal
prepareMapDataColumnCBinternal
prepareMapDataRowCBinternal
patchMapDataColumnCBinternal
patchMapDataRowCBinternal
getMetaTileCBinternal
getMetaTilemapRectCBinternal

The documentation for this struct was generated from the following file: