mapdata#

Represents a single map screen.

Depending on how the mapdata was loaded, it may represent: - a temporary copy of the current screen (Game->LoadTempScreen()) - a temporary copy of a scrolling screen (Game->LoadScrollingScreen()) - the canonical copy of a screen (Game->LoadMapData())

Variables#

int

Valid

int

Guy

int

String

int

RoomType

int

Item

int[]

TileWarpType

int

Script

untyped[]

InitD

bool[]

TileWarpOverlay

int

DoorComboSet

int[]

WarpReturnX

int[]

WarpReturnY

int

StairsX

int

StairsY

int

ItemX

int

ItemY

int

Palette

int[]

Door

int[]

TileWarpDMap

int[]

TileWarpScreen

int

ExitDir

int[]

Enemy

int

Pattern

int[]

SideWarpType

int[]

SideWarpOverlay

int

WarpArrivalX

int

WarpArrivalY

int[]

MazePath

int[]

SideWarpScreen

int[]

SideWarpID

int[]

TileWarpReturnSquare

int[]

SideWarpReturnSquare

int[]

SideWarpDMap

int

UnderCombo

int

UnderCSet

int

Catchall

int

CSensitive

int

NoReset

int

NoCarry

int[]

LayerMap

int[]

LayerScreen

int[]

LayerOpacity

bool[]

LayerInvisible

bool[]

ScriptDraws

int

TimedWarpTimer

int

NextMap

int

NextScreen

int[]

SecretCombo

int[]

SecretCSet

int[]

SecretFlags

int[]

FFCData

int[]

FFCCSet

int[]

FFCDelay

int[]

FFCX

int[]

FFCY

int[]

FFCVx

int[]

FFCVy

int[]

FFCAx

int[]

FFCAy

int[]

FFCFlags

int[]

FFCEffectWidth

int[]

FFCEffectHeight

int[]

FFCTileWidth

int[]

FFCTileHeight

int[]

FFCLink

int[]

FFCScript

int

AmbientSFX

int

BossSFX

int

SecretSFX

int

ItemSFX

int

MIDI

int[]

Flags

int[]

ComboD

int[]

ComboC

int[]

ComboF

int[]

ComboI

int[]

ComboT

int[]

ComboS

int[]

ComboE

bool[]

State

bool[]

ExState

const int[]

EFlags

const int

Map

const int

Screen

bool[]

LensShows

bool[]

LensHides

int

DataSize

untyped[]

Data

int

GuyCount

bool[]

FFCRunning

int

OceanSFX

int

CSet

int

CarryoverMap

const int

CarryoverScreen

untyped[]

D deprecated

int

HasItem deprecated

const int[]

SFlags deprecated

int

WarpReturnC deprecated

int

EnemyFlags deprecated

int

SideWarpIndex deprecated

int

EntryX deprecated

int

EntryY deprecated

const bool[]

NumFFCs deprecated

int

LensLayer deprecated

Functions#

bool

isSolid(int x, int y)

bool

isSolidLayer(int x, int y, int layer)

untyped

GetFFCInitD(int ffc_index, int n)

void

SetFFCInitD(int ffc_index, int n, untyped value)

bool

GetExDoor(int dir, int index)

void

SetExDoor(int dir, int index, bool state)

int

GetFFCInitA(int ffc_index, int n)

int

SetFFCInitA(int ffc_index, int init_a, int value)

Variable descriptions#

int Valid πŸ”— Source

Returns true if the screen is β€˜valid’. Screens that appear with the default blue background in ZQuest are β€˜invalid’. Modifying a combo on a screen makes it become β€˜valid’. If a layer is β€˜invalid’, it will not be drawn.


int Guy πŸ”— Source

The screen guy.


int String πŸ”— Source

The screen string.


int RoomType πŸ”— Source

The screen room type. Use the RT_ constants for this value.


int Item πŸ”— Source

The item placed on the screen. -1 if no item placed.


int[] TileWarpType πŸ”— Source

The Tile Warp type for Tile Warps A, B, C, and D; [0], [1], [2], and [3] respectively.

Valid values: WarpType (WT_).


int Script πŸ”— Source

The screen script that runs on this screen.


untyped[] InitD πŸ”— Source

The 8 script arguments for the script that runs on this screen.


bool[] TileWarpOverlay πŸ”— Source

Set or get the overlay state for the warp ID corresponding to the index of this array.


int DoorComboSet πŸ”— Source

The Door Set used for the NES dungeon doors on this screen.


int[] WarpReturnX πŸ”— Source

The X-component for each of the four 2.50+ (blue) warp return squares.


int[] WarpReturnY πŸ”— Source

The Y-component for each of the four 2.50+ (blue) warp return squares.


int StairsX πŸ”— Source

The X/Y position of the β€˜Stairs’ secret on the screen.


int StairsY πŸ”— Source

The X/Y position of the β€˜Stairs’ secret on the screen.


int ItemX πŸ”— Source

The X/Y position the screen’s item spawns at.


int ItemY πŸ”— Source

The X/Y position the screen’s item spawns at.


int Palette πŸ”— Source

The palette set in the F4 menu in ZQuest for this screen. Has no effect during play, but can be read and written.


int[] Door πŸ”— Source

The 4 door states of the screen.

Valid indices: DIR_UP, DIR_DOWN, DIR_LEFT, DIR_RIGHT


int[] TileWarpDMap πŸ”— Source

The destination DMap for each of the four warp types.


int[] TileWarpScreen πŸ”— Source

The destination screen for each of the four warp types.


int ExitDir πŸ”— Source

The Maze Path β€˜Exit Direction’.


int[] Enemy πŸ”— Source

The 10 enemies that appear on this screen.


int Pattern πŸ”— Source

The spawn pattern for the screen enemies.

Valid values: EnemyPattern (PATTERN_).


int[] SideWarpType πŸ”— Source

The Sidewarp type for Sidewarps A, B, C, and D; [0], [1], [2], and [3] respectively.

Valid values: WarpType (WT_).


int[] SideWarpOverlay πŸ”— Source

Set or get the overlay state for the warp ID corresponding to the index of this array.


int WarpArrivalX πŸ”— Source

The X-component for the pre-2.50 (green) arrival square.


int WarpArrivalY πŸ”— Source

The X-component for the pre-2.50 (green) arrival square.


int[] MazePath πŸ”— Source

The four directions you must go for the maze path.

Valid indices: DIR_UP, DIR_DOWN, DIR_LEFT, DIR_RIGHT


int[] SideWarpScreen πŸ”— Source

The destination screen for each of the four sidewarps.


int[] SideWarpID πŸ”— Source

Returns the sidewarp ID for a given screen edge, as SideWarpID``dir``;

Returns SIDEWARP_NONE if there is no sidewarp in that direction.

Valid indices: DIR_UP, DIR_DOWN, DIR_LEFT, DIR_RIGHT Valid values: SideWarpIndex (SIDEWARP_)


int[] TileWarpReturnSquare πŸ”— Source

The return square used by the Tile Warp (A, B, C, D).


int[] SideWarpReturnSquare πŸ”— Source

The return square used by the Side Warp (A, B, C, D).


int[] SideWarpDMap πŸ”— Source

The destination DMap for each of the four sidewarps.


int UnderCombo πŸ”— Source

The screen’s undercombo, which will appear as a result of various combo interactions, such as pushing blocks, awakening armos, etc.


int UnderCSet πŸ”— Source

The CSet associated with the undercombo.


int Catchall πŸ”— Source

The screen’s β€˜catchall’ value. This is the roomtype-specific data, such as the β€˜Special Item’ in a β€˜Special Item’ room.


int CSensitive πŸ”— Source

The value of damage combo sensitivity for the screen.


int NoReset πŸ”— Source

The No Reset carryover flags.


int NoCarry πŸ”— Source

The No Carry Over carryover flags.


int[] LayerMap πŸ”— Source

The map and screen for each layer. Index [0] of these arrays does nothing, and is invalid to access.


int[] LayerScreen πŸ”— Source

The map and screen for each layer. Index [0] of these arrays does nothing, and is invalid to access.


int[] LayerOpacity πŸ”— Source

The opacity value (OP_OPAQUE or OP_TRANS) for each layer. Index [0] does nothing, and is invalid to access.


bool[] LayerInvisible πŸ”— Source

If true, the given layer is invisible and will not be drawn.


bool[] ScriptDraws πŸ”— Source

If false, the given layer of script draws will be disabled on this screen.


int TimedWarpTimer πŸ”— Source

The timer used by β€˜Time Warp Tics’ in Screen Data->T.Warp


int NextMap πŸ”— Source

The map and screen that screen states carry over to.


int NextScreen πŸ”— Source

The map and screen that screen states carry over to.


int[] SecretCombo πŸ”— Source

The combo that will be placed for each secret type.


int[] SecretCSet πŸ”— Source

The cset that will be placed for each secret type.


int[] SecretFlags πŸ”— Source

The screen flags that will be placed for each secret type.


int[] FFCData πŸ”— Source

The Data (combo ID) variable for each of the ffcs on the screen.

See ffc::Data for more details.


int[] FFCCSet πŸ”— Source

The CSet variable for each of the ffcs on the screen.

See ffc::CSet for more details.


int[] FFCDelay πŸ”— Source

The Delay variable for each of the ffcs on the screen.

See ffc::Delay for more details.


int[] FFCX πŸ”— Source

The X variable for each of the ffcs on the screen.

See ffc::X for more details.


int[] FFCY πŸ”— Source

The Y variable for each of the ffcs on the screen.

See ffc::Y for more details.


int[] FFCVx πŸ”— Source

The Vx variable for each of the ffcs on the screen.

See ffc::Vx for more details.


int[] FFCVy πŸ”— Source

The Vy variable for each of the ffcs on the screen.

See ffc::Vy for more details.


int[] FFCAx πŸ”— Source

The Ax variable for each of the ffcs on the screen.

See ffc::Ax for more details.


int[] FFCAy πŸ”— Source

The Vy variable for each of the ffcs on the screen.

See ffc::Vy for more details.


int[] FFCFlags πŸ”— Source

The Flags variable for each of the ffcs on the screen.

See ffc::Flags[] for more details.


int[] FFCEffectWidth πŸ”— Source

The EffectWidth variable for each of the ffcs on the screen.

See ffc::EffectWidth for more details.


int[] FFCEffectHeight πŸ”— Source

The EffectHeight variable for each of the ffcs on the screen.

See ffc::EffectHeight for more details.


int[] FFCTileWidth πŸ”— Source

The TileWidth variable for each of the ffcs on the screen.

See ffc::TileWidth for more details.


int[] FFCTileHeight πŸ”— Source

The TileHeighr variable for each of the ffcs on the screen.

See ffc::TileHeight for more details.


The Link variable for each of the ffcs on the screen.

See ffc::Link for more details.


int[] FFCScript πŸ”— Source

The Script variable for each of the ffcs on the screen.

See ffc::Script for more details.


int AmbientSFX πŸ”— Source

The SFX for the ambient sound of the screen.


int BossSFX πŸ”— Source

The SFX for the boss roar on this screen.


int SecretSFX πŸ”— Source

The SFX that will play when secrets are triggered on this screen.


int ItemSFX πŸ”— Source

The SFX that will play when an item is held up on this screen.


int MIDI πŸ”— Source

The β€˜Screen MIDI’ to play for this screen.


int[] Flags πŸ”— Source

Arrays containing flag data for each screen.


int[] ComboD πŸ”— Source

The Combo ID placed at each position on the screen.


int[] ComboC πŸ”— Source

The CSet of the combo placed at each position on the screen.


int[] ComboF πŸ”— Source

The mapflag placed at each position on the screen.


int[] ComboI πŸ”— Source

The inherent flag of the combo placed at each position on the screen.


int[] ComboT πŸ”— Source

The combo type of the combo placed at each position on the screen.


int[] ComboS πŸ”— Source

The solidity map of the combo placed at each position on the screen.


int[] ComboE πŸ”— Source

The effect map of the combo placed at each position on the screen.


bool[] State πŸ”— Source

The screen states used for this screen. Use the ST_ constants to access this.


bool[] ExState πŸ”— Source

The 32 β€˜Extra States’ used for this screen.


const int[] EFlags πŸ”— Source

Arrays containing flag data for each screen.


const int Map πŸ”— Source

Returns the map this mapdata points to.


const int Screen πŸ”— Source

Returns the screen this mapdata points to.


bool[] LensShows πŸ”— Source

Arrays of the 7 layer show/hide values for the lens of truth.


bool[] LensHides πŸ”— Source

Arrays of the 7 layer show/hide values for the lens of truth.


int DataSize πŸ”— Source

Read-write, the size of the Data[] array.


untyped[] Data πŸ”— Source

Resizable array of data for scripts to use. All changes are saved to the save file.


int GuyCount πŸ”— Source

Number of enemies remaining alive on this screen.


bool[] FFCRunning πŸ”— Source

Returns true if the specified ffc is running a script?

May be used to pause/resume ffc script execution?

This needs to be cloned over to ffc->Running


int OceanSFX πŸ”— Source

The β€˜Ambient Sound’ under S.Data2.

Rename this to AmbientSFX, or just SFX.


int CSet πŸ”— Source

The screen palette.


int CarryoverMap πŸ”— Source


const int CarryoverScreen πŸ”— Source


untyped[] D πŸ”— Source

Improperly implemented. Was meant to relate as Screen->D, except that

Screen->D is not bound to layermap.

Warning

Deprecated! mapdata->D[] has never worked!


int HasItem πŸ”— Source

If not zero, then the item for this screen will be shown.

When Link takes the item on a screen, this is set to 0.

Warning

Deprecated! Check β€˜->Item > -1’ instead!


const int[] SFlags πŸ”— Source

Warning

Deprecated! Use Flags[] instead!


int WarpReturnC πŸ”— Source

Stores the information on warp returns, butwise.

The bits are DDCCBBAADDCCBBAA, where the left section is sidewarp returns, and the right is tilewarp returns.

Warning

Deprecated! by SideWarpReturnSquare[4] and TileWarpReturnSquare[4]


int EnemyFlags πŸ”— Source

A flagset for enemies on the screen (E.Flags).

Valid values (ORd) together, are:

TODO: write the values here

Warning

Deprecated!


int SideWarpIndex πŸ”— Source

The warp return IDs.

Warning

Deprecated! by SideWarpID[].


int EntryX πŸ”— Source

Warning

Deprecated! Use Hero->RespawnX instead!


int EntryY πŸ”— Source

Warning

Deprecated! Use Hero->RespawnY instead!


const bool[] NumFFCs πŸ”— Source

Warning

Deprecated!


int LensLayer πŸ”— Source

Warning

Deprecated!


Function descriptions#

bool isSolid(int x, int y) πŸ”— Source

Returns true if the given x,y position on the screen is β€˜solid’.


bool isSolidLayer(int x, int y, int layer) πŸ”— Source

Returns true if the given x,y position on the screen is β€˜solid’.


untyped GetFFCInitD(int ffc_index, int n) πŸ”— Source

Returns the value of InitD``n`` for the ffc on the screen with an ID of ffc_index.

This needs to be converted to the type β€˜untyped’ to comply with the change of float ffc->InitD[] to untyped ffc->InitD[]

Note: Expressed as a function due to lack of 2D arrays in ZScript.

With 2D arrays, this would simply be FFCInitD[32][8].


void SetFFCInitD(int ffc_index, int n, untyped value) πŸ”— Source

Sets the value of InitD``n`` for the ffc on the screen with an ID of ffc_index.

β€˜int value’ needs to be converted to the type β€˜untyped’ to comply with the change of float ffc->InitD[] to untyped ffc->InitD[]

Note: Expressed as a function due to lack of 2D arrays in ZScript.

With 2D arrays, this would simply be FFCInitD[32][8].


bool GetExDoor(int dir, int index) πŸ”— Source

Returns a door state for the screen.


void SetExDoor(int dir, int index, bool state) πŸ”— Source

Sets a door state for the screen.


int GetFFCInitA(int ffc_index, int n) πŸ”— Source

Returns the value of InitA``n`` for the ffc on the screen with an ID of ffc_index.

Note: Expressed as a function due to lack of 2D arrays in ZScript.

With 2D arrays, this would simply be FFCInitA[32][2].


int SetFFCInitA(int ffc_index, int init_a, int value) πŸ”— Source

Sets the value of InitA``n`` for the ffc on the screen with an ID of ffc_index.

Note: Expressed as a function due to lack of 2D arrays in ZScript.

With 2D arrays, this would simply be FFCInitA[32][2].