Compare commits
617 Commits
wagic-v0.2
...
cmake
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00e076fca4 | ||
|
|
0023c4a086 | ||
|
|
7c9fd90903 | ||
|
|
d95e9e1155 | ||
|
|
b21964dc46 | ||
|
|
6904d6ffd3 | ||
|
|
786a252cf5 | ||
|
|
863c3f07bc | ||
|
|
e0867dd737 | ||
|
|
671b3bae61 | ||
|
|
02a4726cbf | ||
|
|
91d588c670 | ||
|
|
4df4422d93 | ||
|
|
0b3b33f727 | ||
|
|
5cdf952623 | ||
|
|
9a55e03790 | ||
|
|
4b52e8cf6c | ||
|
|
f7eaf5072e | ||
|
|
8df70d43e1 | ||
|
|
721f1bc269 | ||
|
|
f698d9f96c | ||
|
|
08eeeb3079 | ||
|
|
2851576b31 | ||
|
|
7d5afbad53 | ||
|
|
6caa79bbd4 | ||
|
|
00332a9df3 | ||
|
|
7c0c6355e1 | ||
|
|
db0498fc4d | ||
|
|
69caa05c4e | ||
|
|
636207f46d | ||
|
|
b34929f703 | ||
|
|
d009bf858c | ||
|
|
da77238799 | ||
|
|
77c53e1519 | ||
|
|
2491453ed0 | ||
|
|
f752bd38e7 | ||
|
|
51accdcad1 | ||
|
|
bb4466d36d | ||
|
|
6cbbb1c308 | ||
|
|
015481a827 | ||
|
|
532954f5b2 | ||
|
|
9cad9f6309 | ||
|
|
c3f8c81d96 | ||
|
|
8021be00f9 | ||
|
|
839c2c4fee | ||
|
|
05b3692b60 | ||
|
|
e4d6d6811b | ||
|
|
b9196348bb | ||
|
|
cae9d41885 | ||
|
|
83bcefe308 | ||
|
|
5bb508f5ec | ||
|
|
45b7288cf8 | ||
|
|
a63ebc8396 | ||
|
|
36985a6b71 | ||
|
|
6c599246f6 | ||
|
|
c84be9d674 | ||
|
|
7faeab98c2 | ||
|
|
3261b8bd10 | ||
|
|
dbe71fa81a | ||
|
|
22efb82688 | ||
|
|
b09cd93f79 | ||
|
|
114ab84a9c | ||
|
|
edcce09448 | ||
|
|
e3e77711d5 | ||
|
|
480bc46ef4 | ||
|
|
1421d906ce | ||
|
|
229bc06027 | ||
|
|
0369409af0 | ||
|
|
f160b6a5a0 | ||
|
|
872732b5ab | ||
|
|
2bb75ed466 | ||
|
|
603d91885f | ||
|
|
a1266cbba8 | ||
|
|
6088969245 | ||
|
|
3d9b40f903 | ||
|
|
ddd589d3f6 | ||
|
|
8793f05cea | ||
|
|
ec2ef1856b | ||
|
|
fd11dcefe2 | ||
|
|
190405d43f | ||
|
|
30505b0e5d | ||
|
|
93492ae091 | ||
|
|
f6a991a2e6 | ||
|
|
aa48c9ca4a | ||
|
|
8ed4729d82 | ||
|
|
4ebb114a0e | ||
|
|
7e3cf5c009 | ||
|
|
9895148562 | ||
|
|
bfa30c10db | ||
|
|
f57f5bfff5 | ||
|
|
e2f6fec09e | ||
|
|
f9df303e92 | ||
|
|
42401d749b | ||
|
|
57c59ee0dd | ||
|
|
618a418ea6 | ||
|
|
eccd00fd19 | ||
|
|
4f24b94faa | ||
|
|
2588bcd050 | ||
|
|
aca7f6d416 | ||
|
|
67666e850d | ||
|
|
2cef9d8f60 | ||
|
|
34557b3c4f | ||
|
|
5629240449 | ||
|
|
9ca59e9afb | ||
|
|
4ae355a6ea | ||
|
|
440d2f28b1 | ||
|
|
2c6c20358d | ||
|
|
a183e9282c | ||
|
|
f83c670630 | ||
|
|
8e6d58f491 | ||
|
|
b4afc3f3e1 | ||
|
|
7d5e2379be | ||
|
|
3cb8a5a360 | ||
|
|
b01f679452 | ||
|
|
067ae2790d | ||
|
|
ea6e2b00f6 | ||
|
|
5080fe7811 | ||
|
|
fa872056ae | ||
|
|
4d1a10de75 | ||
|
|
deb2e0fa7a | ||
|
|
ccc209d4f2 | ||
|
|
4fb389e698 | ||
|
|
fe2c55e97f | ||
|
|
6f1cb5c84b | ||
|
|
1654fdf8ce | ||
|
|
4e4108f547 | ||
|
|
3bbb1cea2c | ||
|
|
f4010508ad | ||
|
|
393b5050f9 | ||
|
|
0937578d96 | ||
|
|
2fea7d5810 | ||
|
|
d1827042d4 | ||
|
|
cc5b8ba829 | ||
|
|
972f17bde5 | ||
|
|
b60630d814 | ||
|
|
b20484c7de | ||
|
|
705e1444e0 | ||
|
|
93faa08ef3 | ||
|
|
ff59089dcc | ||
|
|
60306cf1c2 | ||
|
|
576be28da1 | ||
|
|
fa2c130b08 | ||
|
|
5500b9a8a5 | ||
|
|
8b9f34b879 | ||
|
|
607cf5f944 | ||
|
|
353b3b1d7f | ||
|
|
21a0ee754a | ||
|
|
a0b3c00211 | ||
|
|
603af22b79 | ||
|
|
9cfc4ea321 | ||
|
|
0d05aeb329 | ||
|
|
667adfadce | ||
|
|
30bef9f840 | ||
|
|
a6fe4a5de6 | ||
|
|
f0cbff2f91 | ||
|
|
11352db948 | ||
|
|
0322e58221 | ||
|
|
682ed43f38 | ||
|
|
cee669389e | ||
|
|
adbed735f3 | ||
|
|
aadf372204 | ||
|
|
f5b9d91769 | ||
|
|
e06cc6ddae | ||
|
|
19f2267413 | ||
|
|
96e9eebabb | ||
|
|
814fc96ed8 | ||
|
|
60ae2d5bef | ||
|
|
560bb22cd7 | ||
|
|
298491d416 | ||
|
|
4929ab9991 | ||
|
|
7d4056d9ba | ||
|
|
390c25608e | ||
|
|
4eddbdfc5d | ||
|
|
e1614c073b | ||
|
|
ac197179fb | ||
|
|
fd68b1d90a | ||
|
|
dacb69721a | ||
|
|
574ea034e2 | ||
|
|
bc6e354b9e | ||
|
|
94fb44d1eb | ||
|
|
332f0542f7 | ||
|
|
29262b4c78 | ||
|
|
816c42b63b | ||
|
|
751fda6521 | ||
|
|
6625907180 | ||
|
|
7c697eb376 | ||
|
|
ab9002be79 | ||
|
|
8c5a089448 | ||
|
|
fbfcb7d3ac | ||
|
|
c170733af6 | ||
|
|
d724263d65 | ||
|
|
2ed35bcaa2 | ||
|
|
17b4dbf55a | ||
|
|
b791da0786 | ||
|
|
deec348fea | ||
|
|
d478df4dc1 | ||
|
|
40f7d75bcf | ||
|
|
ffb8047d2c | ||
|
|
5da42e53be | ||
|
|
eaef6a588d | ||
|
|
44cf433b06 | ||
|
|
1c40e3a889 | ||
|
|
e19519a39c | ||
|
|
fe8144553a | ||
|
|
617ce45dbc | ||
|
|
6731251d07 | ||
|
|
7fab07638e | ||
|
|
1ab4e4ebfd | ||
|
|
9760ab39b7 | ||
|
|
edc0aebf04 | ||
|
|
b00f142168 | ||
|
|
197686962c | ||
|
|
0d313bb34e | ||
|
|
9a23c4b83b | ||
|
|
20fa180864 | ||
|
|
6a73b41724 | ||
|
|
df1a6c10a0 | ||
|
|
c2d78db724 | ||
|
|
797514521e | ||
|
|
1458b4a872 | ||
|
|
f9bcaf53c2 | ||
|
|
721a3edefb | ||
|
|
d4c2fecb69 | ||
|
|
56a391193d | ||
|
|
3b05932a8b | ||
|
|
2ca092090d | ||
|
|
170987e418 | ||
|
|
8c85c56ff3 | ||
|
|
8a440d5d09 | ||
|
|
b7e8907877 | ||
|
|
67ab960608 | ||
|
|
dacc76711c | ||
|
|
d42b5411d2 | ||
|
|
a5487311c4 | ||
|
|
1191d401c9 | ||
|
|
0f607b2cbe | ||
|
|
2831ac12ae | ||
|
|
f8fc173e86 | ||
|
|
50251e460b | ||
|
|
a78110759b | ||
|
|
24c0684563 | ||
|
|
d9af81007f | ||
|
|
c0f2635990 | ||
|
|
d3deae3a6a | ||
|
|
aa87536c4a | ||
|
|
ea9d053d76 | ||
|
|
21687bc3ee | ||
|
|
06b1a47a56 | ||
|
|
4f4addb8e9 | ||
|
|
c17abc3dca | ||
|
|
2e09f489cb | ||
|
|
961f00441f | ||
|
|
99f08276c6 | ||
|
|
066b30b1b7 | ||
|
|
5785e413ec | ||
|
|
9b162b434b | ||
|
|
c66387320f | ||
|
|
ad9ea0f972 | ||
|
|
faa24acbc3 | ||
|
|
3dfd3253b2 | ||
|
|
8df057f78a | ||
|
|
319cfe7889 | ||
|
|
09f4c408cd | ||
|
|
675705a6e5 | ||
|
|
1488bbc0f6 | ||
|
|
1818bf4a5e | ||
|
|
869e0309ec | ||
|
|
5f1371f914 | ||
|
|
2374b00dfd | ||
|
|
dd28f274d1 | ||
|
|
c3e8379258 | ||
|
|
430589e64c | ||
|
|
aafb88664c | ||
|
|
c81384ab1d | ||
|
|
2d8a1a8a5f | ||
|
|
0e0b3a78fe | ||
|
|
3bd3933c66 | ||
|
|
452cf4793f | ||
|
|
15588eda93 | ||
|
|
90e8292660 | ||
|
|
19f7ee3615 | ||
|
|
fa50c2f5df | ||
|
|
01f3b23bea | ||
|
|
36fbb0d47d | ||
|
|
84c9667c71 | ||
|
|
84c2c49581 | ||
|
|
0a0c541f07 | ||
|
|
546c755185 | ||
|
|
a1d82d9f84 | ||
|
|
7a52f789b9 | ||
|
|
0867265039 | ||
|
|
ad6ae4e188 | ||
|
|
efe9ad8bc4 | ||
|
|
12f3a360ba | ||
|
|
e92191f38d | ||
|
|
59e0f0902e | ||
|
|
5a2a986ec6 | ||
|
|
c10054ae6f | ||
|
|
24dac100f2 | ||
|
|
a0209fa158 | ||
|
|
33103e648f | ||
|
|
f73b1869d5 | ||
|
|
4ccad97eb0 | ||
|
|
967931a385 | ||
|
|
e151790481 | ||
|
|
88099ce431 | ||
|
|
4e22b27783 | ||
|
|
6ef8b45709 | ||
|
|
f395274c0b | ||
|
|
b23014fcd6 | ||
|
|
cf329e82a9 | ||
|
|
32d18c9a68 | ||
|
|
836410dca7 | ||
|
|
b0f5c1f7f7 | ||
|
|
82cff5659c | ||
|
|
f51a024b03 | ||
|
|
41e4f04aa3 | ||
|
|
c3802477c7 | ||
|
|
d9d8ab0b82 | ||
|
|
5e91b82a0e | ||
|
|
2c68ea91f7 | ||
|
|
b6c733b397 | ||
|
|
5f466399af | ||
|
|
9995a2f9a6 | ||
|
|
9808aea6d0 | ||
|
|
ee2fe3c722 | ||
|
|
95a37fd138 | ||
|
|
103c8aa3c2 | ||
|
|
39965be795 | ||
|
|
cf39404441 | ||
|
|
cea234e2ab | ||
|
|
d988e9e359 | ||
|
|
9948b82c6b | ||
|
|
1fd88d1fab | ||
|
|
0ced3bfb09 | ||
|
|
96ab9cf59d | ||
|
|
a19ede4c12 | ||
|
|
5d41f6dfdb | ||
|
|
ee86e7b478 | ||
|
|
2eb719919c | ||
|
|
6ae8984b41 | ||
|
|
b8ea9e6b5f | ||
|
|
203876aadb | ||
|
|
ea6596a431 | ||
|
|
d2e1cf34ca | ||
|
|
4a9733b510 | ||
|
|
5b56073243 | ||
|
|
6e98e6f9e6 | ||
|
|
8204d5a5c1 | ||
|
|
b613da48db | ||
|
|
b3712a8cf1 | ||
|
|
bd76554186 | ||
|
|
756a8907c8 | ||
|
|
73b33bb0a0 | ||
|
|
9efd2bcfeb | ||
|
|
05e857f735 | ||
|
|
947277af5a | ||
|
|
ecd4b85e22 | ||
|
|
6eebfa77a4 | ||
|
|
61c4bff54e | ||
|
|
b9f77513b6 | ||
|
|
d3caf2fb15 | ||
|
|
94d1267abf | ||
|
|
ab6f80c242 | ||
|
|
c3d0fd91ae | ||
|
|
76f5a6b851 | ||
|
|
f5e5444734 | ||
|
|
dca0d9c201 | ||
|
|
273d666bcc | ||
|
|
1e6a8814de | ||
|
|
984c880efc | ||
|
|
c5b982c2b6 | ||
|
|
aa722ee3f4 | ||
|
|
56be7d8c47 | ||
|
|
9f878f6145 | ||
|
|
721adb8db0 | ||
|
|
784eab6dbf | ||
|
|
be03648e11 | ||
|
|
44ffc5d895 | ||
|
|
d4be791e68 | ||
|
|
16ba96b2f0 | ||
|
|
6af7acce0b | ||
|
|
0efc61fda7 | ||
|
|
509e25d4cc | ||
|
|
0d29633793 | ||
|
|
723babac46 | ||
|
|
d1caf06660 | ||
|
|
4132cf602b | ||
|
|
6b109317bb | ||
|
|
c2d060f47d | ||
|
|
ee4c3a0057 | ||
|
|
f8d515a7ed | ||
|
|
49a618fc37 | ||
|
|
800c2f9bf4 | ||
|
|
8ca0eaaf40 | ||
|
|
73712f6bd5 | ||
|
|
0b46cd255e | ||
|
|
900a565c96 | ||
|
|
8e3761c5f1 | ||
|
|
24337d8e66 | ||
|
|
d9655ab833 | ||
|
|
9514ea59d8 | ||
|
|
cb3ab39df1 | ||
|
|
593d3c4d9c | ||
|
|
8027ed4bdf | ||
|
|
3ad8c76715 | ||
|
|
5323668faa | ||
|
|
2446443522 | ||
|
|
4f9f93dcc8 | ||
|
|
eb9788b667 | ||
|
|
9e4f486fa2 | ||
|
|
8aebeaf8fb | ||
|
|
9b704e1cb6 | ||
|
|
8d940c381f | ||
|
|
a55381ec66 | ||
|
|
7641b29178 | ||
|
|
01038e217e | ||
|
|
91bd5cc6d6 | ||
|
|
21397fd6cf | ||
|
|
6e60d0e96c | ||
|
|
f9da0c3a1e | ||
|
|
74840b353c | ||
|
|
74e9cffc50 | ||
|
|
459892264d | ||
|
|
cc92f26035 | ||
|
|
fe57ffae3d | ||
|
|
3628dc36fd | ||
|
|
b87be5837a | ||
|
|
791733c9bf | ||
|
|
c02ee99a87 | ||
|
|
6d134f5db7 | ||
|
|
d717dcad02 | ||
|
|
7b75936545 | ||
|
|
608817b9bc | ||
|
|
078e359290 | ||
|
|
02a64542ef | ||
|
|
a695397cb2 | ||
|
|
81f39fc0a2 | ||
|
|
fefb18dc75 | ||
|
|
fd4c4a15f8 | ||
|
|
e462c31559 | ||
|
|
c711e661b1 | ||
|
|
6e98c0e19a | ||
|
|
2a05bebf5c | ||
|
|
5336b079f4 | ||
|
|
da9c163ff1 | ||
|
|
189c624d67 | ||
|
|
98839c4e8c | ||
|
|
54d8c00aaa | ||
|
|
c5c05ca068 | ||
|
|
889259a3ef | ||
|
|
b23961c0ee | ||
|
|
7ea7431906 | ||
|
|
49168b6a22 | ||
|
|
f642d41a71 | ||
|
|
d4cb3e8384 | ||
|
|
d566524499 | ||
|
|
f3bb5ccef9 | ||
|
|
4709295598 | ||
|
|
af0c423359 | ||
|
|
45253e0008 | ||
|
|
e32e5c2a47 | ||
|
|
3a4f9f06cb | ||
|
|
a563030440 | ||
|
|
80d43896ff | ||
|
|
1c5949411f | ||
|
|
699b151939 | ||
|
|
e6af1a08b9 | ||
|
|
7eac02f8d4 | ||
|
|
58e70e2500 | ||
|
|
56ca2021dc | ||
|
|
e4e431dcee | ||
|
|
abfff205ee | ||
|
|
6416e4e0d9 | ||
|
|
86f4730db7 | ||
|
|
33a5479512 | ||
|
|
891859f4ca | ||
|
|
d5bfb8201b | ||
|
|
f49ef92f90 | ||
|
|
02d004b5bf | ||
|
|
55f8a8a1d0 | ||
|
|
068a69c80b | ||
|
|
375e66489f | ||
|
|
cbbd034862 | ||
|
|
f7fe948da5 | ||
|
|
478ce0863b | ||
|
|
329011460f | ||
|
|
48ec51a923 | ||
|
|
9936962c56 | ||
|
|
15111d1b20 | ||
|
|
2b342ca33b | ||
|
|
97e6df7f59 | ||
|
|
a2bb67a828 | ||
|
|
d14e28d7b3 | ||
|
|
0a0ee3cc98 | ||
|
|
99e6a254e1 | ||
|
|
68714ebad8 | ||
|
|
48ef4144bc | ||
|
|
78a4da4945 | ||
|
|
af0861877a | ||
|
|
a23b96ba75 | ||
|
|
47704f7591 | ||
|
|
755f90f38b | ||
|
|
8a56406c19 | ||
|
|
887ea94a4d | ||
|
|
499b3ddf3e | ||
|
|
83e55b1074 | ||
|
|
1f87ed77e4 | ||
|
|
93b7d210dc | ||
|
|
10d9d84f84 | ||
|
|
fc9a4d5431 | ||
|
|
4b3a2531a6 | ||
|
|
ed4871548e | ||
|
|
1284b8da8b | ||
|
|
95455603a1 | ||
|
|
813c54a166 | ||
|
|
fa2a2d51a5 | ||
|
|
4b68b636ce | ||
|
|
0a01b0af69 | ||
|
|
e4e809f3fe | ||
|
|
1667b79fa8 | ||
|
|
31272ff0fe | ||
|
|
9335063d68 | ||
|
|
39dfaf3acb | ||
|
|
3e7ecd51fd | ||
|
|
c9ee4a304e | ||
|
|
2f1bf7bdbe | ||
|
|
41890f6bb4 | ||
|
|
24cd7cab58 | ||
|
|
473d9387d4 | ||
|
|
f5495adce1 | ||
|
|
d802ec4b59 | ||
|
|
8f69e2a204 | ||
|
|
c3fc579907 | ||
|
|
cc06370bcd | ||
|
|
ed15ec2469 | ||
|
|
3f7d5ff041 | ||
|
|
d5bcf40cbb | ||
|
|
49c196814f | ||
|
|
c4282ce936 | ||
|
|
cd1c09127f | ||
|
|
9afebe0851 | ||
|
|
9a7382ea06 | ||
|
|
7a7e723009 | ||
|
|
9d772284cc | ||
|
|
a981761deb | ||
|
|
fc13ffa242 | ||
|
|
878b2cd639 | ||
|
|
995922d2d7 | ||
|
|
0d100aa9be | ||
|
|
d4fabed317 | ||
|
|
9eff781103 | ||
|
|
0353da3d27 | ||
|
|
3cbdc6e9fe | ||
|
|
ce71afd704 | ||
|
|
603d491bed | ||
|
|
20a792f135 | ||
|
|
87f5e7f3a6 | ||
|
|
e272925f3d | ||
|
|
19091ade7b | ||
|
|
e62c065e2c | ||
|
|
2312381b82 | ||
|
|
639942d444 | ||
|
|
55a5b9d0ba | ||
|
|
a33517e5d0 | ||
|
|
c981586bcf | ||
|
|
b473238f02 | ||
|
|
1d9b92080f | ||
|
|
7f89d4d39f | ||
|
|
4f00ec2277 | ||
|
|
26db10a083 | ||
|
|
3ec2ceb725 | ||
|
|
667ac39e06 | ||
|
|
993d62a8c8 | ||
|
|
09a70d4573 | ||
|
|
3afa730751 | ||
|
|
3245ddbfe7 | ||
|
|
def55943ed | ||
|
|
4accc9c018 | ||
|
|
579d612397 | ||
|
|
daabce1d2f | ||
|
|
5885829585 | ||
|
|
3e7b9e68d5 | ||
|
|
4a52139457 | ||
|
|
79ea403273 | ||
|
|
397d7fa6c8 | ||
|
|
ac787a6f51 | ||
|
|
0418e77d34 | ||
|
|
a2c6a3669b | ||
|
|
b8d22240a8 | ||
|
|
b458d570a1 | ||
|
|
5022df0d14 | ||
|
|
220b48b144 | ||
|
|
8aeed46181 | ||
|
|
38b34eae2f | ||
|
|
648b21f972 | ||
|
|
09717a966b | ||
|
|
eef46fe743 | ||
|
|
5f91566fa7 | ||
|
|
c83a476ebe | ||
|
|
954bba274c | ||
|
|
d370a5c13d | ||
|
|
181189bee0 | ||
|
|
c678f5e85a | ||
|
|
0fabf83c62 | ||
|
|
b7e8d19290 | ||
|
|
d0db71602a | ||
|
|
112efddb4e | ||
|
|
4cea81e564 | ||
|
|
3a40a34566 | ||
|
|
a4ff87a7d5 | ||
|
|
797077c47b | ||
|
|
075d950249 | ||
|
|
22d14b2a4f | ||
|
|
4272e2e2b2 | ||
|
|
34279cfacf | ||
|
|
85f4a4c36a |
12
.gitmodules
vendored
Normal file
12
.gitmodules
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
[submodule "thirdparty/zlib"]
|
||||
path = thirdparty/zlib
|
||||
url = https://github.com/madler/zlib
|
||||
[submodule "thirdparty/SDL2"]
|
||||
path = thirdparty/SDL2
|
||||
url = https://github.com/libsdl-org/SDL
|
||||
[submodule "docs/wiki"]
|
||||
path = docs/wiki
|
||||
url = https://github.com/WagicProject/wagic.wiki
|
||||
[submodule "thirdparty/curl"]
|
||||
path = thirdparty/curl
|
||||
url = https://github.com/curl/curl.git
|
||||
188
.travis.yml
188
.travis.yml
@@ -1,73 +1,159 @@
|
||||
language: cpp
|
||||
dist: xenial
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
except:
|
||||
- latest-master
|
||||
- latest-cmake
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: BUILD_TYPE=PSP
|
||||
sudo: required
|
||||
- os: linux
|
||||
env: BUILD_TYPE=SDL
|
||||
sudo: required
|
||||
- os: linux
|
||||
env: BUILD_TYPE=Qt
|
||||
sudo: required
|
||||
- os: osx
|
||||
env: BUILD_TYPE=Qt
|
||||
- os: osx
|
||||
env: BUILD_TYPE=iOS
|
||||
- os: linux
|
||||
language: android
|
||||
env: BUILD_TYPE=ANDROID
|
||||
sudo: required
|
||||
- os: osx
|
||||
env: BUILD_TYPE=Emscripten
|
||||
|
||||
android:
|
||||
components:
|
||||
- platform-tools
|
||||
- build-tools-23.0.1
|
||||
- android-10
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- opt/pspsdk
|
||||
- android-ndk-r9
|
||||
|
||||
before_install:
|
||||
- export BUILD_PSP=YES
|
||||
- export BUILD_ANDROID=YES
|
||||
- export BUILD_Qt=YES
|
||||
- export BUILD_MAC=NO
|
||||
- echo -e "machine github.com\n login $GITHUB_TOKEN" > ~/.netrc
|
||||
- git lfs pull
|
||||
# Only building on Mac when not handling pull request
|
||||
# - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||
# export BUILD_MAC=YES;
|
||||
# fi
|
||||
- sudo apt-get update -qq
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
||||
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty universe" &&
|
||||
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty main" &&
|
||||
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test &&
|
||||
sudo apt-get -qq update &&
|
||||
sudo apt-get -qq install g++-4.8 &&
|
||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
brew update &&
|
||||
brew install dpkg &&
|
||||
pwd &&
|
||||
ls;
|
||||
fi
|
||||
- if [ "$BUILD_TYPE" == "iOS" ]; then
|
||||
curl -s -f -L https://raw.github.com/r-plus/dotfiles/master/install_theos.sh | bash &&
|
||||
pwd &&
|
||||
ls;
|
||||
fi
|
||||
# Building for PSP here
|
||||
- if [ "$BUILD_PSP" == "YES" ]; then
|
||||
- if [ "$BUILD_TYPE" == "PSP" ]; then
|
||||
export PSPDEV="$TRAVIS_BUILD_DIR/opt/pspsdk" &&
|
||||
export PSPSDK="$PSPDEV/psp/sdk" &&
|
||||
export PATH="$PATH:$PSPDEV/bin:$PSPSDK/bin" &&
|
||||
wget --no-check-certificate -O sdk.lzma http://downloads.sourceforge.net/project/minpspw/SDK%20%2B%20devpak/pspsdk%200.11.2/minpspw_0.11.2-amd64.tar.lzma;
|
||||
wget -O sdk.lzma https://sourceforge.net/projects/minpspw/files/SDK%20%2B%20devpak/pspsdk%200.11.2/minpspw_0.11.2-amd64.tar.lzma/download;
|
||||
fi
|
||||
# Building for Android here
|
||||
- if [ "$BUILD_TYPE" == "ANDROID" ]; then
|
||||
export ANDROID="/usr/local/android-sdk-linux/tools/android" &&
|
||||
export PATH=$PATH:"/usr/local/android-sdk-linux/tools" &&
|
||||
wget https://dl.google.com/android/repository/android-ndk-r22-linux-x86_64.zip -nv &&
|
||||
wget https://bitbucket.org/ewing/sdl_androidcmake/get/4e9e88c03f04.zip -nv;
|
||||
fi
|
||||
# Building for Qt here
|
||||
- if [ "$BUILD_Qt" == "YES" ]; then
|
||||
- if [ "$BUILD_TYPE" == "Qt" ] && [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
brew install qt5 &&
|
||||
export QMAKE="qmake -qt=qt5";
|
||||
fi
|
||||
- if [ "$BUILD_TYPE" == "Qt" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
||||
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial universe" &&
|
||||
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial main" &&
|
||||
sudo apt-get -qq update &&
|
||||
sudo apt-get -qq install qt5-qmake qtbase5-dev qtdeclarative5-dev qttools5-dev qtmultimedia5-dev libqt5opengl5 libqt5opengl5-dev pulseaudio libpulse-dev &&
|
||||
export QMAKE="qmake -qt=qt5";
|
||||
fi
|
||||
# Building for Android here
|
||||
- if [ "$BUILD_ANDROID" == "YES" ]; then
|
||||
export ANDROID="android-sdk-linux/tools/android" &&
|
||||
if [ `uname -m` = x86_64 ]; then
|
||||
sudo dpkg --add-architecture i386 && sudo apt-get update &&
|
||||
sudo apt-get install -qq --force-yes libgd2-xpm-dev libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1 jq ant; fi &&
|
||||
wget https://dl.google.com/android/repository/android-ndk-r22-linux-x86_64.zip -nv &&
|
||||
wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz -nv;
|
||||
# Building for SDL here
|
||||
- if [ "$BUILD_TYPE" == "SDL" ]; then
|
||||
export SDL2DIR="$TRAVIS_BUILD_DIR/thirdparty/SDL2";
|
||||
fi
|
||||
# Building for Emscripten here
|
||||
- if [ "$BUILD_TYPE" == "Emscripten" ] && [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
brew install emscripten && export LLVM=/usr/local/opt/emscripten/libexec/llvm/bin && emcc;
|
||||
fi
|
||||
|
||||
install:
|
||||
- if [ "$BUILD_PSP" == "YES" ]; then
|
||||
tar -x --xz -f sdk.lzma;
|
||||
fi
|
||||
- if [ "$BUILD_ANDROID" == "YES" ]; then
|
||||
unzip android-ndk-r22-linux-x86_64.zip &&
|
||||
tar -zxf android-sdk_r24.4.1-linux.tgz &&
|
||||
$ANDROID list sdk --extended -a &&
|
||||
echo yes | $ANDROID update sdk -a -t tools,platform-tools,build-tools-23.0.1,android-23 --no-ui --force --no-https;
|
||||
sudo apt-get install openjdk-8-jdk;
|
||||
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64;
|
||||
export PATH=$JAVA_HOME/bin:$PATH;
|
||||
fi
|
||||
- sudo pip install --upgrade pip
|
||||
- sudo pip install setuptools-rust
|
||||
- sudo pip install pyOpenSSL
|
||||
- sudo pip install pyjavaproperties
|
||||
- sudo pip install github3.py
|
||||
- sudo pip install cpp-coveralls
|
||||
|
||||
before_script:
|
||||
- export REQUESTS_CA_BUNDLE=/usr/local/lib/python2.7/dist-packages/certifi/cacert.pem
|
||||
install:
|
||||
- |
|
||||
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
if [[ -z "$(ls -A ${DEPS_DIR}/cmake/bin)" ]]; then
|
||||
CMAKE_URL="https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz"
|
||||
mkdir -p cmake && travis_retry wget --no-check-certificate --quiet -O - "${CMAKE_URL}" | tar --strip-components=1 -xz -C cmake
|
||||
fi
|
||||
export PATH="${DEPS_DIR}/cmake/bin:${PATH}"
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
if ! brew ls --version cmake &>/dev/null; then brew install cmake; fi
|
||||
fi
|
||||
- if [ "$BUILD_TYPE" == "PSP" ]; then
|
||||
tar -x --xz -f sdk.lzma;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_TYPE" == "ANDROID" ]; then
|
||||
jdk_switcher use openjdk7 %%
|
||||
tar --absolute-names -jxf android-ndk-r9-linux-x86_64.tar.bz2 &&
|
||||
export ANDROID_NDK=`pwd`/android-ndk-r9 &&
|
||||
unzip 4e9e88c03f04.zip &&
|
||||
rm -rf thirdparty/SDL2/* &&
|
||||
mv ewing-sdl_androidcmake-4e9e88c03f04/* thirdparty/SDL2/ &&
|
||||
sudo pip install cpp-coveralls &&
|
||||
sudo apt-get install --force-yes -qq libtinyxml-dev libjpeg-dev libpng-dev libgif-dev libz-dev libboost-system-dev libboost-thread-dev libboost-date-time-dev ant;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_TYPE" != "ANDROID" ]; then
|
||||
jdk_switcher use openjdk7 &&
|
||||
sudo pip install cpp-coveralls &&
|
||||
sudo apt-get install --force-yes -qq libtinyxml-dev libjpeg-dev libpng-dev libgif-dev libz-dev libboost-system-dev libboost-thread-dev libboost-date-time-dev ant;
|
||||
fi
|
||||
- sudo pip install pyjavaproperties
|
||||
- sudo pip install github3.py
|
||||
|
||||
env:
|
||||
global:
|
||||
# - JAVA_HOME=/usr/lib/jvm/java-7-oracle # Force set JVM version to comply with Travis Ant version (1.8.2)
|
||||
- secure: "EBzr1+qjQsOhn0s+tcFmXR1jP9B0xiOSXuXbRXWZ1OEHNvp8+A5/pS84LYVFlaZqmxr5dApxvPtwhgLIUbQ3EPXm8LpC3KgSD4dS+9/QMbxhe5TK4oczgFRGcDTMJQZsCzhOh7hp3tbcbJg5Gp+VT7aFjFQSHDGwhzSJXsXwh/8="
|
||||
- secure: "X5dTQfofqAutnXxmu11Ep2MQ5QYnMN8m0AITRtwymhEF2UclcOudI1+skPtuhAGbWQnSO+lhunV3cvMfw2/Ml3k/VDz6VdFSKFrzAu7ja1VLJfcxr7chi0s8q30pVBb66tGydjIBac3B+RQyqgmZQW1frbRrhC/kPFQ6wPWOJdQ="
|
||||
- secure: "T97NUPnxCpVZ/c5HH0zfo0FO3DPSRMSmze58ubW5EUTZOjAMtEt+OFdsrNZvUTCugUj2M1agtonZbAbczpaAL+lgZcHDgXgWMkfO0pMnsWX1yyCNqMuE/iTMpJr/xsLQeyWlftWjJLsseQU45abZsd1XVmda/G+ZhrDLF1y55SA="
|
||||
|
||||
|
||||
script: "tools/travis-script.sh"
|
||||
|
||||
after_success:
|
||||
- coveralls -b . -e JGE/src -e JGE/include -i projects/mtg/include -i projects/mtg/src --gcov-options '\-lp'
|
||||
- python tools/upload-binaries.py -t $GITHUB_TOKEN -s $TRAVIS_COMMIT -l core.zip -r Wagic-core.zip -b $TRAVIS_BRANCH
|
||||
- python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l projects/mtg/Android/bin/Wagic-debug.apk -r Wagic-android.apk -b $TRAVIS_BRANCH
|
||||
- python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l projects/mtg/psprelease.zip -r Wagic-psp.zip -b $TRAVIS_BRANCH
|
||||
- python tools/upload-binaries.py -t $GITHUB_TOKEN -s $TRAVIS_COMMIT -l qt-gui-build/linuxqtrelease.zip -r Wagic-linux-QT.zip -b $TRAVIS_BRANCH
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_TYPE" == "Qt" ]; then
|
||||
coveralls -b . -e JGE/src -e JGE/include -i projects/mtg/include -i projects/mtg/src --gcov-options '\-lp';
|
||||
fi
|
||||
- if [ "$BUILD_TYPE" == "ANDROID" ]; then
|
||||
python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l core.zip -r Wagic-core.zip -b $TRAVIS_BRANCH &&
|
||||
python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l build_android/package/bin/Wagic_*.apk -r Wagic-android.apk -b $TRAVIS_BRANCH;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_TYPE" == "PSP" ]; then
|
||||
python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l build_psp/psprelease.zip -r Wagic-psp.zip -b $TRAVIS_BRANCH;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$BUILD_TYPE" == "iOS" ]; then
|
||||
python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l net.wagic_0.19.2-1_iphoneos-arm.deb -r Wagic-iOS.deb -b $TRAVIS_BRANCH;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$BUILD_TYPE" == "Qt" ]; then
|
||||
python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l build_qt_widget/wagic.dmg -r Wagic-macosx.dmg -b $TRAVIS_BRANCH;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$BUILD_TYPE" == "Emscripten" ]; then
|
||||
./tools/deploy-emscripten.sh;
|
||||
fi
|
||||
|
||||
|
||||
242
CMakeLists.txt
Normal file
242
CMakeLists.txt
Normal file
@@ -0,0 +1,242 @@
|
||||
cmake_minimum_required(VERSION 4.0)
|
||||
if(CMAKE_MAJOR_VERSION STRGREATER 3)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeModules)
|
||||
|
||||
#this block will fix install prefixes to install everything in a subdirectory
|
||||
#of cmake_binary_dir if we are on windows/android to make packaging more easy
|
||||
if(NOT CMAKE_TOOLCHAIN_FILE)
|
||||
if(WIN32)
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Install directory")
|
||||
else()
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Install directory")
|
||||
endif()
|
||||
else() #we are cross-compiling (psp/android)
|
||||
#Android: set output folder for platform/android to pick up
|
||||
set(LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_BINARY_DIR} CACHE PATH "library output root")
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Install directory")
|
||||
endif()
|
||||
|
||||
#set available build types (debug/release)
|
||||
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE)
|
||||
if(DEFINED CMAKE_BUILD_TYPE)
|
||||
set_property( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES} )
|
||||
endif()
|
||||
|
||||
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin" CACHE PATH "Application output directory")
|
||||
|
||||
|
||||
project(wagic CXX C)
|
||||
#todo: somehow determine wagics version
|
||||
set(WAGIC_VERSION "0.19")
|
||||
|
||||
#add standard paths to search for libraries. borrowed from opencv
|
||||
if(UNIX AND NOT ANDROID)
|
||||
if(X86_64 OR CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
if(EXISTS /lib64)
|
||||
list(APPEND CMAKE_LIBRARY_PATH /lib64)
|
||||
else()
|
||||
list(APPEND CMAKE_LIBRARY_PATH /lib)
|
||||
endif()
|
||||
if(EXISTS /usr/lib64)
|
||||
list(APPEND CMAKE_LIBRARY_PATH /usr/lib64)
|
||||
else()
|
||||
list(APPEND CMAKE_LIBRARY_PATH /usr/lib)
|
||||
endif()
|
||||
elseif(X86 OR CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
if(EXISTS /lib32)
|
||||
list(APPEND CMAKE_LIBRARY_PATH /lib32)
|
||||
else()
|
||||
list(APPEND CMAKE_LIBRARY_PATH /lib)
|
||||
endif()
|
||||
if(EXISTS /usr/lib32)
|
||||
list(APPEND CMAKE_LIBRARY_PATH /usr/lib32)
|
||||
else()
|
||||
list(APPEND CMAKE_LIBRARY_PATH /usr/lib)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID OR PSP OR IOS)
|
||||
#to allow finding of pathes/headers/libs within the source tree
|
||||
#even if only search for target platform libs
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SOURCE_DIR} ${CMAKE_FIND_ROOT_PATH})
|
||||
endif()
|
||||
|
||||
#also borrowed from opencv
|
||||
if(MINGW)
|
||||
if(EXISTS /mingw)
|
||||
list(APPEND CMAKE_INCLUDE_PATH /mingw)
|
||||
endif()
|
||||
if(EXISTS /mingw32)
|
||||
list(APPEND CMAKE_INCLUDE_PATH /mingw32)
|
||||
endif()
|
||||
if(EXISTS /mingw64)
|
||||
list(APPEND CMAKE_INCLUDE_PATH /mingw64)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(utils)
|
||||
|
||||
#select the target backend
|
||||
if(PSP)
|
||||
WAGIC_OPTION(backend_psp "build for psp" ON)
|
||||
endif()
|
||||
if(WIN32 OR ANDROID OR UNIX)
|
||||
WAGIC_OPTION(backend_sdl "build for sdl" (WIN32 OR ANDROID OR EMSCRIPTEN))
|
||||
endif()
|
||||
if(NOT backend_sdl AND UNIX AND NOT ANDROID AND NOT IOS)
|
||||
WAGIC_OPTION(backend_qt_console "build qt-console version with testsuit" ON)
|
||||
WAGIC_OPTION(backend_qt_widget "build qt-widget version" OFF)
|
||||
endif()
|
||||
|
||||
#third party build options
|
||||
WAGIC_OPTION(BUILD_ZLIB "build zlib from source" ((NOT MINGW) AND (WIN32 OR APPLE)))
|
||||
WAGIC_OPTION(BUILD_JPEG "build jpeg from source" (WIN32 OR APPLE OR PSP OR ANDROID OR EMSCRIPTEN))
|
||||
WAGIC_OPTION(BUILD_PNG "build png from source" (WIN32 OR APPLE OR PSP OR ANDROID OR EMSCRIPTEN))
|
||||
WAGIC_OPTION(BUILD_UNZIP "build unzip from source" ON)
|
||||
WAGIC_OPTION(BUILD_TINYXML "build tinyxml from source" (WIN32 OR APPLE OR PSP OR ANDROID OR EMSCRIPTEN OR IOS))
|
||||
WAGIC_OPTION(BUILD_ZIPFS "build zipfs from source" ON)
|
||||
WAGIC_OPTION(BUILD_SDL2 "build SDL2 from source" (backend_sdl AND (UNIX OR WIN32 OR ANDROID) AND (NOT EMSCRIPTEN AND NOT IOS)))
|
||||
#WAGIC_OPTION(BUILD_CURL "build curl from source" (backend_sdl AND WIN32))
|
||||
|
||||
#project options
|
||||
if(ANDROID)
|
||||
WAGIC_OPTION(BUILD_ANDROID_PACKAGE "put the compiled code in an android package" ON)
|
||||
endif()
|
||||
|
||||
|
||||
if(ANDROID)
|
||||
set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib/${ANDROID_NDK_ABI_NAME}")
|
||||
set(3P_LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/3rdparty/lib/${ANDROID_NDK_ABI_NAME}")
|
||||
set(WAGIC_LIB_INSTALL_PATH sdk/native/libs/${ANDROID_NDK_ABI_NAME})
|
||||
set(WAGIC_3P_LIB_INSTALL_PATH sdk/native/3rdparty/libs/${ANDROID_NDK_ABI_NAME})
|
||||
set(WAGIC_CONFIG_INSTALL_PATH sdk/native/jni)
|
||||
set(WAGIC_INCLUDE_INSTALL_PATH sdk/native/jni/include)
|
||||
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/package/bin")
|
||||
else()
|
||||
set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
|
||||
set(3P_LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/3rdparty/lib${LIB_SUFFIX}")
|
||||
set(WAGIC_LIB_INSTALL_PATH lib${LIB_SUFFIX})
|
||||
set(WAGIC_3P_LIB_INSTALL_PATH share/wagic/3rdparty/${WAGIC_LIB_INSTALL_PATH})
|
||||
set(WAGIC_INCLUDE_INSTALL_PATH "include")
|
||||
set(WAGIC_CONFIG_INSTALL_PATH share/wagic)
|
||||
endif()
|
||||
|
||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${WAGIC_LIB_INSTALL_PATH}")
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
#if no build type is specified, we assume debug
|
||||
if(CMAKE_GENERATOR MATCHES "Makefiles|Ninja" AND "${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
endif()
|
||||
|
||||
include(FindOrBuild)
|
||||
|
||||
#set platform dependend configurations
|
||||
if(PSP)
|
||||
FindOrBuildPSPSDK()
|
||||
include(platforms/psp/configure.cmake)
|
||||
elseif(EMSCRIPTEN)
|
||||
include(platforms/emscripten/configure.cmake)
|
||||
elseif(WIN32)
|
||||
include(platforms/win/configure.cmake)
|
||||
elseif(APPLE)
|
||||
include(platforms/macosx/configure.cmake)
|
||||
elseif(UNIX AND NOT ANDROID)
|
||||
include(platforms/unix/configure.cmake)
|
||||
elseif(ANDROID)
|
||||
include(platforms/android/configure.cmake)
|
||||
endif()
|
||||
|
||||
#set backend dependend configurations
|
||||
if(backend_qt_console OR backend_qt_widget)
|
||||
add_definitions(-DQT_CONFIG)
|
||||
if(backend_qt_console)
|
||||
add_definitions(-DTESTSUITE -D_DEBUG)
|
||||
add_definitions(-DCONSOLE_CONFIG -DCAPTURE_STDERR)
|
||||
endif()
|
||||
elseif(backend_sdl)
|
||||
add_definitions(-DSDL_CONFIG)
|
||||
endif()
|
||||
|
||||
# find or build 3rd party libraries
|
||||
FindOrBuildZLIB()
|
||||
FindOrBuildOpenGL()
|
||||
FindOrBuildTinyXML()
|
||||
FindOrBuildZipFS()
|
||||
FindOrBuildUNZIP()
|
||||
FindOrBuildPNG()
|
||||
FindOrBuildJPEG()
|
||||
FindOrBuildBoost()
|
||||
#FindOrBuildCurl()
|
||||
|
||||
if(PSP)
|
||||
FindOrBuildGIF()
|
||||
endif()
|
||||
if(ANDROID)
|
||||
FindOrBuildOpenSL()
|
||||
endif()
|
||||
if(backend_sdl)
|
||||
FindOrBuildSDL2()
|
||||
endif()
|
||||
if(backend_psp)
|
||||
FindOrBuildFreetype()
|
||||
FindOrBuildHgeTools()
|
||||
FindOrBuildMikMod()
|
||||
endif()
|
||||
if(backend_qt_console OR backend_qt_widget)
|
||||
FindOrBuildQt()
|
||||
endif()
|
||||
if(ANDROID)
|
||||
include(DetectAndroidSDK)
|
||||
endif()
|
||||
|
||||
if(BUILD_ANDROID_PACKAGE)
|
||||
find_package(Ant REQUIRED)
|
||||
endif()
|
||||
|
||||
#add jge and mtg projects
|
||||
add_subdirectory(JGE)
|
||||
add_subdirectory(projects/mtg)
|
||||
|
||||
if(BUILD_ANDROID_PACKAGE)
|
||||
add_subdirectory(platforms/android/package)
|
||||
endif()
|
||||
|
||||
if(EMSCRIPTEN)
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".html")
|
||||
endif()
|
||||
|
||||
if(IOS)
|
||||
list_add_prefix(JGE_SOURCES " JGE/")
|
||||
list_add_prefix(MTG_generic_src " projects/mtg/")
|
||||
list_add_prefix(JGE_INCLUDE_DIRS " -IJGE/")
|
||||
list_add_prefix(MTG_INCLUDE_DIRS " -Iprojects/mtg/")
|
||||
list_add_prefix(TINYXML_SRC " thirdparty/tinyxml/")
|
||||
list_add_prefix(UNZIP_SRC " thirdparty/unzip/")
|
||||
list_add_prefix(ZIPFS_SRC " thirdparty/zipFS/")
|
||||
|
||||
file(WRITE makefile.ios
|
||||
"ARCHS= armv7 armv7s \n"
|
||||
"include ${THEOS_PATH}/makefiles/common.mk\n"
|
||||
"TARGET= iphone:clang:latest:8.0 \n"
|
||||
"APPLICATION_NAME = " ${PROJECT_NAME} "\n"
|
||||
${PROJECT_NAME} "_FILES =" ${ZIPFS_SRC} ${UNZIP_SRC} ${TINYXML_SRC} ${JGE_SOURCES} ${MTG_generic_src} " thirdparty/Boost/lib/pthread/once.cpp thirdparty/Boost/lib/pthread/thread.cpp\n"
|
||||
${PROJECT_NAME} "_LDFLAGS = -lz\n"
|
||||
${PROJECT_NAME} "_FRAMEWORKS = UIKit CoreGraphics OpenGLES Foundation CFNetwork MobileCoreServices AVFoundation OpenAL AudioToolbox QuartzCore SystemConfiguration\n"
|
||||
"include ${THEOS_PATH}/makefiles/application.mk\n"
|
||||
"ADDITIONAL_CFLAGS = " ${MTG_INCLUDE_DIRS} ${JGE_INCLUDE_DIRS} " -I" ${ZIPFS_INCLUDE_DIR} " -I" ${UNZIP_INCLUDE_DIR} " -I" ${HGE_INCLUDE_DIR} ${TINYXML_INCLUDE_DIR} " -I" ${ZLIB_INCLUDE_DIRS} ${BOOST_INCLUDE_DIRS} " "
|
||||
"-DIOS -D__arm__ -DTIXML_USE_STL -DVERSION=\"$(GIT_VERSION)\" "
|
||||
"-Wno-parentheses-equality -Wno-delete-non-virtual-dtor "
|
||||
"-Wno-tautological-undefined-compare -Wno-undefined-bool-conversion "
|
||||
"-Wno-visibility -Wno-deprecated-declarations -Wno-non-literal-null-conversion "
|
||||
"-Wno-format -Wno-distributed-object-modifiers -Wno-missing-braces -Wno-uninitialized "
|
||||
"-Wno-unused-const-variable -Wno-unused-function -Wno-unknown-warning-option -Wno-unused-local-typedef "
|
||||
"-x objective-c++ \n"
|
||||
|
||||
"_THEOS_TARGET_ONLY_OBJCFLAGS :=\"\"\n"
|
||||
)
|
||||
endif()
|
||||
373
CMakeModules/DetectAndroidSDK.cmake
Normal file
373
CMakeModules/DetectAndroidSDK.cmake
Normal file
@@ -0,0 +1,373 @@
|
||||
if(EXISTS "${ANDROID_EXECUTABLE}")
|
||||
set(ANDROID_SDK_DETECT_QUIET TRUE)
|
||||
endif()
|
||||
|
||||
file(TO_CMAKE_PATH "$ENV{ProgramFiles}" ProgramFiles_ENV_PATH)
|
||||
file(TO_CMAKE_PATH "$ENV{HOME}" HOME_ENV_PATH)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
set(ANDROID_SDK_OS windows)
|
||||
elseif(CMAKE_HOST_APPLE)
|
||||
set(ANDROID_SDK_OS macosx)
|
||||
else()
|
||||
set(ANDROID_SDK_OS linux)
|
||||
endif()
|
||||
|
||||
#find android SDK: search in ANDROID_SDK first
|
||||
find_host_program(ANDROID_EXECUTABLE
|
||||
NAMES android.bat android
|
||||
PATH_SUFFIXES tools
|
||||
PATHS
|
||||
ENV ANDROID_SDK
|
||||
DOC "Android SDK location"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
# Now search default paths
|
||||
find_host_program(ANDROID_EXECUTABLE
|
||||
NAMES android.bat android
|
||||
PATH_SUFFIXES android-sdk-${ANDROID_SDK_OS}/tools
|
||||
android-sdk-${ANDROID_SDK_OS}_x86/tools
|
||||
android-sdk-${ANDROID_SDK_OS}_86/tools
|
||||
android-sdk/tools
|
||||
PATHS /opt
|
||||
"${HOME_ENV_PATH}/NVPACK"
|
||||
"$ENV{SystemDrive}/NVPACK"
|
||||
"${ProgramFiles_ENV_PATH}/Android"
|
||||
DOC "Android SDK location"
|
||||
)
|
||||
|
||||
if(ANDROID_EXECUTABLE)
|
||||
if(NOT ANDROID_SDK_DETECT_QUIET)
|
||||
message(STATUS "Found android tool: ${ANDROID_EXECUTABLE}")
|
||||
endif()
|
||||
|
||||
get_filename_component(ANDROID_SDK_TOOLS_PATH "${ANDROID_EXECUTABLE}" PATH)
|
||||
|
||||
#read source.properties
|
||||
if(EXISTS "${ANDROID_SDK_TOOLS_PATH}/source.properties")
|
||||
file(STRINGS "${ANDROID_SDK_TOOLS_PATH}/source.properties" ANDROID_SDK_TOOLS_SOURCE_PROPERTIES_LINES REGEX "^[ ]*[^#].*$")
|
||||
foreach(line ${ANDROID_SDK_TOOLS_SOURCE_PROPERTIES_LINES})
|
||||
string(REPLACE "\\:" ":" line ${line})
|
||||
string(REPLACE "=" ";" line ${line})
|
||||
list(GET line 0 line_name)
|
||||
list(GET line 1 line_value)
|
||||
string(REPLACE "." "_" line_name ${line_name})
|
||||
SET(ANDROID_TOOLS_${line_name} "${line_value}" CACHE INTERNAL "from ${ANDROID_SDK_TOOLS_PATH}/source.properties")
|
||||
MARK_AS_ADVANCED(ANDROID_TOOLS_${line_name})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
#fix missing revision (SDK tools before r9 don't set revision number correctly)
|
||||
if(NOT ANDROID_TOOLS_Pkg_Revision)
|
||||
SET(ANDROID_TOOLS_Pkg_Revision "Unknown" CACHE INTERNAL "")
|
||||
MARK_AS_ADVANCED(ANDROID_TOOLS_Pkg_Revision)
|
||||
endif()
|
||||
|
||||
#fix missing description
|
||||
if(NOT ANDROID_TOOLS_Pkg_Desc)
|
||||
SET(ANDROID_TOOLS_Pkg_Desc "Android SDK Tools, revision ${ANDROID_TOOLS_Pkg_Revision}." CACHE INTERNAL "")
|
||||
MARK_AS_ADVANCED(ANDROID_TOOLS_Pkg_Desc)
|
||||
endif()
|
||||
|
||||
#warn about outdated SDK
|
||||
if(NOT ANDROID_TOOLS_Pkg_Revision GREATER 13)
|
||||
SET(ANDROID_TOOLS_Pkg_Desc "${ANDROID_TOOLS_Pkg_Desc} It is recommended to update your SDK tools to revision 14 or newer." CACHE INTERNAL "")
|
||||
endif()
|
||||
|
||||
if(ANDROID_TOOLS_Pkg_Revision GREATER 13)
|
||||
SET(ANDROID_PROJECT_PROPERTIES_FILE project.properties)
|
||||
SET(ANDROID_ANT_PROPERTIES_FILE ant.properties)
|
||||
else()
|
||||
SET(ANDROID_PROJECT_PROPERTIES_FILE default.properties)
|
||||
SET(ANDROID_ANT_PROPERTIES_FILE build.properties)
|
||||
endif()
|
||||
|
||||
set(ANDROID_MANIFEST_FILE AndroidManifest.xml)
|
||||
set(ANDROID_LIB_PROJECT_FILES build.xml local.properties proguard-project.txt ${ANDROID_PROJECT_PROPERTIES_FILE})
|
||||
set(ANDROID_PROJECT_FILES ${ANDROID_LIB_PROJECT_FILES})
|
||||
|
||||
#get installed targets
|
||||
if(ANDROID_TOOLS_Pkg_Revision GREATER 11)
|
||||
execute_process(COMMAND ${ANDROID_EXECUTABLE} list target -c
|
||||
RESULT_VARIABLE ANDROID_PROCESS
|
||||
OUTPUT_VARIABLE ANDROID_SDK_TARGETS
|
||||
ERROR_VARIABLE ANDROID_PROCESS_ERRORS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
string(REGEX MATCHALL "[^\n]+" ANDROID_SDK_TARGETS "${ANDROID_SDK_TARGETS}")
|
||||
else()
|
||||
#old SDKs (r11 and older) don't provide compact list
|
||||
execute_process(COMMAND ${ANDROID_EXECUTABLE} list target
|
||||
RESULT_VARIABLE ANDROID_PROCESS
|
||||
OUTPUT_VARIABLE ANDROID_SDK_TARGETS_FULL
|
||||
ERROR_VARIABLE ANDROID_PROCESS_ERRORS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
string(REGEX MATCHALL "(^|\n)id: [0-9]+ or \"([^\n]+[0-9+])\"(\n|$)" ANDROID_SDK_TARGETS_FULL "${ANDROID_SDK_TARGETS_FULL}")
|
||||
|
||||
SET(ANDROID_SDK_TARGETS "")
|
||||
if(ANDROID_PROCESS EQUAL 0)
|
||||
foreach(line ${ANDROID_SDK_TARGETS_FULL})
|
||||
string(REGEX REPLACE "(^|\n)id: [0-9]+ or \"([^\n]+[0-9+])\"(\n|$)" "\\2" line "${line}")
|
||||
list(APPEND ANDROID_SDK_TARGETS "${line}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID_PROCESS EQUAL 0)
|
||||
message(ERROR "Failed to get list of installed Android targets.")
|
||||
set(ANDROID_EXECUTABLE "ANDROID_EXECUTABLE-NOTFOUND")
|
||||
endif()
|
||||
|
||||
# clear ANDROID_SDK_TARGET if no target is provided by user
|
||||
if(NOT ANDROID_SDK_TARGET)
|
||||
set(ANDROID_SDK_TARGET "" CACHE STRING "Android SDK target for the Wagic Java API and samples")
|
||||
endif()
|
||||
if(ANDROID_SDK_TARGETS)
|
||||
set_property( CACHE ANDROID_SDK_TARGET PROPERTY STRINGS ${ANDROID_SDK_TARGETS} )
|
||||
endif()
|
||||
endif(ANDROID_EXECUTABLE)
|
||||
|
||||
# finds minimal installed SDK target compatible with provided names or API levels
|
||||
# usage:
|
||||
# get_compatible_android_api_level(VARIABLE [level1] [level2] ...)
|
||||
macro(android_get_compatible_target VAR)
|
||||
set(${VAR} "${VAR}-NOTFOUND")
|
||||
if(ANDROID_SDK_TARGETS)
|
||||
list(GET ANDROID_SDK_TARGETS 0 __lvl)
|
||||
string(REGEX MATCH "[0-9]+$" __lvl "${__lvl}")
|
||||
|
||||
#find minimal level mathing to all provided levels
|
||||
foreach(lvl ${ARGN})
|
||||
string(REGEX MATCH "[0-9]+$" __level "${lvl}")
|
||||
if(__level GREATER __lvl)
|
||||
set(__lvl ${__level})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
#search for compatible levels
|
||||
foreach(lvl ${ANDROID_SDK_TARGETS})
|
||||
string(REGEX MATCH "[0-9]+$" __level "${lvl}")
|
||||
if(__level EQUAL __lvl)
|
||||
#look for exact match
|
||||
foreach(usrlvl ${ARGN})
|
||||
if("${usrlvl}" STREQUAL "${lvl}")
|
||||
set(${VAR} "${lvl}")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
if("${${VAR}}" STREQUAL "${lvl}")
|
||||
break() #exact match was found
|
||||
elseif(NOT ${VAR})
|
||||
set(${VAR} "${lvl}")
|
||||
endif()
|
||||
elseif(__level GREATER __lvl)
|
||||
if(NOT ${VAR})
|
||||
set(${VAR} "${lvl}")
|
||||
endif()
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
unset(__lvl)
|
||||
unset(__level)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
unset(__android_project_chain CACHE)
|
||||
|
||||
# add_android_project(target_name ${path} NATIVE_DEPS opencv_core LIBRARY_DEPS ${Wagic_BINARY_DIR} SDK_TARGET 11)
|
||||
macro(add_android_project target path)
|
||||
# parse arguments
|
||||
set(android_proj_arglist NATIVE_DEPS LIBRARY_DEPS SDK_TARGET IGNORE_JAVA IGNORE_MANIFEST)
|
||||
set(__varname "android_proj_")
|
||||
foreach(v ${android_proj_arglist})
|
||||
set(${__varname}${v} "")
|
||||
endforeach()
|
||||
foreach(arg ${ARGN})
|
||||
set(__var "${__varname}")
|
||||
foreach(v ${android_proj_arglist})
|
||||
if("${v}" STREQUAL "${arg}")
|
||||
set(__varname "android_proj_${v}")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
if(__var STREQUAL __varname)
|
||||
list(APPEND ${__var} "${arg}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# get compatible SDK target
|
||||
android_get_compatible_target(android_proj_sdk_target ${ANDROID_NATIVE_API_LEVEL} ${android_proj_SDK_TARGET})
|
||||
|
||||
if(NOT android_proj_sdk_target)
|
||||
message(WARNING "Can not find any SDK target compatible with: ${ANDROID_NATIVE_API_LEVEL} ${android_proj_SDK_TARGET}
|
||||
The project ${target} will not be build")
|
||||
endif()
|
||||
|
||||
# check native dependencies
|
||||
if(android_proj_IGNORE_JAVA)
|
||||
ocv_check_dependencies(${android_proj_NATIVE_DEPS})
|
||||
else()
|
||||
ocv_check_dependencies(${android_proj_NATIVE_DEPS} opencv_java)
|
||||
endif()
|
||||
|
||||
if(EXISTS "${path}/jni/Android.mk" )
|
||||
# find if native_app_glue is used
|
||||
file(STRINGS "${path}/jni/Android.mk" NATIVE_APP_GLUE REGEX ".*(call import-module,android/native_app_glue)" )
|
||||
if(NATIVE_APP_GLUE)
|
||||
if(ANDROID_NATIVE_API_LEVEL LESS 9 OR NOT EXISTS "${ANDROID_NDK}/sources/android/native_app_glue")
|
||||
set(OCV_DEPENDENCIES_FOUND FALSE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OCV_DEPENDENCIES_FOUND AND android_proj_sdk_target AND ANDROID_EXECUTABLE AND ANT_EXECUTABLE AND ANDROID_TOOLS_Pkg_Revision GREATER 13 AND EXISTS "${path}/${ANDROID_MANIFEST_FILE}")
|
||||
|
||||
project(${target})
|
||||
set(android_proj_bin_dir "${CMAKE_CURRENT_BINARY_DIR}/.build")
|
||||
|
||||
# get project sources
|
||||
file(GLOB_RECURSE android_proj_files RELATIVE "${path}" "${path}/res/*" "${path}/src/*")
|
||||
|
||||
if(NOT android_proj_IGNORE_MANIFEST)
|
||||
list(APPEND android_proj_files ${ANDROID_MANIFEST_FILE})
|
||||
endif()
|
||||
|
||||
# copy sources out from the build tree
|
||||
set(android_proj_file_deps "")
|
||||
foreach(f ${android_proj_files})
|
||||
add_custom_command(
|
||||
OUTPUT "${android_proj_bin_dir}/${f}"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${path}/${f}" "${android_proj_bin_dir}/${f}"
|
||||
MAIN_DEPENDENCY "${path}/${f}"
|
||||
COMMENT "Copying ${f}")
|
||||
list(APPEND android_proj_file_deps "${path}/${f}" "${android_proj_bin_dir}/${f}")
|
||||
endforeach()
|
||||
|
||||
set(android_proj_lib_deps_commands "")
|
||||
set(android_proj_target_files ${ANDROID_PROJECT_FILES})
|
||||
ocv_list_add_prefix(android_proj_target_files "${android_proj_bin_dir}/")
|
||||
|
||||
# process Android library dependencies
|
||||
foreach(dep ${android_proj_LIBRARY_DEPS})
|
||||
file(RELATIVE_PATH __dep "${android_proj_bin_dir}" "${dep}")
|
||||
list(APPEND android_proj_lib_deps_commands
|
||||
COMMAND ${ANDROID_EXECUTABLE} --silent update project --path "${android_proj_bin_dir}" --library "${__dep}")
|
||||
endforeach()
|
||||
|
||||
# fix Android project
|
||||
add_custom_command(
|
||||
OUTPUT ${android_proj_target_files}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${android_proj_target_files}
|
||||
COMMAND ${ANDROID_EXECUTABLE} --silent update project --path "${android_proj_bin_dir}" --target "${android_proj_sdk_target}" --name "${target}"
|
||||
${android_proj_lib_deps_commands}
|
||||
MAIN_DEPENDENCY "${android_proj_bin_dir}/${ANDROID_MANIFEST_FILE}"
|
||||
DEPENDS "${path}/${ANDROID_MANIFEST_FILE}"
|
||||
COMMENT "Updating Android project at ${path}. SDK target: ${android_proj_sdk_target}"
|
||||
)
|
||||
|
||||
list(APPEND android_proj_file_deps ${android_proj_target_files})
|
||||
|
||||
# build native part
|
||||
file(GLOB_RECURSE android_proj_jni_files "${path}/jni/*.c" "${path}/jni/*.h" "${path}/jni/*.cpp" "${path}/jni/*.hpp")
|
||||
ocv_list_filterout(android_proj_jni_files "\\\\.svn")
|
||||
|
||||
if(android_proj_jni_files AND EXISTS ${path}/jni/Android.mk AND NOT DEFINED JNI_LIB_NAME)
|
||||
# find local module name in Android.mk file to build native lib
|
||||
file(STRINGS "${path}/jni/Android.mk" JNI_LIB_NAME REGEX "LOCAL_MODULE[ ]*:=[ ]*.*" )
|
||||
string(REGEX REPLACE "LOCAL_MODULE[ ]*:=[ ]*([a-zA-Z_][a-zA-Z_0-9]*)[ ]*" "\\1" JNI_LIB_NAME "${JNI_LIB_NAME}")
|
||||
|
||||
if(JNI_LIB_NAME)
|
||||
ocv_include_modules_recurse(${android_proj_NATIVE_DEPS})
|
||||
ocv_include_directories("${path}/jni")
|
||||
|
||||
if(NATIVE_APP_GLUE)
|
||||
include_directories(${ANDROID_NDK}/sources/android/native_app_glue)
|
||||
list(APPEND android_proj_jni_files ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c)
|
||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wstrict-prototypes -Wunused-parameter -Wmissing-prototypes)
|
||||
set(android_proj_NATIVE_DEPS ${android_proj_NATIVE_DEPS} android)
|
||||
endif()
|
||||
|
||||
add_library(${JNI_LIB_NAME} MODULE ${android_proj_jni_files})
|
||||
target_link_libraries(${JNI_LIB_NAME} ${OPENCV_LINKER_LIBS} ${android_proj_NATIVE_DEPS})
|
||||
|
||||
set_target_properties(${JNI_LIB_NAME} PROPERTIES
|
||||
OUTPUT_NAME "${JNI_LIB_NAME}"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${android_proj_bin_dir}/libs/${ANDROID_NDK_ABI_NAME}"
|
||||
)
|
||||
|
||||
get_target_property(android_proj_jni_location "${JNI_LIB_NAME}" LOCATION)
|
||||
if (NOT (CMAKE_BUILD_TYPE MATCHES "debug"))
|
||||
add_custom_command(TARGET ${JNI_LIB_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} --strip-unneeded "${android_proj_jni_location}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# build java part
|
||||
if(android_proj_IGNORE_JAVA)
|
||||
add_custom_command(
|
||||
OUTPUT "${android_proj_bin_dir}/bin/${target}-debug.apk"
|
||||
COMMAND ${ANT_EXECUTABLE} -q -noinput -k debug
|
||||
COMMAND ${CMAKE_COMMAND} -E touch "${android_proj_bin_dir}/bin/${target}-debug.apk" # needed because ant does not update the timestamp of updated apk
|
||||
WORKING_DIRECTORY "${android_proj_bin_dir}"
|
||||
MAIN_DEPENDENCY "${android_proj_bin_dir}/${ANDROID_MANIFEST_FILE}"
|
||||
DEPENDS ${android_proj_file_deps} ${JNI_LIB_NAME})
|
||||
else()
|
||||
add_custom_command(
|
||||
OUTPUT "${android_proj_bin_dir}/bin/${target}-debug.apk"
|
||||
COMMAND ${ANT_EXECUTABLE} -q -noinput -k debug
|
||||
COMMAND ${CMAKE_COMMAND} -E touch "${android_proj_bin_dir}/bin/${target}-debug.apk" # needed because ant does not update the timestamp of updated apk
|
||||
WORKING_DIRECTORY "${android_proj_bin_dir}"
|
||||
MAIN_DEPENDENCY "${android_proj_bin_dir}/${ANDROID_MANIFEST_FILE}"
|
||||
DEPENDS "${Wagic_BINARY_DIR}/bin/classes.jar.dephelper" opencv_java # as we are part of Wagic we can just force this dependency
|
||||
DEPENDS ${android_proj_file_deps} ${JNI_LIB_NAME})
|
||||
endif()
|
||||
|
||||
unset(JNI_LIB_NAME)
|
||||
|
||||
add_custom_target(${target} ALL SOURCES "${android_proj_bin_dir}/bin/${target}-debug.apk" )
|
||||
if(NOT android_proj_IGNORE_JAVA)
|
||||
add_dependencies(${target} opencv_java)
|
||||
endif()
|
||||
if(android_proj_native_deps)
|
||||
add_dependencies(${target} ${android_proj_native_deps})
|
||||
endif()
|
||||
|
||||
if(__android_project_chain)
|
||||
add_dependencies(${target} ${__android_project_chain})
|
||||
endif()
|
||||
set(__android_project_chain ${target} CACHE INTERNAL "auxiliary variable used for Android progects chaining")
|
||||
|
||||
# put the final .apk to the Wagic's bin folder
|
||||
add_custom_command(TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${android_proj_bin_dir}/bin/${target}-debug.apk" "${Wagic_BINARY_DIR}/bin/${target}.apk")
|
||||
if(INSTALL_ANDROID_EXAMPLES AND "${target}" MATCHES "^example-")
|
||||
#apk
|
||||
install(FILES "${Wagic_BINARY_DIR}/bin/${target}.apk" DESTINATION "samples" COMPONENT main)
|
||||
get_filename_component(sample_dir "${path}" NAME)
|
||||
#java part
|
||||
list(REMOVE_ITEM android_proj_files ${ANDROID_MANIFEST_FILE})
|
||||
foreach(f ${android_proj_files} ${ANDROID_MANIFEST_FILE})
|
||||
get_filename_component(install_subdir "${f}" PATH)
|
||||
install(FILES "${android_proj_bin_dir}/${f}" DESTINATION "samples/${sample_dir}/${install_subdir}" COMPONENT main)
|
||||
endforeach()
|
||||
#jni part + eclipse files
|
||||
file(GLOB_RECURSE jni_files RELATIVE "${path}" "${path}/jni/*" "${path}/.cproject")
|
||||
ocv_list_filterout(jni_files "\\\\.svn")
|
||||
foreach(f ${jni_files} ".classpath" ".project" ".settings/org.eclipse.jdt.core.prefs")
|
||||
get_filename_component(install_subdir "${f}" PATH)
|
||||
install(FILES "${path}/${f}" DESTINATION "samples/${sample_dir}/${install_subdir}" COMPONENT main)
|
||||
endforeach()
|
||||
#update proj
|
||||
if(android_proj_lib_deps_commands)
|
||||
set(inst_lib_opt " --library ../../sdk/java")
|
||||
endif()
|
||||
install(CODE "EXECUTE_PROCESS(COMMAND ${ANDROID_EXECUTABLE} --silent update project --path . --target \"${android_proj_sdk_target}\" --name \"${target}\" ${inst_lib_opt}
|
||||
WORKING_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/samples/${sample_dir}\"
|
||||
)" COMPONENT main)
|
||||
#empty 'gen'
|
||||
install(CODE "MAKE_DIRECTORY(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/samples/${sample_dir}/gen\")" COMPONENT main)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
13
CMakeModules/FindAnt.cmake
Normal file
13
CMakeModules/FindAnt.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
find_host_program(ANT_EXECUTABLE "ant")
|
||||
|
||||
if(ANT_EXECUTABLE)
|
||||
set(ANT_FOUND ON)
|
||||
else()
|
||||
set(ANT_FOUND OFF)
|
||||
endif()
|
||||
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ANT REQUIRED_VARS ANT_EXECUTABLE)
|
||||
mark_as_advanced(ANT_EXECUTABLE ANT_FOUND)
|
||||
29
CMakeModules/FindOpenSL.cmake
Normal file
29
CMakeModules/FindOpenSL.cmake
Normal file
@@ -0,0 +1,29 @@
|
||||
# - Find OpenSL (actually OpenSLES)
|
||||
# Find the OpenSLES includes and libraries
|
||||
#
|
||||
# OPENSL_INCLUDE_DIR - where to find dsound.h
|
||||
# OPENSL_LIBRARIES - List of libraries when using dsound.
|
||||
# OPENSL_FOUND - True if dsound found.
|
||||
|
||||
if(OPENSL_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set(OPENSL_FIND_QUIETLY TRUE)
|
||||
endif(OPENSL_INCLUDE_DIR)
|
||||
|
||||
find_path(OPENSL_INCLUDE_DIR SLES/OpenSLES.h)
|
||||
|
||||
find_library(OPENSL_LIBRARY NAMES OpenSLES)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set OPENSL_FOUND to TRUE if
|
||||
# all listed variables are TRUE.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OPENSL DEFAULT_MSG
|
||||
OPENSL_INCLUDE_DIR OPENSL_LIBRARY)
|
||||
|
||||
if(OPENSL_FOUND)
|
||||
set(OPENSL_LIBRARIES ${OPENSL_LIBRARY})
|
||||
else(OPENSL_FOUND)
|
||||
set(OPENSL_LIBRARIES)
|
||||
endif(OPENSL_FOUND)
|
||||
|
||||
mark_as_advanced(OPENSL_INCLUDE_DIR OPENSL_LIBRARY)
|
||||
267
CMakeModules/FindOrBuild.cmake
Normal file
267
CMakeModules/FindOrBuild.cmake
Normal file
@@ -0,0 +1,267 @@
|
||||
macro(FindOrBuildZipFS)
|
||||
if(BUILD_ZIPFS)
|
||||
add_subdirectory(
|
||||
${CMAKE_SOURCE_DIR}/thirdparty/zipFS
|
||||
${CMAKE_BINARY_DIR}/thirdparty/zipFS)
|
||||
set(ZIPFS_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/zipFS)
|
||||
set(ZIPFS_LIBRARY zipFS)
|
||||
else()
|
||||
message(WARNING "ZIPFS must get build")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildTinyXML)
|
||||
if(BUILD_TINYXML)
|
||||
add_definitions(-DTIXML_USE_STL)
|
||||
add_subdirectory(
|
||||
${CMAKE_SOURCE_DIR}/thirdparty/tinyxml
|
||||
${CMAKE_BINARY_DIR}/thirdparty/tinyxml)
|
||||
set(TINYXML_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/tinyxml)
|
||||
set(TINYXML_LIBRARIES tinyxml)
|
||||
else()
|
||||
find_package(TinyXML REQUIRED)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildSDL2)
|
||||
if(BUILD_SDL2)
|
||||
if(WIN32)
|
||||
#SDL2 DirectX build is somehow broken...
|
||||
set(SDL_AUDIO FALSE)
|
||||
set(SDL_JOYSTICK FALSE)
|
||||
set(SDL_HAPTIC FALSE)
|
||||
# Forcing static build on Windows as SDL2main is often needed and easier to link statically.
|
||||
# Set SDL_SHARED to OFF *before* adding the subdirectory to influence its build.
|
||||
set(SDL_SHARED OFF CACHE BOOL "Build SDL2 as a static library" FORCE)
|
||||
endif()
|
||||
# Add the subdirectory. This creates targets like SDL2::SDL2, SDL2::SDL2-static, SDL2::SDL2main
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/SDL2 ${CMAKE_BINARY_DIR}/thirdparty/SDL2)
|
||||
set(SDL2_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/SDL2/include ${CMAKE_BINARY_DIR}/thirdparty/SDL2)
|
||||
# Linking against SDL2::SDL2 below handles includes automatically.
|
||||
if(EMSCRIPTEN)
|
||||
# Emscripten typically uses static linking
|
||||
set(SDL2_LIBRARY SDL2::SDL2-static) # Use the CMake target
|
||||
else()
|
||||
# Link against SDL2 (shared or static based on SDL_SHARED) and SDL2main
|
||||
# SDL2::SDL2 resolves to the correct shared/static target.
|
||||
# SDL2::SDL2main is needed on many platforms, especially Windows.
|
||||
set(SDL2_LIBRARY SDL2::SDL2 SDL2::SDL2main) # Use the CMake targets
|
||||
endif()
|
||||
elseif(NOT EMSCRIPTEN)
|
||||
# If not building from source, use the find_package module
|
||||
find_package(SDL2)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildUNZIP)
|
||||
if(BUILD_UNZIP)
|
||||
add_subdirectory(
|
||||
${CMAKE_SOURCE_DIR}/thirdparty/unzip
|
||||
${CMAKE_BINARY_DIR}/thirdparty/unzip)
|
||||
set(UNZIP_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/unzip)
|
||||
set(UNZIP_LIBRARY unzip)
|
||||
else()
|
||||
message(WARNING "UNZIP must get build")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildBoost)
|
||||
if(PSP OR UNIX OR WIN32 OR IOS)
|
||||
#the psp build does not need more than a few headers
|
||||
#todo: remove from the repository
|
||||
set(BOOST_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/thirdparty/Boost)
|
||||
# elseif(WIN32)
|
||||
#set BOOST_ROOT to the root of boost
|
||||
# set(Boost_USE_STATIC_LIBS ON)
|
||||
# set(Boost_USE_MULTITHREADED ON)
|
||||
# set(BOOST_ROOT $ENV{BOOST_ROOT})
|
||||
|
||||
# set(BOOST_LIBRARYDIR ${BOOST_ROOT}/libs)
|
||||
# set(BOOST_INCLUDEDIR ${BOOST_ROOT})
|
||||
|
||||
# find_package(Boost COMPONENTS system thread date_time REQUIRED)
|
||||
# if(NOT Boost_FOUND)
|
||||
# message("Set the BOOST_ROOT environment variable to point to your boost installation.")
|
||||
# message("We need system thread and date_time compiled static libs")
|
||||
# message("These libs are compiler specific.")
|
||||
# endif()
|
||||
# elseif(UNIX AND NOT ANDROID)
|
||||
# find_package(Boost COMPONENTS system thread date_time REQUIRED)
|
||||
elseif(ANDROID)
|
||||
#this is a hack. we compile a few boost libds directly into
|
||||
#the application. we should require static libs for android
|
||||
#to be available. maybe we could add the build option to
|
||||
#download and build a compatible boost version
|
||||
find_path(BOOST_INCLUDE_DIRS NAMES bind.hpp HINTS $ENV{ANDROID_BOOST_ROOT} PATH_SUFFIXES boost)
|
||||
|
||||
if(BOOST_INCLUDE_DIRS)
|
||||
get_filename_component(BOOST_INCLUDE_DIRS ${BOOST_INCLUDE_DIRS} PATH)
|
||||
set(ANDROID_BOOST_PTHREAD_SRC_DIR ${BOOST_INCLUDE_DIRS}/libs/thread/src/pthread)
|
||||
set(ANDROID_BOOST_SYSTEM_SRC_DIR ${BOOST_INCLUDE_DIRS}/libs/system/src/)
|
||||
else()
|
||||
message(SEND_ERROR "We require a few boost sources to get compiled into wagic. Please point the ANDROID_BOOST_ROOT environment variable to a boost-source copy root.")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
macro(FindOrBuildZLIB)
|
||||
if(BUILD_ZLIB)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/zlib ${CMAKE_BINARY_DIR}/thirdparty/zlib)
|
||||
set(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/thirdparty/zlib)
|
||||
set(ZLIB_LIBRARIES ZLIB::ZLIBSTATIC)
|
||||
else()
|
||||
if(WIN32 AND NOT MINGW)
|
||||
set(ZLIB_ROOT ${CMAKE_SOURCE_DIR}/thirdparty/binary/win)
|
||||
find_package(ZLIB)
|
||||
else()
|
||||
if(MINGW)
|
||||
set(ZLIB_USE_STATIC_LIBS TRUE)
|
||||
find_package(ZLIB REQUIRED)
|
||||
else()
|
||||
if(backend_qt_console OR backend_qt_widget OR EMSCRIPTEN)
|
||||
set(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/thirdparty/zlib)
|
||||
else()
|
||||
find_package(ZLIB)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildGIF)
|
||||
if(BUILD_GIF)
|
||||
message(WARNING "GIF sources are currently not included within the wagic tree")
|
||||
else()
|
||||
if(PSP)
|
||||
find_package(GIF)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildJPEG)
|
||||
if(BUILD_JPEG)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/libjpeg ${CMAKE_BINARY_DIR}/thirdparty/libjpeg)
|
||||
set(JPEG_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/libjpeg)
|
||||
set(JPEG_LIBRARY jpeg)
|
||||
else()
|
||||
if(WIN32)
|
||||
#findJPEG does currently not provide prefix vars to guide it
|
||||
find_path(JPEG_INCLUDE_DIR jpeglib.h HINTS ${CMAKE_SOURCE_DIR}/thirdparty/binary/win/include)
|
||||
find_library(JPEG_LIBRARY NAMES libjpeg-static-mt HINTS ${CMAKE_SOURCE_DIR}/thirdparty/binary/win/lib)
|
||||
|
||||
if(JPEG_INCLUDE_DIR AND JPEG_LIBRARY)
|
||||
set(JPEG_FOUND ON)
|
||||
mark_as_advanced(JPEG_INCLUDE_DIR JPEG_LIBRARY)
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find JPEG on windows")
|
||||
endif()
|
||||
else()
|
||||
find_package(JPEG)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildPNG)
|
||||
if(BUILD_PNG)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/libpng ${CMAKE_BINARY_DIR}/thirdparty/libpng)
|
||||
set(PNG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/thirdparty/libpng)
|
||||
# find_path(PNG_INCLUDE_DIRS NAMES png.h HINTS ${CMAKE_SOURCE_DIR}/thirdparty/libpng)
|
||||
set(PNG_LIBRARIES png)
|
||||
else()
|
||||
if(WIN32)
|
||||
#findPNG does currently not provide prefix vars. so we find
|
||||
find_path(PNG_INCLUDE_DIRS png.h HINTS ${CMAKE_SOURCE_DIR}/thirdparty/binary/win/include)
|
||||
find_library(PNG_LIBRARIES libpng HINTS ${CMAKE_SOURCE_DIR}/thirdparty/binary/win/lib)
|
||||
|
||||
if (PNG_LIBRARIES AND PNG_INCLUDE_DIRS)
|
||||
set(PNG_FOUND ON)
|
||||
mark_as_advanced(PNG_INCLUDE_DIRS PNG_LIBRARIES)
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find PNG on windows")
|
||||
endif()
|
||||
else()
|
||||
find_package(PNG)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildCurl)
|
||||
if(BUILD_CURL)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/curl ${CMAKE_BINARY_DIR}/thirdparty/curl)
|
||||
set(CURL curl_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/thirdparty/curl)
|
||||
set(CURL_LIBRARIES curl)
|
||||
else()
|
||||
if(WIN32)
|
||||
#findPNG does currently not provide prefix vars. so we find
|
||||
find_path(CURL CURL_INCLUDE_DIRS curl.h HINTS ${CMAKE_SOURCE_DIR}/thirdparty/binary/win/include)
|
||||
find_library(CURL_LIBRARIES libcurl HINTS ${CMAKE_SOURCE_DIR}/thirdparty/binary/win/lib)
|
||||
|
||||
if (CURL_LIBRARIES AND CURL_INCLUDE_DIRS)
|
||||
set(CURL_FOUND ON)
|
||||
mark_as_advanced(CURL_INCLUDE_DIRS CURL_LIBRARIES)
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find CURL on windows")
|
||||
endif()
|
||||
else()
|
||||
find_package(CURL)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildFreetype)
|
||||
if(PSP)
|
||||
set(ENV{FREETYPE_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/thirdparty/binary/psp/include)
|
||||
set(ENV{FREETYPE_LIBRARIES} freetype)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildHgeTools)
|
||||
if(PSP)
|
||||
find_library(HGETOOLS_LIBRARY NAMES hgetools HINTS "${CMAKE_SOURCE_DIR}/thirdparty/binary/psp/lib")
|
||||
set(HGETOOLS_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/thirdparty/binary/psp/include")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildMikMod)
|
||||
if(PSP)
|
||||
find_library(MIKMOD_LIBRARY NAMES mikmod HINTS "${CMAKE_SOURCE_DIR}/thirdparty/binary/psp/lib")
|
||||
set(MIKMOD_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/thirdparty/binary/psp/include")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildQt)
|
||||
if(backend_qt_console)
|
||||
add_definitions(-DCONSOLE_CONFIG -DTESTSUITE)
|
||||
find_package(Qt5Core REQUIRED)
|
||||
find_package(Qt5 COMPONENTS Core Network Multimedia REQUIRED)
|
||||
elseif(backend_qt_widget)
|
||||
add_definitions(-DQT_WIDGET)
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(X11 REQUIRED)
|
||||
find_package(Qt5 COMPONENTS Core Gui OpenGL Network Multimedia REQUIRED)
|
||||
endif()
|
||||
# include(${QT_USE_FILE})
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildOpenGL)
|
||||
if(backend_sdl OR backend_qt_console OR backend_qt_widget)
|
||||
if(ANDROID)
|
||||
#find openglesv on android
|
||||
set(OPENGL_LIBRARIES "-ldl -lGLESv1_CM -lGLESv2 -llog -landroid")
|
||||
elseif(EMSCRIPTEN)
|
||||
set(OPENGL_LIBRARIES "")
|
||||
else()
|
||||
find_package(OpenGL)
|
||||
# find_package(GLUT)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildOpenSL)
|
||||
find_package(OpenSL)
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildPSPSDK)
|
||||
find_package(PSPSDK COMPONENTS psppower pspmpeg pspaudiocodec pspaudiolib pspaudio pspmp3 pspgum pspgu psprtc pspfpu REQUIRED)
|
||||
endmacro()
|
||||
62
CMakeModules/FindPSPSDK.cmake
Normal file
62
CMakeModules/FindPSPSDK.cmake
Normal file
@@ -0,0 +1,62 @@
|
||||
# - Try to find PSPSDK
|
||||
# Once done this will define
|
||||
# PSPSDK_FOUND - System has PSPSDK
|
||||
# PSPSDK_INCLUDE_DIR - The PSPSDK include directories
|
||||
# PSPSDK_LIB - The libraries requested with the components field
|
||||
# PSPSDK_REQUIRED_LIB - The libriries the PSPSDK needs always
|
||||
# PSPSDK_CFLAGS - The CFLAGS to use
|
||||
# PSPSDK_PATH - The output of psp-config --pspsdk-path
|
||||
# PSPSDK_PREFIX - The output of psp-config --psp-prefix
|
||||
# PSPSDK_CXX_COMPILER - The PSPSDK CXX Compilers path
|
||||
# PSPSDK_CXX_LINKER - The PSPSDK CXX Linker command
|
||||
# PSPSDK_FIXUP_IMPORTS_COMMAND - psp-fixup-imports command
|
||||
# PSPSDK_PRXGEN_COMMAND - psp-prxgen command
|
||||
# PSPSDK_PACK_PBP_COMMAND - pack-pbp command
|
||||
# PSPSDK_MKSFO_COMMAND - mksfo command
|
||||
|
||||
#find the psp-config progams absolute path
|
||||
#psp-config needs to be reachable via the system shell (PATH)
|
||||
find_program(PSP_CONFIG_PROGRAM psp-config)
|
||||
|
||||
#TODO: check if something is REQUIRED and throw errors instead of messages
|
||||
if(PSP_CONFIG_PROGRAM)
|
||||
find_program(PSPSDK_CXX_COMPILER psp-g++)
|
||||
find_program(PSPSDK_CXX_LINKER psp-gcc)
|
||||
find_program(PSPSDK_FIXUP_IMPORTS_COMMAND psp-fixup-imports)
|
||||
find_program(PSPSDK_PRXGEN_COMMAND psp-prxgen)
|
||||
find_program(PSPSDK_PACK_PBP_COMMAND pack-pbp)
|
||||
find_program(PSPSDK_MKSFO_COMMAND mksfo)
|
||||
|
||||
#ask psp-config for the
|
||||
execute_process(COMMAND psp-config --pspsdk-path OUTPUT_VARIABLE PSPSDK_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND psp-config --psp-prefix OUTPUT_VARIABLE PSPSDK_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
set(PSPSDK_INCLUDE_DIR "${PSPSDK_PATH}/include")
|
||||
|
||||
foreach(_COMPONENT ${PSPSDK_FIND_COMPONENTS})
|
||||
find_library(PSPSDK_${_COMPONENT} NAMES ${_COMPONENT})
|
||||
if(NOT PSPSDK_${_COMPONENT})
|
||||
message(SEND_ERROR "PSPSDK: ${_COMPONENT} not found")
|
||||
else()
|
||||
set(PSPSDK_LIB ${PSPSDK_LIB} ${PSPSDK_${_COMPONENT}})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
#find libs which pspsdk does require to link even if the programs does not need one of them directly
|
||||
foreach(_COMPONENT pspdebug pspdisplay pspge pspctrl pspsdk c pspnet pspnet_inet pspnet_apctl pspnet_resolver psputility pspuser)
|
||||
find_library(PSPSDK_${_COMPONENT} NAMES ${_COMPONENT})
|
||||
if(NOT PSPSDK_${_COMPONENT})
|
||||
message(SEND_ERROR "PSPSDK: ${_COMPONENT} not found")
|
||||
else()
|
||||
set(PSPSDK_REQUIRED_LIB ${PSPSDK_REQUIRED_LIB} ${PSPSDK_${_COMPONENT}})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(PSPSDK DEFAULT_MSG
|
||||
PSPSDK_CXX_LINKER PSPSDK_CXX_COMPILER PSPSDK_PATH PSPSDK_PREFIX PSPSDK_LIB PSPSDK_REQUIRED_LIB PSPSDK_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(PSPSDK_CXX_LINKER PSPSDK_CXX_COMPILER PSPSDK_PATH PSPSDK_PREFIX PSPSDK_LIB PSPSDK_REQUIRED_LIB PSPSDK_INCLUDE_DIR)
|
||||
181
CMakeModules/FindSDL2.cmake
Normal file
181
CMakeModules/FindSDL2.cmake
Normal file
@@ -0,0 +1,181 @@
|
||||
|
||||
# Locate SDL2 library
|
||||
# This module defines
|
||||
# SDL2_LIBRARY, the name of the library to link against
|
||||
# SDL2_FOUND, if false, do not try to link to SDL2
|
||||
# SDL2_INCLUDE_DIR, where to find SDL.h
|
||||
#
|
||||
# This module responds to the the flag:
|
||||
# SDL2_BUILDING_LIBRARY
|
||||
# If this is defined, then no SDL2_main will be linked in because
|
||||
# only applications need main().
|
||||
# Otherwise, it is assumed you are building an application and this
|
||||
# module will attempt to locate and set the the proper link flags
|
||||
# as part of the returned SDL2_LIBRARY variable.
|
||||
#
|
||||
# Don't forget to include SDL2main.h and SDL2main.m your project for the
|
||||
# OS X framework based version. (Other versions link to -lSDL2main which
|
||||
# this module will try to find on your behalf.) Also for OS X, this
|
||||
# module will automatically add the -framework Cocoa on your behalf.
|
||||
#
|
||||
#
|
||||
# Additional Note: If you see an empty SDL2_LIBRARY_TEMP in your configuration
|
||||
# and no SDL2_LIBRARY, it means CMake did not find your SDL2 library
|
||||
# (SDL2.dll, libsdl2.so, SDL2.framework, etc).
|
||||
# Set SDL2_LIBRARY_TEMP to point to your SDL2 library, and configure again.
|
||||
# Similarly, if you see an empty SDL2MAIN_LIBRARY, you should set this value
|
||||
# as appropriate. These values are used to generate the final SDL2_LIBRARY
|
||||
# variable, but when these values are unset, SDL2_LIBRARY does not get created.
|
||||
#
|
||||
#
|
||||
# $SDL2DIR is an environment variable that would
|
||||
# correspond to the ./configure --prefix=$SDL2DIR
|
||||
# used in building SDL2.
|
||||
# l.e.galup 9-20-02
|
||||
#
|
||||
# Modified by Eric Wing.
|
||||
# Added code to assist with automated building by using environmental variables
|
||||
# and providing a more controlled/consistent search behavior.
|
||||
# Added new modifications to recognize OS X frameworks and
|
||||
# additional Unix paths (FreeBSD, etc).
|
||||
# Also corrected the header search path to follow "proper" SDL2 guidelines.
|
||||
# Added a search for SDL2main which is needed by some platforms.
|
||||
# Added a search for threads which is needed by some platforms.
|
||||
# Added needed compile switches for MinGW.
|
||||
#
|
||||
# On OSX, this will prefer the Framework version (if found) over others.
|
||||
# People will have to manually change the cache values of
|
||||
# SDL2_LIBRARY to override this selection or set the CMake environment
|
||||
# CMAKE_INCLUDE_PATH to modify the search paths.
|
||||
#
|
||||
# Note that the header path has changed from SDL2/SDL.h to just SDL.h
|
||||
# This needed to change because "proper" SDL2 convention
|
||||
# is #include "SDL.h", not <SDL2/SDL.h>. This is done for portability
|
||||
# reasons because not all systems place things in SDL2/ (see FreeBSD).
|
||||
#
|
||||
# Ported by Johnny Patterson. This is a literal port for SDL2 of the FindSDL.cmake
|
||||
# module with the minor edit of changing "SDL" to "SDL2" where necessary. This
|
||||
# was not created for redistribution, and exists temporarily pending official
|
||||
# SDL2 CMake modules.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2003-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
FIND_PATH(SDL2_INCLUDE_DIR SDL.h
|
||||
HINTS
|
||||
$ENV{SDL2DIR}
|
||||
PATH_SUFFIXES include/SDL2 include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/include/SDL2
|
||||
/usr/include/SDL2
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
|
||||
FIND_LIBRARY(SDL2_LIBRARY_TEMP
|
||||
NAMES SDL2
|
||||
HINTS
|
||||
$ENV{SDL2DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
|
||||
#MESSAGE("SDL2_LIBRARY_TEMP is ${SDL2_LIBRARY_TEMP}")
|
||||
|
||||
IF(NOT SDL2_BUILDING_LIBRARY)
|
||||
IF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
|
||||
# Non-OS X framework versions expect you to also dynamically link to
|
||||
# SDL2main. This is mainly for Windows and OS X. Other (Unix) platforms
|
||||
# seem to provide SDL2main for compatibility even though they don't
|
||||
# necessarily need it.
|
||||
FIND_LIBRARY(SDL2MAIN_LIBRARY
|
||||
NAMES SDL2main
|
||||
HINTS
|
||||
$ENV{SDL2DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
|
||||
ENDIF(NOT SDL2_BUILDING_LIBRARY)
|
||||
|
||||
# SDL2 may require threads on your system.
|
||||
# The Apple build may not need an explicit flag because one of the
|
||||
# frameworks may already provide it.
|
||||
# But for non-OSX systems, I will use the CMake Threads package.
|
||||
IF(NOT APPLE)
|
||||
FIND_PACKAGE(Threads)
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# MinGW needs an additional library, mwindows
|
||||
# It's total link flags should look like -lmingw32 -lSDL2main -lSDL2 -lmwindows
|
||||
# (Actually on second look, I think it only needs one of the m* libraries.)
|
||||
IF(MINGW)
|
||||
SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
|
||||
ENDIF(MINGW)
|
||||
|
||||
SET(SDL2_FOUND "NO")
|
||||
IF(SDL2_LIBRARY_TEMP)
|
||||
# For SDL2main
|
||||
IF(NOT SDL2_BUILDING_LIBRARY)
|
||||
IF(SDL2MAIN_LIBRARY)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
||||
ENDIF(SDL2MAIN_LIBRARY)
|
||||
ENDIF(NOT SDL2_BUILDING_LIBRARY)
|
||||
|
||||
# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
|
||||
# CMake doesn't display the -framework Cocoa string in the UI even
|
||||
# though it actually is there if I modify a pre-used variable.
|
||||
# I think it has something to do with the CACHE STRING.
|
||||
# So I use a temporary variable until the end so I can set the
|
||||
# "real" variable in one-shot.
|
||||
IF(APPLE)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
|
||||
ENDIF(APPLE)
|
||||
|
||||
# For threads, as mentioned Apple doesn't need this.
|
||||
# In fact, there seems to be a problem if I used the Threads package
|
||||
# and try using this line, so I'm just skipping it entirely for OS X.
|
||||
IF(NOT APPLE)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# For MinGW library
|
||||
IF(MINGW)
|
||||
SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
||||
ENDIF(MINGW)
|
||||
|
||||
# Set the final string here so the GUI reflects the final state.
|
||||
SET(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL2 Library can be found")
|
||||
# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
|
||||
SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
|
||||
|
||||
SET(SDL2_FOUND "YES")
|
||||
ENDIF(SDL2_LIBRARY_TEMP)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2
|
||||
REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)
|
||||
mark_as_advanced(SDL2MAIN_LIBRARY SDL2_LIBRARY SDL2_INCLUDE_DIR)
|
||||
26
CMakeModules/FindTinyXML.cmake
Executable file
26
CMakeModules/FindTinyXML.cmake
Executable file
@@ -0,0 +1,26 @@
|
||||
# - Find TinyXML
|
||||
# Find the native TinyXML includes and library
|
||||
#
|
||||
# TINYXML_FOUND - True if TinyXML found.
|
||||
# TINYXML_INCLUDE_DIR - where to find tinyxml.h, etc.
|
||||
# TINYXML_LIBRARIES - List of libraries when using TinyXML.
|
||||
#
|
||||
|
||||
IF( TINYXML_INCLUDE_DIR )
|
||||
# Already in cache, be silent
|
||||
SET( TinyXML_FIND_QUIETLY TRUE )
|
||||
ENDIF( TINYXML_INCLUDE_DIR )
|
||||
|
||||
FIND_PATH( TINYXML_INCLUDE_DIR "tinyxml.h"
|
||||
PATH_SUFFIXES "tinyxml" )
|
||||
|
||||
FIND_LIBRARY( TINYXML_LIBRARIES
|
||||
NAMES "tinyxml"
|
||||
PATH_SUFFIXES "tinyxml" )
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set TINYXML_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE( "FindPackageHandleStandardArgs" )
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS( "TinyXML" DEFAULT_MSG TINYXML_INCLUDE_DIR TINYXML_LIBRARIES )
|
||||
|
||||
MARK_AS_ADVANCED( TINYXML_INCLUDE_DIR TINYXML_LIBRARIES )
|
||||
1693
CMakeModules/android.toolchain.cmake
Normal file
1693
CMakeModules/android.toolchain.cmake
Normal file
File diff suppressed because it is too large
Load Diff
48
CMakeModules/ios-theos.toolchain.cmake
Normal file
48
CMakeModules/ios-theos.toolchain.cmake
Normal file
@@ -0,0 +1,48 @@
|
||||
include(CMakeForceCompiler)
|
||||
|
||||
# this one is important
|
||||
SET(CMAKE_SYSTEM_NAME "Generic")
|
||||
#this one not so much
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
set (CMAKE_SYSTEM_NAME Generic)
|
||||
|
||||
# Just point to anything that exists.
|
||||
# We don't need CMake to generate proper build files.
|
||||
set(CMAKE_C_COMPILER ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(CMAKE_CXX_COMPILER ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# Skip the platform compiler checks
|
||||
set (CMAKE_CXX_COMPILER_WORKS TRUE)
|
||||
set (CMAKE_C_COMPILER_WORKS TRUE)
|
||||
|
||||
#how libraries look
|
||||
SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
|
||||
|
||||
SET(CMAKE_SYSTEM_INCLUDE_PATH
|
||||
${THEOS_PATH}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${CMAKE_SYSTEM_INCLUDE_PATH})
|
||||
|
||||
# where is the target environment
|
||||
SET(CMAKE_SYSTEM_LIBRARY_PATH
|
||||
${THEOS_PATH}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_SYSTEM_LIBRARY_PATH})
|
||||
|
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${THEOS_PATH}
|
||||
${THEOS_PATH}/lib
|
||||
${THEOS_PATH}/include
|
||||
)
|
||||
|
||||
# search for programs in the build host directories
|
||||
# for libraries and headers in the target directories and then in the host
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY FIRST)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE FIRST)
|
||||
|
||||
set(IOS 1)
|
||||
333
CMakeModules/ios.toolchain.cmake
Normal file
333
CMakeModules/ios.toolchain.cmake
Normal file
@@ -0,0 +1,333 @@
|
||||
# This file is part of the ios-cmake project. It was retrieved from
|
||||
# https://github.com/cristeab/ios-cmake.git, which is a fork of
|
||||
# https://code.google.com/p/ios-cmake/. Which in turn is based off of
|
||||
# the Platform/Darwin.cmake and Platform/UnixPaths.cmake files which
|
||||
# are included with CMake 2.8.4
|
||||
#
|
||||
# The ios-cmake project is licensed under the new BSD license.
|
||||
#
|
||||
# Copyright (c) 2014, Bogdan Cristea and LTE Engineering Software,
|
||||
# Kitware, Inc., Insight Software Consortium. All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# This file is based off of the Platform/Darwin.cmake and
|
||||
# Platform/UnixPaths.cmake files which are included with CMake 2.8.4
|
||||
# It has been altered for iOS development.
|
||||
#
|
||||
# Updated by Alex Stewart (alexs.mac@gmail.com).
|
||||
# The following variables control the behaviour of this toolchain:
|
||||
#
|
||||
# IOS_PLATFORM: OS (default) or SIMULATOR or SIMULATOR64
|
||||
# OS = Build for iPhoneOS.
|
||||
# SIMULATOR = Build for x86 i386 iPhone Simulator.
|
||||
# SIMULATOR64 = Build for x86 x86_64 iPhone Simulator.
|
||||
# CMAKE_OSX_SYSROOT: Path to the iOS SDK to use. By default this is
|
||||
# automatically determined from IOS_PLATFORM and xcodebuild, but
|
||||
# can also be manually specified (although this should not be required).
|
||||
# CMAKE_IOS_DEVELOPER_ROOT: Path to the Developer directory for the iOS platform
|
||||
# being compiled for. By default this is automatically determined from
|
||||
# CMAKE_OSX_SYSROOT, but can also be manually specified (although this should
|
||||
# not be required).
|
||||
# ENABLE_BITCODE: (true|false) Enables or disables bitcode support. Default true
|
||||
#
|
||||
# This toolchain defines the following variables for use externally:
|
||||
#
|
||||
# XCODE_VERSION: Version number (not including Build version) of Xcode detected.
|
||||
# IOS_SDK_VERSION: Version of iOS SDK being used.
|
||||
# CMAKE_OSX_ARCHITECTURES: Architectures being compiled for (generated from
|
||||
# IOS_PLATFORM).
|
||||
#
|
||||
# This toolchain defines the following macros for use externally:
|
||||
#
|
||||
# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE XCODE_VARIANT)
|
||||
# A convenience macro for setting xcode specific properties on targets.
|
||||
# Available variants are: All, Release, RelWithDebInfo, Debug, MinSizeRel
|
||||
# example: set_xcode_property (myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1" "all").
|
||||
#
|
||||
# find_host_package (PROGRAM ARGS)
|
||||
# A macro used to find executable programs on the host system, not within the
|
||||
# iOS environment. Thanks to the android-cmake project for providing the
|
||||
# command.
|
||||
|
||||
# Fix for PThread library not in path
|
||||
set(CMAKE_THREAD_LIBS_INIT "-lpthread")
|
||||
set(CMAKE_HAVE_THREADS_LIBRARY 1)
|
||||
set(CMAKE_USE_WIN32_THREADS_INIT 0)
|
||||
set(CMAKE_USE_PTHREADS_INIT 1)
|
||||
|
||||
# Get the Xcode version being used.
|
||||
execute_process(COMMAND xcodebuild -version
|
||||
OUTPUT_VARIABLE XCODE_VERSION
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REGEX MATCH "Xcode [0-9\\.]+" XCODE_VERSION "${XCODE_VERSION}")
|
||||
string(REGEX REPLACE "Xcode ([0-9\\.]+)" "\\1" XCODE_VERSION "${XCODE_VERSION}")
|
||||
message(STATUS "Building with Xcode version: ${XCODE_VERSION}")
|
||||
# Default to building for iPhoneOS if not specified otherwise, and we cannot
|
||||
# determine the platform from the CMAKE_OSX_ARCHITECTURES variable. The use
|
||||
# of CMAKE_OSX_ARCHITECTURES is such that try_compile() projects can correctly
|
||||
# determine the value of IOS_PLATFORM from the root project, as
|
||||
# CMAKE_OSX_ARCHITECTURES is propagated to them by CMake.
|
||||
if (NOT DEFINED IOS_PLATFORM)
|
||||
if (CMAKE_OSX_ARCHITECTURES)
|
||||
if (CMAKE_OSX_ARCHITECTURES MATCHES ".*arm.*")
|
||||
set(IOS_PLATFORM "OS")
|
||||
elseif (CMAKE_OSX_ARCHITECTURES MATCHES "i386")
|
||||
set(IOS_PLATFORM "SIMULATOR")
|
||||
elseif (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
|
||||
set(IOS_PLATFORM "SIMULATOR64")
|
||||
endif()
|
||||
endif()
|
||||
if (NOT IOS_PLATFORM)
|
||||
set(IOS_PLATFORM "OS")
|
||||
endif()
|
||||
endif()
|
||||
set(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING
|
||||
"Type of iOS platform for which to build.")
|
||||
# Determine the platform name and architectures for use in xcodebuild commands
|
||||
# from the specified IOS_PLATFORM name.
|
||||
if (IOS_PLATFORM STREQUAL "OS")
|
||||
set(XCODE_IOS_PLATFORM iphoneos)
|
||||
set(IOS_ARCH armv7 armv7s arm64)
|
||||
elseif (IOS_PLATFORM STREQUAL "SIMULATOR")
|
||||
set(XCODE_IOS_PLATFORM iphonesimulator)
|
||||
set(IOS_ARCH i386)
|
||||
elseif(IOS_PLATFORM STREQUAL "SIMULATOR64")
|
||||
set(XCODE_IOS_PLATFORM iphonesimulator)
|
||||
set(IOS_ARCH x86_64)
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid IOS_PLATFORM: ${IOS_PLATFORM}")
|
||||
endif()
|
||||
message(STATUS "Configuring iOS build for platform: ${IOS_PLATFORM}, "
|
||||
"architecture(s): ${IOS_ARCH}")
|
||||
# If user did not specify the SDK root to use, then query xcodebuild for it.
|
||||
if (NOT CMAKE_OSX_SYSROOT)
|
||||
execute_process(COMMAND xcodebuild -version -sdk ${XCODE_IOS_PLATFORM} Path
|
||||
OUTPUT_VARIABLE CMAKE_OSX_SYSROOT
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
message(STATUS "Using SDK: ${CMAKE_OSX_SYSROOT} for platform: ${IOS_PLATFORM}")
|
||||
endif()
|
||||
if (NOT EXISTS ${CMAKE_OSX_SYSROOT})
|
||||
message(FATAL_ERROR "Invalid CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT} "
|
||||
"does not exist.")
|
||||
endif()
|
||||
# Specify minimum version of deployment target.
|
||||
if (NOT DEFINED IOS_DEPLOYMENT_TARGET)
|
||||
# Unless specified, SDK version 8.0 is used by default as minimum target version.
|
||||
set(IOS_DEPLOYMENT_TARGET "8.0"
|
||||
CACHE STRING "Minimum iOS version to build for." )
|
||||
message(STATUS "Using the default min-version since IOS_DEPLOYMENT_TARGET not provided!")
|
||||
endif()
|
||||
# Use bitcode or not
|
||||
if (NOT DEFINED ENABLE_BITCODE)
|
||||
# Unless specified, enable bitcode support by default
|
||||
set(ENABLE_BITCODE TRUE CACHE BOOL "Wheter or not to enable bitcode")
|
||||
message(STATUS "Enabling bitcode support by default. ENABLE_BITCODE not provided!")
|
||||
endif()
|
||||
# Get the SDK version information.
|
||||
execute_process(COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version SDKVersion
|
||||
OUTPUT_VARIABLE IOS_SDK_VERSION
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# Find the Developer root for the specific iOS platform being compiled for
|
||||
# from CMAKE_OSX_SYSROOT. Should be ../../ from SDK specified in
|
||||
# CMAKE_OSX_SYSROOT. There does not appear to be a direct way to obtain
|
||||
# this information from xcrun or xcodebuild.
|
||||
if (NOT CMAKE_IOS_DEVELOPER_ROOT)
|
||||
get_filename_component(IOS_PLATFORM_SDK_DIR ${CMAKE_OSX_SYSROOT} PATH)
|
||||
get_filename_component(CMAKE_IOS_DEVELOPER_ROOT ${IOS_PLATFORM_SDK_DIR} PATH)
|
||||
endif()
|
||||
if (NOT EXISTS ${CMAKE_IOS_DEVELOPER_ROOT})
|
||||
message(FATAL_ERROR "Invalid CMAKE_IOS_DEVELOPER_ROOT: "
|
||||
"${CMAKE_IOS_DEVELOPER_ROOT} does not exist.")
|
||||
endif()
|
||||
# Find the C & C++ compilers for the specified SDK.
|
||||
if (NOT CMAKE_C_COMPILER)
|
||||
execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang
|
||||
OUTPUT_VARIABLE CMAKE_C_COMPILER
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
message(STATUS "Using C compiler: ${CMAKE_C_COMPILER}")
|
||||
endif()
|
||||
if (NOT CMAKE_CXX_COMPILER)
|
||||
execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang++
|
||||
OUTPUT_VARIABLE CMAKE_CXX_COMPILER
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
message(STATUS "Using CXX compiler: ${CMAKE_CXX_COMPILER}")
|
||||
endif()
|
||||
# Find (Apple's) libtool.
|
||||
execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find libtool
|
||||
OUTPUT_VARIABLE IOS_LIBTOOL
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
message(STATUS "Using libtool: ${IOS_LIBTOOL}")
|
||||
# Configure libtool to be used instead of ar + ranlib to build static libraries.
|
||||
# This is required on Xcode 7+, but should also work on previous versions of
|
||||
# Xcode.
|
||||
set(CMAKE_C_CREATE_STATIC_LIBRARY
|
||||
"${IOS_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
|
||||
set(CMAKE_CXX_CREATE_STATIC_LIBRARY
|
||||
"${IOS_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
|
||||
# Get the version of Darwin (OS X) of the host.
|
||||
execute_process(COMMAND uname -r
|
||||
OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# Standard settings.
|
||||
set(CMAKE_SYSTEM_NAME Darwin CACHE INTERNAL "")
|
||||
set(CMAKE_SYSTEM_VERSION ${IOS_SDK_VERSION} CACHE INTERNAL "")
|
||||
set(UNIX TRUE CACHE BOOL "")
|
||||
set(APPLE TRUE CACHE BOOL "")
|
||||
set(IOS TRUE CACHE BOOL "")
|
||||
set(CMAKE_AR ar CACHE FILEPATH "" FORCE)
|
||||
set(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE)
|
||||
# Force unset of OS X-specific deployment target (otherwise autopopulated),
|
||||
# required as of cmake 2.8.10.
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING
|
||||
"Must be empty for iOS builds." FORCE)
|
||||
# Set the architectures for which to build.
|
||||
set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE STRING "Build architecture for iOS")
|
||||
# Skip the platform compiler checks for cross compiling.
|
||||
set(CMAKE_CXX_COMPILER_FORCED TRUE)
|
||||
set(CMAKE_CXX_COMPILER_WORKS TRUE)
|
||||
set(CMAKE_C_COMPILER_FORCED TRUE)
|
||||
set(CMAKE_C_COMPILER_WORKS TRUE)
|
||||
# All iOS/Darwin specific settings - some may be redundant.
|
||||
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
|
||||
set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
|
||||
set(CMAKE_SHARED_MODULE_PREFIX "lib")
|
||||
set(CMAKE_SHARED_MODULE_SUFFIX ".so")
|
||||
set(CMAKE_MODULE_EXISTS 1)
|
||||
set(CMAKE_DL_LIBS "")
|
||||
set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
|
||||
set(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
|
||||
set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
|
||||
set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
|
||||
message(STATUS "Building for minimum iOS version: ${IOS_DEPLOYMENT_TARGET}"
|
||||
" (SDK version: ${IOS_SDK_VERSION})")
|
||||
# Note that only Xcode 7+ supports the newer more specific:
|
||||
# -m${XCODE_IOS_PLATFORM}-version-min flags, older versions of Xcode use:
|
||||
# -m(ios/ios-simulator)-version-min instead.
|
||||
if (IOS_PLATFORM STREQUAL "OS")
|
||||
if (XCODE_VERSION VERSION_LESS 7.0)
|
||||
set(XCODE_IOS_PLATFORM_VERSION_FLAGS
|
||||
"-mios-version-min=${IOS_DEPLOYMENT_TARGET}")
|
||||
else()
|
||||
# Xcode 7.0+ uses flags we can build directly from XCODE_IOS_PLATFORM.
|
||||
set(XCODE_IOS_PLATFORM_VERSION_FLAGS
|
||||
"-m${XCODE_IOS_PLATFORM}-version-min=${IOS_DEPLOYMENT_TARGET}")
|
||||
endif()
|
||||
else()
|
||||
# SIMULATOR or SIMULATOR64 both use -mios-simulator-version-min.
|
||||
set(XCODE_IOS_PLATFORM_VERSION_FLAGS
|
||||
"-mios-simulator-version-min=${IOS_DEPLOYMENT_TARGET}")
|
||||
endif()
|
||||
message(STATUS "Version flags set to: ${XCODE_IOS_PLATFORM_VERSION_FLAGS}")
|
||||
|
||||
if (ENABLE_BITCODE)
|
||||
set(BITCODE "-fembed-bitcode")
|
||||
message(STATUS "Enabling bitcode support.")
|
||||
else()
|
||||
set(BITCODE "")
|
||||
message(STATUS "Disabling bitcode support.")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS
|
||||
"${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${BITCODE} -fobjc-abi-version=2 -fobjc-arc ${CMAKE_C_FLAGS}")
|
||||
# Hidden visibilty is required for C++ on iOS.
|
||||
set(CMAKE_CXX_FLAGS
|
||||
"${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${BITCODE} -fvisibility=hidden -fvisibility-inlines-hidden -fobjc-abi-version=2 -fobjc-arc ${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -fomit-frame-pointer -ffast-math ${BITCODE} ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
set(CMAKE_C_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
|
||||
set(CMAKE_CXX_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
|
||||
# In order to ensure that the updated compiler flags are used in try_compile()
|
||||
# tests, we have to forcibly set them in the CMake cache, not merely set them
|
||||
# in the local scope.
|
||||
list(APPEND VARS_TO_FORCE_IN_CACHE
|
||||
CMAKE_C_FLAGS
|
||||
CMAKE_CXX_FLAGS
|
||||
CMAKE_CXX_RELEASE
|
||||
CMAKE_C_LINK_FLAGS
|
||||
CMAKE_CXX_LINK_FLAGS)
|
||||
foreach(VAR_TO_FORCE ${VARS_TO_FORCE_IN_CACHE})
|
||||
set(${VAR_TO_FORCE} "${${VAR_TO_FORCE}}" CACHE STRING "" FORCE)
|
||||
endforeach()
|
||||
set(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names")
|
||||
set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names")
|
||||
set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
|
||||
set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
|
||||
# Hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old
|
||||
# build tree (where install_name_tool was hardcoded) and where
|
||||
# CMAKE_INSTALL_NAME_TOOL isn't in the cache and still cmake didn't fail in
|
||||
# CMakeFindBinUtils.cmake (because it isn't rerun) hardcode
|
||||
# CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did
|
||||
# before, Alex.
|
||||
if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
|
||||
find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)
|
||||
endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
|
||||
# Set the find root to the iOS developer roots and to user defined paths.
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_OSX_SYSROOT}
|
||||
${CMAKE_PREFIX_PATH} CACHE string "iOS find search path root" FORCE)
|
||||
# Default to searching for frameworks first.
|
||||
set(CMAKE_FIND_FRAMEWORK FIRST)
|
||||
# Set up the default search directories for frameworks.
|
||||
set(CMAKE_SYSTEM_FRAMEWORK_PATH
|
||||
${CMAKE_OSX_SYSROOT}/System/Library/Frameworks
|
||||
${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks
|
||||
${CMAKE_OSX_SYSROOT}/Developer/Library/Frameworks)
|
||||
# Only search the specified iOS SDK, not the remainder of the host filesystem.
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
# This little macro lets you set any XCode specific property.
|
||||
macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE XCODE_RELVERSION)
|
||||
set(XCODE_RELVERSION_I "${XCODE_RELVERSION}")
|
||||
if (XCODE_RELVERSION_I STREQUAL "All")
|
||||
set_property(TARGET ${TARGET} PROPERTY
|
||||
XCODE_ATTRIBUTE_${XCODE_PROPERTY} "${XCODE_VALUE}")
|
||||
else()
|
||||
set_property(TARGET ${TARGET} PROPERTY
|
||||
XCODE_ATTRIBUTE_${XCODE_PROPERTY}[variant=${XCODE_RELVERSION_I}] "${XCODE_VALUE}")
|
||||
endif()
|
||||
endmacro(set_xcode_property)
|
||||
# This macro lets you find executable programs on the host system.
|
||||
macro(find_host_package)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
|
||||
set(IOS FALSE)
|
||||
find_package(${ARGN})
|
||||
set(IOS TRUE)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
endmacro(find_host_package)
|
||||
62
CMakeModules/psp.toolchain.cmake
Normal file
62
CMakeModules/psp.toolchain.cmake
Normal file
@@ -0,0 +1,62 @@
|
||||
include(CMakeForceCompiler)
|
||||
|
||||
# this one is important
|
||||
SET(CMAKE_SYSTEM_NAME "Generic")
|
||||
#this one not so much
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
find_program(PSP_CONFIG_PROGRAM psp-config)
|
||||
|
||||
execute_process(COMMAND psp-config --pspsdk-path OUTPUT_VARIABLE PSPSDK_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND psp-config --psp-prefix OUTPUT_VARIABLE PSPSDK_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# specify compiler and linker:
|
||||
find_program(PSP_GPP psp-g++)
|
||||
find_program(PSP_GCC psp-gcc)
|
||||
|
||||
CMAKE_FORCE_C_COMPILER(${PSP_GCC} GNU)
|
||||
CMAKE_FORCE_CXX_COMPILER(${PSP_GPP} GNU)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -G0")
|
||||
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||
set(CMAKE_CXX_LINK_EXECUTABLE "${PSP_GCC} <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
|
||||
|
||||
#how libraries look
|
||||
SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
|
||||
|
||||
# where is the target environment
|
||||
SET(CMAKE_SYSTEM_INCLUDE_PATH
|
||||
${CMAKE_SOURCE_DIR}/thirdparty/binary/psp/include
|
||||
${PSPSDK_PATH}/include
|
||||
${PSPSDK_PREFIX}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${CMAKE_SYSTEM_INCLUDE_PATH})
|
||||
|
||||
SET(CMAKE_SYSTEM_LIBRARY_PATH
|
||||
${CMAKE_SOURCE_DIR}/thirdparty/binary/psp/lib
|
||||
${PSPSDK_PATH}/lib
|
||||
${PSPSDK_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_SYSTEM_LIBRARY_PATH})
|
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH
|
||||
${CMAKE_SOURCE_DIR}/thirdparty/binary/psp
|
||||
${CMAKE_SOURCE_DIR}/thirdparty/binary/psp/lib
|
||||
${CMAKE_SOURCE_DIR}/thirdparty/binary/psp/include
|
||||
${PSPSDK_PATH}
|
||||
${PSPSDK_PATH}/lib
|
||||
${PSPSDK_PATH}/include
|
||||
${PSPSDK_PREFIX}
|
||||
${PSPSDK_PREFIX}/lib
|
||||
${PSPSDK_PREFIX}/include
|
||||
)
|
||||
|
||||
# search for programs in the build host directories
|
||||
# for libraries and headers in the target directories and then in the host
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY FIRST)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE FIRST)
|
||||
|
||||
set(PSP 1)
|
||||
57
CMakeModules/utils.cmake
Normal file
57
CMakeModules/utils.cmake
Normal file
@@ -0,0 +1,57 @@
|
||||
macro(WAGIC_OPTION variable description value)
|
||||
set(__value ${value})
|
||||
set(__condition "")
|
||||
set(__varname "__value")
|
||||
foreach(arg ${ARGN})
|
||||
if(arg STREQUAL "IF" OR arg STREQUAL "if")
|
||||
set(__varname "__condition")
|
||||
else()
|
||||
list(APPEND ${__varname} ${arg})
|
||||
endif()
|
||||
endforeach()
|
||||
unset(__varname)
|
||||
if("${__condition}" STREQUAL "")
|
||||
set(__condition 2 GREATER 1)
|
||||
endif()
|
||||
|
||||
if(${__condition})
|
||||
if("${__value}" MATCHES ";")
|
||||
if(${__value})
|
||||
option(${variable} "${description}" ON)
|
||||
else()
|
||||
option(${variable} "${description}" OFF)
|
||||
endif()
|
||||
elseif(DEFINED ${__value})
|
||||
if(${__value})
|
||||
option(${variable} "${description}" ON)
|
||||
else()
|
||||
option(${variable} "${description}" OFF)
|
||||
endif()
|
||||
else()
|
||||
option(${variable} "${description}" ${__value})
|
||||
endif()
|
||||
else()
|
||||
unset(${variable} CACHE)
|
||||
endif()
|
||||
unset(__condition)
|
||||
unset(__value)
|
||||
endmacro()
|
||||
|
||||
# add prefix to each item in the list
|
||||
macro(list_add_prefix LST PREFIX)
|
||||
set(__tmp "")
|
||||
foreach(item ${${LST}})
|
||||
list(APPEND __tmp "${PREFIX}${item}")
|
||||
endforeach()
|
||||
set(${LST} ${__tmp})
|
||||
unset(__tmp)
|
||||
endmacro()
|
||||
|
||||
|
||||
macro(find_host_program)
|
||||
set(_find_program ${CMAKE_FIND_ROOT_PATH_MODE_PROGRAM})
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
find_program(${ARGN})
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ${_find_program})
|
||||
unset(_find_program)
|
||||
endmacro()
|
||||
165
JGE/CMakeLists.txt
Normal file
165
JGE/CMakeLists.txt
Normal file
@@ -0,0 +1,165 @@
|
||||
#the sources, jge will need always
|
||||
set(JGE_generic_src
|
||||
src/Encoding.cpp
|
||||
src/JAnimator.cpp
|
||||
src/JApp.cpp
|
||||
src/JDistortionMesh.cpp
|
||||
src/JFileSystem.cpp
|
||||
src/JGameObject.cpp
|
||||
src/JGE.cpp
|
||||
src/JGui.cpp
|
||||
src/JLogger.cpp
|
||||
src/JLBFont.cpp
|
||||
src/JOBJModel.cpp
|
||||
src/JParticle.cpp
|
||||
src/JParticleEffect.cpp
|
||||
src/JParticleEmitter.cpp
|
||||
src/JParticleSystem.cpp
|
||||
src/JResourceManager.cpp
|
||||
src/JSpline.cpp
|
||||
src/JSprite.cpp
|
||||
src/Vector2D.cpp)
|
||||
|
||||
set(JGE_hge_src
|
||||
src/hge/hgecolor.cpp
|
||||
src/hge/hgedistort.cpp
|
||||
src/hge/hgefont.cpp
|
||||
src/hge/hgeparticle.cpp
|
||||
src/hge/hgerect.cpp
|
||||
src/hge/hgevector.cpp)
|
||||
|
||||
#the sources we need to get graphical output desktops
|
||||
#used by qt-widget build option
|
||||
set(JGE_graphics_src
|
||||
src/Downloader.cpp
|
||||
include/Downloader.h
|
||||
src/JMD2Model.cpp
|
||||
src/pc/JGfx.cpp)
|
||||
|
||||
#the sources we need to fake graphical output on desktops
|
||||
#these are used for the console-only testsuit
|
||||
set(JGE_console_src
|
||||
src/OutputCapturer.cpp
|
||||
src/JGfx-fake.cpp)
|
||||
|
||||
#the sources we need on linux
|
||||
set(JGE_linux_src
|
||||
src/JNetwork.cpp
|
||||
src/pc/JSocket.cpp
|
||||
src/pc/JSfx.cpp)
|
||||
|
||||
set(JGE_android_src
|
||||
src/JNetwork.cpp
|
||||
src/JSocket.cpp
|
||||
src/android/JSfx.cpp)
|
||||
|
||||
#the sources we need if we compile for psp
|
||||
#note: main.cpp contains the main-function.
|
||||
#the other main functions reside in projects/mtg to reduce cross-library dependencies.
|
||||
#there may be a way to get all main-functions into the same project
|
||||
set(JGE_psp_src
|
||||
src/JNetwork.cpp
|
||||
src/JSocket.cpp
|
||||
src/JGfx.cpp
|
||||
src/JSfx.cpp
|
||||
src/JAudio.cpp
|
||||
src/JMP3.cpp
|
||||
src/decoder_prx.cpp
|
||||
src/main.cpp
|
||||
src/vram.cpp)
|
||||
|
||||
set(JGE_ios_src
|
||||
src/iOS/main.m
|
||||
src/iOS/wagicAppDelegate.m
|
||||
src/iOS/ES2Renderer.m
|
||||
src/iOS/EAGLView.m
|
||||
src/iOS/EAGLViewController.m
|
||||
src/iOS/JSfx.cpp)
|
||||
|
||||
set(JGE_windows_src
|
||||
src/JNetwork.cpp
|
||||
src/pc/JSocket.cpp
|
||||
src/windows/JSfx.cpp)
|
||||
|
||||
set(JGE_INCLUDE_DIRS include include/hge)
|
||||
set(EXTRA_INCLUDE_DIR ../projects/mtg/extra)
|
||||
|
||||
#turn moc on
|
||||
if(backend_qt_console OR backend_qt_widget)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
if(backend_qt_console)
|
||||
if(UNIX AND NOT ANDROID)
|
||||
set(JGE_INTERNAL_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} ${ZIPFS_INCLUDE_DIR}
|
||||
${UNZIP_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default ${Qt5Core_INCLUDE_DIRS} ${Qt5Multimedia_INCLUDE_DIRS})
|
||||
set(JGE_SOURCES ${JGE_generic_src} ${JGE_console_src} ${JGE_linux_src} ${JGE_hge_src})
|
||||
set(JGE_LINK_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Multimedia_LIBRARIES} ${ZIPFS_LIBRARY} ${UNZIP_LIRARY}
|
||||
${JPEG_LIBRARIES} ${PNG_LIBRARIES})
|
||||
else()
|
||||
message(FATAL_ERROR "qt builds of jge platforms other than linux are not supported")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(backend_qt_widget)
|
||||
if(UNIX AND NOT ANDROID)
|
||||
set(JGE_INTERNAL_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} ${ZIPFS_INCLUDE_DIR}
|
||||
${UNZIP_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default ${Qt5Core_INCLUDE_DIRS} ${Qt5Multimedia_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS} )
|
||||
set(JGE_SOURCES ${JGE_generic_src} ${JGE_graphics_src} ${JGE_linux_src} ${JGE_hge_src})
|
||||
set(JGE_LINK_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Multimedia_LIBRARIES} ${Qt5OpenGL_LIBRARIES} ${ZIPFS_LIBRARY} ${UNZIP_LIRARY}
|
||||
${JPEG_LIBRARIES} ${PNG_LIBRARIES})
|
||||
else()
|
||||
message(FATAL_ERROR "qt builds of jge platforms other than linux are not supported")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(backend_sdl)
|
||||
if((UNIX OR EMSCRIPTEN) AND NOT ANDROID)
|
||||
set(JGE_INTERNAL_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} ${ZIPFS_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR}
|
||||
${SDL2_INCLUDE_DIR} ${UNZIP_INCLUDE_DIR} ${PNG_INCLUDE_DIRS} ${JPEG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS})
|
||||
set(JGE_SOURCES ${JGE_generic_src} ${JGE_graphics_src} ${JGE_linux_src} ${JGE_hge_src})
|
||||
set(JGE_LINK_LIBRARIES ${ZIPFS_LIBRARY} ${UNZIP_LIRARY} ${JPEG_LIBRARY}
|
||||
${PNG_LIBRARIES} ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
|
||||
elseif(ANDROID)
|
||||
set(JGE_INTERNAL_INCLUDE_DIRS ${BOOST_INCLUDE_DIRS} ${TINYXML_INCLUDE_DIR} ${ZIPFS_INCLUDE_DIR}
|
||||
${SDL2_INCLUDE_DIR} ${UNZIP_INCLUDE_DIR} ${PNG_INCLUDE_DIRS} ${JPEG_INCLUDE_DIR}
|
||||
${OPENSL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS})
|
||||
set(JGE_SOURCES ${JGE_generic_src} ${JGE_android_src} ${JGE_graphics_src} ${JGE_hge_src})
|
||||
set(JGE_LINK_LIBRARIES ${ZIPFS_LIBRARY} ${UNZIP_LIRARY} ${JPEG_LIBRARY} ${PNG_LIBRARIES}
|
||||
${OPENSL_LIBRARIES})
|
||||
elseif(WIN32)
|
||||
set(JGE_INTERNAL_INCLUDE_DIRS ${EXTRA_INCLUDE_DIR} ${TINYXML_INCLUDE_DIR} ${ZIPFS_INCLUDE_DIR} ${SDL2_INCLUDE_DIR}
|
||||
${UNZIP_INCLUDE_DIR} ${PNG_INCLUDE_DIRS} ${JPEG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/thirdparty/binary/win/include)
|
||||
set(JGE_SOURCES ${JGE_generic_src} ${JGE_graphics_src} ${JGE_windows_src} ${JGE_hge_src})
|
||||
set(JGE_LINK_LIBRARIES ${ZIPFS_LIBRARY} ${UNZIP_LIRARY} ${JPEG_LIBRARY} ${PNG_LIBRARIES})
|
||||
set(JGE_LINK_DIRECTORIES ${Boost_LIBRARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(backend_psp)
|
||||
if(PSP)
|
||||
#${PSPSDK_PATH}/include should be in system pathes
|
||||
set(JGE_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/thirdparty/psp/include ${TINYXML_INCLUDE_DIR}
|
||||
${ZIPFS_INCLUDE_DIR} ${UNZIP_INCLUDE_DIR} ${BOOST_INCLUDE_DIRS} ${GIF_INCLUDE_DIR} ${PNG_INCLUDE_DIRS} )
|
||||
set(JGE_SOURCES ${JGE_generic_src} ${JGE_psp_src} ${JGE_hge_src})
|
||||
set(JGE_LINK_LIBRARIES ${TINYXML_LIBRARIES} ${ZIPFS_LIBRARY} ${UNZIP_LIRARY})
|
||||
else()
|
||||
message(FATAL_ERROR "use the cross-compile toolchain to build as the psp target")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(IOS)
|
||||
set(JGE_SOURCES ${JGE_generic_src} ${JGE_ios_src} ${JGE_hge_src} src/pc/JGfx.cpp)
|
||||
set(JGE_SOURCES ${JGE_SOURCES} PARENT_SCOPE)
|
||||
set(JGE_INCLUDE_DIRS ${JGE_INCLUDE_DIRS} src/iOS PARENT_SCOPE)
|
||||
set(JGE_LINK_LIBRARIES ${TINYXML_LIBRARIES} ${ZIPFS_LIBRARY} ${UNZIP_LIRARY})
|
||||
endif()
|
||||
|
||||
add_library(jge STATIC ${JGE_SOURCES})
|
||||
include_directories(${JGE_INTERNAL_INCLUDE_DIRS} ${JGE_INCLUDE_DIRS})
|
||||
target_link_libraries(jge ${JGE_LINK_LIBRARIES})
|
||||
link_directories(${JGE_LINK_DIRECTORIES})
|
||||
|
||||
set(${JGE_LIBRARIES} jge)
|
||||
BIN
JGE/Dependencies/lib/SDL.dll
Normal file
BIN
JGE/Dependencies/lib/SDL.dll
Normal file
Binary file not shown.
10
JGE/Dependencies/lib/SDL.dll.intermediate.manifest
Normal file
10
JGE/Dependencies/lib/SDL.dll.intermediate.manifest
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
BIN
JGE/Dependencies/lib/SDL.exp
Normal file
BIN
JGE/Dependencies/lib/SDL.exp
Normal file
Binary file not shown.
BIN
JGE/Dependencies/lib/SDL.lib
Normal file
BIN
JGE/Dependencies/lib/SDL.lib
Normal file
Binary file not shown.
BIN
JGE/Dependencies/lib/Version.res
Normal file
BIN
JGE/Dependencies/lib/Version.res
Normal file
Binary file not shown.
@@ -25,6 +25,7 @@ std::string ToHex(T* pointer)
|
||||
|
||||
#ifdef LINUX
|
||||
#define OutputDebugString(val) (std::cerr << val);
|
||||
#define OutputDebugStringA(val) (std::cerr << val);
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -41,7 +41,7 @@ class DownloadRequest
|
||||
private slots:
|
||||
#endif
|
||||
void fileDownloaded();
|
||||
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
|
||||
void downloadProgress(int64_t bytesReceived, int64_t bytesTotal);
|
||||
|
||||
#ifdef QT_CONFIG
|
||||
signals:
|
||||
@@ -72,7 +72,13 @@ protected:
|
||||
QNetworkReply* mNetworkReply;
|
||||
static QNetworkAccessManager networkAccessManager;
|
||||
#endif
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
static void onLoadCb(unsigned int handle, DownloadRequest* req, const char *buffer, unsigned int size);
|
||||
static void onErrorCb(unsigned int handle, DownloadRequest* req, int errorCode, const char* errorText);
|
||||
static void onProgressCb(unsigned int handle, DownloadRequest* req, int bytesReceived, int bytesTotal);
|
||||
#endif
|
||||
void processError(int errorCode, const char* errorText);
|
||||
void processBufferDownloaded(unsigned int size, const char*buffer);
|
||||
|
||||
public:
|
||||
DownloadRequest(string localPath="",
|
||||
|
||||
@@ -31,7 +31,7 @@ typedef u32 LocalKeySym;
|
||||
|
||||
#elif defined(SDL_CONFIG)
|
||||
#include <SDL.h>
|
||||
typedef SDLKey LocalKeySym;
|
||||
typedef SDL_Keycode LocalKeySym;
|
||||
#define LOCAL_KEY_NONE SDLK_UNKNOWN
|
||||
|
||||
#elif defined(WIN32)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#if (!defined IOS) && (!defined ANDROID) && (!defined QT_CONFIG)
|
||||
#if (!defined IOS) && (!defined ANDROID) && (!defined QT_CONFIG) && (!defined SDL_CONFIG)
|
||||
#include <gif_lib.h>
|
||||
#endif //IOS ANDROID
|
||||
|
||||
@@ -567,7 +567,7 @@ private:
|
||||
#if (!defined IOS) && (!defined QT_CONFIG)
|
||||
void LoadJPG(TextureInfo &textureInfo, const char *filename, int mode = 0, int TextureFormat = TEXTURE_FORMAT);
|
||||
int LoadPNG(TextureInfo &textureInfo, const char *filename, int mode = 0, int TextureFormat = TEXTURE_FORMAT);
|
||||
#if (!defined ANDROID) && (!defined QT_CONFIG)
|
||||
#if (!defined ANDROID) && (!defined QT_CONFIG) && (!defined SDL_CONFIG)
|
||||
void LoadGIF(TextureInfo &textureInfo, const char *filename, int mode = 0, int TextureFormat = TEXTURE_FORMAT);
|
||||
int image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bgcolor, InputFunc readFunc,int mode = 0, int TextureFormat = TEXTURE_FORMAT);
|
||||
#endif // (ANDROID) How can we get gif support for android ?
|
||||
|
||||
@@ -42,9 +42,9 @@ private:
|
||||
// convert the socket into non-blocking state
|
||||
bool SetNonBlocking(int sock);
|
||||
// socket handle
|
||||
#ifdef WIN32
|
||||
#if (defined WIN32) && (!defined __GNUG__)
|
||||
SOCKET mfd;
|
||||
#elif LINUX || PSP
|
||||
#elif LINUX || PSP || __GNUG__
|
||||
int mfd;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -18,20 +18,20 @@
|
||||
|
||||
#include "JTypes.h"
|
||||
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <SLES/OpenSLES.h>
|
||||
#include "SLES/OpenSLES_Android.h"
|
||||
|
||||
#elif defined USE_PHONON
|
||||
#elif defined(USE_PHONON)
|
||||
#include <phonon/AudioOutput>
|
||||
#include <phonon/MediaObject>
|
||||
#elif (defined QT_CONFIG)
|
||||
#elif defined (QT_CONFIG)
|
||||
#include "QMediaPlayer"
|
||||
#include "QMediaPlaylist"
|
||||
#include "QSoundEffect"
|
||||
#elif defined WIN32
|
||||
#elif defined(WIN32)
|
||||
#include <windows.h>
|
||||
#define WITH_FMOD
|
||||
//#define WITH_FMOD
|
||||
#elif defined (PSP)
|
||||
#include <pspgu.h>
|
||||
#include <pspkernel.h>
|
||||
@@ -48,7 +48,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef WITH_FMOD
|
||||
#include "../Dependencies/include/fmod.h"
|
||||
#include "fmod.h"
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
@@ -79,20 +79,26 @@ public slots:
|
||||
std::string filename;
|
||||
std::string key;
|
||||
std::string ext;
|
||||
void* mTrack;
|
||||
#elif defined WITH_FMOD
|
||||
FSOUND_SAMPLE* mTrack; // MP3 needed to be of "sample" type for FMOD, FMUSIC_MODULE is for MODs
|
||||
void* mTrack;
|
||||
#elif defined ANDROID
|
||||
SLObjectItf playerObject;
|
||||
SLPlayItf playInterface;
|
||||
SLSeekItf seekInterface;
|
||||
SLVolumeItf musicVolumeInterface;
|
||||
void* mTrack;
|
||||
#elif (defined QT_CONFIG)
|
||||
QMediaPlaylist* playlist;
|
||||
QMediaPlayer* player;
|
||||
string fullpath;
|
||||
#else
|
||||
void* mTrack;
|
||||
#endif //WITH_FMOD
|
||||
void* mTrack;
|
||||
#elif (defined WIN32)
|
||||
std::string filename;
|
||||
void* mTrack;
|
||||
#endif
|
||||
//#endif //WITH_FMOD
|
||||
|
||||
};
|
||||
|
||||
@@ -107,28 +113,30 @@ public:
|
||||
unsigned long fileSize();
|
||||
#if (defined QT_CONFIG) && (!defined USE_PHONON)
|
||||
QMediaPlayer* effect;
|
||||
void* mSample;
|
||||
void* mSample;
|
||||
#elif defined (PSP)
|
||||
WAVDATA *mSample;
|
||||
WAVDATA* mSample;
|
||||
#elif defined (IOS)
|
||||
std::string filename;
|
||||
std::string key;
|
||||
std::string ext;
|
||||
|
||||
void* mSample;
|
||||
void* mSample;
|
||||
#elif defined (WITH_FMOD)
|
||||
FSOUND_SAMPLE *mSample;
|
||||
#elif defined (USE_PHONON)
|
||||
Phonon::AudioOutput* mOutput;
|
||||
Phonon::MediaObject* mMediaObject;
|
||||
void* mSample;
|
||||
void* mSample;
|
||||
#elif defined ANDROID
|
||||
SLObjectItf playerObject;
|
||||
SLPlayItf playInterface;
|
||||
SLVolumeItf sampleVolumeInterface;
|
||||
void* mSample;
|
||||
void* mSample;
|
||||
#elif (defined WIN32)
|
||||
std::string filename;
|
||||
void* mSample;
|
||||
#else
|
||||
void* mSample;
|
||||
void* mSample;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -26,8 +26,16 @@
|
||||
#include "JAudio.h"
|
||||
|
||||
#else
|
||||
|
||||
#include <stdint.h>
|
||||
//#define __STDC_LIMIT_MACROS
|
||||
#ifdef IOS
|
||||
#include <tr1/cstdint>
|
||||
#else
|
||||
#include <cstdint>
|
||||
#endif
|
||||
//#include <stdint.h>
|
||||
//the MSC version might only define _MSC_STDINT_H_
|
||||
//and that might cause redefinition of standard types
|
||||
//#define _STDINT_H_
|
||||
|
||||
#endif
|
||||
|
||||
@@ -104,6 +112,7 @@ enum {
|
||||
#endif // CONSOLE_CONFIG
|
||||
|
||||
#if (defined WIN32) && (!defined LINUX)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#if defined(LINUX) && (!defined WIN32) || defined(IOS) || defined (ANDROID)
|
||||
@@ -140,9 +149,14 @@ typedef uint32_t u32;
|
||||
#include <GLES/gl.h>
|
||||
#include <GLES/glext.h>
|
||||
#elif defined (WIN32) || defined (LINUX)
|
||||
#if defined(__APPLE__)
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glu.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#include <QtOpenGL>
|
||||
#endif
|
||||
|
||||
29
JGE/include/PrecompiledHeader.h
Normal file
29
JGE/include/PrecompiledHeader.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef PRECOMPILEDHEADER_H
|
||||
#define PRECOMPILEDHEADER_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "DebugRoutines.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "JGE.h"
|
||||
#include "JFileSystem.h"
|
||||
#include "JLogger.h"
|
||||
|
||||
//#ifndef WP8
|
||||
//#include <boost/shared_ptr.hpp>
|
||||
//#endif
|
||||
|
||||
#if defined (WP8) || defined (IOS) || defined (ANDROID) || defined (QT_CONFIG) || defined (SDL_CONFIG)
|
||||
#define TOUCH_ENABLED
|
||||
#endif
|
||||
|
||||
#endif //PRECOMPILEDHEADER_H
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef THREADING_H
|
||||
#define THREADING_H
|
||||
|
||||
#if !defined(PSP) && !defined(QT_CONFIG) && !(__cplusplus > 199711L)
|
||||
#if !defined(PSP) && !defined(QT_CONFIG) && !(__cplusplus > 199711L) && !(_MSC_VER >= 1700)
|
||||
#include <boost/date_time.hpp>
|
||||
|
||||
#ifdef WIN32
|
||||
@@ -537,7 +537,7 @@ namespace boost
|
||||
}
|
||||
}
|
||||
|
||||
#elif (__cplusplus > 199711L)
|
||||
#elif (__cplusplus > 199711L) || (_MSC_VER >= 1700)
|
||||
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
|
||||
@@ -33,6 +33,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
void* vrelptr( void *ptr ); // make a pointer relative to memory base address (ATTENTION: A NULL rel ptr is not illegal/invalid!)
|
||||
|
||||
void* vabsptr( void *ptr ); // make a pointer absolute (default return type of valloc)
|
||||
|
||||
void* valloc( size_t size );
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
#ifdef QT_CONFIG
|
||||
QNetworkAccessManager DownloadRequest::networkAccessManager;
|
||||
#endif
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include "emscripten.h"
|
||||
#endif
|
||||
|
||||
DownloadRequest::DownloadRequest(string localPath,
|
||||
string remoteResourceURL,
|
||||
@@ -48,15 +51,71 @@ void DownloadRequest::startGet()
|
||||
JFileSystem::GetInstance()->Remove(getTempLocalPath());
|
||||
JFileSystem::GetInstance()->openForWrite(mFile, getTempLocalPath());
|
||||
#ifdef QT_CONFIG
|
||||
connect(mNetworkReply, SIGNAL(downloadProgress(qint64, qint64)),
|
||||
SLOT(downloadProgress(qint64, qint64)));
|
||||
connect(mNetworkReply, SIGNAL(downloadProgress(int64_t, int64_t)),
|
||||
SLOT(downloadProgress(int64_t, int64_t)));
|
||||
connect(mNetworkReply, SIGNAL(finished()), SLOT(fileDownloaded()));
|
||||
#endif
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_async_wget2_data(mRemoteResourceURL.c_str(), "GET", 0, this, 1,
|
||||
(em_async_wget2_data_onload_func)DownloadRequest::onLoadCb,
|
||||
(em_async_wget2_data_onerror_func)DownloadRequest::onErrorCb,
|
||||
(em_async_wget2_data_onprogress_func)DownloadRequest::onProgressCb);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
void DownloadRequest::onLoadCb(unsigned int handle, DownloadRequest* req, const char *buffer, unsigned int size)
|
||||
{
|
||||
|
||||
DebugTrace("DownloadRequest::onLoadCb: " << size);
|
||||
req->processBufferDownloaded(size, buffer);
|
||||
Downloader::GetInstance()->Update();
|
||||
}
|
||||
|
||||
void DownloadRequest::onErrorCb(unsigned int handle, DownloadRequest* req, int errorCode, const char* errorText)
|
||||
{
|
||||
DebugTrace("DownloadRequest::onErrorCb");
|
||||
req->processError(errorCode, errorText);
|
||||
Downloader::GetInstance()->Update();
|
||||
}
|
||||
|
||||
void DownloadRequest::onProgressCb(unsigned int handle, DownloadRequest* req, int bytesReceived, int bytesTotal)
|
||||
{
|
||||
DebugTrace("DownloadRequest::onProgressCb");
|
||||
req->DownloadRequest::downloadProgress(bytesReceived, bytesTotal);
|
||||
}
|
||||
#endif
|
||||
|
||||
void DownloadRequest::processError(int errorCode, const char* errorText)
|
||||
{
|
||||
DebugTrace(errorText);
|
||||
mDownloadStatus = DownloadRequest::DOWNLOAD_ERROR;
|
||||
mFile.close();
|
||||
JFileSystem::GetInstance()->Remove(getTempLocalPath());
|
||||
}
|
||||
|
||||
void DownloadRequest::processBufferDownloaded(unsigned int size, const char*buffer)
|
||||
{
|
||||
if(mFile.is_open())
|
||||
{
|
||||
mTotalSize = size;
|
||||
mFile.write(buffer, size);
|
||||
mFile.close();
|
||||
if(!JFileSystem::GetInstance()->Rename(getTempLocalPath(), mLocalPath)) {
|
||||
mDownloadStatus = DownloadRequest::DOWNLOAD_ERROR;
|
||||
return;
|
||||
}
|
||||
}
|
||||
mDownloadStatus = DownloadRequest::DOWNLOADED;
|
||||
}
|
||||
|
||||
void DownloadRequest::fileDownloaded()
|
||||
{
|
||||
do {
|
||||
#ifdef QT_CONFIG
|
||||
do {
|
||||
QByteArray eTagByteArray = mNetworkReply->rawHeader("ETag");
|
||||
if(!eTagByteArray.isEmpty()) {
|
||||
string oldETag = mETag;
|
||||
@@ -67,10 +126,7 @@ void DownloadRequest::fileDownloaded()
|
||||
|
||||
// let's check some error
|
||||
if(mNetworkReply->error() != QNetworkReply::NoError) {
|
||||
DebugTrace(mNetworkReply->errorString().toStdString());
|
||||
mDownloadStatus = DownloadRequest::DOWNLOAD_ERROR;
|
||||
mFile.close();
|
||||
JFileSystem::GetInstance()->Remove(getTempLocalPath());
|
||||
processError((int)mNetworkReply->error(), mNetworkReply->errorString().toStdString().c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -89,35 +145,31 @@ void DownloadRequest::fileDownloaded()
|
||||
return;
|
||||
}
|
||||
|
||||
if(mFile.is_open())
|
||||
{
|
||||
QByteArray byteArray = mNetworkReply->readAll();
|
||||
mFile.write(byteArray.constData(), byteArray.size());
|
||||
mFile.close();
|
||||
if(!JFileSystem::GetInstance()->Rename(getTempLocalPath(), mLocalPath)) {
|
||||
mDownloadStatus = DownloadRequest::DOWNLOAD_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
mDownloadStatus = DownloadRequest::DOWNLOADED;
|
||||
QByteArray byteArray = mNetworkReply->readAll();
|
||||
processBufferDownloaded(byteArray.size(), byteArray.constData());
|
||||
} while(0);
|
||||
|
||||
Downloader::GetInstance()->Update();
|
||||
mNetworkReply->deleteLater();
|
||||
|
||||
mNetworkReply->deleteLater();
|
||||
emit statusChanged((int)mDownloadStatus);
|
||||
#endif
|
||||
}
|
||||
|
||||
void DownloadRequest::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
|
||||
void DownloadRequest::downloadProgress(int64_t bytesReceived, int64_t bytesTotal)
|
||||
{
|
||||
QByteArray byteArray = mNetworkReply->readAll();
|
||||
#ifdef QT_CONFIG
|
||||
QByteArray byteArray = mNetworkReply->readAll();
|
||||
mFile.write(byteArray.constData(), byteArray.size());
|
||||
#endif
|
||||
mCurrentSize = bytesReceived;
|
||||
mTotalSize = bytesTotal;
|
||||
int percent = 0;
|
||||
if(bytesTotal)
|
||||
percent = (bytesReceived/bytesTotal)*100;
|
||||
#ifdef QT_CONFIG
|
||||
emit percentChanged(percent);
|
||||
#endif
|
||||
}
|
||||
|
||||
Downloader* Downloader::mInstance = 0;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "../include/JSprite.h"
|
||||
#include "../include/JAnimator.h"
|
||||
|
||||
#include "tinyxml/tinyxml.h"
|
||||
#include "tinyxml.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -16,14 +16,7 @@ User folder is the only one that is really needed to guarantee both read and wri
|
||||
The content that users should not be touching.
|
||||
*/
|
||||
|
||||
#if defined (ANDROID)
|
||||
#include "PrecompiledHeader.h"
|
||||
#endif //ANDROID
|
||||
|
||||
#if defined (LINUX)
|
||||
#include "../../projects/mtg/include/PrecompiledHeader.h"
|
||||
#endif //LINUX
|
||||
|
||||
#include "dirent.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma warning(disable : 4786)
|
||||
@@ -37,7 +30,8 @@ The content that users should not be touching.
|
||||
#include "../include/JGE.h"
|
||||
#include "../include/JFileSystem.h"
|
||||
#include "../include/JLogger.h"
|
||||
#include <dirent.h>
|
||||
#include "DebugRoutines.h"
|
||||
|
||||
|
||||
#ifdef QT_CONFIG
|
||||
#include <QDir>
|
||||
@@ -130,6 +124,10 @@ JFileSystem::JFileSystem(const string & _userPath, const string & _systemPath)
|
||||
userPath = [[documentsDirectory stringByAppendingString: @"/User/"] cStringUsingEncoding:1];
|
||||
systemPath = [[documentsDirectory stringByAppendingString: @"/Res/"] cStringUsingEncoding:1];
|
||||
|
||||
#elif defined (__EMSCRIPTEN__)
|
||||
systemPath = "/";
|
||||
DebugTrace("User path " << userPath);
|
||||
DebugTrace("System path " << systemPath);
|
||||
#elif defined (ANDROID)
|
||||
userPath = JGE::GetInstance()->getFileUserFolderPath();
|
||||
systemPath = JGE::GetInstance()->getFileSystemLocation();
|
||||
@@ -146,9 +144,9 @@ JFileSystem::JFileSystem(const string & _userPath, const string & _systemPath)
|
||||
userPath = QDir::toNativeSeparators(dir.absolutePath()).toStdString();
|
||||
systemPath = QDir::toNativeSeparators(sysDir.absolutePath()).toStdString();
|
||||
|
||||
DebugTrace("User path " << userPath);
|
||||
DebugTrace("System path " << systemPath);
|
||||
DebugTrace("Current path " << QDir::currentPath().toStdString());
|
||||
DebugTrace("User path " + userPath);
|
||||
DebugTrace("System path " + systemPath);
|
||||
DebugTrace("Current path " + QDir::currentPath().toStdString());
|
||||
#else
|
||||
//Find the Res.txt file and matching Res folders for backwards compatibility
|
||||
ifstream mfile("Res.txt");
|
||||
@@ -304,6 +302,7 @@ void JFileSystem::DetachZipFile()
|
||||
|
||||
bool JFileSystem::openForRead(izfstream & File, const string & FilePath) {
|
||||
|
||||
DebugTrace("JFileSystem::openForRead " << FilePath);
|
||||
File.open(FilePath.c_str(), mUserFS);
|
||||
if (File)
|
||||
return true;
|
||||
@@ -414,7 +413,6 @@ bool JFileSystem::OpenFile(const string &filename)
|
||||
mCurrentFileInZip = &(it2->second);
|
||||
mFileSize = it2->second.m_Size;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#if defined (WIN32) // WIN32 specific code
|
||||
#include "../../Dependencies/include/fmod.h"
|
||||
#include "fmod.h"
|
||||
|
||||
u8 JGE::GetAnalogX()
|
||||
{
|
||||
@@ -54,7 +54,7 @@ u8 JGE::GetAnalogY()
|
||||
#elif defined (LINUX) // Unix specific code
|
||||
#include <sys/time.h>
|
||||
#ifdef WITH_FMOD
|
||||
#include "../Dependencies/include/fmod.h"
|
||||
#include "fmod.h"
|
||||
#endif //WITH_FMOD
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <pspaudio.h>
|
||||
#include <pspmp3.h>
|
||||
#include <psputility.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#else
|
||||
#define PSP_AUDIO_VOLUME_MAX 100
|
||||
|
||||
@@ -42,7 +42,7 @@ bool JNetwork::isConnected(){
|
||||
|
||||
void JNetwork::getServerIp(string& aString)
|
||||
{
|
||||
#ifdef WIN32
|
||||
#if (defined WIN32) && (!defined __GNUG__)
|
||||
char ac[80];
|
||||
if (gethostname(ac, sizeof(ac)) == SOCKET_ERROR) {
|
||||
DebugTrace("Error " << WSAGetLastError() <<
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "../include/JFileSystem.h"
|
||||
#include "../include/JResourceManager.h"
|
||||
|
||||
#include "tinyxml/tinyxml.h"
|
||||
#include "tinyxml.h"
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
#include "../include/JResourceManager.h"
|
||||
#include "../include/JFileSystem.h"
|
||||
#include "../include/JLBFont.h"
|
||||
#include "tinyxml/tinyxml.h"
|
||||
#include "tinyxml.h"
|
||||
|
||||
#if defined (_DEBUG) && defined (WIN32) && (!defined LINUX)
|
||||
#if defined (_DEBUG) && defined (WIN32) && (!defined LINUX) && (!defined __GNUG__)
|
||||
#include "crtdbg.h"
|
||||
#define NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
|
||||
#else
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "../include/JFileSystem.h"
|
||||
#include "../include/JSpline.h"
|
||||
|
||||
#include "tinyxml/tinyxml.h"
|
||||
#include "tinyxml.h"
|
||||
|
||||
#define SMALL_NUMBER 0.0001f
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../include/decoder_prx.h"
|
||||
#include "decoder_prx.h"
|
||||
#include <psputility.h>
|
||||
|
||||
char *prx_static_init()
|
||||
{
|
||||
@@ -12,7 +12,7 @@
|
||||
#if (!defined IOS) && (!defined QT_CONFIG)
|
||||
#ifdef WIN32
|
||||
#pragma warning(disable : 4786)
|
||||
#pragma comment( lib, "giflib.lib" )
|
||||
//#pragma comment( lib, "giflib.lib" )
|
||||
#endif
|
||||
|
||||
#include <png.h>
|
||||
@@ -35,7 +35,7 @@ extern "C" {
|
||||
#include "../../include/JFileSystem.h"
|
||||
#include "../../include/JAssert.h"
|
||||
|
||||
#if (defined WIN32) && (!defined QT_CONFIG)
|
||||
#if (defined WIN32) && (!defined QT_CONFIG) && (!defined SDL_CONFIG)
|
||||
#ifndef __attribute__
|
||||
#define __attribute__((a))
|
||||
#endif
|
||||
@@ -1665,7 +1665,7 @@ static void jpeg_mem_src(j_decompress_ptr cinfo, byte *mem, int len)
|
||||
cinfo->src->resync_to_restart = jpeg_resync_to_restart;
|
||||
cinfo->src->term_source = jpg_null;
|
||||
cinfo->src->bytes_in_buffer = len;
|
||||
cinfo->src->next_input_byte = mem;
|
||||
cinfo->src->next_input_byte = (const JOCTET*)mem;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1702,7 +1702,7 @@ void JRenderer::LoadJPG(TextureInfo &textureInfo, const char *filename, int mode
|
||||
cinfo.err = jpeg_std_error(&jerr);
|
||||
jpeg_create_decompress(&cinfo);
|
||||
|
||||
jpeg_mem_src(&cinfo, rawdata, rawsize);
|
||||
jpeg_mem_src(&cinfo, (byte*)rawdata, rawsize);
|
||||
|
||||
// Process JPEG header
|
||||
jpeg_read_header(&cinfo, true);
|
||||
@@ -1740,7 +1740,7 @@ void JRenderer::LoadJPG(TextureInfo &textureInfo, const char *filename, int mode
|
||||
// Pass sizes to output
|
||||
|
||||
// Allocate Scanline buffer
|
||||
scanline = (byte *)malloc(cinfo.output_width * 3);
|
||||
scanline = (BYTE *)malloc(cinfo.output_width * 3);
|
||||
if(!scanline)
|
||||
{
|
||||
//// ri.Con_Printf(PRINT_ALL, "Insufficient RAM for JPEG scanline buffer\n");
|
||||
|
||||
@@ -75,7 +75,7 @@ static int __largest_block = __MEM_BLOCKS;
|
||||
static int __mem_free = __MEM_BLOCKS;
|
||||
|
||||
|
||||
inline void* vrelptr( void *ptr )
|
||||
void* vrelptr( void *ptr )
|
||||
{
|
||||
return (void*)((unsigned int)ptr & ~__MEM_START);
|
||||
}
|
||||
182
JGE/src/windows/JSfx.cpp
Normal file
182
JGE/src/windows/JSfx.cpp
Normal file
@@ -0,0 +1,182 @@
|
||||
#include <Windows.h>
|
||||
#include <Mmsystem.h>
|
||||
#include <mciapi.h>
|
||||
//these two headers are already included in the <Windows.h> header
|
||||
#pragma comment(lib, "Winmm.lib")
|
||||
|
||||
#include "DebugRoutines.h"
|
||||
#include "../../include/JSoundSystem.h"
|
||||
#include "../../include/JFileSystem.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
JMusic::JMusic()
|
||||
:
|
||||
mTrack(0)
|
||||
{
|
||||
}
|
||||
|
||||
void JMusic::Update(){
|
||||
|
||||
}
|
||||
|
||||
int JMusic::getPlayTime(){
|
||||
return 0;
|
||||
}
|
||||
|
||||
JMusic::~JMusic()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
JSample::JSample()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
JSample::~JSample()
|
||||
{
|
||||
}
|
||||
|
||||
unsigned long JSample::fileSize()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
JSoundSystem* JSoundSystem::mInstance = NULL;
|
||||
|
||||
JSoundSystem* JSoundSystem::GetInstance()
|
||||
{
|
||||
if (mInstance == NULL)
|
||||
{
|
||||
mInstance = new JSoundSystem();
|
||||
mInstance->InitSoundSystem();
|
||||
}
|
||||
return mInstance;
|
||||
}
|
||||
|
||||
|
||||
void JSoundSystem::Destroy()
|
||||
{
|
||||
if (mInstance)
|
||||
{
|
||||
mInstance->DestroySoundSystem();
|
||||
delete mInstance;
|
||||
mInstance = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
JSoundSystem::JSoundSystem()
|
||||
{
|
||||
mVolume = 0;
|
||||
mSampleVolume = 0;
|
||||
}
|
||||
|
||||
JSoundSystem::~JSoundSystem()
|
||||
{
|
||||
}
|
||||
|
||||
void JSoundSystem::InitSoundSystem()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void JSoundSystem::DestroySoundSystem()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
JMusic *JSoundSystem::LoadMusic(const char *fileName)
|
||||
{
|
||||
JMusic* music = NULL;
|
||||
music = new JMusic();
|
||||
if (music)
|
||||
{
|
||||
music->filename = JFileSystem::GetInstance()->GetResourceFile(fileName);
|
||||
std::string aString = "open \"" + music->filename + "\" type mpegvideo alias mp3";
|
||||
mciSendString(aString.c_str(), NULL, 0, NULL);
|
||||
music->mTrack = (void*)-1;
|
||||
}
|
||||
|
||||
return music;
|
||||
}
|
||||
|
||||
|
||||
void JSoundSystem::PlayMusic(JMusic *music, bool looping)
|
||||
{
|
||||
if (music && music->mTrack)
|
||||
{
|
||||
if(looping)
|
||||
mciSendString("play mp3 repeat", NULL, 0, NULL);
|
||||
else
|
||||
mciSendString("play mp3", NULL, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void JSoundSystem::StopMusic(JMusic *music)
|
||||
{
|
||||
if (music && music->mTrack)
|
||||
{
|
||||
mciSendString("stop mp3", NULL, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void JSoundSystem::PauseMusic(JMusic *music)
|
||||
{
|
||||
if (music && music->mTrack)
|
||||
{
|
||||
mciSendString("pause mp3", NULL, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void JSoundSystem::ResumeMusic(JMusic *music)
|
||||
{
|
||||
if (music && music->mTrack)
|
||||
{
|
||||
mciSendString("resume mp3", NULL, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void JSoundSystem::SetVolume(int volume)
|
||||
{
|
||||
SetMusicVolume(volume);
|
||||
SetSfxVolume(volume);
|
||||
}
|
||||
|
||||
void JSoundSystem::SetMusicVolume(int volume)
|
||||
{
|
||||
mVolume = volume;
|
||||
}
|
||||
|
||||
void JSoundSystem::SetSfxVolume(int volume)
|
||||
{
|
||||
mSampleVolume = volume;
|
||||
SetMusicVolume(mVolume);
|
||||
}
|
||||
|
||||
JSample *JSoundSystem::LoadSample(const char *fileName)
|
||||
{
|
||||
JSample* sample = NULL;
|
||||
sample = new JSample();
|
||||
if (sample)
|
||||
{
|
||||
sample->filename = JFileSystem::GetInstance()->GetResourceFile(fileName);
|
||||
}
|
||||
|
||||
return sample;
|
||||
}
|
||||
|
||||
|
||||
void JSoundSystem::PlaySample(JSample *sample)
|
||||
{
|
||||
if(sample)
|
||||
{
|
||||
sndPlaySound(sample->filename.c_str(), SND_FILENAME | SND_ASYNC);
|
||||
}
|
||||
}
|
||||
|
||||
33
README.md
33
README.md
@@ -1,5 +1,4 @@
|
||||
#Wagic the Homebrew
|
||||
|
||||
# Wagic the Homebrew
|
||||
|
||||
[](https://travis-ci.com/WagicProject/wagic)
|
||||
[](https://ci.appveyor.com/project/xawotihs/wagic/branch/master)
|
||||
@@ -7,22 +6,40 @@
|
||||
|
||||
## Description
|
||||
|
||||
Wagic, the Homebrew, is a C++ game engine that allows to play card games against an AI on
|
||||
**Wagic, the Homebrew** is a C++ game engine that allows to play card games against an AI on:
|
||||
- Android (phones and tablets)
|
||||
- iOS (iPhone/iPad)
|
||||
- Sony PSP
|
||||
- Windows desktops
|
||||
- MacOS
|
||||
- Linux and derivated like Maemo or Meego
|
||||
- Linux and derivatives like Maemo or Meego
|
||||
|
||||
It is highly customizable and allows the player to tweak the rules / create their own cards, their own themes, etc...
|
||||
It is highly customizable and allows the player to tweak the rules, create their own cards, their own themes, etc...
|
||||
|
||||
#### [Download from GitHub Releases!](https://github.com/WagicProject/wagic/releases)
|
||||
|
||||

|
||||
|
||||
|
||||
Info, downloads, discussions and more at http://wololo.net/forum/index.php
|
||||
### Documentation
|
||||
|
||||

|
||||
Info, downloads, discussions and more at http://wololo.net/forum/index.php (archived as of 16 Nov 2022).
|
||||
|
||||
Chat with the community on the [**Wagic - MTG Game** Discord](https://discord.com/invite/JHK5pVaK5p) (Feb 2023).
|
||||
|
||||
Developer information from the [Wagic Wiki](https://github.com/WagicProject/wagic/wiki) is also included in the [wagic/docs/](docs) folder.
|
||||
|
||||
|
||||
### Sample round play-through video
|
||||
[](http://www.youtube.com/watch?v=WUFSAPZuDIk)
|
||||
|
||||
[](http://www.youtube.com/watch?v=WUFSAPZuDIk)
|
||||
|
||||
*Wagic, The Homebrew sample playthrough on YouTube by Rolz73, 6 Feb 2014*
|
||||
|
||||
|
||||
## Sister projects
|
||||
|
||||
- [WagicSyntaxPlugin
|
||||
](https://github.com/Vitty85/WagicSyntaxPlugin), a Wagic developer tool by Vitty85 for [Notepad++](https://notepad-plus-plus.org/downloads/)
|
||||
- [Forge](https://www.slightlymagic.net/forum/viewforum.php?f=26), a Java-based game engine similar to Wagic ([Source](https://github.com/Card-Forge/forge/))
|
||||
- [XMage](http://xmage.today/), a Java-based online multiplayer digital CCG ([Source](https://github.com/magefree/mage))
|
||||
|
||||
21
appveyor.yml
21
appveyor.yml
@@ -17,15 +17,20 @@ skip_tags: true
|
||||
#---------------------------------#
|
||||
|
||||
environment:
|
||||
DXSDK_DIR: "C:/Program Files (x86)/Microsoft DirectX SDK/"
|
||||
GH_TOKEN:
|
||||
secure: dYnBDQkiY5oVjIlswzBX9BJigNtBGXgGlp1tK3XbHzrDEDrs2vaKD5m+Oz5OSz1C
|
||||
|
||||
# scripts that run after cloning repository
|
||||
install:
|
||||
- ps: (new-object net.webclient).DownloadFile('https://bootstrap.pypa.io/pip/2.7/get-pip.py', 'C:/get-pip.py')
|
||||
- "C:/Python27/python.exe C:/get-pip.py"
|
||||
- powershell -Command "& {(new-object net.webclient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', 'C:/get-pip.py')}"
|
||||
- powershell -Command "& {C:/Python27/python.exe C:/get-pip.py}"
|
||||
- "C:/Python27/Scripts/pip.exe install pyjavaproperties"
|
||||
- "C:/Python27/Scripts/pip.exe install github3.py"
|
||||
- git submodule update --init --recursive
|
||||
- cd thirdparty/SDL2
|
||||
# - git checkout release-2.0.3
|
||||
- cd ../..
|
||||
|
||||
#---------------------------------#
|
||||
# build configuration #
|
||||
@@ -34,8 +39,16 @@ install:
|
||||
# build Configuration, i.e. Debug, Release, etc.
|
||||
configuration: Release
|
||||
|
||||
# scripts to run before build
|
||||
before_build:
|
||||
- echo Running cmake...
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -Dbackend_sdl=ON ..
|
||||
- cd ..
|
||||
|
||||
build:
|
||||
project: projects/mtg/mtg_vs2010.sln # path to Visual Studio solution or project
|
||||
project: build/wagic.sln # path to Visual Studio solution or project
|
||||
|
||||
#---------------------------------#
|
||||
# tests configuration #
|
||||
@@ -61,7 +74,7 @@ artifacts:
|
||||
# scripts to run before deployment
|
||||
before_deploy:
|
||||
- cd projects/mtg/bin
|
||||
- "C:/Python27/python.exe createWindowsZip.py"
|
||||
- "C:/Python27/python.exe createWindowsZip.py -b ../../../build"
|
||||
- cd ../../..
|
||||
|
||||
# scripts to run after deployment
|
||||
|
||||
BIN
docs/img/Wagic, The Homebrew sample playthrough.jpg
Normal file
BIN
docs/img/Wagic, The Homebrew sample playthrough.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
BIN
docs/img/shop.jpg
Normal file
BIN
docs/img/shop.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
1
docs/wiki
Submodule
1
docs/wiki
Submodule
Submodule docs/wiki added at 0244ca1874
3
platforms/android/configure.cmake
Normal file
3
platforms/android/configure.cmake
Normal file
@@ -0,0 +1,3 @@
|
||||
add_definitions(-DANDROID -DLINUX)
|
||||
add_definitions(-D_STLP_USE_SIMPLE_NODE_ALLOC -D__arm__ -D_REENTRANT -D_GLIBCXX__PTHREADS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
18
platforms/android/package/AndroidManifest.xml
Normal file
18
platforms/android/package/AndroidManifest.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="0192" android:versionName="@string/app_version" package="net.wagic.app">
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<application android:debuggable="true" android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
|
||||
<activity android:configChanges="keyboard|keyboardHidden|orientation" android:label="@string/app_name" android:name="org.libsdl.app.SDLActivity" android:screenOrientation="sensorLandscape">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:configChanges="keyboard|keyboardHidden|orientation" android:name="com.google.ads.AdActivity" android:screenOrientation="sensorLandscape"/>
|
||||
</application>
|
||||
<uses-sdk android:minSdkVersion="@ANDROID_NATIVE_API_LEVEL@" android:targetSdkVersion="@ANDROID_NATIVE_API_LEVEL@"/>
|
||||
</manifest>
|
||||
121
platforms/android/package/CMakeLists.txt
Normal file
121
platforms/android/package/CMakeLists.txt
Normal file
@@ -0,0 +1,121 @@
|
||||
if(NOT ANDROID_PACKAGE_RELEASE)
|
||||
set(ANDROID_PACKAGE_RELEASE 1)
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID_PACKAGE_PLATFORM)
|
||||
if(ARMEABI_V7A)
|
||||
if(NEON)
|
||||
set(ANDROID_PACKAGE_PLATFORM armv7a_neon)
|
||||
else()
|
||||
set(ANDROID_PACKAGE_PLATFORM armv7a)
|
||||
endif()
|
||||
elseif(ARMEABI_V6)
|
||||
set(ANDROID_PACKAGE_PLATFORM armv6)
|
||||
elseif(ARMEABI)
|
||||
set(ANDROID_PACKAGE_PLATFORM armv5)
|
||||
elseif(X86)
|
||||
set(ANDROID_PACKAGE_PLATFORM x86)
|
||||
elseif(MIPS)
|
||||
set(ANDROID_PACKAGE_PLATFORM mips)
|
||||
else()
|
||||
message(ERROR "Can not automatically determine the value for ANDROID_PACKAGE_PLATFORM")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID_PACKAGE_PLATFORM_NAME)
|
||||
if(ARMEABI_V7A)
|
||||
if(NEON)
|
||||
set(ANDROID_PACKAGE_PLATFORM_NAME "armeabi-v7a with NEON")
|
||||
else()
|
||||
set(ANDROID_PACKAGE_PLATFORM_NAME "armeabi-v7a")
|
||||
endif()
|
||||
elseif(ARMEABI_V6)
|
||||
set(ANDROID_PACKAGE_PLATFORM_NAME "armeabi-v6")
|
||||
elseif(ARMEABI)
|
||||
set(ANDROID_PACKAGE_PLATFORM_NAME "armeabi")
|
||||
elseif(X86)
|
||||
set(ANDROID_PACKAGE_PLATFORM_NAME "x86")
|
||||
elseif(MIPS)
|
||||
set(ANDROID_PACKAGE_PLATFORM_NAME "mips")
|
||||
else()
|
||||
message(ERROR "Can not automatically determine the value for ANDROID_PACKAGE_PLATFORM_NAME")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if("${ANDROID_NATIVE_API_LEVEL}" MATCHES "[1-9][0-9]*$")
|
||||
set(ANDROID_SDK_VERSION ${CMAKE_MATCH_0})
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID_SDK_VERSION GREATER 7)
|
||||
set(ANDROID_SDK_VERSION 8)
|
||||
endif()
|
||||
|
||||
set(PACKAGE_DIR "${CMAKE_BINARY_DIR}/package")
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/AndroidManifest.xml"
|
||||
"${PACKAGE_DIR}/AndroidManifest.xml" @ONLY)
|
||||
#configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build.xml"
|
||||
# "${PACKAGE_DIR}/build.xml" COPYONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/res/values/strings.xml"
|
||||
"${PACKAGE_DIR}/res/values/strings.xml" COPYONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/res/drawable-hdpi/icon.png"
|
||||
"${PACKAGE_DIR}/res/drawable-hdpi/icon.png" COPYONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/res/drawable-ldpi/icon.png"
|
||||
"${PACKAGE_DIR}/res/drawable-ldpi/icon.png" COPYONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/res/drawable-mdpi/icon.png"
|
||||
"${PACKAGE_DIR}/res/drawable-mdpi/icon.png" COPYONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/res/layout/main.xml"
|
||||
"${PACKAGE_DIR}/res/layout/main.xml" COPYONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/assets/_keystore/wagic-release.keystore"
|
||||
"${PACKAGE_DIR}/assets/_keystore/wagic-release.keystore" COPYONLY)
|
||||
|
||||
string( REGEX MATCH "[0-9]+" ANDROID_NATIVE_API_LEVEL_NUMBER "${ANDROID_NATIVE_API_LEVEL}" )
|
||||
|
||||
set(target_name "Wagic_${WAGIC_VERSION}_binary_pack_${ANDROID_PACKAGE_PLATFORM}")
|
||||
get_target_property(wagic_location wagic LOCATION)
|
||||
|
||||
string(TOLOWER ${CMAKE_BUILD_TYPE} android_build_type)
|
||||
|
||||
set(android_proj_target_files ${ANDROID_PROJECT_FILES})
|
||||
list_add_prefix(android_proj_target_files "${PACKAGE_DIR}/")
|
||||
set(APK_NAME "${PACKAGE_DIR}/bin/${target_name}-${android_build_type}-unsigned.apk")
|
||||
|
||||
file(GLOB camera_wrappers "${OpenCV_SOURCE_DIR}/3rdparty/lib/${ANDROID_NDK_ABI_NAME}/libnative_camera_r*.so")
|
||||
set(CAMERA_LIB_COMMANDS "")
|
||||
|
||||
foreach(wrapper ${camera_wrappers})
|
||||
list(APPEND CAMERA_LIB_COMMANDS COMMAND ${CMAKE_COMMAND} -E copy "${wrapper}" "${PACKAGE_DIR}/libs/${ANDROID_NDK_ABI_NAME}/")
|
||||
endforeach()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${APK_NAME}"
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory "${PACKAGE_DIR}/libs"
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory "${PACKAGE_DIR}/bin"
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory "${PACKAGE_DIR}/gen"
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${android_proj_target_files}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${PACKAGE_DIR}/src"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${PACKAGE_DIR}/libs/${ANDROID_NDK_ABI_NAME}/"
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy "${SDL2_LIBRARY}" "${PACKAGE_DIR}/libs/${ANDROID_NDK_ABI_NAME}/"
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy "${ZLIB_LIBRARY}" "${PACKAGE_DIR}/libs/${ANDROID_NDK_ABI_NAME}/"
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy "${OPENSL_LIBRARY}" "${PACKAGE_DIR}/libs/${ANDROID_NDK_ABI_NAME}/"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${wagic_location}" "${PACKAGE_DIR}/libs/${ANDROID_NDK_ABI_NAME}/"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/src" "${PACKAGE_DIR}/src"
|
||||
# COMMAND ${ANDROID_EXECUTABLE} --silent update project --path "${PACKAGE_DIR}" --target "android-${ANDROID_NATIVE_API_LEVEL}" --name "${target_name}"
|
||||
COMMAND ${ANDROID_EXECUTABLE} --silent update project --path "${PACKAGE_DIR}" --target "android-10" --name "${target_name}"
|
||||
COMMAND ${ANT_EXECUTABLE} -noinput -k ${android_build_type}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch "${APK_NAME}"
|
||||
WORKING_DIRECTORY "${PACKAGE_DIR}"
|
||||
MAIN_DEPENDENCY "${PACKAGE_DIR}/${ANDROID_MANIFEST_FILE}"
|
||||
DEPENDS
|
||||
"${PACKAGE_DIR}/res/values/strings.xml"
|
||||
"${PACKAGE_DIR}/res/layout/main.xml"
|
||||
"${PACKAGE_DIR}/res/drawable-mdpi/icon.png"
|
||||
"${PACKAGE_DIR}/res/drawable-ldpi/icon.png"
|
||||
"${PACKAGE_DIR}/res/drawable-hdpi/icon.png"
|
||||
"${PACKAGE_DIR}/${ANDROID_MANIFEST_FILE}"
|
||||
wagic
|
||||
)
|
||||
|
||||
install(FILES "${APK_NAME}" DESTINATION "apk/" COMPONENT main)
|
||||
add_custom_target(android_package ALL SOURCES "${APK_NAME}" )
|
||||
add_dependencies(android_package wagic)
|
||||
BIN
platforms/android/package/assets/_keystore/wagic-release.keystore
Executable file
BIN
platforms/android/package/assets/_keystore/wagic-release.keystore
Executable file
Binary file not shown.
BIN
platforms/android/package/res/drawable-hdpi/icon.png
Normal file
BIN
platforms/android/package/res/drawable-hdpi/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.5 KiB |
BIN
platforms/android/package/res/drawable-ldpi/icon.png
Normal file
BIN
platforms/android/package/res/drawable-ldpi/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
BIN
platforms/android/package/res/drawable-mdpi/icon.png
Normal file
BIN
platforms/android/package/res/drawable-mdpi/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
14
platforms/android/package/res/layout/main.xml
Normal file
14
platforms/android/package/res/layout/main.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/mainLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Wagic"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
6
platforms/android/package/res/values/strings.xml
Normal file
6
platforms/android/package/res/values/strings.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Wagic</string>
|
||||
<string name="app_version">0.19.2</string>
|
||||
<string name="info_text">Wagic v0.19.2\\nAll Rights Reserved.</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,174 @@
|
||||
package net.wagic.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Scanner;
|
||||
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
|
||||
public class StorageOptions
|
||||
{
|
||||
private static ArrayList<String> mMounts = new ArrayList<String>();
|
||||
private static ArrayList<String> mVold = new ArrayList<String>();
|
||||
|
||||
public static String[] labels;
|
||||
public static String[] paths;
|
||||
public static int count = 0;
|
||||
public static String defaultMountPoint;
|
||||
|
||||
public static void determineStorageOptions()
|
||||
{
|
||||
initializeMountPoints();
|
||||
readMountsFile();
|
||||
readVoldFile();
|
||||
compareMountsWithVold();
|
||||
testAndCleanMountsList();
|
||||
setProperties();
|
||||
}
|
||||
|
||||
private static void initializeMountPoints()
|
||||
{
|
||||
try
|
||||
{
|
||||
defaultMountPoint = Environment.getExternalStorageDirectory().getCanonicalPath();
|
||||
} catch (Exception ioEx)
|
||||
{
|
||||
// an error occurred trying to get the canonical path, use '/mnt/sdcard' instead
|
||||
defaultMountPoint = "/mnt/sdcard";
|
||||
}
|
||||
}
|
||||
|
||||
private static void readMountsFile()
|
||||
{
|
||||
/*
|
||||
* Scan the /proc/mounts file and look for lines like this: /dev/block/vold/179:1 /mnt/sdcard vfat
|
||||
* rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0602,dmask=0602,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
|
||||
*
|
||||
* When one is found, split it into its elements and then pull out the path to the that mount point and add it to the arraylist
|
||||
*/
|
||||
|
||||
try
|
||||
{
|
||||
Scanner scanner = new Scanner(new File("/proc/mounts"));
|
||||
while (scanner.hasNext())
|
||||
{
|
||||
String line = scanner.nextLine();
|
||||
if (line.startsWith("/dev/block/vold/"))
|
||||
{
|
||||
String[] lineElements = line.split(" ");
|
||||
lineElements[1].replaceAll(":.*$", "");
|
||||
mMounts.add(lineElements[1]);
|
||||
}
|
||||
}
|
||||
} catch (FileNotFoundException fnfex)
|
||||
{
|
||||
// if proc/mount doesn't exist we just use
|
||||
Log.i(StorageOptions.class.getCanonicalName(), fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point");
|
||||
mMounts.add(defaultMountPoint);
|
||||
} catch (Exception e)
|
||||
{
|
||||
Log.e(StorageOptions.class.getCanonicalName(), e.getMessage() + ": unknown exception while reading mounts file");
|
||||
mMounts.add(defaultMountPoint);
|
||||
}
|
||||
}
|
||||
|
||||
private static void readVoldFile()
|
||||
{
|
||||
/*
|
||||
* Scan the /system/etc/vold.fstab file and look for lines like this: dev_mount sdcard /mnt/sdcard 1 /devices/platform/s3c-sdhci.0/mmc_host/mmc0
|
||||
*
|
||||
* When one is found, split it into its elements and then pull out the path to the that mount point and add it to the arraylist
|
||||
*/
|
||||
|
||||
try
|
||||
{
|
||||
Scanner scanner = new Scanner(new File("/system/etc/vold.fstab"));
|
||||
while (scanner.hasNext())
|
||||
{
|
||||
String line = scanner.nextLine();
|
||||
if (line.startsWith("dev_mount"))
|
||||
{
|
||||
String[] lineElements = line.split(" ");
|
||||
lineElements[2] = lineElements[2].replaceAll(":.*$", "");
|
||||
mVold.add(lineElements[2]);
|
||||
}
|
||||
}
|
||||
} catch (FileNotFoundException fnfex)
|
||||
{
|
||||
// if vold.fstab doesn't exist we use the value gathered from the Environment
|
||||
Log.i(StorageOptions.class.getCanonicalName(), fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point");
|
||||
mMounts.add(defaultMountPoint);
|
||||
} catch (Exception e)
|
||||
{
|
||||
Log.e(StorageOptions.class.getCanonicalName(), e.getMessage() + ": unknown exception while reading mounts file");
|
||||
mMounts.add(defaultMountPoint);
|
||||
}
|
||||
}
|
||||
|
||||
private static void compareMountsWithVold()
|
||||
{
|
||||
/*
|
||||
* Sometimes the two lists of mount points will be different. We only want those mount points that are in both list.
|
||||
*
|
||||
* Compare the two lists together and remove items that are not in both lists.
|
||||
*/
|
||||
|
||||
for (int i = 0; i < mMounts.size(); i++)
|
||||
{
|
||||
String mount = mMounts.get(i);
|
||||
if (!mVold.contains(mount))
|
||||
mMounts.remove(i--);
|
||||
}
|
||||
|
||||
// don't need this anymore, clear the vold list to reduce memory
|
||||
// use and to prepare it for the next time it's needed.
|
||||
mVold.clear();
|
||||
}
|
||||
|
||||
private static void testAndCleanMountsList()
|
||||
{
|
||||
/*
|
||||
* Now that we have a cleaned list of mount paths Test each one to make sure it's a valid and available path. If it is not, remove it from the list.
|
||||
*/
|
||||
|
||||
for (int i = 0; i < mMounts.size(); i++)
|
||||
{
|
||||
String mount = mMounts.get(i);
|
||||
File root = new File(mount);
|
||||
if (!root.exists() || !root.isDirectory() || !root.canWrite())
|
||||
mMounts.remove(i--);
|
||||
}
|
||||
}
|
||||
|
||||
private static void setProperties()
|
||||
{
|
||||
/*
|
||||
* At this point all the paths in the list should be valid. Build the public properties.
|
||||
*/
|
||||
|
||||
ArrayList<String> mLabels = new ArrayList<String>();
|
||||
|
||||
int i = 1;
|
||||
for (String path : mMounts)
|
||||
{ // TODO: /mnt/sdcard is assumed to always mean internal storage. Use this comparison until there is a better way to do this
|
||||
if ("/mnt/sdcard".equalsIgnoreCase(path))
|
||||
mLabels.add("Built-in Storage");
|
||||
else
|
||||
mLabels.add("External SD Card " + i++);
|
||||
}
|
||||
|
||||
labels = new String[mLabels.size()];
|
||||
mLabels.toArray(labels);
|
||||
|
||||
paths = new String[mMounts.size()];
|
||||
mMounts.toArray(paths);
|
||||
|
||||
count = Math.min(labels.length, paths.length);
|
||||
|
||||
// don't need this anymore, clear the mounts list to reduce memory
|
||||
// use and to prepare it for the next time it's needed.
|
||||
mMounts.clear();
|
||||
}
|
||||
}
|
||||
771
platforms/android/package/src/org/libsdl/app/SDLActivity.java
Normal file
771
platforms/android/package/src/org/libsdl/app/SDLActivity.java
Normal file
@@ -0,0 +1,771 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import android.app.*;
|
||||
import android.content.*;
|
||||
import android.view.*;
|
||||
import android.view.inputmethod.BaseInputConnection;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputConnection;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.AbsoluteLayout;
|
||||
import android.os.*;
|
||||
import android.util.Log;
|
||||
import android.graphics.*;
|
||||
import android.media.*;
|
||||
import android.hardware.*;
|
||||
|
||||
|
||||
/**
|
||||
SDL Activity
|
||||
*/
|
||||
public class SDLActivity extends Activity {
|
||||
private static final String TAG = "SDL";
|
||||
|
||||
// Keep track of the paused state
|
||||
public static boolean mIsPaused = false, mIsSurfaceReady = false, mHasFocus = true;
|
||||
|
||||
// Main components
|
||||
protected static SDLActivity mSingleton;
|
||||
protected static SDLSurface mSurface;
|
||||
protected static View mTextEdit;
|
||||
protected static ViewGroup mLayout;
|
||||
|
||||
// This is what SDL runs in. It invokes SDL_main(), eventually
|
||||
protected static Thread mSDLThread;
|
||||
|
||||
// Audio
|
||||
protected static Thread mAudioThread;
|
||||
protected static AudioTrack mAudioTrack;
|
||||
|
||||
// Load the .so
|
||||
static {
|
||||
System.loadLibrary("SDL2");
|
||||
//System.loadLibrary("SDL2_image");
|
||||
//System.loadLibrary("SDL2_mixer");
|
||||
//System.loadLibrary("SDL2_net");
|
||||
//System.loadLibrary("SDL2_ttf");
|
||||
System.loadLibrary("wagic");
|
||||
}
|
||||
|
||||
// Setup
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
//Log.v("SDL", "onCreate()");
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// So we can call stuff from static callbacks
|
||||
mSingleton = this;
|
||||
|
||||
// Set up the surface
|
||||
mSurface = new SDLSurface(getApplication());
|
||||
|
||||
mLayout = new AbsoluteLayout(this);
|
||||
mLayout.addView(mSurface);
|
||||
|
||||
setContentView(mLayout);
|
||||
}
|
||||
|
||||
// Events
|
||||
@Override
|
||||
protected void onPause() {
|
||||
Log.v("SDL", "onPause()");
|
||||
super.onPause();
|
||||
SDLActivity.handlePause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
Log.v("SDL", "onResume()");
|
||||
super.onResume();
|
||||
SDLActivity.handleResume();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasFocus) {
|
||||
super.onWindowFocusChanged(hasFocus);
|
||||
Log.v("SDL", "onWindowFocusChanged(): " + hasFocus);
|
||||
|
||||
SDLActivity.mHasFocus = hasFocus;
|
||||
if (hasFocus) {
|
||||
SDLActivity.handleResume();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLowMemory() {
|
||||
Log.v("SDL", "onLowMemory()");
|
||||
super.onLowMemory();
|
||||
SDLActivity.nativeLowMemory();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
Log.v("SDL", "onDestroy()");
|
||||
// Send a quit message to the application
|
||||
SDLActivity.nativeQuit();
|
||||
|
||||
// Now wait for the SDL thread to quit
|
||||
if (mSDLThread != null) {
|
||||
try {
|
||||
mSDLThread.join();
|
||||
} catch(Exception e) {
|
||||
Log.v("SDL", "Problem stopping thread: " + e);
|
||||
}
|
||||
mSDLThread = null;
|
||||
|
||||
//Log.v("SDL", "Finished waiting for SDL thread");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
int keyCode = event.getKeyCode();
|
||||
// Ignore certain special keys so they're handled by Android
|
||||
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN ||
|
||||
keyCode == KeyEvent.KEYCODE_VOLUME_UP ||
|
||||
keyCode == KeyEvent.KEYCODE_CAMERA ||
|
||||
keyCode == 168 || /* API 11: KeyEvent.KEYCODE_ZOOM_IN */
|
||||
keyCode == 169 /* API 11: KeyEvent.KEYCODE_ZOOM_OUT */
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return super.dispatchKeyEvent(event);
|
||||
}
|
||||
|
||||
/** Called by onPause or surfaceDestroyed. Even if surfaceDestroyed
|
||||
* is the first to be called, mIsSurfaceReady should still be set
|
||||
* to 'true' during the call to onPause (in a usual scenario).
|
||||
*/
|
||||
public static void handlePause() {
|
||||
if (!SDLActivity.mIsPaused && SDLActivity.mIsSurfaceReady) {
|
||||
SDLActivity.mIsPaused = true;
|
||||
SDLActivity.nativePause();
|
||||
mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, false);
|
||||
}
|
||||
}
|
||||
|
||||
/** Called by onResume or surfaceCreated. An actual resume should be done only when the surface is ready.
|
||||
* Note: Some Android variants may send multiple surfaceChanged events, so we don't need to resume
|
||||
* every time we get one of those events, only if it comes after surfaceDestroyed
|
||||
*/
|
||||
public static void handleResume() {
|
||||
if (SDLActivity.mIsPaused && SDLActivity.mIsSurfaceReady && SDLActivity.mHasFocus) {
|
||||
SDLActivity.mIsPaused = false;
|
||||
SDLActivity.nativeResume();
|
||||
mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Messages from the SDLMain thread
|
||||
static final int COMMAND_CHANGE_TITLE = 1;
|
||||
static final int COMMAND_UNUSED = 2;
|
||||
static final int COMMAND_TEXTEDIT_HIDE = 3;
|
||||
|
||||
protected static final int COMMAND_USER = 0x8000;
|
||||
|
||||
/**
|
||||
* This method is called by SDL if SDL did not handle a message itself.
|
||||
* This happens if a received message contains an unsupported command.
|
||||
* Method can be overwritten to handle Messages in a different class.
|
||||
* @param command the command of the message.
|
||||
* @param param the parameter of the message. May be null.
|
||||
* @return if the message was handled in overridden method.
|
||||
*/
|
||||
protected boolean onUnhandledMessage(int command, Object param) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* A Handler class for Messages from native SDL applications.
|
||||
* It uses current Activities as target (e.g. for the title).
|
||||
* static to prevent implicit references to enclosing object.
|
||||
*/
|
||||
protected static class SDLCommandHandler extends Handler {
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
Context context = getContext();
|
||||
if (context == null) {
|
||||
Log.e(TAG, "error handling message, getContext() returned null");
|
||||
return;
|
||||
}
|
||||
switch (msg.arg1) {
|
||||
case COMMAND_CHANGE_TITLE:
|
||||
if (context instanceof Activity) {
|
||||
((Activity) context).setTitle((String)msg.obj);
|
||||
} else {
|
||||
Log.e(TAG, "error handling message, getContext() returned no Activity");
|
||||
}
|
||||
break;
|
||||
case COMMAND_TEXTEDIT_HIDE:
|
||||
if (mTextEdit != null) {
|
||||
mTextEdit.setVisibility(View.GONE);
|
||||
|
||||
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if ((context instanceof SDLActivity) && !((SDLActivity) context).onUnhandledMessage(msg.arg1, msg.obj)) {
|
||||
Log.e(TAG, "error handling message, command is " + msg.arg1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handler for the messages
|
||||
Handler commandHandler = new SDLCommandHandler();
|
||||
|
||||
// Send a message from the SDLMain thread
|
||||
boolean sendCommand(int command, Object data) {
|
||||
Message msg = commandHandler.obtainMessage();
|
||||
msg.arg1 = command;
|
||||
msg.obj = data;
|
||||
return commandHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
// C functions we call
|
||||
public static native void nativeInit();
|
||||
public static native void nativeLowMemory();
|
||||
public static native void nativeQuit();
|
||||
public static native void nativePause();
|
||||
public static native void nativeResume();
|
||||
public static native void onNativeResize(int x, int y, int format);
|
||||
public static native void onNativeKeyDown(int keycode);
|
||||
public static native void onNativeKeyUp(int keycode);
|
||||
public static native void onNativeKeyboardFocusLost();
|
||||
public static native void onNativeTouch(int touchDevId, int pointerFingerId,
|
||||
int action, float x,
|
||||
float y, float p);
|
||||
public static native void onNativeAccel(float x, float y, float z);
|
||||
public static native void onNativeSurfaceChanged();
|
||||
public static native void onNativeSurfaceDestroyed();
|
||||
public static native void nativeFlipBuffers();
|
||||
|
||||
public static void flipBuffers() {
|
||||
SDLActivity.nativeFlipBuffers();
|
||||
}
|
||||
|
||||
public static boolean setActivityTitle(String title) {
|
||||
// Called from SDLMain() thread and can't directly affect the view
|
||||
return mSingleton.sendCommand(COMMAND_CHANGE_TITLE, title);
|
||||
}
|
||||
|
||||
public static boolean sendMessage(int command, int param) {
|
||||
return mSingleton.sendCommand(command, Integer.valueOf(param));
|
||||
}
|
||||
|
||||
public static Context getContext() {
|
||||
return mSingleton;
|
||||
}
|
||||
|
||||
static class ShowTextInputTask implements Runnable {
|
||||
/*
|
||||
* This is used to regulate the pan&scan method to have some offset from
|
||||
* the bottom edge of the input region and the top edge of an input
|
||||
* method (soft keyboard)
|
||||
*/
|
||||
static final int HEIGHT_PADDING = 15;
|
||||
|
||||
public int x, y, w, h;
|
||||
|
||||
public ShowTextInputTask(int x, int y, int w, int h) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.w = w;
|
||||
this.h = h;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams(
|
||||
w, h + HEIGHT_PADDING, x, y);
|
||||
|
||||
if (mTextEdit == null) {
|
||||
mTextEdit = new DummyEdit(getContext());
|
||||
|
||||
mLayout.addView(mTextEdit, params);
|
||||
} else {
|
||||
mTextEdit.setLayoutParams(params);
|
||||
}
|
||||
|
||||
mTextEdit.setVisibility(View.VISIBLE);
|
||||
mTextEdit.requestFocus();
|
||||
|
||||
InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.showSoftInput(mTextEdit, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean showTextInput(int x, int y, int w, int h) {
|
||||
// Transfer the task to the main thread as a Runnable
|
||||
return mSingleton.commandHandler.post(new ShowTextInputTask(x, y, w, h));
|
||||
}
|
||||
|
||||
public static Surface getNativeSurface() {
|
||||
return SDLActivity.mSurface.getNativeSurface();
|
||||
}
|
||||
|
||||
// Audio
|
||||
public static int audioInit(int sampleRate, boolean is16Bit, boolean isStereo, int desiredFrames) {
|
||||
int channelConfig = isStereo ? AudioFormat.CHANNEL_CONFIGURATION_STEREO : AudioFormat.CHANNEL_CONFIGURATION_MONO;
|
||||
int audioFormat = is16Bit ? AudioFormat.ENCODING_PCM_16BIT : AudioFormat.ENCODING_PCM_8BIT;
|
||||
int frameSize = (isStereo ? 2 : 1) * (is16Bit ? 2 : 1);
|
||||
|
||||
Log.v("SDL", "SDL audio: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + (sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer");
|
||||
|
||||
// Let the user pick a larger buffer if they really want -- but ye
|
||||
// gods they probably shouldn't, the minimums are horrifyingly high
|
||||
// latency already
|
||||
desiredFrames = Math.max(desiredFrames, (AudioTrack.getMinBufferSize(sampleRate, channelConfig, audioFormat) + frameSize - 1) / frameSize);
|
||||
|
||||
if (mAudioTrack == null) {
|
||||
mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate,
|
||||
channelConfig, audioFormat, desiredFrames * frameSize, AudioTrack.MODE_STREAM);
|
||||
|
||||
// Instantiating AudioTrack can "succeed" without an exception and the track may still be invalid
|
||||
// Ref: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/media/java/android/media/AudioTrack.java
|
||||
// Ref: http://developer.android.com/reference/android/media/AudioTrack.html#getState()
|
||||
|
||||
if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
|
||||
Log.e("SDL", "Failed during initialization of Audio Track");
|
||||
mAudioTrack = null;
|
||||
return -1;
|
||||
}
|
||||
|
||||
mAudioTrack.play();
|
||||
}
|
||||
|
||||
Log.v("SDL", "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + (mAudioTrack.getSampleRate() / 1000f) + "kHz, " + desiredFrames + " frames buffer");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static void audioWriteShortBuffer(short[] buffer) {
|
||||
for (int i = 0; i < buffer.length; ) {
|
||||
int result = mAudioTrack.write(buffer, i, buffer.length - i);
|
||||
if (result > 0) {
|
||||
i += result;
|
||||
} else if (result == 0) {
|
||||
try {
|
||||
Thread.sleep(1);
|
||||
} catch(InterruptedException e) {
|
||||
// Nom nom
|
||||
}
|
||||
} else {
|
||||
Log.w("SDL", "SDL audio: error return from write(short)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void audioWriteByteBuffer(byte[] buffer) {
|
||||
for (int i = 0; i < buffer.length; ) {
|
||||
int result = mAudioTrack.write(buffer, i, buffer.length - i);
|
||||
if (result > 0) {
|
||||
i += result;
|
||||
} else if (result == 0) {
|
||||
try {
|
||||
Thread.sleep(1);
|
||||
} catch(InterruptedException e) {
|
||||
// Nom nom
|
||||
}
|
||||
} else {
|
||||
Log.w("SDL", "SDL audio: error return from write(byte)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void audioQuit() {
|
||||
if (mAudioTrack != null) {
|
||||
mAudioTrack.stop();
|
||||
mAudioTrack = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Input
|
||||
|
||||
/**
|
||||
* @return an array which may be empty but is never null.
|
||||
*/
|
||||
public static int[] inputGetInputDeviceIds(int sources) {
|
||||
int[] ids = InputDevice.getDeviceIds();
|
||||
int[] filtered = new int[ids.length];
|
||||
int used = 0;
|
||||
for (int i = 0; i < ids.length; ++i) {
|
||||
InputDevice device = InputDevice.getDevice(ids[i]);
|
||||
if ((device != null) && ((device.getSources() & sources) != 0)) {
|
||||
filtered[used++] = device.getId();
|
||||
}
|
||||
}
|
||||
return Arrays.copyOf(filtered, used);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Simple nativeInit() runnable
|
||||
*/
|
||||
class SDLMain implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
// Runs SDL_main()
|
||||
SDLActivity.nativeInit();
|
||||
|
||||
//Log.v("SDL", "SDL thread terminated");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
SDLSurface. This is what we draw on, so we need to know when it's created
|
||||
in order to do anything useful.
|
||||
|
||||
Because of this, that's where we set up the SDL thread
|
||||
*/
|
||||
class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
View.OnKeyListener, View.OnTouchListener, SensorEventListener {
|
||||
|
||||
// Sensors
|
||||
protected static SensorManager mSensorManager;
|
||||
protected static Display mDisplay;
|
||||
|
||||
// Keep track of the surface size to normalize touch events
|
||||
protected static float mWidth, mHeight;
|
||||
|
||||
// Startup
|
||||
public SDLSurface(Context context) {
|
||||
super(context);
|
||||
getHolder().addCallback(this);
|
||||
|
||||
setFocusable(true);
|
||||
setFocusableInTouchMode(true);
|
||||
requestFocus();
|
||||
setOnKeyListener(this);
|
||||
setOnTouchListener(this);
|
||||
|
||||
mDisplay = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
|
||||
mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
|
||||
|
||||
// Some arbitrary defaults to avoid a potential division by zero
|
||||
mWidth = 1.0f;
|
||||
mHeight = 1.0f;
|
||||
}
|
||||
|
||||
public Surface getNativeSurface() {
|
||||
return getHolder().getSurface();
|
||||
}
|
||||
|
||||
// Called when we have a valid drawing surface
|
||||
@Override
|
||||
public void surfaceCreated(SurfaceHolder holder) {
|
||||
Log.v("SDL", "surfaceCreated()");
|
||||
holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
|
||||
}
|
||||
|
||||
// Called when we lose the surface
|
||||
@Override
|
||||
public void surfaceDestroyed(SurfaceHolder holder) {
|
||||
Log.v("SDL", "surfaceDestroyed()");
|
||||
// Call this *before* setting mIsSurfaceReady to 'false'
|
||||
SDLActivity.handlePause();
|
||||
SDLActivity.mIsSurfaceReady = false;
|
||||
SDLActivity.onNativeSurfaceDestroyed();
|
||||
}
|
||||
|
||||
// Called when the surface is resized
|
||||
@Override
|
||||
public void surfaceChanged(SurfaceHolder holder,
|
||||
int format, int width, int height) {
|
||||
Log.v("SDL", "surfaceChanged()");
|
||||
|
||||
int sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565 by default
|
||||
switch (format) {
|
||||
case PixelFormat.A_8:
|
||||
Log.v("SDL", "pixel format A_8");
|
||||
break;
|
||||
case PixelFormat.LA_88:
|
||||
Log.v("SDL", "pixel format LA_88");
|
||||
break;
|
||||
case PixelFormat.L_8:
|
||||
Log.v("SDL", "pixel format L_8");
|
||||
break;
|
||||
case PixelFormat.RGBA_4444:
|
||||
Log.v("SDL", "pixel format RGBA_4444");
|
||||
sdlFormat = 0x15421002; // SDL_PIXELFORMAT_RGBA4444
|
||||
break;
|
||||
case PixelFormat.RGBA_5551:
|
||||
Log.v("SDL", "pixel format RGBA_5551");
|
||||
sdlFormat = 0x15441002; // SDL_PIXELFORMAT_RGBA5551
|
||||
break;
|
||||
case PixelFormat.RGBA_8888:
|
||||
Log.v("SDL", "pixel format RGBA_8888");
|
||||
sdlFormat = 0x16462004; // SDL_PIXELFORMAT_RGBA8888
|
||||
break;
|
||||
case PixelFormat.RGBX_8888:
|
||||
Log.v("SDL", "pixel format RGBX_8888");
|
||||
sdlFormat = 0x16261804; // SDL_PIXELFORMAT_RGBX8888
|
||||
break;
|
||||
case PixelFormat.RGB_332:
|
||||
Log.v("SDL", "pixel format RGB_332");
|
||||
sdlFormat = 0x14110801; // SDL_PIXELFORMAT_RGB332
|
||||
break;
|
||||
case PixelFormat.RGB_565:
|
||||
Log.v("SDL", "pixel format RGB_565");
|
||||
sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565
|
||||
break;
|
||||
case PixelFormat.RGB_888:
|
||||
Log.v("SDL", "pixel format RGB_888");
|
||||
// Not sure this is right, maybe SDL_PIXELFORMAT_RGB24 instead?
|
||||
sdlFormat = 0x16161804; // SDL_PIXELFORMAT_RGB888
|
||||
break;
|
||||
default:
|
||||
Log.v("SDL", "pixel format unknown " + format);
|
||||
break;
|
||||
}
|
||||
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
SDLActivity.onNativeResize(width, height, sdlFormat);
|
||||
Log.v("SDL", "Window size:" + width + "x"+height);
|
||||
|
||||
// Set mIsSurfaceReady to 'true' *before* making a call to handleResume
|
||||
SDLActivity.mIsSurfaceReady = true;
|
||||
SDLActivity.onNativeSurfaceChanged();
|
||||
|
||||
|
||||
if (SDLActivity.mSDLThread == null) {
|
||||
// This is the entry point to the C app.
|
||||
// Start up the C app thread and enable sensor input for the first time
|
||||
|
||||
SDLActivity.mSDLThread = new Thread(new SDLMain(), "SDLThread");
|
||||
enableSensor(Sensor.TYPE_ACCELEROMETER, true);
|
||||
SDLActivity.mSDLThread.start();
|
||||
}
|
||||
}
|
||||
|
||||
// unused
|
||||
@Override
|
||||
public void onDraw(Canvas canvas) {}
|
||||
|
||||
|
||||
// Key events
|
||||
@Override
|
||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
//Log.v("SDL", "key down: " + keyCode);
|
||||
SDLActivity.onNativeKeyDown(keyCode);
|
||||
return true;
|
||||
}
|
||||
else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
//Log.v("SDL", "key up: " + keyCode);
|
||||
SDLActivity.onNativeKeyUp(keyCode);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Touch events
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
final int touchDevId = event.getDeviceId();
|
||||
final int pointerCount = event.getPointerCount();
|
||||
// touchId, pointerId, action, x, y, pressure
|
||||
int actionPointerIndex = (event.getAction() & MotionEvent.ACTION_POINTER_ID_MASK) >> MotionEvent.ACTION_POINTER_ID_SHIFT; /* API 8: event.getActionIndex(); */
|
||||
int pointerFingerId = event.getPointerId(actionPointerIndex);
|
||||
int action = (event.getAction() & MotionEvent.ACTION_MASK); /* API 8: event.getActionMasked(); */
|
||||
|
||||
float x = event.getX(actionPointerIndex) / mWidth;
|
||||
float y = event.getY(actionPointerIndex) / mHeight;
|
||||
float p = event.getPressure(actionPointerIndex);
|
||||
|
||||
if (action == MotionEvent.ACTION_MOVE && pointerCount > 1) {
|
||||
// TODO send motion to every pointer if its position has
|
||||
// changed since prev event.
|
||||
for (int i = 0; i < pointerCount; i++) {
|
||||
pointerFingerId = event.getPointerId(i);
|
||||
x = event.getX(i) / mWidth;
|
||||
y = event.getY(i) / mHeight;
|
||||
p = event.getPressure(i);
|
||||
SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p);
|
||||
}
|
||||
} else {
|
||||
SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Sensor events
|
||||
public void enableSensor(int sensortype, boolean enabled) {
|
||||
// TODO: This uses getDefaultSensor - what if we have >1 accels?
|
||||
if (enabled) {
|
||||
mSensorManager.registerListener(this,
|
||||
mSensorManager.getDefaultSensor(sensortype),
|
||||
SensorManager.SENSOR_DELAY_GAME, null);
|
||||
} else {
|
||||
mSensorManager.unregisterListener(this,
|
||||
mSensorManager.getDefaultSensor(sensortype));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAccuracyChanged(Sensor sensor, int accuracy) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSensorChanged(SensorEvent event) {
|
||||
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
|
||||
float x, y;
|
||||
switch (mDisplay.getRotation()) {
|
||||
case Surface.ROTATION_90:
|
||||
x = -event.values[1];
|
||||
y = event.values[0];
|
||||
break;
|
||||
case Surface.ROTATION_270:
|
||||
x = event.values[1];
|
||||
y = -event.values[0];
|
||||
break;
|
||||
case Surface.ROTATION_180:
|
||||
x = -event.values[1];
|
||||
y = -event.values[0];
|
||||
break;
|
||||
default:
|
||||
x = event.values[0];
|
||||
y = event.values[1];
|
||||
break;
|
||||
}
|
||||
SDLActivity.onNativeAccel(-x / SensorManager.GRAVITY_EARTH,
|
||||
y / SensorManager.GRAVITY_EARTH,
|
||||
event.values[2] / SensorManager.GRAVITY_EARTH - 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* This is a fake invisible editor view that receives the input and defines the
|
||||
* pan&scan region
|
||||
*/
|
||||
class DummyEdit extends View implements View.OnKeyListener {
|
||||
InputConnection ic;
|
||||
|
||||
public DummyEdit(Context context) {
|
||||
super(context);
|
||||
setFocusableInTouchMode(true);
|
||||
setFocusable(true);
|
||||
setOnKeyListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCheckIsTextEditor() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||
|
||||
// This handles the hardware keyboard input
|
||||
if (event.isPrintingKey()) {
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
SDLActivity.onNativeKeyDown(keyCode);
|
||||
return true;
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
SDLActivity.onNativeKeyUp(keyCode);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
@Override
|
||||
public boolean onKeyPreIme (int keyCode, KeyEvent event) {
|
||||
// As seen on StackOverflow: http://stackoverflow.com/questions/7634346/keyboard-hide-event
|
||||
// FIXME: Discussion at http://bugzilla.libsdl.org/show_bug.cgi?id=1639
|
||||
// FIXME: This is not a 100% effective solution to the problem of detecting if the keyboard is showing or not
|
||||
// FIXME: A more effective solution would be to change our Layout from AbsoluteLayout to Relative or Linear
|
||||
// FIXME: And determine the keyboard presence doing this: http://stackoverflow.com/questions/2150078/how-to-check-visibility-of-software-keyboard-in-android
|
||||
// FIXME: An even more effective way would be if Android provided this out of the box, but where would the fun be in that :)
|
||||
if (event.getAction()==KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
if (SDLActivity.mTextEdit != null && SDLActivity.mTextEdit.getVisibility() == View.VISIBLE) {
|
||||
SDLActivity.onNativeKeyboardFocusLost();
|
||||
}
|
||||
}
|
||||
return super.onKeyPreIme(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
|
||||
ic = new SDLInputConnection(this, true);
|
||||
|
||||
outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI
|
||||
| 33554432 /* API 11: EditorInfo.IME_FLAG_NO_FULLSCREEN */;
|
||||
|
||||
return ic;
|
||||
}
|
||||
}
|
||||
|
||||
class SDLInputConnection extends BaseInputConnection {
|
||||
|
||||
public SDLInputConnection(View targetView, boolean fullEditor) {
|
||||
super(targetView, fullEditor);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sendKeyEvent(KeyEvent event) {
|
||||
|
||||
/*
|
||||
* This handles the keycodes from soft keyboard (and IME-translated
|
||||
* input from hardkeyboard)
|
||||
*/
|
||||
int keyCode = event.getKeyCode();
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
if (event.isPrintingKey()) {
|
||||
commitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
}
|
||||
SDLActivity.onNativeKeyDown(keyCode);
|
||||
return true;
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
|
||||
SDLActivity.onNativeKeyUp(keyCode);
|
||||
return true;
|
||||
}
|
||||
return super.sendKeyEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean commitText(CharSequence text, int newCursorPosition) {
|
||||
|
||||
nativeCommitText(text.toString(), newCursorPosition);
|
||||
|
||||
return super.commitText(text, newCursorPosition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setComposingText(CharSequence text, int newCursorPosition) {
|
||||
|
||||
nativeSetComposingText(text.toString(), newCursorPosition);
|
||||
|
||||
return super.setComposingText(text, newCursorPosition);
|
||||
}
|
||||
|
||||
public native void nativeCommitText(String text, int newCursorPosition);
|
||||
|
||||
public native void nativeSetComposingText(String text, int newCursorPosition);
|
||||
|
||||
}
|
||||
|
||||
8
platforms/emscripten/configure.cmake
Normal file
8
platforms/emscripten/configure.cmake
Normal file
@@ -0,0 +1,8 @@
|
||||
set(CMAKE_CXX_FLAGS "-s USE_SDL=2 -s USE_ZLIB=1 -s FULL_ES2=1 -std=c++11 -s TOTAL_MEMORY=16777216 -O0 --preload-file ../../../projects/mtg/bin/Res@/")
|
||||
#set(CMAKE_CXX_FLAGS "-s USE_SDL=2 -s FULL_ES2=1 -std=c++11 -g4 -s ALLOW_MEMORY_GROWTH=1 --preload-file ../../../projects/mtg/bin/Res@/")
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".html")
|
||||
add_definitions(-DLINUX)
|
||||
add_definitions(-D_DEBUG)
|
||||
add_definitions(-DUSERDIR=".wagic")
|
||||
add_definitions(-DRESDIR="/")
|
||||
add_definitions(-DGL_ES_VERSION_2_0)
|
||||
5
platforms/macosx/configure.cmake
Normal file
5
platforms/macosx/configure.cmake
Normal file
@@ -0,0 +1,5 @@
|
||||
add_definitions(-DLINUX)
|
||||
add_definitions(-DUSERDIR=".wagic")
|
||||
add_definitions(-DRESDIR="Res")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++0x")
|
||||
set(CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
|
||||
5
platforms/psp/configure.cmake
Normal file
5
platforms/psp/configure.cmake
Normal file
@@ -0,0 +1,5 @@
|
||||
add_definitions(-DPSP -G0)
|
||||
add_definitions(-D_PSP_FW_VERSION=371)
|
||||
add_definitions(-DDEVHOOK -DPSPFW3XX)
|
||||
|
||||
include_directories(${PSPSDK_PATH}/include)
|
||||
4
platforms/unix/configure.cmake
Normal file
4
platforms/unix/configure.cmake
Normal file
@@ -0,0 +1,4 @@
|
||||
add_definitions(-DLINUX)
|
||||
add_definitions(-DUSERDIR=".wagic")
|
||||
add_definitions(-DRESDIR="Res")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
3
platforms/win/configure.cmake
Normal file
3
platforms/win/configure.cmake
Normal file
@@ -0,0 +1,3 @@
|
||||
add_definitions(-DWIN32)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:versionCode="0231"
|
||||
android:versionCode="0240"
|
||||
android:installLocation="preferExternal"
|
||||
android:versionName="@string/app_version"
|
||||
package="net.wagic.app">
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
APP_PROJECT_PATH := $(call my-dir)/..
|
||||
APP_CPPFLAGS += -frtti -fexceptions
|
||||
APP_ABI := armeabi-v7a
|
||||
APP_ABI := arm64-v8a
|
||||
APP_PLATFORM := android-21
|
||||
APP_CFLAGS += -march=armv8.1-a
|
||||
APP_CPPFLAGS += -D__ARM_FEATURE_LSE=1
|
||||
#APP_ABI := x86 # mainly for emulators
|
||||
APP_STL := c++_static
|
||||
APP_MODULES := libpng libjpeg main SDL
|
||||
|
||||
BIN
projects/mtg/Android/libs/json-simple-1.1.jar
Normal file
BIN
projects/mtg/Android/libs/json-simple-1.1.jar
Normal file
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Wagic</string>
|
||||
<string name="app_version">0.23.1</string>
|
||||
<string name="app_version">0.20.0</string>
|
||||
<string name="info_text">All Rights Reserved.</string>
|
||||
</resources>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -110,6 +110,7 @@ public class SDLActivity extends Activity implements OnKeyListener {
|
||||
public static final String kSaveDataPathPreference = "StorageDataLocation";
|
||||
public static final String kWagicDataStorageOptionsKey = "dataStorageOptions";
|
||||
public static final int kStorageDataOptionsMenuId = 2000;
|
||||
public static final int kdownloadResOptionsMenuId = 4000;
|
||||
public static final int kOtherOptionsMenuId = 3000;
|
||||
|
||||
static {
|
||||
@@ -170,6 +171,7 @@ public class SDLActivity extends Activity implements OnKeyListener {
|
||||
MenuItem downloader;
|
||||
MenuItem about;
|
||||
MenuItem storage;
|
||||
MenuItem resource;
|
||||
|
||||
// Handler for the messages
|
||||
Handler commandHandler = new Handler() {
|
||||
@@ -951,6 +953,9 @@ public class SDLActivity extends Activity implements OnKeyListener {
|
||||
about = menu.add(Menu.NONE, 4, 4, "About");
|
||||
storage = settingsMenu.add(kStorageDataOptionsMenuId,
|
||||
kStorageDataOptionsMenuId, Menu.NONE, "Storage Data Options");
|
||||
resource = settingsMenu.add(kdownloadResOptionsMenuId,
|
||||
kdownloadResOptionsMenuId, Menu.NONE, "Download Core & Quit");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -966,6 +971,10 @@ public class SDLActivity extends Activity implements OnKeyListener {
|
||||
|
||||
if (itemId == kStorageDataOptionsMenuId) {
|
||||
displayStorageOptions();
|
||||
} else if (itemId == kdownloadResOptionsMenuId) {
|
||||
File oldRes = new File(getSystemStorageLocation() + RES_FILENAME);
|
||||
oldRes.delete();
|
||||
startDownload();
|
||||
} else if (itemId == 2) {
|
||||
importDeckOptions();
|
||||
} else if (itemId == 3) {
|
||||
@@ -1000,7 +1009,7 @@ public class SDLActivity extends Activity implements OnKeyListener {
|
||||
public void showSettingsSubMenu() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle("Settings Menu");
|
||||
String[] choices = { "Storage Data Options" };
|
||||
String[] choices = { "Storage Data Options", "Download Core & Quit" };
|
||||
builder.setItems(choices,
|
||||
new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
@@ -1009,6 +1018,9 @@ public class SDLActivity extends Activity implements OnKeyListener {
|
||||
case 0:
|
||||
onOptionsItemSelected(storage);
|
||||
break;
|
||||
case 1:
|
||||
onOptionsItemSelected(resource);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1122,13 +1134,41 @@ public class SDLActivity extends Activity implements OnKeyListener {
|
||||
prepareOptionMenu(null);
|
||||
}
|
||||
|
||||
public void forceResDownload(final File oldRes) {
|
||||
AlertDialog.Builder resChooser = new AlertDialog.Builder(this);
|
||||
final SDLActivity parent = this;
|
||||
|
||||
resChooser.setTitle("Do you want to download latest core file?");
|
||||
|
||||
resChooser.setPositiveButton("Yes",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
FrameLayout _videoLayout = new FrameLayout(parent);
|
||||
setContentView(_videoLayout,
|
||||
new LayoutParams(LayoutParams.FILL_PARENT,
|
||||
LayoutParams.FILL_PARENT));
|
||||
oldRes.delete();
|
||||
startDownload();
|
||||
}
|
||||
});
|
||||
|
||||
resChooser.setNegativeButton("No",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
mainDisplay();
|
||||
}
|
||||
});
|
||||
|
||||
resChooser.create().show();
|
||||
}
|
||||
|
||||
public void initializeGame() {
|
||||
String coreFileLocation = getSystemStorageLocation() + RES_FILENAME;
|
||||
|
||||
File file = new File(coreFileLocation);
|
||||
|
||||
if (file.exists()) {
|
||||
mainDisplay();
|
||||
forceResDownload(file);
|
||||
} else {
|
||||
FrameLayout _videoLayout = new FrameLayout(this);
|
||||
setContentView(_videoLayout,
|
||||
|
||||
244
projects/mtg/CMakeLists.txt
Normal file
244
projects/mtg/CMakeLists.txt
Normal file
@@ -0,0 +1,244 @@
|
||||
#MTGs common sources
|
||||
set(MTG_generic_src
|
||||
src/AbilityParser.cpp
|
||||
src/ActionElement.cpp
|
||||
src/ActionLayer.cpp
|
||||
src/ActionStack.cpp
|
||||
src/AIHints.cpp
|
||||
src/AIMomirPlayer.cpp
|
||||
src/AIPlayer.cpp
|
||||
src/AIPlayerBaka.cpp
|
||||
src/AIStats.cpp
|
||||
src/AllAbilities.cpp
|
||||
src/CardDescriptor.cpp
|
||||
src/CardDisplay.cpp
|
||||
src/CardGui.cpp
|
||||
src/CardPrimitive.cpp
|
||||
src/CardSelector.cpp
|
||||
src/CardSelectorSingleton.cpp
|
||||
src/CarouselDeckView.cpp
|
||||
src/Closest.cpp
|
||||
src/Counters.cpp
|
||||
src/Credits.cpp
|
||||
src/Damage.cpp
|
||||
src/DamagerDamaged.cpp
|
||||
src/DeckDataWrapper.cpp
|
||||
src/DeckEditorMenu.cpp
|
||||
src/DeckManager.cpp
|
||||
src/DeckMenu.cpp
|
||||
src/DeckMenuItem.cpp
|
||||
src/DeckMetaData.cpp
|
||||
src/DeckStats.cpp
|
||||
src/DeckView.cpp
|
||||
src/DuelLayers.cpp
|
||||
src/ExtraCost.cpp
|
||||
src/GameApp.cpp
|
||||
src/GameLauncher.cpp
|
||||
src/GameObserver.cpp
|
||||
src/GameOptions.cpp
|
||||
src/GameStateAwards.cpp
|
||||
src/GameState.cpp
|
||||
src/GameStateDeckViewer.cpp
|
||||
src/GameStateDuel.cpp
|
||||
src/GameStateMenu.cpp
|
||||
src/GameStateOptions.cpp
|
||||
src/GameStateShop.cpp
|
||||
src/GameStateStory.cpp
|
||||
src/GameStateTransitions.cpp
|
||||
src/GridDeckView.cpp
|
||||
src/GuiAvatars.cpp
|
||||
src/GuiBackground.cpp
|
||||
src/GuiCardsController.cpp
|
||||
src/GuiCombat.cpp
|
||||
src/GuiFrame.cpp
|
||||
src/GuiHand.cpp
|
||||
src/GuiLayers.cpp
|
||||
src/GuiMana.cpp
|
||||
src/GuiPhaseBar.cpp
|
||||
src/GuiPlay.cpp
|
||||
src/GuiStatic.cpp
|
||||
src/IconButton.cpp
|
||||
src/InteractiveButton.cpp
|
||||
src/ManaCost.cpp
|
||||
src/ManaCostHybrid.cpp
|
||||
src/MenuItem.cpp
|
||||
src/ModRules.cpp
|
||||
src/MTGAbility.cpp
|
||||
src/MTGCard.cpp
|
||||
src/MTGCardInstance.cpp
|
||||
src/MTGDeck.cpp
|
||||
src/MTGDefinitions.cpp
|
||||
src/MTGGamePhase.cpp
|
||||
src/MTGGameZones.cpp
|
||||
src/MTGPack.cpp
|
||||
src/MTGRules.cpp
|
||||
src/ObjectAnalytics.cpp
|
||||
src/OptionItem.cpp
|
||||
src/PhaseRing.cpp
|
||||
src/Player.cpp
|
||||
src/PlayerData.cpp
|
||||
src/PlayGuiObject.cpp
|
||||
src/PlayGuiObjectController.cpp
|
||||
src/PlayRestrictions.cpp
|
||||
src/Pos.cpp
|
||||
src/PriceList.cpp
|
||||
src/ReplacementEffects.cpp
|
||||
src/Rules.cpp
|
||||
src/SimpleMenu.cpp
|
||||
src/SimpleMenuItem.cpp
|
||||
src/SimpleButton.cpp
|
||||
src/SimplePad.cpp
|
||||
src/SimplePopup.cpp
|
||||
src/StoryFlow.cpp
|
||||
src/Subtypes.cpp
|
||||
src/StyleManager.cpp
|
||||
src/TargetChooser.cpp
|
||||
src/TargetsList.cpp
|
||||
src/Tasks.cpp
|
||||
src/TextScroller.cpp
|
||||
src/ThisDescriptor.cpp
|
||||
src/Token.cpp
|
||||
src/Translate.cpp
|
||||
src/TranslateKeys.cpp
|
||||
src/Trash.cpp
|
||||
src/utils.cpp
|
||||
src/WCachedResource.cpp
|
||||
src/WDataSrc.cpp
|
||||
src/WEvent.cpp
|
||||
src/WFilter.cpp
|
||||
src/WFont.cpp
|
||||
src/WGui.cpp
|
||||
src/WResourceManager.cpp
|
||||
src/WParsedInt.cpp
|
||||
)
|
||||
|
||||
set(MTG_network_src src/NetworkPlayer.cpp)
|
||||
|
||||
#the sources we need if we compile a graphical qt version
|
||||
#TODO: add declarative version since this only works with QWidget right now
|
||||
set(MTG_qt_graphic_src
|
||||
src/qt/filedownloader.cpp
|
||||
src/qt/corewrapper.cpp
|
||||
include/qt/corewrapper.h #so automoc finds it
|
||||
include/qt/filedownloader.h
|
||||
src/Qtmain.cpp)
|
||||
|
||||
#the sources we need to compile the testsuit
|
||||
set(MTG_qt_console_src
|
||||
src/Qtconsole.cpp
|
||||
src/TestSuiteAI.cpp)
|
||||
|
||||
set(MTG_sdl_src
|
||||
src/SDLmain.cpp)
|
||||
|
||||
set(MTG_android_sdl_src
|
||||
src/SDLmain.cpp)
|
||||
|
||||
set(MTG_iOS_src
|
||||
iOS/UI/WagicDownloadProgressViewController.m
|
||||
iOS/asi-http-request/ASIAuthenticationDialog.m
|
||||
iOS/asi-http-request/ASIDataCompressor.m
|
||||
iOS/asi-http-request/ASIDataDecompressor.m
|
||||
iOS/asi-http-request/ASIDownloadCache.m
|
||||
iOS/asi-http-request/ASIFormDataRequest.m
|
||||
iOS/asi-http-request/ASIHTTPRequest.m
|
||||
iOS/asi-http-request/ASIInputStream.m
|
||||
iOS/asi-http-request/ASINetworkQueue.m
|
||||
iOS/SoundManager/SoundManager.m
|
||||
iOS/SoundManager/MyOpenALSupport.c
|
||||
iOS/Reachability/Reachability/Reachability.m
|
||||
iOS/ZipArchive/ZipArchive.mm)
|
||||
|
||||
|
||||
set(MTG_iOS_INCLUDE_DIRS iOS/UI iOS/Reachability/Reachability iOS/asi-http-request iOS/ZipArchive iOS/SoundManager)
|
||||
|
||||
set(MTG_INCLUDE_DIRS include include/qt)
|
||||
set(JGE_INCLUDE_DIRS ../../JGE/include ../../JGE/include/hge)
|
||||
set(JGE_LIBRARY jge)
|
||||
set(EXTRA_INCLUDE_DIR extra)
|
||||
|
||||
#turn moc on
|
||||
if(backend_qt_console OR backend_qt_widget)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC TRUE)
|
||||
endif()
|
||||
|
||||
if(backend_qt_console)
|
||||
if(UNIX AND NOT ANDROID)
|
||||
include_directories(${MTG_INCLUDE_DIRS} ${JGE_INCLUDE_DIRS} ${ZIPFS_INCLUDE_DIR} ${Qt5Core_INCLUDE_DIRS} ${Qt5Multimedia_INCLUDE_DIRS}
|
||||
${UNZIP_INCLUDE_DIR} ${HGE_INCLUDE_DIR} ${TINYXML_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default)
|
||||
add_executable(wagic ${MTG_generic_src} ${MTG_qt_console_src} ${MTG_network_src})
|
||||
target_link_libraries(wagic ${JGE_LIBRARY} ${Qt5Core_INCLUDE_DIRS} ${Qt5Multimedia_INCLUDE_DIRS} ${TINYXML_LIBRARIES}
|
||||
${HGE_LIBRARY} ${ZLIB_LIBRARIES})
|
||||
else()
|
||||
message(FATAL_ERROR "qt-console builds are only supported on unix platforms")
|
||||
endif()
|
||||
elseif(backend_qt_widget)
|
||||
if(UNIX AND NOT ANDROID)
|
||||
include_directories(${MTG_INCLUDE_DIRS} ${JGE_INCLUDE_DIRS} ${ZIPFS_INCLUDE_DIR} ${Qt5Core_INCLUDE_DIRS} ${Qt5Multimedia_INCLUDE_DIRS}
|
||||
${UNZIP_INCLUDE_DIR} ${HGE_INCLUDE_DIR} ${TINYXML_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default)
|
||||
add_executable(wagic ${MTG_generic_src} ${MTG_qt_graphic_src} ${MTG_network_src})
|
||||
target_link_libraries(wagic ${JGE_LIBRARY} ${Qt5Core_INCLUDE_DIRS} ${Qt5Multimedia_INCLUDE_DIRS} ${OPENGL_LIBRARIES} ${TINYXML_LIBRARIES}
|
||||
${HGE_LIBRARY} ${ZLIB_LIBRARIES})# ${X11_LIBRARIES})
|
||||
else()
|
||||
message(FATAL_ERROR "qt-widget builds are only supported on unix platforms")
|
||||
endif()
|
||||
elseif(backend_sdl)
|
||||
if((UNIX OR EMSCRIPTEN) AND NOT ANDROID)
|
||||
include_directories(${MTG_INCLUDE_DIRS} ${JGE_INCLUDE_DIRS} ${SDL2_INCLUDE_DIR} ${ZIPFS_INCLUDE_DIR} ${UNZIP_INCLUDE_DIR} ${HGE_INCLUDE_DIR} ${TINYXML_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS})
|
||||
add_executable(wagic ${MTG_generic_src} ${MTG_sdl_src} ${MTG_network_src} src/TestSuiteAI.cpp src/AIPlayerBakaB.cpp)
|
||||
target_link_libraries(wagic ${JGE_LIBRARY} ${SDL2_LIBRARY} ${OPENGL_LIBRARIES} ${TINYXML_LIBRARIES} ${HGE_LIBRARY} ${ZLIB_LIBRARIES})
|
||||
elseif(ANDROID)
|
||||
include_directories(${MTG_INCLUDE_DIRS} ${JGE_INCLUDE_DIRS} ${SDL2_INCLUDE_DIR} ${ZIPFS_INCLUDE_DIR} ${BOOST_INCLUDE_DIRS} ${UNZIP_INCLUDE_DIR} ${HGE_INCLUDE_DIR} ${TINYXML_INCLUDE_DIR})
|
||||
#we should try to get rid of this hack
|
||||
add_library(wagic SHARED ${MTG_generic_src} ${MTG_network_src} ${MTG_android_sdl_src} src/TestSuiteAI.cpp)
|
||||
target_link_libraries(wagic ${JGE_LIBRARY} ${SDL2_LIBRARY} ${OPENGL_LIBRARIES} ${TINYXML_LIBRARIES} ${HGE_LIBRARY} ${ZLIB_LIBRARIES})
|
||||
elseif(WIN32)
|
||||
include_directories(${EXTRA_INCLUDE_DIR} ${MTG_INCLUDE_DIRS} ${JGE_INCLUDE_DIRS} ${SDL2_INCLUDE_DIR} ${ZIPFS_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIRS} ${UNZIP_INCLUDE_DIR} ${HGE_INCLUDE_DIR} ${TINYXML_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS})
|
||||
add_executable(wagic ${MTG_generic_src} ${MTG_sdl_src} src/TestSuiteAI.cpp src/AIPlayerBakaB.cpp)
|
||||
link_directories(${Boost_LIBRARY_DIR} ${SDL2_LIBRARY_DIR})
|
||||
target_link_libraries(wagic PRIVATE
|
||||
${JGE_LIBRARY}
|
||||
${PNG_LIBRARIES} # Explicitly link libpng
|
||||
${ZIPFS_LIBRARY} # Explicitly link libzipFS
|
||||
${SDL2_LIBRARY}
|
||||
${OPENGL_LIBRARIES}
|
||||
${TINYXML_LIBRARIES}
|
||||
${HGE_LIBRARY}
|
||||
${BOOST_date_time}
|
||||
${ZLIB_LIBRARIES} # Ensure zlib is linked
|
||||
)
|
||||
endif()
|
||||
elseif(backend_psp)
|
||||
if(PSP)
|
||||
#${PSPSDK_PATH}/include
|
||||
include_directories(${MTG_INCLUDE_DIRS} ${JGE_INCLUDE_DIRS} ${TINYXML_INCLUDE_DIR} ${ZIPFS_INCLUDE_DIR}
|
||||
${UNZIP_INCLUDE_DIR} ${BOOST_INCLUDE_DIRS} ${GIF_INCLUDE_DIR} ${HGETOOLS_INCLUDE_DIRS})
|
||||
add_executable(wagic ${MTG_generic_src} ${MTG_network_src})
|
||||
target_link_libraries(wagic ${JGE_LIBRARY} ${PSPSDK_LIB} ${HGETOOLS_LIBRARY} ${FREETYPE_LIB} ${JPEG_LIBRARY}
|
||||
${GIF_LIBRARIES} ${PNG_LIBRARIES} z m ${MIKMOD_LIBRARY} ${TINYXML_LIBRARIES}
|
||||
stdc++ ${PSPSDK_REQUIRED_LIB})
|
||||
|
||||
set(PRXSPECS_FILE "${PSPSDK_PATH}/lib/prxspecs")
|
||||
set(LINKFILE_FILE "${PSPSDK_PATH}/lib/linkfile.prx")
|
||||
|
||||
get_property(wagic_elf_location TARGET wagic PROPERTY LOCATION)
|
||||
get_filename_component(wagic_elf_directory ${wagic_elf_location} PATH)
|
||||
|
||||
set_target_properties(wagic PROPERTIES LINK_FLAGS "-specs=${PRXSPECS_FILE} -Wl,-q,-T${LINKFILE_FILE}")
|
||||
|
||||
add_custom_command(TARGET wagic POST_BUILD
|
||||
COMMAND ${PSPSDK_MKSFO_COMMAND} ARGS "'Wagic, the Homebrew?!'" "${wagic_elf_directory}/PARAM.SFO"
|
||||
COMMAND ${PSPSDK_FIXUP_IMPORTS_COMMAND} ARGS ${wagic_elf_location}
|
||||
COMMAND ${PSPSDK_PRXGEN_COMMAND} ARGS ${wagic_elf_location} "${wagic_elf_directory}/wagic.prx"
|
||||
COMMAND ${PSPSDK_PACK_PBP_COMMAND} ARGS ${wagic_elf_directory}/EBOOT.PBP ${wagic_elf_directory}/PARAM.SFO ${CMAKE_CURRENT_SOURCE_DIR}/icon.png NULL ${CMAKE_CURRENT_SOURCE_DIR}/pic0.png ${CMAKE_CURRENT_SOURCE_DIR}/pic1.png NULL "${wagic_elf_directory}/wagic.prx" NULL)
|
||||
else()
|
||||
message(FATAL_ERROR "use the cross-compile toolchain to build as the psp target")
|
||||
endif()
|
||||
endif()
|
||||
if(IOS)
|
||||
set(MTG_generic_src ${MTG_generic_src} ${MTG_iOS_src} PARENT_SCOPE)
|
||||
set(MTG_INCLUDE_DIRS ${MTG_INCLUDE_DIRS} ${MTG_iOS_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
|
||||
endif()
|
||||
82596
projects/mtg/CardImageLinks.csv
Normal file
82596
projects/mtg/CardImageLinks.csv
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,26 +1,84 @@
|
||||
#NAME:The KOR
|
||||
#DESC:The Kor never stand down.Golem-Skin Gauntlets (MRD) *1
|
||||
Plains (8ED) *4
|
||||
Plains (8ED) *4
|
||||
Bonesplitter (MRD) *2
|
||||
Vulshok Battlegear (MRD) *1
|
||||
Plains (MRD) *4
|
||||
Plains (MRD) *4
|
||||
Plains (MRD) *4
|
||||
Cranial Plating (5DN) *2
|
||||
Skyhunter Skirmisher (5DN) *2
|
||||
Paradise Mantle (5DN) *2
|
||||
Shuko (BOK) *2
|
||||
Umezawa's Jitte (BOK) *2
|
||||
Kor Duelist (ZEN) *2
|
||||
Spidersilk Net (ZEN) *1
|
||||
Bone Saw (CFX) *2
|
||||
Armament Master (ZEN) *3
|
||||
Lone Missionary (ROE) *2
|
||||
Pennon Blade (ROE) *1
|
||||
Kor Line-Slinger (ROE) *2
|
||||
Kitesail Apprentice (WWK) *2
|
||||
Stoneforge Mystic (WWK) *2
|
||||
Accorder's Shield (SOM) *2
|
||||
Swords to Plowshares (EVT) *2
|
||||
Kor Hookmaster (EVT) *2
|
||||
#NAME:Tergrid Commander
|
||||
#DESC:The Tergrid Commander Deck
|
||||
#DESC:Refined for Wagic by Bob
|
||||
#HINT:castpriority(commander,*)
|
||||
Ancient Tomb (EXP) *1
|
||||
Animate Dead (VMA) *1
|
||||
Arcane Signet (AFC) *1
|
||||
Archon of Cruelty (MH2) *1
|
||||
Barren Moor (C19) *1
|
||||
Blackblade Reforged (SS2) *1
|
||||
Bojuka Bog (C19) *1
|
||||
Braids, Cabal Minion (EMA) *1
|
||||
Butcher of Malakir *1
|
||||
Charcoal Diamond *1
|
||||
Command Beacon (PZ1) *1
|
||||
Commander's Sphere (C19) *1
|
||||
Corrupt *1
|
||||
Crypt Ghast (GTC) *1
|
||||
Damnation (MM3) *1
|
||||
Dreadhorde Invasion (WAR) *1
|
||||
Elvish Doomsayer *1
|
||||
Fell Specter *1
|
||||
Geier Reach Sanitarium (C19) *1
|
||||
Gilded Lotus *1
|
||||
Grave Pact (CMD) *1
|
||||
Gray Merchant of Asphodel *1
|
||||
Hedron Archive (C19) *1
|
||||
Hymn to Tourach *1
|
||||
Hypnotic Specter *1
|
||||
Korlash, Heir to Blackblade *1
|
||||
Leaden Myr *1
|
||||
Lightning Greaves (AFC) *1
|
||||
Liliana of the Dark Realms *1
|
||||
Liliana, Dreadhorde General (WAR) *1
|
||||
Liliana's Triumph (WAR) *1
|
||||
Lotus Petal (MB1) *1
|
||||
Megrim *1
|
||||
Memory Jar (FVR) *1
|
||||
Mind Stone (AFC) *1
|
||||
Mortuary Mire *1
|
||||
Mox Jet *1
|
||||
Necrogen Mists (MRD) *1
|
||||
Night's Whisper (EMA) *1
|
||||
No Mercy (MP2) *1
|
||||
Oppression (7ED) *1
|
||||
Painful Quandary *1
|
||||
Palladium Myr (MB1) *1
|
||||
Phyrexian Arena (TD0) *1
|
||||
Phyrexian Obliterator *1
|
||||
Plaguecrafter (C19) *1
|
||||
Pox (ME1) *1
|
||||
Ravenous Chupacabra (MB1) *1
|
||||
Reliquary Tower (M13) *1
|
||||
Sangromancer (MBS) *1
|
||||
Shadowspear (THB) *1
|
||||
Sheoldred, Whispering One *1
|
||||
Smallpox (M12) *1
|
||||
Sol Ring (C19) *1
|
||||
Solemn Simulacrum (TSR) *1
|
||||
Soul Shatter (ZNR) *1
|
||||
Steel Hellkite (C17) *1
|
||||
Strip Mine (EXP) *1
|
||||
Swamp (2XM) *4
|
||||
Swamp (OTJ) *4
|
||||
Swamp (MKM) *4
|
||||
Swamp (WOE) *4
|
||||
Swamp (LCI) *4
|
||||
Swamp (DSK) *4
|
||||
Swamp (BLB) *3
|
||||
Sword of Feast and Famine (MPS) *1
|
||||
Syr Konrad, the Grim *1
|
||||
Temple of the False God *1
|
||||
The Eldest Reborn *1
|
||||
Thought Vessel (MB1) *1
|
||||
Thoughtseize (2XM) *1
|
||||
Thran Dynamo (C19) *1
|
||||
Tinybones, Trinket Thief (JMP) *1
|
||||
Tourach, Dread Cantor (MH2) *1
|
||||
Urborg, Tomb of Yawgmoth (TSR) *1
|
||||
Whip of Erebos (THS) *1
|
||||
Witch of the Moors (JMP) *1
|
||||
Witch's Cottage (ELD) *1
|
||||
Worn Powerstone (PZ1) *1
|
||||
#CMD:Tergrid, God of Fright (KHM) *1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#NAME:Krenko's Hellrider
|
||||
#NAME:Hellrider
|
||||
#DESC:Standard R Aggro
|
||||
#DESC:ISD-M13-RTR
|
||||
#HINT:combo hold(Hellrider|myhand)^until(creature|mybattlefield)^cast(Hellrider|myhand)^restriction{type(creature|mybattlefield)~morethan~2}^totalmananeeded({2}{R}{R})
|
||||
|
||||
@@ -1,40 +1,81 @@
|
||||
#NAME:Wipe them out!
|
||||
#DESC:Modern RBW Control
|
||||
#HINT:castpriority(enchantment,sorcery,artifact,instant)
|
||||
#HINT:combo hold(Devour Flesh|myhand)^until(creature|opponentbattlefield)^cast(Devour Flesh|myhand)^totalmananeeded({1}{B})
|
||||
#HINT:combo hold(Pyroclasm|myhand)^cast(Pyroclasm|myhand)^restriction{type(creature[toughness<=2]|opponentbattlefield)~morethan~1}~totalmananeeded({1}{R})
|
||||
#HINT:combo hold(Wrath of God|myhand)^cast(Wrath of God|myhand)^restriction{type(creature|opponentbattlefield)~morethan~1}^totalmananeeded({2}{W}{W})
|
||||
#HINT:combo hold(Damnation|myhand)^cast(Damnation|myhand)^restriction{type(creature|opponentbattlefield)~morethan~1}^totalmananeeded({2}{B}{B})
|
||||
#HINT:combo hold(Final Judgment|myhand)^cast(Final Judgment|myhand)^restriction{type(creature|opponentbattlefield)~morethan~1}^totalmananeeded({4}{W}{W})
|
||||
|
||||
#22 spells
|
||||
#8 2-cc
|
||||
Devour Flesh * 4
|
||||
Pyroclasm (M11) * 4
|
||||
#8 4-cc
|
||||
Damnation * 4
|
||||
Wrath of God (10E) * 4
|
||||
#2 6-cc
|
||||
Final Judgment * 2
|
||||
#4 x-cc
|
||||
Black Sun's Zenith * 2
|
||||
Rakdos's Return * 2
|
||||
|
||||
#8 artifacts
|
||||
Elixir of Immortality * 2
|
||||
Staff of Nin * 4
|
||||
Venser's Journal * 2
|
||||
|
||||
#4 enchantments
|
||||
Lightmine Field * 4
|
||||
|
||||
#26 lands
|
||||
Plateau (ME4) * 4
|
||||
Badlands (ME4) * 4
|
||||
Scrubland (ME4) * 4
|
||||
Akoum Refuge * 4
|
||||
Isolated Chapel * 4
|
||||
Clifftop Retreat * 2
|
||||
Urborg, Tomb of Yawgmoth * 1
|
||||
Plains (CHK) * 2
|
||||
Swamp (RTR) * 1
|
||||
#NAME:Belbe Commander
|
||||
#DESC:Deck by apparently (tappedout.net)
|
||||
#DESC:Refined for Wagic by Bob
|
||||
#HINT:castpriority(commander,*)
|
||||
Ancient Stone Idol
|
||||
Apex Devastator
|
||||
Archetype of Endurance
|
||||
Artisan of Kozilek
|
||||
Bane of Bala Ged
|
||||
Beacon of Unrest
|
||||
Bellowing Tanglewurm
|
||||
Cabal Conditioning
|
||||
Caller of the Pack
|
||||
Colossus of Akros
|
||||
Command Tower
|
||||
Conduit of Ruin
|
||||
Copper Myr
|
||||
Court of Ambition
|
||||
Cultivate
|
||||
Dread Defiler
|
||||
Eldrazi Conscription
|
||||
Exsanguinate
|
||||
Farseek
|
||||
Fierce Empath
|
||||
Forest (4ED) *4
|
||||
Forest (NEO) *4
|
||||
Forest (ONE) *4
|
||||
Forest (SNC) *4
|
||||
Garruk's Uprising
|
||||
Gilanra, Caller of Wirewood
|
||||
God-Pharaoh's Statue
|
||||
Grave Betrayal
|
||||
Helm of the Host
|
||||
Hooded Blightfang
|
||||
Horizon Stone
|
||||
In Garruk's Wake
|
||||
Josu Vess, Lich Knight
|
||||
Kodama's Reach (CMD)
|
||||
Leaden Myr
|
||||
Leechridden Swamp
|
||||
Lim-Dul's Hex
|
||||
Loxodon Warhammer (10E)
|
||||
Loyal Subordinate
|
||||
Mardu Shadowspear
|
||||
Mirror Shield
|
||||
Night Market Lookout
|
||||
Oblivion Sower
|
||||
Pathrazer of Ulamog
|
||||
Phyrexian Juggernaut
|
||||
Phyrexian Triniform
|
||||
Plague Spitter
|
||||
Planar Bridge
|
||||
Platinum Emperion
|
||||
Polyraptor
|
||||
Pulse Tracker
|
||||
Rampant Growth
|
||||
Return of the Wildspeaker
|
||||
Sanctum of Stone Fangs
|
||||
Sandstone Oracle
|
||||
Sandwurm Convergence
|
||||
Skull Storm
|
||||
Skyclave Relic
|
||||
Sol Ring
|
||||
Staff of Nin
|
||||
Swamp (ONE) *4
|
||||
Swamp (NEO) *4
|
||||
Swamp (SNC) *4
|
||||
Swamp (4ED) *3
|
||||
The Immortal Sun
|
||||
Thornbow Archer
|
||||
Thought Vessel
|
||||
Three Visits
|
||||
Thunderfoot Baloth
|
||||
Torment of Hailfire
|
||||
Ulamog's Crusher
|
||||
Undergrowth Stadium
|
||||
Urborg, Tomb of Yawgmoth
|
||||
Vicious Conquistador
|
||||
Yavimaya, Cradle of Growth
|
||||
Zendikar Resurgent
|
||||
#CMD:Belbe, Corrupted Observer (*) *1
|
||||
|
||||
@@ -1,27 +1,19 @@
|
||||
#NAME: Kai Buide 1999
|
||||
#DESC: 1999 World Championship Deck
|
||||
#DESC: by Kai Buide
|
||||
Mountain (*) *13
|
||||
Voltaic Key (*) * 4
|
||||
Thran Dynamo (*) * 4
|
||||
Grim Monolith (*) * 4
|
||||
Fire Diamond (*) *4
|
||||
Mishra's Helix (*) *2
|
||||
Worn Powerstone (*) *2
|
||||
City of Traitors (*) *4
|
||||
Wildfire (*) *4
|
||||
Masticore (*) *3
|
||||
Ancient Tomb (*) *3
|
||||
Karn, Silver Golem (*) *1
|
||||
Covetous Dragon (*) *4
|
||||
Earthquake (*) *4
|
||||
Temporal Aperture (*) * 4
|
||||
|
||||
|
||||
#SB: Mishra's Helix (*) *1
|
||||
#SB: Spellshock (*) *4
|
||||
#SB: Boil (*) *2
|
||||
#SB: Phyrexian Processor (*) *1
|
||||
#SB: Cursed Scroll (*) *4
|
||||
#SB: Rack and Ruin (*) *2
|
||||
#SB: Shattering Pulse (*) *2
|
||||
#NAME:Budde's Ponza
|
||||
#DESC:Deck by Kai Budde, 2003
|
||||
Dwarven Blastminer *2
|
||||
Rorix Bladewing *2
|
||||
Siege-Gang Commander *3
|
||||
Hammer of Bogardan *2
|
||||
Lay Waste *4
|
||||
Molten Rain *4
|
||||
Pyrite Spellbomb *4
|
||||
Spark Spray *3
|
||||
Starstorm *4
|
||||
Stone Rain (8ED) *4
|
||||
Talisman of Impulse *4
|
||||
Mountain (8ED) *4
|
||||
Mountain (7ED) *4
|
||||
Mountain (MRD) *4
|
||||
Mountain (ONS) *4
|
||||
Mountain (ODY) *4
|
||||
Forgotten Cave (ONS) *4
|
||||
@@ -1,30 +1,92 @@
|
||||
#NAME:Turbo Stasi
|
||||
#DESC:Black Summer 1996
|
||||
City of Brass (*) *4
|
||||
Island (*) *13
|
||||
Underground River (*) *4
|
||||
Boomerang (*) *4
|
||||
Force of Will (*) *4
|
||||
Recall (*) *2
|
||||
Kismet (*) *2
|
||||
Land Tax (*) *1
|
||||
Stasis (*) *4
|
||||
Despotic Scepter (*) *3
|
||||
Feldon's Cane (*) *2
|
||||
Howling Mine (*) *4
|
||||
Ivory Tower (*) *2
|
||||
Zuran Orb (*) *1
|
||||
Black Vise (*) *2
|
||||
Counterspell (*) *4
|
||||
Adarkar Wastes (*) *4
|
||||
|
||||
#SB: Kismet (*) *1
|
||||
#SB: Wall of Air (*) *2
|
||||
#SB: Arcane Denial (*) *4
|
||||
#SB: Blue Elemental Blast (*) *2
|
||||
#SB: Disenchant (*) *2
|
||||
#SB: Hydroblast (*) *2
|
||||
#SB: Lodestone Bauble (*) *1
|
||||
#SB: Mana Short (*) *3
|
||||
#SB: Swords to Plowshares (*) *1
|
||||
#SB: Lim-Dul's Vault (*) *4
|
||||
#NAME:Bello Commander
|
||||
#DESC:Bloomburrow Precon Deck
|
||||
#DESC:Refined for Wagic by Bob
|
||||
#HINT:castpriority(commander,*)
|
||||
#HINT:alwaysattackwith(creature[Elemental])
|
||||
Abrade (BLC) (*) * 1
|
||||
Arcane Signet (BLC) (*) * 1
|
||||
Beast Within (BLC) (*) * 1
|
||||
Berserkers' Onslaught (BLC) (*) * 1
|
||||
Big Score (BLC) (*) * 1
|
||||
Blasphemous Act (*) * 1
|
||||
Bristling Backwoods (*) * 1
|
||||
Burnished Hart (BLC) (*) * 1
|
||||
Chaos Warp (*) * 1
|
||||
Cinder Glade (BLC) (*) * 1
|
||||
Command Tower (BLC) (*) * 1
|
||||
Copperline Gorge (BLC) (*) * 1
|
||||
Court of Embereth (*) * 1
|
||||
Cultivate (BLC) (*) * 1
|
||||
Decimate (BLC) (*) * 1
|
||||
Domri, Anarch of Bolas (BLC) (*) * 1
|
||||
Esika's Chariot (BLC) (*) * 1
|
||||
Etali, Primal Storm (BLC) (*) * 1
|
||||
Evercoat Ursine (BLC) (*) * 1
|
||||
Evolving Wilds (BLC) (*) * 1
|
||||
Exotic Orchard (BLC) (*) * 1
|
||||
Explore (BLC) (*) * 1
|
||||
Fanatic of Rhonas (*) * 1
|
||||
Farseek (BLC) (*) * 1
|
||||
Fellwar Stone (BLC) (*) * 1
|
||||
Forest (BLB) (*) * 10
|
||||
Forest (MH3) (*) * 4
|
||||
Forest (LCI) (*) * 2
|
||||
Forgotten Cave (BLC) (*) * 1
|
||||
Frontier Warmonger (*) * 1
|
||||
Game Trail (BLC) (*) * 1
|
||||
Garruk's Packleader (BLC) (*) * 1
|
||||
Garruk's Uprising (BLC) (*) * 1
|
||||
Ghalta, Primal Hunger (BLC) (*) * 1
|
||||
Gilded Lotus (BLC) (*) * 1
|
||||
Goblin Anarchomancer (*) * 1
|
||||
Goreclaw, Terror of Qal Sisma (BLC) (*) * 1
|
||||
Grumgully, the Generous (BLC) (*) * 1
|
||||
Gruul Signet (BLC) (*) * 1
|
||||
Gruul Turf (BLC) (*) * 1
|
||||
Gruul War Chant (*() * 1
|
||||
Harmonize (BLC) (*) * 1
|
||||
Hedron Archive (BLC) (*) * 1
|
||||
Kodama of the East Tree (BLC) (*) * 1
|
||||
Kona, Rescue Beastie (*) * 1
|
||||
Llanowar Loamspeaker (BLC) (*) * 1
|
||||
Lotus Cobra (BLC) (*) * 1
|
||||
Mind Stone (BLC) (*) * 1
|
||||
Mossfire Valley (BLC) (*) * 1
|
||||
Mosswort Bridge (BLC) (*) * 1
|
||||
Mountain (BLB) (*) * 4
|
||||
Mountain (MH3) (*) * 4
|
||||
Nature's Will (*) * 1
|
||||
Ohran Frostfang (*) * 1
|
||||
Outpost Siege (BLC) (*) * 1
|
||||
Path of Discovery (BLC) (*) * 1
|
||||
Primeval Bounty (BLC) (*) * 1
|
||||
Prosperous Bandit (BLC) (*) * 1
|
||||
Rampaging Baloths (BLC) (*) * 1
|
||||
Rampant Growth (BLC) (*) * 1
|
||||
Reliquary Tower (BLC) (*) * 1
|
||||
Rolling Hamsphere (BLC) (*) * 1
|
||||
Rootbound Crag (BLC) (*) * 1
|
||||
Rugged Highlands (*) * 1
|
||||
Sakura-Tribe Elder (BLC) (*) * 1
|
||||
Sheltered Thicket (BLC) (*) * 1
|
||||
Sol Ring (BLC) (*) * 1
|
||||
Spine of Ish Sah (BLC) (*) * 1
|
||||
Starstorm (BLC) (*) * 1
|
||||
Street Riot (*) * 1
|
||||
Sunbird's Invocation (BLC) (*) * 1
|
||||
Taiga (*) * 1
|
||||
Talisman of Impulse (BLC) (*) * 1
|
||||
Temple of Abandon (BLC) (*) * 1
|
||||
Tendershoot Dryad (BLC) (*) * 1
|
||||
Terramorphic Expanse (BLC) (*) * 1
|
||||
The Immortal Sun (*) * 1
|
||||
The Shattered States Era (*) * 1
|
||||
Thickest in the Thicket (BLC) (*) * 1
|
||||
Thought Vessel (BLC) (*) * 1
|
||||
Thran Dynamo (BLC) (*) * 1
|
||||
Tranquil Thicket (BLC) (*) * 1
|
||||
Unnatural Growth (BLC) (*) * 1
|
||||
Warstorm Surge (BLC) (*) * 1
|
||||
Wildsear, Scouring Maw (BLC) (*) * 1
|
||||
Wooded Ridgeline (BLC) (*) * 1
|
||||
#CMD:Bello, Bard of the Brambles (*) * 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#NAME: The New Mutatants
|
||||
#NAME:Mutants
|
||||
#DESC: The First Ikoria Mutation Deck
|
||||
Arboreal Grazer (*) *4
|
||||
Pollywog Symbiote (*) *3
|
||||
|
||||
@@ -1,93 +1,28 @@
|
||||
#NAME:Golgari ramp
|
||||
#DESC:The first Commander Format Deck
|
||||
#HINT:castpriority(commander,*)
|
||||
Mardu Shadowspear (*) *1
|
||||
Night Market Lookout (*) *1
|
||||
Pulse Tracker (*) *1
|
||||
Thornbow Archer (*) *1
|
||||
Vicious Conquistador (*) *1
|
||||
Archers' Parapet (*) *1
|
||||
Shepherd of Rot (*) *1
|
||||
Loyal Subordinate (*) *1
|
||||
Crypt Ghast (*) *1
|
||||
Rankle, Master of Pranks (*) *1
|
||||
Spawn of Mayhem (*) *1
|
||||
Twilight Prophet (*) *1
|
||||
Conduit of Ruin (*) *1
|
||||
Duplicant (*) *1
|
||||
Oblivion Sower (*) *1
|
||||
Wurmcoil Engine (*) *1
|
||||
World Breaker (*) *1
|
||||
Platinum Emperion (*) *1
|
||||
Apex Devastator (*) *1
|
||||
Blightsteel Colossus (*) *1
|
||||
Ugin, the Ineffable (*) *1
|
||||
Malakir Rebirth (*) *1
|
||||
Nature's Claim (*) *1
|
||||
Veil of Summer (*) *1
|
||||
Vicious Rumors (*) *1
|
||||
Worldly Tutor (*) *1
|
||||
Assassin's Trophy (*) *1
|
||||
Damnable Pact (*) *1
|
||||
Demonic Tutor (*) *1
|
||||
Exsanguinate (*) *1
|
||||
Farseek (*) *1
|
||||
Heroic Intervention (*) *1
|
||||
Rampant Growth (*) *1
|
||||
Three Visits (*) *1
|
||||
Torment of Hailfire (*) *1
|
||||
Agadeem's Awakening (*) *1
|
||||
Barrier Breach (*) *1
|
||||
Beast Within (*) *1
|
||||
Cultivate (*) *1
|
||||
Grim Tutor (*) *1
|
||||
Kodama's Reach (*) *1
|
||||
Toxic Deluge (*) *1
|
||||
Skyshroud Claim (*) *1
|
||||
Return of the Wildspeaker (*) *1
|
||||
Beseech the Queen (*) *1
|
||||
Turntimber Symbiosis (*) *1
|
||||
Decree of Pain (*) *1
|
||||
In Garruk's Wake (*) *1
|
||||
Sol Ring (*) *1
|
||||
Arcane Signet (*) *1
|
||||
Lightning Greaves (*) *1
|
||||
Swiftfoot Boots (*) *1
|
||||
Talisman of Resilience (*) *1
|
||||
Thought Vessel (*) *1
|
||||
God-Pharaoh's Statue (*) *1
|
||||
Staff of Nin (*) *1
|
||||
The Immortal Sun (*) *1
|
||||
Ward of Bones (*) *1
|
||||
Cryptolith Rite (*) *1
|
||||
Sanctum of Stone Fangs (*) *1
|
||||
Phyrexian Arena (*) *1
|
||||
Retreat to Hagra (*) *1
|
||||
Court of Ambition (*) *1
|
||||
Eldrazi Conscription (*) *1
|
||||
Sandwurm Convergence (*) *1
|
||||
Ancient Tomb (*) *1
|
||||
Blast Zone (*) *1
|
||||
Bojuka Bog (*) *1
|
||||
Cabal Coffers (*) *1
|
||||
Castle Garenbrig (*) *1
|
||||
Castle Locthwain (*) *1
|
||||
Command Tower (*) *1
|
||||
Crawling Barrens (*) *1
|
||||
Forest (*) *7
|
||||
Leechridden Swamp (*) *1
|
||||
Llanowar Wastes (*) *1
|
||||
Nurturing Peatland (*) *1
|
||||
Overgrown Tomb (*) *1
|
||||
Phyrexian Tower (*) *1
|
||||
Prismatic Vista (*) *1
|
||||
Reliquary Tower (*) *1
|
||||
Sanctum of Ugin (*) *1
|
||||
Swamp (*) *5
|
||||
Twilight Mire (*) *1
|
||||
Undergrowth Stadium (*) *1
|
||||
Urborg, Tomb of Yawgmoth (*) *1
|
||||
Verdant Catacombs (*) *1
|
||||
War Room (*) *1
|
||||
Woodland Cemetery (*) *1
|
||||
#CMD:Belbe, Corrupted Observer (*) *1
|
||||
#NAME:Wipe Them Out!
|
||||
#DESC:Modern RBW Control
|
||||
#HINT:castpriority(creature,enchantment,sorcery,artifact)
|
||||
#HINT:combo hold(Cruel Edict|myhand)^until(creature|opponentbattlefield)^cast(Cruel Edict|myhand)^totalmananeeded({1}{B})
|
||||
#HINT:combo hold(Pyroclasm|myhand)^cast(Pyroclasm|myhand)^restriction{type(creature[toughness<=2]|opponentbattlefield)~morethan~1}~totalmananeeded({1}{R})
|
||||
#HINT:combo hold(Wrath of God|myhand)^cast(Wrath of God|myhand)^restriction{type(creature|opponentbattlefield)~morethan~1}^totalmananeeded({2}{W}{W})
|
||||
#HINT:combo hold(Damnation|myhand)^cast(Damnation|myhand)^restriction{type(creature|opponentbattlefield)~morethan~1}^totalmananeeded({2}{B}{B})
|
||||
#HINT:alwaysattackwith(Blightsteel Colossus)
|
||||
Blightsteel Colossus * 2
|
||||
Cruel Edict (10E) * 4
|
||||
Pyroclasm *4
|
||||
Damnation * 4
|
||||
Wrath of God (10E) * 4
|
||||
Black Sun's Zenith * 2
|
||||
Rakdos's Return * 2
|
||||
Elixir of Immortality * 2
|
||||
Staff of Nin * 4
|
||||
Venser's Journal * 2
|
||||
Lightmine Field * 4
|
||||
Plateau (ME4) * 4
|
||||
Badlands (ME4) * 4
|
||||
Scrubland (ME4) * 4
|
||||
Akoum Refuge * 4
|
||||
Isolated Chapel * 4
|
||||
Clifftop Retreat * 2
|
||||
Urborg, Tomb of Yawgmoth * 1
|
||||
Plains (CHK) * 2
|
||||
Swamp (RTR) * 1
|
||||
|
||||
@@ -1,90 +1,82 @@
|
||||
#NAME:Omnath Commander
|
||||
#DESC:The Budget league Omnath Deck
|
||||
#DESC:Deck concept by HurricaneHands
|
||||
#DESC:(tappedout.net)
|
||||
#DESC:Refined for Wagic by Bob
|
||||
#HINT:castpriority(commander,*)
|
||||
Smokebraider (*) *1
|
||||
Cloudkin Seer (*) *1
|
||||
Flickerwisp (*) *1
|
||||
Kazandu Mammoth (*) *1
|
||||
Risen Reef (*) *1
|
||||
Soulherder (*) *1
|
||||
Springbloom Druid (*) *1
|
||||
Angel of Finality (*) *1
|
||||
Archaeomancer (*) *1
|
||||
Emeria Angel (*) *1
|
||||
Felidar Guardian (*) *1
|
||||
Mina and Denn, Wildborn (*) *1
|
||||
Slithermuse (*) *1
|
||||
Acidic Slime (*) *1
|
||||
Cataclysmic Gearhulk (*) *1
|
||||
Cavalier of Thorns (*) *1
|
||||
Mnemonic Wall (*) *1
|
||||
Mulldrifter (*) *1
|
||||
Yorion, Sky Nomad (*) *1
|
||||
Multani, Yavimaya's Avatar (*) *1
|
||||
Phylath, World Sculptor (*) *1
|
||||
Rampaging Baloths (*) *1
|
||||
Omnath, Locus of Rage (*) *1
|
||||
Ephemerate (*) *1
|
||||
Gelatinous Genesis (*) *1
|
||||
Path to Exile (*) *1
|
||||
Spikefield Hazard (*) *1
|
||||
Wildest Dreams (*) *1
|
||||
Disdainful Stroke (*) *1
|
||||
Growth Spiral (*) *1
|
||||
Reap the Past (*) *1
|
||||
Sejiri Shelter (*) *1
|
||||
Starstorm (*) *1
|
||||
Eerie Interlude (*) *1
|
||||
Far Wanderings (*) *1
|
||||
Ghostly Flicker (*) *1
|
||||
Harrow (*) *1
|
||||
Release to the Wind (*) *1
|
||||
Roiling Regrowth (*) *1
|
||||
Silundi Vision (*) *1
|
||||
Whirlwind Denial (*) *1
|
||||
Circuitous Route (*) *1
|
||||
Crush Contraband (*) *1
|
||||
Fact or Fiction (*) *1
|
||||
Summary Dismissal (*) *1
|
||||
Sylvan Reclamation (*) *1
|
||||
Time Wipe (*) *1
|
||||
Tragic Arrogance (*) *1
|
||||
Urban Evolution (*) *1
|
||||
Austere Command (*) *1
|
||||
Hour of Revelation (*) *1
|
||||
Nissa's Renewal (*) *1
|
||||
Sublime Epiphany (*) *1
|
||||
Ondu Inversion (*) *1
|
||||
Khalni Heart Expedition (*) *1
|
||||
Rites of Flourishing (*) *1
|
||||
Court of Bounty (*) *1
|
||||
Felidar Retreat (*) *1
|
||||
Retreat to Emeria (*) *1
|
||||
Wilderness Reclamation (*) *1
|
||||
Zendikar's Roil (*) *1
|
||||
Blighted Woodland (*) *1
|
||||
Command Tower (*) *1
|
||||
Evolving Wilds (*) *1
|
||||
Exotic Orchard (*) *1
|
||||
Field of Ruin (*) *1
|
||||
Forest (*) *7
|
||||
Frontier Bivouac (*) *1
|
||||
Gruul Guildgate (*) *1
|
||||
Gruul Turf (*) *1
|
||||
Island (*) *3
|
||||
Jungle Shrine (*) *1
|
||||
Krosan Verge (*) *1
|
||||
Mountain (*) *4
|
||||
Myriad Landscape (*) *1
|
||||
Mystic Monastery (*) *1
|
||||
Naya Panorama (*) *1
|
||||
Path of Ancestry (*) *1
|
||||
Plains (*) *4
|
||||
Scavenger Grounds (*) *1
|
||||
Seaside Citadel (*) *1
|
||||
Selesnya Guildgate (*) *1
|
||||
Selesnya Sanctuary (*) *1
|
||||
Simic Growth Chamber (*) *1
|
||||
Simic Guildgate (*) *1
|
||||
Terramorphic Expanse (*) *1
|
||||
#CMD:Omnath, Locus of Creation (*) *1
|
||||
Ancient Greenwarden
|
||||
Avenger of Zendikar
|
||||
Azusa, Lost but Seeking
|
||||
Blighted Woodland
|
||||
Cinder Glade
|
||||
Circuitous Route
|
||||
Command Tower
|
||||
Commander's Sphere
|
||||
Court of Bounty
|
||||
Courser of Kruphix
|
||||
Crash of Rhino Beetles
|
||||
Crucible of Worlds
|
||||
Cultivate
|
||||
Doubling Season
|
||||
Dragonmaster Outcast
|
||||
Elvish Reclaimer
|
||||
Evolving Wilds
|
||||
Explore
|
||||
Farseek
|
||||
Far Wanderings
|
||||
Feed the Clan
|
||||
Fiery Emancipation
|
||||
Forest (ZEN) *4
|
||||
Forest (ONE) *4
|
||||
Forest (NEO) *4
|
||||
Forest (SNC) *4
|
||||
Forest (M10) *4
|
||||
Forest
|
||||
Gaea's Revenge
|
||||
Gruul Guildgate
|
||||
Harrow
|
||||
Incandescent Soulstoke
|
||||
Khalni Heart Expedition
|
||||
Liege of the Tangle
|
||||
Lotus Cobra
|
||||
Mina and Denn, Wildborn
|
||||
Mountain (ONE) *4
|
||||
Mountain (NEO) *4
|
||||
Mountain *4
|
||||
Multani, Yavimaya's Avatar
|
||||
Myriad Landscape
|
||||
Naturalize (8ED)
|
||||
Nissa's Renewal
|
||||
Nissa, Vastwood Seer
|
||||
Nissa, Worldwaker
|
||||
Nissa's Zendikon
|
||||
Nyxbloom Ancient
|
||||
Phylath, World Sculpture
|
||||
Phytotitan
|
||||
Radha, Heart of Keld
|
||||
Rampaging Baloths
|
||||
Rampant Growth
|
||||
Ranger's Path
|
||||
Rhythm of the Wild
|
||||
Rites of Flourishing
|
||||
Roiling Regrowth
|
||||
Rootbound Crag
|
||||
Rubblehulk
|
||||
Sarkhan's Unsealing
|
||||
Scute Mob
|
||||
Scute Swarm
|
||||
Second Harvest
|
||||
Skyshroud Claim
|
||||
Sol Ring
|
||||
Temple of Abandon
|
||||
Terramorphic Expanse
|
||||
Terror of the Peaks
|
||||
Thicket Crasher
|
||||
Tornado Elemental
|
||||
Undergrowth Champion
|
||||
Vandalblast
|
||||
Warstorm Surge
|
||||
Where Ancients Tread
|
||||
Wooded Foothills
|
||||
Zendikar Incarnate
|
||||
Zendikar's Roil
|
||||
#CMD:Omnath, Locus of Rage (*) *1
|
||||
|
||||
@@ -1,103 +1,87 @@
|
||||
#NAME:Scion Of The Ur-Dragon
|
||||
#DESC:The Scion Commander Deck
|
||||
#NAME:Lyra Commander
|
||||
#DESC:Deck by guitrunks01
|
||||
#DESC:(archidekt.com)
|
||||
#DESC:Refined for Wagic by Bob
|
||||
#HINT:castpriority(commander,*)
|
||||
Aggravated Assault (*) * 1
|
||||
Ancient Tomb (*) * 1
|
||||
Arcane Signet (*) * 1
|
||||
Arid Mesa (*) * 1
|
||||
Atarka, World Render (*) * 1
|
||||
Balefire Dragon (*) * 1
|
||||
Bladewing the Risen (*) * 1
|
||||
Blood Crypt (*) * 1
|
||||
Bloom Tender (*) * 1
|
||||
Breeding Pool (*) * 1
|
||||
Cascading Cataracts (*) * 1
|
||||
Cavern of Souls (*) * 1
|
||||
Chromatic Lantern (*) * 1
|
||||
Chromatic Orrery (*) * 1
|
||||
Chrome Mox (*) * 1
|
||||
Coalition Relic (*) * 1
|
||||
Command Beacon (*) * 1
|
||||
#HINT:combo hold(Mass Calcify|myhand)^cast(Mass Calcify|myhand)^restriction{type(creature|opponentbattlefield)~morethan~2}^totalmananeeded({2}{W}{W})
|
||||
#HINT:combo hold(Blinding Light|myhand)^cast(Blinding Light|myhand)^restriction{type(creature|opponentbattlefield)~morethan~2}^totalmananeeded({3}{W}{W})
|
||||
Always Watching (*) * 1
|
||||
Akroma's Memorial (m13) (*) * 1
|
||||
Akroma, Angel of Wrath (c20) (*) * 1
|
||||
Angel of Finality (moc) (*) * 1
|
||||
Angel of Invention (kld) (*) * 1
|
||||
Angel of Jubilation (avr) (*) * 1
|
||||
Angel of Serenity (c21) (*) * 1
|
||||
Angel of the Dire Hour (plst) (*) * 1
|
||||
Angel of the Ruins (c21) (*) * 1
|
||||
Angelic Accord (plst) (*) * 1
|
||||
Angelic Arbiter (m11) (*) * 1
|
||||
Angelic Field Marshal (*) * 1
|
||||
Arcane Signet (blc) (*) * 1
|
||||
Avacyn, Angel of Hope (cmm) (*) * 1
|
||||
Baneslayer Angel (m21) (*) * 1
|
||||
Bishop of Wings (plst) (*) * 1
|
||||
Blinding Light (*) * 1
|
||||
Boon-Bringer Valkyrie (mom) (*) * 1
|
||||
Burnished Hart (dsc) (*) * 1
|
||||
Command Tower (*) * 1
|
||||
Crux of Fate (*) * 1
|
||||
Crystal Quarry (*) * 1
|
||||
Curiosity (*) * 1
|
||||
Cyclonic Rift (*) * 1
|
||||
Debtors' Knell (*) * 1
|
||||
Defense of the Heart (*) * 1
|
||||
Demonic Tutor (*) * 1
|
||||
Dragonlord Silumgar (*) * 1
|
||||
Drakuseth, Maw of Flames (*) * 1
|
||||
Faeburrow Elder (*) * 1
|
||||
Farseek (*) * 1
|
||||
Fearsome Awakening (*) * 1
|
||||
Flooded Strand (*) * 1
|
||||
Force of Will (*) * 1
|
||||
Godless Shrine (*) * 1
|
||||
Greater Good (*) * 1
|
||||
Grim Tutor (*) * 1
|
||||
Hallowed Fountain (*) * 1
|
||||
Haven of the Spirit Dragon (*) * 1
|
||||
Hellkite Charger (*) * 1
|
||||
Hellkite Tyrant (*) * 1
|
||||
Indatha Triome (*) * 1
|
||||
Karrthus, Tyrant of Jund (*) * 1
|
||||
Keiga, the Tide Star (*) * 1
|
||||
Ketria Triome (*) * 1
|
||||
Kokusho, the Evening Star (*) * 1
|
||||
Lightning Greaves (*) * 1
|
||||
Living Death (*) * 1
|
||||
Lotus Petal (*) * 1
|
||||
Malfegor (*) * 1
|
||||
Mana Confluence (*) * 1
|
||||
Mana Crypt (*) * 1
|
||||
Mana Drain (*) * 1
|
||||
Marsh Flats (*) * 1
|
||||
Misty Rainforest (*) * 1
|
||||
Moltensteel Dragon (*) * 1
|
||||
Mox Amber (*) * 1
|
||||
Mox Diamond (*) * 1
|
||||
Mox Opal (*) * 1
|
||||
Mox Tantalite (*) * 1
|
||||
Nicol Bolas (*) * 1
|
||||
Niv-Mizzet, the Firemind (*) * 1
|
||||
Overgrown Tomb (*) * 1
|
||||
Path of Ancestry (*) * 1
|
||||
Polluted Delta (*) * 1
|
||||
Prismatic Geoscope (*) * 1
|
||||
Raugrin Triome (*) * 1
|
||||
Sacred Foundry (*) * 1
|
||||
Savage Ventmaw (*) * 1
|
||||
Savai Triome (*) * 1
|
||||
Scalding Tarn (*) * 1
|
||||
Sensei's Divining Top (*) * 1
|
||||
Silumgar, the Drifting Death (*) * 1
|
||||
Skithiryx, the Blight Dragon (*) * 1
|
||||
Skyclave Relic (*) * 1
|
||||
Skyshroud Claim (*) * 1
|
||||
Sneak Attack (*) * 1
|
||||
Sol Ring (*) * 1
|
||||
Spoils of Victory (*) * 1
|
||||
Steam Vents (*) * 1
|
||||
Stomping Ground (*) * 1
|
||||
Swiftfoot Boots (*) * 1
|
||||
Sword of Feast and Famine (*) * 1
|
||||
Sylvan Library (*) * 1
|
||||
Temple Garden (*) * 1
|
||||
Temur Ascendancy (*) * 1
|
||||
Teneb, the Harvester (*) * 1
|
||||
Terror of the Peaks (*) * 1
|
||||
The Ur-Dragon (*) * 1
|
||||
Three Visits (*) * 1
|
||||
Unburial Rites (*) * 1
|
||||
Utvara Hellkite (*) * 1
|
||||
Vaevictis Asmadi, the Dire (*) * 1
|
||||
Vampiric Tutor (*) * 1
|
||||
Verdant Catacombs (*) * 1
|
||||
Watery Grave (*) * 1
|
||||
Wheel of Sun and Moon (*) * 1
|
||||
Windswept Heath (*) * 1
|
||||
Wooded Foothills (*) * 1
|
||||
Yosei, the Morning Star (*) * 1
|
||||
Zagoth Triome (*) * 1
|
||||
#CMD:Scion of the Ur-Dragon (*) * 1
|
||||
Cosmos Elixir (khm) (*) * 1
|
||||
Court of Grace (*) * 1
|
||||
Crush Contraband (scd) (*) * 1
|
||||
Darksteel Citadel (c18) (*) * 1
|
||||
Divine Sacrament (*) * 1
|
||||
Emeria Shepherd (znc) (*) * 1
|
||||
Emeria, the Sky Ruin (plst) (*) * 1
|
||||
Endless Atlas (cmm) (*) * 1
|
||||
Entreat the Angels (avr) (*) * 1
|
||||
Firemane Commando (moc) (*) * 1
|
||||
Generous Gift (*) * 1
|
||||
Ghostly Prison (*) * 1
|
||||
Herald of War (mic) (*) * 1
|
||||
Inspiring Overseer (blc) (*) * 1
|
||||
Karmic Guide (ulg) (*) * 1
|
||||
Lightning Greaves (m3c) (*) * 1
|
||||
Linvala, Keeper of Silence (*) * 1
|
||||
Luminarch Ascension (a25) (*) * 1
|
||||
Marble Diamond (*) * 1
|
||||
Mass Calcify (m15) (*) * 1
|
||||
Minas Tirith (ltr) (*) * 1
|
||||
Path to Exile (pf20) (*) * 1
|
||||
Plains (bro) (*) * 4
|
||||
Plains (woe) (*) * 4
|
||||
Plains (dsk) (*) * 4
|
||||
Plains (lci) (*) * 4
|
||||
Plains (mkm) (*) * 4
|
||||
Plains (blb) (*) * 3
|
||||
Platinum Angel (plst) (*) * 1
|
||||
Pristine Talisman (*) * 1
|
||||
Quicksilver Amulet (brr) (*) * 1
|
||||
Radiant Fountain (*) * 1
|
||||
Rebuff the Wicked (tsr) (*) * 1
|
||||
Revitalize (*) * 1
|
||||
Righteous Valkyrie (khm) (*) * 1
|
||||
Segovian Angel (plst) (*) * 1
|
||||
Sephara, Sky's Blade (cmm) (*) * 1
|
||||
Seraph Sanctuary (*) * 1
|
||||
Serra Angel (*) * 1
|
||||
Serra Ascendant (*) * 1
|
||||
Serra Avenger (*) * 1
|
||||
Serra the Benevolent (mh1) (*) * 1
|
||||
Shadowspear (plst) (*) * 1
|
||||
Sigarda's Splendor (mid) (*) * 1
|
||||
Silence (m14) (*) * 1
|
||||
Sol Ring (m3c) (*) * 1
|
||||
Solemn Simulacrum (dsc) (*) * 1
|
||||
Snow-Covered Plains (mh1) (*) * 4
|
||||
Starnheim Aspirant (j22) (*) * 1
|
||||
Steel Seraph (bro) (*) * 1
|
||||
Swiftfoot Boots (blc) (*) * 1
|
||||
Swords to Plowshares (cns) (*) * 1
|
||||
Test of Endurance (*) * 1
|
||||
The Book of Exalted Deeds (afr) (*) * 1
|
||||
Thraben Watcher (mh2) (*) * 1
|
||||
Thran Dynamo (uds) (*) * 1
|
||||
Valkyrie Harbinger (j22) (*) * 1
|
||||
Worn Powerstone (*) * 1
|
||||
Youthful Valkyrie (fdn) (*) * 1
|
||||
#CMD:Lyra Dawnbringer (dmr) (*) * 1
|
||||
|
||||
@@ -1,79 +1,23 @@
|
||||
#NAME:Phantom Premonition
|
||||
#HINT:castpriority(commander,*)
|
||||
Angel of Finality (*) * 1
|
||||
Angel of Serenity (*) * 1
|
||||
Arcane Artisan (*) * 1
|
||||
Arcane Signet (*) * 1
|
||||
Azorius Chancery (*) * 1
|
||||
Azorius Guildgate (*) * 1
|
||||
Azorius Signet (*) * 1
|
||||
Banishing Light (*) * 1
|
||||
Behold the Multiverse (*) * 1
|
||||
Brago, King Eternal (*) * 1
|
||||
Burnished Hart (*) * 1
|
||||
Cleansing Nova (*) * 1
|
||||
Cloudblazer (*) * 1
|
||||
Cloudgoat Ranger (*) * 1
|
||||
Command Tower (*) * 1
|
||||
Commander's Sphere (*) * 1
|
||||
Cosmic Intervention (*) * 1
|
||||
Cryptic Caves (*) * 1
|
||||
Curse of the Swine (*) * 1
|
||||
Day of the Dragons (*) * 1
|
||||
Eerie Interlude (*) * 1
|
||||
Empyrean Eagle (*) * 1
|
||||
Ethereal Valkyrie (*) * 1
|
||||
Evangel of Heliod (*) * 1
|
||||
Flickerwisp (*) * 1
|
||||
Gates of Istfell (*) * 1
|
||||
Geist-Honored Monk (*) * 1
|
||||
Ghostly Flicker (*) * 1
|
||||
Ghostly Prison (*) * 1
|
||||
Glacial Floodplain (*) * 1
|
||||
Goldnight Commander (*) * 1
|
||||
Hero of Bretagard (*) * 1
|
||||
Inspired Sphinx (*) * 1
|
||||
Iron Verdict (*) * 1
|
||||
Island (*) * 12
|
||||
Kor Cartographer (*) * 1
|
||||
Marble Diamond (*) * 1
|
||||
Marshal's Anthem (*) * 1
|
||||
Meandering River (*) * 1
|
||||
Meteor Golem (*) * 1
|
||||
Migratory Route (*) * 1
|
||||
Mind Stone (*) * 1
|
||||
Mist Raven (*) * 1
|
||||
Mistmeadow Witch (*) * 1
|
||||
Momentary Blink (*) * 1
|
||||
Mulldrifter (*) * 1
|
||||
Myriad Landscape (*) * 1
|
||||
Niko Defies Destiny (*) * 1
|
||||
Opal Palace (*) * 1
|
||||
Plains (*) * 13
|
||||
Ravenform (*) * 1
|
||||
Replicating Ring (*) * 1
|
||||
Restoration Angel (*) * 1
|
||||
Return to Dust (*) * 1
|
||||
Sage of the Beyond (*) * 1
|
||||
Saw It Coming (*) * 1
|
||||
Sea Gate Oracle (*) * 1
|
||||
Sejiri Refuge (*) * 1
|
||||
Sky Diamond (*) * 1
|
||||
Sol Ring (*) * 1
|
||||
Soulherder (*) * 1
|
||||
Spectral Deluge (*) * 1
|
||||
Stoic Farmer (*) * 1
|
||||
Storm Herd (*) * 1
|
||||
Sun Titan (*) * 1
|
||||
Surtland Elementalist (*) * 1
|
||||
Swiftfoot Boots (*) * 1
|
||||
Synthetic Destiny (*) * 1
|
||||
Tales of the Ancestors (*) * 1
|
||||
Thunderclap Wyvern (*) * 1
|
||||
Tranquil Cove (*) * 1
|
||||
Vega, the Watcher (*) * 1
|
||||
Wall of Omens (*) * 1
|
||||
Warhorn Blast (*) * 1
|
||||
Whirler Rogue (*) * 1
|
||||
Windfall (*) * 1
|
||||
#CMD:Ranar the Ever-Watchful (*) * 1
|
||||
#NAME:Ashenmoor
|
||||
#DESC:Deck for Wagic by Bob
|
||||
#HINT:combo hold(Demonic Tutor|myhand)^cast(Demonic Tutor|myhand) targeting(Ashenmoor Liege|mylibrary)^totalmananeeded({1}{B})
|
||||
#HINT:alwaysattackwith(Ashenmoor Gouger)
|
||||
#HINT:dontblockwith(Ashenmoor Liege)
|
||||
Ashenmoor Gouger (*) * 4
|
||||
Ashenmoor Liege (*) * 4
|
||||
Badlands (*) * 4
|
||||
Demonic Tutor (CMM) (*) * 2
|
||||
Dragonskull Summit (*) * 4
|
||||
Emberstrike Duo (*) * 4
|
||||
Footlight Fiend (*) * 4
|
||||
Glass of the Guildpact (*) * 4
|
||||
Goblin Outlander (*) * 2
|
||||
Mountain (DSK) (*) * 4
|
||||
Mountain (MKM) (*) * 2
|
||||
Rakdos Cackler (*) * 4
|
||||
Rakdos Shred-Freak (*) * 4
|
||||
Shivan Zombie (*) * 2
|
||||
Spike Jester (*) * 4
|
||||
Swamp (DSK) (*) * 4
|
||||
Swamp (MKM) (*) * 2
|
||||
Terminate (2X2) (*) * 2
|
||||
|
||||
@@ -1,81 +1,22 @@
|
||||
#NAME:Draconic Rage
|
||||
#DESC:The First D&D Deck
|
||||
#HINT:castpriority(commander,*)
|
||||
Bogardan Hellkite (*) *1
|
||||
Demanding Dragon (*) *1
|
||||
Dragonmaster Outcast (*) *1
|
||||
Hoard-Smelter Dragon (*) *1
|
||||
Opportunistic Dragon (*) *1
|
||||
Scourge of Valkas (*) *1
|
||||
Shivan Hellkite (*) *1
|
||||
Skyline Despot (*) *1
|
||||
Skyship Stalker (*) *1
|
||||
Taurean Mauler (*) *1
|
||||
Terror of Mount Velus (*) *1
|
||||
Thunderbreak Regent (*) *1
|
||||
Chameleon Colossus (*) *1
|
||||
Atarka, World Render (*) *1
|
||||
Earth-Cult Elemental (*) *1
|
||||
Anger (*) *1
|
||||
Dragonlord's Servant (*) *1
|
||||
Savage Ventmaw (*) *1
|
||||
Dragonspeaker Shaman (*) *1
|
||||
Chain Reaction (*) *1
|
||||
Rishkar's Expertise (*) *1
|
||||
Shamanic Revelation (*) *1
|
||||
Rile (*) *1
|
||||
Cultivate (*) *1
|
||||
Explore (*) *1
|
||||
Rampant Growth (*) *1
|
||||
Magmaquake (*) *1
|
||||
Spit Flame (*) *1
|
||||
Decree of Savagery (*) *1
|
||||
Kindred Summons (*) *1
|
||||
Return of the Wildspeaker (*) *1
|
||||
Beast Within (*) *1
|
||||
Return to Nature (*) *1
|
||||
Dragon's Hoard (*) *1
|
||||
Arcane Signet (*) *1
|
||||
Commander's Sphere (*) *1
|
||||
Gruul Signet (*) *1
|
||||
Heirloom Blade (*) *1
|
||||
Sol Ring (*) *1
|
||||
Gratuitous Violence (*) *1
|
||||
Outpost Siege (*) *1
|
||||
Warstorm Surge (*) *1
|
||||
Barbarian Class (*) *1
|
||||
Colossal Majesty (*) *1
|
||||
Garruk's Uprising (*) *1
|
||||
Cinder Glade (*) *1
|
||||
Crucible of the Spirit Dragon (*) *1
|
||||
Exotic Orchard (*) *1
|
||||
Game Trail (*) *1
|
||||
Haven of the Spirit Dragon (*) *1
|
||||
Mossfire Valley (*) *1
|
||||
Mosswort Bridge (*) *1
|
||||
Command Tower (*) *1
|
||||
Desert (*) *1
|
||||
Gruul Turf (*) *1
|
||||
Path of Ancestry (*) *1
|
||||
Mountain (*) *12
|
||||
Forest (*) *15
|
||||
Klauth, Unrivaled Ancient (*) *1
|
||||
Berserker's Frenzy (*) *1
|
||||
Chaos Dragon (*) *1
|
||||
Maddening Hex (*) *1
|
||||
Vengeful Ancestor (*) *1
|
||||
Bag of Tricks (*) *1
|
||||
Druid of Purification (*) *1
|
||||
Indomitable Might (*) *1
|
||||
Neverwinter Hydra (*) *1
|
||||
Wild Endeavor (*) *1
|
||||
Dragonborn Champion (*) *1
|
||||
Klauth's Will (*) *1
|
||||
Wulfgar of Icewind Dale (*) *1
|
||||
Component Pouch (*) *1
|
||||
Sword of Hours (*) *1
|
||||
Underdark Rift (*) *1
|
||||
#CMD:Vrondiss, Rage of Ancients (*) *1
|
||||
#DNG:Tomb of Annihilation (*) *1
|
||||
#DNG:Lost Mine of Phandelver (*) *1
|
||||
#DNG:Dungeon of the Mad Mage (*) *1
|
||||
#NAME:Goblin Spike
|
||||
#DESC:Deck for Wagic by Bob
|
||||
#HINT:castpriority(creature,sorcery)
|
||||
#HINT:combo hold(Lava Spike|myhand)^cast(Lava Spike|myhand)^restriction{turn:5}^totalmananeeded({R})
|
||||
#HINT:combo hold(Goblin War Strike|myhand)^cast(Goblin War Strike|myhand)^restriction{turn:7}^totalmananeeded({R})
|
||||
Foundry Street Denizen (*) * 4
|
||||
Goblin Chieftain (*) * 4
|
||||
Goblin Lackey (*) * 4
|
||||
Goblin Piledriver (*) * 4
|
||||
Goblin Rabblemaster (*) * 4
|
||||
Goblin Ringleader (*) * 2
|
||||
Goblin Warchief (*) * 2
|
||||
Goblin War Strike (*) * 2
|
||||
Lava Spike (*) * 4
|
||||
Legion Loyalist (*) * 4
|
||||
Mountain (OTJ) (*) * 4
|
||||
Mountain (BLB) (*) * 4
|
||||
Mountain (WOE) (*) * 4
|
||||
Mountain (DSK) (*) * 4
|
||||
Mountain (LCI) (*) * 4
|
||||
Mountain (MKM) (*) * 2
|
||||
Muxus, Goblin Grandee (*) * 4
|
||||
|
||||
@@ -1,85 +1,24 @@
|
||||
#NAME:Tergrid Commander
|
||||
#DESC:The Tergrid Commander Deck
|
||||
#HINT:castpriority(commander,*)
|
||||
Mana Crypt (VMA) *1
|
||||
Necrogen Mists (MRD) *1
|
||||
Animate Dead (VMA) *1
|
||||
Recurring Nightmare (VMA) *1
|
||||
Mind Stone (AFC) *1
|
||||
Coldsteel Heart (CSP) *1
|
||||
Steel Hellkite (C17) *1
|
||||
Hedron Archive (C19) *1
|
||||
Prismatic Vista (H1R) *1
|
||||
Blackblade Reforged (SS2) *1
|
||||
Tevesh Szat, Doom of Fools (CMR) *1
|
||||
Thespian's Stage (C19) *1
|
||||
Priest of Forgotten Gods (RNA) *1
|
||||
Duplicant (PZ1) *1
|
||||
Swamp (2XM) *19
|
||||
Strip Mine (EXP) *1
|
||||
Toxic Deluge (PZ1) *1
|
||||
Archon of Cruelty (MH2) *1
|
||||
No Mercy (MP2) *1
|
||||
Whip of Erebos (THS) *1
|
||||
Plaguecrafter (C19) *1
|
||||
Cabal Coffers (MH2) *1
|
||||
Smallpox (M12) *1
|
||||
Geier Reach Sanitarium (C19) *1
|
||||
Pox (ME1) *1
|
||||
Braids, Cabal Minion (EMA) *1
|
||||
Vampiric Tutor (EMA) *1
|
||||
Meteor Golem (C19) *1
|
||||
Phyrexian Reclamation (JMP) *1
|
||||
Damnation (MM3) *1
|
||||
Mana Vault (PUMA) *1
|
||||
Commander's Sphere (C19) *1
|
||||
Liliana's Triumph (WAR) *1
|
||||
Dream Devourer (KHM) *1
|
||||
Homeward Path (PZ1) *1
|
||||
Night's Whisper (EMA) *1
|
||||
Grave Pact (CMD) *1
|
||||
Bojuka Bog (C19) *1
|
||||
Chain of Smog (ONS) *1
|
||||
Village Rites (KHM) *1
|
||||
Memory Jar (FVR) *1
|
||||
Gonti, Lord of Luxury (MB1) *1
|
||||
Tinybones, Trinket Thief (JMP) *1
|
||||
Sol Ring (C19) *1
|
||||
Dreadhorde Invasion (WAR) *1
|
||||
Command Beacon (PZ1) *1
|
||||
Solemn Simulacrum (TSR) *1
|
||||
Barren Moor (C19) *1
|
||||
Lotus Petal (MB1) *1
|
||||
Oppression (7ED) *1
|
||||
Shadowspear (THB) *1
|
||||
Worn Powerstone (PZ1) *1
|
||||
Arcane Signet (AFC) *1
|
||||
Grim Monolith (ULG) *1
|
||||
Lightning Greaves (AFC) *1
|
||||
Dark Ritual (ME4) *1
|
||||
Sanctum of Eternity (C19) *1
|
||||
Tourach, Dread Cantor (MH2) *1
|
||||
Ravenous Chupacabra (MB1) *1
|
||||
Ancient Tomb (EXP) *1
|
||||
Sword of Feast and Famine (MPS) *1
|
||||
Witch of the Moors (JMP) *1
|
||||
Thought Vessel (MB1) *1
|
||||
Urborg, Tomb of Yawgmoth (TSR) *1
|
||||
Thoughtseize (2XM) *1
|
||||
Tyrite Sanctum (KHM) *1
|
||||
Soul Shatter (ZNR) *1
|
||||
Mox Diamond (FVR) *1
|
||||
Thran Dynamo (C19) *1
|
||||
Bloodstained Mire (ONS) *1
|
||||
Sangromancer (MBS) *1
|
||||
Phyrexian Arena (TD0) *1
|
||||
Blast Zone (WAR) *1
|
||||
Rune-Scarred Demon (MB1) *1
|
||||
Demonic Tutor (MB1) *1
|
||||
Polluted Delta (ONS) *1
|
||||
Liliana, Dreadhorde General (WAR) *1
|
||||
Cunning Rhetoric (C21) *1
|
||||
Crypt Ghast (GTC) *1
|
||||
Palladium Myr (MB1) *1
|
||||
Myriad Landscape (C19) *1
|
||||
#CMD:Tergrid, God of Fright (KHM) *1
|
||||
#NAME:Kor Army
|
||||
#DESC:Deck by dr3amsnatcher
|
||||
#DESC:(tappedout.net). Refined
|
||||
#DESC:for Wagic by Bob
|
||||
Argentum Armor (*) * 2
|
||||
Armament Master (*) * 4
|
||||
Bladed Pinions (*) * 2
|
||||
Bone Saw (*) * 4
|
||||
Captain's Claws (*) * 4
|
||||
Cranial Plating (*) * 2
|
||||
Emeria, the Sky Ruin (*) * 1
|
||||
Kabira Crossroads (*) * 2
|
||||
Kitesail Apprentice (*) * 4
|
||||
Kor Duelist (*) * 4
|
||||
Oath of Gideon (*) * 2
|
||||
Plains (ZEN) (*) * 4
|
||||
Plains (BFZ) (*) * 4
|
||||
Plains (M19) (*) * 4
|
||||
Plains (ZNR) (*) * 4
|
||||
Plains (TMP) (*) * 2
|
||||
Stone Haven Outfitter (*) * 4
|
||||
Stone Haven Pilgrim (*) * 2
|
||||
Sword of Vengeance (*) * 3
|
||||
Zamriel, Seraph of Steel (*) * 2
|
||||
|
||||
@@ -1,87 +1,26 @@
|
||||
#NAME:Tatyova Commander
|
||||
#DESC:The Tatiyova Commander Deck
|
||||
#HINT:castpriority(commander,*)
|
||||
Mana Crypt (VMA) *1
|
||||
Allosaurus Shepherd (JMP) *1
|
||||
Rimewood Falls (KHM) *1
|
||||
Explore (C19) *1
|
||||
Rampant Growth (PRM) *1
|
||||
Commit // Memory (MB1) *1
|
||||
Echoing Truth (C19) *1
|
||||
Mystic Sanctuary (ELD) *1
|
||||
Ramunap Excavator (PRM) *1
|
||||
Prismatic Vista (H1R) *1
|
||||
Harmonize (PRM) *1
|
||||
Summer Bloom (POR) *1
|
||||
Mana Reflection (SHM) *1
|
||||
Cyclonic Rift (MM3) *1
|
||||
Upheaval (MH2) *1
|
||||
Wild Growth (AFC) *1
|
||||
Narset, Parter of Veils (WAR) *1
|
||||
Timetwister (PRM) *1
|
||||
Thrasios, Triton Hero (PZ2) *1
|
||||
Strip Mine (EXP) *1
|
||||
Tropical Island (ME4) *1
|
||||
Avenger of Zendikar (PRM) *1
|
||||
Harrow (MB1) *1
|
||||
Kodama's Reach (C17) *1
|
||||
Fastbond (VMA) *1
|
||||
Crucible of Worlds (PRM) *1
|
||||
Force of Will (EMA) *1
|
||||
Broken Bond (MB1) *1
|
||||
Command Tower (C19) *1
|
||||
Sylvan Scrying (MB1) *1
|
||||
Mana Vault (PUMA) *1
|
||||
Jolrael, Mwonvuli Recluse (M21) *1
|
||||
Solemn Simulacrum (MB1) *1
|
||||
Simic Signet (C15) *1
|
||||
Reliquary Tower (C19) *1
|
||||
Genesis Wave (IMA) *1
|
||||
Khalni Garden (PZ1) *1
|
||||
Cultivate (PZ1) *1
|
||||
Yavimaya Elder (UDS) *1
|
||||
Exploration (PRM) *1
|
||||
Sol Ring (C19) *1
|
||||
Koma, Cosmos Serpent (KHM) *1
|
||||
Simic Growth Chamber (C19) *1
|
||||
Command Beacon (PZ1) *1
|
||||
Eternal Witness (PZ1) *1
|
||||
Sylvan Library (PZ1) *1
|
||||
Heroic Intervention (KLR) *1
|
||||
Kinnan, Bonder Prodigy (IKO) *1
|
||||
Lotus Cobra (PRM) *1
|
||||
Island (UNH) *8
|
||||
Archmage's Charm (H1R) *1
|
||||
Dryad Arbor (TSR) *1
|
||||
Finale of Devastation (WAR) *1
|
||||
Arcane Signet (AFC) *1
|
||||
Flooded Grove (EXP) *1
|
||||
Crop Rotation (2XM) *1
|
||||
Forest (2XM) *10
|
||||
Lightning Greaves (AFC) *1
|
||||
Scalding Tarn (MH2) *1
|
||||
Ancient Tomb (EXP) *1
|
||||
Sakura-Tribe Elder (MB1) *1
|
||||
Seedborn Muse (C19) *1
|
||||
Prophet of Kruphix (PRM) *1
|
||||
Misty Rainforest (ZNE) *1
|
||||
Natural Order (EMA) *1
|
||||
Wayfarer's Bauble (C17) *1
|
||||
Tyrite Sanctum (KHM) *1
|
||||
Gaea's Cradle (USG) *1
|
||||
Consecrated Sphinx (MBS) *1
|
||||
Castle Vantress (ELD) *1
|
||||
Mox Diamond (FVR) *1
|
||||
Verdant Catacombs (MH2) *1
|
||||
Primeval Titan (TSR) *1
|
||||
Neoform (WAR) *1
|
||||
Rampaging Baloths (C19) *1
|
||||
Pongify (TSR) *1
|
||||
Flooded Strand (EXP) *1
|
||||
Nyxbloom Ancient (THB) *1
|
||||
Nexus of Fate (M19) *1
|
||||
Polluted Delta (ONS) *1
|
||||
Birds of Paradise (PRM) *1
|
||||
Courser of Kruphix (TSR) *1
|
||||
Search for Tomorrow (MB1) *1
|
||||
#CMD:Tatyova, Benthic Druid (DOM) *1
|
||||
#NAME:Shocking Minotaurs
|
||||
#DESC:Deck for Wagic by Bob
|
||||
#HINT:combo hold(Raise Dead|myhand)^cast(Raise Dead|myhand)^restriction{type(creature[toughness>=2]|mygraveyard)~morethan~0}~totalmananeeded({B})
|
||||
Badlands (*) * 1
|
||||
Blackcleave Cliffs (*) * 2
|
||||
Bloodrage Brawler (*) * 4
|
||||
Dragonskull Summit (*) * 2
|
||||
Fanatic of Mogis (*) * 1
|
||||
Felhide Petrifier (*) * 2
|
||||
Gnarled Scarhide (*) * 2
|
||||
Kragma Warcaller (*) * 4
|
||||
Lightning Bolt (*) * 4
|
||||
Mogis, God of Slaughter (*) * 2
|
||||
Moraug, Fury of Akoum (*) * 1
|
||||
Mountain (DSK) (*) * 4
|
||||
Mountain (MKM) (*) * 3
|
||||
Mountain (WOE) (*) * 4
|
||||
Neheb, the Eternal (*) * 1
|
||||
Neheb, the Worthy (*) * 3
|
||||
Rageblood Shaman (*) * 4
|
||||
Ragemonger (*) * 4
|
||||
Raise Dead (9ED) (*) * 2
|
||||
Shock (*) * 2
|
||||
Swamp (DSK) (*) * 4
|
||||
Swamp (WOE) (*) * 2
|
||||
Terminate (NCC) (*) * 2
|
||||
|
||||
@@ -1,82 +1,27 @@
|
||||
#NAME:Ragavan Commander
|
||||
#DESC:The Ragavan Commander Deck
|
||||
#HINT:castpriority(commander,*)
|
||||
Treasure Nabber (PZ2) *1
|
||||
Dire Fleet Daredevil (AFC) *1
|
||||
Trash for Treasure (C16) *1
|
||||
Tome of Legends (ELD) *1
|
||||
Helm of the Host (DOM) *1
|
||||
Coercive Recruiter (CMR) *1
|
||||
World at War (ROE) *1
|
||||
Commander's Plate (CMR) *1
|
||||
Neheb, the Eternal (AKR) *1
|
||||
Strike It Rich (MH2) *1
|
||||
Audacious Reshapers (C21) *1
|
||||
Shinka, the Bloodsoaked Keep (CHK) *1
|
||||
Inventors' Fair (KLD) *1
|
||||
Strip Mine (EXP) *1
|
||||
Embercleave (ELD) *1
|
||||
Break Through the Line (FRF) *1
|
||||
Valakut, the Molten Pinnacle (ZEN) *1
|
||||
Imperial Recruiter (ME2) *1
|
||||
Tibalt's Trickery (KHM) *1
|
||||
Mogg Salvage (NMS) *1
|
||||
Seize the Day (ODY) *1
|
||||
Mishra's Bauble (MB1) *1
|
||||
Hellkite Tyrant (GTC) *1
|
||||
Goblin Engineer (MH1) *1
|
||||
Aggravated Assault (ONS) *1
|
||||
Xorn (AFR) *1
|
||||
Mana Vault (PUMA) *1
|
||||
Magda, Brazen Outlaw (KHM) *1
|
||||
Sensei's Divining Top (EMA) *1
|
||||
Combat Celebrant (AKR) *1
|
||||
Blood Moon (2XM) *1
|
||||
Access Tunnel (STX) *1
|
||||
Sword of Hearth and Home (MH2) *1
|
||||
Mox Opal (2XM) *1
|
||||
Treasure Vault (AFR) *1
|
||||
Sword of Fire and Ice (2XM) *1
|
||||
Urza's Saga (MH2) *1
|
||||
Jeska's Will (CMR) *1
|
||||
Sol Ring (C19) *1
|
||||
Seize the Spoils (KHM) *1
|
||||
Abrade (PLIST) *1
|
||||
Fury of the Horde (CSP) *1
|
||||
Valakut Awakening (ZNR) *1
|
||||
Mountain (UNH) *20
|
||||
Godo, Bandit Warlord (CHK) *1
|
||||
Mox Amber (DOM) *2
|
||||
Cursed Mirror (C21) *1
|
||||
Price of Glory (ODY) *1
|
||||
Spire of Industry (AER) *1
|
||||
Vandalblast (AFC) *1
|
||||
Ancient Tomb (ZNE) *1
|
||||
Chaos Warp (AFC) *1
|
||||
Mana Confluence (CMR) *1
|
||||
Shatterskull Smashing (ZNR) *1
|
||||
Grim Monolith (ULG) *1
|
||||
Lightning Greaves (MB1) *1
|
||||
Pirate's Pillage (RIX) *1
|
||||
Shattering Spree (MB1) *1
|
||||
Sword of Feast and Famine (MPS) *1
|
||||
Goblin Welder (ULG) *1
|
||||
War's Toll (BBD) *1
|
||||
Wayfarer's Bauble (C17) *1
|
||||
Cathedral of War (M13) *1
|
||||
Sword of Light and Shadow (2XM) *1
|
||||
Underworld Breach (THB) *1
|
||||
Subira, Tulzidi Caravanner (M21) *1
|
||||
Dockside Extortionist (C19) *1
|
||||
Mox Diamond (FVR) *1
|
||||
Bloodstained Mire (ONS) *1
|
||||
Lightning Bolt (ME1) *1
|
||||
City of Brass (ME4) *1
|
||||
Goldspan Dragon (KHM) *1
|
||||
Ruby Medallion (C14) *1
|
||||
Sword of the Animist (AFC) *1
|
||||
Grenzo, Havoc Raiser (PZ2) *2
|
||||
Moraug, Fury of Akoum (ZNR) *1
|
||||
Wheel of Fortune (VMA) *1
|
||||
Port Razer (CMR) *1
|
||||
#CMD:Ragavan, Nimble Pilferer (MH2) *1
|
||||
#NAME:Rising Panic
|
||||
#DESC: Deck for Wagic by Bob
|
||||
#HINT:castpriority(artifact,instant,enchantment)
|
||||
#HINT:combo hold(Rising Waters|myhand)^cast(Rising Waters|myhand)^restriction{type(Rising Waters|mybattlefield)~lessthan~1}^totalmananeeded({3}{U})
|
||||
#HINT:combo hold(Dictate of Kruphix|myhand)^cast(Dictate of Kruphix|myhand)^restriction{type(Dictate of Kruphix|mybattlefield)~lessthan~1}^totalmananeeded({1}{U}{U})
|
||||
#HINT:combo hold(Frozen Aether|myhand)^cast(Frozen Aether|myhand)^restriction{type(Frozen Aether|mybattlefield)~lessthan~1}^totalmananeeded({3}{U})
|
||||
#HINT:combo hold(Propaganda|myhand)^cast(Propaganda|myhand)^restriction{type(Propaganda|mybattlefield)~lessthan~1}^totalmananeeded({2}{U})
|
||||
#HINT:combo hold(Overburden|myhand)^cast(Overburden|myhand)^restriction{type(Overburden|mybattlefield)~lessthan~1}^totalmananeeded({1}{U})
|
||||
#HINT:combo hold(Dream Tides|myhand)^cast(Dream Tides|myhand)^restriction{type(Dream Tides|mybattlefield)~lessthan~1}^totalmananeeded({1}{U})
|
||||
Anvil of Bogardan (*) * 2
|
||||
Black Vise (*) * 4
|
||||
Dictate of Kruphix (*) * 3
|
||||
Dream Tides (*) * 3
|
||||
Ebony Owl Netsuke (*) * 2
|
||||
Force of Will (*) * 4
|
||||
Frozen Aether (*) * 3
|
||||
Howling Mine (*) * 4
|
||||
Iron Maiden (*) * 2
|
||||
Island (4ED) (*) * 4
|
||||
Island (M10) (*) * 4
|
||||
Island (ICE) (*) * 4
|
||||
Island (M20) (*) * 4
|
||||
Island (MIR) (*) * 4
|
||||
Island (REV) (*) * 3
|
||||
Overburden (*) * 3
|
||||
Propaganda (*) * 3
|
||||
Rising Waters (*) * 4
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#DESC:Original Deck by ashby4 (tappedout.net),
|
||||
#DESC:refined for Wagic by Bob
|
||||
#HINT:castpriority(commander,*)
|
||||
Adarkar Wastes (*) * 1
|
||||
Akroma's Will (*) * 1
|
||||
Arcane Signet (*) * 1
|
||||
Assault Formation (*) * 1
|
||||
@@ -22,10 +21,9 @@ Crashing Drawbridge (*) * 1
|
||||
Dismantling Wave (*) * 1
|
||||
Drift of Phantasms (*) * 1
|
||||
Dusk // Dawn (*) * 1
|
||||
Edge of Autumn (*) * 1
|
||||
Farseek (*) * 1
|
||||
Fell the Mighty (*) * 1
|
||||
Forest (*) * 6
|
||||
Forest (*) * 4
|
||||
Fortified Rampart (*) * 1
|
||||
Fortified Village (*) * 1
|
||||
Glacial Fortress (*) * 1
|
||||
@@ -38,6 +36,7 @@ Irrigated Farmland (*) * 1
|
||||
Island (*) * 2
|
||||
Jeskai Barricade (*) * 1
|
||||
Jungle Barrier (*) * 1
|
||||
Last March of the Ents (*) *1
|
||||
Leyline of Vitality (*) * 1
|
||||
Lightning Greaves (MPS) (*) * 1
|
||||
Lumithread Field (*) * 1
|
||||
@@ -48,7 +47,7 @@ Noetic Scales (*) * 1
|
||||
Oathsworn Giant (*) * 1
|
||||
Overgrown Battlement (*) * 1
|
||||
Perimeter Captain (*) * 1
|
||||
Plains (*) * 5
|
||||
Plains (*) * 4
|
||||
Port Town (*) * 1
|
||||
Prairie Stream (*) * 1
|
||||
Rejuvenating Springs (*) * 1
|
||||
@@ -96,4 +95,4 @@ Wall of Stolen Identity (*) * 1
|
||||
Wall of Tanglecord (*) * 1
|
||||
Wave of Reckoning (*) * 1
|
||||
Yavimaya Coast (*) * 1
|
||||
#CMD:Arcades, the Strategist (*) * 1
|
||||
#CMD:Arcades, the Strategist (*) * 1
|
||||
|
||||
@@ -13,7 +13,6 @@ Boggart Shenanigans (*) * 1
|
||||
Chancellor of the Forge (*) * 1
|
||||
Coat of Arms (*) * 1
|
||||
Dragon Fodder (ALA) (*) * 1
|
||||
Fervor (*) * 1
|
||||
Flamekin Village (*) * 1
|
||||
Foundry Street Denizen (*) * 1
|
||||
Goblin Assassin (*) * 1
|
||||
@@ -38,50 +37,99 @@ Goblin Warchief (*) * 1
|
||||
Goblin Wardriver (*) * 1
|
||||
Goblin War Drums (*) * 1
|
||||
Goblin Wizard (*) * 1
|
||||
|
||||
Homeward Path (*) * 1
|
||||
|
||||
Horde of Boggarts (*) * 1
|
||||
|
||||
Hordeling Outburst (*) * 1
|
||||
|
||||
Impact Tremors (*) * 1
|
||||
|
||||
Intimidator Initiate (*) * 1
|
||||
|
||||
Krenko's Enforcer (*) * 1
|
||||
|
||||
Krenko's Command (*) * 1
|
||||
|
||||
Krenko, Tin Street Kingpin (*) * 1
|
||||
|
||||
Legion Loyalist (*) * 1
|
||||
|
||||
Legion Warboss (*) * 1
|
||||
|
||||
Lightning Greaves (MRD) (*) * 1
|
||||
|
||||
Madblind Mountain (*) * 1
|
||||
|
||||
Mask of Avacyn (*) * 1
|
||||
|
||||
Mob Justice (*) * 1
|
||||
|
||||
Mogg Alarm (*) * 1
|
||||
|
||||
Mogg Flunkies (*) * 1
|
||||
|
||||
Mogg Maniac (*) * 1
|
||||
|
||||
Mogg Raider (*) * 1
|
||||
|
||||
Moggcatcher (*) * 1
|
||||
|
||||
Mons's Goblin Raiders (*) * 1
|
||||
|
||||
Mountain (4ED) (*) * 4
|
||||
|
||||
Mountain (M10) (*) * 4
|
||||
|
||||
Mountain (ICE) (*) * 4
|
||||
|
||||
Mountain (M20) (*) * 4
|
||||
|
||||
Mountain (MIR) (*) * 4
|
||||
|
||||
Mountain (LEA) (*) * 3
|
||||
|
||||
Mountain (5ED) (*) * 3
|
||||
|
||||
Pashalik Mons (*) * 1
|
||||
|
||||
Prophetic Ravings (*) * 1
|
||||
|
||||
Purphoros, God of the Forge (*) * 1
|
||||
|
||||
Quest for the Goblin Lord (*) * 1
|
||||
|
||||
Rising of the Day (*) * 1
|
||||
|
||||
Reckless Bushwhacker (*) * 1
|
||||
|
||||
Reckless One (*) * 1
|
||||
|
||||
Reliquary Tower (*) * 1
|
||||
|
||||
Ruby Medallion (*) * 1
|
||||
|
||||
Shared Animosity (*) * 1
|
||||
|
||||
Siege-Gang Commander (*) * 1
|
||||
|
||||
Skirk Commando (*) * 1
|
||||
|
||||
Smash (*) * 1
|
||||
|
||||
Smoldering Spires (*) * 1
|
||||
|
||||
Sol Ring (*) * 1
|
||||
|
||||
Swiftfoot Boots (*) * 1
|
||||
|
||||
Valakut, the Molten Pinnacle (*) * 1
|
||||
|
||||
Vandalblast (*) * 1
|
||||
|
||||
Warren Instigator (*) * 1
|
||||
|
||||
Whispersilk Cloak (*) * 1
|
||||
#CMD:Krenko, Mob Boss (*) * 1
|
||||
|
||||
#CMD:Krenko, Mob Boss (*) * 1
|
||||
|
||||
@@ -30,16 +30,14 @@ Dark Ritual (*) * 1
|
||||
Dragonskull Summit (*) * 1
|
||||
Drana, Liberator of Malakir (*) * 1
|
||||
Duskborne Skymarcher (*) * 1
|
||||
Elenda, the Dusk Rose (*) * 1
|
||||
Exquisite Blood (*) * 1
|
||||
Elenda, the Dusk Rose (*) * 1
|
||||
Exquisite Blood (*) * 1
|
||||
Falkenrath Exterminator (*) * 1
|
||||
Falkenrath Noble (*) * 1
|
||||
Falkenrath Perforator (*) * 1
|
||||
Fervor (*) * 1
|
||||
Gift of Estates (*) * 1
|
||||
Gifted Aetherborn (*) * 1
|
||||
Godless Shrine (*) * 1
|
||||
Guul Draz Assassin (*) * 1
|
||||
Guul Draz Vampire (*) * 1
|
||||
Impact Tremors (*) * 1
|
||||
Inspiring Vantage (*) * 1
|
||||
@@ -50,6 +48,7 @@ Land Tax (*) * 1
|
||||
Legion Lieutenant (*) * 1
|
||||
Legion's Landing (*) * 1
|
||||
Malakir Cullblade (*) * 1
|
||||
Markov Baron (*) * 1
|
||||
Martyr of Dusk (*) * 1
|
||||
Mountain (*) * 1
|
||||
Necropolis Regent (*) * 1
|
||||
@@ -63,6 +62,7 @@ Plateau (*) * 1
|
||||
Pulse Tracker (*) * 1
|
||||
Purphoros, God of the Forge (*) * 1
|
||||
Quag Vampires (*) * 1
|
||||
Rising of the Day (*) * 1
|
||||
Ruthless Cullblade (*) * 1
|
||||
Sacred Foundry (*) * 1
|
||||
Sanctum Seeker (*) * 1
|
||||
@@ -94,4 +94,4 @@ Vito, Thorn of the Dusk Rose (*) * 1
|
||||
Voldaren Stinger (*) * 1
|
||||
Whispersilk Cloak (*) * 1
|
||||
Wing-Scarred Crag (*) * 1
|
||||
#CMD:Edgar Markov (*) * 1
|
||||
#CMD:Edgar Markov (*) * 1
|
||||
|
||||
91
projects/mtg/bin/Res/ai/baka/deck156.txt
Normal file
91
projects/mtg/bin/Res/ai/baka/deck156.txt
Normal file
@@ -0,0 +1,91 @@
|
||||
#NAME:Sauron Commander
|
||||
#DESC:Original deck by Josh
|
||||
#DESC:Edmundson (tappedout.net)
|
||||
#DESC:Refined for Wagic by Bob
|
||||
#HINT:castpriority(commander,*)
|
||||
Abrade (*) * 1
|
||||
An Offer You Can't Refuse (*) * 1
|
||||
Arcane Denial (*) * 1
|
||||
Arcane Signet (*) * 1
|
||||
Badlands (*) * 1
|
||||
Bedevil (*) * 1
|
||||
Big Score (*) * 1
|
||||
Bone Miser (*) * 1
|
||||
Callous Dismissal (*) * 1
|
||||
Changeling Outcast (*) * 1
|
||||
Chromatic Lantern (*) * 1
|
||||
Command Tower (*) * 1
|
||||
Commander's Sphere (*) * 1
|
||||
Crumbling Necropolis (*) * 1
|
||||
Dragonskull Summit (*) * 1
|
||||
Dreadhorde Invasion (*) * 1
|
||||
Drowned Catacomb (*) * 1
|
||||
Eternal Skylord (*) * 1
|
||||
Evolving Wilds (*) * 1
|
||||
Exotic Orchard (*) * 1
|
||||
Faithless Looting (*) * 1
|
||||
Feed the Swarm (*) * 1
|
||||
Fellwar Stone (*) * 1
|
||||
Foray of Orcs (*) * 1
|
||||
Gleaming Overseer (*) * 1
|
||||
Gothmog, Morgul Lieutenant (*) * 1
|
||||
Grishnakh, Brash Instigator (*) * 1
|
||||
Haunted Ridge (*) * 1
|
||||
Herald of Secret Streams (*) * 1
|
||||
Honor the God-Pharaoh (*) * 1
|
||||
Infernal Grasp (*) * 1
|
||||
Inherited Envelope (*) * 1
|
||||
Island (LTR) (*) * 4
|
||||
Island (WOE) (*) * 1
|
||||
Lazotep Chancellor (*) * 1
|
||||
Lazotep Plating (*) * 1
|
||||
March from the Black Gate (*) * 1
|
||||
Mauhur, Uruk-hai Captain (*) * 1
|
||||
Mindless Conscription (*) * 1
|
||||
Mithril Coat (*) * 1
|
||||
Mountain (LTR) (*) * 4
|
||||
616930
|
||||
619388
|
||||
619389
|
||||
619390
|
||||
619391
|
||||
619392
|
||||
619393
|
||||
619394
|
||||
619395
|
||||
Orcish Bowmasters (*) * 1
|
||||
Orcish Siegemaster (*) * 1
|
||||
Ringsight (*) * 1
|
||||
Saruman the White (*) * 1
|
||||
Saruman's Trickery (*) * 1
|
||||
Saruman, the White Hand (*) * 1
|
||||
Sauron, Lord of the Rings (*) * 1
|
||||
Sauron, the Necromancer (*) * 1
|
||||
Sheoldred, Whispering One (*) * 1
|
||||
Shipwreck Marsh (*) * 1
|
||||
Shivan Reef (*) * 1
|
||||
Smoldering Marsh (*) * 1
|
||||
Sol Ring (*) * 1
|
||||
Stormcarved Coast (*) * 1
|
||||
Sulfurous Springs (*) * 1
|
||||
Sunken Hollow (*) * 1
|
||||
Swamp (LTR) (*) * 4
|
||||
Swamp (WOE) (*) * 4
|
||||
Swamp (DSK) (*) * 3
|
||||
Swarming of Moria (*) * 1
|
||||
Talisman of Creativity (*) * 1
|
||||
Talisman of Dominance (*) * 1
|
||||
Talisman of Indulgence (*) * 1
|
||||
Teferi's Ageless Insight (*) * 1
|
||||
Temple of Epiphany (*) * 1
|
||||
The Locust God (*) * 1
|
||||
Thrill of Possibility (*) * 1
|
||||
Ulamog, The Infinite Gyre (*) * 1
|
||||
Underground River (*) * 1
|
||||
Underground Sea (*) * 1
|
||||
Vandalblast (*) * 1
|
||||
Whispersilk Cloak (*) * 1
|
||||
Widespread Brutality (*) * 1
|
||||
Windfall (*) * 1
|
||||
Witch-king, Bringer of Ruin (*) * 1
|
||||
#CMD:Sauron, the Dark Lord (*) * 1
|
||||
26
projects/mtg/bin/Res/ai/baka/deck157.txt
Normal file
26
projects/mtg/bin/Res/ai/baka/deck157.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
#NAME:Counter Attack
|
||||
#DESC:Deck Concept by Vitty85
|
||||
#DESC:Designed for Wagic by Bob
|
||||
#HINT:castpriority(creature,*)
|
||||
#HINT:combo hold(Time of Need|myhand)^cast(Time of Need|myhand) targeting(Shalai and Hallar|mylibrary)^restriction{type(Shalai and Hallar|mybattlefield)~lessthan~1}^totalmananeeded({1}{G})
|
||||
#HINT:combo hold(Basri's Solidarity|myhand)^until(Shalai and Hallar|mybattlefield)^cast(Basri's Solidarity|myhand)^totalmananeeded({1}{W})
|
||||
#HINT:alwaysattackwith(Kalonian Hydra)
|
||||
Basri's Solidarity (*) * 4
|
||||
Birds of Paradise (M12) (*) * 3
|
||||
Cathars' Crusade (*) * 2
|
||||
Clifftop Retreat (*) * 3
|
||||
Essence Warden (*) * 3
|
||||
Graypelt Refuge (*) * 4
|
||||
Heliod, Sun-Crowned (*) * 3
|
||||
Jetmir's Garden (*) * 4
|
||||
Kazandu Refuge (*) * 2
|
||||
Prosperous Innkeeper (*) * 2
|
||||
Razorverge Thicket (*) * 4
|
||||
Archangel of Thune (*) * 3
|
||||
Rootbound Crag (*) * 2
|
||||
Kalonian Hydra (*) * 4
|
||||
Shalai and Hallar (*) * 4
|
||||
Soul Warden (*) * 3
|
||||
Sunpetal Grove (*) * 2
|
||||
Time of Need (*) * 4
|
||||
Windswept Heath (*) * 4
|
||||
27
projects/mtg/bin/Res/ai/baka/deck158.txt
Normal file
27
projects/mtg/bin/Res/ai/baka/deck158.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
#NAME:Orcs of Mordor
|
||||
#DESC:Designed for Wagic by Bob
|
||||
Assault on Osgiliath (*) * 2
|
||||
Dunland Crebain (*) * 2
|
||||
Easterling Vanguard (*) * 2
|
||||
Feed the Swarm (*) * 2
|
||||
Foray of Orcs (*) * 4
|
||||
Gothmog, Morgul Lieutenant (*) * 1
|
||||
Grishnakh, Brash Instigator (*) * 1
|
||||
March from the Black Gate (*) * 2
|
||||
Mauhur, Uruk-hai Captain (*) * 2
|
||||
Mordor Muster (*) * 2
|
||||
Mountain (LTR) (*) * 4
|
||||
Mountain (SNC) (*) * 4
|
||||
Mountain (ONE) (*) * 4
|
||||
Orcish Bowmasters (*) * 4
|
||||
Olog-hai Crusher (*) * 2
|
||||
Sauron, the Lidless Eye (*) * 1
|
||||
Snarling Warg (*) * 2
|
||||
Swamp (LTR) (*) * 4
|
||||
Swamp (SNC) (*) * 4
|
||||
Swamp (ONE) (*) * 4
|
||||
Swamp (NEO) (*) * 2
|
||||
Swarming of Moria (*) * 3
|
||||
Ugluk of the White Hand (*) * 1
|
||||
Witch-king, Bringer of Ruin (*) * 1
|
||||
|
||||
95
projects/mtg/bin/Res/ai/baka/deck159.txt
Normal file
95
projects/mtg/bin/Res/ai/baka/deck159.txt
Normal file
@@ -0,0 +1,95 @@
|
||||
#NAME:Graaz Commander
|
||||
#DESC:Deck concept thanks to punkeduard
|
||||
#DESC:Original deck by vasarto77 (tappedout.net)
|
||||
#DESC:Refined for Wagic by Bob
|
||||
#HINT:castpriority(commander,creature,*)
|
||||
#HINT:combo hold(All is Dust|myhand)^cast(All is Dust|myhand)^restriction{type(creature|opponentbattlefield)~morethan~2}^totalmananeeded({7})
|
||||
Akroma's Memorial (*) * 1
|
||||
All is Dust (*) * 1
|
||||
Alloy Myr (*) * 1
|
||||
Ancient Tomb (*) * 1
|
||||
Arcbound Crusher (*) * 1
|
||||
Ash Barrens (*) * 1
|
||||
Bitterthorn, Nissa's Animus (*) * 1
|
||||
Blinkmoth Urn (*) * 1
|
||||
Bonded Construct (*) * 1
|
||||
Captain's Claws (*) * 1
|
||||
Chief of the Foundry (*) * 1
|
||||
Coat of Arms (*) * 1
|
||||
Commander's Plate (*) * 1
|
||||
Copper Myr (*) * 1
|
||||
Darksteel Citadel (*) * 1
|
||||
Darksteel Forge (*) * 1
|
||||
Darksteel Juggernaut (*) * 1
|
||||
Dolmen Gate (*) * 1
|
||||
Eldrazi Monument (*) * 1
|
||||
Environmental Sciences (*) * 1
|
||||
Etched Champion (*) * 1
|
||||
Fellwar Stone (*) * 1
|
||||
Field of the Dead (*) * 1
|
||||
Flayer Husk (*) * 1
|
||||
Forsaken Monument (*) * 1
|
||||
Foundry of the Consuls (*) * 1
|
||||
Gemini Engine (*) * 1
|
||||
Gold Myr (*) * 1
|
||||
Golem Foundry (*) * 1
|
||||
Guildless Commons (*) * 1
|
||||
Ichorclaw Myr (*) * 1
|
||||
Iron Apprentice (*) * 1
|
||||
Iron Myr (*) * 1
|
||||
It That Betrays (*) * 1
|
||||
Kozilek, Butcher of Truth (*) * 1
|
||||
Leaden Myr (*) * 1
|
||||
Mascot Exhibition (*) * 1
|
||||
Memnite (*) * 1
|
||||
Mishra's Self-Replicator (*) * 1
|
||||
Monkey Cage (*) * 1
|
||||
Mox Opal (*) * 1
|
||||
Myr Battlesphere (*) * 1
|
||||
Myr Retriever (*) * 1
|
||||
Myr Turbine (*) * 1
|
||||
Nettlecyst (*) * 1
|
||||
Oketra's Monument (*) * 1
|
||||
Ornithopter (*) * 1
|
||||
Ornithopter of Paradise (*) * 1
|
||||
Palladium Myr (*) * 1
|
||||
Patchwork Automaton (*) * 1
|
||||
Phyrexian Walker (*) * 1
|
||||
Plague Myr (*) * 1
|
||||
Pristine Talisman (*) * 1
|
||||
Scavenger Grounds (*) * 1
|
||||
Sea Gate Wreckage (*) * 1
|
||||
Searchlight Companion (*) * 1
|
||||
Shimmer Myr (*) * 1
|
||||
Shrine of the Forsaken Gods (*) * 1
|
||||
Signal Pest (*) * 1
|
||||
Silver Myr (*) * 1
|
||||
Skittering Cicada (*) * 1
|
||||
Skittering Invasion (*) * 1
|
||||
Sol Ring (*) * 1
|
||||
Sparring Construct (*) * 1
|
||||
Spawning Bed (*) * 1
|
||||
Spawnsire of Ulamog (*) * 1
|
||||
Steel Overseer (*) * 1
|
||||
Stonecoil Serpent (*) * 1
|
||||
Swiftfoot Boots (*) * 1
|
||||
Temple of the False God (*) * 1
|
||||
Thopter Assembly (*) * 1
|
||||
Thought Vessel (*) * 1
|
||||
Thran Dynamo (*) * 1
|
||||
Universal Automaton (*) * 1
|
||||
Unwinding Clock (*) * 1
|
||||
Urza's Mine (*) * 1
|
||||
Urza's Power Plant (*) * 1
|
||||
Urza's Saga
|
||||
Urza's Tower (*) * 1
|
||||
Urza's Workshop (*) * 1
|
||||
Void Winnower (*) * 1
|
||||
Wastes (CMM) (*) * 4
|
||||
Wastes (J22) (*) * 4
|
||||
Wastes (OGW) (*) * 4
|
||||
Wastes (TSR) (*) * 4
|
||||
Worn Powerstone (*) * 1
|
||||
Zhalfirin Void (*) * 1
|
||||
#CMD:Graaz, Unstoppable Juggernaut (*) * 1
|
||||
|
||||
@@ -1,79 +1,96 @@
|
||||
#Black/White Deck 10E/RV
|
||||
#NAME:The Hive
|
||||
#DESC:When the last living being
|
||||
#DESC:succumbs to the terrible blight
|
||||
#DESC:the wasps will rise
|
||||
#DESC:stirring the barren air
|
||||
#DESC:with their hum.
|
||||
#4x The hive
|
||||
135253
|
||||
135253
|
||||
135253
|
||||
135253
|
||||
#4x pestilence
|
||||
1172
|
||||
1172
|
||||
1172
|
||||
1172
|
||||
#4x Ancestor chosen
|
||||
130550
|
||||
130550
|
||||
130550
|
||||
130550
|
||||
#4x assassinate
|
||||
135194
|
||||
135194
|
||||
135194
|
||||
135194
|
||||
#4x bottle gnomes
|
||||
129495
|
||||
129495
|
||||
129495
|
||||
129495
|
||||
#4x Drudge skelettons
|
||||
129529
|
||||
129529
|
||||
129529
|
||||
129529
|
||||
#4x Glorious Anthem
|
||||
129572
|
||||
129572
|
||||
129572
|
||||
129572
|
||||
#4x Paladin en Vec
|
||||
129668
|
||||
129668
|
||||
129668
|
||||
129668
|
||||
#2 x Deathmark
|
||||
129910
|
||||
129910
|
||||
#2x Demistify
|
||||
129524
|
||||
129524
|
||||
#12 swamps
|
||||
129754
|
||||
129756
|
||||
129755
|
||||
129757
|
||||
129754
|
||||
129756
|
||||
129755
|
||||
129757
|
||||
129754
|
||||
129756
|
||||
129755
|
||||
129757
|
||||
#12x plains
|
||||
129680
|
||||
129681
|
||||
129682
|
||||
129683
|
||||
129680
|
||||
129681
|
||||
129682
|
||||
129683
|
||||
129680
|
||||
129681
|
||||
129682
|
||||
129683
|
||||
#NAME:Tobias Commander
|
||||
#DESC:Tobias Andrion considers himself
|
||||
#DESC:a master of strategy. Can you
|
||||
#DESC:defeat him?
|
||||
#DESC:
|
||||
#DESC:Win Wagic duels to unlock
|
||||
#DESC:more Commander opponents
|
||||
#DESC:
|
||||
#DESC:Original deck idea by Goraghull
|
||||
#DESC:(mtggoldfish.com)
|
||||
#DESC:Built for Wagic by Bob
|
||||
#HINT:castpriority(commander,*)
|
||||
|
||||
Acrobatic Maneuver (*) * 1
|
||||
Aethersnipe (*) * 1
|
||||
Alabaster Dragon (*) * 1
|
||||
Angelic Renewal (*) * 1
|
||||
Aqueous Form (*) * 1
|
||||
Archaeomancer (*) * 1
|
||||
Ash Barrens (*) * 1
|
||||
Azorius Guildgate (*) * 1
|
||||
Azorius Signet (*) * 1
|
||||
Blur (*) * 1
|
||||
Capsize (*) * 1
|
||||
Cloak of Mists (*) * 1
|
||||
Cloudshift (*) * 1
|
||||
Command Tower (*) * 1
|
||||
Commander's Sphere (*) * 1
|
||||
Counterspell (*) * 1
|
||||
Deep Analysis (*) * 1
|
||||
Displace (*) * 1
|
||||
Drifting Meadow (*) * 1
|
||||
Enlightened Maniac (*) * 1
|
||||
Ephemerate (*) * 1
|
||||
Essence Flux (*) * 1
|
||||
Fellwar Stone (*) * 1
|
||||
Flicker of Fate (*) * 1
|
||||
Forge of Heroes (*) * 1
|
||||
Forsake the Worldly (*) * 1
|
||||
Ghostly Flicker (*) * 1
|
||||
Icewind Stalwart (*) * 1
|
||||
Idyllic Beachfront (*) * 1
|
||||
Inspiring Overseer (*) * 1
|
||||
Island (*) * 4
|
||||
Island (WOE) (*) * 4
|
||||
Island (LCI) (*) * 4
|
||||
Journey to Nowhere (*) * 1
|
||||
Kor Cartographer (*) * 1
|
||||
Late to Dinner (*) * 1
|
||||
Lonely Sandbar (*) * 1
|
||||
Lose Focus (*) * 1
|
||||
Man-o'-War (*) * 1
|
||||
Meandering River (*) * 1
|
||||
Mind Stone (*) * 1
|
||||
Mist Raven (*) * 1
|
||||
Mnemonic Wall (*) * 1
|
||||
Momentary Blink (*) * 1
|
||||
Muse Drake (*) * 1
|
||||
Negate (M12) (*) * 1
|
||||
Oblivion Ring (*) * 1
|
||||
Opal Palace (*) * 1
|
||||
Palace Sentinels (*) * 1
|
||||
Pegasus Guardian (*) * 1
|
||||
Plains (*) * 4
|
||||
Plains (WOE) (*) * 4
|
||||
Plains (LCI) (*) * 4
|
||||
Plains (OTJ) (*) * 1
|
||||
Ponder (M12) (*) * 1
|
||||
Pondering Mage (*) * 1
|
||||
Preordain (*) * 1
|
||||
Protective Bubble (*) * 1
|
||||
Remote Isle (*) * 1
|
||||
Revoke Existence (*) * 1
|
||||
Salvager of Secrets (*) * 1
|
||||
Scrivener (*) * 1
|
||||
Scrollshift (*) * 1
|
||||
Sea Gate Oracle (*) * 1
|
||||
Sensor Splicer (*) * 1
|
||||
Settle Beyond Reality (*) * 1
|
||||
Skyscanner (*) * 1
|
||||
Soul Warden (*) * 1
|
||||
Soul of Migration (*) * 1
|
||||
Spirited Companion (*) * 1
|
||||
Stonehorn Dignitary (*) * 1
|
||||
Suture Priest (*) * 1
|
||||
Swords to Plowshares (*) * 1
|
||||
Teferi's Time Twist (*) * 1
|
||||
Temporal Fissure (*) * 1
|
||||
The Modern Age (*) * 1
|
||||
Thought Vessel (*) * 1
|
||||
Tranquil Cove (*) * 1
|
||||
Turn to Mist (*) * 1
|
||||
Vedalken Dismisser (RAV) (*) * 1
|
||||
Whirlpool Rider (*) * 1
|
||||
Whispersilk Cloak (*) * 1
|
||||
#CMD:Tobias Andrion (*) * 1
|
||||
|
||||
92
projects/mtg/bin/Res/ai/baka/deck160.txt
Normal file
92
projects/mtg/bin/Res/ai/baka/deck160.txt
Normal file
@@ -0,0 +1,92 @@
|
||||
#NAME:Shalai-Hallar Commander
|
||||
#DESC:Deck concept thanks to Vitty85
|
||||
#DESC:Original deck by gabao (tappedout.net)
|
||||
#DESC:Refined for Wagic by Bob
|
||||
#HINT:castpriority(commander,creature,*)
|
||||
#HINT:dontattackwith(Birds of Paradise)
|
||||
#HINT:dontblockwith(Birds of Paradise)
|
||||
#HINT:alwaysattackwith(Kalonian Hydra)
|
||||
Abzan Battle Priest (*) * 1
|
||||
Abzan Falconer (*) * 1
|
||||
Ajani's Pridemate (M11) (*) * 1
|
||||
All Will Be One (*) * 1
|
||||
Arcane Signet (*) * 1
|
||||
Arwen, Weaver of Hope (*) * 1
|
||||
Basri's Solidarity (*) * 1
|
||||
Birds of Paradise (*) * 1
|
||||
Botanical Brawler (*) * 1
|
||||
Branching Evolution (*) * 1
|
||||
Bretagard Stronghold (*) * 1
|
||||
Canopy Vista (*) * 1
|
||||
Cathars' Crusade (*) * 1
|
||||
Cinder Glade (*) * 1
|
||||
Command Tower (*) * 1
|
||||
Conclave Mentor (*) * 1
|
||||
Cultivate (*) * 1
|
||||
Death's Presence (*) * 1
|
||||
Defiler of Vigor (*) * 1
|
||||
Dusk Legion Duelist (*) * 1
|
||||
Enduring Scalelord (*) * 1
|
||||
Evolution Sage (*) * 1
|
||||
Evolving Wilds (*) * 1
|
||||
Exotic Orchard (*) * 1
|
||||
Farseek (*) * 1
|
||||
Felidar Retreat (*) * 1
|
||||
Forest (LTR) (*) * 4
|
||||
Forest (CMM) (*) * 4
|
||||
Fortified Village (*) * 1
|
||||
Game Trail (*) * 1
|
||||
Goblin Anarchomancer (*) * 1
|
||||
Good-Fortune Unicorn (*) * 1
|
||||
Grumgully, the Generous (*) * 1
|
||||
Gyre Sage (*) * 1
|
||||
Halana and Alena, Partners (*) * 1
|
||||
Hardened Scales (*) * 1
|
||||
Heliod, Sun-Crowned (*) * 1
|
||||
Hydra's Growth (*) * 1
|
||||
Incubation Druid (*) * 1
|
||||
Inspiring Call (*) * 1
|
||||
Invigorating Surge (*) * 1
|
||||
Ivy Lane Denizen (*) * 1
|
||||
Kalonian Hydra (*) * 1
|
||||
Kami of Whispered Hopes (*) * 1
|
||||
Keen Sense (*) * 1
|
||||
Kodama's Reach (CMM) (*) * 1
|
||||
Krenko, Tin Street Kingpin (*) * 1
|
||||
Krosan Grip (*) * 1
|
||||
Krosan Verge (*) * 1
|
||||
Lifelink (*) * 1
|
||||
Loyal Guardian (*) * 1
|
||||
Managorger Hydra (*) * 1
|
||||
Master Chef (*) * 1
|
||||
Mayael's Aria (*) * 1
|
||||
Mikaeus, the Lunarch (*) * 1
|
||||
Mountain (LTR) (*) * 4
|
||||
Mountain (CMM) (*) * 4
|
||||
Nature's Lore (*) * 1
|
||||
Ozolith, the Shattered Spire (*) * 1
|
||||
Path to Exile (*) * 1
|
||||
Plains (LTR) (*) * 4
|
||||
Plains (CMM) (*) * 4
|
||||
Pledge of Unity (*) * 1
|
||||
Rampant Growth (*) * 1
|
||||
Renata, Called to the Hunt (*) * 1
|
||||
Resourceful Defense (*) * 1
|
||||
Rhythm of the Wild (*) * 1
|
||||
Shalai, Voice of Plenty (*) * 1
|
||||
Sol Ring (*) * 1
|
||||
Solidarity of Heroes (*) * 1
|
||||
Sungrass Prairie (*) * 1
|
||||
Surge of Salvation (*) * 1
|
||||
Sword of Truth and Justice (*) * 1
|
||||
Swords to Plowshares (*) * 1
|
||||
Take Up the Shield (*) * 1
|
||||
Taurean Mauler (*) * 1
|
||||
Temple of the False God (*) * 1
|
||||
Terramorphic Expanse (*) * 1
|
||||
Together Forever (*) * 1
|
||||
Trelasarra, Moon Dancer (*) * 1
|
||||
Twinblade Paladin (*) * 1
|
||||
Visions of Dominance (*) * 1
|
||||
Wildwood Scourge (*) * 1
|
||||
#CMD:Shalai and Hallar (*) * 1
|
||||
89
projects/mtg/bin/Res/ai/baka/deck161.txt
Normal file
89
projects/mtg/bin/Res/ai/baka/deck161.txt
Normal file
@@ -0,0 +1,89 @@
|
||||
#NAME:Vial Smasher Commander
|
||||
#DESC:Original deck by GrwingErbw (tappedout.net)
|
||||
#DESC:Refined for Wagic by Bob
|
||||
#HINT:castpriority(commander,*)
|
||||
#HINT:dontattackwith(Vial Smasher the Fierce)
|
||||
#HINT:dontblockwith(Vial Smasher the Fierce)
|
||||
Abrade (*) * 1
|
||||
Angrath, the Flame-Chained (*) * 1
|
||||
Archfiend of Despair (*) * 1
|
||||
Badlands (*) * 1
|
||||
Banefire (M19) (*) * 1
|
||||
Baneful Omen (*) * 1
|
||||
Bituminous Blast (C16) (*) * 1
|
||||
Black Market (*) * 1
|
||||
Blasphemous Act (*) * 1
|
||||
Bojuka Bog (*) * 1
|
||||
Brash Taunter (*) * 1
|
||||
Breath of Malfegor (*) * 1
|
||||
Charmbreaker Devils (*) * 1
|
||||
Cinder Barrens (*) * 1
|
||||
City on Fire (*) * 1
|
||||
Command Tower (*) * 1
|
||||
Curtains' Call (*) * 1
|
||||
Decree of Pain (*) * 1
|
||||
Doom Blade (*) * 1
|
||||
Dragonskull Summit (*) * 1
|
||||
Dreadbore (*) * 1
|
||||
Everlasting Torment (*) * 1
|
||||
Expedition Map (*) * 1
|
||||
Exsanguinate (*) * 1
|
||||
Falkenrath Noble (*) * 1
|
||||
Fiery Confluence (*) * 1
|
||||
Fiery Emancipation (*) * 1
|
||||
Fire Diamond (*) * 1
|
||||
Font of Mythos (CON) (*) * 1
|
||||
Foreboding Ruins (*) * 1
|
||||
Go for the Throat (*) * 1
|
||||
Gratuitous Violence (*) * 1
|
||||
Gray Merchant of Asphodel (*) * 1
|
||||
Guttersnipe (*) * 1
|
||||
Hero's Downfall (*) * 1
|
||||
Howling Mine (*) * 1
|
||||
In Garruk's Wake (*) * 1
|
||||
Indulgent Tormentor (*) * 1
|
||||
Kaervek the Merciless (*) * 1
|
||||
Kederekt Parasite (*) * 1
|
||||
Lightning Reaver (*) * 1
|
||||
Malfegor (*) * 1
|
||||
Mogis, God of Slaughter (*) * 1
|
||||
Mountain (MKM) (*) * 4
|
||||
Mountain (WOE) (*) * 4
|
||||
Mountain (LCI) (*) * 4
|
||||
Mountain (LTR) (*) * 1
|
||||
Murder (*) * 1
|
||||
Neheb, the Eternal (*) * 1
|
||||
Painful Quandary (*) * 1
|
||||
Phyrexian Arena (*) * 1
|
||||
Polluted Bonds (*) * 1
|
||||
Rakdos Carnarium (*) * 1
|
||||
Rakdos Guildgate (*) * 1
|
||||
Rakdos Signet (*) * 1
|
||||
Rakdos's Return (*) * 1
|
||||
Rakdos, Lord of Riots (*) * 1
|
||||
Sheoldred, the Apocalypse (*) * 1
|
||||
Sin Prodder (*) * 1
|
||||
Skull Rend (*) * 1
|
||||
Smoldering Marsh (*) * 1
|
||||
Sol Ring (*) * 1
|
||||
Solemn Simulacrum (*) * 1
|
||||
Star of Extinction (*) * 1
|
||||
Starstorm (*) * 1
|
||||
Swamp (MKM) (*) * 4
|
||||
Swamp (WOE) (*) * 4
|
||||
Swamp (LCI) (*) * 4
|
||||
Swamp (LTR) (*) * 1
|
||||
Temple of Malice (*) * 1
|
||||
Temple of the False God (*) * 1
|
||||
Temporal Extortion (*) * 1
|
||||
Terminate (CMD) (*) * 1
|
||||
Thought Vessel (*) * 1
|
||||
Torment of Hailfire (*) * 1
|
||||
Tragic Slip (*) * 1
|
||||
Twilight Prophet (*) * 1
|
||||
Unlicenced Disintergration (*) * 1
|
||||
Vicious Shadows (*) * 1
|
||||
Volcanic Vision (*) * 1
|
||||
Waste Not (*) * 1
|
||||
Wound Reflection (*) * 1
|
||||
#CMD:Vial Smasher the Fierce (*) * 1
|
||||
25
projects/mtg/bin/Res/ai/baka/deck162.txt
Normal file
25
projects/mtg/bin/Res/ai/baka/deck162.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
#NAME:Draw and Die!
|
||||
#DESC:Deck concept by ChocolateLightning
|
||||
#DESC:(tappedout.net), refined for
|
||||
#DESC:Wagic by Bob
|
||||
#HINT:dontattackwith(Fate Unraveler)
|
||||
#HINT:dontblockwith(Fate Unraveler)
|
||||
Dictate of Kruphix (*) * 3
|
||||
Dismal Backwater (*) * 2
|
||||
Drowned Catacomb (*) * 4
|
||||
Fate Unraveler (*) * 4
|
||||
Fog Bank (*) * 2
|
||||
Forced Fruition (*) * 2
|
||||
Howling Mine (*) * 4
|
||||
Island (MIR) (*) * 4
|
||||
Island (ICE) (*) * 4
|
||||
Liliana's Caress (*) * 2
|
||||
Master of the Feast (*) * 4
|
||||
Ob Nixilis, the Hate-Twisted (*) * 3
|
||||
Peer into the Abyss (*) * 1
|
||||
Teferi's Puzzle Box (*) * 2
|
||||
Shield Sphere (*) * 3
|
||||
Swamp (ZEN) (*) * 4
|
||||
Swamp (4ED) (*) * 4
|
||||
Underworld Dreams (*) * 4
|
||||
Underground Sea (*) * 4
|
||||
29
projects/mtg/bin/Res/ai/baka/deck163.txt
Normal file
29
projects/mtg/bin/Res/ai/baka/deck163.txt
Normal file
@@ -0,0 +1,29 @@
|
||||
#NAME:Cut Off One Head...
|
||||
#DESC:Deck concept by Prospekt
|
||||
#DESC:(tappedout.net), refined for
|
||||
#DESC:Wagic by Bob
|
||||
#HINT:dontattackwith(Birds of Paradise)
|
||||
#HINT:dontblockwith(Birds of Paradise)
|
||||
#HINT:dontattackwith(Karametra's Acolyte)
|
||||
#HINT:alwaysattackwith(Kalonian Hydra)
|
||||
#HINT:combo hold(Alpha Authority|myhand)^until(creature[-Hydra]|mybattlefield)^cast(Alpha Authority|myhand) targeting(creature[-Hydra]|mybattlefield)^restriction{type(Alpha Authority|mybattlefield)~lessthan~1}^totalmananeeded({1}{G})
|
||||
#HINT:combo hold(Canopy Cover|myhand)^until(creature[-Hydra]|mybattlefield)^cast(Canopy Cover|myhand) targeting(creature[-Hydra]|mybattlefield)^restriction{type(Canopy Cover|mybattlefield)~lessthan~1}^totalmananeeded({1}{G})
|
||||
Alpha Authority * 2
|
||||
Birds of Paradise * 4
|
||||
Beast Within * 3
|
||||
Canopy Cover * 2
|
||||
Cultivate * 4
|
||||
Forest (MIR) * 4
|
||||
Forest (ICE) * 4
|
||||
Forest (4ED) * 4
|
||||
Forest (5ED) * 4
|
||||
Forest (7ED) * 4
|
||||
Forest (RAV) * 2
|
||||
Kalonian Hydra * 2
|
||||
Karametra's Acolyte * 2
|
||||
Khalni Hydra * 4
|
||||
Managorger Hydra * 4
|
||||
Mistcutter Hydra * 3
|
||||
Primordial Hydra * 4
|
||||
Solidarity of Heroes * 2
|
||||
Voracious Hydra * 2
|
||||
31
projects/mtg/bin/Res/ai/baka/deck164.txt
Normal file
31
projects/mtg/bin/Res/ai/baka/deck164.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
#NAME:Nazgul
|
||||
#DESC:Deck for Wagic by Bob
|
||||
#HINT:combo hold(Sam's Desperate Rescue|myhand)^cast(Sam's Desperate Rescue|myhand) targeting(Nazgul|mygraveyard)^totalmananeeded({B})
|
||||
#HINT:combo hold(Demonic Tutor|myhand)^cast(Demonic Tutor|myhand) targeting(Nazgul|mylibrary)^totalmananeeded({1}{B})
|
||||
Bog Wraith (*) * 4
|
||||
Claim the Precious (*) * 3
|
||||
Demonic Tutor (*) * 2
|
||||
Forced Adaptation (*) * 2
|
||||
Forest (LTR) (*) * 4
|
||||
Forest (WOE) (*) * 3
|
||||
Hardened Scales (*) * 4
|
||||
Inherited Envelope (*) * 3
|
||||
Ringwraiths (*) * 2
|
||||
Sam's Desperate Rescue (*) * 2
|
||||
Sheoldred, Whispering One (*) * 1
|
||||
Smeagol, Helpful Guide (*) * 2
|
||||
Swamp (DSK) (*) * 4
|
||||
Swamp (LTR) (*) * 4
|
||||
Swamp (WOE) (*) * 3
|
||||
The Black Breath (*) * 2
|
||||
Urborg, Tomb of Yawgmoth (LTC) (*) * 2
|
||||
Woodland Cemetery (LTC) * 4
|
||||
616930
|
||||
619388
|
||||
619389
|
||||
619390
|
||||
619391
|
||||
619392
|
||||
619393
|
||||
619394
|
||||
619395
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user