43 Commits

Author SHA1 Message Date
Eduardo MG
f0cbff2f91 Added buttons to display menus, new token macros.
Newer Android devices dont have phisical buttons, so added buttons to display menus that have the same behaviour of pressing the back button.
Bug fixes in primitives.
Created macros for Eldrazi Scion and Eldrazi Spawn tokens.
2024-01-20 11:47:28 -06:00
Tobias Loose
4c627f74b6 Add easing to GuiPhaseBar, simplify math a bit. 2013-12-09 22:20:43 +01:00
techdragon.nguyen@gmail.com
2f408664ad last fix for buttons only fixed the PC/SDL mouse impl. This fixes the iOS/Android platforms. iOS/Android platforms both issue a JGE_BTN_OK keypress on single tap in which the mouse version does not. that version issues the OK keypress in sync with the mouse click. 2012-02-01 00:38:02 +00:00
techdragon.nguyen@gmail.com
c42ba32ae7 added new buttons for shop for New Cards and displaying the card list. 2012-01-30 18:02:26 +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
wagic.the.homebrew
2e3331a0c0 - Speed improvements to the filesystem (partial fix for issue 767)
- minor speed improvement in the shop (removed a locked texture loading that wasn't necessary)
2011-12-13 15:14:47 +00:00
Xawotihs
2c34a88ff0 Reuse swipe code of Android with Qt, associate "swipe left" to "other cards" in the shop. 2011-08-14 18:13:28 +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
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
e5edf779f5 Reworked a patch sent to us (http://wololo.net/forum/viewtopic.php?f=15&t=2464) that replaces the text symbols for the psp buttons with the actual icons. While at it, I found a bunch of issues with the ActionStack's render code (ie when you get the popup menu to interrupt a spell being played & the like) - the bounding rect actually went above the screen's region, clipping problems (the interrupt text was previously drawing over the interrupt effect), alignment problems when the avatar was being drawn, vertical text alignment, fudged alignment numbers for the quads that didn't make any sense, etc.
I also tweaked slightly the psp icons to center the symbols, as they were too much to the right.  (Be sure to copy the updated graphics/iconspsp.png to your Res folder.)
2011-01-13 09:56:55 +00:00
wagic.the.homebrew@gmail.com
b934f0a5ab Erwan
- reimplement r2609 with inheritance, and cleaned up the function code.
2010-11-14 01:35:26 +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
wagic.the.homebrew@gmail.com
c3c5d893d1 Erwan
- attempt at fixing some crashes in shop (related to bad usage of the cache)
- Fix typo reported with Qumulox
2010-10-03 07:36:01 +00:00
wagic.jeck
8114944db9 Jeck - Added theme substyles, which are chosen dynamically based on the player's deck composition. Also added lazy unit test for booster packs, though there should be a better way to framework this. 2010-08-28 10:51:38 +00:00
wagic.jeck
ce2f8aebea Jeck - fix to issue 347. 2010-02-17 19:29:22 +00:00
wagic.jeck
8b1a812e02 Jeck - Normal and Hard economic difficulty no longer display visible prices before the player asks about a card. This allows Wololo's clever pricing algorithm to work :) 2010-02-17 19:02:35 +00:00
wagic.jeck
ab34fc16f9 Jeck - Added custom booster packs (see miki), numerous small fixes. Once we hit feature-freeze I'll be reviewing this stuff in depth, as again there's likely a lot of room for cleaning... just wanted to get it in first :).
I cut some bits out that weren't ready for SVN, hopefully I've committed everything correctly.
2010-02-11 18:32:44 +00:00
wagic.jeck
cf03d4cc64 Jeck - fix to issue 318. 2010-02-10 15:48:38 +00:00
wagic.jeck
e59aca67b7 Jeck - Fix for issue 320, also fix for countByName. 2010-02-10 14:46:10 +00:00
wagic.jeck
9806edc6d0 Jeck - Fix for issue 316 (shop selection not cyclical). 2010-02-10 14:03:08 +00:00
wagic.jeck
3c2d57508e Jeck - Increased shop "text list" fade-in time, changed alternateRender to display "Land" rarity as well as common-mythic. 2010-02-09 17:13:49 +00:00
wagic.jeck
251f89d7b9 Jeck - Consolidated card price functions from deckviewer/shop into PriceList. Also moved price discount hash variable. (As of around r1825, price discount has been based on (mtgid + static int randomKey) % 20. randomKey updates at the end of any won game, making prices for a given fixed between visits to the shop on the same "day") 2010-02-08 20:13:48 +00:00
wagic.jeck
e96d4b9a07 Jeck - Cleaned up and reordered some menus, fixed potential heap corruption in GameStateShop. 2010-02-08 08:54:55 +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.jeck
0a863bcbad Jeck - [JGE recompile needed] Shop cleanup, Interface enhancements.
Added basic transition system that works with GameApp's phases. Currently does a fade-out between elements, which works well in some places and not-so-well in others. We'll definitely want to think about where and where not to use it... they'd work a lot better if we could spawn a thread to handle loading the next state while transitioning.

Also cleaned up the shop a bit, so it uses ReadButton() instead of GetButtonClick()-- hence the slight change to JGE. Added a tiled image for the task board, which loads conservatively (I tried 128x128, but it didn't look as good).
2010-02-01 18:27:25 +00:00
d32.wagic
002851a943 Daddy32: Tasks Mode
Gives the user the opportunity to earn some credits for performing various tasks.

Known bugs removed, tested stability-wise, not so much game-wise.
Lots of to-dos and ideas still remaining, better balance between task difficulty and their rewards needed - please comment.

Usage:
Enter shop, open menu, select 'See available tasks'.
All tasks in the list are active, until they expire ('Days left'; day passes after each duel (won, lost or quited)).
You can finish any of the tasks and get bonus. For particular task, the bonus gets a bit smaller every day (until expiration).
2009-12-13 22:12:14 +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
wagic.jeck
ffa8408a5f Jeck - The shop anti-aliasing stuff is rendered inside of shop->Render(), so that it renders on top of the cards, but under other UI elements handled by ShopItems (the price dialog, etc). Moved the light flicker inside of ShopItems instead (for now, as this is pretty damn inelegant). As far as the 5551 issue goes, I don't see how using a jpeg would do much harm, but leave the decision up to others :) 2009-11-03 20:55:04 +00:00
wagic.the.homebrew@gmail.com
9de98c3032 Erwan
- "Fix" issue 152. Please review. There is an extra cost when loading the shop...could probably be improved...the image is huge, and it's a png (so no 5551 improvement here...should we switch to a jpeg ?)
2009-11-03 09:18:52 +00:00
wagic.jeck
fb7f48f26b Jeck - Please review: this makes minor changes to a lot of files, and major changes to the WCache flatten() function.
* Removed all calls to Release(JQuad*).
* Updated flatten(). Prior flatten was buggy beyond belief.
* Done some extensive testing, but if this causes more trouble than it fixes, we'll have to revert. It's too close to release time.
2009-10-27 02:46:39 +00:00
wagic.the.homebrew@gmail.com
273b0672e4 Erwan
- various optimization fixes
2009-10-19 11:37:47 +00:00
wagic.jeck
aa90b53a87 Jeck - Please review. Shop antialiasing, multicolored card recieves gold texture.
* Moved shop text ("press square for other cards") etc, to ShopItems, so they rendered properly (all in one place, after AA)
 * The AA is really more a proof of concept than anything else. To do it properly I'd need a double-resolution copy of shop.jpg.
 * The real multicolored card has a greenish tint, and is darker. What do you think of gold.jpg? Should we tint it more that way?
2009-09-28 03:01:19 +00:00
wagic.jeck
334938840b Jeck - Lock and release alternate thumbnails in shop view. 2009-09-21 05:16:42 +00:00
wagic.the.homebrew@gmail.com
bf4262c0a0 Erwan
- New shop GUI. (don't mind the back image, it will change soon)
2009-08-22 00:46:45 +00:00
wagic.the.homebrew@gmail.com
328aa1c9f4 Erwan
- reduced price of boosters
- Sets need to be unlocked in order to be accessed from the shop
- Added a "refresh" option in the shop
2009-07-23 13:44:50 +00:00
jean.chalard
b4d040b263 J :
* Add a plasma effect on the cards back
2009-05-30 14:06:52 +00:00
wagic.the.homebrew@gmail.com
8b008a4bda Erwan
- boosters in shop 100 cards -> 80 cards
- 2 new cards in SHM
- Added Ram checking methods for the PSP
2009-04-30 12:10:09 +00:00
wagic.the.homebrew@gmail.com
9d0a10756d Erwan
- Momir AI tweaks
- More cards in shop, boosters are cheaper, each card has between 1 and 4 occurrences
2009-04-07 13:38:11 +00:00
wagic.the.homebrew
0256e64cd9 Erwan
- a few shop changes
2009-03-14 11:52:50 +00:00
jean.chalard
2f3eaac9a5 J :
* Font unification.
2009-02-04 16:42:59 +00:00
jean.chalard
c97dd1f260 J :
* Remove ^M's.
* Re-indent automatically.
* Remove whitespace at the end of lines.
2008-11-12 13:45:42 +00:00
wagic.the.homebrew
d45e3b101b 2008-11-02 09:50:16 +00:00