ZoriaRPG

New ZScript as of Alpha 31

Jun 21st, 2018
251
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // 2.54 Alpha 31
  2. ///Re v.11082018
  3.  
  4. /////////////////
  5. /// ZScript ///
  6. /////////////////
  7.  
  8. // Comment Blocks //
  9.  
  10. The ZScript language now supports C-Style comment blocks using the traditional syntax of:
  11.  
  12. /*
  13. COMMENT BLOCK
  14.  
  15. */
  16.  
  17. // Array Declaration Improvements //
  18.  
  19. Arrays now support being declared with any constant expression.:
  20.  
  21. int arr[10*4];
  22.  
  23. This is now the same as int arr[40];
  24.  
  25. Nesting array calls should now work properly. (e.g. arrA[ arrB[ arrC[ arrd[4] ] ] ] )
  26.  
  27. Further, you may now use constants in array declarations:
  28.  
  29. const int sARR_MAX = 20;
  30. int arr[sARR_MAX];
  31.  
  32. // String Literals //
  33.  
  34. You may now use C-style string literals at any non-global scope.
  35. Example:
  36. TraceS("Trace this string.";
  37.  
  38. // Global Pointers //
  39. You may now declare any datatype, including arrays for any datatype at a global scope.
  40. Data saved to these may become invalid and require manual clensing by the user!
  41. Only the value of a pointer is saved, not the struct data associated with that pointer.
  42.  
  43. // Switch-Case //
  44.  
  45. ZScript now supports C-style switch statements. Case values must be numeric literals,
  46. or constant expressions. Switch-case cases must end in a break instruction, and a you
  47. may provide a default case.
  48.  
  49. Example:
  50.  
  51. const int SOME_CONST = 11;
  52.  
  53. switch(var)
  54. {
  55. case 1:
  56. {
  57. DoSomething();
  58. break
  59. }
  60. case SOME_CONST:
  61. {
  62. DoSomethingElse();
  63. break:
  64. }
  65. case SOME_CONST+(10*2)
  66. {
  67. DoOther();
  68. break;
  69. }
  70. default:
  71. {
  72. DoDefault();
  73. break;
  74. }
  75. }
  76.  
  77.  
  78. // 2.55
  79.  
  80. 2.55 adds some further new parser upgrades:
  81.  
  82. //Typedef
  83. You can now define your own types using typedef using normal C syntax:
  84.  
  85. typedef old_type new_type;
  86.  
  87. Example:
  88. typedef object ffc; //Allows you to declare object vars that are typed to ffc.
  89.  
  90. typedef const int DEFINE;
  91. Allows you to use the token DEFINE to declare constant ints.
  92.  
  93. //Expanded array literals:
  94. Array Literals of the following form may be used in lots of places,
  95. not just array variable declarations.
  96.  
  97. {0, 1, 2}
  98. (int[]){0, 1, 2}
  99. (int[3]){}
  100. (int[3]){4}
  101.  
  102. Example:
  103. RunFFCScript(script_no, (int[8]){arg1, arg2, arg3});
  104.  
  105. //Mechanical and AST changes:
  106.  
  107. Assignment is now an expression instead of a statement. You can theoretically assign
  108. inside of a statement now.
  109.  
  110. Constants are now treated as normal (unassignable) variables up through type checking.
  111. If at that point the constant's value is known, it is stripped out of the AST and its
  112. value is saved to the symbol table, similar to how it worked before.
  113.  
  114. If the constant's value is not known at compile time, it is instead treated as a normal,
  115. unassignable variable by the parser. (It still uses no stack space.)
  116.  
  117. Constants can now be declared in any scope, not just global scope, and the constant is only
  118. valid within its scope, so you may now have constants on a per-script, or per-scope basis.
  119.  
  120. //Compiler Directives
  121. There's a new compile_error directive that ignores the next compiler error/warning of the
  122. specified number, that you can use to suppress warnings or halts.
  123.  
  124. Syntax:
  125. compile_error (error_number) {error_generating_code}
  126.  
  127. // New Datatypes //
  128.  
  129. untyped : A special datatype that can be cast to and from any other type.
  130. This cannot be invoked by the user in a declaration, and exists solely for
  131. use by internal functions, and by internal variables.
  132.  
  133. npcdata:
  134.  
  135. combodata:
  136.  
  137. spritedata:
  138.  
  139. mapdata:
  140.  
  141. dmapdata :
  142.  
  143. messagedata :
  144.  
  145. shopdata :
  146.  
  147.  
  148. dropdata : t/b/a
  149. bitmap : t/b/a
  150. warpring : t/b/a
  151. doorset : t/b/a
  152. misccolors : t/b/a
  153. rgbdata : t/b/a
  154. palette : t/b/a
  155. zcmidi : t/b/a
  156. palcycle : t/b/a
  157. gamedata : t/b/a
  158. cheats : t/b/a
  159.  
  160. // New Pointers //
  161.  
  162. Graphics->
  163.  
  164. Audio->
  165.  
  166. Input->
  167.  
  168. Text->
  169.  
  170. //////////////
  171. // Global //
  172. //////////////
  173.  
  174. void OverlayTile(int firsttile, int secondtile);
  175. Overlay one tile onto another.
  176.  
  177. int SizeOfArray(bool array[]);
  178. * SizeOfArray() now returns the size of all datatypes.
  179.  
  180. void Trace(untyped)
  181. * The Trace() instruction now supports all datatypes.
  182.  
  183. untyped NULL()
  184. * You may assign this function to any datatype to clear it to NULL.
  185. * Example:
  186. lweapon l = Screen->LoadLWeapon(16);
  187. l->Dir = DIR_UP;
  188. l = NULL(); // Clear the pointer to NULL.
  189.  
  190. untyped Untype(any)
  191. * Converts the value of any datatype to another, similar to typecasting.
  192. * Example:
  193. int x;
  194. npc n = Screen->LoadNPC(10);
  195. x = Untype(n);
  196.  
  197. /************************************************************************************************************/
  198.  
  199. ////////////
  200. // Game //
  201. ////////////
  202.  
  203. int LItems[512];
  204. * The size of this array has been corrected to 512, from the prior size of 256.
  205.  
  206. LKeys[512];
  207. * The size of this array has been corrected to 512, from the prior size of 256.
  208.  
  209. combodata LoadComboData(int id);
  210. * Loads a Combo Editor table data ref for combo 'id', to a 'combdata' typed pointer.
  211.  
  212. npcdata LoadNPCData(intid);
  213. * Loads an Enemy Editor table data ref for NPC 'id', to a 'npdcata' typed pointer.
  214.  
  215. mapdata LoadMapData(int map, int screen);
  216. * Loads a screen data ref for screen ID 'screen', of Map ID 'map', to a 'mapdata' typed pointer.
  217.  
  218. spritedata LoadSpriteData(int id);
  219. * Loads an Weapon Sprite Editor table data ref for sprite 'id', to a 'spritedata' typed pointer.
  220.  
  221. messagedata LoadMessageData(int id);
  222. * Loads an String Table Editor table data ref for ZQ Message String 'id', to a 'messagedata' typed pointer.
  223.  
  224. bitmap LoadBitmapID(int id);
  225. * Loads one of the six internal bitmaps as a ref to a 'bitmap' typed pointer.
  226.  
  227. shopdata LoadShopData(int shop);
  228. * Loads a Shop Editor table ref for an item shop with an ID of 'id' to a 'shopdata' typed pointer.
  229.  
  230. shopdata LoadInfoShopData(int shop);
  231. * Loads a Shop Editor table ref for an info shop with an ID of 'id' to a 'shopdata' typed pointer.
  232. * !! I may make 'infoshopdata' its own type, to prevent conflicts and reduce future shops expansion overhead. -Z
  233.  
  234. bool TypingMode;
  235. * If set true, all keyboard presses that would ordinarily perform an in-engine action are suppressed.
  236. * Example: The 'z' key is bound to the 'A Button'; the user presses the3 'z' key.
  237. * if TypingMode == true, then that keystroke will not cause the engine to rehister a Button A Press.
  238. *
  239. * Enable this if you wish to create a text prompt using Input->Key[] or Input->ReadKey[].
  240.  
  241. untyped Misc[32];
  242. * An array of 32 misc values that is always available.
  243. * Data does not persist between sessions.
  244. * The Misc[] array now supports all datatypes, and has been expanded to a size of [32].
  245. * !! Verify that Game->Misc[] is now untyped, to match all other Misc[] arrays. -Z
  246.  
  247.  
  248.  
  249. int HighestStringID;
  250. * Returns the highest valid ID of the strings in the ZQuest String Editor.
  251.  
  252. int NumMessages;
  253. * Returns the number of valid strings in the ZQuest String Editor.
  254.  
  255. int GameOverScreen[12];
  256. * INCOMPLETE
  257. * An array of 12 values that affect the visual, and auditory components of the internal
  258. * 'Game Over' screen, including fonts, colours, sound effects, and cursor tiles.
  259.  
  260. int GameOverStrings[3]; //
  261. * INCOMPLETE
  262. * An array of 3 values that contain the IDs of custom strings for the 'Game Over' screen.
  263.  
  264. int MapCount()
  265. * Returns the number of maps used by a quest.
  266.  
  267.  
  268. void PauseSound(int soundid)
  269. * Pauses one of the quest's playing sound effects. Use the SFX_ constants in
  270.  
  271. void ResumeSound(int soundid)
  272. * Resumes one of the quest's paused sound effects. Use the SFX_ constants in
  273.  
  274. void EndSound(int soundid)
  275. * Kills one of the quest's playing sound effects. Use the SFX_ constants in
  276.  
  277. void GreyscaleOn()
  278. * Renders the entire display in greyscale.
  279.  
  280. void GreyscaleOff()
  281. * Returns the display rendering to colour.
  282.  
  283. int DMapPalette[512]
  284. * Set or get the Level Palette for each DMap
  285.  
  286. void SetMessage(int message, int str[])
  287. * Places string 'str[]' into ZQ Message 'message'.
  288.  
  289. void SetMapName(int dmap, int str[])
  290. * Places string 'str[]' into DMap Name for DMap with ID 'dmap'
  291.  
  292. void SetMapTitle(int dmap, int str[])
  293. * Places string 'str[]' into DMap Title for DMap with ID 'dmap'
  294.  
  295. void SetMapIntro(int dmap, int str[])
  296. * Places string 'str[]' into DMap Intro for DMap with ID 'dmap'
  297.  
  298. //bool CappedFPS
  299. //* Check if the game is uncapped.
  300.  
  301. int Version;
  302. * Returns the version of ZC being used.
  303.  
  304. int Build;
  305. * Returns the Build ID of the version of ZC being used.
  306.  
  307. int Beta;
  308. * Returns the Beta ID of the version of ZC being used. If the build is not a beta, this returns 0.
  309.  
  310. bool DisableActiveSubscreen;
  311. * If set true, the active subscreen will not fall into view ehen the player presses Start.
  312.  
  313. int GetPointer(bool *ptr[]);
  314. * Returns the pointer of a bool array as a float.
  315.  
  316. /* The following have been deprecated by other pointer types.
  317.  
  318. int GetScreenEnemy(int map, int screen, int enemy_index)
  319. * Reads values from enemy lists anywhere in the game.
  320.  
  321. int SetScreenEnemy(int map, int screen, int enemy_index, int enemy_id)
  322. * Sets values to enemy lists anywhere in the game.
  323.  
  324. int GetScreenDoor(int map, int screen, int index)
  325. * Reads value of a door on any screen in the game environment.
  326.  
  327. int SetScreenDoor(int map, int screen, int index, int type)
  328. * Sets the value of a door on any screen in the game environment.
  329.  
  330. void ContinueSound(int sfx);
  331.  
  332. void AdjustSound(int sfx, int pan, bool loop);
  333. * Adjusts properties of a sound effect.
  334.  
  335. void PauseMusic()
  336. * Pauses the present, playing MIDI or Enhanced Music file.
  337.  
  338. void ResumeMusic()
  339. * Resumes the present, playing MIDI or Enhanced Music file.
  340.  
  341. */
  342.  
  343. /************************************************************************************************************/
  344.  
  345. ////////////////
  346. /// Screen ///
  347. ////////////////
  348.  
  349. lweapon CreateLWeaponDx(int type, int baseitem)
  350. * Create an lweapon with sprites, sounds, and other values set as if it was generated by a specific item.
  351.  
  352. TriggerSecret(int secret);
  353. * Triggers a specific secret type on the screen.
  354.  
  355. void WavyIn();
  356. * Replicates the warping screen wave effect (inbound) from a tile warp.
  357.  
  358. void WavyOut();
  359. * Replicates the warping screen wave effect (outbound) from a tile warp.
  360.  
  361. void ZapIn();
  362. * Replicates the warping screen zap effect (inbound) from a tile warp.
  363.  
  364. void ZapOut();
  365. * Replicates the warping screen zap effect (outbound) from a tile warp.
  366.  
  367. void OpeningWipe();
  368. * Replicates the opening wipe screen effect (using the quest rule for its type) from a tile warp.
  369.  
  370.  
  371. void DrawBitmapEx ( int layer,
  372. int bitmap_id,
  373. int source_x, int source_y, int source_w, int source_h,
  374. int dest_x, int dest_y, int dest_w, int dest_h,
  375. float rotation, int cx, int cy, int mode, int lit, bool mask);
  376.  
  377. * As DrawBitmap(), except that it can do more things.
  378.  
  379.  
  380.  
  381. int Valid;
  382. * ?
  383.  
  384. int Guy;
  385. * The screen guy.
  386.  
  387. int String;
  388. * The screen string.
  389.  
  390. int RoomType;
  391. * The screen room type.
  392.  
  393. int Item;
  394. * The screen item.
  395.  
  396. int HasItem;
  397. * ?
  398.  
  399. int TileWarpType[4];
  400. * The Tile Warp type for Tile Warps A, B, C, and D; [0], [1], [2], and [3] respectively.
  401. * See std_constants.zh TWTYPE_* constants for valid types.
  402.  
  403. int TileWarpOverlayFlags;
  404. * Combos carry over?
  405.  
  406. int DoorComboSet;
  407. * The doorset used by the screen, for NES dungeon doors.
  408.  
  409. int WarpReturnX[4];
  410. * The X-component for each of the four 2.50+ (blue) warp return squares.
  411.  
  412. int WarpReturnY[4];
  413. * The Y-component for each of the four 2.50+ (blue) warp return squares.
  414.  
  415. int WarpReturnC;
  416. * ?
  417.  
  418. int StairsX;
  419. * The X component for where a Stairs secret appears on the screen.
  420.  
  421. int StairsY;
  422. * The Y component for where a Stairs secret appears on the screen.
  423.  
  424. int ItemX;
  425. * The X component for the item location on the screen.
  426.  
  427. int ItemY;
  428. * The Y component for the item location on the screen.
  429.  
  430. int CSet;
  431. * ? The screen palette. ?
  432.  
  433. int TileWarpDMap[4];
  434. * The destination DMap for each of the four warp types.
  435.  
  436. int TileWarpScreen[4];
  437. * The destination screen for each of the four warp types.
  438.  
  439. int Enemy[10];
  440. * The IDs of the enemies that spawn on the screen.
  441.  
  442. int EnemyFlags;
  443. * A flagset for enemies on the screen (E.Flags).
  444. * Valid values (ORd) together, are:
  445. *
  446. *
  447.  
  448. int Pattern;
  449. * Ths enemy 'Spawn Pattern'.
  450.  
  451. int SideWarpType[4];
  452. * The Sidewarp type for Sidewarps A, B, C, and D; [0], [1], [2], and [3] respectively.
  453. * See std_constants.zh SWTYPE_* constants for valid types.
  454.  
  455. int SideWarpOverlayFlags;
  456. * Carryover?
  457.  
  458. int SideWarpScreen[4];
  459. * The destination screen for each of the four sidewarps.
  460.  
  461. int SideWarpDMap[4];
  462. * The destination DMap for each of the four sidewarps.
  463.  
  464. int SideWarpIndex;
  465. * The warp return?? If so, should this be an array, or are these ORd values?
  466.  
  467. int WarpArrivalX;
  468. * The X-component for the pre-2.50 (green) arrival square.
  469.  
  470. int WarpArrivalY;
  471. * The X-component for the pre-2.50 (green) arrival square.
  472.  
  473. int MazePath[4];
  474. * The four Maze Path directions.
  475.  
  476. int ExitDir;
  477. * The Maze Path 'Exit Direction'.
  478.  
  479. int UnderCombo;
  480. * The undercombo ID used by the screen.
  481.  
  482. int UnderCSet;
  483. * The CSet of the undercombo used by the screen.
  484.  
  485. int Catchall;
  486. * The screen 'Catchall' value.
  487.  
  488. int CSensitive;
  489. * The value of Damage Combo Sensitivity for the screen.
  490.  
  491. int NoReset;
  492. * The No Reset Flagset. Values are ORd together s follows:
  493. * Secrets 0x
  494. * Items 0x
  495. * Special Item 0x
  496. * Lock Block 0x
  497. * Boss Lock Block 0x
  498. * Chest 0x
  499. * Secrets 0x
  500. * Locked Chest 0x
  501. * Boss Locked Chest 0x
  502. * Door Up [0] 0x
  503. * Door Down[1] 0x
  504. * Door Left [2] 0x
  505. * Door Right [3] 0x
  506.  
  507. int NoCarry;
  508. * The No Carru Over Flagset. Values are ORd together s follows:
  509. * Secrets 0x
  510. * Items 0x
  511. * Special Item 0x
  512. * Lock Block 0x
  513. * Boss Lock Block 0x
  514. * Chest 0x
  515. * Secrets 0x
  516. * Locked Chest 0x
  517. * Boss Locked Chest 0x
  518.  
  519. int LayerMap[6];
  520. * The Map IDs used by screen layers 1 through 6, represented as [0] through [5].
  521. * I should adjust this array to begin a t1. -Z
  522.  
  523. int LayerScreen[6];
  524. * The Screen IDs used by screen layers 1 through 6, represented as [0] through [5].
  525. * I should adjust this array to begin a t1. -Z
  526.  
  527. int LayerOpacity[6];
  528. * The opacity value for each layer used by this screen.
  529. * Valid layers are 1 through 6, represented as [0] through [5].
  530. * I should adjust this array to begin a t1. -Z
  531.  
  532. int TimedWarpTimer;
  533. * The timer used by 'Time Warp Tics' in Screen Data->T.Warp
  534.  
  535. int NextMap;
  536. * ?
  537. int NextScreen;
  538. *?
  539.  
  540.  
  541. int SecretCombo[128];
  542. * The Combo IDs used by 'Secret Combos' on this screen.
  543. * See SCR_SEC_* in std_constants.zh for more information.
  544.  
  545. int SecretCSet[128];
  546. * The CSets used by 'Secret Combos' on this screen.
  547. * See SCR_SEC_* in std_constants.zh for more information.
  548.  
  549. int SecretFlags[128];
  550. * The Combo Flags used by 'Secret Combos' on this screen.
  551. * See SCR_SEC_* in std_constants.zh for more information.
  552.  
  553. int ViewX;
  554. * Unused at this time. Represents the visible width of the screen.
  555.  
  556. int ViewY;
  557. * Unused at this time. Represents the visible height of the screen.
  558.  
  559. int Width;
  560. * Unused at this time. Represents the physical;e width of the screen.
  561.  
  562. int Height;
  563. * Unused at this time. Represents the physical height of the screen.
  564.  
  565. int EntryX;
  566. * The X-coordinate at which Link entered the screen (his last spawn point).
  567. * If Link is respawned by falling in water, he will appear at this X-component.
  568.  
  569. int EntryY;
  570. * The Y-coordinate at which Link entered the screen (his last spawn point).
  571. * If Link is respawned by falling in water, he will appear at this Y-component.
  572.  
  573. int ScriptEntry;
  574. * ?
  575. int ScriptOccupancy;
  576. * ?
  577. int ExitScript;
  578. * ?
  579.  
  580. int OceanSFX;
  581. * The 'Ambient Sound' under S.Data2.
  582. * Rename this to AmbientSFX, or just SFX.
  583.  
  584. int BossSFX;
  585. * The Boss Roar sound for this screen.
  586.  
  587. int SecretSFX;
  588. * The sound that will play on this screen, when secrets are triggered.
  589.  
  590. int ItemSFX;
  591. * The sound that will play if Link holds an item over his head on this screen.
  592.  
  593. int MIDI;
  594. * The MIDI that plays on this screen.
  595.  
  596. int LensLayer;
  597. * The layer to which Lens of Truth graphics are drawn.
  598.  
  599. int ScreenFlags[10];
  600. * A set of flagsets that contain special data for thiws screen.
  601. * These represent S.Flags1 and S.Flags2 flags.
  602. * See std_constants.zh (SFG* for the screen flag froup,
  603. * and SFX* for the screen flag value) for more information.
  604.  
  605. int NumFFCs;
  606. * ? The number of ffcs running scripts?
  607.  
  608. //int Script; t/b/a
  609.  
  610. /************************************************************************************************************/
  611.  
  612. /////////////
  613. /// FFC ///
  614. /////////////
  615.  
  616. int ID;
  617. * The screen ref of the ffc. Used primarily for this->ID.
  618.  
  619. //bool Running; //need to add this to match mapdata. int val
  620.  
  621.  
  622. /************************************************************************************************************/
  623.  
  624. //////////////
  625. /// Item ///
  626. //////////////
  627.  
  628. untyped Misc[32];
  629. * The Misc[] array now supports all datatypes, and has been expanded to a size of [32].
  630.  
  631. int Pickup;
  632. * The pick-up type for this item.
  633.  
  634. int PickupString;
  635. * If this is > 0, then when Link touches the item, ZC will display a ZQ String Editor message string
  636. * equal to its vaue.
  637. * The precise behaviour of this is affected by PickupFlags.
  638.  
  639. int PickupStringFlags;
  640. * A flagset that determines the behaviour of string display.
  641. * Values are ORd together, as follows:
  642. *
  643. *
  644. *
  645.  
  646. int SizeFlags;
  647. * A flagset that determines how internal engine sizing of items is applied.
  648. * Values are ORd together, as follows:
  649. *
  650. *
  651.  
  652.  
  653. float UID;
  654. * Each item created by ZC in in a given session is assigned a unique ID (UID).
  655. * Returns the UID of an item.
  656. * UIDs begin at 00000.0001 and overflow at 214748.3748.
  657. * Note: This allows for 2,147,483,748 unique items, per-session.
  658.  
  659. int AClock
  660. * The clock used for the item's animation cycle.
  661.  
  662. /************************************************************************************************************/
  663.  
  664. /////////////////
  665. /// *weapon ///
  666. /////////////////
  667.  
  668. int Parent;
  669. * The ID of the item, or npc (respectively for lweapon, and for eweapon) that created this weapon.
  670. * Weapons created by script have a default Parent of -1.
  671.  
  672. int Level;
  673. * The Level value associated with the weapon.
  674.  
  675. float UID;
  676. * Each weapon created by ZC in in a given session is assigned a unique ID (UID).
  677. * Returns the UID of a weapon.
  678. * UIDs begin at 00000.0001 and overflow at 214748.3748.
  679. * Note: This allows for 2,147,483,748 unique items, per-session.
  680.  
  681.  
  682. untyped Misc[32];
  683. * Epanded from a size of [16] to [32]. An array of 32 miscellaneous variables for you to use as you please.
  684. * The Misc[] array now supports all datatypes, and has been expanded to a size of [32].
  685.  
  686. ///////////////////////////
  687. /// LWeapon Specific ///
  688. ///////////////////////////
  689.  
  690. int Range;
  691. * NEEDS TO BE REIMPLEMENTED
  692. * The range of boomerang and hookshot lweapons in pixels; and arrow lweapons in frames.
  693.  
  694. int AClock
  695. * The clock used for the item's animation cycle.
  696.  
  697. /************************************************************************************************************/
  698.  
  699. /////////////
  700. /// NPC ///
  701. /////////////
  702.  
  703. untyped Attributes[32];
  704. * !! Did I remember to untype Attributes[]?
  705. * Epanded to size [32].
  706.  
  707. int WeaponSprite;
  708. * The sprite (Quest->Graphics->Sprites->Weapons) used to draw the weapon fired by the npc.
  709.  
  710. bool Shield[5];
  711. * The shield state of the enemy. Index values:
  712. *
  713. *
  714. *
  715. *
  716. *
  717.  
  718.  
  719. bool Core;
  720. * This returns true if the NPC is the core segment of a segmented engine enemy.
  721.  
  722. int HitBy[4];
  723. * Stores the ID/UIDs of objects that hurt the npc this frame.
  724.  
  725. int Defense[42];
  726. int Defense[MAX_DEFENSE];
  727. * Expanded to a size of 42 to cover new defense categories.
  728.  
  729. untyped Misc[32];
  730. * Epanded from a size of [16] to [32]. An array of 32 miscellaneous variables for you to use as you please.
  731. * The Misc[] array now supports all datatypes, and has been expanded to a size of [32].
  732.  
  733. float UID;
  734. * Each npc created by ZC in in a given session is assigned a unique ID (UID).
  735. * Returns the UID of an npc.
  736. * UIDs begin at 00000.0001 and overflow at 214748.3748.
  737. * Note: This allows for 2,147,483,748 unique npcs, per-session.
  738.  
  739. int InvFrames;
  740. * Returns the number of remaining invincibility frames if the enemy is invincible, otherwise 0.
  741.  
  742. int Invincible;
  743. * Returns if the enemy is invincible, because of ( superman variable ).
  744.  
  745. bool HasItem;
  746. * Returns if the enemy is holding the screen item.
  747.  
  748. bool Ringleader;
  749. * Returns if the enemy is a 'ringleader'.
  750.  
  751.  
  752. /* The following commands are valid, but do not yet have in-engine use, */
  753.  
  754. int Frozen;
  755. * Returns the number of frames for which the npc remains frozen
  756. int FrozenTile;
  757. int FrozenCSet;
  758.  
  759. int npcscript;
  760. * The script ID used by this NPC.
  761. untyped InitD[8];
  762. * InitialD for the npc script.
  763. untyped IntiA[2];
  764. * InitialA for the npc script.
  765.  
  766. int Movement[32];
  767. * NPC Movement patterns, and args.
  768. int WeaponPattern[32];
  769. * NPC weapon movement patterns and args.
  770. int FireSound;
  771. * The sound that plays when the npc fires a weapon.
  772.  
  773. /************************************************************************************************************/
  774.  
  775. //////////////
  776. /// Link ///
  777. //////////////
  778.  
  779. bool Item[256];
  780. * Reading from, or writing to this array no longer causes lag.
  781.  
  782. untyped Misc[32];
  783. * Epanded from a size of [16] to [32]. An array of 32 miscellaneous variables for you to use as you please.
  784. * The Misc[] array now supports all datatypes, and has been expanded to a size of [32].
  785.  
  786. int HitBy[4] {npc, eweapon };
  787. * Stores the ID/UIDs of objects that hurt the Link this frame.
  788.  
  789. int Stun;
  790. * Returns the number of frames for which Link will; remain stunned.
  791. * Writing to this causes Link to be stunned for 'n' frames.
  792. * This decrements once per frame.
  793.  
  794. int Pushing;
  795. * Returns the number of frames that Link has been pushing against a solid object.
  796.  
  797. int Defense[];
  798. * Unused at this time.
  799.  
  800. int ScriptTile;
  801. * If this is > 0, then Link will be drawn using this tile ID.
  802. * The specific tile is drawn. This is not an offset, nor OTile.
  803.  
  804. int ScriptFlip;
  805. * If this is > 0, then Link's tile will be drawn using this flip value.
  806.  
  807. bool DisableItem[256];
  808. * An array of 256 values that represents whether items are disabeld on the current DMap.
  809.  
  810. int InvFrames;
  811. * This returns how long Link will remain invincible, 0 if not invincible. Can be set.
  812.  
  813. bool InvFlicker;
  814. * If set false, Link will neither flash, nor flicker when invincible.
  815.  
  816. int HurtSound;
  817. * The sound that plays when Link is injured. By default this is '16', but you may change it at any time.
  818.  
  819. int Eaten;
  820. * It returns 0 if Link is not eaten, otherwise it returns the duration of him being eaten.
  821.  
  822. int Equipment;
  823. * Link->Equipment is now read-write, and needs testing.
  824.  
  825. int ItemA;
  826. * Contains the item IDs of what is currently equiped to Link's A button.
  827.  
  828. int ItemB;
  829. * Contains the item IDs of what is currently equiped to Link's B button.
  830.  
  831. int SetItemSlot(int itm_id, int button, int force);
  832. * This allows you to set Link's button items without binary operation with options for forcing them.
  833.  
  834. int UsingItem;
  835. * Returns the ID of an item used when Link uses an item. Returns -1 if Link is not using an item this frame.
  836.  
  837. int UsingItemA;
  838. * 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.
  839.  
  840. int UsingItemB;
  841. * 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.
  842.  
  843. bool Diagonal;
  844. * This corresponds to whether 'Diagonal Movement' is enabled, or not.
  845.  
  846. bool BigHitbox;
  847. * This corresponds to whether 'Big Hitbox' is enabled, or not.
  848.  
  849. int Attack;
  850.  
  851. /* The following have not been ported from 2.future to Canonical ZC:
  852.  
  853. int Animation;
  854. * Link;s Animation style, as set in Quest->Graphics->Sprites->Link
  855.  
  856. int WalkASpeed;
  857. * Link's Walking Animation speed as set in Quest->Graphics->Sprites->Link
  858.  
  859. int SwimASpeed;
  860. * Link's Swiming Animation speed as set in Quest->Graphics->Sprites->Link
  861.  
  862. int HitHeight;
  863. * link's Hitbox height in pixels starting from his 0x,0y (upper-left) corner, going down.
  864.  
  865. int HitWidth;
  866. * Link's Hitbox width in pixels starting from his x0,y0 (upper-left) corner, going right.
  867.  
  868. int HitXOffset;
  869. * The X offset of Link's hitbox, or collision rectangle.
  870.  
  871. int HitYOffset;
  872. * The Y offset of Link's hitbox, or collision rectangle.
  873.  
  874. int Extend;
  875. * Sets the extend value for all of Link's various actions.
  876. */
  877.  
  878. /************************************************************************************************************/
  879.  
  880. //////////////////
  881. /// itemdata ///
  882. //////////////////
  883.  
  884. int ID;
  885. * Returns the item number of the item in question.
  886.  
  887. int Modifier;
  888. * The Link Tile Modifier
  889.  
  890. int Tile;
  891. * The tile used by the item.
  892.  
  893. int CSet;
  894. * The CSet of the tile used by the item.
  895.  
  896. int Flash;
  897. * The Flash value for the CSet
  898.  
  899. int AFrames;
  900. * The number of animation frames in the item's tile animation.
  901.  
  902. int ASpeed;
  903. * The speed of the item's animation.
  904.  
  905. int Delay;
  906. * The Delay value, before the animation begins.
  907.  
  908. int Script;
  909. * The Action Script for the item.
  910.  
  911. int PScript;
  912. * The Pickup Script for the item.
  913.  
  914. int MagicCost;
  915. * The item's maic (or rupees, if this is set) cost.
  916.  
  917. int MinHearts;
  918. * The minimum number of hearts required to pick up the item.
  919.  
  920. float Attributes[10]
  921. * An array of ten integers that correspond to the ten <Misc> text entries on the item editor Data tab.
  922.  
  923. int Sprites[10]
  924. * An array of ten integers that correspond to the ten sprite pulldowns on the item editor Action tab.
  925.  
  926. bool Flags[5]
  927. * An array of five boolean flags that correspond to the five flag tickboxes on the item editor Data tab.
  928.  
  929. bool Combine;
  930. * Corresponds to 'Upgrade when collected twice'.
  931.  
  932. bool Downgrade;
  933. * Corresponds to the 'Remove When Used' option on the Action tab of the item editor.
  934.  
  935. bool KeepOld;
  936. * Corresponds to 'Keep lower level items on the Pickup tab of the item editor.
  937.  
  938. bool RupeeCost;
  939. * Corresponds to the 'Use Rupees Instead of Magic' option on the item editor 'Action' tab.
  940. * Deprecated by CostCounter.
  941.  
  942. bool Edible;
  943. * Corresponds to the 'Can be Eaten by Enemies' box on the Pickup tab of the item editor.
  944.  
  945. bool GainLower;
  946. * Corresponds to the 'Gain All Lower Level Items' box on the Pickup tab of the item editor.
  947.  
  948. untyped InitD[8];
  949. * The eight D* args used by both item scripts. Accepts all datatypes.
  950.  
  951. int Family;
  952. * The item class.
  953.  
  954. int Level;
  955. * The item's Level.
  956.  
  957. int Power;
  958. * The amount of damage generated by the primary weapon for this item, if any.
  959.  
  960. int Amount;
  961. int Max;
  962. int MaxIncrement;
  963. int Keep;
  964. int Counter; //should be renamed to IncreaseCounter
  965.  
  966. int MagicCostTimer //needsto be CostTimer
  967. * The number of frames between counter decrements, when using an item with a perpetual
  968. * upkeep cost, such as Boots and Cane items.
  969.  
  970. int UseSound;
  971. * The sound that will play when the item is used.
  972.  
  973. int Pickup;
  974. * The Pickup type for this item See IP_* in std_constants.zh.
  975.  
  976. int PickupFlags;
  977. * A flagset used by the Item Editor UI to determine special conditions for item pick-up.
  978. * Values are ORd together:
  979. *
  980. *
  981.  
  982. int PickupString;
  983. * The ZQ String Editor (message) string that will appear when Link collects this item.
  984. * Note: The exact nature of hw frequently the string will be shown per game session can be
  985. * modified using 'int PickupStringFlags'.
  986.  
  987. int PickupStringFlags;
  988. * A flagset that determines how frequently the PickupString for an item is displayed per game session.
  989. * You may set the string to always show, only show once per game session, or other intervals
  990. * using the following flagset (values are ORd together):
  991. *
  992. *
  993. *
  994.  
  995. int Cost; //may need to rename MagicCost, to Cost
  996. * The cost of the item, in units. Whenever the item is used, this value is decremented from
  997. * the counter supplied to 'CostCounter'.
  998. * If the item runs for more than one frame, this amount will be decremented every n frames,
  999. * where n is the value of 'CostTimer'.
  1000.  
  1001. int CostCounter;
  1002. * The counter to use when decrementing the item cost. The default is 'CR_MAGIC'.
  1003. * Some item classes (e.g. Bombs) reduce a counter, whether this is set or not.
  1004. * In the case that this is set on such an uitem, it acts as a secobdary cost.
  1005.  
  1006. int DrawXOffset;
  1007. * The horizontal draw offset of the item.
  1008. * Note: SizeFlags[??] must be enabled for this to function.
  1009.  
  1010. int DrawYOffset;
  1011. * The vertical draw offset of the item.
  1012. * Note: SizeFlags[??] must be enabled for this to function.
  1013.  
  1014. int HitXOffset;
  1015. * The horizontal hitbox offset of the item.
  1016. * Note: SizeFlags[??] must be enabled for this to function.
  1017.  
  1018. int HitYOffset;
  1019. * The vertical hitbox offset of the item.
  1020. * Note: SizeFlags[??] must be enabled for this to function.
  1021.  
  1022. int HitWidth;
  1023. * The hitbox width (X component), in pixels, for the enemy.
  1024. * Note: SizeFlags[??] must be enabled for this to function.
  1025.  
  1026. int HitHeight;
  1027. * The hitbox height (Y component), in pixels, for the enemy.
  1028. * Note: SizeFlags[??] must be enabled for this to function.
  1029.  
  1030. int TileWidth;
  1031. * The drawn width (X component) of the item in increments of one tile.
  1032. * Note: SizeFlags[??] must be enabled for this to function.
  1033.  
  1034. int TileHeight;
  1035. * The drawn height (Y component) of the item in increments of one tile.
  1036. * Note: SizeFlags[??] must be enabled for this to function.
  1037.  
  1038. int OverrideFlags;
  1039. * ? Is this the same as SizeFlags?
  1040.  
  1041. int SizeFlags;
  1042. * A flagset that determines which Item Editor 'Size' tab attribute values are applied to the
  1043. * item, overriding engine defaults.
  1044.  
  1045. int CollectFlags;
  1046. * ?
  1047.  
  1048. void GetName(int buffer[]);
  1049. * Loads the item's name into 'buffer'.
  1050.  
  1051. //Unimplemented for Weapon Editor:
  1052. int Weapon;
  1053. int Defense;
  1054. int Range;
  1055. int Duration;
  1056. untyped WeaponD[8];
  1057. untyped WeaponMisc[32];
  1058. int Duplicates;
  1059. int DrawLayer;
  1060. int CollectFlags;
  1061. int WeaponScript;
  1062. int WeapomnHitXOffset;
  1063. int WeaponHitYOffset;
  1064. int WeaponHitHeight;
  1065. int WeaponHitWidth;
  1066. int WeaponHitZHeight;
  1067. int WeaponDrawXOffset;
  1068. int WeaponDrawYOffset;
  1069. int WeaponDrawZOffset;
  1070. int WeaponOverrideFlags;
  1071.  
  1072. t/b/a
  1073. itemdata GetItem(name[]);
  1074.  
  1075. /************************************************************************************************************/
  1076.  
  1077. /////////////////////
  1078. /// messagedata ///
  1079. /////////////////////
  1080.  
  1081. void Set(int buffer[]);
  1082. * Assigns the ZString buffer[] to the messagedata pointer's string.
  1083.  
  1084. void Get(int buffer[]);
  1085. * Copies the string value from the messagedata pointer, to the array buffer[].
  1086.  
  1087.  
  1088. int buffer_str[80];
  1089.  
  1090. int Next;
  1091. * Next message in list.
  1092.  
  1093. int Tile;
  1094. int CSet;
  1095. int Font;
  1096. int X;
  1097. int Y;
  1098. int Width;
  1099. int Height;
  1100. int Sound;
  1101. int ListPosition;
  1102. int VSpace;
  1103. int HSpace;
  1104. int Flags;
  1105. bool Transparent; (unused at this time).
  1106.  
  1107. //////////////////
  1108. /// dmapdata ///
  1109. //////////////////
  1110.  
  1111. 1. Sideview Gravity on All Screens (uses Dmaps[].sideview, new var.
  1112. 2. Layer 3 is Background on All Screens (uses DMaps[].flgs&dmfLAYER3BG)
  1113. 3. Layer 2 is Background on All Screens (uses DMaps[].flgs&dmfLAYER2BG
  1114.  
  1115. int Map;
  1116. int Level;
  1117. int Offset;
  1118. int Compass;
  1119. int Palette;
  1120. int MIDI;
  1121. int Continue;
  1122. int Type;
  1123. int MusicTrack;
  1124. int ActiveSubscreen;
  1125. int PassiveSubscreen;
  1126. int Grid[8];
  1127. int MiniMapTile[2];
  1128. int MiniMapCSet[2];
  1129. int MapTile[2];
  1130. int MapCSet[2];
  1131. int DisabledItems[256];
  1132. int Flags;
  1133. bool Sideview;
  1134.  
  1135. void SetName(int buffer[]);
  1136. void GetName(int buffer[]);
  1137. void SetTitle(int buffer[]);
  1138. void GetTitle(int buffer[]);
  1139. void SetIntro(int buffer[]);
  1140. void GetIntro(int buffe[]);
  1141.  
  1142. void SetMusic(); //enh music
  1143. void GetMusic();
  1144.  
  1145.  
  1146. //////////////////
  1147. /// shopdata ///
  1148. //////////////////
  1149.  
  1150. shop->Price[3]
  1151. infoshop->Price[3]
  1152. infoshop->String[3]
  1153. shop->Item[3]
  1154. shop->HasItem[3]
  1155.  
  1156. /////////////////
  1157. /// mapdata ///
  1158. /////////////////
  1159.  
  1160. int Valid;
  1161. * ?
  1162.  
  1163. int Guy;
  1164. * The screen guy.
  1165.  
  1166. int String;
  1167. * The screen string.
  1168.  
  1169. int RoomType;
  1170. * The screen room type.
  1171.  
  1172. int Item;
  1173. * The screen item.
  1174.  
  1175. int HasItem;
  1176. * ?
  1177.  
  1178. int TileWarpType[4];
  1179. * The Tile Warp type for Tile Warps A, B, C, and D; [0], [1], [2], and [3] respectively.
  1180. * See std_constants.zh TWTYPE_* constants for valid types.
  1181.  
  1182. int TileWarpOverlayFlags;
  1183. * Combos carry over?
  1184.  
  1185. int DoorComboSet;
  1186. * The doorset used by the screen, for NES dungeon doors.
  1187.  
  1188. int WarpReturnX[4];
  1189. * The X-component for each of the four 2.50+ (blue) warp return squares.
  1190.  
  1191. int WarpReturnY[4];
  1192. * The Y-component for each of the four 2.50+ (blue) warp return squares.
  1193.  
  1194. int WarpReturnC;
  1195. * ?
  1196.  
  1197. int StairsX;
  1198. * The X component for where a Stairs secret appears on the screen.
  1199.  
  1200. int StairsY;
  1201. * The Y component for where a Stairs secret appears on the screen.
  1202.  
  1203. int ItemX;
  1204. * The X component for the item location on the screen.
  1205.  
  1206. int ItemY;
  1207. * The Y component for the item location on the screen.
  1208.  
  1209. int CSet;
  1210. * ? The screen palette. ?
  1211.  
  1212. int Door[4];
  1213. * The door state for the screen. See D_* constants for direction and door type.
  1214.  
  1215. int TileWarpDMap[4];
  1216. * The destination DMap for each of the four warp types.
  1217.  
  1218. int TileWarpScreen[4];
  1219. * The destination screen for each of the four warp types.
  1220.  
  1221. int Enemy[10];
  1222. * The IDs of the enemies that spawn on the screen.
  1223.  
  1224. int EnemyFlags;
  1225. * A flagset for enemies on the screen (E.Flags).
  1226. * Valid values (ORd) together, are:
  1227. *
  1228. *
  1229.  
  1230. int Pattern;
  1231. * Ths enemy 'Spawn Pattern'.
  1232.  
  1233. int SideWarpType[4];
  1234. * The Sidewarp type for Sidewarps A, B, C, and D; [0], [1], [2], and [3] respectively.
  1235. * See std_constants.zh SWTYPE_* constants for valid types.
  1236.  
  1237. int SideWarpOverlayFlags;
  1238. * Carryover?
  1239.  
  1240. int SideWarpScreen[4];
  1241. * The destination screen for each of the four sidewarps.
  1242.  
  1243. int SideWarpDMap[4];
  1244. * The destination DMap for each of the four sidewarps.
  1245.  
  1246. int SideWarpIndex;
  1247. * The warp return?? If so, should this be an array, or are these ORd values?
  1248.  
  1249. int WarpArrivalX;
  1250. * The X-component for the pre-2.50 (green) arrival square.
  1251.  
  1252. int WarpArrivalY;
  1253. * The X-component for the pre-2.50 (green) arrival square.
  1254.  
  1255. int MazePath[4];
  1256. * The four Maze Path directions.
  1257.  
  1258. int ExitDir;
  1259. * The Maze Path 'Exit Direction'.
  1260.  
  1261. int UnderCombo;
  1262. * The undercombo ID used by the screen.
  1263.  
  1264. int UnderCSet;
  1265. * The CSet of the undercombo used by the screen.
  1266.  
  1267. int Catchall;
  1268. * The screen 'Catchall' value.
  1269.  
  1270. int CSensitive;
  1271. * The value of Damage Combo Sensitivity for the screen.
  1272.  
  1273. int NoReset;
  1274. * The No Reset Flagset. Values are ORd together s follows:
  1275. * Secrets 0x
  1276. * Items 0x
  1277. * Special Item 0x
  1278. * Lock Block 0x
  1279. * Boss Lock Block 0x
  1280. * Chest 0x
  1281. * Secrets 0x
  1282. * Locked Chest 0x
  1283. * Boss Locked Chest 0x
  1284. * Door Up [0] 0x
  1285. * Door Down[1] 0x
  1286. * Door Left [2] 0x
  1287. * Door Right [3] 0x
  1288.  
  1289.  
  1290. int NoCarry;
  1291. * The No Carru Over Flagset. Values are ORd together s follows:
  1292. * Secrets 0x
  1293. * Items 0x
  1294. * Special Item 0x
  1295. * Lock Block 0x
  1296. * Boss Lock Block 0x
  1297. * Chest 0x
  1298. * Secrets 0x
  1299. * Locked Chest 0x
  1300. * Boss Locked Chest 0x
  1301.  
  1302. int LayerMap[6];
  1303. * The Map IDs used by screen layers 1 through 6, represented as [0] through [5].
  1304. * I should adjust this array to begin a t1. -Z
  1305.  
  1306. int LayerScreen[6];
  1307. * The Screen IDs used by screen layers 1 through 6, represented as [0] through [5].
  1308. * I should adjust this array to begin a t1. -Z
  1309.  
  1310. int LayerOpacity[6];
  1311. * The opacity value for each layer used by this screen.
  1312. * Valid layers are 1 through 6, represented as [0] through [5].
  1313. * I should adjust this array to begin a t1. -Z
  1314.  
  1315. int TimedWarpTimer;
  1316. * The timer used by 'Time Warp Tics' in Screen Data->T.Warp
  1317.  
  1318. int NextMap;
  1319. * ?
  1320. int NextScreen;
  1321. *?
  1322.  
  1323.  
  1324. int SecretCombo[128];
  1325. * The Combo IDs used by 'Secret Combos' on this screen.
  1326. * See SCR_SEC_* in std_constants.zh for more information.
  1327.  
  1328. int SecretCSet[128];
  1329. * The CSets used by 'Secret Combos' on this screen.
  1330. * See SCR_SEC_* in std_constants.zh for more information.
  1331.  
  1332. int SecretFlags[128];
  1333. * The Combo Flags used by 'Secret Combos' on this screen.
  1334. * See SCR_SEC_* in std_constants.zh for more information.
  1335.  
  1336. int ViewX;
  1337. * Unused at this time. Represents the visible width of the screen.
  1338.  
  1339. int ViewY;
  1340. * Unused at this time. Represents the visible height of the screen.
  1341.  
  1342. int Width;
  1343. * Unused at this time. Represents the physical;e width of the screen.
  1344.  
  1345. int Height;
  1346. * Unused at this time. Represents the physical height of the screen.
  1347.  
  1348. int EntryX;
  1349. * The X-coordinate at which Link entered the screen (his last spawn point).
  1350. * If Link is respawned by falling in water, he will appear at this X-component.
  1351.  
  1352. int EntryY;
  1353. * The Y-coordinate at which Link entered the screen (his last spawn point).
  1354. * If Link is respawned by falling in water, he will appear at this Y-component.
  1355.  
  1356.  
  1357. int ScriptEntry;
  1358. * ?
  1359. int ScriptOccupancy;
  1360. * ?
  1361. int ExitScript;
  1362. * ?
  1363.  
  1364. int OceanSFX;
  1365. * The 'Ambient Sound' under S.Data2.
  1366. * Rename this to AmbientSFX, or just SFX.
  1367.  
  1368. int BossSFX;
  1369. * The Boss Roar sound for this screen.
  1370.  
  1371. int SecretSFX;
  1372. * The sound that will play on this screen, when secrets are triggered.
  1373.  
  1374. int ItemSFX;
  1375. * The sound that will play if Link holds an item over his head on this screen.
  1376.  
  1377. int MIDI;
  1378. * The MIDI that plays on this screen.
  1379.  
  1380. int LensLayer;
  1381. * The layer to which Lens of Truth graphics are drawn.
  1382.  
  1383. int Flags[10];
  1384. * A set of flagsets that contain special data for thiws screen.
  1385. * These represent S.Flags1 and S.Flags2 flags.
  1386. * See std_constants.zh (SFG* for the screen flag froup,
  1387. * and SFX* for the screen flag value) for more information.
  1388.  
  1389. int D[8];
  1390. * Improperly implemented. Was meant to relate as Screen->D, except that
  1391. * Screen->D is not bound to layermap.
  1392.  
  1393. int ComboD[176];
  1394. * The IDs of each of the 176 combos used on the screen.
  1395.  
  1396. int ComboC[176];
  1397. * The CSets of each of the 176 combos used on the screen.
  1398.  
  1399. int ComboF[176];
  1400. * The placed (map) flags for each of the 176 combo positions used by this screen.
  1401.  
  1402.  
  1403. int ComboS[176];
  1404. * The inherent flags of each of the 176 combos used on the screen.
  1405.  
  1406. int State[32];
  1407. * The screen states used by this screen. Identical to Screen->State[], but for mapdata screens.
  1408.  
  1409. int EFlags[3];
  1410. * The Screen Data E.Flags flagsets.
  1411. * Values are:
  1412. *
  1413.  
  1414.  
  1415. int NumFFCs;
  1416. * ? The number of ffcs running scripts?
  1417.  
  1418. int FFCEffectWidth[32];
  1419. * The EffectWidth variable for each of the 32 ffcs on the screen.
  1420. * See ffc->EffectWidth for more details.
  1421.  
  1422. int FFCEffectHeight[32];
  1423. * The EffectHeight variable for each of the 32 ffcs on the screen.
  1424. * See ffc->EffectHeight for more details.
  1425.  
  1426. int FFCTileWidth[32];
  1427. * The TileWidth variable for each of the 32 ffcs on the screen.
  1428. * See ffc->TilwWidth for more details.
  1429.  
  1430. int FFCTileHeight[32];
  1431. * The TileHeighr variable for each of the 32 ffcs on the screen.
  1432. * See ffc->TilwHeight for more details.
  1433.  
  1434. int FFCData[32];
  1435. * The Data (combo ID) variable for each of the 32 ffcs on the screen.
  1436. * See ffc->Data for more details.
  1437.  
  1438. int FFCCSet[32];
  1439. * The CSet variable for each of thr 32 ffcs on the screen.
  1440. * See ffc->CSet for more details.
  1441.  
  1442. int FFCDelay[32];
  1443. * The Delay variable for each of thr 32 ffcs on the screen.
  1444. * See ffc->Delay for more details.
  1445.  
  1446. int FFCX[32];
  1447. * The X variable for each of thr 32 ffcs on the screen.
  1448. * See ffc->X for more details.
  1449.  
  1450. int FFCY[32];
  1451. * The Y variable for each of thr 32 ffcs on the screen.
  1452. * See ffc->Y for more details.
  1453.  
  1454. int FFCVx[32];
  1455. * The Vx variable for each of thr 32 ffcs on the screen.
  1456. * See ffc->Vx for more details.
  1457.  
  1458. int FFCVy[32];
  1459. * The Vy variable for each of thr 32 ffcs on the screen.
  1460. * See ffc->Vy for more details.
  1461.  
  1462. int FFCAx[32];
  1463. * The Ax variable for each of thr 32 ffcs on the screen.
  1464. * See ffc->Ax for more details.
  1465.  
  1466. int FFCAy[32];
  1467. * The Vy variable for each of thr 32 ffcs on the screen.
  1468. * See ffc->Vy for more details.
  1469.  
  1470. int FFCFlags[32];
  1471. * The Flags variable for each of thr 32 ffcs on the screen.
  1472. * See ffc->Flags for more details.
  1473.  
  1474. int FFCLink[32];
  1475. * The Link variable for each of thr 32 ffcs on the screen.
  1476. * See ffc->Link for more details.
  1477.  
  1478. int FFCScript[32];
  1479. * The Script variable for each of thr 32 ffcs on the screen.
  1480. * See ffc->Script for more details.
  1481.  
  1482. bool FFCRunning[32];
  1483. * Returns true if the specified ffc is running a script?
  1484. * May be used to pause/resume ffc script execution?
  1485. * This needs to be cloned over to ffc->Running -Z
  1486.  
  1487. //Functions
  1488. int GetFFCInitD(int ffc_index, int n);
  1489. * Returns the value of InitD[n] for the ffc on the scrrrn with an ID of ffc_index.
  1490. * This needs to be converted to the type 'untyped' to comply
  1491. * with the change of float ffc->InitD[] to untyped ffc->InitD[]
  1492. * Note: Expressed as a function due to lack of 2D arrays in ZScript.
  1493. * With 2D arrays, this would simply be FFCInitD[32][8].
  1494.  
  1495. void SetFFCInitD(int ffc_index, int n, float value);
  1496. * Sets the value of InitD[n] for the ffc on the scrrrn with an ID of ffc_index.
  1497. * 'int value' needs to be converted to the type 'untyped' to comply
  1498. * with the change of float ffc->InitD[] to untyped ffc->InitD[]
  1499. * Note: Expressed as a function due to lack of 2D arrays in ZScript.
  1500. * With 2D arrays, this would simply be FFCInitD[32][8].
  1501.  
  1502.  
  1503. int GetFFCInitA(int ffc_index, int n);
  1504. * Returns the value of InitA[n] for the ffc on the scrrrn with an ID of ffc_index.
  1505. * Note: Expressed as a function due to lack of 2D arrays in ZScript.
  1506. * With 2D arrays, this would simply be FFCInitA[32][2].
  1507.  
  1508.  
  1509. void SetFFCIniA(int ffc_index, int init_a, float value);
  1510. * Sets the value of InitA[n] for the ffc on the scrrrn with an ID of ffc_index.
  1511. * Note: Expressed as a function due to lack of 2D arrays in ZScript.
  1512. * With 2D arrays, this would simply be FFCInitA[32][2].
  1513.  
  1514.  
  1515.  
  1516.  
  1517. ///////////////////
  1518. /// combodata ///
  1519. ///////////////////
  1520.  
  1521. int Type;
  1522. * The 'type' of the combo, in the Combo Editor.
  1523. * Setting this changes the combo type variables. ?
  1524.  
  1525. int Tile;
  1526. * The tile ID used by the combo.
  1527.  
  1528. int Flip;
  1529. * The flip settings for the combo tile.
  1530.  
  1531. int Walk;
  1532. * The walkability flags value.
  1533. * Walk flags are OR'd together using values of:
  1534. *
  1535. *
  1536.  
  1537. int CSet;
  1538. * The CSet values for the combo.
  1539. * How is CSet2 stored?
  1540.  
  1541. int Foo;
  1542. * Unused.
  1543.  
  1544. int Frames;
  1545. * The number of frames of animation.
  1546.  
  1547. int NextData;
  1548. *
  1549. int NextCSet;
  1550. *
  1551. int NextTimer;
  1552. *
  1553.  
  1554. int Flag;
  1555. * The inherent flag bound to the combo.
  1556.  
  1557. int SkipAnim; //needs to be renamed to SkipAnimX
  1558. * Corresponds to 'A.SkipX' in the Combo Editor.
  1559.  
  1560. int SkipAnimY;
  1561. * Corresponds to 'A.SkipX' in the Combo Editor.
  1562.  
  1563. int AnimFlags;
  1564. * This contains flag data for the Combo Editor settings:
  1565. * 0x Refresh Animation on Room Entry
  1566. * 0x Refresh Animation When Cycled To
  1567.  
  1568. int Expansion[6];
  1569. * Reserved for future use by the Combo Editor.
  1570.  
  1571. int Attributes[4];
  1572. * Corresponds to Attributes[0] through Attributes[3] on the 'Attributes'
  1573. * tab in the Combo Editor.
  1574.  
  1575. int UserFlags;
  1576. * Corresponds to the 'Misc Flags' on the Attributes tab of the Combo Editor.
  1577. * These values are ORd together.
  1578.  
  1579. int TriggerFlags[3];
  1580. * Corresponds to the flags on the 'Triggered By' tabs of the Combo Editor
  1581. * where the indices and flag values are:
  1582. *
  1583. *
  1584.  
  1585. int TriggerLevel;
  1586. * Corresponds to the 'Minimum Level' field on the 'Triggered By (1)' tab of
  1587. * the Combo Editor.
  1588.  
  1589. /* Combo Types
  1590. * These values contain data that is used by ZC to determine the Combo Type.
  1591. * Using combodata in ZScript, it is possible to define wholly new types
  1592. * by combining sets of these values.
  1593. */
  1594.  
  1595. int BlockNPC;
  1596. int BlockHole;
  1597. int BlockTrigger;
  1598. int BlockWeapon[32];
  1599. int ConveyorSpeedX;
  1600. int ConveyorSpeedY;
  1601. int SpawnNPC;
  1602. int SpawnNPCWhen;
  1603. int SpawnNPCChange;
  1604. int DirChange;
  1605. int DistanceChangeTiles;
  1606. int DiveItem;
  1607. int Dock;
  1608. int Fairy;
  1609. int FFCAttributeChange;
  1610. int DecorationTile;
  1611. int DecorationType;
  1612. int Hookshot;
  1613. int Ladder;
  1614. int LockBlock;
  1615. int LockBlockChange;
  1616. int Mirror;
  1617. int DamageAmount;
  1618. int DamageDelay;
  1619. int DamageType;
  1620. int MagicAmount;
  1621. int MagicDelay;
  1622. int MagicType;
  1623. int NoPushBlocks;
  1624. int Overhead;
  1625. int PlaceNPC;
  1626. int PushDir;
  1627. int PushDelay;
  1628. int PushHeavy;
  1629. int Pushed;
  1630. int Raft;
  1631. int ResetRoom;
  1632. int SavePoint;
  1633. int FreezeScreen;
  1634. int SecretCombo;
  1635. int Singular (self-only);
  1636. int SlowWalk;
  1637. int Statue;
  1638. int Step;
  1639. int StepChange;
  1640. int Strike[32];
  1641. int StrikeRemnants;
  1642. int StrikeRemnantsType;
  1643. int StrikeChange;
  1644. int StrikeItem;
  1645. int TouchItem;
  1646. int TouchStairs;
  1647. int TriggerType;
  1648. int TriggerSensitivity;
  1649. int Warp;
  1650. int WarpSensitivity;
  1651. int WarpDirect;
  1652. int WarpLocation;
  1653. int Water;
  1654. int Whistle;
  1655. int WinGame;
  1656. int BlockWeaponLevel;
  1657.  
  1658. // t/b/a
  1659. //void GetLabel() / GetName()
  1660. //void SetLabel / SetName()
  1661. //combodata GetCombo(int label[])
  1662. //int Game->GetCombo(int name[])
  1663.  
  1664. triggerflags[3]
  1665. combodata->Attributes[] and Screen->GetComboAttribute(pos, indx) / SetComboAttribute(pos, indx)
  1666. combodata->Flags and Screen->ComboFlags[pos] -- Maybe ComboMisc[pos] to avoid confusion?
  1667. Combo QR rules will become ComboMisc[] !
  1668.  
  1669. ////////////////////
  1670. /// Graphics-> ///
  1671. ////////////////////
  1672.  
  1673. void Wavy(bool wavyin);
  1674. * Creates a wavy visual effect, identical to 'Wavy' Warp effects.
  1675. * There are two styles, 'WavyIn', and 'WavyOut'. Select from these using paramater 1.
  1676.  
  1677. void Zap(bool zapin);
  1678. * Creates a wavy visual effect, identical to 'Zap' Warp effects.
  1679. * There are two styles, 'ZapIn', and 'ZapOut'. Select from these using paramater 1.
  1680.  
  1681. void Greyscale(bool enable);
  1682. * Converts the game to monochrome greyscale, or reverts from greyscale to colour.
  1683. * This is useful for simulating 'Gameboy' style displays.
  1684.  
  1685. //void Monochrome(int hue);
  1686. // t/b/a, would allow monochrome in red, blue, green, or amber hues.
  1687.  
  1688. /////////////////
  1689. /// Audio-> ///
  1690. /////////////////
  1691.  
  1692. void PlaySound(int soundid); ZASM Instruction:
  1693. PLAYSOUNDR
  1694. PLAYSOUNDV
  1695. /**
  1696. * Plays one of the quest's sound effects. Use the SFX_ constants in
  1697. * std.zh as values of soundid.
  1698. */ Example Use: !#!
  1699.  
  1700. void EndSound(int soundid);
  1701. * If sfx_id is playing, calling this immediately stops that sound.
  1702.  
  1703. void PauseSound(int soundid);
  1704. * If sfx_id is playing, calling this pauses it, halting it from playing, in
  1705. * a manner that you may later resume it from the point at which it was paused.
  1706. * See also: Audio->ResumeSound(int sfx_id) and Audio->ContinueSound(int sfx_id).
  1707.  
  1708. void ResumeSound(int soundid);
  1709. * Resumes a sound effect with an ID of sfx_id, that has been paused.
  1710.  
  1711. void ContinueSound(int soundid);
  1712. * Resumes a sound effect with an ID of sfx_id, that has been paused.
  1713.  
  1714. void AdjustMusicVolume(int percent);
  1715. * Adjusts the volume of all MIDI, DIGI, and Enhanced Music.
  1716. * The parameter 'int percent' is the percentage of its present volume.
  1717. * To double the volume, you would pass '200' to paramater 1; to reduce it by half, you
  1718. * would pass '50' to paramater 1.
  1719.  
  1720. void AdjustSFXVolume(int percent);
  1721. * Adjusts the volume of all Soune Effects (WAV).
  1722. * The parameter 'int percent' is the percentage of its present volume.
  1723. * To double the volume, you would pass '200' to paramater 1; to reduce it by half, you
  1724. * would pass '50' to paramater 1.
  1725.  
  1726. void AdjustSound(int, int, bool)
  1727.  
  1728. void PauseCurMIDI();
  1729. * Pauses the current MIDI in a manner that permits resuming it.
  1730. * Note: This does not affect Enhanced Music playback.
  1731. * See also: Audio->ResumeCurMIDI().
  1732.  
  1733. void ResumeCurMIDI();
  1734. * Resumes MIDI playback, if it has been paused.
  1735. * Note: This does not affect Enhanced Music playback.
  1736. * See also: Audio->PauseCurMIDI().
  1737.  
  1738. void PlayMIDI(int MIDIid); ZASM Instruction:
  1739. PLAYMIDIR
  1740. PLAYMIDIV
  1741. /**
  1742. * Changes the current screen MIDI to MIDIid.
  1743. * Will revert to the DMap (or screen) MIDI upon leaving the screen.
  1744. */ Example Use: !#!
  1745.  
  1746. bool PlayEnhancedMusic(int filename[], int track);
  1747.  
  1748. ZASM Instruction:
  1749. PLAYENHMUSIC
  1750. /**
  1751. * Play the specified enhanced music if it's available. If the music
  1752. * cannot be played, the current music will continue. The music will
  1753. * revert to normal upon leaving the screen.
  1754. * Returns true if the music file was loaded successfully.
  1755. * The filename cannot be more than 255 characters. If the music format
  1756. * does not support multiple tracks, the track argument will be ignored.
  1757. */ Example Use:
  1758.  
  1759. int music[]="myfile.mp3"; // Make a string with the filename of the music to play.
  1760. if ( !Game->PlayEnhancedMusic(music, 1) ) Game->PlayMIDI(midi_id);
  1761.  
  1762. // Plays the enhanced music file 'myfle.mp3', track 1.
  1763. // If the file is mssing, the game will instead play
  1764. // the midi specified as midi_id.
  1765.  
  1766. int PanStyle;
  1767. * Set or get the audio panning. See PAN_* constants in std_constants.zh for valid values.
  1768.  
  1769. //int Volume[4]
  1770. * Deprecated; raw access to the UI audio controls. (Now unsupported officially.)
  1771.  
  1772. ////////////////
  1773. /// Text-> ///
  1774. ////////////////
  1775.  
  1776. t/b/a
  1777.  
  1778. /////////////////
  1779. /// Input-> ///
  1780. /////////////////
  1781.  
  1782. Input->Press[18];
  1783. * An array of boolean values that correspond to whether a control button, or a keyboard
  1784. * key bound to a control button, was pressed this frame.
  1785. * Replaces Link->Press*.
  1786.  
  1787.  
  1788. Button[18],
  1789.  
  1790. bool Hold[18];
  1791. * An array of boolean values that correspond to whether a control button, oir a keyboard
  1792. * key bound to a control button, was held down this frame.
  1793. * Replaces Link->Input*.
  1794.  
  1795. bool Key[127];
  1796. * Read-Only: An array of boolean values that read as 'true'
  1797. * if the corresponding keyboard key was pressed this frame.
  1798.  
  1799. ReadKey[127] ( should become a function ReadKey() )
  1800.  
  1801. bool Joypad[18]; //this is erroneously set up as TYPE_FLOAT in the parser.
  1802. * Similar to Press, except that it only returns presses from a joystick device, not a keyboard.
  1803.  
  1804. float Mouse[6];
  1805. * An array of boolean values that correspond to whether a mouse button, was clicked this frame,
  1806. plus the x/y components of the mouse.
  1807. * Replaces mouse variables under Link->.
  1808.  
  1809. //int Type //this is a dummy function in the table.
  1810.  
  1811. /////////////////
  1812. /// npcdata ///
  1813. /////////////////
  1814.  
  1815.  
  1816. /*
  1817. The npcdata datatype allows the user to load and manipulate Enemy Editor
  1818. data, and to r/w that information.
  1819.  
  1820. Like itemdata, this persists only until the quest exits.
  1821.  
  1822. To use npcdata, you must declare an npcdata typed pointer, then load a npc ID
  1823. to that pointer.
  1824.  
  1825. npcdata nd = Game->LoadNPCData(1); // Load enemy ID 1 to the pointer 'nd'.
  1826.  
  1827. From here, you may access the member functions, and variables as normal:
  1828.  
  1829. nd->HP = 32;
  1830.  
  1831. */
  1832.  
  1833. int Tile;
  1834. * The base tile used by the enemy.
  1835.  
  1836. int Flags,
  1837. int Flags2,
  1838.  
  1839. int Width;
  1840. * The 'width' (W) of base tile used by the enemy.
  1841.  
  1842. int Height;
  1843. * The 'height' (H) of base tile used by the enemy.
  1844.  
  1845. int STile;
  1846. * The base 'special' tile used by the enemy.
  1847.  
  1848. int SWidth;
  1849. * The 'width' (W) of base 'special' tile used by the enemy.
  1850.  
  1851. int SHeight;
  1852. * The 'height' (H) of base 'special' tile used by the enemy.
  1853.  
  1854. int ExTile;
  1855. * The base EXPANDED ('New') tile used by the enemy.
  1856.  
  1857. int ExWidth;
  1858. * The 'width' (W) of base EXPANDED ('New') tile used by the enemy.
  1859.  
  1860. int ExHeight;
  1861. * The 'height' (H) of base EXPANDED ('New') tile used by the enemy.
  1862.  
  1863. int HP;
  1864. * The enemy's base hit points.
  1865.  
  1866. int Family;
  1867. * The 'Type' of the enemy.
  1868.  
  1869. int CSet,
  1870. * Thge CSet used to render the enemy.
  1871.  
  1872. int Anim;
  1873. * The 'O.Anim' used by the enemy.
  1874.  
  1875. int ExAnim;
  1876. * The 'E.Anim' used by the enemy.
  1877.  
  1878. int Framerate;
  1879. * The 'O.Anim' animation framerate used by the enemy.
  1880.  
  1881. int ExFramerate;
  1882. * The 'E.Anim' animation framerate used by the enemy.
  1883.  
  1884. int TouchDamage;
  1885. * The amount of contact damage that the enemy causes when it collides with Link.
  1886.  
  1887. int WeaponDamage;
  1888. * The power of the weapons fired by the enemy.
  1889.  
  1890. int Weapon;
  1891. * The weapon type used by the enemy.
  1892.  
  1893. int Random;
  1894. * The 'random rate' of the enemy.
  1895.  
  1896. int Haltrate;
  1897. * The 'turn frequency' used by the enemy during its movement phase.
  1898.  
  1899. int Step;
  1900. * The enem's step speed.
  1901.  
  1902. int Homing;
  1903. * The homing factor of the enemy. Greater values home more keenly on Link.
  1904.  
  1905. int Hunger;
  1906. * The 'hunger' value of the enemy.
  1907. * Higher values make it more likely that the enemy is attracted to Bait.
  1908. * Vald only for NPCT_WALKING enemies.
  1909.  
  1910. int Dropset;
  1911. * The dropset used by the enemy.
  1912.  
  1913. int BGSFX;
  1914. * The Ambient sound that the enemy emits.
  1915.  
  1916. int DeathSFX;
  1917. * The sound that is played when the enemy dies.
  1918.  
  1919. int HitSFX;
  1920. * The sound that is played when the enemy is hit by an lweapon.
  1921.  
  1922. int DrawXOffset;
  1923. * The horizontal draw offset of the enemy.
  1924. * Note: SizeFlag[??] must be enabled for this to function.
  1925.  
  1926. int DrawYOffset;
  1927. * The vertical draw offset of the enemy.
  1928. * Note: SizeFlag[??] must be enabled for this to function.
  1929.  
  1930. int DrawZOffset;
  1931. * The depth draw offset of the enemy.
  1932. * Note: SizeFlag[??] must be enabled for this to function.
  1933.  
  1934. int HitXOffset;
  1935. * The horizontal hitbox offset of the enemy.
  1936. * Note: SizeFlag[??] must be enabled for this to function.
  1937.  
  1938. int HitYOffset;
  1939. * The vertical hitbox offset of the enemy.
  1940. * Note: SizeFlag[??] must be enabled for this to function.
  1941.  
  1942. int HitWidth;
  1943. * The hitbox width (X component), in pixels, for the enemy.
  1944. * Note: SizeFlag[??] must be enabled for this to function.
  1945.  
  1946. int HitHeight;
  1947. * The hitbox height (Y component), in pixels, for the enemy.
  1948. * Note: SizeFlag[??] must be enabled for this to function.
  1949.  
  1950. int HitZHeight;
  1951. * The hitbox height (Z component), in pixels, for the enemy.
  1952. * Note: SizeFlag[??] must be enabled for this to function.
  1953.  
  1954. int TileWidth;
  1955. * The drawn width (X component) of the enemy in increments of one tile.
  1956. * Note: SizeFlag[??] must be enabled for this to function.
  1957.  
  1958. int TileHeight;
  1959. * The drawn height (Y component) of the enemy in increments of one tile.
  1960. * Note: SizeFlag[??] must be enabled for this to function.
  1961.  
  1962. int WeaponSprite;
  1963. * The sprite used to draw the enemy weapon.
  1964.  
  1965. int Defense[42];
  1966. * The defense categories for the enemy.
  1967.  
  1968. int SizeFlag[2];
  1969. * A set of flags that determine if the values for the Enemy Editor 'Size' tab
  1970. * are rendered by the engine.
  1971.  
  1972. int Attributes[32];
  1973. * The 'Misc. Attributes' of the enemy.
  1974.  
  1975. bool Shield[5];
  1976. * The shield status of the enemy.
  1977. * [0] through [3] correspond to DIR* constants.
  1978. [4] corresponds to ???.
  1979.  
  1980. int FrozenTile;
  1981. * The base tile used to draw the enemy, when the enemy is frozen solid. //Not yet implemented in-engine.
  1982. int FrozenCSet;
  1983. * The CSet value used to render the enemy, when the enemy is frozen solid. //Not yet implemented in-engine.
  1984.  
  1985. t/b/a
  1986. //int Movement[32]
  1987. //* The Movement Pattern values used by the enemy.
  1988. //int WeaponMovement[32]
  1989. //* The Weapon Movement Pattern values used by the enemy.
  1990.  
  1991. //FireSFX
  1992. //* The sound played when the enemy uses its weapon.
  1993.  
  1994.  
  1995.  
  1996. ////////////////////
  1997. /// spritedata ///
  1998. ////////////////////
  1999.  
  2000. /*
  2001. The spritedata datatype allows the user to load and manipulate weapon sprite struct
  2002. data, and to r/w that information.
  2003.  
  2004. Like itemdata, this persists only until the quest exits.
  2005.  
  2006. To use spritedata, you must declare a spritedata typed pointer, then load a sprite ID
  2007. to that pointer.
  2008.  
  2009. spritedata sd = Game->LoadSpriteData(1); // Load weapon sprite 1 to the pointer 'sd'.
  2010.  
  2011. From here, you may access the member functions, and variables as normal:
  2012.  
  2013. sd->Tile = 600;
  2014.  
  2015. */
  2016.  
  2017. int Tile;
  2018. * The tile used by the weapon sprite.
  2019.  
  2020. int Misc;
  2021. * The Misc Type. (or is this Type?)
  2022.  
  2023. int CSet;
  2024. * The CSet used by the sprite.
  2025.  
  2026. int Frames;
  2027. * The number of frames in the animation cycle.
  2028.  
  2029. int Speed;
  2030. * The speed of the animation cycle.
  2031.  
  2032. int Type;
  2033. * The Misc Type. (or is this Misc?)
  2034.  
  2035. //Where are Flash, and Flags?! -Z
  2036.  
  2037. //////////////////
  2038. /// dropdata ///
  2039. //////////////////
  2040.  
  2041. t/b/a
  2042.  
  2043. ////////////////
  2044. /// bitmap ///
  2045. ////////////////
  2046.  
  2047. float GetPixel(int x, int y);
  2048. * Returns the rgbdata value of a pixel on the current bitmap pointer (set by Game->LoadBitmapID).
  2049. // Load()
  2050. // Create()
  2051. // Destroy()
  2052. // All screen drawing instructions.
  2053. // Blit()
  2054. // Resize?
  2055. // int Width (read-only)
  2056. // int Height (read-only)
  2057. // int Depth (read-only)
  2058. // Transform()
  2059.  
  2060.  
  2061. t/b/a
  2062.  
  2063. //////////////////
  2064. /// ponddata ///
  2065. //////////////////
  2066.  
  2067. t/b/a
  2068.  
  2069. //////////////////
  2070. /// warpring ///
  2071. //////////////////
  2072.  
  2073. t/b/a
  2074.  
  2075. /////////////////
  2076. /// doorset ///
  2077. /////////////////
  2078.  
  2079. t/b/a
  2080.  
  2081. ////////////////////
  2082. /// misccolors ///
  2083. ////////////////////
  2084.  
  2085. t/b/a
  2086.  
  2087. /////////////////
  2088. /// rgbdata ///
  2089. /////////////////
  2090.  
  2091. t/b/a
  2092.  
  2093. /////////////////
  2094. /// palette ///
  2095. /////////////////
  2096.  
  2097. t/b/a
  2098.  
  2099. ////////////////
  2100. /// zcmidi ///
  2101. ////////////////
  2102.  
  2103. t/b/a
  2104.  
  2105. //////////////////
  2106. /// palcycle ///
  2107. //////////////////
  2108.  
  2109. t/b/a
  2110.  
  2111. //////////////////
  2112. /// gamedata ///
  2113. //////////////////
  2114.  
  2115. t/b/a
  2116.  
  2117. ////////////////
  2118. /// cheats ///
  2119. ////////////////
  2120.  
  2121. t/b/a
  2122.  
  2123. /////////////////
  2124. /// Debug-> ///
  2125. /////////////////
  2126.  
  2127. float D[256];
  2128. * This is the value of the ri->d[] registers.
  2129. * These vary depending on the function, or the instruction.
  2130. * For variable access, SETTER: ri->d[0] is the value being passed to the variable.
  2131. * For variable access, GETTER: ri->d[0] *MIGHT BE* the value read from ther variable. (Need to verify.)
  2132. * For array access, SETTER: ri->d[0] is the array index, and ri->d[1] is the value.
  2133. * For array access, GETTER: ri->d[0] is the array index. Not sure on the RVal at this time.
  2134.  
  2135. * For functions, ri->d[n] are the args passed to the functions.
  2136. * Typically, the order is ri->d[0] for the first parameter, and each additional param is one index higher.
  2137. * Some functions might pop values in weird ways.
  2138. * It should be possible to purely write functions as SETTER and GETTER types, so that their params
  2139. * are simply the ri->d[] values, in order.
  2140.  
  2141. * Script drawing commands use sdci[] (&script_drawing_commands[n1][n2]), which is different.
  2142. * Their params should still be available via ri->d[], but some values, may not.
  2143. * The frirst param for any script drawing instruction is the BITMAP that it uses.
  2144. * For bitmap-> pointer drawing commands, the bitmap ID is ri->bitmapref, set by Game->LoadBitmapID().
  2145. * Otherwise, the BITMAP pointer is set by SetRenderTarget(), qand held in sdci[18].
  2146. * The other params follow, as inputs from the instruction (function params passed to it).
  2147. * last, the playfield offsets typically follow the function params.
  2148. * Of these, on;y the sdci[] values would be available to ri->d[], if nothing eats them beforehand.
  2149.  
  2150. GDR[256]
  2151. Debug->GetFFCPointer(), SetFFCPointer(), GetItemPointer(), SetItemPointer(), GetItemdataPointer(), SetItemdataPointer()
  2152. GetNPCPointer(), SetNPCPointer(), GetLWeaponPointer(), SetLWeaponPointer(), GetEWeaponPointer(),
  2153. SetEWeaponPointer(), RefFFC, RefItem, RefItemdata, RefLWeapon, RefEWeapon, RefNPC, SP
  2154. ,
  2155.  
  2156.  
  2157.  
  2158. /************************************************************************************************************/
  2159. Game->DEBUGGING: These might find their way into namespace Debug-> instead of Game-> in the future.
  2160. /************************************************************************************************************/
  2161.  
  2162. int RefFFC; ZASM Instruction:
  2163. REFFFC
  2164. /**
  2165. * Returns the present ffc refrence from the stack. FOR DEBUGGING ONLY!
  2166. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  2167. */ Example Use:
  2168.  
  2169. /************************************************************************************************************/
  2170.  
  2171. int RefItem; ZASM Instruction:
  2172. REFITEM
  2173. /**
  2174. * Returns the present item refrence from the stack. FOR DEBUGGING ONLY!
  2175. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  2176. */ Example Use:
  2177.  
  2178. /************************************************************************************************************/
  2179.  
  2180. int RefItemdata; ZASM Instruction:
  2181. REFIDATA
  2182. /**
  2183. * Returns the present itemdata refrence from the stack. FOR DEBUGGING ONLY!
  2184. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  2185. */ Example Use:
  2186.  
  2187. /************************************************************************************************************/
  2188.  
  2189. int RefLWeapon; ZASM Instruction:
  2190. REFLWPN
  2191. /**
  2192. * Returns the present lweapon refrence from the stack. FOR DEBUGGING ONLY!
  2193. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  2194. */ Example Use:
  2195.  
  2196. /************************************************************************************************************/
  2197.  
  2198. int RefEWeapon; ZASM Instruction:
  2199. REFEWPN
  2200. /**
  2201. * Returns the present eweapon refrence from the stack. FOR DEBUGGING ONLY!
  2202. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  2203. */ Example Use:
  2204.  
  2205. /************************************************************************************************************/
  2206.  
  2207. int RefNPC; ZASM Instruction:
  2208. REFNPC
  2209. /**
  2210. * Returns the present npc refrence from the stack. FOR DEBUGGING ONLY!
  2211. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  2212. */ Example Use:
  2213.  
  2214. /************************************************************************************************************/
  2215.  
  2216. int SP; ZASM Instruction:
  2217. SP
  2218. /**
  2219. * Returns the value of the stack pointer. FOR DEBUGGING ONLY!
  2220. * THIS WILL BE DISABLED IN RELEASE BUILDS !
  2221. */ Example Use:
  2222.  
  2223.  
  2224. ////////////////////////
  2225. /// Not Implemented ///
  2226. ////////////////////////
  2227.  
  2228. void ComboArray ( int layer, int number_of_combos,
  2229. int combos[],
  2230. int x_positions[],
  2231. int y_positions[],
  2232. int csets[]);
  2233.  
  2234. ZASM: COMBOARRAY
  2235.  
  2236. /**
  2237. *
  2238. * Draws a number of combos specified by 'number_of_combos' to 'layer'.
  2239. * Specify the combos by populating an array with their IDs and passing the array ointer to 'combos'.
  2240. * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
  2241. * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
  2242. * Specify the CSet for each by passing an array with their csets to 'csets'.
  2243. *
  2244. * This function counts as a single draw.
  2245. *
  2246. * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
  2247. *// Example:
  2248.  
  2249. int combos[4] = {16,19,31,20};
  2250. int cmbx[4]= {0, 16, 32, 48}:
  2251. int cmby[4]={8, 8, 8, 8);
  2252. int cmbc[4]={0,0,0,0};
  2253. Screen->ComboArray(6, 4, combos, cmbx, cmby, cmbc);
  2254.  
  2255.  
  2256.  
  2257. void TileArray ( int layer, int number_of_tiles,
  2258. int tiles[],
  2259. int x_positions[],
  2260. int y_positions[],
  2261. int csets[]);
  2262.  
  2263. ZASM: TILEARRAY
  2264.  
  2265. /**
  2266. *
  2267. * Draws a number of tiles specified by 'number_of_tiles' to 'layer'.
  2268. * Specify the tiles by populating an array with their IDs and passing the array ointer to 'tiles'.
  2269. * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
  2270. * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
  2271. * Specify the CSet for each by passing an array with their csets to 'csets'.
  2272. *
  2273. * This function counts as a single draw.
  2274. *
  2275. * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
  2276. *// Example:
  2277.  
  2278. int tiles[4] = {16,19,31,20};
  2279. int tilx[4]= {0, 16, 32, 48}:
  2280. int tily[4]={8, 8, 8, 8);
  2281. int tilc[4]={0,0,0,0};
  2282. Screen->TileArray(6, 4, tiles, tilx, tily, tilc);
  2283.  
  2284.  
  2285. /************************************************************************************************************/
  2286.  
  2287. void PixelArray ( int layer, int number_of_pixels,
  2288. int x_positions[],
  2289. int y_positions[],
  2290. int colours[]);
  2291.  
  2292. ZASM: PIXELARRAY
  2293.  
  2294. /**
  2295. *
  2296. * Draws a number of pixel, similar to PutPixel, specified by 'number_of_pixels' to 'layer'.
  2297. * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
  2298. * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
  2299. * Specify the colour for each by passing an array with their csets to 'colours'.
  2300. *
  2301. * This function counts as a single draw.
  2302. *
  2303. * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
  2304. *// Example:
  2305.  
  2306. int pix[4] = {16,19,31,20};
  2307. int px[4]= {0, 16, 32, 48}:
  2308. int py[4]={8, 8, 8, 8);
  2309. int pc[4]={0x12,0xB0,0xDA,0x4F};
  2310. Screen->TileArray(6, 4, pix, px, py, pc);
  2311.  
  2312. /************************************************************************************************************/
  2313.  
  2314. CreateBitmap(int id, int xsize, int ysize)
  2315.  
  2316. * Min size 1, max 2048
  2317. /************************************************************************************************************/
  2318.  
  2319. SetRenderSource(int target, int x, int y, int w, int h)
  2320.  
  2321. /************************************************************************************************************/
  2322.  
  2323. void Polygon ( int layer, ... );
  2324.  
  2325. ZASM: POLYGON
  2326.  
  2327. * Adding to Beta 9 : Postponed -Z
  2328.  
  2329. /************************************************************************************************************/
  2330.  
  2331. //To add:
  2332. Game->Freeze(int type) or Game->Suspend()
  2333. datatype->Create(), Load(), Destroy()
RAW Paste Data