Advertisement
ZoriaRPG

New for 2.54 (Beta 52.4)

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