ZoriaRPG

2.54 Remains to Merge at No. 9 (17JUNE2017)

Jun 17th, 2017
86
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. //! Not very useful unless we allow loading aux slots, for script changing.
  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. /// GAME ///
  35. //////////////
  36.  
  37.  
  38. void SetScreenFlag(int map, int screen, int flag, bool state); ZASM Instruction:
  39. SCREENFLAG
  40.  
  41. /**
  42. *
  43. *
  44. */ Example Use:
  45.  
  46.  
  47.  
  48. /************************************************************************************************************/
  49.  
  50. void SetScreenFlag(int map, int screen, int flag, bool state); ZASM Instruction:
  51. SCREENFLAG
  52.  
  53. /**
  54. *
  55. *
  56. */ Example Use:
  57.  
  58.  
  59. /************************************************************************************************************/
  60.  
  61.  
  62. /************************************************************************************************************/
  63.  
  64. bool NoUncap ZASM: THROTTLEFPS
  65.  
  66. /**
  67. * If set true, pressing the tilde key, or toggling Uncap in the menus does nothing.
  68. * This does NOT return if the game is throttled, nor doe sit return the framerate.
  69. * It merely blocks the user abilisy to uncap.
  70.  
  71. /************************************************************************************************************/
  72. DEBUGGING: These might find their way into namespace Debug->
  73. /************************************************************************************************************/
  74.  
  75.  
  76.  
  77. /************************************************************************************************************/
  78.  
  79.  
  80.  
  81. /////////////
  82. /// NPC ///
  83. /////////////
  84.  
  85.  
  86. float UID; ZASM Instruction:
  87. NPCUID
  88. /**
  89. * Returns the UID of an npc.
  90. */ Example Use:
  91.  
  92. /************************************************************************************************************/
  93.  
  94.  
  95. //////////////
  96. /// Link ///
  97. //////////////
  98.  
  99.  
  100. int WalkSpeed
  101. ZASM Instruction
  102. LINKWALKSPEED
  103.  
  104. * THis is the speed multiplier for Link's step. I have proven that it works, but it needs to be a float
  105. * to work properly, as desired.
  106.  
  107. /************************************************************************************************************/
  108.  
  109. //! Should reference into ZScript::Rules
  110.  
  111. bool Diagonal; ZASM Instruction:
  112. LINKDIAG
  113.  
  114. /**
  115. * This corresponds to whether 'Diagonal Movement' is enabled, or not.
  116. * This will initially return true, or false, based on the setting in Quest->Graphics->Sprites->Link.
  117. * You may enable, or disable diagonal movement by writing to this value.
  118. *
  119. */ Example Use: !#!
  120.  
  121. /************************************************************************************************************/
  122.  
  123. //! Should reference into ZScript::Rules
  124.  
  125. bool BigHitbox; ZASM Instruction:
  126. LINKBIGHITBOX
  127.  
  128. /**
  129. * This corresponds to whether 'Big Hitbox' is enabled, or not.
  130. * This will initially return true, or false, based on the setting in Quest->Graphics->Sprites->Link.
  131. * You may enable, or disable big hitbox, by writing to this value.
  132. *
  133. */ Example Use: !#!
  134.  
  135. /************************************************************************************************************/
  136. All of these require a new rewrite of Warp.
  137. /************************************************************************************************************/
  138.  
  139. void WarpDx(int dmap, int screen, int x, int y, int effect, int sound)
  140.  
  141.  
  142. /************************************************************************************************************/
  143.  
  144. int WarpEffect; ZASM Instruction:
  145. WARPEFFECT
  146.  
  147. /**
  148. * Sets a warp effect type prior to doing Screen->Warp
  149. * These replicate the in-build effects for tile warps.
  150. * see 'std_constants.zh' under WARPFX_* for a list of effects.
  151. *
  152. */ Example Use: !#!
  153.  
  154. /************************************************************************************************************/
  155.  
  156. int WarpSound; ZASM Instruction:
  157. LINKWARPSOUND
  158.  
  159. /**
  160. * Setting this to a value other than '0' will play that sound when Link warps.
  161. *
  162. */ Example Use: !#!
  163.  
  164. /************************************************************************************************************/
  165.  
  166. bool SideWarpSounds; ZASM Instruction:
  167. PLAYWARPSOUND
  168.  
  169. /**
  170. * By default, even if you set a warp sound, it will not play in sidewarps.
  171. * If you enable this setting, the sound will play in side warps.
  172. * At present, this does not disable playing the sound otherwise. Set Link->WarpSound = 0 to do that.
  173. *
  174. */ Example Use: !#!
  175.  
  176. /************************************************************************************************************/
  177.  
  178. bool PitWarpSounds; ZASM Instruction:
  179. PLAYPITWARPSFX
  180.  
  181. /**
  182. * By default, even if you set a warp sound, it will not play in pit warps.
  183. * If you enable this setting, the sound will play in a pit warp, one time.
  184. * This value resets after the pit warp, so it is mandatory to re-set it each time tat you desire a pit warp
  185. * to play a sound. Do this before Waitdraw().
  186. *
  187. */ Example Use: !#!
  188.  
  189. /************************************************************************************************************/
  190.  
  191. int UseWarpReturn; ZASM Instruction:
  192. LINKRETSQUARE
  193.  
  194. /**
  195. * Setting this to a value between 0 and 3 will change the target return square for Link->Warp
  196. * Valid values are: 0 (A), 1 (B), 2 (C), and 3 (D). Other values will be clamed within this range.
  197. *
  198. */ Example Use: !#!
  199.  
  200.  
  201. /************************************************************************************************************/
  202. All of the following require refactoring of Link collisiom.
  203. /************************************************************************************************************/
  204.  
  205. int HitHeight; ZASM Instruction:
  206. LINKHYSZ
  207.  
  208. /**
  209. * link's Hitbox height in pixels starting from his 0x,0y (upper-left) corner, going down.
  210. * Note that this works on a per-sprite, per-direction basis.
  211. * If you wish to extend Link's hitbox upwards on the Y-Axis, set this value, and adjust his HitYOffset.
  212. * You can read a value that you assign to this (e.g. for custom collision functions).
  213. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  214. *
  215. */ Example Use: !#!
  216.  
  217. /************************************************************************************************************/
  218.  
  219. int HitWidth; ZASM Instruction:
  220. LINKHXSZ
  221.  
  222. /**
  223. * Link's Hitbox width in pixels starting from his x0,y0 (upper-left) corner, going right.
  224. * Note that this works on a per-sprite, per-direction basis.
  225. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  226. *
  227. */ Example Use: !#!
  228.  
  229. /************************************************************************************************************/
  230. //Not implemented. Use Extend and Sprites.
  231. int TileWidth; ZASM Instruction:
  232. LINKTYSZ
  233. /**
  234. * Link's width, in tiles.
  235. * This is not usable, as Link->Extend cannot be set.
  236. * While setting it is not syntactically incorrect, it does nothing.
  237. * You can read a value that you assign to this (e.g. for custom/proxy sprite drawing).
  238. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  239. *
  240. */ Example Use: !#!
  241.  
  242. /************************************************************************************************************/
  243. //Not implemented. Use Extend and Sprites.
  244. int TileHeight; ZASM Instruction:
  245. LINKTXSZ
  246.  
  247. /**
  248. * Link's height, in tiles.
  249. * This is not usable, as Link->Extend cannot be set.
  250. * While setting it is not syntactically incorrect, it does nothing.
  251. * You can read a value that you assign to this (e.g. for custom/proxy sprite drawing).
  252. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  253. *
  254. */ Example Use: !#!
  255.  
  256. /************************************************************************************************************/
  257. //Not implemented.
  258. int HitZHeight; ZASM Instruction:
  259. LINKHZSZ
  260.  
  261. /**
  262. * The Z-axis height of Link's hitbox, or collision rectangle.
  263. * The lower it is, the lower a flying or jumping enemy must fly in order to hit Link.
  264. * To jump over a sprite, you must be higher than its Z + HitZHeight.
  265. * The values of DrawZOffset and HitZHeight are linked. Setting one, also sets the other.
  266. * Writing to this is ignored unless Extend is set to values >=3.
  267. * This is not usable, as Link->Extend cannot be set.
  268. * While setting it is not syntactically incorrect, it does nothing.
  269. * You can read a value that you assign to this (e.g. for custom collision functions).
  270. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  271. *
  272. */ Example Use: !#!
  273.  
  274. /************************************************************************************************************/
  275.  
  276. int HitXOffset; ZASM Instruction:
  277. LINKHXOFS
  278.  
  279. /**
  280. * The X offset of Link's hitbox, or collision rectangle.
  281. * Setting it to positive or negative values will move Link's hitbox left or right.
  282. * Writing to this is ignored unless Extend is set to values >=3.
  283. * Note that this works on a per-sprite, per-direction basis.
  284. * You can read a value that you assign to this (e.g. for custom collision functions).
  285. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  286. *
  287. */ Example Use: !#!
  288.  
  289. /************************************************************************************************************/
  290.  
  291. int HitYOffset; ZASM Instruction:
  292. LINKHYOFS
  293.  
  294. /**
  295. * The Y offset of Link's hitbox, or collision rectangle.
  296. * Setting it to positive or negative values will move Link's hitbox up or down.
  297. * Writing to this is ignored unless Extend is set to values >=3.
  298. * Note that this works on a per-sprite, per-direction basis.
  299. * You can read a value that you assign to this (e.g. for custom collision functions).
  300. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  301. *
  302. */ Example Use: !#!
  303.  
  304. /************************************************************************************************************/
  305. //Not yet implemented
  306. int DrawXOffset; ZASM Instruction:
  307. LINKXOFS
  308.  
  309. /**
  310. * The X offset of Link's sprite.
  311. * Setting it to positive or negative values will move the sprite's tiles left or right relative to its position.
  312. * Writing to this is ignored unless Extend is set to values >=3.
  313. * This is not usable, as Link->Extend cannot be set.
  314. * While setting it is not syntactically incorrect, it does nothing.
  315. * You can read a value that you assign to this.
  316. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  317. *
  318. */ Example Use: !#!
  319.  
  320. /************************************************************************************************************/
  321. //Not yet implemented
  322. int DrawYOffset; ZASM Instruction:
  323. LINKYOFS
  324.  
  325. /**
  326. * The Y offset of Link's sprite.
  327. * Setting it to positive or negative values will move the sprite's tiles up or down relative to its position.
  328. * Writing to this is ignored unless Extend is set to values >=3.
  329. * This is not usable, as Link->Extend cannot be set.
  330. * While setting it is not syntactically incorrect, it does nothing.
  331. * You can read a value that you assign to this.
  332. * This value is not preserved through sessions: Loading a saved game will reset it to the default.
  333. *
  334. */ Example Use: !#!
  335.  
  336. /************************************************************************************************************/
  337.  
  338.  
  339. /************************************************************************************************************/
  340. THe remainder of these are up for debate. I beleive they should exist, as they are exceptionally valuable. .
  341. /************************************************************************************************************/
  342.  
  343. int Animation; ZASM Instruction:
  344. LINKANIMTYPE
  345.  
  346. /**
  347. * Link;s Animation style, as set in Quest->Graphics->Sprites->Link
  348. * Valid types are 0, 1, 2, and 3.
  349. *
  350. */ Example Use: !#!
  351.  
  352. /************************************************************************************************************/
  353.  
  354. int WalkASpeed; ZASM Instruction:
  355. LINKWALKANMSPD
  356.  
  357. /**
  358. * Link's Walking Animation speed as set in Quest->Graphics->Sprites->Link
  359. * valid types are:
  360. *
  361. */ Example Use: !#!
  362.  
  363. /************************************************************************************************************/
  364.  
  365. int SwimASpeed; ZASM Instruction:
  366. LINKSWIMSPD
  367. /**
  368. * Link's Swiming Animation speed as set in Quest->Graphics->Sprites->Link
  369. * valid types are:
  370. *
  371. */ Example Use: !#!
  372.  
  373. /************************************************************************************************************/
  374.  
  375. int Extend; ZASM Instruction:
  376. LINKEXTEND
  377.  
  378.  
  379. /**
  380. * Sets the extend value for all of Link's various actions for his current sprite, and direction.
  381. * This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting
  382. * a tile, click on his sprites for any given action, and press the 'x' key.
  383. * The options are 16x16, 16x32, and 32x32; which correspond to Extend values of ( 0, 1, and 2 )
  384. * respectively.
  385. *
  386. * This also returns the present extend value of Link's sprite for his current direction and sprite.
  387. *
  388. * You may force-set all sprites, and directions to an extend value by assigning a negative number to
  389. * this variable, where -1 == 0 -2 == 1, -3 == 2, -4 == 3, and -5 == 4.
  390. *
  391. * See the 'LINKEXTEND_* values in std_constants for more details.
  392. */
  393.  
  394. /************************************************************************************************************/
  395.  
  396. int GetLinkExtend(int sprite, int dir); ZASM Instruction:
  397. SETLINKEXTEND
  398.  
  399. /**
  400. * Gets the extend value for one of Link's various actions based on a direction.
  401. * This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting a tile.
  402. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  403. */
  404.  
  405. /************************************************************************************************************/
  406.  
  407. void SetLinkExtend(int sprite, int dir, int extend);
  408. ZASM Instruction:
  409. SETLINKEXTEND
  410.  
  411. /**
  412. * Sets the extend value for one of Link's various actions.
  413. * This is equivalent to the Extend value set in Quest->Graphics->Sprites->Link when selecting a tile.
  414. * 'sprite' is the 'action', 'dir' is the sprite direction, and 'extend' is a value between 1 and 3.
  415. * An extend value of '4' is reserved for future implementations of Link->Hit/DrawOffsets ad HitWidth/height.
  416. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  417. */
  418.  
  419. /************************************************************************************************************/
  420.  
  421. void SetLinkTile(int sprite, int dir, int tile)
  422. ZASM Instruction:
  423. SETLINKTILE
  424.  
  425. /**
  426. * Sets the tile for Link's various actions. This is intended to work as OTile for Link.
  427. * 'sprite' is the action for the tile. See Quest->Graphics->Sprites->Link for a visual reference.
  428. * 'tile is the base tile for the sequence. It uses the animation style set in the sprites editor.
  429. * 'dir' is the direction for the tile.
  430. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  431. *
  432. * See the 'LINKEXTEND_* values in std_constants for more details on possible extend values.
  433. */
  434.  
  435. /************************************************************************************************************/
  436.  
  437. int GetLinkTile(int sprite, int dir)
  438. ZASM Instruction:
  439. LINKGETTILE
  440.  
  441. /**
  442. * Returns the OTile for one of Link's various actions.
  443. * 'sprite' is the action for the tile. See Quest->Graphics->Sprites->Link for a visual reference.
  444. * 'dir' is the direction for the tile.
  445. * See 'std_constants' entries under LSPR_* for a list of the various attributes for 'sprite'.
  446. */
  447.  
  448.  
  449. /************************************************************************************************************/
  450.  
  451.  
  452. //////////////
  453. /// Item ///
  454. //////////////
  455.  
  456.  
  457. float UID; ZASM Instruction:
  458. ITEMUID
  459. /**
  460. * Returns the UID of an item.
  461. */ Example Use:
  462.  
  463. /************************************************************************************************************/
  464.  
  465.  
  466.  
  467. int ACLock; ZASM Instruction:
  468. ITEMACLC
  469.  
  470. /**
  471. * Returns the present tick of the animation clock.
  472. *
  473. */
  474.  
  475. /************************************************************************************************************/
  476.  
  477.  
  478. ////////////
  479. /// npc ///
  480. ////////////
  481.  
  482. float UID; ZASM Instruction:
  483. NPCUID
  484. /**
  485. * Returns the UID of an npc.
  486. */ Example Use:
  487.  
  488. /************************************************************************************************************/
  489.  
  490.  
  491. /////////////////
  492. /// LWeapon ///
  493. /////////////////
  494.  
  495.  
  496. float UID; ZASM Instruction:
  497. LWPNUID
  498. /**
  499. * Returns the UID of an lweapon.
  500. */ Example Use:
  501.  
  502.  
  503.  
  504. /************************************************************************************************************/
  505.  
  506.  
  507. /////////////////
  508. /// EWeapon ///
  509. /////////////////
  510.  
  511. float UID; ZASM Instruction:
  512. EWPNUID
  513. /**
  514. * Returns the UID of an eweapon.
  515. */ Example Use:
  516.  
  517.  
  518. ///////////////
  519. /// Audio ///
  520. ///////////////
  521.  
  522. THis is a new pointer to house *all* audio instructions, including enhanced music instructions.
  523.  
  524. hese are implemented, but the functions wer enever moved tot he new ack-end, so they do not work.
  525.  
  526.  
  527. /************************************************************************************************************/
  528.  
  529. void ContinueSound(int sfx); ZASM Instruction:
  530. CONTINUESFX
  531. /**
  532. *
  533. *
  534. */ Example Use:
  535.  
  536. /************************************************************************************************************/
  537.  
  538. void AdjustSound(int sfx, int pan, bool loop); ZASM Instruction:
  539. ADJUSTSFX
  540. /**
  541. * Adjusts properties of a sound effect.
  542. *
  543. */ Example Use:
  544.  
  545.  
  546. /************************************************************************************************************/
  547.  
  548. ///////////////
  549. /// Debug ///
  550. ///////////////
  551.  
  552. This is a new pointer, under which functions that can have dangerous ramifications if imporoperly used will go.
  553. The variables are returning a function label error, but the functions work.
  554.  
  555. int RefFFC; ZASM Instruction:
  556. REFFFC
  557. /**
  558. * Returns the present ffc refrence from the stack. FOR DEBUGGING ONLY!
  559. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  560. */ Example Use:
  561.  
  562. /************************************************************************************************************/
  563.  
  564. int RefItem; ZASM Instruction:
  565. REFITEM
  566. /**
  567. * Returns the present item refrence from the stack. FOR DEBUGGING ONLY!
  568. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  569. */ Example Use:
  570.  
  571. /************************************************************************************************************/
  572.  
  573. int RefItemdata; ZASM Instruction:
  574. REFIDATA
  575. /**
  576. * Returns the present itemdata refrence from the stack. FOR DEBUGGING ONLY!
  577. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  578. */ Example Use:
  579.  
  580. /************************************************************************************************************/
  581.  
  582. int RefLWeapon; ZASM Instruction:
  583. REFLWPN
  584. /**
  585. * Returns the present lweapon refrence from the stack. FOR DEBUGGING ONLY!
  586. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  587. */ Example Use:
  588.  
  589. /************************************************************************************************************/
  590.  
  591. int RefEWeapon; ZASM Instruction:
  592. REFEWPN
  593. /**
  594. * Returns the present eweapon refrence from the stack. FOR DEBUGGING ONLY!
  595. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  596. */ Example Use:
  597.  
  598. /************************************************************************************************************/
  599.  
  600. int RefNPC; ZASM Instruction:
  601. REFNPC
  602. /**
  603. * Returns the present npc refrence from the stack. FOR DEBUGGING ONLY!
  604. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  605. */ Example Use:
  606.  
  607. /************************************************************************************************************/
  608.  
  609. int SP; ZASM Instruction:
  610. SP
  611. /**
  612. * Returns the value of the stack pointer. FOR DEBUGGING ONLY!
  613. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  614. */ Example Use:
  615.  
  616. /************************************************************************************************************/
  617.  
  618. int GetNPCPointer(npc *ptr[]); ZASM Instruction:
  619. NPCARRPTR
  620. /**
  621. * Returns the pointer of a item array as a float.
  622. */ Example Use:
  623. item arr[16];
  624. int size = SizeOfArray( GetPointer(arr) );
  625. //Size == 16
  626.  
  627. /************************************************************************************************************/
  628.  
  629. npc SetNPCPointer(int value); ZASM Instruction:
  630. NPCARRPTR2
  631. /**
  632. * Converts an int pointer to the npc type, for assigning.
  633. */ Example Use:
  634. npc arr[16]; npc arrB[2]; int arrC[2];
  635. arrC[0] = GetPointer(arr);
  636. arrB[0] = SetPointer(arrC[0]);
  637.  
  638. /************************************************************************************************************/
  639.  
  640.  
  641. int GetBoolPointer(bool *ptr[]); ZASM Instruction:
  642. BOOLARRPTR
  643. /**
  644. * Returns the pointer of a bool array as a float.
  645. */ Example Use:
  646. bool arr[16];
  647. int size = SizeOfArray( GetPointer(arr) );
  648. //Size == 16
  649.  
  650.  
  651. /************************************************************************************************************/
  652.  
  653. npc GetBoolPointer(int value); ZASM Instruction:
  654. BOOLARRPTR2
  655. /**
  656. * Converts an bool pointer to the int type, for assigning.
  657. */ Example Use:
  658. bool arr[16]; int arrB[2];
  659. arrB[0] = Deug->GetBoolPointer(arr);
  660.  
  661.  
  662.  
  663. /************************************************************************************************************/
  664.  
  665. int GetFFCPointer(ffc *ptr[]); ZASM Instruction:
  666. FFCARRPTR
  667. /**
  668. * Returns the pointer of a ffc array as a float.
  669. */ Example Use:
  670. ffc arr[16];
  671. int size = SizeOfArray( GetPointer(arr) );
  672. //Size == 16
  673.  
  674. /************************************************************************************************************/
  675.  
  676. ffc SetFCCPointer(int value); ZASM Instruction:
  677. FFCARRPTR2
  678. /**
  679. * Converts an int pointer to the ffc type, for assigning.
  680. */ Example Use:
  681. ffc arr[16]; ffc arrB[2]; int arrC[2];
  682. arrC[0] = GetPointer(arr);
  683. arrB[0] = SetPointer(arrC[0]);
  684.  
  685. /************************************************************************************************************/
  686.  
  687. int GetItemPointer(item *ptr[]); ZASM Instruction:
  688. ITEMARRPTR
  689. /**
  690. * Returns the pointer of a item array as a float.
  691. */ Example Use:
  692. item arr[16];
  693. int size = SizeOfArray( GetPointer(arr) );
  694. //Size == 16
  695.  
  696. /************************************************************************************************************/
  697.  
  698. item SetItemPointer(int value); ZASM Instruction:
  699. ITEMARRPTR2
  700. /**
  701. * Converts an int pointer to the item type, for assigning.
  702. */ Example Use:
  703. item arr[16]; item arrB[2]; int arrC[2];
  704. arrC[0] = GetPointer(arr);
  705. arrB[0] = SetPointer(arrC[0]);
  706.  
  707. /************************************************************************************************************/
  708.  
  709.  
  710. int GetItemdataPointer(itemdata *ptr[]); ZASM Instruction:
  711. IDATAARRPTR
  712. /**
  713. * Returns the pointer of a itemdata array as a float.
  714. */ Example Use:
  715. itemdata arr[16];
  716. int size = SizeOfArray( GetPointer(arr) );
  717. //Size == 16
  718.  
  719. /************************************************************************************************************/
  720.  
  721. itemdata SetItemdataPointer(int value); ZASM Instruction:
  722. IDATAARRPTR2
  723. /**
  724. * Converts an int pointer to the itemdata type, for assigning.
  725. */ Example Use:
  726. itemdata arr[16]; itemdata arrB[2]; int arrC[2];
  727. arrC[0] = GetPointer(arr);
  728. arrB[0] = SetPointer(arrC[0]);
  729.  
  730. /************************************************************************************************************/
  731.  
  732. int GetNPCPointer(npc *ptr[]); ZASM Instruction:
  733. NPCARRPTR
  734. /**
  735. * Returns the pointer of a item array as a float.
  736. */ Example Use:
  737. item arr[16];
  738. int size = SizeOfArray( GetPointer(arr) );
  739. //Size == 16
  740.  
  741. /************************************************************************************************************/
  742.  
  743. npc SetNPCPointer(int value); ZASM Instruction:
  744. NPCARRPTR2
  745. /**
  746. * Converts an int pointer to the npc type, for assigning.
  747. */ Example Use:
  748. npc arr[16]; npc arrB[2]; int arrC[2];
  749. arrC[0] = GetPointer(arr);
  750. arrB[0] = SetPointer(arrC[0]);
  751.  
  752. /************************************************************************************************************/
  753.  
  754. int GetLWeaponPointer(lweapon *ptr[]); ZASM Instruction:
  755. LWPNARRPTR
  756. /**
  757. * Returns the pointer of a lweapon array as a float.
  758. */ Example Use:
  759. lweapon arr[16];
  760. int size = SizeOfArray( GetPointer(arr) );
  761. //Size == 16
  762.  
  763. /************************************************************************************************************/
  764.  
  765. lweapon SetLWeaponPointer(int value); ZASM Instruction:
  766. LWPNARRPTR2
  767. /**
  768. * Converts an int pointer to the lweapon type, for assigning.
  769. */ Example Use:
  770. lweapon arr[16]; lweapon arrB[2]; int arrC[2];
  771. arrC[0] = GetPointer(arr);
  772. arrB[0] = SetPointer(arrC[0]);
  773.  
  774. /************************************************************************************************************/
  775.  
  776. int GetEWeaponPointer(eweapon *ptr[]); ZASM Instruction:
  777. EWPNARRPTR
  778. /**
  779. * Returns the pointer of a eweapon array as a float.
  780. */ Example Use:
  781. eweapon arr[16];
  782. int size = SizeOfArray( GetPointer(arr) );
  783. //Size == 16
  784.  
  785. /************************************************************************************************************/
  786.  
  787. eweapon SetEWeaponPointer(int value); ZASM Instruction:
  788. EWPNARRPTR2
  789. /**
  790. * Converts an int pointer to the eweapon type, for assigning.
  791. */ Example Use:
  792. eweapon arr[16]; eweapon arrB[2]; int arrC[2];
  793. arrC[0] = GetPointer(arr);
  794. arrB[0] = SetPointer(arrC[0]);
  795.  
  796.  
  797. /************************************************************************************************************/
  798.  
  799. ///////////////////
  800. // Unimplemented //
  801. ///////////////////
  802.  
  803. Gleeok wrote these in 2015-6, and he needs to implement them into the present master branch. -Z
  804.  
  805.  
  806. void TileArray ( int layer, int number_of_tiles,
  807. int tiles[],
  808. int x_positions[],
  809. int y_positions[],
  810. int csets[]);
  811.  
  812. ZASM: TILEARRAY
  813.  
  814. /**
  815. *
  816. * Draws a number of tiles specified by 'number_of_tiles' to 'layer'.
  817. * Specify the tiles by populating an array with their IDs and passing the array ointer to 'tiles'.
  818. * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
  819. * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
  820. * Specify the CSet for each by passing an array with their csets to 'csets'.
  821. *
  822. * This function counts as a single draw.
  823. *
  824. * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
  825. *// Example:
  826.  
  827. int tiles[4] = {16,19,31,20};
  828. int tilx[4]= {0, 16, 32, 48}:
  829. int tily[4]={8, 8, 8, 8);
  830. int tilc[4]={0,0,0,0};
  831. Screen->TileArray(6, 4, tiles, tilx, tily, tilc);
  832.  
  833.  
  834. /************************************************************************************************************/
  835.  
  836. void PixelArray ( int layer, int number_of_pixels,
  837. int x_positions[],
  838. int y_positions[],
  839. int colours[]);
  840.  
  841. ZASM: PIXELARRAY
  842.  
  843. /**
  844. *
  845. * Draws a number of pixel, similar to PutPixel, specified by 'number_of_pixels' to 'layer'.
  846. * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
  847. * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
  848. * Specify the colour for each by passing an array with their csets to 'colours'.
  849. *
  850. * This function counts as a single draw.
  851. *
  852. * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
  853. *// Example:
  854.  
  855. int pix[4] = {16,19,31,20};
  856. int px[4]= {0, 16, 32, 48}:
  857. int py[4]={8, 8, 8, 8);
  858. int pc[4]={0x12,0xB0,0xDA,0x4F};
  859. Screen->TileArray(6, 4, pix, px, py, pc);
  860.  
  861. /************************************************************************************************************/
  862.  
  863. CreateBitmap(int id, int xsize, int ysize)
  864.  
  865. * Min size 1, max 2048
  866. /************************************************************************************************************/
  867.  
  868. SetRenderSource(int target, int x, int y, int w, int h)
  869.  
  870. /************************************************************************************************************/
  871.  
  872. //I need to add this after GLeeok reworks his script draw refactoring. -Z
  873. void Polygon ( int layer, ... );
  874.  
  875. ZASM: POLYGON
  876.  
  877. * Adding to Beta 9 : Postponed -Z
  878.  
  879. /************************************************************************************************************/
  880.  
  881. // Game->
  882.  
  883. //! These do not yet work:
  884.  
  885. //Returns Screen->Door[index] for a given DMap and Screen
  886. int GetDMapScreenDoor( int dmap, int screen, int index )
  887.  
  888.  
  889. //Sets Screen->Door[index] for a given DMap and Screen to 'value'
  890. void SetDMapScreenDoor( int dmap, int screen, int index, int value)
  891.  
  892.  
  893. //Returns Screen->State[index] for a given DMap and Screen
  894. bool GetDMapScreenState( int dmap, int screen, int index )
  895.  
  896.  
  897. //Sets Screen->State[index] for a given DMap and Screen to 'value'
  898. void SetDMapScreenState( int dmap, int screen, int index, bool value)
  899.  
  900. /************************************************************************************************************/
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×