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
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
#![allow(improper_ctypes, non_snake_case)]
pub struct Unit;
pub struct Player;
pub struct Region;
pub struct Force;
pub struct Bullet;
pub struct Game;
pub struct Client;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Race {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Order {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Color {
pub color: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TextSize {
pub size: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoordinateType {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MouseButton {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct KeyButton {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Error {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UnitType {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct PlayerType {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct WeaponType {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TechType {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UpgradeType {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UnitCommandType {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct BulletType {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GameType {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Position {
pub x: ::std::os::raw::c_int,
pub y: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TilePosition {
pub x: ::std::os::raw::c_int,
pub y: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct WalkPosition {
pub x: ::std::os::raw::c_int,
pub y: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UnitCommand {
pub unit: *mut Unit,
pub type_: UnitCommandType,
pub target: *mut Unit,
pub x: ::std::os::raw::c_int,
pub y: ::std::os::raw::c_int,
pub extra: ::std::os::raw::c_int,
}
pub struct BwString;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct EventType {
pub id: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Event {
pub position: Position,
pub text: *mut ::std::os::raw::c_void,
pub unit: *mut Unit,
pub player: *mut Player,
pub type_: EventType,
pub winner: bool,
}
pub struct Iterator;
pub struct UnitIterator;
pub struct PlayerIterator;
pub struct ForceIterator;
pub struct BulletIterator;
pub struct RegionIterator;
pub struct PositionIterator;
pub struct TilePositionIterator;
pub struct EventIterator;
pub struct UnitTypeIterator;
pub type UnaryUnitFilter = ::std::option::Option<unsafe extern "C" fn(unit: *mut Unit) -> bool>;
pub type BestUnitFilter =
::std::option::Option<unsafe extern "C" fn(left: *mut Unit, right: *mut Unit) -> *mut Unit>;
extern "C" {
pub fn BwString_new(
data: *const ::std::os::raw::c_char,
len: ::std::os::raw::c_int,
) -> *mut BwString;
}
extern "C" {
pub fn BwString_data(self_: *const BwString) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn BwString_len(self_: *const BwString) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn BwString_release(self_: *mut BwString);
}
extern "C" {
pub fn Iterator_valid(self_: *const Iterator) -> bool;
}
extern "C" {
pub fn Iterator_get(self_: *const Iterator) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Iterator_next(self_: *mut Iterator);
}
extern "C" {
pub fn Iterator_release(self_: *mut Iterator);
}
extern "C" {
pub fn BWAPIC_setGame(game: *mut Game);
}
extern "C" {
pub fn BWAPIC_getGame() -> *mut Game;
}
extern "C" {
pub fn Game_getForces(self_: *mut Game) -> *mut ForceIterator;
}
extern "C" {
pub fn Game_getPlayers(self_: *mut Game) -> *mut PlayerIterator;
}
extern "C" {
pub fn Game_getAllUnits(self_: *mut Game) -> *mut UnitIterator;
}
extern "C" {
pub fn Game_getMinerals(self_: *mut Game) -> *mut UnitIterator;
}
extern "C" {
pub fn Game_getGeysers(self_: *mut Game) -> *mut UnitIterator;
}
extern "C" {
pub fn Game_getNeutralUnits(self_: *mut Game) -> *mut UnitIterator;
}
extern "C" {
pub fn Game_getStaticMinerals(self_: *mut Game) -> *mut UnitIterator;
}
extern "C" {
pub fn Game_getStaticGeysers(self_: *mut Game) -> *mut UnitIterator;
}
extern "C" {
pub fn Game_getStaticNeutralUnits(self_: *mut Game) -> *mut UnitIterator;
}
extern "C" {
pub fn Game_getBullets(self_: *mut Game) -> *mut BulletIterator;
}
extern "C" {
pub fn Game_getNukeDots(self_: *mut Game) -> *mut PositionIterator;
}
extern "C" {
pub fn Game_getEvents(self_: *mut Game) -> *mut EventIterator;
}
extern "C" {
pub fn Game_getForce(self_: *mut Game, forceID: ::std::os::raw::c_int) -> *mut Force;
}
extern "C" {
pub fn Game_getPlayer(self_: *mut Game, playerID: ::std::os::raw::c_int) -> *mut Player;
}
extern "C" {
pub fn Game_getUnit(self_: *mut Game, unitID: ::std::os::raw::c_int) -> *mut Unit;
}
extern "C" {
pub fn Game_indexToUnit(self_: *mut Game, unitIndex: ::std::os::raw::c_int) -> *mut Unit;
}
extern "C" {
pub fn Game_getRegion(self_: *mut Game, regionID: ::std::os::raw::c_int) -> *mut Region;
}
extern "C" {
pub fn Game_getGameType(self_: *mut Game) -> GameType;
}
extern "C" {
pub fn Game_getLatency(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_getFrameCount(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_getReplayFrameCount(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_getFPS(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_getAverageFPS(self_: *mut Game) -> f64;
}
extern "C" {
pub fn Game_getMousePosition(self_: *mut Game) -> Position;
}
extern "C" {
pub fn Game_getMouseState(self_: *mut Game, button: MouseButton) -> bool;
}
extern "C" {
pub fn Game_getKeyState(self_: *mut Game, key: KeyButton) -> bool;
}
extern "C" {
pub fn Game_getScreenPosition(self_: *mut Game) -> Position;
}
extern "C" {
pub fn Game_setScreenPosition(self_: *mut Game, p: Position);
}
extern "C" {
pub fn Game_pingMinimap(self_: *mut Game, p: Position);
}
extern "C" {
pub fn Game_isFlagEnabled(self_: *mut Game, flag: ::std::os::raw::c_int) -> bool;
}
extern "C" {
pub fn Game_enableFlag(self_: *mut Game, flag: ::std::os::raw::c_int);
}
extern "C" {
pub fn Game_getUnitsOnTile(
self_: *mut Game,
tile: TilePosition,
pred: UnaryUnitFilter,
) -> *mut UnitIterator;
}
extern "C" {
pub fn Game_getUnitsInRectangle(
self_: *mut Game,
topLeft: Position,
bottomRight: Position,
pred: UnaryUnitFilter,
) -> *mut UnitIterator;
}
extern "C" {
pub fn Game_getUnitsInRadius(
self_: *mut Game,
center: Position,
radius: ::std::os::raw::c_int,
pred: UnaryUnitFilter,
) -> *mut UnitIterator;
}
extern "C" {
pub fn Game_getClosestUnit(
self_: *mut Game,
center: Position,
pred: UnaryUnitFilter,
radius: ::std::os::raw::c_int,
) -> *mut Unit;
}
extern "C" {
pub fn Game_getClosestUnitInRectangle(
self_: *mut Game,
center: Position,
pred: UnaryUnitFilter,
left: ::std::os::raw::c_int,
top: ::std::os::raw::c_int,
right: ::std::os::raw::c_int,
bottom: ::std::os::raw::c_int,
) -> *mut Unit;
}
extern "C" {
pub fn Game_getBestUnit(
self_: *mut Game,
best: BestUnitFilter,
pred: UnaryUnitFilter,
center: Position,
radius: ::std::os::raw::c_int,
) -> *mut Unit;
}
extern "C" {
pub fn Game_getLastError(self_: *mut Game) -> Error;
}
extern "C" {
pub fn Game_setLastError(self_: *mut Game, e: Error) -> bool;
}
extern "C" {
pub fn Game_mapWidth(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_mapHeight(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_mapFileName(self_: *mut Game) -> *mut BwString;
}
extern "C" {
pub fn Game_mapPathName(self_: *mut Game) -> *mut BwString;
}
extern "C" {
pub fn Game_mapName(self_: *mut Game) -> *mut BwString;
}
extern "C" {
pub fn Game_mapHash(self_: *mut Game) -> *mut BwString;
}
extern "C" {
pub fn Game_isWalkable(self_: *mut Game, position: WalkPosition) -> bool;
}
extern "C" {
pub fn Game_getGroundHeight(self_: *mut Game, position: TilePosition) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_isBuildable(
self_: *mut Game,
position: TilePosition,
includeBuildings: bool,
) -> bool;
}
extern "C" {
pub fn Game_isVisible(self_: *mut Game, position: TilePosition) -> bool;
}
extern "C" {
pub fn Game_isExplored(self_: *mut Game, position: TilePosition) -> bool;
}
extern "C" {
pub fn Game_hasCreep(self_: *mut Game, position: TilePosition) -> bool;
}
extern "C" {
pub fn Game_hasPowerPrecise(self_: *mut Game, position: Position, unitType: UnitType) -> bool;
}
extern "C" {
pub fn Game_hasPower(self_: *mut Game, position: TilePosition, unitType: UnitType) -> bool;
}
extern "C" {
pub fn Game_hasPowerWH(
self_: *mut Game,
position: TilePosition,
tileWidth: ::std::os::raw::c_int,
tileHeight: ::std::os::raw::c_int,
unitType: UnitType,
) -> bool;
}
extern "C" {
pub fn Game_canBuildHere(
self_: *mut Game,
position: TilePosition,
type_: UnitType,
builder: *mut Unit,
checkExplored: bool,
) -> bool;
}
extern "C" {
pub fn Game_canMake(self_: *mut Game, type_: UnitType, builder: *mut Unit) -> bool;
}
extern "C" {
pub fn Game_canResearch(
self_: *mut Game,
type_: TechType,
unit: *mut Unit,
checkCanIssueCommandType: bool,
) -> bool;
}
extern "C" {
pub fn Game_canUpgrade(
self_: *mut Game,
type_: UpgradeType,
unit: *mut Unit,
checkCanIssueCommandType: bool,
) -> bool;
}
extern "C" {
pub fn Game_getStartLocations(self_: *mut Game) -> *mut TilePositionIterator;
}
extern "C" {
pub fn Game_printf(self_: *mut Game, format: *const ::std::os::raw::c_char, ...);
}
extern "C" {
pub fn Game_sendText(self_: *mut Game, format: *const ::std::os::raw::c_char, ...);
}
extern "C" {
pub fn Game_sendTextEx(
self_: *mut Game,
toAllies: bool,
format: *const ::std::os::raw::c_char,
...
);
}
extern "C" {
pub fn Game_isInGame(self_: *mut Game) -> bool;
}
extern "C" {
pub fn Game_isMultiplayer(self_: *mut Game) -> bool;
}
extern "C" {
pub fn Game_isBattleNet(self_: *mut Game) -> bool;
}
extern "C" {
pub fn Game_isPaused(self_: *mut Game) -> bool;
}
extern "C" {
pub fn Game_isReplay(self_: *mut Game) -> bool;
}
extern "C" {
pub fn Game_pauseGame(self_: *mut Game);
}
extern "C" {
pub fn Game_resumeGame(self_: *mut Game);
}
extern "C" {
pub fn Game_leaveGame(self_: *mut Game);
}
extern "C" {
pub fn Game_restartGame(self_: *mut Game);
}
extern "C" {
pub fn Game_setLocalSpeed(self_: *mut Game, speed: ::std::os::raw::c_int);
}
extern "C" {
pub fn Game_issueCommand(
self_: *mut Game,
units: *mut UnitIterator,
command: UnitCommand,
) -> bool;
}
extern "C" {
pub fn Game_getSelectedUnits(self_: *mut Game) -> *mut UnitIterator;
}
extern "C" {
pub fn Game_self(self_: *mut Game) -> *mut Player;
}
extern "C" {
pub fn Game_enemy(self_: *mut Game) -> *mut Player;
}
extern "C" {
pub fn Game_neutral(self_: *mut Game) -> *mut Player;
}
extern "C" {
pub fn Game_allies(self_: *mut Game) -> *mut PlayerIterator;
}
extern "C" {
pub fn Game_enemies(self_: *mut Game) -> *mut PlayerIterator;
}
extern "C" {
pub fn Game_observers(self_: *mut Game) -> *mut PlayerIterator;
}
extern "C" {
pub fn Game_setTextSize(self_: *mut Game, size: TextSize);
}
extern "C" {
pub fn Game_drawText(
self_: *mut Game,
ctype: CoordinateType,
x: ::std::os::raw::c_int,
y: ::std::os::raw::c_int,
format: *const ::std::os::raw::c_char,
...
);
}
extern "C" {
pub fn Game_drawTextMap(
self_: *mut Game,
p: Position,
format: *const ::std::os::raw::c_char,
...
);
}
extern "C" {
pub fn Game_drawTextMouse(
self_: *mut Game,
p: Position,
format: *const ::std::os::raw::c_char,
...
);
}
extern "C" {
pub fn Game_drawTextScreen(
self_: *mut Game,
p: Position,
format: *const ::std::os::raw::c_char,
...
);
}
extern "C" {
pub fn Game_drawBox(
self_: *mut Game,
ctype: CoordinateType,
left: ::std::os::raw::c_int,
top: ::std::os::raw::c_int,
right: ::std::os::raw::c_int,
bottom: ::std::os::raw::c_int,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawBoxMap(
self_: *mut Game,
leftTop: Position,
rightBottom: Position,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawBoxMouse(
self_: *mut Game,
leftTop: Position,
rightBottom: Position,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawBoxScreen(
self_: *mut Game,
leftTop: Position,
rightBottom: Position,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawTriangle(
self_: *mut Game,
ctype: CoordinateType,
ax: ::std::os::raw::c_int,
ay: ::std::os::raw::c_int,
bx: ::std::os::raw::c_int,
by: ::std::os::raw::c_int,
cx: ::std::os::raw::c_int,
cy: ::std::os::raw::c_int,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawTriangleMap(
self_: *mut Game,
a: Position,
b: Position,
c: Position,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawTriangleMouse(
self_: *mut Game,
a: Position,
b: Position,
c: Position,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawTriangleScreen(
self_: *mut Game,
a: Position,
b: Position,
c: Position,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawCircle(
self_: *mut Game,
ctype: CoordinateType,
x: ::std::os::raw::c_int,
y: ::std::os::raw::c_int,
radius: ::std::os::raw::c_int,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawCircleMap(
self_: *mut Game,
p: Position,
radius: ::std::os::raw::c_int,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawCircleMouse(
self_: *mut Game,
p: Position,
radius: ::std::os::raw::c_int,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawCircleScreen(
self_: *mut Game,
p: Position,
radius: ::std::os::raw::c_int,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawEllipse(
self_: *mut Game,
ctype: CoordinateType,
x: ::std::os::raw::c_int,
y: ::std::os::raw::c_int,
xrad: ::std::os::raw::c_int,
yrad: ::std::os::raw::c_int,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawEllipseMap(
self_: *mut Game,
p: Position,
xrad: ::std::os::raw::c_int,
yrad: ::std::os::raw::c_int,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawEllipseMouse(
self_: *mut Game,
p: Position,
xrad: ::std::os::raw::c_int,
yrad: ::std::os::raw::c_int,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawEllipseScreen(
self_: *mut Game,
p: Position,
xrad: ::std::os::raw::c_int,
yrad: ::std::os::raw::c_int,
color: Color,
isSolid: bool,
);
}
extern "C" {
pub fn Game_drawDot(
self_: *mut Game,
ctype: CoordinateType,
x: ::std::os::raw::c_int,
y: ::std::os::raw::c_int,
color: Color,
);
}
extern "C" {
pub fn Game_drawDotMap(self_: *mut Game, p: Position, color: Color);
}
extern "C" {
pub fn Game_drawDotMouse(self_: *mut Game, p: Position, color: Color);
}
extern "C" {
pub fn Game_drawDotScreen(self_: *mut Game, p: Position, color: Color);
}
extern "C" {
pub fn Game_drawLine(
self_: *mut Game,
ctype: CoordinateType,
x1: ::std::os::raw::c_int,
y1: ::std::os::raw::c_int,
x2: ::std::os::raw::c_int,
y2: ::std::os::raw::c_int,
color: Color,
);
}
extern "C" {
pub fn Game_drawLineMap(self_: *mut Game, a: Position, b: Position, color: Color);
}
extern "C" {
pub fn Game_drawLineMouse(self_: *mut Game, a: Position, b: Position, color: Color);
}
extern "C" {
pub fn Game_drawLineScreen(self_: *mut Game, a: Position, b: Position, color: Color);
}
extern "C" {
pub fn Game_getLatencyFrames(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_getLatencyTime(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_getRemainingLatencyFrames(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_getRemainingLatencyTime(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_getRevision(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_getClientVersion(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_isDebug(self_: *mut Game) -> bool;
}
extern "C" {
pub fn Game_isLatComEnabled(self_: *mut Game) -> bool;
}
extern "C" {
pub fn Game_setLatCom(self_: *mut Game, isEnabled: bool);
}
extern "C" {
pub fn Game_isGUIEnabled(self_: *mut Game) -> bool;
}
extern "C" {
pub fn Game_setGUI(self_: *mut Game, enabled: bool);
}
extern "C" {
pub fn Game_getInstanceNumber(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_getAPM(self_: *mut Game, includeSelects: bool) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_setMap(self_: *mut Game, mapFileName: *const ::std::os::raw::c_char) -> bool;
}
extern "C" {
pub fn Game_setFrameSkip(self_: *mut Game, frameSkip: ::std::os::raw::c_int);
}
extern "C" {
pub fn Game_hasPath(self_: *mut Game, source: Position, destination: Position) -> bool;
}
extern "C" {
pub fn Game_setAlliance(
self_: *mut Game,
player: *mut Player,
allied: bool,
alliedVictory: bool,
) -> bool;
}
extern "C" {
pub fn Game_setVision(self_: *mut Game, player: *mut Player, enabled: bool) -> bool;
}
extern "C" {
pub fn Game_elapsedTime(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_setCommandOptimizationLevel(self_: *mut Game, level: ::std::os::raw::c_int);
}
extern "C" {
pub fn Game_countdownTimer(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_getAllRegions(self_: *mut Game) -> *mut RegionIterator;
}
extern "C" {
pub fn Game_getRegionAt(self_: *mut Game, position: Position) -> *mut Region;
}
extern "C" {
pub fn Game_getLastEventTime(self_: *mut Game) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_setRevealAll(self_: *mut Game, reveal: bool) -> bool;
}
extern "C" {
pub fn Game_getBuildLocation(
self_: *mut Game,
type_: UnitType,
desiredPosition: TilePosition,
maxRange: ::std::os::raw::c_int,
creep: bool,
) -> TilePosition;
}
extern "C" {
pub fn Game_getDamageFrom(
self_: *mut Game,
fromType: UnitType,
toType: UnitType,
fromPlayer: *mut Player,
toPlayer: *mut Player,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_getDamageTo(
self_: *mut Game,
toType: UnitType,
fromType: UnitType,
toPlayer: *mut Player,
fromPlayer: *mut Player,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Game_getRandomSeed(self_: *mut Game) -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn Game_registerEvent(
self_: *mut Game,
action: ::std::option::Option<unsafe extern "C" fn(arg1: *mut Game)>,
condition: ::std::option::Option<unsafe extern "C" fn(arg1: *mut Game) -> bool>,
timesToRun: ::std::os::raw::c_int,
framesToCheck: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn BWAPIC_getClient() -> *mut Client;
}
extern "C" {
pub fn Client_isConnected(self_: *mut Client) -> bool;
}
extern "C" {
pub fn Client_connect(self_: *mut Client) -> bool;
}
extern "C" {
pub fn Client_disconnect(self_: *mut Client);
}
extern "C" {
pub fn Client_update(self_: *mut Client);
}
extern "C" {
pub fn Player_getID(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_getName(self_: *mut Player) -> *mut BwString;
}
extern "C" {
pub fn Player_getUnits(self_: *mut Player) -> *mut UnitIterator;
}
extern "C" {
pub fn Player_getRace(self_: *mut Player) -> Race;
}
extern "C" {
pub fn Player_getType(self_: *mut Player) -> PlayerType;
}
extern "C" {
pub fn Player_getForce(self_: *mut Player) -> *mut Force;
}
extern "C" {
pub fn Player_isAlly(self_: *mut Player, player: *mut Player) -> bool;
}
extern "C" {
pub fn Player_isEnemy(self_: *mut Player, player: *mut Player) -> bool;
}
extern "C" {
pub fn Player_isNeutral(self_: *mut Player) -> bool;
}
extern "C" {
pub fn Player_getStartLocation(self_: *mut Player) -> TilePosition;
}
extern "C" {
pub fn Player_isVictorious(self_: *mut Player) -> bool;
}
extern "C" {
pub fn Player_isDefeated(self_: *mut Player) -> bool;
}
extern "C" {
pub fn Player_leftGame(self_: *mut Player) -> bool;
}
extern "C" {
pub fn Player_minerals(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_gas(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_gatheredMinerals(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_gatheredGas(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_repairedMinerals(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_repairedGas(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_refundedMinerals(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_refundedGas(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_spentMinerals(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_spentGas(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_supplyTotal(self_: *mut Player, race: Race) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_supplyUsed(self_: *mut Player, race: Race) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_allUnitCount(self_: *mut Player, unit: UnitType) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_visibleUnitCount(self_: *mut Player, unit: UnitType) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_completedUnitCount(self_: *mut Player, unit: UnitType) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_incompleteUnitCount(self_: *mut Player, unit: UnitType) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_deadUnitCount(self_: *mut Player, unit: UnitType) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_killedUnitCount(self_: *mut Player, unit: UnitType) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_getUpgradeLevel(
self_: *mut Player,
upgrade: UpgradeType,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_hasResearched(self_: *mut Player, tech: TechType) -> bool;
}
extern "C" {
pub fn Player_isResearching(self_: *mut Player, tech: TechType) -> bool;
}
extern "C" {
pub fn Player_isUpgrading(self_: *mut Player, upgrade: UpgradeType) -> bool;
}
extern "C" {
pub fn Player_getColor(self_: *mut Player) -> Color;
}
extern "C" {
pub fn Player_getTextColor(self_: *mut Player) -> ::std::os::raw::c_char;
}
extern "C" {
pub fn Player_maxEnergy(self_: *mut Player, unit: UnitType) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_topSpeed(self_: *mut Player, unit: UnitType) -> f64;
}
extern "C" {
pub fn Player_weaponMaxRange(self_: *mut Player, weapon: WeaponType) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_sightRange(self_: *mut Player, unit: UnitType) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_weaponDamageCooldown(self_: *mut Player, unit: UnitType)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_armor(self_: *mut Player, unit: UnitType) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_damage(self_: *mut Player, wpn: WeaponType) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_getUnitScore(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_getKillScore(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_getBuildingScore(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_getRazingScore(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_getCustomScore(self_: *mut Player) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_isObserver(self_: *mut Player) -> bool;
}
extern "C" {
pub fn Player_getMaxUpgradeLevel(
self_: *mut Player,
upgrade: UpgradeType,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Player_isResearchAvailable(self_: *mut Player, tech: TechType) -> bool;
}
extern "C" {
pub fn Player_isUnitAvailable(self_: *mut Player, unit: UnitType) -> bool;
}
extern "C" {
pub fn Player_hasUnitTypeRequirement(
self_: *mut Player,
unit: UnitType,
amount: ::std::os::raw::c_int,
) -> bool;
}
extern "C" {
pub fn Player_registerEvent(
self_: *mut Player,
action: ::std::option::Option<unsafe extern "C" fn(arg1: *mut Player)>,
condition: ::std::option::Option<unsafe extern "C" fn(arg1: *mut Player) -> bool>,
timesToRun: ::std::os::raw::c_int,
framesToCheck: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn Force_getID(self_: *mut Force) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Force_getName(self_: *mut Force) -> *mut BwString;
}
extern "C" {
pub fn Force_getPlayers(self_: *mut Force) -> *mut PlayerIterator;
}
extern "C" {
pub fn Unit_getID(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_exists(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_getReplayID(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getPlayer(self_: *mut Unit) -> *mut Player;
}
extern "C" {
pub fn Unit_getType(self_: *mut Unit) -> UnitType;
}
extern "C" {
pub fn Unit_getPosition(self_: *mut Unit) -> Position;
}
extern "C" {
pub fn Unit_getTilePosition(self_: *mut Unit) -> TilePosition;
}
extern "C" {
pub fn Unit_getAngle(self_: *mut Unit) -> f64;
}
extern "C" {
pub fn Unit_getVelocityX(self_: *mut Unit) -> f64;
}
extern "C" {
pub fn Unit_getVelocityY(self_: *mut Unit) -> f64;
}
extern "C" {
pub fn Unit_getRegion(self_: *mut Unit) -> *mut Region;
}
extern "C" {
pub fn Unit_getLeft(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getTop(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getRight(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getBottom(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getHitPoints(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getShields(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getEnergy(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getResources(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getResourceGroup(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getDistance_Position(self_: *mut Unit, target: Position) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getDistance_Unit(self_: *mut Unit, target: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_hasPath_Position(self_: *mut Unit, target: Position) -> bool;
}
extern "C" {
pub fn Unit_hasPath_Unit(self_: *mut Unit, target: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_getLastCommandFrame(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getLastCommand(self_: *mut Unit) -> UnitCommand;
}
extern "C" {
pub fn Unit_getLastAttackingPlayer(self_: *mut Unit) -> *mut Player;
}
extern "C" {
pub fn Unit_getInitialType(self_: *mut Unit) -> UnitType;
}
extern "C" {
pub fn Unit_getInitialPosition(self_: *mut Unit) -> Position;
}
extern "C" {
pub fn Unit_getInitialTilePosition(self_: *mut Unit) -> TilePosition;
}
extern "C" {
pub fn Unit_getInitialHitPoints(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getInitialResources(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getKillCount(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getAcidSporeCount(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getInterceptorCount(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getScarabCount(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getSpiderMineCount(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getGroundWeaponCooldown(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getAirWeaponCooldown(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getSpellCooldown(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getDefenseMatrixPoints(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getDefenseMatrixTimer(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getEnsnareTimer(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getIrradiateTimer(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getLockdownTimer(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getMaelstromTimer(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getOrderTimer(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getPlagueTimer(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getRemoveTimer(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getStasisTimer(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getStimTimer(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getBuildType(self_: *mut Unit) -> UnitType;
}
extern "C" {
pub fn Unit_getTrainingQueue(self_: *mut Unit) -> *mut UnitTypeIterator;
}
extern "C" {
pub fn Unit_getTech(self_: *mut Unit) -> TechType;
}
extern "C" {
pub fn Unit_getUpgrade(self_: *mut Unit) -> UpgradeType;
}
extern "C" {
pub fn Unit_getRemainingBuildTime(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getRemainingTrainTime(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getRemainingResearchTime(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getRemainingUpgradeTime(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getBuildUnit(self_: *mut Unit) -> *mut Unit;
}
extern "C" {
pub fn Unit_getTarget(self_: *mut Unit) -> *mut Unit;
}
extern "C" {
pub fn Unit_getTargetPosition(self_: *mut Unit) -> Position;
}
extern "C" {
pub fn Unit_getOrder(self_: *mut Unit) -> Order;
}
extern "C" {
pub fn Unit_getSecondaryOrder(self_: *mut Unit) -> Order;
}
extern "C" {
pub fn Unit_getOrderTarget(self_: *mut Unit) -> *mut Unit;
}
extern "C" {
pub fn Unit_getOrderTargetPosition(self_: *mut Unit) -> Position;
}
extern "C" {
pub fn Unit_getRallyPosition(self_: *mut Unit) -> Position;
}
extern "C" {
pub fn Unit_getRallyUnit(self_: *mut Unit) -> *mut Unit;
}
extern "C" {
pub fn Unit_getAddon(self_: *mut Unit) -> *mut Unit;
}
extern "C" {
pub fn Unit_getNydusExit(self_: *mut Unit) -> *mut Unit;
}
extern "C" {
pub fn Unit_getPowerUp(self_: *mut Unit) -> *mut Unit;
}
extern "C" {
pub fn Unit_getTransport(self_: *mut Unit) -> *mut Unit;
}
extern "C" {
pub fn Unit_getLoadedUnits(self_: *mut Unit) -> *mut UnitIterator;
}
extern "C" {
pub fn Unit_getSpaceRemaining(self_: *mut Unit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Unit_getCarrier(self_: *mut Unit) -> *mut Unit;
}
extern "C" {
pub fn Unit_getInterceptors(self_: *mut Unit) -> *mut UnitIterator;
}
extern "C" {
pub fn Unit_getHatchery(self_: *mut Unit) -> *mut Unit;
}
extern "C" {
pub fn Unit_getLarva(self_: *mut Unit) -> *mut UnitIterator;
}
extern "C" {
pub fn Unit_getUnitsInRadius(
self_: *mut Unit,
radius: ::std::os::raw::c_int,
pred: UnaryUnitFilter,
) -> *mut UnitIterator;
}
extern "C" {
pub fn Unit_getUnitsInWeaponRange(
self_: *mut Unit,
weapon: WeaponType,
pred: UnaryUnitFilter,
) -> *mut UnitIterator;
}
extern "C" {
pub fn Unit_getClosestUnit(
self_: *mut Unit,
pred: UnaryUnitFilter,
radius: ::std::os::raw::c_int,
) -> *mut Unit;
}
extern "C" {
pub fn Unit_hasNuke(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isAccelerating(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isAttacking(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isAttackFrame(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isBeingConstructed(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isBeingGathered(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isBeingHealed(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isBlind(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isBraking(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isBurrowed(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isCarryingGas(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isCarryingMinerals(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isCloaked(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isCompleted(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isConstructing(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isDefenseMatrixed(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isDetected(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isEnsnared(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isFlying(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isFollowing(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isGatheringGas(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isGatheringMinerals(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isHallucination(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isHoldingPosition(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isIdle(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isInterruptible(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isInvincible(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isInWeaponRange(self_: *mut Unit, target: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isIrradiated(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isLifted(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isLoaded(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isLockedDown(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isMaelstrommed(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isMorphing(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isMoving(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isParasited(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isPatrolling(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isPlagued(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isRepairing(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isResearching(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isSelected(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isSieged(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isStartingAttack(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isStasised(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isStimmed(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isStuck(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isTraining(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isUnderAttack(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isUnderDarkSwarm(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isUnderDisruptionWeb(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isUnderStorm(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isPowered(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isUpgrading(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_isVisible(self_: *mut Unit, player: *mut Player) -> bool;
}
extern "C" {
pub fn Unit_isTargetable(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_issueCommand(self_: *mut Unit, command: UnitCommand) -> bool;
}
extern "C" {
pub fn Unit_attack_Position(
self_: *mut Unit,
target: Position,
shiftQueueCommand: bool,
) -> bool;
}
extern "C" {
pub fn Unit_attack_Unit(self_: *mut Unit, target: *mut Unit, shiftQueueCommand: bool) -> bool;
}
extern "C" {
pub fn Unit_build(self_: *mut Unit, type_: UnitType, target: TilePosition) -> bool;
}
extern "C" {
pub fn Unit_buildAddon(self_: *mut Unit, type_: UnitType) -> bool;
}
extern "C" {
pub fn Unit_train(self_: *mut Unit, type_: UnitType) -> bool;
}
extern "C" {
pub fn Unit_morph(self_: *mut Unit, type_: UnitType) -> bool;
}
extern "C" {
pub fn Unit_research(self_: *mut Unit, tech: TechType) -> bool;
}
extern "C" {
pub fn Unit_upgrade(self_: *mut Unit, upgrade: UpgradeType) -> bool;
}
extern "C" {
pub fn Unit_setRallyPoint_Position(self_: *mut Unit, target: Position) -> bool;
}
extern "C" {
pub fn Unit_setRallyPoint_Target(self_: *mut Unit, target: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_move(self_: *mut Unit, target: Position, shiftQueueCommand: bool) -> bool;
}
extern "C" {
pub fn Unit_patrol(self_: *mut Unit, target: Position, shiftQueueCommand: bool) -> bool;
}
extern "C" {
pub fn Unit_holdPosition(self_: *mut Unit, shiftQueueCommand: bool) -> bool;
}
extern "C" {
pub fn Unit_stop(self_: *mut Unit, shiftQueueCommand: bool) -> bool;
}
extern "C" {
pub fn Unit_follow(self_: *mut Unit, target: *mut Unit, shiftQueueCommand: bool) -> bool;
}
extern "C" {
pub fn Unit_gather(self_: *mut Unit, target: *mut Unit, shiftQueueCommand: bool) -> bool;
}
extern "C" {
pub fn Unit_returnCargo(self_: *mut Unit, shiftQueueCommand: bool) -> bool;
}
extern "C" {
pub fn Unit_repair(self_: *mut Unit, target: *mut Unit, shiftQueueCommand: bool) -> bool;
}
extern "C" {
pub fn Unit_burrow(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_unburrow(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_cloak(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_decloak(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_siege(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_unsiege(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_lift(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_land(self_: *mut Unit, target: TilePosition) -> bool;
}
extern "C" {
pub fn Unit_load(self_: *mut Unit, target: *mut Unit, shiftQueueCommand: bool) -> bool;
}
extern "C" {
pub fn Unit_unload(self_: *mut Unit, target: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_unloadAll(self_: *mut Unit, shiftQueueCommand: bool) -> bool;
}
extern "C" {
pub fn Unit_unloadAll_Position(
self_: *mut Unit,
target: Position,
shiftQueueCommand: bool,
) -> bool;
}
extern "C" {
pub fn Unit_rightClick_Position(
self_: *mut Unit,
target: Position,
shiftQueueCommand: bool,
) -> bool;
}
extern "C" {
pub fn Unit_rightClick_Unit(
self_: *mut Unit,
target: *mut Unit,
shiftQueueCommand: bool,
) -> bool;
}
extern "C" {
pub fn Unit_haltConstruction(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_cancelConstruction(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_cancelAddon(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_cancelTrain(self_: *mut Unit, slot: ::std::os::raw::c_int) -> bool;
}
extern "C" {
pub fn Unit_cancelMorph(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_cancelResearch(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_cancelUpgrade(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_useTech_Position(self_: *mut Unit, tech: TechType, target: Position) -> bool;
}
extern "C" {
pub fn Unit_useTech_Unit(self_: *mut Unit, tech: TechType, target: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_placeCOP(self_: *mut Unit, target: TilePosition) -> bool;
}
extern "C" {
pub fn Unit_canIssueCommand(
self_: *mut Unit,
command: UnitCommand,
checkCanUseTechPositionOnPositions: bool,
checkCanUseTechUnitOnUnits: bool,
checkCanBuildUnitType: bool,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canIssueCommandGrouped(
self_: *mut Unit,
command: UnitCommand,
checkCanUseTechPositionOnPositions: bool,
checkCanUseTechUnitOnUnits: bool,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canCommand(self_: *mut Unit) -> bool;
}
extern "C" {
pub fn Unit_canCommandGrouped(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canIssueCommandType(
self_: *mut Unit,
ct: UnitCommandType,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canIssueCommandTypeGrouped(
self_: *mut Unit,
ct: UnitCommandType,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canTargetUnit(
self_: *mut Unit,
targetUnit: *mut Unit,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canAttack(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canAttack_Position(
self_: *mut Unit,
target: Position,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canAttack_Unit(
self_: *mut Unit,
target: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canAttackGrouped(
self_: *mut Unit,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canAttackGrouped_Position(
self_: *mut Unit,
target: Position,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canAttackGrouped_Unit(
self_: *mut Unit,
target: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canAttackMove(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canAttackMoveGrouped(
self_: *mut Unit,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canAttackUnit(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canAttackUnit_Unit(
self_: *mut Unit,
targetUnit: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canAttackUnitGrouped(
self_: *mut Unit,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canAttackUnitGrouped_Unit(
self_: *mut Unit,
targetUnit: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canBuild(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canBuild_UnitType(
self_: *mut Unit,
uType: UnitType,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canBuild_UnitType_TilePosition(
self_: *mut Unit,
uType: UnitType,
tilePos: TilePosition,
checkTargetUnitType: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canBuildAddon(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canBuildAddon_UnitType(
self_: *mut Unit,
uType: UnitType,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canTrain(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canTrain_UnitType(
self_: *mut Unit,
uType: UnitType,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canMorph(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canMorph_UnitType(
self_: *mut Unit,
uType: UnitType,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canResearch(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canResearch_TechType(
self_: *mut Unit,
type_: TechType,
checkCanIssueCommandType: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canUpgrade(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canUpgrade_UpgradeType(
self_: *mut Unit,
type_: UpgradeType,
checkCanIssueCommandType: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canSetRallyPoint(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canSetRallyPoint_Position(
self_: *mut Unit,
target: Position,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canSetRallyPoint_Unit(
self_: *mut Unit,
target: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canSetRallyPosition(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canSetRallyUnit(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canSetRallyUnit_Unit(
self_: *mut Unit,
targetUnit: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canMove(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canMoveGrouped(
self_: *mut Unit,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canPatrol(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canPatrolGrouped(
self_: *mut Unit,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canFollow(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canFollow_Unit(
self_: *mut Unit,
targetUnit: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canGather(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canGather_Unit(
self_: *mut Unit,
targetUnit: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canReturnCargo(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canHoldPosition(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canStop(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canRepair(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canRepair_Unit(
self_: *mut Unit,
targetUnit: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canBurrow(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canUnburrow(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canCloak(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canDecloak(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canSiege(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canUnsiege(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canLift(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canLand(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canLand_TilePosition(
self_: *mut Unit,
target: TilePosition,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canLoad(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canLoad_Unit(
self_: *mut Unit,
targetUnit: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canUnloadWithOrWithoutTarget(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canUnloadAtPosition(
self_: *mut Unit,
targDropPos: Position,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canUnload(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canUnload_Unit(
self_: *mut Unit,
targetUnit: *mut Unit,
checkCanTargetUnit: bool,
checkPosition: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canUnloadAll(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canUnloadAllPosition(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canUnloadAllPosition_Position(
self_: *mut Unit,
targDropPos: Position,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canRightClick(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canRightClick_Position(
self_: *mut Unit,
target: Position,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canRightClick_Unit(
self_: *mut Unit,
target: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canRightClickGrouped(
self_: *mut Unit,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canRightClickGrouped_Position(
self_: *mut Unit,
target: Position,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canRightClickGrouped_Unit(
self_: *mut Unit,
target: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canRightClickPosition(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canRightClickPositionGrouped(
self_: *mut Unit,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canRightClickUnit(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canRightClickUnit_Unit(
self_: *mut Unit,
targetUnit: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canRightClickUnitGrouped(
self_: *mut Unit,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canRightClickUnitGrouped_Unit(
self_: *mut Unit,
targetUnit: *mut Unit,
checkCanTargetUnit: bool,
checkCanIssueCommandType: bool,
checkCommandibilityGrouped: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canHaltConstruction(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canCancelConstruction(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canCancelAddon(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canCancelTrain(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canCancelTrainSlot(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canCancelTrainSlot_Check(
self_: *mut Unit,
slot: ::std::os::raw::c_int,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canCancelMorph(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canCancelResearch(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canCancelUpgrade(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canUseTechWithOrWithoutTarget(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canUseTechWithOrWithoutTarget_TechType(
self_: *mut Unit,
tech: TechType,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canUseTech_Position(
self_: *mut Unit,
tech: TechType,
target: Position,
checkCanTargetUnit: bool,
checkTargetsType: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canUseTech_Unit(
self_: *mut Unit,
tech: TechType,
target: *mut Unit,
checkCanTargetUnit: bool,
checkTargetsType: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canUseTechWithoutTarget(
self_: *mut Unit,
tech: TechType,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canUseTechUnit(
self_: *mut Unit,
tech: TechType,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canUseTechUnit_Unit(
self_: *mut Unit,
tech: TechType,
targetUnit: *mut Unit,
checkCanTargetUnit: bool,
checkTargetsUnits: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canUseTechPosition(
self_: *mut Unit,
tech: TechType,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canUseTechPosition_Position(
self_: *mut Unit,
tech: TechType,
target: Position,
checkTargetsPositions: bool,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_canPlaceCOP(self_: *mut Unit, checkCommandibility: bool) -> bool;
}
extern "C" {
pub fn Unit_canPlaceCOP_TilePosition(
self_: *mut Unit,
target: TilePosition,
checkCanIssueCommandType: bool,
checkCommandibility: bool,
) -> bool;
}
extern "C" {
pub fn Unit_registerEvent(
self_: *mut Unit,
action: ::std::option::Option<unsafe extern "C" fn(arg1: *mut Unit)>,
condition: ::std::option::Option<unsafe extern "C" fn(arg1: *mut Unit) -> bool>,
timesToRun: ::std::os::raw::c_int,
framesToCheck: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn Bullet_getID(self_: *mut Bullet) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Bullet_exists(self_: *mut Bullet) -> bool;
}
extern "C" {
pub fn Bullet_getPlayer(self_: *mut Bullet) -> *mut Player;
}
extern "C" {
pub fn Bullet_getType(self_: *mut Bullet) -> BulletType;
}
extern "C" {
pub fn Bullet_getSource(self_: *mut Bullet) -> *mut Unit;
}
extern "C" {
pub fn Bullet_getPosition(self_: *mut Bullet) -> Position;
}
extern "C" {
pub fn Bullet_getAngle(self_: *mut Bullet) -> f64;
}
extern "C" {
pub fn Bullet_getVelocityX(self_: *mut Bullet) -> f64;
}
extern "C" {
pub fn Bullet_getVelocityY(self_: *mut Bullet) -> f64;
}
extern "C" {
pub fn Bullet_getTarget(self_: *mut Bullet) -> *mut Unit;
}
extern "C" {
pub fn Bullet_getTargetPosition(self_: *mut Bullet) -> Position;
}
extern "C" {
pub fn Bullet_getRemoveTimer(self_: *mut Bullet) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Bullet_isVisible(self_: *mut Bullet, player: *mut Player) -> bool;
}
extern "C" {
pub fn Bullet_registerEvent(
self_: *mut Bullet,
action: ::std::option::Option<unsafe extern "C" fn(arg1: *mut Bullet)>,
condition: ::std::option::Option<unsafe extern "C" fn(arg1: *mut Bullet) -> bool>,
timesToRun: ::std::os::raw::c_int,
framesToCheck: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn Region_getID(self_: *mut Region) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Region_getRegionGroupID(self_: *mut Region) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Region_getCenter(self_: *mut Region) -> Position;
}
extern "C" {
pub fn Region_isHigherGround(self_: *mut Region) -> bool;
}
extern "C" {
pub fn Region_getDefensePriority(self_: *mut Region) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Region_isAccessible(self_: *mut Region) -> bool;
}
extern "C" {
pub fn Region_getNeighbors(self_: *mut Region) -> *mut RegionIterator;
}
extern "C" {
pub fn Region_getBoundsLeft(self_: *mut Region) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Region_getBoundsTop(self_: *mut Region) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Region_getBoundsRight(self_: *mut Region) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Region_getBoundsBottom(self_: *mut Region) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Region_getClosestAccessibleRegion(self_: *mut Region) -> *mut Region;
}
extern "C" {
pub fn Region_getClosestInaccessibleRegion(self_: *mut Region) -> *mut Region;
}
extern "C" {
pub fn Region_getDistance(self_: *mut Region, other: *mut Region) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Region_getUnits(self_: *mut Region, pred: UnaryUnitFilter) -> *mut UnitIterator;
}
extern "C" {
pub fn Region_registerEvent(
self_: *mut Region,
action: ::std::option::Option<unsafe extern "C" fn(arg1: *mut Region)>,
condition: ::std::option::Option<unsafe extern "C" fn(arg1: *mut Region) -> bool>,
timesToRun: ::std::os::raw::c_int,
framesToCheck: ::std::os::raw::c_int,
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AIModule {
pub vtable: *const AIModule_vtable,
}
#[repr(C)]
pub struct AIModule_vtable {
pub onStart: ::std::option::Option<unsafe extern "C" fn(module: *mut AIModule)>,
pub onEnd: ::std::option::Option<unsafe extern "C" fn(module: *mut AIModule, isWinner: bool)>,
pub onFrame: ::std::option::Option<unsafe extern "C" fn(module: *mut AIModule)>,
pub onSendText: ::std::option::Option<
unsafe extern "C" fn(module: *mut AIModule, text: *const ::std::os::raw::c_char),
>,
pub onReceiveText: ::std::option::Option<
unsafe extern "C" fn(
module: *mut AIModule,
player: *mut Player,
text: *const ::std::os::raw::c_char,
),
>,
pub onPlayerLeft:
::std::option::Option<unsafe extern "C" fn(module: *mut AIModule, player: *mut Player)>,
pub onNukeDetect:
::std::option::Option<unsafe extern "C" fn(module: *mut AIModule, target: Position)>,
pub onUnitDiscover:
::std::option::Option<unsafe extern "C" fn(module: *mut AIModule, unit: *mut Unit)>,
pub onUnitEvade:
::std::option::Option<unsafe extern "C" fn(module: *mut AIModule, unit: *mut Unit)>,
pub onUnitShow:
::std::option::Option<unsafe extern "C" fn(module: *mut AIModule, unit: *mut Unit)>,
pub onUnitHide:
::std::option::Option<unsafe extern "C" fn(module: *mut AIModule, unit: *mut Unit)>,
pub onUnitCreate:
::std::option::Option<unsafe extern "C" fn(module: *mut AIModule, unit: *mut Unit)>,
pub onUnitDestroy:
::std::option::Option<unsafe extern "C" fn(module: *mut AIModule, unit: *mut Unit)>,
pub onUnitMorph:
::std::option::Option<unsafe extern "C" fn(module: *mut AIModule, unit: *mut Unit)>,
pub onUnitRenegade:
::std::option::Option<unsafe extern "C" fn(module: *mut AIModule, unit: *mut Unit)>,
pub onSaveGame: ::std::option::Option<
unsafe extern "C" fn(module: *mut AIModule, gameName: *const ::std::os::raw::c_char),
>,
pub onUnitComplete:
::std::option::Option<unsafe extern "C" fn(module: *mut AIModule, unit: *mut Unit)>,
}
extern "C" {
pub fn createAIModuleWrapper(module: *mut AIModule) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn destroyAIModuleWrapper(module: *mut ::std::os::raw::c_void);
}