Advertisement
ZoriaRPG

2.54 New ZScript ShortList (31-May-2017)

May 30th, 2017
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.41 KB | None | 0 0
  1. // Beta 52.4
  2.  
  3. /////////////////
  4. /// ZScript ///
  5. /////////////////
  6.  
  7. The ZScript language now supports function pointers, using the AT_SIGN token (@) as a delimiter.
  8.  
  9. The ZScript language now supports C-Style comment blocks using the traditional syntax of:
  10.  
  11. /*
  12. COMMENT BLOCK
  13.  
  14. */
  15.  
  16.  
  17. Arrays now support being declared with a formula:
  18.  
  19. int arr[10*4];
  20.  
  21. This is now the same as int arr[40];
  22.  
  23. Nesting array calls should now work properly. (e.g. arrA[ arrB[ arrC[ arrd[4] ] ] ] )
  24.  
  25. //////////////
  26. // Global //
  27. //////////////
  28.  
  29. void OverlayTile(int firsttile, int secondtile);
  30. Overlay one tile onto another.
  31.  
  32. int SizeOfArrayBool(bool array[]);
  33. * As SizeOfArray(int *ptr), save that it works specifically with bool typed arrays.
  34.  
  35. int SizeOfArrayFFC(ffc array[]);
  36. * As SizeOfArray(int *ptr), save that it works specifically with ffc typed arrays.
  37.  
  38. int SizeOfArrayNPC(npc array[]);
  39. * As SizeOfArray(int *ptr), save that it works specifically with npc typed arrays.
  40.  
  41. int SizeOfArrayItem(item array[]);
  42. * As SizeOfArray(int *ptr), save that it works specifically with item typed arrays.
  43.  
  44. int SizeOfArrayItemdata(itemdata array[]);
  45. * As SizeOfArray(int *ptr), save that it works specifically with itemdata typed arrays.
  46.  
  47. int SizeOfArrayLWeapon(lweapon array[]);
  48. * As SizeOfArray(int *ptr), save that it works specifically with lweapon typed arrays.
  49.  
  50. int SizeOfArrayEWeapon(eweapon array[]);
  51. * As SizeOfArray(int *ptr), save that it works specifically with eweapon typed arrays.
  52.  
  53.  
  54. /************************************************************************************************************/
  55.  
  56. ////////////
  57. // Game //
  58. ////////////
  59.  
  60. void ContinueSound(int sfx);
  61.  
  62. void AdjustSound(int sfx, int pan, bool loop);
  63. * Adjusts properties of a sound effect.
  64.  
  65. void SetScreenFlag(int map, int screen, int flag, bool state);
  66.  
  67. bool ButtonPress[18];
  68. * An array of 18 button states that correspond to Link->Press*
  69.  
  70. bool ButtonInput[18];
  71. * An array of 18 button states that correspond to Link->Input*
  72.  
  73. bool ButtonHeld[18];
  74. * An array of 18 button states that returns if a button is being held down.
  75. * MAY only represent a joypad.
  76.  
  77. bool JoypadPress[18];
  78. * An array of 18 button states that corresponds to whether the player is pressing a button on a Joypad \
  79. * controller, but not the keyboard. REQUIRES TESTING.
  80.  
  81. bool KeyPress[127];
  82. * An array of 127 indices, each representing a keypress on the keyboard.
  83. * See std_keyboard.zh for constants ands functions that relate to reading from, or writing to the keyboard.
  84.  
  85. bool ReadKey[127];
  86. * A read-only array of 127 indices, each representing a keypress on the keyboard.
  87. * See std_keyboard.zh for constants ands functions that relate to reading from, or writing to the keyboard.
  88.  
  89. int GetMaxMaps()
  90. int MapCount()
  91. * Returns the number of maps used by a quest.
  92.  
  93. int GetScreenEnemy(int map, int screen, int enemy_index)
  94. * Reads values from enemy lists anywhere in the game.
  95.  
  96. int SetScreenEnemy(int map, int screen, int enemy_index, int enemy_id)
  97. * Sets values to enemy lists anywhere in the game.
  98.  
  99. int GetScreenDoor(int map, int screen, int index)
  100. * Reads value of a door on any screen in the game environment.
  101.  
  102. int SetScreenDoor(int map, int screen, int index, int type)
  103. * Sets the value of a door on any screen in the game environment.
  104.  
  105. void PauseSound(int soundid)
  106. * Pauses one of the quest's playing sound effects. Use the SFX_ constants in
  107.  
  108. void ResumeSound(int soundid)
  109. * Resumes one of the quest's paused sound effects. Use the SFX_ constants in
  110.  
  111. void EndSound(int soundid)
  112. * Kills one of the quest's playing sound effects. Use the SFX_ constants in
  113.  
  114. void PauseMusic()
  115. * Pauses the present, playing MIDI or Enhanced Music file.
  116.  
  117. void ResumeMusic()
  118. * Resumes the present, playing MIDI or Enhanced Music file.
  119.  
  120. void GreyscaleOn()
  121. * Renders the entire display in greyscale.
  122.  
  123. void GreyscaleOff()
  124. * Returns the display rendering to colour.
  125.  
  126. int DMapPalette[512]
  127. * Set or get the Level Palette for each DMap
  128.  
  129. void SetMessage(int message, int str[])
  130. * Places string 'str[]' into ZQ Message 'message'.
  131.  
  132. void SetMapName(int dmap, int str[])
  133. * Places string 'str[]' into DMap Name for DMap with ID 'dmap'
  134.  
  135. void SetMapTitle(int dmap, int str[])
  136. * Places string 'str[]' into DMap Title for DMap with ID 'dmap'
  137.  
  138. void SetMapIntro(int dmap, int str[])
  139. * Places string 'str[]' into DMap Intro for DMap with ID 'dmap'
  140.  
  141. bool CappedFPS
  142. * Check if the game is uncapped.
  143.  
  144. int Version;
  145. * Returns the version of ZC being used.
  146.  
  147. int Build;
  148. * Returns the Build ID of the version of ZC being used.
  149.  
  150. int Beta;
  151. * Returns the Beta ID of the version of ZC being used. If the build is not a beta, this returns 0.
  152.  
  153. bool DisableActiveSubscreen;
  154. * If set true, the active subscreen will not fall into view ehen the player presses Start.
  155.  
  156. int GetPointer(bool *ptr[]);
  157. * Returns the pointer of a bool array as a float.
  158.  
  159.  
  160. /************************************************************************************************************/
  161.  
  162. ////////////////
  163. /// Screen ///
  164. ////////////////
  165.  
  166. lweapon CreateLWeaponDx(int type, int baseitem)
  167. * Create an lweapon with sprites, sounds, and other values set as if it was generated by a specific item.
  168.  
  169. /************************************************************************************************************/
  170.  
  171. /////////////
  172. /// FFC ///
  173. /////////////
  174.  
  175. int ID;
  176. * The screen ref of the ffc. Used primarily for this->ID.
  177.  
  178. int GetPointer(ffc *ptr[]);
  179. * Returns the pointer of a ffc array as a float.
  180.  
  181. ffc SetPointer(int value);
  182. * Converts an int pointer to the ffc type, for assigning.
  183.  
  184. /************************************************************************************************************/
  185.  
  186. //////////////
  187. /// Item ///
  188. //////////////
  189.  
  190. float UID;
  191. * Returns the UID of an item.
  192.  
  193. int GetPointer(item *ptr[]);
  194. * Returns the pointer of a item array as a float.
  195.  
  196. item SetPointer(int value);
  197. * Converts an int pointer to the item type, for assigning.
  198.  
  199. int AClock
  200. * The clock used for the item's animation cycle.
  201.  
  202. /************************************************************************************************************/
  203.  
  204. /////////////////
  205. /// *weapon ///
  206. /////////////////
  207.  
  208. float UID;
  209. * Returns the UID of an *weapon.
  210.  
  211. int GetPointer(lweapon *ptr[]);
  212. * Returns the pointer of a *weapon array as a float.
  213.  
  214. lweapon SetPointer(int value);
  215. * Converts an int pointer to the lweapon type, for assigning.
  216.  
  217. float Misc[32];
  218. * Epanded from a size of [16] to [32]. An array of 32 miscellaneous variables for you to use as you please.
  219.  
  220.  
  221. ///////////////////////////
  222. /// LWeapon Specific ///
  223. ///////////////////////////
  224.  
  225. int Range;
  226. * The range of boomerang and hookshot lweapons in pixels; and arrow lweapons inb frames.
  227.  
  228. int AClock
  229. * The clock used for the item's animation cycle.
  230.  
  231. /************************************************************************************************************/
  232.  
  233. /////////////
  234. /// NPC ///
  235. /////////////
  236.  
  237. float UID;
  238. * Returns the UID of an npc.
  239.  
  240. int GetPointer(npc *ptr[]);
  241. * Returns the pointer of a item array as a float.
  242.  
  243. npc SetPointer(int value);
  244. * Converts an int pointer to the npc type, for assigning.
  245.  
  246. int ScriptDefense[10];
  247. * The npc's Script Weapon Defense values. This corresponds to the 'Defenses 3' tab in the Enemy Editor.
  248.  
  249. int InvFrames;
  250. * Returns the number of remaining invincibility frames if the enemy is invincible, otherwise 0.
  251.  
  252. int Invincible;
  253. * Returns if the enemy is invincible, because of ( superman variable ).
  254.  
  255. bool HasItem;
  256. * Returns if the enemy is holding the screen item.
  257.  
  258. bool Ringleader;
  259. * Returns if the enemy is a 'ringleader'.
  260.  
  261. float Misc[32];
  262. * Epanded fron a size of [16] to [32]. An array of 32 miscellaneous variables for you to use as you please.
  263.  
  264. /************************************************************************************************************/
  265.  
  266. //////////////
  267. /// Link ///
  268. //////////////
  269.  
  270. bool DisableItem[256];
  271. * An array of 256 values that represents whether items are disabeld on the current DMap.
  272.  
  273. int Animation;
  274. * Link;s Animation style, as set in Quest->Graphics->Sprites->Link
  275.  
  276. int WalkASpeed;
  277. * Link's Walking Animation speed as set in Quest->Graphics->Sprites->Link
  278.  
  279. int SwimASpeed;
  280. * Link's Swiming Animation speed as set in Quest->Graphics->Sprites->Link
  281.  
  282. int InvFrames;
  283. * This returns how long Link will remain invincible, 0 if not invincible. Can be set.
  284.  
  285. bool InvFlicker;
  286. * If set false, Link will neither flash, nor flicker when invincible.
  287.  
  288. int HurtSound;
  289. * The sound that plays when Link is injured. By default this is '16', but you may change it at any time.
  290.  
  291. int HitHeight;
  292. * link's Hitbox height in pixels starting from his 0x,0y (upper-left) corner, going down.
  293.  
  294. int HitWidth;
  295. * Link's Hitbox width in pixels starting from his x0,y0 (upper-left) corner, going right.
  296.  
  297. int HitXOffset;
  298. * The X offset of Link's hitbox, or collision rectangle.
  299.  
  300. int HitYOffset;
  301. * The Y offset of Link's hitbox, or collision rectangle.
  302.  
  303. int Eaten;
  304. * It returns 0 if Link is not eaten, otherwise it returns the duration of him being eaten.
  305.  
  306. int Equipment;
  307. * Link->Equipment is now read-write, and needs testing.
  308.  
  309. int ItemA;
  310. * Contains the item IDs of what is currently equiped to Link's A button.
  311.  
  312. int ItemB;
  313. * Contains the item IDs of what is currently equiped to Link's B button.
  314.  
  315. int SetItemSlot(int itm_id, int button, int force);
  316. * This allows you to set Link's button items without binary operation with options for forcing them.
  317.  
  318. int Extend;
  319. * Sets the extend value for all of Link's various actions.
  320.  
  321. int GetLinkExtend(int sprite, int dir);
  322. * Gets the extend value for one of Link's various actions based on a direction.
  323.  
  324. void SetLinkExtend(int sprite, int dir, int extend);
  325. * Sets the extend value for one of Link's various actions.
  326.  
  327. void SetLinkTile(int sprite, int dir, int tile)
  328. * Sets the tile for Link's various actions. This is intended to work as OTile for Link. Unverified.
  329.  
  330. int GetLinkTile(int sprite, int dir)
  331. * Returns the OTile for one of Link's various actions. Unverified.
  332.  
  333. int WarpEffect;
  334. * Sets a warp effect type prior to doing Screen->Warp
  335.  
  336. int WarpSound;
  337. * Setting this to a value other than '0' will play that sound when Link warps.
  338.  
  339. bool SideWarpSounds;
  340. * If you enable this setting, the warp sound will play in side warps.
  341.  
  342. bool PitWarpSounds;
  343. * If you enable this setting, the warp sound will play in a pit warp, one time.
  344.  
  345. int UseWarpReturn;
  346. * Setting this to a value between 0 and 3 will change the target return square for Link->Warp
  347.  
  348. int UsingItem;
  349. * Returns the ID of an item used when Link uses an item. Returns -1 if Link is not using an item this frame.
  350.  
  351. int UsingItemA;
  352. * Returns the ID of an item used when Link uses an item on button A. Returns -1 if Link is not using an item this frame.
  353.  
  354. int UsingItemB;
  355. * Returns the ID of an item used when Link uses an item on button B. Returns -1 if Link is not using an item this frame.
  356.  
  357. bool Diagonal;
  358. * This corresponds to whether 'Diagonal Movement' is enabled, or not.
  359.  
  360. bool BigHitbox;
  361. * This corresponds to whether 'Big Hitbox' is enabled, or not.
  362.  
  363. float Misc[32];
  364. * Expanded from [16] to [32]. An array of 32 miscellaneous variables for you to use as you please.
  365.  
  366. TO DEPRECATE:
  367. int WalkTile, SwimTile, DiveTile, SlashTile, JumpTile, ChargeTile, StabTile, CastingTile, PoundTile, FloatTile
  368. Hold1LandTile, Hold2LandTile, Hold1WaterTile, Hold2WaterTile;
  369. * A series of fourteen individual setter/getter ints to set or return the tile for all of Link's various actions.
  370.  
  371. /************************************************************************************************************/
  372.  
  373. //////////////////
  374. /// itemdata ///
  375. //////////////////
  376.  
  377. int GetPointer(itemdata *ptr[]);
  378. * Returns the pointer of a itemdata array as a float.
  379.  
  380. itemdata SetPointer(int value);
  381. * Converts an int pointer to the itemdata type, for assigning.
  382.  
  383. int ID;
  384. * Returns the item number of the item in question.
  385.  
  386. int Modifier;
  387. * The Link Tile Modifier
  388.  
  389. int Tile;
  390. * The tile used by the item.
  391.  
  392. int CSet;
  393. * The CSet of the tile used by the item.
  394.  
  395. int Flash;
  396. * The Flash value for the CSet
  397.  
  398. int AFrames;
  399. * The number of animation frames in the item's tile animation.
  400.  
  401. int ASpeed;
  402. * The speed of the item's animation.
  403.  
  404. int Delay;
  405. * The Delay value, before the animation begins.
  406.  
  407. int Script;
  408. * The Action Script for the item.
  409.  
  410. int PScript;
  411. * The Pickup Script for the item.
  412.  
  413. int MagicCost;
  414. * The item's maic (or rupees, if this is set) cost.
  415.  
  416. int MinHearts;
  417. * The minimum number of hearts required to pick up the item.
  418.  
  419. int Attributes[10]
  420. * An array of ten integers that correspond to the ten <Misc> text entries on the item editor Data tab.
  421.  
  422. int Sprites[10]
  423. * An array of ten integers that correspond to the ten sprite pulldowns on the item editor Action tab.
  424.  
  425. bool Flags[5]
  426. * An array of five boolean flags that correspond to the five flag tickboxes on the item editor Data tab.
  427.  
  428. int Misc1, Misc2, Misc3, Misc4, Misc5, Misc6, Misc7, Misc8, Misc9, Misc10;
  429. * These correspond to the pull-down options in the item editor 'Data' tab.
  430.  
  431. int Attribute1, Attribute2, Attribute3, Attribute4, Attribute5, Attribute6,
  432. Attribute7, Attribute8, Attribute9, Attribute10;
  433. * These correspond to the pull-down options in the item editor 'Action' tab.
  434.  
  435. bool Combine;
  436. * Corresponds to 'Upgrade when collected twice'.
  437.  
  438. bool Downgrade;
  439. * Corresponds to the 'Remove When Used' option on the Action tab of the item editor.
  440.  
  441. bool KeepOld;
  442. * Corresponds to 'Keep lower level items on the Pickup tab of the item editor.
  443.  
  444. bool RupeeCost;
  445. * Corresponds to the 'Use Rupees Instead of Magic' option on the item editor 'Action' tab.
  446.  
  447. bool Edible;
  448. * Corresponds to the 'Can be Eaten by Enemies' box on the Pickup tab of the item editor.
  449.  
  450. bool GainLower;
  451. * Corresponds to the 'Gain All Lower Level Items' box on the Pickup tab of the item editor.
  452.  
  453. bool Flag1;
  454. * This corresponds to the box directly below 'Equiment Item'. For swords, this is 'B.H. is Percent'.
  455.  
  456. bool Flag2;
  457. * This corresponds to the box directly below 'Flag 1, or two boxes down from 'Equiment Item'.
  458. * For swords, this is 'B.D. is Percent'.
  459.  
  460. bool Flag3;
  461. * This corresponds to the box directly right of 'Equiment Item'. For swords, this is 'B. Penetrates Enemies'.
  462.  
  463. bool Flag4;
  464. * This corresponds to the box directly right of 'Flag 2'. For swords, this is 'Can Slash'.
  465.  
  466. bool Flag5;
  467. * This corresponds to the box directly below 'Flag 4'. For swords, this is '<Unused>', and greyed out.
  468.  
  469. bool Unused;
  470. * ? - An extra script-only flag. It's a mystery to everyone.
  471.  
  472. /************************************************************************************************************/
  473.  
  474. ////////////////
  475. /// Screen ///
  476. ////////////////
  477.  
  478. void WavyIn();
  479. * Replicates the warping screen wave effect (inbound) from a tile warp.
  480.  
  481. void WavyOut();
  482. * Replicates the warping screen wave effect (outbound) from a tile warp.
  483.  
  484. void ZapIn();
  485. * Replicates the warping screen zap effect (inbound) from a tile warp.
  486.  
  487. void ZapOut();
  488. * Replicates the warping screen zap effect (outbound) from a tile warp.
  489.  
  490. void OpeningWipe();
  491. * Replicates the opening wipe screen effect (using the quest rule for its type) from a tile warp.
  492.  
  493.  
  494. void DrawBitmapEx ( int layer,
  495. int bitmap_id,
  496. int source_x, int source_y, int source_w, int source_h,
  497. int dest_x, int dest_y, int dest_w, int dest_h,
  498. float rotation, int cx, int cy, int mode, int lit, bool mask);
  499.  
  500. * As DrawBitmap(), except that it can do more things.
  501.  
  502. /************************************************************************************************************/
  503. Game->DEBUGGING: These might find their way into namespace Debug-> instead of Game-> in the future.
  504. /************************************************************************************************************/
  505.  
  506. int RefFFC; ZASM Instruction:
  507. REFFFC
  508. /**
  509. * Returns the present ffc refrence from the stack. FOR DEBUGGING ONLY!
  510. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  511. */ Example Use:
  512.  
  513. /************************************************************************************************************/
  514.  
  515. int RefItem; ZASM Instruction:
  516. REFITEM
  517. /**
  518. * Returns the present item refrence from the stack. FOR DEBUGGING ONLY!
  519. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  520. */ Example Use:
  521.  
  522. /************************************************************************************************************/
  523.  
  524. int RefItemdata; ZASM Instruction:
  525. REFIDATA
  526. /**
  527. * Returns the present itemdata refrence from the stack. FOR DEBUGGING ONLY!
  528. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  529. */ Example Use:
  530.  
  531. /************************************************************************************************************/
  532.  
  533. int RefLWeapon; ZASM Instruction:
  534. REFLWPN
  535. /**
  536. * Returns the present lweapon refrence from the stack. FOR DEBUGGING ONLY!
  537. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  538. */ Example Use:
  539.  
  540. /************************************************************************************************************/
  541.  
  542. int RefEWeapon; ZASM Instruction:
  543. REFEWPN
  544. /**
  545. * Returns the present eweapon refrence from the stack. FOR DEBUGGING ONLY!
  546. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  547. */ Example Use:
  548.  
  549. /************************************************************************************************************/
  550.  
  551. int RefNPC; ZASM Instruction:
  552. REFNPC
  553. /**
  554. * Returns the present npc refrence from the stack. FOR DEBUGGING ONLY!
  555. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  556. */ Example Use:
  557.  
  558. /************************************************************************************************************/
  559.  
  560. int SP; ZASM Instruction:
  561. SP
  562. /**
  563. * Returns the value of the stack pointer. FOR DEBUGGING ONLY!
  564. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  565. */ Example Use:
  566.  
  567.  
  568. ////////////////////////
  569. /// Not Implemented ///
  570. ////////////////////////
  571.  
  572. BitmapQuad
  573. //sdci[1]=layer
  574. //sdci[2]=x1
  575. //sdci[3]=y1
  576. //sdci[4]=x2
  577. //sdci[5]=y2
  578. //sdci[6]=x3
  579. //sdci[7]=y3
  580. //sdci[8]=x4
  581. //sdci[9]=y4
  582. //sdci[10]=sourcex
  583. //sdci[11]=sourcey
  584. //sdci[12]=sourcew
  585. //sdci[13]=sourceh
  586. //sdci[14]=width
  587. //sdci[15]=height
  588. //sdci[16]=tile/combo
  589. //sdci[17]=polytype
  590.  
  591. void ComboArray ( int layer, int number_of_combos,
  592. int combos[],
  593. int x_positions[],
  594. int y_positions[],
  595. int csets[]);
  596.  
  597. ZASM: COMBOARRAY
  598.  
  599. /**
  600. *
  601. * Draws a number of combos specified by 'number_of_combos' to 'layer'.
  602. * Specify the combos by populating an array with their IDs and passing the array ointer to 'combos'.
  603. * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
  604. * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
  605. * Specify the CSet for each by passing an array with their csets to 'csets'.
  606. *
  607. * This function counts as a single draw.
  608. *
  609. * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
  610. *// Example:
  611.  
  612. int combos[4] = {16,19,31,20};
  613. int cmbx[4]= {0, 16, 32, 48}:
  614. int cmby[4]={8, 8, 8, 8);
  615. int cmbc[4]={0,0,0,0};
  616. Screen->ComboArray(6, 4, combos, cmbx, cmby, cmbc);
  617.  
  618.  
  619. /************************************************************************************************************/
  620.  
  621. //! This new mode does not work as intended, and will likely be deprecated by Screen->SetRenderSource
  622. void Quad ( int layer,
  623. int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4,
  624. int w, int h, int cset, int flip, int texture, int render_mode);
  625.  
  626. ZASM Instruction:
  627. QUADR
  628.  
  629. /**
  630. * Draws a quad on the specified layer with the corners x1,y1 through x4,y4.
  631. * Corners are drawn in a counterclockwise order starting from x1,y1. ( So
  632. * if you draw a "square" for example starting from the bottom-right corner
  633. * instead of the usual top-left, the the image will be textured onto the
  634. * quad so it appears upside-down. -yes, these are rotatable. )
  635. *
  636. * From there a single or block of tiles, combos **or a bitmap** is then texture mapped
  637. * onto the quad using the arguments w, h, cset, flip, and render_mode.
  638. * A positive vale in texture will draw the image from the tilesheet pages,
  639. * whereas a negative value will be drawn from the combo page. 0 will draw combo number 0.
  640. * Both w and h are undefined unless 1 <= blockh, blockw <= 16, and it is a power of
  641. * two. ie: 1, 2 are acceptable, but 2, 15 are not.
  642. *
  643. * To specify a bitmap as a texture, sum 65520 with the bitmap ID, or use the constant TEX_BITMAP + Bitmap
  644. * Example: Screen->Quad(6, 0, 0, 40, 25, 18, 50, 60, 110, 0, 0, 0, 0, TEX_BITMAP+RT_BITMAP0, PT_TEXTURE);
  645. *
  646. *
  647. * Flip specifies how the tiles/combos should be flipped when drawn:
  648. * 0: No flip
  649. * 1: Horizontal flip
  650. * 2: Vertical flip
  651. * 3: Both (180 degree rotation)
  652. * (!) See std.zh for a list of all available render_mode arguments.
  653. */ Example Use: !#!
  654.  
  655. void TileArray ( int layer, int number_of_tiles,
  656. int tiles[],
  657. int x_positions[],
  658. int y_positions[],
  659. int csets[]);
  660.  
  661. ZASM: TILEARRAY
  662.  
  663. /**
  664. *
  665. * Draws a number of tiles specified by 'number_of_tiles' to 'layer'.
  666. * Specify the tiles by populating an array with their IDs and passing the array ointer to 'tiles'.
  667. * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
  668. * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
  669. * Specify the CSet for each by passing an array with their csets to 'csets'.
  670. *
  671. * This function counts as a single draw.
  672. *
  673. * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
  674. *// Example:
  675.  
  676. int tiles[4] = {16,19,31,20};
  677. int tilx[4]= {0, 16, 32, 48}:
  678. int tily[4]={8, 8, 8, 8);
  679. int tilc[4]={0,0,0,0};
  680. Screen->TileArray(6, 4, tiles, tilx, tily, tilc);
  681.  
  682.  
  683. /************************************************************************************************************/
  684.  
  685. void PixelArray ( int layer, int number_of_pixels,
  686. int x_positions[],
  687. int y_positions[],
  688. int colours[]);
  689.  
  690. ZASM: PIXELARRAY
  691.  
  692. /**
  693. *
  694. * Draws a number of pixel, similar to PutPixel, specified by 'number_of_pixels' to 'layer'.
  695. * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
  696. * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
  697. * Specify the colour for each by passing an array with their csets to 'colours'.
  698. *
  699. * This function counts as a single draw.
  700. *
  701. * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
  702. *// Example:
  703.  
  704. int pix[4] = {16,19,31,20};
  705. int px[4]= {0, 16, 32, 48}:
  706. int py[4]={8, 8, 8, 8);
  707. int pc[4]={0x12,0xB0,0xDA,0x4F};
  708. Screen->TileArray(6, 4, pix, px, py, pc);
  709.  
  710. /************************************************************************************************************/
  711.  
  712. CreateBitmap(int id, int xsize, int ysize)
  713.  
  714. * Min size 1, max 2048
  715. /************************************************************************************************************/
  716.  
  717. SetRenderSource(int target, int x, int y, int w, int h)
  718.  
  719. /************************************************************************************************************/
  720.  
  721. void Polygon ( int layer, ... );
  722.  
  723. ZASM: POLYGON
  724.  
  725. * Adding to Beta 9 : Postponed -Z
  726.  
  727. /************************************************************************************************************/
  728.  
  729. // Game->
  730.  
  731. //! These do not yet work:
  732.  
  733. //Returns Screen->Door[index] for a given DMap and Screen
  734. int GetDMapScreenDoor( int dmap, int screen, int index )
  735.  
  736.  
  737. //Sets Screen->Door[index] for a given DMap and Screen to 'value'
  738. void SetDMapScreenDoor( int dmap, int screen, int index, int value)
  739.  
  740.  
  741. //Returns Screen->State[index] for a given DMap and Screen
  742. bool GetDMapScreenState( int dmap, int screen, int index )
  743.  
  744.  
  745. //Sets Screen->State[index] for a given DMap and Screen to 'value'
  746. void SetDMapScreenState( int dmap, int screen, int index, bool value)
  747.  
  748. /************************************************************************************************************/
  749.  
  750. int GetDrawCount()
  751. int DrawCount; //The present number of script draws this frame.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement