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