Commit Graph

991 Commits

Author SHA1 Message Date
omegablast2002@yahoo.com
98e34c4eca changed some of the ability names as requested, autoformatted ability.cpp as it was getting pretty messy. added @attackedalone( trigger. added "removefromcombat" mtgability. im going on vacation, whoosh :P 2010-10-18 15:56:32 +00:00
wagic.the.homebrew@gmail.com
f5575ac68e Erwan
- Updated fix for Dragon Broodmother
2010-10-18 13:33:54 +00:00
omegablast2002@yahoo.com
d13e8904b5 massive update, additions and changelog in first comment. 2010-10-18 10:46:36 +00:00
wrenczes@gmail.com
211deca011 I'm still planning on a more ambitious navigation mod, but this is a simple interim change to the existing navigation model that allows you to use the up/down keys to navigate directly to an avatar. This means that if you open your card hand & need to cast a spell that targets the enemy avatar, you can simply hit the up key a couple of times instead of navigating left (through potentially a huge number of cards if you're in a long, drawn out match). 2010-10-18 04:01:18 +00:00
wrenczes@gmail.com
832f11c153 Switched the managed JQuad container implementation from a vector to a map. This speeds up the cache lookup time from O(n) to O(log n). Hard to see a noticeable difference on win, but it definitely feels snappier on my psp, for instance, when browsing your library for a card, or your graveyard, etc.
I'm also noticing that the GetQuad(int) variant never seems to get hit, so I suspect that the ID lookup map is redundant.  I left it alone as the JResourceManager base class forces the need for the function; I need to spend more time looking at just how much of JResourceManager we actually use at this point.
2010-10-17 16:54:08 +00:00
omegablast2002@yahoo.com
35fa4d9786 made the fix to color= a fancy loop deal by request of wololo 2010-10-17 13:48:59 +00:00
omegablast2002@yahoo.com
6a81228275 fixed an issue where color= was not setting multiple colors on a card with this line.
Issue: 491
2010-10-17 13:17:27 +00:00
wagic.the.homebrew@gmail.com
8fdb64e9ce Erwan
- adding tests for issue 489 and issue 491
- check for null pointers in Credits.cpp
- Test suite can now select tokens by their name
- Fixed Dragon Broodmothere's token name
2010-10-17 10:21:08 +00:00
wrenczes@gmail.com
a7ffe4990b Cleaned up the SimpleMenu drawing routines. I was seeing intermittently weird edge lines on the spades of the menu system, as well as gaps. The code was doing a lot of hacky +/- of arbitrary pixel values for the positioning, so I fixed it up to do everything relative to the widths of the pole & the actual spade graphic's size. Also cleaned up the pngs themselves, as they had no need for a transparent pixel rim.
Also moved some static value definitions used in the drawing code from the class header to a private namespace in the cpp file, as they don't need to be seen by any clients of the class.
2010-10-17 00:20:25 +00:00
Xawotihs
e082deaddf Fixed Qt project compile on Windows 2010-10-16 12:17:25 +00:00
techdragon.nguyen@gmail.com
da4ab477ae The Test Suite was incorrectly updating and writing player save data.
( ie task list was being updated, set information being evaluated, etc )
put a guard around the endgame stat update process to only update when non-testsuite games are played.

Issue: 488
2010-10-14 16:13:45 +00:00
wrenczes@gmail.com
5d26989f2c Force the line endings to Unix on this file. 2010-10-14 10:02:16 +00:00
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
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
Xawotihs
93b1656f13 Added left mouse click support for menu, submenu and battle 2010-10-10 21:59:18 +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
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
Xawotihs
318aee5aec Work around issue 457, not fully fixed. 2010-10-09 10:37:47 +00:00
Xawotihs
d331b93e66 Removed X dependency when compiled with Qt 2010-10-07 21:44:04 +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
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
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
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
techdragon.nguyen@gmail.com
8e83e0d632 Issue: 474
modified player status to recognize that test suite has been activated.  This is to allow deactivation of "phase skip automation" game setting during test suite.  
TODO: fix "Phase Skip Automation" such that if turned on the test suite does not break.  This fix should be considered temporary
2010-10-04 16:26:55 +00:00
omegablast2002@yahoo.com
cf63c83754 Fixed a bug/exploit with declaring attackers and @tapped triggers. 2010-10-03 14:19:52 +00:00
wagic.the.homebrew@gmail.com
31f58b1da5 Erwan
- Bump version number up
2010-10-03 12:15:10 +00:00
wagic.the.homebrew@gmail.com
c3c5d893d1 Erwan
- attempt at fixing some crashes in shop (related to bad usage of the cache)
- Fix typo reported with Qumulox
2010-10-03 07:36:01 +00:00
omegablast2002@yahoo.com
08b762276b fix a bug where affinity wasnt triggering on card entering hand 2010-10-02 01:19:33 +00:00
wagic.the.homebrew@gmail.com
508040b3a7 Erwan
- fix for issue 467 (simultaneous triggers + "trigger" keyword)
- MootPoint's patch for some string parsing
- some random int/float compilation warning fixes
2010-10-01 16:33:07 +00:00
wagic.the.homebrew@gmail.com
65ae7039a7 Erwan
- collection load time speed increase by MootPoint
2010-09-30 10:34:38 +00:00
linshier
d8122e441e Tweaked translation codes for deck and opponents choosing menus. 2010-09-29 08:18:09 +00:00
wagic.the.homebrew@gmail.com
b79c7eea53 Erwan
- fix for issue 462 (graphical glitch when cards come back from graveyard)
- adding Kaioshin's wallpaper
- fixed minor issue in mtg.txt
2010-09-28 13:58:22 +00:00
omegablast2002@yahoo.com
aba3f784c5 attempt to fix an issue with prevent:1 on instants and sorceries. thanks for the tip wololo! :) 2010-09-27 02:07:11 +00:00
techdragon.nguyen@gmail.com
7ec7fe2577 modified debug string for card id collision 2010-09-26 16:05:19 +00:00
wagic.the.homebrew@gmail.com
82ab92a61f Erwan
-fix for issue 408 (issues with life + targetcontroller + targets on the stack)
2010-09-26 12:57:12 +00:00