19 Commits

Author SHA1 Message Date
Vittorio Alfieri
ccae9673e6 Fixed bug that was not correctly showing the full Commander decks list in the deck choosing menu page, added a new gesture for Android to emulate back button pressure: now sliding from down to up for almost all screen size will trigger the back button in game (e.g. pause match in gameplay, going back from shop, and so on). 2021-09-05 01:15:01 +02:00
Vittorio Alfieri
5184132e8b Fixed primitives, added "notshare!" keyword (e.g. to search cards with different names), improved decks selection according to chosen game mode (e.g. Game will show commander decks only in commander mode and it will hide them in other modes). 2021-01-22 14:15:43 +01:00
wagic.the.homebrew
7beb958067 Adding a way to mark decks as "locked" based on options requirements (option on or off). Can be used for example to lock a deck until a specific set is not unlocked. Works for both player decks (could be used for premade?) and AI decks. 2011-05-06 06:40:00 +00:00
techdragon.nguyen@gmail.com
2fdc80aee1 Synchronized avatar images to be loaded correctly on first display of the opponent selection.
* changed how the avatar images are assigned since how they were before was incorrect.  They are now assigned upon instantiation of the meta file.  Not when the stats are calculated.  
* Added new image for "Evil Twin".  This is a horizontally flipped image of the original player avatar with a red background.  Please feel free to edit the image.
* removed display of avatar image on menu items in deck selection that are not deck related. (ie "Cancel", "Back to Main Menu", etc)  "New Deck" also does not have an image since no deck really exists yet so no avatar.  

Issue: 622
2011-04-20 17:51:40 +00:00
techdragon.nguyen@gmail.com
f4d1154cd6 reverted latest change 2011-02-14 09:35:43 +00:00
techdragon.nguyen@gmail.com
d9efb408e5 * optimized card loading. There was some redundant code that wasn't necessary.
* getCardByName seemed to have a initialization error if you tried to use it before the entire game loaded.  The cache would
throw an exception if you tried to use find and it was empty.  I put a guard around it to avoid this issue.

* refactored Zeth's "toggledifficuly" feature to be stored in meta data.  http://code.google.com/p/wagic/source/detail?r=3106
 -- This is slightly modified as it forces a 1 for 1 swap of cards that are specified.
    from the example given this is how it seemed to be used anyways.
 -- since all the information is stored in the meta data, there's no need to alter the deck's
    definition.
2011-02-14 08:14:35 +00:00
techdragon.nguyen@gmail.com
91a2cb9c90 fixed deck renaming to make changes immediate. 2011-02-05 22:21:49 +00:00
techdragon.nguyen@gmail.com
8af5870d48 * Added new options parameter. "SaveDetailedDeckInfo". This will force the system to save all
deck files in long format.  This is not configurable from the game.  It must be set manually
     inside options.txt.
     ie.  saveDetailedDeckInfo=1

* added extra debug information (line number inside text file) when card parser fails to recognize a line.
    - modified return value from "processConfLine()" to return 0 only when a true error occurs and print out
         "MTGDeck: Bad Line:
         [<line no>]: <line with error>"
    - processConfLine will now return 1 for lines starting with "#".  Previously it returned 0 which is incorrect
         as comments should not be considered as errors.

* removed DeckMetaDataList class from code.  This was duplicating the DeckMetaData storage in DeckManager
* new feature for deck selection screens.
   - player decks will now have an indication of what mana color it consists of.
   - Ai decks will show symbols once the player has played against the AI deck at least once.
   -- This is made possible with a new meta data inside each deck file.
        MANA:<string representing color switches - 0/1 >
2011-01-31 10:04:18 +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
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
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
f472c48a8a fixed avatar image issue when selecting ai decks outside of the default 100 ai decks.
installed a horizontal text scroller for the deck selection screens in normal play
TODO:-> Need to make it smoother transition.  It currently just replaces the text with the new text.
2010-11-02 02:20:44 +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
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
5eab87345a initializespatch fix for issue 459. This patch encapsulates the metadata object more and initializes the stat values. 2010-09-24 11:27:34 +00:00
omegablast2002@yahoo.com
5939cbded8 added MnGuyens further improved menu handling and extra options. 2010-09-17 06:34:12 +00:00
omegablast2002@yahoo.com
79ea200d97 Added MNGuyen's improved and alphabatized deck handling(noticeable speed increase btween menus) and almosthumane's automated pass phase option. 2010-09-08 11:44:11 +00:00
jean.chalard
5a2bae75d5 J :
* Add newlines at end of files. This is for better portability.
* Fix a direct reference to g++ in the makefile
2010-02-02 10:19:43 +00:00
wagic.the.homebrew@gmail.com
26f96c3443 Erwan
- cache system for Deck Meta Data. let's improve it as needs arise
2010-01-15 12:19:47 +00:00