Commit Graph

2410 Commits

Author SHA1 Message Date
wrenczes@gmail.com
847ec5b7c5 Reinstate the MillExileCost pay variant, as pointed out by Z. 2010-10-14 08:14:49 +00:00
wrenczes@gmail.com
f7361fb030 More type conversion warning fixes, with some minor refactoring thrown in. 2010-10-14 07:39:00 +00:00
wrenczes@gmail.com
3ca5a7261d More warning conversion cleanup. 2010-10-14 05:05:37 +00:00
wrenczes@gmail.com
356ce1b8ba Giant refactor of all the ExtraCost variants. Reduced the .cpp code by literally half (~350 lines!)
Some of the things refactored to the base class:
- isPaymentSet()
- canPay()
- Render()
- setSource()
- setPayment()
- the target instance
- duplicated constructor initialization crap

I'm not interested in pointing fingers as to how the code got this way, but I'll ask that everyone who's altered this code in one fashion or another to carefully diff this change and understand what I refactored.  This code is a poster child for neglect & what happens when people start blindly copy & pasting code instead of paying attention to the commonality between code paths.  If you see the same lines of code happening over & over, and you're about to make yet another copy, please stop yourself & think about how you can refactor the code to be in a single shared function (or, more explicitly, a shared base member function when possible).

If you don't understand what I mean by a shared base member function, then I would suggest at the very least reading up on this topic:

http://www.cplusplus.com/doc/tutorial/inheritance/

(And, after all that, if you're still unsure how to proceed, ping someone else for advice!)
2010-10-14 04:45:10 +00:00
wrenczes@gmail.com
25cb9dde54 Cleaned up some compile warnings (double to float/ int to float conversions). 2010-10-13 23:34:36 +00:00
Xawotihs
e8ecd74361 Mouse support in graveyards an library browsing during battle 2010-10-13 22:28:19 +00:00
techdragon.nguyen@gmail.com
4a0331cbb9 corrected kicker test end conditions. 2010-10-13 21:24:50 +00:00
techdragon.nguyen@gmail.com
5005f69a69 added current AI deck name to "start" menu while dueling 2010-10-13 15:24:52 +00:00
Xawotihs
bb6267bbe4 Fixed possible deadlock added in the mouse support code 2010-10-12 21:53:41 +00:00
solo81@web.de
ce934123b0 Added a test for issue483.
Fixed Lux Cannon.
2010-10-12 15:05:52 +00:00
omegablast2002@yahoo.com
7a3577748e fresh eboot 2010-10-11 21:29:32 +00:00
solo81@web.de
b5ef7ff4e7 Fixed Semblance Anvil and Spikeshot Goblin. 2010-10-11 20:06:37 +00:00
solo81@web.de
3c998d6a31 Fixed issue485. 2010-10-11 14:07:38 +00:00
Xawotihs
93b1656f13 Added left mouse click support for menu, submenu and battle 2010-10-10 21:59:18 +00:00
Xawotihs
e342103204 Added support for left mouse click and zoom buttons 2010-10-10 21:58:02 +00:00
Xawotihs
75b8a0c328 Added support for left mouse click 2010-10-10 21:57:27 +00:00
solo81@web.de
0a484237b2 Fixed several card bugs.
Card list -> First comment.
2010-10-10 19:47:07 +00:00
omegablast2002@yahoo.com
93fe22d282 added a small fix to further reduce attacker phase exploiting. explaination in comments. 2010-10-10 15:11:30 +00:00
wrenczes@gmail.com
a08217ba53 Sorry, I keep modifying this line accidentally since I'm building with the newer pspsdk version. 2010-10-10 07:38:17 +00:00
wrenczes@gmail.com
810069f0a6 Added an SVN ignore rule on MS performance analysis projects, MS .filter files (a VS2010 sidecar file), Intel Amplifier sidecar files. 2010-10-10 07:34:43 +00:00
wrenczes@gmail.com
33e45c9635 More incremental work of converting code to use DebugTrace(). 2010-10-10 07:30:18 +00:00
wrenczes@gmail.com
2d86e86603 Follow up on this comment from Xawotihs:
"It's currently unclear for me why several instances of the same hgeparticlesystem with the same .psi file are created..."

The GameApp::Create() call was initializing an array of particles, but it wasn't actually stashing them in the psi cache.  The MenuItems also create the particles, but these are stashed correctly in the cache at that point.  So, I simply removed the unused particle array loading code since it wasn't actually caching anything correctly & therefore simply adding redundant reading of the same particle files.
2010-10-10 05:10:25 +00:00
solo81@web.de
7cfd9d981a Fixed several card bugs reported in the bug section of the forum. 2010-10-09 17:48:10 +00:00
Xawotihs
241583df02 release 0.13.1meamo1 2010-10-09 10:45:02 +00:00
Xawotihs
318aee5aec Work around issue 457, not fully fixed. 2010-10-09 10:37:47 +00:00
Xawotihs
7439d81454 Work around issue 457, not fully fixed. 2010-10-09 10:36:42 +00:00
Xawotihs
fcb8aeaa28 Added error handling and moved glEnable(GL_TEXTURE_2D) to fix issue 484 2010-10-09 10:18:59 +00:00
Xawotihs
977257aee3 moved glEnable(GL_TEXTURE_2D) to fix issue 484 2010-10-09 10:08:59 +00:00
wrenczes@gmail.com
62e0a789eb Fix for the Snap card not triggering the 2nd untap. Basically, stole the method from GrimmHatter's post:
http://www.wololo.net/forum/viewtopic.php?f=21&t=1430&start=40#p13465

Seems to work from my testing so far.  If this is the preferred route, we should probably sweep through & track down all the other cards that use the token counter hack, as that method used to work in 0.12.1 and broke some time after that.

(Somebody please sanity check this for me, as this is my first foray in messing with card rules.)
2010-10-09 04:07:31 +00:00
Xawotihs
d331b93e66 Removed X dependency when compiled with Qt 2010-10-07 21:44:04 +00:00
Xawotihs
f2a6a3e46e Fixed stripping 2010-10-07 21:42:52 +00:00
Xawotihs
996f665ae9 Complete build dependencies to make the autobuilder happy 2010-10-07 21:42:13 +00:00
Xawotihs
fb484f0f00 Removed X dependency when compiled with Qt 2010-10-07 21:40:09 +00:00
solo81@web.de
038f9c2ba0 Fixed Gempalm Incinerator and Eldrazi Monument.
Removed Armament Master (never supported!).
2010-10-07 20:13:14 +00:00
wrenczes@gmail.com
e45735267b More work on cleaning up debug trace logs. Added getDisplayName() overrides to the Ability & NextGamePhase interrupts so that there's now more contextual info in the output log. You'll now see what game phase is being added/resolved on the stack, and instead of a generic 'StackAbility' entry, it'll tell you what source it's coming from.
Also deleted a few debug output traces that were truly uninformative.
2010-10-07 08:13:22 +00:00
wrenczes@gmail.com
6109fe1912 Fix a compile error on the psp. 2010-10-07 08:10:08 +00:00
wrenczes@gmail.com
df2b145a42 Minor project changes - use a vsprops file to locate the extra includes instead of requiring folks to manually copy dirent.h & stdint.h into your VC include dir. 2010-10-07 04:06:16 +00:00
wrenczes@gmail.com
69a5c52ea8 Revert out a file that wasn't meant to be part of that last submit. 2010-10-07 03:49:42 +00:00
wrenczes@gmail.com
def3293fac Fixed my trace - removed the spurious addressof(). 2010-10-07 03:45:57 +00:00
techdragon.nguyen@gmail.com
34027bcabc adding DebugRoutines.h and mtg.txt to solution. 2010-10-07 03:03:04 +00:00
techdragon.nguyen@gmail.com
be11b96775 adding trim to card loading. if player deck has multiple spaces separating card name from set name, the parser fails. Trimming ensures that there are no problems with trailing and leading spaces concerning card and set names.
previously:
[card name]         ([set name]) *d

would fail because when the parser when looking for the card name, it would use 
[[card name]        ]
and not 
[[card name]]
since the card lookup is case insensitive but not whitespace insensitive the lookup would fail.
2010-10-07 03:01:05 +00:00
techdragon.nguyen@gmail.com
652358b8c4 commented out last check in as "addressof" is not defined in current code set. Is it possibly out of the boost library? 2010-10-06 16:05:58 +00:00
techdragon.nguyen@gmail.com
c15bc268b2 added box for issue # when commtting changes. 2010-10-06 15:38:27 +00:00
wrenczes@gmail.com
78f8ff98bb more OutputDebugString() conversions, and removed a useless trace in the base WResource destructor - instead, moved it up to WCachedResource so that we can output the filename of the resource that is being destroyed. 2010-10-06 11:46:10 +00:00
wrenczes@gmail.com
5595c0d3d8 More OutputDebugString() -> DebugTrace changes. 2010-10-06 10:45:29 +00:00
wrenczes@gmail.com
291a0d0312 1) swap out the pattern of
CODE: SELECT ALL
#if defined (WIN32) || defined (LINUX)
  char    buf[4096], *p = buf;
  sprintf(buf, "Some debug message showing  variables %i and %i\n", variableA, variableB);
  OutputDebugString(buf);
#endif


new paradigm:
CODE: SELECT ALL
DebugTrace("Some debug message showing variables " << variableA <<" and " << variableB);


No more dealing with formatting sprintf crap, just stream out variables. Also, DebugTrace washes out in release automatically. (TODO, need to sweep through the rest of the app to apply the changes to all the cases where OutputDebugString() is being called)

2) added two traces to follow adding/resolving things on the stack;

3) changed the uninformative "stack object" string that was the default for base class interrupts to use typeinfo(*this).name() so that you can actually see the derived class in the trace output. Here's a sample of what my trace output looks like now:
Action added to stack: Devoted Hero
Resolving Action on stack: Devoted Hero
Action added to stack: class NextGamePhase
Resolving Action on stack: class NextGamePhase
Action added to stack: class NextGamePhase
Resolving Action on stack: class NextGamePhase
Action added to stack: class StackAbility
Resolving Action on stack: class StackAbility
Action added to stack: class DrawAction
Resolving Action on stack: class DrawAction

4) replaced some hardcoded 0 / -1 values with their proper enums.
2010-10-06 09:28:45 +00:00
wrenczes@gmail.com
9c982475fe Some minor casting issues that trip up the 0.9.6 pspsdk when compiling. 2010-10-06 09:22:44 +00:00
wrenczes@gmail.com
1e7f2507f0 Removed an extra vector allocation from the previous card loading optimization. 2010-10-06 08:53:05 +00:00
wrenczes@gmail.com
88ac1dd9a6 2010-10-06 08:45:55 +00:00
Xawotihs
1d57d517ed Update to have the garage autobuilder complain a bit less 2010-10-05 23:46:17 +00:00