// ZC 2.54, Alpha 2
/////////////////
/// ZScript ///
/////////////////
Added Audio-> pointer, for audio and music functions. Old functions such as PlaySOund are /cloned/ here, so
you may do either game->PlaySound(), or Audio->PlaySOund() with the same effect.
New audio function will be here.
Added Debug-> pointer, for experimental stuff, and things meant purely for debugging.
Added NPCData-> pointer, for editing the enemy editor npc values.
Added Text-> Pointer, for modern text dialgoue.
Added Graphics-> Pointer, for graphical functions. Old isntructions will be cloned, and new instructions, such as
palette editing, will go here.
Added ComboData-> Pointer, for editing the ombo table properties by script.
Added SpriteData->Pointer, for editing the weapons/misc sprite properties by script.
////////////////
/// Global ///
////////////////
int SizeOfArrayBool(bool array[]); ZASM Instruction:
ARRAYSIZEB d2
/**
* Returns the index size of the array pointed by 'array'.
* As SizeOfArray(int *ptr), save that it works specifically with bool typed arrays.
* Useful in for loops.
*
*/ Example Use:
/************************************************************************************************************/
int SizeOfArrayFFC(ffc array[]); ZASM Instruction:
ARRAYSIZEF d2
/**
* Returns the index size of the array pointed by 'array'.
* As SizeOfArray(int *ptr), save that it works specifically with ffc typed arrays.
* Useful in for loops.
*
*/ Example Use:
/************************************************************************************************************/
int SizeOfArrayNPC(npc array[]); ZASM Instruction:
ARRAYSIZEN d2
/**
* Returns the index size of the array pointed by 'array'.
* As SizeOfArray(int *ptr), save that it works specifically with npc typed arrays.
* Useful in for loops.
*
*/ Example Use:
/************************************************************************************************************/
int SizeOfArrayItem(item array[]); ZASM Instruction:
ARRAYSIZEI d2
/**
* Returns the index size of the array pointed by 'array'.
* As SizeOfArray(int *ptr), save that it works specifically with item typed arrays.
* Useful in for loops.
*
*/ Example Use:
/************************************************************************************************************/
int SizeOfArrayItemdata(itemdata array[]);
ZASM Instruction:
ARRAYSIZEID d2
/**
* Returns the index size of the array pointed by 'array'.
* As SizeOfArray(int *ptr), save that it works specifically with itemdata typed arrays.
* Useful in for loops.
*
*/ Example Use:
/************************************************************************************************************/
int SizeOfArrayLWeapon(lweapon array[]);
ZASM Instruction:
ARRAYSIZEL d2
/**
* Returns the index size of the array pointed by 'array'.
* As SizeOfArray(int *ptr), save that it works specifically with lweapon typed arrays.
* Useful in for loops.
*
*/ Example Use:
/************************************************************************************************************/
int SizeOfArrayEWeapon(eweapon array[]);
ZASM Instruction:
ARRAYSIZEE d2
/**
* Returns the index size of the array pointed by 'array'.
* As SizeOfArray(int *ptr), save that it works specifically with eweapon typed arrays.
* Useful in for loops.
*
*/ Example Use:
/************************************************************************************************************/
void OverlayTile(int firsttile, int secondtile); ZASM Instruction:
OVERLAYTILEVV
OVERLAYTILEVR
OVERLAYTILERV
OVERLAYTILERR
/**
* Overlays secondtile onto firsttile, ignoring all pixels of colour 0.
* The valid tile value range is 0 to 65519.
* This change is *TEMPORARY* within the quest file
* and will not be retained when saving the game.
*
*/ Example Use:
//////////////
/// GAME ///
//////////////
int Game->GetItemScript(int ptr[]); ZASM Instruction:
GETITEMSCRIPT
/**
* Returns the number of the item script with the given name or -1 if there is
* no such script. The script name should be passed as a string.
* (!) This was added at 2.54 beta 52.5, 1st June 2017
*
*/ Example Use:
/************************************************************************************************************/
int GetBoolPointer(bool *ptr[]); ZASM Instruction:
BOOLARRPTR
/**
* Returns the pointer of a bool array as a float.
*/ Example Use:
bool arr[16];
int size = SizeOfArray( GetPointer(arr) );
//Size == 16
/************************************************************************************************************/
bool SetBoolPointer(bool *ptr[]); ZASM Instruction:
BOOLARRPTR2
/**
* Converts an int pointer to the bool type, for assigning.
*/ Example Use:
bool arr[16];
int size = SizeOfArray( GetPointer(arr) );
//Size == 16
/************************************************************************************************************/
void GreyscaleOn() ZASM Instruction
GREYSCALEON
/**
* Renders the entire display in greyscale.
*/ Example Use: !#!
/************************************************************************************************************/
void GreyscaleOff() ZASM Instruction
GREYSCALEOFF
/**
* Returns the display rendering to colour.
*/ Example Use: !#!
/************************************************************************************************************/
int DMapPalette[]; ZASM Instruction:
DMAPLEVELPAL
/**
* An array of 512 integers containing each DMap's Level Palette
*/ Example Use: !#!
/************************************************************************************************************/
void SetMessage(int message, int buffer[]);
ZASM Instruction:
SETMESSAGE
/**
* Loads string 'buffer[]' into ZQ Message 'message'.
*/ Example Use: !#!
/************************************************************************************************************/
void SetDMapName(int dmap_id, int buffer[]);
ZASM Instruction:
SETDMAPNAME
/**
* Loads string 'buffer[]' to the DMap Name field for DMap with ID 'dmap_id'.
* See std_constsnts.zh for appropriate buffer size.
*/ Example Use: !#!
/************************************************************************************************************/
void SetDMapTitle(int DMap, int buffer[]);
ZASM Instruction:
SETDMAPTITLE
/**
* Loads string 'buffer[]' to the DMap Title field for DMap with ID 'dmap_id'.
* See std_constsnts.zh for appropriate buffer size.
*/ Example Use: !#!
/************************************************************************************************************/
void SetDMapIntro(int DMap, int buffer[]);
ZASM Instruction:
SETDMAPINTRO
/**
* Loads string 'buffer[]' to the DMap Intro field for DMap with ID 'dmap_id'.
* See std_constsnts.zh for appropriate buffer size.
*/ Example Use: !#!
/************************************************************************************************************/
int Version; ZASM Instruction:
ZELDAVERSION
/**
* Returns the version of ZC being used.
*
*/ Example Use: !#!
/************************************************************************************************************/
int Build; ZASM Instruction:
ZELDABUILD
/**
* Returns the Build ID of the version of ZC being used.
*
*/ Example Use: !#!
/************************************************************************************************************/
int Beta; ZASM Instruction:
ZELDABETA
/**
* Returns the Beta ID of the version of ZC being used. If the build is not a beta, this returns 0.
*
*/ Example Use: !#!
/************************************************************************************************************/
bool DisableActiveSubscreen; ZASM Instruction:
NOACTIVESUBSC
/**
* If set true, the active subscreen will not fall into view ehen the player presses Start.
*
*/ Example Use: !#!
/************************************************************************************************************/
void SetScreenFlag(int map, int screen, int flag, bool state); ZASM Instruction:
SCREENFLAG
/**
*
*
*/ Example Use:
/************************************************************************************************************/
bool ButtonPress[18]; ZASM Instruction:
BUTTONPRESS
/**
* An array of 18 button states that correspond to Link->Press*
*
*/ Example Use:
/************************************************************************************************************/
bool ButtonInput[18]; ZASM Instruction:
BUTTONINPUT
/**
* An array of 18 button states that correspond to Link->Input*
*
*/ Example Use:
/************************************************************************************************************/
bool ButtonHeld[18]; ZASM Instruction:
BUTTONHELD
/**
* An array of 18 button states that returns if a button is being held down.
* MAY only represent a joypad.
*
*/ Example Use:
/************************************************************************************************************/
bool KeyPress[127]; ZASM Instruction:
KEYPRESS
/**
* An array of 127 indices, each representing a keypress on the keyboard.
* See std_keyboard.zh for constants ands functions that relate to reading from, or writing to the keyboard.
*
*/ Example Use:
/************************************************************************************************************/
bool ReadKey[127]; ZASM Instruction:
READKEY
/**
* A read-only array of 127 indices, each representing a keypress on the keyboard.
* Returns true if a key is pressed or held.
* See std_keyboard.zh for constants ands functions that relate to reading from, or writing to the keyboard.
*
*/ Example Use:
/************************************************************************************************************/
bool JoypadPress[18]; ZASM Instruction:
JOYPADPRESS
/**
* An array of 18 button states that corresponds to whether the player is pressing a button on a Joypad \
* controller, but not the keyboard. REQUIRES TESTING.
*
*/ Example Use:
/************************************************************************************************************/
int NumMessages; ZASM Instruction
int HighestStringID GAMENUMMESSAGES
/**
*
* Returns the number of message strings used in a quest.
*
*
* /
/************************************************************************************************************/
SetScreenEnemy(int map, int screen, int enemy_index, int enem_type);
GetScreenEnemy(int map, int screen, int enemy_index);
/************************************************************************************************************/
SetScreenDoor(int map, int screen, int door_index, int door_type);
GetScreenDoor(int map, int screen, int door_index);
/************************************************************************************************************/
SetScreenWidth(int map, int screen, int value);
GetScreenWidth(int map, int screen);
/************************************************************************************************************/
SetScreenHeight(int map, int screen, int value);
GetScreenHeight(int map, int screen);
/************************************************************************************************************/
SetScreenViewX(int map, int screen, int value);
GetScreenViewX(int map, int screen);
/************************************************************************************************************/
SetScreenViewY(int map, int screen, int value);
GetScreenViewY(int map, int screen);
/************************************************************************************************************/
SetScreenGuy(int map, int screen, int value);
GetScreenGuy(int map, int screen);
/************************************************************************************************************/
SetScreenString(int map, int screen, int value);
GetScreenString(int map, int screen);
/************************************************************************************************************/
SetScreenRoomType(int map, int screen, int value);
GetScreenRoomType(int map, int screen);
/************************************************************************************************************/
SetScreenEntryX(int map, int screen, int value);
GetScreenEntryX(int map, int screen);
/************************************************************************************************************/
SetScreenEntryY(int map, int screen, int value);
GetScreenEntryY(int map, int screen);
/************************************************************************************************************/
SetScreenItem(int map, int screen, int value);
GetScreenItem(int map, int screen);
/************************************************************************************************************/
SetScreenUndercombo(int map, int screen, int value);
GetScreenUndercombo(int map, int screen);
/************************************************************************************************************/
SetScreenUnderCSet(int map, int screen, int value);
GetScreenUnderCSet(int map, int screen);
/************************************************************************************************************/
SetScreenCatchall(int map, int screen, int value);
GetScreenCatchall(int map, int screen);
/************************************************************************************************************/
SetScreenLayerOpacity(int map, int screen, int layer, int opacity);
GetScreenLayerOpacity(int map, int screen, int layer);
/************************************************************************************************************/
SetScreenSecretCombo(int map, int screen, int index, int value);
GetScreenSecretCombo(int map, int screen, int index);
/************************************************************************************************************/
SetScreenSecretCSet(int map, int screen, int index, int value);
GetScreenSecretCSet(int map, int screen, int index);
/************************************************************************************************************/
SetScreenSecretFlag(int map, int screen, int index, int value);
GetScreenSecretFlag(int map, int screen, int index);
/************************************************************************************************************/
SetScreenLayerMap(int map, int screen, int layer, int map);
GetScreenLayerMap(int map, int screen, int layer);
/************************************************************************************************************/
SetScreenLayerScreen(int map, int screen, int layer, int screen);
GetScreenLayerScreen(int map, int screen, int layer);
/************************************************************************************************************/
SetScreenPath(int map, int screen, int path, int dest);
GetScreenPath(int map, int screen, int path);
/************************************************************************************************************/
SetScreenWarpReturnX(int map, int screen, int warp, int posX);
GetScreenWarpReturnX(int map, int screen, int warp);
/************************************************************************************************************/
SetScreenWarpReturnY(int map, int screen, int warp, int posY);
GetScreenWarpReturnY(int map, int screen, int warp);
/************************************************************************************************************/
int GetMaxMaps()
int MapCount() ZASM Instruction
GETMAXMAPS
/**
*
* Returns the number of maps used by a quest.
*
*
* /
/************************************************************************************************************/
int GetScreenEnemy(int map, int screen, int enemy_index)
ZASM Instruction
GETSCREENENEMY
/**
* Reads values from enemy lists anywhere in the game.
* Returns the Nth enemy of a given map, and screen where 'enemy_index' is the Nth index
* 'map' is the desired map, and 'screen' is the desired screen.
* Returns 0 if there is no enemy in the desired index.
*
* Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
* /
/************************************************************************************************************/
int SetScreenEnemy(int map, int screen, int enemy_index, int enemy_id)
ZASM Instruction
SETSCREENENEMY
/**
* Sets values to enemy lists anywhere in the game.
* Sets the Nth enemy of a given map, and screen to a specified NPC, where 'enemy_index' is
* the Nth index 'map' is the desired map, and 'screen' is the desired screen, and 'enemy_id'.
* is the ID of the enemy that you wish to use.
*
* If changing the enemies on the current screen and map, enemies will change upon reloading the screen.
*
* Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
* /
/************************************************************************************************************/
int GetScreenDoor(int map, int screen, int index)
ZASM Instruction
GETSCREENDOOR
/**
* Reads value of a door on any screen in the game environment.
* Returns Screen->Door[index] of a given map, and screen where 'index' is the Door[] index,
* 'map' is the desired map, and 'screen' is the desired screen.
* Returns 0 if there is no door present (open).
*
* Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
* /
/************************************************************************************************************/
int SetScreenDoor(int map, int screen, int index, int type)
ZASM Instruction
SETSCREENDOOR
/**
* Sets the value of a door on any screen in the game environment.
* Sets Screen->Door[index] of a given map, and screen where 'index' is the Door[] index,
* 'map' is the desired map, and 'screen' is the desired screen, and 'type'.
* is the door type.
*
* If changing the doors on the current screen and map, doors will change upon reloading the screen.
*
* Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
* /
/************************************************************************************************************/
///////////////
/// Audio ///
///////////////
void PauseSound(int soundid); ZASM Instruction:
PAUSESOUNDR
PAUSESOUNDV
/**
* Pauses one of the quest's playing sound effects. Use the SFX_ constants in
* std.zh as values of soundid.
*/ Example Use: !#!
/************************************************************************************************************/
void ResumeSound(int soundid); ZASM Instruction:
RESUMESOUNDR
RESUMESOUNDV
/**
* Resumes one of the quest's paused sound effects. Use the SFX_ constants in
* std.zh as values of soundid.
*/ Example Use: !#!
/************************************************************************************************************/
void EndSound(int soundid); ZASM Instruction:
ENDSOUNDR
ENDSOUNDV
/**
* Kills one of the quest's playing sound effects. Use the SFX_ constants in
* std.zh as values of soundid.
*/ Example Use: !#!
/************************************************************************************************************/
void PauseMusic(); ZASM Instruction:
PAUSEMUSIC
PAUSEMUSIC
/**
* Pauses the present, playing MIDI or Enhanced Music file.
*/ Example Use: !#!
/************************************************************************************************************/
void ResumeMusic(); ZASM Instruction:
RESUMEMUSIC
RESUMEMUSIC
/**
* Resumes the present, playing MIDI or Enhanced Music file.
*/ Example Use: !#!
/************************************************************************************************************/
void PlaySound(int sfx);
/************************************************************************************************************/
/////////////
/// FFC ///
/////////////
int ID; ZASM Instruction
FFCID
/**
* Returns the screen index of the FFC.
* Can be set, to change the index of a pointer, but this requires testing and may be unstable.
*
*/
/************************************************************************************************************/
//////////////////
/// Itemdata ///
//////////////////
int Attributes[10]; ZASM Instruction:
IDATAATTRIB
/**
* An array of ten integers containing the Attributes values.
* These correspond to the text entry fields, in the item editor 'Data' tab.
*
*/
/************************************************************************************************************/
int Sprites[10]; ZASM Instruction:
IDATASPRITES
/**
* An array of ten integers containing the Sprites values.
* These correspond to the pull-down options in the item editor 'Action' tab. .
*
*/
/************************************************************************************************************/
bool Flags[5]; ZASM Instruction:
IDATAFLAGS
/**
* An array of five multipurpose boolean flags. The properties of this flag change based on the item class (family).
* Flag[0] corresponds to the box directly below 'Equiment Item'. For swords, this is 'B.H. is Percent'.
* Flag[1] corresponds to the box directly below 'Flag 1'. For swords, this is 'B.D. is Percent'.
* Flag[2] corresponds to the box directly right of 'Equiment Item'. For swords, this is 'B. Penetrates Enemies'.
* Flag[3] corresponds to the box directly right of 'Flag 2'. For swords, this is 'Can Slash'.
* Flag[4] corresponds to the box directly below 'Flag 4'.For swords, this is '<Unused>', and greyed out.
*
* Scripted item classes may make use of these as a general-purpose script flags.
* See 'zscript_itemdata.txt' for more information on what this flag does, based on the item class.
*/
/************************************************************************************************************/
//////////////
/// Item ///
/////////////
int ACLock; ZASM Instruction:
ITEMACLC
/**
* Returns the present tick of the animation clock.
*
*/
/************************************************************************************************************/
/////////////
/// NPC ///
/////////////
int InvFrames; ZASM Instruction:
NPCINVINC
/**
* Returns if the enemy is temporarily invincible, from being hit, or otherwise.
* Returns the number of remaining invincibility frames if the enemy is invincible, otherwise 0.
*
*/ Example Use: !#!
/************************************************************************************************************/
int Invincible; ZASM Instruction:
NPCSUPERMAN
/**
* Returns if the enemy is invincible, because of ( superman variable ).
*
*/ Example Use: !#!
/************************************************************************************************************/
bool HasItem; ZASM Instruction:
NPCHASITEM
/**
* Returns if the enemy is holding the screen item.
*
*/ Example Use: !#!
/************************************************************************************************************/
bool Ringleader; ZASM Instruction:
NPCRINGLEAD
/**
* Returns if the enemy is a 'ringleader'.
*
*/ Example Use: !#!
/************************************************************************************************************/
int ScriptDefense[]; ZASM Instruction:
NPCSCRDEFENSED
/**
* The npc's Script Weapon Defense values, as an array of 10 integers. Use the NPCSD_ and NPCDT_ constants
* in std.zh to set or compare these values.
*
* This corresponds to the 'Defenses 3' tab in the Enemy Editor.
*/
/************************************************************************************************************/
/////////////////
/// LWeapon ///
/////////////////
int Range; ZASM Instruction:
LWPNRANGE
/**
* The range of the weapon in pixels.
* The range in pixels for boomerang and hookshot lweapons; and the duration in frames for arrow lweapons.
*
*/ Example Use: !#!
/************************************************************************************************************/
////////////////
/// Screen ///
////////////////
void TriggerSecret(int flag); ZASM Instruction:
TRIGGERSECRETR
TRIGGERSECRETV
Triggers all secrets of the type 'flag' on the current screen
/************************************************************************************************************/
lweapon CreateLWeaponDx(int type, int baseitem)
ZASM Instruction
CREATELWEAPONDX
/**
*
* Create an lweapon with the type 'type', using data as if the weapon was created
* by using the item 'item_id', thus forwarding sprites, sounds, and other values.
*
*
* /
/************************************************************************************************************/
void Polygon();
/************************************************************************************************************/
//////////////
/// Link ///
//////////////
bool Link->DisableItem[256]; ZASM Instruction:
DISABLEDITEM
/**
* An array of 256 values that represents whether items are disabeld on the current DMap.
* A disabled item returns 'true'.
* Writing to this array should disable or enable an item on the current DMap, but the behaviour
* if Link does not have that item MAY not be fully defined.
*
*/ Example Use:
/************************************************************************************************************/
int UsingItem; ZASM Instruction:
LINKUSINITEM
/**
* Returns the ID of an item used when Link uses an item.
* Setting this does nothing.
*
*/ Example Use: !#!
/************************************************************************************************************/
int Attack; ZASM Instruction:
LINKUSINITEMA
/**
* Returns LinkClass::attack (?)
*
*/ Example Use: !#!
/************************************************************************************************************/
int Animation; ZASM Instruction:
LINKANIMTYPE
/**
* Link;s Animation style, as set in Quest->Graphics->Sprites->Link
* Valid types are 0, 1, 2, and 3.
*
*/ Example Use: !#!
/************************************************************************************************************/
int WalkASpeed; ZASM Instruction:
LINKWALKANMSPD
/**
* Link's Walking Animation speed as set in Quest->Graphics->Sprites->Link
* valid types are:
*
*/ Example Use: !#!
/************************************************************************************************************/
int SwimASpeed; ZASM Instruction:
LINKSWIMSPD
/**
* Link's Swiming Animation speed as set in Quest->Graphics->Sprites->Link
* valid types are:
*
*/ Example Use: !#!
/************************************************************************************************************/
int InvFrames; ZASM Instruction:
LINKINVFRAME
/**
* The number of frames for which Link is invincible, when hit by an enemy or weapon.
* This returns how long Link will remain invincible, or you may set it to a value between 0 and 214747.
* Returns 0 if Link is not invincible.
*
*/ Example Use: !#!
/************************************************************************************************************/
bool InvFlicker; ZASM Instruction:
LINKCANFLICKER
/**
* Set true by default. If this is true, Link will either flicker, or flash when invincible, depending
* on your Quest rules settings. If set false, Link will neither flash, nor flicker when invincible.
*/ Example Use: !#!
/************************************************************************************************************/
int HurtSound; ZASM Instruction:
LINKHURTSFX
/**
* The sound that plays when Link is injured. By default this is '16', but you may change it at any time.
*
*/ Example Use: !#!
/************************************************************************************************************/
int HitHeight; ZASM Instruction:
LINKHYSZ
/**
* link's Hitbox height in pixels starting from his 0x,0y (upper-left) corner, going down.
* Note that this works on a per-sprite, per-direction basis.
* If you wish to extend Link's hitbox upwards on the Y-Axis, set this value, and adjust his HitYOffset.
* You can read a value that you assign to this (e.g. for custom collision functions).
* This value is not preserved through sessions: Loading a saved game will reset it to the default.
*
*/ Example Use: !#!
/************************************************************************************************************/
int HitWidth; ZASM Instruction:
LINKHXSZ
/**
* Link's Hitbox width in pixels starting from his x0,y0 (upper-left) corner, going right.
* Note that this works on a per-sprite, per-direction basis.
* This value is not preserved through sessions: Loading a saved game will reset it to the default.
*
*/ Example Use: !#!
/************************************************************************************************************/
//Not implemented. Use Extend and Sprites.
int TileWidth; ZASM Instruction:
LINKTYSZ
/**
* Link's width, in tiles.
* This is not usable, as Link->Extend cannot be set.
* While setting it is not syntactically incorrect, it does nothing.
* You can read a value that you assign to this (e.g. for custom/proxy sprite drawing).
* This value is not preserved through sessions: Loading a saved game will reset it to the default.
*
*/ Example Use: !#!
/************************************************************************************************************/
//Not implemented. Use Extend and Sprites.
int TileHeight; ZASM Instruction:
LINKTXSZ
/**
* Link's height, in tiles.
* This is not usable, as Link->Extend cannot be set.
* While setting it is not syntactically incorrect, it does nothing.
* You can read a value that you assign to this (e.g. for custom/proxy sprite drawing).
* This value is not preserved through sessions: Loading a saved game will reset it to the default.
*
*/ Example Use: !#!
/************************************************************************************************************/
//Not implemented.
int HitZHeight; ZASM Instruction:
LINKHZSZ
/**
* The Z-axis height of Link's hitbox, or collision rectangle.
* The lower it is, the lower a flying or jumping enemy must fly in order to hit Link.
* To jump over a sprite, you must be higher than its Z + HitZHeight.
* The values of DrawZOffset and HitZHeight are linked. Setting one, also sets the other.
* Writing to this is ignored unless Extend is set to values >=3.
* This is not usable, as Link->Extend cannot be set.
* While setting it is not syntactically incorrect, it does nothing.
* You can read a value that you assign to this (e.g. for custom collision functions).
* This value is not preserved through sessions: Loading a saved game will reset it to the default.
*
*/ Example Use: !#!
/************************************************************************************************************/
int HitXOffset; ZASM Instruction:
LINKHXOFS
/**
* The X offset of Link's hitbox, or collision rectangle.
* Setting it to positive or negative values will move Link's hitbox left or right.
* Writing to this is ignored unless Extend is set to values >=3.
* Note that this works on a per-sprite, per-direction basis.
* You can read a value that you assign to this (e.g. for custom collision functions).
* This value is not preserved through sessions: Loading a saved game will reset it to the default.
*
*/ Example Use: !#!
/************************************************************************************************************/
int HitYOffset; ZASM Instruction:
LINKHYOFS
/**
* The Y offset of Link's hitbox, or collision rectangle.
* Setting it to positive or negative values will move Link's hitbox up or down.
* Writing to this is ignored unless Extend is set to values >=3.
* Note that this works on a per-sprite, per-direction basis.
* You can read a value that you assign to this (e.g. for custom collision functions).
* This value is not preserved through sessions: Loading a saved game will reset it to the default.
*
*/ Example Use: !#!
/************************************************************************************************************/
//Not yet implemented
int DrawXOffset; ZASM Instruction:
LINKXOFS
/**
* The X offset of Link's sprite.
* Setting it to positive or negative values will move the sprite's tiles left or right relative to its position.
* Writing to this is ignored unless Extend is set to values >=3.
* This is not usable, as Link->Extend cannot be set.
* While setting it is not syntactically incorrect, it does nothing.
* You can read a value that you assign to this.
* This value is not preserved through sessions: Loading a saved game will reset it to the default.
*
*/ Example Use: !#!
/************************************************************************************************************/
//Not yet implemented
int DrawYOffset; ZASM Instruction:
LINKYOFS
/**
* The Y offset of Link's sprite.
* Setting it to positive or negative values will move the sprite's tiles up or down relative to its position.
* Writing to this is ignored unless Extend is set to values >=3.
* This is not usable, as Link->Extend cannot be set.
* While setting it is not syntactically incorrect, it does nothing.
* You can read a value that you assign to this.
* This value is not preserved through sessions: Loading a saved game will reset it to the default.
*
*/ Example Use: !#!
/************************************************************************************************************/
//! Link->Equipment is now read-write, and needs testing.
//! It is also a pain to write bitwise values, to test it.
int Equipment; ZASM Instruction:
LINKEQUIP
/**
* Contains the item IDs of what is currently equiped to Link's A and B buttons.
* The first 8 bits contain the A button item, and the second 8 bits contain the B button item.
* If you are not comfortable with performing binary operations,
* you can use the functions GetEquipmentA() or GetEquipmentB() in std.zh.
*
*/ Example Use: !#!
/************************************************************************************************************/
int ItemA; ZASM Instruction:
LINKITEMA
/**
* Contains the item IDs of what is currently equiped to Link's A button.
* Writing to this variable will set an item to the A-button.
* This will occur even if the item is not in inventory, and not on the subscreen.
* This will ignore if you have B+A or B-only subscreens, and force-set the item.
* The intent of this is to allow scriters to easily create scripted subscreens.
*
*/ Example Use: !#!
/************************************************************************************************************/
int ItemB; ZASM Instruction:
LINKITEMB
/**
* Contains the item IDs of what is currently equiped to Link's B button.
* Writing to this variable will set an item to the A-button.
* This will occur even if the item is not in inventory, and not on the subscreen.
* The intent of this is to allow scriters to easily create scripted subscreens.
*
*/ Example Use: !#!
/************************************************************************************************************/
//! Untested
int SetItemSlot(int itm_id, bool a_button, bool force);
ZASM Instruction:
LINKITEMB
/**
* This allows you to set Link's button items without binary operations, and to decide whether to
* obey quest rules, or inventory.
*
* When using this, 'itm_id' is the ID number of the item.
* Set 'a_button' true to set this item to the A-button, false to set it to the B-button.
* Set' force' true to set the item even if Link does not have it, or if the Quest Rules disallow it.
* Otherwise, set 'force' false, and the item will only be set if Link has it. Furthermore
* it will only set to slot A if either it is a sword, or the B+A quest rule is enabled.
*
*/ Example Use: !#!
/************************************************************************************************************/
int Eaten; ZASM Instruction:
LINKEATEN
/**
* This stores a counter for how long Link has been inside a LikeLike, or similar enemy.
* It returns 0 if Link is not eaten, otherwise it returns the duration of him being eaten.
*
*/ Example Use: !#!
/************************************************************************************************************/
int Extend; ZASM Instruction:
LINKEXTEND
/**
* Sets the extend value for all of Link's various actions for his current sprite, and direction.
* This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting
* a tile, click on his sprites for any given action, and press the 'x' key.
* The options are 16x16, 16x32, and 32x32; which correspond to Extend values of ( 0, 1, and 2 )
* respectively.
*
* This also returns the present extend value of Link's sprite for his current direction and sprite.
*
* You may force-set all sprites, and directions to an extend value by assigning a negative number to
* this variable, where -1 == 0 -2 == 1, -3 == 2, -4 == 3, and -5 == 4.
*
* See the 'LINKEXTEND_* values in std_constants for more details.
*/
/************************************************************************************************************/
int GetLinkExtend(int sprite, int dir); ZASM Instruction:
SETLINKEXTEND
/**
* Gets the extend value for one of Link's various actions based on a direction.
* This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting a tile.
* See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
*/
/************************************************************************************************************/
void SetLinkExtend(int sprite, int dir, int extend);
ZASM Instruction:
SETLINKEXTEND
/**
* Sets the extend value for one of Link's various actions.
* This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting a tile.
* 'sprite' is the 'action', 'dir' is the sprite direction, and 'extend' is a value between 1 and 3.
* An extend value of '4' is reserved for future implementations of Link->Hit/DrawOffsets ad HitWidth/height.
* See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
*/
/************************************************************************************************************/
//Untested
void SetLinkTile(int sprite, int tile, int dir)
ZASM Instruction:
SETLINKTILE
/**
* Sets the tile for Link's various actions. This is intended to work as OTile for Link.
* 'sprite' is the action for the tile. See Quest->Graphics->Sprites->Link for a visual reference.
* 'tile is the base tile for the sequence. It uses the animation style set in the sprites editor.
* 'dir' is the direction for the tile.
* See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
*
* See the 'LINKEXTEND_* values in std_constants for more details on possible extend values.
*/
/************************************************************************************************************/
//!Untested
int GetLinkTile(int sprite, int dir)
ZASM Instruction:
LINKGETTILE
/**
* Returns the OTile for one of Link's various actions.
* 'sprite' is the action for the tile. See Quest->Graphics->Sprites->Link for a visual reference.
* 'dir' is the direction for the tile.
* See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
*/
/************************************************************************************************************/
/////////////////
/// NPCData ///
/////////////////
// NPCData-> (Getter Functions)
int GetFlags(int npc_id);
int GetFlags2(int npc_id);
int GetWidth(int npc_id);
int GetHeight(int npc_id);
int GetSTile(int npc_id);
int GetSWidth(int npc_id);
int GetSHeight(int npc_id);
int GetETile(int npc_id);
int GetEWidth(int npc_id);
int GetHP(int npc_id);
int GetFamily(int npc_id);
int GetCSet(int npc_id);
int GetAnim(int npc_id);
int GetEAnim(int npc_id);
int GetFramerate(int npc_id);
int GetEFramerate(int npc_id);
int GetTouchDamage(int npc_id);
int GetWeaponDamage(int npc_id);
int GetWeapon(int npc_id);
int GetRandom(int npc_id);
int GetHaltRate(int npc_id);
int GetStep(int npc_id);
int GetHoming(int npc_id);
int GetHunger(int npc_id);
int GetDropset(int npc_id);
int GetBGSFX(int npc_id);
int GetHitSFX(int npc_id);
int GetDeathSFX(int npc_id);
int GetDrawXOffset(int npc_id);
int GetDrawYOffset(int npc_id);
int GetDrawZOffset(int npc_id);
int GetHitXOffset(int npc_id);
int GetHitYOffset(int npc_id);
int GetHitWidth(int npc_id);
int GetHitHeight(int npc_id);
int GetHitZHeight(int npc_id);
int GetTileWidth(int npc_id);
int GetTileHeight(int npc_id);
int GetWeaponSprite(int npc_id);
int GetScriptDefense(int npc_id, int def_index); //2.future compat.
int GetDefense(int npc_id, int def_index);
bool GetSizeFlag(int npc_id, int size_flag);
int GetAttribute(int npc_id, int attrib);
// NPCData-> (Setter Functions)
void SetFlags(int npc_id, int value);
void SetFlags2(int npc_id, int value);
void SetWidth(int npc_id, int value);
void SetHeight(int npc_id, int value);
void SetSTile(int npc_id, int value);
void SetSWidth (int npc_id, int value);
void SetSHeight(int npc_id, int value);
void SetETile(int npc_id, int value);
void SetEWidth(int npc_id, int value);
void SetHP(int npc_id, int value);
void SetFamily(int npc_id, int value);
void SetCSet(int npc_id, int value);
void SetAnim(int npc_id, int value);
void SetEAnim(int npc_id, int value);
void SetFramerate(int npc_id, int value);
void SetEFramerate(int npc_id, int value);
void SetTouchDamage(int npc_id, int value);
void SetWeaponDamage(int npc_id, int value);
void SetWeapon(int npc_id, int value);
void SetRandom(int npc_id, int value);
void SetHaltRate(int npc_id, int value);
void SetStep(int npc_id, int value);
void SetHoming(int npc_id, int value);
void SetHunger(int npc_id, int value);
void SetDropset(int npc_id, int value);
void SetBGSFX(int npc_id, int value);
void SetHitSFX(int npc_id, int value);
void SetDeathSFX(int npc_id, int value);
void SetDrawXOffset(int npc_id, int value);
void SetDrawYOffset(int npc_id, int value);
void SetDrawZOffset(int npc_id, int value);
void SetHitXOffset(int npc_id, int value);
void SetHitYOffset(int npc_id, int value);
void SetHitWidth(int npc_id, int value);
void SetHitHeight(int npc_id, int value);
void SetHitZHeight(int npc_id, int value);
void SetTileWidth(int npc_id, int value);
void SetTileHeight(int npc_id, int value);
void SetWeaponSprite(int npc_id, int value);
void SetScriptDefense(int npc_id, int def_index, int value);
void SetDefense(int npc_id, int def_index, int value);
void SetSizeFlag(int npc_id, int size_flag, bool set);
void SetAttribute(int npc_id, int attribute, int value);
/************************************************************************************************************/
//////////////
/// Text ///
//////////////
Text-> This is for text boxes and similar.
/************************************************************************************************************/
//////////////////
/// Graphics ///
//////////////////
Graphics-> A potential container for graphical functions, palette editing, and similar to Audio->.
/************************************************************************************************************/
///////////////////
/// ComboData ///
///////////////////
ComboData-> For modifying the combo tables by script.
GetBlockEnemies(int combo_id);
GetBlockHole(int combo_id);
GetBlockTrigger(int combo_id);
GetConveyorSpeedX(int combo_id);
GetConveyorSpeedY(int combo_id);
GetCreateEnemy(int combo_id);
GetCreateEnemyWhen(int combo_id);
GetCreateEnemyChange(int combo_id);
GetDirChangeType(int combo_id);
GetDistanceChangeTiles(int combo_id);
GetDiveItem(int combo_id);
GetDock(int combo_id);
GetFairy(int combo_id);
GetFFComboChangeAttrib(int combo_id);
GetFootDecorationsTile(int combo_id);
GetFootDecorationsType(int combo_id);
GetHookshotGrab(int combo_id);
GetLadderPass(int combo_id);
GetLockBlockType(int combo_id);
GetLockBlockChange(int combo_id);
GetMagicMirror(int combo_id);
GetModifyHPAmount(int combo_id);
GetModifyHPDelay(int combo_id);
GetModifyHPType(int combo_id);
GetModifyMPAmount(int combo_id);
GetModifyMPDelay(int combo_id);
GetModifyMPType(int combo_id);
GetNoPushBlocks(int combo_id);
GetOverhead(int combo_id);
GetPlaceEnemy(int combo_id);
GetPushDirection(int combo_id);
GetPushWeight(int combo_id);
GetPushWait(int combo_id);
GetPushed(int combo_id);
GetRaft(int combo_id);
GetResetRoom(int combo_id);
GetSavePoint(int combo_id);
GetScreenFreeze(int combo_id);
GetSecretCombo(int combo_id);
GetSingular(int combo_id);
GetSlowMove(int combo_id);
GetStatue(int combo_id);
GetStepType(int combo_id);
GetStepChangeTo(int combo_id);
GetStrikeRemnants(int combo_id);
GetStrikeRemnantsType(int combo_id);
GetStrikeChange(int combo_id);
GetStrikeItem(int combo_id);
GetTouchItem(int combo_id);
GetTouchStairs(int combo_id);
GetTriggerType(int combo_id);
GetTriggerSens(int combo_id);
GetWarpType(int combo_id);
GetWarpSens(int combo_id);
GetWarpDirect(int combo_id);
GetWarpLocation(int combo_id);
GetWater(int combo_id);
GetWhistle(int combo_id);
GetWinGame(int combo_id);
GetBlockWeaponLevel(int combo_id);
GetTile(int combo_id);
GetFlip(int combo_id);
GetWalkability(int combo_id);
GetType(int combo_id);
GetCSets(int combo_id);
GetFoo(int combo_id);
GetFrames(int combo_id);
GetSpeed(int combo_id);
GetNextCombo(int combo_id);
GetNextCSet(int combo_id);
GetFlag(int combo_id);
GetSkipAnim(int combo_id);
GetNextTimer(int combo_id);
GetSkipAnimY(int combo_id);
GetAnimFlags(int combo_id);
//two inputs, one return
GetBlockWeapon(int combo_id, int index); //[32]
GetExpansion(int combo_id, int index); //[6]
GetStrikeWeapons(int combo_id, int index); //[32]
//two inputs, no return
SetBlockEnemies(int combo_id, int value);
SetBlockHole(int combo_id, int value);
SetBlockTrigger(int combo_id, int value);
SetConveyorSpeedX(int combo_id, int value);
SetConveyorSpeedY(int combo_id, int value);
SetCreateEnemy(int combo_id, int value);
SetCreateEnemyWhen(int combo_id, int value);
SetCreateEnemyChange(int combo_id, int value);
SetDirChangeType(int combo_id, int value);
SetDistanceChangeTiles(int combo_id, int value);
SetDiveItem(int combo_id, int value);
SetDock(int combo_id, int value);
SetFairy(int combo_id, int value);
SetFFComboChangeAttrib(int combo_id, int value);
SetFootDecorationsTile(int combo_id, int value);
SetFootDecorationsType(int combo_id, int value);
SetHookshotGrab(int combo_id, int value);
SetLadderPass(int combo_id, int value);
SetLockBlockType(int combo_id, int value);
SetLockBlockChange(int combo_id, int value);
SetMagicMirror(int combo_id, int value);
SetModifyHPAmount(int combo_id, int value);
SetModifyHPDelay(int combo_id, int value);
SetModifyHPType(int combo_id, int value);
SetModifyMPAmount(int combo_id, int value);
SetModifyMPDelay(int combo_id, int value);
SetModifyMPType(int combo_id, int value);
SetNoPushBlocks(int combo_id, int value);
SetOverhead(int combo_id, int value);
SetPlaceEnemy(int combo_id, int value);
SetPushDirection(int combo_id, int value);
SetPushWeight(int combo_id, int value);
SetPushWait(int combo_id, int value);
SetPushed(int combo_id, int value);
SetRaft(int combo_id, int value);
SetResetRoom(int combo_id, int value);
SetSavePoint(int combo_id, int value);
SetScreenFreeze(int combo_id, int value);
SetSecretCombo(int combo_id, int value);
SetSingular(int combo_id, int value);
SetSlowMove(int combo_id, int value);
SetStatue(int combo_id, int value);
SetStepType(int combo_id, int value);
SetStepChangeTo(int combo_id, int value);
SetStrikeRemnants(int combo_id, int value);
SetStrikeRemnantsType(int combo_id, int value);
SetStrikeChange(int combo_id, int value);
SetStrikeItem(int combo_id, int value);
SetTouchItem(int combo_id, int value);
SetTouchStairs(int combo_id, int value);
SetTriggerType(int combo_id, int value);
SetTriggerSens(int combo_id, int value);
SetWarpType(int combo_id, int value);
SetWarpSens(int combo_id, int value);
SetWarpDirect(int combo_id, int value);
SetWarpLocation(int combo_id, int value);
SetWater(int combo_id, int value);
SetWhistle(int combo_id, int value);
SetWinGame(int combo_id, int value);
SetBlockWeaponLevel(int combo_id, int value);
SetTile(int combo_id, int value);
SetFlip(int combo_id, int value);
SetWalkability(int combo_id, int value);
SetType(int combo_id, int value);
SetCSets(int combo_id, int value);
SetFoo(int combo_id, int value);
SetFrames(int combo_id, int value);
SetSpeed(int combo_id, int value);
SetNextCombo(int combo_id, int value);
SetNextCSet(int combo_id, int value);
SetFlag(int combo_id, int value);
SetSkipAnim(int combo_id, int value);
SetNextTimer(int combo_id, int value);
SetSkipAnimY(int combo_id, int value);
SetAnimFlags(int combo_id, int value);
//three inputs, no return
SetBlockWeapon(int combo_id, int index, int value); //[32]
GetExpansion(int combo_id, int index, int value); //[32]
SetStrikeWeapons(int combo_id, int index, int value); //[32]
/************************************************************************************************************/
////////////////////
/// SpriteData ///
////////////////////
SpriteData-> For modifying the weapon/misc sprites by script.
GetTile(int sprite_id);
GetMisc(int sprite_id);
GetCSets(int sprite_id);
GetFrames(int sprite_id);
GetSpeed(int sprite_id);
GetType(int sprite_id);
SetTile(int sprite_id, int value);
SetMisc(int sprite_id, int value);
SetCSets(int sprite_id, int value);
SetFrames(int sprite_id, int value);
SetSpeed(int sprite_id, int value);
SetType(int sprite_id, int value);
/************************************************************************************************************/
///////////////
/// Input ///
///////////////
Input->
/************************************************************************************************************/
bool Press[18]; ZASM Instruction:
BUTTONPRESS
/**
* An array of 18 button states that correspond to Link->Press*
*
*/ Example Use:
/************************************************************************************************************/
bool Button[18]; ZASM Instruction:
BUTTONINPUT
/**
* An array of 18 button states that correspond to Link->Input*
*
*/ Example Use:
/************************************************************************************************************/
bool Hold[18]; ZASM Instruction:
BUTTONHELD
/**
* An array of 18 button states that returns if a button is being held down.
* MAY only represent a joypad.
*
*/ Example Use:
/************************************************************************************************************/
bool Key[127]; ZASM Instruction:
KEYPRESS
/**
* An array of 127 indices, each representing a keypress on the keyboard.
* See std_keyboard.zh for constants ands functions that relate to reading from, or writing to the keyboard.
*
*/ Example Use:
/************************************************************************************************************/
bool ReadKey[127]; ZASM Instruction:
READKEY
/**
* A read-only array of 127 indices, each representing a keypress on the keyboard.
* Returns true if a key is pressed or held.
* See std_keyboard.zh for constants ands functions that relate to reading from, or writing to the keyboard.
*
*/ Example Use:
/************************************************************************************************************/
bool Joypad[18]; ZASM Instruction:
JOYPADPRESS
/**
* An array of 18 button states that corresponds to whether the player is pressing a button on a Joypad \
* controller, but not the keyboard. REQUIRES TESTING.
*
*/ Example Use:
/************************************************************************************************************/
int Mouse[6]
/**
* An array of six integers for the mouse X, Y and Z positions, and Left, Right, and Middle Clicks.
*
* You can write to clicks by setting their array indices to 0 or 1.
* /
/************************************************************************************************************/
/////////////////
/// MapData ///
/////////////////
MapData->
SetEnemy(int map, int screen, int enemy_index, int enem_type);
GetEnemy(int map, int screen, int enemy_index);
/************************************************************************************************************/
SetDoor(int map, int screen, int door_index, int door_type);
GetDoor(int map, int screen, int door_index);
/************************************************************************************************************/
SetWidth(int map, int screen, int value);
GetWidth(int map, int screen);
/************************************************************************************************************/
SetHeight(int map, int screen, int value);
GetHeight(int map, int screen);
/************************************************************************************************************/
SetViewX(int map, int screen, int value);
GetViewX(int map, int screen);
/************************************************************************************************************/
SetViewY(int map, int screen, int value);
GetViewY(int map, int screen);
/************************************************************************************************************/
SetGuy(int map, int screen, int value);
GetGuy(int map, int screen);
/************************************************************************************************************/
SetString(int map, int screen, int value);
GetString(int map, int screen);
/************************************************************************************************************/
SetRoomType(int map, int screen, int value);
GetRoomType(int map, int screen);
/************************************************************************************************************/
SetEntryX(int map, int screen, int value);
GetEntryX(int map, int screen);
/************************************************************************************************************/
SetEntryY(int map, int screen, int value);
GetEntryY(int map, int screen);
/************************************************************************************************************/
SetItem(int map, int screen, int value);
GetItem(int map, int screen);
/************************************************************************************************************/
SetUndercombo(int map, int screen, int value);
GetUndercombo(int map, int screen);
/************************************************************************************************************/
SetUnderCSet(int map, int screen, int value);
GetUnderCSet(int map, int screen);
/************************************************************************************************************/
SetCatchall(int map, int screen, int value);
GetCatchall(int map, int screen);
/************************************************************************************************************/
SetLayerOpacity(int map, int screen, int layer, int opacity);
GetLayerOpacity(int map, int screen, int layer);
/************************************************************************************************************/
SetSecretCombo(int map, int screen, int index, int value);
GetSecretCombo(int map, int screen, int index);
/************************************************************************************************************/
SetSecretCSet(int map, int screen, int index, int value);
GetSecretCSet(int map, int screen, int index);
/************************************************************************************************************/
SetSecretFlag(int map, int screen, int index, int value);
GetSecretFlag(int map, int screen, int index);
/************************************************************************************************************/
SetLayerMap(int map, int screen, int layer, int map);
GetLayerMap(int map, int screen, int layer);
/************************************************************************************************************/
SetLayerScreen(int map, int screen, int layer, int screen);
GetLayerScreen(int map, int screen, int layer);
/************************************************************************************************************/
SetPath(int map, int screen, int path, int dest);
GetPath(int map, int screen, int path);
/************************************************************************************************************/
SetWarpReturnX(int map, int screen, int warp, int posX);
GetWarpReturnX(int map, int screen, int warp);
/************************************************************************************************************/
SetWarpReturnY(int map, int screen, int warp, int posY);
GetWarpReturnY(int map, int screen, int warp);
/************************************************************************************************************/
int GetEnemy(int map, int screen, int enemy_index)
ZASM Instruction
GETSCREENENEMY
/**
* Reads values from enemy lists anywhere in the game.
* Returns the Nth enemy of a given map, and screen where 'enemy_index' is the Nth index
* 'map' is the desired map, and 'screen' is the desired screen.
* Returns 0 if there is no enemy in the desired index.
*
* Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
* /
/************************************************************************************************************/
int SetEnemy(int map, int screen, int enemy_index, int enemy_id)
ZASM Instruction
SETSCREENENEMY
/**
* Sets values to enemy lists anywhere in the game.
* Sets the Nth enemy of a given map, and screen to a specified NPC, where 'enemy_index' is
* the Nth index 'map' is the desired map, and 'screen' is the desired screen, and 'enemy_id'.
* is the ID of the enemy that you wish to use.
*
* If changing the enemies on the current screen and map, enemies will change upon reloading the screen.
*
* Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
* /
/************************************************************************************************************/
int GetDoor(int map, int screen, int index)
ZASM Instruction
GETSCREENDOOR
/**
* Reads value of a door on any screen in the game environment.
* Returns Screen->Door[index] of a given map, and screen where 'index' is the Door[] index,
* 'map' is the desired map, and 'screen' is the desired screen.
* Returns 0 if there is no door present (open).
*
* Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
* /
/************************************************************************************************************/
int SetDoor(int map, int screen, int index, int type)
ZASM Instruction
SETSCREENDOOR
/**
* Sets the value of a door on any screen in the game environment.
* Sets Screen->Door[index] of a given map, and screen where 'index' is the Door[] index,
* 'map' is the desired map, and 'screen' is the desired screen, and 'type'.
* is the door type.
*
* If changing the doors on the current screen and map, doors will change upon reloading the screen.
*
* Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
* /
/************************************************************************************************************/
///////////////
/// Debug ///
///////////////
/************************************************************************************************************/
DEBUGGING: These might find their way into namespace Debug->
/************************************************************************************************************/
int GetFFCPointer(ffc *ptr[]); ZASM Instruction:
FFCARRPTR
/**
* Returns the pointer of a ffc array as a float.
*/ Example Use:
ffc arr[16];
int size = SizeOfArray( GetPointer(arr) );
//Size == 16
/************************************************************************************************************/
ffc SetFFCPointer(int value); ZASM Instruction:
FFCARRPTR2
/**
* Converts an int pointer to the ffc type, for assigning.
*/ Example Use:
ffc arr[16]; ffc arrB[2]; int arrC[2];
arrC[0] = GetPointer(arr);
arrB[0] = SetPointer(arrC[0]);
/************************************************************************************************************/
int GetItemPointer(item *ptr[]); ZASM Instruction:
ITEMARRPTR
/**
* Returns the pointer of a item array as a float.
*/ Example Use:
item arr[16];
int size = SizeOfArray( GetPointer(arr) );
//Size == 16
/************************************************************************************************************/
item SetItemPointer(int value); ZASM Instruction:
ITEMARRPTR2
/**
* Converts an int pointer to the item type, for assigning.
*/ Example Use:
item arr[16]; item arrB[2]; int arrC[2];
arrC[0] = GetPointer(arr);
arrB[0] = SetPointer(arrC[0]);
/************************************************************************************************************/
int GetItemdataPointer(itemdata *ptr[]); ZASM Instruction:
IDATAARRPTR
/**
* Returns the pointer of a itemdata array as a float.
*/ Example Use:
itemdata arr[16];
int size = SizeOfArray( GetPointer(arr) );
//Size == 16
/************************************************************************************************************/
itemdata SetItemdataPointer(int value); ZASM Instruction:
IDATAARRPTR2
/**
* Converts an int pointer to the itemdata type, for assigning.
*/ Example Use:
itemdata arr[16]; itemdata arrB[2]; int arrC[2];
arrC[0] = GetPointer(arr);
arrB[0] = SetPointer(arrC[0]);
/************************************************************************************************************/
int GetNPCPointer(npc *ptr[]); ZASM Instruction:
NPCARRPTR
/**
* Returns the pointer of a item array as a float.
*/ Example Use:
item arr[16];
int size = SizeOfArray( GetPointer(arr) );
//Size == 16
/************************************************************************************************************/
npc SetNPCPointer(int value); ZASM Instruction:
NPCARRPTR2
/**
* Converts an int pointer to the npc type, for assigning.
*/ Example Use:
npc arr[16]; npc arrB[2]; int arrC[2];
arrC[0] = GetPointer(arr);
arrB[0] = SetPointer(arrC[0]);
/************************************************************************************************************/
int GetLWeaponPointer(lweapon *ptr[]); ZASM Instruction:
LWPNARRPTR
/**
* Returns the pointer of a lweapon array as a float.
*/ Example Use:
lweapon arr[16];
int size = SizeOfArray( GetPointer(arr) );
//Size == 16
/************************************************************************************************************/
lweapon SetLWeaponPointer(int value); ZASM Instruction:
LWPNARRPTR2
/**
* Converts an int pointer to the lweapon type, for assigning.
*/ Example Use:
lweapon arr[16]; lweapon arrB[2]; int arrC[2];
arrC[0] = GetPointer(arr);
arrB[0] = SetPointer(arrC[0]);
/************************************************************************************************************/
int GetEWeaponPointer(eweapon *ptr[]); ZASM Instruction:
EWPNARRPTR
/**
* Returns the pointer of a eweapon array as a float.
*/ Example Use:
eweapon arr[16];
int size = SizeOfArray( GetPointer(arr) );
//Size == 16
/************************************************************************************************************/
eweapon SetEWeaponPointer(int value); ZASM Instruction:
EWPNARRPTR2
/**
* Converts an int pointer to the eweapon type, for assigning.
*/ Example Use:
eweapon arr[16]; eweapon arrB[2]; int arrC[2];
arrC[0] = GetPointer(arr);
arrB[0] = SetPointer(arrC[0]);
/************************************************************************************************************/
int RefFFC; ZASM Instruction:
REFFFC
/**
* Returns the present ffc refrence from the stack. FOR DEBUGGING ONLY!
* THIS WILL BE DISABLED IN RELEASE BUILDS !
*/ Example Use:
/************************************************************************************************************/
int RefItem; ZASM Instruction:
REFITEM
/**
* Returns the present item refrence from the stack. FOR DEBUGGING ONLY!
* THIS WILL BE DISABLED IN RELEASE BUILDS !
*/ Example Use:
/************************************************************************************************************/
int RefItemdata; ZASM Instruction:
REFIDATA
/**
* Returns the present itemdata refrence from the stack. FOR DEBUGGING ONLY!
* THIS WILL BE DISABLED IN RELEASE BUILDS !
*/ Example Use:
/************************************************************************************************************/
int RefLWeapon; ZASM Instruction:
REFLWPN
/**
* Returns the present lweapon refrence from the stack. FOR DEBUGGING ONLY!
* THIS WILL BE DISABLED IN RELEASE BUILDS !
*/ Example Use:
/************************************************************************************************************/
int RefEWeapon; ZASM Instruction:
REFEWPN
/**
* Returns the present eweapon refrence from the stack. FOR DEBUGGING ONLY!
* THIS WILL BE DISABLED IN RELEASE BUILDS !
*/ Example Use:
/************************************************************************************************************/
int RefNPC; ZASM Instruction:
REFNPC
/**
* Returns the present npc refrence from the stack. FOR DEBUGGING ONLY!
* THIS WILL BE DISABLED IN RELEASE BUILDS !
*/ Example Use:
/************************************************************************************************************/
int SP; ZASM Instruction:
SP
/**
* Returns the value of the stack pointer. FOR DEBUGGING ONLY!
* THIS WILL BE DISABLED IN RELEASE BUILDS !
*/ Example Use:
/************************************************************************************************************/
Comments