Commit Graph

21 Commits

Author SHA1 Message Date
valfieri
6fd6f9061c Added several ifdef PSP for different resolution image to merge the graphics folders. 2019-09-11 18:39:42 +02:00
Anthony Calosa
efd9cce4ef try to fix psp platform 2016-07-20 19:16:48 +08:00
Anthony Calosa
33fd704a00 move stats to the right in deck menu 2016-07-17 19:03:55 +08:00
Anthony Calosa
cd1b629191 Fix Segmentation Fault & Formatting 2015-11-10 11:58:36 +08:00
xawotihs
caec886e22 Fixed issues found by XCode. 2013-12-20 00:24:08 +01: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
techdragon.nguyen@gmail.com
a2179017d4 Extended Scroll() and OnScroll() to also take in magnitude as one of its parameters. magnitude is currently used in the deck editor to figure out how many cards to rotate around per swipe as function of velocity and the number of cards displayed on the screen.
fixed a compiler warning in SimplePopup in the constructor declaration
===DECK Editor changes ===
Added two touch buttons , one for "Sell Card", the other to switch between Deck and Collection.
changed swipe Left/Right to rotate card collection; removing the previous action which was to swap between deck/collection viewing

Note: GameStateDeckViewer isn't a JGuiController so can't leverage off the mButtons vector.  Thus, the buttons have to be handled by this class separately. (setButtonState, userPressedButton)
2012-01-26 13:53:03 +00:00
techdragon.nguyen@gmail.com
a36d886dd5 Added first draft of an interactive button. Needs to handle addition of images a little better
refined detailed info window for stats display
removed PSP button for Touch interfaces (currently only iOS and Android) on deck selection screens
to not break the core engine and reduce some more complex code, I created a new vector in the JController object. mButtons.  This vector will contain all the valid buttons for a given screen.  The appropriate Add/Remove methods have been updated to account for this new vector.
2012-01-25 18:35:24 +00:00
Xawotihs
f68c106e7e - Modified gameObserver and related classes to be able to work with a precise JGE instance given at construction and not the static global one. That allows to run gameObserver without JGE instance (for example in a worker thread).
- Added an "ACTION_LOGGING_TESTING" mode in the gameObserver. When this is defined, the game reloads itself in every update. I want to use that to track undo problems. Be aware that it kills performances and crashes with the testsuite if you want to activate it.
- Various cleanup/refactor of the game observer.
- Added a gameObserver == operator to compare two games
- Added player mode to the player serialization
- Added a multi-threaded mode to AI_CHANGE_TESTING. For the moment it's only useable with Qt. If you want to use it without, just defined a thread_count higher than 1.
- Refactored random generator class to use list intead of queue
- Defined a specific type for interrupt decision instead of int
2011-11-13 22:36:34 +00:00
wrenczes@gmail.com
76cba56a1c Resuming on my threading support work with the card caching mechanism. This change unfortunately touches quite a few files, but I needed to get it out of the way before things got out of hand: one significant hurdle is the assumed lifetime of a JQuad pointer. In a single threaded model, the life time of the pointer is clear: you fetch it into the cache, the cache makes room, you use the pointer immediately. In a multithreaded context however, it's unsafe, as the drawing thread can request a few JQuads, and the cache operating on a separate thread can potentially bounce a JQuad out of the cache before the draw routine is done using it, which ends up in an access violation when you attempt to draw using an invalidated quad pointer. To prevent this, the bulk of this change swaps out the use of naked JQuad* pointers in the code with a JQuadPtr, which is basically a typedef to a boost shared_ptr<JQuad>.
This btw points out another circular dependancy between the texture and the JQuad - a texture owns a bunch of JQuads, yet the renderer uses JQuads and always assumes that the texture is valid.  We're going to need to add more defensiveness to JGE to protect against this.

Other changes in this check-in:  WResourceManager doesn't derive from JResourceManager anymore.  It actually didn't require anything from the base, so I killed the dependency.  Also cleaned up the notion of a WTrackedQuad in the WCachedResource - it didn't need a separate class, just a better container.

I've build this & tested against PSP, win, linux, QT (linux).  I haven't tried against iOS and QT Win, or Maemo.  If these other platforms are broken, I apologize in advance! - I'm hoping it should be fairly simple to put them back into play.
2011-02-01 10:37:21 +00:00
wrenczes@gmail.com
3187487987 Minor tweaks to Mike's map of maps cache work on stats. Mostly these changes are stylistic changes that favor more terse code, but there was one bug where a double-delete was happening - GameStateDeckViewer used to allocate its own StatsWrapper, and deleted it as part of teardown - now that the allocation is owned by the deck stats instance, it's not allowed to do the deletion anymore.
I'll also note that the mods I did to getDeckMetaDataById() are completely unnecessary - pragmatically speaking, it's doing the same thing.  The only difference is that I'm using std::find_if instead of brute iterator manipulation, and I'm using a predicate function.  For a simple check like this, it's kind of pointless, but if you need to do more complex comparisons, predicate operators can become quite powerful.
2011-01-28 10:21:23 +00:00
techdragon.nguyen@gmail.com
ce7745bfa6 First attempt to reduce load time of player deck selection screens.
This change makes use of caching the DeckStats and DeckStatsWrappers into singleton caches that
get flushed when you quit the game.  The initial load time will be significant as lazy loading has not
been coded yet for the ai decks.

TODO: lazy load the player and ai decks as they appear on the screen.  Currently, each screen loads
all decks.
2011-01-27 16:13:40 +00:00
techdragon.nguyen@gmail.com
1be97b76f8 code cleanup. No code changes
- removed unused variables
- added line breaks between methods (not everywhere just where i saw it while removing unused variables)
2011-01-16 07:49:34 +00:00
wrenczes@gmail.com
65e38b0694 Another change that looks bigger than it is: changed out the global extern WResourceManager to a real singleton. This means that it's no longer being init'ed at static initialization time, and we can debug construction/destruction properly; it's also safer in a multithreaded context. 2010-12-01 08:22:17 +00:00
techdragon.nguyen@gmail.com
e4c8469490 implemented vertical scrolling.
created new class VerticalTextScroller to handle task display in deck selection screens
modified detailed popup placement on deck selection screen to compensate for lack of border
2010-11-24 16:12:18 +00:00
techdragon.nguyen@gmail.com
de60166440 disabled popup border until solution can be made to work on PSP in an acceptable manner. 2010-11-24 00:35:57 +00:00
techdragon.nguyen@gmail.com
ba027c9f8e addresses r2659
http://code.google.com/p/wagic/source/detail?r=2659
2010-11-23 22:26:16 +00:00
techdragon.nguyen@gmail.com
e39c94756b added border to extra details popup as per design at
http://wololo.net/forum/viewtopic.php?f=37&t=2380
and
http://wololo.net/forum/viewtopic.php?f=37&t=2382
2010-11-23 14:02:02 +00:00
techdragon.nguyen@gmail.com
f684795810 refactored menu classes
fixed some layout issues with detailed info popup
changed requirements for detailed info popup button to be determined by the number of wins aginst AI deck instead of just the number of games.
2010-11-19 04:19:03 +00:00
techdragon.nguyen@gmail.com
4aaa93439a code clean up. removed unneeded methods for stats generation
synced stats info for mana curve on detailed display on deck selection screen so only up to
   Constants::STATS_MAX_MANA_COST+1 is used instead of the currently hard coded 15.
2010-11-19 03:18:48 +00:00
techdragon.nguyen@gmail.com
2a8f8074e6 New descriptive text popup feature for deck selection
http://wololo.net/forum/viewtopic.php?f=13&t=2423
2010-11-18 15:48:48 +00:00