ZoriaRPG

2.54 New ZScript Full Details (31-May-2017)

May 30th, 2017
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 72.93 KB | None | 0 0
  1. // Beta 52
  2.  
  3.  
  4. The ZScript language now supports function pointers, using the AT_SIGN token (@) as a delimiter.
  5.  
  6. The ZScript language now supports C-Style comment blocks using the traditional syntax of:
  7.  
  8. /*
  9. COMMENT BLOCK
  10.  
  11. */
  12.  
  13. //////////////
  14. // Global //
  15. //////////////
  16.  
  17. int SizeOfArrayBool(bool array[]); ZASM Instruction:
  18. ARRAYSIZEB d2
  19. /**
  20. * Returns the index size of the array pointed by 'array'.
  21. * As SizeOfArray(int *ptr), save that it works specifically with bool typed arrays.
  22. * Useful in for loops.
  23. *
  24. */ Example Use:
  25.  
  26.  
  27. /************************************************************************************************************/
  28.  
  29. int SizeOfArrayFFC(ffc array[]); ZASM Instruction:
  30. ARRAYSIZEF d2
  31. /**
  32. * Returns the index size of the array pointed by 'array'.
  33. * As SizeOfArray(int *ptr), save that it works specifically with ffc typed arrays.
  34. * Useful in for loops.
  35. *
  36. */ Example Use:
  37.  
  38.  
  39. /************************************************************************************************************/
  40.  
  41. int SizeOfArrayNPC(npc array[]); ZASM Instruction:
  42. ARRAYSIZEN d2
  43. /**
  44. * Returns the index size of the array pointed by 'array'.
  45. * As SizeOfArray(int *ptr), save that it works specifically with npc typed arrays.
  46. * Useful in for loops.
  47. *
  48. */ Example Use:
  49.  
  50. /************************************************************************************************************/
  51.  
  52. int SizeOfArrayItem(item array[]); ZASM Instruction:
  53. ARRAYSIZEI d2
  54. /**
  55. * Returns the index size of the array pointed by 'array'.
  56. * As SizeOfArray(int *ptr), save that it works specifically with item typed arrays.
  57. * Useful in for loops.
  58. *
  59. */ Example Use:
  60.  
  61. /************************************************************************************************************/
  62.  
  63. int SizeOfArrayItemdata(itemdata array[]);
  64. ZASM Instruction:
  65. ARRAYSIZEID d2
  66. /**
  67. * Returns the index size of the array pointed by 'array'.
  68. * As SizeOfArray(int *ptr), save that it works specifically with itemdata typed arrays.
  69. * Useful in for loops.
  70. *
  71. */ Example Use:
  72.  
  73. /************************************************************************************************************/
  74.  
  75. int SizeOfArrayLWeapon(lweapon array[]);
  76. ZASM Instruction:
  77. ARRAYSIZEL d2
  78. /**
  79. * Returns the index size of the array pointed by 'array'.
  80. * As SizeOfArray(int *ptr), save that it works specifically with lweapon typed arrays.
  81. * Useful in for loops.
  82. *
  83. */ Example Use:
  84.  
  85. /************************************************************************************************************/
  86.  
  87. int SizeOfArrayEWeapon(eweapon array[]);
  88. ZASM Instruction:
  89. ARRAYSIZEE d2
  90. /**
  91. * Returns the index size of the array pointed by 'array'.
  92. * As SizeOfArray(int *ptr), save that it works specifically with eweapon typed arrays.
  93. * Useful in for loops.
  94. *
  95. */ Example Use:
  96.  
  97. /************************************************************************************************************/
  98.  
  99. void OverlayTile(int firsttile, int secondtile); ZASM Instruction:
  100. OVERLAYTILEVV
  101. OVERLAYTILEVR
  102. OVERLAYTILERV
  103. OVERLAYTILERR
  104. /**
  105. * Overlays secondtile onto firsttile, ignoring all pixels of colour 0.
  106. * The valid tile value range is 0 to 65519.
  107. * This change is *TEMPORARY* within the quest file
  108. * and will not be retained when saving the game.
  109. *
  110. */ Example Use:
  111.  
  112.  
  113.  
  114. /************************************************************************************************************/
  115.  
  116. //////////////
  117. /// GAME ///
  118. //////////////
  119.  
  120. void ContinueSound(int sfx); ZASM Instruction:
  121. CONTINUESFX
  122. /**
  123. *
  124. *
  125. */ Example Use:
  126.  
  127. /************************************************************************************************************/
  128.  
  129. void AdjustSound(int sfx, int pan, bool loop); ZASM Instruction:
  130. ADJUSTSFX
  131. /**
  132. * Adjusts properties of a sound effect.
  133. *
  134. */ Example Use:
  135.  
  136. /************************************************************************************************************/
  137.  
  138. void SetScreenFlag(int map, int screen, int flag, bool state); ZASM Instruction:
  139. SCREENFLAG
  140.  
  141. /**
  142. *
  143. *
  144. */ Example Use:
  145.  
  146.  
  147. /************************************************************************************************************/
  148.  
  149. bool ButtonPress[18]; ZASM Instruction:
  150. BUTTONPRESS
  151. /**
  152. * An array of 18 button states that correspond to Link->Press*
  153. *
  154. */ Example Use:
  155.  
  156. /************************************************************************************************************/
  157.  
  158. bool ButtonInput[18]; ZASM Instruction:
  159. BUTTONINPUT
  160. /**
  161. * An array of 18 button states that correspond to Link->Input*
  162. *
  163. */ Example Use:
  164.  
  165. /************************************************************************************************************/
  166.  
  167. bool ButtonHeld[18]; ZASM Instruction:
  168. BUTTONHELD
  169. /**
  170. * An array of 18 button states that returns if a button is being held down.
  171. * MAY only represent a joypad.
  172. *
  173. */ Example Use:
  174.  
  175. /************************************************************************************************************/
  176.  
  177. bool KeyPress[127]; ZASM Instruction:
  178. KEYPRESS
  179. /**
  180. * An array of 127 indices, each representing a keypress on the keyboard.
  181. * See std_keyboard.zh for constants ands functions that relate to reading from, or writing to the keyboard.
  182. *
  183. */ Example Use:
  184.  
  185. /************************************************************************************************************/
  186.  
  187. bool ReadKey[127]; ZASM Instruction:
  188. READKEY
  189. /**
  190. * A read-only array of 127 indices, each representing a keypress on the keyboard.
  191. * Returns true if a key is pressed or held.
  192. * See std_keyboard.zh for constants ands functions that relate to reading from, or writing to the keyboard.
  193. *
  194. */ Example Use:
  195.  
  196. /************************************************************************************************************/
  197.  
  198. bool JoypadPress[18]; ZASM Instruction:
  199. JOYPADPRESS
  200. /**
  201. * An array of 18 button states that corresponds to whether the player is pressing a button on a Joypad \
  202. * controller, but not the keyboard. REQUIRES TESTING.
  203. *
  204. */ Example Use:
  205.  
  206. /************************************************************************************************************/
  207.  
  208. void ContinueSound(int sfx); ZASM Instruction:
  209. CONTINUESFX
  210. /**
  211. *
  212. *
  213. */ Example Use:
  214.  
  215. /************************************************************************************************************/
  216.  
  217. void AdjustSound(int sfx, int pan, bool loop); ZASM Instruction:
  218. ADJUSTSFX
  219. /**
  220. * Adjusts properties of a sound effect.
  221. *
  222. */ Example Use:
  223.  
  224. /************************************************************************************************************/
  225.  
  226. void SetScreenFlag(int map, int screen, int flag, bool state); ZASM Instruction:
  227. SCREENFLAG
  228.  
  229. /**
  230. *
  231. *
  232. */ Example Use:
  233.  
  234.  
  235. /************************************************************************************************************/
  236.  
  237. bool ButtonPress[18]; ZASM Instruction:
  238. BUTTONPRESS
  239. /**
  240. * An array of 18 button states that correspond to Link->Press*
  241. *
  242. */ Example Use:
  243.  
  244. /************************************************************************************************************/
  245.  
  246. bool ButtonInput[18]; ZASM Instruction:
  247. BUTTONINPUT
  248. /**
  249. * An array of 18 button states that correspond to Link->Input*
  250. *
  251. */ Example Use:
  252.  
  253. /************************************************************************************************************/
  254.  
  255. bool ButtonHeld[18]; ZASM Instruction:
  256. BUTTONHELD
  257. /**
  258. * An array of 18 button states that returns if a button is being held down.
  259. * MAY only represent a joypad.
  260. *
  261. */ Example Use:
  262.  
  263. /************************************************************************************************************/
  264.  
  265. bool KeyPress[127]; ZASM Instruction:
  266. KEYPRESS
  267. /**
  268. * An array of 127 indices, each representing a keypress on the keyboard.
  269. * See std_keyboard.zh for constants ands functions that relate to reading from, or writing to the keyboard.
  270. *
  271. */ Example Use:
  272.  
  273. /************************************************************************************************************/
  274.  
  275. bool ReadKey[127]; ZASM Instruction:
  276. READKEY
  277. /**
  278. * A read-only array of 127 indices, each representing a keypress on the keyboard.
  279. * Returns true if a key is pressed or held.
  280. * See std_keyboard.zh for constants ands functions that relate to reading from, or writing to the keyboard.
  281. *
  282. */ Example Use:
  283.  
  284. /************************************************************************************************************/
  285.  
  286. bool JoypadPress[18]; ZASM Instruction:
  287. JOYPADPRESS
  288. /**
  289. * An array of 18 button states that corresponds to whether the player is pressing a button on a Joypad \
  290. * controller, but not the keyboard. REQUIRES TESTING.
  291. *
  292. */ Example Use:
  293.  
  294. /************************************************************************************************************/
  295.  
  296. bool Link->DisableItem[256]; ZASM Instruction:
  297. DISABLEDITEM
  298. /**
  299. * An array of 256 values that represents whether items are disabeld on the current DMap.
  300. * A disabled item returns 'true'.
  301. * Writing to this array should disable or enable an item on the current DMap, but the behaviour
  302. * if Link does not have that item MAY not be fully defined.
  303. *
  304. */ Example Use:
  305.  
  306. /************************************************************************************************************/
  307.  
  308.  
  309.  
  310. int GetMaxMaps()
  311. int MapCount() ZASM Instruction
  312. GETMAXMAPS
  313.  
  314. /**
  315. *
  316. * Returns the number of maps used by a quest.
  317. *
  318. *
  319. * /
  320.  
  321. /************************************************************************************************************/
  322.  
  323. int GetScreenEnemy(int map, int screen, int enemy_index)
  324. ZASM Instruction
  325. GETSCREENENEMY
  326.  
  327. /**
  328. * Reads values from enemy lists anywhere in the game.
  329. * Returns the Nth enemy of a given map, and screen where 'enemy_index' is the Nth index
  330. * 'map' is the desired map, and 'screen' is the desired screen.
  331. * Returns 0 if there is no enemy in the desired index.
  332. *
  333. * Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
  334. * /
  335.  
  336. /************************************************************************************************************/
  337.  
  338. int SetScreenEnemy(int map, int screen, int enemy_index, int enemy_id)
  339. ZASM Instruction
  340. SETSCREENENEMY
  341.  
  342. /**
  343. * Sets values to enemy lists anywhere in the game.
  344. * Sets the Nth enemy of a given map, and screen to a specified NPC, where 'enemy_index' is
  345. * the Nth index 'map' is the desired map, and 'screen' is the desired screen, and 'enemy_id'.
  346. * is the ID of the enemy that you wish to use.
  347. *
  348. * If changing the enemies on the current screen and map, enemies will change upon reloading the screen.
  349. *
  350. * Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
  351. * /
  352.  
  353. /************************************************************************************************************/
  354.  
  355. int GetScreenDoor(int map, int screen, int index)
  356. ZASM Instruction
  357. GETSCREENDOOR
  358.  
  359. /**
  360. * Reads value of a door on any screen in the game environment.
  361. * Returns Screen->Door[index] of a given map, and screen where 'index' is the Door[] index,
  362. * 'map' is the desired map, and 'screen' is the desired screen.
  363. * Returns 0 if there is no door present (open).
  364. *
  365. * Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
  366. * /
  367.  
  368. /************************************************************************************************************/
  369.  
  370. int SetScreenDoor(int map, int screen, int index, int type)
  371. ZASM Instruction
  372. SETSCREENDOOR
  373.  
  374. /**
  375. * Sets the value of a door on any screen in the game environment.
  376. * Sets Screen->Door[index] of a given map, and screen where 'index' is the Door[] index,
  377. * 'map' is the desired map, and 'screen' is the desired screen, and 'type'.
  378. * is the door type.
  379. *
  380. * If changing the doors on the current screen and map, doors will change upon reloading the screen.
  381. *
  382. * Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
  383. * /
  384.  
  385. /************************************************************************************************************/
  386.  
  387. int GetPointer(bool *ptr[]); ZASM Instruction:
  388. BOOLARRPTR
  389. /**
  390. * Returns the pointer of a bool array as a float.
  391. */ Example Use:
  392. bool arr[16];
  393. int size = SizeOfArray( GetPointer(arr) );
  394. //Size == 16
  395.  
  396.  
  397. /************************************************************************************************************/
  398.  
  399. void PauseSound(int soundid); ZASM Instruction:
  400. PAUSESOUNDR
  401. PAUSESOUNDV
  402. /**
  403. * Pauses one of the quest's playing sound effects. Use the SFX_ constants in
  404. * std.zh as values of soundid.
  405. */ Example Use: !#!
  406.  
  407. /************************************************************************************************************/
  408.  
  409. void ResumeSound(int soundid); ZASM Instruction:
  410. RESUMESOUNDR
  411. RESUMESOUNDV
  412. /**
  413. * Resumes one of the quest's paused sound effects. Use the SFX_ constants in
  414. * std.zh as values of soundid.
  415. */ Example Use: !#!
  416.  
  417. /************************************************************************************************************/
  418.  
  419. void EndSound(int soundid); ZASM Instruction:
  420. ENDSOUNDR
  421. ENDSOUNDV
  422. /**
  423. * Kills one of the quest's playing sound effects. Use the SFX_ constants in
  424. * std.zh as values of soundid.
  425. */ Example Use: !#!
  426.  
  427. /************************************************************************************************************/
  428.  
  429. void PauseMusic(); ZASM Instruction:
  430. PAUSEMUSIC
  431. PAUSEMUSIC
  432. /**
  433. * Pauses the present, playing MIDI or Enhanced Music file.
  434. */ Example Use: !#!
  435.  
  436. /************************************************************************************************************/
  437.  
  438. void ResumeMusic(); ZASM Instruction:
  439. RESUMEMUSIC
  440. RESUMEMUSIC
  441. /**
  442. * Resumes the present, playing MIDI or Enhanced Music file.
  443. */ Example Use: !#!
  444.  
  445. /************************************************************************************************************/
  446.  
  447. void GreyscaleOn() ZASM Instruction
  448. GREYSCALEON
  449.  
  450. /**
  451. * Renders the entire display in greyscale.
  452. */ Example Use: !#!
  453.  
  454. /************************************************************************************************************/
  455.  
  456. void GreyscaleOff() ZASM Instruction
  457. GREYSCALEOFF
  458.  
  459. /**
  460. * Returns the display rendering to colour.
  461. */ Example Use: !#!
  462.  
  463. /************************************************************************************************************/
  464.  
  465. int DMapPalette[]; ZASM Instruction:
  466. DMAPLEVELPAL
  467. /**
  468. * An array of 512 integers containing each DMap's Level Palette
  469. */ Example Use: !#!
  470.  
  471. /************************************************************************************************************/
  472.  
  473. void SetMessage(int message, int buffer[]);
  474.  
  475. ZASM Instruction:
  476. SETMESSAGE
  477. /**
  478. * Loads string 'buffer[]' into ZQ Message 'message'.
  479. */ Example Use: !#!
  480.  
  481. /************************************************************************************************************/
  482.  
  483. void SetDMapName(int dmap_id, int buffer[]);
  484.  
  485. ZASM Instruction:
  486. SETDMAPNAME
  487. /**
  488. * Loads string 'buffer[]' to the DMap Name field for DMap with ID 'dmap_id'.
  489. * See std_constsnts.zh for appropriate buffer size.
  490. */ Example Use: !#!
  491.  
  492. /************************************************************************************************************/
  493.  
  494. void SetDMapTitle(int DMap, int buffer[]);
  495.  
  496. ZASM Instruction:
  497. SETDMAPTITLE
  498. /**
  499. * Loads string 'buffer[]' to the DMap Title field for DMap with ID 'dmap_id'.
  500. * See std_constsnts.zh for appropriate buffer size.
  501. */ Example Use: !#!
  502.  
  503. /************************************************************************************************************/
  504.  
  505. void SetDMapIntro(int DMap, int buffer[]);
  506.  
  507. ZASM Instruction:
  508. SETDMAPINTRO
  509. /**
  510. * Loads string 'buffer[]' to the DMap Intro field for DMap with ID 'dmap_id'.
  511. * See std_constsnts.zh for appropriate buffer size.
  512. */ Example Use: !#!
  513.  
  514. /************************************************************************************************************/
  515.  
  516. int Version; ZASM Instruction:
  517. ZELDAVERSION
  518.  
  519. /**
  520. * Returns the version of ZC being used.
  521. *
  522. */ Example Use: !#!
  523.  
  524. /************************************************************************************************************/
  525.  
  526. int Build; ZASM Instruction:
  527. ZELDABUILD
  528.  
  529. /**
  530. * Returns the Build ID of the version of ZC being used.
  531. *
  532. */ Example Use: !#!
  533.  
  534. /************************************************************************************************************/
  535.  
  536. int Beta; ZASM Instruction:
  537. ZELDABETA
  538.  
  539. /**
  540. * Returns the Beta ID of the version of ZC being used. If the build is not a beta, this returns 0.
  541. *
  542. */ Example Use: !#!
  543.  
  544. /************************************************************************************************************/
  545.  
  546. bool DisableActiveSubscreen; ZASM Instruction:
  547. NOACTIVESUBSC
  548.  
  549. /**
  550. * If set true, the active subscreen will not fall into view ehen the player presses Start.
  551. *
  552. */ Example Use: !#!
  553.  
  554. /************************************************************************************************************/
  555.  
  556. bool CappedFPS ZASM: THROTTLEFPS
  557.  
  558. /**
  559. * Returns if the user enabled an uncapped mode either with F1 or TILDE.
  560. * Returns 'true' is the game is capped to 60fps, or false otherwise.
  561. * At present, you may get (read), but NOT set (write to) this value.
  562. */ Example Use: !#!
  563.  
  564. /************************************************************************************************************/
  565. DEBUGGING: These might find their way into namespace Debug->
  566. /************************************************************************************************************/
  567.  
  568. int RefFFC; ZASM Instruction:
  569. REFFFC
  570. /**
  571. * Returns the present ffc refrence from the stack. FOR DEBUGGING ONLY!
  572. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  573. */ Example Use:
  574.  
  575. /************************************************************************************************************/
  576.  
  577. int RefItem; ZASM Instruction:
  578. REFITEM
  579. /**
  580. * Returns the present item refrence from the stack. FOR DEBUGGING ONLY!
  581. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  582. */ Example Use:
  583.  
  584. /************************************************************************************************************/
  585.  
  586. int RefItemdata; ZASM Instruction:
  587. REFIDATA
  588. /**
  589. * Returns the present itemdata refrence from the stack. FOR DEBUGGING ONLY!
  590. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  591. */ Example Use:
  592.  
  593. /************************************************************************************************************/
  594.  
  595. int RefLWeapon; ZASM Instruction:
  596. REFLWPN
  597. /**
  598. * Returns the present lweapon refrence from the stack. FOR DEBUGGING ONLY!
  599. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  600. */ Example Use:
  601.  
  602. /************************************************************************************************************/
  603.  
  604. int RefEWeapon; ZASM Instruction:
  605. REFEWPN
  606. /**
  607. * Returns the present eweapon refrence from the stack. FOR DEBUGGING ONLY!
  608. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  609. */ Example Use:
  610.  
  611. /************************************************************************************************************/
  612.  
  613. int RefNPC; ZASM Instruction:
  614. REFNPC
  615. /**
  616. * Returns the present npc refrence from the stack. FOR DEBUGGING ONLY!
  617. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  618. */ Example Use:
  619.  
  620. /************************************************************************************************************/
  621.  
  622. int SP; ZASM Instruction:
  623. SP
  624. /**
  625. * Returns the value of the stack pointer. FOR DEBUGGING ONLY!
  626. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  627. */ Example Use:
  628.  
  629. /************************************************************************************************************/
  630.  
  631.  
  632. ////////////////
  633. /// Screen ///
  634. ////////////////
  635.  
  636.  
  637. lweapon CreateLWeaponDx(int type, int baseitem)
  638. ZASM Instruction
  639. CREATELWEAPONDX
  640.  
  641. /**
  642. *
  643. * Create an lweapon with the type 'type', using data as if the weapon was created
  644. * by using the item 'item_id', thus forwarding sprites, sounds, and other values.
  645. *
  646. *
  647. * /
  648.  
  649. /************************************************************************************************************/
  650.  
  651.  
  652.  
  653. /////////////
  654. /// NPC ///
  655. /////////////
  656.  
  657.  
  658. float UID; ZASM Instruction:
  659. NPCUID
  660. /**
  661. * Returns the UID of an npc.
  662. */ Example Use:
  663.  
  664. /************************************************************************************************************/
  665.  
  666. int GetPointer(npc *ptr[]); ZASM Instruction:
  667. NPCARRPTR
  668. /**
  669. * Returns the pointer of a item array as a float.
  670. */ Example Use:
  671. item arr[16];
  672. int size = SizeOfArray( GetPointer(arr) );
  673. //Size == 16
  674.  
  675. /************************************************************************************************************/
  676.  
  677. npc SetPointer(int value); ZASM Instruction:
  678. NPCARRPTR2
  679. /**
  680. * Converts an int pointer to the npc type, for assigning.
  681. */ Example Use:
  682. npc arr[16]; npc arrB[2]; int arrC[2];
  683. arrC[0] = GetPointer(arr);
  684. arrB[0] = SetPointer(arrC[0]);
  685.  
  686. /************************************************************************************************************/
  687.  
  688. int InvFrames; ZASM Instruction:
  689. NPCINVINC
  690. /**
  691. * Returns if the enemy is temporarily invincible, from being hit, or otherwise.
  692. * Returns the number of remaining invincibility frames if the enemy is invincible, otherwise 0.
  693. *
  694. */ Example Use: !#!
  695.  
  696. /************************************************************************************************************/
  697.  
  698. int Invincible; ZASM Instruction:
  699. NPCSUPERMAN
  700. /**
  701. * Returns if the enemy is invincible, because of ( superman variable ).
  702. *
  703. */ Example Use: !#!
  704.  
  705. /************************************************************************************************************/
  706.  
  707. bool HasItem; ZASM Instruction:
  708. NPCHASITEM
  709. /**
  710. * Returns if the enemy is holding the screen item.
  711. *
  712. */ Example Use: !#!
  713.  
  714. /************************************************************************************************************/
  715.  
  716. bool Ringleader; ZASM Instruction:
  717. NPCRINGLEAD
  718. /**
  719. * Returns if the enemy is a 'ringleader'.
  720. *
  721. */ Example Use: !#!
  722.  
  723. /************************************************************************************************************/
  724.  
  725. int ScriptDefense[]; ZASM Instruction:
  726. NPCSCRDEFENSED
  727. /**
  728. * The npc's Script Weapon Defense values, as an array of 10 integers. Use the NPCSD_ and NPCDT_ constants
  729. * in std.zh to set or compare these values.
  730. *
  731. * This corresponds to the 'Defenses 3' tab in the Enemy Editor.
  732. */
  733.  
  734. /************************************************************************************************************/
  735.  
  736.  
  737. /////////////
  738. /// FFC ///
  739. /////////////
  740.  
  741. int ID; ZASM Instruction
  742. FFCID
  743.  
  744. /**
  745. * Returns the screen index of the FFC.
  746. * Can be set, to change the index of a pointer, but this requires testing and may be unstable.
  747. *
  748. */
  749.  
  750.  
  751. /************************************************************************************************************/
  752.  
  753. int GetPointer(ffc *ptr[]); ZASM Instruction:
  754. FFCARRPTR
  755. /**
  756. * Returns the pointer of a ffc array as a float.
  757. */ Example Use:
  758. ffc arr[16];
  759. int size = SizeOfArray( GetPointer(arr) );
  760. //Size == 16
  761.  
  762. /************************************************************************************************************/
  763.  
  764. ffc SetPointer(int value); ZASM Instruction:
  765. FFCARRPTR2
  766. /**
  767. * Converts an int pointer to the ffc type, for assigning.
  768. */ Example Use:
  769. ffc arr[16]; ffc arrB[2]; int arrC[2];
  770. arrC[0] = GetPointer(arr);
  771. arrB[0] = SetPointer(arrC[0]);
  772.  
  773. /************************************************************************************************************/
  774.  
  775.  
  776. //////////////
  777. /// Link ///
  778. //////////////
  779.  
  780.  
  781. bool DisableItem[256]; ZASM Instruction:
  782. DISABLEDITEM
  783. /**
  784. * An array of 256 values that represents whether items are disabeld on the current DMap.
  785. * A disabled item returns 'true'.
  786. * Writing to this array should disable or enable an item on the current DMap, but the behaviour
  787. * if Link does not have that item MAY not be fully defined.
  788. *
  789. */ Example Use:
  790.  
  791. /************************************************************************************************************/
  792.  
  793. int Attack; ZASM Instruction:
  794. LINKUSINITEMA
  795.  
  796. /**
  797. * Returns LinkClass::attack (?)
  798. *
  799. */ Example Use: !#!
  800.  
  801. /************************************************************************************************************/
  802.  
  803. int Animation; ZASM Instruction:
  804. LINKANIMTYPE
  805.  
  806. /**
  807. * Link;s Animation style, as set in Quest->Graphics->Sprites->Link
  808. * Valid types are 0, 1, 2, and 3.
  809. *
  810. */ Example Use: !#!
  811.  
  812. /************************************************************************************************************/
  813.  
  814. int WalkASpeed; ZASM Instruction:
  815. LINKWALKANMSPD
  816.  
  817. /**
  818. * Link's Walking Animation speed as set in Quest->Graphics->Sprites->Link
  819. * valid types are:
  820. *
  821. */ Example Use: !#!
  822.  
  823. /************************************************************************************************************/
  824.  
  825. int SwimASpeed; ZASM Instruction:
  826. LINKSWIMSPD
  827. /**
  828. * Link's Swiming Animation speed as set in Quest->Graphics->Sprites->Link
  829. * valid types are:
  830. *
  831. */ Example Use: !#!
  832.  
  833. /************************************************************************************************************/
  834.  
  835. int InvFrames; ZASM Instruction:
  836. LINKINVFRAME
  837.  
  838. /**
  839. * The number of frames for which Link is invincible, when hit by an enemy or weapon.
  840. * This returns how long Link will remain invincible, or you may set it to a value between 0 and 214747.
  841. * Returns 0 if Link is not invincible.
  842. *
  843. */ Example Use: !#!
  844.  
  845. /************************************************************************************************************/
  846.  
  847. bool InvFlicker; ZASM Instruction:
  848. LINKCANFLICKER
  849.  
  850. /**
  851. * Set true by default. If this is true, Link will either flicker, or flash when invincible, depending
  852. * on your Quest rules settings. If set false, Link will neither flash, nor flicker when invincible.
  853. */ Example Use: !#!
  854.  
  855. /************************************************************************************************************/
  856.  
  857. int HurtSound; ZASM Instruction:
  858. LINKHURTSFX
  859.  
  860. /**
  861. * The sound that plays when Link is injured. By default this is '16', but you may change it at any time.
  862. *
  863. */ Example Use: !#!
  864.  
  865. /************************************************************************************************************/
  866.  
  867. int HitHeight; ZASM Instruction:
  868. LINKHYSZ
  869.  
  870. /**
  871. * link's Hitbox height in pixels starting from his 0x,0y (upper-left) corner, going down.
  872. * Note that this works on a per-sprite, per-direction basis.
  873. * If you wish to extend Link's hitbox upwards on the Y-Axis, set this value, and adjust his HitYOffset.
  874. * You can read a value that you assign to this (e.g. for custom collision functions).
  875. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  876. *
  877. */ Example Use: !#!
  878.  
  879. /************************************************************************************************************/
  880.  
  881. int HitWidth; ZASM Instruction:
  882. LINKHXSZ
  883.  
  884. /**
  885. * Link's Hitbox width in pixels starting from his x0,y0 (upper-left) corner, going right.
  886. * Note that this works on a per-sprite, per-direction basis.
  887. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  888. *
  889. */ Example Use: !#!
  890.  
  891. /************************************************************************************************************/
  892. //Not implemented. Use Extend and Sprites.
  893. int TileWidth; ZASM Instruction:
  894. LINKTYSZ
  895. /**
  896. * Link's width, in tiles.
  897. * This is not usable, as Link->Extend cannot be set.
  898. * While setting it is not syntactically incorrect, it does nothing.
  899. * You can read a value that you assign to this (e.g. for custom/proxy sprite drawing).
  900. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  901. *
  902. */ Example Use: !#!
  903.  
  904. /************************************************************************************************************/
  905. //Not implemented. Use Extend and Sprites.
  906. int TileHeight; ZASM Instruction:
  907. LINKTXSZ
  908.  
  909. /**
  910. * Link's height, in tiles.
  911. * This is not usable, as Link->Extend cannot be set.
  912. * While setting it is not syntactically incorrect, it does nothing.
  913. * You can read a value that you assign to this (e.g. for custom/proxy sprite drawing).
  914. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  915. *
  916. */ Example Use: !#!
  917.  
  918. /************************************************************************************************************/
  919. //Not implemented.
  920. int HitZHeight; ZASM Instruction:
  921. LINKHZSZ
  922.  
  923. /**
  924. * The Z-axis height of Link's hitbox, or collision rectangle.
  925. * The lower it is, the lower a flying or jumping enemy must fly in order to hit Link.
  926. * To jump over a sprite, you must be higher than its Z + HitZHeight.
  927. * The values of DrawZOffset and HitZHeight are linked. Setting one, also sets the other.
  928. * Writing to this is ignored unless Extend is set to values >=3.
  929. * This is not usable, as Link->Extend cannot be set.
  930. * While setting it is not syntactically incorrect, it does nothing.
  931. * You can read a value that you assign to this (e.g. for custom collision functions).
  932. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  933. *
  934. */ Example Use: !#!
  935.  
  936. /************************************************************************************************************/
  937.  
  938. int HitXOffset; ZASM Instruction:
  939. LINKHXOFS
  940.  
  941. /**
  942. * The X offset of Link's hitbox, or collision rectangle.
  943. * Setting it to positive or negative values will move Link's hitbox left or right.
  944. * Writing to this is ignored unless Extend is set to values >=3.
  945. * Note that this works on a per-sprite, per-direction basis.
  946. * You can read a value that you assign to this (e.g. for custom collision functions).
  947. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  948. *
  949. */ Example Use: !#!
  950.  
  951. /************************************************************************************************************/
  952.  
  953. int HitYOffset; ZASM Instruction:
  954. LINKHYOFS
  955.  
  956. /**
  957. * The Y offset of Link's hitbox, or collision rectangle.
  958. * Setting it to positive or negative values will move Link's hitbox up or down.
  959. * Writing to this is ignored unless Extend is set to values >=3.
  960. * Note that this works on a per-sprite, per-direction basis.
  961. * You can read a value that you assign to this (e.g. for custom collision functions).
  962. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  963. *
  964. */ Example Use: !#!
  965.  
  966. /************************************************************************************************************/
  967. //Not yet implemented
  968. int DrawXOffset; ZASM Instruction:
  969. LINKXOFS
  970.  
  971. /**
  972. * The X offset of Link's sprite.
  973. * Setting it to positive or negative values will move the sprite's tiles left or right relative to its position.
  974. * Writing to this is ignored unless Extend is set to values >=3.
  975. * This is not usable, as Link->Extend cannot be set.
  976. * While setting it is not syntactically incorrect, it does nothing.
  977. * You can read a value that you assign to this.
  978. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  979. *
  980. */ Example Use: !#!
  981.  
  982. /************************************************************************************************************/
  983. //Not yet implemented
  984. int DrawYOffset; ZASM Instruction:
  985. LINKYOFS
  986.  
  987. /**
  988. * The Y offset of Link's sprite.
  989. * Setting it to positive or negative values will move the sprite's tiles up or down relative to its position.
  990. * Writing to this is ignored unless Extend is set to values >=3.
  991. * This is not usable, as Link->Extend cannot be set.
  992. * While setting it is not syntactically incorrect, it does nothing.
  993. * You can read a value that you assign to this.
  994. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  995. *
  996. */ Example Use: !#!
  997.  
  998. /************************************************************************************************************/
  999.  
  1000. //! Link->Equipment is now read-write, and needs testing.
  1001. //! It is also a pain to write bitwise values, to test it.
  1002.  
  1003. int Equipment; ZASM Instruction:
  1004. LINKEQUIP
  1005.  
  1006. /**
  1007. * Contains the item IDs of what is currently equiped to Link's A and B buttons.
  1008. * The first 8 bits contain the A button item, and the second 8 bits contain the B button item.
  1009. * If you are not comfortable with performing binary operations,
  1010. * you can use the functions GetEquipmentA() or GetEquipmentB() in std.zh.
  1011. *
  1012. */ Example Use: !#!
  1013.  
  1014. /************************************************************************************************************/
  1015.  
  1016. int ItemA; ZASM Instruction:
  1017. LINKITEMA
  1018.  
  1019. /**
  1020. * Contains the item IDs of what is currently equiped to Link's A button.
  1021. * Writing to this variable will set an item to the A-button.
  1022. * This will occur even if the item is not in inventory, and not on the subscreen.
  1023. * This will ignore if you have B+A or B-only subscreens, and force-set the item.
  1024. * The intent of this is to allow scriters to easily create scripted subscreens.
  1025. *
  1026. */ Example Use: !#!
  1027.  
  1028. /************************************************************************************************************/
  1029.  
  1030. int ItemB; ZASM Instruction:
  1031. LINKITEMB
  1032.  
  1033. /**
  1034. * Contains the item IDs of what is currently equiped to Link's B button.
  1035. * Writing to this variable will set an item to the A-button.
  1036. * This will occur even if the item is not in inventory, and not on the subscreen.
  1037. * The intent of this is to allow scriters to easily create scripted subscreens.
  1038. *
  1039. */ Example Use: !#!
  1040.  
  1041. /************************************************************************************************************/
  1042.  
  1043. int SetItemSlot(int itm_id, int slot, int force);
  1044. ZASM Instruction:
  1045. SETITEMSLOT
  1046.  
  1047. /**
  1048. * This allows you to set Link's button items without binary operations, and to decide whether to
  1049. * obey quest rules, or inventory.
  1050. *
  1051. * When using this, 'itm_id' is the ID number of the item.
  1052. * Set 'slot' to one of the following: 0 == Slot B, 1 == Slot A
  1053. * Other buttons may be added int he future, and other values for ;slot' are thus, reserved.
  1054. * Set the flags on 'force' as follows:
  1055. * const int ITM_REQUIRE_NONE = 0
  1056. * const int ITM_REQUIRE_INVENTORY = 1
  1057. * const int ITM_REQUIRE_A_SLOT_RULE = 2
  1058. * Thus, require both inventory, and following quest slot rules, force == 3.
  1059. *
  1060. */ Example Use: !#!
  1061.  
  1062. /************************************************************************************************************/
  1063.  
  1064. int Eaten; ZASM Instruction:
  1065. LINKEATEN
  1066.  
  1067. /**
  1068. * This stores a counter for how long Link has been inside a LikeLike, or similar enemy.
  1069. * It returns 0 if Link is not eaten, otherwise it returns the duration of him being eaten.
  1070. *
  1071. */ Example Use: !#!
  1072.  
  1073. /************************************************************************************************************/
  1074.  
  1075. int Extend; ZASM Instruction:
  1076. LINKEXTEND
  1077.  
  1078.  
  1079. /**
  1080. * Sets the extend value for all of Link's various actions for his current sprite, and direction.
  1081. * This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting
  1082. * a tile, click on his sprites for any given action, and press the 'x' key.
  1083. * The options are 16x16, 16x32, and 32x32; which correspond to Extend values of ( 0, 1, and 2 )
  1084. * respectively.
  1085. *
  1086. * This also returns the present extend value of Link's sprite for his current direction and sprite.
  1087. *
  1088. * You may force-set all sprites, and directions to an extend value by assigning a negative number to
  1089. * this variable, where -1 == 0 -2 == 1, -3 == 2, -4 == 3, and -5 == 4.
  1090. *
  1091. * See the 'LINKEXTEND_* values in std_constants for more details.
  1092. */
  1093.  
  1094. /************************************************************************************************************/
  1095.  
  1096. int GetLinkExtend(int sprite, int dir); ZASM Instruction:
  1097. SETLINKEXTEND
  1098.  
  1099. /**
  1100. * Gets the extend value for one of Link's various actions based on a direction.
  1101. * This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting a tile.
  1102. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  1103. */
  1104.  
  1105. /************************************************************************************************************/
  1106.  
  1107. void SetLinkExtend(int sprite, int dir, int extend);
  1108. ZASM Instruction:
  1109. SETLINKEXTEND
  1110.  
  1111. /**
  1112. * Sets the extend value for one of Link's various actions.
  1113. * This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting a tile.
  1114. * 'sprite' is the 'action', 'dir' is the sprite direction, and 'extend' is a value between 1 and 3.
  1115. * An extend value of '4' is reserved for future implementations of Link->Hit/DrawOffsets ad HitWidth/height.
  1116. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  1117. */
  1118.  
  1119. /************************************************************************************************************/
  1120.  
  1121. void SetLinkTile(int sprite, int dir, int tile)
  1122. ZASM Instruction:
  1123. SETLINKTILE
  1124.  
  1125. /**
  1126. * Sets the tile for Link's various actions. This is intended to work as OTile for Link.
  1127. * 'sprite' is the action for the tile. See Quest->Graphics->Sprites->Link for a visual reference.
  1128. * 'tile is the base tile for the sequence. It uses the animation style set in the sprites editor.
  1129. * 'dir' is the direction for the tile.
  1130. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  1131. *
  1132. * See the 'LINKEXTEND_* values in std_constants for more details on possible extend values.
  1133. */
  1134.  
  1135. /************************************************************************************************************/
  1136.  
  1137. int GetLinkTile(int sprite, int dir)
  1138. ZASM Instruction:
  1139. LINKGETTILE
  1140.  
  1141. /**
  1142. * Returns the OTile for one of Link's various actions.
  1143. * 'sprite' is the action for the tile. See Quest->Graphics->Sprites->Link for a visual reference.
  1144. * 'dir' is the direction for the tile.
  1145. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  1146. */
  1147.  
  1148. /************************************************************************************************************/
  1149. //TO DEPRECATE
  1150. int WalkTile, SwimTile, DiveTile, SlashTile, JumpTile, ChargeTile, StabTile, CastingTile, PoundTile, FloatTile
  1151. Hold1LandTile, Hold2LandTile, Hold1WaterTile, Hold2WaterTile;
  1152.  
  1153. ZASM Instructions:
  1154. LINKWALKTILE, LINKSWIMTILE, LINKDIVETILE, LINKSLASHTILE, LINKJUMPTILE
  1155. LINKCHARGETILE, LINKSTABTILE, LINKCASTTILE, LINKPOUNDTILE, LINKFLOATTILE,
  1156. LINKHOLD1LTILE, LINKHOLD2LTILE, LINKHOLD1WTILE, LINKHOLD2WTILE
  1157.  
  1158. /**
  1159. * A series of fourteen individual setter/getter ints to set or return the tile for all of Link's various actions.
  1160. *
  1161. * In future, setting this values of 0 through 4 will set Link->Extend based on Link's present drection and
  1162. * sprite and values of -1 through -5 will force Extend = 0 through Extend = 4 for all sprites and directions.
  1163. *
  1164. * Checking this will return the tile value for the desired sprite using Link's current direction.
  1165. * Setting this will set the tile for the sprite in Link's current direction.
  1166. *
  1167. * These exist to manually test getting, and setting values to these sprites, and are scheduled to be removed
  1168. * in a future build, supplanted by Link->SetLinkTile(int sprite, int dir, int tile)
  1169. */
  1170.  
  1171. /************************************************************************************************************/
  1172.  
  1173. int WarpEffect; ZASM Instruction:
  1174. WARPEFFECT
  1175.  
  1176. /**
  1177. * Sets a warp effect type prior to doing Screen->Warp
  1178. * These replicate the in-build effects for tile warps.
  1179. * see 'std_constants.zh' under WARPFX_* for a list of effects.
  1180. *
  1181. */ Example Use: !#!
  1182.  
  1183. /************************************************************************************************************/
  1184.  
  1185. int WarpSound; ZASM Instruction:
  1186. LINKWARPSOUND
  1187.  
  1188. /**
  1189. * Setting this to a value other than '0' will play that sound when Link warps.
  1190. *
  1191. */ Example Use: !#!
  1192.  
  1193. /************************************************************************************************************/
  1194.  
  1195. bool SideWarpSounds; ZASM Instruction:
  1196. PLAYWARPSOUND
  1197.  
  1198. /**
  1199. * By default, even if you set a warp sound, it will not play in sidewarps.
  1200. * If you enable this setting, the sound will play in side warps.
  1201. * At present, this does not disable playing the sound otherwise. Set Link->WarpSound = 0 to do that.
  1202. *
  1203. */ Example Use: !#!
  1204.  
  1205. /************************************************************************************************************/
  1206.  
  1207. bool PitWarpSounds; ZASM Instruction:
  1208. PLAYPITWARPSFX
  1209.  
  1210. /**
  1211. * By default, even if you set a warp sound, it will not play in pit warps.
  1212. * If you enable this setting, the sound will play in a pit warp, one time.
  1213. * This value resets after the pit warp, so it is mandatory to re-set it each time tat you desire a pit warp
  1214. * to play a sound. Do this before Waitdraw().
  1215. *
  1216. */ Example Use: !#!
  1217.  
  1218. /************************************************************************************************************/
  1219.  
  1220. int UseWarpReturn; ZASM Instruction:
  1221. LINKRETSQUARE
  1222.  
  1223. /**
  1224. * Setting this to a value between 0 and 3 will change the target return square for Link->Warp
  1225. * Valid values are: 0 (A), 1 (B), 2 (C), and 3 (D). Other values will be clamed within this range.
  1226. *
  1227. */ Example Use: !#!
  1228.  
  1229. /************************************************************************************************************/
  1230.  
  1231. int UsingItem; ZASM Instruction:
  1232. LINKUSINITEM
  1233.  
  1234. /**
  1235. * Returns the ID of an item used when Link uses an item.
  1236. * Setting this does nothing.
  1237. *
  1238. */ Example Use: !#!
  1239.  
  1240.  
  1241. /************************************************************************************************************/
  1242.  
  1243. bool Diagonal; ZASM Instruction:
  1244. LINKDIAG
  1245.  
  1246. /**
  1247. * This corresponds to whether 'Diagonal Movement' is enabled, or not.
  1248. * This will initially return true, or false, based on the setting in Quest->Graphics->Sprites->Link.
  1249. * You may enable, or disable diagonal movement by writing to this value.
  1250. *
  1251. */ Example Use: !#!
  1252.  
  1253. /************************************************************************************************************/
  1254.  
  1255. bool BigHitbox; ZASM Instruction:
  1256. LINKBIGHITBOX
  1257.  
  1258. /**
  1259. * This corresponds to whether 'Big Hitbox' is enabled, or not.
  1260. * This will initially return true, or false, based on the setting in Quest->Graphics->Sprites->Link.
  1261. * You may enable, or disable big hitbox, by writing to this value.
  1262. *
  1263. */ Example Use: !#!
  1264.  
  1265. /************************************************************************************************************/
  1266.  
  1267. float Misc[32]; ZASM Instruction:
  1268. LINKMISC
  1269. LINKMISCD
  1270.  
  1271. /**
  1272. * An array of 32 miscellaneous variables for you to use as you please.
  1273. * These variables are not saved with Link.
  1274. *
  1275. */ Example Use: !#!
  1276.  
  1277. /************************************************************************************************************/
  1278.  
  1279.  
  1280. //////////////
  1281. /// Item ///
  1282. //////////////
  1283.  
  1284.  
  1285. float UID; ZASM Instruction:
  1286. ITEMUID
  1287. /**
  1288. * Returns the UID of an item.
  1289. */ Example Use:
  1290.  
  1291. /************************************************************************************************************/
  1292.  
  1293.  
  1294. int GetPointer(item *ptr[]); ZASM Instruction:
  1295. ITEMARRPTR
  1296. /**
  1297. * Returns the pointer of a item array as a float.
  1298. */ Example Use:
  1299. item arr[16];
  1300. int size = SizeOfArray( GetPointer(arr) );
  1301. //Size == 16
  1302.  
  1303. /************************************************************************************************************/
  1304.  
  1305. item SetPointer(int value); ZASM Instruction:
  1306. ITEMARRPTR2
  1307. /**
  1308. * Converts an int pointer to the item type, for assigning.
  1309. */ Example Use:
  1310. item arr[16]; item arrB[2]; int arrC[2];
  1311. arrC[0] = GetPointer(arr);
  1312. arrB[0] = SetPointer(arrC[0]);
  1313.  
  1314. /************************************************************************************************************/
  1315.  
  1316. int ACLock; ZASM Instruction:
  1317. ITEMACLC
  1318.  
  1319. /**
  1320. * Returns the present tick of the animation clock.
  1321. *
  1322. */
  1323.  
  1324. /************************************************************************************************************/
  1325.  
  1326.  
  1327. //////////////////
  1328. /// itemdata ///
  1329. //////////////////
  1330.  
  1331.  
  1332. int GetPointer(itemdata *ptr[]); ZASM Instruction:
  1333. IDATAARRPTR
  1334. /**
  1335. * Returns the pointer of a itemdata array as a float.
  1336. */ Example Use:
  1337. itemdata arr[16];
  1338. int size = SizeOfArray( GetPointer(arr) );
  1339. //Size == 16
  1340.  
  1341. /************************************************************************************************************/
  1342.  
  1343. itemdata SetPointer(int value); ZASM Instruction:
  1344. IDATAARRPTR2
  1345. /**
  1346. * Converts an int pointer to the itemdata type, for assigning.
  1347. */ Example Use:
  1348. itemdata arr[16]; itemdata arrB[2]; int arrC[2];
  1349. arrC[0] = GetPointer(arr);
  1350. arrB[0] = SetPointer(arrC[0]);
  1351.  
  1352. /************************************************************************************************************/
  1353.  
  1354. int ID; ZASM Instruction:
  1355. IDATAID
  1356. /**
  1357. * Returns the item number of the item in question.
  1358. * Can be called with this->ID in item scripts.
  1359. */ Example Use: !#!
  1360.  
  1361. /************************************************************************************************************/
  1362.  
  1363. int Modifier; ZASM Instruction:
  1364. IDATALTM
  1365. /**
  1366. * The Link Tile Modifier
  1367. *
  1368. */ Example Use: !#!
  1369.  
  1370. /************************************************************************************************************/
  1371.  
  1372. int Tile; ZASM Instruction:
  1373. IDATATILE
  1374. /**
  1375. * The tile used by the item.
  1376. *
  1377. */ Example Use: !#!
  1378.  
  1379. /************************************************************************************************************/
  1380.  
  1381. int CSet; ZASM Instruction:
  1382. IDATAID
  1383. /**
  1384. * The CSet of the tile used by the item.
  1385. *
  1386. */ Example Use: !#!
  1387.  
  1388. /************************************************************************************************************/
  1389.  
  1390. int Flash; ZASM Instruction:
  1391. IDATAFLASH
  1392. /**
  1393. * The Flash value for the CSet
  1394. *
  1395. */ Example Use: !#!
  1396.  
  1397. /************************************************************************************************************/
  1398.  
  1399. int AFrames; ZASM Instruction:
  1400. IDATAFRAMES
  1401. /**
  1402. * The number of animation frames in the item's tile animation.
  1403. *
  1404. */ Example Use: !#!
  1405.  
  1406. /************************************************************************************************************/
  1407.  
  1408. int ASpeed; ZASM Instruction:
  1409. IDATAASPEED
  1410. /**
  1411. * The speed of the item's animation.
  1412. *
  1413. */ Example Use: !#!
  1414.  
  1415. /************************************************************************************************************/
  1416.  
  1417. int Delay; ZASM Instruction:
  1418. IDATADELAY
  1419. /**
  1420. * The Delay value, before the animation begins.
  1421. *
  1422. */ Example Use: !#!
  1423.  
  1424. /************************************************************************************************************/
  1425.  
  1426. int Script; ZASM Instruction:
  1427. IDATAID
  1428. /**
  1429. * The Action Script for the item.
  1430. *
  1431. */ Example Use: !#!
  1432.  
  1433. /************************************************************************************************************/
  1434.  
  1435. int PScript; ZASM Instruction:
  1436. IDATAID
  1437. /**
  1438. * The Pickup Script for the item.
  1439. *
  1440. */ Example Use: !#!
  1441.  
  1442. /************************************************************************************************************/
  1443.  
  1444. int MagicCost; ZASM Instruction:
  1445. IDATAID
  1446. /**
  1447. * The item's maic (or rupees, if this is set) cost.
  1448. *
  1449. */ Example Use: !#!
  1450.  
  1451. /************************************************************************************************************/
  1452.  
  1453. int MinHearts; ZASM Instruction:
  1454. IDATAID
  1455. /**
  1456. * The minimum number of hearts required to pick up the item.
  1457. *
  1458. */ Example Use: !#!
  1459.  
  1460. /************************************************************************************************************/
  1461.  
  1462. int Attributes[10]; ZASM Instruction:
  1463. IDATAATTRIB
  1464.  
  1465. /**
  1466. * An array of ten integers containing the Attributes values.
  1467. * These correspond to the text entry fields, in the item editor 'Data' tab.
  1468. *
  1469. */
  1470.  
  1471. /************************************************************************************************************/
  1472.  
  1473. int Sprites[10]; ZASM Instruction:
  1474. IDATASPRITES
  1475.  
  1476. /**
  1477. * An array of ten integers containing the Sprites values.
  1478. * These correspond to the pull-down options in the item editor 'Action' tab. .
  1479. *
  1480. */
  1481.  
  1482. /************************************************************************************************************/
  1483.  
  1484. bool Flags[5]; ZASM Instruction:
  1485. IDATAFLAGS
  1486.  
  1487. /**
  1488. * An array of five multipurpose boolean flags. The properties of this flag change based on the item class (family).
  1489. * Flag[0] corresponds to the box directly below 'Equiment Item'. For swords, this is 'B.H. is Percent'.
  1490. * Flag[1] corresponds to the box directly below 'Flag 1'. For swords, this is 'B.D. is Percent'.
  1491. * Flag[2] corresponds to the box directly right of 'Equiment Item'. For swords, this is 'B. Penetrates Enemies'.
  1492. * Flag[3] corresponds to the box directly right of 'Flag 2'. For swords, this is 'Can Slash'.
  1493. * Flag[4] corresponds to the box directly below 'Flag 4'.For swords, this is '<Unused>', and greyed out.
  1494. *
  1495. * Scripted item classes may make use of these as a general-purpose script flags.
  1496. * See 'zscript_itemdata.txt' for more information on what this flag does, based on the item class.
  1497. */
  1498.  
  1499. /************************************************************************************************************/
  1500.  
  1501. int Misc1, Misc2, Misc3, Misc4, Misc5, Misc6, Misc7, Misc8, Misc9, Misc10;
  1502. ZASM Instructions:
  1503. IDATAMISC1, IDATAMISC2, IDATAMISC3, IDATAMISC4, IDATAMISC5
  1504. IDATAMISC6, IDATAMISC7, IDATAMISC8, IDATAMISC9, IDATAMISC10
  1505. /**
  1506. * These correspond to the pull-down options in the item editor 'Data' tab.
  1507. *
  1508. * Example: For a Sword Misc1 is 'Beam hearts', and Misc2 is 'Beam .
  1509. *
  1510. */ Example Use: !#!
  1511.  
  1512. /************************************************************************************************************/
  1513.  
  1514. int Attribute1, Attribute2, Attribute3, Attribute4, Attribute5, Attribute6,
  1515. Attribute7, Attribute8, Attribute9, Attribute10;
  1516. ZASM Instructions:
  1517. IDATAWPN, IDATAWPN2, IDATAWPN3, IDATAWPN4, IDATAWPN5
  1518. IDATAWPN6, IDATAWPN7, IDATAWPN8, IDATAWPN9, IDATAWPN10
  1519. /**
  1520. * These correspond to the pull-down options in the item editor 'Action' tab.
  1521. *
  1522. * Example: For a Sword Attribute1 is 'Sprite', Attribute 2 is 'Slash sprite'
  1523. * and Attribute 3 is 'Beam sprite'.
  1524. *
  1525. */ Example Use: !#!
  1526.  
  1527. /************************************************************************************************************/
  1528.  
  1529. bool Combine; ZASM Instruction:
  1530. IDATACOMBINE
  1531. /**
  1532. * Corresponds to 'Upgrade when collected twice'.
  1533. *
  1534. */ Example Use: !#!
  1535.  
  1536. /************************************************************************************************************/
  1537.  
  1538. bool Downgrade; ZASM Instruction:
  1539. IDATADOWNGRADE
  1540. /**
  1541. * Corresponds to the 'Remove When Used' option on the Action tab of the item editor.
  1542. *
  1543. */ Example Use: !#!
  1544.  
  1545. /************************************************************************************************************/
  1546.  
  1547. bool KeepOld; ZASM Instruction:
  1548. IDATAKEEPOLD
  1549. /**
  1550. * Corresponds to 'Keep lower level items on the Pickup tab of the item editor.
  1551. * NOTE: Not to be confused with 'Keep', which corresponds to the 'Equipment Item' box.
  1552. *
  1553. */ Example Use: !#!
  1554.  
  1555. /************************************************************************************************************/
  1556.  
  1557. bool RupeeCost; ZASM Instruction:
  1558. IDATARUPEECOST
  1559. /**
  1560. * Corresponds to the 'Use Rupees Instead of Magic' option on the item editor 'Action' tab.
  1561. *
  1562. */ Example Use: !#!
  1563.  
  1564. /************************************************************************************************************/
  1565.  
  1566. bool Edible; ZASM Instruction:
  1567. IDATAEDIBLE
  1568. /**
  1569. * Corresponds to the 'Can be Eaten by Enemies' box on the Pickup tab of the item editor.
  1570. *
  1571. */ Example Use: !#!
  1572.  
  1573. /************************************************************************************************************/
  1574.  
  1575. bool GainLower; ZASM Instruction:
  1576. IDATAGAINLOWER
  1577. /**
  1578. * Corresponds to the 'Gain All Lower Level Items' box on the Pickup tab of the item editor.
  1579. *
  1580. */ Example Use: !#!
  1581.  
  1582. /************************************************************************************************************/
  1583.  
  1584.  
  1585. bool Flag1; ZASM Instruction:
  1586. IDATAFLAG1
  1587. /**
  1588. * Multipurpose Flag 1
  1589. *
  1590. * The properties of this flag change based on the item class (family).
  1591. * This corresponds to the box directly below 'Equiment Item'.
  1592. * For swords, this is 'B.H. is Percent'.
  1593. * Scripted item classes may make use of this as a general-purpose 'Script 1' flag.
  1594. * See 'zscript_itemdata.txt' for more information on what this flag does, based on the item class.
  1595. *
  1596. */ Example Use: !#!
  1597.  
  1598. /************************************************************************************************************/
  1599.  
  1600. bool Flag2; ZASM Instruction:
  1601. IDATAFLAG2
  1602. /**
  1603. * Multipurpose Flag 2
  1604. *
  1605. * The properties of this flag change based on the item class (family).
  1606. * This corresponds to the box directly below 'Flag 1, or two boxes down from 'Equiment Item'.
  1607. * For swords, this is 'B.D. is Percent'.
  1608. * Scripted item classes may make use of this as a general-purpose 'Script 2' flag.
  1609. * See 'zscript_itemdata.txt' for more information on what this flag does, based on the item class.
  1610. *
  1611. */ Example Use: !#!
  1612.  
  1613. /************************************************************************************************************/
  1614.  
  1615. bool Flag3; ZASM Instruction:
  1616. IDATAFLAG3
  1617. /**
  1618. * Multipurpose Flag 3
  1619. *
  1620. * The properties of this flag change based on the item class (family).
  1621. * This corresponds to the box directly right of 'Equiment Item'.
  1622. * For swords, this is 'B. Penetrates Enemies'.
  1623. * Scripted item classes may make use of this as a general-purpose 'Script 3' flag.
  1624. * See 'zscript_itemdata.txt' for more information on what this flag does, based on the item class.
  1625. *
  1626. */ Example Use: !#!
  1627.  
  1628. /************************************************************************************************************/
  1629.  
  1630. bool Flag4; ZASM Instruction:
  1631. IDATAFLAG4
  1632. /**
  1633. * Multipurpose Flag 4
  1634. *
  1635. * The properties of this flag change based on the item class (family).
  1636. * This corresponds to the box directly right of 'Flag 2'.
  1637. * For swords, this is 'Can Slash'.
  1638. * Scripted item classes may make use of this as a general-purpose 'Script 4' flag.
  1639. * See 'zscript_itemdata.txt' for more information on what this flag does, based on the item class.
  1640. *
  1641. */ Example Use: !#!
  1642.  
  1643. /************************************************************************************************************/
  1644.  
  1645. bool Flag5; ZASM Instruction:
  1646. IDATAFLAG5
  1647. /**
  1648. * Multipurpose Flag 5
  1649. *
  1650. * The properties of this flag change based on the item class (family).
  1651. * This corresponds to the box directly below 'Flag 4'.
  1652. * For swords, this is '<Unused>', and greyed out.
  1653. * Scripted item classes may make use of this as a general-purpose 'Script 5' flag.
  1654. * See 'zscript_itemdata.txt' for more information on what this flag does, based on the item class.
  1655. *
  1656. */ Example Use: !#!
  1657.  
  1658. /************************************************************************************************************/
  1659.  
  1660. bool Unused; ZASM Instruction:
  1661. IDATAFLAGUNUSED
  1662. /**
  1663. * ? - An extra script-only flag. It's a mystery to everyone.
  1664. * Likely best left unused in the event that we need to reserve it.
  1665. *
  1666. */ Example Use: !#!
  1667.  
  1668. /************************************************************************************************************/
  1669.  
  1670. ////////////
  1671. /// npc ///
  1672. ////////////
  1673.  
  1674. float UID; ZASM Instruction:
  1675. NPCUID
  1676. /**
  1677. * Returns the UID of an npc.
  1678. */ Example Use:
  1679.  
  1680. /************************************************************************************************************/
  1681.  
  1682. int GetPointer(npc *ptr[]); ZASM Instruction:
  1683. NPCARRPTR
  1684. /**
  1685. * Returns the pointer of a item array as a float.
  1686. */ Example Use:
  1687. item arr[16];
  1688. int size = SizeOfArray( GetPointer(arr) );
  1689. //Size == 16
  1690.  
  1691. /************************************************************************************************************/
  1692.  
  1693. npc SetPointer(int value); ZASM Instruction:
  1694. NPCARRPTR2
  1695. /**
  1696. * Converts an int pointer to the npc type, for assigning.
  1697. */ Example Use:
  1698. npc arr[16]; npc arrB[2]; int arrC[2];
  1699. arrC[0] = GetPointer(arr);
  1700. arrB[0] = SetPointer(arrC[0]);
  1701.  
  1702. /************************************************************************************************************/
  1703.  
  1704. int InvFrames; ZASM Instruction:
  1705. NPCINVINC
  1706. /**
  1707. * Returns if the enemy is temporarily invincible, from being hit, or otherwise.
  1708. * Returns the number of remaining invincibility frames if the enemy is invincible, otherwise 0.
  1709. *
  1710. */ Example Use: !#!
  1711.  
  1712. /************************************************************************************************************/
  1713.  
  1714. int Invincible; ZASM Instruction:
  1715. NPCSUPERMAN
  1716. /**
  1717. * Returns if the enemy is invincible, because of ( superman variable ).
  1718. *
  1719. */ Example Use: !#!
  1720.  
  1721. /************************************************************************************************************/
  1722.  
  1723. bool HasItem; ZASM Instruction:
  1724. NPCHASITEM
  1725. /**
  1726. * Returns if the enemy is holding the screen item.
  1727. *
  1728. */ Example Use: !#!
  1729.  
  1730. /************************************************************************************************************/
  1731.  
  1732. bool Ringleader; ZASM Instruction:
  1733. NPCRINGLEAD
  1734. /**
  1735. * Returns if the enemy is a 'ringleader'.
  1736. *
  1737. */ Example Use: !#!
  1738.  
  1739. /************************************************************************************************************/
  1740.  
  1741. int ScriptDefense[]; ZASM Instruction:
  1742. NPCSCRDEFENSED
  1743. /**
  1744. * The npc's Script Weapon Defense values, as an array of 10 integers. Use the NPCSD_ and NPCDT_ constants
  1745. * in std.zh to set or compare these values.
  1746. *
  1747. * This corresponds to the 'Defenses 3' tab in the Enemy Editor.
  1748. */
  1749.  
  1750. /************************************************************************************************************/
  1751.  
  1752. float Misc[32]; ZASM Instruction:
  1753. NPCMISCD
  1754. /**
  1755. * An array of 32 miscellaneous variables for you to use as you please.
  1756. */
  1757.  
  1758. /************************************************************************************************************/
  1759.  
  1760.  
  1761. /////////////////
  1762. /// *weapon ///
  1763. /////////////////
  1764.  
  1765. float Misc[32]; ZASM Instruction:
  1766. LWPNMISCD
  1767. EWPNMISCD
  1768.  
  1769. /**
  1770. * An array of 32 miscellaneous variables for you to use as you please.
  1771. */ Example Use: !#!
  1772.  
  1773.  
  1774. /************************************************************************************************************/
  1775.  
  1776.  
  1777. /////////////////
  1778. /// LWeapon ///
  1779. /////////////////
  1780.  
  1781.  
  1782. float UID; ZASM Instruction:
  1783. LWPNUID
  1784. /**
  1785. * Returns the UID of an lweapon.
  1786. */ Example Use:
  1787.  
  1788. /************************************************************************************************************/
  1789.  
  1790. int GetPointer(lweapon *ptr[]); ZASM Instruction:
  1791. LWPNARRPTR
  1792. /**
  1793. * Returns the pointer of a lweapon array as a float.
  1794. */ Example Use:
  1795. lweapon arr[16];
  1796. int size = SizeOfArray( GetPointer(arr) );
  1797. //Size == 16
  1798.  
  1799. /************************************************************************************************************/
  1800.  
  1801. lweapon SetPointer(int value); ZASM Instruction:
  1802. LWPNARRPTR2
  1803. /**
  1804. * Converts an int pointer to the lweapon type, for assigning.
  1805. */ Example Use:
  1806. lweapon arr[16]; lweapon arrB[2]; int arrC[2];
  1807. arrC[0] = GetPointer(arr);
  1808. arrB[0] = SetPointer(arrC[0]);
  1809.  
  1810. /************************************************************************************************************/
  1811.  
  1812. int Range; ZASM Instruction:
  1813. LWPNRANGE
  1814.  
  1815. /**
  1816. * The range of the weapon in pixels.
  1817. * The range in pixels for boomerang and hookshot lweapons; and the duration in frames for arrow lweapons.
  1818. *
  1819. */ Example Use: !#!
  1820.  
  1821. /************************************************************************************************************/
  1822.  
  1823.  
  1824. /////////////////
  1825. /// EWeapon ///
  1826. /////////////////
  1827.  
  1828. float UID; ZASM Instruction:
  1829. EWPNUID
  1830. /**
  1831. * Returns the UID of an eweapon.
  1832. */ Example Use:
  1833.  
  1834. /************************************************************************************************************/
  1835.  
  1836. int GetPointer(eweapon *ptr[]); ZASM Instruction:
  1837. EWPNARRPTR
  1838. /**
  1839. * Returns the pointer of a eweapon array as a float.
  1840. */ Example Use:
  1841. eweapon arr[16];
  1842. int size = SizeOfArray( GetPointer(arr) );
  1843. //Size == 16
  1844.  
  1845. /************************************************************************************************************/
  1846.  
  1847. eweapon SetPointer(int value); ZASM Instruction:
  1848. EWPNARRPTR2
  1849. /**
  1850. * Converts an int pointer to the eweapon type, for assigning.
  1851. */ Example Use:
  1852. eweapon arr[16]; eweapon arrB[2]; int arrC[2];
  1853. arrC[0] = GetPointer(arr);
  1854. arrB[0] = SetPointer(arrC[0]);
  1855.  
  1856. /************************************************************************************************************/
  1857.  
  1858.  
  1859. ////////////////
  1860. /// Screen ///
  1861. ////////////////
  1862.  
  1863. void WavyIn(); ZASM Instruction:
  1864. WAVYIN
  1865.  
  1866. /**
  1867. * Replicates the warping screen wave effect (inbound) from a tile warp.
  1868. *
  1869. */ Example Use: !#!
  1870.  
  1871. /************************************************************************************************************/
  1872.  
  1873. void WavyOut(); ZASM Instruction:
  1874. WAVYOUT
  1875.  
  1876. /**
  1877. * Replicates the warping screen wave effect (outbound) from a tile warp.
  1878. *
  1879. */ Example Use: !#!
  1880.  
  1881. /************************************************************************************************************/
  1882.  
  1883. void ZapIn(); ZASM Instruction:
  1884. ZAPIN
  1885.  
  1886. /**
  1887. * Replicates the warping screen zap effect (inbound) from a tile warp.
  1888. *
  1889. */ Example Use: !#!
  1890.  
  1891. /************************************************************************************************************/
  1892.  
  1893. void ZapOut(); ZASM Instruction:
  1894. ZAPOUT
  1895.  
  1896. /**
  1897. * Replicates the warping screen zap effect (outbound) from a tile warp.
  1898. *
  1899. */ Example Use: !#!
  1900.  
  1901. /************************************************************************************************************/
  1902.  
  1903. void OpeningWipe(); ZASM Instruction:
  1904. OPENWIPE
  1905.  
  1906. /**
  1907. * Replicates the opening wipe screen effect (using the quest rule for its type) from a tile warp.
  1908. *
  1909. */ Example Use: !#!
  1910.  
  1911. /************************************************************************************************************/
  1912.  
  1913. void DrawBitmapEx ( int layer,
  1914. int bitmap_id,
  1915. int source_x, int source_y, int source_w, int source_h,
  1916. int dest_x, int dest_y, int dest_w, int dest_h,
  1917. float rotation, int cx, int cy, int mode, int lit, bool mask);
  1918.  
  1919. ZASM: BITMAPEXR
  1920.  
  1921. /**
  1922. *
  1923. * As DrawBitmap(), except that it can do more things.
  1924. *
  1925. * The 'mode' parameter sets up drawing modes. AT PRESENT this supports normal opaque drawing as DrawBitmap()
  1926. * AND it supports TRABSLUCENT MODE, which will allow drawing translucent bitmaps.
  1927. * The translucent mode does not yet support rotation, and all other modes are temporarily suspended, pending
  1928. * full implementation.
  1929. *
  1930. * See std_constants.zh, under BITDX_* (or possibly we'll change this to BMPDX_* later?) for a list of modes,
  1931. * and more information
  1932. *
  1933. * cx, cy: Used for pivot
  1934. * lit: used for lit colour in light table (may not work).
  1935.  
  1936. /************************************************************************************************************/
  1937.  
  1938. BitmapQuad
  1939. //sdci[1]=layer
  1940. //sdci[2]=x1
  1941. //sdci[3]=y1
  1942. //sdci[4]=x2
  1943. //sdci[5]=y2
  1944. //sdci[6]=x3
  1945. //sdci[7]=y3
  1946. //sdci[8]=x4
  1947. //sdci[9]=y4
  1948. //sdci[10]=sourcex
  1949. //sdci[11]=sourcey
  1950. //sdci[12]=sourcew
  1951. //sdci[13]=sourceh
  1952. //sdci[14]=width
  1953. //sdci[15]=height
  1954. //sdci[16]=tile/combo
  1955. //sdci[17]=polytype
  1956.  
  1957. void ComboArray ( int layer, int number_of_combos,
  1958. int combos[],
  1959. int x_positions[],
  1960. int y_positions[],
  1961. int csets[]);
  1962.  
  1963. ZASM: COMBOARRAY
  1964.  
  1965. /**
  1966. *
  1967. * Draws a number of combos specified by 'number_of_combos' to 'layer'.
  1968. * Specify the combos by populating an array with their IDs and passing the array ointer to 'combos'.
  1969. * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
  1970. * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
  1971. * Specify the CSet for each by passing an array with their csets to 'csets'.
  1972. *
  1973. * This function counts as a single draw.
  1974. *
  1975. * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
  1976. *// Example:
  1977.  
  1978. int combos[4] = {16,19,31,20};
  1979. int cmbx[4]= {0, 16, 32, 48}:
  1980. int cmby[4]={8, 8, 8, 8);
  1981. int cmbc[4]={0,0,0,0};
  1982. Screen->ComboArray(6, 4, combos, cmbx, cmby, cmbc);
  1983.  
  1984.  
  1985. /************************************************************************************************************/
  1986.  
  1987. //! This new mode does not work as intended, and will likely be deprecated by Screen->SetRenderSource
  1988. void Quad ( int layer,
  1989. int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4,
  1990. int w, int h, int cset, int flip, int texture, int render_mode);
  1991.  
  1992. ZASM Instruction:
  1993. QUADR
  1994.  
  1995. /**
  1996. * Draws a quad on the specified layer with the corners x1,y1 through x4,y4.
  1997. * Corners are drawn in a counterclockwise order starting from x1,y1. ( So
  1998. * if you draw a "square" for example starting from the bottom-right corner
  1999. * instead of the usual top-left, the the image will be textured onto the
  2000. * quad so it appears upside-down. -yes, these are rotatable. )
  2001. *
  2002. * From there a single or block of tiles, combos **or a bitmap** is then texture mapped
  2003. * onto the quad using the arguments w, h, cset, flip, and render_mode.
  2004. * A positive vale in texture will draw the image from the tilesheet pages,
  2005. * whereas a negative value will be drawn from the combo page. 0 will draw combo number 0.
  2006. * Both w and h are undefined unless 1 <= blockh, blockw <= 16, and it is a power of
  2007. * two. ie: 1, 2 are acceptable, but 2, 15 are not.
  2008. *
  2009. * To specify a bitmap as a texture, sum 65520 with the bitmap ID, or use the constant TEX_BITMAP + Bitmap
  2010. * Example: Screen->Quad(6, 0, 0, 40, 25, 18, 50, 60, 110, 0, 0, 0, 0, TEX_BITMAP+RT_BITMAP0, PT_TEXTURE);
  2011. *
  2012. *
  2013. * Flip specifies how the tiles/combos should be flipped when drawn:
  2014. * 0: No flip
  2015. * 1: Horizontal flip
  2016. * 2: Vertical flip
  2017. * 3: Both (180 degree rotation)
  2018. * (!) See std.zh for a list of all available render_mode arguments.
  2019. */ Example Use: !#!
  2020.  
  2021. ///////////////////
  2022. // Unimplemented //
  2023. ///////////////////
  2024.  
  2025. // Link->
  2026.  
  2027. /************************************************************************************************************/
  2028. //Implemented, but does nothing.
  2029. void SetTile(int sprite, int tile, int dir, int flip)
  2030. ZASM Instruction:
  2031. LINKSETTILE
  2032.  
  2033. /**
  2034. * Sets the tile for Link's various actions.
  2035. * 'sprite' is the action for the tile. See Quest->Graphics->Sprites->Link for a visual reference.
  2036. * 'tile is the base tile for the sequence. It uses the animation style set in the sprites editor.
  2037. * 'dir' is the direction for the tile.
  2038. * 'flip' is the flip attribute for the tile.
  2039. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  2040. */
  2041.  
  2042. /************************************************************************************************************/
  2043.  
  2044. //!Not Implemented in this build.
  2045. int GetExtend(int sprite, int dir); ZASM Instruction:
  2046. LINKGETEXTEND
  2047.  
  2048. /**
  2049. * Gets the extend value for one of Link's various actions.
  2050. * This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting a tile.
  2051. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  2052. */
  2053.  
  2054. /************************************************************************************************************/
  2055. //Implemented, but does nothing.
  2056. void SetExtend(int sprite, int dir, int extend); ZASM Instruction:
  2057. LINKSETEXTEND
  2058.  
  2059. /**
  2060. * Sets the extend value for one of Link's various actions.
  2061. * This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting a tile.
  2062. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  2063. */
  2064.  
  2065. /************************************************************************************************************/
  2066. //!Not Implemented in this build.
  2067. int GetTile(int sprite, int dir, int flip)
  2068. ZASM Instruction:
  2069. LINKGETTILE
  2070.  
  2071. /**
  2072. * Returns the tile for one of Link's various actions.
  2073. * 'sprite' is the action for the tile. See Quest->Graphics->Sprites->Link for a visual reference.
  2074. * 'dir' is the direction for the tile.
  2075. * 'flip' is the flip attribute for the tile.
  2076. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  2077. */
  2078.  
  2079. /************************************************************************************************************/
  2080.  
  2081. // Screen->
  2082.  
  2083.  
  2084. void TileArray ( int layer, int number_of_tiles,
  2085. int tiles[],
  2086. int x_positions[],
  2087. int y_positions[],
  2088. int csets[]);
  2089.  
  2090. ZASM: TILEARRAY
  2091.  
  2092. /**
  2093. *
  2094. * Draws a number of tiles specified by 'number_of_tiles' to 'layer'.
  2095. * Specify the tiles by populating an array with their IDs and passing the array ointer to 'tiles'.
  2096. * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
  2097. * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
  2098. * Specify the CSet for each by passing an array with their csets to 'csets'.
  2099. *
  2100. * This function counts as a single draw.
  2101. *
  2102. * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
  2103. *// Example:
  2104.  
  2105. int tiles[4] = {16,19,31,20};
  2106. int tilx[4]= {0, 16, 32, 48}:
  2107. int tily[4]={8, 8, 8, 8);
  2108. int tilc[4]={0,0,0,0};
  2109. Screen->TileArray(6, 4, tiles, tilx, tily, tilc);
  2110.  
  2111.  
  2112. /************************************************************************************************************/
  2113.  
  2114. void PixelArray ( int layer, int number_of_pixels,
  2115. int x_positions[],
  2116. int y_positions[],
  2117. int colours[]);
  2118.  
  2119. ZASM: PIXELARRAY
  2120.  
  2121. /**
  2122. *
  2123. * Draws a number of pixel, similar to PutPixel, specified by 'number_of_pixels' to 'layer'.
  2124. * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
  2125. * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
  2126. * Specify the colour for each by passing an array with their csets to 'colours'.
  2127. *
  2128. * This function counts as a single draw.
  2129. *
  2130. * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
  2131. *// Example:
  2132.  
  2133. int pix[4] = {16,19,31,20};
  2134. int px[4]= {0, 16, 32, 48}:
  2135. int py[4]={8, 8, 8, 8);
  2136. int pc[4]={0x12,0xB0,0xDA,0x4F};
  2137. Screen->TileArray(6, 4, pix, px, py, pc);
  2138.  
  2139. /************************************************************************************************************/
  2140.  
  2141. CreateBitmap(int id, int xsize, int ysize)
  2142.  
  2143. * Min size 1, max 2048
  2144. /************************************************************************************************************/
  2145.  
  2146. SetRenderSource(int target, int x, int y, int w, int h)
  2147.  
  2148. /************************************************************************************************************/
  2149.  
  2150. void Polygon ( int layer, ... );
  2151.  
  2152. ZASM: POLYGON
  2153.  
  2154. * Adding to Beta 9 : Postponed -Z
  2155.  
  2156. /************************************************************************************************************/
  2157.  
  2158. // Game->
  2159.  
  2160. //! These do not yet work:
  2161.  
  2162. //Returns Screen->Door[index] for a given DMap and Screen
  2163. int GetDMapScreenDoor( int dmap, int screen, int index )
  2164.  
  2165.  
  2166. //Sets Screen->Door[index] for a given DMap and Screen to 'value'
  2167. void SetDMapScreenDoor( int dmap, int screen, int index, int value)
  2168.  
  2169.  
  2170. //Returns Screen->State[index] for a given DMap and Screen
  2171. bool GetDMapScreenState( int dmap, int screen, int index )
  2172.  
  2173.  
  2174. //Sets Screen->State[index] for a given DMap and Screen to 'value'
  2175. void SetDMapScreenState( int dmap, int screen, int index, bool value)
  2176.  
  2177. /************************************************************************************************************/
Advertisement
Add Comment
Please, Sign In to add comment