21 Commits

Author SHA1 Message Date
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
jean.chalard
d93fdb2d4a Fix the Linux build. 2011-12-18 09:40:35 +00:00
Xawotihs
9adb9d625d - reworked the testsuite and the rules (storyflow) to use the same game deserialization code, moved that code to the players and zone classes
- removed every references to the gameobserver singleton. This object can now be instantiated several times as it's needed for minmax. To be able to do that, I mostly added a reference to a gameobserver from any targetable object (cards, players, spells) and abilities.
2011-10-01 13:30:30 +00:00
Xawotihs
c2879b0b6e Fixed a selection problem sometimes hapenning on the hand zone in touch/mouse mode and removed dead code. 2011-07-14 21:21:24 +00:00
techdragon.nguyen@gmail.com
e53c16f700 No code change just reformatting of header files.
finishing up my reformatting of the source from November/December following the guidelines that were posted.
some extra things I added:
   * Any empty virtual declarations were kept to one line.  
   * Enums were split up into separate lines to promote uniformity across all headers. ( each header file had a different style for enums)
2011-01-21 18:01:14 +00:00
wrenczes@gmail.com
27fd107208 1st step in refactoring some of the card rendering logic - currently, each 'client' has duplicated code having to deal with how to render the full card graphic vs text mode vs using a 'back' image if a card isn't found. This is a first pass at consolidating some of that logic to one location - the ultimate goal being, eventually, the resource cache will actually own the notion of whether it's handing out a real card image or a default filler if the card isn't available, and the client code rendering the card should be oblivious.
In this change, I made the CardGui's RenderBig() and AlternateRender() functions protected; anyone wanting to render a card simply calls RenderCard(), and the card drawing mode is passed along as a param.
2010-11-14 08:15:26 +00:00
wrenczes@gmail.com
5a1e8e6ffe More reorganization work around CardSelector and the singleton pattern. Broke the source for the singleton into its own separate source file, to keep things clean. Also broke apart a circular header dependency: CardSelector defines and uses a SelectorZone, which is a member inside of CardView. CardView in turn is used heavily by CardSelector. Instead SelectorZone is now defined within CardView (where it's set & controlled anyway).
I've also added my current work on the zone navigation system (class Navigator) - it's currently turned off for now (the override for this is inside of CardSelectorSingleton's Instance() call, simply comment out the NEW CardSelector and uncomment out the NEW Navigator line.)  It's functional, but I want to do more testing before considering wiring it into the game options or something similar.  (Also, note that it currently doesn't support the mouse functionality added by DJardin.)

Lastly, there's a bug crash fix in ActionStack that I tripped across while testing - basically, an illegal index value would have us walk off the bounds of a vector.
2010-10-31 07:50:53 +00:00
wrenczes@gmail.com
e2de03d987 Some organisational prep work before I start working on a new navigation method (ie replacement for CardSelector). The current design was to allocate a CardSelector and pass in its pointer to a variety of classes via their constructors. To simplify things, now we use a singleton style pattern with an Instance() function - this means that when I implement a new class to replace CardSelector, I only need to modify what's returned by the singleton callback - as long as the new pointer class supports the same function calls, it'll be a straight drop-in. 2010-10-22 08:41:44 +00:00
Xawotihs
93b1656f13 Added left mouse click support for menu, submenu and battle 2010-10-10 21:59:18 +00:00
jean.chalard
ec0354f630 J :
* Fix issue 357, where the hand loses focus when the opponent declares
  attackers while the hand is open.
* Harmonize the code for CardSelector.cpp to the coding style.
2010-03-05 17:01:00 +00:00
jean.chalard
39c5a3d465 J :
* Fix u32 into JButtons.
* Add a few comments.
* Remove useless variables.
2010-02-24 17:28:17 +00:00
wagic.the.homebrew@gmail.com
bd6c1a2407 Erwan
- fix compilation issues introduced in r1727
2010-01-18 12:43:30 +00:00
wagic.the.homebrew@gmail.com
08bf8781cc Erwan
- fix issue 69 (Shadow.png load issue) - I put it back to a black 16x16 image. If you need more alpha, use the facilities provided by JGE rather than touching the file, thanks ;)
2009-09-29 14:07:14 +00:00
wagic.the.homebrew@gmail.com
5443e6ff89 Erwan
- fix issue 89 and issue 90 - In the future, we will probably want cardSelector to handle CardDisplay somehow (although carddisplay is used in the Shop as well...)
2009-09-29 12:31:26 +00:00
wagic.the.homebrew@gmail.com
7bc8bba6f1 Erwan
- fix issue 20 (triangle button usage inplay)
- close issue 27 (gold effect on the gold bar). Please feel free to change the gold glow if you come up with something better, but I consider this perfectly releasable now
- code cleanup
2009-09-24 12:32:08 +00:00
jean.chalard
f6aba5c5cb J :
* Hand option.
2009-09-22 07:39:24 +00:00
jean.chalard
1f67998d7a J :
* Some interface updates.
2009-09-13 10:57:55 +00:00
jean.chalard
34d973c60d J :
* Create selection zones to remember the last card the cursor was on.
2009-09-12 12:57:50 +00:00
jean.chalard
457266184d J :
* Add a helper function.
2009-09-08 14:53:23 +00:00
jean.chalard
2ff279fad8 J :
* Order blocker interface.
2009-08-28 13:57:12 +00:00
jean.chalard
b2f75d45e7 J :
* Add missing files.
2009-08-22 06:01:52 +00:00