Advertisement
ZoriaRPG

2.54 Remains to Merge at No.5

Jun 14th, 2017
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.54 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. /************************************************************************************************************/
  18.  
  19.  
  20. int Game->GetGlobalScript(int ptr[]); ZASM Instruction:
  21. GETGLOBSCRIPT
  22.  
  23. /**
  24. * Returns the number of the global script with the given name or -1 if there is
  25. * no such script. The script name should be passed as a string.
  26. * (!) This was added at 2.54 beta 52.5, 1st June 2017
  27. *
  28. */ Example Use:
  29.  
  30.  
  31. /************************************************************************************************************/
  32.  
  33.  
  34.  
  35.  
  36. /************************************************************************************************************/
  37.  
  38. //////////////
  39. /// GAME ///
  40. //////////////
  41.  
  42. void ContinueSound(int sfx); ZASM Instruction:
  43. CONTINUESFX
  44. /**
  45. *
  46. *
  47. */ Example Use:
  48.  
  49. /************************************************************************************************************/
  50.  
  51. void AdjustSound(int sfx, int pan, bool loop); ZASM Instruction:
  52. ADJUSTSFX
  53. /**
  54. * Adjusts properties of a sound effect.
  55. *
  56. */ Example Use:
  57.  
  58. /************************************************************************************************************/
  59.  
  60. void SetScreenFlag(int map, int screen, int flag, bool state); ZASM Instruction:
  61. SCREENFLAG
  62.  
  63. /**
  64. *
  65. *
  66. */ Example Use:
  67.  
  68.  
  69. /************************************************************************************************************/
  70.  
  71. void ContinueSound(int sfx); ZASM Instruction:
  72. CONTINUESFX
  73. /**
  74. *
  75. *
  76. */ Example Use:
  77.  
  78. /************************************************************************************************************/
  79.  
  80. void AdjustSound(int sfx, int pan, bool loop); ZASM Instruction:
  81. ADJUSTSFX
  82. /**
  83. * Adjusts properties of a sound effect.
  84. *
  85. */ Example Use:
  86.  
  87. /************************************************************************************************************/
  88.  
  89. void SetScreenFlag(int map, int screen, int flag, bool state); ZASM Instruction:
  90. SCREENFLAG
  91.  
  92. /**
  93. *
  94. *
  95. */ Example Use:
  96.  
  97.  
  98. /************************************************************************************************************/
  99.  
  100. /************************************************************************************************************/
  101.  
  102.  
  103. /************************************************************************************************************/
  104.  
  105. int GetScreenEnemy(int map, int screen, int enemy_index)
  106. ZASM Instruction
  107. GETSCREENENEMY
  108.  
  109. /**
  110. * Reads values from enemy lists anywhere in the game.
  111. * Returns the Nth enemy of a given map, and screen where 'enemy_index' is the Nth index
  112. * 'map' is the desired map, and 'screen' is the desired screen.
  113. * Returns 0 if there is no enemy in the desired index.
  114. *
  115. * Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
  116. * /
  117.  
  118. /************************************************************************************************************/
  119.  
  120. int SetScreenEnemy(int map, int screen, int enemy_index, int enemy_id)
  121. ZASM Instruction
  122. SETSCREENENEMY
  123.  
  124. /**
  125. * Sets values to enemy lists anywhere in the game.
  126. * Sets the Nth enemy of a given map, and screen to a specified NPC, where 'enemy_index' is
  127. * the Nth index 'map' is the desired map, and 'screen' is the desired screen, and 'enemy_id'.
  128. * is the ID of the enemy that you wish to use.
  129. *
  130. * If changing the enemies on the current screen and map, enemies will change upon reloading the screen.
  131. *
  132. * Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
  133. * /
  134.  
  135. /************************************************************************************************************/
  136.  
  137. int GetScreenDoor(int map, int screen, int index)
  138. ZASM Instruction
  139. GETSCREENDOOR
  140.  
  141. /**
  142. * Reads value of a door on any screen in the game environment.
  143. * Returns Screen->Door[index] of a given map, and screen where 'index' is the Door[] index,
  144. * 'map' is the desired map, and 'screen' is the desired screen.
  145. * Returns 0 if there is no door present (open).
  146. *
  147. * Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
  148. * /
  149.  
  150. /************************************************************************************************************/
  151.  
  152. int SetScreenDoor(int map, int screen, int index, int type)
  153. ZASM Instruction
  154. SETSCREENDOOR
  155.  
  156. /**
  157. * Sets the value of a door on any screen in the game environment.
  158. * Sets Screen->Door[index] of a given map, and screen where 'index' is the Door[] index,
  159. * 'map' is the desired map, and 'screen' is the desired screen, and 'type'.
  160. * is the door type.
  161. *
  162. * If changing the doors on the current screen and map, doors will change upon reloading the screen.
  163. *
  164. * Use DMaptoMap() from std_functions to simplify in-game use with DMaps.
  165. * /
  166.  
  167. /************************************************************************************************************/
  168.  
  169. int GetPointer(bool *ptr[]); ZASM Instruction:
  170. BOOLARRPTR
  171. /**
  172. * Returns the pointer of a bool array as a float.
  173. */ Example Use:
  174. bool arr[16];
  175. int size = SizeOfArray( GetPointer(arr) );
  176. //Size == 16
  177.  
  178.  
  179. /************************************************************************************************************/
  180.  
  181. void PauseSound(int soundid); ZASM Instruction:
  182. PAUSESOUNDR
  183. PAUSESOUNDV
  184. /**
  185. * Pauses one of the quest's playing sound effects. Use the SFX_ constants in
  186. * std.zh as values of soundid.
  187. */ Example Use: !#!
  188.  
  189. /************************************************************************************************************/
  190.  
  191. void ResumeSound(int soundid); ZASM Instruction:
  192. RESUMESOUNDR
  193. RESUMESOUNDV
  194. /**
  195. * Resumes one of the quest's paused sound effects. Use the SFX_ constants in
  196. * std.zh as values of soundid.
  197. */ Example Use: !#!
  198.  
  199. /************************************************************************************************************/
  200.  
  201. void EndSound(int soundid); ZASM Instruction:
  202. ENDSOUNDR
  203. ENDSOUNDV
  204. /**
  205. * Kills one of the quest's playing sound effects. Use the SFX_ constants in
  206. * std.zh as values of soundid.
  207. */ Example Use: !#!
  208.  
  209. /************************************************************************************************************/
  210.  
  211. void PauseMusic(); ZASM Instruction:
  212. PAUSEMUSIC
  213. PAUSEMUSIC
  214. /**
  215. * Pauses the present, playing MIDI or Enhanced Music file.
  216. */ Example Use: !#!
  217.  
  218. /************************************************************************************************************/
  219.  
  220. void ResumeMusic(); ZASM Instruction:
  221. RESUMEMUSIC
  222. RESUMEMUSIC
  223. /**
  224. * Resumes the present, playing MIDI or Enhanced Music file.
  225. */ Example Use: !#!
  226.  
  227. /************************************************************************************************************/
  228.  
  229. /************************************************************************************************************/
  230.  
  231. void SetMessage(int message, int buffer[]);
  232.  
  233. ZASM Instruction:
  234. SETMESSAGE
  235. /**
  236. * Loads string 'buffer[]' into ZQ Message 'message'.
  237. */ Example Use: !#!
  238.  
  239. /************************************************************************************************************/
  240.  
  241. void SetDMapName(int dmap_id, int buffer[]);
  242.  
  243. ZASM Instruction:
  244. SETDMAPNAME
  245. /**
  246. * Loads string 'buffer[]' to the DMap Name field for DMap with ID 'dmap_id'.
  247. * See std_constsnts.zh for appropriate buffer size.
  248. */ Example Use: !#!
  249.  
  250. /************************************************************************************************************/
  251.  
  252. void SetDMapTitle(int DMap, int buffer[]);
  253.  
  254. ZASM Instruction:
  255. SETDMAPTITLE
  256. /**
  257. * Loads string 'buffer[]' to the DMap Title field for DMap with ID 'dmap_id'.
  258. * See std_constsnts.zh for appropriate buffer size.
  259. */ Example Use: !#!
  260.  
  261. /************************************************************************************************************/
  262.  
  263. void SetDMapIntro(int DMap, int buffer[]);
  264.  
  265. ZASM Instruction:
  266. SETDMAPINTRO
  267. /**
  268. * Loads string 'buffer[]' to the DMap Intro field for DMap with ID 'dmap_id'.
  269. * See std_constsnts.zh for appropriate buffer size.
  270. */ Example Use: !#!
  271.  
  272.  
  273.  
  274. /************************************************************************************************************/
  275.  
  276. bool CappedFPS ZASM: THROTTLEFPS
  277.  
  278. /**
  279. * Returns if the user enabled an uncapped mode either with F1 or TILDE.
  280. * Returns 'true' is the game is capped to 60fps, or false otherwise.
  281. * At present, you may get (read), but NOT set (write to) this value.
  282. */ Example Use: !#!
  283.  
  284. /************************************************************************************************************/
  285. DEBUGGING: These might find their way into namespace Debug->
  286. /************************************************************************************************************/
  287.  
  288. int RefFFC; ZASM Instruction:
  289. REFFFC
  290. /**
  291. * Returns the present ffc refrence from the stack. FOR DEBUGGING ONLY!
  292. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  293. */ Example Use:
  294.  
  295. /************************************************************************************************************/
  296.  
  297. int RefItem; ZASM Instruction:
  298. REFITEM
  299. /**
  300. * Returns the present item refrence from the stack. FOR DEBUGGING ONLY!
  301. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  302. */ Example Use:
  303.  
  304. /************************************************************************************************************/
  305.  
  306. int RefItemdata; ZASM Instruction:
  307. REFIDATA
  308. /**
  309. * Returns the present itemdata refrence from the stack. FOR DEBUGGING ONLY!
  310. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  311. */ Example Use:
  312.  
  313. /************************************************************************************************************/
  314.  
  315. int RefLWeapon; ZASM Instruction:
  316. REFLWPN
  317. /**
  318. * Returns the present lweapon refrence from the stack. FOR DEBUGGING ONLY!
  319. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  320. */ Example Use:
  321.  
  322. /************************************************************************************************************/
  323.  
  324. int RefEWeapon; ZASM Instruction:
  325. REFEWPN
  326. /**
  327. * Returns the present eweapon refrence from the stack. FOR DEBUGGING ONLY!
  328. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  329. */ Example Use:
  330.  
  331. /************************************************************************************************************/
  332.  
  333. int RefNPC; ZASM Instruction:
  334. REFNPC
  335. /**
  336. * Returns the present npc refrence from the stack. FOR DEBUGGING ONLY!
  337. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  338. */ Example Use:
  339.  
  340. /************************************************************************************************************/
  341.  
  342. int SP; ZASM Instruction:
  343. SP
  344. /**
  345. * Returns the value of the stack pointer. FOR DEBUGGING ONLY!
  346. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  347. */ Example Use:
  348.  
  349. /************************************************************************************************************/
  350.  
  351.  
  352.  
  353. /************************************************************************************************************/
  354.  
  355.  
  356.  
  357. /////////////
  358. /// NPC ///
  359. /////////////
  360.  
  361.  
  362. float UID; ZASM Instruction:
  363. NPCUID
  364. /**
  365. * Returns the UID of an npc.
  366. */ Example Use:
  367.  
  368. /************************************************************************************************************/
  369.  
  370. int GetPointer(npc *ptr[]); ZASM Instruction:
  371. NPCARRPTR
  372. /**
  373. * Returns the pointer of a item array as a float.
  374. */ Example Use:
  375. item arr[16];
  376. int size = SizeOfArray( GetPointer(arr) );
  377. //Size == 16
  378.  
  379. /************************************************************************************************************/
  380.  
  381. npc SetPointer(int value); ZASM Instruction:
  382. NPCARRPTR2
  383. /**
  384. * Converts an int pointer to the npc type, for assigning.
  385. */ Example Use:
  386. npc arr[16]; npc arrB[2]; int arrC[2];
  387. arrC[0] = GetPointer(arr);
  388. arrB[0] = SetPointer(arrC[0]);
  389.  
  390. /************************************************************************************************************/
  391.  
  392. int InvFrames; ZASM Instruction:
  393. NPCINVINC
  394. /**
  395. * Returns if the enemy is temporarily invincible, from being hit, or otherwise.
  396. * Returns the number of remaining invincibility frames if the enemy is invincible, otherwise 0.
  397. *
  398. */ Example Use: !#!
  399.  
  400. /************************************************************************************************************/
  401.  
  402. int Invincible; ZASM Instruction:
  403. NPCSUPERMAN
  404. /**
  405. * Returns if the enemy is invincible, because of ( superman variable ).
  406. *
  407. */ Example Use: !#!
  408.  
  409. /************************************************************************************************************/
  410.  
  411. bool HasItem; ZASM Instruction:
  412. NPCHASITEM
  413. /**
  414. * Returns if the enemy is holding the screen item.
  415. *
  416. */ Example Use: !#!
  417.  
  418. /************************************************************************************************************/
  419.  
  420. bool Ringleader; ZASM Instruction:
  421. NPCRINGLEAD
  422. /**
  423. * Returns if the enemy is a 'ringleader'.
  424. *
  425. */ Example Use: !#!
  426.  
  427. /************************************************************************************************************/
  428.  
  429. /************************************************************************************************************/
  430.  
  431.  
  432. /////////////
  433. /// FFC ///
  434. /////////////
  435.  
  436.  
  437. /************************************************************************************************************/
  438.  
  439. int GetPointer(ffc *ptr[]); ZASM Instruction:
  440. FFCARRPTR
  441. /**
  442. * Returns the pointer of a ffc array as a float.
  443. */ Example Use:
  444. ffc arr[16];
  445. int size = SizeOfArray( GetPointer(arr) );
  446. //Size == 16
  447.  
  448. /************************************************************************************************************/
  449.  
  450. ffc SetPointer(int value); ZASM Instruction:
  451. FFCARRPTR2
  452. /**
  453. * Converts an int pointer to the ffc type, for assigning.
  454. */ Example Use:
  455. ffc arr[16]; ffc arrB[2]; int arrC[2];
  456. arrC[0] = GetPointer(arr);
  457. arrB[0] = SetPointer(arrC[0]);
  458.  
  459. /************************************************************************************************************/
  460.  
  461.  
  462. //////////////
  463. /// Link ///
  464. //////////////
  465.  
  466.  
  467. /************************************************************************************************************/
  468.  
  469. int Attack; ZASM Instruction:
  470. LINKUSINITEMA
  471.  
  472. /**
  473. * Returns LinkClass::attack (?)
  474. *
  475. */ Example Use: !#!
  476.  
  477. /************************************************************************************************************/
  478.  
  479. int Animation; ZASM Instruction:
  480. LINKANIMTYPE
  481.  
  482. /**
  483. * Link;s Animation style, as set in Quest->Graphics->Sprites->Link
  484. * Valid types are 0, 1, 2, and 3.
  485. *
  486. */ Example Use: !#!
  487.  
  488. /************************************************************************************************************/
  489.  
  490. int WalkASpeed; ZASM Instruction:
  491. LINKWALKANMSPD
  492.  
  493. /**
  494. * Link's Walking Animation speed as set in Quest->Graphics->Sprites->Link
  495. * valid types are:
  496. *
  497. */ Example Use: !#!
  498.  
  499. /************************************************************************************************************/
  500.  
  501. int SwimASpeed; ZASM Instruction:
  502. LINKSWIMSPD
  503. /**
  504. * Link's Swiming Animation speed as set in Quest->Graphics->Sprites->Link
  505. * valid types are:
  506. *
  507. */ Example Use: !#!
  508.  
  509. /************************************************************************************************************/
  510.  
  511. /************************************************************************************************************/
  512.  
  513. int HitHeight; ZASM Instruction:
  514. LINKHYSZ
  515.  
  516. /**
  517. * link's Hitbox height in pixels starting from his 0x,0y (upper-left) corner, going down.
  518. * Note that this works on a per-sprite, per-direction basis.
  519. * If you wish to extend Link's hitbox upwards on the Y-Axis, set this value, and adjust his HitYOffset.
  520. * You can read a value that you assign to this (e.g. for custom collision functions).
  521. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  522. *
  523. */ Example Use: !#!
  524.  
  525. /************************************************************************************************************/
  526.  
  527. int HitWidth; ZASM Instruction:
  528. LINKHXSZ
  529.  
  530. /**
  531. * Link's Hitbox width in pixels starting from his x0,y0 (upper-left) corner, going right.
  532. * Note that this works on a per-sprite, per-direction basis.
  533. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  534. *
  535. */ Example Use: !#!
  536.  
  537. /************************************************************************************************************/
  538. //Not implemented. Use Extend and Sprites.
  539. int TileWidth; ZASM Instruction:
  540. LINKTYSZ
  541. /**
  542. * Link's width, in tiles.
  543. * This is not usable, as Link->Extend cannot be set.
  544. * While setting it is not syntactically incorrect, it does nothing.
  545. * You can read a value that you assign to this (e.g. for custom/proxy sprite drawing).
  546. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  547. *
  548. */ Example Use: !#!
  549.  
  550. /************************************************************************************************************/
  551. //Not implemented. Use Extend and Sprites.
  552. int TileHeight; ZASM Instruction:
  553. LINKTXSZ
  554.  
  555. /**
  556. * Link's height, in tiles.
  557. * This is not usable, as Link->Extend cannot be set.
  558. * While setting it is not syntactically incorrect, it does nothing.
  559. * You can read a value that you assign to this (e.g. for custom/proxy sprite drawing).
  560. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  561. *
  562. */ Example Use: !#!
  563.  
  564. /************************************************************************************************************/
  565. //Not implemented.
  566. int HitZHeight; ZASM Instruction:
  567. LINKHZSZ
  568.  
  569. /**
  570. * The Z-axis height of Link's hitbox, or collision rectangle.
  571. * The lower it is, the lower a flying or jumping enemy must fly in order to hit Link.
  572. * To jump over a sprite, you must be higher than its Z + HitZHeight.
  573. * The values of DrawZOffset and HitZHeight are linked. Setting one, also sets the other.
  574. * Writing to this is ignored unless Extend is set to values >=3.
  575. * This is not usable, as Link->Extend cannot be set.
  576. * While setting it is not syntactically incorrect, it does nothing.
  577. * You can read a value that you assign to this (e.g. for custom collision functions).
  578. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  579. *
  580. */ Example Use: !#!
  581.  
  582. /************************************************************************************************************/
  583.  
  584. int HitXOffset; ZASM Instruction:
  585. LINKHXOFS
  586.  
  587. /**
  588. * The X offset of Link's hitbox, or collision rectangle.
  589. * Setting it to positive or negative values will move Link's hitbox left or right.
  590. * Writing to this is ignored unless Extend is set to values >=3.
  591. * Note that this works on a per-sprite, per-direction basis.
  592. * You can read a value that you assign to this (e.g. for custom collision functions).
  593. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  594. *
  595. */ Example Use: !#!
  596.  
  597. /************************************************************************************************************/
  598.  
  599. int HitYOffset; ZASM Instruction:
  600. LINKHYOFS
  601.  
  602. /**
  603. * The Y offset of Link's hitbox, or collision rectangle.
  604. * Setting it to positive or negative values will move Link's hitbox up or down.
  605. * Writing to this is ignored unless Extend is set to values >=3.
  606. * Note that this works on a per-sprite, per-direction basis.
  607. * You can read a value that you assign to this (e.g. for custom collision functions).
  608. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  609. *
  610. */ Example Use: !#!
  611.  
  612. /************************************************************************************************************/
  613. //Not yet implemented
  614. int DrawXOffset; ZASM Instruction:
  615. LINKXOFS
  616.  
  617. /**
  618. * The X offset of Link's sprite.
  619. * Setting it to positive or negative values will move the sprite's tiles left or right relative to its position.
  620. * Writing to this is ignored unless Extend is set to values >=3.
  621. * This is not usable, as Link->Extend cannot be set.
  622. * While setting it is not syntactically incorrect, it does nothing.
  623. * You can read a value that you assign to this.
  624. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  625. *
  626. */ Example Use: !#!
  627.  
  628. /************************************************************************************************************/
  629. //Not yet implemented
  630. int DrawYOffset; ZASM Instruction:
  631. LINKYOFS
  632.  
  633. /**
  634. * The Y offset of Link's sprite.
  635. * Setting it to positive or negative values will move the sprite's tiles up or down relative to its position.
  636. * Writing to this is ignored unless Extend is set to values >=3.
  637. * This is not usable, as Link->Extend cannot be set.
  638. * While setting it is not syntactically incorrect, it does nothing.
  639. * You can read a value that you assign to this.
  640. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  641. *
  642. */ Example Use: !#!
  643.  
  644. /************************************************************************************************************/
  645.  
  646. //! Link->Equipment is now read-write, and needs testing.
  647. //! It is also a pain to write bitwise values, to test it.
  648.  
  649. int Equipment; ZASM Instruction:
  650. LINKEQUIP
  651.  
  652. /**
  653. * Contains the item IDs of what is currently equiped to Link's A and B buttons.
  654. * The first 8 bits contain the A button item, and the second 8 bits contain the B button item.
  655. * If you are not comfortable with performing binary operations,
  656. * you can use the functions GetEquipmentA() or GetEquipmentB() in std.zh.
  657. *
  658. */ Example Use: !#!
  659.  
  660. /************************************************************************************************************/
  661.  
  662. int ItemA; ZASM Instruction:
  663. LINKITEMA
  664.  
  665. /**
  666. * Contains the item IDs of what is currently equiped to Link's A button.
  667. * Writing to this variable will set an item to the A-button.
  668. * This will occur even if the item is not in inventory, and not on the subscreen.
  669. * This will ignore if you have B+A or B-only subscreens, and force-set the item.
  670. * The intent of this is to allow scriters to easily create scripted subscreens.
  671. *
  672. */ Example Use: !#!
  673.  
  674. /************************************************************************************************************/
  675.  
  676. int ItemB; ZASM Instruction:
  677. LINKITEMB
  678.  
  679. /**
  680. * Contains the item IDs of what is currently equiped to Link's B button.
  681. * Writing to this variable will set an item to the A-button.
  682. * This will occur even if the item is not in inventory, and not on the subscreen.
  683. * The intent of this is to allow scriters to easily create scripted subscreens.
  684. *
  685. */ Example Use: !#!
  686.  
  687. /************************************************************************************************************/
  688.  
  689. int SetItemSlot(int itm_id, int slot, int force);
  690. ZASM Instruction:
  691. SETITEMSLOT
  692.  
  693. /**
  694. * This allows you to set Link's button items without binary operations, and to decide whether to
  695. * obey quest rules, or inventory.
  696. *
  697. * When using this, 'itm_id' is the ID number of the item.
  698. * Set 'slot' to one of the following: 0 == Slot B, 1 == Slot A
  699. * Other buttons may be added int he future, and other values for ;slot' are thus, reserved.
  700. * Set the flags on 'force' as follows:
  701. * const int ITM_REQUIRE_NONE = 0
  702. * const int ITM_REQUIRE_INVENTORY = 1
  703. * const int ITM_REQUIRE_A_SLOT_RULE = 2
  704. * Thus, require both inventory, and following quest slot rules, force == 3.
  705. *
  706. */ Example Use: !#!
  707.  
  708. /************************************************************************************************************/
  709.  
  710. int Eaten; ZASM Instruction:
  711. LINKEATEN
  712.  
  713. /**
  714. * This stores a counter for how long Link has been inside a LikeLike, or similar enemy.
  715. * It returns 0 if Link is not eaten, otherwise it returns the duration of him being eaten.
  716. *
  717. */ Example Use: !#!
  718.  
  719. /************************************************************************************************************/
  720.  
  721. int Extend; ZASM Instruction:
  722. LINKEXTEND
  723.  
  724.  
  725. /**
  726. * Sets the extend value for all of Link's various actions for his current sprite, and direction.
  727. * This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting
  728. * a tile, click on his sprites for any given action, and press the 'x' key.
  729. * The options are 16x16, 16x32, and 32x32; which correspond to Extend values of ( 0, 1, and 2 )
  730. * respectively.
  731. *
  732. * This also returns the present extend value of Link's sprite for his current direction and sprite.
  733. *
  734. * You may force-set all sprites, and directions to an extend value by assigning a negative number to
  735. * this variable, where -1 == 0 -2 == 1, -3 == 2, -4 == 3, and -5 == 4.
  736. *
  737. * See the 'LINKEXTEND_* values in std_constants for more details.
  738. */
  739.  
  740. /************************************************************************************************************/
  741.  
  742. int GetLinkExtend(int sprite, int dir); ZASM Instruction:
  743. SETLINKEXTEND
  744.  
  745. /**
  746. * Gets the extend value for one of Link's various actions based on a direction.
  747. * This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting a tile.
  748. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  749. */
  750.  
  751. /************************************************************************************************************/
  752.  
  753. void SetLinkExtend(int sprite, int dir, int extend);
  754. ZASM Instruction:
  755. SETLINKEXTEND
  756.  
  757. /**
  758. * Sets the extend value for one of Link's various actions.
  759. * This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting a tile.
  760. * 'sprite' is the 'action', 'dir' is the sprite direction, and 'extend' is a value between 1 and 3.
  761. * An extend value of '4' is reserved for future implementations of Link->Hit/DrawOffsets ad HitWidth/height.
  762. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  763. */
  764.  
  765. /************************************************************************************************************/
  766.  
  767. void SetLinkTile(int sprite, int dir, int tile)
  768. ZASM Instruction:
  769. SETLINKTILE
  770.  
  771. /**
  772. * Sets the tile for Link's various actions. This is intended to work as OTile for Link.
  773. * 'sprite' is the action for the tile. See Quest->Graphics->Sprites->Link for a visual reference.
  774. * 'tile is the base tile for the sequence. It uses the animation style set in the sprites editor.
  775. * 'dir' is the direction for the tile.
  776. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  777. *
  778. * See the 'LINKEXTEND_* values in std_constants for more details on possible extend values.
  779. */
  780.  
  781. /************************************************************************************************************/
  782.  
  783. int GetLinkTile(int sprite, int dir)
  784. ZASM Instruction:
  785. LINKGETTILE
  786.  
  787. /**
  788. * Returns the OTile for one of Link's various actions.
  789. * 'sprite' is the action for the tile. See Quest->Graphics->Sprites->Link for a visual reference.
  790. * 'dir' is the direction for the tile.
  791. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  792. */
  793.  
  794. /************************************************************************************************************/
  795.  
  796.  
  797. /************************************************************************************************************/
  798.  
  799. int WarpEffect; ZASM Instruction:
  800. WARPEFFECT
  801.  
  802. /**
  803. * Sets a warp effect type prior to doing Screen->Warp
  804. * These replicate the in-build effects for tile warps.
  805. * see 'std_constants.zh' under WARPFX_* for a list of effects.
  806. *
  807. */ Example Use: !#!
  808.  
  809. /************************************************************************************************************/
  810.  
  811. int WarpSound; ZASM Instruction:
  812. LINKWARPSOUND
  813.  
  814. /**
  815. * Setting this to a value other than '0' will play that sound when Link warps.
  816. *
  817. */ Example Use: !#!
  818.  
  819. /************************************************************************************************************/
  820.  
  821. bool SideWarpSounds; ZASM Instruction:
  822. PLAYWARPSOUND
  823.  
  824. /**
  825. * By default, even if you set a warp sound, it will not play in sidewarps.
  826. * If you enable this setting, the sound will play in side warps.
  827. * At present, this does not disable playing the sound otherwise. Set Link->WarpSound = 0 to do that.
  828. *
  829. */ Example Use: !#!
  830.  
  831. /************************************************************************************************************/
  832.  
  833. bool PitWarpSounds; ZASM Instruction:
  834. PLAYPITWARPSFX
  835.  
  836. /**
  837. * By default, even if you set a warp sound, it will not play in pit warps.
  838. * If you enable this setting, the sound will play in a pit warp, one time.
  839. * This value resets after the pit warp, so it is mandatory to re-set it each time tat you desire a pit warp
  840. * to play a sound. Do this before Waitdraw().
  841. *
  842. */ Example Use: !#!
  843.  
  844. /************************************************************************************************************/
  845.  
  846. int UseWarpReturn; ZASM Instruction:
  847. LINKRETSQUARE
  848.  
  849. /**
  850. * Setting this to a value between 0 and 3 will change the target return square for Link->Warp
  851. * Valid values are: 0 (A), 1 (B), 2 (C), and 3 (D). Other values will be clamed within this range.
  852. *
  853. */ Example Use: !#!
  854.  
  855. /************************************************************************************************************/
  856.  
  857. int UsingItem; ZASM Instruction:
  858. LINKUSINITEM
  859.  
  860. /**
  861. * Returns the ID of an item used when Link uses an item.
  862. * Setting this does nothing.
  863. *
  864. */ Example Use: !#!
  865.  
  866.  
  867. /************************************************************************************************************/
  868.  
  869. bool Diagonal; ZASM Instruction:
  870. LINKDIAG
  871.  
  872. /**
  873. * This corresponds to whether 'Diagonal Movement' is enabled, or not.
  874. * This will initially return true, or false, based on the setting in Quest->Graphics->Sprites->Link.
  875. * You may enable, or disable diagonal movement by writing to this value.
  876. *
  877. */ Example Use: !#!
  878.  
  879. /************************************************************************************************************/
  880.  
  881. bool BigHitbox; ZASM Instruction:
  882. LINKBIGHITBOX
  883.  
  884. /**
  885. * This corresponds to whether 'Big Hitbox' is enabled, or not.
  886. * This will initially return true, or false, based on the setting in Quest->Graphics->Sprites->Link.
  887. * You may enable, or disable big hitbox, by writing to this value.
  888. *
  889. */ Example Use: !#!
  890.  
  891. /************************************************************************************************************/
  892.  
  893.  
  894. //////////////
  895. /// Item ///
  896. //////////////
  897.  
  898.  
  899. float UID; ZASM Instruction:
  900. ITEMUID
  901. /**
  902. * Returns the UID of an item.
  903. */ Example Use:
  904.  
  905. /************************************************************************************************************/
  906.  
  907.  
  908. int GetPointer(item *ptr[]); ZASM Instruction:
  909. ITEMARRPTR
  910. /**
  911. * Returns the pointer of a item array as a float.
  912. */ Example Use:
  913. item arr[16];
  914. int size = SizeOfArray( GetPointer(arr) );
  915. //Size == 16
  916.  
  917. /************************************************************************************************************/
  918.  
  919. item SetPointer(int value); ZASM Instruction:
  920. ITEMARRPTR2
  921. /**
  922. * Converts an int pointer to the item type, for assigning.
  923. */ Example Use:
  924. item arr[16]; item arrB[2]; int arrC[2];
  925. arrC[0] = GetPointer(arr);
  926. arrB[0] = SetPointer(arrC[0]);
  927.  
  928. /************************************************************************************************************/
  929.  
  930. int ACLock; ZASM Instruction:
  931. ITEMACLC
  932.  
  933. /**
  934. * Returns the present tick of the animation clock.
  935. *
  936. */
  937.  
  938. /************************************************************************************************************/
  939.  
  940.  
  941. //////////////////
  942. /// itemdata ///
  943. //////////////////
  944.  
  945.  
  946. int GetPointer(itemdata *ptr[]); ZASM Instruction:
  947. IDATAARRPTR
  948. /**
  949. * Returns the pointer of a itemdata array as a float.
  950. */ Example Use:
  951. itemdata arr[16];
  952. int size = SizeOfArray( GetPointer(arr) );
  953. //Size == 16
  954.  
  955. /************************************************************************************************************/
  956.  
  957. itemdata SetPointer(int value); ZASM Instruction:
  958. IDATAARRPTR2
  959. /**
  960. * Converts an int pointer to the itemdata type, for assigning.
  961. */ Example Use:
  962. itemdata arr[16]; itemdata arrB[2]; int arrC[2];
  963. arrC[0] = GetPointer(arr);
  964. arrB[0] = SetPointer(arrC[0]);
  965.  
  966. /************************************************************************************************************/
  967.  
  968.  
  969. /************************************************************************************************************/
  970.  
  971. ////////////
  972. /// npc ///
  973. ////////////
  974.  
  975. float UID; ZASM Instruction:
  976. NPCUID
  977. /**
  978. * Returns the UID of an npc.
  979. */ Example Use:
  980.  
  981. /************************************************************************************************************/
  982.  
  983. int GetPointer(npc *ptr[]); ZASM Instruction:
  984. NPCARRPTR
  985. /**
  986. * Returns the pointer of a item array as a float.
  987. */ Example Use:
  988. item arr[16];
  989. int size = SizeOfArray( GetPointer(arr) );
  990. //Size == 16
  991.  
  992. /************************************************************************************************************/
  993.  
  994. npc SetPointer(int value); ZASM Instruction:
  995. NPCARRPTR2
  996. /**
  997. * Converts an int pointer to the npc type, for assigning.
  998. */ Example Use:
  999. npc arr[16]; npc arrB[2]; int arrC[2];
  1000. arrC[0] = GetPointer(arr);
  1001. arrB[0] = SetPointer(arrC[0]);
  1002.  
  1003. /************************************************************************************************************/
  1004.  
  1005. /************************************************************************************************************/
  1006.  
  1007. int ScriptDefense[]; ZASM Instruction:
  1008. NPCSCRDEFENSED
  1009. /**
  1010. * The npc's Script Weapon Defense values, as an array of 10 integers. Use the NPCSD_ and NPCDT_ constants
  1011. * in std.zh to set or compare these values.
  1012. *
  1013. * This corresponds to the 'Defenses 3' tab in the Enemy Editor.
  1014. */
  1015.  
  1016. /************************************************************************************************************/
  1017.  
  1018.  
  1019. /////////////////
  1020. /// *weapon ///
  1021. /////////////////*************************************************************/
  1022.  
  1023.  
  1024. /////////////////
  1025. /// LWeapon ///
  1026. /////////////////
  1027.  
  1028.  
  1029. float UID; ZASM Instruction:
  1030. LWPNUID
  1031. /**
  1032. * Returns the UID of an lweapon.
  1033. */ Example Use:
  1034.  
  1035. /************************************************************************************************************/
  1036.  
  1037. int GetPointer(lweapon *ptr[]); ZASM Instruction:
  1038. LWPNARRPTR
  1039. /**
  1040. * Returns the pointer of a lweapon array as a float.
  1041. */ Example Use:
  1042. lweapon arr[16];
  1043. int size = SizeOfArray( GetPointer(arr) );
  1044. //Size == 16
  1045.  
  1046. /************************************************************************************************************/
  1047.  
  1048. lweapon SetPointer(int value); ZASM Instruction:
  1049. LWPNARRPTR2
  1050. /**
  1051. * Converts an int pointer to the lweapon type, for assigning.
  1052. */ Example Use:
  1053. lweapon arr[16]; lweapon arrB[2]; int arrC[2];
  1054. arrC[0] = GetPointer(arr);
  1055. arrB[0] = SetPointer(arrC[0]);
  1056.  
  1057. /************************************************************************************************************/
  1058.  
  1059. int Range; ZASM Instruction:
  1060. LWPNRANGE
  1061.  
  1062. /**
  1063. * The range of the weapon in pixels.
  1064. * The range in pixels for boomerang and hookshot lweapons; and the duration in frames for arrow lweapons.
  1065. *
  1066. */ Example Use: !#!
  1067.  
  1068. /************************************************************************************************************/
  1069.  
  1070.  
  1071. /////////////////
  1072. /// EWeapon ///
  1073. /////////////////
  1074.  
  1075. float UID; ZASM Instruction:
  1076. EWPNUID
  1077. /**
  1078. * Returns the UID of an eweapon.
  1079. */ Example Use:
  1080.  
  1081. /************************************************************************************************************/
  1082.  
  1083. int GetPointer(eweapon *ptr[]); ZASM Instruction:
  1084. EWPNARRPTR
  1085. /**
  1086. * Returns the pointer of a eweapon array as a float.
  1087. */ Example Use:
  1088. eweapon arr[16];
  1089. int size = SizeOfArray( GetPointer(arr) );
  1090. //Size == 16
  1091.  
  1092. /************************************************************************************************************/
  1093.  
  1094. eweapon SetPointer(int value); ZASM Instruction:
  1095. EWPNARRPTR2
  1096. /**
  1097. * Converts an int pointer to the eweapon type, for assigning.
  1098. */ Example Use:
  1099. eweapon arr[16]; eweapon arrB[2]; int arrC[2];
  1100. arrC[0] = GetPointer(arr);
  1101. arrB[0] = SetPointer(arrC[0]);
  1102.  
  1103. /************************************************************************************************************/
  1104.  
  1105.  
  1106.  
  1107. /************************************************************************************************************/
  1108.  
  1109. //! This new mode does not work as intended, and will likely be deprecated by Screen->SetRenderSource
  1110. void Quad ( int layer,
  1111. int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4,
  1112. int w, int h, int cset, int flip, int texture, int render_mode);
  1113.  
  1114. ZASM Instruction:
  1115. QUADR
  1116.  
  1117. /**
  1118. * Draws a quad on the specified layer with the corners x1,y1 through x4,y4.
  1119. * Corners are drawn in a counterclockwise order starting from x1,y1. ( So
  1120. * if you draw a "square" for example starting from the bottom-right corner
  1121. * instead of the usual top-left, the the image will be textured onto the
  1122. * quad so it appears upside-down. -yes, these are rotatable. )
  1123. *
  1124. * From there a single or block of tiles, combos **or a bitmap** is then texture mapped
  1125. * onto the quad using the arguments w, h, cset, flip, and render_mode.
  1126. * A positive vale in texture will draw the image from the tilesheet pages,
  1127. * whereas a negative value will be drawn from the combo page. 0 will draw combo number 0.
  1128. * Both w and h are undefined unless 1 <= blockh, blockw <= 16, and it is a power of
  1129. * two. ie: 1, 2 are acceptable, but 2, 15 are not.
  1130. *
  1131. * To specify a bitmap as a texture, sum 65520 with the bitmap ID, or use the constant TEX_BITMAP + Bitmap
  1132. * Example: Screen->Quad(6, 0, 0, 40, 25, 18, 50, 60, 110, 0, 0, 0, 0, TEX_BITMAP+RT_BITMAP0, PT_TEXTURE);
  1133. *
  1134. *
  1135. * Flip specifies how the tiles/combos should be flipped when drawn:
  1136. * 0: No flip
  1137. * 1: Horizontal flip
  1138. * 2: Vertical flip
  1139. * 3: Both (180 degree rotation)
  1140. * (!) See std.zh for a list of all available render_mode arguments.
  1141. */ Example Use: !#!
  1142.  
  1143. ///////////////////
  1144. // Unimplemented //
  1145. ///////////////////
  1146.  
  1147. // Link->
  1148.  
  1149. /************************************************************************************************************/
  1150. //Implemented, but does nothing.
  1151. void SetTile(int sprite, int tile, int dir, int flip)
  1152. ZASM Instruction:
  1153. LINKSETTILE
  1154.  
  1155. /**
  1156. * Sets the tile for Link's various actions.
  1157. * 'sprite' is the action for the tile. See Quest->Graphics->Sprites->Link for a visual reference.
  1158. * 'tile is the base tile for the sequence. It uses the animation style set in the sprites editor.
  1159. * 'dir' is the direction for the tile.
  1160. * 'flip' is the flip attribute for the tile.
  1161. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  1162. */
  1163.  
  1164. /************************************************************************************************************/
  1165.  
  1166. //!Not Implemented in this build.
  1167. int GetExtend(int sprite, int dir); ZASM Instruction:
  1168. LINKGETEXTEND
  1169.  
  1170. /**
  1171. * Gets the extend value for one of Link's various actions.
  1172. * This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting a tile.
  1173. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  1174. */
  1175.  
  1176. /************************************************************************************************************/
  1177. //Implemented, but does nothing.
  1178. void SetExtend(int sprite, int dir, int extend); ZASM Instruction:
  1179. LINKSETEXTEND
  1180.  
  1181. /**
  1182. * Sets the extend value for one of Link's various actions.
  1183. * This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting a tile.
  1184. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  1185. */
  1186.  
  1187. /************************************************************************************************************/
  1188. //!Not Implemented in this build.
  1189. int GetTile(int sprite, int dir, int flip)
  1190. ZASM Instruction:
  1191. LINKGETTILE
  1192.  
  1193. /**
  1194. * Returns the tile for one of Link's various actions.
  1195. * 'sprite' is the action for the tile. See Quest->Graphics->Sprites->Link for a visual reference.
  1196. * 'dir' is the direction for the tile.
  1197. * 'flip' is the flip attribute for the tile.
  1198. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  1199. */
  1200.  
  1201. /************************************************************************************************************/
  1202.  
  1203. // Screen->
  1204.  
  1205.  
  1206. void TileArray ( int layer, int number_of_tiles,
  1207. int tiles[],
  1208. int x_positions[],
  1209. int y_positions[],
  1210. int csets[]);
  1211.  
  1212. ZASM: TILEARRAY
  1213.  
  1214. /**
  1215. *
  1216. * Draws a number of tiles specified by 'number_of_tiles' to 'layer'.
  1217. * Specify the tiles by populating an array with their IDs and passing the array ointer to 'tiles'.
  1218. * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
  1219. * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
  1220. * Specify the CSet for each by passing an array with their csets to 'csets'.
  1221. *
  1222. * This function counts as a single draw.
  1223. *
  1224. * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
  1225. *// Example:
  1226.  
  1227. int tiles[4] = {16,19,31,20};
  1228. int tilx[4]= {0, 16, 32, 48}:
  1229. int tily[4]={8, 8, 8, 8);
  1230. int tilc[4]={0,0,0,0};
  1231. Screen->TileArray(6, 4, tiles, tilx, tily, tilc);
  1232.  
  1233.  
  1234. /************************************************************************************************************/
  1235.  
  1236. void PixelArray ( int layer, int number_of_pixels,
  1237. int x_positions[],
  1238. int y_positions[],
  1239. int colours[]);
  1240.  
  1241. ZASM: PIXELARRAY
  1242.  
  1243. /**
  1244. *
  1245. * Draws a number of pixel, similar to PutPixel, specified by 'number_of_pixels' to 'layer'.
  1246. * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
  1247. * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
  1248. * Specify the colour for each by passing an array with their csets to 'colours'.
  1249. *
  1250. * This function counts as a single draw.
  1251. *
  1252. * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
  1253. *// Example:
  1254.  
  1255. int pix[4] = {16,19,31,20};
  1256. int px[4]= {0, 16, 32, 48}:
  1257. int py[4]={8, 8, 8, 8);
  1258. int pc[4]={0x12,0xB0,0xDA,0x4F};
  1259. Screen->TileArray(6, 4, pix, px, py, pc);
  1260.  
  1261. /************************************************************************************************************/
  1262.  
  1263. CreateBitmap(int id, int xsize, int ysize)
  1264.  
  1265. * Min size 1, max 2048
  1266. /************************************************************************************************************/
  1267.  
  1268. SetRenderSource(int target, int x, int y, int w, int h)
  1269.  
  1270. /************************************************************************************************************/
  1271.  
  1272. void Polygon ( int layer, ... );
  1273.  
  1274. ZASM: POLYGON
  1275.  
  1276. * Adding to Beta 9 : Postponed -Z
  1277.  
  1278. /************************************************************************************************************/
  1279.  
  1280. // Game->
  1281.  
  1282. //! These do not yet work:
  1283.  
  1284. //Returns Screen->Door[index] for a given DMap and Screen
  1285. int GetDMapScreenDoor( int dmap, int screen, int index )
  1286.  
  1287.  
  1288. //Sets Screen->Door[index] for a given DMap and Screen to 'value'
  1289. void SetDMapScreenDoor( int dmap, int screen, int index, int value)
  1290.  
  1291.  
  1292. //Returns Screen->State[index] for a given DMap and Screen
  1293. bool GetDMapScreenState( int dmap, int screen, int index )
  1294.  
  1295.  
  1296. //Sets Screen->State[index] for a given DMap and Screen to 'value'
  1297. void SetDMapScreenState( int dmap, int screen, int index, bool value)
  1298.  
  1299. /************************************************************************************************************/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement