Screen#

Contains functions and variables related to the current map screen, including functions for drawing and creating/loading objects belonging to the screen.

Access with Screen->.

Variables#

untyped[]

D

int[]

ComboD

int[]

ComboC

int[]

ComboF

int[]

ComboI

int[]

ComboT

int[]

ComboS

int[]

ComboE

int[]

Door

bool[]

State

bool[]

ExState

bool

Lit

int

Wavy

int

Quake

const int

NumItems

const int

GetRenderTarget

const int

NumNPCs

const int

ShowingMessage

const int

NumLWeapons

const int

NumEWeapons

int[]

Flags

int[]

EFlags

int

RoomType

int

MovingBlockX

int

MovingBlockY

int

MovingBlockLayer

int

MovingBlockCombo

int

MovingBlockCSet

int

UnderCombo

int

UnderCSet

int

Valid

int

Guy

int

String

int

Item

int[]

TileWarpType

bool[]

TileWarpOverlay

int

DoorComboSet

int[]

WarpReturnX

int[]

WarpReturnY

int

StairsX

int

StairsY

int

ItemX

int

ItemY

int[]

TileWarpDMap

int[]

TileWarpScreen

int

ExitDir

int[]

Enemy

int

Pattern

int[]

SideWarpType

bool[]

SideWarpOverlay

int

WarpArrivalX

int

WarpArrivalY

int[]

MazePath

int[]

SideWarpScreen

int[]

SideWarpID

int[]

TileWarpReturnSquare

int[]

SideWarpReturnSquare

int[]

SideWarpDMap

int

Palette

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

AmbientSFX

int

BossSFX

int

SecretSFX

int

ItemSFX

int

MIDI

int

Script

untyped[]

InitD

const bool

SecretsTriggered

const int

NumPortals

const npc[]

NPCs

const itemsprite[]

Items

const lweapon[]

LWeapons

const eweapon[]

EWeapons

const ffc[]

FFCs

const portal[]

Portals

bool[]

LensShows

bool[]

LensHides

int

DataSize

untyped[]

Data

int

GuyCount

int

OceanSFX

int

RoomData

int

CSet

int

CarryoverMap

int

CarryoverScreen

int

WarpReturnC

int

HasItem deprecated

int[]

ScreenFlags deprecated

int

EnemyFlags deprecated

int

SideWarpIndex deprecated

bool[]

NumFFCs deprecated

int

EntryX deprecated

int

EntryY deprecated

int

LensLayer deprecated

Functions#

int

NumItems() deprecated

itemsprite

LoadItem(int n)

itemsprite

CreateItem(int id)

ffc

LoadFFC(int n)

int

NumNPCs() deprecated

npc

LoadNPC(int n)

npc

CreateNPC(int id)

void

ClearSprites(int spritelist)

void

Rectangle(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7 = 1, int arg8 = 0, int arg9 = 0, int arg10 = 0, bool arg11 = true, int arg12 = 128)

void

Circle(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 = 1, int arg7 = 0, int arg8 = 0, int arg9 = 0, bool arg10 = true, int arg11 = 128)

void

Arc(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8 = 1, int arg9 = 0, int arg10 = 0, int arg11 = 0, bool arg12 = true, bool arg13 = true, int arg14 = 128)

void

Ellipse(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7 = 1, int arg8 = 0, int arg9 = 0, int arg10 = 0, bool arg11 = true, int arg12 = 128)

void

Line(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7 = 1, int arg8 = 0, int arg9 = 0, int arg10 = 0, int arg11 = 128)

void

Spline(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11 = 1)

void

PutPixel(int arg1, int arg2, int arg3, int arg4, int arg5 = 0, int arg6 = 0, int arg7 = 0, int arg8 = 128)

void

PutPixels(int layer, int ptr, int rx, int ry, int rangle)

void

DrawTiles(int layer, int ptr)

void

DrawCombos(int layer, int ptr)

void

Lines(int layer, int ptr)

void

DrawCharacter(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10 = 128)

void

DrawInteger(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10 = 0, int arg11 = 128)

void

DrawTile(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8 = -1, int arg9 = -1, int arg10 = 0, int arg11 = 0, int arg12 = 0, int arg13 = 0, bool arg14 = true, int arg15 = 128)

void

DrawTileCloaked(int layer, int x, int y, int tile, int blockw, int blockh, int flip = 0)

void

DrawCombo(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9 = -1, int arg10 = -1, int arg11 = 0, int arg12 = 0, int arg13 = 0, int arg14 = 0, bool arg15 = true, int arg16 = 128)

void

DrawComboCloaked(int layer, int x, int y, int combo, int tilewidth, int tileheight, int flip = 0)

void

Quad(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11, int arg12, int arg13, int arg14, int arg15)

void

Triangle(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11, int arg12, int arg13)

void

Quad3D(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8)

void

Triangle3D(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8)

void

FastTile(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 = 128)

void

FastCombo(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 = 128)

void

DrawString(int layer, int x, int y, int font, int color, int background_color, int format, char32[] str, int opacity = 128)

void

DrawString(int layer, int x, int y, int font, int color, int background_color, int format, char32[] str, int opacity, int shadow_type, int shadow_color)

void

DrawLayer(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7 = 0, int arg8 = 128)

void

DrawScreen(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 = 0)

void

DrawBitmap(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11, bool arg12)

void

DrawBitmapEx(int layer, int bitmap_id, int source_x, int source_y, int source_w, int source_h, int dest_x, int dest_y, int dest_w, int dest_h, int rotation = 0, int cx = 0, int cy = 0, int mode = 0, int lit = 0, bool mask = true)

void

TileBlit(int layer, int tile, int cset, int source_x, int source_y, int source_w, int source_h, int dest_x, int dest_y, int dest_w, int dest_h, int rotation = 0, int cx = 0, int cy = 0, int mode = 0, int lit = 0, bool mask = true)

void

ComboBlit(int layer, int combo, int cset, int source_x, int source_y, int source_w, int source_h, int dest_x, int dest_y, int dest_w, int dest_h, int rotation = 0, int cx = 0, int cy = 0, int mode = 0, int lit = 0, bool mask = true)

void

SetRenderTarget(int rt)

void

Message(int message_id)

int

NumLWeapons() deprecated

lweapon

LoadLWeapon(int n)

lweapon

CreateLWeapon(int id)

int

NumEWeapons() deprecated

eweapon

LoadEWeapon(int n)

eweapon

CreateEWeapon(int id)

bool

isSolid(int arg1, int arg2)

bool

isSolidLayer(int x, int y, int layer)

void

TriggerSecrets()

void

ZapIn()

void

ZapOut()

void

WavyIn()

void

WavyOut()

void

OpeningWipe()

void

ClosingWipe()

void

OpeningWipe(int effect)

void

ClosingWipe(int effect)

void

Polygon(int layer, int num_points, int vertices, int color, int opacity = 128)

void

DrawFrame(int layer, int x, int y, int tile, int cset, int width, int height, bool overlay = true, int opacity = 128)

bool

SecretsTriggered() deprecated

bool

SpawnScreenEnemies()

bool

TriggerCombo(int layer, int pos)

int

NumPortals() deprecated

portal

LoadPortal(int n)

portal

CreatePortal()

void

DrawLightSquare(int arg1, int arg2, int arg3 = -1, int arg4 = -1, int arg5 = -1, int arg6 = -1, int arg7 = -1)

void

DrawLightCircle(int arg1, int arg2, int arg3 = -1, int arg4 = -1, int arg5 = -1, int arg6 = -1, int arg7 = -1)

void

DrawLightCone(int cx, int cy, int dir, int length = -1, int transp_rad = -1, int dith_rad = -1, int dith_type = -1, int dith_arg = -1)

bool

GetExDoor(int dir, int index)

void

SetExDoor(int dir, int index, bool state)

void

SetSideWarp(int side, int screen, int dmap, int type)

void

SetTileWarp(int arg1, int arg2, int arg3, int arg4)

lweapon

CreateLWeaponDx(int type, int baseitem)

npc

LoadNPCByUID(int arg1) deprecated

lweapon

LoadLWeaponByUID(int arg1) deprecated

eweapon

LoadEWeaponByUID(int arg1) deprecated

int

LayerMap(int arg1) deprecated

int

LayerScreen(int arg1) deprecated

int

GetSideWarpDMap(int arg1) deprecated

int

GetSideWarpScreen(int arg1) deprecated

int

GetSideWarpType(int arg1) deprecated

int

GetTileWarpDMap(int arg1) deprecated

int

GetTileWarpScreen(int arg1) deprecated

int

GetTileWarpType(int arg1) deprecated

Enumerations#

enum WipeEffect: πŸ”— Source

WipeEffect WIPE_CIRCLE = 0

WipeEffect WIPE_OVAL = 1

WipeEffect WIPE_TRIANGLE = 2

WipeEffect WIPE_SMAS = 3

WipeEffect WIPE_FADEBLACK = 4

WipeEffect WIPE_MAX = 5


Variable descriptions#

untyped[] D πŸ”— Source

A set of 8 misc values for each screen.


int[] ComboD πŸ”— Source


int[] ComboC πŸ”— Source


int[] ComboF πŸ”— Source


int[] ComboI πŸ”— Source


int[] ComboT πŸ”— Source

Valid values: ComboType (CT_).


int[] ComboS πŸ”— Source


int[] ComboE πŸ”— Source

The effect area bits of each of the 176 combos used on the screen.


int[] Door πŸ”— Source


bool[] State πŸ”— Source

The 32 screen states used by this screen. Use the ScreenState (ST_) constants to access.


bool[] ExState πŸ”— Source

The β€˜Extra States’ used by this screen.


bool Lit πŸ”— Source

Whether or not the screen is β€˜lit’. Applies to Classic Darkrooms.


int Wavy πŸ”— Source

The remaining time, in frames, of the β€˜Wavy’ visual effect. Decrements by 1 each frame.


int Quake πŸ”— Source

The remaining time, in frames, of the β€˜Quake’ visual effect. Decrements by 1 each frame.


const int NumItems πŸ”— Source

Returns the number of the given object type that are present on the current screen.


const int GetRenderTarget πŸ”— Source

Gets/sets the current β€œRender Target”. Most times this should be β€˜RT_SCREEN’, though versions older than 2.55 required using this for bitmap drawing. 2.55’s bitmap effectively obsolete the render target system, and should be used instead of this.


const int NumNPCs πŸ”— Source

Returns the number of the given object type that are present on the current screen.


const int ShowingMessage πŸ”— Source

The message ID of the currently active message. 0 if no message is displayed.


const int NumLWeapons πŸ”— Source

Returns the number of the given object type that are present on the current screen.


const int NumEWeapons πŸ”— Source

Returns the number of the given object type that are present on the current screen.


int[] Flags πŸ”— Source


int[] EFlags πŸ”— Source


int RoomType πŸ”— Source

The screen room type.


int MovingBlockX πŸ”— Source


int MovingBlockY πŸ”— Source


int MovingBlockLayer πŸ”— Source

The layer of a currently moving pushblock. Is -1 and ignores writes if there is no pushblock currently moving. Allows values 0-6; the block will β€œsettle into place” on this layer.


int MovingBlockCombo πŸ”— Source


int MovingBlockCSet πŸ”— Source


int UnderCombo πŸ”— Source

The undercombo ID used by the screen.


int UnderCSet πŸ”— Source

The CSet of the undercombo used by the screen.


int Valid πŸ”— Source


int Guy πŸ”— Source

The screen guy.


int String πŸ”— Source

The screen string.


int Item πŸ”— Source

The screen item.

To determine if there is an item on the screen, if you ever assigned item 0 as a valid screen item in your quest, you will also want to read HasItem for that screen.

Note: The NULL value is 0, which is a valid item.


int[] TileWarpType πŸ”— Source

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

Valid indices: TileWarpIndex (TILEWARP_). Valid values: WarpType (WT_).


bool[] TileWarpOverlay πŸ”— Source

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


int DoorComboSet πŸ”— Source

The doorset used by the screen, for NES dungeon doors.


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 component for where a Stairs secret appears on the screen.


int StairsY πŸ”— Source

The Y component for where a Stairs secret appears on the screen.


int ItemX πŸ”— Source

The X component for the item location on the screen.


int ItemY πŸ”— Source

The Y component for the item location on the screen.


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 IDs of the enemies that spawn on the screen.


int Pattern πŸ”— Source

The enemy β€˜Spawn Pattern’.

Valid values: EnemyPattern (PATTERN_).


int[] SideWarpType πŸ”— Source

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

Valid indices: SideWarpIndex (SIDEWARP_). Valid values: WarpType (WT_).


bool[] 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 Maze Path directions.


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 Tile Warp (A, B, C, D).


int[] SideWarpReturnSquare πŸ”— Source

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


int[] SideWarpDMap πŸ”— Source

The destination DMap for each of the four sidewarps.


int Palette πŸ”— Source

The palette for the screen set via β€˜F4’ or β€˜Screen>>Palette’ in ZQuest


int Catchall πŸ”— Source

The screen β€˜Catchall’ value.


int CSensitive πŸ”— Source

The value of Damage Combo Sensitivity for the screen.


int NoReset πŸ”— Source

The No Reset Flagset. Values are ORd together as follows:

TODO: document values


int NoCarry πŸ”— Source

The No Carry Over Flagset. Values are ORd together s follows:

TODO: document values


int[] LayerMap πŸ”— Source

The Map IDs used by screen layers 1 through 6, represented as [1] through [6].

Index [0] does nothing, and trying to access it will report an error to the log.


int[] LayerScreen πŸ”— Source

The Screen IDs used by screen layers 1 through 6, represented as [1] through [6].

Index [0] does nothing, and trying to access it will report an error to the log.


int[] LayerOpacity πŸ”— Source

The opacity value for each layer used by this screen.

Valid layers are 1 through 6, represented as [1] through [6].

Index [0] does nothing, and trying to access it will report an error to the log.


bool[] LayerInvisible πŸ”— Source

If true, the current layer is invisible.

Writing this true for layers 1 through 6 will make those layers invisible.


bool[] ScriptDraws πŸ”— Source

If true, the ZC engine will perform script draws on the given queue layer.

Each queue layer returns true by default.

Writing this false disables script draws targetted to a specific layer queue.


int TimedWarpTimer πŸ”— Source

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


int NextMap πŸ”— Source

The map to where secrets on the current mapscreen carry over.

Corresponds to the Screen Data>>>Screen State Carryover β€˜Next Map’ selection in the ZQ Editor.


int NextScreen πŸ”— Source

The screen to where secrets on the current mapscreen carry over.

Corresponds to the Screen Data>>>Screen State Carryover β€˜Next Screen’ selection in the ZQ Editor.


int[] SecretCombo πŸ”— Source

The Combo IDs used by β€˜Secret Combos’ on this screen.

See SECCMB_ in std_constants.zh for more information.


int[] SecretCSet πŸ”— Source

The CSets used by β€˜Secret Combos’ on this screen.

See SECCMB_ in std_constants.zh for more information.


int[] SecretFlags πŸ”— Source

The Combo Flags used by β€˜Secret Combos’ on this screen.

See SECCMB_ in std_constants.zh for more information.


int AmbientSFX πŸ”— Source

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


int BossSFX πŸ”— Source

The Boss Roar sound for this screen.


int SecretSFX πŸ”— Source

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


int ItemSFX πŸ”— Source

The sound that will play if Link holds an item over his head on this screen.


int MIDI πŸ”— Source

The MIDI that plays on this screen.


int Script πŸ”— Source

The screendata script used for the current screen.


untyped[] InitD πŸ”— Source

The eight D args used by the screendata script for the current screen.


const bool SecretsTriggered πŸ”— Source

Returns true if secrets have been triggered on this screen (including temp).


const int NumPortals πŸ”— Source

Returns the number of the given object type that are present on the current screen.


const npc[] NPCs πŸ”— Source

Internal Array pointers to arrays containing all of each respective type of object on the screen. These arrays are 0-indexed.


const itemsprite[] Items πŸ”— Source

Internal Array pointers to arrays containing all of each respective type of object on the screen. These arrays are 0-indexed.


const lweapon[] LWeapons πŸ”— Source

Internal Array pointers to arrays containing all of each respective type of object on the screen. These arrays are 0-indexed.


const eweapon[] EWeapons πŸ”— Source

Internal Array pointers to arrays containing all of each respective type of object on the screen. These arrays are 0-indexed.


const ffc[] FFCs πŸ”— Source

Internal Array pointers to arrays containing all of each respective type of object on the screen. These arrays are 0-indexed.


const portal[] Portals πŸ”— Source

Internal Array pointers to arrays containing all of each respective type of object on the screen. These arrays are 0-indexed.


bool[] LensShows πŸ”— Source

Arrays of the layers which the lens shows, and hides, respectively.


bool[] LensHides πŸ”— Source

Arrays of the layers which the lens shows, and hides, respectively.


int DataSize πŸ”— Source

The size of the Data[] array.

Changes save to the save file.


untyped[] Data πŸ”— Source

Resizable array of data for scripts to use.

Changes save to the save file.


int GuyCount πŸ”— Source

Number of enemies remaining alive on this screen.


int OceanSFX πŸ”— Source


int RoomData πŸ”— Source


int CSet πŸ”— Source

The palette for the screen set via β€˜F4’ or β€˜Screen>>Palette’ in ZQuest


int CarryoverMap πŸ”— Source


int CarryoverScreen πŸ”— Source


int WarpReturnC πŸ”— Source

Stores the information on warp returns, butwise.

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

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


int HasItem πŸ”— Source

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

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

Warning

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


int[] ScreenFlags πŸ”— Source

Warning

Deprecated!


int EnemyFlags πŸ”— Source

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

Valid values (ORd) together, are:

Warning

Deprecated!


int SideWarpIndex πŸ”— Source

The warp return IDs. Deprecated by SideWarpID[].

Warning

Deprecated!


bool[] NumFFCs πŸ”— Source

Warning

Deprecated!


int EntryX πŸ”— Source

Warning

Deprecated! Use Hero->RespawnX instead!


int EntryY πŸ”— Source

Warning

Deprecated! Use Hero->RespawnY instead!


int LensLayer πŸ”— Source

Warning

Deprecated!


Function descriptions#

int NumItems() πŸ”— Source

Returns the number of the given object type that are present on the current screen.

Warning

Deprecated! Use NumItems instead!


itemsprite LoadItem(int n) πŸ”— Source

Where β€˜1 <= n <= NumItems’, returns a pointer to the nth object on the screen.


itemsprite CreateItem(int id) πŸ”— Source

Creates a new sprite object, with the given ID. Use the LW_ and EW_ constants for CreateLWeapon()/CreateEWeapon(). Use the item editor IDs and enemy editor IDs for CreateItem()/CreateNPC().


ffc LoadFFC(int n) πŸ”— Source

Returns a pointer to the nth ffc on the screen, where 1 <= n <= MAX\_FFC.


int NumNPCs() πŸ”— Source

Returns the number of the given object type that are present on the current screen.

Warning

Deprecated! Use NumNPCs instead!


npc LoadNPC(int n) πŸ”— Source

Where 1 <= n <= NumNPCs, returns a pointer to the nth npc on the screen.


npc CreateNPC(int id) πŸ”— Source

Creates a new sprite object, with the given ID. Use the NPC_ constants.


void ClearSprites(int spritelist) πŸ”— Source

Kills all sprite objects of the specified type, using the SL_ constants.


void Rectangle(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7 = 1, int arg8 = 0, int arg9 = 0, int arg10 = 0, bool arg11 = true, int arg12 = 128) πŸ”— Source


void Circle(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 = 1, int arg7 = 0, int arg8 = 0, int arg9 = 0, bool arg10 = true, int arg11 = 128) πŸ”— Source


void Arc(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8 = 1, int arg9 = 0, int arg10 = 0, int arg11 = 0, bool arg12 = true, bool arg13 = true, int arg14 = 128) πŸ”— Source


void Ellipse(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7 = 1, int arg8 = 0, int arg9 = 0, int arg10 = 0, bool arg11 = true, int arg12 = 128) πŸ”— Source


void Line(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7 = 1, int arg8 = 0, int arg9 = 0, int arg10 = 0, int arg11 = 128) πŸ”— Source


void Spline(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11 = 1) πŸ”— Source


void PutPixel(int arg1, int arg2, int arg3, int arg4, int arg5 = 0, int arg6 = 0, int arg7 = 0, int arg8 = 128) πŸ”— Source


void PutPixels(int layer, int ptr, int rx, int ry, int rangle) πŸ”— Source

Puts multiple pixels to the screen in one function call.

PutPixels() expects an array as its arg, with the array in the format of repeating blocks of { x, y, color, trans } Example:

PutPixels(1, { 25, 10, 5, OP_OPAQUE, 26, 10, 6, OP_OPAQUE }, 0, 0, 0 );

This draws two pixels to the screen. The first is at coordinates (25, 10), color 5, and it is opaque. The second is at coordinates (26, 10), color 6, and opaque.


void DrawTiles(int layer, int ptr) πŸ”— Source

Similar to FastTile(), but it draws multiple tiles in one call.

The arg *ptr[] should be an array with repeating sets of: {x,y,tile,color,opacity}

…per tile that you want to draw.


void DrawCombos(int layer, int ptr) πŸ”— Source

Similar to FastCombo, but draws multiple combos in one call.

The arg *ptr[] should be an array with repeating sets of: {x,y,combo,cset,opacity}

…per combo that you want to draw.


void Lines(int layer, int ptr) πŸ”— Source

Similar to Line(0, but draws multiple lines in one call.

The arg *ptr[] should be an array with repeating sets of: { x, y, x2, y2, color, scale, rx, ry, angle, opacity }

…per line that you want to draw.


void DrawCharacter(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10 = 128) πŸ”— Source


void DrawInteger(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10 = 0, int arg11 = 128) πŸ”— Source


void DrawTile(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8 = -1, int arg9 = -1, int arg10 = 0, int arg11 = 0, int arg12 = 0, int arg13 = 0, bool arg14 = true, int arg15 = 128) πŸ”— Source


void DrawTileCloaked(int layer, int x, int y, int tile, int blockw, int blockh, int flip = 0) πŸ”— Source

As DrawTile(), but draws with a cloaked effect.


void DrawCombo(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9 = -1, int arg10 = -1, int arg11 = 0, int arg12 = 0, int arg13 = 0, int arg14 = 0, bool arg15 = true, int arg16 = 128) πŸ”— Source


void DrawComboCloaked(int layer, int x, int y, int combo, int tilewidth, int tileheight, int flip = 0) πŸ”— Source

As DrawCombo(), but draws with a cloaked effect.


void Quad(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11, int arg12, int arg13, int arg14, int arg15) πŸ”— Source


void Triangle(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11, int arg12, int arg13) πŸ”— Source


void Quad3D(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8) πŸ”— Source


void Triangle3D(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8) πŸ”— Source


void FastTile(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 = 128) πŸ”— Source


void FastCombo(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 = 128) πŸ”— Source


void DrawString(int layer, int x, int y, int font, int color, int background_color, int format, char32[] str, int opacity = 128) πŸ”— Source


void DrawString(int layer, int x, int y, int font, int color, int background_color, int format, char32[] str, int opacity, int shadow_type, int shadow_color) πŸ”— Source

As DrawString(), but includes a shadow on the text.

Valid values for shadow_type: ShadowType (SHD_).


void DrawLayer(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7 = 0, int arg8 = 128) πŸ”— Source


void DrawScreen(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 = 0) πŸ”— Source


void DrawBitmap(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11, bool arg12) πŸ”— Source


void DrawBitmapEx(int layer, int bitmap_id, int source_x, int source_y, int source_w, int source_h, int dest_x, int dest_y, int dest_w, int dest_h, int rotation = 0, int cx = 0, int cy = 0, int mode = 0, int lit = 0, bool mask = true) πŸ”— Source


void TileBlit(int layer, int tile, int cset, int source_x, int source_y, int source_w, int source_h, int dest_x, int dest_y, int dest_w, int dest_h, int rotation = 0, int cx = 0, int cy = 0, int mode = 0, int lit = 0, bool mask = true) πŸ”— Source

As β€˜bitmap->BlitTo’, but draws from a tile instead of a bitmap

Blit supports multiple MODES, OR’d together as a bitmask:

const int BITDX_NORMAL = 0;
const int BITDX_TRANS = 0x01; //Translucent
const int BITDX_PIVOT = 0x02; //THe sprite will rotate at a specific
point, instead of its center. const int BITDX_HFLIP = 0x04; //Horizontal
Flip const int BITDX_VFLIP = 0x08; //Vertical Flip.

You can also set a pivot point for the rotation, using β€˜int cx’ and β€˜int cy’

If these are non-zero, the rotation anchor point will center on these coordinates.

You may specify a colour to β€˜int lit’ to use a lit mode. This tints the entire bitmap using that colour index of the main palette.


void ComboBlit(int layer, int combo, int cset, int source_x, int source_y, int source_w, int source_h, int dest_x, int dest_y, int dest_w, int dest_h, int rotation = 0, int cx = 0, int cy = 0, int mode = 0, int lit = 0, bool mask = true) πŸ”— Source

As β€˜TileBlit’, but uses the current tile of a specified combo.

Blit supports multiple MODES, OR’d together as a bitmask:

const int BITDX_NORMAL = 0;
const int BITDX_TRANS = 0x01; //Translucent
const int BITDX_PIVOT = 0x02; //THe sprite will rotate at a specific
point, instead of its center. const int BITDX_HFLIP = 0x04; //Horizontal
Flip const int BITDX_VFLIP = 0x08; //Vertical Flip.

You can also set a pivot point for the rotation, using β€˜int cx’ and β€˜int cy’

If these are non-zero, the rotation anchor point will center on these coordinates.

You may specify a colour to β€˜int lit’ to use a lit mode. This tints the entire bitmap using that colour index of the main palette.


void SetRenderTarget(int rt) πŸ”— Source

Gets/sets the current β€œRender Target”. Most times this should be β€˜RT_SCREEN’, though versions older than 2.55 required using this for bitmap drawing. 2.55’s bitmap effectively obsolete the render target system, and should be used instead of this.


void Message(int message_id) πŸ”— Source

Triggers the message number message_id from the Strings table to be displayed on the screen.

If message_id is 0, any message being displayed will be removed.


int NumLWeapons() πŸ”— Source

Returns the number of the given object type that are present on the current screen.

Warning

Deprecated! Use NumLWeapons instead!


lweapon LoadLWeapon(int n) πŸ”— Source

Where 1 <= n <= :ref:`NumItems<globals_screen_var_numitems>`, returns a pointer to the nth object on the screen.


lweapon CreateLWeapon(int id) πŸ”— Source

Creates a new lweapon object, with the given ID. Use the LW_ constants.


int NumEWeapons() πŸ”— Source

Returns the number of the given object type that are present on the current screen.

Warning

Deprecated! Use NumEWeapons instead!


eweapon LoadEWeapon(int n) πŸ”— Source

Where 1 <= n <= :ref:`NumItems<globals_screen_var_numitems>`, returns a pointer to the nth object on the screen.


eweapon CreateEWeapon(int id) πŸ”— Source

Creates a new sprite object, with the given ID. Use the LW_ and EW_ constants for CreateLWeapon()/CreateEWeapon(). Use the item editor IDs and enemy editor IDs for CreateItem()/CreateNPC().


bool isSolid(int arg1, int arg2) πŸ”— Source


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

As β€˜Screen->isSolid()’, but instead of returning true if there is solidity on layers 0, 1, or 2,

returns the solidity only for the specified layer.


void TriggerSecrets() πŸ”— Source

Triggers secrets on this screen (temp only, write State[] to set the perm secret state)


void ZapIn() πŸ”— Source

Plays the warping screen β€˜zap’ effect.


void ZapOut() πŸ”— Source

Plays the warping screen β€˜zap’ effect.


void WavyIn() πŸ”— Source

Plays the warping screen β€˜wave’ effect.


void WavyOut() πŸ”— Source

Plays the warping screen β€˜wave’ effect.


void OpeningWipe() πŸ”— Source

Plays the warping screen β€˜wipe’ effect, respecting the wipe-related QRs.


void ClosingWipe() πŸ”— Source

Plays the warping screen β€˜wipe’ effect, respecting the wipe-related QRs.


void OpeningWipe(int effect) πŸ”— Source

Plays the warping screen β€˜wipe’ effect.

Valid values for effect: WipeEffect (WIPE_).


void ClosingWipe(int effect) πŸ”— Source

Plays the warping screen β€˜wipe’ effect.

Valid values for effect: WipeEffect (WIPE_).


void Polygon(int layer, int num_points, int vertices, int color, int opacity = 128) πŸ”— Source


void DrawFrame(int layer, int x, int y, int tile, int cset, int width, int height, bool overlay = true, int opacity = 128) πŸ”— Source

Draws a frame using a 2x2 block of tiles, where the upper-left corner of which is the β€˜tile’ value

This works based on how the engine subscreen frame object works, stretching the frame from those tiles to whatever size you specify.

Width/height are in 8-pixel increments; ex. 4,4 would give a 2x2 tile block; 8,8 would give a 4x4.


bool SecretsTriggered() πŸ”— Source

Returns true if secrets have been triggered on this screen (including temp).

Warning

Deprecated! Use SecretsTriggered instead!


bool SpawnScreenEnemies() πŸ”— Source

Immediately attempts to spawn the Enemy[], using the Pattern.


bool TriggerCombo(int layer, int pos) πŸ”— Source

Attempts to trigger the combo at β€˜layer,pos’. Returns true on success, false on failure.


int NumPortals() πŸ”— Source

Returns the number of the given object type that are present on the current screen.

Warning

Deprecated! Use NumPortals instead!


portal LoadPortal(int n) πŸ”— Source

Where 1 <= n <= :ref:`NumItems<globals_screen_var_numitems>`, returns a pointer to the nth object on the screen.


portal CreatePortal() πŸ”— Source

Creates a new sprite object, with the given ID. Use the LW_ and EW_ constants for CreateLWeapon()/CreateEWeapon(). Use the item editor IDs and enemy editor IDs for CreateItem()/CreateNPC().


void DrawLightSquare(int arg1, int arg2, int arg3 = -1, int arg4 = -1, int arg5 = -1, int arg6 = -1, int arg7 = -1) πŸ”— Source


void DrawLightCircle(int arg1, int arg2, int arg3 = -1, int arg4 = -1, int arg5 = -1, int arg6 = -1, int arg7 = -1) πŸ”— Source


void DrawLightCone(int cx, int cy, int dir, int length = -1, int transp_rad = -1, int dith_rad = -1, int dith_type = -1, int dith_arg = -1) πŸ”— Source

Draws a cone of light to the engine darkroom bitmap, emanating in the 8-dir β€˜dir’ from the point β€˜cx,cy’.


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

Returns a door state for the screen.

Each direction (DIR_UP,DIR_DOWN,DIR_LEFT,DIR_RIGHT) has 8 indexes (0-7)


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

Sets a door state for the screen.

Each direction (DIR_UP,DIR_DOWN,DIR_LEFT,DIR_RIGHT) has 8 indexes (0-7)


void SetSideWarp(int side, int screen, int dmap, int type) πŸ”— Source

Valid values for type: WarpType (WT_).


void SetTileWarp(int arg1, int arg2, int arg3, int arg4) πŸ”— Source


lweapon CreateLWeaponDx(int type, int baseitem) πŸ”— Source

Create an lweapon with sprites, sounds, and other values set as if it was generated by a specific item.


npc LoadNPCByUID(int arg1) πŸ”— Source

Warning

Deprecated!


lweapon LoadLWeaponByUID(int arg1) πŸ”— Source

Warning

Deprecated!


eweapon LoadEWeaponByUID(int arg1) πŸ”— Source

Warning

Deprecated!


int LayerMap(int arg1) πŸ”— Source

Warning

Deprecated! Use LayerMap[] instead!


int LayerScreen(int arg1) πŸ”— Source

Warning

Deprecated! Use LayerScreen[] instead!


int GetSideWarpDMap(int arg1) πŸ”— Source

Warning

Deprecated! Use SideWarpDMap[] instead!


int GetSideWarpScreen(int arg1) πŸ”— Source

Warning

Deprecated! Use SideWarpScreen[] instead!


int GetSideWarpType(int arg1) πŸ”— Source

Warning

Deprecated! Use SideWarpType[] instead!


int GetTileWarpDMap(int arg1) πŸ”— Source

Warning

Deprecated! Use TileWarpDMap[] instead!


int GetTileWarpScreen(int arg1) πŸ”— Source

Warning

Deprecated! Use TileWarpScreen[] instead!


int GetTileWarpType(int arg1) πŸ”— Source

Warning

Deprecated! Use TileWarpType[] instead!