Game#
Contains general internal functions and variables.
Access with Game->
.
Variables#
const int |
|
const int |
|
const int |
|
const int |
|
const int |
|
const int |
|
int |
|
int |
|
int |
|
long |
|
const bool |
|
bool |
|
bool |
|
long |
|
int[] |
|
int |
|
int |
|
int[] |
|
int[] |
|
int[] |
|
untyped[] |
|
int[] |
|
int[] |
|
long[] |
LSwitches deprecated |
int[] |
GSwitch deprecated |
long[] |
|
int[] |
|
int[] |
|
bool |
|
int |
|
int |
|
bool |
|
bool[] |
|
bool |
|
bool |
|
bool[] |
|
bool[] |
|
const int |
|
const int |
|
const int |
|
const int |
Build deprecated |
const int |
|
const int |
|
bool |
|
const int |
|
int[] |
|
const int[] |
|
int[] |
|
int[] |
|
untyped[] |
|
int |
|
const int |
|
const savedportal[] |
|
const int[] |
|
const int[] |
|
int[] |
|
const bool |
|
const int |
|
int |
|
int |
|
int |
|
const int |
|
const bool[] |
ReadKey deprecated |
const bool[] |
JoypadPress deprecated |
bool[] |
ButtonPress deprecated |
bool[] |
ButtonInput deprecated |
bool[] |
ButtonHeld deprecated |
int[] |
DMapPalette deprecated |
int[] |
DMapFlags deprecated |
int[] |
DMapLevel deprecated |
int[] |
DMapCompass deprecated |
int[] |
DMapContinue deprecated |
int[] |
DMapMIDI deprecated |
int[] |
DMapOffset deprecated |
int[] |
DMapMap deprecated |
int[] |
|
int[] |
Functions#
int |
|
int |
MaxNPCs() |
void |
MaxNPCs(int value) |
int |
|
void |
MaxLWeapons(int value) |
int |
|
void |
MaxEWeapons(int value) |
int |
|
void |
MaxItemsprites(int value) |
untyped |
GetScreenD(int screen, int register) |
void |
SetScreenD(int screen, int register, untyped value) |
untyped |
GetDMapScreenD(int dmap, int screen, int register) |
void |
SetDMapScreenD(int dmap, int screen, int register, untyped value) |
LoadItemData(int item) |
|
int |
GetMIDI() deprecated |
void |
Save() |
void |
End() |
void |
Exit() |
void |
Reload() |
void |
Continue() |
void |
|
void |
|
void |
|
void |
GetSaveName(char32[] buf) |
void |
SetSaveName(char32[] buf) |
bool |
|
void |
|
int |
GetFFCScript(char32[] name) |
int |
GetComboScript(char32[] name) |
int |
GetItemScript(char32[] name) |
int |
GetNPCScript(char32[] name) |
int |
GetLWeaponScript(char32[] name) |
int |
GetEWeaponScript(char32[] name) |
int |
GetPlayerScript(char32[] name) |
int |
GetGlobalScript(char32[] name) |
int |
GetDMapScript(char32[] name) |
int |
GetScreenScript(char32[] name) |
int |
GetItemSpriteScript(char32[] name) |
int |
GetNPC(char32[] name) |
int |
GetItem(char32[] name) |
int |
GetCombo(char32[] name) |
int |
GetDMap(char32[] name) |
int |
GetGenericScript(char32[] name) |
int |
MapCount() deprecated |
LoadNPCData(int id) |
|
LoadComboData(int id) |
|
LoadMapData(int map, int screen) |
|
LoadTempScreen(int layer) |
|
LoadTempScreen(int layer, int screen) |
|
LoadTempScreenForComboPos(int layer, int pos) |
|
LoadScrollingScreen(int layer) |
|
LoadScrollingScreen(int layer, int screen) |
|
LoadSpriteData(int id) |
|
LoadShopData(int shop) |
|
LoadInfoShopData(int shop) |
|
LoadBitmapID(int id) |
|
LoadMessageData(int id) |
|
LoadDMapData(int dmap) |
|
LoadDropset(int id) |
|
LoadRNG() |
|
LoadWebSocket(char32[] url) |
|
LoadBottleData(int id) |
|
LoadBottleShopData(int id) |
|
LoadGenericData(int scriptslot) |
|
CreateBitmap(int width = |
|
void |
SetCustomCursor(bitmap b, int fx, int fy, bool sys_recolor = |
int |
NumSavedPortals() deprecated |
LoadSavedPortal(int saved_portal_id) |
|
int |
CurrentItemID(int itemtype, int bitflags = |
LoadASubData(int id) |
|
LoadPSubData(int id) |
|
LoadOSubData(int id) |
|
int |
SwapActiveSubscreens(int sub_id_1, int sub_id_2) |
int |
SwapPassiveSubscreens(int sub_id_1, int sub_id_2) |
int |
SwapOverlaySubscreens(int sub_id_1, int sub_id_2) |
void |
GetMessage(int string, char32[] buffer) |
void |
SetMessage(int message, char32[] str) |
int |
ComboTile(int combo) |
void |
PlaySound(int soundid) deprecated |
void |
PlayMIDI(int MIDIid) deprecated |
bool |
PlayEnhancedMusic(char32[] filename, int track) deprecated |
bool |
PlayOgg(char32[] filename, int track) deprecated |
int |
GetOggPos() deprecated |
void |
SetOggPos(int pos) deprecated |
void |
SetOggSpeed(int speed) deprecated |
int |
GetScreenFlags(int map, int screen, int bitflags) deprecated |
bool |
GetScreenState(int map, int screen, int flag) deprecated |
void |
SetScreenState(int map, int screen, int flag, bool value) deprecated |
int |
GetComboData(int map, int screen, int pos) deprecated |
void |
SetComboData(int map, int screen, int pos, int value) deprecated |
int |
GetComboCSet(int map, int screen, int pos) deprecated |
void |
SetComboCSet(int map, int screen, int pos, int value) deprecated |
int |
GetComboFlag(int map, int screen, int pos) deprecated |
void |
SetComboFlag(int map, int screen, int pos, int value) deprecated |
int |
GetComboType(int map, int screen, int pos) deprecated |
void |
SetComboType(int map, int screen, int pos, int value) deprecated |
int |
GetComboInherentFlag(int map, int screen, int pos) deprecated |
void |
SetComboInherentFlag(int map, int screen, int pos, int value) deprecated |
int |
GetComboSolid(int map, int screen, int pos) deprecated |
void |
SetComboSolid(int map, int screen, int pos, int value) deprecated |
int |
GetUntypedScript(char32[] name) deprecated |
int |
GetSubscreenScript(char32[] name) deprecated |
void |
GetDMapMusicFilename(int dmap, char32[] buf) deprecated |
int |
GetDMapMusicTrack(int dmap) deprecated |
void |
SetDMapEnhancedMusic(int dmap, char32[] filename, int track) deprecated |
void |
GetDMapName(int DMap, char32[] buffer) deprecated |
void |
SetDMapName(int DMap, char32[] buffer) deprecated |
void |
GetDMapTitle(int DMap, char32[] buffer) deprecated |
void |
SetDMapTitle(int DMap, char32[] buffer) deprecated |
void |
GetDMapIntro(int DMap, char32[] buffer) deprecated |
void |
SetDMapIntro(int DMap, char32[] buffer) deprecated |
Enumerations#
enum GravityIndex: π Source
Used with Game->Gravity[].
GravityIndex GR_STRENGTH = 0
GravityIndex GR_TERMINALV = 1
GravityIndex GR_SPRLAYER = 2
GravityIndex GR_AIRDRAG = 3
enum ScrollingIndex: π Source
Used with Game->Scrolling[].
ScrollingIndex SCROLL_DIR = 0
The scrolling Direction (DIR_). -1 if not scrolling.
ScrollingIndex SCROLL_NX = 1
The offset for the new screen, relative to the current viewport.
ScrollingIndex SCROLL_NY = 2
ScrollingIndex SCROLL_OX = 3
The offset for the old screen, relative to the current viewport.
ScrollingIndex SCROLL_OY = 4
ScrollingIndex SCROLL_NRX = 5
The offset for the new regionβs origin screen, relative to the current viewport.
ScrollingIndex SCROLL_NRY = 6
ScrollingIndex SCROLL_ORX = 7
The offset for the old regionβs origin screen, relative to the current viewport.
ScrollingIndex SCROLL_ORY = 8
ScrollingIndex SCROLL_NEW_REGION_DELTA_X = 9
The delta between the new and old regions.
ScrollingIndex SCROLL_NEW_REGION_DELTA_Y = 10
ScrollingIndex SCROLL_NEW_SCREEN_X = 11
The top-left coordinate of the destination screen, in the new region coordinate system.
ScrollingIndex SCROLL_NEW_SCREEN_Y = 12
ScrollingIndex SCROLL_OLD_SCREEN_X = 13
The top-left coordinate of the old screen, in the old region coordinate system.
ScrollingIndex SCROLL_OLD_SCREEN_Y = 14
ScrollingIndex SCROLL_NEW_HERO_X = 15
The final hero position, in the new region.
ScrollingIndex SCROLL_NEW_HERO_Y = 16
ScrollingIndex SCROLL_OLD_HERO_X = 17
The initial hero position at the start of scrolling, in the old region coordinate system.
ScrollingIndex SCROLL_OLD_HERO_Y = 18
ScrollingIndex SCROLL_NEW_REGION_SCREEN_WIDTH = 19
The number of screens in the new region (width and height).
ScrollingIndex SCROLL_NEW_REGION_SCREEN_HEIGHT = 20
ScrollingIndex SCROLL_OLD_REGION_SCREEN_WIDTH = 21
The number of screens in the old region (width and height).
ScrollingIndex SCROLL_OLD_REGION_SCREEN_HEIGHT = 22
ScrollingIndex SCROLL_NEW_VIEWPORT_WIDTH = 23
The final viewport size.
ScrollingIndex SCROLL_NEW_VIEWPORT_HEIGHT = 24
ScrollingIndex SCROLL_OLD_VIEWPORT_WIDTH = 25
The initial viewport size.
ScrollingIndex SCROLL_OLD_VIEWPORT_HEIGHT = 26
ScrollingIndex SCROLL_NEW_VIEWPORT_X = 27
The final viewport position, in the new region coorindate system.
ScrollingIndex SCROLL_NEW_VIEWPORT_Y = 28
ScrollingIndex SCROLL_OLD_VIEWPORT_X = 29
The initial viewport position, in the old region coorindate system.
ScrollingIndex SCROLL_OLD_VIEWPORT_Y = 30
enum MiscSpriteIndex: π Source
Used with Game->MiscSprites[].
MiscSpriteIndex MISCSPR_FALL = 0
MiscSpriteIndex MISCSPR_DROWN = 1
MiscSpriteIndex MISCSPR_LAVADROWN = 2
MiscSpriteIndex MISCSPR_SWITCHPOOF = 3
MiscSpriteIndex MISCSPR_MAX = 4
Used with Game->MiscSFX[].
MiscSfx MISCSFX_BUSH = 0
MiscSfx MISCSFX_SWITCHED = 1
MiscSfx MISCSFX_LOWHEART = 2
MiscSfx MISCSFX_ERROR = 3
MiscSfx MISCSFX_PLAYER_HURT = 4
MiscSfx MISCSFX_HAMMER_PEG = 5
MiscSfx MISCSFX_SUBSCR_ITEM_ASSIGN = 6
MiscSfx MISCSFX_SUBSCR_CURSOR_MOVE = 7
MiscSfx MISCSFX_REFILL = 8
MiscSfx MISCSFX_RUPEEDRAIN = 9
MiscSfx MISCSFX_SWORDTAP = 10
MiscSfx MISCSFX_SWORDTAP_HOLLOW = 11
MiscSfx MISCSFX_HERO_LANDS = 12
MiscSfx MISCSFX_MAX = 13
enum GenericIndex: π Source
Used with Game->Generic[].
GenericIndex GEN_HEARTPIECES = 0
Heart Pieces currently possessed
GenericIndex GEN_MAGICDRAINRATE = 1
Linkβs magic usage equals n / 2.
GenericIndex GEN_CANSLASH = 2
Link can slash with the sword.
GenericIndex GEN_WARPLEVEL = 3
Warp Ring number that a Whirlwind warp will send Link to. It is set every time that Link uses the Whistle.
GenericIndex GEN_HCPPERHC = 4
How many Pieces of Heart form a complete Heart Container?
GenericIndex GEN_CONTINUEHEARTS = 5
Amount of life that Link continues with
GenericIndex GEN_CONTINUEISPERCENT = 6
Percentage of life that Link continues with
GenericIndex GEN_HP_PER_HEART = 7
How much HP makes a βheartβ
GenericIndex GEN_MP_PER_BLOCK = 8
How much MP makes a βblockβ
GenericIndex GEN_HERO_DMG_MULT = 9
Damage multiplier for damage by Link
GenericIndex GEN_ENEM_DMG_MULT = 10
Damage multiplier for damage by enemies
GenericIndex GEN_DITHER_TYPE = 11
Type of dithering used with dark rooms (ditherType
(DITH_
) constants)
GenericIndex GEN_DITHER_ARG = 12
Dithering argument used with dark rooms
GenericIndex GEN_DITHER_PERCENT = 13
Percent of light circles taken up by dithering
GenericIndex GEN_DEFAULT_LIGHT_RAD = 14
Default light radius initialized to enemies
GenericIndex GEN_TRANS_PERCENT = 15
Percent of light circles taken up by transparency
GenericIndex GEN_DARKNESS_COLOR = 16
Color of darkness
GenericIndex GEN_WATERGRAVITY = 17
Y position addition when not moving when sideview swimming. can be negative
GenericIndex GEN_SIDESWIM_STEP_UP = 18
Hero step speed when sideview swimming, moving up
GenericIndex GEN_SIDESWIM_STEP_SIDE = 19
Hero step speed when sideview swimming, moving left and right
GenericIndex GEN_SIDESWIM_STEP_DOWN = 20
Hero step speed when sideview swimming, moving down
GenericIndex GEN_SIDESWIM_EXITJUMP = 21
Jump value when exiting water from the top. If 0, Link can only leave the top of the water via sideview ladder.
GenericIndex GEN_BUNNY_TILEMOD = 22
Tile modifier to apply while Hero is bunnified
GenericIndex GEN_SWITCHHOOK_STYLE = 23
Which βSW_EFFβ style to use for the βSwitch w/ Heroβ enemy defense
GenericIndex GEN_FLICKER_FRAMES = 24
How many frames Link / enemies flicker for with the flicker damage effect
GenericIndex GEN_FLICKER_COLOR = 25
Color used for the flicker effect
GenericIndex GEN_FLICKER_TRANSP = 26
Number of transparency passes for the flicker effect
GenericIndex GEN_LIGHT_WAVE_RATE = 27
GenericIndex GEN_LIGHT_WAVE_SIZE = 28
GenericIndex GEN_REGION_MAPPING = 29
Which RegionMapping (REGION_) (method of mapping) is used for regions
GenericIndex GEN_MAX = 30
enum RegionMapping: π Source
RegionMapping REGION_MAPPING_PHYSICAL = 0
RegionMapping REGION_MAPPING_FULL = 1
RegionMapping REGION_MAPPING_MAX = 2
Values for Game->MouseCursor (ZCM_).
MouseCursor ZCM_CUSTOM = 0
MouseCursor ZCM_BLANK = 1
MouseCursor ZCM_NORMAL = 2
MouseCursor ZCM_MAX = 3
enum LevelItemBitflags: π Source
Level item flags. Used with Game->LItems[].
LevelItemBitflags LI_TRIFORCE = 1
The Triforce of this Level has been obtained.
LevelItemBitflags LI_MAP = 2
The Dungeon Map of this Level has been obtained.
LevelItemBitflags LI_COMPASS = 4
The Compass of this Level has been obtained.
LevelItemBitflags LI_BOSS = 8
A βDungeon Bossβ enemy has been slain.
LevelItemBitflags LI_BOSSKEY = 16
The Boss Key of this Level has been obtained.
enum GameOverScreenElementIndex: π Source
Used with Game->GameOverScreen[].
GameOverScreenElementIndex GOS_BACKGROUND = 0
GameOverScreenElementIndex GOS_TEXT_COLOUR = 1
GameOverScreenElementIndex GOS_CURSOR_TILE = 2
GameOverScreenElementIndex GOS_CURSOR_CSET = 3
GameOverScreenElementIndex GOS_CURSOR_SOUND = 4
GameOverScreenElementIndex GOS_TEXT_CONTINUE_COLOUR = 5
GameOverScreenElementIndex GOS_TEXT_SAVE_COLOUR = 6
GameOverScreenElementIndex GOS_TEXT_RETRY_COLOUR = 7
GameOverScreenElementIndex GOS_TEXT_CONTINUE_FLASH = 8
GameOverScreenElementIndex GOS_TEXT_SAVE_FLASH = 9
GameOverScreenElementIndex GOS_TEXT_RETRY_FLASH = 10
GameOverScreenElementIndex GOS_MIDI = 11
GameOverScreenElementIndex GOS_CUR_FLIP = 12
GameOverScreenElementIndex GOS_TEXT_DONTSAVE_COLOUR = 13
GameOverScreenElementIndex GOS_TEXT_SAVEQUIT_COLOUR = 14
GameOverScreenElementIndex GOS_TEXT_SAVE2_COLOUR = 15
GameOverScreenElementIndex GOS_TEXT_QUIT_COLOUR = 16
GameOverScreenElementIndex GOS_TEXT_DONTSAVE_FLASH = 17
GameOverScreenElementIndex GOS_TEXT_SAVEQUIT_FLASH = 18
GameOverScreenElementIndex GOS_TEXT_SAVE2_FLASH = 19
GameOverScreenElementIndex GOS_TEXT_QUIT_FLASH = 20
GameOverScreenElementIndex GOS_EXTRA1 = 21
GameOverScreenElementIndex GOS_EXTRA2 = 22
GameOverScreenElementIndex GOS_EXTRA3 = 23
enum GameOverStringIndex: π Source
Used with Game->GameOverStrings[].
GameOverStringIndex GOSTR_CONTINUE = 0
(Continue:Retry:Save) Screen.
GameOverStringIndex GOSTR_SAVE = 1
(Continue:Retry:Save) Screen.
GameOverStringIndex GOSTR_RETRY = 2
(Continue:Retry:Save) Screen.
GameOverStringIndex GOSTR_DONT_SAVE = 3
Savepoint Screen.
GameOverStringIndex GOSTR_SAVEANDQUIT = 4
Save and Quit Screen.
GameOverStringIndex GOSTR_SAVE2 = 5
Savepoint Screen.
GameOverStringIndex GOSTR_QUIT = 6
Save and Quit Screen.
enum CurrentItemIDBitflags: π Source
Used with Game->CurrentItemID().
CurrentItemIDBitflags CIID_FLAG_CHECKCOST = 1
Ignore items whose usecosts are currently not affordable.
CurrentItemIDBitflags CIID_FLAG_CHECKJINX = 2
Ignore items which are currently disabled by jinxes.
CurrentItemIDBitflags CIID_FLAG_CHECKBUNNY = 4
Ignore items which are currently disabled by BunnyClk.
Engine processes that can be paused. Used with Game->Suspend[].
SuspendType susptCOMBOANIM = 0
Combo animation
SuspendType susptGUYS = 1
Main Sprite animation by type
SuspendType susptLWEAPONS = 2
SuspendType susptEWEAPONS = 3
SuspendType susptITEMS = 4
SuspendType susptLINK = 5
SuspendType susptUPDATEFFC = 6
FFC (e.g. movement, changers, but not scripts)
SuspendType susptDECORATIONS = 7
sprite subclasses
SuspendType susptPARTICLES = 8
SuspendType susptPALCYCLE = 9
lake dries up
SuspendType susptLAKES = 10
SuspendType susptCOLLISIONS = 11
game system events
SuspendType susptCONTROLSTATE = 12
SuspendType susptONEFRAMECONDS = 13
SuspendType susptSCRIPDRAWCLEAR = 14
SuspendType susptQUAKE = 15
SuspendType susptGLOBALGAME = 16
Script Types
SuspendType susptNPCSCRIPTS = 17
SuspendType susptLWEAPONSCRIPTS = 18
SuspendType susptEWEAPONSCRIPTS = 19
SuspendType susptITEMSPRITESCRIPTS = 20
SuspendType susptFFCSCRIPTS = 21
SuspendType susptLINKACTIVE = 22
SuspendType susptITEMSCRIPTENGINE = 23
SuspendType susptDMAPSCRIPT = 24
SuspendType susptSCREENSCRIPTS = 25
SuspendType susptSUBSCREENSCRIPTS = 26
SuspendType susptCOMBOSCRIPTS = 27
SuspendType susptCONVEYORSITEMS = 60
Moving items
SuspendType susptDRAGGINGITEM = 61
SuspendType susptROAMINGITEM = 62
SuspendType susptLENS = 63
Misc
SuspendType susptHOOKSHOT = 64
SuspendType susptMOVINGBLOCKS = 65
SuspendType susptMAGICCAST = 66
SuspendType susptSCREENDRAW = 67
SuspendType susptLAST = 68
GENEV GENEV_HEROHIT_DAMAGE = 0
Damage to be taken
GENEV GENEV_HEROHIT_HITDIR = 1
Dir to be knocked in
GENEV GENEV_HEROHIT_NULLIFY = 2
Bool: to nullify the hit, or not
GENEV GENEV_HEROHIT_NAYRUON = 3
Bool: if nayruβs love will nullify the damage, or not
GENEV GENEV_HEROHIT_IFRAMES = 4
Number of IFrames to have after hit, if not nullified
GENEV GENEV_HEROHIT_HITTYPE = 5
What type of object is hitting the hero (βOBJTYPE_β)
GENEV GENEV_HEROHIT_HITOBJ = 6
The pointer to that object
GENEV GENEV_HEROHIT_HITTYPE2 = 7
A second type of object (sometimes βOBJTYPE_NONEβ)
GENEV GENEV_HEROHIT_HITOBJ2 = 8
The pointer to the second object
GENEV GENEV_ITEMCOL_ID = 0
Item ID to be gained
GENEV GENEV_ITEMCOL_PICKUP = 1
Pickup flags for the item pickup
GENEV GENEV_ITEMCOL_PSTR = 2
Pickup string to be displayed
GENEV GENEV_ITEMCOL_PSTRFLAGS = 3
Pickup string flags
GENEV GENEV_ITEMCOL_NULLIFY = 4
Bool: to nullify the item pickup, or not
GENEV GENEV_ITEMCOL_ITEMPTR = 5
βitemspriteβ object pointer
GENEV GENEV_ITEMCOL_TYPE = 6
Type of hit; see GENEVT_ICTYPE_
GENEV GENEV_ITEMCOL_WPNPTR = 7
βlweaponβ object pointer, or βNULLβ if no weapon is available
GENEV GENEV_EDI1_NPC = 0
the npc pointer
GENEV GENEV_EDI1_ITEMID = 1
the chosen item ID
GENEV GENEV_EDI1_DROPSET = 2
the dropset the ID was chosen from
GENEV GENEV_EDI2_NPC = 0
the npc pointer
GENEV GENEV_EDI2_ITM = 1
the itemsprite pointer
GENEV GENEV_EDEATH_DYING = 0
Bool: if the enemy is dying, or not (set false to cancel death)
GENEV GENEV_EDEATH_NPC = 1
the npc pointer
GENEV GENEV_EHIT_POWER = 0
damage amount
GENEV GENEV_EHIT_DEFENSETYPE = 1
defense type
GENEV GENEV_EHIT_UNBLOCKABLE = 2
unblockable flagset
GENEV GENEV_EHIT_WEAPONID = 3
weapon ID
GENEV GENEV_EHIT_NULLIFY = 4
Bool: if true the hit will not connect
GENEV GENEV_EHIT_NPCPTR = 5
npc pointer
GENEV GENEV_EHIT_LWPNPTR = 6
lweapon pointer
GENEV GENEV_PLAYER_FALLDROWN_COMBO = 0
The combo ID the Hero is falling/drowning into.
GENEVT GENEVT_ICTYPE_COLLECT = 0
Hero collected the item
GENEVT GENEVT_ICTYPE_MELEE = 1
Melee weapon collected the item
GENEVT GENEVT_ICTYPE_MELEE_EW = 2
Melee weapon collected the item
GENEVT GENEVT_ICTYPE_RANGED_DRAG = 3
Ranged weapon collected, and will drag //Only βNULLIFYβ can be edited here
OBJTYPE OBJTYPE_NONE = -1
constants for βGENEV_HEROHIT_HITTYPEβ / βGENEV_HEROHIT_HITTYPE2β
OBJTYPE OBJTYPE_NPC = 0
OBJTYPE OBJTYPE_LWPN = 1
OBJTYPE OBJTYPE_EWPN = 2
OBJTYPE OBJTYPE_ITSPR = 3
OBJTYPE OBJTYPE_COMBODATA = 4
OBJTYPE OBJTYPE_COMBOPOS = 5
OBJTYPE OBJTYPE_FFC = 6
OBJTYPE NUM_OBJTYPE = 7
Variable descriptions#
const int CurScreen π Source
deprecated_getter
GetCurScreen
The origin screen (top-left) of the current Region that the player is in.
During a scrolling screen transition, this is the new screen.
const int HeroScreen π Source
The screen that the Hero is in. In a scrolling region, this updates as the player moves around according to their coordinates. Otherwise, this is equivalent to CurScreen.
During a scrolling screen transition, this is the new screen.
const int CurDMapScreen π Source
deprecated_getter
GetCurDMapScreen
The screen the Hero is currently on, offset by the current dmap offset.
deprecated_getter
GetCurMap
The map the Hero is currently on.
deprecated_getter
GetCurDMap
The dmap the Hero is currently on.
const int CurLevel π Source
deprecated_getter
GetCurLevel
The level the Hero is currently on.
The number of times the player has died.
The current activated cheat level (range 0-4).
The highest cheat level that is enabled for the player. The player can change their cheat level in the cheat menu to any value <= this value (range 0-4). Updates when the player enters a cheat code.
long SubscreenSpeed π Source
Speed multiplier for the engine subscreen rise/fall. Default 1. Max 85.
const bool HasPlayed π Source
Returns true if the current save file was loaded, false if it was a freshly created save.
If true, keyboard input is disabled except for scripts reading it.
If Game->Time contains accurate time information.
The number of frames passed on the save file.
include/deprecated/time.zh
has several functions that help manage this value.
The count of enemies remaining alive for each screen on the current map.
int ContinueScreen π Source
The continue point the player will be reset to when continuing.
The continue point the player will be reset to when continuing.
index
CounterIndex (CR_)
value
0β65535
The value of each of the gameβs counters.
index
CounterIndex (CR_)
value
0β65535
The max value of each of the gameβs counters.
index
CounterIndex (CR_)
value
-32768β32767
The value of each of the gameβs drain counters.
index
GenericIndex (GEN_)
Generic values related to the game.
value
LevelItemBitflags (LI_)
Contains a bitflags of the βLevel Itemsβ.
How many level-specific keys are owned for each level.
Deprecated: Use Game->LevelStates[] instead!
Deprecated: Use Game->GlobalStates[] instead!
long[] LevelStates π Source
The level-specific switch states for each level. Each level has a single
long
, representing 32 bitwise states. Ex:
(Game->LevelStates[Game->CurLevel] & (1Lb << (5)))
will get the switch
state indexed 5
.
int[] GlobalStates π Source
The 256 global switch timers.
The contents of the Heroβs fillable bottles. Use bottle type IDs for the values, and slots (set in the bottle itemβs attributes) as the indexes.
True if the game is running in Standalone
mode.
int LastEntranceScreen π Source
The last entrance point the Hero used, and will be reset to by some mechanics.
int LastEntranceDMap π Source
The last entrance point the Hero used, and will be reset to by some mechanics.
bool ClickToFreezeEnabled π Source
Writing this to βfalseβ forcibly disables the βClick To Freezeβ setting, allowing the user to click without pausing the game (ex. for scripted mouse interaction)
index
QR (qr_)
The values of all Quest Rules.
If true, the end credits will not be shown.
If true, the F6 menu will not appear when F6 is pressed. The prompt to exit the game will still be shown.
An array of suspend states, all false by default. By writing these true, certain game operations may be paused until the state is written false again.
bool[] DisableItem π Source
Whether each item is disabled or not on the current dmap.
const int MapCount π Source
The number of maps in the quest.
const int ZScriptVersion π Source
The ZScript version number the quest was last compiled in.
The current version of ZC that the quest is being played in (ex: β2.55β for 2.55)
The current Build ID of ZC that the quest is being played in.
Deprecated.
The current detailed version; this can be the current Alpha, Beta, Gamma, or Release number, depending on the version of the program.
const int BetaType π Source
What type of detailed version the program is in. 0 = Alpha
, 1 = Beta
,
2 = Gamma
, 3 = Release
, -1 = error
.
bool DisableActiveSubscreen π Source
If true, pressing the Start button will no longer open the active subscreen.
const int NumMessages π Source
The number of message strings in the quest.
index
GravityIndex (GR_)
Values related to gravity.
const int[] Scrolling π Source
index
ScrollingIndex (SCROLL_)
An array of values related to scrolling. See ScrollingIndex (SCROLL_) for specifics. If not scrolling, all values are 0 unless otherwise stated.
Drawing during scrolling requires taking into account that the viewport and coordinate systems are shifting. To anchor draw calls to a particular point, such as the screen being scrolled to, the old way looks like this:
Screen->DrawTile(x + Game->Scrolling[SCROLL_NX], y + Game->Scrolling[SCROLL_NY], ...)
The above draws a tile at (x, y
) relative to the new screen.
This is deprecated by Screen->DrawOrigin. The new way to do the same is:
Screen->DrawOrigin = DRAW_ORIGIN_WORLD; // This is the default in a scrolling region.
Screen->DrawTile(x, y, ...)
index
MiscSpriteIndex (MISCSPR_)
The Quest->Graphics->Sprites->Misc Sprites
values.
index
MiscSfx (MISCSFX_)
The Quest->Audio->Misc SFX
values.
untyped[] EventData π Source
A variably-sized array containing information about the current event.
This should be accessed from genericdata after returning from
WaitEvent(). Depending on what event WaitEvent()
returns, a different set
of constants should be used to access this array.
value
MouseCursor
Which mouse cursor should be displayed during gameplay. ZCM_BLANK is the default, and it resets on visiting the title screen.
const int NumSavedPortals π Source
Returns the number of saved portals that currently exist.
const savedportal[] SavedPortals π Source
A 0-indexed Internal Array pointer referencing the saved portal objects. Cannot access the Magic Mirrorβs portal.
const int[] TrigGroups π Source
The 256 βTrigger Groupβ values for the current screen.
const int[] TriggerGroups π Source
The 256 βTrigger Groupβ values for the current screen.
int[] OverrideItems π Source
The override values for each itemclass. Default value is -2
. If set to
-2
, no override occurs. If > -2
, anything that checks for the
βhighest level itemβ of this class uses this ID instead. A value of -1
indicates forcing it to return βno itemβ.
const bool ActiveSubscreenOpen π Source
True if the active subscreen is currently open.
const int ActiveSubscreenY π Source
The Y offset of the active subscreen, used while it is opening/closing.
Value is -224
if subscreen is closed, -56
if it is open, or the
current draw offset otherwise.
int NumActiveSubscreens π Source
Returns the total number of active subscreens
int NumPassiveSubscreens π Source
Returns the total number of passive subscreens
int NumOverlaySubscreens π Source
Returns the total number of overlay subscreens
const int HighestStringID π Source
Returns the highest valid ID of the strings in the ZQuest String Editor.
const bool[] ReadKey π Source
Deprecated: Use Input->KeyPress[] instead!
const bool[] JoypadPress π Source
Deprecated: Use Input->Joypad[] instead!
Deprecated: Use Input->Press[] instead!
Deprecated: Use Input->Button (CB_) instead!
Deprecated: Use Input->Button (CB_) instead!
Set or get the Level Palette for each DMap
Deprecated: Use dmapdata::Palette instead!
Deprecated: Use dmapdata::Flagset[] instead!
Deprecated: Use dmapdata::Level instead!
Deprecated: Use dmapdata::Compass instead!
int[] DMapContinue π Source
Deprecated: Use dmapdata::Continue instead!
Deprecated: Use dmapdata::MIDI instead!
Deprecated: Use dmapdata::Offset instead!
Deprecated: Use dmapdata::Map instead!
int[] GameOverScreen π Source
Function descriptions#
int IncrementQuest() π Source
Ends the current quest in victory, resetting to the title screen (without showing the normal end credits), and if this quest is part of a module, increment to the next quest in the module.
Returns the current max sprite count for each sprite type.
void MaxNPCs(int value) π Source
Sets the max sprite count for a sprite type to the given new value. Max must be between 1 and 1024, inclusive.
Returns the current max sprite count for each sprite type.
void MaxLWeapons(int value) π Source
Sets the max sprite count for a sprite type to the given new value. Max must be between 1 and 1024, inclusive.
Returns the current max sprite count for each sprite type.
void MaxEWeapons(int value) π Source
Sets the max sprite count for a sprite type to the given new value. Max must be between 1 and 1024, inclusive.
int MaxItemsprites() π Source
Returns the current max sprite count for each sprite type.
void MaxItemsprites(int value) π Source
Sets the max sprite count for a sprite type to the given new value. Max must be between 1 and 1024, inclusive.
untyped GetScreenD(int screen, int register) π Source
void SetScreenD(int screen, int register, untyped value) π Source
untyped GetDMapScreenD(int dmap, int screen, int register) π Source
void SetDMapScreenD(int dmap, int screen, int register, untyped value) π Source
itemdata LoadItemData(int item) π Source
Deprecated: Use Audio->MIDI instead!
Saves the game. Can only run once per script per frame.
Closes the quest, returning to the title screen.
Closes the program, without saving.
Exits the quest without saving, then reloads the previous save.
Continueβs the quest, as βF6->Continueβ.
void SaveAndQuit() π Source
Saves the game, then exits.
void SaveAndContinue() π Source
Saves the game, then continues.
void ShowContinueScreen() π Source
Displays the engine Continue/Save/Retry screen.
void GetSaveName(char32[] buf) π Source
Loads the save file name into the buffer.
void SetSaveName(char32[] buf) π Source
Sets the save file name to the contents of the buffer, limit 8 characters.
bool ShowSaveScreen() π Source
Displays the Save screen, as Save Point combos use. Returns true if the Hero saved, false otherwise.
void ShowSaveQuitScreen() π Source
Displays the Save/Quit screen.
int GetFFCScript(char32[] name) π Source
Gets the script of the specified type with a name exactly matching
name
. If no such script exists, returns -1
.
int GetComboScript(char32[] name) π Source
Gets the script of the specified type with a name exactly matching
name
. If no such script exists, returns -1
.
int GetItemScript(char32[] name) π Source
Gets the script of the specified type with a name exactly matching
name
. If no such script exists, returns -1
.
int GetNPCScript(char32[] name) π Source
Gets the script of the specified type with a name exactly matching
name
. If no such script exists, returns -1
.
int GetLWeaponScript(char32[] name) π Source
Gets the script of the specified type with a name exactly matching
name
. If no such script exists, returns -1
.
int GetEWeaponScript(char32[] name) π Source
Gets the script of the specified type with a name exactly matching
name
. If no such script exists, returns -1
.
int GetPlayerScript(char32[] name) π Source
alias
GetHeroScript
deprecated_alias
GetLinkScript
Gets the script of the specified type with a name exactly matching
name
. If no such script exists, returns -1
.
int GetGlobalScript(char32[] name) π Source
Gets the script of the specified type with a name exactly matching
name
. If no such script exists, returns -1
.
int GetDMapScript(char32[] name) π Source
Gets the script of the specified type with a name exactly matching
name
. If no such script exists, returns -1
.
int GetScreenScript(char32[] name) π Source
Gets the script of the specified type with a name exactly matching
name
. If no such script exists, returns -1
.
int GetItemSpriteScript(char32[] name) π Source
Gets the script of the specified type with a name exactly matching
name
. If no such script exists, returns -1
.
int GetNPC(char32[] name) π Source
Gets the ID of the npc/item/combo/dmap whose name exactly matches name
.
If no such object exists, returns -1
.
int GetItem(char32[] name) π Source
Gets the ID of the npc/item/combo/dmap whose name exactly matches name
.
If no such object exists, returns -1
.
int GetCombo(char32[] name) π Source
Gets the ID of the npc/item/combo/dmap whose name exactly matches name
.
If no such object exists, returns -1
.
int GetDMap(char32[] name) π Source
Gets the ID of the npc/item/combo/dmap whose name exactly matches name
.
If no such object exists, returns -1
.
int GetGenericScript(char32[] name) π Source
Gets the script of the specified type with a name exactly matching
name
. If no such script exists, returns -1
.
The number of maps in the quest.
Deprecated: Use MapCount instead!
npcdata LoadNPCData(int id) π Source
param
NPCID (NPC_) id
Loads an Enemy Editor table data ref for NPC id
, to a npcdata
pointer.
combodata LoadComboData(int id) π Source
Loads a Combo Editor table data ref for combo id
, to a combodata
pointer.
mapdata LoadMapData(int map, int screen) π Source
Loads a canonical mapdata pointer for the screen at (map,screen)
. Edits to
these pointers do not persist through quest exit. Edits to these pointers
will NOT affect the βcurrent screenβ, even if the current map/screen is
supplied; see LoadTempScreen() below for that.
mapdata LoadTempScreen(int layer) π Source
Loads the temp mapdata pointer for the specified layer.
LoadTempScreen(0)
gives a pointer that works mostly the same as
Screen->
, while passing 1 through 6 will give equal access to the other
layers of the screen. Modifications to these pointers are reset when the
screen changes.
The entire Region at the specificed layer may be accessed by the combo array variables of this mapdata, but other variables read from just the top-left origin screen.
mapdata LoadTempScreen(int layer, int screen) π Source
Same as LoadTempScreen(), but for the specific screen
, which must be within the
current Region.
If the given screen is not valid, then the return value of this function is falsy.
mapdata LoadTempScreenForComboPos(int layer, int pos) π Source
Same as LoadTempScreen(), but loads the screen that contains the given combo pos
.
To convert an x, y
pixel coordinate to a combo pos with ComboAt().
mapdata LoadScrollingScreen(int layer) π Source
Loads the temp mapdata pointer for the specified layerβs *scrolling screen*. This is only used during scrolling, for drawing the screen you just came from during the scrolling animation.
The entire scrolling Region at the specificed layer may be accessed by the combo array variables of this mapdata, but other variables read from just the top-left origin screen.
mapdata LoadScrollingScreen(int layer, int screen) π Source
Same as LoadScrollingScreen(), but for the specific screen
, which must be within
the Region being scrolled away from.
If the given screen is not valid, or the player is not currently scrolling, then the return value of this function is falsy.
spritedata LoadSpriteData(int id) π Source
param
SpriteID (SP_) id
Loads an Weapon Sprite Editor table data ref for sprite βidβ, to a βspritedataβ typed pointer.
shopdata LoadShopData(int shop) π Source
Loads a Shop Editor table ref for an item shop with an ID of βidβ to a βshopdataβ typed pointer.
shopdata LoadInfoShopData(int shop) π Source
Loads a Shop Editor table ref for an info shop with an ID of id
to a
βshopdataβ typed pointer.
bitmap LoadBitmapID(int id) π Source
Loads a bitmap pointer for one of the old-style render target RT_
bitmaps.
messagedata LoadMessageData(int id) π Source
Loads an String Table Editor table data ref for ZQ Message String βidβ, to a messagedata typed pointer.
dmapdata LoadDMapData(int dmap) π Source
Loads a dmapdata ref for dmap ID dmap
to a dmapdata typed pointer.
dropsetdata LoadDropset(int id) π Source
Loads a dropsetdata ref for dropset number id
to a dropsetdata typed
pointer.
websocket LoadWebSocket(char32[] url) π Source
bottledata LoadBottleData(int id) π Source
Loads a bottledata ref for bottledata number id
to a bottledata
typed pointer.
Range 1-64
bottleshopdata LoadBottleShopData(int id) π Source
Loads a bottleshopdata ref for bottleshopdata number id
to a
βbottleshopdataβ typed pointer.
Range 0-255
genericdata LoadGenericData(int scriptslot) π Source
Loads the genericdata pointer referencing the specified generic
scriptslot
.
Note that 0
is invalid.
bitmap CreateBitmap(int width = 256
, int height = 256
) π Source
Allocates a new bitmap pointer, creating a width by height
canvas
(cleared to color 0).
Deprecated: Use new bitmap(width, height)
instead!
bitmap AllocateBitmap() π Source
Allocates a new bitmap pointer, but does not create a canvas on it. bitmap::Create() can later be used to create a canvas on the pointer.
void SetCustomCursor(bitmap b, int fx, int fy, bool sys_recolor = false
, bool user_scale = false
) π Source
Sets the custom cursor based on the given bitmap. This cursor will be
displayed if Game->MouseCursor == ZCM_CUSTOM
.
fx
, fy
denotes the βfocus pointβ of the cursor. For a normal cursor,
this is usually the top-left (the engine cursor uses 1, 1
, which is the
transparent pixel directly pointed to by the arrow). For a crosshair type
cursor, this would be the center.
If user_scale
is true, the userβs mouse scale config will apply to the
custom cursor.
If sys_recolor
is true, some special colors will be replaced based on
the current theme.
0xF1 = Cursor Misc
0xF2 = Cursor Outline
0xF3 = Cursor Light
0xF5 = Cursor Dark
WARNING: The palette will NOT update on custom cursors automatically. You must call this function again if the cursor should be affected by palette changes.
int NumSavedPortals() π Source
Returns the number of saved portals that currently exist.
Deprecated: Use NumSavedPortals instead!
savedportal LoadSavedPortal(int saved_portal_id) π Source
Loads a βSaved Portalβ pointer. Use 1 <= saved_portal_id
<=
NumSavedPortals, OR saved_portal_id
== -1 to access the Magic
Mirrorβs portal.
savedportal CreateSavedPortal() π Source
int CurrentItemID(int itemtype, int bitflags = 1L
) π Source
param
ItemType (IC_) itemtype
param
CurrentItemIDBitflags (CIID_) bitflags
Returns the current item of the selected itemtype
. This generally
returns the highest owned of an itemclass, with some exceptions.
If the item is set to an override value via Game->OverrideItems[], that value is returned.
Returns -1
for βno itemβ.
subscreendata LoadASubData(int id) π Source
Loads the subscreendata pointer for the specified active/passive/overlay subscreen.
Use id -1
to load the current subscreen of the type.
subscreendata LoadPSubData(int id) π Source
Loads the subscreendata pointer for the specified active/passive/overlay subscreen.
Use id -1
to load the current subscreen of the type.
subscreendata LoadOSubData(int id) π Source
Loads the subscreendata pointer for the specified active/passive/overlay subscreen.
Use id -1
to load the current subscreen of the type.
int SwapActiveSubscreens(int sub_id_1, int sub_id_2) π Source
int SwapPassiveSubscreens(int sub_id_1, int sub_id_2) π Source
int SwapOverlaySubscreens(int sub_id_1, int sub_id_2) π Source
void GetMessage(int string, char32[] buffer) π Source
void SetMessage(int message, char32[] str) π Source
Places string βstr[]β into ZQ Message βmessageβ.
int ComboTile(int combo) π Source
void PlaySound(int soundid) π Source
Deprecated: Use Audio->PlaySound() instead!
void PlayMIDI(int MIDIid) π Source
Deprecated: Use Audio->PlayMIDI() instead!
bool PlayEnhancedMusic(char32[] filename, int track) π Source
Deprecated: Use Audio->PlayEnhancedMusic() instead!
bool PlayOgg(char32[] filename, int track) π Source
Deprecated: Use Audio->PlayEnhancedMusic() instead!
Deprecated.
void SetOggPos(int pos) π Source
Deprecated.
void SetOggSpeed(int speed) π Source
Deprecated.
int GetScreenFlags(int map, int screen, int bitflags) π Source
Deprecated: Use βmapdata->β vars instead!
bool GetScreenState(int map, int screen, int flag) π Source
Deprecated: Use βmapdata->β vars instead!
void SetScreenState(int map, int screen, int flag, bool value) π Source
Deprecated: Use βmapdata->β vars instead!
int GetComboData(int map, int screen, int pos) π Source
Reads the canonical screen. If the screen is currently active (including as a layer), the temporary screen is read instead.
Note: since Regions came after this was deprecated, only the top-left screen may be considered βactiveβ for purposes of this function. Referencing any other screen in the current region will access the canonical screen instead.
Deprecated: Use mapdata::ComboD[]β instead!
void SetComboData(int map, int screen, int pos, int value) π Source
Updates the canonical screen. If the screen is currently active, the temporary screen is also updated.
Note: since Regions came after this was deprecated, only the top-left screen may be considered βactiveβ for purposes of this function. Referencing any other screen in the current region will access the canonical screen instead.
Deprecated: Use mapdata::ComboD[] instead!
int GetComboCSet(int map, int screen, int pos) π Source
Reads the canonical screen. If the screen is currently active (including as a layer), the temporary screen is read instead.
Note: since Regions came after this was deprecated, only the top-left screen may be considered βactiveβ for purposes of this function. Referencing any other screen in the current region will access the canonical screen instead.
Deprecated: Use mapdata::ComboC[] instead!
void SetComboCSet(int map, int screen, int pos, int value) π Source
Updates the canonical screen. If the screen is currently active, the temporary screen is also updated.
Note: since Regions came after this was deprecated, only the top-left screen may be considered βactiveβ for purposes of this function. Referencing any other screen in the current region will access the canonical screen instead.
Deprecated: Use mapdata::ComboC[] instead!
int GetComboFlag(int map, int screen, int pos) π Source
Reads the canonical screen. If the screen is currently active (including as a layer), the temporary screen is read instead.
Note: since Regions came after this was deprecated, only the top-left screen may be considered βactiveβ for purposes of this function. Referencing any other screen in the current region will access the canonical screen instead.
Deprecated: Use mapdata::ComboF[] instead!
void SetComboFlag(int map, int screen, int pos, int value) π Source
Updates the canonical screen. If the screen is currently active, the temporary screen is also updated.
Note: since Regions came after this was deprecated, only the top-left screen may be considered βactiveβ for purposes of this function. Referencing any other screen in the current region will access the canonical screen instead.
Deprecated: Use mapdata::ComboF[] instead!
int GetComboType(int map, int screen, int pos) π Source
Reads the canonical screen. If the screen is currently active (including as a layer), the temporary screen is read instead.
Note: since Regions came after this was deprecated, only the top-left screen may be considered βactiveβ for purposes of this function. Referencing any other screen in the current region will access the canonical screen instead.
Deprecated: Use mapdata::ComboT[] instead!
void SetComboType(int map, int screen, int pos, int value) π Source
Updates the combo type at the position in the canonical screen.
Note: since Regions came after this was deprecated, only the top-left screen may be considered βactiveβ for purposes of this function. Referencing any other screen in the current region will access the canonical screen instead.
Deprecated: Use mapdata::ComboT[] instead!
int GetComboInherentFlag(int map, int screen, int pos) π Source
Reads the canonical screen. If the screen is currently active (including as a layer), the temporary screen is read instead.
Note: since Regions came after this was deprecated, only the top-left screen may be considered βactiveβ for purposes of this function. Referencing any other screen in the current region will access the canonical screen instead.
Deprecated: Use mapdata::ComboI[] instead!
void SetComboInherentFlag(int map, int screen, int pos, int value) π Source
Updates the combo inherent flag at the position in the canonical screen.
Deprecated: Use mapdata::ComboI[] instead!
int GetComboSolid(int map, int screen, int pos) π Source
Reads the canonical screen. If the screen is currently active (including as a layer), the temporary screen is read instead.
Note: since Regions came after this was deprecated, only the top-left screen may be considered βactiveβ for purposes of this function. Referencing any other screen in the current region will access the canonical screen instead.
Deprecated: Use mapdata::ComboS[] instead!
void SetComboSolid(int map, int screen, int pos, int value) π Source
Updates the combo solidity at the position in the canonical screen.
Deprecated: Use mapdata::ComboS[] instead!
int GetUntypedScript(char32[] name) π Source
Deprecated.
int GetSubscreenScript(char32[] name) π Source
Deprecated.
void GetDMapMusicFilename(int dmap, char32[] buf) π Source
Deprecated: Use dmapdata::GetMusic() instead!
int GetDMapMusicTrack(int dmap) π Source
Deprecated: Use dmapdata::MusicTrack instead!
void SetDMapEnhancedMusic(int dmap, char32[] filename, int track) π Source
Deprecated: Use dmapdata::SetMusic() instead!
void GetDMapName(int DMap, char32[] buffer) π Source
Deprecated: Use dmapdata::GetName() instead!
void SetDMapName(int DMap, char32[] buffer) π Source
Deprecated: Use dmapdata::SetName() instead!
void GetDMapTitle(int DMap, char32[] buffer) π Source
Deprecated: Use dmapdata::GetTitle() instead!
void SetDMapTitle(int DMap, char32[] buffer) π Source
Deprecated: Use dmapdata::SetTitle() instead!
void GetDMapIntro(int DMap, char32[] buffer) π Source
Deprecated: Use dmapdata::GetIntro() instead!
void SetDMapIntro(int DMap, char32[] buffer) π Source
Deprecated: Use dmapdata::SetIntro() instead!
Added in version 2.55.9.