Game#
Contains general internal functions and variables.
Access with Game->
.
Variables#
const int |
|
const int |
|
const int |
|
const int |
|
const int |
|
int |
|
int |
|
int |
|
long |
|
long |
|
const bool |
|
bool |
|
bool |
|
int[] |
|
int |
|
int |
|
int[] |
|
int[] |
|
int[] |
|
untyped[] |
|
int[] |
|
int[] |
|
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 |
Functions#
int |
|
int |
MaxNPCs() |
void |
MaxNPCs(int value) |
int |
|
void |
MaxLWeapons(int value) |
int |
|
void |
MaxEWeapons(int value) |
int |
|
void |
MaxItemsprites(int value) |
int |
GetCurScreen() deprecated |
int |
GetCurDMapScreen() deprecated |
int |
GetCurMap() deprecated |
int |
GetCurDMap() deprecated |
int |
GetCurLevel() deprecated |
untyped |
GetScreenD(int screen, int reg) |
void |
SetScreenD(int screen, int reg, untyped value) |
untyped |
GetDMapScreenD(int dmap, int screen, int reg) |
void |
SetDMapScreenD(int arg1, int arg2, int arg3, untyped arg4) |
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) |
|
LoadScrollingScreen(int layer) |
|
LoadSpriteData(int id) |
|
LoadShopData(int shop) |
|
LoadInfoShopData(int shop) |
|
LoadBitmapID(int id) |
|
LoadMessageData(int id) |
|
LoadDMapData(int dmap) |
|
LoadDropset(int id) |
|
LoadRNG() |
|
LoadWebSocket(char32[] arg1) |
|
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 flags = |
LoadASubData(int id) |
|
LoadPSubData(int id) |
|
LoadOSubData(int id) |
|
int |
SwapActiveSubscreens(int arg1, int arg2) |
int |
SwapPassiveSubscreens(int arg1, int arg2) |
int |
SwapOverlaySubscreens(int arg1, int arg2) |
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(int arg1, int arg2) deprecated |
int |
GetOggPos() deprecated |
void |
SetOggPos(int arg1) deprecated |
void |
SetOggSpeed(int arg1) deprecated |
int |
GetScreenFlags(int map, int screen, int flagset) 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 position) deprecated |
void |
SetComboData(int map, int screen, int position, int value) deprecated |
int |
GetComboCSet(int map, int screen, int position) deprecated |
void |
SetComboCSet(int map, int screen, int position, int value) deprecated |
int |
GetComboFlag(int map, int screen, int position) deprecated |
void |
SetComboFlag(int map, int screen, int position, int value) deprecated |
int |
GetComboType(int map, int screen, int position) deprecated |
void |
SetComboType(int map, int screen, int position, int value) deprecated |
int |
GetComboInherentFlag(int map, int screen, int position) deprecated |
void |
SetComboInherentFlag(int map, int screen, int position, int value) deprecated |
int |
GetComboSolid(int map, int screen, int position) deprecated |
void |
SetComboSolid(int map, int screen, int position, int value) deprecated |
int |
GetUntypedScript(int arg1) deprecated |
int |
GetSubscreenScript(int arg1) 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
Use as index for Game->Gravity[].
GravityIndex GR_STRENGTH = 0
GravityIndex GR_TERMINALV = 1
GravityIndex GR_SPRLAYER = 2
GravityIndex GR_AIRDRAG = 3
enum ScrollingIndex: π Source
Use as index for Game->Scrolling[].
ScrollingIndex SCROLL_DIR = 0
ScrollingIndex SCROLL_NX = 1
ScrollingIndex SCROLL_NY = 2
ScrollingIndex SCROLL_OX = 3
ScrollingIndex SCROLL_OY = 4
enum MiscSpriteIndex: π Source
Use as index for Game->MiscSprites[].
MiscSpriteIndex MISCSPR_FALL = 0
MiscSpriteIndex MISCSPR_DROWN = 1
MiscSpriteIndex MISCSPR_LAVADROWN = 2
MiscSpriteIndex MISCSPR_SWITCHPOOF = 3
MiscSpriteIndex MISCSPR_MAX = 4
Use as index for 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_MAX = 10
enum GenericIndex: π Source
Use as index for 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
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_MAX = 27
Values for Game->MouseCursor.
MouseCursor ZCM_CUSTOM = 0
MouseCursor ZCM_BLANK = 1
MouseCursor ZCM_NORMAL = 2
MouseCursor ZCM_MAX = 3
Variable descriptions#
const int CurScreen π Source
Returns the screen the Hero is currently on.
const int CurDMapScreen π Source
Returns the screen the Hero is currently on, offset by the current dmap offset.
Returns the map the Hero is currently on.
Returns the dmap the Hero is currently on.
const int CurLevel π Source
Returns the level the Hero is currently on.
The number of times the Hero has died.
The current activated cheat level. (range 0-4)
The highest cheat level that is enabled for the Hero. The Hero can change their cheat level in the cheat menu to any value <= this value (range 0-4). Updates when the Hero enters a cheat code.
long SubscreenSpeed π Source
Speed multiplier for the engine subscreen rise/fall. Default 1. Max 85.
The number of frames passed on the save file.
include/time.zh
has several functions that help manage this value.
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 βfalseβ, Game->Time
does not contain accurate time information.
The count of enemies remaining alive for each screen on the current map.
int ContinueScreen π Source
The continue point the Hero will be reset to when continuing.
The continue point the Hero will be reset to when continuing.
The value of each of the gameβs counters.
Valid indices: CounterIndex (CR_
).
Valid values: 0 to 65535
.
The max value of each of the gameβs counters.
Valid indices: CounterIndex (CR_
).
Valid values: 0 to 65535
.
The value of each of the gameβs drain counters.
Valid indices: CounterIndex (CR_
).
Valid values: -32768 to 32767
.
Generic values related to the game.
Valid indices: GenericIndex (GEN_
).
Contains a bitwise flagset of the βLevel Itemsβ.
How many level-specific keys are owned for each level.
The level-specific switch states for each level. Each level has a single
long
, representing 32 bitwise states. Ex:
(Game->LSwitches:ref:`Game->CurLevel<globals_game_var_curlevel>` & (1Lb << (5)))
will get the switch
state indexed 5
.
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)
The values of all Quest Rules.
Valid indices: QR (qr_
).
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.
Warning
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.
Values related to gravity.
Valid indices: GravityIndex (GR_
).
const int[] Scrolling π Source
values related to scrolling.
Valid indices: ScrollingIndex (SCROLL_
).
The Quest->Graphics->Sprites->Misc Sprites
values.
Valid indices: MiscSpriteIndex (MISCSPR_
).
The Quest->Audio->Misc SFX
values.
Valid indices: MiscSfx (MISCSFX_
).
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.
Which mouse cursor should be displayed during gameplay. ZCM_BLANK is the default, and it resets on visiting the title screen.
Valid values: MouseCursor (ZCM_
).
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
Warning
Deprecated! Use Input->KeyPress[] instead!
const bool[] JoypadPress π Source
Warning
Deprecated! Use Input->Joypad[] instead!
Warning
Deprecated! Use Input->Press[] instead!
Warning
Deprecated! Use Input->Button[] instead!
Warning
Deprecated! Use Input->Button[] instead!
Set or get the Level Palette for each DMap
Warning
Deprecated! Use dmapdata::Palette instead!
Warning
Deprecated! Use dmapdata::Flagset[] instead!
Warning
Deprecated! Use dmapdata::Level instead!
Warning
Deprecated! Use dmapdata::Compass instead!
int[] DMapContinue π Source
Warning
Deprecated! Use dmapdata::Continue instead!
Warning
Deprecated! Use dmapdata::MIDI instead!
Warning
Deprecated! Use dmapdata::Offset instead!
Warning
Deprecated! Use dmapdata::Map instead!
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.
int GetCurScreen() π Source
Returns the screen the Hero is currently on.
Warning
Deprecated! Use CurScreen instead!
int GetCurDMapScreen() π Source
Returns the screen the Hero is currently on, offset by the current dmap offset.
Warning
Deprecated! Use CurDMapScreen instead!
Returns the map the Hero is currently on.
Warning
Deprecated! Use CurMap instead!
Returns the dmap the Hero is currently on.
Warning
Deprecated! Use CurDMap instead!
Returns the level the Hero is currently on.
Warning
Deprecated! Use CurLevel instead!
untyped GetScreenD(int screen, int reg) π Source
void SetScreenD(int screen, int reg, untyped value) π Source
untyped GetDMapScreenD(int dmap, int screen, int reg) π Source
void SetDMapScreenD(int arg1, int arg2, int arg3, untyped arg4) π Source
itemdata LoadItemData(int item) π Source
Warning
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
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.
Warning
Deprecated! Use MapCount instead!
npcdata LoadNPCData(int id) π Source
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 the 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.
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. Writing to this at any time other than during scrolling will have no effect.
spritedata LoadSpriteData(int id) π Source
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[] arg1) π 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).
Warning
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.
Warning
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 flags = 1L
) π Source
Returns the current item of the selected itemtype
. This generally
returns the highest owned of an itemclass, with some exceptions.
If [Game->OverrideItems``itemtype``] is set to an override value, that value will be returned.
Use the IC_
constants for itemtype, and the CIID_FLAG_
constants
bitwise-orβd for flags
.
With CIID_FLAG_CHECKCOST
, it will ignore items whose usecosts are
currently not affordable.
With CIID_FLAG_CHECKJINX
, it will ignore items which are currently
disabled by jinxes.
With CIID_FLAG_CHECKBUNNY
, it will ignore items which are currently
disabled by BunnyClk.
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 arg1, int arg2) π Source
int SwapPassiveSubscreens(int arg1, int arg2) π Source
int SwapOverlaySubscreens(int arg1, int arg2) π 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
Warning
Deprecated! Use Audio->PlaySound() instead!
void PlayMIDI(int MIDIid) π Source
Warning
Deprecated! Use Audio->PlayMIDI() instead!
bool PlayEnhancedMusic(char32[] filename, int track) π Source
Warning
Deprecated! Use Audio->PlayEnhancedMusic() instead!
bool PlayOgg(int arg1, int arg2) π Source
Warning
Deprecated! Use Audio->PlayEnhancedMusic() instead!
Warning
Deprecated!
void SetOggPos(int arg1) π Source
Warning
Deprecated!
void SetOggSpeed(int arg1) π Source
Warning
Deprecated!
int GetScreenFlags(int map, int screen, int flagset) π Source
Warning
Deprecated! Use βmapdata->β vars instead!
bool GetScreenState(int map, int screen, int flag) π Source
Warning
Deprecated! Use βmapdata->β vars instead!
void SetScreenState(int map, int screen, int flag, bool value) π Source
Warning
Deprecated! Use βmapdata->β vars instead!
int GetComboData(int map, int screen, int position) π Source
Warning
Deprecated! Use mapdata::ComboD[]β instead!
void SetComboData(int map, int screen, int position, int value) π Source
Warning
Deprecated! Use mapdata::ComboD[]β instead!
int GetComboCSet(int map, int screen, int position) π Source
Warning
Deprecated! Use mapdata::ComboC[]β instead!
void SetComboCSet(int map, int screen, int position, int value) π Source
Warning
Deprecated! Use mapdata::ComboC[]β instead!
int GetComboFlag(int map, int screen, int position) π Source
Warning
Deprecated! Use mapdata::ComboF[]β instead!
void SetComboFlag(int map, int screen, int position, int value) π Source
Warning
Deprecated! Use mapdata::ComboF[]β instead!
int GetComboType(int map, int screen, int position) π Source
Warning
Deprecated! Use mapdata::ComboT[]β instead!
void SetComboType(int map, int screen, int position, int value) π Source
Warning
Deprecated! Use mapdata::ComboT[]β instead!
int GetComboInherentFlag(int map, int screen, int position) π Source
Warning
Deprecated! Use mapdata::ComboI[]β instead!
void SetComboInherentFlag(int map, int screen, int position, int value) π Source
Warning
Deprecated! Use mapdata::ComboI[]β instead!
int GetComboSolid(int map, int screen, int position) π Source
Warning
Deprecated! Use mapdata::ComboS[]β instead!
void SetComboSolid(int map, int screen, int position, int value) π Source
Warning
Deprecated! Use mapdata::ComboS[]β instead!
int GetUntypedScript(int arg1) π Source
Warning
Deprecated!
int GetSubscreenScript(int arg1) π Source
Warning
Deprecated!
void GetDMapMusicFilename(int dmap, char32[] buf) π Source
Warning
Deprecated! Use dmapdata::GetMusic() instead!
int GetDMapMusicTrack(int dmap) π Source
Warning
Deprecated! Use dmapdata::MusicTrack instead!
void SetDMapEnhancedMusic(int dmap, char32[] filename, int track) π Source
Warning
Deprecated! Use dmapdata::SetMusic() instead!
void GetDMapName(int DMap, char32[] buffer) π Source
Warning
Deprecated! Use dmapdata::GetName() instead!
void SetDMapName(int DMap, char32[] buffer) π Source
Warning
Deprecated! Use dmapdata::SetName() instead!
void GetDMapTitle(int DMap, char32[] buffer) π Source
Warning
Deprecated! Use dmapdata::GetTitle() instead!
void SetDMapTitle(int DMap, char32[] buffer) π Source
Warning
Deprecated! Use dmapdata::SetTitle() instead!
void GetDMapIntro(int DMap, char32[] buffer) π Source
Warning
Deprecated! Use dmapdata::GetIntro() instead!
void SetDMapIntro(int DMap, char32[] buffer) π Source
Warning
Deprecated! Use dmapdata::SetIntro() instead!