-
Notifications
You must be signed in to change notification settings - Fork 0
/
std_extension.txt
617 lines (476 loc) · 26 KB
/
std_extension.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
//std_extension - Extended std.zh
//Docs for 2.55 Alpha 16
//1st April, 2019
int AdjacentCombo(int cmb, int dir)
* Returns the combo adjacent to a combo at position 'cmb' with a given direction.
int AdjacentCombo(int cmb, int dir, int dist)
* Returns the combo adjacent to a combo at position 'cmb' with a given direction at a distance
* of 'dist' combo positions away in that direction.
* Returns the combo on the screen edge of dist would overflow the screen.
float BoolToFloat(bool input);
int BoolToInt(bool input) ;
* Convert boolean variable 'input' to floating point, or int.
int CenterComboX(int loc);
* Returns the centre X-component coordinate for a combo at position 'loc'
* Similar to Center*() functions, and ComboX().
int CenterComboY(int loc);
* Returns the centre Y-component coordinate for a combo at position 'loc'
* Similar to Center*() functions, and ComboY().
int CenterLinkX(bool hitoffset);
int CenterLinkX(bool hitoffset, bool drawoffset);
* As CenterLinkX(), but overloaded to allow including the hit and draw offsets
* for his sprite.
int CenterLinkY(bool hitoffset);
int CenterLinkY(bool hitoffset, bool drawoffset);
* As CenterLinkY(), but overloaded to allow including the hit and draw offsets
* for his sprite.
int CenterX(T, bool usehitbox);
* Returns X-component centre of any sprited object, with option to use either its
* actual coordinates, or those of its sprite.
* Overloaded for all object types.
* Set 'usehitbox' true to use the hitbox centre, or false to use the sprite centre.
int CenterX(T, bool usehitbox, bool trueoffset, bool drawoffset);
* Returns X-component centre of any sprited object, with option to use either its
* actual coordinates, or those of its sprite.
* Overloaded for all object types.
* Set 'usehitbox' true to use the hitbox centre, or false to use the sprite centre.
* Includes the option to base this using its HitXOffset and DrawXOffset
int CenterY(T, bool usehitbox);
* Returns Y-component centre of any sprited object, with option to use either its
* actual coordinates, or those of its sprite.
* Overloaded for all object types.
* Set 'usehitbox' true to use the hitbox centre, or false to use the sprite centre.
int CenterY(T, bool usehitbox, bool trueoffset, bool drawoffset);
* Returns Y-component centre of any sprited object, with option to use either its
* actual coordinates, or those of its sprite.
* Overloaded for all object types.
* Set 'usehitbox' true to use the hitbox centre, or false to use the sprite centre.
* Includes the option to base this using its HitXOffset and DrawXOffset
bool Chance(int percentChance);
* Randomly returns true, or false, using input 'percentChance' to determine the percentage change of a 'true return'
* This is a percentile check. e.g., if ( Chance(50) ) returns true if the RNG of 1->100 is < 50.
bool ChooseB();
* Fairly select between true or false.
bool ChooseB(bool a, bool b);
bool ChooseB(bool a, bool b, bool c);
bool ChooseB(bool a, bool b, bool c, bool d);
bool ChooseB(bool a, bool b, bool c, bool d, bool e);
bool ChooseB(bool a, bool b, bool c, bool d, bool e, bool f);
bool ChooseB(bool a, bool b, bool c, bool d, bool e, bool f, bool g);
bool ChooseB(bool a, bool b, bool c, bool d, bool e, bool f, bool g, bool h);
* Chooses one of the boolean options randomly and fairly.
* Overloaded for two to eight args.
void ClearFFC(int ffc_id);
* Clears all variables, flags and scripts on ffc ID 'ffc_id'.
void CloneCombo(int pos_a, int pos_b)
* Clones combo from position 'pos_a' to position 'pos_b'
void CloneLayerCombo(int layer, int pos_a, int pos_b)
* Clones combo on layer 'layer' posigtion 'pos_a' to the same layer at position 'pos_b'
void CloneLayerCombo(int layer_a, int layer_b, int pos_a, int pos_b);
* Clones a combo on layer 'layer_a' at position 'pos_a', to layer 'layer_b" at position 'pos_b'.
bool Collision(int cmb);
* Check for collision between Link and a combo at location 'cmb'.
bool Collision(int cmb, bool checkcoldetection) ;
* Check for collision between Link and a combo at position 'cmb' .
* Set checkcoldetection to true if you wish to return false from an NPC with ColDetection disabled.
bool Collision(int cmb, ffc f)
* Check for collision between ffc 'f' and a combo at location 'cmb'.
bool Collision(T, int cmb);
bool Collision(int cmb, T);
* Returns collision between any sprited object and a combo position.
* Overloaded to use all sprited object types, and reversed arguments.
bool Collision(T, int cmb, bool checkcoldetection);
* Returns collision between any sprited object, and a combo at position cmb.
* Overloaded for all sprited object types.
* You can specify that if CollDetection on the sprited object is false, that
* this funtion will also return false.
bool Collision(int cmb, ffc f, int a1, int b1, int c1, int d1, int a2, int b2, int c2, int d2);
* Overload for Collision(combo, ffc) with additional constraints on the hitboxes of both.
bool Collision(int cmb, T, int a1, int b1, int c1, int d1, int a2, int b2, int c2, int d2);
* Overload for Collision(combo, sprited_obj T) with additional constraints on the hitboxes of both.
bool CollisionDir(int cmb, lweapon l, int dir, bool checkcoldetection);
* Returns collision between an lweapon and a combo, as Collision(int pos, lweapon).
* Returns false if the weapon is not facing direction 'dir'.
* If checkcoldetection == true, and weap->CollDetection == false, this returns false.
bool CollisionDir(int cmb, lweapon l, int dir, bool facingspecificdir, bool checkcoldetection);
* Returns collision between an lweapon and a combo, as Collision(int pos, lweapon).
* If facingspecificdir == true and weapon->Dir != dir, this returns false.
* If facingspecificdir == false, and weapon->Dir == dir, this returns false.
* This allows setting a check if the weapon is any direction other than 'dir'.
* If checkcoldetection == true, and weap->CollDetection == false, this returns false.
int DecimalToInt(int v);
* Converts floating point value 'v', after the decimal, to an integer.
int DirRev(int dir);
* Returns the inverse of a given cardinal direction.
void DirRev(eweapon l);
void DirRev(lweapon l);
void DirRev(npc l);
* Takes a pointer to a given object, and reverses its direction.
int DirX(int dir);
* Returns a multiplication factor for ->Step based on direction.
* Specifically, return the x component of a line with a length of 1 extending
* in the given direction from origin.
* Use: Step = step * DirX(dir);
* Valid only if dir is 0 to 7.
int DirY(int dir);
* Returns a multiplication factor for ->Step based on direction.
* Specifically, return the y component of a line with a length of 1 extending
* in the given direction from origin.
* Use: Step = step * DirX(dir);
* Valid only if dir is 0 to 7.
float Distance(int x1, int y1, int x2, int y2, int scale) ;
* Returns the distance between two sets of coordinates using Pythagoras' Theorem
* Allows scaling for large distance determinations.
* Argument 'scale' represents a ratio of 1:scale.
* Argument 'scale' is most precise when using powers of 10 (i.e. 1, 10, 100, 1000, 10000).
* If arg 'scale' is set to 0, it defaults to '1'.
* Returns -1 on error.
float Distance2(int x1, int y1, int x2, int y2) ;
* As Distance(), but uses std.cfg settings to control behaviour on overflow/underflow/illegal values.
bool DistX(int combo_pos, int distance);
* Returns true if the absolute distance on the X-axis between Link and a specified combo
* position is < 'distance'.
bool DistX(ffc ff_id, int distance);
* Returns true if the absolute distance on the X-axis between Link and a specified ffc
* position is < 'distance'.
bool DistX(T, int distance);
* Returns true if the absolute distance on the X-axis between Link and a specified sprited
* object type T, is < 'distance'.
bool DistX(int combo_a, int combo_b);
* Returns true if the absolute distance on the X-axis between two combo positions is < 'distance'.
bool DistX(ffc ffid, int combo_pos);
bool DistX(int combo_pos, ffc ffid);
* Returns true if the absolute distance on the X-axis between a specified ffc
* and a combo position is < 'distance'.
* Overloaded for reversed args order.
bool DistX(int combo_pos, T);
bool DistX(T, int combo_pos);
* Returns true if the absolute distance on the X-axis between a sprited object T
* and a combo position is < 'distance'.
* Overloaded for all sprited object types.
* Overloaded for reversed args order.
bool DistX(T, T);
* Returns true if the absolute distance on the X-axis between two sprited object types is < 'distance'.
* Overloaded for all sprited object combinations.
bool DistY(int combo_pos, int distance);
* Returns true if the absolute distance on the Y-axis between Link and a specified combo
* position is < 'distance'.
bool DistY(ffc ff_id, int distance);
* Returns true if the absolute distance on the Y-axis between Link and a specified ffc
* position is < 'distance'.
bool DistY(T, int distance);
* Returns true if the absolute distance on the Y-axis between Link and a specified sprited
* object type T, is < 'distance'.
bool DistY(int combo_a, int combo_b);
* Returns true if the absolute distance on the Y-axis between two combo positions is < 'distance'.
bool DistY(ffc ffid, int combo_pos);
bool DistY(int combo_pos, ffc ffid);
* Returns true if the absolute distance on the Y-axis between a specified ffc
* and a combo position is < 'distance'.
* Overloaded for reversed args order.
bool DistY(int combo_pos, T);
bool DistY(T, int combo_pos);
* Returns true if the absolute distance on the Y-axis between a sprited object T
* and a combo position is < 'distance'.
* Overloaded for all sprited object types.
* Overloaded for reversed args order.
bool DistY(T, T);
* Returns true if the absolute distance on the Y-axis between two sprited object types is < 'distance'.
* Overloaded for all sprited object combinations.
lweapon EtoLWeapon(eweapon a);
* Creates an lweapon with the attributes of eweapon 'e', converting its type to the closest
* possible match in the process.
void EToLWeapon(lweapon b, eweapon a);
void EToLWeapon(eweapon a, lweapon b);
* Copies the attributes of an eweapon, to an lweapon, converting its type int he process.
* Overloaded for reversed args order.
int EtoLWeaponID(int type);
* Takes an eweapon type and returns the closest compatible match as an lweapon type.
* Returns -1 if the type is illegal;
lweapon EWeaponToLWeapon(eweapon a);
* See: EtoLWeapon(eweapon);
void EWeaponToLWeapon(eweapon a, lweapon b);
* See: EtoLWeapon(lweapon,eweapon);
int EWeaponToLWeaponID(int type);
* See: EtoLWeaponID(int);
int GetDigitValue(int n, int place);
* Extracts a single digit from n at the place specified.
* -4 is the ten-thousandTHs place, 0 is the ones spot, and 4 is the ten-thousanDs spot.
int GetHighFloat(int n);
* Takes a float as input 'n', and returns the integer portion as int.
int GetLowFloat(int n);
* Takes a float as input 'n', and returns the decimal portion as int.
int GetPartialValue(int n, int place, int num);
* Extracts an integer using specific places of any value 'n', from position 'place' plus a number of places 'num'.
void GiveLinkItem(int itm_id);
void GiveLinkItem(int itm_id, int holdtype);
* Creates an item on the screen at Link's coordinatesm giving it to him,
* and running its collect script (if any).
* Overloaded to allow setting a 'hold up item' action, where valid args are:
0: None
1: One-hand, automatic for land or water
2: Two-hand, automatic for land or water.
LA_HOLD1LAND
LA_HOLD12AND
LA_HOLD1WATER
LA_HOLD2WATER
int Greater(int valA, int valB)
int Greater(int valA, int valB, int valC)
int Greater(int valA, int valB, int valC, int valD)
int Greater(int valA, int valB, int valC, int valD, int valE)
int Greater(int valA, int valB, int valC, int valD, int valE, int valF)
int Greater(int valA, int valB, int valC, int valD, int valE, int valF, int valG)
int Greater(int valA, int valB, int valC, int valD, int valE, int valF, int valG, int valH)
* Accepts two to eight args, aand returns the arg that is the greatest numeric literal value.
int Greatest(int arr);
* Returns the highest value stored in an array.
int GreatestIndex(int arr);
* Returns the array index of the highest value stored in an array.
* If two or more indices of the array contain the same (highest) value, this will return the
* highest-numbered index containing that value.
int HitboxBottom();
* Returns the Y value for the bottom of Link's hitbox.
int HitboxLeft();
* Returns the Y value for the left edge of Link's hitbox.
int HitboxRight();
* Returns the X value for the right edge of Link's hitbox.
int HitboxTop();
* Returns the Y value for the top of Link's hitbox.
int ImpactVelocity(int mass1, int velocity1, int mass2, int velociy2 )
* Accepts the mass, and velocity if two objects. Determins the acceleration on impact.
* Returns the net change that would affect both objects.
int ImpactVelocityA(int massA, int velocityA, int massB, int velociyB )
* Accepts the mass, and velocity if two objects. Determins the acceleration on impact.
* Returns the change of acceleration for object 'B'.
int ImpactVelocityB(int massA, int velocityA, int massB, int velociyB )
* Accepts the mass, and velocity if two objects. Determins the acceleration on impact.
* Returns the change of acceleration for object 'B'.
void ImpactVelocity(lweapon a, eweapon b, int massA, int velocityA, int massB, int velociyB )
* Accepts the mass, and velocity if two weapons. Determins the acceleration on impact.
* Changes the Step of both to reflect their mass on collision.
int Least(int arr);
* Returns the lowest value stored in an array.
int LeastIndex(int arr);
* Returns the array index of the lowest value stored in an array.
* If two or more indices of the array contain the same (lowest) value, this will return the
* highest-numbered index containing that value.
int Lesser(int valA, int valB)
int Lesser(int valA, int valB, int valC)
int Lesser(int valA, int valB, int valC, int valD)
int Lesser(int valA, int valB, int valC, int valD, int valE)
int Lesser(int valA, int valB, int valC, int valD, int valE, int valF)
int Lesser(int valA, int valB, int valC, int valD, int valE, int valF, int valG)
int Lesser(int valA, int valB, int valC, int valD, int valE, int valF, int valG, int valH)
* Accepts two to eight args, aand returns the arg that is the least numeric literal value.
bool LinkFacing(ffc f);
* Returns if Link is facing the specified ffc.
bool LinkFacing(int combo_pos);
* Returns if Link is facing the specified combo position.
bool LinkFacing(T);
* Returns if Link is facing the sprited object T.
* Overloaded for all sprited object types.
eweapon LtoEWeapon(eweapon a);
* Creates an eweapon with the attributes of lweapon 'e', converting its type to the closest
* possible match in the process.
void LtoEWeapon(lweapon b, eweapon a);
void LtoEWeapon(eweapon a, lweapon b);
* Copies the attributes of an lweapon, to an eweapon, converting its type int he process.
* Overloaded for reversed args order.
int LtoEWeaponID(int type);
* Takes an lweapon type and returns the closest compatible match as an eweapon type.
* Returns -1 if the type is illegal;
eweapon LWeaponToEWeapon(eweapon a);
* See: LtoEWeapon(lweapon);
void LWeaponToEWeapon(lweapon a, eweapon b);
* See: LtoEWeapon(lweapon,eweapon);
int LWeaponToEWeaponID(int type);
* See: LtoEWeaponID(int);
void NoInput();
* Kills inputs from A, B, L, R, Start, Map, and Ex buttons.
void NoInput(bool stick);
* Kills inputs from A, B, L, R, Start, Map, and Ex buttons.
* Allows killing analogue stick inputs as well.
* Matching - Comparison Functions: use an array (list) of values, and compare against a pointer, or pointer variable.
bool MatchAction(int list)
* Match the present Link->Action to those on array 'list'.
* Returns true of any of the entries on the list match.
* Checks if the present Link->Action is one from a predefined list.
bool MatchComboC(int list, int cmb)
* Compares combo 'cmb' and compares it to the values in array 'list'.
* Returns true of any of the entries on the list match its CSet.
bool MatchComboD(int list, int cmb)
* Compares combo 'cmb' and compares it to the values in array 'list'.
* Returns true of any of the entries on the list match its Data.
bool MatchComboF(int list, int cmb)
* Compares combo 'cmb' and compares it to the values in array 'list'.
* Returns true of any of the entries on the list match its Flag.
bool MatchComboI(int list, int cmb)
* Compares combo 'cmb' and compares it to the values in array 'list'.
* Returns true of any of the entries on the list match its Inherent Flag.
bool MatchComboS(int list, int cmb)
* Compares combo 'cmb' and compares it to the values in array 'list'.
* Returns true of any of the entries on the list match its Solidity.
bool MatchComboT(int list, int cmb)
* Compares combo 'cmb' and compares it to the values in array 'list'.
* Returns true of any of the entries on the list match its Type.
bool MatchEWeaponType(int list, eweapon e)
* Match a given eweapon to the contents of an array 'list'
* Returns true of any of the entries on the list match.
int MatchFFCScript(int script_id)
* Matches a running ffc script to script_id.
* Returns the ffc running that script, if any.
* Returns 0 on failure to find a match.
int MatchFFCScript(int script_id, int list)
* Compares the scripts of all running ffcs, to all indices of an array 'list' searching for
* a match to ffc script 'script_id'.
* If there is a match, it MatchScript() will return the first match (FFC number) found.
bool MatchItem(int list, item i)
* Match a given item ID number to the contents of an array 'list'
* Returns true of any of the entries on the list match.
bool MatchLayerComboC(int list, int layer, int cmb)
* Compares combo 'cmb' on Layer 'layer' and compares it to the values in array 'list'.
* Returns true of any of the entries on the list match its CSet.
bool MatchLayerComboD(int list, int layer, int cmb)
* Compares combo 'cmb' on Layer 'layer' and compares it to the values in array 'list'.
* Returns true of any of the entries on the list match its Data.
bool MatchLayerComboF(int list, int layer, int cmb)
* Compares combo 'cmb' on Layer 'layer' and compares it to the values in array 'list'.
* Returns true of any of the entries on the list match its Flag.
bool MatchLayerComboI(int list, int layer, int cmb)
* Compares combo 'cmb' on Layer 'layer' and compares it to the values in array 'list'.
* Returns true of any of the entries on the list match its Inherent Flag.
bool MatchLayerComboS(int list, int layer, int cmb);
* Compares combo 'cmb' on Layer 'layer' and compares it to the values in array 'list'.
* Returns true of any of the entries on the list match its Solidity.
bool MatchLayerComboT(int list, int layer, int cmb);
* Compares combo 'cmb' on Layer 'layer' and compares it to the values in array 'list'.
* Returns true of any of the entries on the list match its Type.
bool MatchLWeaponType(int list, lweapon l);
* Match a given lweapon to the contents of an array 'list'
* Returns true of any of the entries on the list match.
bool MatchNPC(int list, npc n);
* Match a given npc ID number to the contents of an array 'list'
* Returns true of any of the entries on the list match.
bool MatchNPCT(int list, npc n);
* Match a given NPC TYPE to the contents of an array 'list'
* Returns true of any of the entries on the list match.
void NoLinkKnockback();
* Negates engine knockback for Link on land, or in water.
void NoLinkKnockbackLand();
* Negates engine knockback for Link only on land.
void NoLinkKnockbackWater();
* Negates engine knockback for Link only in water.
void NoPress();
* Kills presses from A, B, L, R, Start, Map, and Ex buttons.
void NoPress(bool stick);
* Kills presses from A, B, L, R, Start, Map, and Ex buttons.
* Allows killing analogue stick inputs as well.
int ProximityX(int a);
* Returns the X-axis absolute distance in pixels between Link and a combo at pos 'a'.
int ProximityX(ffc ffc_id);
* Returns the X-axis absolute distance in pixels between Link and a given ffc ID.
int ProximityX(int cmb_a, int cmb_b);
int ProximityX(int cmb_a, int cmb_b, bool from-centre);
* Returns the absolute X-axis distance in pixels between two combo positions.
* Overloaded with an an arg to measure from the centre of both objects.
int ProximityX(T);
* Returns the X-axis absolute distance in pixels between Link and a given sprited object T.
* Overloaded for all sprited object types.
int ProximityX(int combo_pos, T);
int ProximityX(T, int combo_pos);
int ProximityX(int combo_pos, T, bool from-centre);
int ProximityX(T, int combo_pos, bool from-centre);
* Returns the X-axis absolute distance in pixels between a combo position and any sprited object T.
* Overloaded for all sprited object types, and for reversed args order.
* Overloaded with an an arg to measure from the centre of both objects.
int ProximityX(ffc a, ffc b);
int ProximityX(ffc a, ffc b, bool from-centre);
* Returns the X-axis absolute distance in pixels between two ffcs.
* Overloaded with an an arg to measure from the centre of both objects.
int ProximityX(ffc ffc_id, T);
int ProximityX(T, ffc ffc_id);
int ProximityX(ffc ffc_id, T, bool from-centre);
int ProximityX(T, ffc ffc_id, bool from-centre);
* Returns the X-axis absolute distance in pixels between an ffc and any sprited object T.
* Overloaded for all sprited object types, and for reversed args order.
* Overloaded with an an arg to measure from the centre of both objects.
int ProximityX(T, T);
int ProximityX(T, T, bool from-centre);
* Returns the X-axis absolute distance in pixels between two sprited objects T.
* Overloaded for all sprited object types, and for reversed args order.
* Overloaded with an an arg to measure from the centre of both objects.
int ProximityY(int a);
* Returns the Y-axis absolute distance in pixels between Link and a combo at pos 'a'.
int ProximityY(ffc ffc_id);
* Returns the Y-axis absolute distance in pixels between Link and a given ffc ID.
int ProximityY(int cmb_a, int cmb_b);
int ProximityY(int cmb_a, int cmb_b, bool from-centre);
* Returns the absolute Y-axis distance in pixels between two combo positions.
* Overloaded with an an arg to measure from the centre of both objects.
int ProximityY(T);
* Returns the Y-axis absolute distance in pixels between Link and a given sprited object T.
* Overloaded for all sprited object types.
int ProximityY(int combo_pos, T);
int ProximityY(T, int combo_pos);
int ProximityY(int combo_pos, T, bool from-centre);
int ProximityY(T, int combo_pos, bool from-centre);
* Returns the Y-axis absolute distance in pixels between a combo position and any sprited object T.
* Overloaded for all sprited object types, and for reversed args order.
* Overloaded with an an arg to measure from the centre of both objects.
int ProximityY(ffc a, ffc b);
int ProximityY(ffc a, ffc b, bool from-centre);
* Returns the Y-axis absolute distance in pixels between two ffcs.
* Overloaded with an an arg to measure from the centre of both objects.
int ProximityY(ffc ffc_id, T);
int ProximityY(T, ffc ffc_id);
int ProximityY(ffc ffc_id, T, bool from-centre);
int ProximityY(T, ffc ffc_id, bool from-centre);
* Returns the Y-axis absolute distance in pixels between an ffc and any sprited object T.
* Overloaded for all sprited object types, and for reversed args order.
* Overloaded with an an arg to measure from the centre of both objects.
int ProximityY(T, T);
int ProximityY(T, T, bool from-centre);
* Returns the Y-axis absolute distance in pixels between two sprited objects T.
* Overloaded for all sprited object types, and for reversed args order.
* Overloaded with an an arg to measure from the centre of both objects.
bool RandB();
* Randomly returns true or false;
bool RandB(int percentTrue);
* Randomly returns a percentile check.
float SafeDistance(int x1, int y1, int x2, int y2);
* As Distance(), but with additional sanity checks.
float SafeSqrt(float val);
* Safe Sqrt functions if an irrational number would be involved.
* Returns '464' (square root of 215296), if the value passed is negative.
* Returns '0' on Sqrt(0).
float SafeSqrt(float val, float specifyNegRet);
* Returns square root of 'val'.
* Returns 'specifyNegRet' if a negative value is passed as 'val'. Returns '0' for Sqrt(0).
void ScreenToLayer(int sourceMap, int sourceScreen, int layerMin, int layerMax, int drawOpacity, int destLayer);
* Draws a screen specified by 'sourceMap and sourceScreen;, from layers specified by 'layerMin and layerMax',
* at a desired opacity, to the layer specified by 'destLayer' of the current screen.
void ScreenToLayer(int sourceMap, int sourceScreen, int drawOpacity, int destLayer);
* Draws all layers of a screen specified by 'sourceMap and sourceScreen;,
* at a desired opacity, to the layer specified by 'destLayer' of the current screen.
void SetCombo(int pos, int data, int type, int flag, int inh_flag, int cset, int solid)
* Sets the values for combo at position 'pos' to those specified. Pass -1 to leave a value unchanged.
void SetLayerComboValues(int layer, int pos, int data, int type, int flag, int inh_flag, int cset, int solid)
* Sets the values for a combo on layer 'layer', at position 'pos' to the values specified.
* Pass -1 to any value to leave it unchanged.
int SpeedRev(int speed, int reduceinertia);
* Returns a reversed speed, given a new speed for an object given a base speed and an interia factor.
void TraceArray(int arr);
* Trace the indices of an array, with a space between each.
void TraceArray(int arr, bool verbose);
* As above, with additional logging.
* WARNING: Very slow.
void TraceArrayB(bool arr, int size);
void TraceArrayB(bool arr, int size, bool verbose);
* As TraceArray(), for boolean arrays.
* You must provide the array size.
void TraceStr(int string, int value);
* Traces a string, and traces a value appended at its end.
void TraceStrB(int string, bool value);
* As TraceStr(), but the value is a bool and it prints true/false.
bool Xor(bool valA, bool valB);
* Returns the result of a logical exclusive-or on two boolean values.