ZoriaRPG

2.54 Remains to Merge at No. 8

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