Commit Graph

91 Commits

Author SHA1 Message Date
Anthony Calosa
030dca051a support for wish cards and deck sideboard 2017-03-07 23:42:34 +08:00
Anthony Calosa
b6eea6fe2e Some Changes to Deck Editor and Others
Some Deck Editor changes
2016-07-19 04:33:23 +08:00
Tobias Loose
aaceb3c038 Remove unused declaration 2013-12-07 13:33:16 +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
2002bb4e16 Fix crash that occured when opening the editor a second time 2013-12-06 20:13:30 +01:00
Tobias Loose
0c72bfd4c4 Make deck views toggleable 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
wagic.the.homebrew
3ba22cd615 Changes to Deck Editor:
- Removed one "stats" button as well as the "menu" button. The goal is to let the screen "breathe" and show cards as much as possible.
-- Removing the "menu" button is also in line with all other screens of the game, where that button never appears.
- With the same goal, the "XXX of XXX cards" text is now displayed only when scrolling
2012-03-21 14:41:38 +00:00
techdragon.nguyen@gmail.com
336462eecb reverted accidental change to CARDS_DIPSLAYED 2012-03-01 10:31:35 +00:00
techdragon.nguyen@gmail.com
6124280f24 added a prefernces screen to handle media card selection on Android devices. Contains actual fix for 4297.
Added a place marker to allow volume change during app.  Right now it's either loud or off.  There isn't a way to allow the volume to gradually go up and odwn based on the values set in settings.
2012-03-01 03:24:34 +00:00
techdragon.nguyen@gmail.com
969e6ac5e6 added more buttons to deck editor to cover all the functionality. Need to remove the PSP directions from the slide-in menus 2012-01-30 04:23:11 +00:00
techdragon.nguyen@gmail.com
9faf2ffc72 reverted changes to the Scroll/OnScroll method signatures. 2012-01-27 23:47:02 +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
rodrigodemoura@gmail.com
e6b199f599 Modifications to make the game more generic.
Included in a new modrules.xml tags.
 <cardgui>
   <background> Stores information concerning the colors </ background>
   <renderbig> Stores information to draw the card </ renderbig>
  <rendertinycrop> Stores information to draw the card </ rendertinycrop>
 </ cardgui>

 Change the variables array for vectors
2011-10-13 12:25:58 +00:00
Xawotihs
b2c5df2cd3 Modified the touch/mouse management in the editor to simply select the touched card. I also added a binding to switch between deck and collection with an horizontal swipe. 2011-09-05 22:04:10 +00:00
wrenczes@gmail.com
741f662bb0 Tied in my recent Android flick gesture addition to a Scroll() function. GameState now has a virtual function OnScroll() call that, by default is a no-op; each game state can choose to override how to respond to flick gestures. I've added one such override in the Deck Editor so that a flick up/down acts like the psp button up/down for scrolling between color filters. 2011-06-15 09:52:11 +00:00
wrenczes@gmail.com
fc0a59a14e Moved GameOptions.h into the precompiled header. Shaves almost 20 seconds off my build times. 2011-04-20 07:50:00 +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
6675a7da31 Implemented a lazy load pattern for the deck stats - when the DeckMenu is displaying decks, it calls LoadStats() for only the ones visible in the list. This helps reduces the lag that occurs each time we attempt to load all the AI decks during match selection.
This still could be improved - DeckMetaData's constructor loads an MTGDeck object to parse out the name of a deck from its file.  This means that we crack open 106 files on the first attempt to show the list of opponent decks. I started optimizing this, but reverted, as the list itself is sorted alphabetically.  Currently, with these mods, it's still taking 4 1/2 seconds on my psp to load the opponent list on the first go around.

While at it, did some cleanup - removed the need for passing around a player pointer in some of the DeckStat functions, etc.
2011-01-30 13:06:21 +00:00
wrenczes@gmail.com
32cabc15c2 Forcing LF as the line ending style through SVN properties. No actual code changes here. 2011-01-28 06:00:51 +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
Xawotihs
2b6469e391 Mouse support in deck editor 2010-11-20 21:30:15 +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
wagic.the.homebrew@gmail.com
d668fbb45c - unix endings for GameStateDeckViewer.h
- fix for issue 509 (font color was incorrect at end of some tests)
- Fixed Dregscape Zombie (fix for test unearth3.txt)
2010-11-14 01:15:46 +00:00
techdragon.nguyen@gmail.com
61cc3692a5 promoted StatsWrapper struct into class
altered deck editor information display for statistics
2010-11-07 18:28:54 +00:00
wrenczes@gmail.com
3c19533a4c Added the notion of a 'cancel' button, and unified all the 'cancel' menu IDs to be kCancelMenuID (ie -1). I've slaved the Menu button (ie Esc on win, 'Start' button on PSP) to this - the idea being, if you hit the Menu button to bring up a menu, hitting it again will dismiss it without doing anything, which is pretty standard behavior for most console/computer games. 2010-11-07 02:08:17 +00:00
techdragon.nguyen@gmail.com
dd163c8807 ***Note***
please copy "DeckEditorMenuBackdrop.png" into your PSP folder.  Otherwise you will have a crash when you start up!

ChangesLog:
minor refactoring of DeckMenu
added a new DeckEditorMenu which is derived from DeckMenu.  This customizes the deck editor menus with the exception of the confirmation screens (yes/no)
Still more work to be done to round out some font issues.  
TODO:
put more information text in bottom row of menu.
reorganize statistical data to allow more info to be shown.
2010-11-03 16:49:39 +00:00
techdragon.nguyen@gmail.com
6c1497bbd5 Revamped Deck Selection Screen using abrasax's design as a template.
TODO:  
     change literals to use constants, 
     refactor the rendering code for the menu to have be leaner.
     add text scroller to list all the tasks. 
         * 1st implementation will list all the tasks.dat  
         * 2nd round will try to get the scroller to only display relevant tasks to ai

Special thanks to wololo and MootPoint for helping me hammer this out.  To abrasax, for the initial design of the layout.
2010-11-01 08:22:55 +00:00
techdragon.nguyen@gmail.com
cd3ad9b9fd fixed menu size and text information for when saving deck as an AI deck. 2010-10-27 11:24:49 +00:00
wrenczes
d5f3e4cfea Enabled precompiled headers for the build. This cuts the win compile time in debug by at least half on my laptop; on the psp compile, it shaves it down by ~ 45 seconds. I only did a cursory inspection of what to add to PrecompiledHeader.h, there's probably more that we can throw in there for more incremental speed improvements.
Also fixed the project includes so that we don't need to always use the indirect include path, ie:
#include "../include/foo.h" -> #include "foo.h"

I'm don't know much about make files - if I busted the linux build, mea culpa, but I think we're okay on that front too.  For future reference, here's the most straightforward link on the topic of adding pch support to make files:

http://www.mercs-eng.com/~hulud/index.php?2008/06/13/6-writing-a-good-makefile-for-a-c-project
2010-10-24 05:55:24 +00:00
techdragon.nguyen@gmail.com
34335ba2aa added option to save deck in editor as an AI deck.
No option to delete or edit the AI deck once it has been created.
The deck gets saved as the canonical form of the deck to match other AI deck formats.
2010-10-22 08:28:52 +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
ed865ce29a Erwan
- Fix for issue 371 (Deck Editor resets to letter "A")
- Changed music behavior when switching menus. It shouldn't "restart" the music anymore.
2010-09-26 08:41:25 +00:00
omegablast2002@yahoo.com
5939cbded8 added MnGuyens further improved menu handling and extra options. 2010-09-17 06:34:12 +00:00
wagic.the.homebrew@gmail.com
e7bb2caf29 Erwan
- Fix issue 291 (cantbeblockedby segfault)
- Fix some issues with pricing
2010-03-13 09:34:20 +00:00
wagic.jeck
bb82dc38f2 Jeck - Linked both sets into one filter menu. Requires more testing, but appears to work on PSP/PC as it should. 2010-02-19 22:38:09 +00:00
wagic.jeck
25e6906149 Jeck - More deck editor fixes, linked in prior coded subtype filter. 2010-02-19 21:54:39 +00:00
wagic.jeck
ab22719e4d Jeck - Deck editor filtering now works much better- single filter, automatically recolors itself to match the active color. 2010-02-17 04:08:51 +00:00
wagic.jeck
62609ee1b1 Jeck - Some cleanup, fixed a double-deletion error in GameStateDeckViewer (when unlocking all cards). 2010-02-15 23:29:54 +00:00
wagic.jeck
470e3321e4 Jeck - Potential crash fix, removed unused variable. 2010-02-11 21:03:27 +00:00
wagic.jeck
83e2b04547 Jeck - Added full filtering system to deck editor and shop. I've spent 24hours on pure debugging, but there are likely a couple bugs I've missed. So please, if you find something, make an issue of it! :P Also split OptionItem classes into separate files, and added support for mixed-set boosters (which I think are way, way cool). 2010-02-08 01:03:07 +00:00
wagic.the.homebrew@gmail.com
66a505969e Erwan
- fix issue 215
- added test for purple screen (this is the small white square on top of the loading screen)
2009-11-23 08:25:27 +00:00
d32.wagic
6de1856698 Added mana production statistics to the deck viewer.
Two new screens (5,6):
5.) Counts of manasources per color and type.
- Basic lands
- Non basic lands
- Other source
6.) Focusing on mana produced by lands only, displaying amounts of each mana potentialy produced graphically, along with percentages - to be easily compared with following screen (detailing mana cost per colors)
2009-11-11 21:19:11 +00:00
d32.wagic
af343a4a7f Some additions to the deck statistics.
- Displaying title for each page
- In screen showing games against AI, displaying actual number of games won/played in addition to percentage
- Added two new screens (3,4) - mana cost/color breakdown for creatures (3) and non-creature spells (4)

More to come...
2009-11-07 20:04:09 +00:00
wagic.jeck
e23fac82e0 Jeck - Resolved issue 101, fixed "Cancel" after "Switch decks without saving". 2009-10-14 20:58:38 +00:00
wagic.the.homebrew@gmail.com
5b9fe719ae Erwan
-Adding Daddy32's statistics code
2009-09-28 14:28:39 +00:00
wagic.jeck
7510ee165f Jeck - Daily build, deck renaming, small keypad bugfix, profileFile() fix, proposed new iconspsp.png.
* Decks now support naming and renaming. Also added a "Switch decks without saving" option.
 * Removed unused static const char * menuTexts, from old 6-deck limited system
 * Keypad didn't display correctly when not given a title, and was never destructed. Fixed.
 * profileFile() default behavior was to fall back to RESPATH/player. Fixed.
 * New iconspsp.png, updated look to seem like PSP buttons, added some extra (unused) button icons.
2009-09-22 02:47:48 +00:00
wagic.jeck
c76d8a3976 Jeck - Separated GameStateDeckViewer.h code into GameStateDeckViewer.cpp. 2009-09-08 07:53:54 +00:00