2715 Commits

Author SHA1 Message Date
Xawotihs
af0c423359 Switch back to java oracle 8 to build android app 2017-09-08 18:23:09 +02:00
Xawotihs
45253e0008 Reupdate pip calls to use them for osx as well 2017-09-08 17:56:20 +02:00
Xawotihs
e32e5c2a47 Readding sudo pip ... lalala ... 2017-09-07 22:12:25 +02:00
Xawotihs
3a4f9f06cb reordered pip install 2017-09-07 22:01:36 +02:00
Xawotihs
a563030440 Removing pip cache 2017-09-07 21:44:55 +02:00
Xawotihs
80d43896ff Reordered pip installs around 2017-09-07 20:56:37 +02:00
Xawotihs
1c5949411f Fixed some ] and space 2017-09-07 20:22:25 +02:00
Xawotihs
699b151939 With a couple of ; 2017-09-07 20:15:32 +02:00
Xawotihs
e6af1a08b9 Use sudo pip for Android and pip with linux without Android 2017-09-07 20:09:56 +02:00
Xawotihs
7eac02f8d4 Trying pip install without sudo 2017-09-06 19:44:00 +02:00
Xawotihs
58e70e2500 replacing sudo pip by sudo -H pip 2017-09-06 19:36:12 +02:00
Xawotihs
56ca2021dc Let's try with openjdk7 2017-09-06 19:18:13 +02:00
Xawotihs
e4e431dcee Let's try jdk_switcher 2017-09-06 00:21:24 +02:00
Xawotihs
abfff205ee Readding ant, it seems the android worker needs it 2017-09-06 00:05:16 +02:00
Xawotihs
6416e4e0d9 Removed ant installation 2017-09-05 23:37:47 +02:00
Xawotihs
86f4730db7 Removings traces and ant errors 2017-09-05 23:06:22 +02:00
Xawotihs
33a5479512 Sounds like JAVA_HOME is wrong, let's try to use the default one 2017-09-05 22:59:06 +02:00
Xawotihs
891859f4ca Let's display ant errors 2017-09-05 22:48:06 +02:00
Xawotihs
d5bfb8201b Some echo traces 2017-09-05 22:36:19 +02:00
Xawotihs
f49ef92f90 sudo required on linux 2017-09-05 22:26:38 +02:00
Xawotihs
02d004b5bf Fixed os in build matrix for Android 2017-09-05 22:11:24 +02:00
Xawotihs
55f8a8a1d0 Only used brew if osx is defined 2017-09-04 20:16:31 +02:00
Xawotihs
068a69c80b Adding ant as it somehow disappeared ... 2017-09-04 19:43:41 +02:00
Xawotihs
375e66489f Changed memory to be 16 MB 2017-09-03 23:55:43 +02:00
Xawotihs
cbbd034862 Removed chmod on binary 2017-09-03 14:44:45 +02:00
Xawotihs
f7fe948da5 Update psp sdk link, don't install theos for all mac builds 2017-09-03 14:21:15 +02:00
Xawotihs
478ce0863b Replace cmake installation script 2017-09-03 14:04:32 +02:00
Xawotihs
329011460f Update .travis.yml 2017-09-03 13:55:39 +02:00
xawotihs
48ec51a923 Shold fix travis script 2017-09-03 12:49:31 +02:00
xawotihs
9936962c56 Should fix cmake issues on linux 2017-09-03 12:44:30 +02:00
xawotihs
15111d1b20 Merge branch 'master' of https://github.com/WagicProject/wagic into cmake 2017-09-02 21:15:47 +02:00
Anthony Calosa
07e6d90c98 Merge pull request #975 from kevlahnota/master
Some fixes
2017-08-06 13:33:07 +08:00
Anthony Calosa
85231cda01 Fix Nissa's Chosen
Code seems workaround, it needs hardcoded...
2017-08-05 22:09:49 +08:00
Anthony Calosa
8549b7b1b4 Interrupt targetted abilities
This should have an option...
2017-08-05 18:52:27 +08:00
Anthony Calosa
9f58ef9916 small fixes for primitives 2017-08-05 18:16:47 +08:00
Anthony Calosa
c734ee9fd1 Add exert Indicator
"*" signifies exert
2017-08-05 18:16:24 +08:00
Anthony Calosa
77d87902d9 Add restriction for exert
hasexerted and notexerted
2017-08-05 18:15:44 +08:00
Anthony Calosa
b5c8656ac9 Fix Blink 2017-08-05 18:15:13 +08:00
Anthony Calosa
28f6b73da6 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-08-03 20:03:26 +08:00
Anthony Calosa
521b505543 Merge pull request #974 from kevlahnota/master
Fix morbid
2017-08-03 19:54:35 +08:00
Anthony Calosa
c5a3310103 quick Fix for zerodead 2017-08-03 18:32:16 +08:00
Anthony Calosa
0c053c713a fix morbid
also added zerodead restriction - returns true if you dont have any
creature that died this turn
2017-08-03 18:27:45 +08:00
Anthony Calosa
bc06f93aae Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-08-03 15:52:56 +08:00
Anthony Calosa
8e919aeeb1 Merge pull request #973 from kevlahnota/master
Support for AKH/HOU Mechanics
2017-08-03 10:36:15 +08:00
Anthony Calosa
6bd09e42e0 Add support for Amonkhet Mechanics
and fix some cards.
Added exerted trigger, event and add removemc keyword inside transforms
ability so we can soft code Embalm and Eternalize...
2017-08-03 09:49:37 +08:00
Anthony Calosa
1f670b9919 Merge pull request #12 from WagicProject/master
Update unsuported cards, set a condition for showing poison counters …
2017-08-03 09:16:30 +08:00
punkeduard
c805a58fb0 Update unsuported cards, set a condition for showing poison counters and energy counter, added tribal al card type check, show the amount o 2017-08-02 18:42:52 -05:00
Anthony Calosa
34517004df Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-05-09 12:38:59 +08:00
Anthony Calosa
b0506bcd96 Merge pull request #968 from kevlahnota/master
readded fixes by punkeduard
2017-05-09 12:29:16 +08:00
Anthony Calosa
7a3a6c04a6 readded fixes by punkeduard 2017-05-09 12:28:07 +08:00
Anthony Calosa
54e4b08e1f Merge pull request #11 from WagicProject/master
test pull
2017-05-09 12:25:45 +08:00
Anthony Calosa
67c22c5186 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-05-09 12:09:12 +08:00
punkeduard
87aba86fa8 Revert "Fixing bugs in the primitives"
This reverts commit 665f8ce755.
2017-05-08 22:17:27 -05:00
Rolzad73
28ea300f42 - fix forward declaration 2017-05-08 19:39:32 -04:00
Rolzad73
858c26b46a Merge pull request #966 from WagicProject/key_bind_changes
Key bind changes
2017-05-08 19:03:03 -04:00
Rolzad73
70a6c7149c - semi cleanup 2017-05-08 19:01:41 -04:00
Rolzad73
b4a34216c8 - updated Qt keybinding translation 2017-05-08 18:58:47 -04:00
Anthony Calosa
3868f4eb98 Merge pull request #965 from kevlahnota/master
Minor Corrections
2017-05-08 12:15:44 +08:00
Anthony Calosa
44304ee5b3 minor corrections 2017-05-08 11:41:00 +08:00
Anthony Calosa
9f4b8d65c8 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-05-08 11:33:57 +08:00
punkeduard
665f8ce755 Fixing bugs in the primitives
Daring Sleuth was crashing the game in the collection
2017-05-03 14:42:10 -05:00
Anthony Calosa
e1d5348f23 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-20 11:37:01 +08:00
Anthony Calosa
b596dc9eea Merge pull request #964 from kevlahnota/master
Add some cards
2017-03-20 06:09:04 +08:00
Anthony Calosa
eb8370b86b add some cards
also added countb() - countedbamount..
2017-03-19 21:57:59 +08:00
Anthony Calosa
fa69686f0a Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-19 08:59:21 +08:00
Rolzad73
3fe5372d28 non-commit to test build 2017-03-18 11:27:20 -04:00
Anthony Calosa
3058d42b49 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-16 20:58:36 +08:00
Anthony Calosa
4975ee0028 Merge pull request #963 from kevlahnota/master
Bushido, Modular points
2017-03-16 17:53:14 +08:00
Anthony Calosa
d4e1d809f3 Bushido & Modular
add Bushido and Modular points
2017-03-16 16:58:56 +08:00
Anthony Calosa
44cb0d995e support some cards discarded by opponent 2017-03-16 10:58:27 +08:00
Anthony Calosa
c73d08187b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-16 06:11:27 +08:00
Anthony Calosa
4382c34539 Merge pull request #962 from kevlahnota/master
minor fixes
2017-03-15 12:54:44 +08:00
Anthony Calosa
cb173b7bf9 update unsupported 2017-03-15 11:46:47 +08:00
Anthony Calosa
b5d4674471 unused variable 2017-03-15 11:23:53 +08:00
Anthony Calosa
be1803dfb6 unearth rule 2017-03-15 06:35:30 +08:00
Anthony Calosa
417c1af21e hide action stack
if there's a human player and a menu object
2017-03-15 06:31:39 +08:00
Anthony Calosa
00bccd02da Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-15 06:16:46 +08:00
punkeduard
8596443da5 Fixing card primitives
Add flying to an angel and corrected some values on mana costs
2017-03-14 12:53:29 -06:00
Anthony Calosa
a2eda76a26 fix prefetch options 2017-03-14 17:06:14 +08:00
Anthony Calosa
b4e25838bd update targetchooser 2017-03-14 09:15:14 +08:00
Anthony Calosa
44d703887c Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-14 09:12:05 +08:00
Anthony Calosa
29fd3e4c96 Merge pull request #961 from kevlahnota/master
Totem Armor
2017-03-14 05:39:38 +08:00
Anthony Calosa
0778b13e2b Totem Armor 2017-03-14 03:40:29 +08:00
Anthony Calosa
bef1f6d8b8 aura parent 2017-03-13 18:16:22 +08:00
Anthony Calosa
d6a0b04930 Partial fix for Cards with Bestow
missing was to seperate the mode as aura enchantment or enchantment
creature when cast and update the cost
2017-03-13 13:32:43 +08:00
Anthony Calosa
87ae60f323 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-12 22:14:59 +08:00
Anthony Calosa
85df061701 Merge pull request #960 from kevlahnota/master
Update Rules
2017-03-12 12:14:09 +08:00
Anthony Calosa
4ed44c638f Update Rules
Also fix stack display and removed unnecessary code (border for card is
targetted/targetter since we used forcedborder in actionstack). Also
fixed some cards
2017-03-12 10:53:39 +08:00
Anthony Calosa
54f0cd7864 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-12 07:36:00 +08:00
Rolzad73
4f523b1b9b Non-commit to test build system 2017-03-11 12:01:07 -05:00
Anthony Calosa
d492481a4f Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-11 22:10:28 +08:00
Anthony Calosa
3975a45858 Merge pull request #959 from kevlahnota/master
Hide action stack & Sorted Filter
2017-03-11 10:48:17 +08:00
Anthony Calosa
5f2fbb370c fix 2017-03-11 07:57:54 +08:00
Anthony Calosa
d9bd6bbb32 cascade, cascade 2017-03-10 19:25:54 +08:00
Anthony Calosa
31814bda37 sort filter 2017-03-10 19:24:49 +08:00
Anthony Calosa
8f61b590f8 Hide Action stack if there's a menu object 2017-03-10 19:24:39 +08:00
Anthony Calosa
37642c1f78 rageform
rageform, lightform & cloudform support. withenchant is for only these
cards...
2017-03-10 14:14:02 +08:00
Anthony Calosa
8ea7b4d4cb Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-10 13:43:31 +08:00
Anthony Calosa
245f5c6e93 Merge pull request #958 from kevlahnota/master
Ripple Cards
2017-03-10 12:58:02 +08:00
Anthony Calosa
88d1c29621 safe delete 2017-03-10 08:49:35 +08:00
Anthony Calosa
44926393ac Ripple cards 2017-03-10 07:19:29 +08:00
Anthony Calosa
5d790c9406 moved lastcontroller override 2017-03-10 07:19:15 +08:00
Anthony Calosa
66261b0f51 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-10 07:08:56 +08:00
Anthony Calosa
e99a9abacd Merge pull request #957 from kevlahnota/master
Provoke
2017-03-09 19:34:10 +08:00
Anthony Calosa
b01c1455f5 Provoke
also add aicode for Amplify cards
2017-03-09 18:37:55 +08:00
Anthony Calosa
650d794eec Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-09 14:33:29 +08:00
Anthony Calosa
acf74e7f6e Merge pull request #956 from kevlahnota/master
Manifest Cards & corrections
2017-03-09 09:07:45 +08:00
Anthony Calosa
53f0c2421d manifest support
also fix guiplay
2017-03-09 07:44:06 +08:00
Anthony Calosa
01d46615a7 fix credits 2017-03-09 02:01:08 +08:00
Anthony Calosa
57f55e4270 corrections 2017-03-08 22:44:34 +08:00
Anthony Calosa
5c159e86d7 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-08 20:52:04 +08:00
Anthony Calosa
fb03037923 Merge pull request #955 from kevlahnota/master
Adjust stack display & game credits
2017-03-08 16:14:09 +08:00
Anthony Calosa
ff6e4aec9a adjust stack display & game credits
the stack will display the latest object always on TOP so we can see
which will resolve first, the last to resolve will always be on
bottom... also increase credit bonus. default is 500 credits and for
momir will be 800 credits.
2017-03-08 13:38:19 +08:00
Anthony Calosa
c78db0eb26 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-08 05:46:00 +08:00
Anthony Calosa
324e206b74 Merge pull request #954 from kevlahnota/master
Deck Sideboard and Wish Cards
2017-03-08 02:37:09 +08:00
Anthony Calosa
030dca051a support for wish cards and deck sideboard 2017-03-07 23:42:34 +08:00
Anthony Calosa
24e3fd3267 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-07 15:47:18 +08:00
Anthony Calosa
a28f6b1194 Merge pull request #953 from kevlahnota/master
Etched Affinity stalling the game
2017-03-07 05:32:38 +08:00
Anthony Calosa
38e97aa79f fix etched affinity stalling the game
add an alias for glimmervoid and removed the hold combo hint for
glimmervoid, just tried etched affinity vs etched affinity on demo for
50 games... it doesn't stall anymore. it seems there's a conflict
somewhere parsing hint combo? not really sure... also in momir the ai
don't click choose a color command, noticed on lotus cobra so i changed
the chooseacolor to abilty$! add{mana} ...
2017-03-06 17:52:44 +08:00
Anthony Calosa
8adfd1b10b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-06 12:52:58 +08:00
Anthony Calosa
ffda7a53fe Merge pull request #952 from kevlahnota/master
Prefetching as options
2017-03-06 11:19:53 +08:00
Anthony Calosa
20ddd9157f prefetching options 2017-03-06 10:41:52 +08:00
Anthony Calosa
a3f329bd7a Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-06 10:40:25 +08:00
Anthony Calosa
13c6837b60 Merge pull request #951 from kevlahnota/master
Show large images on grid deck view user option
2017-03-06 06:25:03 +08:00
Anthony Calosa
84fe9fbc74 highlight border fix
all selected/targeted cards ar bordered red while the source is green
border
2017-03-05 22:38:53 +08:00
Anthony Calosa
e5ec92ac2a corrected order of options 2017-03-05 22:09:12 +08:00
Anthony Calosa
12155f9390 forgot this 2017-03-05 21:56:54 +08:00
Anthony Calosa
00da0bd0d1 seperate tabs
Misc setting that I added
2017-03-05 21:28:18 +08:00
Anthony Calosa
4bf5943ac5 show large images on grid deck view user option
also forced border targets and target source
2017-03-05 19:43:49 +08:00
Anthony Calosa
f205de7205 minor fix 2017-03-04 09:15:50 +08:00
Anthony Calosa
f782c535f9 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-04 06:49:06 +08:00
Anthony Calosa
030d6bc4bb Merge pull request #950 from kevlahnota/master
Swap zones - exile and library for opponent
2017-03-04 05:42:34 +08:00
Anthony Calosa
9c10574e49 replaced some overlay 2017-03-04 04:24:40 +08:00
Anthony Calosa
9512e5c3db fix overlapping of phaseinfo/phase bar
the opponent cards will stack according to handsize
2017-03-04 04:24:10 +08:00
Anthony Calosa
8686fef96a enstacking of card during combat
during combat damage, the cards will not move/enstack so we can see what
happened to those creatures...
2017-03-04 04:23:19 +08:00
Anthony Calosa
06285c11c7 swap zone position for opponent
swap position of opponent exile zone and opponent library zone, since a
lot of codes use reveal for library, and hand, it's much easier to
target the exile . Also cards that display from the top of library is
not blocked anymore.
2017-03-04 04:21:43 +08:00
Anthony Calosa
3b58790c96 Add files via upload 2017-03-04 02:34:33 +08:00
Anthony Calosa
a8b494f960 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-04 02:28:51 +08:00
Anthony Calosa
72c6f448d0 Merge pull request #949 from kevlahnota/master
Support for playing the top card of library
2017-03-03 22:57:37 +08:00
Anthony Calosa
ce3c75817c draw line when attacking planeswalker 2017-03-03 22:20:38 +08:00
Anthony Calosa
56c943d6d1 bug fix
reset will attack player/planeswalker
2017-03-03 22:20:13 +08:00
Anthony Calosa
21b0b4c524 Play the Top Card of Library 2017-03-03 18:49:36 +08:00
Anthony Calosa
51daf691b3 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-03 11:20:39 +08:00
punkeduard
e889aff42c Merge branch 'refs/heads/Mine' 2017-03-02 20:37:48 -06:00
punkeduard
df07b6dc9e Corrected some text on cards primitives 2017-03-02 20:34:30 -06:00
Anthony Calosa
63c15b54d6 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-03 06:31:41 +08:00
Anthony Calosa
b76a231083 Merge pull request #948 from kevlahnota/master
Attack Menu
2017-03-03 06:06:57 +08:00
Anthony Calosa
e0f58e1916 attack/block cost value 2017-03-03 00:39:23 +08:00
Anthony Calosa
78bfa604e2 tidy up attack menu 2017-03-02 21:46:29 +08:00
Anthony Calosa
dcbe0c40b0 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-02 18:59:07 +08:00
Anthony Calosa
f384d75de8 Merge pull request #947 from kevlahnota/master
Fix Aura/Equipment on Illegal Objects
2017-03-02 16:51:11 +08:00
Anthony Calosa
cf6084071b fix aura attached on illegal objects
704.5n If an Aura is attached to an illegal object or player, or is not
attached to an object or player, that Aura is put into its owner’s
graveyard.

704.5p If an Equipment or Fortification is attached to an illegal
permanent, it becomes unattached from that permanent. It remains on the
battlefield.

704.5q If a creature is attached to an object or player, it becomes
unattached and remains on the battlefield. Similarly, if a permanent
that’s neither an Aura, an Equipment, nor a Fortification is attached to
an object or player, it becomes unattached and remains on the
battlefield.
2017-03-02 14:26:06 +08:00
Anthony Calosa
0150796064 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-02 14:10:01 +08:00
Anthony Calosa
f91186ffa4 Merge pull request #946 from kevlahnota/master
lastcontroller & card update
2017-03-02 10:50:43 +08:00
Anthony Calosa
ba73da321b minor 2017-03-02 07:56:41 +08:00
Anthony Calosa
8ae3e1ea98 quick fix 2017-03-01 21:13:47 +08:00
Anthony Calosa
fa5b075af5 update lords
lastcontroller override
2017-03-01 20:51:06 +08:00
Anthony Calosa
a66fced2f7 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-03-01 18:51:26 +08:00
Anthony Calosa
33492602fb Merge pull request #945 from kevlahnota/master
Updated attack rule & revert some activated "lord" to use "all"
2017-03-01 18:49:02 +08:00
Anthony Calosa
b7dae1025b Refactored PW Attack Rule 2017-03-01 17:53:40 +08:00
Anthony Calosa
7627a00dce arboria 2017-03-01 16:09:31 +08:00
Anthony Calosa
d761bac85c revert pw attack rule
need to refactor this as this cause crashes on android when you cast a
planeswalker
2017-03-01 16:07:12 +08:00
Anthony Calosa
3bf1cca118 removed this 2017-03-01 14:15:57 +08:00
Anthony Calosa
cdb056e8ba forgot this 2017-03-01 10:45:17 +08:00
Anthony Calosa
e47256eae7 update cant attack rule
If it says cant attack or cant attack You or PlanesWalker, creatures
cant attack a player or planeswalker, If it says cant attack You,
creatures cant attack a player only but can attack a PlanesWalker
2017-03-01 10:35:47 +08:00
Anthony Calosa
5f1874edae planeswalker attack 2017-03-01 06:36:10 +08:00
Anthony Calosa
22376e873e corrections
seems lord is persistent now
2017-02-28 21:45:34 +08:00
Anthony Calosa
02d882a7c3 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-28 18:22:59 +08:00
Anthony Calosa
d878e0c450 Merge pull request #944 from kevlahnota/master
Momir Indicator (non PSP)
2017-02-28 18:12:40 +08:00
Anthony Calosa
1430cfd6b4 momir indicator (non PSP)
green + can play a land, red + means you already played a land/ or cant
play a land anymore. also some minor fix
2017-02-28 17:32:01 +08:00
Anthony Calosa
5a3493c0c9 update spelltargettype 2017-02-28 16:19:59 +08:00
Anthony Calosa
911f8f6de6 update scry then draw
also moved "show token in editor" in general settings
2017-02-28 10:41:46 +08:00
Anthony Calosa
fe8fbd058b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-28 06:50:13 +08:00
Anthony Calosa
c4529a0949 Merge pull request #943 from kevlahnota/master
Filter View
2017-02-28 06:23:21 +08:00
Anthony Calosa
6ec3a68f0a update some cards 2017-02-27 22:52:33 +08:00
Anthony Calosa
458731778d add options show tokens
you can display tokens in editor (show tokens and choose 0 manacost) but
you can't add them, useful for tracking missing images...
2017-02-27 21:50:15 +08:00
Anthony Calosa
64547271dc Filter View
Tokens are excluded in deck editor, filter and adjust filter menu
2017-02-27 13:21:35 +08:00
Anthony Calosa
9e584951ac Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-27 06:50:31 +08:00
Anthony Calosa
c859fdd08e Merge pull request #942 from kevlahnota/master
Crash fix and some card update
2017-02-27 00:34:16 +08:00
Anthony Calosa
1380ee6f20 equal
typo fix
2017-02-26 23:21:23 +08:00
Anthony Calosa
2da2272a53 update some cards 2017-02-26 23:13:45 +08:00
Anthony Calosa
17b6996ae4 tokens
cant buy and/or add tokens in deck editor and shop...
also adjust filter menu
2017-02-26 21:21:11 +08:00
Anthony Calosa
0f82b6efba crash fix mana ability filter 2017-02-26 15:22:16 +08:00
Anthony Calosa
178fcb9717 update some cycled cards 2017-02-26 09:38:11 +08:00
Anthony Calosa
19f0c653d1 add 1k to steal credits
maxglee profile
2017-02-26 09:36:32 +08:00
Anthony Calosa
7dc76876e4 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-25 20:48:07 +08:00
Anthony Calosa
60457886cc Merge pull request #941 from kevlahnota/master
Customlen
2017-02-25 12:19:25 +08:00
Anthony Calosa
ec078b6ccc customLen
for formatting text on booster shop, we pass the desired length from
getformatted text with noremove(no removal of {}) enabled, if its not
enabled then default the value to zero(passing zero means use the
default values)
2017-02-25 07:27:57 +08:00
Anthony Calosa
ec730a4383 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-25 07:22:27 +08:00
Anthony Calosa
b2b3255f59 Merge pull request #940 from kevlahnota/master
Booster Shop
2017-02-24 22:21:22 +08:00
Anthony Calosa
df925cfcb0 booster shop enhancement 2017-02-24 21:45:43 +08:00
Anthony Calosa
5b96f30b1a reversed 2017-02-24 18:22:01 +08:00
Anthony Calosa
8feb870c8f shop enhancements 2017-02-24 17:29:59 +08:00
Anthony Calosa
d0b2340a73 crash fix in buying booster
this should be in game only
2017-02-24 15:04:12 +08:00
Anthony Calosa
efac298eb0 revert jtypes 2017-02-24 15:03:28 +08:00
Anthony Calosa
453c5b0d6e Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-24 10:06:00 +08:00
Anthony Calosa
816010582a Merge pull request #939 from kevlahnota/master
Update some cards
2017-02-24 08:55:00 +08:00
Anthony Calosa
a260eb11a8 crash fix 2017-02-24 07:25:38 +08:00
Anthony Calosa
b1d271f1c2 add forced interrupt 2017-02-24 07:25:19 +08:00
Anthony Calosa
3faa959c09 updated some cards 2017-02-24 06:02:00 +08:00
Anthony Calosa
a12a5e1637 test swap 2017-02-23 19:05:37 +08:00
Anthony Calosa
7c6d59a292 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-23 19:04:15 +08:00
Anthony Calosa
9836d8595c Merge pull request #938 from kevlahnota/master
Refactor efficiency
2017-02-23 18:17:15 +08:00
Anthony Calosa
c9d5dfaf1b minor adjustments 2017-02-23 18:16:23 +08:00
Anthony Calosa
028f6cbb4e u32 2017-02-23 17:11:42 +08:00
Anthony Calosa
c56d1b0bec pixel type
psp
2017-02-23 16:33:38 +08:00
Anthony Calosa
2e61f6c13d test pixel_type 2017-02-23 16:08:04 +08:00
Anthony Calosa
8437467320 refactor revealed efficiency
it's based now on actual aicode if it's available.
2017-02-23 14:10:27 +08:00
Anthony Calosa
039be43c2b set the current controller to do action
let the controller of the action do the abilty, also fix casted cards
that's been casted using castcard and be put into its owner's graveyard
2017-02-23 14:04:16 +08:00
Anthony Calosa
a1af7d9b9f add black border option
if enabled, all cards will have black border
2017-02-23 08:38:15 +08:00
Anthony Calosa
4ce37964f4 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-22 22:26:28 +08:00
Anthony Calosa
c1cdfa78d3 Merge pull request #937 from kevlahnota/master
update some cards
2017-02-22 22:06:31 +08:00
Anthony Calosa
ff4911116c update some cards
removed phasedout trigger
add phasedoutbonus - ability
2017-02-22 18:25:39 +08:00
Anthony Calosa
bb9d98cc0c AI ignore sphinx of jwar isle 2017-02-20 23:23:13 +08:00
Anthony Calosa
2d93d9b3cc moved this block for PSP
maybe we can fix the GUI for psp, low priority for now
2017-02-20 22:08:09 +08:00
Anthony Calosa
1c60ba6e7f crash fix
when you generate a castcard, then exit the game, an exception occurs to
SAFE_DELETE(cards[i]->previous) && SAFE_DELETE(cards[i]) in
mtggamezones.cpp line 548 and 549.
2017-02-20 22:06:56 +08:00
Anthony Calosa
11b3989615 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-20 10:08:28 +08:00
Anthony Calosa
c9f26a48c7 Merge pull request #936 from kevlahnota/master
update some cards
2017-02-19 23:23:06 +08:00
Anthony Calosa
75cbaf0f06 update mana producer
change && to andability
2017-02-19 22:44:33 +08:00
Anthony Calosa
de1dc6828d try to fix phase name
sometimes its invalid phase name
2017-02-19 22:11:54 +08:00
Anthony Calosa
e6bf23e536 add saclands cost
sacrifice all lands {saclands} cost
2017-02-19 22:11:16 +08:00
Anthony Calosa
5b16ff4a69 bypass update when reveal display is still active 2017-02-19 21:11:24 +08:00
Anthony Calosa
ed42c3fd29 support andability in mana producer
so cards that parse mana abilities can be read (reflecting pool. etc..
fixes issue #700 but we need to update the code from add{mana} && do
something to add{mana} and!( do something)! )
2017-02-19 21:11:02 +08:00
Anthony Calosa
9cd67eedc1 refactor canproducemana 2017-02-19 21:08:07 +08:00
Anthony Calosa
acc589bdb6 universal border 2017-02-19 10:16:25 +08:00
Anthony Calosa
2d78512ca2 bypass gamestate check
when there is an opened display for reveal... it will update after its
finished...
2017-02-19 10:14:43 +08:00
Anthony Calosa
84023a5f66 test fix 2017-02-18 21:36:38 +08:00
Anthony Calosa
443f378d1b updated some card
a lot of cards needs update though...
2017-02-18 21:20:45 +08:00
Anthony Calosa
d4989d7576 replaced alphabeta 2017-02-17 21:31:41 +08:00
Anthony Calosa
860b0b64e3 Adjust Extracost string 2017-02-17 19:17:23 +08:00
Anthony Calosa
ba40253a46 Phase out Event & Trigger 2017-02-17 14:25:33 +08:00
Anthony Calosa
95b81b6425 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-17 05:26:28 +08:00
Anthony Calosa
b664c2bed1 Merge pull request #935 from kevlahnota/master
Some New Changes
2017-02-16 22:33:58 +08:00
Anthony Calosa
c6c4c17b30 try to fix parenthesis
:(
2017-02-16 21:57:17 +08:00
Anthony Calosa
5e46016c4d added new legend & pw rule, trigger & event
added new pw & legend rule (i just leave the old rules behind and
disabled it), added phasesin, faceup, copiedacard event, added facedup &
phasedin trigger.
2017-02-16 21:26:03 +08:00
Anthony Calosa
da874738d6 castcard generated card 2017-02-16 17:10:06 +08:00
Anthony Calosa
0a68a056d8 refactor canproducemana 2017-02-16 16:55:13 +08:00
Anthony Calosa
5a3a32462d first set of changes
updated some cards
2017-02-16 02:44:42 +08:00
Anthony Calosa
c70762f871 readded modified rule 2017-02-16 02:39:03 +08:00
Anthony Calosa
6c28496dd8 reduced efficiency 2017-02-16 00:42:54 +08:00
Anthony Calosa
90ed6e1fdd chooseacolor indicator
replaced text with color filled rectangle
2017-02-16 00:28:07 +08:00
Anthony Calosa
60d7675a36 necroed
hide cards using necroed
also fix castcard target if its a land.
2017-02-15 10:27:56 +08:00
Anthony Calosa
a9b42127d1 added mypos
mypos returns cards zpos (zone position)
2017-02-15 07:30:13 +08:00
Anthony Calosa
01fdcfdfec zpos and zone display
added zone position (adjust dynamically), also inverts the display of
the zone so we always get the top/recent one... the library zpos is
inverted so if we choose to target the top 5 zpos like
target(*[zpos>=5|mylibrary), it will do from top to bottom... this is
only for AI so we can add alternate code for them since they cant use
reveal atm, we can make them target within allowed range...
Also this commit disabled the  new legend and planeswalker rule since it
conflicts with reveal ability, unless I/We figure it out, I recommend to
use the old one...
2017-02-14 22:30:50 +08:00
Anthony Calosa
2d383e237f hiddenview
if the target is in library and the source has the hiddenface ability
then hide it
2017-02-14 05:09:28 +08:00
Anthony Calosa
143b3d98b1 modified guiopponenthand 2017-02-13 20:11:07 +08:00
Anthony Calosa
6f4377de76 Inverted this
we transform with no value.. get the value first then transform it to
lower...
2017-02-13 17:54:55 +08:00
Anthony Calosa
722056e78a moved this 2017-02-13 10:43:22 +08:00
Anthony Calosa
21710ddfb3 refactor AAMover getmenu text 2017-02-13 09:35:05 +08:00
Anthony Calosa
13f590c6a2 hiddenface
if the source has hiddenface ability then all of its targets will not
show on the stack ability, useful for cards like demonic tutor etc...
2017-02-13 08:26:06 +08:00
Anthony Calosa
d604ae2d77 add gravecast restriction
if gravecast then do something
-> translates when this card was cast from a graveyard
2017-02-13 07:49:37 +08:00
Anthony Calosa
7a35c253cb refine display 2017-02-12 19:43:10 +08:00
Anthony Calosa
b5129f702e add multi target quads
stack displays target quads up to 10 targets. also displays actual
number of targets...
2017-02-12 10:29:13 +08:00
Anthony Calosa
6b1e51b4f6 revised masks 2017-02-12 07:08:31 +08:00
Anthony Calosa
3776bff594 add effeciency to use the reveal ability
aicode overrides this on resolve and it seems most cards that have this
has possitive effect
2017-02-11 22:04:20 +08:00
Anthony Calosa
3afcc7fdf9 fix hang aicode ability controller
aicode should be dedicated for AI only...
2017-02-11 18:25:45 +08:00
Anthony Calosa
e74921cbdf fix crash for multiple andAbility 2017-02-11 16:17:31 +08:00
Anthony Calosa
e9c33e3bea revised shocklands 2017-02-11 01:28:14 +08:00
Anthony Calosa
36d4db49ca bug fix 2017-02-11 00:04:17 +08:00
Anthony Calosa
2c40c77403 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-11 00:02:22 +08:00
Anthony Calosa
15febaf851 Merge pull request #934 from kevlahnota/master
Crash fix
2017-02-10 23:02:33 +08:00
Anthony Calosa
02dce1af2e crash fix
transform getaicustomcode to lower
2017-02-10 21:00:18 +08:00
Anthony Calosa
5915ceb0a5 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-10 17:36:55 +08:00
Anthony Calosa
d6f666d9a0 Merge pull request #933 from kevlahnota/master
added AER Cards
2017-02-10 16:53:28 +08:00
Anthony Calosa
37fa69fc39 added AER cards 2017-02-10 16:10:15 +08:00
Anthony Calosa
8e47927805 some corrections 2017-02-10 16:03:03 +08:00
Anthony Calosa
f1c1161da5 added AER set 2017-02-10 16:02:29 +08:00
Anthony Calosa
392382e3e3 missing AER 2017-02-10 16:00:03 +08:00
Anthony Calosa
d6403918b6 crash fix
corrected some cards that crashes the game
2017-02-10 13:57:46 +08:00
Anthony Calosa
fc9b0b233c add attacker mask 2017-02-10 10:50:09 +08:00
Anthony Calosa
f16755b86b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-10 09:20:00 +08:00
Anthony Calosa
f45e975b14 add remake keyword
alternative for becomes for use inside transforms...
ex. emblem transforms((,newability[target(land)
remake(creature:1/2:red)])) forever dontremove
2017-02-09 22:38:00 +08:00
Anthony Calosa
b3de6a283d Merge pull request #932 from kevlahnota/master
Some bug fixes
2017-02-09 21:48:51 +08:00
Anthony Calosa
7fa204fc9c forgot to change this 2017-02-09 19:15:32 +08:00
Anthony Calosa
f284a9691b some fixes
fixes fabricate
fixes lorded lands
add propagate keyword (like proliferate but it increases all counters)
cards with proliferate can choose a player now
2017-02-09 15:22:10 +08:00
Anthony Calosa
9bb63a68f5 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-08 21:34:15 +08:00
Rolzad73
77d20e89c8 - fixed upload-binaries error from bad debug trace 2017-02-07 20:58:32 -05:00
Anthony Calosa
66f664207a Merge pull request #931 from kevlahnota/master
Changes
2017-02-07 22:12:39 +08:00
Anthony Calosa
bac69f95d8 some changes
change keyword "makecardt" alternative token creator to "create" keyword
add lifeleech - gain life lost with target
2017-02-07 21:22:49 +08:00
Anthony Calosa
75e372ac9b adjust enstack attackers
so we have small room for the phase wheel for touch enabled device
2017-02-07 17:00:37 +08:00
Anthony Calosa
ef31192f33 modified flickleft for android
if you flick/swipe left or right when the closedhand option is visible
in Android, you simulate scroll up/down.
example scenario at opponent's turn with a spell on the stack, swipe
down to interrupt then do something, if you open a zone like library or
graveyard or exile and you want to interract from the zone there (like
casting spell or doing ability from that zone, you can flick left or
right to close that zone so you can tap for mana or any other extra
costs for that spell, you can open the zone if possible just by tapping
it like it used to.)
2017-02-07 16:59:19 +08:00
Anthony Calosa
fde707b726 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-07 16:52:04 +08:00
Anthony Calosa
e158e95245 Merge pull request #930 from kevlahnota/master
auto close
2017-02-07 14:08:54 +08:00
Anthony Calosa
5b23cc2e33 auto close 2017-02-07 13:10:58 +08:00
Anthony Calosa
c72cdff0f1 Merge pull request #929 from kevlahnota/master
Some Bug Fixes
2017-02-06 22:25:59 +08:00
Anthony Calosa
831c8f73b0 some bug fixes
fix where the copier is treated as the same copied card, also fixes the
display ability of momir (forced), disabled reveal for AI if aicode is
not found (should add alternate for ai).
2017-02-06 21:48:41 +08:00
Anthony Calosa
2dc6c62acb Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-06 21:47:48 +08:00
Anthony Calosa
9e1d1a056c Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-06 05:56:00 +08:00
Rolzad73
9a32ae2c6d Merge pull request #928 from WagicProject/appveyor_testing
Just adding some console output to Appveyor build
2017-02-05 16:23:10 -05:00
Anthony Calosa
b1a2003a84 Merge pull request #927 from kevlahnota/master
Modified Momir
2017-02-05 22:57:38 +08:00
Anthony Calosa
e2c1d62552 modified Momir 2017-02-05 22:14:20 +08:00
Anthony Calosa
db0f6d6c0b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-05 21:08:37 +08:00
Xawotihs
bc44ee8056 And again 2017-02-05 11:48:30 +01:00
Xawotihs
65a9bd55d8 Tries to fix iOS/MacOSX builds 2017-02-05 11:03:51 +01:00
Anthony Calosa
2aa0668c28 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-05 16:45:13 +08:00
Rolzad73
9f5e37a03c - added even more meaning to release upload script case 2017-02-05 01:13:38 -05:00
Rolzad73
f27763870c Merge pull request #926 from WagicProject/qt_test_crash_fix
small QT build CI fix
2017-02-05 01:00:52 -05:00
Rolzad73
ab22e02db8 - cleaned up error msg bug 2017-02-05 00:38:37 -05:00
Rolzad73
257afd3525 - added more meaning to release upload script case 2017-02-05 00:29:00 -05:00
Rolzad73
eec38de558 - testing appveyor env vars 2017-02-05 00:04:47 -05:00
Rolzad73
35de677999 - stop mysterious ~QNetworkConfiguration() SIGSEGV issue at end of console testsuite run 2017-02-04 23:09:13 -05:00
Anthony Calosa
8b9dfdf96d bug fix 2017-02-05 08:07:12 +08:00
Anthony Calosa
c830ef88ca Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-05 07:11:05 +08:00
Anthony Calosa
ba0daed776 Merge pull request #924 from kevlahnota/master
Refactor countManaProducedby
2017-02-05 06:38:05 +08:00
Anthony Calosa
f37d946b4e Removed unused variable 2017-02-04 23:33:08 +08:00
Anthony Calosa
477419cc32 Refactor countManaProducedby
cards that uses this should not crash anymore with lorded mana producer
from instants like rain of filth...
2017-02-04 22:37:21 +08:00
Anthony Calosa
70e8d1c4b3 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-04 20:47:05 +08:00
Rolzad73
732f795be4 - fixing last commit broke no QT builds 2017-02-03 21:05:14 -05:00
Rolzad73
00536fa3d9 - Qthread include fix for console QT build method and QT TESTSUITE target 2017-02-03 19:42:55 -05:00
Anthony Calosa
042f00cc58 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-03 22:31:33 +08:00
Anthony Calosa
acef89ea03 Merge pull request #923 from kevlahnota/master
Revert Functionality
2017-02-03 21:46:21 +08:00
Anthony Calosa
d7770d285f not needed anymore 2017-02-03 20:55:32 +08:00
Anthony Calosa
7932941a01 Revert Functionality
AACopier and AACloner should work with andAbility now...
2017-02-03 20:45:46 +08:00
Anthony Calosa
c4eac5e62b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-03 15:55:27 +08:00
Anthony Calosa
763bd60e74 Merge pull request #922 from kevlahnota/master
Some Fixes
2017-02-03 15:12:17 +08:00
Anthony Calosa
3fa52e7ac5 corrections 2017-02-03 14:26:26 +08:00
Anthony Calosa
9104afdef7 Cleanup 2017-02-03 10:39:45 +08:00
Anthony Calosa
942c95e736 revised copier copied abilities
the clone should copy original abilities only
2017-02-03 10:31:10 +08:00
Anthony Calosa
dc696a0f45 fix random segmentation fault
should fix the crash -> rain of filth in test suite
2017-02-03 10:30:14 +08:00
Anthony Calosa
d26e9da6c4 add some restrictions 2017-02-03 07:59:13 +08:00
Anthony Calosa
ea09b1f6bc Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-03 02:35:24 +08:00
Rolzad73
da033eb28e Merge pull request #919 from WagicProject/key_bind_changes
key binding related
2017-02-02 11:18:46 -05:00
Rolzad73
b2a0ccba05 - removed leftover trace log 2017-02-02 10:08:58 -05:00
Anthony Calosa
3f146c94e5 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-02 13:46:21 +08:00
Anthony Calosa
9d92bdcd75 Merge pull request #918 from kevlahnota/master
Refactor PW Rule & some bug fixes
2017-02-02 13:21:57 +08:00
Anthony Calosa
6354d8ccca revised pw rule
also fixed where planeswalker can use its ability after it was
transformed/flipped by activation ex. Garruk Relentless... You can’t
activate a loyalty ability of Garruk Relentless and later that turn
after he transforms activate a loyalty ability of Garruk, the
Veil-Cursed.
2017-02-02 11:58:51 +08:00
Rolzad73
1d0237f15d - added ability to reload default key bindings
- reverted keybindings display back to action names instead of PSP key equivalent (see commit commit 168154b52d)
2017-02-01 22:53:01 -05:00
Anthony Calosa
c535d033ec fix Dark Depths
there should a window for the triggered sacrifice and legend rule.
2017-02-02 11:08:17 +08:00
Anthony Calosa
fcf900c5e0 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-02 11:05:20 +08:00
Anthony Calosa
c265ce8222 Bug Correction
PermanentAbility to ListMaintainerAbility in Legend Rule, it seems It's
finally fixed even with a lot of targetchooser and copy effects.
2017-02-02 09:58:38 +08:00
Anthony Calosa
658b90067a Merge pull request #917 from kevlahnota/master
Crew Bonus & Bug Fix
2017-02-02 03:09:11 +08:00
Anthony Calosa
80b6496780 bug fix 2017-02-01 22:37:00 +08:00
Anthony Calosa
711934a249 Crew Corrections 2017-02-01 18:40:09 +08:00
Anthony Calosa
ea5e397595 Crew Ability Cost & Crewbonus
Revised cards to use {crew(targetchooser)} (modified taptargetcost) so
it can use crewbonus ability from other creatures.
2017-02-01 17:11:55 +08:00
Anthony Calosa
c8dc416071 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-01 17:08:02 +08:00
Anthony Calosa
30026fc307 Merge pull request #916 from kevlahnota/master
refactor Legend Rule and other Bug fixes
2017-02-01 10:40:02 +08:00
Anthony Calosa
7b0fdcd721 refactor Legendary Rule 2017-02-01 09:49:36 +08:00
Anthony Calosa
c0afb3b95e added WEventGameStateBasedChecked 2017-02-01 09:48:40 +08:00
Anthony Calosa
5504bf23d1 corrected dimir doppelganger 2017-02-01 09:47:31 +08:00
Anthony Calosa
28b51d3335 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-02-01 09:33:35 +08:00
Rolzad73
fb91726c35 Merge pull request #915 from WagicProject/test_suite_function_fix
- fixed small compiling error for a function in testsuite
2017-01-31 13:10:19 -05:00
Anthony Calosa
a97a7edca6 minor refactor 2017-01-31 22:01:19 +08:00
Anthony Calosa
92b4909fc8 add some cards 2017-01-31 21:19:34 +08:00
Anthony Calosa
3998c21178 fix persist on copied card 2017-01-31 20:11:59 +08:00
Anthony Calosa
41d925d7c9 add support for activated copier
thespian stage etc...
2017-01-31 20:11:09 +08:00
Anthony Calosa
7029636291 some corrections 2017-01-31 04:16:47 +08:00
Rolzad73
a916c1067f - fixed small compiling error for a function in testsuite
- indentation formatting on DebugRoutines
2017-01-30 14:02:25 -05:00
Anthony Calosa
7322d4da8b fix castcard opponent spell
the casted non-permanent card from opponent will now move to its owner
graveyard...
2017-01-30 07:09:21 +08:00
Anthony Calosa
31f15b12cb Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-01-29 20:16:09 +08:00
Anthony Calosa
4d3e463aba Merge pull request #913 from kevlahnota/master
Revised AACopier and Fix Legend Rule
2017-01-29 17:17:04 +08:00
Anthony Calosa
166526dbbe Fix Legend Rule
Should fix the the move to graveyard effect with targetchooser
ability...
2017-01-29 16:30:13 +08:00
Anthony Calosa
348ada3f0d revised aacopier
I think we still need to change legend to a trigger once it detects
multiple legends in play then trigger it at once with targetchooser to
select which cards to sacrifice as state based... vector of  unique
names or id or mtgcardinstance?
2017-01-29 16:09:49 +08:00
Anthony Calosa
2c5f6d8332 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-01-29 10:29:10 +08:00
Anthony Calosa
e128d548f4 disable andAbility for aacopier
so it will not conflict with original legend rule...
2017-01-29 10:27:18 +08:00
Rolzad73
bb2ab1c1fe Merge pull request #911 from Rolzad73/x11_fixes
X11 build fixes
2017-01-28 13:17:50 -05:00
Rolzad73
715bedb71a - Travis PSP build broke, attempt to fix 2017-01-28 05:05:35 -05:00
Rolzad73
8fed9e47d1 - Travis PSP build broke, attempt to fix 2017-01-28 04:50:07 -05:00
Rolzad73
89f8f7e25e Merge pull request #910 from WagicProject/travis_edit
Test travis QT build artifact zipped for upload
2017-01-28 04:43:06 -05:00
Rolzad73
7bbba293a6 - reverted Travis test 2017-01-28 04:42:42 -05:00
Rolzad73
d57a694d3c - last commit small clean 2017-01-28 04:32:39 -05:00
Rolzad73
f31d5c04c8 - revert android gamepad log change for mergable x11 fixes 2017-01-28 04:29:47 -05:00
Rolzad73
85f66a8fec X11 build fixups
- fixed -Werror=misleading-indentation warning
- fixed -Werror=nonnull-compare warning on xll and QT builds
- PNG_LIBPNG_VER backward compatibily changes
- giflib backward compatibily changes
- resolved some undefs for X11 build
- silenced some small compile warnings in JGE Makefile
- added -DTIXML_USE_STL to remaining build types (PSP had it added)
- fixed x11 Boost incompatibility issue part of #548
- reworked PrecompiledHeader.h platforms used
2017-01-28 04:19:46 -05:00
Rolzad73
48ec606bc5 - attempt to break build upload sequence 2017-01-28 04:09:03 -05:00
Rolzad73
75cc809b16 - travis QT build artifact zipped for upload 2017-01-28 02:16:03 -05:00
Anthony Calosa
2a27a491e7 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-01-28 13:23:44 +08:00
Anthony Calosa
3e75d70632 revert this
I introduce more bugs than helped. I think there's alternative method
for this,,,
2017-01-28 13:23:30 +08:00
Anthony Calosa
cf2d094df6 Merge pull request #905 from kevlahnota/master
Added KLD primitives
2017-01-28 12:41:10 +08:00
Rolzad73
18a7955240 Merge pull request #907 from WagicProject/travis_edit
attempt to add release upload from Travis CI for QT Linux variant
2017-01-27 23:36:51 -05:00
Rolzad73
22ebc27997 - attempt to add release upload from Travis CI for QT Linux variant 2017-01-27 22:57:21 -05:00
Anthony Calosa
c53ee24b5b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-01-28 07:38:50 +08:00
Anthony Calosa
25e681c04a test fix ensnaring bridge 2017-01-28 07:38:45 +08:00
Anthony Calosa
365e0b49ae cleanup 2017-01-28 07:38:27 +08:00
Rolzad73
e3dc78b28e - created proper branch on separate fork for dev work 2017-01-27 11:58:59 -05:00
Rolzad73
e3319f6fe4 Merge pull request #2 from WagicProject/master
Pulling changes from original project to forked version
2017-01-27 11:34:01 -05:00
Rolzad73
0a9b006a94 Merge pull request #906 from Rolzad73/master
Merge pull request #1 from WagicProject/master
2017-01-27 11:28:28 -05:00
Anthony Calosa
5692be3b66 remove 2 duplicate
Stone Quarry & Woodland Stream
2017-01-27 23:25:48 +08:00
Anthony Calosa
6ea5dea849 Added KLD primitives 2017-01-27 23:19:01 +08:00
Anthony Calosa
8debcf0fa2 KLD missing cards 2017-01-27 23:18:28 +08:00
Anthony Calosa
1cf4845cb2 added KLD set 2017-01-27 23:17:15 +08:00
Anthony Calosa
b9d1292add Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-01-27 22:15:27 +08:00
Anthony Calosa
19063fd8db some refactor
change some card from using "all" to "lord"
2017-01-27 22:15:03 +08:00
Rolzad73
76cf732100 Merge pull request #904 from WagicProject/build_clean
Simple build.xml cleanup
2017-01-26 23:17:13 -05:00
Anthony Calosa
30a7eef611 some corrections 2017-01-27 11:01:28 +08:00
Rolzad73
99f0020583 fix build.xml wrap error 2017-01-26 20:48:38 -05:00
Rolzad73
f2e0da47ed - minor whitespace and duplicate task (build.meego.changelog) cleanup of mtg ant build file 2017-01-26 20:05:19 -05:00
Anthony Calosa
ca66a428d8 C16 missing list 2017-01-27 06:18:36 +08:00
Anthony Calosa
f077a4e074 Merge pull request #903 from kevlahnota/master
KLD & AER support
2017-01-27 06:00:58 +08:00
Anthony Calosa
e46631a960 Merge branch 'master' of https://github.com/kevlahnota/wagic 2017-01-26 23:18:43 +08:00
Anthony Calosa
2da1957c70 Added C16 primitives 2017-01-26 23:18:37 +08:00
Anthony Calosa
ad6c48688d Added C16 set 2017-01-26 23:18:34 +08:00
Anthony Calosa
71da7fb384 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2017-01-26 23:11:52 +08:00
Anthony Calosa
0159e0e41e added some fixes 2017-01-26 22:34:07 +08:00
Anthony Calosa
457a3fdc7a Merge pull request #902 from WagicProject/travis_java_build_fix
Travis java build fix
2017-01-26 21:28:17 +08:00
Anthony Calosa
8507c0138d crash fix
when loading collection and shop
2017-01-26 21:02:12 +08:00
Anthony Calosa
4f7901b946 minor refactor 2017-01-26 21:01:45 +08:00
Anthony Calosa
e239dc039b fix phaseinfo/fakebar graphics
it should look nice now.. :)
2017-01-26 18:33:04 +08:00
Anthony Calosa
1428eeba06 fix copier token image 2017-01-26 15:32:17 +08:00
Anthony Calosa
adcf6fb86d refactor some equipments 2017-01-26 09:45:18 +08:00
Anthony Calosa
de2d663968 unattach animated equipment
another bug found is when the equipment becomes a creature, its ability
is granted to itself...
2017-01-26 02:12:02 +08:00
Anthony Calosa
60f6c683a3 test fix equipment
also added some primitive fixes, added macro for fabricate
2017-01-25 18:29:27 +08:00
Rolzad73
f8009672e9 - Travis build fix cleanup 2017-01-24 15:30:34 -05:00
Rolzad73
9fe5ac1994 - attempt forced JVM version setting for travis build 2017-01-24 14:51:03 -05:00
Rolzad73
58efb51c07 - attempt forced JDK version setting for travis build 2017-01-24 13:56:40 -05:00
Anthony Calosa
5c3a064746 aicode and revised legendary rule
added aicode for cards that uses reveal. since reveal cancels for ai,
aicode is the alternative code. use basic code only.
aicode=activate dosomething...
aicode - use with caution, its very basic atm and you must test each
card that uses it as it can cause crash.
legendary rule moved to game state based effect so it will not conflict
with cards with copy effects and andability. the legendary check applies
only when  legendrule is found.
2017-01-24 16:10:35 +08:00
Anthony Calosa
94aefa6dba notany attribute
anytypeofmana makes manacost colorless... wip
2017-01-23 18:32:58 +08:00
Anthony Calosa
7f6e96459c added "energized" event
energizedof(player):do something
energizedfoeof(player):do something
also some fixes in the primitives
2017-01-23 11:41:19 +08:00
Anthony Calosa
6fe57be115 fix for cards with restrictions 2017-01-22 00:14:46 +08:00
Anthony Calosa
37b3f28065 additional fixes 2017-01-21 04:30:00 +08:00
Anthony Calosa
0b9468da1b add EXP
Zendikar Expeditions
2017-01-20 16:49:00 +08:00
Anthony Calosa
e558f21ebc add penergy & oenergy
count energy counters available
2017-01-20 15:39:27 +08:00
Anthony Calosa
71c1512ef2 some fixes
primitve corrections
2017-01-20 15:37:36 +08:00
Anthony Calosa
d03ebdace8 Support for KLD and AER
Kaladesh & Aether Revolt
2017-01-18 22:13:51 +08:00
Anthony Calosa
d86b9119a4 fix castcard interaction to reveal window
uses afterrevealed and becomes
2017-01-17 18:24:50 +08:00
Anthony Calosa
0ab872e152 Additional primitive fixes 2017-01-16 06:48:07 +08:00
Anthony Calosa
5e7f81678d Added some fixes by Toben
thanks Toben
2017-01-14 10:33:49 +08:00
Anthony Calosa
ff510248e9 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-09-08 06:01:40 +08:00
Anthony Calosa
bba5d4380d Merge pull request #897 from kevlahnota/master
revised tnum attribute
2016-09-08 05:53:32 +08:00
Anthony Calosa
39ad95d4db revised tnum attribute
so it can be used inside makecardt, also
2016-09-08 05:13:52 +08:00
Anthony Calosa
e9adde8ac6 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-09-06 21:29:55 +08:00
Anthony Calosa
8fc120d9f9 Merge pull request #895 from kevlahnota/master
revised "steal" ability
2016-09-06 16:38:39 +08:00
Anthony Calosa
7f8339aedf revised "steal" ability
steal - gain control of target/s until it leaves battlefield or  its
current controller loses control of the "stealer"...
2016-09-06 15:47:09 +08:00
Anthony Calosa
d2183f3b91 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-09-06 15:08:32 +08:00
Anthony Calosa
11b4aa7308 Merge pull request #894 from kevlahnota/master
Sorted & Updated Primitives
2016-09-05 19:44:42 +08:00
Anthony Calosa
51481daf03 Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-09-05 18:20:14 +08:00
Anthony Calosa
1bdd0f6e26 Sorted & Updated Primitives,
also added some cards
2016-09-05 18:20:05 +08:00
Anthony Calosa
1de492973e update missing cards by sets 2016-09-05 17:54:41 +08:00
Anthony Calosa
eea96dac73 Added CNS 2016-09-05 15:25:17 +08:00
Anthony Calosa
ebc378a620 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-09-05 15:22:42 +08:00
Anthony Calosa
3d08ca0cc1 Merge pull request #893 from kevlahnota/master
revised "colorless" attribute in targetchooser
2016-09-04 14:35:48 +08:00
Anthony Calosa
f11cc41df8 revised "colorless" attribute in targetchooser
also fix worldly tutor
2016-09-04 13:14:19 +08:00
Anthony Calosa
19ce59b1b4 Merge pull request #890 from kevlahnota/master
Add some C15 cards
2016-09-03 22:38:38 +08:00
Anthony Calosa
5101ac9d8e add some C15 cards 2016-09-03 21:38:24 +08:00
Anthony Calosa
5149882bb5 Add files via upload 2016-09-02 23:49:03 +08:00
Anthony Calosa
26222ee853 Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-09-02 10:12:55 +08:00
Anthony Calosa
0394e2cda9 Add files via upload 2016-09-02 10:12:42 +08:00
Anthony Calosa
501b310efa add some C14 cards 2016-09-02 10:11:51 +08:00
Anthony Calosa
53e0b1b81c Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-09-01 19:19:17 +08:00
Anthony Calosa
81be616847 Merge pull request #888 from kevlahnota/master
Add some missing cards from CMD
2016-08-31 16:19:33 +08:00
Anthony Calosa
b9b2c9afb0 Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-08-31 14:03:36 +08:00
Anthony Calosa
848cd9a485 Add files via upload 2016-08-31 14:03:22 +08:00
Anthony Calosa
75921e1130 add some cards from CMD to C13 2016-08-31 14:02:16 +08:00
Anthony Calosa
0b14639c66 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-31 01:48:52 +08:00
Anthony Calosa
5c54f85de4 Merge pull request #887 from kevlahnota/master
Add some cards from BFZ to EMN
2016-08-31 01:30:36 +08:00
Anthony Calosa
0202313bc8 Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-08-31 00:01:00 +08:00
Anthony Calosa
2671826b19 add some cards from BFZ to EMN 2016-08-31 00:00:43 +08:00
Anthony Calosa
7dc89ad090 Add files via upload 2016-08-31 00:00:16 +08:00
Anthony Calosa
c54f0ea329 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-30 22:04:00 +08:00
Anthony Calosa
d90f3ce309 Merge pull request #886 from kevlahnota/master
Add some cards from KTK block
2016-08-30 18:23:50 +08:00
Anthony Calosa
bcc6ced47c Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-08-30 17:37:45 +08:00
Anthony Calosa
1b5c61a285 added some cards from KTK sets
Also fix typos reported by sage. Thanks.
2016-08-30 17:37:38 +08:00
Anthony Calosa
ca95192de3 Add files via upload 2016-08-30 17:37:35 +08:00
Anthony Calosa
c2e04443e3 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-30 07:40:47 +08:00
Anthony Calosa
f4f8c94c6a Merge pull request #885 from kevlahnota/master
add custom name for generic reveal ability
2016-08-29 22:42:35 +08:00
Anthony Calosa
f957fca162 add custom name for generic reveal 2016-08-29 20:58:55 +08:00
Anthony Calosa
9671711bf5 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-29 09:05:15 +08:00
zethfoxster
ea3d4c67f8 Merge pull request #883 from zethfoxster/master
getting master
2016-08-28 10:05:51 -04:00
Anthony Calosa
cab1f59181 Merge pull request #882 from kevlahnota/master
Add missing cards from THS
2016-08-28 14:39:25 +08:00
Anthony Calosa
8c01611850 Add files via upload 2016-08-28 12:42:31 +08:00
Anthony Calosa
d6b682ab88 update/fix some card codes
also add some missing cards from THS block
2016-08-28 12:41:41 +08:00
zethfoxster
d2beaa0ab9 Merge pull request #51 from WagicProject/master
getting master
2016-08-27 14:19:59 -04:00
Anthony Calosa
ce0fafd45b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-27 20:28:26 +08:00
Anthony Calosa
c0dbd00b74 Merge pull request #881 from kevlahnota/master
fix halfup logic when used on negation
2016-08-27 20:16:31 +08:00
Anthony Calosa
a556aed34f Add files via upload 2016-08-27 19:32:48 +08:00
Anthony Calosa
8d19ee8ab3 add some missing cards 2016-08-27 19:31:27 +08:00
Anthony Calosa
8c4c80731c fix halfup logic when used on negation
halfup is computation is correct but when used in negation, you must use
the halfdown, example if you have 5 life and you pay half your life
rounded up, you must have 3 life, so life:-halfdownlifetotal. if you use
halfup you will lose 3 life...
2016-08-27 16:23:42 +08:00
Anthony Calosa
de6619b383 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-27 16:17:44 +08:00
Anthony Calosa
941dc253fb Merge pull request #880 from kevlahnota/master
fix some cards and add some missing
2016-08-27 15:55:54 +08:00
Anthony Calosa
25705a6b02 Add files via upload 2016-08-27 14:58:09 +08:00
Anthony Calosa
4d56269130 fix some cards and add some missing
it seems " add " inside name causes issue when parsed (cause crash in
deck editor like arlinn kord), renaming it fixes it...
2016-08-27 14:56:54 +08:00
zethfoxster
96236df293 Merge pull request #50 from WagicProject/master
getting master
2016-08-26 18:55:33 -04:00
Anthony Calosa
f447482e32 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-26 18:02:27 +08:00
Anthony Calosa
401b8fc496 Merge pull request #878 from kevlahnota/master
Add some cards (various from SHM to ROE)
2016-08-26 16:11:38 +08:00
Anthony Calosa
2e2a2aaf03 cleanup card.dat 2016-08-26 15:33:38 +08:00
Anthony Calosa
66c2ab38ed fix some cards 2016-08-26 14:20:02 +08:00
Anthony Calosa
6e0b7e2c23 add missing break 2016-08-26 14:20:02 +08:00
Anthony Calosa
f335623f69 update missing cards by sets
Shadowmoor, Alara, Zendikar blocks
2016-08-26 12:11:28 +08:00
Anthony Calosa
f8369ee39a add some missing cards
from SHM to ROE
2016-08-26 11:31:48 +08:00
Anthony Calosa
2a1bacdfa4 add "abilitycontroller" for dynamicability
for use inside ability$! dynamicability<who> !$ who
2016-08-26 11:23:52 +08:00
Anthony Calosa
a93dd6586d Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-25 22:26:56 +08:00
Anthony Calosa
f3dd1be125 rebounded trigger
for use with rebound cards only
2016-08-25 22:25:34 +08:00
Anthony Calosa
5b49530df9 add reset alternate cost paid 2016-08-25 22:22:55 +08:00
zethfoxster
00555e3c75 Merge pull request #49 from WagicProject/master
getting master
2016-08-24 21:13:03 -04:00
Anthony Calosa
972746d388 Merge pull request #877 from kevlahnota/master
Fix enters tapped cards, add some missing cards from LRW
2016-08-25 04:23:23 +08:00
Anthony Calosa
db3aaf96c7 add LRW & MOR missing cards by sets 2016-08-25 03:42:24 +08:00
Anthony Calosa
e12c87b869 add some missing cards from lorwyn
also fix card enters tapped
2016-08-25 03:40:38 +08:00
Anthony Calosa
ad80b000c9 find missing art on stored source card
when tokencreator is used inside ability$!!$ who, try to get the token
images and id from stored source
2016-08-25 03:40:38 +08:00
Anthony Calosa
9bcc54c56c add "recent" & "raidcount"
the recent attribute is to parse new cards entered play, then turns
itself to 0 if some stuff happened since it's already in play...
2016-08-25 03:40:38 +08:00
Anthony Calosa
3e6d207bf0 Merge pull request #876 from kevlahnota/master
Add some missing cards
2016-08-25 01:06:23 +08:00
Anthony Calosa
6c836e0fde update missing cards by sets
from ravnica to timespiral blocks
2016-08-25 00:23:24 +08:00
Anthony Calosa
5f9e123571 added some cards
from ravnica, ice age and time spiral blocks
2016-08-25 00:21:48 +08:00
Anthony Calosa
20ba624de2 commented out this
commented out the the spelltargettypes (I think I added these before for
debugging purposes)
2016-08-25 00:20:52 +08:00
Anthony Calosa
12426cf8a7 added nonplaynonexile
for use inside transforms since we cant use commas
2016-08-25 00:20:18 +08:00
Anthony Calosa
1cd6f00c59 add manapool count
also add getStringValue for menutext
2016-08-25 00:17:16 +08:00
Anthony Calosa
365d5784b7 Merge pull request #875 from kevlahnota/master
update PPR
2016-08-23 12:22:37 +08:00
Anthony Calosa
a90cddf589 update PPR
also fix cards  "when you cast" triggers, They must trigger when cast,
not when it resolves...
2016-08-23 11:27:40 +08:00
zethfoxster
5f71017142 Merge pull request #48 from WagicProject/master
getting master
2016-08-22 21:31:19 -04:00
Anthony Calosa
c81402b8ce Merge pull request #874 from kevlahnota/master
Add some cards from SOK
2016-08-23 07:27:20 +08:00
Anthony Calosa
6122410db1 Add files via upload 2016-08-23 06:51:22 +08:00
Anthony Calosa
42e240c9ab add some cards from kamigawa 2016-08-23 06:49:57 +08:00
Anthony Calosa
01459b7759 Merge pull request #873 from kevlahnota/master
Fix granted flashback, add flashback indicator
2016-08-22 11:33:33 +08:00
Anthony Calosa
cd2f4480f4 alternate token creator
uses ":" instead of comma, makecardt(name:type:p/t:ability:color) ex.
makecardt(Eldrazi Horrors:Creature Eldrazi Horror:3/2:haste:battleready)
2016-08-22 10:21:00 +08:00
Anthony Calosa
ce92679be0 add AACloner andAbility 2016-08-22 10:18:23 +08:00
Anthony Calosa
e9705b2cc5 fix crash temporary flashback
should fix snapcaster mages ability and the likes
2016-08-22 10:17:48 +08:00
Anthony Calosa
a2007dd59e border indicator flashback 2016-08-22 10:17:05 +08:00
Anthony Calosa
d6052b718e Merge pull request #872 from kevlahnota/master
cleanup
2016-08-22 09:18:11 +08:00
Anthony Calosa
6bfc79fb03 test
test if the name is the cause of this...
2016-08-22 08:30:13 +08:00
Anthony Calosa
e9a5f30c71 cleanup 2016-08-22 07:36:23 +08:00
Anthony Calosa
9a61b7f13b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-22 07:27:34 +08:00
Anthony Calosa
2073f3d7ed Merge pull request #870 from kevlahnota/master
Battleready token for Hanweir
2016-08-21 22:13:00 +08:00
Anthony Calosa
774cd46892 Hanweir the Writhing Township token
battleready and fix Make Mischief
2016-08-21 22:10:14 +08:00
Anthony Calosa
f593ee7c9f Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-21 14:13:25 +08:00
Anthony Calosa
47d35446e2 Merge pull request #869 from kevlahnota/master
Add some cards & fix
2016-08-21 13:10:59 +08:00
Anthony Calosa
3e16969808 update missing cards by sets
ODY to 5DN
2016-08-21 12:28:02 +08:00
Anthony Calosa
3e95f5cd05 add some cards 2016-08-21 12:26:21 +08:00
Anthony Calosa
15a8437d79 check imprinted card
fix crash
2016-08-21 11:28:17 +08:00
Anthony Calosa
6a213bffa6 Domain count 2016-08-21 11:27:50 +08:00
Anthony Calosa
5be01a7577 add percentage on awards 2016-08-21 08:56:39 +08:00
zethfoxster
89b8eabe0c Merge pull request #47 from WagicProject/master
getting master
2016-08-20 13:54:25 -04:00
Anthony Calosa
3cecc34a9c Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-20 17:54:42 +08:00
Anthony Calosa
9e76214be8 Merge pull request #867 from kevlahnota/master
Added some cards from INV & MRQ
2016-08-20 16:46:48 +08:00
Anthony Calosa
5b059f974f update missing cards by sets 2016-08-20 16:07:11 +08:00
Anthony Calosa
ecb4f64f91 added some cards
I think I added abilitycontroller before, I just forgot to add a card
that can use it (Gerrard's Verdict)
2016-08-20 16:04:17 +08:00
zethfoxster
992121c659 Merge pull request #46 from WagicProject/master
getting master
2016-08-19 21:25:18 -04:00
Anthony Calosa
cbc41214d8 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-20 04:32:19 +08:00
Anthony Calosa
53c7a81666 Merge pull request #866 from kevlahnota/master
change naming convention
2016-08-20 04:03:53 +08:00
Anthony Calosa
a63065b44f try to fix 2016-08-20 03:04:58 +08:00
Anthony Calosa
cec4494ce6 fix can produce mana
limited for land...
2016-08-20 00:21:58 +08:00
Anthony Calosa
60411027ca change plandtype & olandtype parsing 2016-08-19 23:34:01 +08:00
Anthony Calosa
8d7b9293b5 change naming convention
to avoid confusion
2016-08-19 20:29:41 +08:00
Anthony Calosa
2133dfd80c Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-19 18:53:27 +08:00
Anthony Calosa
1a75f51aa6 Merge pull request #865 from kevlahnota/master
update missing cards by sets
2016-08-19 18:51:13 +08:00
Anthony Calosa
2a8c036c63 moved rayne to borderline
@targeted needs update for player targets
2016-08-19 18:18:18 +08:00
Anthony Calosa
c90f357bff added myzones & oppzones 2016-08-19 18:08:36 +08:00
Anthony Calosa
4d381452b5 added rath & artifact cycle in missing cards 2016-08-19 18:07:08 +08:00
zethfoxster
087b53c1c5 Merge pull request #45 from WagicProject/master
getting master
2016-08-18 23:08:21 -04:00
Anthony Calosa
58a2769f2b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-19 07:22:52 +08:00
Anthony Calosa
ce38c3e5c5 Merge pull request #864 from kevlahnota/master
re added my previous changes
2016-08-18 21:48:19 +08:00
Anthony Calosa
12f7d5e4b6 added missing cards by sets
todo... since i'll recheck all expansions
2016-08-18 21:43:54 +08:00
Anthony Calosa
fd703dd4d1 re added my previous changes 2016-08-18 21:40:38 +08:00
Anthony Calosa
3ef4c1f6e0 Merge pull request #863 from kevlahnota/master
Added the Missing EMN and other cards
2016-08-18 20:04:19 +08:00
Anthony Calosa
0e95444552 added the EMN cards 2016-08-18 20:02:02 +08:00
Anthony Calosa
aca90db2c2 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-18 19:13:41 +08:00
Anthony Calosa
09edd055e6 Merge pull request #862 from kevlahnota/master
"blocked" attribute & add some cards
2016-08-18 18:55:28 +08:00
Anthony Calosa
892ef6b1b3 Add CD Blocked & some cards
cd "blocked" should fix Smite , Tattermunge Witch
2016-08-18 17:57:14 +08:00
Anthony Calosa
ed838815ef Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-18 06:19:42 +08:00
Anthony Calosa
8d8c4d1a95 Merge pull request #861 from kevlahnota/master
Balance cards & Kozilek
2016-08-17 20:50:03 +08:00
Anthony Calosa
debdf917ea Added "Balance" cards & Fix Kozilek
Added Balance, Balancing Act, Natural Balance & Restore Balance. Fix
Kozilek, the Great Distortion autostack ability
2016-08-17 20:48:51 +08:00
Anthony Calosa
f03961bc19 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-17 18:42:43 +08:00
Anthony Calosa
fb4572264d Merge pull request #860 from kevlahnota/master
Fixed OGW cards & Sorted Primitives
2016-08-17 05:27:08 +08:00
Anthony Calosa
d7445a70f9 Fix OGW cards & Sorted Primitives
todo recheck BFZ
2016-08-17 04:49:50 +08:00
Anthony Calosa
78bcf9a738 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-17 04:24:53 +08:00
zethfoxster
d71c85412f Merge pull request #859 from zethfoxster/master
pushing to master
2016-08-16 13:38:42 -04:00
zethfoxster
f5c9ab72ef adding eldrich moon cards, and part 1 of my unsupport scan through...these are not sorted and are added at the bottom.
there are way more in unsupported that need checking, im going through it slowly but thought i should add this
2016-08-16 13:34:14 -04:00
zethfoxster
5c4cd74c39 Merge pull request #44 from WagicProject/master
getting master
2016-08-16 13:29:59 -04:00
Anthony Calosa
5a1daf5dc9 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-16 18:32:43 +08:00
Anthony Calosa
4de2a45195 Merge pull request #858 from kevlahnota/master
add CD geared attribute
2016-08-16 17:28:01 +08:00
Anthony Calosa
91d3a6ecb7 Minor Cleanup 2016-08-16 16:11:44 +08:00
Anthony Calosa
763918e129 added CD geared attribute 2016-08-16 15:42:22 +08:00
Anthony Calosa
525c166f62 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-16 14:30:02 +08:00
Anthony Calosa
6b2ed24fc3 Merge pull request #857 from kevlahnota/master
Fixed some cards
2016-08-16 13:17:07 +08:00
Anthony Calosa
1eae3a032f Fixed some cards
replaced @lifed with @lifeof, had to hardcode conduit of ruin...
2016-08-16 12:17:53 +08:00
zethfoxster
755cfe19d5 Merge pull request #43 from WagicProject/master
getting master
2016-08-14 22:58:36 -04:00
Anthony Calosa
559331cf82 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-15 10:29:03 +08:00
Anthony Calosa
18fddb1537 Merge pull request #856 from kevlahnota/master
adjust p/t & fix copying animated land
2016-08-14 22:11:53 +08:00
Anthony Calosa
861620cb6e fix AI deck129 invalid mtgid 2016-08-14 21:53:54 +08:00
Anthony Calosa
568f3ae94f fix copying man lands 2016-08-14 21:26:33 +08:00
Anthony Calosa
0af00a313e adjust p/t box when tapped only 2016-08-14 21:26:19 +08:00
Anthony Calosa
ff52f020e2 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-14 21:21:22 +08:00
Anthony Calosa
55bf7bcbda Merge pull request #855 from kevlahnota/master
Minimal Graphics mod
2016-08-14 15:51:32 +08:00
Anthony Calosa
bccb740c45 Minimal mod card scale
it's a minimal graphics mod so it's easier to debug. It's a smaller card
scale of big render so we have more space to view in game.
2016-08-14 14:59:49 +08:00
Anthony Calosa
b7307adc10 fix copier copying a copier 2016-08-14 14:28:14 +08:00
Anthony Calosa
edb71dcef0 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-14 09:32:42 +08:00
Anthony Calosa
7ddf232615 Merge pull request #854 from kevlahnota/master
Re upload sets
2016-08-14 09:27:41 +08:00
Anthony Calosa
a7cdb0a514 re upload sets 2016-08-14 09:24:15 +08:00
Anthony Calosa
7157e571c8 fateshaper flying 2016-08-14 09:22:11 +08:00
Anthony Calosa
d073b7b3c0 remove sets with no carriage returns
will reupload the new ones
2016-08-14 09:21:47 +08:00
zethfoxster
27d67398fb Merge pull request #42 from WagicProject/master
getting master
2016-08-13 12:49:52 -04:00
Anthony Calosa
cc6ced9197 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-13 23:31:50 +08:00
Anthony Calosa
712e42c71f Merge pull request #853 from kevlahnota/master
Carriage Returns
2016-08-13 23:29:09 +08:00
Anthony Calosa
53efc96e30 add carriage returns
it's not visible but instead of lf, replaced it with crlf
2016-08-13 23:26:58 +08:00
Anthony Calosa
5b2ac0f022 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-13 23:20:37 +08:00
Anthony Calosa
b5cdcc29bc Merge pull request #852 from kevlahnota/master
Revert my Graphic changes and other fixes
2016-08-13 21:41:56 +08:00
Anthony Calosa
df3e6e5fb7 fix flip and image 2016-08-13 21:14:43 +08:00
Anthony Calosa
27145bdabe revised fix for copier 2016-08-13 20:12:55 +08:00
Anthony Calosa
71aedfd96d this must be copy 2016-08-13 17:39:11 +08:00
Anthony Calosa
8530292fef Revert my Graphic changes
I think it's the one who cause those crashes
2016-08-13 16:45:46 +08:00
Anthony Calosa
f1bc268f58 add mycastingzone & oppcastingzone
to simplify code
2016-08-13 10:55:58 +08:00
Anthony Calosa
2e79f5a369 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-12 20:47:48 +08:00
Anthony Calosa
1427b1709a Merge pull request #851 from kevlahnota/master
remove changes AACopier
2016-08-12 20:14:51 +08:00
Anthony Calosa
960d4d35fb remove my changes in aacopier
since I introduce a weird crash bug with it.
2016-08-12 17:14:52 +08:00
Anthony Calosa
7a467ce860 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-12 17:01:42 +08:00
Anthony Calosa
cd46314b4e Merge pull request #850 from kevlahnota/master
Fix Deathbringer Liege
2016-08-12 16:26:25 +08:00
Anthony Calosa
9c81acff53 Fix Deathbringer Liege 2016-08-12 16:25:37 +08:00
zethfoxster
d8b2e2873b Merge pull request #41 from WagicProject/master
getting master
2016-08-11 23:27:16 -04:00
Anthony Calosa
98cd6675d9 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-12 10:00:11 +08:00
Anthony Calosa
002085ad32 Merge pull request #849 from kevlahnota/master
Add Game/Player Info
2016-08-12 09:18:32 +08:00
Anthony Calosa
2e525dfdcc exclude card that copied a token.
I added a new search for tokens just below this
2016-08-12 07:44:59 +08:00
Anthony Calosa
a378e3a72d fix extracosts on cumulative upcost
since Manacost::copy copies, extracost, if this is enabled, extracost is
doubled. tested with Aboroth
2016-08-12 07:43:39 +08:00
Anthony Calosa
7e14b2fc5a exception testsuite
the current implementation was clone must be recognized by id in the
scripted test.
2016-08-11 21:05:00 +08:00
Anthony Calosa
51016f9258 revised AACopier 2016-08-11 18:52:18 +08:00
Anthony Calosa
adad723110 game mode info 2016-08-11 14:26:41 +08:00
Anthony Calosa
a10e7ab279 Revert "copy/flip limit"
This reverts commit 0c124327de.
2016-08-11 11:03:37 +08:00
Anthony Calosa
0c124327de copy/flip limit
if the copy/flip is activated, it means it's already in the battlefield,
so "enters the battlefield" must not trigger...
2016-08-10 19:49:31 +08:00
zethfoxster
6c5f706064 Merge pull request #40 from WagicProject/master
getting master
2016-08-09 22:14:58 -04:00
Anthony Calosa
2422e72713 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-10 09:51:23 +08:00
Anthony Calosa
e49e4a5e67 Merge pull request #848 from kevlahnota/master
Fix SOI cards
2016-08-10 08:28:52 +08:00
Anthony Calosa
14d8d65de0 asflash
spellmastery is for alternate cost, added asflash... so cards that find
cards with flash don't find asflash...
2016-08-10 07:31:15 +08:00
Anthony Calosa
d3305cadb6 quick sliver typo 2016-08-10 07:18:46 +08:00
Anthony Calosa
17c28ca584 revised Quick Sliver & Shimmer Myr 2016-08-10 06:39:09 +08:00
Anthony Calosa
151905c5f3 Transform Trigger, Turnlimit for TrCardAddedtoZone
Cleaned primitives, and fix SOI cards (remove workarounds) todo(recheck
BFZ and OGW)
2016-08-10 01:54:24 +08:00
Anthony Calosa
ab49ea07e8 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-09 13:28:52 +08:00
Anthony Calosa
8e436e6b55 Merge pull request #847 from kevlahnota/master
Fix Hint
2016-08-09 04:56:06 +08:00
Anthony Calosa
de5414ec19 Fix Etched Affinity Combo
Fix Glimmervoid Combo Hint
2016-08-09 02:58:48 +08:00
Anthony Calosa
e5d71579af Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-09 02:57:43 +08:00
Anthony Calosa
5ec4c9714c Merge pull request #846 from kevlahnota/master
adjust rendered card
2016-08-09 01:15:18 +08:00
Anthony Calosa
eafb2558c2 adjust rendered card 2016-08-09 00:38:33 +08:00
Anthony Calosa
4cefcb26c2 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-08 20:28:53 +08:00
Anthony Calosa
8a86e7d0f7 Merge pull request #845 from kevlahnota/master
border & mask
2016-08-08 18:45:44 +08:00
Anthony Calosa
b20fb61e1c border & mask
add border to alternate render, fix mask shadow
2016-08-08 18:13:00 +08:00
Anthony Calosa
feeed99c62 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-08 18:11:48 +08:00
Anthony Calosa
aa5008f865 Merge pull request #844 from kevlahnota/master
Fix cards reported on forums
2016-08-08 15:44:57 +08:00
Anthony Calosa
c4ce2aa977 fix Forgotten Creation and Fable of Wolf And Owl
Forgotten Creation typo and Fable of Wolf and Owl ability clashing
2016-08-08 15:42:35 +08:00
Anthony Calosa
7cc31a473c Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-08 15:41:33 +08:00
Anthony Calosa
a8193012aa Merge pull request #843 from kevlahnota/master
tnum:number parameter for token images
2016-08-08 15:11:18 +08:00
Anthony Calosa
eb0ecedecf revised token id (tnum:num parameter)
this should not conflict like earlier version.
ex:
[card]
name=Fable of Wolf and Owl
auto=@movedTo(*[green]|mystack):may token(Wolf,Creature
Wolf,2/2,green,tnum:11)
auto=@movedTo(*[blue]|mystack):may token(Bird,Creature
Bird,1/1,flying,blue,tnum:12)
text=Whenever you cast a green spell, you may put a 2/2 green Wolf
creature token onto the battlefield. -- Whenever you cast a blue spell,
you may put a 1/1 blue Bird creature token with flying onto the
battlefield.
mana={3}{GU}{GU}{GU}
type=Enchantment
[/card]
tnum uses -source id  & tnum (concatenated)
2016-08-08 13:49:24 +08:00
Anthony Calosa
de44abd529 Revert "fix token names with ",""
This reverts commit 65ef1f384c.
2016-08-08 11:29:04 +08:00
Anthony Calosa
9807ca99f9 Revert "multi tokens images on same source"
This reverts commit 8c9d2d6f1d.
2016-08-08 11:20:25 +08:00
Anthony Calosa
8c9d2d6f1d multi tokens images on same source
you can specifiy tnum:number on token parameters and it will concatenate
the default token id and the specified number. example: token(Saproling,
Creature Saproling, 1/1, green, tnum:15) if the source id is 12345, the
default token id will be -12345, concat tnum, id will be -1234515 and
the game will try to find the image 1234515t.jpg
2016-08-08 10:37:27 +08:00
Anthony Calosa
65ef1f384c fix token names with "," 2016-08-08 10:15:50 +08:00
Anthony Calosa
bf2cc36719 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-08 09:30:33 +08:00
Anthony Calosa
34ffe7eefa Merge pull request #842 from kevlahnota/master
resized avatar
2016-08-07 22:37:57 +08:00
Anthony Calosa
b756c8b9ec resize avatar 2016-08-07 22:33:40 +08:00
Anthony Calosa
19a98c9ad6 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-07 22:26:39 +08:00
Anthony Calosa
e159025ebb Merge pull request #841 from kevlahnota/master
Fix Master Transmuter & Westvale Abbey
2016-08-07 19:46:56 +08:00
Anthony Calosa
05e81ad923 Fix Westvale Abbey and Master Transmuter 2016-08-07 19:42:56 +08:00
Anthony Calosa
8e1a0eb20f Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-07 15:29:23 +08:00
Anthony Calosa
a881b8fa5a Merge pull request #840 from kevlahnota/master
Minor adjustment
2016-08-07 14:08:51 +08:00
Anthony Calosa
6982030013 Minor adjustment 2016-08-07 14:08:09 +08:00
Anthony Calosa
01da4c6af5 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-07 14:06:22 +08:00
Anthony Calosa
a42805d4cc Merge pull request #839 from kevlahnota/master
Fix Enstack Attackers
2016-08-07 13:24:54 +08:00
Anthony Calosa
01145c4581 new adjustments 2016-08-07 13:24:14 +08:00
Anthony Calosa
4d1dfb58ff Fix Enstack Attackers
If you have 40+ tokens as attackers in play, stack them on the attackers
tightly...
2016-08-07 11:49:57 +08:00
Anthony Calosa
43f44a4142 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-07 11:47:32 +08:00
Anthony Calosa
b314d3cafe Merge pull request #838 from kevlahnota/master
corrected typo
2016-08-07 11:21:43 +08:00
Anthony Calosa
9bbf28e44b correction 2016-08-07 11:21:07 +08:00
Anthony Calosa
d995d25f69 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-07 10:37:31 +08:00
Anthony Calosa
1f58b8e6a7 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-07 10:30:42 +08:00
Anthony Calosa
eeb881cdc2 Merge pull request #837 from kevlahnota/master
AACopier andAbility support
2016-08-07 10:29:06 +08:00
Anthony Calosa
807874ce5d add andAbility support for AACopier
the granted ability must exists only if you copy a card, if you don't
copy any card, the source doesn't have any granted abillities.
2016-08-07 10:15:11 +08:00
punkeduard
213d11c8e9 Changes to primitives
name=Ojutai, Soul of Winter
name=Atarka, World Render
name=Kolaghan, the Storm's Fury
name=Savageborn Hydra
2016-08-06 21:03:23 -05:00
Anthony Calosa
dfd0761506 Corrected cards reported from forums 2016-08-07 09:59:59 +08:00
Anthony Calosa
4c30086896 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-06 21:28:57 +08:00
Anthony Calosa
1efdca399e Merge pull request #836 from kevlahnota/master
re enabled token quads
2016-08-06 20:29:09 +08:00
Anthony Calosa
4f27c8051a forgot these 2016-08-06 19:55:18 +08:00
Anthony Calosa
d43693fef0 when ingame, try finding the quad
for copier/cloner when copying token generated cards...
2016-08-06 19:41:34 +08:00
Anthony Calosa
88f0202b16 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-06 19:06:57 +08:00
Anthony Calosa
be98e0b543 Update CardGui.cpp
Disabled temporary...
2016-08-06 01:40:21 -05:00
Rolzad73
8a907bb3f3 Merge pull request #835 from WagicProject/android_tweaks
Android tweaks
2016-08-06 00:25:36 -04:00
Anthony Calosa
1b34a478a1 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-06 08:04:15 +08:00
Anthony Calosa
cda0bba555 Merge pull request #834 from kevlahnota/master
Copied token images
2016-08-05 22:26:57 +08:00
Anthony Calosa
dae1b10de1 Copied Token Image
If the image is not found, try finding the token counterpart by Id
2016-08-05 21:52:46 +08:00
Rolzad73
0c4e72ece2 - attempt to fix storage location list issue on Android 4.3+ 2016-08-04 14:53:52 -04:00
Rolzad73
77dfd51b28 - Android debug logging organization 2016-08-04 13:15:49 -04:00
Rolzad73
b601a549d0 - added option for Android x86 build types 2016-08-04 11:26:41 -04:00
Anthony Calosa
c4907edd76 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-04 21:19:32 +08:00
Anthony Calosa
dcf4148d75 Merge pull request #831 from kevlahnota/master
fix code monk token
2016-08-04 21:02:34 +08:00
Anthony Calosa
8afeef568f update ability
prowess +1/+1 is ueot
2016-08-04 20:55:36 +08:00
Rolzad73
dd5635d9cd - only minor whitespace formatting Android 2016-08-04 08:32:17 -04:00
Rolzad73
62a6ddf3ca - update android gitignore
- update android launcher icons
2016-08-04 08:02:32 -04:00
Anthony Calosa
195daa97f3 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-04 13:59:34 +08:00
Anthony Calosa
b1c5c87443 Merge pull request #830 from kevlahnota/master
Fix AttackCost & BlockCost, Add nonCombatDamage count
2016-08-04 12:16:48 +08:00
Anthony Calosa
1ab88940f9 add nonCombatDamage count 2016-08-04 09:56:53 +08:00
Anthony Calosa
8ba97b8a74 Fix attackcost & blockcost
thanks zeth
2016-08-04 09:50:09 +08:00
Anthony Calosa
e7f5442a64 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-04 09:29:45 +08:00
Rolzad73
066dd866b1 - reverting debuggable attribute removal 2016-08-03 20:36:34 -04:00
Anthony Calosa
fa0722a9e2 Merge pull request #828 from kevlahnota/master
some card corrections
2016-08-04 05:50:00 +08:00
Anthony Calosa
5f276f6b22 blockcost and attackcost
counter{1%1} -> value
2016-08-04 05:46:23 +08:00
Anthony Calosa
c45b5751af cantattack
change some cards since -cantattack overrides cantattack. If there is an
effect that makes creatures can't attack, you can just activate the
ability to remove -cantattack...
2016-08-04 05:41:22 +08:00
Rolzad73
161802cf9d minor Android tweaks
- removed ads reference no longer used in manifest
- removed redundant android:debuggable attribute
- cleared EGL debug warning log spamming issue #581
2016-08-03 16:01:43 -04:00
Anthony Calosa
0679832b04 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-04 03:20:24 +08:00
Anthony Calosa
b20d6f8820 Merge pull request #827 from kevlahnota/master
TokenAndAbility for AACloner & AACopier
2016-08-04 03:17:26 +08:00
Anthony Calosa
52fb40d543 AACloner & AACopier TokenAndAbility
if the token has andAbility, the cloner/copier also has that andAbility
also...
2016-08-04 02:12:59 +08:00
Anthony Calosa
067279d2e8 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-04 02:02:12 +08:00
Anthony Calosa
a0bbed6c6c Merge pull request #826 from kevlahnota/master
fix crash when copying tokens
2016-08-04 00:41:31 +08:00
Anthony Calosa
9371125eb0 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-04 00:40:01 +08:00
Anthony Calosa
0a0f6cdce9 fix crash
wrong parenthesis
2016-08-04 00:36:49 +08:00
Rolzad73
fc350be3a1 Update README.md 2016-08-03 12:36:25 -04:00
Anthony Calosa
be731a99c0 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-03 23:09:13 +08:00
Anthony Calosa
c65fd1d7ae Merge pull request #825 from kevlahnota/master
corrections
2016-08-03 23:06:45 +08:00
Anthony Calosa
be899159f3 correction 2016-08-03 23:03:32 +08:00
Anthony Calosa
2400e6578b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-03 22:34:05 +08:00
Anthony Calosa
1aac2b8e75 Update AllAbilities.cpp
Try to fix IOS/MAC compilation
2016-08-03 21:23:38 +08:00
Anthony Calosa
c7581220b8 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-03 20:40:12 +08:00
Anthony Calosa
f3968215e0 Merge pull request #824 from kevlahnota/master
andAbility on ATokenCreator, Extend AAFlip
2016-08-03 18:46:46 +08:00
Anthony Calosa
56a8011b78 revert 2016-08-03 18:44:41 +08:00
Anthony Calosa
adccae7937 switched places 2016-08-03 18:11:29 +08:00
Anthony Calosa
1c63c1937a Update some cards 2016-08-03 16:28:49 +08:00
Anthony Calosa
4753f7bb51 andAbility on ATokenCreator, Extend AAFlip, 2016-08-03 16:10:53 +08:00
Anthony Calosa
d7fec7d10a Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-02 12:34:06 +08:00
Anthony Calosa
3c90a29b1e Merge pull request #823 from kevlahnota/master
Border size and color, Copier/Token Indicator
2016-08-01 23:17:12 +08:00
Anthony Calosa
98de361bf4 change comment
enable the indicator at all modes...
2016-08-01 22:34:28 +08:00
Anthony Calosa
c1df10e064 Minor Proportioning 2016-08-01 22:17:53 +08:00
Anthony Calosa
3743e0bc03 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-01 21:40:22 +08:00
Anthony Calosa
12e6a4d0ae Merge pull request #822 from kevlahnota/master
Some Corrections
2016-08-01 15:32:07 +08:00
Anthony Calosa
969511953a vector count of abilities
remove unused ones
2016-08-01 14:45:57 +08:00
Anthony Calosa
223e2e04b0 Correction 2016-08-01 11:44:07 +08:00
Anthony Calosa
0b0368ffcc Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-01 08:23:16 +08:00
Anthony Calosa
9e4684b524 Merge pull request #821 from kevlahnota/master
Fix transforms for non-permanent
2016-08-01 06:52:38 +08:00
Anthony Calosa
d825c7e4ea parenthesis 2016-08-01 04:49:04 +08:00
Anthony Calosa
c38c996773 Revised "putinplay" in castcard 2016-08-01 04:43:54 +08:00
Anthony Calosa
71a9ef00ee Support transforms for nonpermanent
fix startled awake to persistent nightmare
2016-08-01 03:52:10 +08:00
Anthony Calosa
89a30ae5ee Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-08-01 03:02:01 +08:00
zethfoxster
94bd0e057b Merge pull request #39 from WagicProject/master
getting master
2016-07-31 10:46:46 -04:00
Anthony Calosa
0efc6338bb Merge pull request #820 from kevlahnota/master
Fix Cloner
2016-07-31 21:38:10 +08:00
Anthony Calosa
3b98da1d86 Fix Cloner ability 2016-07-31 18:46:07 +08:00
Anthony Calosa
6927c68811 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-31 18:06:12 +08:00
Anthony Calosa
f0909ba3a0 Merge pull request #819 from kevlahnota/master
minor fix
2016-07-31 13:30:15 +08:00
Anthony Calosa
2f7d2873f7 @at to @each 2016-07-31 13:28:55 +08:00
Anthony Calosa
7a6b6aa335 Change copier copy 2016-07-31 13:24:18 +08:00
Anthony Calosa
2861ef0c73 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-31 13:13:26 +08:00
Anthony Calosa
059fc06f3a Merge pull request #818 from kevlahnota/master
Fix Chandra, Flamecaller & Cryptolith Rite
2016-07-31 08:20:09 +08:00
Anthony Calosa
a971576de0 Fix Chandra, Cryptolith Rite 2016-07-31 08:16:25 +08:00
Anthony Calosa
a4e059e3ec Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-31 08:14:28 +08:00
Anthony Calosa
07408b7bc3 Merge pull request #817 from kevlahnota/master
Added EMA & Revert Stormtide Leviathan code
2016-07-31 08:09:09 +08:00
Anthony Calosa
9722f7b71e Added Eternal Masters 2016-07-31 08:06:53 +08:00
Anthony Calosa
45d8413d59 Revert Stormtide Leviathan code 2016-07-31 07:58:26 +08:00
Anthony Calosa
5c400457a9 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-31 07:32:08 +08:00
zethfoxster
3e9ee5890f Merge pull request #816 from zethfoxster/master
add some handling of reveal to avoid a crash in demo for AI.
2016-07-30 10:51:26 -04:00
zethfoxster
1acdb40498 add some handling of reveal to avoid a crash in demo for AI. 2016-07-30 10:50:31 -04:00
zethfoxster
1dc0b00133 Merge pull request #815 from zethfoxster/master
same applies for scry
2016-07-30 10:20:48 -04:00
zethfoxster
f2208389bd same applies for scry 2016-07-30 10:20:19 -04:00
zethfoxster
ab92c3e15b Merge pull request #814 from zethfoxster/master
pushing to master
2016-07-30 10:14:54 -04:00
zethfoxster
018e35295a fixed a crash in revealing, not sure why I thought it was a good idea to test testdestroy something that I just removed from the game. if anyone can find another crash with it, let me know which card causes it. 2016-07-30 10:13:58 -04:00
zethfoxster
2c9e90eee0 Merge pull request #38 from WagicProject/master
getting master
2016-07-30 08:29:45 -04:00
Anthony Calosa
847f21f7dc Merge pull request #813 from kevlahnota/master
Centered Power/Toughness
2016-07-30 15:05:57 +08:00
Anthony Calosa
b90dfbe3b0 Centered P/T inside P/T box 2016-07-30 15:04:34 +08:00
Anthony Calosa
c230794c82 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-30 15:03:08 +08:00
Anthony Calosa
7f83aa7253 Merge pull request #812 from kevlahnota/master
small adjustment
2016-07-30 12:14:24 +08:00
Anthony Calosa
1039815017 small adjustment
meld card have a little space between. reduce render big display.
2016-07-30 10:21:39 +08:00
Anthony Calosa
2c43eac80d Merge pull request #811 from kevlahnota/master
change enstack & scale
2016-07-30 09:18:44 +08:00
Anthony Calosa
4aa6ad3203 small scale 2016-07-30 08:13:30 +08:00
Anthony Calosa
730b05ad1b change enstack attackers
their x position is the same in their "default" horizontal stack, so
when attacking it always start at left side, not in the middle. Please
report if you have bugs...
2016-07-30 07:07:35 +08:00
Anthony Calosa
5a7b2c5029 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-30 07:02:49 +08:00
zethfoxster
7ae551de9d Merge pull request #37 from WagicProject/master
getting master
2016-07-29 17:44:56 -04:00
Anthony Calosa
96dd3faef0 Merge pull request #810 from kevlahnota/master
Meld card size
2016-07-30 03:49:06 +08:00
Anthony Calosa
ffdc8cd9ff meld card size 2016-07-30 03:05:24 +08:00
Anthony Calosa
8256ac3bee Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-30 01:41:43 +08:00
Anthony Calosa
037ab83519 Merge pull request #809 from kevlahnota/master
Border corrections
2016-07-30 00:10:28 +08:00
Anthony Calosa
a56e77310d Border Corrections
Removed other border render, and use the one in cardgui::drawcard...
2016-07-29 23:10:01 +08:00
Anthony Calosa
5350fb7f5d Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-29 18:47:51 +08:00
Anthony Calosa
9161f89057 Merge pull request #808 from kevlahnota/master
alphabeta border & scale
2016-07-29 18:40:38 +08:00
Anthony Calosa
1d2abeb20b Minor Border changes
Also added copier values if it has copied a token or not...
2016-07-29 18:37:03 +08:00
Anthony Calosa
833c21192a Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-29 18:30:20 +08:00
Anthony Calosa
86168e454f Merge pull request #807 from kevlahnota/master
Add test and Fix unused variable error
2016-07-29 08:11:05 +08:00
Anthony Calosa
a20c2ce29a Unused variable 2016-07-29 07:30:20 +08:00
Anthony Calosa
874b27c56d Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-07-29 07:00:46 +08:00
Anthony Calosa
a7dc44e4e1 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-29 07:00:07 +08:00
zethfoxster
047d08882e Merge pull request #806 from zethfoxster/master
pushing to master
2016-07-28 18:55:03 -04:00
zethfoxster
52df1ad963 the fix for the sacrifice trigger was a ton easier than expected.
treat it like a spell. 
the card after contains all the info we need to determine if it should trigger.
2016-07-28 18:48:47 -04:00
Anthony Calosa
c2cec37928 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-29 06:36:51 +08:00
Anthony Calosa
239a186b36 Update _tests.txt 2016-07-28 21:36:21 +08:00
Anthony Calosa
5aeb2ebc05 Create TirelessGraf.txt 2016-07-28 21:35:43 +08:00
zethfoxster
a7e87aaae5 Merge pull request #36 from WagicProject/master
Getting master
2016-07-28 09:11:55 -04:00
zethfoxster
eb545eca57 Merge pull request #804 from zethfoxster/master
Merge pull request #35 from WagicProject/master
2016-07-28 08:02:00 -04:00
Anthony Calosa
44ab1827bf Merge pull request #803 from kevlahnota/master
Update test and Corrected Graf Mole
2016-07-28 19:39:05 +08:00
Anthony Calosa
96b4f024b4 Update test and Corrected Graf Mole 2016-07-28 19:34:50 +08:00
Anthony Calosa
b070035770 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-28 19:28:05 +08:00
Anthony Calosa
1b0c3d8c00 Merge pull request #802 from kevlahnota/master
Attempt to fix my mess
2016-07-28 19:25:42 +08:00
Anthony Calosa
2e71cb08d0 I hope this is correct 2016-07-28 19:24:01 +08:00
Anthony Calosa
3da5d12bee Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-28 17:31:51 +08:00
Anthony Calosa
e8019bbb92 Merge pull request #801 from kevlahnota/master
Fix Compilation and add Tireless Tracker Test
2016-07-28 17:09:34 +08:00
Anthony Calosa
30dab27202 Fix Compilation 2016-07-28 16:38:16 +08:00
Anthony Calosa
cc7077d783 Fix compilation and add Tireless Tracker test 2016-07-28 16:37:38 +08:00
Anthony Calosa
fda7e9f39d Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-28 11:20:40 +08:00
zethfoxster
e178533493 Merge pull request #35 from WagicProject/master
getting master
2016-07-27 23:04:19 -04:00
zethfoxster
e3ad9296bc Merge pull request #800 from zethfoxster/master
getting master
2016-07-27 23:03:37 -04:00
Anthony Calosa
01042a62ae Merge pull request #799 from kevlahnota/master
revert
2016-07-28 10:30:49 +08:00
Anthony Calosa
7bd940ddb3 Revert "revised legendary"
This reverts commit 193d7accb4.
2016-07-28 10:28:54 +08:00
Anthony Calosa
f168702aad Revert "moved sac event"
This reverts commit 2a33c0c375.
2016-07-28 10:28:27 +08:00
Anthony Calosa
2a33c0c375 moved sac event 2016-07-28 10:26:25 +08:00
zethfoxster
eea240d7f2 changing some of the logic to the previous fixes, we want to avoid using code that looks for specific card names.
currently we have kamiflip as the only defined flip type as it is treated differently from the others. 
but we have room for more if needed now
doublefaced=kamiflip
sets the flip type of a card to the kamiflip style cards. since this is defined on cardprimitive level now, we might be able to do something different from the flipping animation. who knows.

commented out the forcing token triggers, it bypass targetchooser check. still working on a fix for this coming soon.
2016-07-27 20:03:25 -04:00
zethfoxster
afb98a374c updated codes for changes 2016-07-27 19:58:32 -04:00
Anthony Calosa
ed0d28eaf6 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-28 07:02:36 +08:00
Anthony Calosa
50345101e5 Merge pull request #798 from kevlahnota/master
Revised Legendary
2016-07-28 06:44:14 +08:00
zethfoxster
c0e4010c88 Merge pull request #34 from WagicProject/master
getting master
2016-07-27 18:42:54 -04:00
Anthony Calosa
193d7accb4 revised legendary 2016-07-28 06:42:47 +08:00
Anthony Calosa
a9be34c627 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-28 06:33:30 +08:00
Anthony Calosa
0e14226968 Merge pull request #797 from kevlahnota/master
Alpha-Beta Small-Inner Border
2016-07-27 18:13:11 +08:00
Anthony Calosa
068b03a0bb Alpha-Beta small inner border 2016-07-27 17:12:11 +08:00
Anthony Calosa
b99f9ae752 alpha beta small border 2016-07-27 17:10:26 +08:00
Anthony Calosa
3519871f80 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-27 17:07:24 +08:00
Anthony Calosa
e9db853f28 Merge pull request #796 from kevlahnota/master
Fix Flip/Transform Cards, Fix Copier
2016-07-27 16:07:05 +08:00
Anthony Calosa
a6fdd89e1d Fix Copier 2016-07-27 15:19:11 +08:00
Anthony Calosa
b8bfe7acc1 Fix Flip/Transform Cards
If the card is a copier or a token, it cannot be transformed since it's
not a double face card. Also the copied card must be the "active" part
of a double faced card. Flip cards (kamigawa block) is not restricted by
this since its a single sided card. If the transformed card is cda, take
any damage into account (PT bonus is already in effect for cda)..
2016-07-27 14:39:39 +08:00
Anthony Calosa
dd5d5589ff Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-27 12:41:38 +08:00
zethfoxster
7d460e093c Merge pull request #795 from zethfoxster/master
pushing to master
2016-07-26 22:47:07 -04:00
zethfoxster
54e86915b0 Merge pull request #33 from WagicProject/master
getting master
2016-07-26 22:46:06 -04:00
Anthony Calosa
ab2effd776 Merge pull request #794 from kevlahnota/master
Event for token sacrifice
2016-07-27 09:19:16 +08:00
zethfoxster
4f0da67a83 fixed a condition where scry core wasnt triggering its after effect 2016-07-26 19:35:10 -04:00
Anthony Calosa
014ca36a4a force event for token sacrifice 2016-07-27 07:11:30 +08:00
Anthony Calosa
2971e64182 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-27 07:11:10 +08:00
Anthony Calosa
d7737c13ff Merge pull request #793 from kevlahnota/master
Fix CDA vs Flip/Transforms
2016-07-27 07:07:47 +08:00
Anthony Calosa
eebcc9c925 Fix CDAACTIVE & transformed card colors
cdaactive has its own computation, so exclude it on flip/transform cards
ability
2016-07-27 06:31:03 +08:00
Anthony Calosa
0c90b39a96 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-27 02:57:42 +08:00
Anthony Calosa
4f3f96337f Merge pull request #792 from kevlahnota/master
Fix Legendary (Mirror Gallery) & Enters Tapped cards
2016-07-27 02:34:56 +08:00
Anthony Calosa
e855ca72aa Fix Mirror Gallery & enters "tapped" cards
If Mirror Gallery leaves play, you must check for legendary status.
Fix some cards that enters tapped.
2016-07-27 01:44:18 +08:00
Anthony Calosa
8ff47bf8e2 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-26 23:18:35 +08:00
Anthony Calosa
9d75f69a79 Merge pull request #791 from kevlahnota/master
granted flashback
2016-07-26 11:21:28 +08:00
Anthony Calosa
ae33977e10 Add Snapcaster Mage Ability
tempflashback - flashback using manacost
2016-07-26 09:56:13 +08:00
Anthony Calosa
07b5f35b98 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-26 09:39:47 +08:00
Anthony Calosa
c4acf006dd Merge pull request #790 from kevlahnota/master
Clue tokens
2016-07-26 09:27:24 +08:00
Anthony Calosa
12b80307a7 Update Living_Death.txt
Use Living Death and Clone
2016-07-26 08:51:46 +08:00
Anthony Calosa
43fd399d10 Update _tests.txt 2016-07-26 07:46:18 +08:00
Anthony Calosa
cc5d8940bf Clue tokens 2016-07-26 07:43:13 +08:00
Anthony Calosa
09ed1ab683 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-25 10:42:49 +08:00
Anthony Calosa
26c85fd18a added Eldritch Moon 2016-07-25 06:32:49 +08:00
Anthony Calosa
894615bee6 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-25 05:15:38 +08:00
zethfoxster
aeed094be0 Merge pull request #789 from zethfoxster/master
big whoops here, this would be a disastrous change.
2016-07-24 11:12:45 -04:00
zethfoxster
61068ee166 big whoops here, this would be a disastrous change. 2016-07-24 11:12:13 -04:00
zethfoxster
bdce25cb8c Merge pull request #788 from zethfoxster/master
pushing to master
2016-07-24 11:09:18 -04:00
zethfoxster
6a71bf5653 Merge pull request #32 from WagicProject/master
getting master
2016-07-24 11:08:51 -04:00
zethfoxster
3007ddc093 added oplifetotal...or readded, i swear this was already in a long time ago when I added lifetotal as a variable. either way. 2016-07-24 11:08:08 -04:00
Anthony Calosa
4495e1649f Merge pull request #787 from kevlahnota/master
Little border adjustments
2016-07-24 21:19:57 +08:00
Anthony Calosa
f960cdea9b A little border adjustment
no more very thin borders on awards and in game...
2016-07-24 20:25:20 +08:00
Anthony Calosa
b70b2a65bc Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-07-24 20:20:31 +08:00
Anthony Calosa
4a73e90da8 remove test
temporarily
2016-07-24 20:19:58 +08:00
Anthony Calosa
fc59bef156 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-24 19:41:58 +08:00
zethfoxster
512f4ca4e4 Merge pull request #786 from zethfoxster/master
pushing to master
2016-07-24 07:33:17 -04:00
zethfoxster
f254ca57c6 Merge pull request #31 from WagicProject/master
getting master
2016-07-24 07:32:06 -04:00
Anthony Calosa
5e35dac1da Update Living_Death.txt 2016-07-24 17:51:26 +08:00
Anthony Calosa
44cbd408ce Update _tests.txt 2016-07-24 14:25:08 +08:00
Anthony Calosa
6fbe9de1a8 Create Living_Death.txt 2016-07-24 14:24:11 +08:00
Anthony Calosa
3b1410f913 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-24 14:21:15 +08:00
Anthony Calosa
f9265923a9 Merge pull request #784 from kevlahnota/master
Border Adjustment & Added repeat depleter/ingest cards
2016-07-24 13:29:26 +08:00
Anthony Calosa
3282848631 Normalized Big Quad Border
Hopefully all Big Quads have identical border sizes: In Game, Deck
Editor Carousel and Trophies .
2016-07-24 13:12:40 +08:00
Anthony Calosa
f142363bfa smaller scaled big quad and forced border
Ingame big quads are scaled smaller
2016-07-24 12:40:41 +08:00
Anthony Calosa
c0e9800179 added scalpelexis, sphinx's tutelage, grindstone, primal surge 2016-07-24 12:31:16 +08:00
Anthony Calosa
97308ca31c Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-24 11:24:02 +08:00
zethfoxster
02992954c2 Merge pull request #30 from WagicProject/master
getting master
2016-07-23 09:19:12 -04:00
Anthony Calosa
78d4f178a3 Merge pull request #783 from kevlahnota/master
Fix Flying vs Moat (multiples of them). Fixes issue #526
2016-07-23 10:16:47 +08:00
Anthony Calosa
fe577d9dd0 fix flying and multiple moat in play
putrid imp that gains temporary flying cant attack if the opponent has
multiple moat in play, this should fix it.
2016-07-23 09:45:12 +08:00
Anthony Calosa
007010067b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-23 09:06:56 +08:00
zethfoxster
bc2d8dab31 corrected my logic for emerge, originally I thought the cost was the same as the original cost, while coding i noticed it can have a completely different cost than the real manacost.
moved the extra cost check for "offerings" to a location before canafford in alternative reacttoclick, the reason for this is that the 2 offering cost we have handle the can afford calls, and even cast the card in the dopay. not placing this before it causes the card to not react to click if there is a different manacost attached to the emerge/kill 
test codes below.
mana={g}{g}{g}
other={emerge}(r}{4} name(emerge)

mana={6}
other={k(giant|mybattlefield)}

fixed memleaks in killoffering code.

note to devs, remember to make diff costs a variable that you can safe_delete, it creates a manacost object that will become a leak otherwise.
do not use it directly as a function.
source->controller()->getManaPool()->canAfford(source->getManaCost()->Diff(target->getManaCost()))
this will leave a memleak every single time ai checks this cost, or a player accesses the cost even if you cant pay it.
2016-07-22 19:10:06 -04:00
zethfoxster
296f8645fb Merge pull request #782 from zethfoxster/master
pushing to master
2016-07-22 18:05:35 -04:00
zethfoxster
2d76c8ff0d Merge pull request #29 from WagicProject/master
getting master
2016-07-22 18:05:16 -04:00
zethfoxster
0a3d9f9876 flipped the logic of the 2 deck editor menu buttons left and right, it was a nightmare making an ai deck with the tiny buttons to navigate. having my finger slip slightly off the button made it travel the opposite direction from the button, which was confusing and felt very buggy. 2016-07-22 17:46:52 -04:00
Anthony Calosa
2a1d0b19ce Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-22 21:35:23 +08:00
Anthony Calosa
a99c57ab1a Merge pull request #780 from kevlahnota/master
OK quad and COMBATTOUGHNESS for attackers/blockers
2016-07-22 16:34:15 +08:00
Anthony Calosa
6832049ccc reserve size 2016-07-22 16:00:29 +08:00
Anthony Calosa
6d72753216 OK quad and COMBATTOUGHNESS for attackers/blockers
support doubled res for OK quad, AI should consider toughness as power
if it has COMBATTOUGHNESS ability
2016-07-22 15:38:38 +08:00
Anthony Calosa
b6b3898536 Merge pull request #10 from WagicProject/master
pull from master
2016-07-22 14:20:39 +08:00
Anthony Calosa
99922d38e2 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-22 14:15:50 +08:00
zethfoxster
161623a8d2 Merge pull request #779 from zethfoxster/master
pushing to master
2016-07-21 22:31:17 -04:00
zethfoxster
155a7a6582 Merge pull request #28 from WagicProject/master
getting master
2016-07-21 22:29:58 -04:00
zethfoxster
6aafe9dee0 added lifegain and oplifegain variable used the same as lifelost, but stores the value of life gained this turn. 2016-07-21 21:11:15 -04:00
zethfoxster
680c9d64cb Merge pull request #778 from zethfoxster/master
getting master
2016-07-21 20:47:28 -04:00
zethfoxster
ca395492d5 added meld(cardname)
added meldfrom(cardname|cardname) helper class.

auto={0}:target(arbor colossus|mybattlefield) meld(Arc Runner)
auto=meldfrom(arbor elf|Arbor Colossus)
2016-07-21 20:46:53 -04:00
Anthony Calosa
ea920d352f Merge pull request #777 from kevlahnota/master
Award images
2016-07-21 15:50:58 -05:00
Anthony Calosa
0c0031455b Add files via upload 2016-07-21 15:49:32 -05:00
Anthony Calosa
a8a9893ce4 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-22 04:22:34 +08:00
Anthony Calosa
5143743661 unlocked images 2016-07-21 22:58:27 +08:00
Anthony Calosa
88a42b25cc Add files via upload 2016-07-21 02:39:51 -05:00
Anthony Calosa
b371bf6efa Merge pull request #776 from kevlahnota/master
psp fix 3
2016-07-21 02:37:47 -05:00
Anthony Calosa
3bc7ed6f8c Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-07-21 15:36:22 +08:00
Anthony Calosa
f996510969 psp fix 3 2016-07-21 15:36:16 +08:00
Anthony Calosa
58fd119636 Add files via upload 2016-07-21 02:36:16 -05:00
Anthony Calosa
f275792604 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-21 15:23:17 +08:00
zethfoxster
9f8ead5e4e added other={cost}
other={emerge}
2016-07-20 20:06:18 -04:00
zethfoxster
a35ccbbe5b Merge pull request #775 from zethfoxster/master
pushing to master
2016-07-20 19:01:10 -04:00
zethfoxster
9a60a8838f Merge pull request #27 from WagicProject/master
getting master
2016-07-20 19:00:08 -04:00
zethfoxster
bb9e02da6b fixed a debug assert i introduced. 2016-07-20 18:58:29 -04:00
Anthony Calosa
0fd0c5ecc1 Merge pull request #774 from kevlahnota/master
psp fix 2
2016-07-20 17:36:02 -05:00
Anthony Calosa
c89961ebf0 Add files via upload 2016-07-20 17:35:03 -05:00
Anthony Calosa
0f81e82206 psp fix 2 2016-07-21 06:34:14 +08:00
Anthony Calosa
7c7c8c4f34 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-21 06:02:56 +08:00
xawotihs
3d7362aa9d Merge branch 'master' of https://github.com/WagicProject/wagic 2016-07-20 22:16:23 +01:00
Anthony Calosa
f3061a2526 Merge pull request #773 from kevlahnota/master
Semicolon
2016-07-20 11:40:24 -05:00
Anthony Calosa
2657af1aef semicolon 2016-07-21 00:38:01 +08:00
Anthony Calosa
dd03ed4b30 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-21 00:37:50 +08:00
Anthony Calosa
64c6b05963 Merge pull request #772 from kevlahnota/master
try to fix psp
2016-07-20 19:19:56 +08:00
Anthony Calosa
05017b0236 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-20 19:17:36 +08:00
Anthony Calosa
efd9cce4ef try to fix psp platform 2016-07-20 19:16:48 +08:00
Anthony Calosa
144c78fa4b Add files via upload 2016-07-20 19:12:06 +08:00
Anthony Calosa
3147aa539c Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-20 09:42:16 +08:00
zethfoxster
ad4532932b Merge pull request #771 from zethfoxster/master
pushing to master
2016-07-19 20:44:40 -04:00
zethfoxster
ffac3462af Merge pull request #26 from WagicProject/master
Merge pull request #770 from zethfoxster/master
2016-07-19 20:44:06 -04:00
zethfoxster
7c163592b5 removed the changes I made to selectAbility and created a new function which handles sending an ability and card to have AI do the ability of that card.
found a selectability call after blockers that was the cause of a race condition debug assert, but most importantly, the reason AI would sometimes block a creature, then immediately decide not to block. causing it to sometimes take preventable damage, and sometime cause AI to stack a ton of blockers on a single card even tho it did not have a chance to actually kill the creature.
this is still a thing, but wont happen so grossly incorrect now.
2016-07-19 20:16:22 -04:00
xawotihs
a6211e371e Revert usage of ant release and remove the DEBUG define in the NDK makefile to remove the testsuite 2016-07-19 22:24:26 +01:00
Xawotihs
775085eca1 Uses now *ant release* to build the APK 2016-07-19 21:30:08 +01:00
xawotihs
b3d580cada Changed Android app manifest to be not debuggable. 2016-07-19 21:03:24 +01:00
Anthony Calosa
37987ddb57 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-19 10:47:53 +08:00
zethfoxster
a56ab4f561 Merge pull request #770 from zethfoxster/master
pushing to master
2016-07-18 22:30:53 -04:00
zethfoxster
6f649bd680 Merge pull request #25 from WagicProject/master
getting master
2016-07-18 22:30:30 -04:00
zethfoxster
6316577ec7 taught AI basic attack and block cost.
added functionality to send specific abilities to AI "selectAbility" to have it find mana, targets, and use a selected ability at our command.
2016-07-18 22:03:16 -04:00
Anthony Calosa
61cd74fcd0 revert psp cache 2016-07-19 09:52:18 +08:00
zethfoxster
37fd0ebbd2 readded the "fakebar" size adjustments based on string lengths.
in debug there is a strange line drawn sometimes on screen, like the buttons on main screen, this is not present in release builds, I'm guessing its some kind of debug related thing with JGE and quads.
2016-07-18 19:02:03 -04:00
zethfoxster
8e987a6718 Merge pull request #769 from zethfoxster/master
pushing to master
2016-07-18 17:24:15 -04:00
zethfoxster
520be9dbe8 Merge pull request #24 from WagicProject/master
getting master
2016-07-18 17:23:54 -04:00
zethfoxster
322e6f7edf Merge pull request #768 from kevlahnota/master
Some changes on Deck Editor & Others
2016-07-18 17:22:16 -04:00
Anthony Calosa
b6eea6fe2e Some Changes to Deck Editor and Others
Some Deck Editor changes
2016-07-19 04:33:23 +08:00
Anthony Calosa
dc84c50ea8 add deck editor graphics 2016-07-19 03:32:22 +08:00
Anthony Calosa
07d7df7271 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-18 23:33:26 +08:00
Anthony Calosa
5b9f3c70dc Merge pull request #767 from kevlahnota/master
minor changes
2016-07-18 14:26:31 +08:00
Anthony Calosa
bd36590084 offquad for offset bg 2016-07-18 13:52:28 +08:00
Anthony Calosa
4e64ff4ff9 center menu title 2016-07-18 13:51:49 +08:00
Anthony Calosa
2dd882a7a5 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-18 13:51:19 +08:00
Anthony Calosa
fe4c102c7d Merge pull request #766 from kevlahnota/master
psp cache
2016-07-18 12:47:01 +08:00
Anthony Calosa
1380bc9940 psp cache 2016-07-18 12:44:19 +08:00
Anthony Calosa
5cc549ad3a Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-18 11:11:51 +08:00
Anthony Calosa
75395f6622 Merge pull request #765 from kevlahnota/master
Fix Deck Menu layer, Change Main Menu Layout, Fix Crash cdaactive on tokens
2016-07-18 11:04:51 +08:00
Anthony Calosa
c9576e260e fix blinking menu item 2016-07-18 11:04:14 +08:00
Anthony Calosa
362d692879 cleanup 2016-07-18 10:53:07 +08:00
Anthony Calosa
acbaa69305 use previous "phaseinfo" as fakebar 2016-07-18 10:38:47 +08:00
Anthony Calosa
592a48c725 add fakebar 2016-07-18 10:38:47 +08:00
zethfoxster
bfaaf7d893 travis int order 2016-07-17 22:37:32 -04:00
zethfoxster
9e73dc9c00 add support for repeater deplete cards.
Scalpelexis
Sphinx's Tutelage
Grindstone
normally I aim for much bigger card groups, but this was requested by one of the only 2 active members we have on the forum.
I'll have the card code for these cards ready when I code eldrich moon set.

to use, use it like any normal depelte except add
name
color
to the front, 
name deplete:4 targetsZone(player)
this will repeat this until the player depletes cards that dont have atleast 2 with the same name.
color deplete:2 target(player)
this will continue to deplete until the player depletes a set of cards that dont share a color with each other lands not included when checking colors.
enjoy.
2016-07-17 22:24:53 -04:00
Anthony Calosa
d37aac0c71 added fakebar.png 2016-07-18 10:15:22 +08:00
Anthony Calosa
8314d4c9ae update GameStateMenu
as Zeth suggested
2016-07-18 09:24:28 +08:00
Anthony Calosa
d860954c32 fix crash with cdaactive and token
cdaactive is forcedalive, if the token dies, forcedestroy it, token/s go
to garbage
2016-07-18 07:32:02 +08:00
Anthony Calosa
0b4b085095 fix layer order 2016-07-18 07:28:31 +08:00
Anthony Calosa
c0334d0c94 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-18 06:07:38 +08:00
zethfoxster
6acd897e16 Merge pull request #23 from WagicProject/master
getting master
2016-07-17 10:39:10 -04:00
Anthony Calosa
2adfc55339 Merge pull request #763 from kevlahnota/master
stats to the right
2016-07-17 20:07:28 +08:00
Anthony Calosa
208b4f68b5 added statsholder 2016-07-17 19:05:00 +08:00
Anthony Calosa
33fd704a00 move stats to the right in deck menu 2016-07-17 19:03:55 +08:00
Anthony Calosa
6d8ece6822 change avatar holder bg color 2016-07-17 19:02:45 +08:00
Anthony Calosa
6b5cbd5f11 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-17 17:35:36 +08:00
Anthony Calosa
ea6017511b Merge pull request #762 from kevlahnota/master
large icons for Android
2016-07-17 15:39:58 +08:00
Anthony Calosa
2477b8a3ea large icons for Android 2016-07-17 15:39:10 +08:00
Anthony Calosa
cdd1075384 Merge pull request #761 from kevlahnota/master
phaseinfo & backdropframe & backdrop
2016-07-17 15:22:58 +08:00
Anthony Calosa
c61c17f19c increased cache 2016-07-17 15:05:53 +08:00
Anthony Calosa
774b79f07e seperated backdrop and backdropframe 2016-07-17 14:44:37 +08:00
Anthony Calosa
002172281b added backdrop frame 2016-07-17 14:42:16 +08:00
zethfoxster
4e9d4bfaf6 minor changes to ai 2016-07-17 02:19:58 -04:00
Anthony Calosa
894e9f244f added phaseinfo graphic 2016-07-17 14:13:57 +08:00
Anthony Calosa
189b45ab9b new backdrop 2016-07-17 14:12:47 +08:00
Anthony Calosa
b0912de788 Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-07-17 14:11:54 +08:00
Anthony Calosa
f435946f66 seperated backdrop and phase info graphic 2016-07-17 14:11:49 +08:00
Anthony Calosa
64d91ccaab Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-17 12:52:12 +08:00
Anthony Calosa
e97fbb2784 Update DeckImporter.java 2016-07-17 11:47:06 +08:00
zethfoxster
0029e0ed43 Merge pull request #22 from WagicProject/master
getting master
2016-07-16 23:13:59 -04:00
Anthony Calosa
088f235f29 Merge pull request #760 from kevlahnota/master
revert build.xml
2016-07-17 08:55:34 +08:00
Anthony Calosa
dd5aa90498 revert build.xml 2016-07-17 08:54:26 +08:00
Anthony Calosa
c866e5dd45 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-17 08:54:01 +08:00
Anthony Calosa
6e8f74af15 Merge pull request #759 from kevlahnota/master
centered unlock awards and double res shop
2016-07-17 08:36:18 +08:00
Anthony Calosa
d70fd8c208 test build number 2016-07-17 08:35:14 +08:00
Anthony Calosa
9551c9bed4 upped build number
don't know if we can compute travis build number minus the last build of
this
2016-07-17 08:02:04 +08:00
Anthony Calosa
06740564f8 centered unlock awards and double res shop
400x100 base scale for the xxx_unlocked.png
2016-07-17 07:42:46 +08:00
Anthony Calosa
ef94c31d42 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-17 06:28:17 +08:00
zethfoxster
093b370903 Merge pull request #758 from zethfoxster/master
stupid case for travis
2016-07-16 16:31:56 -04:00
zethfoxster
542845667a stupid case for travis 2016-07-16 15:59:45 -04:00
zethfoxster
8ce08bc4f4 Merge pull request #757 from zethfoxster/master
more fixes
2016-07-16 14:47:12 -04:00
zethfoxster
69158d55c1 more fixes 2016-07-16 14:46:40 -04:00
zethfoxster
d9a794e186 Merge pull request #756 from zethfoxster/master
pushing to master
2016-07-16 14:44:16 -04:00
zethfoxster
6cc146c0a5 Merge pull request #21 from WagicProject/master
getting master
2016-07-16 14:43:45 -04:00
Anthony Calosa
b490328a45 Merge pull request #755 from kevlahnota/master
backdrop & taskboard
2016-07-16 22:08:13 +08:00
zethfoxster
30df5226df Merge pull request #20 from WagicProject/master
getting master
2016-07-16 09:39:26 -04:00
Anthony Calosa
c8369ce316 replaced backdrop and taskboard 2016-07-16 21:30:09 +08:00
Anthony Calosa
ffb7e5d573 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-16 21:00:14 +08:00
Anthony Calosa
3d41531a84 Merge pull request #754 from kevlahnota/master
support doubled res for awards
2016-07-16 19:50:20 +08:00
Anthony Calosa
f0fa6986d7 support double res award
the 203.f height and 268.f is reserved for small award images, if you
want double res, make the award in scale of 171x192 (example 342x384)
2016-07-16 14:49:57 +08:00
Anthony Calosa
d908606527 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-16 13:30:55 +08:00
Anthony Calosa
886a26aa20 Merge pull request #753 from kevlahnota/master
First set of Graphic Changes ... use default theme
2016-07-16 10:19:37 +08:00
Anthony Calosa
bc77ff45cd Create readme.txt 2016-07-16 09:44:42 +08:00
Anthony Calosa
c1fb884dcd moved old themes 2016-07-16 09:38:20 +08:00
Anthony Calosa
26992828f0 Add files via upload 2016-07-16 09:36:22 +08:00
Anthony Calosa
07670c6bc5 Create readme.txt 2016-07-16 09:32:15 +08:00
Anthony Calosa
b2bc6b7740 remove old theme 2016-07-16 09:25:21 +08:00
Anthony Calosa
c617ede243 First set of Graphic changes
TODO: generate a graph/stats on deck menu to the right, update other
graphics, move detailed info on the right of deck menu...
2016-07-16 09:16:07 +08:00
Anthony Calosa
0d7600d62c revert wallpapers 2016-07-16 09:08:38 +08:00
Anthony Calosa
7a0ef10f9f add new graphics 2016-07-16 09:06:38 +08:00
zethfoxster
2fc52c9abd changed suspend to use castcard. 2016-07-14 21:25:04 -04:00
zethfoxster
9a56817bf8 fixed a bug I introduced 2016-07-14 20:44:21 -04:00
zethfoxster
e81346f881 more work on cascade, I think I figured out what was causing a weird crash. 2016-07-14 20:28:19 -04:00
zethfoxster
01fd8fa406 recoded cascade, the logic was incorrect. also the ability was coded incorrectly. ALL the cards get exiled, then placed on the bottom, the card that cost less is also exiled then MAY be cast otherwise its placed in the library bottom with the rest.
I also now tell AI to ALWAYS use cast card if available. as the effects are always better.
2016-07-13 23:57:30 -04:00
Anthony Calosa
f09e0db311 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-14 10:51:23 +08:00
zethfoxster
5dc72e88fe Merge pull request #19 from WagicProject/master
getting master
2016-07-13 20:08:23 -04:00
Anthony Calosa
169e2b8477 change path again 2016-07-14 01:13:43 +08:00
Anthony Calosa
9fe5ec6068 removed old path 2016-07-14 00:59:46 +08:00
Anthony Calosa
d4e0ca3f03 try to fix build 2016-07-14 00:57:50 +08:00
Anthony Calosa
7690a27e60 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-13 18:50:51 +08:00
Anthony Calosa
748d9ef65d Merge pull request #752 from kevlahnota/master
menubar
2016-07-13 15:25:18 +08:00
Anthony Calosa
d88db28da8 menubar graphic 2016-07-13 14:27:33 +08:00
Anthony Calosa
e95b9f57fa menubar 2016-07-13 14:25:57 +08:00
Anthony Calosa
6c14aa49ea Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-13 13:50:18 +08:00
Anthony Calosa
1859fc87ae Merge pull request #751 from kevlahnota/master
adjust simple menu & textscroller
2016-07-13 13:11:39 +08:00
Anthony Calosa
6c9d2e5db7 tooltip graphic 2016-07-13 13:09:34 +08:00
Anthony Calosa
d6d147187d add tooltip on textscroller 2016-07-13 13:07:29 +08:00
Anthony Calosa
ab75c1d5e2 adjust simple menu
adjust simple menu and fix some cards
2016-07-13 11:43:00 +08:00
Anthony Calosa
992178eb9a Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-07-12 21:40:16 +08:00
Anthony Calosa
f61ce2884a Merge pull request #9 from WagicProject/master
pull
2016-07-12 21:40:03 +08:00
Anthony Calosa
21db8852d6 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-12 21:34:30 +08:00
zethfoxster
2900c1f914 Merge pull request #750 from zethfoxster/master
Pushing fixes
2016-07-12 09:01:04 -04:00
zethfoxster
8dd7bd8912 Merge pull request #18 from WagicProject/master
Getting master
2016-07-12 09:00:25 -04:00
Anthony Calosa
c6f1784d9d Merge pull request #749 from kevlahnota/master
small adjustment
2016-07-12 19:27:57 +08:00
Anthony Calosa
684cb086cc rounded 2016-07-12 17:51:48 +08:00
Anthony Calosa
d2d8b06d97 lowered value 2016-07-12 17:44:57 +08:00
Anthony Calosa
4d346e0ca7 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-12 17:43:47 +08:00
Anthony Calosa
a6cbd10f3b Merge pull request #748 from kevlahnota/master
Update some items
2016-07-12 16:34:16 +08:00
Anthony Calosa
416a49d87f Update some items 2016-07-12 15:49:43 +08:00
zethfoxster
f438548e5c teaching ai to select X on the menu again. 2016-07-11 23:46:03 -04:00
zethfoxster
cc75fc42db fixed a memleak that triggered with cards like vise, we were leaving this funtion without deleting an event that was not being sent. 2016-07-11 19:32:57 -04:00
zethfoxster
66e01b12f8 Merge pull request #17 from WagicProject/master
getting master
2016-07-11 18:53:15 -04:00
Anthony Calosa
b3045726fb Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-12 06:22:49 +08:00
Anthony Calosa
9b2b541e4d Merge pull request #747 from kevlahnota/master
try to fix failed logic here
2016-07-12 05:30:58 +08:00
Anthony Calosa
2d763d106d try to fix failed logic here 2016-07-12 02:27:06 +08:00
Anthony Calosa
37d2feeaa5 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-11 20:01:38 +08:00
Anthony Calosa
66a33cd56e Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-11 19:56:57 +08:00
Anthony Calosa
ae07844a71 a little bit smaller 2016-07-11 19:56:39 +08:00
Anthony Calosa
e00484775e Merge pull request #745 from kevlahnota/master
Add Missing Devoid Cards and change Simple Menu
2016-07-11 19:54:37 +08:00
Anthony Calosa
ed871db1f3 use regular images in grid deck view
i did search for psp-2000 and it has 64mb ram vs psp-1000 32mb ram. use
lowres images for psp to be safe.
2016-07-11 19:16:47 +08:00
Anthony Calosa
3c4f3146c4 fix cards that move on top of library
seems when you search your library, after you put it on top, it shuffles
also the chosen card.
2016-07-11 18:39:21 +08:00
Anthony Calosa
5cde230723 Fix Crash when importing deck
removed "sideboard"
2016-07-11 16:35:57 +08:00
Anthony Calosa
6d4a068453 SImple Menu 2016-07-11 13:54:08 +08:00
Anthony Calosa
248e8e6beb Added some missing Devoid cards 2016-07-11 10:49:43 +08:00
Anthony Calosa
4db11ba324 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-11 08:43:52 +08:00
Anthony Calosa
a97f862641 Merge pull request #744 from kevlahnota/master
Add support for reducing hybrid costs
2016-07-11 08:33:15 +08:00
Anthony Calosa
69db7f7384 Add support for reducing Hybrid cost
it doesn't remove the hybrid icons but it reduces the cost.
2016-07-11 07:55:12 +08:00
Anthony Calosa
a72fb6f01a Merge pull request #8 from WagicProject/master
pull from master
2016-07-11 07:47:58 +08:00
zethfoxster
53766b99c9 Merge pull request #743 from zethfoxster/master
pushing to master
2016-07-10 14:05:51 -04:00
zethfoxster
1b54cf56e0 auto close graveyard when delving and we have exiled enough to pay for the card. 2016-07-10 14:04:27 -04:00
zethfoxster
05a553ffdc Merge pull request #16 from WagicProject/master
getting master
2016-07-10 13:46:43 -04:00
Anthony Calosa
d6ea80843f Merge pull request #742 from kevlahnota/master
Updated Primitives, Corrected Names, Updated Unsupported
2016-07-10 18:08:00 +08:00
Anthony Calosa
8c2ce43053 Cleaned Unsupported 2016-07-10 17:04:04 +08:00
Anthony Calosa
34b33798a7 Corrected some card names 2016-07-10 16:44:39 +08:00
Anthony Calosa
adbef081d0 Update primitives
forcedalive now means forcedalive even when the cards is not in play.
Cloudshift ability is move to exile and move to your battlefield, blink
cannot be used since it moves to exile and then moves to owner
battlefield...
2016-07-10 15:42:36 +08:00
Anthony Calosa
5eb3a86467 Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-07-10 08:59:10 +08:00
Anthony Calosa
bef2b34faa Merge pull request #7 from WagicProject/master
pull changes from master
2016-07-10 08:57:20 +08:00
zethfoxster
7516b44804 Merge pull request #741 from zethfoxster/master
pushing to master
2016-07-09 20:22:52 -04:00
zethfoxster
8b70f5a114 added isochron and spell binder 2016-07-09 20:21:40 -04:00
zethfoxster
c4581a8889 added imprintedcard as a usable name for castcard 2016-07-09 20:20:55 -04:00
zethfoxster
fdde5b7fe9 ok round 3 2016-07-09 18:57:01 -04:00
zethfoxster
d1bc246a35 Merge pull request #740 from zethfoxster/master
Master
2016-07-09 18:30:16 -04:00
zethfox
262779b515 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-09 18:28:08 -04:00
zethfox
78e4407c71 Revert "edge case fix, the issue arises from castcard but I'm fixing it at a higher level since init to zone should always have a valid "player 1" in its first constructor."
This reverts commit d247c53136.
2016-07-09 18:21:52 -04:00
zethfoxster
d247c53136 edge case fix, the issue arises from castcard but I'm fixing it at a higher level since init to zone should always have a valid "player 1" in its first constructor. 2016-07-09 17:55:08 -04:00
zethfoxster
bca9381903 Merge pull request #739 from zethfoxster/master
unused variables.
2016-07-09 13:13:36 -04:00
zethfoxster
a8cbdafe6e unused variables. 2016-07-09 13:12:58 -04:00
zethfoxster
e595f141c1 Merge pull request #738 from zethfoxster/master
pushing to master
2016-07-09 13:09:03 -04:00
zethfoxster
4aa43de54d Merge pull request #15 from WagicProject/master
getting master
2016-07-09 13:06:46 -04:00
zethfoxster
2e92838364 fixed an issue with dredge, where dredge is offered even though theres only one dredger on cards that draw multiple. 2016-07-09 11:38:25 -04:00
Anthony Calosa
283cb64a01 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-09 21:20:31 +08:00
zethfoxster
517fd2d4f4 Merge pull request #737 from zethfoxster/master
merging to master
2016-07-09 09:11:33 -04:00
zethfoxster
3467c976a9 Merge pull request #14 from WagicProject/master
getting master
2016-07-09 08:54:13 -04:00
Anthony Calosa
f3166406ec Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-09 19:56:14 +08:00
Anthony Calosa
b5b930dddb Merge pull request #736 from kevlahnota/master
Add moveto(previousbattlefield) test
2016-07-09 17:31:37 +08:00
Anthony Calosa
11c10f526a Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-07-09 16:51:11 +08:00
Anthony Calosa
cf362f1a6a Update _tests.txt 2016-07-09 16:50:45 +08:00
Anthony Calosa
3b2ea8ea98 Create previousbattlefield.txt 2016-07-09 16:50:07 +08:00
zethfoxster
f82bc39473 ok found the massive draw, it was trenisphere. the card lords every single card in the game a mana modifier. affinity normally didnt see these issues cause the cards effected are just either in your hand or the source themselves. but when trin was put in play it would cause 120 cards to have to update thier cost, which can not be done in acceptible cpu time. anyways, this should solve the issue.
that card is a desaster, please do not add any more code to support it, though with it in its current state im wondering why its not in supported and is placed in borderline.
2016-07-09 01:24:55 -04:00
zethfoxster
b5976035e3 actually i changed my mind, instead lets update affinity after events are processed, that should take into account cards untapping,moving, ect.... 2016-07-09 00:58:19 -04:00
zethfoxster
14f65c55b5 going to try only updating affinity() when cards move from anywhere to anywhere to help minimize the calls to this function. this atleast allows me to debug albeit slowly the follow issue ive been working to fix. not sure when this was introduced but it was not happening when i first coded this function. manacost->copy() did not slow the game to a crawl.
anyways, trinisphere and any card containing 
other={H(land[basic]|mybattlefield)}{1} name(Pay /1/ and Return a Basic Land to Hand)

cost such as this with a CD tc.
2016-07-09 00:48:08 -04:00
zethfoxster
ee91e0698d corrected some logic with computenewcost.
there is a bug im working on with newaffinity and cards that contain targetchoosers with CD tcs. 

experimental change also added with lords. im making the abilities grants by lord forcedalive until the lord is removed from game.
some instances of forcedalive in master primitives did not contain abilities which resolved, meaning they would contenue even though the source had left play.
2016-07-09 00:11:21 -04:00
Anthony Calosa
aa23537354 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-09 06:50:31 +08:00
zethfoxster
242c7b623f Merge pull request #13 from WagicProject/master
getting master
2016-07-08 17:54:14 -04:00
zethfoxster
c0c52e57df what a dumb typo. surprised it was in the engine that way for so long. 2016-07-08 17:48:27 -04:00
Anthony Calosa
dff938e802 Merge pull request #732 from kevlahnota/master
"previousbattlefield" for mover
2016-07-09 04:33:41 +08:00
Anthony Calosa
847e9dffc2 revised 2016-07-08 22:57:47 +08:00
Anthony Calosa
10d81bd47a try to fix segmentation fault 2016-07-08 18:46:07 +08:00
Anthony Calosa
3aa64697d2 "previousbattlefield" for mover 2016-07-08 17:39:47 +08:00
Anthony Calosa
fecaf64eec Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-08 17:30:51 +08:00
Anthony Calosa
20cb8e4ead Merge pull request #731 from kevlahnota/master
Softcoded some cards alias
2016-07-08 16:20:33 +08:00
Anthony Calosa
cb6e5a5e54 Update changes 2016-07-08 15:47:01 +08:00
Anthony Calosa
366de00950 Softcoded some card alias 2016-07-08 15:32:13 +08:00
Anthony Calosa
f80b7a32c1 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-08 12:48:55 +08:00
Anthony Calosa
67f3d956f4 Merge pull request #730 from kevlahnota/master
Updated Primitives
2016-07-08 11:47:37 +08:00
Anthony Calosa
607301b35d Update _tests.txt
added test for lifetap vs shocklands
2016-07-08 10:19:29 +08:00
Anthony Calosa
9f5c3e9942 Create lifetap2.txt 2016-07-08 10:18:00 +08:00
Anthony Calosa
d34ecff3aa Updated Primitives
for cards that use tap(noevent)
2016-07-08 10:02:54 +08:00
zethfoxster
0ff7e54ff4 this is a good enough fix as waste is colorless which is artifact, and all we do is barrow the kbitmask from land. 2016-07-07 20:47:25 -04:00
Anthony Calosa
c4e508a090 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-08 08:37:09 +08:00
zethfoxster
58f15184b8 Merge pull request #729 from zethfoxster/master
pushing to master
2016-07-07 20:17:16 -04:00
zethfoxster
61d22eb498 added a modifier for "tap" for cards that say "enters the battlefield tapped", they are supposed to be tapped when put in play, which mean they should not trigger @tapped(.
for cards with the line or options "do/pay MANA or this card enters the battlefield tapped"
simply change it to tap(noevent)
it will simulate the card being placed into play already tapped.
2016-07-07 19:02:41 -04:00
zethfoxster
34d10bba3c Merge pull request #12 from WagicProject/master
getting master
2016-07-07 18:14:06 -04:00
Anthony Calosa
5ba8cc3439 Merge pull request #727 from kevlahnota/master
Sorted Primitives and Cleanup Tabs
2016-07-07 14:02:33 +08:00
Anthony Calosa
4da7f77089 Cleanup tabs 2016-07-07 13:25:36 +08:00
Anthony Calosa
c544206437 Sorted Primitives 2016-07-07 13:10:30 +08:00
Anthony Calosa
7a65a7da1e Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-07 12:18:54 +08:00
zethfoxster
014a153e49 Merge pull request #726 from zethfoxster/master
push to master
2016-07-06 23:07:23 -04:00
zethfoxster
066c40d9c1 close library, exile, or graveyard after we "move" cards from it. 2016-07-06 22:04:59 -04:00
Anthony Calosa
5f7f4a23aa Merge pull request #6 from WagicProject/master
pull from master
2016-07-07 09:19:21 +08:00
Anthony Calosa
e39dee6e1d Revert "Zeth Fixes"
This reverts commit 78d3828f1e.
2016-07-07 09:16:03 +08:00
Anthony Calosa
cf71f84e49 Revert "Sorted Primitives"
This reverts commit 2f4c00c602.
2016-07-07 09:15:57 +08:00
zethfoxster
8265253388 fixed a issue with dredge where it was entering the stack even tho dredging itself is a replacement effect. 2016-07-06 20:26:18 -04:00
zethfoxster
b1293b70cf Merge pull request #725 from zethfoxster/master
push to wagicproject
2016-07-06 19:40:38 -04:00
zethfoxster
7b8b197a35 another fix 2016-07-06 19:08:41 -04:00
zethfoxster
867e1b8731 fixes 2016-07-06 18:24:45 -04:00
zethfoxster
5cdcf47994 merged my changes to the base 2016-07-06 18:08:33 -04:00
zethfoxster
a500920bb2 Merge pull request #11 from WagicProject/master
got it
2016-07-06 17:57:38 -04:00
zethfoxster
a748e0337d trying to get my commit in 2016-07-06 17:56:17 -04:00
Anthony Calosa
2f4c00c602 Sorted Primitives 2016-07-06 16:09:54 +08:00
Anthony Calosa
78d3828f1e Zeth Fixes
Memleaks and others
2016-07-06 16:05:29 +08:00
Anthony Calosa
4505f51fbd Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-06 13:13:40 +08:00
zethfoxster
2ca7b2310b trying to manuelly add changes 2016-07-06 00:43:11 -04:00
zethfoxster
861366dd71 Fixed the memleaks caused by computeNewCost, moved them to gameobserver where affinity takes place, removed repeative code that was in game observer, moved the game observer components into computenewcost, removed the calls for "new mana" in all alternative play type that were added with this function. 2016-07-06 00:02:15 -04:00
Anthony Calosa
4cada08cbe Merge pull request #723 from kevlahnota/master
Deckstats Mana Rendering and Others
2016-07-06 09:09:32 +08:00
Anthony Calosa
1d80d97d22 Shackled highlight border 2016-07-06 07:55:10 +08:00
Anthony Calosa
935849142c replaced alias with shackler 2016-07-06 06:37:27 +08:00
zethfoxster
4e048f775d Merge pull request #8 from WagicProject/master
getting master
2016-07-05 18:37:14 -04:00
Anthony Calosa
f45adb5b9e removed alias 1111 2016-07-06 06:28:42 +08:00
Anthony Calosa
d4cc7ca232 removed alias that display chosen color 2016-07-06 06:21:45 +08:00
Xawotihs
2b342ca33b Fixed typo 2016-07-05 23:57:53 +02:00
xawotihs
97e6df7f59 Should fix PSP artifact build and upload 2016-07-05 23:49:33 +02:00
Anthony Calosa
51d06d8234 removed alias for overload 2016-07-06 05:23:25 +08:00
Anthony Calosa
16f7ae54b8 Fix Deck Mana Symbol Rendering
deckmanaColors was increased to 7, made this >=6 so it's compatible with
old deck stats
2016-07-06 04:26:01 +08:00
Anthony Calosa
e15734d17e White border for Deckmaster Set 2016-07-06 04:24:07 +08:00
Anthony Calosa
2cb773dd48 Added Yisan and Zameck 2016-07-06 04:23:46 +08:00
Anthony Calosa
09672ce89b Added Delver of Secrets & Tasigur 2016-07-05 23:33:55 +08:00
Anthony Calosa
c476262288 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-05 17:21:59 +08:00
Anthony Calosa
84c73bb11f Merge pull request #722 from kevlahnota/master
Added some missing reveal cards
2016-07-05 17:09:50 +08:00
Anthony Calosa
f8b5519ced Added some reveal cards 2016-07-05 15:13:19 +08:00
Anthony Calosa
01b7f36750 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-05 11:50:50 +08:00
Anthony Calosa
759c5222ac Merge pull request #721 from kevlahnota/master
Added C15 and MMA
2016-07-05 10:55:05 +08:00
Anthony Calosa
9847edbce1 Added MMA 2016-07-05 10:07:07 +08:00
Anthony Calosa
19789b6d90 Added Commander 2015 set 2016-07-05 08:22:43 +08:00
Anthony Calosa
7b2ba7f3b1 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-05 08:20:13 +08:00
Anthony Calosa
9a5ed11c83 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-05 06:34:36 +08:00
Anthony Calosa
3fc8b6fc5c Merge pull request #720 from kevlahnota/master
Add missing cards that uses producecolor
2016-07-05 06:27:19 +08:00
xawotihs
a2bb67a828 Removed duplicate blacklist and added some cache 2016-07-04 23:21:34 +02:00
zethfoxster
c018e3dcc2 fixed a ton of memleaks, narrowed down the memleaks to just the computeNewCost function.
still working on a fix for this.
2016-07-04 15:13:35 -04:00
zethfoxster
2b8f1b350c added bonus events for eldrazi and werewolves 2016-07-04 11:18:07 -04:00
zethfoxster
806c82c30c Merge pull request #7 from WagicProject/master
getting master
2016-07-04 10:46:36 -04:00
zethfoxster
76f1591b58 removed WParsedInt "morethanfour", "plusone","plustwo","plusthree"
added 2 things
first plus/plusend, minus/minusend
written many ways damage:type:*:myhandminus2minusend
would deal damage equal to the cards in my hand -2
damage:type:creature:mybattlefieldplustype:creature:opponentbattlefieldplusend
damage equal to the number of creatures in my battlefield plus the number of creatures in opponents battlefield.

now there are special cases where we need to know the value BEFORE applying multipliers. life: is one of them. I added "math/mathend"

auto=@each opponent upkeep:target(opponent) life:-mathtype:*:myhandminustype:*:opponenthandminusendmathend opponent
in the example above, without "math" the "-" would be used for the first section of the minus parsed int, instead of being applied as a multiplier for the total of the number.

this is extremely flexible, and can contain any Wparsed int in both parts, you can add or subtract and use the differences between to values as the value of the parsedInt.
2016-07-04 10:43:07 -04:00
Xawotihs
2a5fc931b6 Should fix pull request Travis error 2016-07-04 16:09:46 +02:00
Anthony Calosa
a392e631d0 Update cards that has both tap and sacrifice 2016-07-04 21:30:42 +08:00
Anthony Calosa
f3da8f7353 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-04 21:07:58 +08:00
Anthony Calosa
fda4d43678 added missing cards Mirari's Wake and the likes 2016-07-04 19:55:19 +08:00
Anthony Calosa
a09868c397 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-04 19:54:32 +08:00
zethfoxster
fdddee415f Merge pull request #6 from WagicProject/master
getting master
2016-07-04 07:04:41 -04:00
Anthony Calosa
d239048817 Added V15 2016-07-04 18:58:41 +08:00
Anthony Calosa
88e146f4ba Added CMA 2016-07-04 18:56:07 +08:00
Anthony Calosa
a709a7fec0 Merge pull request #719 from kevlahnota/master
Fixed Madness, Removed Duplicates, Updated Unsupported, Sorted Primitives & Updated Premium Deck Series
2016-07-04 14:32:18 +08:00
Anthony Calosa
8d5d7bdf8d Update changelog 2016-07-04 14:30:10 +08:00
Anthony Calosa
ffe3317228 Updated and Cleaned Unsupported 2016-07-04 13:28:14 +08:00
Anthony Calosa
71adcb338d Fixed Madness moveto(ownergraveyard) and Remove Duplicates 2016-07-04 12:06:29 +08:00
Anthony Calosa
62b46f6ef5 remove Duplicate 2016-07-04 11:16:12 +08:00
Anthony Calosa
65149ece6c Sorted Primitivs
7-14-2016
2016-07-04 10:34:33 +08:00
Anthony Calosa
b0318f6939 Updated Premium Series 2016-07-04 10:27:08 +08:00
Xawotihs
d14e28d7b3 Should fix android package upload 2016-07-04 04:18:26 +02:00
Anthony Calosa
b98fe6bda5 Merge pull request #5 from WagicProject/master
pull new changes from zeth
2016-07-04 10:12:16 +08:00
Anthony Calosa
6e6274a2dd Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-04 09:52:48 +08:00
zethfoxster
52988f154b Merge pull request #717 from zethfoxster/master
Fails but I have no idea why
2016-07-03 21:49:40 -04:00
zethfoxster
b590ea8caa Merge pull request #5 from WagicProject/master
getting master
2016-07-03 21:38:54 -04:00
Anthony Calosa
3c7570aab9 Merge pull request #715 from kevlahnota/master
Updated Sets
2016-07-04 06:18:59 +08:00
Anthony Calosa
3b8c92f5c2 Updated Planechase, Archenemy, Chronicles, Commander 2016-07-04 06:16:57 +08:00
Anthony Calosa
164cf79613 added MM2 2016-07-04 05:37:11 +08:00
zethfoxster
a216a6989b more fixes 2016-07-03 17:07:22 -04:00
zethfoxster
050bf5f73c updated test for new X rules. 2016-07-03 15:24:05 -04:00
xawotihs
0a0ee3cc98 Merge branch 'master' into cmake 2016-07-03 16:44:21 +02:00
Anthony Calosa
8ff94669f2 added C14 2016-07-03 19:39:18 +08:00
zethfoxster
775f9eb6b3 unused variable 2016-07-02 23:44:14 -04:00
zethfoxster
aeff6b60e9 forgot to remove this. 2016-07-02 23:20:51 -04:00
zethfoxster
94989a1109 Merge pull request #4 from WagicProject/master
get master
2016-07-02 23:07:40 -04:00
Anthony Calosa
e1c6c4e6b6 Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-07-03 10:46:11 +08:00
Anthony Calosa
48bd49cf2f Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-03 10:45:26 +08:00
zethfoxster
385a48bb43 fixed a bug where {t}{s(creature|mybattlefield)} or similar cost were not allowed to select the source to pay for the cost.
as long as the cost are not similar, the source is a valid target.
{s}{s(creature|mybattlefield)}
or
{t}{t(creature)}
or when the card states specifically that the source is not valid such as 
"{t},sacrifice another creature you control:draw a card"
2016-07-02 22:39:45 -04:00
Anthony Calosa
ad2b9a3640 Added Zendikar vs Eldrazi 2016-07-03 09:22:41 +08:00
Anthony Calosa
df249895e6 Added C13 2016-07-03 09:19:43 +08:00
zethfoxster
c7005ef933 cards for commit 2016-07-02 21:08:24 -04:00
zethfoxster
2489be93a3 added setting the value of X as you cast a spell with X.
this does not cover abilities yet.
2016-07-02 13:38:07 -04:00
zethfoxster
fa916c4fab Merge pull request #3 from WagicProject/master
updating from master
2016-07-02 09:08:13 -04:00
Anthony Calosa
a8fcb909fe Added Deckmasters 2016-07-02 20:41:59 +08:00
Anthony Calosa
1262c5e8ff Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-02 20:20:18 +08:00
Anthony Calosa
6edc3bcd02 Merge pull request #714 from kevlahnota/master
Updated Masters, Beginners, Duels and Vault Sets
2016-07-02 19:52:24 +08:00
Anthony Calosa
4e9e709816 Updated Vaults Block 2016-07-02 18:57:52 +08:00
Anthony Calosa
d24bc0cf94 Added V14 2016-07-02 18:57:24 +08:00
Anthony Calosa
a4bb0f40cc Added From the Vault Legends 2016-07-02 18:42:32 +08:00
Anthony Calosa
37d7693e3c Added Elspeth vs Kiora 2016-07-02 18:28:56 +08:00
Anthony Calosa
9fd1c4bb0a Added Speed vs Cunning 2016-07-02 18:21:28 +08:00
Anthony Calosa
9561cea8f9 Added Jace vs Vraska 2016-07-02 18:17:51 +08:00
Anthony Calosa
cfdfe6e567 Updated Duel Decks 2016-07-02 18:06:53 +08:00
Anthony Calosa
c3736f8dd8 Added Heroes vs Monsters 2016-07-02 18:03:40 +08:00
Anthony Calosa
6232c2e894 Added Sorin vs Tibalt 2016-07-02 17:54:54 +08:00
Anthony Calosa
a2cce876db Updated Beatdown and Battle Royale 2016-07-02 16:46:09 +08:00
Anthony Calosa
d3791e1316 Updated Un-Serious Sets 2016-07-02 09:49:34 +08:00
Anthony Calosa
9cbbdc422f Updated Beginner Sets 2016-07-02 09:40:04 +08:00
zethfoxster
f76c28fa64 convoke
other={convoke} name(Convoke)
delve
other={delve}
they might be able to be added directly to the real manacost.

added an ability that grants an ability while the source remains tapped
grant ability grantend...

added dethrone
abilities=dethrone

added support of multitargeting to extra cost, it acts the same as normal multitargeting, repeats dopay() the effects for each.
2016-07-01 21:29:51 -04:00
Anthony Calosa
cabc3e2441 Updated Masters Block 2016-07-02 09:12:43 +08:00
Anthony Calosa
f208e755c2 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-02 07:32:27 +08:00
zethfoxster
9841ce32ae Merge pull request #2 from WagicProject/master
get master
2016-07-01 17:01:15 -04:00
Anthony Calosa
4f6456635e Merge pull request #713 from kevlahnota/master
Cleaned and Sorted all Core and Expansion Sets
2016-07-01 22:44:52 +08:00
Anthony Calosa
6dc69ded22 parse "total" cards in set infor 2016-07-01 22:09:08 +08:00
Anthony Calosa
6ce67a95a2 transformed cards as tokens
so they cannot be bought in the deck editor
2016-07-01 22:03:01 +08:00
Anthony Calosa
6cc943d15d Update Shadows over Innistrad Meta 2016-07-01 21:25:42 +08:00
Anthony Calosa
b23314b408 Updated Battle for Zendikar Block 2016-07-01 21:21:48 +08:00
Anthony Calosa
9c32e4d66a Updated Khans of Tarkir Block 2016-07-01 21:16:09 +08:00
Anthony Calosa
1b9ddabcab Updated Theros Block 2016-07-01 20:59:04 +08:00
Anthony Calosa
6259333a70 Updated Return to Ravnica Block 2016-07-01 20:46:18 +08:00
Anthony Calosa
bedb28c073 Update Innistrad Block 2016-07-01 20:29:32 +08:00
Anthony Calosa
65d93267a9 Updated Scars of Mirrodin Block 2016-07-01 19:37:16 +08:00
Anthony Calosa
6ee041b374 Updated Zendikar Block 2016-07-01 19:29:08 +08:00
Anthony Calosa
c46a6d3440 Updated Shards of Alara Block 2016-07-01 19:16:59 +08:00
Anthony Calosa
92fc016f20 Updated Shadowmoor Block 2016-07-01 19:05:39 +08:00
Anthony Calosa
8983ee5239 Updated Lorwyn Block 2016-07-01 19:00:16 +08:00
Anthony Calosa
45291b4f05 Updated Time Spiral Block 2016-07-01 18:52:35 +08:00
Anthony Calosa
6cfbdf2f30 Updated Ice Age Block 2016-07-01 18:12:21 +08:00
Anthony Calosa
44613dc416 token 2016-07-01 17:46:46 +08:00
Anthony Calosa
1f95ff0fe7 Updated Ravnica Block 2016-07-01 17:45:02 +08:00
Anthony Calosa
a939021304 Updated Kamigawa Block 2016-07-01 17:24:32 +08:00
Anthony Calosa
fc88d9b248 Updated Mirrodin Block 2016-07-01 15:45:26 +08:00
Anthony Calosa
46e268e4e3 Updated Onslaught Block 2016-07-01 15:33:09 +08:00
Anthony Calosa
f9f8ccc088 Updated Odyssey Block 2016-07-01 15:16:28 +08:00
Anthony Calosa
78c8e64e81 Updated Invasion Block 2016-07-01 10:14:57 +08:00
Anthony Calosa
ba54bd43aa Update Masque Block 2016-07-01 10:03:57 +08:00
Anthony Calosa
f61542ea6b Updated Urza's Block 2016-07-01 09:54:24 +08:00
Anthony Calosa
21b162b192 Updated Rath Cycle 2016-07-01 09:41:27 +08:00
Anthony Calosa
91e7af4867 Updated Mirage Block 2016-07-01 07:40:58 +08:00
Anthony Calosa
89968bf449 Updated Early Sets 2016-07-01 07:29:36 +08:00
Anthony Calosa
7f2f68ec58 Update all Core Sets 2016-07-01 07:05:47 +08:00
zethfoxster
a5ebfd56e1 Merge pull request #1 from WagicProject/master
trying to update fork to have changes from master
2016-06-30 19:03:06 -04:00
Xawotihs
99e6a254e1 Update android package upload 2016-07-01 00:18:44 +02:00
Xawotihs
68714ebad8 Added android SDK tools to path 2016-06-30 23:08:56 +02:00
Anthony Calosa
19cb8e3301 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-01 04:53:05 +08:00
Xawotihs
48ef4144bc Update .travis.yml 2016-06-30 22:04:08 +02:00
Xawotihs
78a4da4945 Avoid rebuilding after targging 2016-06-30 22:01:17 +02:00
Anthony Calosa
a2014be118 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-07-01 03:40:53 +08:00
Anthony Calosa
3cde9a654b Merge pull request #712 from kevlahnota/master
Soulbond Pair Indicator
2016-07-01 03:40:06 +08:00
Anthony Calosa
2f277171d1 Soulbond Pair Indicator
Border Indicator for Paired Cards
2016-07-01 03:05:27 +08:00
Anthony Calosa
43dba06074 Merge pull request #711 from kevlahnota/master
Sorted Primitives
2016-07-01 03:04:27 +08:00
Anthony Calosa
c0737c40a7 Update Changes 2016-07-01 01:01:45 +08:00
Anthony Calosa
beb2eb99fb Sorted Primitives
I sorted this programmatically so the other comments are removed except
for AUTO_DEFINE
2016-06-30 23:04:35 +08:00
Anthony Calosa
62a52745df Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-30 21:36:53 +08:00
Anthony Calosa
25e156297b Merge pull request #710 from kevlahnota/master
Add Vedalken Shackles Ability
2016-06-30 16:59:25 +08:00
Anthony Calosa
fd2aa5d046 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-30 16:21:30 +08:00
Anthony Calosa
547a9fcc17 Add Support for Vedlaken Shackles and the likes
the alias 50120 is there to prevent untap  during untap phase and the
canuntap restriction will trigger if it's possible to untap ie tha card
doesn't have doesnotuntap,, or frozen or is tapped.
2016-06-30 16:18:39 +08:00
Anthony Calosa
90ea36d0fe Update CHANGELOG.md 2016-06-30 15:15:50 +08:00
Anthony Calosa
c3467f7204 Merge pull request #709 from kevlahnota/master
Fix Cascade, Crash fix on lastController and some corrections
2016-06-30 15:10:06 +08:00
Anthony Calosa
e6aafbc8a6 lastController defined when creating copies of itself 2016-06-30 14:06:21 +08:00
Anthony Calosa
76bb777f4d Fix crash when lastController is null 2016-06-30 12:19:58 +08:00
Anthony Calosa
39f6867ab0 Fix Cascade 2016-06-30 09:26:00 +08:00
Anthony Calosa
fbaef2f103 some corrections 2016-06-30 09:21:13 +08:00
xawotihs
af0861877a Merge branch 'master' into cmake 2016-06-29 21:36:47 +02:00
Anthony Calosa
db19fa507e Merge pull request #708 from kevlahnota/master
Try to fix IOS Builds
2016-06-29 15:11:14 +08:00
Anthony Calosa
27fd1942d0 Try to Fix IOS Build 2016-06-29 15:03:36 +08:00
Anthony Calosa
975df3625d Corrections 2016-06-29 15:03:24 +08:00
Anthony Calosa
92a37e1e44 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-29 13:09:46 +08:00
Anthony Calosa
cd33754a3c Merge pull request #707 from kevlahnota/master
Updated Primitives and Hide Highlight Border
2016-06-29 12:17:43 +08:00
Anthony Calosa
69d92bc0ea Unused Variable
MTGRules.cpp:1361:11: error: unused variable ‘player’
[-Werror=unused-variable]
2016-06-29 11:38:51 +08:00
Anthony Calosa
6d09c12f93 Try to fix compilation 2016-06-29 11:08:55 +08:00
Anthony Calosa
ba0f4dbcf5 Update changes 2016-06-29 10:54:44 +08:00
Anthony Calosa
e1bf3b4b82 Updated Primitives
Updated cards that use reveal keywords, Updated Borderline and
Unsupported
2016-06-29 10:45:35 +08:00
Anthony Calosa
d647309587 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-29 09:57:00 +08:00
Anthony Calosa
140ee7b183 Hide Highlight Border
When revealing cards, Hide Highlight Border
2016-06-29 08:59:58 +08:00
zethfoxster
745eaf8a17 the following adds 965 cards primitives, I did not alphabetically sort these and can not justify alphabetical sorting as it has no effect on the game engine. 2016-06-28 20:58:52 -04:00
Anthony Calosa
b16e70c363 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-29 08:26:31 +08:00
zethfoxster
6ee00c138c Pretty huge patch here(sorry old habits never die :( )
lots of changes, many bug fixes,
first
added auto=count(targetchooser)
and countedamount wparsed int
they work together for cards where it is difficult to get working without knowing in advance how many we had ie: exile blah creatures, for each creature you exiled do effect.
auto=count(creature|mybattlefield)
auto=moveto(exile)
auto=draw:countedamount
it takes into account token creatures, which our old methods did not.

second, added "freeze" which is a "frozen" that automatically taps your target for you, for use when nesting or whenever needed where it was difficult to nest the ability with tap included.

added devotion for "iroas"

added reveal:x and scry x
reveal contains optionone/optiononeend ; optiontwo/optiontwoend ; repeat; afterrevealed/afterrevealed end.

this ability has heavy use of targetListIsSet(<amount>) and upto:amount, you MUST be certain that all cards being revealed have an action that removes them from reveal either in the first, second, or 3rd ability.
there are over 300 examples in the new card code, the ability is VERY easy to understand.

scry contains automatic put on top, put on bottom, then scrycore/scrycoreend which is an ability to fire.
it also contains keywords, dontshow which is nested in scrycore, scry reveals, puts on top or bottom, then reveal AGAIN, and does an effect, dontshow eliminates the 2nd revealing.
is also contains "delayed" keyword, which delays the ability until AFTER the core fires.

added bestow. update rules mtg.txt!!!!
examples are in primitives, every bestow card was supported.

added a new lord based on varibles and restrictions
while(restriction{morbid})
while(varible:blah)
this simplifies and expands on this(, allowing you to even use while(cantarget together and check if a card is targetable by the variable. examples are in primitives

added token(by card name)
auto=token(Eldrazi Scion) 
will search primitives and card dats for this card and give it to you as a token.
valid card dat info is still required.

added variable delirium
added restriction madnessplayed to allow checking if the card was played with madness.

added restriction "geared" for checking if a card has equipment on it.

added abilities words
skulk

menace <--cant be blocked except by 2 or more, if you dont block it with 2 or more we automatically unassign the single blocker and the creature is considered not blocked.

nosolo <--cant attack alone

mustblock <---if you dont assign as a blocker, we assign automatically the first thing it can block legally.

changed iscolorless back to "colorless"

enjoy, cards coming soon, theyre coded but im debating on not alpha sorting, cards being added this patch 965 uniques.

there is a section of the commit which was just VS2016 normalizing line ends, sorry if it makes it a cluster mess.
2016-06-28 18:40:55 -04:00
Anthony Calosa
0a4da47492 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-27 15:34:49 +08:00
Anthony Calosa
9439b347c9 Merge pull request #705 from kevlahnota/master
CardID Indicator, Add Missing Tokens, Support Importing dck for Android
2016-06-27 09:04:16 +08:00
Anthony Calosa
e24eb30c98 Update Changelog 2016-06-27 09:02:43 +08:00
Anthony Calosa
f53573261e missing tokens 2016-06-27 08:44:13 +08:00
Anthony Calosa
d5b8337121 support importing forge decks 2016-06-26 19:26:52 +08:00
xawotihs
a23b96ba75 Merge branch 'master' into cmake 2016-06-26 11:25:23 +02:00
Xawotihs
47704f7591 Changed git add cmd 2016-06-26 10:28:50 +02:00
Anthony Calosa
b816facf44 Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-06-26 07:57:52 +08:00
Anthony Calosa
a6a5cf8755 Card Id Indicator
Indicates Card Id, Useful for cards/tokens to determine their correct Id
in the primitives. Its much easier to fix missing images. Update your
modrules.xml
2016-06-26 07:56:07 +08:00
Anthony Calosa
83f7ed56fa Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-26 06:00:07 +08:00
Xawotihs
755f90f38b Updated repo cleanup 2016-06-25 22:53:18 +02:00
Xawotihs
8a56406c19 Added missing REPO variable 2016-06-25 21:03:43 +02:00
xawotihs
887ea94a4d Add execution right to the new script 2016-06-25 20:11:24 +02:00
xawotihs
499b3ddf3e Added a script to upload emscripten build automatically to gh_pages 2016-06-25 16:54:35 +02:00
Anthony Calosa
e88edd11af Merge pull request #4 from WagicProject/master
pull 4
2016-06-25 21:20:24 +08:00
Anthony Calosa
0b1be02c38 Update CHANGELOG.md
up to latest commit 6/23/16
2016-06-25 20:52:17 +08:00
Anthony Calosa
b98b8b6f2e Update CHANGELOG.md 2016-06-25 20:32:42 +08:00
xawotihs
83e55b1074 Merge branch 'cmake' of https://github.com/WagicProject/wagic into cmake 2016-06-25 11:50:54 +02:00
xawotihs
1f87ed77e4 Fixed windows package and but in SDL frontend 2016-06-25 11:50:07 +02:00
Xawotihs
93b7d210dc Should fix indentation issue 2016-06-24 19:32:32 +02:00
xawotihs
10d9d84f84 Fixed emscripten memory and updated python upload script to include cmake branch 2016-06-23 23:32:57 +02:00
xawotihs
fc9a4d5431 Removed redudant builds and removed -j4 to try to compile emscripten 2016-06-23 21:20:12 +02:00
Anthony Calosa
154358efd4 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-23 21:14:09 +08:00
Anthony Calosa
63c710047b Merge pull request #704 from kevlahnota/master
Fix  producecolor:color
2016-06-23 18:22:57 +08:00
Anthony Calosa
d0f4eeff1f Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-06-23 17:44:58 +08:00
Anthony Calosa
4d3277f41b fix produce color
when you produce the chosen color, add mana of that color.
2016-06-23 17:44:50 +08:00
Anthony Calosa
7c9d52abbf Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-23 15:50:58 +08:00
Xawotihs
4b3a2531a6 Switched to debug emscripten build 2016-06-23 08:20:24 +02:00
Xawotihs
ed4871548e Decreased optimisation level to avoid crashes 2016-06-23 07:48:11 +02:00
Anthony Calosa
cf6eccf565 Update _cards.dat 2016-06-23 05:30:40 +08:00
xawotihs
1284b8da8b Should fix emscripten build in Travis 2016-06-22 22:19:09 +02:00
Anthony Calosa
1499baf8d9 Merge pull request #703 from kevlahnota/master
Change Basic Land Rarity for Modern sets
2016-06-22 20:56:46 +08:00
Anthony Calosa
37a0e95675 Rarity for Basic Lands
Changed to L rarity
2016-06-22 20:39:00 +08:00
Anthony Calosa
fd62705fd7 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-22 17:36:39 +08:00
Anthony Calosa
dc5fc2b544 add "files" path
try to fix saving profiles on forcemounted path. Transfer your wagic/res to /Android/data/net.wagic.app/files
2016-06-22 17:00:30 +08:00
Anthony Calosa
70165a8c62 Merge pull request #702 from kevlahnota/master
BFZ, OGW, SOI _cards.dat
2016-06-22 09:14:32 +08:00
Anthony Calosa
68f888baf0 Update _cards.dat 2016-06-22 08:52:12 +08:00
Anthony Calosa
3a8bc599ee Update _cards.dat 2016-06-22 08:51:26 +08:00
Anthony Calosa
9d79021678 Update _cards.dat 2016-06-22 08:28:42 +08:00
Anthony Calosa
7d339ccc23 add soi tokens 2016-06-22 07:04:06 +08:00
Xawotihs
95455603a1 Tries to build emscripten on linux as macosx fails 2016-06-21 23:45:37 +02:00
Anthony Calosa
3dd839c8bf add plant token 2016-06-21 21:31:51 +08:00
Anthony Calosa
7db5b6fbda added bfz tokens 2016-06-21 21:27:22 +08:00
Anthony Calosa
1b7d199744 Create _cards.dat 2016-06-21 18:37:29 +08:00
Anthony Calosa
6bac099369 Create _cards.dat 2016-06-21 18:34:54 +08:00
Anthony Calosa
d5cc1b970f Create _cards.dat 2016-06-21 18:29:02 +08:00
Anthony Calosa
06f8fb0406 Merge pull request #3 from WagicProject/master
Pull
2016-06-21 18:25:02 +08:00
Anthony Calosa
7b6de7bbd8 Update StorageOptions.java
forcemount if you have forcemount file
2016-06-20 03:03:35 +08:00
zethfoxster
503159ff6f adding hints that seemed to have disappeared 2016-06-19 09:25:41 -04:00
xawotihs
813c54a166 Removed GL_CLAMP usage, update of the Android cmake package file 2016-06-19 12:46:17 +02:00
xawotihs
fa2a2d51a5 Fixed Downloader. 2016-06-19 12:08:45 +02:00
xawotihs
4b68b636ce Merge branch 'master' into cmake 2016-06-19 11:39:56 +02:00
xawotihs
0a01b0af69 Tries to fix SDL and Qt builds, introduces Emscripten in Travis. 2016-06-19 10:25:22 +02:00
xawotihs
e4e809f3fe Emscripten seems to work, should also fix PSP and Qt builds 2016-06-19 00:41:35 +02:00
xawotihs
1667b79fa8 Improved Emscripten port... still not there yet. 2016-06-18 17:24:51 +02:00
Anthony Calosa
c22c674de1 Merge pull request #701 from kevlahnota/master
Some Fix
2016-06-18 22:36:52 +08:00
Anthony Calosa
de3ce6f676 add description 2016-06-18 21:58:24 +08:00
Anthony Calosa
cd34c4ebdf Modified test
Replenish + other enchantments
2016-06-18 21:55:14 +08:00
Anthony Calosa
ba0cab3743 Revert test 2016-06-18 21:21:08 +08:00
Anthony Calosa
a73030ac9b Overlooked this
Should be fine now, reverted the test
2016-06-18 21:20:30 +08:00
Anthony Calosa
f57bba22cc Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-06-18 20:22:55 +08:00
Anthony Calosa
e315cad0f5 Revert to previous 2016-06-18 20:22:50 +08:00
Anthony Calosa
3f40a6db4b Update Replenish.txt 2016-06-18 20:06:36 +08:00
Anthony Calosa
eb99680986 Modified 2016-06-18 19:55:58 +08:00
Anthony Calosa
2aa4f2da2d Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-06-18 12:41:29 +08:00
Anthony Calosa
a48568526b Update _tests.txt 2016-06-18 12:39:20 +08:00
Anthony Calosa
7247abd5f1 Create Show_and_Tell.txt 2016-06-18 12:38:30 +08:00
Anthony Calosa
bae2502d8f Create Replenish.txt 2016-06-18 12:37:52 +08:00
Anthony Calosa
cd645b33b2 Fix for Aura's that are put into play 2016-06-18 12:31:23 +08:00
Anthony Calosa
07ad69c08f Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-18 09:12:02 +08:00
Anthony Calosa
6bc7de3370 Minor Fix 2016-06-18 09:11:57 +08:00
Anthony Calosa
f3ca247865 Merge pull request #699 from kevlahnota/master
Force Mounting 2
2016-06-17 17:47:43 +08:00
Anthony Calosa
0167cf052d Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-06-17 17:03:52 +08:00
Anthony Calosa
9a3b3013a3 Update SDLActivity.java 2016-06-17 17:03:37 +08:00
Anthony Calosa
0f9bbc1561 Update DeckImporter.java 2016-06-17 17:00:44 +08:00
Anthony Calosa
3ef6b3a76a Force Mounting 2
If you have root then most likely you have write access to secondary storage. If not then use the app-specific folder. You may create the folder via built-in file manager > Android/data/net.wagic.app/files/Wagic/Res
2016-06-17 16:58:15 +08:00
Anthony Calosa
3c7ccddfcc Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-17 07:48:15 +08:00
Anthony Calosa
42019917ce Merge pull request #698 from kevlahnota/master
Common color
2016-06-16 19:17:29 +08:00
Anthony Calosa
68b632857d Most Common Color 2016-06-16 18:14:48 +08:00
Anthony Calosa
eaf7b72dc7 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-16 17:30:07 +08:00
Anthony Calosa
ff9cc83ef0 Merge pull request #697 from kevlahnota/master
Import Deck Options
2016-06-16 12:14:09 +08:00
Anthony Calosa
4e3dffad98 Import deck options 2016-06-16 11:37:25 +08:00
Anthony Calosa
7662d974b9 Deck Importer 2016-06-16 11:36:23 +08:00
Anthony Calosa
a78bdc4912 Force Mounting
Force mounting sdcard0 and sdcard1 if possible for kitkat and above
2016-06-16 11:31:20 +08:00
Anthony Calosa
6b84de3ccd Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-16 11:29:28 +08:00
Anthony Calosa
fda537635e Merge pull request #696 from kevlahnota/master
Imprint Class
2016-06-16 10:18:01 +08:00
Anthony Calosa
c633ceb695 Current Imprinted card only 2016-06-16 09:48:20 +08:00
Anthony Calosa
a4c536740e Revised Imprint 2016-06-16 09:14:37 +08:00
Anthony Calosa
923ebbc3c8 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-16 07:15:35 +08:00
Anthony Calosa
9d79a85b96 Imprint Class 2016-06-16 07:15:24 +08:00
Anthony Calosa
7b972142ba Merge pull request #695 from kevlahnota/master
Block Cost Rule
2016-06-15 23:09:56 +08:00
Anthony Calosa
b38275123a Block Cost Rule
Update rules folder
2016-06-15 22:26:55 +08:00
Anthony Calosa
a2249a7392 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-15 19:08:51 +08:00
Anthony Calosa
c0a6fd2288 Merge pull request #694 from kevlahnota/master
Some changes
2016-06-14 21:31:28 +08:00
Anthony Calosa
149af25d22 fix unused variable error 2016-06-14 20:50:31 +08:00
Anthony Calosa
b33ae0c92f Revised 2016-06-14 19:40:28 +08:00
Anthony Calosa
1f54c7933b Attack Cost Rule
Update your rules folder
2016-06-14 19:40:02 +08:00
Anthony Calosa
26346f5a42 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-14 19:18:33 +08:00
Anthony Calosa
dbf78e2bae Split Cant pay life and Cant sacrifice 2016-06-14 10:06:37 +08:00
Anthony Calosa
9c9da27938 Merge pull request #693 from kevlahnota/master
Fix possible attacker
2016-06-13 20:52:22 +08:00
Anthony Calosa
41e97134ef Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-13 19:40:02 +08:00
Anthony Calosa
97186361a1 Corrections
Fix if you have a defender that can attack, it ,must be a possible
attacker.
2016-06-13 19:39:26 +08:00
Anthony Calosa
2db6635d73 Merge pull request #692 from kevlahnota/master
Some Corrections
2016-06-13 15:57:44 +08:00
Anthony Calosa
9ac1540cdc Corrections 2016-06-13 15:27:33 +08:00
Anthony Calosa
70c0957248 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-12 10:38:55 +08:00
Anthony Calosa
c045811350 Merge pull request #690 from kevlahnota/master
Refactor & Devotion
2016-06-11 22:15:45 +08:00
Anthony Calosa
70bc60104f try to fix compilation
../projects/mtg/include/AllAbilities.h:706: error: suggest explicit
braces to avoid ambiguous 'else'
2016-06-11 21:44:33 +08:00
Anthony Calosa
0f74558892 Refactor & Fix Devotion
Fix Devotion Count example you have Mogis, God of Slaughter(2 B R),
Ashenmoor  Liege(1 B/R B/R B/R), and Rakdos Cackler (B/R) - will be 6
Devotion to Red and Black, since you count the symbol, B/R (hybrid mana)
should return as 1.
2016-06-11 20:39:56 +08:00
Anthony Calosa
4e3543ace7 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-11 20:32:24 +08:00
Xawotihs
31272ff0fe Removed suspicious references to thirdparty libs 2016-06-11 14:29:48 +02:00
Anthony Calosa
1924ab09da Merge pull request #688 from kevlahnota/master
Fix leak
2016-06-10 14:03:30 +08:00
Anthony Calosa
a74e543429 Fix leak 2016-06-10 13:25:24 +08:00
Anthony Calosa
00f67a57cf Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-10 11:43:52 +08:00
Anthony Calosa
2244e62897 Merge pull request #687 from kevlahnota/master
Combat Toughness
2016-06-10 07:45:17 +08:00
Anthony Calosa
1569353779 Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-06-10 07:05:42 +08:00
Anthony Calosa
40bb9e2c37 Combat Toughness
Assign combat damage equal to its tougness...
Doran, the Siege Tower
2016-06-10 07:05:29 +08:00
Anthony Calosa
c87e2b99d7 Update _tests.txt 2016-06-10 07:04:26 +08:00
Anthony Calosa
4934699ecd Create Doran.txt 2016-06-10 07:03:47 +08:00
Anthony Calosa
c85f3aa7f7 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-10 07:02:30 +08:00
xawotihs
9335063d68 Should fix PSP build and Windows ZIP creation 2016-06-09 21:26:11 +02:00
Anthony Calosa
7ea2086ec9 Merge pull request #686 from kevlahnota/master
Removed Unhinged & Unglued from Unsupported
2016-06-10 01:33:14 +08:00
Anthony Calosa
480e0ce9fa removed unhinged, unglued cards 2016-06-10 01:22:53 +08:00
Anthony Calosa
fe14fd0a58 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-09 21:58:48 +08:00
Anthony Calosa
e02e835053 copied abilities 2016-06-09 21:58:22 +08:00
Anthony Calosa
26d88e15c6 Merge pull request #685 from kevlahnota/master
Imprint
2016-06-09 21:05:47 +08:00
Anthony Calosa
5a9c13da86 Merge branch 'master' of https://github.com/kevlahnota/wagic 2016-06-09 20:06:50 +08:00
Anthony Calosa
3ee341cc4e Clone
Fix for issue #448
2016-06-09 20:06:39 +08:00
Anthony Calosa
b9f6a5ab0e Update _tests.txt
test for Clone vs Thistledown Liege
2016-06-09 20:06:09 +08:00
Anthony Calosa
ea03350ab9 Create clone4.txt
Test for issue #448
2016-06-09 20:05:04 +08:00
Anthony Calosa
06fdf3f0a5 Imprint
todo others...
2016-06-09 15:35:59 +08:00
xawotihs
39dfaf3acb Forgot this file 2016-06-08 23:47:53 +02:00
xawotihs
3e7ecd51fd Fixed windows SDL2 build, finished removing fmod dependency 2016-06-08 23:45:42 +02:00
Anthony Calosa
76e7827ebf Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-08 21:57:30 +08:00
Anthony Calosa
6c6f1f23ee Merge pull request #684 from kevlahnota/master
Madness
2016-06-08 11:06:20 +08:00
Anthony Calosa
8c47b666c5 Madness
Added Madness
2016-06-08 10:45:19 +08:00
Anthony Calosa
bad1fc9e09 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-08 08:36:54 +08:00
xawotihs
c9ee4a304e Merge branch 'master' into cmake 2016-06-07 23:35:26 +02:00
xawotihs
2f1bf7bdbe Fixed iOS build 2016-06-07 23:31:42 +02:00
xawotihs
41890f6bb4 Removed main() function in zipFS 2016-06-07 22:49:59 +02:00
xawotihs
24cd7cab58 Merges iOS modifications with Windows modifications 2016-06-07 22:48:02 +02:00
xawotihs
473d9387d4 Removed references to fmod libs for Windows builds 2016-06-07 21:00:15 +02:00
Anthony Calosa
e4817038c3 Merge pull request #683 from kevlahnota/master
Fix Damage Render
2016-06-07 19:02:03 +08:00
Anthony Calosa
d8e28dad7f Fix damage render 2016-06-07 18:20:30 +08:00
Anthony Calosa
2c7921479a Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-07 17:22:15 +08:00
Xawotihs
f5495adce1 Enable _DEBUG in debug only 2016-06-06 22:52:39 +02:00
Anthony Calosa
22a0f945b6 Merge pull request #681 from kevlahnota/master
Couldn't find a way to reduce kicker & multikicker without crashing. Returning to previous will get the bug that you can't activate any ability if you paid a kicker with the options "Choice Offer" or manually. Copying the kicker from put into play fixes it.
2016-06-06 18:16:28 +08:00
Anthony Calosa
1faf2e0694 Cleanup 2016-06-06 17:01:21 +08:00
Anthony Calosa
0376d094cc Apex Hawks is 2/2 Flyer
So it enters with two +1/+1 making it a 4/4 Flyer...
2016-06-06 11:19:30 +08:00
Anthony Calosa
873db7ef27 Revised Kicker 2016-06-06 11:16:32 +08:00
Anthony Calosa
ecd4de48eb Apex Hawks is a 2/2 Flyer
![Apex
Hawks](http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=382214&type=card)
2016-06-06 11:11:45 +08:00
Anthony Calosa
fb132173bd Kicker
TODO: Auto kicker and Affinity in Kicker....
2016-06-05 20:34:39 +08:00
Anthony Calosa
7ae8434ba3 Correction 2016-06-05 20:32:33 +08:00
Anthony Calosa
edf33d85b0 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-05 19:29:39 +08:00
Anthony Calosa
2ae0a651b8 Cloner/Copier produces same tokens as the copied cards 2016-06-05 17:58:49 +08:00
Anthony Calosa
a4c7da6e20 Merge pull request #680 from kevlahnota/master
Morph, Overload and PayZero costs changes
2016-06-05 14:34:04 +08:00
Anthony Calosa
fbfc712d4c Morph 2016-06-05 13:57:57 +08:00
Anthony Calosa
5196424fbe Overload and PayZero are affected by cost increaser 2016-06-05 13:15:30 +08:00
Anthony Calosa
cd83cfdc87 Removed
Forced Castcard, Suspend and other without paying manacost using these
must be recomputed for costs...
2016-06-05 13:01:55 +08:00
Anthony Calosa
52de1e7b02 Trinisphere
TODO: Morph and Kicker... Morph can be done but how to implement the
increased total cost with kicker? multi kicker? manual kicker??? Count
the mana pool if you can pay the cost+kicker if less than 3 increase
it???
2016-06-05 12:39:11 +08:00
Anthony Calosa
acfdab7dbb Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-05 11:07:15 +08:00
Anthony Calosa
c7731a1bb2 Merge pull request #679 from kevlahnota/master
Updated Missing/Unsupported Cards
2016-06-05 10:54:36 +08:00
Anthony Calosa
f3c31697c8 Updated unsupported , missing
includes missing cards from primitives (borderline, crappy, other cards)
2016-06-05 10:46:54 +08:00
Anthony Calosa
7b6d14779f Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-05 05:49:14 +08:00
Xawotihs
d802ec4b59 Fixed theos path 2016-06-04 22:05:04 +02:00
xawotihs
8f69e2a204 Should fix iOS build 2016-06-04 21:44:35 +02:00
Anthony Calosa
233cc24c9a Merge pull request #678 from kevlahnota/master
Affinity affects other costs
2016-06-04 23:32:53 +08:00
Anthony Calosa
87515de57f Affinity affects other costs
Affinity should affect other costs such as flashback, buyback,  to cast
since its also a cost reducer...
2016-06-04 21:50:49 +08:00
Anthony Calosa
719a8b3420 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-04 21:34:42 +08:00
Anthony Calosa
6726166d2b Revert
there are cards that can be cast from lbrary
2016-06-04 12:09:48 +08:00
Anthony Calosa
ecc5720007 Merge pull request #677 from kevlahnota/master
Add Sphere of Resistance test
2016-06-04 08:49:43 +08:00
Anthony Calosa
1400f33f64 Update _tests.txt 2016-06-04 08:48:19 +08:00
Anthony Calosa
edb1374c32 Create Sphere_of_Resistance.txt 2016-06-04 08:47:06 +08:00
Anthony Calosa
f1c21dc9a2 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-04 08:34:13 +08:00
Anthony Calosa
680ad99c9f Merge pull request #676 from kevlahnota/master
Cost Increaser & Reducer Fix
2016-06-04 00:08:08 +08:00
Anthony Calosa
375589c73d Fix unused variable
AllAbilities.cpp:4172:23: error: unused variable ‘_target’
[-Werror=unused-variable]
2016-06-03 23:28:04 +08:00
Anthony Calosa
ce8e117b0b Fix Cost Increaser, Cost Reducer
Should fix most of them.  TODO: Trinisphere and Morph...
2016-06-03 22:32:10 +08:00
Anthony Calosa
4e12de1629 Merge pull request #2 from WagicProject/master
pull
2016-06-03 21:01:33 +08:00
Anthony Calosa
bd76d40518 Merge pull request #674 from kevlahnota/master
Add Cascade cards
2016-06-03 15:39:17 +08:00
Anthony Calosa
723516f56c Cascade cards 2016-06-03 15:37:17 +08:00
Anthony Calosa
771755c96b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-03 13:23:04 +08:00
Anthony Calosa
0026153a2c Update GameObserver.cpp 2016-06-03 13:21:31 +08:00
Anthony Calosa
f7e0deafca Merge pull request #673 from kevlahnota/master
Fix Cant life change and Seperated Cascade from Depleter class.
2016-06-03 12:19:25 +08:00
Anthony Calosa
be53c68d28 unused variable
AllAbilities.cpp:275:17: error: unused variable ‘counter’
[-Werror=unused-variable]
2016-06-03 11:36:40 +08:00
Anthony Calosa
62fa9acc9f Cascade Class
seperate cascade and fix cant life change :)
2016-06-03 10:40:38 +08:00
Anthony Calosa
0493c4063f Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-03 06:11:47 +08:00
xawotihs
956d0a736d Should fix Macosx build 2016-06-02 20:57:09 +02:00
Anthony Calosa
52dfe654b5 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-02 21:25:58 +08:00
Anthony Calosa
5437bbaf2e Merge pull request #672 from kevlahnota/master
Cascade
2016-06-02 21:11:53 +08:00
Anthony Calosa
f4c17aaf45 Cascade 2016-06-02 20:39:21 +08:00
Anthony Calosa
20e365ea9c Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2016-06-02 20:36:00 +08:00
Anthony Calosa
b407701d94 Merge pull request #671 from kevlahnota/master
Cant life change
2016-06-02 12:51:29 +08:00
Anthony Calosa
ed6755496f parenthesis
try to fix psp build
2016-06-02 12:13:23 +08:00
Anthony Calosa
4530115506 whitespace 2016-06-02 09:13:39 +08:00
Anthony Calosa
aabb905313 Cant life change 2016-06-02 09:10:30 +08:00
Anthony Calosa
aaf2d271bc Merge pull request #1 from WagicProject/master
added abilities= keyword "devoid"
2016-06-02 08:50:37 +08:00
zethfoxster
1369a08863 added abilities= keyword "devoid"
abilities=haste,flying,devoid
would make a flying haste colorless creature.
2016-06-01 18:47:19 -04:00
Anthony Calosa
ac9dfd570a minor skip phase
if there is no possible attacker then skip phase
2016-06-01 18:04:15 +08:00
Anthony Calosa
5cd5f4b38e Fix crash for Deck Menu
Old save with stats should work 👍
2016-06-01 18:03:04 +08:00
Anthony Calosa
57c7796424 Add "Snow" Cards 2016-06-01 12:53:33 +08:00
Anthony Calosa
dd6c1c3d01 Merge branch 'master' of https://github.com/WagicProject/wagic 2016-06-01 10:00:04 +08:00
Anthony Calosa
712fc26d56 Update test
colorless mana changes
2016-06-01 09:55:50 +08:00
Anthony Calosa
fd89d51f84 tidying up 2016-06-01 09:32:28 +08:00
Anthony Calosa
9e50187740 re add the comparison 2016-06-01 09:26:58 +08:00
Anthony Calosa
a36b47e500 try to fix psp compilation
travis error:
../projects/mtg/src/ManaCost.cpp:263:23: error: unused variable
‘counterCheck’ [-Werror=unused-variable]
2016-06-01 09:14:47 +08:00
Anthony Calosa
a454c3e564 Snow
Mana produced by snow permanent
2016-06-01 08:31:19 +08:00
zethfoxster
26b30cb20d ok sorry about the confusion, so the issue was with {1}{c} and how its handled. we only need to replace the adding of colorless in the manapool, the old colorless is still very very valid and should be left in place as is.
{1} can be paid with anything
{c} is a mana supertype, it pays for diamond and colorless. 
however all card such as "sol ring" now add diamond instead of old colorless.

reverted waste to {c}, but moved it under counters to avoid crashes. parse for a counter if its not a counter than parse {c} otherwise we would end up with case where it was parsing {c} instead of building counters or vice versa.
2016-05-31 18:41:36 -04:00
zethfoxster
7639e18c39 whoops heres the other half. tested with following arbor elf test card
[card]
name=Arbor Elf
auto={0}:add{1}
auto={0}:add{r}
auto={0}:name(waste) add{waste}
auto={waste}:life:1
auto={3}:damage:1
auto={1}{waste}:moveto(mybattlefield) target(<2>*|mylibrary)
text={T}: Untap target Forest.
mana={0}
type=Creature
subtype=Elf Druid
power=12
toughness=12
[/card]
2016-05-30 17:46:51 -04:00
zethfoxster
80d0ee4dc3 defining "colorless" waste land mana. 2016-05-30 17:45:21 -04:00
zethfoxster
8a6b4a49f5 deckstats crash when "unlock cards" is used #668 2016-05-30 01:04:55 -04:00
Anthony Calosa
00adb20dc7 super rare loop in ai combos and fix #667
thanks zeth
2016-05-30 01:17:53 +08:00
Anthony Calosa
22d4cbbd1e add "colorless" manacost
The symbol {C} will be used going forward to represent one colorless
mana. The numerical and variable mana symbols ({1}, {2}, and so on,
including {X}) will still be used, but only to represent costs that can
be paid with any type of mana.

example card: To cast Spatial Contortion, you pay two mana: one generic
(that's the {1}) and one colorless (that's the {C}). The generic mana
cost can be paid with any type of mana—that means any color or
colorless. But the {C} is different. That can be paid only with
colorless mana.
2016-05-30 01:16:19 +08:00
xawotihs
c3fc579907 Pulled down update for SDL2 2016-05-29 18:01:51 +02:00
Anthony Calosa
1d81c12150 count valid targets any creature 2016-05-29 20:04:51 +08:00
Anthony Calosa
0fed1ba1ab count valid targets
count creature/s that are valid target/s
2016-05-29 19:38:00 +08:00
Anthony Calosa
c472a0215d Bug Fix
Fix send to library as a cost and add support for moving a card to
graveyard as a cost(cards like Void Attendant from Battle for Zendikar)
2016-05-29 17:56:33 +08:00
Anthony Calosa
506adf63c9 fix type
Ajani Steadfast forcefield for play and planeswalker only..
2016-05-29 14:41:31 +08:00
Anthony Calosa
d4715ddc81 ajani steadfast
ajani steadfast emblem
2016-05-29 14:31:29 +08:00
Anthony Calosa
d7fd36ddeb Indicator
Green border indicator for pay zero, can play from exile or can play
from graveyard cards...
2016-05-29 14:29:34 +08:00
Anthony Calosa
e45290e834 Ral Zarek
Fix Loyalty Counter
2016-05-29 12:14:56 +08:00
Xawotihs
e0cf5aa602 Reversed android and Qt apt stuff 2016-05-28 20:18:41 +02:00
Xawotihs
555cf9016f Moved -qq options 2016-05-28 19:47:33 +02:00
Xawotihs
d6ab2e15bf Removed comment 2016-05-28 19:15:21 +02:00
Xawotihs
95cec88742 Replaced Qt ppa 2016-05-28 19:13:45 +02:00
Anthony Calosa
18430dca25 Fix summoning sickness
Cards like control magic (using alias=1194) always resets the summoning sickness, commenting this solves the problem...
2016-05-28 13:47:03 +08:00
Anthony Calosa
8a374f53bc Update appveyor.yml
try to fix appveyor
2016-05-27 10:59:31 +08:00
Anthony Calosa
7a34543004 Nasty memleak crashing devices and its fix. #664
thanks zethfox
2016-05-26 09:42:17 +08:00
Rolzad73
9568fe7d4d Merge pull request #1 from WagicProject/master
Update fork with original
2016-04-14 11:36:57 -04:00
Xawotihs
cc06370bcd Update CMakeLists.txt 2015-11-24 00:14:48 +01:00
Xawotihs
ed15ec2469 Fixed issue in SDL2 replacement. 2015-11-23 10:15:47 +01:00
Xawotihs
3f7d5ff041 Decreased -j option for Android 2015-11-22 22:37:55 +01:00
Xawotihs
d5bcf40cbb Replaced SDL2 flavor when compiling for Android 2015-11-22 21:30:58 +01:00
ubuntu
49c196814f Couple of fixed around Android build with cmake. 2015-11-22 02:22:44 +01:00
Xawotihs
c4282ce936 Update android.toolchain.cmake 2015-11-21 14:02:06 +01:00
Xawotihs
cd1c09127f Removed dependencies on Boost on Android 2015-11-20 12:59:26 +01:00
xawotihs
9afebe0851 Removed sdl_main_android.cpp 2015-11-19 22:38:06 +01:00
Xawotihs
9a7382ea06 Added ANDROID_NDK variable for cmake toolchain 2015-11-18 23:57:55 +01:00
Xawotihs
7a7e723009 Fixed android cmake usage 2015-11-18 23:36:39 +01:00
Xawotihs
9d772284cc Removed any sudo actions on Android 2015-11-18 23:22:45 +01:00
Xawotihs
a981761deb Trying to activate android build in matrix 2015-11-18 22:59:17 +01:00
Xawotihs
fc13ffa242 Update appveyor.yml 2015-11-17 23:31:33 +01:00
Xawotihs
878b2cd639 Update FindOrBuild.cmake 2015-11-17 23:16:51 +01:00
Xawotihs
995922d2d7 Update appveyor.yml 2015-11-17 22:54:53 +01:00
Xawotihs
0d100aa9be Update appveyor.yml 2015-11-17 22:54:18 +01:00
Xawotihs
d4fabed317 Split android sdk update in 4 2015-11-17 22:01:54 +01:00
Xawotihs
9eff781103 Update travis-script.sh 2015-11-16 23:20:20 +01:00
Xawotihs
0353da3d27 Update travis-script.sh 2015-11-16 22:56:30 +01:00
Anthony Calosa
f5d00ddbef Merge pull request #661 from kevlahnota/master
changed alias
2015-11-13 06:48:18 +08:00
Anthony Calosa
cccc21c035 changed alias 2015-11-13 05:45:17 +08:00
Anthony Calosa
090f365cee Merge pull request #660 from kevlahnota/master
Overload Cost
2015-11-10 12:57:56 +08:00
Anthony Calosa
cd1b629191 Fix Segmentation Fault & Formatting 2015-11-10 11:58:36 +08:00
Anthony Calosa
406f68ac5b Overload Cards
the alias is for the Overload Check and Alternate Cost Restriction...
???Bestow???
2015-11-09 19:04:31 +08:00
Anthony Calosa
c6e76d78a2 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-11-08 21:33:38 +08:00
Anthony Calosa
0d480a67d8 Merge pull request #659 from kevlahnota/master
commented to restart build...
2015-11-08 20:59:03 +08:00
Anthony Calosa
4f9f84fc6a comment unsupported 2015-11-08 20:56:31 +08:00
Anthony Calosa
0f725a02db Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-11-08 20:56:10 +08:00
Anthony Calosa
71fdbb6564 Merge pull request #658 from kevlahnota/master
produce mana for lands you/opponent could produce
2015-11-08 19:15:28 +08:00
Anthony Calosa
a22991758f mana producer for lands you/opponent could produce
reflecting pool, exotic orchard...
2015-11-08 18:18:33 +08:00
Anthony Calosa
3404eb708d Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-11-07 21:06:40 +08:00
Anthony Calosa
c9439efcf8 Merge pull request #657 from kevlahnota/master
Aluren & Omniscience
2015-11-07 19:40:53 +08:00
Anthony Calosa
6f4cf9e941 Aluren & Omniscience
MayAbility + resolve instead of
MenuAbility + addtogame for dredge???
2015-11-07 19:16:31 +08:00
Anthony Calosa
c99216c053 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-11-07 19:13:36 +08:00
Anthony Calosa
e592c331f9 Merge pull request #656 from kevlahnota/master
Manacost Changes, Anyzone for CDA, PayZero Cost
2015-11-07 14:41:25 +08:00
Anthony Calosa
efdc4071da comment 2015-11-07 10:45:54 +08:00
Anthony Calosa
e35c9f6087 AI plays zerocast cards, Update Rules folder!
Its basic pay zero for now...
Omniscience is possible :)
2015-11-07 09:59:30 +08:00
Anthony Calosa
71390046f5 anyzone for cdaactive
should handle most of them except sewer nemesis, chameleon colossus
2015-11-06 19:47:30 +08:00
Anthony Calosa
1c8852a7a2 Manacost Changes
todo: kicker (other possible additional costs?) and change rule keyword
to payzerorule...
2015-11-05 23:25:39 +08:00
Anthony Calosa
536a0e429a AI considers playing from exile and graveyard 2015-11-05 07:17:58 +08:00
Anthony Calosa
4f54e30e0e Libraryeater and Canplayfromexile
extend canplayfromgraveyard with canplayfromexile
libraryeater for undead alchemist
2015-11-05 07:16:49 +08:00
Anthony Calosa
525453d677 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-11-05 07:13:09 +08:00
xawotihs
3cbdc6e9fe Merge branch 'cmake' of https://github.com/WagicProject/wagic into cmake 2015-11-04 22:33:26 +01:00
xawotihs
ce71afd704 Tries to activate zlib compiling on mac 2015-11-04 22:32:49 +01:00
Anthony Calosa
6fb4dbdc7b Merge pull request #655 from kevlahnota/master
chooseacolor indicator, increased/reduced cost affects retrace,buyback,flashback
cast in graveyard that have spelltarget types "target=" fix
2015-11-04 07:06:47 +08:00
Anthony Calosa
60ba4e3eeb altercost should affect retrace, flashback, buyback costs 2015-11-04 06:41:59 +08:00
Xawotihs
603d491bed Without quotes 2015-11-03 23:06:14 +01:00
Xawotihs
20a792f135 Refering DXSDK and not windows SDK 2015-11-03 23:02:12 +01:00
xawotihs
87f5e7f3a6 Emscripten flavor now compiles correctly 2015-11-02 23:00:57 +01:00
Anthony Calosa
58b032627e Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-11-02 12:21:40 +08:00
Anthony Calosa
7ffab1a821 moved activated copy cards to borderline
the default function of copy function triggers abilities as it comes
onto the battlefield, but these cards are already inplay with their copy
abilities and the enters the battlefield abilities of the copied cards
must not trigger.
2015-11-02 12:21:35 +08:00
xawotihs
e272925f3d Removed extra/stdint.h 2015-11-02 00:00:26 +01:00
xawotihs
19091ade7b Updated appveyor to use SDL2.0.3 release and not SDL head. 2015-11-01 23:51:07 +01:00
xawotihs
e62c065e2c Should fix git submodules 2015-11-01 23:34:03 +01:00
xawotihs
2312381b82 Updated git submodules 2015-11-01 23:26:03 +01:00
xawotihs
639942d444 Merge branch 'master' into cmake 2015-11-01 22:55:08 +01:00
xawotihs
55a5b9d0ba Now uses unofficial SDL mirror 2015-11-01 22:49:14 +01:00
Anthony Calosa
7303c7c253 chooseacolor indicator on some cards
alias = 0000 plus chooseacolor ability...
2015-11-02 00:15:58 +08:00
Anthony Calosa
4557748c29 Merge pull request #654 from kevlahnota/master
bug fix
2015-11-02 00:10:02 +08:00
Anthony Calosa
d3cb13cfd8 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-11-01 22:36:21 +08:00
Anthony Calosa
1bd3b7743b bug fix 2015-11-01 21:59:54 +08:00
Xawotihs
a33517e5d0 Added prefix variable so that QT5 is found with brew 2015-10-31 23:02:31 +01:00
Xawotihs
c981586bcf Moved apt-get of Qt into linux part 2015-10-31 21:45:36 +01:00
Xawotihs
b473238f02 Replaced all " 2015-10-31 21:02:29 +01:00
Xawotihs
1d9b92080f Missed on " 2015-10-31 20:56:23 +01:00
Xawotihs
7f89d4d39f Uses "" everywhere 2015-10-31 20:51:12 +01:00
Xawotihs
4f00ec2277 Added matrix subsection in env 2015-10-31 20:37:54 +01:00
Xawotihs
26db10a083 Removed empty lines 2015-10-31 20:32:18 +01:00
xawotihs
3ec2ceb725 Activate matrix and multi-os in travis 2015-10-31 20:15:47 +01:00
Anthony Calosa
591f7205ed Merge pull request #653 from kevlahnota/master
Exile Zone, Altercost and Hand modifier
2015-10-31 15:46:21 +08:00
Anthony Calosa
3a9b4f3491 parenthesis... 2015-10-31 15:23:39 +08:00
Anthony Calosa
896b12c16b werror init on psp compilation 2015-10-31 15:01:29 +08:00
Anthony Calosa
ba7355a831 moved rebound cards to borderline
until castcard supports increased cost due to altercost...
2015-10-31 11:38:35 +08:00
Anthony Calosa
c580d89c94 Altercost, Exile Zone & Handsize Modifier 2015-10-31 10:59:37 +08:00
Anthony Calosa
8793feb9ba Altercost
Altercost alter cards to be cast...
Removed Trinisphere temporarily...
2015-10-30 07:11:16 +08:00
Anthony Calosa
40db1180df pay zero
todo: all zones
2015-10-29 06:38:59 +08:00
Anthony Calosa
d2f3e2cd60 Castcard, Rebound and other fixes 2015-10-27 19:44:22 +08:00
Anthony Calosa
56fc735b36 Parenthesis
Try to fix PSP compilation
2015-10-27 07:05:57 +08:00
Anthony Calosa
bd5449a9a2 updated old tests
the new exile zone is utilized in comparing the number of cards it
has(since its enabled and viewable, the value is now counted)
2015-10-27 06:35:22 +08:00
Anthony Calosa
4853c8d314 Exile Corrections
Todo: Update tests to include exile card count...
2015-10-27 01:03:24 +08:00
Anthony Calosa
cdf94b281f exile zone
enabled exile zones for both players
2015-10-26 19:14:50 +08:00
Anthony Calosa
8eeaa40cec Merge branch 'master' of https://github.com/kevlahnota/wagic 2015-10-26 06:52:15 +08:00
Anthony Calosa
cf0f9d43fa exile zone
player only, todo opponent and ability activation for exile
2015-10-26 06:50:19 +08:00
xawotihs
667ac39e06 Removed reference to x64 platform 2015-10-25 18:07:30 +01:00
xawotihs
993d62a8c8 Added checkout of modules 2015-10-25 17:59:40 +01:00
xawotihs
09a70d4573 Merge branch 'cmake' of https://github.com/WagicProject/wagic into cmake 2015-10-25 17:30:59 +01:00
xawotihs
3afa730751 Updated appveyor to use cmake 2015-10-25 17:29:33 +01:00
Anthony Calosa
0594822872 added card equipped event 2015-10-25 17:55:45 +08:00
Xawotihs
3245ddbfe7 Reducing the -j parameter to try helping g++ internal compiler issues 2015-10-25 10:51:34 +01:00
xawotihs
def55943ed Activated building SDL2 directly from submodule on Unix as well 2015-10-25 10:18:21 +01:00
Anthony Calosa
46d1e2e703 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-25 12:04:32 +08:00
xawotihs
4accc9c018 Merge branch 'master' into cmake 2015-10-25 00:22:57 +02:00
xawotihs
579d612397 Worked on windows and emscripten builds, still not perfect. 2015-10-24 23:33:31 +02:00
Anthony Calosa
dd14ee7156 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-23 18:40:08 +08:00
Anthony Calosa
bab0d40c87 Merge pull request #652 from kevlahnota/master
Puresteel Paladin support
2015-10-23 17:07:24 +08:00
Anthony Calosa
378a54fb62 puresteel paladin support
rehook and newhook for equipments inplay...
retarget and newtarget don't support stonehewer basic because the card
is refreshed and stone hewer basic creates equipment/s as tokens...
2015-10-23 15:25:30 +08:00
Anthony Calosa
2d5d367ee6 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-22 19:22:13 +08:00
Anthony Calosa
638c721d32 Merge pull request #651 from kevlahnota/master
added trigger keyword/s to parse current opponent and current controller correctly
2015-10-22 18:20:13 +08:00
Anthony Calosa
f464623d17 curiosity...
2/1/2007 You draw one card each time the enchanted creature damages the
opponent. This is not one card per point of damage.
2/1/2007 If put on your opponent's creature, you do not draw a card when
that creature damages you. The creature has to damage your opponent in
order to have this work.
2/1/2007 Drawing a card is optional. If you forget, you can't go back
later and do it, even if it is something you normally do.
9/22/2011 "You" refers to the controller of Curiosity, which may be
different from the controller of the enchanted creature."An opponent"
refers to an opponent of Curiosity's controller.
9/22/2011 Any damage dealt by the enchanted creature to an opponent will
cause Curiosity to trigger, not just combat damage.
9/22/2011 Curiosity doesn't trigger if the enchanted creature deals
damage to a planeswalker controlled by an opponent.
2015-10-22 17:33:45 +08:00
Anthony Calosa
fe86514fb8 updated primitives @damageof/@damagefoeof 2015-10-22 14:20:52 +08:00
Anthony Calosa
704f7f4494 TrDamaged changes
@damaged/combatdamaged/noncombatdamaged(who) -> static version
@damageof/combatdamageof/noncombatdamageof(player) -> current controller
of the card
@damagefoeof/combatdamagefoeof/noncombatdamagefoeof(player) -> current
opponent of the card

combat/noncombat damaged - done...
TODO: @damaged cards
2015-10-21 22:03:21 +08:00
Anthony Calosa
3b0cd389e5 TrLifeGained changes
@lifed/lifeloss(who) -> static version
@lifeof/lifelostof(player) -> current controller of the card
@lifefoeof/lifelostfoeof(player) -> current opponent of the card
2015-10-21 12:25:08 +08:00
Anthony Calosa
21eea225af TrcardDrawn changes
@drawn(who) -> static version
@drawof(player) -> current controller of the card
@drawfoeof(player) -> current opponent of the card
2015-10-21 10:16:19 +08:00
Anthony Calosa
743c2a6a5e Update _tests.txt 2015-10-21 10:08:55 +08:00
Anthony Calosa
abcb511a57 Create ExchangeController.txt
the current trigger check is static... fix is on the way :)
2015-10-21 10:07:31 +08:00
Anthony Calosa
3669bab210 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-21 10:02:44 +08:00
Anthony Calosa
88b9f83d79 Merge pull request #650 from kevlahnota/master
Persist & Undying ability revised
2015-10-20 22:58:57 +08:00
Anthony Calosa
2178018b18 Persist and Undying goes to the stack 2015-10-20 21:56:49 +08:00
Anthony Calosa
ae4d245232 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-20 19:14:55 +08:00
Anthony Calosa
509b21153f Merge pull request #649 from kevlahnota/master
Persist/Undying Fix, Raid support
2015-10-20 12:02:47 +08:00
Anthony Calosa
7810c65862 added Raid support
thisturn(creature[attacking]|mybattlefield)~morethan~0 only triggers
once... use raid keyword... if raid then blah...
2015-10-20 11:09:57 +08:00
Anthony Calosa
9f8d2b2d46 take 2 2015-10-19 21:48:59 +08:00
Anthony Calosa
3bcb2985f9 try to fix compile error on psp 2015-10-19 20:15:51 +08:00
Anthony Calosa
0d8b2f4a01 persist/undying fix
persist/undying wont trigger when there is a replacement effect for
cards that goes to graveyard like leyline of the void. support  for
anafenza the foremost.
2015-10-19 19:43:07 +08:00
Anthony Calosa
b060c4205c targetter, targetted reset 2015-10-19 11:10:49 +08:00
Anthony Calosa
f90775153c Revert "TrcardDrawn, TrDamaged, TrLifeGained"
This reverts commit c7535e38dc.
2015-10-19 10:19:14 +08:00
Anthony Calosa
17a2d9b4d8 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-19 07:13:28 +08:00
Anthony Calosa
14a68d6ed4 Merge pull request #648 from kevlahnota/master
protection from colored spells & forced menuicons for PSP
2015-10-19 00:11:59 +08:00
Anthony Calosa
c7535e38dc TrcardDrawn, TrDamaged, TrLifeGained
Added trigger restriction for "@trigger(player)
restriction{opponenttrigger/controllertrigger}"

Restriction for:
@drawn
@damaged(combat and noncombat)
@lifed/lifeloss

Why?

When using @drawn trigger like Underworld Dreams
auto=@drawn(opponent):life:-1 opponent

If you take control of Underworld Dreams from an opponent, the
targetchooser for "opponent" is not updated and you are still the
opponent of Underworld Dreams even you take control of it(It is right if
you are the chosen opponent from cards like Black Vise, The Rack, etc...
The chosen opponent never changes. But cards that don't define a chosen
player an "opponent" like Underworld Dreams when an exchanged control
happens, the opponent of the card is the opponent of the one who
controls the card). :P

The new correct code for Underworld Dreams:
auto=@drawn(player) restriction{opponenttrigger}:life:-1 opponent
2015-10-18 22:38:41 +08:00
Anthony Calosa
8c4fabb89a menuicons forced for PSP build 2015-10-18 15:55:10 +08:00
Xawotihs
daabce1d2f Merge pull request #647 from ZobyTwo/opencv_leftovers
Remove some leftovers from OpenCV
2015-10-17 21:46:47 +02:00
Anthony Calosa
1ad1bf7942 protection from colored spells 2015-10-18 00:20:32 +08:00
Tobias Loose
5885829585 Remove some leftovers from OpenCV 2015-10-17 18:12:31 +02:00
Anthony Calosa
4e115a2326 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-17 22:41:54 +08:00
Anthony Calosa
6900e60df0 Merge pull request #646 from kevlahnota/master
Fix issue #473, #784
2015-10-17 21:37:23 +08:00
Anthony Calosa
61881ad656 Fix issue #473 and #784
It seems when a zonechange event from inplay to inplay (player or
opponent), the card->view item values is recalculated... so it destroys
the GUI like missing card image, or moving it far off the screen... To
reproduce, cast Splinter Twin to Conquering Manticore and gain control
the same creature about 2 or 3 times...
2015-10-17 19:44:21 +08:00
Anthony Calosa
d1e64a410b Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-17 16:38:54 +08:00
Anthony Calosa
5e5de03055 Merge pull request #645 from kevlahnota/master
revert guiplay, castcard(putinplay) correction and modified AAcopier
2015-10-17 09:26:58 +08:00
Anthony Calosa
f4bdfa43ca Copied Morphed card 2015-10-16 18:50:05 +08:00
Anthony Calosa
5ede956e7f Reverted GuiPlay
reverted stacking issue
2015-10-16 18:19:42 +08:00
Anthony Calosa
1cd27210ac Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-16 18:19:05 +08:00
Anthony Calosa
2819ec01af token is excluded...
for ABlink
2015-10-16 17:02:37 +08:00
Anthony Calosa
ca113497b2 Merge pull request #644 from kevlahnota/master
Bug Fix: Planeswalker Rule, Populate & ABlink return to play ability for Aura cards
2015-10-15 20:01:00 +08:00
Anthony Calosa
15725c0302 bug fix populate absolute value
forgot to add abs when adding negative bonuses...
2015-10-15 18:03:26 +08:00
Anthony Calosa
851bd88de6 Fix Planeswalker Rule & ABlink 2015-10-15 12:23:32 +08:00
Anthony Calosa
a207936231 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-15 12:22:47 +08:00
Anthony Calosa
9cb40e41fa Merge pull request #643 from kevlahnota/master
Bug Fix: legend rule, profile stat on main menu and aura curse update on player target
2015-10-14 23:24:41 +08:00
Anthony Calosa
0f0bdd7d13 Fix Aura Curse
Aura Curse that targets a player should update its position after
casting.
2015-10-14 22:14:13 +08:00
Anthony Calosa
297206b054 Fix update profile stat after buying cards
profile stats on the upper left of main menu should update after buying
some cards :)
2015-10-14 21:33:12 +08:00
Anthony Calosa
626f0677f7 Fix profile status on upper left of main menu
The profile status on the upper left of main menu should update now when
changing user profiles...:)
2015-10-14 21:26:22 +08:00
Anthony Calosa
7b5b25d113 Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-14 20:04:35 +08:00
Anthony Calosa
3635137906 fix legend rule
704.5k If a player controls two or more legendary permanents with the
same name, that player
chooses one of them, and the rest are put into their owners’ graveyards.
This is called the
“legend rule.”

bury is destroy without regenerate, so when two legends of the same name
has indestructible, bury will have no effect... I changed it to put into
owners graveyard instead using mover...
2015-10-14 20:04:29 +08:00
xawotihs
3e7b9e68d5 Fixed compilation issue with Qt. 2015-10-13 23:32:56 +02:00
Xawotihs
4a52139457 Update g++ to 4.8 2015-10-13 23:04:58 +02:00
Anthony Calosa
7ea02a316e Merge pull request #642 from kevlahnota/master
urza lands fix, polished action stack & static mana display
2015-10-13 21:19:47 +08:00
Anthony Calosa
9a66b0c6e4 some fix and polished static mana and action stack
I moved the target quad near the source card and moved the action string
forward so there is no overlapping of action string and the target quad
if the action string is too long...
2015-10-13 19:27:25 +08:00
Anthony Calosa
8fe5000ce1 polished action stack 2015-10-12 19:54:03 +08:00
Anthony Calosa
82fac5f80e Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-12 13:02:57 +08:00
Anthony Calosa
94620504da fix urza lands
the alias is used for checking of "urzatron". revised this because when
using if then else in the activation makes the mana ability goes to the
stack
2015-10-12 13:00:05 +08:00
Anthony Calosa
59cab65fcf Merge pull request #641 from kevlahnota/master
Fix crash bug, support doubled res texture for background, avatars, menutitle
2015-10-12 06:46:53 +08:00
Anthony Calosa
c7b9e6f9b8 fix avatar scaling on guicombat, border on combat 2015-10-11 23:04:28 +08:00
xawotihs
79ea403273 Commented out GLUT dependency 2015-10-11 15:54:32 +02:00
xawotihs
397d7fa6c8 Added build of SDL2 in UNIX config 2015-10-11 15:31:58 +02:00
xawotihs
ac787a6f51 Added SDL2DIR env variable. 2015-10-11 15:20:27 +02:00
xawotihs
0418e77d34 Removed tabs 2015-10-11 14:29:59 +02:00
xawotihs
a2c6a3669b Reactivated SDL2 download 2015-10-11 14:27:40 +02:00
xawotihs
b8d22240a8 Fixed typo 2015-10-11 14:21:09 +02:00
xawotihs
b458d570a1 Deactivated again Android build, added a SDL build 2015-10-11 14:15:43 +02:00
xawotihs
5022df0d14 Moved tgz unpackaging away from android SDK update. 2015-10-11 12:34:52 +02:00
xawotihs
220b48b144 Updated android SDK and build tools versions 2015-10-11 12:14:58 +02:00
xawotihs
8aeed46181 Reactivates android build 2015-10-11 11:54:40 +02:00
xawotihs
38b34eae2f Split macosx config from unix one. 2015-10-11 11:38:32 +02:00
xawotihs
648b21f972 Trying something else with new repositories 2015-10-11 10:38:40 +02:00
xawotihs
09717a966b Added install of cmake 3.3 on Travis. 2015-10-11 10:08:33 +02:00
Anthony Calosa
4c86cae7fe disabled wood & gold texture, backdrop size 480x272
blending of wood and/or gold texture on some resolutions(mobile,
tablets, etc) draws line which can be distracting. The backdrop is now
full size of PSP resolution (480x272, 2x res can be loaded like 960x544)
2015-10-11 14:29:36 +08:00
xawotihs
eef46fe743 Revert previous change and just removed inline on the function 2015-10-10 18:41:43 +02:00
xawotihs
5f91566fa7 Move vrelptr implementation in header file so that it can be used outside of JGE lib 2015-10-10 18:35:33 +02:00
xawotihs
c83a476ebe Put SwizzlePlot in the WFont header. 2015-10-10 18:23:59 +02:00
xawotihs
954bba274c Tries to fix includes 2015-10-10 18:08:45 +02:00
xawotihs
d370a5c13d Fixed png include in JGE 2015-10-10 16:15:45 +02:00
xawotihs
181189bee0 Fixed boost include path 2015-10-10 16:05:34 +02:00
xawotihs
c678f5e85a Fixed vram 2015-10-10 15:32:01 +02:00
xawotihs
0fabf83c62 Fixed decoder_prx 2015-10-10 15:25:08 +02:00
xawotihs
b7e8d19290 Fix for travis build 2015-10-10 15:15:43 +02:00
Anthony Calosa
6376596e49 increase battlefield "hot area" size, opponent phase ring uses darker glyph vs human 2015-10-10 20:54:41 +08:00
Anthony Calosa
91053965be Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-10 20:52:37 +08:00
Xawotihs
d0db71602a Deactive android build as travis does not like it those days 2015-10-10 14:51:40 +02:00
Xawotihs
4f9ee17ff9 Everywhere 2015-10-10 14:35:53 +02:00
Xawotihs
2461b39fb7 Update android SDK to 24.3.4 to try fixing travis 2015-10-10 14:35:22 +02:00
Anthony Calosa
ff7634a8ac Merge remote-tracking branch 'refs/remotes/WagicProject/master' 2015-10-10 20:30:19 +08:00
Xawotihs
6c41ae8e8e Update android build tools to 23.0.1 to try fixing travis 2015-10-10 14:19:22 +02:00
Anthony Calosa
52803cf57c fix crash bug when buying a card pack
This fixes the shop crashing the game when you buy a card packs in the
shop. The targeting indicator looks at the stack so it needs to be
enabled only when you're in the "game"...
2015-10-10 04:59:22 +08:00
Anthony Calosa
03f5ba430c resized
doubled res... you need to replace this with a higher detailed icons...
2015-10-09 21:46:25 +08:00
Anthony Calosa
91e317a497 added placeholder for large icons 2015-10-09 21:17:46 +08:00
Anthony Calosa
a0b4d0f348 added scaling of background 2015-10-09 21:06:58 +08:00
Xawotihs
112efddb4e Removed typo 2015-10-09 13:32:51 +02:00
Xawotihs
4cea81e564 Moved SDL2 download away from the Android SDK download 2015-10-09 07:56:44 +02:00
Xawotihs
3a40a34566 should fix script syntax 2015-10-08 23:33:17 +02:00
Xawotihs
a4ff87a7d5 Replaced libsdl2-dev dependency by a direct download 2015-10-08 23:29:47 +02:00
xawotihs
797077c47b Various fixes and activated cmake in travis. 2015-10-08 23:08:09 +02:00
Anthony Calosa
674f4d5062 transformed Planeswalker
When a Planeswalker transforms into a creature, it should be inline on
the battlefield positions along with other creatures.
2015-10-08 11:24:04 +08:00
Anthony Calosa
5cc2f5b645 border p/t 2015-10-08 09:51:52 +08:00
Anthony Calosa
3ca8aefad7 fix bug where walls that can attack activated vs moat in play 2015-10-07 20:59:17 +08:00
Anthony Calosa
1d1b663f55 menutitle scaling
can load 2x res...
2015-10-07 18:10:00 +08:00
Anthony Calosa
6a64b09452 replaced fillroundrect border 2015-10-07 18:08:00 +08:00
Anthony Calosa
c2c9e180ea code cleanup 2015-10-07 11:06:59 +08:00
Anthony Calosa
fb89183767 support scaling of avatar texture - multiples of 35x50
default was 35x50 avatar texture, if using 3x  (105x150), it will scale
it :)
2015-10-07 10:57:08 +08:00
Anthony Calosa
45b570b6f7 border highlighter 2015-10-07 10:53:11 +08:00
xawotihs
075d950249 Got SDL2 version compiling on Mac. 2015-10-06 23:25:40 +02:00
Anthony Calosa
8e8e5d8da8 Merge remote-tracking branch 'WagicProject/master' 2015-10-06 10:57:26 +08:00
Anthony Calosa
f59a7872b3 Merge pull request #640 from kevlahnota/master
fix alpha/transparency on rendered border
2015-10-06 10:53:49 +08:00
Anthony Calosa
022c6fccf5 Merge remote-tracking branch 'WagicProject/master' 2015-10-06 10:52:08 +08:00
Anthony Calosa
b750cf1f33 fix alpha/transparency on rendered border 2015-10-06 10:47:08 +08:00
Anthony Calosa
5495d772ea Merge pull request #639 from kevlahnota/master
Visual Targeting Indicator, Borders
2015-10-06 01:21:29 +08:00
Anthony Calosa
664589c642 Visual Targeting Indicator, Borders 2015-10-05 22:03:30 +08:00
xawotihs
22d14b2a4f - Updated SDL dependency to SDL2
- fixed compilation issues with cmake and visual studio 2015
2015-10-04 23:10:45 +02:00
Anthony Calosa
6e9c965279 Merge remote-tracking branch 'WagicProject/master' 2015-10-03 21:50:02 +08:00
Anthony Calosa
87e9ed8191 Merge pull request #638 from kevlahnota/master
reverted build
2015-10-03 21:43:01 +08:00
Anthony Calosa
a5a0aa859a reverted build 2015-10-03 21:39:54 +08:00
Anthony Calosa
78693685d8 Merge pull request #637 from kevlahnota/master
revised producemana, added producecolor
2015-10-03 11:27:28 +08:00
Anthony Calosa
f39d4a688a build number 2015-10-03 08:54:18 +08:00
Anthony Calosa
0c30a4ba53 High Tide fix 2015-10-03 08:15:05 +08:00
Anthony Calosa
7db8b89b89 Merge remote-tracking branch 'WagicProject/master' 2015-10-03 07:37:04 +08:00
Anthony Calosa
ec4a9ead74 revised produceextra, added producecolor
producecolor:color look for the mana color when engaged
produceextra:selectmana acts like tappedformana(mytgt) so the ability
must be on the source
produceextra:{color}  ability on the otherhand, the ability must be on
the target
2015-10-03 07:36:52 +08:00
Anthony Calosa
d31f112967 Merge pull request #636 from kevlahnota/master
LKI for power,  toughness and basic abilities,  produceextra ability, stack and life check, reduceto ability
2015-10-02 01:12:38 +08:00
Anthony Calosa
4098c306e2 removed unused variable. 2015-10-01 22:56:42 +08:00
Anthony Calosa
ddee2c08e2 added stack check, modified life check
if activating ability, playing a land or casting sorcery spell at
sorcery level(timing restriction), if the stack is not empty, don't
allow it. Modified the life state check, if any of the players would
lose the game, allow the gamestateeffects to check... added
reduceto:value for ali from cairo...
2015-10-01 22:25:26 +08:00
Anthony Calosa
e1c02c8bf5 produceextra, lki(last known information) for power, toughness and basic abilities 2015-09-30 23:45:54 +08:00
Anthony Calosa
956d21d431 Merge remote-tracking branch 'WagicProject/master' 2015-09-29 22:29:08 +08:00
Anthony Calosa
8b3f474bca Merge pull request #635 from kevlahnota/master
Fix Recover Cards, Cloner, Copier, and Preliminary support for Madness, added converge keyword
2015-09-29 21:29:38 +08:00
Anthony Calosa
8eddcfb639 added converge keyword
converge returns the number of colors spent when casting the spell.
example you pay {2}{W}{W}{R}{B}, converge returns 3, white, black and
red colors spent with...
2015-09-29 15:09:29 +08:00
Anthony Calosa
9b79602134 Moved modifiedbAbi block 2015-09-29 14:31:31 +08:00
Anthony Calosa
0bab560e89 Fix Cloner and Copier abilities 2015-09-29 10:42:29 +08:00
xawotihs
4272e2e2b2 Activated zlib build only on windows 2015-09-28 19:39:26 +02:00
Anthony Calosa
6458b46437 Merge remote-tracking branch 'WagicProject/master' 2015-09-28 21:27:48 +08:00
Anthony Calosa
021343ca02 fix for recover cards, preliminary support for madness 2015-09-28 21:27:27 +08:00
xawotihs
34279cfacf Additional work with cmake on Windows, still does not work 2015-09-27 23:23:31 +02:00
Anthony Calosa
86a5890c36 Merge pull request #634 from kevlahnota/master
life indicators and fix init of vars
2015-09-27 10:12:57 +08:00
Anthony Calosa
04e53f2002 increase the players life indicator(scale to 1.3f), fix init vars
increase the life indicator for players to 1.3f, life indicator for
players changes color according to its value. fix init for vars(should
fix gravecardtypes for tarmogoyf and pbasiclandtypes )
2015-09-27 09:52:35 +08:00
Anthony Calosa
5dccd4b05f Merge remote-tracking branch 'WagicProject/master' 2015-09-27 08:56:31 +08:00
xawotihs
85f4a4c36a Started to merge @ZobyTwo cmake branch 2015-09-26 21:52:07 +02:00
xawotihs
9e77899535 Adds missing breaking macosx compilation without boost 2015-09-26 09:44:11 +02:00
Xawotihs
4185923d04 Replaced C++ types by C ones 2015-09-25 21:46:37 +02:00
Xawotihs
a19ccb6b49 Should fix g++ compilation issue 2015-09-25 21:01:09 +02:00
xawotihs
5ae9d42480 Fixed compilation issue with clang 2015-09-25 20:21:10 +02:00
xawotihs
f282a3346c Merge branch 'no-boost' of https://github.com/WagicProject/wagic into no-boost 2015-09-25 20:04:42 +02:00
Anthony Calosa
ac8881a097 Merge pull request #633 from kevlahnota/master
Ingest and other card fixes...
2015-09-25 19:26:48 +08:00
Anthony Calosa
41daa83e3e Merge remote-tracking branch 'WagicProject/master' 2015-09-25 17:39:48 +08:00
Anthony Calosa
2869460a7f Fixed some card primitives, added support for "other" parsing power, toughness and converted cost, added Ingest
Ingest -> topcard of library to exile
Usage ingest:value
ingest:20 will send the top 20 cards of library to exile
2015-09-25 17:39:35 +08:00
xawotihs
0f168922d8 Fixed compilation issue of config without Qt 2015-09-24 23:47:16 +02:00
xawotihs
b8b5362ba5 Removed dependency on boost when Qt is used. 2015-09-24 23:20:52 +02:00
Anthony Calosa
b4e0f2c991 Merge pull request #632 from kevlahnota/master
Added bypass for notatarget(it should bypass protection and shroud), extend castcard to support putinplay for aura(since aura must have target chooser when put into play by other means), added state based action for aura with invalid targets(ex. local enchantments that enchant creature, then the creature it enchants loses creature types like man lands ... mutavault.)
2015-09-24 19:55:13 +08:00
Anthony Calosa
201b6d9cfa bypassTC turn off 2015-09-24 14:45:26 +08:00
Anthony Calosa
a6ec3e0a68 added type check on aura if the card it enchant is legal 2015-09-24 14:14:00 +08:00
Anthony Calosa
64578787a0 NULL check 2015-09-24 12:14:58 +08:00
Anthony Calosa
d068388e7f added aura targets for castcard putinplay
the special putinplay keyword for castcard is used for aura so we can
"retarget" their intended targets but without casting them instead they
are put onto the battlefield and the ability is not targetted 👍

303.4c If an Aura is enchanting an illegal object or player as defined
by its enchant ability and other
applicable effects, the object it was attached to no longer exists, or
the player it was attached to
has left the game, the Aura is put into its owner’s graveyard. (This is
a state-based action. See
rule 704.)

303.4f If an Aura is entering the battlefield under a player’s control
by any means other than by
resolving as an Aura spell, and the effect putting it onto the
battlefield doesn’t specify the object
or player the Aura will enchant, that player chooses what it will
enchant as the Aura enters the
battlefield. The player must choose a legal object or player according
to the Aura’s enchant
ability and any other applicable effects.
2015-09-24 09:53:10 +08:00
Anthony Calosa
606d18aa6e bypassTC on playertarget 2015-09-24 06:24:17 +08:00
Anthony Calosa
106bcec7cf bypass targetchooser 2015-09-24 06:02:46 +08:00
Anthony Calosa
179e973b4e typo 2015-09-23 21:44:29 +08:00
Anthony Calosa
2223cd4f30 modified castcard to support put into play
for reanimated aura
2015-09-23 21:36:05 +08:00
Anthony Calosa
7db5345f9a attempt to fix "notatarget"
notatarget must be allowed to target untargettable cards.
2015-09-23 12:14:47 +08:00
Anthony Calosa
df659f648e Merge remote-tracking branch 'WagicProject/master' 2015-09-22 21:18:02 +08:00
Anthony Calosa
d7fd079ec4 Merge pull request #631 from kevlahnota/master
Auraward,  unattach event and statebased action for protection from quality
2015-09-22 20:29:28 +08:00
Anthony Calosa
800172f93e Update _tests.txt 2015-09-22 19:49:20 +08:00
Anthony Calosa
2fbfdbcb03 lowercase 2015-09-22 19:48:13 +08:00
Anthony Calosa
ae59e75be1 Create pledge_protection.txt 2015-09-22 19:46:18 +08:00
Anthony Calosa
f01268ef76 Merge remote-tracking branch 'WagicProject/master' 2015-09-22 17:12:00 +08:00
Anthony Calosa
4b9f94c9ae added auraward, added event for unattach, added statebased check for protection from quality
auraward -> an exception for protection from quality used for aura, like
flickering ward
added event for unattach
added state based check for protection from quality.
702.16c A permanent or player with protection can’t be enchanted by
Auras that have the stated
quality. Such Auras attached to the permanent or player with protection
will be put into their
owners’ graveyards as a state-based action.

702.16d A permanent with protection can’t be equipped by Equipment that
have the stated quality
or fortified by Fortifications that have the stated quality. Such
Equipment or Fortifications
become unattached from that permanent as a state-based action, but
remain on the battlefield.
2015-09-22 17:11:40 +08:00
Anthony Calosa
33868eef88 fix typo 2015-09-22 08:18:24 +08:00
Anthony Calosa
11bd885fb4 Merge remote-tracking branch 'WagicProject/master' 2015-09-22 08:14:36 +08:00
Anthony Calosa
0e73168803 Merge pull request #630 from kevlahnota/master
Added ORI cards, Removed Workarounds, Added support for Can't Gain life... spellmastery keyword is used for alternative cost so cards with spellmastery can be cast as though it had flash (substance)...
2015-09-22 07:55:13 +08:00
Anthony Calosa
1eeb42a88d fixed lavinia of the tenth 2015-09-22 07:08:27 +08:00
Anthony Calosa
9ad852558c Merge remote-tracking branch 'WagicProject/master' 2015-09-22 06:55:36 +08:00
Anthony Calosa
227a262e01 added ORI cards :)
revised the keyword:
myname -> returns the number for each instance of the card name you
control.
allmyname -> returns the number for each instance of the card name in
play.
2015-09-22 06:53:55 +08:00
Anthony Calosa
0abd368ccc I think Akroan Conscriptor is supported 2015-09-21 21:38:23 +08:00
Anthony Calosa
f757dcab74 update invigorate and wall of shards
if players can't gain life, you cannot pay costs that have an opponent
gain life also...
2015-09-21 21:25:41 +08:00
Anthony Calosa
28f758e421 Removed Workarounds, Added support for Can't Gain life...
spellmastery - can play as though had flash used in conjunction for
alternative cost.
nolifegain, nolifegainopponent - cannot gain life.
2015-09-21 15:22:28 +08:00
Anthony Calosa
6fba81d7c8 Merge pull request #629 from kevlahnota/master
added M15 cards :)
2015-09-21 13:59:27 +08:00
Anthony Calosa
8543977a2f Merge branch 'master' of https://github.com/kevlahnota/wagic 2015-09-21 12:00:50 +08:00
Anthony Calosa
7b3da0e2c2 added M15 cards :)
added M15 cards and support for cards that use startinglife
keyword(Resolute Archangel)
2015-09-21 12:00:34 +08:00
Anthony Calosa
b16b37e757 Merge remote-tracking branch 'WagicProject/master' 2015-09-21 12:00:24 +08:00
Anthony Calosa
726b087d0d Create _cards.dat 2015-09-21 12:00:02 +08:00
Anthony Calosa
c3fb08da59 Merge pull request #628 from kevlahnota/master
Reverted Random, Disable Indicators on Gametype that is not Classic
2015-09-20 22:48:46 +08:00
Anthony Calosa
725a285e7f Reverted Random 2015-09-20 22:28:08 +08:00
Anthony Calosa
9bf329bd17 I just found this out....
Make the indicator for classic game type. Maybe there is another way to
produce cards by using the function from castcard...
2015-09-20 19:53:49 +08:00
Anthony Calosa
0517a73bfe Merge remote-tracking branch 'WagicProject/master' 2015-09-20 17:37:43 +08:00
Anthony Calosa
a432f5cc3a Merge pull request #627 from kevlahnota/master
PT colors, Token and Cloner Indicators
2015-09-20 15:28:54 +08:00
Anthony Calosa
72b119d622 fix bad lines 2015-09-20 15:25:01 +08:00
Anthony Calosa
18f09ab2ef %c to %s 2015-09-20 14:26:40 +08:00
Anthony Calosa
5985c518f6 buff.c_str() 2015-09-20 14:17:43 +08:00
Anthony Calosa
0dc4dbe642 Merge remote-tracking branch 'WagicProject/master' 2015-09-20 13:19:15 +08:00
Anthony Calosa
0e90426cff Support for Silumgar Assassin, Minor PT color and Token, Clone Indicators
When a creature is damaged and has critical life, PT turns to
red(critical life is 2 and below), if a card has a powered down status
like from -1/-1 counter, the PT turns to thistle, if powered up above 4,
the PT turns into yellow, default is white. legendary eldrazi pt is
violet. Token Indicator is T, and C for cards with copy abilities(so we
can differentiate them from originals), TC for both token and copy cat
cards.
2015-09-20 13:19:03 +08:00
Anthony Calosa
900d045cf0 Merge pull request #626 from kevlahnota/master
PT Switch like Layer 7e and Token Indicator
2015-09-20 00:04:25 +08:00
Anthony Calosa
e9c4d70126 Update _tests.txt 2015-09-19 23:31:18 +08:00
Anthony Calosa
5c93d3e7c4 Create PTswitch.txt 2015-09-19 23:30:11 +08:00
Anthony Calosa
c372ffa111 Switching PT, Token Indicator
Added Switching PT like Layer 7e, Token Indicator for cloned Cards
2015-09-19 23:25:33 +08:00
Anthony Calosa
8e15ad7ed0 Merge remote-tracking branch 'WagicProject/master' 2015-09-19 23:21:22 +08:00
Anthony Calosa
a6f3fb19c8 Merge pull request #624 from kevlahnota/master
Token Cloning fix and colored PT
2015-09-19 15:29:40 +08:00
Anthony Calosa
64c6d19ae7 lowest is 0, typo... 2015-09-19 13:28:14 +08:00
Anthony Calosa
c9d9d3d4d3 Random
I have a profile with 100+ decks and it seems with the previous code,
the random deck seems not random.
2015-09-19 13:05:16 +08:00
Anthony Calosa
e25b78953c other indicators must be somewhere else 2015-09-19 10:29:02 +08:00
Anthony Calosa
81f0c916f5 readjustment 2015-09-19 08:04:26 +08:00
Anthony Calosa
ef690f6438 update pt colors 2015-09-19 07:50:04 +08:00
Anthony Calosa
11124205e5 basic color code on PT
if a creature was damaged or has a negative toughness bonus, the pt
changes to crimson red, if the creature was not damaged and has power
buff, the color changes to spring green, normal was default white.
2015-09-18 20:16:28 +08:00
Anthony Calosa
6cd0474eca Bug Fix on Cloning Tokens 2015-09-18 19:56:02 +08:00
Anthony Calosa
bd89710478 Merge remote-tracking branch 'WagicProject/master' 2015-09-18 11:45:29 +08:00
Anthony Calosa
fc54822b97 Merge pull request #623 from kevlahnota/master
CDA and X manacost on stack
2015-09-18 06:10:24 +08:00
Anthony Calosa
13bb6dbe93 Update Token.cpp
Fix typo
2015-09-18 06:03:53 +08:00
Anthony Calosa
8c9a98e3e9 Update _tests.txt 2015-09-18 05:31:13 +08:00
Anthony Calosa
7ce05fb4fc CDA test # 2 2015-09-18 05:27:48 +08:00
Anthony Calosa
53153b237c CDA test # 1
Testing layer 7a, 7b and 7c :)
2015-09-17 22:50:21 +08:00
Anthony Calosa
478dea6af4 Tidy up a little... 2015-09-17 21:30:55 +08:00
Anthony Calosa
e097d38347 Updated CDA cards 2015-09-17 18:39:33 +08:00
Anthony Calosa
6cba14181d support "other" in type:* parsing
if a card with a cleric subtype has an autoline like this:
othertype:cleric:battlefield, means that the targetchooser excludes that
card, only the other "cleric" are counted.
2015-09-17 11:16:29 +08:00
Anthony Calosa
76c48a8c4e Merge pull request #1 from WagicProject/master
Merged from WagicProject:master
2015-09-17 05:52:33 +08:00
Anthony Calosa
425b51de08 Fix for token cloning
Some tokens when cloned produces miscalculated PT(Using foreach,
aslongas and others that needs CDA). This should fix the issue. TODO:
add tests and updated mtg.txt ...
2015-09-16 20:36:58 +08:00
Anthony Calosa
8e057379ce Finally Fixed... :)
The issue last commit was the toughness is refreshed and the damage is
not reflected. This commit fixes the bug. Yey...
2015-09-16 10:45:43 +08:00
Anthony Calosa
db649ddc96 Added Update on CDA
This controls whether to update Power and Toughness if we are setting
base PT or not. If we are setting base PT update the CDA but it will not
be applied since we have an effect that sets PT to a default base. If
there are no effect that sets base PT, apply it on CDA using
current/updated PT. The buffs are not affected. Yeah...
2015-09-16 09:34:32 +08:00
Anthony Calosa
6aab17d0b3 CDA complete
This fixes the bug I introduced lst time. The damage was not taking into
account, but this time the damage reflects...
TODO/TOFOLLOW: update test and update all cards that uses CDA :)
2015-09-16 06:42:02 +08:00
Xawotihs
fdfb8e0c34 Should fix package upload 2015-09-15 07:58:24 +02:00
Anthony Calosa
72aaa18a35 CDA
CDA works by using "cdaactive" keyword on PT changes. Instead of
granting bonus, we modify the orig power and toughness since they are
dynamic PT. cdaactive are for cards like maro, tarmogoyf, etc. To
Follow/To Do: Additional Tests and other bug fix
2015-09-15 06:35:07 +08:00
xawotihs
07e1c139ba Restored .travis file back to its original state 2015-09-14 23:55:33 +02:00
xawotihs
7df76697e1 Added iOS package upload after successfull build 2015-09-14 23:50:19 +02:00
xawotihs
743b260813 Adds control file 2015-09-13 23:50:21 +02:00
xawotihs
24187b8413 Enable usage of iOS resources from both xcode and theos makefile. Creates iOS package. 2015-09-13 20:54:25 +02:00
xawotihs
acfd0bf104 Merge branch 'master' into iOS-Build 2015-09-13 18:42:31 +02:00
Anthony Calosa
59792b3456 X in manacost is always 0 except on the stack 2015-09-12 19:58:09 +08:00
Anthony Calosa
fb9b0b8166 Added Konda's Banner 2015-09-12 19:37:35 +08:00
Anthony Calosa
11d68c0e27 Separated PT Modifiers, Fixed Changeling, Modified Counter as a cost
CDA Todo
2015-09-12 12:03:52 +08:00
Xawotihs
8b287cca0c Merge pull request #621 from kevlahnota/master
fixed Miscalculated PT, added Offering
2015-09-11 10:02:43 +02:00
Anthony Calosa
38145957af Update _tests.txt 2015-09-11 11:09:02 +08:00
Anthony Calosa
69bdac52c7 Create PT_M15_errata2.txt
Additional test
2015-09-11 11:07:48 +08:00
Anthony Calosa
10d7690ca6 Update PT_M15_errata.txt 2015-09-11 11:05:52 +08:00
Anthony Calosa
b33a999458 Finally PT Calculation is fixed :)
I didn't take into account that the new bonus must be calculated on the
event the effect was destroyed... silly me... 🉑
2015-09-11 10:53:36 +08:00
Anthony Calosa
d3a7ff7e11 reinitialize counters on destroy 2015-09-10 06:04:43 +08:00
Anthony Calosa
c1e9fad271 added basepower and basetoughness
added these two so if we want to access original power and toughness, we
can point to origpower and origtoughness respectively.
2015-09-10 05:26:09 +08:00
Anthony Calosa
9d668342be PT should work fine now... 2015-09-10 00:26:20 +08:00
Anthony Calosa
62dd54c886 Base Power/Toughness Template as of M15
208.4. Effects that set a creature’s power and/or toughness to specific
values may refer to that creature’s
“base power,” “base toughness,” or “base power and toughness.” Other
continuous effects may
further modify the creature’s power and toughness. See rule 613,
“Interaction of Continuous
Effects.”
2015-09-09 22:18:13 +08:00
Anthony Calosa
93ed2b3bff added test 2015-09-09 22:17:37 +08:00
Anthony Calosa
acb0aa0532 Merge remote-tracking branch 'WagicProject/master' 2015-09-08 19:19:31 +08:00
Anthony Calosa
ef707e6d5d added basic offering support
usage tap lands to produce mana then sacrifice an offering... example
you have Guttersnipe in play, it has a mana cost of {2}{R}, and you have
Patron of the Akki in hand that costs {4}{R}{R}. You need to produce
{2}{R} mana first before casting Patron of the Akki, then choose
Guttersnipe as an offering.
2015-09-08 12:26:03 +08:00
Xawotihs
56413c372f Merge pull request #619 from kevlahnota/master
added support for cards like leyline of the void, rest in peace, etc...
2015-09-07 20:09:36 +02:00
Anthony Calosa
a57e919e44 commented out unused variable... 2015-09-07 19:53:16 +08:00
Anthony Calosa
5bdb80db35 added DTK cards :) 2015-09-07 19:52:53 +08:00
Anthony Calosa
3f63997694 morethanfourcards for cards like black vise 2015-09-07 13:40:28 +08:00
Anthony Calosa
022a15a5e9 added epic cards, fixed maxcast bug
maxcast(*)0 - checks for the current action player of that turn, but
when you passes the turn to the opponent, you can cast instant or cards
with flash instead because you are not the current player, it mustcheck
the controller of the card with play restriction if he can play it or
not whether it your turn or the opponents turn.
2015-09-07 10:09:34 +08:00
xawotihs
a6c331042a Removed minizip directory, moved ZipArchive, updated xcode project and iOS makefile 2015-09-06 21:12:15 +02:00
Xawotihs
17f5d8f0c2 Fixed reachability include path 2015-09-05 09:21:42 +02:00
Anthony Calosa
45b880ef76 updated test 2015-09-05 07:23:35 +08:00
Anthony Calosa
da34530d98 added test for Gravebane Zombie 2015-09-05 07:20:28 +08:00
Anthony Calosa
bcb75dac65 updated test 2015-09-05 06:50:33 +08:00
Anthony Calosa
74bba5263a added test for leyline of the void and rest in peace and darksteel colossus 2015-09-05 06:44:10 +08:00
Anthony Calosa
7878252692 support for Rest in Peace
tokens are not cards...
a little dirty...
2015-09-04 23:45:16 +08:00
Anthony Calosa
7af6b31cca Merge remote-tracking branch 'WagicProject/master' 2015-09-04 23:41:37 +08:00
Anthony Calosa
11a9766ba0 adds support for darksteel colossus, gravebane zombie 2015-09-04 16:47:11 +08:00
Anthony Calosa
5175f439a0 add support for yawgmoth's agenda and other similar cards 2015-09-04 12:05:19 +08:00
Anthony Calosa
cbb603818a correction for untap cost
602.5a comprehensive rule as of  6/1/2014
2015-09-04 12:04:17 +08:00
xawotihs
7020121274 Merge branch 'master' into iOS-build 2015-09-04 00:04:59 +02:00
xawotihs
54f7030d68 Moved reachability files 2015-09-04 00:03:47 +02:00
Xawotihs
b9e23fcf95 Merge pull request #618 from kevlahnota/master
Life state check and multicolor attribute
2015-09-03 20:33:01 +02:00
Anthony Calosa
42d0480f77 refactored lifestate check 2015-09-03 20:12:09 +08:00
Anthony Calosa
886eaa4002 Update _tests.txt 2015-09-03 20:10:19 +08:00
Anthony Calosa
fd02e9ab22 Rename projects/mtg/bin/Res/test/bugs/exquisite_blood_i953.txt to projects/mtg/bin/Res/test/exquisite_blood_i953.txt 2015-09-03 20:07:31 +08:00
Anthony Calosa
9fb460c176 life state check on trigger
life state check when players gain or lose life
bugs\exquisite_blood_i953.txt will stop looping
as long as the conditions are met on the check
2015-09-03 07:01:45 +08:00
Anthony Calosa
cbb753ae75 Merge remote-tracking branch 'WagicProject/master' 2015-09-03 06:57:42 +08:00
Anthony Calosa
b2b54b7c5b attribute -multicolor will return single colored cards
use iscolorless to find colorless... :)
2015-08-31 22:03:41 +08:00
Anthony Calosa
29ac95362d multicolor correction
not multicolored is single colored or monocolored not colorless...
colorless has no color...
2015-08-31 19:06:51 +08:00
Xawotihs
9d2d6addb1 Merge pull request #617 from kevlahnota/master
additional test for sac event
2015-08-31 10:45:05 +02:00
Anthony Calosa
7c3f15f79b updated some cards
reflects the changes i made earlier, you can see the steps while running
them in test mode... mortician beetle, thraximundar and savra queen of
the golgari.
2015-08-31 07:51:12 +08:00
Xawotihs
c8e4ec14f0 Update Wagic_Version.h 2015-08-30 23:39:13 +02:00
Xawotihs
e1793fe276 Removed error on unknown warning option 2015-08-30 22:39:44 +02:00
Anthony Calosa
a7bb43278f fix bad lines 2015-08-31 01:51:36 +08:00
Xawotihs
58b5e99979 Fixed typo 2015-08-30 18:17:41 +02:00
Anthony Calosa
915befbb3a update savra 2015-08-30 23:59:05 +08:00
Xawotihs
4cf3f1bcd5 Should fix relative paths 2015-08-30 17:55:02 +02:00
xawotihs
bfeeaeabfb replaced .travis.yml for easier test and added the iOS makefile 2015-08-30 17:27:19 +02:00
Anthony Calosa
410f2d4e69 updated tests 2015-08-30 23:04:50 +08:00
Anthony Calosa
474ad5c0fe additional test for sacrificed event 2015-08-30 23:04:42 +08:00
Anthony Calosa
c2b359ceed Update _tests.txt
Added PTInstant test
2015-08-29 09:42:18 +08:00
Anthony Calosa
5af7de61d0 Added test for power toughness modifier
soul warden must be sent to graveyard due to last gasp before tundra wolves resolves and put onto the battlefield.
2015-08-29 09:35:51 +08:00
Anthony Calosa
7436bf9e64 added ORI _cards.dat 2015-08-27 11:07:18 +08:00
Anthony Calosa
588f7fe2fb remove token workaround 2015-08-26 23:40:30 +08:00
Xawotihs
30f5a49988 Merge pull request #614 from kevlahnota/master
added FRF
2015-08-24 17:56:32 +02:00
Anthony Calosa
2998e95a3b tokenizer should work now for cloning ability
Populate(Put a token onto the battlefield that's a copy of a creature
token you control.)
2015-08-24 22:39:54 +08:00
Anthony Calosa
ac29367ff8 update _tests.txt 2015-08-24 10:05:05 +08:00
Anthony Calosa
dbd7f82eab added tokenizer test 2015-08-24 10:03:34 +08:00
xawotihs
e28dd11b63 Merge branch 'master' into iOS-Build 2015-08-23 22:35:54 +02:00
xawotihs
907274f9bd Fixed cross-compiling with theos 2015-08-23 21:23:55 +02:00
Anthony Calosa
176b74489e added parallel lives
support token doubler... :)
2015-08-23 21:56:23 +08:00
Anthony Calosa
f940f8e303 some corrections
added Induce Paranoia, Draining Whelk
2015-08-22 23:40:31 +08:00
Anthony Calosa
2679213121 added FRF 2015-08-21 17:38:15 +08:00
Anthony Calosa
59c0cf467f serum powder code
serum powder second ability...
Any time you could mulligan and Serum Powder is in your hand, you may
exile all the cards from your hand, then draw that many cards.
2015-08-20 23:11:44 +08:00
Anthony Calosa
5a2637856f Merge remote-tracking branch 'WagicProject/master' 2015-08-20 23:09:12 +08:00
Anthony Calosa
26ecb199d3 Merge remote-tracking branch 'WagicProject/master' 2015-08-20 23:00:56 +08:00
Xawotihs
62d42fb61f Removed local check of mac branch 2015-08-17 23:53:11 +02:00
Xawotihs
19c96e496b More debug 2015-08-17 23:03:53 +02:00
Xawotihs
e982ba50be Removed a suspicous $ from the mac script 2015-08-17 22:27:39 +02:00
Xawotihs
27ad956034 More debug of the mac script 2015-08-17 21:57:29 +02:00
Xawotihs
8c6f694645 Replaced suspicious test 2015-08-16 21:11:41 +02:00
Xawotihs
8ce85636d9 More debug 2015-08-16 20:52:10 +02:00
Xawotihs
07683480b4 build => release => tag => build ... 2015-08-16 18:41:36 +02:00
Xawotihs
7d8fdbfd58 Restored branch removal and added some debug 2015-08-16 18:24:57 +02:00
Xawotihs
2a1cb03484 OMG what a stupid typo 2015-08-16 18:02:22 +02:00
Anthony Calosa
baa90fb605 added Ral Zarek 2015-08-16 14:57:34 +08:00
Anthony Calosa
1b67b736df Merge remote-tracking branch 'WagicProject/master' 2015-08-16 14:29:44 +08:00
Anthony Calosa
e6514a8b33 added gravecrawler
gravecrawler is supported :)
2015-08-16 14:17:26 +08:00
Xawotihs
636b07b350 Try to fix macosx branch deletion 2015-08-15 23:29:47 +02:00
Xawotihs
4b5478530c Merge pull request #612 from kevlahnota/master
Support of "formidable" abilities, added JOU, THS, M14 and fixed various cards.
2015-08-15 21:00:12 +02:00
Anthony Calosa
4a721a7e18 added KTK cards 2015-08-15 23:41:31 +08:00
Anthony Calosa
2470629afd Merge remote-tracking branch 'WagicProject/master' 2015-08-15 22:23:00 +08:00
Anthony Calosa
ccdd16bbc7 Used proper constant 2015-08-15 19:13:48 +08:00
Anthony Calosa
9cf6e621ab Removes viewing of tokens (rarity with T) on Spoiler 2015-08-15 14:51:26 +08:00
Anthony Calosa
94a97a3032 give credits
thanks KF1 and Tacoghandi
2015-08-15 08:18:35 +08:00
Anthony Calosa
f4ef7b9851 added M14 cards 2015-08-15 08:17:21 +08:00
Anthony Calosa
c2be7dd025 Fix M14 card dat 2015-08-15 08:07:36 +08:00
Anthony Calosa
b51dfc7733 added THS cards 2015-08-14 13:19:05 +08:00
Anthony Calosa
9999820a8f added missing cards from theros block 2015-08-13 23:19:20 +08:00
Anthony Calosa
10bc8283ed added JOU cards 2015-08-12 22:40:24 +08:00
Anthony Calosa
66f3ba5a7b removed id collision
avatar token already defined below ajani goldmane
2015-08-12 21:38:19 +08:00
Anthony Calosa
07f0175c5e fix bad line 2015-08-12 21:33:46 +08:00
Anthony Calosa
7376ac382f added missing copy cards 2015-08-12 20:53:30 +08:00
Anthony Calosa
3646219da4 Added missing devotion cards 2015-08-12 20:46:23 +08:00
Anthony Calosa
bfbc073593 added cards 2015-08-12 20:23:46 +08:00
Anthony Calosa
307be96fd6 Added Formidable cards 2015-08-12 20:16:07 +08:00
Anthony Calosa
22f4f21619 Added missing sets 2015-08-12 18:20:03 +08:00
Anthony Calosa
1738e216d0 Delete JOU 2015-08-12 18:05:45 +08:00
Anthony Calosa
567650357f Create JOU 2015-08-12 18:03:46 +08:00
Anthony Calosa
32de6ac124 Minor primitives correction
corrected some typo and added some cards
2015-08-12 17:32:42 +08:00
Anthony Calosa
60f3c87de1 Count Total Power of Creatures you control
example usage:  auto={4}{G}:4/4
restriction{compare(powertotalinplay)~morethan~7}
2015-08-10 22:44:27 +08:00
Xawotihs
d9561118bc Update appveyor.yml
Skip building macosx environment on windows
2015-07-20 22:32:25 +02:00
Xawotihs
228e5342fb Merge pull request #609 from WagicProject/CI-fixes
Ci fixes
2015-07-11 23:47:44 +02:00
Xawotihs
8574154071 Update .travis.yml 2015-07-11 21:58:30 +02:00
Xawotihs
80379ecde5 Update .travis.yml 2015-07-11 21:52:20 +02:00
Xawotihs
31b8ad248f Update .travis.yml
Fixed references to SDK package
2015-07-11 20:03:37 +02:00
Xawotihs
2d02f97f7f Update .travis.yml
Updated android SDK to 24.3.3
2015-07-11 18:51:11 +02:00
Xawotihs
6a37b5e461 Update .travis.yml
And a last one.
2015-07-11 18:36:34 +02:00
Xawotihs
38ed60bf63 Update .travis.yml
Add some \ to try fixing the script
2015-07-11 18:27:23 +02:00
Xawotihs
e664ecfaf5 Update .travis.yml
Updated android build tools to 22.0.1
2015-07-11 18:05:39 +02:00
Xawotihs
e2814c04f4 Merge pull request #607 from WagicProject/coverage
Adds test code coverage support
2014-12-31 13:57:14 +01:00
Xawotihs
8c2836b0c2 Update README.md
Added coverage status
2014-12-29 15:04:00 +01:00
Xawotihs
fcfab4c756 Update .travis.yml
Removed traces
2014-12-27 13:43:38 +01:00
Xawotihs
ddd59c489a Update .travis.yml
trying to fix gcov root
2014-12-27 12:17:03 +01:00
xawotihs
db922a0e77 Activated perf logs with qt console config 2014-12-27 11:47:54 +01:00
Xawotihs
793c4d1d7d Update .travis.yml
Added some traces
2014-12-27 10:39:16 +01:00
Xawotihs
24eab33b6d Update .travis.yml
updating coveralls options
2014-12-27 02:07:38 +01:00
Xawotihs
4985323ad9 Update .travis.yml
Tweaked coveralls config
2014-12-27 01:29:58 +01:00
Xawotihs
9fc551982b Update .travis.yml
Updated android sdk version
2014-12-26 21:23:11 +01:00
xawotihs
8ee67b5af8 Adds coverage support 2014-12-21 22:49:47 +01:00
xawotihs
78ad22479c Added changelog file 2014-12-09 22:18:51 +01:00
Xawotihs
2041aa45f0 Reactivated PSP build 2014-12-08 20:52:04 +01:00
xawotihs
c8b0ce9669 added sudo to install python packages on macosx 2014-12-08 00:10:48 +01:00
xawotihs
11eb6de57e Changed token and redirect push output 2014-12-07 23:33:46 +01:00
xawotihs
c451234bd5 Moved definition of origin 2014-12-07 22:47:04 +01:00
xawotihs
b56862fcf8 Added python dependencies, replaced token and removed "x" option in shell scripts 2014-12-07 22:26:39 +01:00
xawotihs
21a6da91ca Added git remote URL as HTTPS 2014-12-07 21:48:50 +01:00
xawotihs
410108a005 Added email and name to enable git commit 2014-12-07 21:06:53 +01:00
xawotihs
51d5b166a6 Deactivated PSP build and refactored build conditions 2014-12-07 20:29:27 +01:00
xawotihs
1f77243881 Fixed mac build script 2014-12-07 19:48:53 +01:00
xawotihs
f63afb2dd6 Merge branch 'mac-build' 2014-12-07 17:55:25 +01:00
xawotihs
dbe1c6e2ae Moved mac travis file outside of script and update oauth token 2014-12-07 17:26:32 +01:00
xawotihs
6a37425a38 Changed number of processes to 4 2014-12-07 16:48:57 +01:00
xawotihs
02efa4745f Fixed access to mac script and added mac branch to the list of branch authorized to upload binaries 2014-12-07 16:39:15 +01:00
xawotihs
e78754bcd5 Fixed mac script call 2014-12-07 16:24:39 +01:00
xawotihs
16dcf3cc5e - Moved scripts in tools directory
- Added a Mac cross-compiling script
2014-12-07 16:02:56 +01:00
xawotihs
03d168f972 Added MacOS bundle creation in Qt .pro file 2014-12-06 15:13:45 +01:00
Xawotihs
6f6c8b0eb6 Merge pull request #606 from kevlahnota/master
Fix for guild_keywords Devotion, added some "Chroma" cards
2014-12-05 07:47:37 +01:00
Anthony Calosa
fa14219e12 Fix for Devotion, added some "Chroma" cards 2014-12-05 10:18:05 +08:00
Xawotihs
15cd86fad1 Add traces at the end of the upload 2014-12-04 22:51:38 +01:00
Xawotihs
56ccebb720 Merge pull request #605 from kevlahnota/master
added guild keywords, added specific life cost
2014-12-03 07:37:55 +01:00
Anthony Calosa
8ef3789970 reverted sacred foundry 2014-12-03 07:54:13 +08:00
Anthony Calosa
ed7769c373 Revert "update sacred_foundry_i275.txt"
This reverts commit 5745006c35.
2014-12-03 07:47:00 +08:00
Anthony Calosa
5745006c35 update sacred_foundry_i275.txt 2014-12-02 19:19:05 +08:00
Anthony Calosa
16b243c52a Added bng cards to the main primitives. Removed bngGods.txt 2014-12-02 10:39:53 +08:00
Anthony Calosa
bc91eaf5ca updated card primitives that supports specific life cost 2014-11-29 07:10:02 +08:00
Anthony Calosa
6962d1e888 added cards, needs more testing before merging with the main primitives 2014-11-29 06:58:33 +08:00
Anthony Calosa
4d1e8dfb36 Update bngGods.txt
9/15/2013 	The type-changing ability that can make the God not be a creature functions only on the battlefield. It’s always a creature card in other zones, regardless of your devotion to its color.
2014-11-28 15:31:24 +08:00
Anthony Calosa
6ff6f95044 added Xenagos, God of Revels and Phenax, God of Deception for test purpose. 2014-11-28 14:34:37 +08:00
Anthony Calosa
5369983b35 Added BNG set 2014-11-28 14:19:04 +08:00
Anthony Calosa
46a8041c48 Added guild keyword gruul test for Xenagos, God of Revels. You must have Born of the gods set (BNG) 2014-11-28 14:00:58 +08:00
Anthony Calosa
84185a7c78 Added specific life cost test for griselbrand. Pls read note. 2014-11-28 13:35:13 +08:00
Anthony Calosa
4f41248978 Added specific life cost. if we use {l}{l}{l} to pay 3 life, and you have 2 life, you cannot afford to pay the cost but instead the game allows it. if we use specific life cost like: {l:3}, the restriction works. 2014-11-27 14:38:55 +08:00
Anthony Calosa
92d52a78be Update ExtraCost.cpp 2014-11-27 14:33:43 +08:00
Anthony Calosa
a76594046b Update ExtraCost.h 2014-11-27 14:31:25 +08:00
kevlahnota
2214ec66f1 Update AllAbilities.h
keywords for the "gods", "azorius" returns value of devotion to blue and white. ex. auto=azorius/dimir ueot
2014-11-27 11:31:19 +08:00
xawotihs
b8da46ac18 Fixed phonon support. 2014-11-23 16:27:18 +01:00
xawotihs
d656730d3a Fixed phonon support 2014-11-23 16:24:36 +01:00
xawotihs
2f230e4b38 Added buyback.txt to the list of automatic tests 2014-11-23 16:23:18 +01:00
xawotihs
494f64acbd Merge branch 'apollovy-master' 2014-11-23 14:32:02 +01:00
xawotihs
50978200d4 Merge branch 'master' of https://github.com/apollovy/wagic into apollovy-master 2014-11-23 14:30:17 +01:00
xawotihs
a38e1daec7 Updated Android build tools to 21.1.1 2014-11-23 12:44:22 +01:00
Yuriy A. Apollov
57a26b4583 Add test for buyback case. 2014-11-18 06:58:38 +03:00
Yuriy A. Apollov
c018c8fcd1 Fix buyback payed once stayed forever. 2014-11-18 06:51:40 +03:00
xawotihs
3ba4aca8bc Fixed stupid bug in python release creation 2014-08-25 22:16:12 +02:00
xawotihs
870f6e3b58 Fixed python typo 2014-08-25 00:27:40 +02:00
xawotihs
83e0869548 Updated python upload code to re-create new release 'latest-master' for each master commit 2014-08-25 00:02:46 +02:00
xawotihs
90b08db038 Updated travis to use python uploading script 2014-08-24 19:45:18 +02:00
xawotihs
c888e143a1 Fixed python typo 2014-08-24 18:46:42 +02:00
xawotihs
4e727bc164 Fixed python typo 2014-08-24 18:23:08 +02:00
xawotihs
b37afadb01 Fixed typo. 2014-08-24 17:59:04 +02:00
xawotihs
2c2744f6fb Fixed python issue 2014-08-24 17:40:05 +02:00
xawotihs
db2b2fa3b5 Replaced \ by / 2014-08-24 17:07:00 +02:00
xawotihs
0127f7aab9 Tries to activate automatic artifact deployment to github release from appveyor 2014-08-24 16:07:26 +02:00
Xawotihs
ce41791fa4 Remove broken comments 2014-08-23 09:36:46 +02:00
Xawotihs
ec4be4f6b1 Uses real python path 2014-08-23 00:53:33 +02:00
Xawotihs
f82d89b3db Removed empty environment section 2014-08-23 00:47:30 +02:00
xawotihs
202175f2a7 First appveyor script and python windows package build file 2014-08-22 23:26:03 +02:00
xawotihs
d7628b3eb2 Fixed console with Qtmultimedia 2014-08-03 12:20:45 +02:00
Xawotihs
7560db571c Trying without HTTPS to speed up SDK update 2014-08-03 11:43:55 +02:00
Xawotihs
775143355d Add lib pulse-dev 2014-08-03 01:51:41 +02:00
Xawotihs
846ba30821 Tries to fix android sdk update issue 2014-08-03 01:34:53 +02:00
Xawotihs
ad88592229 Replaced pulse-dev with pulseaudio 2014-08-02 23:44:40 +02:00
Xawotihs
6b90956af1 Adding pulse 2014-08-02 23:35:25 +02:00
Xawotihs
26e905a36e Update Androi build tools to 20.0.0 2014-08-02 23:16:22 +02:00
xawotihs
1a9ff38f0c Merge branch 'qtMultimedia' of https://github.com/WagicProject/wagic into qtMultimedia 2014-08-02 21:07:12 +02:00
xawotihs
8b22d032cd Fixed QT version needed for pixelRatio API 2014-08-02 21:05:55 +02:00
Xawotihs
8d58baf4a3 adding qtmultimedia in apt-get 2014-08-02 19:38:11 +02:00
Xawotihs
a447a0c9af Trying with --all 2014-08-02 19:22:38 +02:00
xawotihs
555fb3ae93 Updated Qt building scripts to use qt5 qmake and no fmod 2014-08-02 18:54:28 +02:00
Xawotihs
7053531a4d Added qmake qt5 configuration 2014-08-02 18:37:53 +02:00
Xawotihs
7d4e5177b9 Reordered actions from install to before_install 2014-08-02 18:15:45 +02:00
Xawotihs
06f30eca3a Upgraded travis to use qt5 2014-08-02 17:50:45 +02:00
xawotihs
ac5c14b977 Fixed QtMultimedia port, replaced QSoundEffect by QMediaPlayer as all codecs were not supported by first class. 2014-08-02 17:12:19 +02:00
xawotihs
c3d810bd3b Merge branch 'master' into qtMultimedia 2014-08-02 16:16:19 +02:00
xawotihs
1e24f25c18 Fixed repository against Qt5.3.1 2014-08-02 15:56:52 +02:00
xawotihs
28db884498 Cleaned up cross-compiling travis stuff 2014-07-26 19:45:59 +02:00
xawotihs
36ecc1ffef Cleaned up cross-compiling travis stuff 2014-07-26 19:38:14 +02:00
Xawotihs
9ec6803a02 Merge pull request #602 from WagicProject/feature/ios-update-xcode5.1
Feature/ios update xcode5.1
2014-07-24 23:08:39 +02:00
xawotihs
e87996a7f2 Deactivate window cross-compiling build 2014-07-23 23:20:54 +02:00
xawotihs
f2a5273029 Activating logs on android issue 2014-07-23 22:22:06 +02:00
xawotihs
9bc750da9a Upgrade Android SDK to r23.0.2 2014-07-23 22:05:02 +02:00
Xawotihs
539c5bd18a Trying to fix android build 2014-07-23 20:53:25 +02:00
Xawotihs
bdc1ada090 Update README.md
Added build status on AppVeyor
2014-07-23 00:17:07 +02:00
Michael Nguyen
2efc24a1ce Merge branch 'develop' into feature/ios-update-xcode5.1 2014-04-13 11:50:16 -07:00
Michael Nguyen
63561e6122 update Xcode build preferences as recommended by XCode. 2014-04-13 11:39:40 -07:00
Michael Nguyen
d2390b1227 updated project file for iOS to work with current codebase
- added missing source/headers (GameView.h, CarouselView.h, etc )
- removed dependency on admob static library
- removed CardEffect.h and CardEffect.cpp from project reference
- removed -no_implicit_dylibs flag (apparently no longer supported)
- added -fno-objc-arc (turns off ARC compilation for entire project)
- added -DTIXML_USE_STL
2014-04-13 08:34:21 -07:00
Michael Nguyen
d0799ea3f2 updating to latest code from master
Merge branch 'master' into develop
2014-04-13 08:26:53 -07:00
Xawotihs
44cbfbb1fb Merge pull request #601 from ZobyTwo/cleanup_3
Remove dead code and fix circular initialization
2014-03-13 20:20:12 +01:00
Tobias Loose
b078dd1f6a Fix android makefile 2014-03-11 17:31:25 +01:00
Tobias Loose
225dd23753 Fix makefile 2014-03-11 17:19:05 +01:00
Rolzad73
51b4755242 Update README.md
Added sample play-through video link
2014-02-05 23:39:57 -05:00
Tobias Loose
8f233b3027 Avoid circular initialization 2014-02-03 19:44:51 +01:00
Tobias Loose
197540763e Remove unused Effects.h/.cpp and class Effect
There was an empty vector of effect* in PlayGuiObject.
2014-02-03 13:52:40 +01:00
xawotihs
5d7667dc01 Cleaned Phonon vs QtMultimedia config 2014-01-31 21:53:27 +01:00
xawotihs
18383579e9 Fixed android compilation 2014-01-27 06:31:23 +01:00
xawotihs
03d4f8ffa1 Added Qt Multimedia support in order to replace Phonon. Currently does not work on Mac. 2014-01-26 23:56:15 +01:00
xawotihs
30d92eb68c Should fix issue #497 with the broken freezing the game. 2014-01-18 22:50:16 +01:00
xawotihs
6e6a0fd5c2 OMG I so hate shells 2014-01-18 16:00:14 +01:00
xawotihs
cd4a980182 More debug 2014-01-18 15:26:09 +01:00
xawotihs
aad54fd98d Adds debug in build script 2014-01-18 14:57:23 +01:00
xawotihs
6b7a49506c Should fix the stringifying issue 2014-01-18 14:23:26 +01:00
xawotihs
7ecf67c176 And again 2014-01-18 13:37:43 +01:00
xawotihs
77aeb2d0ac Fixed release name 2014-01-18 13:29:50 +01:00
xawotihs
7a9f989104 Adds some URL error log 2014-01-18 12:46:27 +01:00
xawotihs
ae06bebd24 Merge branch 'github_downloader' 2014-01-18 12:11:08 +01:00
xawotihs
042fb7b376 Tries to fix Android compilation 2014-01-18 11:18:27 +01:00
xawotihs
c3583ade01 Updated resource name and URL for android project 2014-01-17 23:25:48 +01:00
xawotihs
f97d9805dd Removed build number in released filename and added computation of resource URL based on release name. 2014-01-17 21:50:10 +01:00
xawotihs
1d33de59a9 Fixed compilation issue 2014-01-12 22:56:53 +01:00
xawotihs
0c4b09891b Removed hardcoded testing values and used 32 bits file size instead of 64 bits. 2014-01-12 22:40:45 +01:00
xawotihs
25955303e7 Adds a Downloader component to JGE able to download and cache files. 2014-01-12 22:16:35 +01:00
Rolzad73
27b75eecb0 Merge pull request #600 from WagicProject/android_build_update
update android build tools version
2014-01-09 12:33:11 -08:00
Rolzad73
e40921cf13 update android build tools version 2014-01-09 14:57:06 -05:00
Rolzad73
083cebcc7e updated credits text 2014-01-09 14:46:58 -05:00
Rolzad73
a722736335 Merge pull request #599 from WagicProject/android_travis_explicit
Attempt to make android tools fetching for TravisCI explicit and futureproof
2014-01-08 08:40:47 -08:00
Rolzad73
c483c20c81 attempt to make android tools fetching for TravisCI explicit and futureproof 2014-01-08 11:14:47 -05:00
Dmitry Panin
dec1caa43c Revert "Fixed issue with multiple basic abilities in TargetChooser"
This reverts commit d9816c7ad0.
2014-01-04 18:40:59 -08:00
Dmitry Panin
9526e22118 Fixed grave pact 2014-01-04 18:14:15 -08:00
Dmitry Panin
d9816c7ad0 Fixed issue with multiple basic abilities in TargetChooser
E.g. card create[trample;haste] wasn't handled properly
2014-01-04 18:13:22 -08:00
Dmitry Panin
8e327a27df Fixed formatting 2014-01-04 18:13:22 -08:00
xawotihs
43fe67d7d8 Adds executioners_swing tests in _tests.txt 2013-12-31 18:38:30 +01:00
Xawotihs
a63991bb4e Merge pull request #598 from bjornsnoen/master
Damager keyword
2013-12-31 09:11:20 -08:00
xawotihs
b09db0c60f Removed c++11 warning. 2013-12-22 21:26:06 +01:00
Bjørn Snoen
928ca3497a More code compliance. New tests. 2013-12-21 19:31:32 +01:00
Bjørn Snoen
60219411f6 Coding style compliance 2013-12-21 14:33:44 +01:00
Bjørn Snoen
642f5bb515 Fixed indentation mistakes 2013-12-21 11:18:18 +01:00
Bjørn Snoen
20e878a102 Made damager keyword work. Fixed Executioner's Swing in mtg.txt 2013-12-21 11:05:15 +01:00
xawotihs
da31371d86 Include c++11 threading 2013-12-20 18:39:02 +01:00
xawotihs
0df408793a Tries to fix android sdk installation in Travis 2013-12-20 14:09:30 +01:00
xawotihs
9630bcd56b Removed file wrongly added. 2013-12-20 12:37:25 +01:00
xawotihs
3c38e21b25 Merge branch 'master' into Qt5.2_macx 2013-12-20 11:14:10 +01:00
xawotihs
caec886e22 Fixed issues found by XCode. 2013-12-20 00:24:08 +01:00
Dmitry Panin
927f8955e9 Merge pull request #596 from bjornsnoen/master
Fix a rarity mistake and a grammatical error
2013-12-19 02:44:38 -08:00
Bjørn Snoen
d4e0296d2b Fixed wrong rarity on millstone in M14 2013-12-18 09:37:20 +01:00
Bjørn Snoen
8eb664f93d Fixed grammatical then/than error. 2013-12-18 05:50:30 +01:00
xawotihs
b180c3d1a7 Fixed Qt5 mingw32 build 2013-12-16 22:11:28 +01:00
Dmitry Panin
db9f18a644 Added _cards.dat for M14 (taken from forum) 2013-12-15 22:39:08 +04:00
xawotihs
95805ea387 Fixed QT mingw cross compile with QT4.8 2013-12-15 00:26:04 +01:00
xawotihs
4765890d0a Fixed mouse input with retina display 2013-12-14 23:46:23 +01:00
Xawotihs
2e13f29945 Update README.md 2013-12-14 19:13:26 +01:00
xawotihs
22b1c3b5d8 Fixed zip permission while rezipping PSP package 2013-12-14 14:40:26 +01:00
xawotihs
c7bae65697 Fixed core unzip 2013-12-14 13:18:11 +01:00
xawotihs
2381f0306c Fixed paths 2013-12-14 12:06:51 +01:00
xawotihs
b12e15e4ff Tries to arrange a bit the PSP binary package to make it more usual for users. 2013-12-14 11:55:12 +01:00
xawotihs
9e21751e12 Fixed windows build upload 2013-12-13 22:54:40 +01:00
xawotihs
db60c38eda Added windows build 2013-12-13 23:07:17 +01:00
xawotihs
1a4327a2e6 Fixed mingw32 build linking 2013-12-13 21:54:43 +01:00
xawotihs
88095c67b8 Fixed mingw32 compilation 2013-12-13 21:27:40 +01:00
xawotihs
ec34380668 Fixed mingw gcc package name 2013-12-13 00:12:32 +01:00
xawotihs
89dcd6c71d Added some windows cross compiling of the Qt flavor. 2013-12-12 17:54:43 -05:00
Dmitry Panin
fd3cf574cf Remove previous tag "latest-master" before uploading new one 2013-12-12 21:08:39 +04:00
Dmitry Panin
f21452feec Fixed some Cards:
Rune-Tail, Kitsune Ascendant
Shifting Sky
Flourishing Defenses (thanks to Shadowfireomega)
2013-12-12 20:11:35 +04:00
Dmitry Panin
0f85471216 Enabled automatic releases for each commit in master 2013-12-12 02:20:14 +04:00
Tobias Loose
5d92553017 Fix bug where the phase wheel got out of sync
The phase wheel messures phases within another unit and not
mtg phases. It is important to map between those
2013-12-11 01:53:05 +01:00
xawotihs
f0e6d820c7 Fixed GuiPhaseBar logics. 2013-12-10 22:23:28 +01:00
xawotihs
545fc21260 Merge branch 'more_easing' of https://github.com/ZobyTwo/wagic into ZobyTwo-more_easing 2013-12-10 20:35:47 +01:00
Xawotihs
8b68568106 Merge pull request #585 from bjornsnoen/master
Added Avatar Tokens created by Ajani Goldmane.
2013-12-10 11:12:33 -08:00
xawotihs
739a5d9e2b Removed env traces and change the secure token as it was exposed. 2013-12-09 22:39:25 +01:00
Tobias Loose
4c627f74b6 Add easing to GuiPhaseBar, simplify math a bit. 2013-12-09 22:20:43 +01:00
Tobias Loose
1e610ff653 Add InQuadEasing and OutQuadEasing and make tasklists...
easing more natural
2013-12-09 22:20:43 +01:00
Tobias Loose
5d6557a49f Add easing to task list and fix a bug where
opening the task list a second time was not possible
2013-12-09 22:20:43 +01:00
xawotihs
7528329a58 Add more debug in travis script 2013-12-09 21:54:55 +01:00
xawotihs
c62597dce5 Add some debugging to Travis script 2013-12-09 21:43:26 +01:00
Xawotihs
d8dfcdba67 Merge pull request #583 from ZobyTwo/deck_viewer_1
Cleanup, usability fixes and source code documentation for DeckView.h and GridDeckView.h
2013-12-09 11:51:40 -08:00
Bjørn Snoen
7b5f00260b Added Avatar Tokens created by Ajani Goldmane. 2013-12-09 16:55:31 +01:00
Tobias Loose
f9dc551942 Fix logic error in grid view 2013-12-08 23:05:06 +01:00
Tobias Loose
718ceca919 Do not allow that the selection moves outside in grid view. 2013-12-08 22:43:03 +01:00
xawotihs
89fb76a8e7 Updated scripts to remove any modified artifacts from Res directory.
Not doing it causes side effects on the testsuite.
2013-12-08 12:16:25 +01:00
Tobias Loose
1cc65ab611 Enable rotating over multiple filters, add src code doc 2013-12-08 12:03:13 +01:00
xawotihs
3b22354ad9 Fixed testsuite 2013-12-08 11:36:18 +01:00
Tobias Loose
2b9977a334 Rename methods for consistency and add source code doc
to DeckView.h
2013-12-08 10:48:15 +01:00
Tobias Loose
12c5f31562 Add a buttonMode to grid view to enable it on pointerless devices. 2013-12-08 09:11:44 +01:00
xawotihs
8cfd887375 Fixed upload script 2013-12-08 01:10:29 +01:00
xawotihs
292bf7b1d2 Merge branch 'ci_upload_binaries' 2013-12-08 00:33:42 +01:00
xawotihs
4041fe690b Create a release and parse its ID using jq. 2013-12-08 00:16:52 +01:00
xawotihs
cb73e2b90d Merge branch 'master' into ci_upload_binaries
Fixed Windows compilation.
2013-12-07 22:08:54 +01:00
ZobyTwo
a1fa36a934 Merge pull request #578 from ZobyTwo/deck_viewer_1
Reset positions and filters when reopening the editor. These changes are trivial so I will merge them.
2013-12-07 11:53:16 -08:00
Tobias Loose
bdd0e6c042 Reset positions and filters when reopening the editor 2013-12-07 20:47:50 +01:00
xawotihs
ee217e94a8 Fixed carousel pull request with Visual Studio. 2013-12-07 20:29:42 +01:00
xawotihs
38e19f7d35 Removed mingw32-qt
Merged SDL and QT .pro files
Removed glu dependency in corewrapper and JGfx to enable mingw cross compilation.
2013-12-07 18:57:57 +01:00
xawotihs
0bbfd00d15 Tries to install mingw32-qt on Travis 2013-12-07 18:31:02 +01:00
Tobias Loose
aaceb3c038 Remove unused declaration 2013-12-07 13:33:16 +01:00
Tobias Loose
5efa7e10bd Remove test debug output. Fix HUD fading. 2013-12-07 13:01:14 +01:00
Tobias Loose
14c164364e Cleanups and state reduction.
This mainly moves datamembers around and tries to avoid caching of
results of calculations when the calculations are cheap.
2013-12-07 12:58:20 +01:00
Tobias Loose
4514725aba Make the eased value a reference and add source code doc to Easing.h
This allows to apply multiple easings to the same variable.
2013-12-07 10:05:26 +01:00
Tobias Loose
2b0f50bb88 Remove redundancy and make control flow a bit simpler 2013-12-07 09:04:24 +01:00
xawotihs
a65fc0c0f0 Merge branch 'master' into ci_upload_binaries
sudo pip installation of pyjavaproperties
2013-12-06 22:52:32 +01:00
xawotihs
99db363253 Uses pip to install pyjavaproperties 2013-12-06 22:41:09 +01:00
xawotihs
c25dfec67e Fixed python module installation 2013-12-06 22:17:19 +01:00
xawotihs
dd7210d187 Install pyjavaproperties in travis. 2013-12-06 21:59:29 +01:00
xawotihs
904b7a6d86 Build and upload core resource package 2013-12-06 21:21:01 +01:00
Tobias Loose
31b353c5ec Use easing within the carousel view sliding 2013-12-06 21:04:21 +01:00
Tobias Loose
0d350af1b6 Use easing within the carousel views scrolling
It is visible if you scroll more than one card
2013-12-06 20:51:18 +01:00
xawotihs
3bc9c93bab Build and upload PSP binary archive. 2013-12-06 20:40:02 +01:00
Tobias Loose
2002bb4e16 Fix crash that occured when opening the editor a second time 2013-12-06 20:13:30 +01:00
Tobias Loose
7e9c4ddbdd Fix logic error in optimization introduced in last commit 2013-12-06 19:53:38 +01:00
Tobias Loose
12b71de63c Render small cards as thumbnails 2013-12-06 19:51:42 +01:00
Tobias Loose
15011961f4 Do only prefetch cards if resource management is threaded 2013-12-06 16:43:09 +01:00
xawotihs
b851103711 Commented out the release creation and refered an existing release instead. 2013-12-06 00:47:24 +01:00
xawotihs
67b8af8d15 Merge branch 'ci_upload_binaries' of https://github.com/WagicProject/wagic into ci_upload_binaries 2013-12-06 00:41:16 +01:00
xawotihs
8100e390b1 I'm starting to understand the stuff, the upload only works with a releaseId... 2013-12-06 00:10:36 +01:00
Tobias Loose
72e6876001 Remove temporary and binary files 2013-12-05 23:57:03 +01:00
Tobias Loose
96aeaffa1b Style and logic error. 2013-12-05 23:33:43 +01:00
xawotihs
74faa35b91 Removed useless local file copy before upload. 2013-12-05 23:27:40 +01:00
Tobias Loose
8bb58ca3b1 Put boilerplate code into easing base class 2013-12-05 23:27:28 +01:00
Tobias Loose
93d1a637b6 Style guide 2013-12-05 23:22:50 +01:00
xawotihs
30e86ffcd8 Update script to handle better variables. 2013-12-05 23:09:06 +01:00
Tobias Loose
cbe6c0c842 Parameterize animations in grid deck view 2013-12-05 23:06:32 +01:00
Tobias Loose
77eb7f2777 Add missing header 2013-12-05 23:06:32 +01:00
Tobias Loose
077ab10c05 Rename Button to ButtonPressed 2013-12-05 23:06:32 +01:00
Tobias Loose
1194463349 Let the deck view base class handle buttons 2013-12-05 23:06:32 +01:00
Tobias Loose
8de50532f2 Put easing code into Easing.h. Add easing to sliding 2013-12-05 23:06:31 +01:00
Tobias Loose
334454655d Add Easing code to make scrolling in grid view more fluid 2013-12-05 23:06:31 +01:00
Tobias Loose
d8d52e185d Add another missing include 2013-12-05 23:06:31 +01:00
Tobias Loose
9f1d225259 Add additional source files to various build systems 2013-12-05 23:06:30 +01:00
Tobias Loose
0c72bfd4c4 Make deck views toggleable 2013-12-05 23:06:30 +01:00
Tobias Loose
55e0366f19 Move griddeckview implementation into source file 2013-12-05 23:06:30 +01:00
Tobias Loose
667b95f2b8 Refactor gamestatedeckviewer and add a grid view suited...
for bigger screens.
2013-12-05 23:06:30 +01:00
Tobias Loose
e90f6fe224 Whitespaces and add button to toggle griv/scrolling view 2013-12-05 23:06:30 +01:00
Tobias Loose
2289fffb8d Do not ftbfs when in release mode (-weror, -wunused-.. combination) 2013-12-05 23:06:30 +01:00
xawotihs
826403a512 Fixed upload shell script 2013-12-05 22:44:02 +01:00
xawotihs
35fec3d9a0 Made upload-binaries executable 2013-12-05 22:05:31 +01:00
xawotihs
e9eb86488e Redirect ant update errors to a file and push correct upload-binaries.sh 2013-12-05 21:43:29 +01:00
xawotihs
ae97abbf96 Activates an automatic pre-release and binary upload from Travis. 2013-12-05 21:21:08 +01:00
Xawotihs
a8391112b0 Merge pull request #576 from ZobyTwo/directories_1
Do not specify the system directory in JGE
2013-12-04 13:07:05 -08:00
Rolzad73
4257592568 Updated output of info about Android APIs 2013-12-04 12:58:22 -05:00
Tobias Loose
657479e0e4 Do not specify the system directory in JGE 2013-12-04 11:58:36 +01:00
Dmitry Panin
9e969881fd Added output of info about Android APIs 2013-12-04 12:04:54 +04:00
Dmitry Panin
2b434a7182 Merge pull request #575 from WagicProject/android_travis_sdk_downgrade
Changed Travis build file to use Android API 10 and Android build tools 18.1.1
2013-12-04 00:02:49 -08:00
Rolz73
d2e41f98c3 Changed Travis build file to use Android API 10 and Android build tools 18.1.1 2013-12-03 02:36:11 -05:00
Xawotihs
318fc98a39 Merge pull request #574 from WagicProject/feature/play-from-grave
Feature/play from grave
2013-12-02 12:34:52 -08:00
Dmitry Panin
b7a4b7f6b9 Fixing Yawgmoth's will 2013-12-02 21:26:55 +04:00
Dmitry Panin
ed03fb744d Added [Yawgmoth's Will] 2013-12-02 13:42:31 +04:00
Dmitry Panin
02be213d1e Test for keyword "CanPlayFromGraveyard"
Also added card [Crucible of Worlds] as example of it.
2013-12-02 04:36:58 +04:00
Dmitry Panin
0d4db9ee54 Fixed bug in alternative cost when playing lands 2013-12-02 04:33:39 +04:00
Dmitry Panin
ae927576c5 Draft of new feature: canplayfromgraveyard
this will allow playing cards from graveyard
examples: tbd
2013-12-02 04:20:04 +04:00
Dmitry Panin
f08ddac77b Fixed formatting 2013-12-02 04:16:25 +04:00
Dmitry Panin
9effa7c975 Slightly changed formatting while investigating src 2013-12-01 01:01:57 +04:00
Dmitry Panin
a70259b5ba Fixed: Assembly-Worker didn't appear as creature type
For artifact creatures the parent type TYPE_ARTIFACT was used
and therefore that creature's subtype wasn't added in full list.
2013-12-01 00:59:16 +04:00
xawotihs
bf0a0a1580 Build the graphics version in release instead of debug. 2013-11-30 19:32:55 +01:00
xawotihs
eb8b22b2d5 Merge branch 'master' of https://github.com/WagicProject/wagic 2013-11-30 12:21:43 +01:00
xawotihs
4095676b6b Fixed memory leak introduced in #555 2013-11-29 22:07:45 +01:00
xawotihs
bedd1e8da8 Merge branch 'valgrind' of https://github.com/ZobyTwo/wagic into ZobyTwo-valgrind 2013-11-29 19:41:46 +01:00
xawotihs
965d4f6d45 Fixes Windows project 2013-11-29 19:31:23 +01:00
Tobias Loose
0db2925e7a Fix initialization orders 2013-11-29 18:44:30 +01:00
Tobias Loose
031f2dbffb Fix Valgrind warnings appearing during the test suit. 2013-11-29 18:21:53 +01:00
Tobias Loose
dbece750f8 Use tabs instead of spaces if the file uses tabs 2013-11-29 13:51:13 +01:00
Tobias Loose
6699902c24 Add TIXML_USE_STL to android builds 2013-11-29 13:34:44 +01:00
Tobias Loose
e8407caa2a Add TIXML_USE_STL compiler flag to psp makefile to make headers compatible 2013-11-29 13:34:35 +01:00
Tobias Loose
69c6745f53 Make getMenuText() return string. 2013-11-29 13:33:33 +01:00
Tobias Loose
6f083389c2 Speedup MTGAllCards::countByType a bit 2013-11-29 11:51:58 +01:00
Tobias Loose
9ee44ca091 Substitute more char arrays with strings 2013-11-29 11:51:22 +01:00
Tobias Loose
3f0dd987f0 Remove bool CardInstance::hasSubtype(const char * _subtype)
There exists bool CardInstance::hasSubtype(const string& _subtype) and the
const char* version converts _subtype into string deeper in the call
hierarchy anyway. So both methods did the same.
2013-11-29 11:43:59 +01:00
Tobias Loose
672b0be7bd Fix a few string bugs add StartsWith for strings 2013-11-29 11:38:49 +01:00
Tobias Loose
9d5a83d588 Replace more strcmp with std::string::compare or std::string::operator==.
This commit also enables TinyXML STL support.
2013-11-28 16:42:29 +01:00
Tobias Loose
5d0d130587 Make MTGGameZone::countByType use string instead of char*
and replace strcmp with std::string operator== calls.
2013-11-28 16:42:29 +01:00
Tobias Loose
c85d857604 Replace constness cast 2013-11-28 16:42:29 +01:00
Tobias Loose
f68568cc1e Replace strcmp with c++ equivalent when comparing std::strings. 2013-11-28 16:42:29 +01:00
Dmitry Panin
89206b3a6b Added testing that QT GUI build is successfull 2013-11-28 16:44:12 +04:00
Michael Nguyen
a8cff5ed8e Merge branch 'master' into develop 2013-11-28 02:19:41 -08:00
xawotihs
dc118c64b8 Fixed compilation on Mac 2013-11-27 23:04:46 +01:00
xawotihs
a43854420d Fixed compilation issue on Windows 2013-11-27 20:33:59 +01:00
xawotihs
a695323bc7 Merge pull request #564 from ZobyTwo/cleanup_1
Add a few namespaces and fix header guards.
2013-11-25 15:42:18 -08:00
xawotihs
02a65ecd82 Merge branch 'cleanup_1' of https://github.com/ZobyTwo/wagic into ZobyTwo-cleanup_1 2013-11-26 00:17:48 +01:00
xawotihs
9ff087ecde Merge pull request #570 from WagicProject/android-travis-ci
Android travis ci
2013-11-25 14:31:15 -08:00
xawotihs
47685f4892 Added installation of 32 bits libs to make Android SDK work. 2013-11-25 22:42:09 +01:00
xawotihs
7aaebdc661 Merge branch 'android_build_fix' into android-travis-ci 2013-11-25 21:23:58 +01:00
Rolzad73
8aa0b8cea0 reverting sdk.buildtools change 2013-11-25 13:41:07 -05:00
Rolzad73
fac44c4b48 - updated AndroidManifest.xml to match desired API values.
- removed CardEffect.cpp reference from Android.mk build file.
- added sdk.buildtools=18.1.1 line to default.properties and project.properties
- updated .gitignore
2013-11-25 11:54:19 -05:00
Dmitry Panin
9889186eab Added missing "echo" statement 2013-11-25 13:41:29 +04:00
xawotihs
73f9319b92 Activates Android build from Travis 2013-11-25 05:27:31 +01:00
xawotihs
fd6bc95539 Merge pull request #562 from citiral/master
Updated deckmenu.cpp to properly render deck description and summary
2013-11-24 10:28:05 -08:00
Tobias Loose
0bb211a581 Remove unused global variables from DeckStats.cpp and add proper...
member variable initialization.
2013-11-24 09:18:34 +01:00
Tobias Loose
e0428ac7b0 Avoid more conflicts. We could now do unit builds...
and make the linker put every data element and function into its own section.
On linktime, we can output every discarded section and get a list of dead
code (for that build).
2013-11-23 17:04:24 +01:00
Tobias Loose
3e94de985f Add more include guards 2013-11-23 16:25:14 +01:00
Tobias Loose
9f0b70d1c9 Put constans into extra namespace as kBackToMainMenuID...
collides with itself. GameStateAwards::kBackToMainMenuID and
GameStateOptions::kBackToMainMenuID define those with different
values.
2013-11-23 16:18:45 +01:00
Tobias Loose
1e8fc81aa3 Add/fix broken include guards 2013-11-23 16:09:11 +01:00
Tobias Loose
352e3c2daa Remove makros and add undefs to avoid clashing names
FRAND and Clamp were not used and Clamp collided when doing unit builds.
SQUARE(x) is longer than x*x and if x is an expression it gets evaluated
twice.
2013-11-23 16:03:04 +01:00
Dmitry Panin
678a4734bb Merge pull request #560 from ZobyTwo/dead_code
Remove some dead code
2013-11-22 00:09:40 -08:00
Dmitry Panin
052e3abdb8 Small fix in match_and ( [-color1; -color2] was handled incorrectly ) 2013-11-22 01:03:07 +04:00
citiral
73c2d17080 Updated deckmenu.cpp to properly render deck description and summary
Deck description and statistics were being drawn as black text, this made it invisible as it was rendered over a black background. I made it change the color to white before drawing, so its shown as its suposed to be.(Did the default text color change?)
2013-11-21 20:38:41 +01:00
Dmitry Panin
ffbb228d2d Fixed wrong activation cost in dragon hatchling 2013-11-21 14:25:01 +04:00
Dmitry Panin
306765c6b6 Merge pull request #561 from ZobyTwo/valgrind
Fix some valgrind memcheck warnings. However there remains one...

... within the threaded texture cache. Once it is resized, some textures
in GetQuad(...) (WCachedResource.cpp:102/103) have uninitialized widths/heights.
2013-11-21 01:58:49 -08:00
Tobias Loose
3cee80e3bc Delete another unused file (GuiMessageBox.cpp) 2013-11-20 14:01:59 +01:00
Tobias Loose
8209716fc9 Remove unused file 2013-11-20 13:53:15 +01:00
Tobias Loose
e76c57d747 Fix some valgrind memcheck warnings. However there remains one...
... within the threaded texture cache. Once it is resized, some textures
in GetQuad(...) (WCachedResource.cpp:102/103) have uninitialized widths/heights.
2013-11-20 12:56:33 +01:00
Tobias Loose
9c282aeb56 Remove CardEffect.o from Makefile 2013-11-20 12:02:33 +01:00
Tobias Loose
bbc310dec7 Remove some dead code 2013-11-20 11:43:27 +01:00
Dmitry Panin
a37af1776a Merge pull request #557 from ZobyTwo/defines
Defines/Typos
2013-11-20 02:34:32 -08:00
Tobias Loose
35697a65b4 Use style guide 2013-11-20 11:13:35 +01:00
Tobias Loose
6bed1666be Merge branch 'master' into defines 2013-11-20 11:06:41 +01:00
Tobias Loose
f021866368 Merge remote-tracking branch 'wp/master' 2013-11-20 11:06:28 +01:00
xawotihs
d7e527166c Merge branch 'show-output-only-for-failing-tests' 2013-11-19 11:14:41 +01:00
Dmitry Panin
071a487100 Fixed compilation error 2013-11-19 11:06:31 +04:00
Dmitry Panin
f370899a8a Thread-safe version of OutputCapturer 2013-11-19 03:58:43 +04:00
Dmitry Panin
331e126787 Added info about total number of tests 2013-11-19 02:57:42 +04:00
Dmitry Panin
6c41e5c92c Added option (#define CAPTURE_STDERR)
if set then the DebugTrace calls only for failing tests are shown
2013-11-19 02:41:30 +04:00
Tobias Loose
82e3ab3977 Merge branch 'cleanup' into defines
Merge cleanup codings style commit as i accidentally used that branch as
the base.
2013-11-17 21:06:56 +01:00
Tobias Loose
f2314ca673 Use proposed coding style 2013-11-17 21:05:07 +01:00
Tobias Loose
94c3ac9ad9 Fix FTBFS 2013-11-17 21:02:08 +01:00
Tobias Loose
5419d87e4e Get rid of two more define groups. 2013-11-17 20:22:03 +01:00
Tobias Loose
e1213d1c1f Remove variables flagged for removal (via conditional TODO comment)
x and y is provided by PlayGuiObject::Pos.
2013-11-17 19:50:17 +01:00
Tobias Loose
446ed20758 Fix typo ActionLayer::receiveEventPlus(...)
This method is rarely used, however it returned 0 after adding stuff.
It now returns the sum.
2013-11-17 19:39:46 +01:00
Tobias Loose
7a48c5e087 Fix some cppcheck warnings (mostly style and postfix vs prefix iteration) 2013-11-17 19:36:24 +01:00
Tobias Loose
3ca2f1c1ed Replace defines in Damage.h with enums. 2013-11-17 17:12:58 +01:00
Tobias Loose
146872797b ActionElement.h: Replace defines, remove superfluous ";"
Defines do not follow scope rules, but enums do. Enum classes
even utilize strong type checking (but i am not sure about compiler
support for c++11 on all target platforms).
2013-11-17 16:08:29 +01:00
Tobias Loose
c6dc51c7d3 Simplify Damage::resolve a bit 2013-11-17 15:37:56 +01:00
Dmitry Panin
0ef92d154a Merge pull request #555 from WagicProject/fix-cranial-plating
Fix cranial plating
2013-11-16 13:58:56 -08:00
Dmitry Panin
2835bdf767 Fixed issue with Cranial Plating.
Issue
	attach then equip: plating will give bonus to both creatures
Fix
	Changed "attach" to "retarget target(creature|mybattlefield)"
	as this doesnot admit this bug
	Attach should become deprecated in future
2013-11-17 01:49:51 +04:00
Dmitry Panin
afc903e31b Added different names for attach and equip
+ moved implementation of AEquip to .cpp
2013-11-17 00:44:37 +04:00
Dmitry Panin
6294bb1eed Added Master of Waves 2013-11-16 23:54:37 +04:00
xawotihs
9f16b2208d Removes the error, it was perfectly detected by Travis CI. 2013-11-09 20:15:00 +01:00
xawotihs
0a765b702b Introducing an error to check if Travis reports correctly a compile
error with the script.
2013-11-09 20:01:57 +01:00
xawotihs
82de6f2840 Fixes stupid typo. 2013-11-09 19:51:47 +01:00
xawotihs
90652fa73d Fixed PSP build and integrates it with Travis CI 2013-11-09 19:40:01 +01:00
Rolzad73
e8c73aaf9d Merge pull request #1 from WagicProject/android_cleanup
Android cleanup
2013-11-07 13:15:41 -08:00
Rolzad73
f95094a429 removing commented lines I had intended to delete outright 2013-11-07 15:56:43 -05:00
Rolzad73
7a57de6608 removed ads on Android version 2013-11-07 15:49:53 -05:00
Rolzad73
14c2d522c2 removed Android gen dir 2013-11-07 15:04:37 -05:00
Dmitry Panin
6bf2147d94 From the Vault: Twenty
// imported accidental commit from svn repo
2013-11-06 12:56:54 +04:00
xawotihs
fea5b04a77 Fixed compilation on Windows. 2013-10-31 23:48:19 +01:00
xawotihs
ea98b769a7 Merge branch 'develop'
Activates full testsuite run in Travis CI. Travis will complain as soon as at least one testcase does not pass successfully after a new commit.
2013-10-30 23:10:03 +01:00
xawotihs
017f6dd1ed Deactivated part of the traces outputted by the testsuite to make Travis
happy.
2013-10-30 22:58:04 +01:00
xawotihs
784d127a6e I think I got it ... messy / not appearing at the end of folders in the
travis linux where it appears fine on mine :(
2013-10-30 22:28:09 +01:00
xawotihs
f6c47b85e3 More debug 2013-10-30 22:02:43 +01:00
xawotihs
dac31994b6 Adding traces for important directories. 2013-10-30 21:44:23 +01:00
xawotihs
74280aef1d Added some traces in the primitives and sets loading. 2013-10-30 20:50:34 +01:00
xawotihs
8013d09e4f Reactivated wagic console in travis CI 2013-10-30 20:30:33 +01:00
Dmitry Panin
6bbe290762 Fixed bug with syncopate to consume all the mana available
Now pay[[{x}]] is not supported because of this.
use "pay[[{value:storedx}]]" instead
2013-10-30 12:39:08 +04:00
xawotihs
57c9940244 Deactivated testsuite from travis, resources are not loaded correctly. 2013-10-30 00:38:34 +01:00
xawotihs
db1c552321 Tries to work around crash of the testsuite in Travis. 2013-10-30 00:20:58 +01:00
xawotihs
f08f0ad3b9 Merge branch 'master' of https://github.com/WagicProject/wagic
Conflicts:
	JGE/include/JTypes.h
2013-10-29 23:36:07 +01:00
xawotihs
a3a1bc2b79 Created a dedicate console Qt based wagic application and run it in the
travis file.
2013-10-29 22:38:37 +01:00
Dmitry Panin
9037699281 Added missing test for syncopate + 2 tests for spell_rupture 2013-10-29 19:49:31 +04:00
Michael Nguyen
8d66f82179 Merge branch 'release/wagic-v0.19.2' 2013-10-28 16:19:28 -07:00
Michael Nguyen
eeb4a4e755 updated version number to 0.19.2, changed min target to API 10 vs API 9 as recommended by Android 2013-10-28 16:19:01 -07:00
Michael Nguyen
38725aaeac Merge commit '82171773fe89cd582e62a52fdadb152040fc0fd5' into develop 2013-10-28 15:37:35 -07:00
Michael Nguyen
ed474d6b5d Merge commit '224c94e89089317fac33aacb9319ab250301c98e' into develop 2013-10-28 15:37:24 -07:00
Michael Nguyen
b17d9d3f85 Merge branch 'master' of github.com:WagicProject/wagic 2013-10-28 15:35:45 -07:00
Michael Nguyen
c5190a62cd Merge branch 'develop' 2013-10-28 15:35:18 -07:00
Michael Nguyen
89472eeccd tidied up gitignore file for XCode 2013-10-28 15:29:51 -07:00
Michael Nguyen
2b4404f352 Merge branch 'feature/update-for-iOS6' into develop 2013-10-28 15:21:33 -07:00
Michael Nguyen
84ca7457b5 updaed for iOS6 2013-10-28 15:20:35 -07:00
Michael Nguyen
4eb1fd35e0 changed the default location for the sdcard. Instead of using a fixed value of "/sdcard/Wagic/Res" it now uses Environment.getExternalStorageDirectory().getPath() + "/Wagic/Res" 2013-10-28 15:20:11 -07:00
Michael Nguyen
362cc1b4c2 updated project to rotate and display correctly in iOS6+
removed all references to adwhirl for iOS.
2013-10-28 15:14:17 -07:00
xawotihs
82171773fe revert travis config file while the X dependency is not sorted. 2013-10-28 00:07:55 +01:00
Unknown
224c94e890 Included some testsuite into qtmain and updated travis file to try to use it. 2013-10-27 23:06:29 +01:00
Dmitry Panin
7a7bc70773 Update README.md 2013-10-27 13:36:23 +03:00
Dmitry Panin
1401fef37e Simple support for CI at travis
- now compilataion on Linux (using qmake and make) is checked
2013-10-27 14:30:34 +04:00
Dmitry Panin
cf50b7d403 Fizzle unless pay x (thanks to excessum)
- saves source card in storedSourceCard for ATransform
- adds support for WParsedInt in pay as "pay[[{value:WParsedInt}]]":

name=Spell Rupture
target=*|stack
auto=if cantargetcard(*|opponentstack) then transforms((,newability[pay[[{value:power:highest:creature:opponentbattlefield}]] name(pay {value} mana) donothing?fizzle])) forever
text=Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control.
mana={1}{U}
type=Instant

- adds support for {x} in *some* “pay” abilities (Syncopate):

name=Syncopate
target=*|stack
auto=transforms((,newability[pay[[{x}]] name(pay {value} mana) donothing?fizzleto(exile)])) forever
text=Counter target spell unless its controller pays {X}. If that spell is countered this way, exile it instead of putting it into  its owner's graveyard.
mana={X}{U}
type=Instant

- support of "name(pay {value} mana)" in pay abilities to show actual number to pay (see example above)
2013-10-27 13:47:00 +04:00
Dmitry Panin
b8b6153cc5 Reworked AVanishing (fixed bugs + more fair implementation) 2013-10-27 13:42:48 +04:00
Dmitry Panin
461eedd626 Fixed bug with preventing Melira from putting +1/+1 counters on creatures you control 2013-10-27 13:42:48 +04:00
xawotihs
f0977ebc04 Update README.md 2013-10-26 12:12:58 +02:00
xawotihs
e38f42d854 Create README.md 2013-10-26 11:50:40 +02:00
xawotihs
4ac376b5f2 Ignored non-source extensions 2013-10-24 21:53:46 +02:00
Xawotihs@gmail.com
1f0485ff8e Support for running the testsuite in command line programs for continuous integration.
Here is a small example inspired from SDLmain.c:

g_launcher = new JGameLauncher();
InitGame();
MTGCollection()->loadFolder("sets/primitives/");
MTGCollection()->loadFolder("sets/", "_cards.dat");
options.reloadProfile();
TestSuite testSuite("test/_tests.txt");
int result = testSuite.run();
DestroyGame();
delete g_launcher;
return result;
2013-10-23 22:08:30 +00:00
Xawotihs@gmail.com
98861dd916 Fixed memory leaks and refactored a bit the ManaCost class while I was at it. 2013-10-19 14:29:17 +00:00
pankdm
b5794ad328 Small fixes (misstype, formatting, target p2) 2013-10-18 06:38:15 +00:00
pankdm
38b4213f9c Refactored formatting for easier reading of the code 2013-10-18 06:38:03 +00:00
pankdm
f1a9f0d162 Fixed Grave Pact, butcher of malikir and some other cards
"Whenever creature you control dies" --
it's @movedTo(creature|  graveyard) from(mybattlefield)
NOT  @movedTo(creature|mygraveyard) from(  battlefield)
2013-10-18 06:37:53 +00:00
pankdm
e62feddaf4 Added Probe 2013-10-18 06:37:43 +00:00
pankdm
5c3eb2c405 Changed the owner of ManaCost in LifeorManaCost to itself 2013-10-18 06:37:31 +00:00
pankdm
f7eded7417 Devotion mechanics (thanks to excessum for patch)
+ some refactoring:
extrManaCost --> ExtraManaCost
unattachCost --> UnattachCost
2013-10-18 06:37:09 +00:00
pankdm
d5b089f86b Small fixes to _cards.dat 2013-10-18 06:36:56 +00:00
pankdm
1d3c4bcd69 Added _cards.dat file for Theros 2013-10-18 06:36:46 +00:00
pankdm
9d2a2454b2 Fixed: exile was not meaning both exiles
and revised Crypt Incursion
2013-10-18 06:35:52 +00:00
pankdm
173f787fac Revise cards that deals damage and gain life
This cards created multiple instances of life gain and damage,
which caused wrong behaviour with for example Ajani's Pridemate
2013-10-18 06:35:02 +00:00
pankdm
0ac6057ee9 Fixed Balduvan conjurer (added land restriction) 2013-10-18 06:34:51 +00:00
pankdm
8b16074647 Fixed memory leak in menuability (thanks to excessum) 2013-10-18 06:34:42 +00:00
pankdm
62dad30f6b Revised Bloodigift demon (now it targets players) 2013-10-18 06:34:32 +00:00
pankdm
43ba9aa13d Fixed parsing of "if(ifnot) ... then may ... " 2013-10-18 06:34:23 +00:00
pankdm
ea217fdba1 Fixed [card] 2013-10-18 06:34:14 +00:00
pankdm
eea88cdeb5 Tests for new "fizzleto" keyword 2013-10-08 23:18:56 +00:00
pankdm
0c6d77daa0 Refactored FizzleToZone
Get rid of common code
Better naming of zone (where we put spell after countering)
More generic syntax: fizzleto(X) where X in [hand, exile, librarytop]
which will give more flexibility later
2013-10-08 23:18:42 +00:00
pankdm
4341e23210 Added Increasing Ambitions 2013-10-08 23:18:32 +00:00
pankdm
80be19db86 Added missing type=Artifact Creature to Trisk token 2013-10-08 23:18:19 +00:00
pankdm
1da9f5a4af Fixed time sieve 2013-10-08 23:18:08 +00:00
pankdm
fa5aedfe64 Fixed Triskelavus
(tokens didn't have ping ability after death of Trisk)
2013-10-08 23:17:57 +00:00
pankdm
17fdedb648 Draft of the "fizzle to zone"
(credit goes to excessum)
2013-10-08 23:17:43 +00:00
pankdm
da7c336dc2 Removed debug code that was added by mistake 2013-10-01 14:49:31 +00:00
pankdm
be76c8a4f1 Fixed issue with cantbeblockerof and cantbeblockedby vs protection 2013-10-01 14:47:39 +00:00
Xawotihs@gmail.com
490752e9da - Removed dependencies on Boost/string in mtg sources
- Removes dependencies on Boost/shared_ptr in mtg sources only for WP8 for the moment
- Various compilation fixes on WP8
2013-09-30 21:25:17 +00:00
pankdm
7894ca3ace Refactored ABlink: extracted common code as method "returnCardIntoPlay" 2013-09-27 19:25:28 +00:00
pankdm
d4268f18af Fixed Mortus Strider 2013-09-27 18:54:01 +00:00
pankdm
3761684816 Fixed blinking (until EOT) of creature with X in cost 2013-09-26 14:17:39 +00:00
pankdm
f10eb609d7 Added:
Belltower Sphinx
	Spellstutter Sprite

Thanks to Tacoghandi and dber for providing the code
2013-09-24 16:44:19 +00:00
pankdm
00ebc8c8eb Fixed issue with blinking creature that has X in cost 2013-09-23 20:27:52 +00:00
pankdm
36cfe84445 Revised Door of Destinies 2013-09-23 20:02:26 +00:00
pankdm
54d1126c58 Small fix in TestSuite
"Update" should pass "dt" since the last update, not since the beginning the game.
2013-09-23 19:44:03 +00:00
pankdm
11f541a627 Fixed:
Edge of autumn
	Mirrorworks

	Clone of the card now have the same image as original
	Issue with cloning and trigger "nontoken * enters"

	Blitzkrig rules
	Hermit druid rules
2013-09-23 19:40:12 +00:00
pankdm
93ebca3041 Forgot to remove Wildfire from unsupported 2013-09-20 16:39:23 +00:00
pankdm
ce7689c8c6 Added:
Wildfire

Fixed:
	Stitch in Time -- missing flipend at end
	Raging Ravine -- can't have trigger inside second transofrm
	Prey Upon -- can be cast only on opponents creature
	Mesmeric Fiend -- target(player) --> target(opponent)
	Caribou Range -- ability should be on ench
2013-09-20 16:18:56 +00:00
pankdm
de8309a7c2 Small fixes for:
Gravecrawler
Riot Control
Teysa, Envoy of Ghosts
Vengevine
Izzet Staticaster
Batwing Brume
2013-09-19 16:02:34 +00:00
pankdm
ec11bf917d Fixed slight bugs with formatting in primitives files
This appeared in several places (usually unsupported and mtg):
Churning Eddy
Izzet Staticaster
Kjeldoran Pride
Storage Matrix 
Torch Song

This had multiline values under "text=" or "auto=":
Debt to the Deathless
Smelt-Ward Gatekeepers
Sunspire Gatekeepers
Teysa, Envoy of Ghosts
Ubul Sar Gatekeepers
2013-09-18 07:00:29 +00:00
pankdm
8626451977 Fixed uninitialized value
Due to this, activated abilities with {X} in cost sometimes were having X=0 when playing
(This appeared only in Debug mode)
2013-09-16 20:18:36 +00:00
pankdm
4aa5dec51a Fixed some warnings
+ added compile flags to mute some warnings that don't have an obvious fix
2013-09-16 17:42:07 +00:00
pankdm
3c3fcfc655 Fixed typo in Rising Waters 2013-09-15 18:51:42 +00:00
wagic.the.homebrew@gmail.com
bd25b12fb2 Fix for issue 962 (Hexproof) by Dmitri 2013-09-15 02:57:29 +00:00
wagic.the.homebrew@gmail.com
7b8189bd13 Fixing tests that got broken in r4842 2013-09-15 02:47:09 +00:00
omegablast2002@yahoo.com
a2d020b2ae updated 2013-07-07 18:56:20 +00:00
omegablast2002@yahoo.com
20eda1560b psp fix 2013-06-19 21:57:08 +00:00
omegablast2002@yahoo.com
7917a70b1b forgot to reset the opponents miracle on beforebegins. i knew i had coded the miracle to be player independent :P 2013-06-19 13:33:24 +00:00
omegablast2002@yahoo.com
2fa3f468b4 added menutext overriding to transforms.
castcard-> is now the copied spell x.
2013-06-19 11:46:09 +00:00
omegablast2002@yahoo.com
1851f3c7a6 added Blitzkrieg gamemode created by tacoghandi. for those that like playing at top speed :) 2013-06-19 02:03:34 +00:00
anthonycalosa@gmail.com
45711bb504 Added 204 New Cards as of R4840 changes:
Aeon Chronicler
AEther Barrier
All Hallow's Eve
Azorius AEthermage
Banishing Stroke
Basilica Guards
Basilica Screecher
Batwing Brume
Benalish Commander
Blessings of Nature
Blind Obedience
Bog-Strider Ash
Callow Jushi
Jaraku the Interloper
Carrion Thrash
Chain of Acid
Chain of Smog
Chalice of the Void
Chandra Ablaze
Cloven Casting
Controvert
Convolute
Cradle of Vitality
Crypt Ghast
Crystal Shard
Cursecatcher
Customs Depot
Cut the Tethers
Darigaaz, the Igniter
Dawnglow Infusion
Daze
Death Charmer
Decaying Soil
Decree of Silence
Detritivore
Devastation Tide
Diluvian Primordial
Disrupt
Disruptive Pitmage
Disruptive Student
Dovescape
Drainpipe Vermin
Drowner Initiate
Dual Casting
Echo Mage
Elephant Grass
Embersmith
Equilibrium
Erayo, Soratami Ascendant
Erayo's Essence
Erratic Portal
Firespout
Flay
Flight Spellbomb
Force Spike
Force Void
Fork
Freyalise's Charm
Furnace Celebration
Ghost-Lit Warder
Ghostly Prison
Goblin Vandal
Grim Harvest
Grizzled Wolverine
Hasran Ogress
Hematite Talisman
Hesitation
Horizon Spellbomb
Icefall
In the Eye of Chaos
Inheritance
Insidious Bookworms
Intimidator Initiate
Invert the Skies
Isolation Cell
Izzet Guildmage
Jeweled Torque
Judge's Familiar
Kalastria Highborn
Kazuul, Tyrant of the Cliffs
Kingpin's Pet
Knight of Obligation
Knowledge Exploitation
Krovikan Rot
Lapis Lazuli Talisman
Leshrac's Sigil
Leyline of Lightning
Lifesmith
Lightning Axe
Lightning Cloud
Lightning Rift
Lunar Mystic
Maelstrom Archangel
Magnetic Mountain
Malachite Talisman
Mana Leak
Mana Tithe
Masked Admirers
Megatherium
Memory Plunder
Merfolk Seer
Militia's Pride
Mind's Eye
Mindclaw Shaman
Mindleech Mass
Mindstatic
Minion Reflector
Mirari
Mirrorworks
Miscalculation
Mischievous Quanar
Moonhold
Mudslide
Myrsmith
Mystic Remora
Nacre Talisman
Nether Traitor
Nether Void
Nivix Guildmage
Nihil Spellbomb
Nurturer Initiate
Off Balance
Offering to Asha
Onyx Talisman
Origin Spellbomb
Panic Spellbomb
Patron Wizard
Pedantic Learning
Phyrexian Tyranny
Plague Fiend
Pontiff of Blight
Propaganda
Punishing Fire
Purraj of Urborg
Pyrewild Shaman
Reborn Hero
Reforge the Soul
Reiterate
Resize
Revenge of the Hunted
Reverberate
Rhystic Deluge
Rhystic Shield
Rhystic Study
Riftmarked Knight
Riku of Two Reflections
Rishadan Brigand
Rishadan Cutpurse
Rishadan Footpad
Rootwater Thief
Runeboggle
Sage's Dousing
Searing Meditation
Second Guess
Seer's Sundial
Sigil of the New Dawn
Sigil Tracer
Silent-Blade Oni
Sludge Strider
Smolder Initiate
Soratami Savant
Soul Charmer
Soul Net
Spawnsire of Ulamog
Spell Contortion
Spell Pierce
Spell Snip
Spelltithe Enforcer
Sphinx of Lost Truths
Spiketail Drake
Spiketail Drakeling
Spiketail Hatchling
Spirit Cairn
Sudden Spoiling
Sunforger
Sunken Field
Sun's Bounty
Surgespanner
Syndic of Tithes
Syndicate Enforcer
Tablet of Epityr
Tears of Rage
Telekinetic Bonds
Temporal Mastery
Terminus
Thelon's Curse
Thrull Wizard
Thunderblade Charge
Thunderous Wrath
Torrent of Souls
Toshiro Umezawa
Treasury Thrull
Twincast
Undergrowth
Unnerving Assault
Urza's Chalice
Uyo, Silent Prophet
Vanishment
Vectis Dominator
Veiling Oddity
Vigorous Charge
Vodalian Mage
Voidmage Apprentice
Windborn Muse
Wizard Replica
Wrexial, the Risen Deep

96 Revised/Fixed Cards as of R4840 changes:
Apothecary Initiate
Artisan of Kozilek
Auspicious Ancestor
Azorius Herald
Blood Crypt
Boros Fury-Shield
Breeding Pool
Chaotic Backlash
Choking Tethers
Countersquall
Crackleburr
Crosis, the Purger
Crypt Champion
Crystal Rod
Death Pulse
Deathforge Shaman
Dirge of Dread
Disciple of the Vault
Divine Congregation
Dromar, the Banisher
Dryad's Caress
Esper Sojourners
Eye of Ugin
Flash Conscription
Frenzied Goblin
Gempalm Incinerator
Gempalm Polluter
Godless Shrine
Grixis Sojourners
Gruul Scrapper
Haazda Snare Squad
Hallowed Fountain
Hellkite Charger
Honden of Night's Reach
Iron Star
Ivory Cup
Jovial Evil
Jugan, the Rising Star
Jund Sojourners
Knight of the Mists
Krosan Tusker
Legion's Initiative
Llanowar Sentinel
Lorthos, the Tidemaker
Mind Knives
Mindstab
Naya Sojourners
Nemesis Trap
Numot, the Devastator
Obzedat, Ghost Council
Offalsnout
Ogre Savant
Order of the Golden Cricket
Oros, the Avenger
Overgrown Tomb
Patagia Viper
Plaxmanta
Price of Progress
Primal Boost
Psionic Sliver
Renewed Faith
Ribbons of Night
Rith, the Awakener
Rolling Spoil
Rubblebelt Maaka
Rupture Spire
Samurai of the Pale Curtain
Seance
Seed Spark
Shrieking Grotesque
Slice and Dice
Solar Blast
Splinter Twin
Steam Vents
Steamcore Weird
Stomping Ground
Stone Catapult
Sunfire Balm
Temple Garden
Tendrils of Agony
Teneb, the Harvester
The Fallen
The Hive
Throne of Bone
Tin Street Hooligan
Trade Caravan
Transguild Promenade
Treva, the Renewer
Viashino Firstblade
Vigor Mortis
Vorosh, the Hunter
Watery Grave
Wellspring
Wing Shards
Wing Storm
Wooden Sphere
2013-06-18 02:17:52 +00:00
omegablast2002@yahoo.com
f1d88611cb updated test to adjust for new legendary rules 2013-06-18 01:42:49 +00:00
omegablast2002@yahoo.com
b61cd2f69a megapatch contents
added
"whenever a creature enters the battlefield you may pay {1}, if you do gain one life"
conditional may pay({cost}) effect 
this version is a super type ability, and can only be used in certain combos.

to nest you will need to use it in its subtype pay[[{cost}]] effect
pay keyword can have sideeffects coded as follows
pay[[{1}]] life:1?life:-1
pay one mana and gain 1 life, if you dont then you lose one life. notice no space between the abilities and the question mark.

added castcard()
a method to cast a targeted card, this contains the following subkeywords which can be used in combinations
(normal)
(restricted)
(copied)
(noevent)
castcard(restricted copied noevent) for example will cast a card that is a copy or the spell without sending a cast event only when the spell is castable.
"normal" subkeyword cast the actual spell, not a copy.

extended the use of exiledeath to everyzone, any card going from any zone to graveyard is placed in exile if it has exiledeath.

limited swipe left to open hand only when hand is closed view.

"moveto(" can now be named.
2013-06-18 01:41:34 +00:00
anthonycalosa@gmail.com
ece78395f4 Update SOK for Erayo, Soratami Ascendant 2013-06-13 13:37:25 +00:00
anthonycalosa@gmail.com
95bbe06c7e added swipe on Story Mode. So if playing a duel on story mode, you can cancel with swipe down. 2013-06-13 04:34:20 +00:00
anthonycalosa@gmail.com
b3f81e95bb Update WWK for Kazuul, Tyrant of the Cliffs 2013-06-13 04:28:14 +00:00
anthonycalosa@gmail.com
3c63b152a6 Update PLC for Riftmarked Knight token 2013-06-11 06:42:55 +00:00
Xawotihs@gmail.com
26ab65860e Fixed a gazillion of warnings occuring when compiling Wagic with Clang with Werror. 2013-06-09 21:16:39 +00:00
rolzad73@gmail.com
7990540096 fixed music resource adding from resource zip to nested folder on Android platorm. Fixed issue 776 2013-06-03 02:15:12 +00:00
punkeduard@gmail.com
1442b73029 Fixed some cards from DGM and Crackleburr 2013-06-03 01:17:56 +00:00
anthonycalosa@gmail.com
fee9ee756c typo fix Obzedat's Aid 2013-06-02 13:24:30 +00:00
rolzad73@gmail.com
a400cabfc7 - code foramtting only mostly of whitespace for readability of a few Android files 2013-06-01 16:02:10 +00:00
anthonycalosa@gmail.com
8a7d5f4490 added Auriok Replica, Austere Command 2013-05-22 02:14:11 +00:00
anthonycalosa@gmail.com
b0a1e670ba fix Overload. 2013-05-20 16:54:14 +00:00
anthonycalosa@gmail.com
b5906a4299 revised Martyr of Sands 2013-05-20 14:01:46 +00:00
anthonycalosa@gmail.com
b7324280aa added Prowl cards.
Auntie's Snitch
Earwig Squad
Latchkey Faerie
Morsel Theft
Notorius Throng
Stinkdrinker Bandit


Revised cards:

Denying Wind
Extract
Jester's Cap
Sadistic Sacrament
Supreme Inquisitor
2013-05-20 07:19:18 +00:00
anthonycalosa@gmail.com
f0de00086b added Prowl support.
example usage:
other={1}{B} name(Prowl)
otherrestriction=prowl
2013-05-20 02:59:18 +00:00
omegablast2002@yahoo.com
a055044281 added miracle ability.
i choose to use other cost instead of creating a brand new cost type.

otherrestriction determines if the card is the miracle for the turn.

[card]
name=Devastation Tide
auto=all(*[-land]) moveto(ownerhand)
other={1}{u} name(Miracle)
otherrestriction=miracle
text=Return all nonland permanents to their owners' hands. -- Miracle {1}{U} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.)
mana={3}{U}{U}
type=Sorcery
[/card]
2013-05-19 01:48:51 +00:00
anthonycalosa@gmail.com
4b167c3776 added Abyssal Gatekeeper, Akki Blizzard-Herder, Archmage Ascension, Runeflare Trap 2013-05-18 16:30:14 +00:00
anthonycalosa@gmail.com
cf74c3480e added drawCounter. Returns the number of cards drawn this turn (excludes pre-game draw).
pdrewcount - player draw count
odrewcount - opponent draw count
2013-05-18 15:31:12 +00:00
anthonycalosa@gmail.com
ba5debad05 added AEther Burst. revised code for An-Havva Inn, Kindle, Mind Burst, Vitalizing Cascade, Wall of Tombstones 2013-05-17 03:30:40 +00:00
anthonycalosa@gmail.com
4f915b38c8 added basic support for "X plus one", "X plus two" & "X plus three".
example:

[card]
name=AEther Burst
target=<plusonetype:AEther Burst:graveyard>creature|battlefield
auto=moveto(ownerhand)
text=Return up to X target creatures to their owners' hands, where X is one plus the number of cards named AEther Burst in all graveyards as you cast AEther Burst.
mana={1}{U}
type=Instant
[/card] 

[card]
name=Vitalizing Cascade
auto=life:Xplusthree
text=You gain X plus 3 life.
mana={X}{G}{W}
type=Instant
[/card]
2013-05-17 02:09:48 +00:00
anthonycalosa@gmail.com
c286aa02a6 added Vibrating Sphere, Vish Kal, Blood Arbiter, Vodalian Mystic, Wurmskin Forger 2013-05-17 00:48:11 +00:00
anthonycalosa@gmail.com
3171c62089 added Tsabo's Decree, Tunnel Ignus, Urza's Guilt 2013-05-16 00:39:12 +00:00
anthonycalosa@gmail.com
819ddd0496 added Thran Foundry, Treacherous Vampire, Tremble, Truce 2013-05-15 02:30:14 +00:00
anthonycalosa@gmail.com
c15d0ec523 added Thought Lash, Thoughtcutter Agent, Thoughts of Ruin 2013-05-15 02:01:29 +00:00
anthonycalosa@gmail.com
5da2033d74 added Tectonic Break, Temporary Truce, Tephraderm, Terraformer 2013-05-15 01:29:20 +00:00
anthonycalosa@gmail.com
f449ec5fdd added Sway of Illusion, Swirling Spriggan 2013-05-14 13:30:40 +00:00
anthonycalosa@gmail.com
ee310b7bb3 added Student of Elements // Tobita, Master of Winds 2013-05-14 04:26:48 +00:00
anthonycalosa@gmail.com
b50eaf83a1 added Stonecloaker, Stonehewer Giant 2013-05-14 03:52:37 +00:00
anthonycalosa@gmail.com
79fca90db9 added Sigil of Distinction, Spectral Searchlight, Spell Burst 2013-05-14 03:31:17 +00:00
anthonycalosa@gmail.com
d8b77bf796 Added Sickening Shoal.
Updated codes for Nourishing Shoal and Blazing Shoal.
2013-05-14 02:33:36 +00:00
anthonycalosa@gmail.com
fa07242370 added GTC unsupported cards 2013-05-14 01:30:48 +00:00
anthonycalosa@gmail.com
6626b52e3a added DGM unsupported cards 2013-05-14 00:46:21 +00:00
anthonycalosa@gmail.com
86d748bc43 minor corrections 2013-05-14 00:45:05 +00:00
rolzad73@gmail.com
4f8d5b3300 globalized version number for Android project. 2013-05-13 02:18:27 +00:00
rolzad73@gmail.com
0908c76434 -Added Android release keystore (both passwords are 'password')
- updated ant.properties to reference new release keystore
2013-05-12 19:47:12 +00:00
anthonycalosa@gmail.com
1edd1546a2 Martyr of sands removed from unsupported.txt 2013-05-12 00:40:34 +00:00
anthonycalosa@gmail.com
c2abc6e4a8 added Debt to the Deathless 2013-05-12 00:14:20 +00:00
anthonycalosa@gmail.com
7905ed1533 updated code for False Cure and Transcendence. added Martyr of Sands to borderline. 2013-05-12 00:03:11 +00:00
omegablast2002@yahoo.com
f6f75ca660 psp comp fix, I was not able to test it though as i am not set up to comp psp builds anymore. 2013-05-11 00:48:21 +00:00
omegablast2002@yahoo.com
9f6a728150 i run the set names through translation now when filtering by sets.
what this means is that if a player so choose, they can list the sets 3 letter code in the en.txt as follows
BOK=betrayers of kamikawa
it will now list the names either as the 3 letter code if thier is no entry, or as whatever you call it in the lang->en.txt file.
2013-05-09 01:53:01 +00:00
omegablast2002@yahoo.com
54021a7f75 removed the remaining trademarked names. for future reference: we are not allowed to add the set names directly to card.dats. WOTC trademarks the names of sets months before they are released. 2013-05-09 00:49:56 +00:00
omegablast2002@yahoo.com
9f89353b4b reverted the adding of trademarked names to card.dat, as sad as it is we have to follow the laws. 2013-05-09 00:39:51 +00:00
wagic.the.homebrew@gmail.com
9fa9e1eb81 undo my changes with libhgetools.a, it seems something's wrong on my end, as my computer interprets u32 as unsigned long instead of unsigned int 2013-05-08 12:37:16 +00:00
omegablast2002@yahoo.com
e54d212418 thanks MarSprite for adding the missing set names to the card.dats missing them. 2013-05-08 01:57:06 +00:00
anthonycalosa@gmail.com
07fdf735f5 added "twice" and "thrice" variables.
example usage:

auto=life:thriceX
auto=@damaged(player):life:twicethatmuch
auto=life:twicetype:creature:mybattlefield

so to code cards like Debt to the Deathless

[card]
name=Debt to the Deathless
auto=@lifeloss(opponent):life:thatmuch controller
auto=life:-twiceX opponent
text=Each opponent loses two times X life. You gain life equal to the life lost this way.
mana={X}{W}{W}{B}{B}
type=Sorcery
[/card]
2013-05-07 07:27:45 +00:00
omegablast2002@yahoo.com
a7e9fe6699 spanish translation stuff, thanks atriel 2013-05-06 23:21:29 +00:00
punkeduard@gmail.com
f3df94b319 Fixed some dragons maze cards 2013-05-06 17:26:54 +00:00
wagic.the.homebrew@gmail.com
aa51083b2b update hge compiled lib 2013-05-06 06:01:19 +00:00
wagic.the.homebrew@gmail.com
0c8f1e1573 Increase version number to 0.19.0. I did it manually, not sure how to run the build scripts :/ 2013-05-06 05:10:19 +00:00
anthonycalosa@gmail.com
386fc08e3a Added Reap Intellect :) 2013-05-05 23:25:12 +00:00
wagic.the.homebrew@gmail.com
a40c677f1e Adding test for i953 2013-05-05 13:52:42 +00:00
wagic.the.homebrew@gmail.com
38a203aac8 Reverted the "more than 50 elements in the stack" fix for Exquisite Blood + Sanguine Bond, as this created more issues than it fixed. I'll open a ticket for the Exquisite blood bug 2013-05-05 13:49:51 +00:00
wagic.the.homebrew@gmail.com
2349908f66 Refactored the "fast test", "slow test" bits of the test suite to make the intent clear, and prevent the first test slowness from being broken again. I've kept the fast_test value to 6 (it was originally 3) as Zethfox mentioned weird race conditions when it is set to 6. 2013-05-05 11:56:35 +00:00
omegablast2002@yahoo.com
30d3b52a9e Izzet Staticaster added 2013-05-04 17:58:55 +00:00
omegablast2002@yahoo.com
107874d88e restricted the creation of clones from progenator mimic to check if the clone is a token before making more. 2013-05-04 17:41:10 +00:00
omegablast2002@yahoo.com
f0a6770948 added progenitor mimic and morgue burst 2013-05-04 08:55:00 +00:00
omegablast2002@yahoo.com
14c605f2a6 garruk and rakdos returns fixed 2013-05-03 03:36:07 +00:00
omegablast2002@yahoo.com
8dcd261258 couple card fixes, moved dryad arbor to the end of primitives because it was associating creature and forest in the subtypes and super types list. 2013-05-03 03:33:59 +00:00
omegablast2002@yahoo.com
537f994ae4 added spike jester 2013-05-02 22:12:20 +00:00
omegablast2002@yahoo.com
6403f75769 bad line fixes 2013-05-02 02:33:12 +00:00
omegablast2002@yahoo.com
e076e64d97 changes to fix a bug, previous entries of the same name already exist causing the first oocurence to be used. 2013-05-02 01:57:29 +00:00
omegablast2002@yahoo.com
8deb0537a8 corrected names 2013-05-01 22:54:12 +00:00
omegablast2002@yahoo.com
83ef3aa08c fixed a crash with flip cards. how does the test for this pass? 2013-05-01 00:02:42 +00:00
omegablast2002@yahoo.com
305bdb386b t2 Selesnya deck 2013-04-30 06:27:18 +00:00
omegablast2002@yahoo.com
ad855ce8d1 token fixes for dgm 2013-04-29 02:25:47 +00:00
omegablast2002@yahoo.com
150c28ae72 token fixes for dgm 2013-04-29 02:25:28 +00:00
punkeduard@gmail.com
2a25db403d Fixes to dragon's maze cards 2013-04-28 17:26:10 +00:00
omegablast2002@yahoo.com
80501edc2a format fix 2013-04-28 12:55:49 +00:00
omegablast2002@yahoo.com
d7c1868de3 added corrected and checked the cards for dragon maze, thanks kf1! 2013-04-28 01:03:24 +00:00
omegablast2002@yahoo.com
7b11ede1d5 added dragon maze dat 2013-04-28 01:02:03 +00:00
omegablast2002@yahoo.com
e8ee356892 fix for issue 913. 2013-04-24 13:29:54 +00:00
omegablast2002@yahoo.com
dd68023249 new deck 2013-04-23 23:20:16 +00:00
omegablast2002@yahoo.com
96adbabea8 fixed a crash that could be reproduced demo->classic->best of 3->endless demo 2013-04-21 02:20:22 +00:00
omegablast2002@yahoo.com
89ae87cc3d opps, just a fix 2013-04-11 10:39:16 +00:00
omegablast2002@yahoo.com
8c80efbe2a replaced simon again with a medium thickness version of the same thing. 2013-04-10 22:50:03 +00:00
omegablast2002@yahoo.com
9ffe7349e2 added a hint that allows you to override how ai views a cards effects.
#HINT:good(icy prison)
ai will act as though the effects of this card are now good, choosing to cast it on it's own creatures.

#HINT:bad(ancestral recall)
ai will now use this card targeting the opponent. 
good in cases where you are trying to mill the opponent

the effects in wagic have gotten so complex that ai simply has no idea what some cards should target. this helps in most of the cases.
2013-04-10 02:38:52 +00:00
omegablast2002@yahoo.com
f9410f695a added excessum to the deck builder credits. 2013-04-08 02:20:00 +00:00
omegablast2002@yahoo.com
7c8d3cedbd added 2 more decks from our deck builder excessum 2013-04-08 02:13:46 +00:00
omegablast2002@yahoo.com
49b6b028c5 fixed a bug with alwaysattack hint, if there was an attack readied it would undo it by clicking it the second time. 2013-04-07 17:30:48 +00:00
omegablast2002@yahoo.com
1bea0736a5 replaced backdrops pieces, task board, deck menu and deck editor with graphics from kevlahnota's mtg theme. to get the mtg look you will still have to download his theme, however these pieces i felt were so polished that they made the original wagic default theme look slapped together. 2013-04-07 14:41:44 +00:00
omegablast2002@yahoo.com
1c61ebddae added a shuffle to optimizedhand to avoid drawing the same hand over and over when its optimized.
adjusted normal difficulty to include 2 lands, 2 spells under 3 mana.

adjusted hard difficulty to always include 2 lands, the rest are randomly drawn. this prevents ai from being mana screwed on opening hand.
2013-04-07 01:07:00 +00:00
omegablast2002@yahoo.com
6727c1af52 added HINT:alwaysattackwith(targetchooser) and HINT:alwaysblockwith(targetchooser) 2013-04-07 00:56:44 +00:00
omegablast2002@yahoo.com
ce656adeba new simon font. they are a little fatter then i would personally like but they look great on full screen. thanks Atriel for the new simon! 2013-04-07 00:33:27 +00:00
omegablast2002@yahoo.com
2a7bcb2170 ifdef on simon font to up the res of simon.
you will need to rename your old simon font to pspsimon
only english is effected.
2013-04-07 00:32:11 +00:00
anthonycalosa@gmail.com
5789d0cae4 added Shred Memory, Shyft, Simplify 2013-04-05 11:41:35 +00:00
omegablast2002@yahoo.com
80e36c2b92 readjusted the carddisplays for libarary and graveyard for both players to move them off the top of the avatars. you can now click thier respective button to close them when in a targetchooser action.
also readded a piece of code i commented out, it does nothing but the compiler saids it expected something there.
2013-03-30 17:09:50 +00:00
omegablast2002@yahoo.com
c9360eb005 added the first 18 decks by our very talented deck builder excessum! i've had a chance to play against these before they got the combohint vamp up, i imagine now they're almost unstoppable. enjoy! make sure to thank excessum on the forum if you enjoy them as much as i have. 2013-03-29 20:23:32 +00:00
omegablast2002@yahoo.com
734b142879 the fix originally only targeted too many triggers unresolved on the stack, moving the other 2 out of the check as it actually causes new bugs to include them in the skip. 2013-03-28 00:05:39 +00:00
omegablast2002@yahoo.com
bfb88f1bb5 increased the res of f3 font to 1024 x 1024. renamed old to pspf3 these will be the new f3 fonts using much higher res on everything but psp. 2013-03-27 23:31:38 +00:00
omegablast2002@yahoo.com
802c970ec3 #ifdef psp for the increase res font f3 which is by far the worst looking font on higher res devices. 2013-03-27 23:29:18 +00:00
omegablast2002@yahoo.com
b38d6c6bc5 applying the patch for torny mode not awarding credits at end of torny. 2013-03-27 22:58:51 +00:00
Xawotihs@gmail.com
701ca64e8a Display IP address of game host before connection is established and handles disconnection of peer. 2013-03-26 22:32:29 +00:00
omegablast2002@yahoo.com
810c3967d6 after much testing and corrections, our user Holgern from the forums has completely recreated and reworked the gauntlet mode originally coded for ai vs ai into a completely new way to play wagic, you can choose the number of matchs, various modes, and other wonderful additions. Don't take my word for it, try all the fun new stuff out yourself!
THANK YOU Holgern!
2013-03-26 02:10:45 +00:00
omegablast2002@yahoo.com
c994886ca8 polished the actionstack rendering a little. draw only as much black square as we need to render so we dont make a massive black square for nothing. 2013-03-23 20:53:33 +00:00
Xawotihs@gmail.com
2c0e0c7251 Removed the link between the font textures resolution and the size of the characters displayed. That allows to use very high resolution fonts similarly to card pictures... 2013-03-23 17:21:17 +00:00
omegablast2002@yahoo.com
b6a4197d88 fix for a bug i introduced. 2013-03-23 06:21:01 +00:00
omegablast2002@yahoo.com
e2f4dd7095 if its a land you should consider playing it. 2013-03-22 01:35:45 +00:00
omegablast2002@yahoo.com
0578ebde80 minor fixes for combo system. 2013-03-22 00:53:42 +00:00
omegablast2002@yahoo.com
9b44d627a3 changed ai eff return on token creation. over 50 tokens on my battlefield return 0.
changed an inefficient check on phaseskip.
2013-03-21 01:28:56 +00:00
omegablast2002@yahoo.com
8b626b378f that was not supposed to be in that last commit. someone please teach me to revert just a file without having to do a rain dance. 2013-03-16 21:50:21 +00:00
omegablast2002@yahoo.com
b436550150 ai simple combo system is finally fully working.
added ai hint dontblockwith(targetchooser)
2013-03-16 21:35:10 +00:00
anthonycalosa@gmail.com
c2132ab97f morthan typo 2013-03-15 23:51:04 +00:00
omegablast2002@yahoo.com
22640130dc fixes from the bugs section on the forum 2013-03-15 22:52:02 +00:00
omegablast2002@yahoo.com
90a0f5c86f as per mtg rules, the effects of unpaid upkeep cost should only happen if the from id was upkeep. ie:skipped phases. 2013-03-15 21:49:35 +00:00
omegablast2002@yahoo.com
3cb0a6c091 psp compilation fix 2013-03-15 21:42:24 +00:00
anthonycalosa@gmail.com
1818a8be82 corrected some typos 2013-03-15 15:13:02 +00:00
omegablast2002@yahoo.com
9c0ce5f7bf more changes to fix the combo system. 2013-03-15 02:08:03 +00:00
omegablast2002@yahoo.com
31ee6d2b90 trying to figure out why ai is cast cards that belong to a combo outside of a combo even though it is told to skip these cards. 2013-03-15 01:44:31 +00:00
omegablast2002@yahoo.com
d4ff6d1453 spanish translation stuff 2013-03-14 22:22:18 +00:00
omegablast2002@yahoo.com
a7aeb7efe5 fix for a bug in combohint. ai will now rarely want to use a card outside of a combo if it is to be held for a combo 2013-03-13 01:11:58 +00:00
omegablast2002@yahoo.com
cd54ad7012 correction 2013-03-07 03:35:35 +00:00
omegablast2002@yahoo.com
04dce1ad50 ai vs ai matchs will play with optimizedhands. 2013-03-01 23:10:16 +00:00
omegablast2002@yahoo.com
ef18f376b1 ifdef(psp) on cache hit miss handling. 2013-02-26 23:22:49 +00:00
anthonycalosa@gmail.com
f9bd6e1c44 Added:
Scuttlemutt
Shieldmage Elder
Shields of Velis Vel
Show and Tell

Borderline:
Scapeshift

Fix:
Talara's Battalion - changed restrictions= to restriction=
2013-02-22 13:22:00 +00:00
anthonycalosa@gmail.com
e8f8aae43f fix kjeldoran home guard and bloodlord of vaasgoth 2013-02-22 07:41:06 +00:00
omegablast2002@yahoo.com
b4d4515e01 set init baka timer fastmode to a safer float. 2013-02-21 22:59:59 +00:00
omegablast2002@yahoo.com
9a52ae28a2 several changes here,
first, i added a timer to hide the big card after 5 secs or until a movement is registered. 

2nd, removed the advancing of phases with flick up.

3rd added a flick left to "show/hide hand"

4th, fixed an error in the logic of "getDifficulty" part of the reason optimizedhand was not working.

finally, unrefactored the checks of optimized hand, it was FAR to difficult to see what was actually happening the way it was coded.

optimizedhand is finally working again, 
toggledifficulty and optimizedhand will again trigger and greatly improve ai vs player matches
2013-02-21 00:48:39 +00:00
anthonycalosa@gmail.com
2330e6a613 fix all similar cards like Duress to have a "look" ability. 2013-02-20 09:04:09 +00:00
anthonycalosa@gmail.com
620c5595d9 Fix various typos reported on the forum. 2013-02-20 04:05:16 +00:00
omegablast2002@yahoo.com
a5ea3275cd i introduced a bug a couple revs back. dyslexia got me. 2013-02-16 21:07:13 +00:00
anthonycalosa@gmail.com
bf677b7bdd Added:
Jilt
Jugan, the Rising Star
Laquatus's Creativity
Mogg Infestation
Prahv, Spires of Order
Quest for the Holy Relic
Razing Snidd

Fix:
Gerrard Capashen - first ability is targeted
Spiraling Embers - removed "(" and ")" and revised
Sword of War and Peace - revised
Venser's Journal - revised
Vicious Shadows - ability is targeted
2013-02-16 09:46:18 +00:00
anthonycalosa@gmail.com
026600c084 Added:
Careful Consideration
Haunting Hymn
Might of Old Krosa
Return to Dust
Sulfurous Blast

Fix:
Liliana of the Dark Realms - missing add, thanks Tacoghandi
2013-02-16 05:59:50 +00:00
anthonycalosa@gmail.com
a1a16fce57 Added Flux, Freyalise Supplicant, Hag Hedge-Mage, Harsh Mercy 2013-02-15 10:55:41 +00:00
omegablast2002@yahoo.com
defb8e32c6 corrected the mana not removing from pool correctly bug, sorry about that. 2013-02-13 23:33:05 +00:00
omegablast2002@yahoo.com
8aef74e32a pestilence shouldn't care about protections of any kind. 2013-02-12 23:09:24 +00:00
anthonycalosa@gmail.com
fbc1b14dca Added:
Mark of Sakiko
Sakiko, Mother of Summer
Sakura-Tribe Springcaller
Shizuko, Caller of Autumn
Upwelling
2013-02-12 13:08:17 +00:00
omegablast2002@yahoo.com
e24f269c36 just a format 2013-02-10 14:34:13 +00:00
omegablast2002@yahoo.com
3c15357c38 added poolsave(COLOR) its an ability that works only on permanents in play.
opponentpoolsave(
mypoolsave(
ex:Upwelling


added a tag for mana, doesntempty
add{g}{g}{g} doesntempty
what this does is make THAT mana remain in the pool until end of turn.
ex:
Sakura-Tribe Springcaller
2013-02-09 06:48:16 +00:00
omegablast2002@yahoo.com
2b4c3a51aa removed a condiational that was limiting blink ability. i left the portion commented out just incase i put it there becuase of a bug. but as far as i can see it doesn't seem to cause an issue to remove it. 2013-02-09 02:37:22 +00:00
omegablast2002@yahoo.com
f0405342be commited the spanish translation files that the spanish wagic group have worked so hard at producing a full almost 100% translation of wagic into spanish.
thank you to the translators involved in making it happen.
http://wololo.net/forum/viewtopic.php?f=24&t=16761
for more info and spanish card images.
2013-02-09 02:09:02 +00:00
omegablast2002@yahoo.com
d2f14897a6 fixed a loop that can occur in multitarget where the maxs targets are set with a variable word and ends up resulting in a return of maxtargets = 0 which inturn locks ai in a loop, i imagine layers also. 2013-02-08 00:34:45 +00:00
dan.solomatin@googlemail.com
8b7c0e6b83 Fixed Righteous Indignation. 2013-02-07 23:14:59 +00:00
anthonycalosa@gmail.com
f7116a84b4 Added Slavering Nulls, Slum Reaper, Smallpox, Snakeform 2013-02-07 14:33:52 +00:00
anthonycalosa@gmail.com
dff6302773 Added Skyship Weatherlight 2013-02-07 11:44:52 +00:00
anthonycalosa@gmail.com
b88b217c46 Added Domestication, Duergar Hedge-Mage, Ertai's Trickery 2013-02-07 11:33:07 +00:00
dan.solomatin@googlemail.com
13c10ec856 Added 4 cards based on revision4692.
Duct Crawler
Screeching Griffin
Shrewd Hatchling
Spin Engine

Optimized the code of 11 cards based on the same revision:

Boldwyr Intimidator
Bower Passage
Brassclaw Orcs
Gibbering Hyenas
Goblin Mutant
Hunted Ghoul
Ironclaw Buzzardiers
Ironclaw Orcs
Orcish Veteran
Orgg
Sabertooth Alley Cat
2013-02-07 11:00:15 +00:00
omegablast2002@yahoo.com
54780d3ef0 fixed a typo in cantbeblockerof , forgot a letter :X 2013-02-06 23:52:09 +00:00
dan.solomatin@googlemail.com
cea9f0d8ae Added more info to Decimate to clear out its current overpoweredness. 2013-02-06 18:02:14 +00:00
dan.solomatin@googlemail.com
3daa0eec7d Moved Decimate from unsupported.txt to crappy.txt.
The Wagic version of Decimate would be like 50$, while the real version is currently 2$ max.
2013-02-06 17:50:47 +00:00
dan.solomatin@googlemail.com
101dd163a3 Fixed small typo in Consuming Ferocity's code. 2013-02-06 10:18:01 +00:00
dan.solomatin@googlemail.com
c33ae31895 Moved Decimate from to unsupported.txt.
Decimate should only be castable if there are 4 legal targets for it.
If treated like it is in the current way of coding, the card is more then overpowered and thus shouldn't even be moved to crappy.txt!
2013-02-06 09:11:43 +00:00
omegablast2002@yahoo.com
cbe6028a52 opps, i need to slow down my happy trigger finger before i hit commit. 2013-02-06 02:55:27 +00:00
omegablast2002@yahoo.com
e424c3ab27 fixed a bug with lords not removing altercost correctly when the source is phased.
added 
cantbeblockerof(this)<--this = the card who owns the ability.
cantbeblockerof(targetchooser) <--the target cant block anything targetable by this targetchooser.
spin engine and similar will use cantbeblockerof(this).
others were done with a workaround, which i hope will be updated soon.
2013-02-06 02:45:40 +00:00
anthonycalosa@gmail.com
1d06a74fd9 added:
Death Cloud
Decimate
Destructive Force
Din of the Fireherd
2013-02-05 13:27:56 +00:00
anthonycalosa@gmail.com
81294a0d2b Added:
Azorius Ploy
Barter in Blood
Consuming Ferocity
Corpse Harvester
Corrupted Resolve
Cruel Ultimatum
Cyclopean Tomb

Borderline:
Consume Strength

Fixes:
Contagion Engine - can select targets once but add counters twice
Emblems missing forever tag

Moved Drain Life - we can now limit black using {X:black}
2013-02-05 10:43:03 +00:00
anthonycalosa@gmail.com
ae8893617f Shifting sliver evasion doesn't work with creatures with protection from color 2013-02-05 04:02:26 +00:00
anthonycalosa@gmail.com
38895dfcd3 @each myupkeep -> @each my upkeep
fix recurring nightmare cost, Snow hound cost.
2013-02-04 14:08:05 +00:00
omegablast2002@yahoo.com
90c0b42a07 changed the defaults of the testsuite game constructor to set the default timerlimit to 6
the other threads were running test suite at 0 which was causing race condition fails in test suite, i incremented by 1 until the normally passing test no longer failed, test effected were proliferate and mortician beetle both passing test in normal mode, failing in hyperspeed. test suite takes only 30 secs more to run but we can't sacrifice actual results for speed.

the commented out section is not even taken into account after first test is run.
2013-02-04 05:09:52 +00:00
omegablast2002@yahoo.com
7e16b50fd3 just giving credit 2013-02-04 02:49:52 +00:00
Xawotihs@gmail.com
5a9b7eefc0 Fixed PSP compilation by stubbing the socket implementation. Somebody with a PSP, please replace this code with a real implementation. 2013-02-03 21:41:31 +00:00
Xawotihs@gmail.com
5c25189aef Added code to let user specify the server address.
Updated SimplePad to include dot and fixed problem with digits.
2013-02-03 19:21:43 +00:00
anthonycalosa@gmail.com
452ae08593 Cleanup my mess... 2013-02-03 15:57:48 +00:00
omegablast2002@yahoo.com
b85f2240a7 fix for @sacrificed crash and not triggering to cost. 2013-02-03 15:31:06 +00:00
anthonycalosa@gmail.com
6928df6819 Added Sedris, the Traitor King 2013-02-03 13:45:56 +00:00
anthonycalosa@gmail.com
6fa633f822 tests:
-----------
Mortician_Beetle.txt
Savra_Queen_of_the_Golgari.txt

added:
-----------
Saprazzan Breaker
Savra, Queen of the Golgari

borderline:
-----------
Ogre Marauder

crappy:
-----------
Barbarian Bully
Skullscorch
2013-02-03 11:21:12 +00:00
omegablast2002@yahoo.com
2b9fdc41dc added 2 new restrictions for use in triggers and abilities
ownerscontrol
opponentscontrol

ownerscontrol returns 1 if the owner has the card in thier battlefield. 0 otherwise. vice versa.
this should make it easier to add cards which should be treated differently depending on who controls them.
2013-02-02 18:42:39 +00:00
anthonycalosa@gmail.com
ef4a8c6d84 Moved rune of protection to crappy.
Revised Pursuit of Knowledge
Added Samite Elder
2013-02-02 14:24:07 +00:00
anthonycalosa@gmail.com
44fa0e9015 added:
Reap
Rebel Informer
Repopulate
Rix Maadi Guildmage
Rocket Launcher
Roots of Life
Rotting Giant
Rune of Protection: Artifacts
Rune of Protection: Black
Rune of Protection: Blue
Rune of Protection: Green
Rune of Protection: Lands
Rune of Protection: Red
Rune of Protection: White
Sadistic Augermage

borderline:
Rakdos Augermage
2013-02-02 10:50:16 +00:00
omegablast2002@yahoo.com
a8ebaee527 added a check to avoid skipping a gameState update if there are more than 50 items left to resolve in the stack, let run a gameStates check and see if we havent already won.
Exquisite Blood + Sanguine Bond example of the kinds of loops this fixes.
2013-02-02 05:43:46 +00:00
anthonycalosa@gmail.com
cca8f1ce4e minor cleanup spaces 2013-02-02 03:49:53 +00:00
anthonycalosa@gmail.com
a8c6da03a8 Added - Prismatic Lace, Quickchange
Borderline - Govern the Guildless
Fixed - Prismwake Merrow
2013-02-02 02:23:05 +00:00
omegablast2002@yahoo.com
6a1591d72b reverted the newtarget/retarget fix, it didn't fix the issue and created new ones. 2013-02-01 18:54:07 +00:00
anthonycalosa@gmail.com
fa5e3ad9b4 Softcoded Reminisce
Added Prismatic Lace in Borderline
2013-02-01 14:34:30 +00:00
anthonycalosa@gmail.com
0095dcceb5 Added Predatory Advantage, Priest of Yawgmoth & Pursuit of Knowledge 2013-02-01 14:04:17 +00:00
omegablast2002@yahoo.com
6c86c276d2 missed a file last commit. 2013-02-01 04:35:40 +00:00
omegablast2002@yahoo.com
0bd769d3c0 added engine code to do a putinzone without sending events.
equipping no longer retriggers a copier.
retarget and newtarget no long send the events due to refreshing the cards.
2013-02-01 04:21:08 +00:00
anthonycalosa@gmail.com
94955088c8 Moved Gerrard's Verdict, Lurking Evil to crappy.
Added Rix Maadi, Dungeon Palace
Added Rotting Rats
Added Stronghold Rats
2013-02-01 03:15:39 +00:00
anthonycalosa@gmail.com
7de5cfbd37 Fixed Possessed Portal since you cant discard a card unless you have one permanent to sacrifice, replace 0/0 with donothing
Moved Maralen of the Mornsong to borderline since the effect is not draw replacement but players cant draw anything (there isn't any stated "would draw"), maybe we can have CANTDRAW ability in the future.
2013-02-01 02:20:27 +00:00
anthonycalosa@gmail.com
ea0a3efc38 Added Possessed Portal. 2013-01-31 14:37:29 +00:00
anthonycalosa@gmail.com
6e7c57151c Added Piston Sledge, fixed Grifter's Blade 2013-01-31 13:52:50 +00:00
omegablast2002@yahoo.com
2ef93bc722 readded the rest of the stuff that anthony commited that the svn ate during my commit. 2013-01-31 11:33:30 +00:00
anthonycalosa@gmail.com
21897f2f63 removed workaround, and revised code to simian spirit guide and elvish spirit guide. 2013-01-31 11:09:20 +00:00
anthonycalosa@gmail.com
de16c53534 Re commitied my previous cards in primitives/mtg.txt
I dont know why my previous commit has been removed but its all working. I included tests for the cards in this commit. All test suite passes. please update your FUT/_cards.dat because i change the name of oriss to its original name.

--------------------------------------
[card]
primitive=Oriss, Samite Guardian
id=136210
rarity=R
[/card]
2013-01-31 09:00:25 +00:00
omegablast2002@yahoo.com
a83e029ca6 master transmuter can now be the card returned 2013-01-31 06:55:12 +00:00
omegablast2002@yahoo.com
aadd0c56b2 fixed a couple easy issues 2013-01-31 06:45:50 +00:00
anthonycalosa@gmail.com
29c50becf0 Added Pain Magnification 2013-01-30 15:51:07 +00:00
anthonycalosa@gmail.com
dffecf7ee0 Added Nim Devourer
Added Nourishing Shoal
Added Oak Street Innkeeper
Added Opal Avenger
-----------------
Revised Oriss, Samite Guardian - ability must be targeted
-----------------
fixed Blazing Shoal alternate cost
fixed Contaminated Ground trigger
2013-01-30 14:46:57 +00:00
omegablast2002@yahoo.com
eab782c32f this was accidental, i was just about to toy with a may pay( ability. 2013-01-30 04:22:01 +00:00
omegablast2002@yahoo.com
1b689adf05 forgot a ( in the replacement for donothing 2013-01-30 04:01:57 +00:00
omegablast2002@yahoo.com
c078af5f24 fix for crash from not having a playerTarget when ability$! is used on targetedPlayer by an instant. 2013-01-30 03:51:16 +00:00
anthonycalosa@gmail.com
d07951fbdf Added Nemesis Trap, Nicol Bolas, Planeswalker 2013-01-30 03:25:22 +00:00
omegablast2002@yahoo.com
415e8dbcb2 updated cards using 0/0 as a fake ability into donothing 2013-01-30 02:40:49 +00:00
omegablast2002@yahoo.com
f8800b8bbd added an ability keyword that resolves to do nothing.
"donothing"
this is to avoid using powerandtoughness 0/0 ability to mean "do nothing"

old code
[card]
name=Inquisition
target=player
auto=target(*|targetedpersonshand) 0/0
auto=foreach(*[white]|targetedpersonshand) damage:1 targetedplayer
text=Target player reveals his or her hand. Inquisition deals damage to that player equal to the number of white cards in his or her hand.
mana={2}{B}
type=Sorcery
[/card]

new code
[card]
name=Inquisition
target=player
auto=target(*|targetedpersonshand) donothing
auto=foreach(*[white]|targetedpersonshand) damage:1 targetedplayer
text=Target player reveals his or her hand. Inquisition deals damage to that player equal to the number of white cards in his or her hand.
mana={2}{B}
type=Sorcery
[/card]
2013-01-30 02:38:25 +00:00
omegablast2002@yahoo.com
b7a2c000be corrected typo in lurking evil.
just for future notice this card should be moved to crappy.
whenever an ability has
blah blah:effect
that means, {cost}:effect
if you can not do it with supported cost in engine, do not add it as
{0}:effect && effect
this is a workaround we stopped using a very very long time ago.
the ability of losing life is not treated the same as "paying" life. same as any other cost.

the issue arose several times while i have added support, and due to a workaround, my support would be flawed, at first i would try to munipulate what i coded to allow for the workarounds to continue working. 
that was the past, i long since stopped doing that, if a card is a workaround, and it breaks, i remove it completely.
2013-01-30 00:36:09 +00:00
Xawotihs@gmail.com
12620e5d22 Just tested network game Linux desktop vs Android tablet ... works fine :) 2013-01-29 21:05:24 +00:00
anthonycalosa@gmail.com
0a8c846f9a added:
Mangara's Equity
Maralen of the Mornsong
Mercenary Informer
Mind Swords
Monkey Cage
Myr Battlesphere
Mystic Snake
Necropolis
2013-01-29 15:35:16 +00:00
omegablast2002@yahoo.com
c7e1dfb72f added rules to hermit 2013-01-29 00:57:38 +00:00
Xawotihs@gmail.com
47cfc5bdeb Reverted TestSuiteAI.cpp from previous commit 2013-01-28 22:40:56 +00:00
Xawotihs@gmail.com
73131c8064 Removed unused variables 2013-01-28 22:37:01 +00:00
Xawotihs@gmail.com
48d45f2a65 Added missing .h and fixed the boost sleep, it works fine on linux now. 2013-01-28 22:26:13 +00:00
Xawotihs@gmail.com
faff7724d6 Added a function to get the current IP address 2013-01-28 22:03:26 +00:00
anthonycalosa@gmail.com
f1fa655306 added cards:
------------
Lore Broker
Lorthos, the Tidemaker
Luminarch Ascension
Lurking Evil
Magus of the Jar
Makeshift Mannequin
Malfegor
Manaforge Cinder
Memory Jar

fixed:
------------
Geist of Saint Traft token, it says @combat ends exile the token.
2013-01-28 12:56:32 +00:00
anthonycalosa@gmail.com
313598fab0 fixed sublime archangel 2013-01-28 06:58:53 +00:00
anthonycalosa@gmail.com
da186a6225 revised living death and living end 2013-01-28 06:06:13 +00:00
omegablast2002@yahoo.com
3ac3836538 added the stack to countValidTargets() 2013-01-28 05:04:34 +00:00
omegablast2002@yahoo.com
2b9cae8950 added functionality to may and choice ability so that it can check a "restriction{}" like a activated ability with cost, that can keep a menu option from appearing if the restriction is not met
auto=choice damage:1 target(creature) restriction{type(creature[blue])~morethan~1}

this choice menu will only appear is there is more than one blue creature inplay
2013-01-28 03:49:24 +00:00
anthonycalosa@gmail.com
a32a58f621 Added Cards:
------------
Laquatus's Champion
Lich's Tomb
Liege of the Tangle
Living Death
Living End,
Locust Miser
Lodestone Bauble

Fixes: Flakenrath Aristocrat, Sublime Archangel
2013-01-28 01:39:30 +00:00
omegablast2002@yahoo.com
eaf4d94a2e this part didnt commit in last rev, it fixes the mana display.
the progress is removed on this though, so you might not notice it until next release when you do a fresh install.
any new decks for both player or ai will show the mana symbols after a match is completed.
2013-01-27 19:35:52 +00:00
omegablast2002@yahoo.com
dac14020a2 fixed stats resetting and decks being marked as new.
this should also allow for the ai difficulty tools to work correctly again. mana symbols displayed again, mini info, and everything related to the stats.
2013-01-27 18:52:12 +00:00
wagic.the.homebrew@gmail.com
5fa1cc915b A "fix" for Android compilation. Feel free to replace if something better is available 2013-01-27 09:36:43 +00:00
omegablast2002@yahoo.com
2fcd031a7d corrected a crash from NULL pointer cause by ability$! not having the "lastcontroller" set. 2013-01-27 04:25:09 +00:00
omegablast2002@yahoo.com
822c3bc9c8 2013-01-27 02:56:23 +00:00
omegablast2002@yahoo.com
b7c13825c5 2013-01-27 02:55:35 +00:00
omegablast2002@yahoo.com
534d87e3bd fixed evolve hoepfully for the final time. 2013-01-27 02:54:03 +00:00
anthonycalosa@gmail.com
c1c6296c9c modified _tests.txt 2013-01-27 02:29:53 +00:00
anthonycalosa@gmail.com
79d9ad865e moved the evolve test outside the main test suite 2013-01-27 02:13:35 +00:00
wagic.the.homebrew@gmail.com
d8da70361a - Fix an android warning (false instead of null in GuiCombat)
- removed unnecessary "if" in some parts of MTGRules.cpp
2013-01-27 02:09:10 +00:00
anthonycalosa@gmail.com
f6e95af995 Added generic test for Evolve mechanic. I intentionally reverese the order of creature so that the evolve come in play with no counters before hand, then attack with utvara hellkite to see if it will trigger evolve. 2013-01-27 01:24:44 +00:00
anthonycalosa@gmail.com
892c7d34c0 fixed Firemane Avenger, added Knollspine Dragon 2013-01-27 00:13:10 +00:00
Xawotihs@gmail.com
975445d3d5 #ifdef out on Windows a fix for Linux 2013-01-26 22:35:57 +00:00
Xawotihs@gmail.com
eec9bb44a8 Fixed warnings from linux and Android compilers
Cleaned up network code on Linux, it still does not work correctly
2013-01-26 22:17:43 +00:00
omegablast2002@yahoo.com
5b0f5bd90f fixed compilation for psp, ambiguous else warning. 2013-01-26 18:50:28 +00:00
omegablast2002@yahoo.com
3443c8d075 corrected a goof up i made in evolve, i should have been comparing the events card controller to source controller to determine "under your control" 2013-01-26 16:52:34 +00:00
Xawotihs@gmail.com
f45c8e1d41 Just won my first Wagic network game :)
In details:
- I removed my player swap idea, it caused tons of issues with randoms
- instead I simply keep both peer on the exact same game and added one single parameter allowing to configure the view on the game. So, each peer is rendering the same game (gameObserver class) from a different player point of view (DuelLayers and related classes).
- a lot of gui stuff are missing to prevent user forbidden interactions but it works fine on Windows
2013-01-26 16:42:16 +00:00
omegablast2002@yahoo.com
db0f401ba5 moved the triggering of forced lure block to eventblockerschoosen. this corrects issues where lure wasnt applying the abilities like flanking correctly on cards which were forced to block. 2013-01-26 16:23:22 +00:00
anthonycalosa@gmail.com
f59b8db91f Added test for Alluring Scent -> card that grants lure ability. the following are to test if forcing a block from lure, trigger events of a block. I don't know if the problem is lure or the flanking ability. the correct result is every creature must survive. flanking makes the walls power to 0. 2013-01-26 13:12:16 +00:00
anthonycalosa@gmail.com
ed77b40a29 added cards
--------------

Hurloon Shaman
Ignorant Bliss
Ill-Gotten Gains
Impatience
Innocent Blood
Jace's Archivist
Jin-Gitaxias, Core Augur
Kangee, Aerie Keeper
Keldon Battlewagon
Windfall

---------------
fixed Blazing Archon
2013-01-26 09:14:26 +00:00
Xawotihs@gmail.com
365fe10765 Fixed another dumb warning reported in the forum and added a nice assert for synchronization issues during network game. So, don't try it if you're not ready to get crashes in the face. 2013-01-26 08:07:31 +00:00
Xawotihs@gmail.com
da2098368b Added dumb cast for dumb compilators 2013-01-25 23:45:58 +00:00
Xawotihs@gmail.com
2ba5eb0022 Cleaned up Network code (hope that fixes the PSP compilation problems)
Added random seed logging
2013-01-25 21:47:16 +00:00
omegablast2002@yahoo.com
4bf419fbaf corrected evolve triggering from cards moving from inplay to inplay. 2013-01-25 19:56:26 +00:00
anthonycalosa@gmail.com
84950ad1f8 Added test for taunting elf. 2013-01-25 14:51:48 +00:00
omegablast2002@yahoo.com
0db78c0444 force a lure block when the players decide they want to skip the action, a lurer MUST be blocked if the defending creature can block it. this action can not be skipped. 2013-01-25 14:25:26 +00:00
anthonycalosa@gmail.com
f1032c64b5 changed add:{mana} to add{mana} 2013-01-25 02:19:29 +00:00
punkeduard@gmail.com
78797356ea Fixes on Markov Warlord, Skarrg Guildmage 2013-01-25 01:53:03 +00:00
anthonycalosa@gmail.com
2c00d99563 fixed card ability
-------------------
Dwell on the Past
Krosan Reclamation
Loaming Shaman
Memory's Journey
Stream of Consciousness
2013-01-25 01:29:05 +00:00
omegablast2002@yahoo.com
798258798c corrected an issue where ai was able to ignore lure ability 2013-01-24 21:04:23 +00:00
anthonycalosa@gmail.com
fccedcaaab added cards
--------------
Grand Abolisher
Hamletback Goliath
Hanabi Blast
Harmonic Sliver
Heed the Mists
Hellkite Charger
Hired Giant
Homeward Path
Hunter's Insight

---------------
fixed Arboria
fixed Hunters' Feast
fixed Zhang Liao, Hero of Hefei
2013-01-24 17:55:41 +00:00
anthonycalosa@gmail.com
80cdd56971 Added GTC Cards 192/249 (including reprints) refactored all names, ability texts, all codes. also include some fixes on other cards :)
--------------------------------------------------------------------

AEtherize
Adaptive Snapjaw
Aerial Maneuver
Agoraphobia
Alms Beast
Alpha Authority
Angelic Edict
Angelic Skirmisher
Armored Transport
Arrows of Justice
Assemble the Legion
Aurelia, the Warleader
Biomass Mutation
Biovisionary
Bomber Corps
Boros Charm
Boros Elite
Boros Guildgate
Boros Keyrune
Boros Reckoner
Burning-Tree Emissary
Burst of Strength
Cartel Aristocrat
Clinging Anemones
Cloudfin Raptor
Coerced Confession
Corpse Blockade
Court Street Denizen
Crackling Perimeter
Crocanura
Crowned Ceratok
Daring Skyjek
Death's Approach
Deathcult Rogue
Deathpact Angel
Debtor's Pulpit
Devour Flesh
Dimir Guildgate
Dimir Keyrune
Dinrova Horror
Disciple of the Old Ways
Drakewing Krasis
Duskmantle Guildmage
Dutiful Thrull
Dying Wish
Elusive Krasis
Enter the Infinite
Executioner's Swing
Experiment One
Fathom Mage
Firefist Striker
Firemane Avenger
Five-Alarm Fire
Forced Adaptation
Fortress Cyclops
Foundry Champion
Foundry Street Denizen
Frilled Oculus
Furious Resistance
Gateway Shade
Ghor-Clan Rampager
Giant Adephage
Gideon, Champion of Justice
Gift of Orzhova
Glaring Spotlight
Greenside Watcher
Gridlock
Grisly Spectacle
Ground Assault
Gruul Charm
Gruul Guildgate
Gruul Keyrune
Gruul Ragebeast
Guildscorn Ward
Gutter Skulk
Gyre Sage
Hellkite Tyrant
Hellraiser Goblin
High Priest of Penance
Hindervines
Hold the Gates
Holy Mantle
Homing Lightning
Horror of the Dim
Hydroform
Illness in the Ranks
Immortal Servitude
Incursion Specialist
Ivy Lane Denizen
Keymaster Rogue
Killing Glare
Knight Watch
Legion Loyalist
Leyline Phantom
Luminate Primordial
Martial Glory
Massive Raid
Master Biomancer
Merciless Eviction
Merfolk of the Depths
Metropolis Sprite
Millennial Gargoyle
Miming Slime
Mindeye Drake
Molten Primordial
Mortus Strider
Mugging
Murder Investigation
Nav Squad Commandos
Nimbus Swimmer
Obzedat, Ghost Council
Ogre Slumlord
One Thousand Lashes
Ordruun Veteran
Orzhov Guildgate
Orzhov Keyrune
Pit Fight
Predator's Rapport
Primal Visitation
Prime Speaker Zegana
Psychic Strike
Purge the Profane
Rapid Hybridization
Razortip Whip
Realmwright
Riot Gear
Rubblebelt Raiders
Rubblehulk
Ruination Wurm
Rust Scarab
Sage's Row Denizen
Sapphire Drake
Scab-Clan Charger
Scatter Arc
Scorchwalker
Sepulchral Primordial
Serene Remembrance
Shadow Alley Denizen
Shambleshark
Shattering Blow
Shielded Passage
Simic Fluxmage
Simic Guildgate
Simic Keyrune
Skarrg Goliath
Skarrg Guildmage
Skinbrand Goblin
Skyblinder Staff
Skygames
Slate Street Ruffian
Slaughterhorn
Smog Elemental
Spark Trooper
Spire Tracer
Sunhome Guildmage
Sylvan Primordial
Tin Street Market
Totally Lost
Tower Defense
Towering Thunderfist
Truefire Paladin
Urban Evolution
Urbis Protector
Verdant Haven
Viashino Shanktail
Vizkopa Guildmage
Warmind Infantry
Wasteland Viper
Way of the Thief
Wight of Precinct Six
Wildwood Rebirth
Wojek Halberdiers
Wrecking Ogre
Zarichi Tiger
Zhur-Taa Swine

TODO:merge unsupported cards from GTC (but will wait for zeth)
2013-01-24 03:57:02 +00:00
anthonycalosa@gmail.com
ba682e4802 Added:
Gaea's Blessing
Garza's Assassin
Gauntlet of Power
Gerrard's Verdict
Gigantiform
Glory of Warfare
Goblin Brawler
Smite

Fixes:
Opalescence
Thelonite Monk
2013-01-23 03:11:13 +00:00
anthonycalosa@gmail.com
db0dae7f8d Added GTC dat files, all ID, names and rarity are 100% accurate from gatherer. :) (exception change Æ to AE) 2013-01-23 02:07:40 +00:00
Xawotihs@gmail.com
9db8478dfe Created a NetworkGameObserver class able to extend the serialization code of GameObserver to synchronize and forward game actions on the network
Fixes in GameObserver serialization/deserialization code
Fixes in JNetwork and JSocket on windows
Various code cleanup (currentGamePhase access in particular)
Updated GUI code to re-enable a basic network GUI
Activated threaded tests on Windows. It uses 4 threads by default.
2013-01-22 22:39:49 +00:00
anthonycalosa@gmail.com
ada0a1555d cleanup remaining space in add_{mana} 2013-01-22 06:03:45 +00:00
anthonycalosa@gmail.com
782a8305fe Removed all spaces in auto line : Add_{mana} 2013-01-22 05:52:14 +00:00
anthonycalosa@gmail.com
f04dfac4b5 fixed Eiganjo Castle, Nezumi Shortfang, Shimian Specter 2013-01-22 03:34:10 +00:00
anthonycalosa@gmail.com
0b4ebc6e51 fix drana, banshee and added fleshbag marauder, fortune thief, fractured loyalty, frantic search, fungus elemental 2013-01-21 15:26:41 +00:00
anthonycalosa@gmail.com
cae9ff79d6 3rd Part: Dredge & Others
added 19 other cards from unsupported
-------------------------------------
Deus of Calamity
Diaochan, Artful Beauty
Dralnu's Pet
Dreams of the Dead
Due Respect
Ebon Praetor
Ego Erasure
Elemental Mastery
Erhnam Djinn
Essence Vortex
Exhume
False Cure
False Memories
Fanning the Flames
Feast of Worms
Festival of the Guildpact
Fight to the Death
Figure of Destiny
Final Punishment

added 16 dredge & cards with "draw" replacement
-----------------------------------------------
Dakmor Salvage
Darkblast
Golgari Brownscale
Golgari Grave-Troll
Golgari Thug
Grave-Shell Scarab
Greater Mossdog
Life from the Loam
Moldervine Cloak
Necroplasm
Nightmare Void
Obstinate Familiar
Plagiarize
Shambling Shell
Stinkweed Imp
Thought Reflection
2013-01-21 04:54:59 +00:00
anthonycalosa@gmail.com
32d06d1148 change damagecount as damage counter to actual damage received for "normal case" damage, this fixes odcount and pdcount int values. 2013-01-21 01:24:19 +00:00
omegablast2002@yahoo.com
1b7b1e2cf1 add dredge rule. 2013-01-20 20:13:32 +00:00
omegablast2002@yahoo.com
ca3dc49d71 added basic card draw replacement,
auto=replacedraw choice damage:2

auto=replacedraw choice draw:2 noreplace

notice noreplace exempts the draw from sending a draw event. draw events and drawn events are seperate events.

added dredge and it's rules.

[card]
name=Dakmor Salvage
auto=tap
auto={t}:add{b}
dredge=dredge(2)
text=Dakmor Salvage enters the battlefield tapped. -- {T}: Add {B} to your mana pool. -- Dredge 2 (If you would draw a card, instead you may put exactly two cards from the top of your library into your graveyard. If you do, return this card from your graveyard to your hand. Otherwise, draw a card.)
type=Land
[/card]
2013-01-20 20:13:07 +00:00
punkeduard@gmail.com
0709aaefb8 Added from the vaults: realms, after research concluded the official abbreviation is V12 and the others FTV sets should remain the same, this set is just reprints supported 13/15 total 2013-01-19 19:49:36 +00:00
anthonycalosa@gmail.com
69af807510 added City of Solitude, Detonate, Dosan the Falling Leaf, Harsh Justice.
added restriction for Reset, fixed Seedtime, fixed Wild Defiance, fixed Abundant Growth (thanks excessum)
2013-01-19 08:46:10 +00:00
omegablast2002@yahoo.com
a9352a3b69 opened all possible restrictions to be checked as a intvalue of 1, inline with anthonys change a couple revs back.
this(variable:restriction{casted a spell})
2013-01-19 02:06:46 +00:00
anthonycalosa@gmail.com
e67084afb9 Added restriction "during my turn", "during opponent turn".
Added variable "controllerturn", "opponentturn" -> returns integer value if its your turn then 1 if not then 0.

ex. use

restriction=during my turn
otherrestriction=during opponent turn
auto=this(variable{controllerturn}) lord(creature|mybattlefield) 8/0
auto=this(variable{opponentturn}) lord(creature|mybattlefield) 0/8
2013-01-18 04:41:24 +00:00
anthonycalosa@gmail.com
fda7166752 2nd Part:
Added entwine cards and other cards as of SVN r4587.

Entwine Cards
----------------------
Incite War
Journey of Discovery
Promise of Power
Roar of the Kha
Rude Awakening
Savage Beating
Solar Tide
Stir the Pride
Temporal Cascade
Tooth and Nail
Wail of the Nim

Cards from Unsupported
----------------------
Circle of Protection: Shadow
Circle of Solace
Cloudstone Curio
Coalition Relic
Commando Raid
Copy Artifact
Cornered Market
Crack the Earth
Crag Saurian
Crescendo of War
Crypt Champion
Curfew
Dance of the Dead


I don't have an exact amount of cards supported in the latest SVN because there are a lot of cards in my local copy to be tested before commiting.

OT: I think overload card can be done if the target card and store it for use until the spell resolves. ex:

[card]
name=Blustersquall
other={3}{U} name(Overload)
auto=if paid(alternative) then tap all(creature)
auto=ifnot paid(alternative) then tap all(mytarget)
text=Tap target creature you don't control. -- Overload {3}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")
mana={U}{target(creature|opponentbattlefield)}
type=Instant
[/card]
2013-01-17 02:52:02 +00:00
anthonycalosa@gmail.com
5f90d1ee9f added keyword phandcount - player hand count
added keyword ohandcount - opponent hand count
2013-01-16 12:08:46 +00:00
omegablast2002@yahoo.com
a26f872ff3 add restriction for checking what alternative cost was paid. combined with if/ifnot ability becomes a very powerful tool.
paid(blah)
auto=if paid(alternative) then damage:3 target(creature)
auto=if paid(alternative) then life:10 target(player)
auto=ifnot paid(alternative) then damage:3 controller
auto=ifnot paid(alternative) then life:4 opponent

it can be used any place a restriction can be used. 
rearranged the constants for the payment type keywords to match the order we int the alternatePayment array on a card, added keywords for the remaining payment types, 

    "notpaid",
    "paidmana",
the 2 above pretain to paying the real manacost of a card
it checks the mana={1} cost line and is not joined to the other types.

    "kicker", 
    "alternative", 
    "buyback", 
    "flashback", 
    "retrace", 
    "facedown",
    "suspended"

note: all test pass in this revision.
2013-01-15 02:11:05 +00:00
anthonycalosa@gmail.com
9201860744 Added Oracle of Nectars gain life test. I have 2 tests failed, gain X life and ai proliferation. It seems there is an issue on my maxglee profile(the one i have with lots of deck, i mean a lot). Now I changed my profile to default profile(the one with a demo deck), restarted and run the tests a couple of times and my tests are all succesful 100%. 2013-01-15 01:59:48 +00:00
omegablast2002@yahoo.com
a608de3b73 corrected stasis test to follow the new coding which actually works :)
corrected steelclad_serpent2 test missing choice 0 and p2.

ai proliferate test was not failing for me. it was sucessful on each run.

note 100% pass on this rev.
2013-01-14 23:39:08 +00:00
anthonycalosa@gmail.com
0a8a88f817 fixed kudzu, master of etherium, nevinyrrals disk tests. 3 failed tests remains (phase problems which i really don't know why it fails). all other tests are succesful. 2013-01-14 17:40:07 +00:00
anthonycalosa@gmail.com
e1d2bf56c5 fixed hanna's custody shroud test.(i just changed the rack and black vise to rackling and viseling...gotta get some sleep...:(..) 2013-01-14 17:00:52 +00:00
anthonycalosa@gmail.com
98ea63485d updated kudzu, kudzu2 test. change all(mytgt) to all(trigger) for kudzu. now for kudzu_i168.txt i don't quite understand what is the expected output for this so i leave it unchanged. 2013-01-14 16:46:17 +00:00
anthonycalosa@gmail.com
598ffb1f9b Fixed rampant growth & orcish lumberjack tests (missing choice 0) 2013-01-14 16:03:11 +00:00
anthonycalosa@gmail.com
c3586126a5 Fixed Gamble and Gamble test(it failed because the command has a missing choose 0). Soft coded Insolence, Mana Short, Sacrifice and Touch of Vitae. Changed Rot Wulf to Rot Wolf.
TODO: there are several test that needs updating prior to changes in card primitives (the ones that failed 11 are left).
2013-01-14 15:26:00 +00:00
wagic.the.homebrew@gmail.com
cbcc5a57ca Fixing Gamble (I am aware that this makes the card less close to the rules in theory, but now the test passes. Let's not break some parts of a card when we fix other parts, please).
It is possible revision 4519 introduced other similar issues in other cards, but that revision was so big that I didn't want to revert it entirely
2013-01-14 12:37:53 +00:00
wagic.the.homebrew@gmail.com
9b47a64fd9 reverting r4569. This fixes Flare, and potentially other cards using the same mechanism 2013-01-14 12:14:19 +00:00
wagic.the.homebrew@gmail.com
83c0ee2c28 Fixed "Animate Artifact" tests 2013-01-14 11:26:22 +00:00
wagic.the.homebrew@gmail.com
4be2c39566 Fixed Test for Black Vise 2013-01-14 11:19:04 +00:00
wagic.the.homebrew@gmail.com
1f8e1179cc Fix for issue 930 (Farmstead can be used more than once per turn) 2013-01-14 11:10:01 +00:00
wagic.the.homebrew@gmail.com
2d11392e47 Fixed famrstead test. Sadly, this doesn't fix the card 2013-01-14 08:06:12 +00:00
anthonycalosa@gmail.com
0fcfb43d3a Softcoded Storm Seeker, Traumatize, Venomous Dragonfly 2013-01-14 03:23:33 +00:00
anthonycalosa@gmail.com
2a1f29aebc Fixed remaining transform cards to creatures that uses */* 2013-01-13 15:58:06 +00:00
anthonycalosa@gmail.com
e7dd2e02d6 Fixed some cards that transforms into creature (must use setpower and settoughness, if not the effects are like +1/+1). TODO.... 2013-01-13 14:31:15 +00:00
anthonycalosa@gmail.com
da15bb7427 Fixed Rot Wolf, Revised @next upkeep card draw. 2013-01-13 13:59:24 +00:00
anthonycalosa@gmail.com
6410e25bcc Added check for Ali from Cairo, if you are dealt damage to reduce your life less than 1 from your life total, and you gain life greater than 1, it will not set your life to 1. 2013-01-12 14:44:26 +00:00
anthonycalosa@gmail.com
14e0093eaf Added 16 cards from unsupported.txt
------------------------------------

Abeyance
Agadeem Occultist
Ali from Cairo
Antagonism
Aphetto Dredging
Aquitect's Will
Aura Barbs
Beseech the Queen
Blazing Shoal
Blind Seer
Budoka Gardener
Dokai, Weaver of Life
Builder's Bane
Burrenton Forge-Tender
Cauldron Dance
Cephalid Constable
2013-01-12 14:30:55 +00:00
anthonycalosa@gmail.com
3b08a05421 Fixed all cards that transform cards into new color as an additional color. Added Indigo Faerie. 2013-01-12 14:04:48 +00:00
punkeduard@gmail.com
f74e2019cc Fixed some AVR cards reported on the forums 2013-01-12 04:55:01 +00:00
punkeduard@gmail.com
93c9f12eff Added Dwarven Hold, fixed typo in Curse of the Nightly Hunt, removed sxtra blank space 2013-01-12 04:28:00 +00:00
anthonycalosa@gmail.com
80a3e37961 removed unnecesary spaces in primitives/mtg.txt. 2013-01-11 17:21:10 +00:00
anthonycalosa@gmail.com
4e9dc2c3b1 Added Wurm Token for Garruk, Primal Hunter because it produces 2 different tokens. Change Glory and Zombie Boa chooseacolor to activatechooseacolor. 2013-01-11 12:55:57 +00:00
anthonycalosa@gmail.com
b78c8084be Card Fixes:
------------

Dragon Broodmother - change token id to source card token id
Kjeldoran Javelineer - revised code
Malignant Growth - Growth counter damage
Marsh Crocodile - revised code
Mindslash Sliver - revised code
Phyrexian Etchings - revised code
Psychic Vortex - revised code
Sheltering Ancient - dynamicability<!agecountersoneone!>
Wall of Shards - revised code

updated ARB/_cards.dat (pls. update your ARB set folder)
2013-01-11 07:43:29 +00:00
anthonycalosa@gmail.com
8119f3bc05 fixes includes some card id of tokens be change to display image in game. please update your sets folder and images.
Card Fixes:
--------------

Ajani Goldmane - moved token id to dat file
Army of the Damned - change token id to source token id
Black Vise -  can choose opponent
Chromium - upcost sacrifice
Elephant Resurgence - change token id to source token id
Melancholy - upcost sacrifice
Midnight Ritual - change token id to source token id
Polar Kraken - fix upcost
Rackling - soft coded
Skeletonize - must target beforehand and fix token color & id
Storm World - fix. can't use foreach..<4 because X is 4 minus the cards
Tatsumasa, the Dragon's Fang - revised workaround
Terastodon - change token id to source token id
Tetravus - change token id to source token id
The Rack - soft coded
Thirst - upcost sacrifice
Tombstone Stairwell - revised ability, removed tombspawn primitive
Varchild's War-Riders - fix cumulative upcost
Venser, the Sojourner - fix loyalty counters
Vexing Sphinx - upcost sacrifice
Vraska the Unseen - moved token id
Wall of Shards - fix cumulative upcost
Waylay - generic token coded
Wheel of Torture - fix. can't use foreach..<3 because X is 3 minus the cards

updated necessary dat files for the token ids.
2013-01-10 17:36:22 +00:00
anthonycalosa@gmail.com
0e4994c22c Added 6 Legendary Dragons
-------------------------
Crosis, the Purger
Dromar, the Banisher
Numot, the Devastator
Rith, the Awakener
Treva, the Renewer
Vorosh, the Hunter

Fixed 2 Legendary Dragons
-------------------------
Oros, the Avenger
Teneb, the Harvester


If we have like UEOP ( until end of phase| until end of step ) keyword this will be perfect, but for now I use oneshot. :)
2013-01-10 07:44:55 +00:00
anthonycalosa@gmail.com
c6117fdfb3 Revised Goblin Clearcutter, Manamorphose, Orcish Lumberjack and Terrarion ability. 2013-01-09 11:44:44 +00:00
anthonycalosa@gmail.com
1ff10ed4c7 Added Blinding Powder, Heartseeker and Leonin Bola.
Fixed Finest Hour missing ability, Fire Dragon and Godo, Bandit Warlord typo
2013-01-09 08:05:40 +00:00
anthonycalosa@gmail.com
d83415ed3b fixed Umezawa Jitte menu ability, Centaur Glade token typo, Ghitu-Fire eater missing player target and Flame Elemental dynamic ability typo. 2013-01-09 03:32:11 +00:00
anthonycalosa@gmail.com
e69e002c1a Revised code for Atalya, Samite Master, Crimson Hellkite and Crypt Rats to use {X:color}
Cleaned Manacost.cpp

My observation so far when paying X in activated abilities, when X doesn't work, I press escape to get in the main menu and play another game(test again), then X activated ability will work. I really don't know where to start/look for the cause of it.
2013-01-08 13:26:42 +00:00
anthonycalosa@gmail.com
e5b56cfffb Added 16 cards
---------------
Lure Cards:
Alluring Scent
Bloodscent
Elvish Bard
Gift of the Deity
Golgari Decoy
Lure
Mortipede
Nemesis Mask
Prized Unicorn
Seton's Desire
Shinen of Life's Roar
Stone-Tongue Basilisk
Taunting Challenge
Taunting Elf
---------------
No Legend Cards:
Brothers Yamazaki
Mirror Gallery
2013-01-08 04:01:25 +00:00
anthonycalosa@gmail.com
eeb5a4235b Angel of Serenity - fix ability (like mesmeric fiend, blinked cards return to owners hand if source leaves play)
Angel's Tomb - added may

Archaeomancer - added check

Cathedral of War - removed space

Defang - revised code

Dismal Failure - revised code

Gallows at Willow Hill - removed extra activation cost

Ghostly Flicker - target fix

Hidden Retreat - fix targeted card ability
2013-01-08 03:35:36 +00:00
omegablast2002@yahoo.com
2aed88a44f fixed the simplemenu scrolling bug, the scrolling will no longer jump to the final selection you made when scrolling down and up. 2013-01-07 21:33:59 +00:00
anthonycalosa@gmail.com
b007190d98 updated CHK dat file. 2013-01-07 09:29:43 +00:00
anthonycalosa@gmail.com
510a8c4222 added nolegend ability. this doesn't remove legend rule, it only makes a card thas has nolegend ability excluded from check. 2013-01-07 06:46:56 +00:00
Xawotihs@gmail.com
e2be750780 Adding boost random support and system libs 2013-01-06 19:44:18 +00:00
Xawotihs@gmail.com
38ebdde6ed Adding boost uuid support 2013-01-06 17:53:29 +00:00
Xawotihs@gmail.com
579a651e3d Adding boost weak pointer support 2013-01-06 17:49:55 +00:00
punkeduard@gmail.com
a95a2c4dc2 fixed tribute to hunger, far wandering 2013-01-06 17:32:50 +00:00
punkeduard@gmail.com
edb3295af0 Updated crappy, borderline and mtg to include/fix some cards related to chosen discard 2013-01-06 17:08:21 +00:00
anthonycalosa@gmail.com
3b07ad6b7f Merge RTR card primitives to mtg.txt
187 cards merged:

Abrupt Decay
Aerial Predation
Angel of Serenity
Annihilating Fire
Aquus Steed
Archon of the Triumvirate
Archweaver
Armada Wurm
Armory Guard
Ash Zealot
Assassin's Strike
Auger Spree
Avenging Arrow
Axebane Guardian
Axebane Stag
Azorius Arrester
Azorius Charm
Azorius Guildgate
Azorius Justiciar
Azorius Keyrune
Azor's Elocutors
Batterhorn
Bazaar Krovod
Bellows Lizard
Blistercoil Weird
Bloodfray Giant
Brushstrider
Call of the Conclave
Carnival Hellsteed
Catacomb Slug
Centaur Healer
Centaur's Herald
Chaos Imps
Chorus of Might
Chromatic Lantern
Chronic Flooding
Civic Saber
Cobblebrute
Codex Shredder
Collective Blessing
Common Bond
Concordia Pegasus
Coursers' Accord
Crosstown Courier
Cryptborn Horror
Daggerdrome Imp
Dark Revenant
Dead Reveler
Deadbridge Goliath
Deathrite Shaman
Death's Presence
Detention Sphere
Deviant Glee
Doorkeeper
Dramatic Rescue
Dreadbore
Dreg Mangler
Drudge Beetle
Druid's Deliverance
Dryad Militant
Essence Backlash
Ethereal Armor
Explosive Impact
Eyes in the Skies
Faerie Impostor
Fall of the Gavel
Fencing Ace
Frostburn Weird
Gatecreeper Vine
Gobbling Ooze
Goblin Electromancer
Goblin Rally
Golgari Charm
Golgari Guildgate
Golgari Keyrune
Golgari Longlegs
Gore-House Chainwalker
Grim Roustabout
Grove of the Guardian
Growing Ranks
Guttersnipe
Hellhole Flailer
Horncaller's Chant
Hover Barrier
Hussar Patrol
Hypersonic Dragon
Inaction Injunction
Isperia, Supreme Judge
Isperia's Skywatch
Izzet Guildgate
Izzet Keyrune
Jarad, Golgari Lich Lord
Jarad's Orders
Keening Apparition
Knightly Valor
Korozda Guildmage
Korozda Monitor
Launch Party
Lobber Crew
Lotleth Troll
Lyev Skyknight
Mana Bloom
Martial Law
Mercurial Chemister
Minotaur Aggressor
Necropolis Regent
New Prahv Guildmage
Niv-Mizzet, Dracogenius
Ogre Jailbreaker
Pack Rat
Perilous Shadow
Phantom General
Precinct Captain
Psychic Spiral
Pursuit of Flight
Pyroconvergence
Racecourse Fury
Rakdos Cackler
Rakdos Charm
Rakdos Guildgate
Rakdos Keyrune
Rakdos Ragemutt
Rakdos Ringleader
Rakdos Shred-Freak
Rakdos's Return
Righteous Authority
Risen Sanctuary
Rogue's Passage
Rootborn Defenses
Rubbleback Rhino
Runewing
Savage Surge
Search Warrant
Security Blockade
Selesnya Charm
Selesnya Guildgate
Selesnya Keyrune
Selesnya Sentry
Seller of Songbirds
Sewer Shambler
Shrieking Affliction
Skull Rend
Skyline Predator
Skymark Roc
Slime Molding
Slitherhead
Sluiceway Scorpion
Soul Tithe
Soulsworn Spirit
Spawn of Rix Maadi
Sphinx's Revelation
Splatter Thug
Stab Wound
Stealer of Secrets
Stonefare Crocodile
Street Sweeper
Sundering Growth
Sunspire Griffin
Supreme Verdict
Survey the Wreckage
Swift Justice
Tavern Swindler
Tenement Crasher
Terrus Wurm
Thoughtflare
Thrill-Kill Assassin
Towering Indrik
Trained Caracal
Transguild Promenade
Treasured Find
Trestle Troll
Trostani, Selesnya's Voice
Trostani's Judgment
Ultimate Price
Underworld Connections
Urban Burgeoning
Utvara Hellkite
Vassal Soul
Viashino Racketeer
Vitu-Ghazi Guildmage
Voidwielder
Volatile Rig
Vraska the Unseen
Wayfaring Temple
Wild Beastmaster
Worldspine Wurm
Zanikev Locust
2013-01-06 16:41:52 +00:00
anthonycalosa@gmail.com
5c0a69ea54 Merge AVR, M13, PC2 card primitives to MTG.txt
284 cards merged:

Abundant Growth
Aggravate
Ajani, Caller of the Pride
Ajani's Sunstriker
Alchemist's Apprentice
Alchemist's Refuge
Amass the Components
Angel of Glory's Rise
Angel's Tomb
Angelic Armaments
Appetite for Brains
Arcane Melee
Archaeomancer
Archwing Dragon
Arctic Aven
Attended Knight
Avacyn, Angel of Hope
Baleful Strix
Banners Raised
Battle Hymn
Battleflight Eagle
Beetleback Chief
Bladed Bracers
Blood Artist
Blood Reckoning
Bloodflow Connoisseur
Bloodhunter Bat
Bond Beetle
Boundless Realms
Bower Passage
Brindle Shoat
Bruna, Light of Alabaster
Builder's Blessing
Butcher Ghoul
Call to Serve
Captain of the Mists
Captain's Call
Cathars' Crusade
Cathedral of War
Cathedral Sanctifier
Chandra's Fury
Chronomaton
Cleaver Riot
Cloudshift
Commander's Authority
Human Token
Conjurer's Closet
Corpse Traders
Cower in Fear
Craterhoof Behemoth
Craterize
Crimson Muckwader
Crippling Blight
Crippling Chill
Crusader of Odric
Cursebreak
Dangerous Wager
Deadeye Navigator
Death Wind
Defang
Defy Death
Demonic Rising
Demonic Taskmaster
Demonlord of Ashmouth
Desolate Lighthouse
Devout Chaplain
Diabolic Revelation
Diregraf Escort
Disciple of Bolas
Downpour
Dragon Hatchling
Dragonlair Spider
Dread Slaver
Dreadwaters
Dreampod Druid
Driver of the Dead
Druid's Familiar
Druids' Repository
Duskmantle Prowler
Duty-Bound Dead
Eaten by Spiders
Elderscale Wurm
Elgaud Shieldmate
Emancipation Angel
Encrust
Essence Harvest
Evernight Shade
Exquisite Blood
Faerie Invaders
Faith's Reward
Falkenrath Exterminator
Farbog Explorer
Favorable Winds
Fervent Cathar
Fettergeist
Firewing Phoenix
Flames of the Firebrand
Flinthoof Boar
Fungal Sprouting
Gallows at Willow Hill
Spirit Token
Galvanic Alchemist
Geist Snatch
Geist Trappers
Ghostform
Ghostly Flicker
Ghostly Touch
Ghoulflesh
Goblin Battle Jester
Goldnight Commander
Goldnight Redeemer
Grave Exchange
Griffin Protector
Griselbrand
Grounded
Gryff Vanguard
Guardian Lions
Guise of Fire
Hanweir Lancer
Harbor Bandit
Harvester of Souls
Haunted Guardian
Havengul Skaab
Havengul Vampire
Healer of the Pride
Heirs of Stromkirk
Hellion Crucible
Herald of War
Holy Justiciar
Homicidal Seclusion
Hound of Griselbrand
Howlgeist
Human Frailty
Hunted Ghoul
Hydrosurge
Illusory Angel
Into the Void
Jace's Phantasm
Kessig Malcontents
Knight of Glory
Knight of Infamy
Krenko, Mob Boss
Krenko's Command
Krond the Dawn-Clad
Kruin Striker
Latch Seeker
Leap of Faith
Lightning Mauler
Lightning Prowess
Liliana of the Dark Realms
Liliana's Shade
Maalfeld Twins
Mad Prophet
Magmaquake
Malicious Intent
Mark of the Vampire
Marrow Bats
Mass Appeal
Mass Mutiny
Master of the Pearl Trident
Mental Agony
Midnight Duelist
Midvast Protector
Mind Sculpt
Mist Raven
Moonlight Geist
Moonsilver Spear
Moorland Inquisitor
Murder
Mwonvuli Beast Tracker
Narstad Scrapper
Natural End
Nearheath Pilgrim
Necrobite
Nefarox, Overlord of Grixis
Nephalia Smuggler
Nettle Swine
Nightshade Peddler
Otherworld Atlas
Pathbreaker Wurm
Pillar of Flame
Polluted Dead
Predator's Gambit
Preyseizer Dragon
Primal Huntbeast
Prized Elephant
Public Execution
Raging Poltergeist
Ranger's Path
Reckless Brute
Renegade Demon
Restoration Angel
Riders of Gavony
Righteous Blow
Ring of Evos Isle
Ring of Kalonia
Ring of Thune
Ring of Valkas
Ring of Xathrid
Riot Ringleader
Roaring Primadox
Rotcrown Ghoul
Rummaging Goblin
Rush of Blood
Sai of the Shinobi
Sakashima's Student
Sands of Delirium
Scalding Devil
Scrapskin Drake
Scroll of Avacyn
Scroll of Griselbrand
Searchlight Geist
Searing Spear
Sentinel Spider
Seraph of Dawn
Seraph Sanctuary
Serpent's Gift
Servant of Nefarox
Sheltering Word
Show of Valor
Silverblade Paladin
Slayers' Stronghold
Slumbering Dragon
Smelt
Snare the Skies
Somberwald Vigilante
Soul of the Harvest
Soulcage Fiend
Spectral Gateguards
Spectral Prison
Spiked Baloth
Spirit Away
Staff of Nin
Stern Mentor
Stonewright
Sublime Archangel
Talrand, Sky Summoner
Talrand's Invocation
Tamiyo, the Moon Sage
Tandem Lookout
Terrifying Presence
Thatcher Revolt
Thraben Valiant
Thragtusk
Thundermaw Hellkite
Tibalt, the Fiend-Blooded
Timberland Guide
Timberpack Wolf
Tormentor's Trident
Touch of the Eternal
Trading Post
Treacherous Pit-Dweller
Tricks of the Trade
Triumph of Cruelty
Triumph of Ferocity
Trusted Forcemage
Ulvenwald Tracker
Uncanny Speed
Undead Executioner
Unhallowed Pact
Veilborn Ghoul
Vela the Night-Clad
Vessel of Endless Rest
Vigilante Justice
Vile Rebirth
Voice of the Provinces
Void Stalker
Vorstclaw
Wandering Wolf
War Falcon
Warclamp Mastiff
Watercourser
Wild Defiance
Wild Guess
Wingcrafter
Wolfir Avenger
Wolfir Silverheart
Worldfire
Xathrid Gorgon
Yeva, Nature's Herald
Yeva's Forcemage
Yew Spirit
Zealous Conscripts
Zealous Strike
2013-01-06 09:30:29 +00:00
anthonycalosa@gmail.com
747eec8692 Chill of Foreboding type change to sorcery
Scourge of the Nobilis ability fix 1/0
2013-01-05 15:36:31 +00:00
omegablast2002@yahoo.com
972e2b1ec2 added abilities=lure
"all creatures able to block blah must do so."
2013-01-05 05:01:31 +00:00
omegablast2002@yahoo.com
4960969640 added {unattach} cost
this can also be used for "equipped creature has unattach and blah" cards using 
auto=teach(creature) {unattach}:blah

also corrected a long standing guiupdating issue. a long long time ago a replace was removed from GuiPlay::Update in hopes to increase performance no amount of performance increase is worth having cards not updating thier position after an event recieve happens. this means curse will finally go to the correctly choosen players battlefield, equipment will no longer just linger after its target dies, auras won't stay on battlefield after a card is exiled. ect. no preformance decrease noticed, if anyone else notices one let me know.
2013-01-05 03:05:53 +00:00
omegablast2002@yahoo.com
2fa626b80e adding more strings to translation 2013-01-05 00:38:12 +00:00
Xawotihs@gmail.com
1049f90aa2 Fixed simultaneous access to the card DB. 2013-01-02 16:15:52 +00:00
omegablast2002@yahoo.com
a3017c215f corrected the translation of the phase names string in guiphasebar 2013-01-01 02:00:34 +00:00
omegablast2002@yahoo.com
ad50ce1d48 added a few items to translate on card gui. names and text should now correctly translate in trophy room and shop. 2012-12-31 16:17:38 +00:00
anthonycalosa@gmail.com
153203fba6 adjust alignment 2012-12-29 14:31:28 +00:00
anthonycalosa@gmail.com
780afb6e0c added missing damagecount reset for opponent. this should fix odcount this turn value 2012-12-29 14:25:49 +00:00
anthonycalosa@gmail.com
0ebb151a66 fix some flip cards:
Ichiga, Who Topples Oaks
Cunning Bandit
Garruk the Veil-Cursed
Homura's Essence
Rune-Tail's Essence
Rampaging Werewolf
2012-12-29 09:14:45 +00:00
anthonycalosa@gmail.com
0b1a88e3d7 Added unsupported cards from PC2, M13, RTR. 2012-12-29 03:21:51 +00:00
anthonycalosa@gmail.com
1ad4948594 Updated unsupported.txt, added unsupported cards from AVR.txt. 2012-12-29 01:20:23 +00:00
anthonycalosa@gmail.com
227cfc93f1 fix rarities for CMD, M11, ME4, PD2 2012-12-28 17:47:08 +00:00
anthonycalosa@gmail.com
d9ec37e096 RTR rarities correction 2012-12-28 17:00:02 +00:00
anthonycalosa@gmail.com
fd1becf59c added RTR dat 2012-12-28 16:51:25 +00:00
anthonycalosa@gmail.com
b3195d6111 Added RTR primitives, fix rarities in M12/_cards.dat, fix primitives/PC2.txt 2012-12-28 16:45:18 +00:00
anthonycalosa@gmail.com
755a43bb2a fix AVR, M13 codes and added some cards 2012-12-28 15:52:28 +00:00
anthonycalosa@gmail.com
08a7df0f19 fix M13/_cards.dat and fix M13 codes 2012-12-28 15:08:21 +00:00
anthonycalosa@gmail.com
02a7a7670a fix NPH/_cards.dat 2012-12-28 14:28:19 +00:00
anthonycalosa@gmail.com
2aae7d2c17 fix MBS/_cards.dat 2012-12-28 14:17:07 +00:00
anthonycalosa@gmail.com
35d32ff8fe fix AVR/_cards.dat and ISD/_cards.dat 2012-12-28 13:51:43 +00:00
anthonycalosa@gmail.com
05b775f50e Fix ISD/_cards.dat
change Séance to Seance
2012-12-28 13:38:23 +00:00
anthonycalosa@gmail.com
76efffb295 fix DKA/_cards.dat 2012-12-28 12:40:57 +00:00
anthonycalosa@gmail.com
fa5da87a98 revised primitives/mtg.txt.
-kevlahnota
Issue: 914,920,921
2012-12-28 10:00:23 +00:00
omegablast2002@yahoo.com
238cd124ae corrected the spelling of evolve. thanks kf1 2012-12-27 21:07:20 +00:00
Xawotihs@gmail.com
123a6aa21f Fixed remote hash retrieval 2012-12-26 18:14:27 +00:00
omegablast2002@yahoo.com
651d0b4623 added gatecrash "evole" mechanic.
auto=evole
2012-12-24 16:19:32 +00:00
omegablast2002@yahoo.com
2b4df1cc68 corrected helix pennicle to include a set of extra brackets wrapping the restriction. 2012-11-27 02:47:04 +00:00
omegablast2002@yahoo.com
4ad4689603 allowing restriction to also search for
restriction{{ }} incases where we will have squiqqly brackets in a tc.

this corrects the bug where helix pennicle restricted trigger was not triggering.
2012-11-27 02:45:01 +00:00
omegablast2002@yahoo.com
a87377b25a fixed an error in the reseting of setToughness, kind of a dumb error on my part because i was originally the coder :P
a creatures life and toughness are tied together, if you do not change both then the creature lives on.
2012-11-27 01:53:41 +00:00
omegablast2002@yahoo.com
ca446adf75 fixed a bug in sacrificed trigger. 2012-11-25 05:00:42 +00:00
omegablast2002@yahoo.com
92a8ccebd8 added a new tag to transforms(( keyword ... uynt ...meaning until your(the sources controller) next turn.
this should allow players to code cards with the detain ability of rtr correctly, as well as a handful of similar cards in the unsupported text.

detain is coded 
auto={1}{t}:target(creature|opponentBattlefield) transforms((Detained,newability[cantattack],newability[cantblock],newability[noactivatedability])) uynt

enjoy
2012-11-10 05:08:23 +00:00
punkeduard@gmail.com
8ac44677b8 Removed wild defiance, druids repository, abundant growth 2012-10-07 05:55:40 +00:00
punkeduard@gmail.com
a60a8af2b0 Primitives bug fixes 2012-09-24 02:49:32 +00:00
punkeduard@gmail.com
e809190a82 Added izzet vs golgari duel decks, updates some primitives and bug fixing in cards 2012-09-22 15:55:27 +00:00
punkeduard@gmail.com
901abd688a Fixed Yeva, Nature's Herald and Yeva's forcemage 2012-09-03 00:24:13 +00:00
omegablast2002@yahoo.com
ad055ad0b7 missed this file 2012-08-26 08:10:15 +00:00
omegablast2002@yahoo.com
3b447135fb fixed soulbond and testsuite issue, fixed crash from combohint not being int'ed to some AIStats(which are considered "human" 2012-08-26 08:08:36 +00:00
wagic.the.homebrew@gmail.com
7583e61510 remove non ascii characters from ZipFS 2012-08-26 06:07:48 +00:00
wagic.the.homebrew@gmail.com
8035d0f3fc Remove non ascii characters from WFont 2012-08-26 06:06:32 +00:00
omegablast2002@yahoo.com
38cdec5126 corrected a issue with "eachother" tag in adyanmic class...the damager should be the target to take into account triggers and deathtouch...thanks dopple. 2012-08-25 00:38:59 +00:00
omegablast2002@yahoo.com
78f5b11919 removed ABasilik class, this ability is completely soft codable now. 2012-08-25 00:27:22 +00:00
omegablast2002@yahoo.com
f5403b0e03 softcoded the final basilisk.... 2012-08-25 00:25:29 +00:00
omegablast2002@yahoo.com
a42c6b00a8 changed farmstead to softcode. 2012-08-25 00:07:47 +00:00
omegablast2002@yahoo.com
68f76fbaff removed farmstead hardcode, this card can now be soft coded 2012-08-25 00:07:10 +00:00
omegablast2002@yahoo.com
14695e7e5b removed kudzu hardcode, that card can be done with soft code...corrected frostbeast, it was incorrectly ignoring walls...it should destroy all even walls. 2012-08-24 23:59:35 +00:00
omegablast2002@yahoo.com
63ea7f88e2 soft coded kudzu. 2012-08-24 23:52:17 +00:00
omegablast2002@yahoo.com
0b89f0571e corrected elder cather code. 2012-08-24 23:43:15 +00:00
omegablast2002@yahoo.com
0f5754c75a many reported issue tracker bugs fixed. 2012-08-24 01:32:06 +00:00
omegablast2002@yahoo.com
101582e37e increased life delta bonus to 10k, it seems the general consensus is people think it is bugged becuase they dont gain over 500 points from it. after seeing multiple people reporting it I think it would be best to increase the bonus just to avoid confusion. 2012-08-24 00:24:26 +00:00
omegablast2002@yahoo.com
fffe739ec1 setting Tc->targetter to Null on countByCanTarget() the functions that call this don't care about protection, it is used to find a number of objects which are considered valid even with protections to the source. thanks Dopple for finding this bug. 2012-08-23 23:24:55 +00:00
omegablast2002@yahoo.com
d078872dfc this is the first draft of a simple ai combo system,
format is as follows

HINT#combo hold(blah|myhand)^until(blah|mygraveyard)^until(blah|opponentshand)^restriction{type(creature|mybattlefield)~morethan~2}^cast(blah) targeting(blah|mygraveyard)^totalmananneeded({g}{g}{r}{u}{2})

the ai can be told to hold more then one card, until as many condiations as you want are met, until( is a TC and can basically be used in a fasion of saying "hold arbor elf until you have a lord of atlantas in play and a gaint growth in you hand" 

once the condiations are met you can later tell it to cast(gaint growth) targeting(arbor elf[fresh]|mybattlefield)...

I also included the whole of the games restrictions system...
so you can get really really creative with this so far.

the next thing I will do is ability targeting and card favoring.
2012-08-19 21:53:57 +00:00
rolzad73@gmail.com
6d4e677711 * Stopped Android version from completely destroying/recreating SDLActivity when the device is locked.
Fixes multiple identical issue entries in tracker:
issue 696 (was marked fixed then restarted)
issue 876, issue 886, issue 894
2012-08-19 16:19:56 +00:00
punkeduard@gmail.com
4c74ae06fd Fixes on AVR, M13, mtg, bug reports on the forums, another try on the rings 2012-08-11 04:00:22 +00:00
punkeduard@gmail.com
db2d3b895e Bug fixes for m13 reported in the forums
mark of the vampire, dragon hatchling, Ranger's Path
2012-08-05 22:05:00 +00:00
punkeduard@gmail.com
51a6ac54f4 Several bug fixes, this cards are not working 100% correcly: will be removed if not fixed soon Ulvenwald Tracker,Wild Defiance, Thatcher Revolt, Spectral Prison, Druids' Repository, Abundant Growth 2012-08-05 20:26:40 +00:00
punkeduard@gmail.com
1454550a7b Thraben Heretic, Fyndhorn Pollen, knight of glory card code fixes 2012-07-26 02:30:59 +00:00
omegablast2002@yahoo.com
c85d07f890 tweaks to ai use of cast order, we had instance where "land" would get an over-ride and not cast. 2012-07-25 12:10:25 +00:00
punkeduard@gmail.com
23e4002a9a reverted the rings 2012-07-25 03:11:07 +00:00
punkeduard@gmail.com
e38582a89a Fixes to the five rings, mana cost knight of glory 2012-07-25 02:29:38 +00:00
omegablast2002@yahoo.com
cf5a6f9059 fix to my fix, commited the wrong version of it :) 2012-07-24 11:02:29 +00:00
omegablast2002@yahoo.com
bbf1de5134 fix for may menus not stacking if multi cards with may effects come into play at the same time.
although I tested this fix, it will require extremely indepth testing which I can not do alone to ensure that doing this does not screw up something else.
I think however that we are safe, becuase we test the same condition under test destroy and gameobserver update without any negitive recourse.
2012-07-23 22:44:02 +00:00
omegablast2002@yahoo.com
ecdc1481b0 added grade crappy to M13, pc2, avr, to exclude them from 99% support, until they are corrected, verified, and completely working, then combined with MTG.txt where they belong. already started receiving bug reports for cards in these. 2012-07-21 19:49:09 +00:00
punkeduard@gmail.com
b3d28744c4 Bug fixes in cards from avr and m13
hellion crubicle, Archwing Dragon, Defy Death, Otherworld Atlas
2012-07-21 18:14:31 +00:00
omegablast2002@yahoo.com
6172a0ade6 the rules txt change for soulbond. 2012-07-16 15:00:32 +00:00
omegablast2002@yahoo.com
0dbcd86b89 this commit adds AVRs new ability soulbond.
it requires an update to your mtg rules txt...
the coding is as follows

[card]
name=Arbor Elf
mana={g}
auto=soulbond 1/3
auto=soulbond {t}:add{g}
abilities=soulbond
type=Creature
subtype=Elf Druid
power=1
toughness=1
[/card]

auto=soulbond *any ability supported by wagic*
abilities=soulbond

the above arbor elf gives itself and its soulbond creature a 1/3 bonus and the ability to tap for green mana.
2012-07-16 14:59:46 +00:00
omegablast2002@yahoo.com
7024d195fa never got around to commiting this deck, have a couple others also. this deck show cases ai's ability to counterspell. 2012-07-15 23:12:01 +00:00
punkeduard@gmail.com
591b1535a6 Fixed Agility, Chlorophant. Fixed typos in Auriok Windwalker, Akki Underminer, Brass Squire, Cabal Slaver, Kor Outfitter,Pillar Tombs of Aku in 'battefield', added burning vengeance. 2012-07-14 16:44:19 +00:00
punkeduard@gmail.com
e29f95cb6c Added Avacyn Restored, Wagic 13 and Plancechase 2 primitives, each in separate text files, TODO merge into mtg, test more extensive and fix bugs. 2012-07-14 16:24:36 +00:00
punkeduard@gmail.com
973a835181 Adding Wagic 13 and Planechase 2 Folders and _cards.dat to the sets 2012-07-14 16:06:02 +00:00
Xawotihs@gmail.com
a8492b7c5a Fixed compilation with mingwin 2012-06-01 23:36:18 +00:00
Xawotihs@gmail.com
6dafc098cb and again 2012-05-20 14:18:24 +00:00
Xawotihs@gmail.com
f87a81f7ea Fixed meego changelog 2012-05-20 14:08:57 +00:00
Xawotihs@gmail.com
e14ec67a84 Updated meego changelog 2012-05-19 20:52:00 +00:00
Xawotihs@gmail.com
4540499b38 and again 2012-05-19 19:40:32 +00:00
Xawotihs@gmail.com
c10b5ce220 and again 2012-05-19 19:35:23 +00:00
Xawotihs@gmail.com
298231add1 and again 2012-05-19 19:30:20 +00:00
Xawotihs@gmail.com
113e5ba2b4 Fixed format of the maemo changelog 2012-05-19 19:25:35 +00:00
Xawotihs@gmail.com
f9795661b8 Updated maemo changelog 2012-05-19 19:20:02 +00:00
Xawotihs@gmail.com
a5195409c4 Added automatic generation of maemo and meego debian changelog based on the new version tools 2012-05-14 21:41:21 +00:00
Xawotihs@gmail.com
d37f44724b Revert previous commit, it does not do what I want. 2012-05-13 20:34:56 +00:00
Xawotihs@gmail.com
0d5e8e39c5 Activated revision property 2012-05-13 19:53:37 +00:00
techdragon.nguyen@gmail.com
e2a0fef600 * updated release version to 0.18.6
* updated build tools to have core files zip naming scheme be based on version information contained in build.number.properties
* added new python library to allow reading java property files, remember to add the library to your PYTHONPATH before executing the python script otherwise the script will fail.

`
2012-05-07 05:09:12 +00:00
omegablast2002@yahoo.com
baf4b3b8da correction for the removal of main types when building a CD for share!types! targetchooser. 2012-05-06 18:21:24 +00:00
omegablast2002@yahoo.com
71183d23b6 cosmetic bug fix issue854
adjusted the calculation of x for enstack attackers to avoid drawing cards on top of the phase wheel out outside of the red box. adjusted the red box length for uniformity.
the previous calculation only drew cards to the middle of the screen and after about 15 attackers it pushed cards out of the red box, over on top of the phase wheel making it impossible to click or touch requiring alternative methods to advance to damage phase or reduction of the amount of attackers.

the new calculation draws attackers at the start of the red box keeping the enstack a cardwidth and a half from the edge of the screen on both sides instead instacking massive amounts of attackers tighter inside the red box, much how we handle battlefield enstack...attacking with more then 40 creatures no longer pushes attackers off screen.
2012-05-06 09:14:45 +00:00
omegablast2002@yahoo.com
fcf3685800 removed boon reflection, a life gain trigger that resolves to gain life...is not equal to "gain twice as much" it much makes it infinite. 2012-05-05 21:24:17 +00:00
omegablast2002@yahoo.com
0503be97ba added a check for uppercase x in manacost, when i added specific cost comparing value == "x" instead of 'x' fudged up some of the x cards which had x in caps. thanks for catching kevlahnota! 2012-05-05 15:23:28 +00:00
omegablast2002@yahoo.com
7b140987cf more card code fixes from the forum reports now... 2012-05-05 11:39:54 +00:00
omegablast2002@yahoo.com
7169df14c8 several card code fixes from the issues reports. 2012-05-05 11:25:10 +00:00
omegablast2002@yahoo.com
0c9bf6938b Sensei Golden-Tail corrected, thanks kevlahnota 2012-05-02 13:06:43 +00:00
omegablast2002@yahoo.com
30b7133862 updated venser. 2012-05-02 13:01:10 +00:00
omegablast2002@yahoo.com
e67e2e669c fix for emblems not sticking, and phasealter not testDestroying. 2012-05-02 12:58:39 +00:00
omegablast2002@yahoo.com
ec7a8d219f updated test to match new card code. 2012-05-02 12:19:20 +00:00
omegablast2002@yahoo.com
b0ab33be82 fix for flip cards changing name after a transforms ability...
I remember adding that patchwork fix a long time ago, not sure if whatever it fixed was even really an issue or just a overprotective line i added. either way if it was an issue, addType is what should re-add the name, not transformer ability.
2012-05-01 15:52:16 +00:00
omegablast2002@yahoo.com
50059e0b89 fix for eachother dynamicability 2012-04-30 12:51:11 +00:00
punkeduard@gmail.com
76a2b94ace Added name and corrected lands rarity 2012-04-30 03:08:44 +00:00
punkeduard@gmail.com
592915eece Added metadata, corrected AVR lands rarity 2012-04-30 00:09:42 +00:00
punkeduard@gmail.com
ff336c431d Added two sets folders and their _cards.dat
AVR Avacyn Restored
VVK Venser vs Koth
2012-04-29 17:33:35 +00:00
omegablast2002@yahoo.com
0a7c21abef Bloodhusk Ritualist cost was wrong 2012-04-29 14:02:46 +00:00
omegablast2002@yahoo.com
6687c1408f akki underminer code change 2012-04-27 20:08:36 +00:00
omegablast2002@yahoo.com
5d73feaaf3 various card code optimizations based on kevlahnota versions, thanks kevlahnota! 2012-04-27 19:45:07 +00:00
omegablast2002@yahoo.com
5a85c9f330 a series of card code bugs fixed, thanks dopple 2012-04-27 13:20:07 +00:00
omegablast2002@yahoo.com
bd4baff4a5 updated Painful Quandary and corrected black cat 2012-04-26 19:39:00 +00:00
omegablast2002@yahoo.com
fcc55bee8c fixed "bad line" errors 2012-04-26 11:45:10 +00:00
omegablast2002@yahoo.com
8441870bed eternity vessal text= added 2012-04-26 10:59:48 +00:00
omegablast2002@yahoo.com
3485132449 many many card code fixes report on forum...no more "sleep coding" doc!!!! 2012-04-26 10:38:20 +00:00
techdragon.nguyen@gmail.com
28901491ac update to build.xml to allow incrementing of major, minor and point releases 2012-04-24 18:07:29 +00:00
4259 changed files with 212867 additions and 67926 deletions

243
.gitignore vendored Normal file
View File

@@ -0,0 +1,243 @@
#################
## Eclipse
#################
*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# PDT-specific
.buildpath
#################
## Visual Studio
#################
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlog
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.Publish.xml
*.pubxml
# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
App_Data/*.mdf
App_Data/*.ldf
#############
## Windows detritus
#############
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Mac crap
.DS_Store
#############
## Python
#############
*.py[co]
# Packages
*.egg
*.egg-info
dist/
build/
eggs/
parts/
var/
sdist/
develop-eggs/
.installed.cfg
# Installer logs
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
#Translations
*.mo
#Mr Developer
.mr.developer.cfg
#for XCode and MacOS
## Mac OS X
*.DS_Store
# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
xcuserdata/
# Generated files
*.o
*.pyc
#Python modules
MANIFEST
dist/
build/
# Backup files
*~.nib

6
.gitmodules vendored Normal file
View File

@@ -0,0 +1,6 @@
[submodule "thirdparty/zlib"]
path = thirdparty/zlib
url = https://github.com/madler/zlib
[submodule "thirdparty/SDL2"]
path = thirdparty/SDL2
url = https://github.com/spurious/SDL-mirror.git

153
.travis.yml Normal file
View File

@@ -0,0 +1,153 @@
language: cpp
branches:
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:
- 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_TYPE" == "PSP" ]; then
export PSPDEV="$TRAVIS_BUILD_DIR/opt/pspsdk" &&
export PSPSDK="$PSPDEV/psp/sdk" &&
export PATH="$PATH:$PSPDEV/bin:$PSPSDK/bin" &&
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 http://dl.google.com/android/ndk/android-ndk-r9-linux-x86_64.tar.bz2 -nv &&
wget https://bitbucket.org/ewing/sdl_androidcmake/get/4e9e88c03f04.zip -nv;
fi
# Building for Qt here
- 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 apt-get install -qq qt5-qmake qtbase5-dev qtdeclarative5-dev qttools5-dev qtmultimedia5-dev pulseaudio libpulse-dev &&
export QMAKE="qmake -qt=qt5";
fi
# 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 [[ "${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:
- 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

221
CHANGELOG.md Normal file
View File

@@ -0,0 +1,221 @@
# Changelog
## [latest-master] (https://github.com/WagicProject/wagic/tree/latest-master)
#### 8/3/16
- *Merged pull-request:* andAbility on ATokenCreator, Extend AAFlip [#\824] (https://github.com/WagicProject/wagic/pull/824) ([kevlahnota](https://github.com/kevlahnota))
#### 7/31/16
- *Merged pull-request:* Fix Chandra, Flamecaller & Cryptolith Rite [#\818] (https://github.com/WagicProject/wagic/pull/818) ([kevlahnota](https://github.com/kevlahnota))
#### 7/28/16
- *Merged pull-request:* changing some of the logic to the previous fixes, we want to avoid using code that looks for specific card names. [#\800] (https://github.com/WagicProject/wagic/pull/800) ([zethfoxster](https://github.com/zethfoxster))
#### 7/26/16
- *Merged pull-request:* granted flashback [#\791] (https://github.com/WagicProject/wagic/pull/791) ([kevlahnota](https://github.com/kevlahnota))
#### 7/23/16
- *Merged pull-request:* Fix Flying vs Moat (multiples of them). Fixes issue #526 [#\783] (https://github.com/WagicProject/wagic/pull/783) ([kevlahnota](https://github.com/kevlahnota))
#### 7/19/16
- *Merged pull-request:* pushing to master [#\770] (https://github.com/WagicProject/wagic/pull/770) ([zethfoxster](https://github.com/zethfoxster))
#### 7/18/16
- *Merged pull-request:* Fix Deck Menu layer, Change Main Menu Layout, Fix Crash cdaactive on tokens [#\765] (https://github.com/WagicProject/wagic/pull/765) ([kevlahnota](https://github.com/kevlahnota))
#### 7/12/16
- *Merged pull-request:* Pushing fixes [#\750] (https://github.com/WagicProject/wagic/pull/750) ([zethfoxster](https://github.com/zethfoxster))
- *Merged pull-request:* try to fix failed logic here [#\747] (https://github.com/WagicProject/wagic/pull/747) ([kevlahnota](https://github.com/kevlahnota))
#### 7/9/16
- *Merged pull-request:* pushing to master [#\738] (https://github.com/WagicProject/wagic/pull/738) ([zethfoxster](https://github.com/zethfoxster))
- *Merged pull-request:* Sorted Primitives and Cleanup Tabs [#\736] (https://github.com/WagicProject/wagic/pull/736) ([kevlahnota](https://github.com/kevlahnota))
#### 7/7/16
- *Merged pull-request:* Sorted Primitives and Cleanup Tabs [#\727] (https://github.com/WagicProject/wagic/pull/719) ([kevlahnota](https://github.com/kevlahnota))
- *Merged pull-request:* push to wagicproject [#\725] (https://github.com/WagicProject/wagic/pull/725) ([zethfoxster](https://github.com/zethfoxster))
#### 7/4/16
- *Merged pull-request:* Sorted Primitives & Updated Premium Deck Series [#\719] (https://github.com/WagicProject/wagic/pull/719) ([kevlahnota](https://github.com/kevlahnota))
- *Merged pull-request:* Fails but I have no idea why [#\717] (https://github.com/WagicProject/wagic/pull/717) ([zethfoxster](https://github.com/zethfoxster))
- *Merged pull-request:* Updated Sets [#\715] (https://github.com/WagicProject/wagic/pull/715) ([kevlahnota](https://github.com/kevlahnota))
#### 7/2/16
- *Merged pull-request:* Updated Masters, Beginners, Duels and Vault Sets [#\714] (https://github.com/WagicProject/wagic/pull/714) ([kevlahnota](https://github.com/kevlahnota))
#### 7/1/16
- *Merged pull-request:* Cleaned and Sorted all Core and Expansion Sets [#\713] (https://github.com/WagicProject/wagic/pull/713) ([kevlahnota](https://github.com/kevlahnota))
- *Merged pull-request:* Soulbond Pair Indicator [#\712] (https://github.com/WagicProject/wagic/pull/712) ([kevlahnota](https://github.com/kevlahnota))
#### 6/30/16
- *Merged pull-request:* Sorted Primitives [#\711] (https://github.com/WagicProject/wagic/pull/711) ([kevlahnota](https://github.com/kevlahnota))
- *Merged pull-request:* Add Shackle Ability [#\710] (https://github.com/WagicProject/wagic/pull/710) ([kevlahnota](https://github.com/kevlahnota))
- *Merged pull-request:* Fix Cascade, Crash fix on lastController and some corrections [#\709] (https://github.com/WagicProject/wagic/pull/709) ([kevlahnota](https://github.com/kevlahnota))
#### 6/29/16
- *Merged pull-request:* Updated Primitives and Hide Highlight Border [#\707] (https://github.com/WagicProject/wagic/pull/707) ([kevlahnota](https://github.com/kevlahnota))
- *Committed:* Pretty huge patch here(sorry old habits never die :( ) [#\6ee00c1] (https://github.com/WagicProject/wagic/commit/6ee00c138ce374d54cb3ee034575ce440288ca0e) ([zethfoxster](https://github.com/zethfoxster))
#### 6/23/16
- *Merged pull-request:* Fix producecolor:color [#\704] (https://github.com/WagicProject/wagic/pull/704) ([kevlahnota](https://github.com/kevlahnota))
#### 6/17/16
- *Merged pull-request:* Force Mounting 2 [#\699] (https://github.com/WagicProject/wagic/pull/699) ([kevlahnota](https://github.com/kevlahnota))
#### 6/16/16
- *Merged pull-request:* Import Deck Options [#\697] (https://github.com/WagicProject/wagic/pull/697) ([kevlahnota](https://github.com/kevlahnota))
#### 6/11/16
- *Merged pull-request:* Refactor & Devotion [#\690] (https://github.com/WagicProject/wagic/pull/690) ([kevlahnota](https://github.com/kevlahnota))
#### 6/9/16
- *Closed issue:* Clone goes to graveyard before being able to copy anything [\#546](https://github.com/WagicProject/wagic/issues/546)
- *Closed issue:* Blinking an aura causes freeze [\#541](https://github.com/WagicProject/wagic/issues/541)
- *Closed issue:* Profile name at upper left side is not being updated correctly [\#469](https://github.com/WagicProject/wagic/issues/469)
- *Closed issue:* Giving card C protection from X does not remove cards attached to C which have quality X [\#464](https://github.com/WagicProject/wagic/issues/464)
- *Closed issue:* (graphical glitch) wood / gold textures [\#461](https://github.com/WagicProject/wagic/issues/461)
- *Closed issue:* Clone does not get all P/T bonuses [\#448](https://github.com/WagicProject/wagic/issues/448)
- *Closed issue:* Card "threaten" messes up the GUI [\#473](https://github.com/WagicProject/wagic/issues/473)
#### 6/7/16
- *Closed issue:* Emrakul isn't killed by creatures with deathtouch [\#597](https://github.com/WagicProject/wagic/issues/597)
#### 6/3/16
- *Merged pull-request:* Cost Increaser & Reducer Fix [#\676] (https://github.com/WagicProject/wagic/pull/676) ([kevlahnota](https://github.com/kevlahnota))
#### 5/30/16
- *Fixed Bug:* deckstats crash when "unlock cards" is used [#\668] (https://github.com/WagicProject/wagic/issues/668) ([zethfoxster](https://github.com/zethfoxster))
#### 5/26/16
- *Closed issue:* Nasty memleak crashing devices and its fix. [#\664] (https://github.com/WagicProject/wagic/issues/664) ([zethfoxster](https://github.com/zethfoxster))
#### 11/08/15
- *Merged pull-request:* produce mana for lands you/opponent could produce [#\658] (https://github.com/WagicProject/wagic/pull/658) ([kevlahnota](https://github.com/kevlahnota))
#### 11/07/15
- *Merged pull-request:* Manacost Changes, Anyzone for CDA, PayZero Cost [#\656] (https://github.com/WagicProject/wagic/pull/656) ([kevlahnota](https://github.com/kevlahnota))
#### 10/31/15
- *Merged pull-request:* Exile Zone, Altercost and Hand modifier [#\653] (https://github.com/WagicProject/wagic/pull/653) ([kevlahnota](https://github.com/kevlahnota))
#### 10/17/15
- *Merged pull-request:* Fix issue #473 #784 [#\646] (https://github.com/WagicProject/wagic/pull/646) ([kevlahnota](https://github.com/kevlahnota))
#### 10/15/15
- *Merged pull-request:* Bug Fix: Planeswalker Rule & ABlink return to play ability for Aura cards [#\644] (https://github.com/WagicProject/wagic/pull/644) ([kevlahnota](https://github.com/kevlahnota))
#### 10/14/15
- *Merged pull-request:* Fix Legend Rule [#\643] (https://github.com/WagicProject/wagic/pull/643) ([kevlahnota](https://github.com/kevlahnota))
#### 10/12/15
- *Merged pull-request:* Fix crash bug, support doubled res texture for background, avatars, menutitle [#\641] (https://github.com/WagicProject/wagic/pull/641) ([kevlahnota](https://github.com/kevlahnota))
#### 10/02/15
- *Merged pull-request:* LKI for power, toughness and basic abilities, produceextra ability [#\636] (https://github.com/WagicProject/wagic/pull/636) ([kevlahnota](https://github.com/kevlahnota))
#### 09/29/15
- *Merged pull-request:* Fix Recover Cards, Cloner, Copier, and Preliminary support for Madness [#\635] (https://github.com/WagicProject/wagic/pull/635) ([kevlahnota](https://github.com/kevlahnota))
#### 09/22/15
- *Merged pull-request:* Auraward, unattach event and statebased action for protection from quality [#\631] (https://github.com/WagicProject/wagic/pull/631) ([kevlahnota](https://github.com/kevlahnota))
#### 09/19/15
- *Merged pull-request:* PT Switch like Layer 7e and Token Indicator [#\626] (https://github.com/WagicProject/wagic/pull/626) ([kevlahnota](https://github.com/kevlahnota))
#### 09/18/15
- *Merged pull-request:* Token Cloning fix and colored PT [#\624] (https://github.com/WagicProject/wagic/pull/624) ([kevlahnota](https://github.com/kevlahnota))
#### 09/15/15
- *Merged pull-request:* CDA and X manacost on stack [\#623] (https://github.com/WagicProject/wagic/pull/623) ([kevlahnota](https://github.com/kevlahnota))
#### 08/12/14
- *Merged pull-request:* Fix for guild_keywords Devotion, added some "Chroma" cards [\#606](https://github.com/WagicProject/wagic/pull/606) ([kevlahnota](https://github.com/kevlahnota))
- *Merged pull-request:* added guild keywords, added specific life cost [\#605](https://github.com/WagicProject/wagic/pull/605) ([kevlahnota](https://github.com/kevlahnota))
- *Merged pull-request:* Buyback issue and a fix [\#604](https://github.com/WagicProject/wagic/pull/604) ([apollovy](https://github.com/apollovy))
- *Merged pull-request:* Feature/ios update xcode5.1 [\#602](https://github.com/WagicProject/wagic/pull/602) ([mjnguyen](https://github.com/mjnguyen))
- *Merged pull-request:* Remove dead code and fix circular initialization [\#601](https://github.com/WagicProject/wagic/pull/601) ([ZobyTwo](https://github.com/ZobyTwo))
- *Merged pull-request:* update android build tools version [\#600](https://github.com/WagicProject/wagic/pull/600) ([Rolzad73](https://github.com/Rolzad73))
- *Merged pull-request:* Attempt to make android tools fetching for TravisCI explicit and futureproof [\#599](https://github.com/WagicProject/wagic/pull/599) ([Rolzad73](https://github.com/Rolzad73))
- *Merged pull-request:* Damager keyword [\#598](https://github.com/WagicProject/wagic/pull/598) ([bjornsnoen](https://github.com/bjornsnoen))
- *Merged pull-request:* Fix a rarity mistake and a grammatical error [\#596](https://github.com/WagicProject/wagic/pull/596) ([bjornsnoen](https://github.com/bjornsnoen))
- *Merged pull-request:* Fix bug where the phase wheel got out of sync [\#588](https://github.com/WagicProject/wagic/pull/588) ([ZobyTwo](https://github.com/ZobyTwo))
- *Merged pull-request:* More easing [\#586](https://github.com/WagicProject/wagic/pull/586) ([ZobyTwo](https://github.com/ZobyTwo))
- *Merged pull-request:* Added Avatar Tokens created by Ajani Goldmane. [\#585](https://github.com/WagicProject/wagic/pull/585) ([bjornsnoen](https://github.com/bjornsnoen))
- *Merged pull-request:* Cleanup, usability fixes and source code documentation for DeckView.h and GridDeckView.h [\#583](https://github.com/WagicProject/wagic/pull/583) ([ZobyTwo](https://github.com/ZobyTwo))
- *Fixed bug:* Blight does not destroy at the end of turn but right now [\#592](https://github.com/WagicProject/wagic/issues/592)
- *Fixed bug:* game freezes on Android when the phone returns from "sleep mode" [\#544](https://github.com/WagicProject/wagic/issues/544)
- *Fixed bug:* Android port needs to be able to respond to attaching/detaching devices to it [\#522](https://github.com/WagicProject/wagic/issues/522)
## [alpha-195] (https://github.com/WagicProject/wagic/tree/alpha-195)
#### 07/12/13
- *Merged pull-request:* Reset positions and filters when reopening the editor [\#578](https://github.com/WagicProject/wagic/pull/578) ([ZobyTwo](https://github.com/ZobyTwo))
- *Merged pull-request:* Deck viewer [\#577](https://github.com/WagicProject/wagic/pull/577) ([ZobyTwo](https://github.com/ZobyTwo))
- *Merged pull-request:* Do not specify the system directory in JGE [\#576](https://github.com/WagicProject/wagic/pull/576) ([ZobyTwo](https://github.com/ZobyTwo))
- *Merged pull-request:* Changed Travis build file to use Android API 10 and Android build tools 18.1.1 [\#575](https://github.com/WagicProject/wagic/pull/575) ([Rolzad73](https://github.com/Rolzad73))
- *Merged pull-request:* Feature/play from grave [\#574](https://github.com/WagicProject/wagic/pull/574) ([pankdm](https://github.com/pankdm))
- *Merged pull-request:* Fix Valgrind warnings appearing during the test suit. [\#573](https://github.com/WagicProject/wagic/pull/573) ([ZobyTwo](https://github.com/ZobyTwo))
- *Merged pull-request:* Strings 2 [\#572](https://github.com/WagicProject/wagic/pull/572) ([ZobyTwo](https://github.com/ZobyTwo))
- *Merged pull-request:* Android travis ci [\#570](https://github.com/WagicProject/wagic/pull/570) ([xawotihs](https://github.com/xawotihs))
- *Merged pull-request:* Android NDK build fix [\#569](https://github.com/WagicProject/wagic/pull/569) ([Rolzad73](https://github.com/Rolzad73))
- *Merged pull-request:* Add a few namespaces and fix header guards. [\#564](https://github.com/WagicProject/wagic/pull/564) ([ZobyTwo](https://github.com/ZobyTwo))
- *Merged pull-request:* Updated deckmenu.cpp to properly render deck description and summary [\#562](https://github.com/WagicProject/wagic/pull/562) ([citiral](https://github.com/citiral))
- *Merged pull-request:* Fix some valgrind memcheck warnings. However there remains one... [\#561](https://github.com/WagicProject/wagic/pull/561) ([ZobyTwo](https://github.com/ZobyTwo))
- *Merged pull-request:* Remove some dead code [\#560](https://github.com/WagicProject/wagic/pull/560) ([ZobyTwo](https://github.com/ZobyTwo))
- *Merged pull-request:* Show output only for failing tests [\#559](https://github.com/WagicProject/wagic/pull/559) ([pankdm](https://github.com/pankdm))
- *Merged pull-request:* Defines/Typos [\#557](https://github.com/WagicProject/wagic/pull/557) ([ZobyTwo](https://github.com/ZobyTwo))
- *Merged pull-request:* Simplify Damage::resolve a bit [\#556](https://github.com/WagicProject/wagic/pull/556) ([ZobyTwo](https://github.com/ZobyTwo))
- *Merged pull-request:* Fix cranial plating [\#555](https://github.com/WagicProject/wagic/pull/555) ([pankdm](https://github.com/pankdm))
- *Merged pull-request:* Android cleanup [\#1](https://github.com/WagicProject/wagic/pull/1) ([Rolzad73](https://github.com/Rolzad73))
- *Fixed bug:* Iona and Nin don't work [\#527](https://github.com/WagicProject/wagic/issues/527)
- *Closed issue:* Less verbose output of tests at Travis [\#558](https://github.com/WagicProject/wagic/issues/558)
## [wagic-0.19.2] (https://github.com/WagicProject/wagic/tree/wagic-v0.19.2)
#### 28/10/13

239
CMakeLists.txt Normal file
View File

@@ -0,0 +1,239 @@
cmake_minimum_required(VERSION 2.8.7)
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" 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)))
#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()
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()

View 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()

View 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)

View 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)

View File

@@ -0,0 +1,231 @@
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)
set(SDL_SHARED FALSE)
endif()
add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/SDL2)
set(SDL2_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/SDL2/include ${CMAKE_BINARY_DIR}/thirdparty/SDL2)
if(EMSCRIPTEN)
set(SDL2_LIBRARY SDL2-static)
else()
set(SDL2_LIBRARY SDL2)
endif()
elseif(NOT EMSCRIPTEN)
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)
set(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/thirdparty/zlib ${CMAKE_BINARY_DIR}/thirdparty/zlib)
set(ZLIB_LIBRARIES zlib)
else()
if(WIN32)
set(ZLIB_ROOT ${CMAKE_SOURCE_DIR}/thirdparty/binary/win)
find_package(ZLIB)
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()
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(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()

View 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
View 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
View 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 )

File diff suppressed because it is too large Load Diff

View 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)

View 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
View 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
View 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)

View File

@@ -73,7 +73,7 @@
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>src/zipFS;Dependencies/SDL/include;Dependencies/include;$(JGEEXTRAS);../Boost;../projects/mtg/include;include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>SDL_CONFIG;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>TIXML_USE_STL; SDL_CONFIG;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -101,7 +101,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>src/zipFS;Dependencies/SDL/include;Dependencies/include;$(JGEEXTRAS);../Boost;../projects/mtg/include;include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>SDL_CONFIG;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>TIXML_USE_STL; SDL_CONFIG;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
@@ -129,7 +129,7 @@
<Optimization>Full</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>src/zipFS;Dependencies/SDL/include;Dependencies/include;$(JGEEXTRAS);../Boost;../projects/mtg/include;include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>SDL_CONFIG;WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_HAS_ITERATOR_DEBBUGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>TIXML_USE_STL; SDL_CONFIG;WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_HAS_ITERATOR_DEBBUGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>

View File

@@ -31,6 +31,8 @@ HGE_OBJS = src/hge/hgecolor.o src/hge/hgeparticle.o \
CXXFLAGS = -W -Wall -Werror -Wno-unused
CXXFLAGS += -DTIXML_USE_STL
CXXFLAGS += -Wno-deprecated-declarations -Wno-sign-compare
ifdef DEBUG
CXXFLAGS += -ggdb3
@@ -81,7 +83,7 @@ ifeq ($(TARGET_ARCHITECTURE),linux)
OBJS = $(GENERIC_OBJS) $(LINUX_OBJS)
TARGET_LIB = libjge.a
TARGET_HGE = libhgetools.a
INCDIR = $(shell freetype-config --cflags 2> /dev/null) -I/usr/X11/include -I../Boost -Isrc/zipFS -Iinclude/
INCDIR = $(shell freetype-config --cflags 2> /dev/null) -I/usr/X11/include -I/usr/include/boost -Isrc/zipFS -Iinclude/
CXXFLAGS += -DLINUX $(FMOD)
CXXFLAGS += $(INCDIR)
LIBDIR = lib/linux

View File

@@ -4,6 +4,8 @@
// dirty, but I get OS header includes this way
#include "JGE.h"
#include "OutputCapturer.h"
#include <ostream>
#include <iostream>
#include <iomanip>
@@ -16,39 +18,51 @@ using namespace std;
template <class T>
std::string ToHex(T* pointer)
{
std::ostringstream stream;
stream << hex << showbase << setfill('0') << setw(8) << (uint64_t) pointer;
return stream.str();
std::ostringstream stream;
stream << hex << showbase << setfill('0') << setw(8) << (uint64_t) pointer;
return stream.str();
}
#ifdef LINUX
#define OutputDebugString(val) (std::cerr << val);
#define OutputDebugStringA(val) (std::cerr << val);
#endif
#ifdef _DEBUG
#if defined (WIN32) || defined (LINUX)
#ifdef QT_CONFIG
#define DebugTrace(inString) \
{ \
std::ostringstream stream; \
stream << inString << std::endl; \
qDebug(stream.str().c_str()); \
}
#elif defined (ANDROID)
#include <android/log.h>
#ifdef CAPTURE_STDERR
#define DebugTrace(inString) \
{ \
std::ostringstream stream; \
stream << inString; \
__android_log_write(ANDROID_LOG_DEBUG, "Wagic", stream.str().c_str());\
OutputCapturer::add(stream.str()); \
}
#else // CAPTURE_STDERR
#define DebugTrace(inString) \
{ \
std::ostringstream stream; \
stream << inString; \
qDebug("%s", stream.str().c_str()); \
}
#endif // CAPTURE_STDERR
#elif defined (ANDROID)
#include <android/log.h>
#define DebugTrace(inString) \
{ \
std::ostringstream stream; \
stream << inString; \
__android_log_write(ANDROID_LOG_DEBUG, "Wagic", stream.str().c_str());\
}
#else
#define DebugTrace(inString) \
{ \
std::ostringstream stream; \
stream << inString << std::endl; \
OutputDebugString(stream.str().c_str()); \
OutputDebugStringA(stream.str().c_str()); \
}
#endif // QT_CONFIG
#endif // Win32, Linux
@@ -58,7 +72,7 @@ std::string ToHex(T* pointer)
#ifndef DebugTrace
#define DebugTrace(inString) \
{ \
std::cerr << inString << std::endl; \
std::cerr << inString << std::endl; \
}
#endif //DEBUG
#endif

134
JGE/include/Downloader.h Normal file
View File

@@ -0,0 +1,134 @@
#ifndef DOWNLOADER_H
#define DOWNLOADER_H
//-------------------------------------------------------------------------------------
//
// This class handles download of remote resources (any kind of file)
// All the resources are stored locally in the userPath
// For every resources, the downloader verifies if the resource was modifed
// on the server before downloading the update. The Downloader maintains a catalogue
// of resource downloaded to be able to check if they need to be updated.
//
// The interface can be used completly synchronously by the application and some
// context or message loop is needed in the implementation of this interface
//
// Note that the Downloader could in theory by implemented on top of JNetwork.
//
//-------------------------------------------------------------------------------------
#include <string>
#include <ostream>
#include <istream>
#include <fstream>
#include <map>
#include "Threading.h"
#ifdef QT_CONFIG
#include <QObject>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QNetworkAccessManager>
#endif
using namespace std;
class DownloadRequest
#ifdef QT_CONFIG
: public QObject
#endif
{
#ifdef QT_CONFIG
Q_OBJECT
private slots:
#endif
void fileDownloaded();
void downloadProgress(int64_t bytesReceived, int64_t bytesTotal);
#ifdef QT_CONFIG
signals:
void percentChanged(int percent);
void statusChanged(int);
#endif
public:
typedef enum {
NOT_PRESENT,
DOWNLOADING,
DOWNLOADED,
DOWNLOAD_ERROR
} DownloadStatus;
protected:
string mLocalPath;
string mRemoteResourceURL;
// previous one is the original, next one can change after redirection
string mRequestedRemoteResourceURL;
string mETag;
DownloadStatus mDownloadStatus;
bool mUpgradeAvailable;
size_t mTotalSize;
size_t mCurrentSize;
ofstream mFile;
#ifdef QT_CONFIG
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="",
string remoteResourceURL="",
string ETag = "",
DownloadStatus downloadStatus=NOT_PRESENT,
size_t totalSize = 0,
size_t currentSize = 0);
~DownloadRequest();
static bool NetworkIsAccessible();
string getTempLocalPath() const { return (mLocalPath+".tmp"); };
string getLocalPath() const { return mLocalPath; };
string getRemoteResource() const { return mRemoteResourceURL; };
string getETag() const { return mETag; };
void startGet();
void startHead();
DownloadStatus getDownloadStatus() const { return mDownloadStatus; };
bool upgradeAvailable() const { return mUpgradeAvailable; };
void getSizes(size_t& totalSize, size_t&currentSize) {
totalSize = mTotalSize;
currentSize = mCurrentSize;
};
friend ostream& operator<<(ostream& out, const DownloadRequest& d);
friend istream& operator>>(istream&, DownloadRequest&);
friend class Downloader;
};
class Downloader
{
protected:
Downloader(string globalRemoteURL="", string localCacheRecords="");
virtual ~Downloader();
static Downloader* mInstance;
string mGlobalRemoteURL;
string mLocalCacheRecords;
boost::mutex mMutex;
map<string, DownloadRequest*> mRequestMap;
public:
static Downloader* GetInstance();
static void Release();
void Update();
DownloadRequest* Get(string localPath, string remoteResourceURL="");
friend ostream& operator<<(ostream& out, const Downloader& d);
friend istream& operator>>(istream&, Downloader&);
};
#endif // DOWNLOADER_H

View File

@@ -297,7 +297,6 @@ public:
private:
float mTimer;
float mFrameTime;
JAnimator* mAnimator;
vector<JAnimatorObject *> mObjects;
};

View File

@@ -37,7 +37,6 @@ private:
float mTexY;
float mTexWidth;
float mTexHeight;
JTexture* mTexture;
JQuad* mQuad;

View File

@@ -128,6 +128,7 @@ public:
bool readIntoString(const string & FilePath, string & target);
bool openForWrite(ofstream & File, const string & FilePath, ios_base::openmode mode = ios_base::out );
bool Rename(string from, string to);
bool Remove(string aFile);
//Returns true if strFilename exists somewhere in the fileSystem
bool FileExists(const string& strFilename);
@@ -163,4 +164,4 @@ protected:
#endif
#endif

View File

@@ -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)
@@ -44,6 +44,17 @@ typedef WPARAM LocalKeySym;
#include <X11/keysym.h>
typedef KeySym LocalKeySym;
#define LOCAL_KEY_NONE XK_VoidSymbol
#undef Status
#undef Bool
#undef None
#undef CursorShape
#undef KeyPress
#undef KeyRelease
#undef FocusIn
#undef FocusOut
#undef FontChange
#undef Unsorted
#undef GrayScale
#elif defined(ANDROID) // This is temporary until we understand how to send real key events from Java
typedef long unsigned int LocalKeySym;

View File

@@ -61,7 +61,7 @@ public:
virtual bool ButtonPressed(); // action button pressed, return false to ignore
// Used for mouse support so that the GUI engine can found out which Object was selected
virtual bool getTopLeft(float& top, float& left)
virtual bool getTopLeft(float&, float&)
{
return false;
}
@@ -104,7 +104,7 @@ public:
int mCount;
JGuiController(JGE* jge, int id, JGuiListener* listener);
~JGuiController();
virtual ~JGuiController();
virtual void Render();
virtual void Update(float dt);

View File

@@ -172,13 +172,12 @@ private:
float mHeight;
float mScale;
float mTextureScale;
float mRotation;
float mTracking;
float mSpacing;
PIXEL_TYPE mColor;
int mBlend;
int mBase;
};

View File

@@ -13,34 +13,42 @@ class JSocket;
#include <sstream>
#include "Threading.h"
typedef void(*processCmd)(istream&, ostream&);
typedef void(*processCmd)(void*, stringstream&, stringstream&);
class JNetwork {
private:
private:
boost::thread *mpWorkerThread;
struct CommandStruc{
void* object;
string command;
processCmd processCommand;
};
string serverIP;
int connected_to_ap;
JSocket* socket;
boost::mutex sendMutex;
boost::mutex receiveMutex;
stringstream received;
stringstream toSend;
static map<string, processCmd> sCommandMap;
static map<string, CommandStruc> sCommandMap;
public:
JNetwork();
~JNetwork();
string serverIP;
void Update();
void getServerIp(string& aString);
int connect(string serverIP = "");
int connect(const string& serverIP = "");
bool isConnected();
bool isServer() { return serverIP == ""; };
static void ThreadProc(void* param);
#if !defined (WIN32) && !defined (LINUX)
static int connect_to_apctl(int config);
#endif
bool sendCommand(string command);
static void registerCommand(string command, processCmd processCommand, processCmd processResponse);
private:
boost::thread *mpWorkerThread;
bool sendCommand(const string& command, const string& payload = "", const string& suffix = "Request");
static void registerCommand(string command, void* object, processCmd processRequest, processCmd processResponse);
};
#endif

View File

@@ -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 ?
@@ -578,7 +578,7 @@ private:
#if (!defined PSP)
GLuint mCurrentTex;
#if (defined GL_ES_VERSION_2_0) || (defined GL_VERSION_2_0) || (defined WIN32)
#if ((defined GL_ES_VERSION_2_0) || (defined GL_VERSION_2_0) || (defined WIN32)) && (!defined CONSOLE_CONFIG)
// MVP matrix
ESMatrix theMvpMatrix;
@@ -598,8 +598,6 @@ private:
GLint prog2_positionLoc;
GLint prog2_texCoordLoc;
GLint prog2_colorLoc;
// MVP matrix
ESMatrix prog2_mvpMatrix;
// Uniform locations
GLint prog2_mvpLoc;
@@ -612,13 +610,11 @@ private:
int mCurrentTextureFormat;
#endif
#ifdef PSP
bool mVsync;
int mTexCounter;
#endif
int mSwizzle;
int mTexCounter;
int mCurrentTextureFilter;
int mCurrTexBlendSrc;

View File

@@ -5,6 +5,8 @@
#include "Threading.h"
using namespace std;
#define SERVER_PORT 5001
class JSocket{
public:
typedef enum {
@@ -19,10 +21,11 @@ public:
} SOCKET_STATE;
// Server creation
JSocket(string ipAddr);
// Client creation
JSocket(string ipAddr);
// Server creation
JSocket();
~JSocket();
JSocket* Accept();
@@ -32,6 +35,8 @@ public:
void Disconnect();
private:
// socket state
SOCKET_STATE state;
// socket creation when server accepts a connection
JSocket(int fd);
// convert the socket into non-blocking state
@@ -39,11 +44,9 @@ private:
// socket handle
#ifdef WIN32
SOCKET mfd;
#elif LINUX
#elif LINUX || PSP
int mfd;
#endif
// socket state
SOCKET_STATE state;
};
#endif

View File

@@ -18,34 +18,37 @@
#include "JTypes.h"
#ifdef ANDROID
#include <SLES/OpenSLES.h>
#include "SLES/OpenSLES_Android.h"
#elif defined USE_PHONON
#include <phonon/AudioOutput>
#include <phonon/MediaObject>
#else
#ifdef WIN32
#include <windows.h>
#define WITH_FMOD
#elif defined(USE_PHONON)
#include <phonon/AudioOutput>
#include <phonon/MediaObject>
#elif defined (QT_CONFIG)
#include "QMediaPlayer"
#include "QMediaPlaylist"
#include "QSoundEffect"
#elif defined(WIN32)
#include <windows.h>
//#define WITH_FMOD
#elif defined (PSP)
#include <pspgu.h>
#include <pspkernel.h>
#include <pspdisplay.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <time.h>
#include <string.h>
#include <pspaudiolib.h>
#include <psprtc.h>
#include <pspgu.h>
#include <pspkernel.h>
#include <pspdisplay.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <time.h>
#include <string.h>
#include <pspaudiolib.h>
#include <psprtc.h>
#include "JAudio.h"
#include "JMP3.h"
#include "JAudio.h"
#include "JMP3.h"
#endif
#ifdef WITH_FMOD
#include "../Dependencies/include/fmod.h"
#endif
#include "fmod.h"
#endif
//------------------------------------------------------------------------------------------------
@@ -68,7 +71,7 @@ public:
#ifdef USE_PHONON
Phonon::AudioOutput* mOutput;
Phonon::MediaObject* mMediaObject;
public slots:
public slots:
void seekAtTheBegining();
#elif defined (PSP)
JMP3* mTrack;
@@ -76,16 +79,26 @@ public:
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;
#else
void* mTrack;
#endif //WITH_FMOD
void* mTrack;
#elif (defined QT_CONFIG)
QMediaPlaylist* playlist;
QMediaPlayer* player;
string fullpath;
void* mTrack;
#elif (defined WIN32)
std::string filename;
void* mTrack;
#endif
//#endif //WITH_FMOD
};
@@ -93,33 +106,37 @@ public:
//------------------------------------------------------------------------------------------------
class JSample
{
public:
public:
JSample();
~JSample();
unsigned long fileSize();
#if defined (PSP)
WAVDATA *mSample;
#if (defined QT_CONFIG) && (!defined USE_PHONON)
QMediaPlayer* effect;
void* mSample;
#elif defined (PSP)
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
};
@@ -134,126 +151,130 @@ class JSoundSystem
public:
//////////////////////////////////////////////////////////////////////////
/// Get the singleton instance
///
//////////////////////////////////////////////////////////////////////////
static JSoundSystem* GetInstance();
//////////////////////////////////////////////////////////////////////////
/// Get the singleton instance
///
//////////////////////////////////////////////////////////////////////////
static JSoundSystem* GetInstance();
static void Destroy();
static void Destroy();
//////////////////////////////////////////////////////////////////////////
/// Load music.
///
/// @note MP3 is the only supported format for the moment.
///
/// @param filename - Name of the music file.
///
//////////////////////////////////////////////////////////////////////////
JMusic *LoadMusic(const char *fileName);
//////////////////////////////////////////////////////////////////////////
/// Load music.
///
/// @note MP3 is the only supported format for the moment.
///
/// @param filename - Name of the music file.
///
//////////////////////////////////////////////////////////////////////////
JMusic *LoadMusic(const char *fileName);
//////////////////////////////////////////////////////////////////////////
/// Delete music from memory.
///
/// @param music - Music to be deleted.
///
//////////////////////////////////////////////////////////////////////////
//void FreeMusic(JMusic *music);
//////////////////////////////////////////////////////////////////////////
/// Delete music from memory.
///
/// @param music - Music to be deleted.
///
//////////////////////////////////////////////////////////////////////////
//void FreeMusic(JMusic *music);
//////////////////////////////////////////////////////////////////////////
/// Play music.
///
/// @param music - Music to be played.
/// @param looping - Play the music in a loop.
///
//////////////////////////////////////////////////////////////////////////
void PlayMusic(JMusic *music, bool looping = false);
//////////////////////////////////////////////////////////////////////////
/// Play music.
///
/// @param music - Music to be played.
/// @param looping - Play the music in a loop.
///
//////////////////////////////////////////////////////////////////////////
void PlayMusic(JMusic *music, bool looping = false);
//////////////////////////////////////////////////////////////////////////
/// Stop playing.
///
/// @param music - Music to be stopped.
///
//////////////////////////////////////////////////////////////////////////
void StopMusic(JMusic *music);
//////////////////////////////////////////////////////////////////////////
/// Stop playing.
///
/// @param music - Music to be stopped.
///
//////////////////////////////////////////////////////////////////////////
void StopMusic(JMusic *music);
//////////////////////////////////////////////////////////////////////////
/// Resume playing.
///
/// @param music - Music to be resumed.
///
//////////////////////////////////////////////////////////////////////////
void ResumeMusic(JMusic *music);
//////////////////////////////////////////////////////////////////////////
/// Resume playing.
///
/// @param music - Music to be resumed.
///
//////////////////////////////////////////////////////////////////////////
void ResumeMusic(JMusic *music);
//////////////////////////////////////////////////////////////////////////
/// Pause playing.
///
/// @param music - Music to be paused.
///
//////////////////////////////////////////////////////////////////////////
void PauseMusic(JMusic *music);
//////////////////////////////////////////////////////////////////////////
/// Pause playing.
///
/// @param music - Music to be paused.
///
//////////////////////////////////////////////////////////////////////////
void PauseMusic(JMusic *music);
//////////////////////////////////////////////////////////////////////////
/// Load sound effect.
///
/// @note WAV sound effect only.
///
/// @param fileName - Sound effect for loading.
///
//////////////////////////////////////////////////////////////////////////
JSample *LoadSample(const char *fileName);
//////////////////////////////////////////////////////////////////////////
/// Load sound effect.
///
/// @note WAV sound effect only.
///
/// @param fileName - Sound effect for loading.
///
//////////////////////////////////////////////////////////////////////////
JSample *LoadSample(const char *fileName);
//////////////////////////////////////////////////////////////////////////
/// Delete sound effect from memory.
///
/// @param sample - Sound to be deleted.
///
//////////////////////////////////////////////////////////////////////////
//void FreeSample(JSample *sample);
//////////////////////////////////////////////////////////////////////////
/// Delete sound effect from memory.
///
/// @param sample - Sound to be deleted.
///
//////////////////////////////////////////////////////////////////////////
//void FreeSample(JSample *sample);
//////////////////////////////////////////////////////////////////////////
/// Play sound effect.
///
/// @param sample - Sound for playing.
///
//////////////////////////////////////////////////////////////////////////
void PlaySample(JSample *sample);
//////////////////////////////////////////////////////////////////////////
/// Play sound effect.
///
/// @param sample - Sound for playing.
///
//////////////////////////////////////////////////////////////////////////
void PlaySample(JSample *sample);
//////////////////////////////////////////////////////////////////////////
/// Set volume for audio playback.
///
/// @param volume - New volume.
///
//////////////////////////////////////////////////////////////////////////
void SetVolume(int volume);
//////////////////////////////////////////////////////////////////////////
/// Set volume for audio playback.
///
/// @param volume - New volume.
///
//////////////////////////////////////////////////////////////////////////
void SetVolume(int volume);
void SetMusicVolume(int volume);
void SetMusicVolume(int volume);
void SetSfxVolume(int volume);
void SetSfxVolume(int volume);
int mChannel;
int mChannel;
protected:
JSoundSystem();
~JSoundSystem();
JSoundSystem();
~JSoundSystem();
void InitSoundSystem();
void DestroySoundSystem();
void InitSoundSystem();
void DestroySoundSystem();
private:
JMusic *mCurrentMusic;
#if (defined PSP || defined ANDROID)
JMusic *mCurrentMusic;
JSample *mCurrentSample;
#endif
int mVolume;
int mMusicVolume;
int mSampleVolume;
int mVolume;
#ifndef IOS
int mMusicVolume;
#endif
int mSampleVolume;
static JSoundSystem* mInstance;
static JSoundSystem* mInstance;
};
#endif

View File

@@ -18,12 +18,11 @@ using namespace std;
#define MID_POINT_THRESHOLD 1.0f
//////////////////////////////////////////////////////////////////////////
/// Position of a single dot on screen.
///
//////////////////////////////////////////////////////////////////////////
class Point
class JPoint
{
public:
@@ -34,13 +33,13 @@ public:
/// @param _y - Y position.
///
//////////////////////////////////////////////////////////////////////////
Point(float _x, float _y) { x = _x; y = _y; }
JPoint(float _x, float _y) { x = _x; y = _y; }
//////////////////////////////////////////////////////////////////////////
/// Constructor, set position to default (0.0f, 0.0f)
///
//////////////////////////////////////////////////////////////////////////
Point() { x = 0.0f; y = 0.0f; }
JPoint() { x = 0.0f; y = 0.0f; }
float x; ///< X position.
float y; ///< Y position.
@@ -95,7 +94,7 @@ public:
/// @param pt - Control point.
///
//////////////////////////////////////////////////////////////////////////
void AddControlPoint(const Point &pt);
void AddControlPoint(const JPoint &pt);
//////////////////////////////////////////////////////////////////////////
/// Get a control point of the spline.
@@ -105,7 +104,7 @@ public:
/// @return Control point.
///
//////////////////////////////////////////////////////////////////////////
void GetControlPoint(Point &point, int index);
void GetControlPoint(JPoint &point, int index);
//////////////////////////////////////////////////////////////////////////
/// Work out all pixels of the spline.
@@ -128,7 +127,7 @@ public:
/// @return Position of the desire point.
///
//////////////////////////////////////////////////////////////////////////
void PointOnCurve(Point &out, float t, const Point &p0, const Point &p1, const Point &p2, const Point &p3);
void PointOnCurve(JPoint &out, float t, const JPoint &p0, const JPoint &p1, const JPoint &p2, const JPoint &p3);
//////////////////////////////////////////////////////////////////////////
/// Get a number of pixels for this spline.
@@ -146,7 +145,7 @@ public:
/// @return Position of the desire point.
///
//////////////////////////////////////////////////////////////////////////
void GetPixel(Point &point, int index);
void GetPixel(JPoint &point, int index);
//////////////////////////////////////////////////////////////////////////
/// Render the spline to screen.
@@ -156,8 +155,8 @@ public:
private:
vector<Point> mMidPoints;
vector<Point> mPixels;
vector<JPoint> mMidPoints;
vector<JPoint> mPixels;
int mCount;
};

View File

@@ -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
@@ -39,10 +47,10 @@
#define MAX_CHANNEL 128
enum {
JGE_ERR_CANT_OPEN_FILE = -1,
JGE_ERR_PNG = -2,
JGE_ERR_MALLOC_FAILED = -4,
JGE_ERR_GENERIC = -5,
JGE_ERR_CANT_OPEN_FILE = -1,
JGE_ERR_PNG = -2,
JGE_ERR_MALLOC_FAILED = -4,
JGE_ERR_GENERIC = -5,
};
#ifdef PSP
@@ -75,45 +83,81 @@ enum {
#define SCREEN_HEIGHT_F 272.0f
#ifdef CONSOLE_CONFIG
#define DEFAULT_BLEND 0
#define BLEND_OPTION_ADD 0
#define BLEND_OPTION_BLEND 0
#define BLEND_ZERO 0
#define BLEND_ONE 0
#define BLEND_SRC_COLOR 0
#define BLEND_ONE_MINUS_SRC_COLOR 0
#define BLEND_SRC_ALPHA 0
#define BLEND_ONE_MINUS_SRC_ALPHA 0
#define BLEND_DST_ALPHA 0
#define BLEND_ONE_MINUS_DST_ALPHA 0
#define BLEND_DST_COLOR 0
#define BLEND_ONE_MINUS_DST_COLOR 0
#define BLEND_SRC_ALPHA_SATURATE 0
#define GU_PSM_5551 0
#else
#ifdef WIN32
// #define DEFAULT_BLEND BLEND_DEFAULT
// #define BLEND_OPTION_ADD BLEND_COLORADD
// #define BLEND_OPTION_BLEND (BLEND_COLORADD | BLEND_ALPHABLEND | BLEND_NOZWRITE)
#else
#define DEFAULT_BLEND GU_TFX_MODULATE
#define BLEND_OPTION_ADD GU_TFX_ADD
#define BLEND_OPTION_BLEND GU_TFX_BLEND
#define DEFAULT_BLEND GU_TFX_MODULATE
#define BLEND_OPTION_ADD GU_TFX_ADD
#define BLEND_OPTION_BLEND GU_TFX_BLEND
#endif
#endif // CONSOLE_CONFIG
#if (defined WIN32) && (!defined LINUX)
#include <windows.h>
#endif
#if defined(LINUX) || defined(IOS) || defined (ANDROID)
typedef uint8_t byte;
typedef uint32_t DWORD;
typedef uint8_t BYTE;
#if defined(LINUX) && (!defined WIN32) || defined(IOS) || defined (ANDROID)
typedef uint8_t byte;
typedef uint32_t DWORD;
typedef uint8_t BYTE;
#ifndef IOS
typedef bool BOOL;
typedef bool BOOL;
#endif
#endif
typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
#define PIXEL_TYPE DWORD
#define ARGB(a, r, g, b) ((PIXEL_TYPE)((a) << 24) | ((r) << 16) | ((g) << 8) | (b))
#define RGBA(r, g, b, a) ((PIXEL_TYPE)((a) << 24) | ((b) << 16) | ((g) << 8) | (r))
#ifndef PSP
#define TEXTURE_FORMAT 0
#endif //PSP
#ifndef CONSOLE_CONFIG
#ifndef QT_CONFIG
#if defined (IOS)
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import <OpenGLES/ES1/gl.h>
# import <OpenGLES/ES1/glext.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#elif defined (ANDROID)
#include <GLES/gl.h>
#include <GLES/glext.h>
#elif defined (WIN32) || defined (LINUX)
#include <GL/gl.h>
#include <GL/glu.h>
#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>
#include <QtOpenGL>
#endif
#if (defined FORCE_GLES)
@@ -127,152 +171,115 @@ enum {
#endif
#if defined (PSP)
#ifndef ABGR8888
#define ABGR8888
#endif
#ifndef ABGR8888
#define ABGR8888
#endif
#if defined (ABGR8888)
#define PIXEL_TYPE u32
#ifndef ARGB
#define ARGB(a, r, g, b) (PIXEL_TYPE)((a << 24) | (b << 16) | (g << 8) | r) // macro to assemble pixels in correct format
#endif
#define MAKE_COLOR(a, c) (a << 24 | c)
#define MASK_ALPHA 0xFF000000 // masks for accessing individual pixels
#define MASK_BLUE 0x00FF0000
#define MASK_GREEN 0x0000FF00
#define MASK_RED 0x000000FF
#if defined (ABGR8888)
#ifndef ARGB
#define ARGB(a, r, g, b) (PIXEL_TYPE)((a << 24) | (b << 16) | (g << 8) | r) // macro to assemble pixels in correct format
#endif
#define MAKE_COLOR(a, c) (a << 24 | c)
#define MASK_ALPHA 0xFF000000 // masks for accessing individual pixels
#define MASK_BLUE 0x00FF0000
#define MASK_GREEN 0x0000FF00
#define MASK_RED 0x000000FF
#define PIXEL_SIZE 4
#define PIXEL_FORMAT PSP_DISPLAY_PIXEL_FORMAT_8888
#define PIXEL_SIZE 4
#define PIXEL_FORMAT PSP_DISPLAY_PIXEL_FORMAT_8888
#define BUFFER_FORMAT GU_PSM_8888
#define TEXTURE_FORMAT GU_PSM_8888
#define TEXTURE_COLOR_FORMAT GU_COLOR_8888
#define BUFFER_FORMAT GU_PSM_8888
#define TEXTURE_FORMAT GU_PSM_8888
#define TEXTURE_COLOR_FORMAT GU_COLOR_8888
#elif defined (ABGR5551)
#elif defined (ABGR5551)
#ifndef ARGB
#define ARGB(a, r, g, b) ((r >> 3) | ((g >> 3) << 5) | ((b >> 3) << 10) | ((a >> 7) << 15))
#endif
#define MAKE_COLOR(a, c) (((a>>7)<<15) | c)
#define MASK_ALPHA 0x8000
#define MASK_BLUE 0x7C00
#define MASK_GREEN 0x03E0
#define MASK_RED 0x001F
#define PIXEL_TYPE u16
#define PIXEL_SIZE 2
#define PIXEL_FORMAT PSP_DISPLAY_PIXEL_FORMAT_5551
#ifndef ARGB
#define ARGB(a, r, g, b) ((r >> 3) | ((g >> 3) << 5) | ((b >> 3) << 10) | ((a >> 7) << 15))
#endif
#define MAKE_COLOR(a, c) (((a>>7)<<15) | c)
#define MASK_ALPHA 0x8000
#define MASK_BLUE 0x7C00
#define MASK_GREEN 0x03E0
#define MASK_RED 0x001F
#define PIXEL_TYPE u16
#define PIXEL_SIZE 2
#define PIXEL_FORMAT PSP_DISPLAY_PIXEL_FORMAT_5551
#define BUFFER_FORMAT GU_PSM_8888
#define TEXTURE_FORMAT GU_PSM_5551
#define TEXTURE_COLOR_FORMAT GU_COLOR_5551
#define BUFFER_FORMAT GU_PSM_8888
#define TEXTURE_FORMAT GU_PSM_5551
#define TEXTURE_COLOR_FORMAT GU_COLOR_5551
#elif defined (ABGR4444)
#ifndef ARGB
#define ARGB(a, r, g, b) ((r >> 4) | ((g >> 4) << 4) | ((b >> 4) << 8) | ((a >> 4) << 12))
#endif
#define MAKE_COLOR(a, c) (((a>>4)<<12) | c)
#define MASK_ALPHA 0xF000
#define MASK_BLUE 0x0F00
#define MASK_GREEN 0x00F0
#define MASK_RED 0x000F
#define PIXEL_TYPE u16
#define PIXEL_SIZE 2
#define PIXEL_FORMAT PSP_DISPLAY_PIXEL_FORMAT_4444
#elif defined (ABGR4444)
#ifndef ARGB
#define ARGB(a, r, g, b) ((r >> 4) | ((g >> 4) << 4) | ((b >> 4) << 8) | ((a >> 4) << 12))
#endif
#define MAKE_COLOR(a, c) (((a>>4)<<12) | c)
#define MASK_ALPHA 0xF000
#define MASK_BLUE 0x0F00
#define MASK_GREEN 0x00F0
#define MASK_RED 0x000F
#define PIXEL_TYPE u16
#define PIXEL_SIZE 2
#define PIXEL_FORMAT PSP_DISPLAY_PIXEL_FORMAT_4444
#define BUFFER_FORMAT GU_PSM_4444
#define TEXTURE_FORMAT GU_PSM_4444
#define TEXTURE_COLOR_FORMAT GU_COLOR_4444
#define BUFFER_FORMAT GU_PSM_4444
#define TEXTURE_FORMAT GU_PSM_4444
#define TEXTURE_COLOR_FORMAT GU_COLOR_4444
#endif
#endif
#define FRAME_BUFFER_WIDTH 512
#define FRAME_BUFFER_SIZE FRAME_BUFFER_WIDTH*SCREEN_HEIGHT*PIXEL_SIZE
#define FRAME_BUFFER_WIDTH 512
#define FRAME_BUFFER_SIZE FRAME_BUFFER_WIDTH*SCREEN_HEIGHT*PIXEL_SIZE
#define SLICE_SIZE_F 64.0f
typedef unsigned int DWORD;
#define SLICE_SIZE_F 64.0f
typedef unsigned int DWORD;
#define BLEND_ZERO 0x1000
#define BLEND_ONE 0x1002
#define BLEND_SRC_COLOR GU_SRC_COLOR
#define BLEND_ONE_MINUS_SRC_COLOR GU_ONE_MINUS_SRC_COLOR
#define BLEND_SRC_ALPHA GU_SRC_ALPHA
#define BLEND_ONE_MINUS_SRC_ALPHA GU_ONE_MINUS_SRC_ALPHA
#define BLEND_DST_ALPHA GU_DST_ALPHA
#define BLEND_ONE_MINUS_DST_ALPHA GU_ONE_MINUS_DST_ALPHA
#define BLEND_DST_COLOR GU_DST_COLOR
#define BLEND_ONE_MINUS_DST_COLOR GU_ONE_MINUS_DST_COLOR
#define BLEND_SRC_ALPHA_SATURATE BLEND_ONE
#define BLEND_ZERO 0x1000
#define BLEND_ONE 0x1002
#define BLEND_SRC_COLOR GU_SRC_COLOR
#define BLEND_ONE_MINUS_SRC_COLOR GU_ONE_MINUS_SRC_COLOR
#define BLEND_SRC_ALPHA GU_SRC_ALPHA
#define BLEND_ONE_MINUS_SRC_ALPHA GU_ONE_MINUS_SRC_ALPHA
#define BLEND_DST_ALPHA GU_DST_ALPHA
#define BLEND_ONE_MINUS_DST_ALPHA GU_ONE_MINUS_DST_ALPHA
#define BLEND_DST_COLOR GU_DST_COLOR
#define BLEND_ONE_MINUS_DST_COLOR GU_ONE_MINUS_DST_COLOR
#define BLEND_SRC_ALPHA_SATURATE BLEND_ONE
typedef struct
{
ScePspFVector2 texture;
ScePspFVector3 pos;
} PSPVertex3D;
typedef struct
{
ScePspFVector2 texture;
ScePspFVector3 pos;
} PSPVertex3D;
#else //non PSP
typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
#define BLEND_ZERO GL_ZERO
#define BLEND_ONE GL_ONE
#define BLEND_SRC_COLOR GL_SRC_COLOR
#define BLEND_ONE_MINUS_SRC_COLOR GL_ONE_MINUS_SRC_COLOR
#define BLEND_SRC_ALPHA GL_SRC_ALPHA
#define BLEND_ONE_MINUS_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
#define BLEND_DST_ALPHA GL_DST_ALPHA
#define BLEND_ONE_MINUS_DST_ALPHA GL_ONE_MINUS_DST_ALPHA
#define BLEND_DST_COLOR GL_DST_COLOR
#define BLEND_ONE_MINUS_DST_COLOR GL_ONE_MINUS_DST_COLOR
#define BLEND_SRC_ALPHA_SATURATE GL_SRC_ALPHA_SATURATE
#define BLEND_ZERO GL_ZERO
#define BLEND_ONE GL_ONE
#define BLEND_SRC_COLOR GL_SRC_COLOR
#define BLEND_ONE_MINUS_SRC_COLOR GL_ONE_MINUS_SRC_COLOR
#define BLEND_SRC_ALPHA GL_SRC_ALPHA
#define BLEND_ONE_MINUS_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
#define BLEND_DST_ALPHA GL_DST_ALPHA
#define BLEND_ONE_MINUS_DST_ALPHA GL_ONE_MINUS_DST_ALPHA
#define BLEND_DST_COLOR GL_DST_COLOR
#define BLEND_ONE_MINUS_DST_COLOR GL_ONE_MINUS_DST_COLOR
#define BLEND_SRC_ALPHA_SATURATE GL_SRC_ALPHA_SATURATE
#define ARGB(a, r, g, b) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b))
#define RGBA(r, g, b, a) (((a) << 24) | ((b) << 16) | ((g) << 8) | (r))
#define TEXTURE_FORMAT 0
#define GU_PSM_8888 0
#define GU_PSM_5551 0
#define GU_PSM_4444 0
#define GU_PSM_5650 0
#define PIXEL_TYPE DWORD
#endif
typedef enum Buttons
{
JGE_BTN_NONE = 0, // No button pressed
JGE_BTN_QUIT, // Home on PSP
JGE_BTN_MENU, // Start on PSP
JGE_BTN_CTRL, // Select
JGE_BTN_POWER, // Hold
JGE_BTN_SOUND, // Music note
JGE_BTN_RIGHT,
JGE_BTN_LEFT,
JGE_BTN_UP,
JGE_BTN_DOWN,
JGE_BTN_OK, // Circle in Japan, Cross in Europe
JGE_BTN_CANCEL, // Triangle
JGE_BTN_PRI, // Square (primary)
JGE_BTN_SEC, // Cross or Circle (secondary)
JGE_BTN_PREV, // Left trigger
JGE_BTN_NEXT, // Right trigger
JGE_BTN_FULLSCREEN, // Switch to fullscreen (obviously, PC only)
JGE_BTN_MAX = JGE_BTN_FULLSCREEN + 1
} JButton;
#else
typedef uint32_t GLuint;
typedef float GLfloat;
#endif //CONSOLE_CONFIG
//------------------------------------------------------------------------------------------------
struct Vertex
@@ -357,7 +364,7 @@ public:
int mFilter;
#if defined (PSP)
#if defined (PSP)
int mTextureFormat;
int mTexId;
bool mInVideoRAM;
@@ -542,5 +549,28 @@ public:
};
typedef enum Buttons
{
JGE_BTN_NONE = 0, // No button pressed
JGE_BTN_QUIT, // Home on PSP
JGE_BTN_MENU, // Start on PSP
JGE_BTN_CTRL, // Select
JGE_BTN_POWER, // Hold
JGE_BTN_SOUND, // Music note
JGE_BTN_RIGHT,
JGE_BTN_LEFT,
JGE_BTN_UP,
JGE_BTN_DOWN,
JGE_BTN_OK, // Circle in Japan, Cross in Europe
JGE_BTN_CANCEL, // Triangle
JGE_BTN_PRI, // Square (primary)
JGE_BTN_SEC, // Cross or Circle (secondary)
JGE_BTN_PREV, // Left trigger
JGE_BTN_NEXT, // Right trigger
JGE_BTN_FULLSCREEN, // Switch to fullscreen (obviously, PC only)
JGE_BTN_MAX = JGE_BTN_FULLSCREEN + 1
} JButton;
#endif

View File

@@ -0,0 +1,23 @@
#ifndef OUTPUTCAPTURER_H
#define OUTPUTCAPTURER_H
#if defined(QT_CONFIG)
#include <Qt>
#include <string>
#include <sstream>
#include "Threading.h"
class OutputCapturer
{
private:
static std::ostringstream stream;
static boost::mutex mMutex;
public:
static void add(const std::string& s);
static void debugAndClear();
static void clear();
};
#endif
#endif // OUTPUTCAPTURER_H

View 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

View File

@@ -1,7 +1,7 @@
#ifndef THREADING_H
#define THREADING_H
#if !defined(PSP) && !defined(QT_CONFIG)
#if !defined(PSP) && !defined(QT_CONFIG) && !(__cplusplus > 199711L) && !(_MSC_VER >= 1700)
#include <boost/date_time.hpp>
#ifdef WIN32
@@ -14,7 +14,7 @@
#endif
#include <boost/thread/mutex.hpp>
#elif !defined(QT_CONFIG)
#elif defined(PSP)
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
@@ -26,7 +26,7 @@
namespace boost
{
/**
** PSP specific variant of a boost mutex & scoped_lock
** PSP specific variant of a boost mutex & scoped_lock
*/
template <class Mutex>
@@ -60,7 +60,7 @@ namespace boost
{
sceKernelDeleteSema(mID);
}
void lock()
{
int result = sceKernelWaitSema(mID, 1, 0);
@@ -142,7 +142,7 @@ namespace boost
}
}
int mID;
int mThreadID;
volatile int mRecursionCount;
@@ -164,7 +164,7 @@ namespace boost
/**
** Emulating boost::thread configuration glue, with some shortcuts
** Emulating boost::thread configuration glue, with some shortcuts
** This detail namespace is a distillation of boost's thread.hpp, thread_data.hpp.
*/
namespace detail
@@ -212,13 +212,13 @@ namespace boost
**
** The intent of its usage is this form only:
** mWorkerThread = boost::thread(ThreadProc, this);
** where ThreadProc is a static member function of the 'this' class,eg:
** static void FOO::ThreadProc(void* inParam)
** {
** FOO* instance = reinterpret_cast<FOO*>(inParam);
** // now you have class instance data available...
** }
**
** where ThreadProc is a static member function of the 'this' class,eg:
** static void FOO::ThreadProc(void* inParam)
** {
** FOO* instance = reinterpret_cast<FOO*>(inParam);
** // now you have class instance data available...
** }
**
** Any other variant of a thread proc with more than one param is unimplemented.
*/
class thread
@@ -227,7 +227,7 @@ namespace boost
** Helper class for sceKernelStartThread, which passes args by value, not by reference
** We use this struct to wrap any pointers that we want to pass to the worker thread.
*/
struct CallbackData
struct CallbackData
{
CallbackData(detail::thread_data_ptr inThreadInfo)
: mThreadInfo(inThreadInfo)
@@ -307,15 +307,12 @@ namespace boost
}
}
#elif defined(QT_CONFIG)
#elif defined(QT_CONFIG) && (__cplusplus <= 199711L)
#include <QMutex>
#include <QThread>
#include <QSharedPointer>
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
#include "../include/DebugRoutines.h"
#include "../include/JLogger.h"
namespace boost
@@ -421,23 +418,25 @@ namespace boost
virtual void run() = 0;
};
typedef boost::shared_ptr<detail::thread_data_base> thread_data_ptr;
template<typename F>
typedef QSharedPointer<detail::thread_data_base> thread_data_ptr;
template<typename F, typename A1>
class thread_data : public detail::thread_data_base
{
public:
thread_data(F f_) : f(f_)
thread_data(F f_, A1 a1_) : f(f_), a1(a1_)
{
}
void run()
{
f();
f(a1);
}
private:
F f;
A1 a1;
void operator=(thread_data&);
thread_data(thread_data&);
@@ -494,7 +493,7 @@ namespace boost
}
template <class F,class A1>
thread(F f, A1 a1) : mThreadInfo(make_thread_info(boost::bind(boost::type<void>(), f, a1)))
thread(F f, A1 a1) : mThreadInfo(make_thread_info(f, a1))
{
mpThread = new threadImpl(mThreadInfo);
LOG("Calling start func");
@@ -511,10 +510,10 @@ namespace boost
}
private:
template<typename F>
static inline detail::thread_data_ptr make_thread_info(F f)
template<typename F, typename A1>
static inline detail::thread_data_ptr make_thread_info(F f, A1 a1)
{
return detail::thread_data_ptr(new detail::thread_data<F>(f));
return detail::thread_data_ptr(new detail::thread_data<F, A1>(f, a1));
}
detail::thread_data_ptr mThreadInfo;
@@ -538,6 +537,80 @@ namespace boost
}
}
#elif (__cplusplus > 199711L) || (_MSC_VER >= 1700)
#include <thread>
#include <mutex>
namespace boost
{
typedef std::thread thread;
template <class Mutex>
struct unique_lock
{
unique_lock(Mutex& inMutex) : mMutex(&inMutex)
{
mMutex->lock();
}
~unique_lock()
{
mMutex->unlock();
}
Mutex* mMutex;
};
class mutex
{
public:
typedef unique_lock<mutex> scoped_lock;
mutex()
: mQMutex()
{
}
~mutex()
{
}
void lock()
{
mQMutex.lock();
}
void unlock()
{
mQMutex.unlock();
}
std::mutex mQMutex;
private:
mutex(mutex const&);
mutex& operator=(mutex const&);
};
namespace posix_time
{
typedef unsigned int milliseconds;
}
/**
** boost's platform neutral sleep call.
*/
namespace this_thread
{
inline void sleep(boost::posix_time::milliseconds const& time)
{
std::this_thread::sleep_for(std::chrono::milliseconds(time));
}
}
}
#endif
#endif // THREADING_H

View File

@@ -3,15 +3,6 @@
#include <math.h>
/*************************** Macros and constants ***************************/
// returns a number ranging from -1.0 to 1.0
#define FRAND (((float)rand()-(float)rand())/RAND_MAX)
#define Clamp(x, min, max) x = (x<min ? min : x<max ? x : max);
#define SQUARE(x) (x)*(x)
struct Vector3D
{
Vector3D(float x, float y, float z) : x(x), y(y), z(z) {}
@@ -63,7 +54,7 @@ struct Vector3D
float Length()
{
float length = (float)sqrt(SQUARE(x) + SQUARE(y) + SQUARE(z));
float length = sqrt(x*x + y*y + z*z);
return (length != 0.0f) ? length : 1.0f;
}

View File

@@ -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 );

BIN
JGE/lib/linux/libhgetools.a Normal file

Binary file not shown.

BIN
JGE/lib/linux/libjge.a Normal file

Binary file not shown.

350
JGE/src/Downloader.cpp Normal file
View File

@@ -0,0 +1,350 @@
#include "DebugRoutines.h"
#include "JFileSystem.h"
#include "Downloader.h"
#define RECORDS_DEFAULT_FILE "cache/records.txt"
#ifdef QT_CONFIG
QNetworkAccessManager DownloadRequest::networkAccessManager;
#endif
#ifdef __EMSCRIPTEN__
#include "emscripten.h"
#endif
DownloadRequest::DownloadRequest(string localPath,
string remoteResourceURL,
string ETag,
DownloadStatus downloadStatus,
size_t totalSize,
size_t currentSize):
mLocalPath(localPath),
mRemoteResourceURL(remoteResourceURL),
mRequestedRemoteResourceURL(remoteResourceURL),
mETag(ETag),
mDownloadStatus(downloadStatus),
mUpgradeAvailable(false),
mTotalSize(totalSize),
mCurrentSize(currentSize)
{
}
DownloadRequest::~DownloadRequest()
{
}
void DownloadRequest::startHead()
{
#ifdef QT_CONFIG
QNetworkRequest request(QUrl(QString(mRequestedRemoteResourceURL.c_str())));
request.setRawHeader("If-None-Match", mETag.c_str());
mNetworkReply = networkAccessManager.head(request);
connect(mNetworkReply, SIGNAL(finished()), SLOT(fileDownloaded()));
#endif
}
void DownloadRequest::startGet()
{
#ifdef QT_CONFIG
mNetworkReply = networkAccessManager.get(QNetworkRequest(QUrl(QString(mRequestedRemoteResourceURL.c_str()))));
#endif
mFile.close();
JFileSystem::GetInstance()->Remove(getTempLocalPath());
JFileSystem::GetInstance()->openForWrite(mFile, getTempLocalPath());
#ifdef QT_CONFIG
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()
{
#ifdef QT_CONFIG
do {
QByteArray eTagByteArray = mNetworkReply->rawHeader("ETag");
if(!eTagByteArray.isEmpty()) {
string oldETag = mETag;
mETag = QString(eTagByteArray).toStdString();
if(oldETag!="" && oldETag != mETag)
mUpgradeAvailable = true;
}
// let's check some error
if(mNetworkReply->error() != QNetworkReply::NoError) {
processError((int)mNetworkReply->error(), mNetworkReply->errorString().toStdString().c_str());
break;
}
// check if we're getting redirected
QVariant redirectionTarget = mNetworkReply->attribute(QNetworkRequest::RedirectionTargetAttribute);
if (!redirectionTarget.isNull()) {
QUrl newUrl = QUrl(mRequestedRemoteResourceURL.c_str()).resolved(redirectionTarget.toUrl());
DebugTrace(string("Redirect to ")+ newUrl.toString().toStdString());
mRequestedRemoteResourceURL = newUrl.toString().toStdString();
mNetworkReply->deleteLater();
if(mFile.is_open())
startGet();
else
startHead();
return;
}
QByteArray byteArray = mNetworkReply->readAll();
processBufferDownloaded(byteArray.size(), byteArray.constData());
} while(0);
Downloader::GetInstance()->Update();
mNetworkReply->deleteLater();
emit statusChanged((int)mDownloadStatus);
#endif
}
void DownloadRequest::downloadProgress(int64_t bytesReceived, int64_t bytesTotal)
{
#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;
Downloader::Downloader(string globalRemoteURL, string localcacheRecords):
mGlobalRemoteURL(globalRemoteURL),
mLocalCacheRecords(localcacheRecords)
{
JFileSystem::GetInstance()->MakeDir("cache");
izfstream downloadRecords;
if(mLocalCacheRecords.empty())
mLocalCacheRecords = RECORDS_DEFAULT_FILE;
if(JFileSystem::GetInstance()->openForRead(downloadRecords, mLocalCacheRecords))
{// File exists, let's read it.
downloadRecords >> (*this);
}
JFileSystem::GetInstance()->CloseFile();
}
Downloader::~Downloader()
{
map<string, DownloadRequest*>::iterator ite;
for(ite = mRequestMap.begin(); ite != mRequestMap.end(); ite++)
{
delete (*ite).second;
}
mRequestMap.erase(mRequestMap.begin(), mRequestMap.end());
}
Downloader* Downloader::GetInstance()
{
if(!mInstance)
{
mInstance = new Downloader();
}
return mInstance;
}
void Downloader::Release()
{
if(mInstance)
{
delete mInstance;
mInstance = 0;
}
}
bool DownloadRequest::NetworkIsAccessible()
{
bool result = false;
#ifdef QT_CONFIG
networkAccessManager.setNetworkAccessible(QNetworkAccessManager::Accessible);
result = networkAccessManager.networkAccessible();
#endif
return result;
}
DownloadRequest* Downloader::Get(string localPath, string remoteResourceURL)
{
map<string, DownloadRequest*>::iterator ite = mRequestMap.find(localPath);
if(ite == mRequestMap.end())
{ // request does not exist, let's create it
DownloadRequest* request = new DownloadRequest(localPath, remoteResourceURL);
std::pair<std::map<string,DownloadRequest*>::iterator,bool> ret;
ret = mRequestMap.insert ( std::pair<string,DownloadRequest*>(localPath, request) );
if (ret.second==false) {
DebugTrace("Downloader::Get Error inserting request in Map");
return 0;
}
ite = ret.first;
}
// Now, we can check the server
if((*ite).second->getDownloadStatus() == DownloadRequest::NOT_PRESENT ||
(*ite).second->upgradeAvailable())
{ // File is not here or an update is available, let's get it
(*ite).second->startGet();
(*ite).second->mDownloadStatus = DownloadRequest::DOWNLOADING;
}
else if ((*ite).second->getDownloadStatus() == DownloadRequest::DOWNLOADED)
{ // File is here, let's check if there is some update without blocking the playback
(*ite).second->startHead();
}
return (*ite).second;
}
void Downloader::Update()
{
ofstream downloadRecords;
if(JFileSystem::GetInstance()->openForWrite(downloadRecords, mLocalCacheRecords))
{
downloadRecords << (*this);
}
downloadRecords.close();
}
ostream& operator<<(ostream& out, const DownloadRequest& d)
{
// HEAD request fails, so this line erase cache record after upgrade check :(
// if(d.getDownloadStatus() == DownloadRequest::DOWNLOADED)
{
out << "localPath=" << d.mLocalPath << endl;
out << "remoteResource=" << d.mRemoteResourceURL << endl;
out << "ETag=" << d.mETag << endl;
out << "upgradeAvailable=" << d.mUpgradeAvailable <<endl;
}
return out;
}
istream& operator>>(istream& in, DownloadRequest& d)
{
string s;
while(std::getline(in, s))
{
size_t limiter = s.find("=");
string areaS;
if (limiter != string::npos)
{
areaS = s.substr(0, limiter);
if (areaS.compare("localPath") == 0)
{
d.mLocalPath = s.substr(limiter + 1);
}
else if (areaS.compare("remoteResource") == 0)
{
d.mRemoteResourceURL = s.substr(limiter + 1);
d.mRequestedRemoteResourceURL = d.mRemoteResourceURL;
}
else if (areaS.compare("ETag") == 0)
{
d.mETag = s.substr(limiter + 1);
d.mDownloadStatus = DownloadRequest::DOWNLOADED;
}
else if (areaS.compare("upgradeAvailable") == 0)
{
d.mUpgradeAvailable = (bool)atoi(s.substr(limiter + 1).c_str());
break;
}
}
}
return in;
}
ostream& operator<<(ostream& out, const Downloader& d)
{
map<string, DownloadRequest*>::const_iterator ite;
for(ite = d.mRequestMap.begin(); ite != d.mRequestMap.end(); ite++)
{
out << (*(*ite).second) << endl;
}
return out;
}
istream& operator>>(istream& in, Downloader& d)
{
while(!in.eof())
{
DownloadRequest* downloadRequest = new DownloadRequest();
in >> (*downloadRequest);
if(!downloadRequest->getLocalPath().empty() &&
!downloadRequest->getRemoteResource().empty() &&
!downloadRequest->getETag().empty()) {
d.mRequestMap[downloadRequest->getLocalPath()] = downloadRequest;
} else {
delete downloadRequest;
}
}
return in;
}

View File

@@ -15,7 +15,7 @@
#include "../include/JSprite.h"
#include "../include/JAnimator.h"
#include "tinyxml/tinyxml.h"
#include "tinyxml.h"
//////////////////////////////////////////////////////////////////////////
@@ -67,7 +67,7 @@ bool JAnimator::Load(const char* scriptFile)
element = script->ToElement();
printf("---- Loading %s:%s\n", element->Value(), element->Attribute("name"));
const char *type[] =
string type[] =
{
"ANIMATION_TYPE_LOOPING",
"ANIMATION_TYPE_ONCE_AND_STAY",
@@ -78,7 +78,7 @@ bool JAnimator::Load(const char* scriptFile)
const char* aniType = element->Attribute("type");
for (int i=0;i<5;i++)
if (strcmp(type[i], aniType)==0)
if (type[i] == aniType)
{
SetAnimationType(i);
break;
@@ -108,7 +108,7 @@ bool JAnimator::Load(const char* scriptFile)
element = param->ToElement();
if (element != NULL)
{
if (strcmp(element->Value(), "settings")==0)
if (element->ValueStr() == "settings")
{
const char* quadName = element->Attribute("quad");
JQuad* quad = mResource->GetQuad(quadName);

View File

@@ -16,9 +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 "../../include/PrecompiledHeader.h"
#endif
#include "dirent.h"
#ifdef WIN32
#pragma warning(disable : 4786)
@@ -32,7 +30,18 @@ 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>
#endif
/*
#ifdef IOS
#include <Foundation/Foundation.h>
#endif
*/
JFileSystem* JFileSystem::mInstance = NULL;
@@ -115,17 +124,28 @@ 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()->getFileSystemLocation();
systemPath = "";
DebugTrace("User path " << userPath);
#elif defined (QT_CONFIG)
QDir sysDir(RESDIR);
QDir dir(QDir::homePath());
dir.mkdir(USERDIR);
dir.cd(USERDIR);
userPath = QDir::toNativeSeparators(dir.absolutePath()).toStdString();
systemPath = "";
systemPath = QDir::toNativeSeparators(sysDir.absolutePath()).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");
@@ -237,7 +257,7 @@ void JFileSystem::clearZipCache()
bool JFileSystem::AttachZipFile(const string &zipfile, char *password /* = NULL */)
{
if (mZipAvailable && mZipFile != NULL)
if (mZipAvailable && mZipFile.is_open())
{
if (mZipFileName != zipfile)
DetachZipFile(); // close the previous zip file
@@ -280,6 +300,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;
@@ -302,11 +323,15 @@ bool JFileSystem::readIntoString(const string & FilePath, string & target)
int fileSize = GetFileSize(file);
#ifndef __MINGW32__
try {
#endif
target.resize((std::string::size_type) fileSize);
#ifndef __MINGW32__
} catch (bad_alloc&) {
return false;
}
#endif
if (fileSize)
@@ -320,6 +345,36 @@ bool JFileSystem::openForWrite(ofstream & File, const string & FilePath, ios_bas
{
string filename = mUserFSPath;
filename.append(FilePath);
#if defined(ANDROID)
DebugTrace("ANDROID");
std::vector<string> dirs;
string path = filename.substr( 0, filename.find_last_of( '/' ) + 1 );
// put it into list
dirs.push_back(path);
//make list of directories that need to be created
do
{
path = path.substr( 0, path.find_last_of( '/', path.size() - 2 ) + 1 );
dirs.push_back(path);
} while (path.compare(mUserFSPath) != 0);
// remove mUserFSPath from list
dirs.pop_back();
// create missing directories
for (std::vector<string>::reverse_iterator it = dirs.rbegin(); it != dirs.rend(); ++it)
{
if(!DirExists(*it))
{
MAKEDIR((*it).c_str());
}
}
#endif
File.open(filename.c_str(), mode);
if (File)
@@ -356,7 +411,6 @@ bool JFileSystem::OpenFile(const string &filename)
mCurrentFileInZip = &(it2->second);
mFileSize = it2->second.m_Size;
return true;
}
@@ -512,7 +566,13 @@ bool JFileSystem::Rename(string _from, string _to)
string from = mUserFSPath + _from;
string to = mUserFSPath + _to;
std::remove(to.c_str());
return rename(from.c_str(), to.c_str()) ? true: false;
return (rename(from.c_str(), to.c_str()) == 0);
}
bool JFileSystem::Remove(string aFile)
{
string toRemove = mUserFSPath + aFile;
return (std::remove(toRemove.c_str()) == 0);
}
int JFileSystem::GetFileSize(izfstream & file)

View File

@@ -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
@@ -249,6 +249,7 @@ u32 JGE::BindKey(LocalKeySym sym, JButton button)
u32 JGE::UnbindKey(LocalKeySym sym, JButton button)
{
for (keycodes_it it = keyBinds.begin(); it != keyBinds.end(); )
{
if (sym == it->first && button == it->second)
{
keycodes_it er = it;
@@ -256,7 +257,8 @@ u32 JGE::UnbindKey(LocalKeySym sym, JButton button)
keyBinds.erase(er);
}
else ++it;
return keyBinds.size();
}
return keyBinds.size();
}
u32 JGE::UnbindKey(LocalKeySym sym)
@@ -591,6 +593,8 @@ void JGE::SendCommand(string command)
sendJNICommand(command);
#elif defined (IOS)
SendCommand(command, "");
#else
cerr << command;
#endif
}
@@ -602,6 +606,8 @@ void JGE::SendCommand(std::string command, std::string parameter)
[delegate handleWEngineCommand:[NSString stringWithCString: command.c_str() encoding: NSUTF8StringEncoding]
withParameter: [NSString stringWithCString: parameter.c_str() encoding:NSUTF8StringEncoding]];
#else
cerr << command << " " << parameter;
#endif
}
@@ -613,6 +619,8 @@ void JGE::SendCommand(std::string command, float& x, float& y, float& width, flo
#elif IOS
wagicAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
[delegate handleWEngineCommand: [NSString stringWithCString: command.c_str() encoding: NSUTF8StringEncoding] withUIParameters: x yCoordinate: y width: width height: height];
#else
cerr << command << " " << x << " " << y << " " << width << " " << height;
#endif
}
@@ -656,7 +664,6 @@ JNIEnv * JGE::getJNIEnv()
string JGE::getFileSystemLocation()
{
char result[512];
JNIEnv * env = getJNIEnv();
if (env == NULL)
{

506
JGE/src/JGfx-fake.cpp Normal file
View File

@@ -0,0 +1,506 @@
//-------------------------------------------------------------------------------------
//
// JGE++ is a hardware accelerated 2D game SDK for PSP/Windows.
#include "../../include/JGE.h"
#include "../../include/JRenderer.h"
#include "../../include/JResourceManager.h"
#include "../../include/JFileSystem.h"
#include "../../include/JAssert.h"
JQuad::JQuad(JTexture *tex, float x, float y, float width, float height)
:mTex(tex), mX(x), mY(y), mWidth(width), mHeight(height)
{
JASSERT(tex != NULL);
JRenderer::GetInstance()->TransferTextureToGLContext(*tex);
mHotSpotX = 0.0f;
mHotSpotY = 0.0f;
//mBlend = BLEND_DEFAULT;
for (int i=0;i<4;i++)
mColor[i].color = 0xFFFFFFFF;
mHFlipped = false;
mVFlipped = false;
SetTextureRect(x, y, width, height);
}
void JQuad::SetTextureRect(float x, float y, float w, float h)
{
mX = x;
mY = y;
mWidth = w;
mHeight = h;
if(mTex)
{
mTX0 = x/mTex->mTexWidth;
mTY0 = y/mTex->mTexHeight;
mTX1 = (x+w)/mTex->mTexWidth;
mTY1 = (y+h)/mTex->mTexHeight;
}
}
void JQuad::GetTextureRect(float *x, float *y, float *w, float *h)
{
*x=mX; *y=mY; *w=mWidth; *h=mHeight;
}
void JQuad::SetColor(PIXEL_TYPE color)
{
for (int i=0;i<4;i++)
mColor[i].color = color;
}
void JQuad::SetHotSpot(float x, float y)
{
mHotSpotX = x;
mHotSpotY = y;
}
//////////////////////////////////////////////////////////////////////////
JTexture::JTexture() : mWidth(0), mHeight(0), mBuffer(NULL)
{
mTexId = -1;
}
JTexture::~JTexture()
{
if (mBuffer)
{
delete [] mBuffer;
mBuffer = NULL;
}
}
void JTexture::UpdateBits(int x, int y, int width, int height, PIXEL_TYPE* bits)
{
JRenderer::GetInstance()->BindTexture(this);
}
//////////////////////////////////////////////////////////////////////////
JRenderer* JRenderer::mInstance = NULL;
bool JRenderer::m3DEnabled = false;
void JRenderer::Set3DFlag(bool flag) { m3DEnabled = flag; }
JRenderer* JRenderer::GetInstance()
{
if (mInstance == NULL)
{
mInstance = new JRenderer();
JASSERT(mInstance != NULL);
mInstance->InitRenderer();
}
return mInstance;
}
void JRenderer::Destroy()
{
if (mInstance)
{
mInstance->DestroyRenderer();
delete mInstance;
mInstance = NULL;
}
}
JRenderer::JRenderer() : mActualWidth(SCREEN_WIDTH_F), mActualHeight(SCREEN_HEIGHT_F)
{
}
JRenderer::~JRenderer()
{
}
void JRenderer::InitRenderer()
{
mCurrentTextureFilter = TEX_FILTER_NONE;
mImageFilter = NULL;
mCurrTexBlendSrc = BLEND_SRC_ALPHA;
mCurrTexBlendDest = BLEND_ONE_MINUS_SRC_ALPHA;
// mLineWidth = 1.0f;
mCurrentTex = -1;
mFOV = 75.0f;
#ifdef USING_MATH_TABLE
for (int i=0;i<360;i++)
{
mSinTable[i] = sinf(i*DEG2RAD);
mCosTable[i] = cosf(i*DEG2RAD);
}
#endif
mCurrentRenderMode = MODE_UNKNOWN;
}
void JRenderer::DestroyRenderer()
{
}
void JRenderer::BeginScene()
{
}
void JRenderer::EndScene()
{
}
void JRenderer::BindTexture(JTexture *tex)
{
}
void JRenderer::EnableTextureFilter(bool flag)
{
if (flag)
mCurrentTextureFilter = TEX_FILTER_LINEAR;
else
mCurrentTextureFilter = TEX_FILTER_NEAREST;
mCurrentTex = -1;
}
void Swap(float *a, float *b)
{
float n=*a;
*a = *b;
*b = n;
}
void JRenderer::RenderQuad(JQuad* quad, float xo, float yo, float angle, float xScale, float yScale)
{
//yo = SCREEN_HEIGHT-yo-1;//-(quad->mHeight);
float width = quad->mWidth;
float height = quad->mHeight;
float x = -quad->mHotSpotX;
float y = quad->mHotSpotY;
Vector2D pt[4];
pt[3] = Vector2D(x, y);
pt[2] = Vector2D(x+width, y);
pt[1] = Vector2D(x+width, y-height);
pt[0] = Vector2D(x, y-height);
Vector2D uv[4];
uv[0] = Vector2D(quad->mTX0, quad->mTY1);
uv[1] = Vector2D(quad->mTX1, quad->mTY1);
uv[2] = Vector2D(quad->mTX1, quad->mTY0);
uv[3] = Vector2D(quad->mTX0, quad->mTY0);
if (quad->mHFlipped)
{
Swap(&uv[0].x, &uv[1].x);
Swap(&uv[2].x, &uv[3].x);
}
if (quad->mVFlipped)
{
Swap(&uv[0].y, &uv[2].y);
Swap(&uv[1].y, &uv[3].y);
}
BindTexture(quad->mTex);
yo = SCREEN_HEIGHT_F - yo;
}
void JRenderer::RenderQuad(JQuad* quad, VertexColor* pt)
{
for (int i=0;i<4;i++)
{
pt[i].y = SCREEN_HEIGHT_F - pt[i].y;
quad->mColor[i].color = pt[i].color;
}
Vector2D uv[4];
uv[0] = Vector2D(quad->mTX0, quad->mTY1);
uv[1] = Vector2D(quad->mTX1, quad->mTY1);
uv[2] = Vector2D(quad->mTX1, quad->mTY0);
uv[3] = Vector2D(quad->mTX0, quad->mTY0);
BindTexture(quad->mTex);
}
void JRenderer::FillRect(float x, float y, float width, float height, PIXEL_TYPE color)
{
y = SCREEN_HEIGHT_F - y - height;
JColor col;
col.color = color;
}
void JRenderer::DrawRect(float x, float y, float width, float height, PIXEL_TYPE color)
{
y = SCREEN_HEIGHT_F - y - height;
JColor col;
col.color = color;
}
void JRenderer::FillRect(float x, float y, float width, float height, PIXEL_TYPE* colors)
{
JColor col[4];
for (int i=0;i<4;i++)
col[i].color = colors[i];
FillRect(x, y, width, height, col);
}
void JRenderer::FillRect(float x, float y, float width, float height, JColor* colors)
{
y = SCREEN_HEIGHT_F - y - height;
}
void JRenderer::DrawLine(float x1, float y1, float x2, float y2, PIXEL_TYPE color)
{
// glLineWidth (mLineWidth);
JColor col;
col.color = color;
}
void JRenderer::Plot(float x, float y, PIXEL_TYPE color)
{
}
void JRenderer::PlotArray(float *x, float *y, int count, PIXEL_TYPE color)
{
}
void JRenderer::ScreenShot(const char* filename __attribute__((unused)))
{
}
void JRenderer::TransferTextureToGLContext(JTexture& inTexture)
{
}
JTexture* JRenderer::CreateTexture(int width, int height, int mode __attribute__((unused)))
{
JTexture *tex = new JTexture();
return tex;
}
JTexture* JRenderer::LoadTexture(const char* filename, int mode, int textureFormat)
{
JTexture *tex = new JTexture();
return tex;
}
void JRenderer::EnableVSync(bool flag __attribute__((unused)))
{
// if (flag)
// hge->System_SetState(HGE_FPS, 60); // HGEFPS_VSYNC
// else
// hge->System_SetState(HGE_FPS, HGEFPS_UNLIMITED);
}
void JRenderer::ClearScreen(PIXEL_TYPE color)
{
}
void JRenderer::SetTexBlend(int src, int dest)
{
}
void JRenderer::SetTexBlendSrc(int src)
{
}
void JRenderer::SetTexBlendDest(int dest)
{
}
void JRenderer::Enable2D()
{
}
void JRenderer::Enable3D()
{ /* NOT USED
if (!m3DEnabled)
return;
if (mCurrentRenderMode == MODE_3D)
return;
mCurrentRenderMode = MODE_3D;
glViewport (0, 0, (GLsizei)SCREEN_WIDTH, (GLsizei)SCREEN_HEIGHT); // Reset The Current Viewport
glMatrixMode (GL_PROJECTION); // Select The Projection Matrix
glLoadIdentity (); // Reset The Projection Matrix
gluPerspective (mFOV, (GLfloat)SCREEN_WIDTH/(GLfloat)SCREEN_HEIGHT, // Calculate The Aspect Ratio Of The Window
0.5f, 1000.0f);
glMatrixMode (GL_MODELVIEW); // Select The Modelview Matrix
glLoadIdentity (); // Reset The Modelview Matrix
glEnable (GL_DEPTH_TEST); */
}
void JRenderer::SetClip(int, int, int, int)
{// NOT USED
//glScissor(x, y, width, height);
}
void JRenderer::LoadIdentity()
{// NOT USED
//glLoadIdentity();
}
void JRenderer::Translate(float, float, float)
{// NOT USED
//glTranslatef(x, y, z);
}
void JRenderer::RotateX(float)
{// NOT USED
//glRotatef(angle*RAD2DEG, 1.0f, 0.0f, 0.0f);
}
void JRenderer::RotateY(float)
{// NOT USED
//glRotatef(angle*RAD2DEG, 0.0f, 1.0f, 0.0f);
}
void JRenderer::RotateZ(float)
{// NOT USED
//glRotatef(angle*RAD2DEG, 0.0f, 0.0f, 1.0f);
}
void JRenderer::PushMatrix()
{// NOT USED
//glPushMatrix();
}
void JRenderer::PopMatrix()
{// NOT USED
//glPopMatrix();
}
void JRenderer::RenderTriangles(JTexture* texture, Vertex3D *vertices, int start, int count)
{
}
void JRenderer::SetFOV(float fov)
{
mFOV = fov;
}
void JRenderer::FillPolygon(float* x, float* y, int count, PIXEL_TYPE color)
{
}
void JRenderer::DrawPolygon(float* x, float* y, int count, PIXEL_TYPE color)
{
}
void JRenderer::DrawLine(float x1, float y1, float x2, float y2, float lineWidth, PIXEL_TYPE color)
{
float dy=y2-y1;
float dx=x2-x1;
if(dy==0 && dx==0)
return;
float l=(float)hypot(dx,dy);
float x[4];
float y[4];
x[0]=x1+lineWidth*(y2-y1)/l;
y[0]=y1-lineWidth*(x2-x1)/l;
x[1]=x1-lineWidth*(y2-y1)/l;
y[1]=y1+lineWidth*(x2-x1)/l;
x[2]=x2-lineWidth*(y2-y1)/l;
y[2]=y2+lineWidth*(x2-x1)/l;
x[3]=x2+lineWidth*(y2-y1)/l;
y[3]=y2-lineWidth*(x2-x1)/l;
FillPolygon(x, y, 4, color);
}
void JRenderer::DrawCircle(float x, float y, float radius, PIXEL_TYPE color)
{
}
void JRenderer::FillCircle(float x, float y, float radius, PIXEL_TYPE color)
{
}
void JRenderer::DrawPolygon(float x, float y, float size, int count, float startingAngle, PIXEL_TYPE color)
{
}
void JRenderer::FillPolygon(float x, float y, float size, int count, float startingAngle, PIXEL_TYPE color)
{
}
void JRenderer::SetImageFilter(JImageFilter* imageFilter)
{
mImageFilter = imageFilter;
}
void JRenderer::DrawRoundRect(float x, float y, float w, float h, float radius, PIXEL_TYPE color)
{
}
void JRenderer::FillRoundRect(float x, float y, float w, float h, float radius, PIXEL_TYPE color)
{
}

View File

@@ -49,12 +49,13 @@ JLBFont::JLBFont(const char *fontname, int lineheight, bool useVideoRAM)
sprintf(filename, "%s.png", fontname);
mTexture = mRenderer->LoadTexture(filename, useVideoRAM);
mTextureScale = (float) lineheight/ (mTexture->mHeight/16);
if (mTexture == NULL) return;
if (mTexture == NULL) return;
mHeight = (float) lineheight;
mQuad = new JQuad(mTexture, 0.0f, 0.0f, 16.0f, mHeight);
mQuad = new JQuad(mTexture, 0.0f, 0.0f, 16.0f/mTextureScale, mHeight/mTextureScale);
float a, b, c;
@@ -158,7 +159,7 @@ void JLBFont::DrawString(const char *string, float x, float y, int align, float
index = (*p - 32)+mBase;
float charWidth = mCharWidth[index];
float charWidth = mCharWidth[index]*mTextureScale;
float delta = (charWidth + mTracking) * mScale;
float xPos = mXPos[index];
if (leftOffset)
@@ -194,8 +195,8 @@ void JLBFont::DrawString(const char *string, float x, float y, int align, float
charWidth = (delta/mScale) - mTracking;
}
}
mQuad->SetTextureRect(xPos, mYPos[index], charWidth , mHeight);
mRenderer->RenderQuad(mQuad, dx, dy, mRotation, mScale, mScale);
mQuad->SetTextureRect(xPos, mYPos[index], charWidth/mTextureScale, mHeight/mTextureScale);
mRenderer->RenderQuad(mQuad, dx, dy, mRotation, mScale*mTextureScale, mScale*mTextureScale);
dx += delta;
p++;
}
@@ -235,7 +236,7 @@ float JLBFont::GetStringWidth(const char *string) const
ch = *p - 32;
p++;
if (ch < 0) continue;
len += mCharWidth[ch+mBase] + mTracking;
len += (mCharWidth[ch+mBase]*mTextureScale) + mTracking;
}
len -= mTracking;
return len*mScale;

View File

@@ -257,6 +257,8 @@ void JMD2Model::CalculateNormal(float *p1, float *p2, float *p3)
#else
// FIXME
#endif
#else
cerr << p1 << " " << p2 << " " << p3 << endl;
#endif
}

View File

@@ -10,6 +10,7 @@
#include <pspaudio.h>
#include <pspmp3.h>
#include <psputility.h>
#include <unistd.h>
#else
#define PSP_AUDIO_VOLUME_MAX 100

View File

@@ -33,15 +33,43 @@
#include <sstream>
#include "../include/JSocket.h"
map<string, processCmd> JNetwork::sCommandMap;
map<string, JNetwork::CommandStruc> JNetwork::sCommandMap;
bool JNetwork::isConnected(){
if (connected_to_ap !=1) return false;
if (connected_to_ap !=1 || !socket) return false;
return socket->isConnected();
}
void JNetwork::getServerIp(string& aString)
{
#ifdef WIN32
char ac[80];
if (gethostname(ac, sizeof(ac)) == SOCKET_ERROR) {
DebugTrace("Error " << WSAGetLastError() <<
" when getting local host name.\n");
return;
}
DebugTrace( "Host name is " << ac << ".\n");
struct hostent *phe = gethostbyname(ac);
if (phe == 0) {
DebugTrace("Yow! Bad host lookup.\n");
return;
}
for (int i = 0; phe->h_addr_list[i] != 0; ++i) {
struct in_addr addr;
memcpy(&addr, phe->h_addr_list[i], sizeof(struct in_addr));
aString = inet_ntoa(addr);
}
#else
aString = "No clue";
#endif
}
JNetwork::JNetwork()
: mpWorkerThread(NULL)
: mpWorkerThread(NULL), socket(0)
{
#if (defined WIN32) || (defined LINUX)
connected_to_ap = 1;
@@ -62,30 +90,68 @@ JNetwork::~JNetwork()
delete socket;
}
bool JNetwork::sendCommand(string xString)
bool JNetwork::sendCommand(const string& xString, const string& payload, const string& suffix)
{
string aString = xString;
string aString;
boost::mutex::scoped_lock l(sendMutex);
if(!socket) {
DebugTrace("sendCommand failed: no sockeet");
DebugTrace("sendCommand failed: no socket");
return false;
}
aString = aString + "Command";
aString = xString + suffix;
if(sCommandMap.find(aString) == sCommandMap.end()) {
DebugTrace("sendCommand failed: command not registered");
return false;
}
aString = aString + "\n";
aString = "<" + aString + ">" + "\n" + payload + "\n" + "<" + aString + "/>";
toSend << aString;
return true;
}
void JNetwork::registerCommand(string command, processCmd processCommand, processCmd processResponse)
void JNetwork::registerCommand(string command, void* object, processCmd processCommand, processCmd processResponse)
{
sCommandMap[command + "Command"] = processCommand;
sCommandMap[command + "Response"] = processResponse;
CommandStruc struc;
struc.object = object;
struc.command = command;
struc.processCommand = processCommand;
sCommandMap[command + "Request"] = struc;
struc.processCommand = processResponse;
sCommandMap[command + "Response"] = struc;
}
void JNetwork::Update()
{
boost::mutex::scoped_lock r(receiveMutex);
// Checking for some command to execute
size_t begin_start_tag = received.str().find("<");
size_t end_start_tag = received.str().find(">");
string command = received.str().substr(begin_start_tag+1, end_start_tag-(begin_start_tag+1));
size_t begin_end_tag = received.str().find(command + "/>");
size_t end_end_tag = received.str().find("/>");
if(begin_start_tag != string::npos && begin_end_tag != string::npos )
{
map<string, CommandStruc>::iterator ite = sCommandMap.find(command);
if(ite != sCommandMap.end())
{
DebugTrace("begin of command received : " + received.str() );
DebugTrace("begin of command toSend : " + toSend.str() );
processCmd theMethod = (ite)->second.processCommand;
stringstream input(received.str().substr(end_start_tag+1, (begin_end_tag-1)-(end_start_tag+1)));
stringstream output;
theMethod((ite)->second.object, input, output);
string aString = received.str().substr(end_end_tag+2, string::npos);
received.str(aString);
if(output.str().size())
sendCommand((ite)->second.command, output.str(), "Response");
DebugTrace("end of command received : "<< received.str() );
DebugTrace("end of command toSend : "<< toSend.str() );
}
}
}
void JNetwork::ThreadProc(void* param)
@@ -105,71 +171,33 @@ void JNetwork::ThreadProc(void* param)
}
while(pSocket && pSocket->isConnected()) {
char buff[1024];
char buff[4096];
{
boost::mutex::scoped_lock l(pThis->receiveMutex);
int len = pSocket->Read(buff, sizeof(buff));
if(len) {
if(len > 0) {
boost::mutex::scoped_lock l(pThis->receiveMutex);
DebugTrace("receiving " << len << " bytes : " << buff);
pThis->received << buff;
}
// Checking for some command to execute
size_t found = pThis->received.str().find("Command");
if(found != string::npos)
{
map<string, processCmd>::iterator ite = sCommandMap.find((pThis->received.str()).substr(0, found) + "Command");
if(ite != sCommandMap.end())
{
DebugTrace("begin of command received : "<< pThis->received.str() );
DebugTrace("begin of command toSend : "<< pThis->toSend.str() );
boost::mutex::scoped_lock l(pThis->sendMutex);
pThis->toSend << pThis->received.str().substr(0, found) + "Response ";
pThis->received.str("");
processCmd theMethod = (ite)->second;
theMethod(pThis->received, pThis->toSend);
DebugTrace("end of command received : "<< pThis->received.str() );
DebugTrace("end of command toSend : "<< pThis->toSend.str() );
}
}
// Checking for some response to execute
found = pThis->received.str().find("Response");
if(found != string::npos)
{
map<string, processCmd>::iterator ite = sCommandMap.find((pThis->received.str()).substr(0, found) + "Response");
if(ite != sCommandMap.end())
{
DebugTrace("begin of response received : "<< pThis->received.str() );
DebugTrace("begin of response toSend : "<< pThis->toSend.str() );
boost::mutex::scoped_lock l(pThis->sendMutex);
string aString;
pThis->received >> aString;
processCmd theMethod = (ite)->second;
theMethod(pThis->received, pThis->toSend);
pThis->received.str("");
DebugTrace("end of response received : "<< pThis->received.str() );
DebugTrace("end of response toSend : "<< pThis->toSend.str() );
}
pThis->received.str(pThis->received.str() + buff);
DebugTrace("received " << pThis->received.str().size() << " bytes : " << pThis->received.str());
}
}
boost::mutex::scoped_lock l(pThis->sendMutex);
if(!pThis->toSend.str().empty())
{
DebugTrace("sending " << pThis->toSend.str().size() << " bytes : " << pThis->toSend.str());
pSocket->Write((char*)pThis->toSend.str().c_str(), pThis->toSend.str().size()+1);
pThis->toSend.str("");
}
{
boost::mutex::scoped_lock l(pThis->sendMutex);
if(!pThis->toSend.str().empty())
{
DebugTrace("sending " << pThis->toSend.str().size() << " bytes : " << pThis->toSend.str());
pSocket->Write((char*)pThis->toSend.str().c_str(), pThis->toSend.str().size()+1);
pThis->toSend.str("");
}
}
boost::this_thread::sleep(boost::posix_time::milliseconds(1));
}
DebugTrace("Quitting Thread");
}
#if defined (WIN32) || defined (LINUX)
int JNetwork::connect(string ip)
int JNetwork::connect(const string& ip)
{
if (mpWorkerThread) return 0;
serverIP = ip;
@@ -179,7 +207,7 @@ int JNetwork::connect(string ip)
#else
int JNetwork::connect(string serverIP){
int JNetwork::connect(const string& serverIP){
#ifdef NETWORK_SUPPORT
int err;
char buffer[4096];

View File

@@ -75,10 +75,10 @@ bool JOBJModel::Load(const char *modelName, const char *textureName)
int count;
while (filePtr < size)
{
while (filePtr < size)
{
filePtr = ReadLine(tmpLine, buffer, filePtr, size);
{
{
if ((tmpLine[0] == '#') || (strlen(tmpLine) < 3))
{
@@ -89,19 +89,19 @@ bool JOBJModel::Load(const char *modelName, const char *textureName)
if (count == 4)
{
if (strcmp(s1, "vn") == 0)
if (string("vn") == s1)
normalList.push_back(vert);
else if (strcmp(s1, "vt") == 0)
else if (string("vt") == s1)
texList.push_back(vert);
else if (strcmp(s1, "v") == 0)
else if (string("v") == s1)
vertList.push_back(vert);
}
else if (count == 3)
{
if (strcmp(s1, "vt") == 0)
if (string("vt") == s1)
texList.push_back(vert);
}
}
else if (tmpLine[0] == 'f')
{
@@ -211,7 +211,7 @@ bool JOBJModel::Load(const char *modelName, const char *textureName)
if (textureName != NULL)
mTexture = JRenderer::GetInstance()->LoadTexture(textureName);
return true;
return true;
}

View File

@@ -19,7 +19,7 @@
#include "../include/JFileSystem.h"
#include "../include/JResourceManager.h"
#include "tinyxml/tinyxml.h"
#include "tinyxml.h"
//-------------------------------------------------------------------------------------
@@ -90,7 +90,7 @@ bool JParticleEffect::Load(const char* filename)
// FIELD_COUNT
// };
const char* lifeValues[] =
const string lifeValues[] =
{
"speed",
"size",
@@ -104,7 +104,7 @@ bool JParticleEffect::Load(const char* filename)
"gravity"
};
const char* typeNames[] =
const string typeNames[] =
{
"POINT",
"AREA",
@@ -113,7 +113,7 @@ bool JParticleEffect::Load(const char* filename)
"CIRCLE"
};
const char* modeNames[] =
const string modeNames[] =
{
"REPEAT",
"ONCE",
@@ -149,32 +149,32 @@ bool JParticleEffect::Load(const char* filename)
{
element = param->ToElement();
if (strcmp(element->Attribute("name"), "settings")==0)
if (string("settings") == element->Attribute("name"))
{
if (strcmp(element->Attribute("blend"), "NORMAL")==0)
if (string("NORMAL") == element->Attribute("blend"))
mParticleEmitters[mEmitterCount]->SetBlending(BLEND_SRC_ALPHA, BLEND_ONE_MINUS_SRC_ALPHA);
else if (strcmp(element->Attribute("blend"), "ADDITIVE")==0)
else if (string("ADDITIVE") == element->Attribute("blend"))
mParticleEmitters[mEmitterCount]->SetBlending(BLEND_SRC_ALPHA, BLEND_ONE);
for (unsigned int i=0;i<sizeof(modeNames)/sizeof(char*);i++)
{
if (strcmp(element->Attribute("mode"), modeNames[i])==0)
if (modeNames[i] == element->Attribute("mode"))
{
mParticleEmitters[mEmitterCount]->mEmitterMode = i;
#if defined (_DEBUG)
printf("emitter mode:%s\n", modeNames[i]);
printf("emitter mode:%s\n", modeNames[i].c_str());
#endif
break;
}
}
for (unsigned i=0;i<sizeof(typeNames)/sizeof(char*);i++)
{
if (strcmp(element->Attribute("type"), typeNames[i])==0)
if (typeNames[i] == element->Attribute("type"))
{
mParticleEmitters[mEmitterCount]->mType = i;
#if defined (_DEBUG)
printf("emitter type:%s\n", typeNames[i]);
printf("emitter type:%s\n", typeNames[i].c_str());
#endif
break;
}
@@ -213,7 +213,7 @@ bool JParticleEffect::Load(const char* filename)
}
}
else if (strcmp(element->Attribute("name"), "quantity")==0)
else if (string("quantity") == element->Attribute("name"))
{
for (key = param->FirstChild(); key; key = key->NextSibling())
{
@@ -227,7 +227,7 @@ bool JParticleEffect::Load(const char* filename)
}
}
else if (strcmp(element->Attribute("name"), "lifex")==0)
else if (string("lifex") == element->Attribute("name"))
{
if (element->QueryFloatAttribute("base", &baseValue) == TIXML_SUCCESS &&
element->QueryFloatAttribute("max", &value) == TIXML_SUCCESS)
@@ -236,7 +236,7 @@ bool JParticleEffect::Load(const char* filename)
mParticleEmitters[mEmitterCount]->mLifeMax= value;
}
}
else if (strcmp(element->Attribute("name"), "anglex")==0)
else if (string("anglex") == element->Attribute("name"))
{
if (element->QueryFloatAttribute("base", &baseValue) == TIXML_SUCCESS &&
element->QueryFloatAttribute("max", &value) == TIXML_SUCCESS)
@@ -245,7 +245,7 @@ bool JParticleEffect::Load(const char* filename)
mParticleEmitters[mEmitterCount]->mAngleMax= value*DEG2RAD;
}
}
else if (strcmp(element->Attribute("name"), "speedx")==0)
else if (string("speedx") == element->Attribute("name"))
{
if (element->QueryFloatAttribute("base", &baseValue) == TIXML_SUCCESS &&
element->QueryFloatAttribute("max", &value) == TIXML_SUCCESS)
@@ -254,7 +254,7 @@ bool JParticleEffect::Load(const char* filename)
mParticleEmitters[mEmitterCount]->mSpeedMax= value;
}
}
else if (strcmp(element->Attribute("name"), "sizex")==0)
else if (string("sizex") == element->Attribute("name"))
{
if (element->QueryFloatAttribute("base", &baseValue) == TIXML_SUCCESS &&
element->QueryFloatAttribute("max", &value) == TIXML_SUCCESS)
@@ -267,7 +267,7 @@ bool JParticleEffect::Load(const char* filename)
{
for (int i=0;i<FIELD_COUNT;i++)
{
if (strcmp(element->Attribute("name"), lifeValues[i])==0)
if (lifeValues[i] == element->Attribute("name"))
{
for (key = param->FirstChild(); key; key = key->NextSibling())
{

View File

@@ -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)
#if defined (_DEBUG) && defined (WIN32) && (!defined LINUX)
#include "crtdbg.h"
#define NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#else
@@ -119,11 +119,11 @@ bool JResourceManager::LoadResource(const string& resourceName)
element = node->ToElement();
if (element != NULL)
{
if (strcmp(element->Value(), "texture")==0)
if (element->ValueStr() == "texture")
{
CreateTexture(element->Attribute("name"));
}
else if (strcmp(element->Value(), "quad")==0)
else if (element->ValueStr() == "quad")
{
string quadName = element->Attribute("name");
string textureName = element->Attribute("texture");
@@ -170,7 +170,7 @@ bool JResourceManager::LoadResource(const string& resourceName)
GetQuad(id)->SetHotSpot(hotspotX, hotspotY);
}
}
else if (strcmp(element->Value(), "font")==0)
else if (element->ValueStr() == "font")
{
}

View File

@@ -1,4 +1,3 @@
#if 0
// need a complete rewrite to comply to the new interface
#ifdef NETWORK_SUPPORT
@@ -21,23 +20,21 @@
#endif
#include "../include/JGE.h"
#include "../include/JSocket.h"
JSocket * JSocket::mInstance = NULL;
#define SERVER_PORT 20666
int JSocket::connected = 0;
void JSocket::init(){
JSocket::JSocket(){
#ifdef NETWORK_SUPPORT
sceUtilityLoadNetModule(1);
sceUtilityLoadNetModule(3);
#endif
}
JSocket::JSocket(){
init();
JSocket::JSocket(string ipAddr)
{
}
JSocket::JSocket(int fd)
{
}
JSocket::~JSocket(){
@@ -48,7 +45,27 @@ JSocket::~JSocket(){
#endif
}
void JSocket::Disconnect()
{
}
JSocket* JSocket::Accept()
{
return 0;
}
int JSocket::Read(char* buff, int size)
{
return 0;
}
int JSocket::Write(char* buff, int size)
{
return 0;
}
#if 0
int JSocket::make_socket(uint16_t port)
{
int sock = -1;

View File

@@ -13,7 +13,7 @@
#include "../include/JFileSystem.h"
#include "../include/JSpline.h"
#include "tinyxml/tinyxml.h"
#include "tinyxml.h"
#define SMALL_NUMBER 0.0001f
@@ -71,7 +71,7 @@ bool JSpline::Load(const char *filename, float xscale, float yscale)
element->QueryFloatAttribute("x", &xx);
element->QueryFloatAttribute("y", &yy);
Point pt(xx*xscale, yy*yscale);
JPoint pt(xx*xscale, yy*yscale);
AddControlPoint(pt);
}
@@ -84,7 +84,7 @@ bool JSpline::Load(const char *filename, float xscale, float yscale)
void JSpline::PointOnCurve(Point &out, float t, const Point &p0, const Point &p1, const Point &p2, const Point &p3)
void JSpline::PointOnCurve(JPoint &out, float t, const JPoint &p0, const JPoint &p1, const JPoint &p2, const JPoint &p3)
{
float t2 = t * t;
float t3 = t2 * t;
@@ -113,8 +113,8 @@ void JSpline::GeneratePixels()
x = mMidPoints[1].x;
y = mMidPoints[1].y;
Point newPt(x, y);
Point extraPt;
JPoint newPt(x, y);
JPoint extraPt;
mPixels.push_back(newPt);
@@ -151,13 +151,13 @@ void JSpline::GeneratePixels()
}
void JSpline::AddControlPoint(const Point &pt)
void JSpline::AddControlPoint(const JPoint &pt)
{
mMidPoints.push_back(pt);
}
void JSpline::GetControlPoint(Point &point, int index)
void JSpline::GetControlPoint(JPoint &point, int index)
{
if (index < (int)mMidPoints.size())
{
@@ -167,7 +167,7 @@ void JSpline::GetControlPoint(Point &point, int index)
}
void JSpline::GetPixel(Point &point, int index)
void JSpline::GetPixel(JPoint &point, int index)
{
if (index < (int)mPixels.size())
{

View File

@@ -0,0 +1,22 @@
#include "../include/OutputCapturer.h"
std::ostringstream OutputCapturer::stream;
boost::mutex OutputCapturer::mMutex;
void OutputCapturer::add(const std::string& s)
{
boost::mutex::scoped_lock lock(mMutex);
stream << s << "\n";
}
void OutputCapturer::debugAndClear()
{
stream.flush();
qDebug("%s", stream.str().c_str());
stream.str("");
}
void OutputCapturer::clear()
{
stream.str("");
}

View File

@@ -10,6 +10,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
//////////////////////////////////////////////////////////////////////////
@@ -158,46 +159,53 @@ JMusic *JSoundSystem::LoadMusic(const char *fileName)
{
// we should use the native asset manager instead
string fullpath = JFileSystem::GetInstance()->GetResourceFile(fileName);
int fd = open(fullpath.c_str(), O_RDONLY);
FILE* file = fdopen(fd, "r");
off_t start = 0;
off_t length;
fseek(file, 0, SEEK_END);
length = ftell(file);
SLresult result;
// configure audio source
SLDataLocator_AndroidFD loc_fd = {SL_DATALOCATOR_ANDROIDFD, fd, start, length};
SLDataFormat_MIME format_mime = {SL_DATAFORMAT_MIME, NULL, SL_CONTAINERTYPE_UNSPECIFIED};
SLDataSource audioSrc = {&loc_fd, &format_mime};
if(fullpath.compare("") != 0)
{
int fd = open(fullpath.c_str(), O_RDONLY);
FILE* file = fdopen(fd, "r");
off_t start = 0;
off_t length;
fseek(file, 0, SEEK_END);
length = ftell(file);
SLresult result;
// configure audio sink
SLDataLocator_OutputMix loc_outmix = {SL_DATALOCATOR_OUTPUTMIX, outputMixObject};
SLDataSink audioSnk = {&loc_outmix, NULL};
// configure audio source
SLDataLocator_AndroidFD loc_fd = {SL_DATALOCATOR_ANDROIDFD, fd, start, length};
SLDataFormat_MIME format_mime = {SL_DATAFORMAT_MIME, NULL, SL_CONTAINERTYPE_UNSPECIFIED};
SLDataSource audioSrc = {&loc_fd, &format_mime};
// create audio player
const SLInterfaceID ids[2] = {SL_IID_SEEK, SL_IID_VOLUME};
const SLboolean req[2] = {SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE};
result = (*engineEngine)->CreateAudioPlayer(engineEngine, &music->playerObject, &audioSrc, &audioSnk,
2, ids, req);
DebugTrace("result " << result);
// configure audio sink
SLDataLocator_OutputMix loc_outmix = {SL_DATALOCATOR_OUTPUTMIX, outputMixObject};
SLDataSink audioSnk = {&loc_outmix, NULL};
// realize the player
result = (*music->playerObject)->Realize(music->playerObject, SL_BOOLEAN_FALSE);
DebugTrace("result " << result);
// create audio player
const SLInterfaceID ids[2] = {SL_IID_SEEK, SL_IID_VOLUME};
const SLboolean req[2] = {SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE};
result = (*engineEngine)->CreateAudioPlayer(engineEngine, &music->playerObject, &audioSrc, &audioSnk, 2, ids, req);
DebugTrace("result " << result);
// get the play interface
result = (*music->playerObject)->GetInterface(music->playerObject, SL_IID_PLAY, &music->playInterface);
DebugTrace("result " << result);
// realize the player
result = (*music->playerObject)->Realize(music->playerObject, SL_BOOLEAN_FALSE);
DebugTrace("result " << result);
// get the seek interface
result = (*music->playerObject)->GetInterface(music->playerObject, SL_IID_SEEK, &music->seekInterface);
DebugTrace("result " << result);
// get the play interface
result = (*music->playerObject)->GetInterface(music->playerObject, SL_IID_PLAY, &music->playInterface);
DebugTrace("result " << result);
// get the volume interface
//result = (*music->playerObject)->GetInterface(music->playerObject, SL_IID_VOLUME, (void *)&music->musicVolumeInterface);
DebugTrace("result " << result);
// get the seek interface
result = (*music->playerObject)->GetInterface(music->playerObject, SL_IID_SEEK, &music->seekInterface);
DebugTrace("result " << result);
// get the volume interface
//result = (*music->playerObject)->GetInterface(music->playerObject, SL_IID_VOLUME, (void *)&music->musicVolumeInterface);
DebugTrace("result " << result);
}
else
{
DebugTrace("Bad path to music file");
}
}
mCurrentMusic = music;
@@ -215,12 +223,10 @@ void JSoundSystem::PlayMusic(JMusic *music, bool looping)
//(*music->musicVolumeInterface)->SetVolumeLevel(music->musicVolumeInterface, -1 * mVolume);
// enable whole file looping
result = (*music->seekInterface)->SetLoop(music->seekInterface,
looping?SL_BOOLEAN_TRUE:SL_BOOLEAN_FALSE, 0, SL_TIME_UNKNOWN);
result = (*music->seekInterface)->SetLoop(music->seekInterface, looping ? SL_BOOLEAN_TRUE : SL_BOOLEAN_FALSE, 0, SL_TIME_UNKNOWN);
assert(SL_RESULT_SUCCESS == result);
result = (*music->playInterface)->SetPlayState(music->playInterface,
SL_PLAYSTATE_PLAYING);
result = (*music->playInterface)->SetPlayState(music->playInterface, SL_PLAYSTATE_PLAYING);
assert(SL_RESULT_SUCCESS == result);
}
}

View File

@@ -19,7 +19,8 @@
*
*/
#include "../include/decoder_prx.h"
#include "decoder_prx.h"
#include <psputility.h>
char *prx_static_init()
{

View File

@@ -1,6 +1,5 @@
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "AdWhirlDelegateProtocol.h"
#import "EAGLViewController.h"
#import "EAGLView.h"
#import "ESRenderer.h"
@@ -8,9 +7,8 @@
// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
// The view content is basically an EAGL surface you render your OpenGL scene into.
// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
@interface EAGLView : UIView<AdWhirlDelegate,UIGestureRecognizerDelegate>
@interface EAGLView : UIView<UIGestureRecognizerDelegate>
{
AdWhirlView *adView;
//This is a trick, AdMob uses a viewController to display its Ads, trust me, you'll need this
EAGLViewController *viewController;
@@ -27,7 +25,6 @@
id displayLink;
CGPoint currentLocation;
}
@property (nonatomic, retain) AdWhirlView *adView;
@property (readonly, nonatomic, getter=isAnimating) BOOL animating;
@property (nonatomic) NSInteger animationFrameInterval;
@property (nonatomic, readwrite) CGPoint currentLocation;
@@ -37,8 +34,6 @@
- (void)drawView:(id)sender;
- (void)updateKeyboard: (NSString *) inputString;
- (void)removeAds;
- (void)displayAds;
- (void)destroyGame;

View File

@@ -12,7 +12,6 @@
#include "GameApp.h"
#import "AdWhirlView.h"
#import "wagicAppDelegate.h"
@@ -67,15 +66,10 @@ void DestroyGame(void)
}
#pragma mark Ad management constants
static NSString *_MY_AD_WHIRL_APPLICATION_KEY_IPHONE = @"b86aba511597401ca6b41c1626aa3013";
static NSString *_MY_AD_WHIRL_APPLICATION_KEY_IPAD = @"2e70e3f3da40408588b9a3170c8d268f";
#pragma mark -
@implementation EAGLView
@synthesize adView;
@synthesize animating;
@dynamic animationFrameInterval;
@synthesize currentLocation;
@@ -91,7 +85,6 @@ static NSString *_MY_AD_WHIRL_APPLICATION_KEY_IPAD = @"2e70e3f3da40408588b9a3170
- (void)dealloc
{
[renderer release];
[self removeAds];
[super dealloc];
}
@@ -635,30 +628,6 @@ static NSString *_MY_AD_WHIRL_APPLICATION_KEY_IPAD = @"2e70e3f3da40408588b9a3170
}
//These are the methods for the AdWhirl Delegate, you have to implement them
#pragma mark AdWhirlDelegate methods
- (void)adWhirlWillPresentFullScreenModal {
//It's recommended to invoke whatever you're using as a "Pause Menu" so your
//game won't keep running while the user is "playing" with the Ad (for example, iAds)
[self pauseGame];
}
- (void)adWhirlDidDismissFullScreenModal {
//Once the user closes the Ad he'll want to return to the game and continue where
//he left it
[self resumeGame];
}
- (NSString *)adWhirlApplicationKey {
if ((UI_USER_INTERFACE_IDIOM()) == UIUserInterfaceIdiomPad)
return _MY_AD_WHIRL_APPLICATION_KEY_IPAD;
return _MY_AD_WHIRL_APPLICATION_KEY_IPHONE;
}
- (UIViewController *)viewControllerForPresentingModalView {
//Remember that UIViewController we created in the Game.h file? AdMob will use it.
//If you want to use "return self;" instead, AdMob will cancel the Ad requests.
@@ -666,101 +635,5 @@ static NSString *_MY_AD_WHIRL_APPLICATION_KEY_IPAD = @"2e70e3f3da40408588b9a3170
}
- (void)adWhirlDidReceiveAd:(AdWhirlView *)adWhirlView {
[UIView beginAnimations:@"AdWhirlDelegate.adWhirlDidReceiveAd:"
context:nil];
BOOL isLandscape = UIDeviceOrientationIsLandscape( [UIDevice currentDevice].orientation);
[UIView setAnimationDuration:0.7];
CGSize adSize = [adWhirlView actualAdSize];
CGRect newFrame = [adWhirlView frame];
CGSize screenSize = [self.window bounds].size;
newFrame.size = adSize;
// ads are 320 x 50
newFrame.origin.x = ( (isLandscape ? screenSize.height : screenSize.width) - adSize.width)/ 2;
newFrame.origin.y = ( (isLandscape ? screenSize.width : screenSize.height) - 50);
[adWhirlView setFrame: newFrame];
[UIView commitAnimations];
}
-(void)adWhirlDidFailToReceiveAd:(AdWhirlView *)adWhirlView usingBackup:(BOOL)yesOrNo {
//The code to show my own Ad banner again
NSLog(@"failed to get an Ad");
}
-(void) removeAds {
//There's something weird about AdWhirl because setting the adView delegate
//to "nil" doesn't stops the Ad requests and also it doesn't remove the adView
//from superView; do the following to remove AdWhirl from your scene.
//
//If adView exists, remove everything
if (adView) {
//Remove adView from superView
[adView removeFromSuperview];
//Replace adView's view with "nil"
[adView replaceBannerViewWith:nil];
//Tell AdWhirl to stop requesting Ads
[adView ignoreNewAdRequests];
//Set adView delegate to "nil"
[adView setDelegate:nil];
//Release adView
[adView release];
//set adView to "nil"
adView = nil;
}
}
-(void) displayAds
{
BOOL isLandscape = UIDeviceOrientationIsLandscape( [UIDevice currentDevice].orientation);
//Assign the AdWhirl Delegate to our adView
if ( adView != nil )
[self removeAds];
//Let's allocate the viewController (it's the same RootViewController as declared
//in our AppDelegate; will be used for the Ads)
viewController = [(wagicAppDelegate *)[[UIApplication sharedApplication] delegate] glViewController];
self.adView = [AdWhirlView requestAdWhirlViewWithDelegate:self];
//Set auto-resizing mask
self.adView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin;
//This isn't really needed but also it makes no harm. It just retrieves the configuration
//from adwhirl.com so it knows what Ad networks to use
[adView updateAdWhirlConfig];
//Get the actual size for the requested Ad
CGSize adSize = [adView actualAdSize];
//
//Set the position; remember that we are using 4 values (in this order): X, Y, Width, Height
//You can comment this line if your game is in portrait mode and you want your Ad on the top
//if you want the Ad in other position (portrait or landscape), use the following code,
//for this example, the Ad will be positioned in the bottom+center of the screen
//(in landscape mode):
//Same explanation as the one in the method "adjustAdSize" for the Ad's width
int screenWidth = [viewController.parentViewController.view bounds].size.width;
float yOffset = [viewController.parentViewController.view bounds].size.height - adSize.height;
if ( isLandscape )
{
screenWidth = [viewController.parentViewController.view bounds].size.height;
yOffset = screenWidth - adSize.height;
}
self.adView.frame = CGRectMake((screenWidth - adSize.width) / 2, yOffset, adSize.width, adSize.height);
//Trying to keep everything inside the Ad bounds
self.adView.clipsToBounds = YES;
//Adding the adView (used for our Ads) to our viewController
[viewController.view addSubview:adView];
//Bring our view to front
[viewController.view bringSubviewToFront:adView];
}
@end

View File

@@ -1,5 +1,4 @@
#import <UIKit/UIKit.h>
#import "AdWhirlDelegateProtocol.h"
@interface EAGLViewController : UIViewController<UITextFieldDelegate> {
@@ -11,5 +10,6 @@ void resumeGame();
@property (nonatomic, retain) id eaglView;
@property (nonatomic, retain) UITextField *inputField;
@property (nonatomic, assign) BOOL bannerIsVisible;
- (void)toggleKeyboardWithState: (NSString *) initialText;
@end

View File

@@ -25,10 +25,13 @@
[inputField setAutocapitalizationType:UITextAutocapitalizationTypeNone];
[inputField setAutocorrectionType:UITextAutocorrectionTypeNo];
[inputField setKeyboardType: UIKeyboardTypeNamePhonePad];
CGRect frame = [[UIScreen mainScreen] applicationFrame];
eaglView = [[EAGLView alloc] initWithFrame:frame];
[self setView: eaglView];
[self.view addSubview: inputField];
[inputField release];
}
return self;
@@ -50,39 +53,39 @@
- (void)viewWillAppear:(BOOL)animated {
NSLog(@"EAGL ViewController - view Will Appear");
[self.view resumeGame];
[(id)self.view resumeGame];
}
- (void)viewWillDisappear:(BOOL)animated
{
[self.view pauseGame];
[(id)self.view pauseGame];
}
- (void)pauseGame
{
[self.view pauseGame];
[(id)self.view pauseGame];
}
- (void)resumeGame
{
[self.view resumeGame];
[(id)self.view resumeGame];
}
- (void)endGame
{
[self.view endGame];
[(id)self.view endGame];
}
- (void)viewDidAppear:(BOOL)animated {
NSLog(@"EAGL ViewController - view Did Appear");
UIDeviceOrientation currentDeviceOrientation = [UIDevice currentDevice].orientation;
UIInterfaceOrientation currentInterfaceOrientation = self.interfaceOrientation;
NSLog(@"Current Interface: %@. Current Device: %@",
[self interfaceOrientationName:currentInterfaceOrientation],
NSLog(@"Current Interface: %@. Current Device: %@",
[self interfaceOrientationName:currentInterfaceOrientation],
[self deviceOrientationName:currentDeviceOrientation]);
}
@@ -91,7 +94,7 @@
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc. that aren't in use.
}
@@ -103,6 +106,25 @@
}
#pragma mark - device orientation handlers
- (NSUInteger)supportedInterfaceOrientations
{
//I want to support portrait in ABCView at iPhone only.
//and support all orientation in other views and iPad.
if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone)
{
return UIInterfaceOrientationMaskLandscape;
}
//support all
return UIInterfaceOrientationMaskAll;
}
-(BOOL)shouldAutorotate {
return YES;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Overriden to allow any orientation.
@@ -110,23 +132,23 @@
if ( isSmallScreen && UIInterfaceOrientationIsPortrait(interfaceOrientation))
return NO;
return YES;
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
[[eaglView adView] rotateToOrientation: toInterfaceOrientation];
// [[eaglView adView] rotateToOrientation: toInterfaceOrientation];
}
#pragma mark -
#pragma mark Orientation Information
- (NSString*)interfaceOrientationName:(UIInterfaceOrientation) interfaceOrientation {
NSString* result = nil;
switch (interfaceOrientation) {
case UIInterfaceOrientationPortrait:
result = @"Portrait";
break;
@@ -142,16 +164,16 @@
default:
result = @"Unknown Interface Orientation";
}
return result;
};
- (NSString*)deviceOrientationName:(UIDeviceOrientation) deviceOrientation {
NSString* result = nil;
switch (deviceOrientation) {
case UIDeviceOrientationUnknown:
result = @"Unknown";
break;
@@ -176,7 +198,7 @@
default:
result = @"Unknown Device Orientation";
}
return result;
};
@@ -205,7 +227,7 @@
[eaglView updateKeyboard: @"CLEAR"];
else
[eaglView updateKeyboard: string];
return YES;
}
@@ -215,7 +237,7 @@
}
- (BOOL) textFieldShouldReturn:(UITextField *)textField
- (BOOL) textFieldShouldReturn:(UITextField *)textField
{
[eaglView updateKeyboard: @"SAVE"];
[textField resignFirstResponder];

View File

@@ -33,7 +33,7 @@ bool checkFramebufferStatus();
context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
if ( context == nil)
context = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES1];
if (!context || ![EAGLContext setCurrentContext:context])
{
[self release];
@@ -46,20 +46,29 @@ bool checkFramebufferStatus();
- (void)render
{
// NSLog(@"Renderer - render");
struct timeval tv;
uint dt;
// This application only creates a single context which is already set current at this point.
// This call is redundant, but needed if dealing with multiple contexts.
[EAGLContext setCurrentContext:context];
// This application only creates a single default framebuffer which is already bound at this point.
// This call is redundant, but needed if dealing with multiple framebuffers.
glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
GLfloat currentRatio = (GLfloat) backingWidth / (GLfloat) backingHeight;
if ((GLfloat)backingWidth / (GLfloat)backingHeight < ACTUAL_RATIO)
// for retina devices. because of the 568 px, the ratio between height-width skews the
// frame a bit
if ( backingHeight == 568 || backingWidth == 568) {
viewPort.left = 0;
viewPort.top = -((backingWidth/ACTUAL_RATIO)-backingHeight)/2 + 22; // account for status bar
viewPort.right = backingWidth;
viewPort.bottom = -((backingWidth/ACTUAL_RATIO)-backingHeight)/2 + backingWidth / ACTUAL_RATIO - 22;
}
else if (currentRatio < ACTUAL_RATIO)
{
viewPort.left = 0;
viewPort.top = -((backingWidth/ACTUAL_RATIO)-backingHeight)/2;
@@ -73,21 +82,21 @@ bool checkFramebufferStatus();
viewPort.right = backingHeight * ACTUAL_RATIO;
viewPort.bottom = -((backingWidth/ACTUAL_RATIO)-backingHeight)/2 + backingWidth / ACTUAL_RATIO + backingHeight;
}
glViewport(viewPort.left, viewPort.top, viewPort.right-viewPort.left, viewPort.bottom-viewPort.top);
JRenderer::GetInstance()->SetActualWidth(viewPort.right-viewPort.left);
JRenderer::GetInstance()->SetActualHeight(viewPort.bottom-viewPort.top);
gettimeofday(&tv, NULL);
uint64_t tickCount = tv.tv_sec * 1000 + tv.tv_usec / 1000;
dt = (tickCount - lastTickCount);
lastTickCount = tickCount;
g_engine->SetDelta((float)dt / 1000.0f);
g_engine->Update((float)dt / 1000.0f);
g_engine->Render();
// This application only creates a single color renderbuffer which is already bound at this point.
@@ -103,18 +112,18 @@ bool checkFramebufferStatus();
glDeleteFramebuffers(1, &defaultFramebuffer);
defaultFramebuffer = 0;
}
if(colorRenderbuffer) {
glDeleteRenderbuffers(1, &colorRenderbuffer);
colorRenderbuffer = 0;
}
glGenFramebuffers(1, &defaultFramebuffer);
glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
glGenRenderbuffers(1, &colorRenderbuffer);
glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
// Allocate color buffer backing based on the current layer size
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer);
[context renderbufferStorage:GL_RENDERBUFFER fromDrawable:layer];
@@ -127,41 +136,41 @@ bool checkFramebufferStatus();
glEnable(GL_TEXTURE_2D);
glEnable(GL_DEPTH_TEST);
glEnable(GL_CULL_FACE); // do not calculate inside of poly's
glFrontFace(GL_CCW);
glFrontFace(GL_CCW);
glEnable (GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
// glEnable(GL_SCISSOR_TEST); // Enable Clipping
// glEnable(GL_SCISSOR_TEST); // Enable Clipping
glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // Black Background (yes that's the way fuckers)
glClearDepthf(1.0f); // Depth Buffer Setup
return YES;
}
bool checkFramebufferStatus() {
GLenum status = (GLenum)glCheckFramebufferStatus(GL_FRAMEBUFFER);
switch(status) {
case GL_FRAMEBUFFER_COMPLETE:
return true;
case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
printf("Framebuffer incomplete,incomplete attachment\n");
return false;
case GL_FRAMEBUFFER_UNSUPPORTED:
printf("Unsupported framebuffer format\n");
return false;
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
printf("Framebuffer incomplete,missing attachment\n");
return false;
}
return false;
}
@@ -187,7 +196,7 @@ bool checkFramebufferStatus() {
[context release];
context = nil;
[super dealloc];
}

View File

@@ -17,7 +17,7 @@
- (void) updateComplete: (id) notificationMsg
{
NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter];
[dnc removeObserver: self name: @"coreComplete" object: nil];
[dnc removeObserver: self name: @"iosConfigComplete" object: nil];
[dnc postNotificationName: @"initializeGame" object: self];
@@ -34,12 +34,12 @@
- (void) downloadResources
{
NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter];
[dnc addObserver:self selector:@selector(initIosUpdate:) name:@"coreComplete" object: nil];
wagicDownloadController = [[WagicDownloadProgressViewController alloc] init];
[wagicDownloadController performSelectorInBackground: @selector(startDownload:) withObject:@"core"];
[self.window addSubview: wagicDownloadController.view];
[self.window makeKeyWindow];
@@ -51,16 +51,16 @@
NSString *pathPrefix = nil;
if ( pathNamePrefix == nil ) // default to User
pathPrefix = @"User";
else
else
pathPrefix = pathNamePrefix;
NSError *error = nil;
NSFileManager *fm = [NSFileManager defaultManager];
NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES);
NSString *userDocumentsDirectory = [paths objectAtIndex:0];
NSString *downloadFilePath = [userDocumentsDirectory stringByAppendingString: [NSString stringWithFormat: @"/%@/%@.zip", pathPrefix, folderName]];
ZipArchive *za = [[ZipArchive alloc] init];
if ([za UnzipOpenFile: downloadFilePath])
{
@@ -73,7 +73,7 @@
NSLog(@"An Error occurred while unpacking zip file.");
}
[za UnzipCloseFile];
if (ret == YES)
{
// delete the archive
@@ -85,7 +85,7 @@
}
}
[za release], za = nil;
}
@@ -98,15 +98,15 @@
{
NSString *pathname = [NSString stringWithFormat: @"%@/%@", path, filename];
[data appendFormat: @"%@\n", pathname];
BOOL isDirectory = [[fileManager attributesOfItemAtPath: pathname error: nil] objectForKey: NSFileType] == NSFileTypeDirectory;
if (isDirectory)
[data appendString: [self getDirContents: pathname]];
}
NSString *manifestList = [data stringByAppendingFormat: @"\n"];
[data release];
return manifestList;
}
@@ -114,37 +114,37 @@
{
NSString *manifestFile = [docsPath stringByAppendingPathComponent:@"Manifest"];
[[self getDirContents: docsPath] writeToFile:manifestFile atomically:YES encoding:NSUTF8StringEncoding error: nil];
}
/**
check for any zip files dropped into the documents directory before loading the game.
If so, move the "core" files into the "Res" directory and move all other zip files into the "User" directory.
check for any zip files dropped into the documents directory before loading the game.
If so, move the "core" files into the "Res" directory and move all other zip files into the "User" directory.
Check for a "core" zip file in the Res directory. If it exists, then return YES. Otherwise, return NO.
*/
- (void) initializeResources
{
NSFileManager *fileManager = [NSFileManager defaultManager];
NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docsPath = [paths objectAtIndex: 0];
NSArray *docsPathContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath: docsPath error:nil];
NSString *versionPredicate = [NSString stringWithFormat: @"(self BEGINSWITH '%@')", [NSString stringWithCString: WAGIC_CORE_VERSION_STRING encoding:NSUTF8StringEncoding]];
NSCompoundPredicate *compoundPredicate = [[NSCompoundPredicate alloc] initWithType:NSAndPredicateType subpredicates: [NSArray arrayWithObjects: [NSPredicate predicateWithFormat:@"self ENDSWITH '.zip'"], [NSPredicate predicateWithFormat: [NSString stringWithFormat: @" NOT ( %@ ) ", versionPredicate]], nil]];
NSArray *coreFiles = [docsPathContents filteredArrayUsingPredicate:[NSPredicate predicateWithFormat: versionPredicate]];
NSArray *resourceZipFiles = [docsPathContents filteredArrayUsingPredicate: compoundPredicate];
NSString *userPath = [NSString stringWithFormat: @"%@/User", docsPath];
NSString *resPath = [NSString stringWithFormat: @"%@/Res", docsPath];
NSError *error = nil;
[compoundPredicate release], compoundPredicate = nil;
if ( ([resourceZipFiles count] > 0 ) && ![fileManager fileExistsAtPath: userPath] )
[fileManager createDirectoryAtPath: userPath withIntermediateDirectories: YES attributes:nil error:nil ];
for (NSString *zipFile in resourceZipFiles)
{
NSString *oldPath = [NSString stringWithFormat: @"%@/%@", docsPath, zipFile];
@@ -155,7 +155,7 @@
[fileManager removeItemAtPath: newPath error: &error];
}
error = nil;
[fileManager moveItemAtPath: oldPath toPath:newPath error: &error];
NSLog(@"Moving %@ to %@", oldPath, newPath);
if ( error != nil )
@@ -175,7 +175,7 @@
[fileManager removeItemAtPath: newPath error: &error];
}
error = nil;
[fileManager moveItemAtPath: oldPath toPath:newPath error: &error];
NSLog(@"Moving %@ to %@", oldPath, newPath);
if ( error != nil )
@@ -187,21 +187,21 @@
}
- (BOOL) hasResourceFiles
{
{
NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docsPath = [paths objectAtIndex: 0];
NSString *resPath = [NSString stringWithFormat: @"%@/Res", docsPath];
NSArray *resDirContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath: resPath error:nil];
NSString *versionPredicate = [NSString stringWithFormat: @"(self BEGINSWITH '%@')", [NSString stringWithCString: WAGIC_CORE_VERSION_STRING encoding:NSUTF8StringEncoding]];
NSArray *coreFiles = [resDirContents filteredArrayUsingPredicate:[NSPredicate predicateWithFormat: versionPredicate]];
if ([coreFiles count] >= 2)
{
return YES;
}
return NO;
}
@@ -211,30 +211,30 @@
NSString *docsPath = [NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex: 0];
NSFileManager *fm = [NSFileManager defaultManager];
NSString *userPath = [docsPath stringByAppendingString: @"/User"];
NSArray *userDirectories = [fm contentsOfDirectoryAtPath: userPath error: nil];
for (NSString *userFilename in userDirectories)
{
NSString *userPathname = [userPath stringByAppendingFormat: @"/%@", userFilename];
NSString *zipFileName = [userPathname stringByAppendingString: @".zip"];
if ([[fm attributesOfItemAtPath: userPathname error: nil] objectForKey: NSFileType] == NSFileTypeDirectory && ([fm fileExistsAtPath:zipFileName]))
{
[self unpackageResources: userFilename pathPrefixName: @"User"];
[fm removeItemAtPath: zipFileName error: nil];
}
else if ( [userFilename hasPrefix: @"ai_decks"] ) // special case to allow manual override of AI decks in User directory
{
[self unpackageResources: @"ai_decks" pathPrefixName: @"User/ai/baka"];
}
}
// scan for deck*.txt and collection.dat as well as options.txt in the Documents directory and copy them into the player directory
NSArray *playerDataFilePredicates = [NSArray arrayWithObjects:
[NSPredicate predicateWithFormat: @"SELF BEGINSWITH[cd] 'deck' AND SELF ENDSWITH '.txt'"],
[NSPredicate predicateWithFormat: @"SELF BEGINSWITH[cd] 'options' AND SELF ENDSWITH '.txt'"],
[NSPredicate predicateWithFormat: @"SELF BEGINSWITH[cd] 'tasks' AND SELF ENDSWITH '.dat'"],
NSArray *playerDataFilePredicates = [NSArray arrayWithObjects:
[NSPredicate predicateWithFormat: @"SELF BEGINSWITH[cd] 'deck' AND SELF ENDSWITH '.txt'"],
[NSPredicate predicateWithFormat: @"SELF BEGINSWITH[cd] 'options' AND SELF ENDSWITH '.txt'"],
[NSPredicate predicateWithFormat: @"SELF BEGINSWITH[cd] 'tasks' AND SELF ENDSWITH '.dat'"],
[NSPredicate predicateWithFormat: @"SELF BEGINSWITH[cd] 'collection' AND SELF ENDSWITH '.dat'"], nil];
NSCompoundPredicate *playerDataPredicate = [[NSCompoundPredicate alloc] initWithType:NSOrPredicateType subpredicates: playerDataFilePredicates];
@@ -246,23 +246,23 @@
NSString *toPath = [docsPath stringByAppendingFormat: @"/User/player/%@", [file lowercaseString]];
[fm moveItemAtPath: fromPath toPath: toPath error: nil];
}
[playerDataPredicate release], playerDataPredicate = nil;
[self createManifest: docsPath];
[[NSNotificationCenter defaultCenter] postNotificationName: @"readyToStartGame" object: nil];
}
- (void) startGame
{
if (glViewController != nil)
if (glViewController != nil)
[glViewController release];
glViewController = [[EAGLViewController alloc] init];
[[[self.window subviews] lastObject] removeFromSuperview];
[self.window addSubview:self.glViewController.view];
[self.window setRootViewController: glViewController];
NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter];
[dnc removeObserver: self name: @"intializeGame" object: nil];
@@ -286,7 +286,7 @@
[internetReach release];
[glViewController release];
[wagicDownloadController release];
[super dealloc];
}
@@ -298,23 +298,23 @@
hostReach = [[Reachability reachabilityForGoogleDNS] retain];
internetReach = [[Reachability reachabilityForInternetConnection] retain];
wifiReach = [[Reachability reachabilityForLocalWiFi] retain];
[hostReach startNotifier];
[internetReach startNotifier];
[wifiReach startNotifier];
}
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.glViewController = nil;
[self setupNetworkListeners];
NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter];
[dnc addObserver:self selector:@selector(preGameInitialization) name:@"initializeGame" object: nil];
[dnc addObserver:self selector:@selector(startGame) name:@"readyToStartGame" object: nil];
[self initializeResources];
// check to see if the Res folder exists. If it does continue
// otherwise bring up the download dialog and download the core files
@@ -328,7 +328,7 @@
{
[self preGameInitialization];
}
[self.window setBackgroundColor: [UIColor blackColor]];
[self.window makeKeyAndVisible];
@@ -337,7 +337,7 @@
- (void)applicationWillTerminate:(UIApplication *)application
{
[self.glViewController.view destroyGame];
[(id)self.glViewController.view destroyGame];
}
- (void)initializeKeyboard: (id) initialState
@@ -345,31 +345,18 @@
[self.glViewController toggleKeyboardWithState: initialState];
}
- (void) handleWEngineCommand:(NSString *) command
withUIParameters: (CGFloat) x
yCoordinate: (CGFloat) y
width: (CGFloat) width
- (void) handleWEngineCommand:(NSString *) command
withUIParameters: (CGFloat) x
yCoordinate: (CGFloat) y
width: (CGFloat) width
height: (CGFloat) height
{
}
- (void)handleWEngineCommand:(NSString *) command withParameter: (NSString *) parameter
{
BOOL isDevicePhone = (UI_USER_INTERFACE_IDIOM()) == UIUserInterfaceIdiomPhone;
if ([command isEqualToString: @"entergamestate:menu"] )
[glViewController.eaglView displayAds];
else if ([command isEqualToString: @"enterduelphase:end"] && isDevicePhone)
[glViewController.eaglView displayAds];
else if ([command isEqualToString: @"leaveduelphase:end"] ||
[command isEqualToString: @"leavegamestate:menu"])
{
if (isDevicePhone)
[glViewController.eaglView removeAds];
}
else if ([command isEqualToString: @"displayKeyboard"])
if ([command isEqualToString: @"displayKeyboard"])
{
[self initializeKeyboard: parameter];
}
@@ -379,16 +366,17 @@
}
- (void) rotateBackgroundImage:(UIInterfaceOrientation)fromInterfaceOrientation toInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
bool isPhone = (UI_USER_INTERFACE_IDIOM()) == UIUserInterfaceIdiomPhone;
if (isPhone)
if (isPhone)
{
UIImage *bgImage = [UIImage imageNamed: @"Default-Portrait.png"];
[[[self.window subviews] objectAtIndex: 0] setBackgroundColor: [UIColor colorWithPatternImage: bgImage]];
}
else
else
{
[self.window setBackgroundColor: [UIColor clearColor]];
if (UIInterfaceOrientationIsLandscape( toInterfaceOrientation)) {
@@ -410,12 +398,12 @@
{
BOOL netAvailable = NO;
//NSDate *startTime = [[[NSDate alloc ] init] autorelease];
hostReach = [[Reachability reachabilityForGoogleDNS] retain];
NetworkStatus netStatus = [hostReach currentReachabilityStatus];
if (netStatus == ReachableViaWiFi || netStatus == ReachableViaWWAN) {
netAvailable = YES;
}

View File

@@ -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>
@@ -310,10 +310,13 @@ void JQuad::SetTextureRect(float x, float y, float w, float h)
mWidth = w;
mHeight = h;
mTX0 = x/mTex->mTexWidth;
mTY0 = y/mTex->mTexHeight;
mTX1 = (x+w)/mTex->mTexWidth;
mTY1 = (y+h)/mTex->mTexHeight;
if(mTex)
{
mTX0 = x/mTex->mTexWidth;
mTY0 = y/mTex->mTexHeight;
mTX1 = (x+w)/mTex->mTexWidth;
mTY1 = (y+h)/mTex->mTexHeight;
}
}
@@ -340,7 +343,7 @@ void JQuad::SetHotSpot(float x, float y)
//////////////////////////////////////////////////////////////////////////
JTexture::JTexture() : mBuffer(NULL)
JTexture::JTexture() : mWidth(0), mHeight(0), mBuffer(NULL)
{
mTexId = -1;
}
@@ -820,7 +823,7 @@ void JRenderer::BeginScene()
esMatrixLoadIdentity(&theMvpMatrix);
esOrtho(&theMvpMatrix, 0.0f, SCREEN_WIDTH_F, 0.0f, SCREEN_HEIGHT_F-1.0f,-1.0f, 1.0f);
#endif //(!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0)
#if (defined WIN32) || ((defined GL_VERSION_ES_CM_1_1) && (!defined IOS))
#if (defined WIN32 && !defined GL_ES_VERSION_2_0) || ((defined GL_VERSION_ES_CM_1_1) && (!defined IOS))
float scaleH = mActualHeight/SCREEN_HEIGHT_F;
float scaleW = mActualWidth/SCREEN_WIDTH_F;
if (scaleH != 1.0f || scaleW != 1.0f)
@@ -840,7 +843,7 @@ void JRenderer::EndScene()
void JRenderer::BindTexture(JTexture *tex)
{
checkGlError();
if (mCurrentTex != tex->mTexId)
if (tex && mCurrentTex != tex->mTexId)
{
mCurrentTex = tex->mTexId;
@@ -1584,7 +1587,7 @@ void JRenderer::Plot(float x, float y, PIXEL_TYPE color)
glEnd();
glColor4ub(255, 255, 255, 255);
#else
// FIXME, not used
cerr << x << " " << y << " " << color << endl;
#endif //#if (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0)
glEnable(GL_TEXTURE_2D);
checkGlError();
@@ -1606,6 +1609,7 @@ void JRenderer::PlotArray(float *x, float *y, int count, PIXEL_TYPE color)
glColor4ub(255, 255, 255, 255);
#else
// FIXME, not used
cerr << x << " " << y << " " << count << " " << " " << color << endl;
#endif //#if (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0)
glEnable(GL_TEXTURE_2D);
checkGlError();
@@ -1800,7 +1804,7 @@ static void PNGCustomReadDataFn(png_structp png_ptr, png_bytep data, png_size_t
{
png_size_t check;
JFileSystem *fileSystem = (JFileSystem*)png_ptr->io_ptr;
JFileSystem *fileSystem = (JFileSystem*)png_get_io_ptr(png_ptr);
check = fileSystem->ReadFile(data, length);
@@ -1883,7 +1887,7 @@ int JRenderer::LoadPNG(TextureInfo &textureInfo, const char *filename, int mode
//fclose(fp);
fileSystem->CloseFile();
png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
png_destroy_read_struct(&png_ptr, NULL, NULL);
return JGE_ERR_PNG;
}
@@ -1892,11 +1896,15 @@ int JRenderer::LoadPNG(TextureInfo &textureInfo, const char *filename, int mode
png_set_sig_bytes(png_ptr, sig_read);
png_read_info(png_ptr, info_ptr);
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, int_p_NULL, int_p_NULL);
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL);
png_set_strip_16(png_ptr);
png_set_packing(png_ptr);
if (color_type == PNG_COLOR_TYPE_PALETTE) png_set_palette_to_rgb(png_ptr);
#if PNG_LIBPNG_VER >= 10400
if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr);
#else
if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) png_set_gray_1_2_4_to_8(png_ptr);
#endif
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr);
png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER);
@@ -1906,7 +1914,7 @@ int JRenderer::LoadPNG(TextureInfo &textureInfo, const char *filename, int mode
//fclose(fp);
fileSystem->CloseFile();
png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
png_destroy_read_struct(&png_ptr, NULL, NULL);
return JGE_ERR_MALLOC_FAILED;
}
@@ -1928,7 +1936,7 @@ int JRenderer::LoadPNG(TextureInfo &textureInfo, const char *filename, int mode
for (y = 0; y < (int)height; y++)
{
png_read_row(png_ptr, (BYTE*) line, png_bytep_NULL);
png_read_row(png_ptr, (BYTE*) line, NULL);
for (x = 0; x < (int)width; x++)
{
DWORD color32 = line[x];
@@ -1951,7 +1959,7 @@ int JRenderer::LoadPNG(TextureInfo &textureInfo, const char *filename, int mode
free (line);
png_read_end(png_ptr, info_ptr);
png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
fileSystem->CloseFile();
@@ -1994,8 +2002,15 @@ int JRenderer::image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bg
GifFileType *GifFileIn = NULL;
ColorMapObject *palette;
int ExtCode;
#if GIFLIB_MAJOR >= 5
if ((GifFileIn = DGifOpen(handle, readFunc, NULL)) == NULL)
return 1;
#else
if ((GifFileIn = DGifOpen(handle, readFunc)) == NULL)
return 1;
#endif
*bgcolor = 0;
textureInfo.mWidth = 0;
textureInfo.mHeight = 0;
@@ -2004,7 +2019,11 @@ int JRenderer::image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bg
do {
if (DGifGetRecordType(GifFileIn, &RecordType) == GIF_ERROR)
{
#if GIFLIB_MAJOR >= 5
DGifCloseFile(GifFileIn, NULL);
#else
DGifCloseFile(GifFileIn);
#endif
return 1;
}
@@ -2013,12 +2032,20 @@ int JRenderer::image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bg
{
if (DGifGetImageDesc(GifFileIn) == GIF_ERROR)
{
#if GIFLIB_MAJOR >= 5
DGifCloseFile(GifFileIn, NULL);
#else
DGifCloseFile(GifFileIn);
#endif
return 1;
}
if((palette = (GifFileIn->SColorMap != NULL) ? GifFileIn->SColorMap : GifFileIn->Image.ColorMap) == NULL)
{
#if GIFLIB_MAJOR >= 5
DGifCloseFile(GifFileIn, NULL);
#else
DGifCloseFile(GifFileIn);
#endif
return 1;
}
textureInfo.mWidth = GifFileIn->Image.Width;
@@ -2026,7 +2053,11 @@ int JRenderer::image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bg
*bgcolor = gif_color32(GifFileIn->SBackGroundColor);
if((LineIn = (GifRowType) malloc(GifFileIn->Image.Width * sizeof(GifPixelType))) == NULL)
{
#if GIFLIB_MAJOR >= 5
DGifCloseFile(GifFileIn, NULL);
#else
DGifCloseFile(GifFileIn);
#endif
return 1;
}
textureInfo.mTexWidth = getNextPower2(GifFileIn->Image.Width);
@@ -2036,7 +2067,11 @@ int JRenderer::image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bg
if((p32 = (DWORD *)malloc(sizeof(PIXEL_TYPE) * textureInfo.mTexWidth * textureInfo.mTexHeight)) == NULL)
{
free((void *)LineIn);
#if GIFLIB_MAJOR >= 5
DGifCloseFile(GifFileIn, NULL);
#else
DGifCloseFile(GifFileIn);
#endif
return 1;
}
DWORD * curr = p32;
@@ -2048,7 +2083,11 @@ int JRenderer::image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bg
{
free((void *)p32);
free((void *)LineIn);
#if GIFLIB_MAJOR >= 5
DGifCloseFile(GifFileIn, NULL);
#else
DGifCloseFile(GifFileIn);
#endif
return 1;
}
for (GifWord j = 0; j < GifFileIn->Image.Width; j ++)
@@ -2077,7 +2116,11 @@ int JRenderer::image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bg
}
if(LineIn != NULL)
free((void *)LineIn);
#if GIFLIB_MAJOR >= 5
DGifCloseFile(GifFileIn, NULL);
#else
DGifCloseFile(GifFileIn);
#endif
return 1;
}
while (Extension != NULL) {
@@ -2090,7 +2133,11 @@ int JRenderer::image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bg
}
if(LineIn != NULL)
free((void *)LineIn);
#if GIFLIB_MAJOR >= 5
DGifCloseFile(GifFileIn, NULL);
#else
DGifCloseFile(GifFileIn);
#endif
return 1;
}
}
@@ -2105,7 +2152,11 @@ int JRenderer::image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bg
if(LineIn != NULL)
free((void *)LineIn);
#if GIFLIB_MAJOR >= 5
DGifCloseFile(GifFileIn, NULL);
#else
DGifCloseFile(GifFileIn);
#endif
return 0;
}
@@ -2242,7 +2293,7 @@ JTexture* JRenderer::LoadTexture(const char* filename, int mode, int TextureForm
return tex;
}
#elif (defined QT_CONFIG)
JTexture* JRenderer::LoadTexture(const char* filename, int mode, int TextureFormat __attribute__((unused)))
JTexture* JRenderer::LoadTexture(const char* filename, int, int)
{
JTexture *tex = NULL;
int rawsize = 0;
@@ -2482,7 +2533,7 @@ void JRenderer::Enable2D()
#if (defined GL_VERSION_ES_CM_1_1) || (defined GL_OES_VERSION_1_1)
glOrthof(0.0f, SCREEN_WIDTH_F, 0.0f, SCREEN_HEIGHT_F-1.0f, -1.0f, 1.0f);
#else
gluOrtho2D(0.0f, SCREEN_WIDTH_F, 0.0f, SCREEN_HEIGHT_F-1.0f);
glOrtho(0.0f, SCREEN_WIDTH_F, 0.0f, SCREEN_HEIGHT_F-1.0f, -1.0f, 1.0f);
#endif
glMatrixMode (GL_MODELVIEW); // Select The Modelview Matrix
@@ -2518,7 +2569,7 @@ void JRenderer::Enable3D()
}
void JRenderer::SetClip(int x, int y, int width, int height)
void JRenderer::SetClip(int, int, int, int)
{// NOT USED
//glScissor(x, y, width, height);
}
@@ -2530,25 +2581,25 @@ void JRenderer::LoadIdentity()
}
void JRenderer::Translate(float x, float y, float z)
void JRenderer::Translate(float, float, float)
{// NOT USED
//glTranslatef(x, y, z);
}
void JRenderer::RotateX(float angle)
void JRenderer::RotateX(float)
{// NOT USED
//glRotatef(angle*RAD2DEG, 1.0f, 0.0f, 0.0f);
}
void JRenderer::RotateY(float angle)
void JRenderer::RotateY(float)
{// NOT USED
//glRotatef(angle*RAD2DEG, 0.0f, 1.0f, 0.0f);
}
void JRenderer::RotateZ(float angle)
void JRenderer::RotateZ(float)
{// NOT USED
//glRotatef(angle*RAD2DEG, 0.0f, 0.0f, 1.0f);
}

View File

@@ -22,6 +22,8 @@
JMusic::JMusic()
#ifdef USE_PHONON
: mOutput(0), mMediaObject(0)
#elif defined QT_CONFIG
: playlist(0), player(0)
#endif
{
}
@@ -40,11 +42,16 @@ int JMusic::getPlayTime(){
JMusic::~JMusic()
{
#ifdef USE_PHONON
#if defined USE_PHONON
if(mOutput)
delete mOutput;
if(mMediaObject)
delete mMediaObject;
#elif defined QT_CONFIG
if(player)
delete player;
if(playlist)
delete playlist;
#elif defined WITH_FMOD
JSoundSystem::GetInstance()->StopMusic(this);
if (mTrack) FSOUND_Sample_Free(mTrack);
@@ -69,7 +76,10 @@ JSample::JSample()
JSample::~JSample()
{
#ifdef USE_PHONON
#if (defined QT_CONFIG) && (!defined USE_PHONON)
if(effect)
delete effect;
#elif USE_PHONON
if(mOutput)
delete mOutput;
if(mMediaObject)
@@ -144,78 +154,108 @@ void JSoundSystem::DestroySoundSystem()
JMusic *JSoundSystem::LoadMusic(const char *fileName)
{
#ifdef USE_PHONON
JMusic* music = new JMusic();
if (music)
{
music->mOutput = new Phonon::AudioOutput(Phonon::GameCategory, 0);
music->mMediaObject = new Phonon::MediaObject(0);
string fullpath = JFileSystem::GetInstance()->GetResourceFile(fileName);
music->mMediaObject->setCurrentSource(QString(fullpath.c_str()));
Phonon::Path mediapath = Phonon::createPath(music->mMediaObject, music->mOutput);
Q_ASSERT(mediapath.isValid());
}
return music;
#elif (defined WITH_FMOD)
JMusic* music = new JMusic();
if (music)
JMusic* music = NULL;
#if (defined QT_CONFIG) && (!defined USE_PHONON)
music = new JMusic();
if (music)
{
JFileSystem* fileSystem = JFileSystem::GetInstance();
if (fileSystem->OpenFile(fileName))
{
int size = fileSystem->GetFileSize();
char *buffer = new char[size];
fileSystem->ReadFile(buffer, size);
music->mTrack = FSOUND_Sample_Load(FSOUND_UNMANAGED, buffer, FSOUND_LOADMEMORY, 0, size);
delete[] buffer;
fileSystem->CloseFile();
}
music->player = new QMediaPlayer;
music->player->setVolume(100);
music->playlist = new QMediaPlaylist;
music->fullpath = JFileSystem::GetInstance()->GetResourceFile(fileName);
music->playlist->addMedia(QUrl::fromLocalFile(music->fullpath.c_str()));
music->playlist->setCurrentIndex(0);
}
#elif defined USE_PHONON
music = new JMusic();
if (music)
{
music->mOutput = new Phonon::AudioOutput(Phonon::GameCategory, 0);
music->mMediaObject = new Phonon::MediaObject(0);
string fullpath = JFileSystem::GetInstance()->GetResourceFile(fileName);
music->mMediaObject->setCurrentSource(QString(fullpath.c_str()));
Phonon::Path mediapath = Phonon::createPath(music->mMediaObject, music->mOutput);
Q_ASSERT(mediapath.isValid());
}
#elif (defined WITH_FMOD)
music = new JMusic();
if (music)
{
JFileSystem* fileSystem = JFileSystem::GetInstance();
if (fileSystem->OpenFile(fileName))
{
int size = fileSystem->GetFileSize();
char *buffer = new char[size];
fileSystem->ReadFile(buffer, size);
music->mTrack = FSOUND_Sample_Load(FSOUND_UNMANAGED, buffer, FSOUND_LOADMEMORY, 0, size);
delete[] buffer;
fileSystem->CloseFile();
}
}
return music;
#else
return NULL;
cerr << fileName << endl;
#endif
return music;
}
void JSoundSystem::PlayMusic(JMusic *music, bool looping)
{
#ifdef USE_PHONON
if (music && music->mMediaObject && music->mOutput)
{
if(looping)
#if (defined QT_CONFIG) && (!defined USE_PHONON)
if(music && music->player && music->playlist)
{
music->mMediaObject->connect(music->mMediaObject, SIGNAL(aboutToFinish()), music, SLOT(seekAtTheBegining()));
}
music->mOutput->setVolume((qreal)mVolume*0.01);
music->mMediaObject->play();
if(looping)
music->playlist->setPlaybackMode(QMediaPlaylist::Loop);
}
music->player->setPlaylist(music->playlist);
music->player->play();
}
#elif USE_PHONON
if (music && music->mMediaObject && music->mOutput)
{
if(looping)
{
music->mMediaObject->connect(music->mMediaObject, SIGNAL(aboutToFinish()), music, SLOT(seekAtTheBegining()));
}
music->mOutput->setVolume((qreal)mVolume*0.01);
music->mMediaObject->play();
}
#elif (defined WITH_FMOD)
if (music && music->mTrack)
if (music && music->mTrack)
{
mChannel = FSOUND_PlaySound(mChannel, music->mTrack);
SetMusicVolume(mVolume);
mChannel = FSOUND_PlaySound(mChannel, music->mTrack);
SetMusicVolume(mVolume);
if (looping)
FSOUND_SetLoopMode(mChannel, FSOUND_LOOP_NORMAL);
else
FSOUND_SetLoopMode(mChannel, FSOUND_LOOP_OFF);
if (looping)
FSOUND_SetLoopMode(mChannel, FSOUND_LOOP_NORMAL);
else
FSOUND_SetLoopMode(mChannel, FSOUND_LOOP_OFF);
}
#else
music = 0;
looping = false;
#endif
}
void JSoundSystem::StopMusic(JMusic *music)
{
#ifdef USE_PHONON
#if (defined QT_CONFIG) && (!defined USE_PHONON)
if (music && music->player && music->playlist)
{
music->player->stop();
}
#elif defined USE_PHONON
if (music && music->mMediaObject && music->mOutput)
{
music->mMediaObject->stop();
}
#elif (defined WITH_FMOD)
FSOUND_StopSound(mChannel);
#else
music = 0;
#endif
}
@@ -258,46 +298,61 @@ void JSoundSystem::SetSfxVolume(int volume){
JSample *JSoundSystem::LoadSample(const char *fileName)
{
#if (defined USE_PHONON)
JSample* sample = new JSample();
if (sample)
{
sample->mOutput = new Phonon::AudioOutput(Phonon::GameCategory, 0);
sample->mMediaObject = new Phonon::MediaObject(0);
string fullpath = JFileSystem::GetInstance()->GetResourceFile(fileName);
sample->mMediaObject->setCurrentSource(QString(fullpath.c_str()));
Phonon::Path mediapath = Phonon::createPath(sample->mMediaObject, sample->mOutput);
Q_ASSERT(mediapath.isValid());
}
return sample;
#elif (defined WITH_FMOD)
JSample* sample = new JSample();
if (sample)
JSample* sample = NULL;
#if (defined QT_CONFIG) && (!defined USE_PHONON)
sample = new JSample();
if (sample)
{
JFileSystem* fileSystem = JFileSystem::GetInstance();
if (fileSystem->OpenFile(fileName))
{
int size = fileSystem->GetFileSize();
char *buffer = new char[size];
fileSystem->ReadFile(buffer, size);
sample->mSample = FSOUND_Sample_Load(FSOUND_UNMANAGED, buffer, FSOUND_LOADMEMORY, 0, size);
string fullpath = JFileSystem::GetInstance()->GetResourceFile(fileName);
sample->effect = new QMediaPlayer;
sample->effect->setMedia(QUrl::fromLocalFile(fullpath.c_str()));
sample->effect->setVolume(100);
sample->mSample = &(sample->effect);
}
#elif (defined USE_PHONON)
sample = new JSample();
if (sample)
{
sample->mOutput = new Phonon::AudioOutput(Phonon::GameCategory, 0);
sample->mMediaObject = new Phonon::MediaObject(0);
string fullpath = JFileSystem::GetInstance()->GetResourceFile(fileName);
sample->mMediaObject->setCurrentSource(QString(fullpath.c_str()));
Phonon::Path mediapath = Phonon::createPath(sample->mMediaObject, sample->mOutput);
Q_ASSERT(mediapath.isValid());
}
#elif (defined WITH_FMOD)
sample = new JSample();
if (sample)
{
JFileSystem* fileSystem = JFileSystem::GetInstance();
if (fileSystem->OpenFile(fileName))
{
int size = fileSystem->GetFileSize();
char *buffer = new char[size];
fileSystem->ReadFile(buffer, size);
sample->mSample = FSOUND_Sample_Load(FSOUND_UNMANAGED, buffer, FSOUND_LOADMEMORY, 0, size);
delete[] buffer;
fileSystem->CloseFile();
}else
sample->mSample = NULL;
delete[] buffer;
fileSystem->CloseFile();
}else
sample->mSample = NULL;
}
return sample;
#else
return NULL;
cerr << fileName << endl;
#endif
return sample;
}
void JSoundSystem::PlaySample(JSample *sample)
{
#ifdef USE_PHONON
#if (defined QT_CONFIG) && (!defined USE_PHONON)
if(sample)
{
sample->effect->play();
}
#elif defined USE_PHONON
if (sample && sample->mMediaObject && sample->mOutput)
{
sample->mOutput->setVolume((qreal)mSampleVolume*0.01);
@@ -308,6 +363,8 @@ void JSoundSystem::PlaySample(JSample *sample)
int channel = FSOUND_PlaySound(FSOUND_FREE, sample->mSample);
FSOUND_SetVolumeAbsolute(channel, static_cast<int>(mSampleVolume * 2.55));
}
#else
sample = 0;
#endif
}

View File

@@ -7,6 +7,7 @@
#include <winsock.h>
#include <fcntl.h>
#elif LINUX
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -16,11 +17,6 @@
#include "../../include/JSocket.h"
#include "../../include/DebugRoutines.h"
//JSocket * JSocket::mInstance = NULL;
//#define SERVER_PORT 20666
#define SERVER_PORT 5001
unsigned char ADRESSE_IP_SERVEUR [4] = {127,0,0,1};
JSocket::JSocket(string ipAddr)
@@ -28,7 +24,7 @@ JSocket::JSocket(string ipAddr)
mfd(-1)
{
int result;
struct hostent *hostentptr;
struct hostent *hostentptr = 0;
#ifdef WIN32
SOCKADDR_IN Adresse_Socket_Server;
WORD wVersionRequested;
@@ -264,9 +260,17 @@ int JSocket::Read(char* buff, int size)
#endif //WINDOWS
if(readbytes < 0)
{
DebugTrace("Error reading from socket\n");
#ifdef WIN32
DebugTrace("Error reading from socket: " << WSAGetLastError());
#endif //WINDOWS
Disconnect();
return -1;
}
else if(readbytes == 0)
{
Disconnect();
return 0;
}
else
return readbytes;
}
@@ -303,6 +307,7 @@ int JSocket::Write(char* buff, int size)
}
else if (result < 0)
{
Disconnect();
return -1;
}
}

View File

@@ -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
View 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);
}
}

28
README.md Normal file
View File

@@ -0,0 +1,28 @@
#Wagic the Homebrew
[![Build Status](https://travis-ci.org/WagicProject/wagic.png?branch=master)](https://travis-ci.org/WagicProject/wagic)
[![Build status](https://ci.appveyor.com/api/projects/status/7j4fbr6m62aqej59/branch/master)](https://ci.appveyor.com/project/xawotihs/wagic/branch/master)
[![Coverage Status](https://coveralls.io/repos/WagicProject/wagic/badge.png?branch=master)](https://coveralls.io/r/WagicProject/wagic?branch=master)
## Description
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
It is highly customizable and allows the player to tweak the rules / create their own cards, their own themes, etc...
Info, downloads, discussions and more at http://wololo.net/forum/index.php
![alt text](http://wololo.net/wagic/wp-content/uploads/2009/10/shop.jpg "Screenshot")
### Sample round play-through video
[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/WUFSAPZuDIk/0.jpg)](http://www.youtube.com/watch?v=WUFSAPZuDIk)

View File

@@ -1,2 +0,0 @@
You can put ad network libraries in this directory. The sample .xcodeproj references to files here.
DO NOT PUSH ANY AD NETWORK LIBRARIES TO GOOGLE CODE.

View File

@@ -1,344 +0,0 @@
/*
AdWhirlDelegateProtocol.h
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import <CoreLocation/CoreLocation.h>
#import <UIKit/UIKit.h>
@class AdWhirlView;
@protocol AdWhirlDelegate<NSObject>
@required
- (NSString *)adWhirlApplicationKey;
/**
* The view controller with which the ad network will display a modal view
* (web view, canvas), such as when the user clicks on the ad. You must
* supply a view controller. You should return the root view controller
* of your application, such as the root UINavigationController, or
* any controllers that are pushed/added directly to the root view controller.
* For example, if your app delegate has a pointer to the root view controller:
*
* return [(MyAppDelegate *)[[UIApplication sharedApplication] delegate] rootViewController]
*
* will suffice.
*/
- (UIViewController *)viewControllerForPresentingModalView;
@optional
#pragma mark server endpoints
/**
* If you are running your own AdWhirl server instance, make sure you
* implement the following to return the URL that points to the endpoints
* on your server.
*/
- (NSURL *)adWhirlConfigURL;
- (NSURL *)adWhirlImpMetricURL;
- (NSURL *)adWhirlClickMetricURL;
- (NSURL *)adWhirlCustomAdURL;
#pragma mark notifications
/**
* You can listen to callbacks from AdWhirl via these methods. When AdWhirl is
* notified that an ad request is fulfilled, it will notify you immediately.
* Thus, when notified that an ad request succeeded, you can choose to add the
* AdWhirlView object as a subview to your view. This view contains the ad.
* When you are notified that an ad request failed, you are also informed if the
* AdWhirlView is fetching a backup ad. The backup fetching order is specified
* by you in adwhirl.com or your own server instance. When all backup sources
* are attempted and the last ad request still fails, the usingBackup parameter
* will be set to NO. You can use this notification to try again and perhaps
* request another AdWhirlView via [AdWhirlView requestAdWhirlViewWithDelegate:]
*/
- (void)adWhirlDidReceiveAd:(AdWhirlView *)adWhirlView;
- (void)adWhirlDidFailToReceiveAd:(AdWhirlView *)adWhirlView usingBackup:(BOOL)yesOrNo;
/**
* You can get notified when the transition animation to a new ad is completed
* so you can make necessary adjustments to the size of the adWhirlView and
* surrounding views after the animation.
*/
- (void)adWhirlDidAnimateToNewAdIn:(AdWhirlView *)adWhirlView;
/**
* This function is your integration point for Generic Notifications. You can
* control when this notification occurs via the developers member section. You
* can allocate a percentage of your ad requests to initiate this callback. When
* you receive this notification, you can execute any code block that you own.
* For example, you can replace the ad in AdWhirlView after getting this callback
* by calling replaceBannerViewWith: . Note that the ad refresh cycle is still
* alive, so your view could be replaced by other ads when it's time for an
* ad refresh.
*/
- (void)adWhirlReceivedRequestForDeveloperToFufill:(AdWhirlView *)adWhirlView;
/**
* In the event that ads are OFF, you can listen to this callback method to
* determine that ads have been turned off.
*/
- (void)adWhirlReceivedNotificationAdsAreOff:(AdWhirlView *)adWhirlView;
/**
* These notifications will let you know when a user is being shown a full screen
* webview canvas with an ad because they tapped on an ad. You should listen to
* these notifications to determine when to pause/resume your game--if you're
* building a game app.
*/
- (void)adWhirlWillPresentFullScreenModal;
- (void)adWhirlDidDismissFullScreenModal;
/**
* An ad request is a two step process: first the SDK must go to the AdWhirl
* server to retrieve configuration information. Then, based on the configuration
* information, it chooses an ad network and fetch an ad. The following call
* is for users to get notified when the first step is complete. The
* adWhirlView passed could be null if you had called the AdWhirlView class
* method +startPreFetchingConfigurationDataWithDelegate .
*/
- (void)adWhirlDidReceiveConfig:(AdWhirlView *)adWhirlView;
#pragma mark behavior configurations
/**
* Request test ads for APIs that supports it. Make sure you turn it to OFF
* or remove the function before you submit your app to the app store.
*/
- (BOOL)adWhirlTestMode;
/**
* Returns the device's current orientation for ad networks that relys on
* it. If you don't implement this function, [UIDevice currentDevice].orientation
* is used to get the current orientation.
*/
- (UIDeviceOrientation)adWhirlCurrentOrientation;
#pragma mark appearance configurations
- (UIColor *)adWhirlAdBackgroundColor;
- (UIColor *)adWhirlTextColor;
- (UIColor *)adWhirlSecondaryTextColor;
- (UIColor *)backgroundColor DEPRECATED_ATTRIBUTE; // use the one with adWhirl prefix
- (UIColor *)textColor DEPRECATED_ATTRIBUTE; // use the one with adWhirl prefix
#pragma mark hard-coded application keys
- (NSString *)admobPublisherID; // your Publisher ID from Admob.
- (NSDictionary *)quattroWirelessDictionary; // key-value pairs for the keys "publisherID" and "siteID" provided by Quattro Wireless. Set NSString values for these two keys.
- (NSString *)pinchApplicationKey; // your Application Code from Pinch Media.
- (NSDictionary *)videoEggConfigDictionary; // key-value pairs for the keys "publisher" and "area" information from Video Egg. Set NSString values for these two keys.
- (NSString *)millennialMediaApIDString; // your ApID string from Millennial Media.
- (NSString *)MdotMApplicationKey; // your Application Code from MdotM
- (NSString *)googleAdSenseClientID; // your publisher ID from Google AdSense
- (NSString *)zestADZClientID; // your clientID from ZestADZ
- (NSString *)brightRollAppId; // your BrightRoll App ID
- (NSString *)inMobiAppID; // your inMobi app ID
- (NSString *)oneRiotAppID;
- (NSDictionary *) nexageDictionary; // your nexage dcn and position
#pragma mark demographic information optional delegate methods
- (CLLocation *)locationInfo; // user's current location
- (NSString *)postalCode; // user's postal code, e.g. "94401"
- (NSString *)areaCode; // user's area code, e.g. "415"
- (NSDate *)dateOfBirth; // user's date of birth
- (NSString *)gender; // user's gender (e.g. @"m" or @"f")
- (NSString *)keywords; // keywords the user has provided or that are contextually relevant, e.g. @"twitter client iPhone"
- (NSString *)searchString; // a search string the user has provided, e.g. @"Jasmine Tea House San Francisco"
- (NSUInteger)incomeLevel; // return actual annual income
#pragma mark QuattroWireless-specific optional delegate methods
/**
* Return the ad type desired for Quattro
* QWAdTypeBanner = 0,
* QWAdTypeText=2,
*/
- (NSUInteger)quattroWirelessAdType;
/**
* Return a value for the education level if you have access to this info. This
* information will be relayed to Quattro Wireless if provided.
* QWEducationNoCollege = 0
* QWEducationCollegeGraduate = 1
* QWEducationGraduateSchool = 2
* QWEducationUnknown = 3
*/
- (NSUInteger)quattroWirelessEducationLevel;
/**
* Return a value for the ethnicity if you have access to this info. This
* information will be relayed to Quattro Wireless if provided.
* QWEthnicGroupAfrican_American = 0
* QWEthnicGroupAsian = 1
* QWEthnicGroupHispanic = 2
* QWEthnicGroupWhite = 3
* QWEthnicGroupOther = 4
*/
- (NSUInteger)quattroWirelessEthnicity;
#pragma mark MillennialMedia-specific optional delegate methods
/**
* Return the ad type desired for Millennial Media, depending on your ad position
* MMBannerAdTop = 1,
* MMBannerAdBottom = 2,
*/
- (NSUInteger)millennialMediaAdType;
/**
* Return a value for the education level if you have access to this info. This
* information will be relayed to Millennial Media if provided
* MMEducationUnknown = 0,
* MMEducationHishSchool = 1,
* MMEducationSomeCollege = 2,
* MMEducationInCollege = 3,
* MMEducationBachelorsDegree = 4,
* MMEducationMastersDegree = 5,
* MMEducationPhD = 6
*/
- (NSUInteger)millennialMediaEducationLevel;
/**
* Return a value for ethnicity if you have access to this info. This
* information will be relayed to Millennial Media if provided.
* MMEthnicityUnknown = 0,
* MMEthnicityAfricanAmerican = 1,
* MMEthnicityAsian = 2,
* MMEthnicityCaucasian = 3,
* MMEthnicityHispanic = 4,
* MMEthnicityNativeAmerican = 5,
* MMEthnicityMixed = 6
*/
- (NSUInteger)millennialMediaEthnicity;
- (NSUInteger)millennialMediaAge DEPRECATED_ATTRIBUTE; // use dateOfBirth
#pragma mark Jumptap-specific optional delegate methods
/**
* optional site and spot id as provided by Jumptap.
*/
- (NSString *)jumptapSiteId;
- (NSString *)jumptapSpotId;
/**
* Find a list of valid categories at https://support.jumptap.com/index.php/Valid_Categories
*/
- (NSString *)jumptapCategory;
/**
* Whether adult content is allowed.
* AdultContentAllowed = 0,
* AdultContentNotAllowed = 1,
* AdultContentOnly = 2
*/
- (NSUInteger)jumptapAdultContent;
/**
* The transition to use when moving from, say, a banner to full-screen.
* TransitionHorizontalSlide = 0,
* TransitionVerticalSlide = 1,
* TransitionCurl = 2,
* TransitionFlip = 3
*/
- (NSUInteger)jumptapTransitionType;
#pragma mark Google AdSense-specific delegate methods
/**
These are *REQUIRED* for googleAdSense. If you don't implement these methods,
your app will crash as the AdSense adapter looks for these methods.
*/
- (NSString *)googleAdSenseCompanyName;
- (NSString *)googleAdSenseAppName;
- (NSString *)googleAdSenseApplicationAppleID;
/**
The following are optional and correspond to the optional kGADAdSense* ad attributes.
For documentation, see GADAdSenseParameters.h .
*/
- (NSString *)googleAdSenseKeywords;
- (NSURL *)googleAdSenseAppWebContentURL;
- (NSArray *)googleAdSenseChannelIDs;
- (NSString *)googleAdSenseAdType;
- (NSString *)googleAdSenseHostID;
//- (UIColor *)googleAdSenseAdBackgroundColor; // implement adWhirlAdBackgroundColor or set in server
- (UIColor *)googleAdSenseAdTopBackgroundColor;
- (UIColor *)googleAdSenseAdBorderColor;
- (UIColor *)googleAdSenseAdLinkColor;
//- (UIColor *)googleAdSenseAdTextColor; // implement adWhirlTextColor or set in server
- (UIColor *)googleAdSenseAdURLColor;
- (UIColor *)googleAdSenseAlternateAdColor;
- (NSURL *)googleAdSenseAlternateAdURL;
- (NSNumber *)googleAdSenseAllowAdsafeMedium;
#pragma mark InMobi-specific optional delegate methods
/**
* Education level for InMobi
* Edu_None = 0
* Edu_HighSchool = 1
* Edu_SomeCollege = 2
* Edu_InCollege = 3
* Edu_BachelorsDegree = 4
* Edu_MastersDegree = 5
* Edu_DoctoralDegree = 6
* Edu_Other = 7
*/
- (NSUInteger)inMobiEducation;
/**
Eth_None = 0,
Eth_Mixed = 1,
Eth_Asian = 2,
Eth_Black = 3,
Eth_Hispanic = 4,
Eth_NativeAmerican = 5,
Eth_White = 6,
Eth_Other = 7
*/
- (NSUInteger)inMobiEthnicity;
/**
* See inMobi's documentation for valid values
*/
- (NSString *)inMobiInterests;
- (NSString *)iAdAdvertisingSection;
- (NSDictionary *)inMobiParamsDictionary;
#pragma mark OneRiot-specific optional delegate methods
/** Returns an array of NSStrings containing all optional context parameters
*/
- (NSArray *)oneRiotContextParameters;
#pragma mark Nexage-specific optional delegate methods
-(NSString *)nexageCity;
-(NSString *)nexageDesignatedMarketArea;
-(NSString *)nexageCountry;
-(NSString *)nexageEthnicity;
-(NSString *)nexageMaritalStatus;
@end

View File

@@ -1,231 +0,0 @@
/*
AdWhirlView.h
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import <UIKit/UIKit.h>
#import "AdWhirlDelegateProtocol.h"
#import "AWNetworkReachabilityWrapper.h"
#import "AdWhirlConfig.h"
#define kAdWhirlAppVer 310
#define kAdWhirlViewWidth 320
#define kAdWhirlViewHeight 50
#define kAdWhirlViewDefaultSize \
(CGSizeMake(kAdWhirlViewWidth, kAdWhirlViewHeight))
#define kAdWhirlViewDefaultFrame \
(CGRectMake(0,0,kAdWhirlViewWidth, kAdWhirlViewHeight))
#define kAdWhirlDefaultConfigURL @"http://mob.adwhirl.com/getInfo.php"
#define kAdWhirlDefaultImpMetricURL @"http://met.adwhirl.com/exmet.php"
#define kAdWhirlDefaultClickMetricURL @"http://met.adwhirl.com/exclick.php"
#define kAdWhirlDefaultCustomAdURL @"http://mob.adwhirl.com/custom.php"
#define kAWMinimumTimeBetweenFreshAdRequests 4.9f
#define kAdWhirlAdRequestTimeout 10
@class AdWhirlAdNetworkConfig;
@class AdWhirlAdNetworkAdapter;
@class AdWhirlConfigStore;
@class AWNetworkReachabilityWrapper;
@interface AdWhirlView : UIView <AdWhirlConfigDelegate,
AWNetworkReachabilityDelegate> {
id<AdWhirlDelegate> delegate;
AdWhirlConfig *config;
NSMutableArray *prioritizedAdNetCfgs;
double totalPercent;
BOOL ignoreAutoRefreshTimer;
BOOL ignoreNewAdRequests;
BOOL appInactive;
BOOL showingModalView;
BOOL requesting;
AdWhirlAdNetworkAdapter *currAdapter;
AdWhirlAdNetworkAdapter *lastAdapter;
NSDate *lastRequestTime;
NSMutableDictionary *pendingAdapters;
NSTimer *refreshTimer;
// remember which adapter we last sent click stats for so we don't send twice
id lastNotifyAdapter;
NSError *lastError;
AdWhirlConfigStore *configStore;
AWNetworkReachabilityWrapper *rollOverReachability;
NSUInteger configFetchAttempts;
NSArray *testDarts;
NSUInteger testDartIndex;
}
/**
* Call this method to get a view object that you can add to your own view. You
* must also provide a delegate. The delegate provides AdWhirl's application
* key and can listen for important messages. You can configure the view's
* settings and specific ad network information on AdWhirl.com or your own
* AdWhirl server instance.
*/
+ (AdWhirlView *)requestAdWhirlViewWithDelegate:(id<AdWhirlDelegate>)delegate;
/**
* Starts pre-fetching ad network configurations from an AdWhirl server. If the
* configuration has been fetched when you are ready to request an ad, you save
* a round-trip to the network and hence your ad may show up faster. You
* typically call this in the applicationDidFinishLaunching: method of your
* app delegate. The request is non-blocking. You only need to call this
* at most once per run of your application. Subsequent calls to this function
* will be ignored.
*/
+ (void)startPreFetchingConfigurationDataWithDelegate:(id<AdWhirlDelegate>)d;
/**
* Call this method to request a new configuration from the AdWhirl servers.
* This can be useful to support iOS 4.0 backgrounding.
*/
+ (void)updateAdWhirlConfigWithDelegate:(id<AdWhirlDelegate>)delegate;
/**
* Call this method to request a new configuration from the AdWhirl servers.
*/
- (void)updateAdWhirlConfig;
/**
* Call this method to get another ad to display. You can also specify under
* "app settings" on adwhirl.com to automatically get new ads periodically.
*/
- (void)requestFreshAd;
/**
* Call this method if you prefer a rollover instead of a getNextAd call. This
* is offered primarily for developers who want to use generic notifications and
* then execute a rollover when an ad network fails to serve an ad.
*/
- (void)rollOver;
/**
* The delegate is informed asynchronously whether an ad succeeds or fails to
* load. If you prefer to poll for this information, you can do so using this
* method.
*
*/
- (BOOL)adExists;
/**
* Different ad networks may return different ad sizes. You may adjust the size
* of the AdWhirlView and your UI to avoid unsightly borders or chopping off
* pixels from ads. Call this method when you receive the adWhirlDidReceiveAd
* delegate method to get the size of the underlying ad network ad.
*/
- (CGSize)actualAdSize;
/**
* Some ad networks may offer different banner sizes for different orientations.
* Call this function when the orientation of your UI changes so the underlying
* ad may handle the orientation change properly. You may also want to
* call the actualAdSize method right after calling this to get the size of
* the ad after the orientation change.
*/
- (void)rotateToOrientation:(UIInterfaceOrientation)orientation;
/**
* Call this method to get the name of the most recent ad network that an ad
* request was made to.
*/
- (NSString *)mostRecentNetworkName;
/**
* Call this method to ignore the automatic refresh timer.
*
* Note that the refresh timer is NOT invalidated when you call
* ignoreAutoRefreshTimer.
* This will simply ignore the refresh events that are called by the automatic
* refresh timer (if the refresh timer is enabled via adwhirl.com). So, for
* example, let's say you have a refresh cycle of 60 seconds. If you call
* ignoreAutoRefreshTimer at 30 seconds, and call resumeRefreshTimer at 90 sec,
* then the first refresh event is ignored, but the second refresh event at 120
* sec will run.
*/
- (void)ignoreAutoRefreshTimer;
- (void)doNotIgnoreAutoRefreshTimer;
- (BOOL)isIgnoringAutoRefreshTimer;
/**
* Call this method to ignore automatic refreshes AND manual refreshes entirely.
*
* This is provided for developers who asked to disable refreshing entirely,
* whether automatic or manual.
* If you call ignoreNewAdRequests, the AdWhirl will:
* 1) Ignore any Automatic refresh events (via the refresh timer) AND
* 2) Ignore any manual refresh calls (via requestFreshAd and rollOver)
*/
- (void)ignoreNewAdRequests;
- (void)doNotIgnoreNewAdRequests;
- (BOOL)isIgnoringNewAdRequests;
/**
* Call this to replace the content of this AdWhirlView with the view.
*/
- (void)replaceBannerViewWith:(UIView*)bannerView;
/**
* You can set the delegate to nil or another object.
* Make sure you set the delegate to nil when you release an AdWhirlView
* instance to avoid the AdWhirlView from calling to a non-existent delegate.
* If you set the delegate to another object, note that if the new delegate
* returns a different value for adWhirlApplicationKey, it will not overwrite
* the application key provided by the delegate you supplied for
* +requestAdWhirlViewWithDelegate .
*/
@property (nonatomic, assign) IBOutlet id<AdWhirlDelegate> delegate;
/**
* Use this to retrieve more information after your delegate received a
* adWhirlDidFailToReceiveAd message.
*/
@property (nonatomic, readonly) NSError *lastError;
#pragma mark For ad network adapters use only
/**
* Called by Adapters when there's a new ad view.
*/
- (void)adapter:(AdWhirlAdNetworkAdapter *)adapter
didReceiveAdView:(UIView *)view;
/**
* Called by Adapters when ad view failed.
*/
- (void)adapter:(AdWhirlAdNetworkAdapter *)adapter didFailAd:(NSError *)error;
/**
* Called by Adapters when the ad request is finished, but the ad view is
* furnished elsewhere. e.g. Generic Notification
*/
- (void)adapterDidFinishAdRequest:(AdWhirlAdNetworkAdapter *)adapter;
@end

View File

@@ -1,128 +0,0 @@
/*
AdWhirlAdNetworkAdapter.h
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlDelegateProtocol.h"
#import "AdWhirlConfig.h"
typedef enum {
AdWhirlAdNetworkTypeAdMob = 1,
AdWhirlAdNetworkTypeJumpTap = 2,
AdWhirlAdNetworkTypeVideoEgg = 3,
AdWhirlAdNetworkTypeMedialets = 4,
AdWhirlAdNetworkTypeLiveRail = 5,
AdWhirlAdNetworkTypeMillennial = 6,
AdWhirlAdNetworkTypeGreyStripe = 7,
AdWhirlAdNetworkTypeQuattro = 8,
AdWhirlAdNetworkTypeCustom = 9,
AdWhirlAdNetworkTypeAdWhirl10 = 10,
AdWhirlAdNetworkTypeMobClix = 11,
AdWhirlAdNetworkTypeMdotM = 12,
AdWhirlAdNetworkTypeAdWhirl13 = 13,
AdWhirlAdNetworkTypeGoogleAdSense = 14,
AdWhirlAdNetworkTypeGoogleDoubleClick = 15,
AdWhirlAdNetworkTypeGeneric = 16,
AdWhirlAdNetworkTypeEvent = 17,
AdWhirlAdNetworkTypeInMobi = 18,
AdWhirlAdNetworkTypeIAd = 19,
AdWhirlAdNetworkTypeZestADZ = 20,
AdWhirlAdNetworkTypeBrightRoll = 21,
AdWhirlAdNetworkTypeTapAd = 22,
AdWhirlAdNetworkTypeOneRiot = 23,
AdWhirlAdNetworkTypeNexage = 24
} AdWhirlAdNetworkType;
@class AdWhirlView;
@class AdWhirlConfig;
@class AdWhirlAdNetworkConfig;
@interface AdWhirlAdNetworkAdapter : NSObject {
id<AdWhirlDelegate> adWhirlDelegate;
AdWhirlView *adWhirlView;
AdWhirlConfig *adWhirlConfig;
AdWhirlAdNetworkConfig *networkConfig;
UIView *adNetworkView;
}
/**
* Subclasses must implement +networkType to return an AdWhirlAdNetworkType enum.
*/
//+ (AdWhirlAdNetworkType)networkType;
/**
* Subclasses must add itself to the AdWhirlAdNetworkRegistry. One way
* to do so is to implement the +load function and register there.
*/
//+ (void)load;
/**
* Default initializer. Subclasses do not need to override this method unless
* they need to perform additional initialization. In which case, this
* method must be called via the super keyword.
*/
- (id)initWithAdWhirlDelegate:(id<AdWhirlDelegate>)delegate
view:(AdWhirlView *)view
config:(AdWhirlConfig *)config
networkConfig:(AdWhirlAdNetworkConfig *)netConf;
/**
* Ask the adapter to get an ad. This must be implemented by subclasses.
*/
- (void)getAd;
/**
* When called, the adapter must remove itself as a delegate or notification
* observer from the underlying ad network SDK. Subclasses must implement this
* method, even if the underlying SDK doesn't have a way of removing delegate
* (in which case, you should contact the ad network). Note that this method
* will be called in dealloc at AdWhirlAdNetworkAdapter, before adNetworkView
* is released. Care must be taken if you also keep a reference of your ad view
* in a separate instance variable, as you may have released that variable
* before this gets called in AdWhirlAdNetworkAdapter's dealloc. Use
* adNetworkView, defined in this class, instead of your own instance variable.
* This function should also be idempotent, i.e. get called multiple times and
* not crash.
*/
- (void)stopBeingDelegate;
/**
* Subclasses return YES to ask AdWhirlView to send metric requests to the
* AdWhirl server for ad impressions. Default is YES.
*/
- (BOOL)shouldSendExMetric;
/**
* Tell the adapter that the interface orientation changed or is about to change
*/
- (void)rotateToOrientation:(UIInterfaceOrientation)orientation;
/**
* Some ad transition types may cause issues with particular ad networks. The
* adapter should know whether the given animation type is OK. Defaults to
* YES.
*/
- (BOOL)isBannerAnimationOK:(AWBannerAnimationType)animType;
@property (nonatomic,assign) id<AdWhirlDelegate> adWhirlDelegate;
@property (nonatomic,assign) AdWhirlView *adWhirlView;
@property (nonatomic,retain) AdWhirlConfig *adWhirlConfig;
@property (nonatomic,retain) AdWhirlAdNetworkConfig *networkConfig;
@property (nonatomic,retain) UIView *adNetworkView;
@end

View File

@@ -1,36 +0,0 @@
/*
AdWhirlAdapterBrightRoll.h
Copyright 2010 BrightRoll, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdNetworkAdapter.h"
#import "BRBannerAd.h"
#import "BRBannerAdDelegate.h"
#import "BRFullScreenAd.h"
#import "BRFullScreenAdDelegate.h"
@interface AdWhirlAdapterBrightRoll : AdWhirlAdNetworkAdapter <BRBannerAdDelegate, BRFullScreenAdDelegate>
{
BRBannerAd *brBannerAd;
}
@property (nonatomic, retain) BRBannerAd *brBannerAd;
+ (AdWhirlAdNetworkType)networkType;
- (void)brBannerAdFetched:(BRBannerAd *)brBannerAd;
@end

View File

@@ -1,137 +0,0 @@
/*
AdWhirlAdapterBrightRoll.m
Copyright 2009 BrightRoll, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdapterBrightRoll.h"
#import "AdWhirlAdNetworkAdapter.h"
#import "AdWhirlAdNetworkRegistry.h"
#import "AdWhirlView.h"
#import "AdWhirlAdNetworkAdapter+Helpers.h"
#import "AdWhirlAdNetworkConfig.h"
@implementation AdWhirlAdapterBrightRoll
@synthesize brBannerAd;
+ (AdWhirlAdNetworkType)networkType
{
return AdWhirlAdNetworkTypeBrightRoll;
}
+ (void)load
{
[[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self];
}
- (void)stopObserving
{
[[NSNotificationCenter defaultCenter]
removeObserver:self
name:@"AdWhirlViewWillAnimateToNewAd"
object:self.adWhirlView];
}
- (void)stopBeingDelegate
{
[self stopObserving];
self.brBannerAd.delegate = nil;
self.brBannerAd = nil;
}
- (void)getAd
{
self.brBannerAd = [BRBannerAd fetchWithDelegate:self];
}
#pragma mark BRBannerAdDelegate required methods
- (NSString *)brBannerAdAppId:(BRBannerAd *)theBrBannerAd
{
if ([adWhirlDelegate respondsToSelector:@selector(brightRollAppId)])
{
return [adWhirlDelegate brightRollAppId];
}
return networkConfig.pubId;
}
- (void)brBannerAdFetched:(BRBannerAd *)theBrBannerAd
{
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(adWhirlWillAnimateToNewAdIn:)
name:@"AdWhirlViewWillAnimateToNewAd"
object:self.adWhirlView];
brBannerAd.fullScreenAd.delegate = self;
self.adNetworkView = brBannerAd.view;
[self.adWhirlView adapter:self didReceiveAdView:brBannerAd.view];
}
- (void)brBannerAdFetchFailed:(BRBannerAd *)bannerAd
{
[adWhirlView
adapter:self
didFailAd:[NSError
errorWithDomain:@"com.brightroll.BrightRoll_iPhone_SDK"
code:404
userInfo:[NSDictionary dictionary]]];
}
- (void)brBannerAdWillShowFullScreenAd:(BRBannerAd *)bannerAd
{
[self helperNotifyDelegateOfFullScreenModal];
}
#pragma mark AdWhirlView notification methods
- (void)adWhirlWillAnimateToNewAdIn:(NSNotification *)notification
{
if ([self.adWhirlView performSelector:@selector(currAdapter)] == self)
{
[self stopObserving];
[self helperNotifyDelegateOfFullScreenModal];
[brBannerAd.fullScreenAd show];
}
}
#pragma mark BRFullScreenAdDelegate required methods
- (UIViewController *)brFullScreenAdControllerParent
{
return [self.adWhirlDelegate viewControllerForPresentingModalView];
}
- (void)brFullScreenAdDismissed:(BRFullScreenAd *)brFullScreenAd
{
[self helperNotifyDelegateOfFullScreenModalDismissal];
}
- (NSString *)brightRollAppId
{
NSString *appId = [self.networkConfig.credentials objectForKey:@"pubid"];
if (!appId)
{
appId = [self.adWhirlDelegate brightRollAppId];
}
return appId;
}
@end

View File

@@ -1,32 +0,0 @@
/*
AdWhirlAdapterGoogleAdMobAds.h
Copyright 2011 Google, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdNetworkAdapter.h"
#import "GADBannerViewDelegate.h"
@interface AdWhirlAdapterGoogleAdMobAds : AdWhirlAdNetworkAdapter
<GADBannerViewDelegate> {
}
- (SEL)delegatePublisherIdSelector;
- (NSString *)hexStringFromUIColor:(UIColor *)color;
+ (AdWhirlAdNetworkType)networkType;
- (NSString *)publisherId;
@end

View File

@@ -1,199 +0,0 @@
/*
AdWhirlAdapterGoogleAdMobAds.m
Copyright 2011 Google, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdapterGoogleAdMobAds.h"
#import "AdWhirlAdNetworkConfig.h"
#import "AdWhirlView.h"
#import "GADBannerView.h"
#import "AdWhirlLog.h"
#import "AdWhirlAdNetworkAdapter+Helpers.h"
#import "AdWhirlAdNetworkRegistry.h"
@implementation AdWhirlAdapterGoogleAdMobAds
+ (void)load {
[[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self];
}
+ (AdWhirlAdNetworkType)networkType {
return AdWhirlAdNetworkTypeAdMob;
}
// converts UIColor to hex string, ignoring alpha.
- (NSString *)hexStringFromUIColor:(UIColor *)color {
CGColorSpaceModel colorSpaceModel =
CGColorSpaceGetModel(CGColorGetColorSpace(color.CGColor));
if (colorSpaceModel == kCGColorSpaceModelRGB
|| colorSpaceModel == kCGColorSpaceModelMonochrome) {
const CGFloat *colors = CGColorGetComponents(color.CGColor);
CGFloat red = 0.0, green = 0.0, blue = 0.0;
if (colorSpaceModel == kCGColorSpaceModelRGB) {
red = colors[0];
green = colors[1];
blue = colors[2];
// we ignore alpha here.
} else if (colorSpaceModel == kCGColorSpaceModelMonochrome) {
red = green = blue = colors[0];
}
return [NSString stringWithFormat:@"%02X%02X%02X",
(int)(red * 255), (int)(green * 255), (int)(blue * 255)];
}
return nil;
}
- (NSObject *)delegateValueForSelector:(SEL)selector {
return ([adWhirlDelegate respondsToSelector:selector]) ?
[adWhirlDelegate performSelector:selector] : nil;
}
- (void)getAd {
GADRequest *request = [GADRequest request];
NSObject *value;
NSMutableDictionary *additional = [NSMutableDictionary dictionary];
if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTestMode)]
&& [adWhirlDelegate adWhirlTestMode]) {
[additional setObject:@"on" forKey:@"adtest"];
}
if ((value = [self delegateValueForSelector:
@selector(adWhirlAdBackgroundColor)])) {
[additional setObject:[self hexStringFromUIColor:(UIColor *)value]
forKey:@"color_bg"];
}
if ((value = [self delegateValueForSelector:
@selector(adWhirlAdBackgroundColor)])) {
[additional setObject:[self hexStringFromUIColor:(UIColor *)value]
forKey:@"color_text"];
}
// deliberately don't allow other color specifications.
if ([additional count] > 0) {
request.additionalParameters = additional;
}
CLLocation *location =
(CLLocation *)[self delegateValueForSelector:@selector(locationInfo)];
if ((adWhirlConfig.locationOn) && (location)) {
[request setLocationWithLatitude:location.coordinate.latitude
longitude:location.coordinate.longitude
accuracy:location.horizontalAccuracy];
}
NSString *string =
(NSString *)[self delegateValueForSelector:@selector(gender)];
if ([string isEqualToString:@"m"]) {
request.gender = kGADGenderMale;
} else if ([string isEqualToString:@"f"]) {
request.gender = kGADGenderFemale;
} else {
request.gender = kGADGenderUnknown;
}
if ((value = [self delegateValueForSelector:@selector(dateOfBirth)])) {
request.birthday = (NSDate *)value;
}
if ((value = [self delegateValueForSelector:@selector(keywords)])) {
NSArray *keywordArray =
[(NSString *)value componentsSeparatedByString:@" "];
request.keywords = [NSMutableArray arrayWithArray:keywordArray];
}
// Set the frame for this view to match the bounds of the parent adWhirlView.
GADBannerView *view =
[[GADBannerView alloc] initWithFrame:adWhirlView.bounds];
view.adUnitID = [self publisherId];
view.delegate = self;
view.rootViewController =
[adWhirlDelegate viewControllerForPresentingModalView];
self.adNetworkView = [view autorelease];
[view loadRequest:request];
}
- (void)stopBeingDelegate {
if (self.adNetworkView != nil
&& [self.adNetworkView respondsToSelector:@selector(setDelegate:)]) {
[self.adNetworkView performSelector:@selector(setDelegate:)
withObject:nil];
}
}
#pragma mark Ad Request Lifecycle Notifications
// Sent when an ad request loaded an ad. This is a good opportunity to add
// this view to the hierarchy if it has not yet been added.
- (void)adViewDidReceiveAd:(GADBannerView *)adView {
[adWhirlView adapter:self didReceiveAdView:adView];
}
// Sent when an ad request failed. Normally this is because no network
// connection was available or no ads were available (i.e. no fill).
- (void)adView:(GADBannerView *)adView
didFailToReceiveAdWithError:(GADRequestError *)error {
[adWhirlView adapter:self didFailAd:error];
}
#pragma mark Click-Time Lifecycle Notifications
// Sent just before presenting the user a full screen view, such as a browser,
// in response to clicking on an ad. Use this opportunity to stop animations,
// time sensitive interactions, etc.
//
// Normally the user looks at the ad, dismisses it, and control returns to your
// application by calling adViewDidDismissScreen:. However if the user hits
// the Home button or clicks on an App Store link your application will end.
// On iOS 4.0+ the next method called will be applicationWillResignActive: of
// your UIViewController (UIApplicationWillResignActiveNotification).
// Immediately after that adViewWillLeaveApplication: is called.
- (void)adViewWillPresentScreen:(GADBannerView *)adView {
[self helperNotifyDelegateOfFullScreenModal];
}
// Sent just after dismissing a full screen view. Use this opportunity to
// restart anything you may have stopped as part of adViewWillPresentScreen:.
- (void)adViewDidDismissScreen:(GADBannerView *)adView {
[self helperNotifyDelegateOfFullScreenModalDismissal];
}
#pragma mark parameter gathering methods
- (SEL)delegatePublisherIdSelector {
return @selector(admobPublisherID);
}
- (NSString *)publisherId {
SEL delegateSelector = [self delegatePublisherIdSelector];
if ((delegateSelector) &&
([adWhirlDelegate respondsToSelector:delegateSelector])) {
return [adWhirlDelegate performSelector:delegateSelector];
}
return networkConfig.pubId;
}
@end

View File

@@ -1,42 +0,0 @@
/*
AdWhirlAdapterGoogleAdSense.h
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdNetworkAdapter.h"
#import "GADAdViewController.h"
#import "GADAdSenseParameters.h"
#import "AdWhirlAdNetworkConfig.h"
#import "AdWhirlAdNetworkRegistry.h"
#import "AdWhirlView.h"
@interface AdWhirlAdapterGoogleAdSense : AdWhirlAdNetworkAdapter <GADAdViewControllerDelegate> {
GADAdViewController *adViewController;
}
@property (retain) GADAdViewController *adViewController;
+ (NSInteger)networkType;
- (NSString *)publisherId;
- (NSString *)companyName;
- (NSString *)appName;
- (NSString *)applicationAppleID;
- (NSNumber *)testMode;
@end

View File

@@ -1,189 +0,0 @@
/*
AdWhirlAdapterGoogleAdSense.m
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdNetworkAdapter+Helpers.h"
#import "AdWhirlAdapterGoogleAdSense.h"
#import "AdWhirlAdNetworkConfig.h"
#import "AdWhirlConfig.h"
#import "AdWhirlLog.h"
static NSDictionary *GASParamNameToSel;
@implementation AdWhirlAdapterGoogleAdSense
@synthesize adViewController;
+ (NSInteger)networkType {
return AdWhirlAdNetworkTypeGoogleAdSense;
}
+ (void)load {
[[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self];
GASParamNameToSel = [[NSDictionary alloc] initWithObjectsAndKeys:
@"googleAdSenseKeywords", kGADAdSenseKeywords,
@"googleAdSenseAppWebContentURL", kGADAdSenseAppWebContentURL,
@"googleAdSenseChannelIDs", kGADAdSenseChannelIDs,
@"googleAdSenseAdType", kGADAdSenseAdType,
@"googleAdSenseHostID", kGADAdSenseHostID,
@"adWhirlAdBackgroundColor", kGADAdSenseAdBackgroundColor,
@"googleAdSenseAdTopBackgroundColor", kGADAdSenseAdTopBackgroundColor,
@"googleAdSenseAdBorderColor", kGADAdSenseAdBorderColor,
@"googleAdSenseAdLinkColor", kGADAdSenseAdLinkColor,
@"adWhirlTextColor", kGADAdSenseAdTextColor,
@"googleAdSenseAdURLColor", kGADAdSenseAdURLColor,
@"googleAdSenseAlternateAdColor", kGADAdSenseAlternateAdColor,
@"googleAdSenseAlternateAdURL", kGADAdSenseAlternateAdURL,
@"googleAdSenseAllowAdsafeMedium", kGADAdSenseAllowAdsafeMedium,
nil];
}
- (id)initWithAdWhirlDelegate:(id<AdWhirlDelegate>)delegate
view:(AdWhirlView *)view
config:(AdWhirlConfig *)config
networkConfig:(AdWhirlAdNetworkConfig *)netConf {
self = [super initWithAdWhirlDelegate:delegate
view:view
config:config
networkConfig:netConf];
if (self != nil) {
// Check that the required methods are implemented.
if (![delegate respondsToSelector:@selector(googleAdSenseCompanyName)]) {
[NSException raise:NSInvalidArgumentException format:
@"You must implement googleAdSenseCompanyName in your AdwhirlDelegate in order to use Google AdSense"];
}
if (![delegate respondsToSelector:@selector(googleAdSenseAppName)]) {
[NSException raise:NSInvalidArgumentException format:
@"You must implement googleAdSenseAppName in your AdwhirlDelegate in order to use Google AdSense"];
}
if (![delegate respondsToSelector:@selector(googleAdSenseApplicationAppleID)]) {
[NSException raise:NSInvalidArgumentException format:
@"You must implement googleAdSenseApplicationAppleID in your AdwhirlDelegate in order to use Google AdSense"];
}
}
return self;
}
- (void)getAd {
adViewController = [[GADAdViewController alloc] initWithDelegate:self];
NSMutableDictionary *attributes = [NSMutableDictionary dictionaryWithObjectsAndKeys:
[self publisherId], kGADAdSenseClientID,
[self companyName], kGADAdSenseCompanyName,
[self appName], kGADAdSenseAppName,
[self applicationAppleID], kGADAdSenseApplicationAppleID,
[self testMode], kGADAdSenseIsTestAdRequest,
nil];
// optional params
for (NSString *paramName in GASParamNameToSel) {
SEL sel = NSSelectorFromString((NSString *)[GASParamNameToSel objectForKey:paramName]);
if ([adWhirlDelegate respondsToSelector:sel]) {
NSObject *val = [adWhirlDelegate performSelector:sel];
if (val != nil) {
[attributes setObject:val forKey:paramName];
}
}
}
AWLogDebug(@"Google AdSense attributes: %@", attributes);
// load the ad
adViewController.adSize = kGADAdSize320x50;
[adViewController loadGoogleAd:attributes];
adViewController.view.frame = kAdWhirlViewDefaultFrame;
self.adNetworkView = adViewController.view;
}
- (void)stopBeingDelegate {
if (adViewController != nil) {
adViewController.delegate = nil;
}
}
- (void)dealloc {
// need to call here cos adViewController will be nil when super dealloc runs
[self stopBeingDelegate];
[adViewController release], adViewController = nil;
[super dealloc];
}
#pragma mark parameter gathering methods
- (NSString *)publisherId {
if ([adWhirlDelegate respondsToSelector:@selector(googleAdSenseClientID)]) {
return [adWhirlDelegate googleAdSenseClientID];
}
return networkConfig.pubId;
}
- (NSString *)companyName {
return [adWhirlDelegate googleAdSenseCompanyName];
}
- (NSString *)appName {
return [adWhirlDelegate googleAdSenseAppName];
}
- (NSString *)applicationAppleID {
return [adWhirlDelegate googleAdSenseApplicationAppleID];
}
- (NSNumber *)testMode {
if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTestMode)]
&& [adWhirlDelegate adWhirlTestMode]) {
return [NSNumber numberWithInt:1];
}
return [NSNumber numberWithInt:0];
}
#pragma mark GADAdViewControllerDelegate required methods
- (UIViewController *)viewControllerForModalPresentation:(GADAdViewController *)adController {
return [adWhirlDelegate viewControllerForPresentingModalView];
}
#pragma mark GADAdViewControllerDelegate notification methods
- (void)loadSucceeded:(GADAdViewController *)adController withResults:(NSDictionary *)results {
[adWhirlView adapter:self didReceiveAdView:[adController view]];
}
- (void)loadFailed:(GADAdViewController *)adController withError:(NSError *) error {
[adWhirlView adapter:self didFailAd:error];
}
- (GADAdClickAction)adControllerActionModelForAdClick:(GADAdViewController *)adController {
[self helperNotifyDelegateOfFullScreenModal];
return GAD_ACTION_DISPLAY_INTERNAL_WEBSITE_VIEW; // full screen web view
}
- (void)adControllerDidCloseWebsiteView:(GADAdViewController *)adController {
[self helperNotifyDelegateOfFullScreenModalDismissal];
}
- (void)adControllerDidExpandAd:(GADAdViewController *)controller {
[self helperNotifyDelegateOfFullScreenModal];
}
- (void)adControllerDidCollapseAd:(GADAdViewController *)controller {
[self helperNotifyDelegateOfFullScreenModalDismissal];
}
@end

View File

@@ -1,49 +0,0 @@
/*
AdWhirlAdapterGreystripe.m
Copyright 2010 Greystripe, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdNetworkAdapter.h"
#import "GreystripeDelegate.h"
/**
* Banner slot name used to identify the banner ad slot within the Greystripe
* SDK.
*/
extern NSString * const kGSBannerSlotName;
/**
* Full-screen slot name used to identify the full-screen ad slot within the
* Greystripe SDK. Use this slot name to display full-screen ads as follows:
*
* [GSAdEngine displayFullScreenAdForSlotNamed:kGSFullScreenSlotName];
*
* If you need to check whether an ad is available for this slot, simply use:
*
* [GSAdEngine isAdReadyForSlotNamed:kGSFullScreenSlotName];
*/
extern NSString * const kGSFullScreenSlotName;
@class GSAdView;
@interface AdWhirlAdapterGreystripe : AdWhirlAdNetworkAdapter <GreystripeDelegate> {
UIView *innerContainer;
UIView *outerContainer;
}
@end

View File

@@ -1,191 +0,0 @@
/*
AdWhirlAdapterGreystripe.m
Copyright 2010 Greystripe, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdapterGreystripe.h"
#import "AdWhirlAdNetworkAdapter+Helpers.h"
#import "AdWhirlAdNetworkConfig.h"
#import "AdWhirlAdNetworkRegistry.h"
#import "AdWhirlLog.h"
#import "AdWhirlView.h"
#import "GSAdView.h"
#import "GSAdEngine.h"
// constants
NSString * const kGSBannerSlotName = @"gsBanner";
NSString * const kGSFullScreenSlotName = @"gsFullScreen";
// static globals
static BOOL g_didStartUpGreystripe;
static NSTimeInterval g_lastAdReadyTime;
@interface AdWhirlAdapterGreystripe ()
- (void)bannerAdReady;
@end
@implementation AdWhirlAdapterGreystripe
+ (AdWhirlAdNetworkType)networkType {
return AdWhirlAdNetworkTypeGreyStripe;
}
+ (void)load {
[[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self];
}
/**
* Initialize the Greystripe adapter. The GSAdEngine will be started up the
* first time this method is called, using the ID provided by the AdWhirl
* server. Two slots will be registered with the GSAdEngine: one banner and one
* full-screen. See the note in AdWhirlAdapterGreystripe.h on how to make use
* of the full-screen slot.
*/
- (id)initWithAdWhirlDelegate:(id<AdWhirlDelegate>)delegate
view:(AdWhirlView *)view
config:(AdWhirlConfig *)config
networkConfig:(AdWhirlAdNetworkConfig *)netConf {
if(self = [super initWithAdWhirlDelegate:delegate view:view config:config networkConfig:netConf]) {
if(!g_didStartUpGreystripe) {
@try {
GSAdSlotDescription * bannerSlot = [GSAdSlotDescription descriptionWithSize:kGSAdSizeBanner name:kGSBannerSlotName];
GSAdSlotDescription * fullScreenSlot = [GSAdSlotDescription descriptionWithSize:kGSAdSizeIPhoneFullScreen name:kGSFullScreenSlotName];
[GSAdEngine startupWithAppID:netConf.pubId adSlotDescriptions:[NSArray arrayWithObjects:bannerSlot,fullScreenSlot, nil]];
g_didStartUpGreystripe = YES;
}
@catch (NSException *e) {
// This exception is thrown when Greystripe is initialized twice. We
// ignore it because if the host app is using Greystripe directly for
// full-screen ads, it may have already initialized Greystripe before
// AdWhirl tried to do the same.
if([e.name isEqualToString:NSInternalInconsistencyException]){
g_didStartUpGreystripe = YES;
}
else {
@throw e;
}
}
}
}
return self;
}
/**
* Fetch a banner ad from Greystripe. This method only fetches banners as all
* full-screen ad fetching is performed implicitly by the GSAdEngine.
*/
- (void)getAd {
GSAdView *gsAdView = [GSAdView adViewForSlotNamed:kGSBannerSlotName delegate:self];
// Use default frame, slightly bigger, to be the parent view of gsAdView, so
// when the GSAdView finds its containing view it stops at the inner Container
// and will set the alpha of innerContainer, not the AdWhirlView
innerContainer = [[UIView alloc] initWithFrame:kAdWhirlViewDefaultFrame];
innerContainer.backgroundColor = [UIColor clearColor];
[innerContainer addSubview:gsAdView];
// Set the outer container to be the size of the gsAdView so there are no unsightly
// borders around the ad
outerContainer = [[UIView alloc] initWithFrame:gsAdView.frame];
outerContainer.backgroundColor = [UIColor clearColor];
[outerContainer addSubview:innerContainer];
self.adNetworkView = outerContainer;
NSTimeInterval now = [[NSDate date] timeIntervalSince1970];
NSTimeInterval delta = now - g_lastAdReadyTime;
if(delta > kGSMinimumRefreshInterval) {
// For the initial ad display we will get an ad ready notification
// automatically because the ad is automatically rendered
// regardless of its refresh interval (0 here). For all other
// displays we must force it.
if(g_lastAdReadyTime > 0) {
if([GSAdEngine isNextAdDownloadedForSlotNamed:kGSBannerSlotName]) {
[gsAdView refresh];
[self bannerAdReady];
}
else {
AWLogDebug(@"Failing Greystripe banner ad request because the next "\
"banner ad has not yet been downloaded.");
[adWhirlView adapter:self didFailAd:nil];
}
}
}
else {
AWLogDebug(@"Failing Greystripe ad request because Greystripe's "
"minimum refresh interval of %f has not elapsed since the "\
"previous banner display.", kGSMinimumRefreshInterval);
[adWhirlView adapter:self didFailAd:nil];
}
}
/**
* Stop being the delegate for banner ads. In order to change the delegate for
* full-screen Greystripe ads, see GSAdEngine's
* setFullScreenDelegate:forSlotNamed: method.
*/
- (void)stopBeingDelegate {
[GSAdView adViewForSlotNamed:kGSBannerSlotName delegate:nil];
}
- (void)dealloc {
[innerContainer release];
[outerContainer release];
[super dealloc];
}
#pragma mark -
#pragma mark GreystripeDelegate notification methods
/**
* Delegate notification received when Greystripe has a banner ad ready.
*/
- (void)greystripeAdReadyForSlotNamed:(NSString *)a_name {
if ([a_name isEqualToString:kGSBannerSlotName] && g_lastAdReadyTime == 0) {
// Only forward on this notification for the initial notification as
// all other notifications will be sent explicitly after checking
// ad readiness (see getAd).
[self bannerAdReady];
}
}
- (void)greystripeFullScreenDisplayWillOpen {
[self helperNotifyDelegateOfFullScreenModal];
}
- (void)greystripeFullScreenDisplayWillClose {
[self helperNotifyDelegateOfFullScreenModalDismissal];
}
#pragma mark -
#pragma mark Internal methods
/**
* Notify the host app that Greystripe has received an ad. This only applies
* banner ads that the Greystripe SDK has fetched, as readiness of full-screen
* ads can be always be checked directly via
* [GSAdEngine isAdReadyForSlotNamed:kGSFullScreenSlotName].
*/
- (void)bannerAdReady {
AWLogDebug(@"Greystripe received banner ad.");
g_lastAdReadyTime = [[NSDate date] timeIntervalSince1970];
[adWhirlView adapter:self didReceiveAdView:self.adNetworkView];
}
@end

View File

@@ -1,31 +0,0 @@
/*
AdWhirlAdapterIAd.h
Copyright 2010 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdNetworkAdapter.h"
#import <iAd/ADBannerView.h>
@interface AdWhirlAdapterIAd : AdWhirlAdNetworkAdapter <ADBannerViewDelegate> {
NSString *kADBannerContentSizeIdentifierPortrait;
NSString *kADBannerContentSizeIdentifierLandscape;
}
+ (AdWhirlAdNetworkType)networkType;
@end

View File

@@ -1,135 +0,0 @@
/*
AdWhirlAdapterIAd.m
Copyright 2010 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdapterIAd.h"
#import "AdWhirlAdNetworkConfig.h"
#import "AdWhirlView.h"
#import "AdWhirlLog.h"
#import "AdWhirlAdNetworkAdapter+Helpers.h"
#import "AdWhirlAdNetworkRegistry.h"
@implementation AdWhirlAdapterIAd
+ (AdWhirlAdNetworkType)networkType {
return AdWhirlAdNetworkTypeIAd;
}
+ (void)load {
if(NSClassFromString(@"ADBannerView") != nil) {
[[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self];
}
}
- (void)getAd {
ADBannerView *iAdView = [[ADBannerView alloc] initWithFrame:CGRectZero];
kADBannerContentSizeIdentifierPortrait =
&ADBannerContentSizeIdentifierPortrait != nil ?
ADBannerContentSizeIdentifierPortrait :
ADBannerContentSizeIdentifier320x50;
kADBannerContentSizeIdentifierLandscape =
&ADBannerContentSizeIdentifierLandscape != nil ?
ADBannerContentSizeIdentifierLandscape :
ADBannerContentSizeIdentifier480x32;
iAdView.requiredContentSizeIdentifiers = [NSSet setWithObjects:
kADBannerContentSizeIdentifierPortrait,
kADBannerContentSizeIdentifierLandscape,
nil];
UIDeviceOrientation orientation;
if ([self.adWhirlDelegate respondsToSelector:@selector(adWhirlCurrentOrientation)]) {
orientation = [self.adWhirlDelegate adWhirlCurrentOrientation];
}
else {
orientation = [UIDevice currentDevice].orientation;
}
if (UIDeviceOrientationIsLandscape(orientation)) {
iAdView.currentContentSizeIdentifier = kADBannerContentSizeIdentifierLandscape;
}
else {
iAdView.currentContentSizeIdentifier = kADBannerContentSizeIdentifierPortrait;
}
[iAdView setDelegate:self];
self.adNetworkView = iAdView;
[iAdView release];
}
- (void)stopBeingDelegate {
ADBannerView *iAdView = (ADBannerView *)self.adNetworkView;
if (iAdView != nil) {
iAdView.delegate = nil;
}
}
- (void)rotateToOrientation:(UIInterfaceOrientation)orientation {
ADBannerView *iAdView = (ADBannerView *)self.adNetworkView;
if (iAdView == nil) return;
if (UIInterfaceOrientationIsLandscape(orientation)) {
iAdView.currentContentSizeIdentifier = kADBannerContentSizeIdentifierLandscape;
}
else {
iAdView.currentContentSizeIdentifier = kADBannerContentSizeIdentifierPortrait;
}
// ADBanner positions itself in the center of the super view, which we do not
// want, since we rely on publishers to resize the container view.
// position back to 0,0
CGRect newFrame = iAdView.frame;
newFrame.origin.x = newFrame.origin.y = 0;
iAdView.frame = newFrame;
}
- (BOOL)isBannerAnimationOK:(AWBannerAnimationType)animType {
if (animType == AWBannerAnimationTypeFadeIn) {
return NO;
}
return YES;
}
- (void)dealloc {
[super dealloc];
}
#pragma mark IAdDelegate methods
- (void)bannerViewDidLoadAd:(ADBannerView *)banner {
// ADBanner positions itself in the center of the super view, which we do not
// want, since we rely on publishers to resize the container view.
// position back to 0,0
CGRect newFrame = banner.frame;
newFrame.origin.x = newFrame.origin.y = 0;
banner.frame = newFrame;
[adWhirlView adapter:self didReceiveAdView:banner];
}
- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
[adWhirlView adapter:self didFailAd:error];
}
- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave {
[self helperNotifyDelegateOfFullScreenModal];
return YES;
}
- (void)bannerViewActionDidFinish:(ADBannerView *)banner {
[self helperNotifyDelegateOfFullScreenModalDismissal];
}
@end

View File

@@ -1,37 +0,0 @@
/*
AdWhirlAdapterInMobi.h
Copyright 2010 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdNetworkAdapter.h"
#import "IMAdDelegate.h"
#import "IMAdRequest.h"
@class InMobiAdView;
@interface AdWhirlAdapterInMobi : AdWhirlAdNetworkAdapter <IMAdDelegate> {
}
+ (AdWhirlAdNetworkType)networkType;
- (NSString *)siteId;
- (UIViewController *)rootViewControllerForAd;
- (BOOL)testMode;
- (Gender)gender;
@end

View File

@@ -1,173 +0,0 @@
/*
AdWhirlAdapterInMobi.m
Copyright 2010 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdapterInMobi.h"
#import "AdWhirlAdNetworkConfig.h"
#import "AdWhirlView.h"
#import "IMAdView.h"
#import "IMAdRequest.h"
#import "AdWhirlLog.h"
#import "AdWhirlAdNetworkAdapter+Helpers.h"
#import "AdWhirlAdNetworkRegistry.h"
@implementation AdWhirlAdapterInMobi
+ (AdWhirlAdNetworkType)networkType {
return AdWhirlAdNetworkTypeInMobi;
}
+ (void)load {
[[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self];
}
- (void)getAd {
IMAdView *inMobiView = [[IMAdView alloc]
initWithFrame:kAdWhirlViewDefaultFrame
imAppId:[self siteId]
imAdUnit:IM_UNIT_320x50
rootViewController:[self rootViewControllerForAd]];
[inMobiView autorelease];
inMobiView.refreshInterval = REFRESH_INTERVAL_OFF;
inMobiView.delegate = self;
self.adNetworkView = inMobiView;
IMAdRequest *request = [IMAdRequest request];
if ([self testMode]) {
request.testMode = true;
}
if ([adWhirlDelegate respondsToSelector:@selector(postalCode)]) {
request.postalCode = [adWhirlDelegate postalCode];
}
if ([adWhirlDelegate respondsToSelector:@selector(areaCode)]) {
request.areaCode = [adWhirlDelegate areaCode];
}
if ([adWhirlDelegate respondsToSelector:@selector(dateOfBirth)]) {
NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease];
[formatter setDateFormat:@"dd-MM-yyyy"];
request.dateOfBirth = [formatter
stringFromDate:[adWhirlDelegate dateOfBirth]];
}
if ([adWhirlDelegate respondsToSelector:@selector(gender)]) {
if ([adWhirlDelegate gender] == @"m") {
request.gender = G_M;
} else if ([adWhirlDelegate gender] == @"f") {
request.gender = G_F;
} else {
request.gender = G_None;
}
}
if ([adWhirlDelegate respondsToSelector:@selector(keywords)]) {
request.keywords = [adWhirlDelegate keywords];
}
if ([adWhirlDelegate respondsToSelector:@selector(searchString)]) {
request.searchString = [adWhirlDelegate searchString];
}
if ([adWhirlDelegate respondsToSelector:@selector(incomeLevel)]) {
request.income = [adWhirlDelegate incomeLevel];
}
if ([adWhirlDelegate respondsToSelector:@selector(inMobiEducation)]) {
request.education = [adWhirlDelegate inMobiEducation];
}
if ([adWhirlDelegate respondsToSelector:@selector(inMobiEthnicity)]) {
request.ethnicity = [adWhirlDelegate inMobiEthnicity];
}
if ([adWhirlDelegate respondsToSelector:@selector(dateOfBirth)]) {
request.age = [self helperCalculateAge];
}
if ([adWhirlDelegate respondsToSelector:@selector(inMobiInterests)]) {
request.interests = [adWhirlDelegate inMobiInterests];
}
if ([adWhirlDelegate respondsToSelector:@selector(inMobiParamsDictionary)]) {
request.paramsDictionary = [adWhirlDelegate inMobiParamsDictionary];
}
if (!adWhirlConfig.locationOn) {
request.isLocationEnquiryAllowed = false;
}
[inMobiView loadIMAdRequest:request];
}
- (void)stopBeingDelegate {
InMobiAdView *inMobiView = (InMobiAdView *)self.adNetworkView;
if (inMobiView != nil) {
[inMobiView setDelegate:nil];
}
}
- (void)dealloc {
[super dealloc];
}
#pragma mark IMAdView helper methods
- (NSString *)siteId {
if ([adWhirlDelegate respondsToSelector:@selector(inMobiAppId)]) {
return [adWhirlDelegate inMobiAppID];
}
return networkConfig.pubId;
}
- (UIViewController *)rootViewControllerForAd {
return [adWhirlDelegate viewControllerForPresentingModalView];
}
- (BOOL)testMode {
if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTestMode)])
return [adWhirlDelegate adWhirlTestMode];
return NO;
}
- (Gender)gender {
if ([adWhirlDelegate respondsToSelector:@selector(gender)]) {
NSString *genderStr = [adWhirlDelegate gender];
if ([genderStr isEqualToString:@"f"]) {
return G_F;
} else if ([genderStr isEqualToString:@"m"]) {
return G_M;
}
}
return G_None;
}
#pragma mark IMAdDelegate methods
- (void)adViewDidFinishRequest:(IMAdView *)adView {
[adWhirlView adapter:self didReceiveAdView:adView];
}
- (void)adView:(IMAdView *)view didFailRequestWithError:(IMAdError *)error {
NSLog(@"Error %@", error);
[adWhirlView adapter:self didFailAd:nil];
}
- (void)adViewWillPresentScreen:(IMAdView *)adView {
[self helperNotifyDelegateOfFullScreenModal];
}
- (void)adViewWillDismissScreen:(IMAdView *)adView {
[self helperNotifyDelegateOfFullScreenModalDismissal];
}
- (void)adViewWillLeaveApplication:(IMAdView *)adView {
[self helperNotifyDelegateOfFullScreenModal];
}
@end

View File

@@ -1,30 +0,0 @@
/*
AdWhirlAdapterJumpTap.h
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdNetworkAdapter.h"
#import "JTAdWidget.h"
@interface AdWhirlAdapterJumpTap : AdWhirlAdNetworkAdapter <JTAdWidgetDelegate> {
}
+ (AdWhirlAdNetworkType)networkType;
@end

View File

@@ -1,238 +0,0 @@
/*
AdWhirlAdapterJumpTap.m
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdapterJumpTap.h"
#import "AdWhirlView.h"
#import "AdWhirlConfig.h"
#import "AdWhirlAdNetworkConfig.h"
#import "AdWhirlAdNetworkAdapter+Helpers.h"
#import "AdWhirlAdNetworkRegistry.h"
@implementation AdWhirlAdapterJumpTap
+ (AdWhirlAdNetworkType)networkType {
return AdWhirlAdNetworkTypeJumpTap;
}
+ (void)load {
[[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self];
}
- (void)getAd {
JTAdWidget *widget = [[JTAdWidget alloc] initWithDelegate:self
shouldStartLoading:YES];
widget.frame = kAdWhirlViewDefaultFrame;
widget.refreshInterval = 0; // do not self-refresh
self.adNetworkView = widget;
if ([adWhirlDelegate respondsToSelector:@selector(jumptapTransitionType)]) {
widget.transition = [adWhirlDelegate jumptapTransitionType];
}
[widget release];
}
- (void)stopBeingDelegate {
// no way to set JTAdWidget's delegate to nil
}
- (void)dealloc {
[super dealloc];
}
#pragma mark JTAdWidgetDelegate methods
- (NSString *)publisherId:(id)theWidget {
NSString *pubId = networkConfig.pubId;
if (pubId == nil) {
NSDictionary *cred = networkConfig.credentials;
if (cred != nil) {
pubId = [cred objectForKey:@"publisherID"];
}
}
return pubId;
}
- (NSString *)site:(id)theWidget {
NSString *siteId = nil;
if ([adWhirlDelegate respondsToSelector:@selector(jumptapSiteId)]) {
siteId = [adWhirlDelegate jumptapSiteId];
}
if (siteId == nil) {
NSDictionary *cred = networkConfig.credentials;
if (cred != nil) {
siteId = [cred objectForKey:@"siteID"];
}
}
return siteId;
}
- (NSString *)adSpot:(id)theWidget {
NSString *spotId = nil;
if ([adWhirlDelegate respondsToSelector:@selector(jumptapSpotId)]) {
spotId = [adWhirlDelegate jumptapSpotId];
}
if (spotId == nil) {
NSDictionary *cred = networkConfig.credentials;
if (cred != nil) {
spotId = [cred objectForKey:@"spotID"];
}
}
return spotId;
}
- (BOOL)shouldRenderAd:(id)theWidget {
[adWhirlView adapter:self didReceiveAdView:theWidget];
return YES;
}
- (void)beginAdInteraction:(id)theWidget {
[self helperNotifyDelegateOfFullScreenModal];
}
- (void)endAdInteraction:(id)theWidget {
[self helperNotifyDelegateOfFullScreenModalDismissal];
}
- (void)adWidget:(id)theWidget didFailToShowAd:(NSError *)error {
[adWhirlView adapter:self didFailAd:error];
}
- (void)adWidget:(id)theWidget didFailToRequestAd:(NSError *)error {
[adWhirlView adapter:self didFailAd:error];
}
- (BOOL)respondsToSelector:(SEL)selector {
if (selector == @selector(location:)
&& ![adWhirlDelegate respondsToSelector:@selector(locationInfo)]) {
return NO;
}
else if (selector == @selector(query:)
&& ![adWhirlDelegate respondsToSelector:@selector(keywords)]) {
return NO;
}
else if (selector == @selector(category:)
&& ![adWhirlDelegate respondsToSelector:@selector(jumptapCategory)]) {
return NO;
}
else if (selector == @selector(adultContent:)
&& ![adWhirlDelegate respondsToSelector:@selector(jumptapAdultContent)]) {
return NO;
}
return [super respondsToSelector:selector];
}
#pragma mark JTAdWidgetDelegate methods -Targeting
- (NSString *)query:(id)theWidget {
return [adWhirlDelegate keywords];
}
- (NSString *)category:(id)theWidget {
return [adWhirlDelegate jumptapCategory];
}
- (AdultContent)adultContent:(id)theWidget {
return [adWhirlDelegate jumptapAdultContent];
}
#pragma mark JTAdWidgetDelegate methods -General Configuration
- (NSDictionary*)extraParameters:(id)theWidget {
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:10];
if ([adWhirlDelegate respondsToSelector:@selector(dateOfBirth)]) {
NSInteger age = [self helperCalculateAge];
if (age >= 0)
[dict setObject:[NSString stringWithFormat:@"%d",age] forKey:@"mt-age"];
}
if ([adWhirlDelegate respondsToSelector:@selector(gender)]) {
NSString *gender = [adWhirlDelegate gender];
if (gender != nil)
[dict setObject:gender forKey:@"mt-gender"];
}
if ([adWhirlDelegate respondsToSelector:@selector(incomeLevel)]) {
NSUInteger income = [adWhirlDelegate incomeLevel];
NSString *level = nil;
if (income < 15000) {
level = @"000_015";
}
else if (income < 20000) {
level = @"015_020";
}
else if (income < 30000) {
level = @"020_030";
}
else if (income < 40000) {
level = @"030_040";
}
else if (income < 50000) {
level = @"040_050";
}
else if (income < 75000) {
level = @"050_075";
}
else if (income < 100000) {
level = @"075_100";
}
else if (income < 125000) {
level = @"100_125";
}
else if (income < 150000) {
level = @"125_150";
}
else {
level = @"150_OVER";
}
[dict setObject:level forKey:@"mt-hhi"];
}
return dict;
}
- (UIColor *)adBackgroundColor:(id)theWidget {
return [self helperBackgroundColorToUse];
}
- (UIColor *)adForegroundColor:(id)theWidget {
return [self helperTextColorToUse];
}
#pragma mark JTAdWidgetDelegate methods -Location Configuration
- (BOOL)allowLocationUse:(id)theWidget {
return adWhirlConfig.locationOn;
}
- (CLLocation*)location:(id)theWidget {
if (![adWhirlDelegate respondsToSelector:@selector(locationInfo)]) {
return nil;
}
return [adWhirlDelegate locationInfo];
}
#pragma mark JTAdWidgetDelegate methods -Ad Display and User Interaction
// The ad orientation changed
//- (void)adWidget:(id)theWidget orientationHasChangedTo:(UIInterfaceOrientation)interfaceOrientation;
// Language methods
//- (NSString*)getPlayVideoPrompt:(id)theWidget;
//- (NSString*)getBackButtonPrompt:(id)theWidget isInterstitial:(BOOL)isInterstitial;
//- (NSString*)getSafariButtonPrompt:(id)theWidget;
@end

View File

@@ -1,38 +0,0 @@
/*
AdWhirlAdapterMdotM.h
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdNetworkAdapter.h"
#import "AdWhirlCustomAdView.h"
#import "AdWhirlWebBrowserController.h"
@interface AdWhirlAdapterMdotM : AdWhirlAdNetworkAdapter <AdWhirlCustomAdViewDelegate, AdWhirlWebBrowserControllerDelegate> {
BOOL requesting;
CLLocationManager *locationManager;
NSURLConnection *adConnection;
NSMutableData *adData;
NSURLConnection *imageConnection;
NSMutableData *imageData;
AdWhirlCustomAdView *adView;
AdWhirlWebBrowserController *webBrowserController;
}
+ (AdWhirlAdNetworkType)networkType;
@end

View File

@@ -1,423 +0,0 @@
/*
AdWhirlAdapterMdotM.m
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdapterMdotM.h"
#import "AdWhirlView.h"
#import "AdWhirlConfig.h"
#import "AdWhirlAdNetworkConfig.h"
#import "AdWhirlDelegateProtocol.h"
#import "AdWhirlLog.h"
#import "AdWhirlAdNetworkAdapter+Helpers.h"
#import "AdWhirlAdNetworkRegistry.h"
#import "AdWhirlAdapterCustom.h"
#import "AdWhirlError.h"
#import "CJSONDeserializer.h"
#import "AdWhirlCustomAdView.h"
@interface AdWhirlAdapterMdotM ()
- (BOOL)parseAdData:(NSData *)data error:(NSError **)error;
@property (nonatomic,readonly) CLLocationManager *locationManager;
@property (nonatomic,retain) NSURLConnection *adConnection;
@property (nonatomic,retain) NSURLConnection *imageConnection;
@property (nonatomic,retain) AdWhirlCustomAdView *adView;
@property (nonatomic,retain) AdWhirlWebBrowserController *webBrowserController;
@end
@implementation AdWhirlAdapterMdotM
@synthesize adConnection;
@synthesize imageConnection;
@synthesize adView;
@synthesize webBrowserController;
+ (AdWhirlAdNetworkType)networkType {
return AdWhirlAdNetworkTypeMdotM;
}
+ (void)load {
[[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self];
}
- (BOOL)useTestAd {
if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTestMode)])
return [adWhirlDelegate adWhirlTestMode];
return NO;
}
- (id)initWithAdWhirlDelegate:(id<AdWhirlDelegate>)delegate
view:(AdWhirlView *)view
config:(AdWhirlConfig *)config
networkConfig:(AdWhirlAdNetworkConfig *)netConf {
self = [super initWithAdWhirlDelegate:delegate
view:view
config:config
networkConfig:netConf];
if (self != nil) {
adData = [[NSMutableData alloc] init];
imageData = [[NSMutableData alloc] init];
}
return self;
}
- (NSMutableString *)appendUserContextDic:(NSDictionary *)dic withUrl:(NSString *)sUrl {
NSArray *keyArray = [dic allKeys];
NSMutableString *str = [NSMutableString stringWithString:sUrl];
//Iterate over the context disctionary and for each kay-value pair create a string of the format &key=value
for (int i = 0; i < [keyArray count]; i++) {
[str appendFormat:@"&%@=%@",[keyArray objectAtIndex:i], [dic objectForKey:[keyArray objectAtIndex:i]]];
}
return str;
}
- (void)getAd {
@synchronized(self) {
if (requesting) return;
requesting = YES;
}
NSString *appKey = networkConfig.pubId;
if ([adWhirlDelegate respondsToSelector:@selector(MdotMApplicationKey)] ) {
appKey = [adWhirlDelegate MdotMApplicationKey];
}
UIDevice *device = [UIDevice currentDevice];
NSBundle *bundle = [NSBundle mainBundle];
NSLocale *locale = [NSLocale currentLocale];
NSString *userAgent = [NSString stringWithFormat:@"%@ %@ (%@; %@ %@; %@)",
[bundle objectForInfoDictionaryKey:@"CFBundleDisplayName"],
[bundle objectForInfoDictionaryKey:@"CFBundleVersion"],
[device model],
[device systemName], [device systemVersion],
[locale localeIdentifier]];
int test;
if ( [self useTestAd] ) {
test = 1;
} else
test = 0;
NSString *str = [NSString stringWithFormat:
@"http://ads.mdotm.com/ads/feed.php?appver=%d&v=%@&apikey=mdotm&appkey=%@&deviceid=%@&width=320&height=50&fmt=json&ua=%@&test=%d",
kAdWhirlAppVer, [[UIDevice currentDevice] systemVersion],
appKey, [[UIDevice currentDevice] uniqueIdentifier], userAgent, test];
NSMutableDictionary *userContextDic = [[NSMutableDictionary alloc] initWithCapacity:2];
if ( [userContextDic count] > 0 ) {
str = [self appendUserContextDic:userContextDic withUrl:str];
}
NSString *urlString = [str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSURL *adRequestURL = [[NSURL alloc] initWithString:urlString];
AWLogDebug(@"Requesting MdotM ad (%@) %@", str, adRequestURL);
NSURLRequest *adRequest = [NSURLRequest requestWithURL:adRequestURL];
NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:adRequest
delegate:self];
self.adConnection = conn;
[conn release];
[adRequestURL release];
[userContextDic release];
}
#pragma mark MdotMDelegate optional methods
- (BOOL)respondsToSelector:(SEL)selector {
if (selector == @selector(location)
&& ![adWhirlDelegate respondsToSelector:@selector(location)]) {
return NO;
}
else if (selector == @selector(userContext)
&& ![adWhirlDelegate respondsToSelector:@selector(userContext)]) {
return NO;
} return [super respondsToSelector:selector];
}
- (CLLocationManager *)locationManager {
if (locationManager == nil) {
locationManager = [[CLLocationManager alloc] init];
}
return locationManager;
}
- (BOOL)parseEnums:(int *)val
adInfo:(NSDictionary*)info
minVal:(int)min
maxVal:(int)max
fieldName:(NSString *)name
error:(NSError **)error {
NSString *str = [info objectForKey:name];
if (str == nil) {
if (error != nil)
*error = [AdWhirlError errorWithCode:AdWhirlCustomAdDataError
description:[NSString stringWithFormat:
@"MdotM ad data has no '%@' field", name]];
return NO;
}
int intVal = [str intValue];
if (intVal <= min || intVal >= max) {
if (error != nil)
*error = [AdWhirlError errorWithCode:AdWhirlCustomAdDataError
description:[NSString stringWithFormat:
@"MdotM ad data: Invalid value for %@ - %d", name, intVal]];
return NO;
}
*val = intVal;
return YES;
}
- (BOOL)parseAdData:(NSData *)data error:(NSError **)error {
NSError *jsonError = nil;
id parsed = [[CJSONDeserializer deserializer] deserialize:data error:&jsonError];
if (parsed == nil) {
if (error != nil)
*error = [AdWhirlError errorWithCode:AdWhirlCustomAdParseError
description:@"Error parsing MdotM ad JSON from server"
underlyingError:jsonError];
return NO;
}
if ([parsed isKindOfClass:[NSArray class]]) {
NSArray *ads = parsed;
NSDictionary *adInfo = nil;
if ( [ads count] == 0 ) {
return(NO);
} else {
id parsed0 =[ads objectAtIndex:0];
if ( [parsed0 isKindOfClass:[NSDictionary class]] ) {
adInfo = parsed0;
// gather up and validate ad info
NSString *text = [adInfo objectForKey:@"ad_text"];
NSString *redirectURLStr = [adInfo objectForKey:@"landing_url"];
int adTypeInt;
if (![self parseEnums:&adTypeInt
adInfo:adInfo
minVal:AWCustomAdTypeMIN
maxVal:AWCustomAdTypeMAX
fieldName:@"ad_type"
error:error]) {
return NO;
}
AWCustomAdType adType = adTypeInt;
int launchTypeInt;
if (![self parseEnums:&launchTypeInt
adInfo:adInfo
minVal:AWCustomAdLaunchTypeMIN
maxVal:AWCustomAdLaunchTypeMAX
fieldName:@"launch_type"
error:error]) {
return NO;
}
AWCustomAdLaunchType launchType = launchTypeInt;
AWCustomAdWebViewAnimType animType = AWCustomAdWebViewAnimTypeCurlDown;
NSURL *redirectURL = nil;
if (redirectURLStr == nil) {
AWLogWarn(@"No redirect URL for MdotM ad");
} else {
redirectURL = [[NSURL alloc] initWithString:redirectURLStr];
if (!redirectURL)
AWLogWarn(@"MdotM ad: Malformed redirect URL string %@", redirectURLStr);
}
AWLogDebug(@"Got MdotM ad %@ %@ %d %d %d", text, redirectURL,
adType, launchType, animType);
self.adView = [[AdWhirlCustomAdView alloc] initWithDelegate:self
text:text
redirectURL:redirectURL
clickMetricsURL:nil
adType:adType
launchType:launchType
animType:animType
backgroundColor:[self helperBackgroundColorToUse]
textColor:[self helperTextColorToUse]];
[self.adView release];
self.adNetworkView = adView;
[redirectURL release];
if (adView == nil) {
if (error != nil)
*error = [AdWhirlError errorWithCode:AdWhirlCustomAdDataError
description:@"Error initializing MdotM ad view"];
return NO;
}
// fetch image
id imageURL = [adInfo objectForKey:@"img_url"];
if ( [imageURL isKindOfClass:[NSString class]]) {
AWLogDebug(@"Request MdotM ad image at %@", imageURL);
NSURLRequest *imageRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:imageURL]];
NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:imageRequest
delegate:self];
self.imageConnection = conn;
[conn release];
} else {
return(NO);
}
} else {
return(NO);
}
}
} else {
if (error != nil)
*error = [AdWhirlError errorWithCode:AdWhirlCustomAdDataError
description:@"Expected top-level dictionary in MdotM ad data"];
return NO;
}
return YES;
}
- (void)stopBeingDelegate {
AdWhirlCustomAdView *theAdView = (AdWhirlCustomAdView *)self.adNetworkView;
if (theAdView != nil) {
theAdView.delegate = nil;
}
}
- (void)dealloc {
[locationManager release], locationManager = nil;
[adConnection release], adConnection = nil;
[adData release], adData = nil;
[imageConnection release], imageConnection = nil;
[imageData release], imageData = nil;
[adView release], adView = nil;
[webBrowserController release], webBrowserController = nil;
[super dealloc];
}
#pragma mark NSURLConnection delegate methods.
- (void)connection:(NSURLConnection *)conn didReceiveResponse:(NSURLResponse *)response {
if (conn == adConnection) {
[adData setLength:0];
}
else if (conn == imageConnection) {
[imageData setLength:0];
}
}
- (void)connection:(NSURLConnection *)conn didFailWithError:(NSError *)error {
if (conn == adConnection) {
[adWhirlView adapter:self didFailAd:[AdWhirlError errorWithCode:AdWhirlCustomAdConnectionError
description:@"Error connecting to MdotM ad server"
underlyingError:error]];
requesting = NO;
} else if (conn == imageConnection) {
[adWhirlView adapter:self didFailAd:[AdWhirlError errorWithCode:AdWhirlCustomAdConnectionError
description:@"Error connecting to MdotM to fetch image"
underlyingError:error]];
requesting = NO;
}
}
- (void)connectionDidFinishLoading:(NSURLConnection *)conn {
if (conn == adConnection) {
NSError *error = nil;
if (![self parseAdData:adData error:&error]) {
[adWhirlView adapter:self didFailAd:error];
requesting = NO;
return;
}
}
else if (conn == imageConnection) {
UIImage *image = [[UIImage alloc] initWithData:imageData];
if (image == nil) {
[adWhirlView adapter:self
didFailAd:[AdWhirlError errorWithCode:AdWhirlCustomAdImageError
description:@"Cannot initialize MdotM ad image from data"]];
requesting = NO;
return;
}
adView.image = image;
[adView setNeedsDisplay];
[image release];
requesting = NO;
[adWhirlView adapter:self didReceiveAdView:self.adView];
}
}
- (void)connection:(NSURLConnection *)conn didReceiveData:(NSData *)data {
if (conn == adConnection) {
[adData appendData:data];
}
else if (conn == imageConnection) {
[imageData appendData:data];
}
}
#pragma mark AdWhirlCustomAdViewDelegate methods
- (void)adTapped:(AdWhirlCustomAdView *)ad {
if (ad != adView) return;
if (ad.clickMetricsURL != nil) {
NSURLRequest *metRequest = [NSURLRequest requestWithURL:ad.clickMetricsURL];
[NSURLConnection connectionWithRequest:metRequest
delegate:nil]; // fire and forget
}
if (ad.redirectURL == nil) {
AWLogError(@"MdotM ad redirect URL is nil");
return;
}
switch (ad.launchType) {
case AWCustomAdLaunchTypeSafari:
[[UIApplication sharedApplication] openURL:ad.redirectURL];
break;
case AWCustomAdLaunchTypeCanvas:
if (self.webBrowserController == nil) {
AdWhirlWebBrowserController *ctrlr = [[AdWhirlWebBrowserController alloc] init];
self.webBrowserController = ctrlr;
[ctrlr release];
}
webBrowserController.delegate = self;
[webBrowserController presentWithController:[adWhirlDelegate viewControllerForPresentingModalView]
transition:ad.animType];
[self helperNotifyDelegateOfFullScreenModal];
[webBrowserController loadURL:ad.redirectURL];
break;
default:
AWLogError(@"MdotM ad: Unsupported launch type %d", ad.launchType);
break;
}
}
#pragma mark AdWhirlWebBrowserControllerDelegate methods
- (void)webBrowserClosed:(AdWhirlWebBrowserController *)controller {
if (controller != webBrowserController) return;
self.webBrowserController = nil; // don't keep around to save memory
[self helperNotifyDelegateOfFullScreenModalDismissal];
}
@end

View File

@@ -1,30 +0,0 @@
/*
AdWhirlAdapterMillennial.h
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdNetworkAdapter.h"
#import "MMAdView.h"
@interface AdWhirlAdapterMillennial : AdWhirlAdNetworkAdapter <MMAdDelegate> {
NSMutableDictionary *requestData;
}
+ (AdWhirlAdNetworkType)networkType;
@end

View File

@@ -1,227 +0,0 @@
/*
AdWhirlAdapterMillennial.m
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdapterMillennial.h"
#import "AdWhirlView.h"
#import "AdWhirlConfig.h"
#import "AdWhirlAdNetworkConfig.h"
#import "AdWhirlDelegateProtocol.h"
#import "AdWhirlLog.h"
#import "AdWhirlAdNetworkAdapter+Helpers.h"
#import "AdWhirlAdNetworkRegistry.h"
#define kMillennialAdFrame (CGRectMake(0, 0, 320, 53))
@interface AdWhirlAdapterMillennial ()
- (CLLocationDegrees)latitude;
- (CLLocationDegrees)longitude;
- (NSInteger)age;
- (NSString *)zipCode;
- (NSString *)sex;
@end
@implementation AdWhirlAdapterMillennial
+ (AdWhirlAdNetworkType)networkType {
return AdWhirlAdNetworkTypeMillennial;
}
+ (void)load {
[[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self];
}
- (void)getAd {
NSString *apID;
if ([adWhirlDelegate respondsToSelector:@selector(millennialMediaApIDString)]) {
apID = [adWhirlDelegate millennialMediaApIDString];
}
else {
apID = networkConfig.pubId;
}
requestData = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
@"adwhirl", @"vendor",
nil];
if ([self respondsToSelector:@selector(zipCode)]) {
[requestData setValue:[self zipCode] forKey:@"zip"];
}
if ([self respondsToSelector:@selector(age)]) {
[requestData setValue:[NSString stringWithFormat:@"%d",[self age]] forKey:@"age"];
}
if ([self respondsToSelector:@selector(sex)]) {
[requestData setValue:[self sex] forKey:@"sex"];
}
if ([self respondsToSelector:@selector(latitude)]) {
[requestData setValue:[NSString stringWithFormat:@"%lf",[self latitude]] forKey:@"lat"];
}
if ([self respondsToSelector:@selector(longitude)]) {
[requestData setValue:[NSString stringWithFormat:@"%lf",[self longitude]] forKey:@"long"];
}
MMAdType adType = MMBannerAdTop;
if ([adWhirlDelegate respondsToSelector:@selector(millennialMediaAdType)]) {
adType = [adWhirlDelegate millennialMediaAdType];
}
MMAdView *adView = [MMAdView adWithFrame:kMillennialAdFrame
type:adType
apid:apID
delegate:self
loadAd:YES
startTimer:NO];
self.adNetworkView = adView;
}
- (void)stopBeingDelegate {
MMAdView *adView = (MMAdView *)adNetworkView;
if (adView != nil) {
[adView setRefreshTimerEnabled:false];
adView.delegate = nil;
}
}
- (void)dealloc {
[requestData release];
[super dealloc];
}
#pragma mark MMAdDelegate methods
- (NSDictionary *)requestData {
AWLogDebug(@"Sending requestData to MM: %@", requestData);
return requestData;
}
- (void)adRequestSucceeded:(MMAdView *)adView {
// millennial ads are slightly taller than default frame, at 53 pixels.
[adWhirlView adapter:self didReceiveAdView:adNetworkView];
}
- (void)adRequestFailed:(MMAdView *)adView {
[adWhirlView adapter:self didFailAd:nil];
}
- (void)adModalWillAppear {
[self helperNotifyDelegateOfFullScreenModal];
}
- (void)adModalWasDismissed {
[self helperNotifyDelegateOfFullScreenModalDismissal];
}
#pragma mark requestData optional methods
// The follow is kept for gathering requestData
- (BOOL)respondsToSelector:(SEL)selector {
if (selector == @selector(latitude)
&& ![adWhirlDelegate respondsToSelector:@selector(locationInfo)]) {
return NO;
}
else if (selector == @selector(longitude)
&& ![adWhirlDelegate respondsToSelector:@selector(locationInfo)]) {
return NO;
}
else if (selector == @selector(age)
&& (!([adWhirlDelegate respondsToSelector:@selector(millennialMediaAge)]
|| [adWhirlDelegate respondsToSelector:@selector(dateOfBirth)])
|| [self age] < 0)) {
return NO;
}
else if (selector == @selector(zipCode)
&& ![adWhirlDelegate respondsToSelector:@selector(postalCode)]) {
return NO;
}
else if (selector == @selector(sex)
&& ![adWhirlDelegate respondsToSelector:@selector(gender)]) {
return NO;
}
else if (selector == @selector(householdIncome)
&& ![adWhirlDelegate respondsToSelector:@selector(incomeLevel)]) {
return NO;
}
else if (selector == @selector(educationLevel)
&& ![adWhirlDelegate respondsToSelector:@selector(millennialMediaEducationLevel)]) {
return NO;
}
else if (selector == @selector(ethnicity)
&& ![adWhirlDelegate respondsToSelector:@selector(millennialMediaEthnicity)]) {
return NO;
}
return [super respondsToSelector:selector];
}
- (CLLocationDegrees)latitude {
CLLocation *loc = [adWhirlDelegate locationInfo];
if (loc == nil) return 0.0;
return loc.coordinate.latitude;
}
- (CLLocationDegrees)longitude {
CLLocation *loc = [adWhirlDelegate locationInfo];
if (loc == nil) return 0.0;
return loc.coordinate.longitude;
}
- (NSInteger)age {
if ([adWhirlDelegate respondsToSelector:@selector(millennialMediaAge)]) {
return [adWhirlDelegate millennialMediaAge];
}
return [self helperCalculateAge];
}
- (NSString *)zipCode {
return [adWhirlDelegate postalCode];
}
- (NSString *)sex {
NSString *gender = [adWhirlDelegate gender];
NSString *sex = @"";
if (gender == nil)
return sex;
if ([gender compare:@"m"] == NSOrderedSame) {
sex = @"M";
}
else if ([gender compare:@"f"] == NSOrderedSame) {
sex = @"F";
}
return sex;
}
/*
- (NSInteger)householdIncome {
return (NSInteger)[adWhirlDelegate incomeLevel];
}
- (MMEducation)educationLevel {
return [adWhirlDelegate millennialMediaEducationLevel];
}
- (MMEthnicity)ethnicity {
return [adWhirlDelegate millennialMediaEthnicity];
}
*/
@end

View File

@@ -1,45 +0,0 @@
/*
AdWhirlAdapterNexage.h
Copyright 2011 Google, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import <Foundation/Foundation.h>
#import "AdWhirlAdNetworkAdapter.h"
#import "NexageDelegateProtocol.h"
@class NexageAdViewController;
@interface AdWhirlAdapterNexage : AdWhirlAdNetworkAdapter
<NexageDelegateProtocol> {
NexageAdViewController* adViewController;
NSString* position;
}
+ (AdWhirlAdNetworkType)networkType;
- (NSDate *)dateOfBirth;
- (NSString *)postCode;
- (NSString *)gender;
- (NSString *)keywords;
- (NSInteger)houseIncome;
- (NSString *)city;
- (NSString *)designatedMarketArea;
- (NSString *)country;
- (NSString *)ethnicity;
- (NSString *)maritalStatus;
- (NSString *)areaCode;
@end

View File

@@ -1,219 +0,0 @@
/*
AdWhirlAdapterNexage.m
Copyright 2011 Google, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdapterNexage.h"
#import "AdWhirlAdNetworkAdapter+Helpers.h"
#import "AdWhirlAdNetworkRegistry.h"
#import "AdWhirlView.h"
#import "AdWhirlConfig.h"
#import "NexageAdViewController.h"
#import "NexageAdParameters.h"
#import "AdWhirlAdNetworkConfig.h"
#import "AdWhirlError.h"
@implementation AdWhirlAdapterNexage
+ (AdWhirlAdNetworkType)networkType {
return AdWhirlAdNetworkTypeNexage;
}
+ (void)load {
[[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self];
}
- (void)getAd{
NSDictionary* atts = [NSDictionary dictionaryWithObjectsAndKeys:
[self dateOfBirth], @"u(dob)",
[self country], @"u(country)",
[self city], @"u(city)",
[self designatedMarketArea], @"u(dma)",
[self ethnicity], @"u(eth)",
[self gender], @"u(gender)",
[NSNumber numberWithDouble:[self houseIncome]], @"u(hhi)",
[self keywords], @"u(keywords)",
[self maritalStatus], @"u(marital)",
[self postCode], @"u(zip)",
nil];
NSDictionary* credDict;
if ([adWhirlDelegate respondsToSelector:@selector(nexageDictionary)]) {
credDict = [adWhirlDelegate nexageDictionary];
}
else {
credDict = [networkConfig credentials];
}
BOOL testMode = NO;
if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTestMode)]
&& [adWhirlDelegate adWhirlTestMode]) {
testMode = YES;
}
// Nexage does weird things with position which can result in an over-release,
// so we're basically forced to leak this...
position = [[credDict objectForKey:@"position"] copy];
if(position == nil){
[adWhirlView adapter:self didFailAd:nil];
return;
}
adViewController =
[[NexageAdViewController alloc] initWithDelegate:position delegate:self];
[adViewController setEnable:YES];
[adViewController setAttributes:atts];
[adViewController setTestMode:testMode];
[adViewController locationAware:adWhirlConfig.locationOn];
#ifdef ADWHIRL_DEBUG
[adViewController enableLogging:YES];
#endif
self.adNetworkView = adViewController.view;
}
- (void)stopBeingDelegate {
if (adViewController != nil) {
adViewController.delegate = nil;
}
}
- (void)dealloc {
[self stopBeingDelegate];
[adViewController setAttributes:nil];
[adViewController release];
adViewController = nil;
[super dealloc];
}
#pragma mark NexageDelegateProtocol
- (void)adReceived:(UIView *)ad {
[adWhirlView adapter:self didReceiveAdView:ad];
}
/**
* This method will be called when user clicks the ad banner.
* The URL is an optional parameter, if Ad is from the Nexage mediation
* platform, you will get validate url, if it is nil, that means the action
* is from integrated sdk. Please check if (url == nil). The return YES, means
* the sdk will handle click event, otherwise sdk will ignore the user action.
* Basic Ad network principle should always return YES. Please refer our dev
* document for details
*/
- (BOOL)adActionShouldBegin:(NSURLRequest *)request
willLeaveApplication:(BOOL)willLeave {
[self helperNotifyDelegateOfFullScreenModal];
return YES;
}
/**
* The delegate will be called when full screen web browser is closed
*/
- (void)adFullScreenWebBrowserWillClose {
[self helperNotifyDelegateOfFullScreenModalDismissal];
}
/**
* identify the ad did not receive at this momnent.
*/
- (void)didFailToReceiveAd {
[adWhirlView adapter:self didFailAd:nil];
}
- (NSString *)dcnForAd {
NSDictionary *credDict;
if ([adWhirlDelegate respondsToSelector:@selector(nexageDictionary)]) {
credDict = [adWhirlDelegate nexageDictionary];
}
else {
credDict = [networkConfig credentials];
}
return [credDict objectForKey:@"dcn"];
}
- (UIViewController*)currentViewController {
return [adWhirlDelegate viewControllerForPresentingModalView];
}
#pragma mark user profiles
- (NSDate *)dateOfBirth {
if([adWhirlDelegate respondsToSelector:@selector(dateOfBirth)])
return [adWhirlDelegate dateOfBirth];
return nil;
}
- (NSString *)postCode {
if([adWhirlDelegate respondsToSelector:@selector(postalCode)])
return [adWhirlDelegate postalCode];
else return nil;
}
- (NSString *)gender {
if([adWhirlDelegate respondsToSelector:@selector(gender)])
return [adWhirlDelegate gender];
else return nil;
}
- (NSString *)keywords {
if([adWhirlDelegate respondsToSelector:@selector(keywords)])
return [adWhirlDelegate keywords];
else return nil;
}
- (NSInteger)houseIncome {
if([adWhirlDelegate respondsToSelector:@selector(incomeLevel)])
return [adWhirlDelegate incomeLevel];
return 0;
}
- (NSString *)city {
if([adWhirlDelegate respondsToSelector:@selector(nexageCity)])
return [adWhirlDelegate nexageCity];
else return nil;
}
- (NSString *)designatedMarketArea {
if([adWhirlDelegate respondsToSelector:@selector(nexageDesignatedMarketArea)])
return [adWhirlDelegate nexageDesignatedMarketArea];
else return nil;
}
- (NSString *)country {
if([adWhirlDelegate respondsToSelector:@selector(nexageCountry)])
return [adWhirlDelegate nexageCountry];
else return nil;
}
- (NSString *)ethnicity {
if([adWhirlDelegate respondsToSelector:@selector(nexageEthnicity)])
return [adWhirlDelegate nexageEthnicity];
else return nil;
}
- (NSString *)maritalStatus {
if([adWhirlDelegate respondsToSelector:@selector(nexageMaritalStatus)])
return [adWhirlDelegate nexageMaritalStatus];
else return nil;
}
- (NSString *)areaCode {
if([adWhirlDelegate respondsToSelector:@selector(areaCode)])
return [adWhirlDelegate areaCode];
else return nil;
}
@end

View File

@@ -1,30 +0,0 @@
/*
AdWhirlAdapterOneRiot.h
Copyright 2010 OneRiot, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdNetworkAdapter.h"
#import "OneRiotAd.h"
@interface AdWhirlAdapterOneRiot : AdWhirlAdNetworkAdapter {
OneRiotAd *adControl;
}
+ (AdWhirlAdNetworkType)networkType;
@end

View File

@@ -1,75 +0,0 @@
/*
AdWhirlAdapterOneRiot.m
Copyright 2010 OneRiot, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdapterOneRiot.h"
#import "AdWhirlAdNetworkRegistry.h"
#import "AdWhirlAdNetworkAdapter+Helpers.h"
#import "AdWhirlAdNetworkConfig.h"
@interface AdWhirlAdapterOneRiot ()
@property (nonatomic,retain) OneRiotAd *adControl;
@end
@implementation AdWhirlAdapterOneRiot
@synthesize adControl;
+ (AdWhirlAdNetworkType)networkType {
return AdWhirlAdNetworkTypeOneRiot;
}
+ (void)load {
[[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self];
}
- (void)getAd {
NSString *appId = networkConfig.pubId;
if ([adWhirlDelegate respondsToSelector:@selector(oneRiotAppID)]) {
appId = [adWhirlDelegate oneRiotAppID];
}
adControl = [[OneRiotAd alloc] initWithAppId:appId andWidth:300
andHeight:50];
adControl.RefreshInterval = adWhirlConfig.refreshInterval;
adControl.ReportGPS = adWhirlConfig.locationOn;
if ([adWhirlDelegate
respondsToSelector:@selector(oneRiotContextParameters)]) {
NSArray* contextParams = [adWhirlDelegate oneRiotContextParameters];
for (NSString* param in contextParams){
[adControl addContextParameters:param];
}
}
[adControl loadAd];
self.adNetworkView = adControl;
}
-(void) dealloc {
[adControl release];
adControl = nil;
[super dealloc];
}
@end

View File

@@ -1,30 +0,0 @@
/*
AdWhirlAdapterQuattro.h
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdNetworkAdapter.h"
#import "QWAdView.h"
@interface AdWhirlAdapterQuattro : AdWhirlAdNetworkAdapter <QWAdViewDelegate> {
}
+ (AdWhirlAdNetworkType)networkType;
@end

View File

@@ -1,222 +0,0 @@
/*
AdWhirlAdapterQuattro.m
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdapterQuattro.h"
#import "AdWhirlView.h"
#import "AdWhirlConfig.h"
#import "AdWhirlAdNetworkConfig.h"
#import "QWAdView.h"
#import "QWTestMode.h"
#import "AdWhirlLog.h"
#import "AdWhirlAdNetworkAdapter+Helpers.h"
#import "AdWhirlAdNetworkRegistry.h"
@implementation AdWhirlAdapterQuattro
+ (AdWhirlAdNetworkType)networkType {
return AdWhirlAdNetworkTypeQuattro;
}
+ (void)load {
[[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self];
}
- (void)getAd {
QWEnableLocationServicesForAds(adWhirlConfig.locationOn);
if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTestMode)]
&& [adWhirlDelegate adWhirlTestMode]) {
QWSetTestMode(YES);
QWSetLogging(YES);
}
else {
QWSetTestMode(NO);
QWSetLogging(NO);
}
NSDictionary *credDict;
if ([adWhirlDelegate respondsToSelector:@selector(quattroWirelessDictionary)]) {
credDict = [adWhirlDelegate quattroWirelessDictionary];
}
else {
credDict = [networkConfig credentials];
}
NSString *pubId = [credDict objectForKey:@"publisherID"];
NSString *siteId = [credDict objectForKey:@"siteID"];
QWAdType adType = QWAdTypeBanner;
if ([adWhirlDelegate respondsToSelector:@selector(quattroWirelessAdType)]) {
adType = (QWAdType)[adWhirlDelegate quattroWirelessAdType];
}
UIDeviceOrientation orientation;
if ([self.adWhirlDelegate respondsToSelector:@selector(adWhirlCurrentOrientation)]) {
orientation = [self.adWhirlDelegate adWhirlCurrentOrientation];
}
else {
orientation = [UIDevice currentDevice].orientation;
}
QWAdView *quattroAd = [QWAdView adViewWithType:adType
publisherID:pubId
siteID:siteId
orientation:orientation
delegate:self];
quattroAd.textColor = [self helperTextColorToUse];
quattroAd.backgroundColor = [self helperBackgroundColorToUse];
[quattroAd displayNewAd];
self.adNetworkView = quattroAd;
}
- (void)stopBeingDelegate {
QWAdView *quattroAd = (QWAdView *)self.adNetworkView;
if (quattroAd != nil) {
quattroAd.delegate = nil;
}
}
- (void)dealloc {
[super dealloc];
}
#pragma mark QWAdViewDelegate methods
- (void)adView:(QWAdView *)adView didDisplayAd:(QWAd *)ad {
// somehow the test banner ad is showing 80 pixels as height sometimes.
// check for that and adjust
AWLogDebug(@"Quattro reported frame %@", NSStringFromCGRect(self.adNetworkView.frame));
if (self.adNetworkView.frame.size.height > 50.0) {
CGRect f = adNetworkView.frame;
f.size.height = 50;
adNetworkView.frame = f;
}
[adWhirlView adapter:self didReceiveAdView:adView];
}
- (void)dispatchError:(NSError*)error
{
[adWhirlView adapter:self didFailAd:error];
}
- (void)adView:(QWAdView *)adView failedWithError:(NSError *)error {
[self performSelectorOnMainThread:@selector(dispatchError:) withObject:error waitUntilDone:NO];
}
- (void)adView:(QWAdView *)adView displayLandingPage:(UIViewController *)controller {
[self helperNotifyDelegateOfFullScreenModal];
[[adWhirlDelegate viewControllerForPresentingModalView] presentModalViewController:controller
animated:YES];
}
- (void)adView:(QWAdView *)adView dismiss:(UIViewController *)controller {
[[adWhirlDelegate viewControllerForPresentingModalView] dismissModalViewControllerAnimated:YES];
[self helperNotifyDelegateOfFullScreenModalDismissal];
}
#pragma mark QWAdViewDelegate optional methods
- (BOOL)respondsToSelector:(SEL)selector {
if (selector == @selector(latitude:)
&& ![adWhirlDelegate respondsToSelector:@selector(locationInfo)]) {
return NO;
}
else if (selector == @selector(longitude:)
&& ![adWhirlDelegate respondsToSelector:@selector(locationInfo)]) {
return NO;
}
else if (selector == @selector(age:)
&& (![adWhirlDelegate respondsToSelector:@selector(dateOfBirth)]
|| [self age:nil] < 0)) {
return NO;
}
else if (selector == @selector(zipcode:)
&& ![adWhirlDelegate respondsToSelector:@selector(postalCode)]) {
return NO;
}
else if (selector == @selector(gender:)
&& ![adWhirlDelegate respondsToSelector:@selector(gender)]) {
return NO;
}
else if (selector == @selector(income:)
&& ![adWhirlDelegate respondsToSelector:@selector(incomeLevel)]) {
return NO;
}
else if (selector == @selector(education:)
&& ![adWhirlDelegate respondsToSelector:@selector(quattroWirelessEducationLevel)]) {
return NO;
}
else if (selector == @selector(birthdate:)
&& ![adWhirlDelegate respondsToSelector:@selector(dateOfBirth)]) {
return NO;
}
else if (selector == @selector(ethnicity:)
&& ![adWhirlDelegate respondsToSelector:@selector(quattroWirelessEthnicity)]) {
return NO;
}
return [super respondsToSelector:selector];
}
- (double)latitude:(QWAdView *)adView {
CLLocation *loc = [adWhirlDelegate locationInfo];
if (loc == nil) return 0.0;
return loc.coordinate.latitude;
}
- (double)longitude:(QWAdView *)adView {
CLLocation *loc = [adWhirlDelegate locationInfo];
if (loc == nil) return 0.0;
return loc.coordinate.longitude;
}
- (NSString *)zipcode:(QWAdView *)adView {
return [adWhirlDelegate postalCode];
}
- (NSUInteger)age:(QWAdView *)adView {
return [self helperCalculateAge];
}
- (QWGender)gender:(QWAdView *)adView {
NSString *gender = [adWhirlDelegate gender];
QWGender sex = QWGenderUnknown;
if (gender == nil)
return sex;
if ([gender compare:@"m"] == NSOrderedSame) {
sex = QWGenderMale;
}
else if ([gender compare:@"f"] == NSOrderedSame) {
sex = QWGenderFemale;
}
return sex;
}
- (NSUInteger)income:(QWAdView *)adView {
return [adWhirlDelegate incomeLevel];
}
- (QWEducationLevel)education:(QWAdView *)adView {
return [adWhirlDelegate quattroWirelessEducationLevel];
}
- (NSDate *)birthdate:(QWAdView *)adView {
return [adWhirlDelegate dateOfBirth];
}
- (QWEthnicity)ethnicity:(QWAdView *)adView {
return [adWhirlDelegate quattroWirelessEthnicity];
}
@end

View File

@@ -1,29 +0,0 @@
/*
AdWhirlAdapterVideoEgg.h
Copyright 2009 AdMob, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import "AdWhirlAdNetworkAdapter.h"
@interface AdWhirlAdapterVideoEgg : AdWhirlAdNetworkAdapter {
}
+ (AdWhirlAdNetworkType)networkType;
@end

Some files were not shown because too many files have changed in this diff Show More