Commit Graph

171 Commits

Author SHA1 Message Date
Tobias Loose
718ceca919 Do not allow that the selection moves outside in grid view. 2013-12-08 22:43:03 +01:00
Tobias Loose
1cc65ab611 Enable rotating over multiple filters, add src code doc 2013-12-08 12:03:13 +01:00
Tobias Loose
2b9977a334 Rename methods for consistency and add source code doc
to DeckView.h
2013-12-08 10:48:15 +01:00
Tobias Loose
12c5f31562 Add a buttonMode to grid view to enable it on pointerless devices. 2013-12-08 09:11:44 +01:00
Tobias Loose
bdd0e6c042 Reset positions and filters when reopening the editor 2013-12-07 20:47:50 +01:00
Tobias Loose
5efa7e10bd Remove test debug output. Fix HUD fading. 2013-12-07 13:01:14 +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
93d1a637b6 Style guide 2013-12-05 23:22:50 +01:00
Tobias Loose
077ab10c05 Rename Button to ButtonPressed 2013-12-05 23:06:32 +01:00
Tobias Loose
1194463349 Let the deck view base class handle buttons 2013-12-05 23:06:32 +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
Tobias Loose
bbc310dec7 Remove some dead code 2013-11-20 11:43:27 +01:00
Unknown
224c94e890 Included some testsuite into qtmain and updated travis file to try to use it. 2013-10-27 23:06:29 +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
omegablast2002@yahoo.com
d4ff6d1453 spanish translation stuff 2013-03-14 22:22:18 +00:00
omegablast2002@yahoo.com
2fa626b80e adding more strings to translation 2013-01-05 00:38:12 +00:00
omegablast2002@yahoo.com
a3848e06f4 fix for that stupid bug where cards get added randomly while quickly going through your collection by pressing cards quickly.
basically if the last tap was less then .05 don't automatically register it as "addremovecard".
2012-04-07 14:13:00 +00: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
omegablast2002@yahoo.com
97bd418aac in this commit, if we move a card from the library to the library then we were intending on placing that card on top of the library.
taught ai when not to play a planeswalker, told ai to look for planeswalkers as a card type to play.
fixed a crash related to tokens and cardgui..tokens dont have models....
made a 1 line change to deckveiwer that makes it usable on touch devices and improves the overall look and feel of deckveiwer....
2012-03-13 16:20:19 +00:00
techdragon.nguyen@gmail.com
fc08b2cfa3 modified buttons for touch interfaces. The help screen has been modified to have all PSP button information removed. The layout of the buttons have been moved as has the size of the buttons. 2012-02-23 16:24:06 +00:00
rodrigodemoura@gmail.com
45b4272c5e Include the Phyrexian mana display. Include more features in modrules.xml: Now is possible to change font color, Size. Include icon tag. Is possible select position to show the icon, size and where the image is stored
<item name="icon">
 <position x="0" y="25"/>
 <iconposition x="1" y="2"/> 
 <filename>menuicons.png</filename> 
 <sizeicon>5<sizeicon>
</item>
Issue: 663
2012-02-13 15:28:55 +00:00
techdragon.nguyen@gmail.com
2eec7f9a6d fixed calculation for magnitude. cut and paste error.. 2012-02-05 03:25:59 +00:00
Xawotihs@gmail.com
8e8a0d6eeb - Removed useless filter swiping interface
- Removed pointless #ifdef IOS ... it was perfectly OK before the IOS code. Basically if you don't understand the code AND if you cannot test it, you should not modify it =(
- Readded a gard against short horizontal swipe. There were removed cause there are some gards in the iOS frontend ...
- Note that all this code use non-normalized coordinates, so something should be done in this sense in the frontends...
2012-02-04 23:25:58 +00:00
techdragon.nguyen@gmail.com
fb43b9012b sync swipe motion in deck viewer act accordingly to a swipe/pan on corresponding platform (iOS vs everything else) 2012-01-30 10:23:40 +00:00
techdragon.nguyen@gmail.com
b44f3088c2 refined button placement
added SDL_CONFIG to list of conditions in which ot enable touch buttons
2012-01-30 09:23:56 +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
85451f69ee vs 2010 update for deck editor changes as well as SDL update 2012-01-26 14:54:07 +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
b03449cbf6 Implemented directional controls on Filters so that you can now navigate the Filters menu on Touch interfaces for the Deck Editor and Shop screens. It's not the best implementation but it at least works across all platforms. swipe will now move the highlighted cursor to the correct direction.
in release builds, test suite will now be disabled
2012-01-03 17:53:51 +00:00
wagic.the.homebrew
c9fd53808f - fix compilation issue on psp
- attempt at reducing loading times on the PSP: I merged a few graphics files together, removed some unused calls from the initialization functions, and moved some other ones to have a more lazy approach. The PSP version remains fairly slow in some parts (especially loading, but also entering the shop, or starting a new game), so I will try to reduce file access as much as possible in the days to come. Not a release blocker IMO though, but I4d sure love if it were faster.
- uppercased "Track1.mp3" to be in line with the actual filename. Most likely this had been broken forever on case-sensitive OSes
- I removed costly calls from the textscroller. I believe it wasn't very useful in its previous state. Now it's only "advertising" for unlockable stuff, which I think is ok (and allows to refresh it every time the menu is loaded)
- As a counterpart, added a "% complete" progress bar in the menu, something I wanted to add a while ago.
2011-12-11 13:48:24 +00:00
wagic.the.homebrew
69a0323c86 - Added cache for the count of AI decks, to reduce file access especially on victory screen. This fixes some massive lags on the PSP when winning a game
- bumped version number to 0.17
- removed some dead code in utils.h
2011-12-07 14:34:59 +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
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
wagic.the.homebrew
33691d1f13 - Added ads support for Android
- basic "message" system between JGE and java through jni 
- Fixed pause/resume on android/sdl
2011-09-04 02:45:18 +00:00
wagic.the.homebrew
e27cf56fa2 - Support for Zip Filesystem. It is now possible to zip the entire Res folder ("store" method preferred, zip so that the root of the zip has ai, player, etc...) in one single file for read only. Write access is done in another folder (hardcoded to be User/ for now, can be updated depending on platforms, etc...
-- zipFS has several limitations...
--- in a general way, seekg doesn't work... so getting a file's size needs to be done through JFileSystem.
--- getLine on files open with zipFS doesn't work so great. Not sure if it is a normal issue because files are open in binary or not... JFileSystem therefore offers a "readIntoString" function that needs to be used instead of the usual "getline" technique. However getLine can then be used on a stream connected to the string.

-- tested on Windows and PSP, I also made sure android still works, but haven't tested zip support on Android.
-- I tried to maintain backwards compatibility, but this might break on some platforms, if I broke some platforms and you can't find a way to fix them, please contact me and we'll figure something out
-- This removes wagic::ifstream. I didn't reimplement the securities that were involved in this, apologies for that. Might be useful to reimplement such securities in JFileSystem
-- I haven't tested options/profiles in a deep way, it is possible I broke that.
2011-08-21 09:04:59 +00:00
wrenczes@gmail.com
463a64521f Switched another case of the psp icons to (explicitly) use the managed cache. 2011-07-07 08:26:01 +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
90b1058ad5 More warning cleanup (type to type conversion warnings). 2011-06-02 06:14:28 +00:00
wrenczes@gmail.com
56ab3ac5cf Minor code cleanup: removed a path to fetch thumbnails in the non-threaded code - at this point, it's trying to draw in text mode, so this shouldn't be here (it was always stepped over because of the options flag, so it was never executing anyway). 2011-04-25 05:26:46 +00:00
wrenczes@gmail.com
aaa169f86c Consolidated some loose strings into constant declarations in order to reduce allocation thrashing on temporary string constructs. I'm sure there are more, but "back_thumb", "back", and "backdrop.jpg" were the ones that showed up most in memory profiling. 2011-04-21 22:48:22 +00:00
wagic.the.homebrew
6f5919ed06 Reverting r3496 to fix failing tests 2011-04-21 15:16:22 +00:00
techdragon.nguyen@gmail.com
8bf983e2e5 Flagged numerous peices of code that have local variables that are masking either member variables or variables scoped outside the current scope.
I've marked all the ones I found with the following TODO comment:

TODO: C6246: <blah blah>

a few in particular are the ones related to "oneShot" and "_target".  These are local variables that are declared that
mask either a method parameter or a member variable.
2011-04-21 10:04:32 +00:00
wrenczes@gmail.com
7a10993114 *POSSIBLY DESTABLIZING CHANGE, PLS PING ME IF YOU SEE ISSUES*
Turned on the threaded card fetching code for win/linux.  PSP runs unthreaded.   There's an easy toggle for switching which mode the app runs in: check out WResourceManager's constructor.

To fully appreciate the difference, try going into the deck editor without these changes, and use the arrow keys to navigate around (esp. up/down, as it loads 7 cards at a time).  Then try again with these mods, you'll see the cards flicker briefly to the back card image and then load as they scroll onto the screen.
2011-04-19 07:12:05 +00:00
wagic.the.homebrew@gmail.com
e867881e16 - Fix issue 552 (Card images too big in deck editor)
- Moved big picture display a bit down ingame
- Temporarily Reinstantiated "back quad shows first" in deck editor, see my comments in http://code.google.com/p/wagic/source/detail?r=3008
-- This is only temporary, and pending the final Thread work, but I'm afraid this won't make it to 0.15. It is possible to get the previous behavior back with a simple define, in case we want it for windows.
2011-04-03 06:07:23 +00:00
techdragon.nguyen@gmail.com
1b5a379387 added empty string check when save and quiting from the deck editor.
Issue: 3052
2011-02-08 06:30:18 +00:00