Commit Graph

69 Commits

Author SHA1 Message Date
wagic.the.homebrew@gmail.com
22a35d2265 Erwan
- Added remove/add counters as a cost, patch by Salmelo, thanks man!. See primitives/mtg.txt -> Thallid to see how it works
- added test for i286 by salmelo
- added basic display for counters (this needs improvement) by salmelo
2010-03-22 04:26:42 +00:00
wagic.jeck
afffd4509f Jeck - fixed issue 354, cleaned up mixed boosters, fixed a few issues with pack loading (slot pools weren't working), fixed TSP boosters to use 'S' rarity, removed some unused code. 2010-02-19 20:10:30 +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
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
568f482b5c Jeck - debug output for r1796. 2010-02-03 02:03:32 +00:00
wagic.jeck
b3da3f1843 Jeck - Fix a crash bug. 2010-02-02 19:39:30 +00:00
jean.chalard
0a083f4385 J :
* Fixes for compilation on 64-bit architectures :
  string position-returning functions return size_t, not uint.
  Fix that.
* Fixes warnings with new gcc about non-fixed string AND no arguments.

NOTE : 64-bit architectures still do not compile. There are 2 different places
where printf is used with a specifier that is not large enough on 64-bit because
size_t is now a ulong and not a uint. The solution on GNU systems is the %zu
specifier, but as I'm not sure it is supported on windows I don't want to
introduce a huge hard-to-notice bug, so I'll do it at a time when I got a
windowser to back me up.
2010-01-25 09:58:30 +00:00
wagic.the.homebrew@gmail.com
d22b7b5e37 Erwan
-some fixes for HQ cards support
2010-01-23 03:35:43 +00:00
wagic.the.homebrew@gmail.com
bd6c1a2407 Erwan
- fix compilation issues introduced in r1727
2010-01-18 12:43:30 +00:00
wagic.the.homebrew@gmail.com
05a72de5bc Erwan
- Card Primitives system. Check Royal Assassin in RV, 10E, M10
- Please review, is sets/primitives a good directory? Should we rename MTGCard into "CardPrint"? 
- Unfortunately for now it is not possible to "override" a Primitive. A card that links to a primitive but also defines new "values" will create its own data and ignore the data in the "linked" primitive for the time being. I hope to solve that at some point...
2009-12-27 12:14:36 +00:00
jean.chalard
82ac1add24 J :
* Fix a bug where a char* would be passed instead of a String to _()
2009-12-17 03:12:35 +00:00
jean.chalard
9cfa274d6f J :
* Fix a bug where the little card names would be displayed
  untranslated.
* This addresses issue 255.
2009-12-16 15:41:27 +00:00
wagic.jeck
37ad16d90e Jeck - Basic set metadata support. Also a minor improvement to WGuiImage.
* Metadata is currently only used in exactly one place: the set's "Pretty Name" is displayed when the set is first unlocked. 
* WGuiImage now has a function to set scaling.
2009-11-18 09:27:24 +00:00
wagic.the.homebrew@gmail.com
aa2121e4fa Erwan
- Fix issue 156 (artifact colors)
2009-11-14 13:15:22 +00:00
Psyyringe
500c1fc1a2 Psyringe - major update/rewrite for the German translation. Added a lot of missing strings, removed some obsolete ones, corrected some spelling / grammar / translation mistakes, addressed the player consistently with the informal "Du" (previously there was a mix of "Du" and the more formal "Sie"), added the cards from M10, PLC, and ZEN along with their German names, repaired a wagonload of lowercase umlauts in the existing card names (please use case sensitive fuctions when replacing umlauts), and provided translations for all 251 types, subtypes, and supertypes in the game. Also, totally restructured the file so that it now follows the structire of the in-game menus. I think the file is in good shape now and might be useful as a base for other translation efforts. I can't guarantee that I caught every single string, but I'm pretty sure that this is now the most complete translation available.
Please note that I don't plan to update this file for future Wagic versions, so if anybody wants to take over, please do. :)

Some files were updated in the process:

- CardGui.cpp - exposed the card rarity info on the alternate render cards to the translation engine. Also switched the color of said info to white on green and blue cards, imho they are much easier to read now.

- GameStateDeckViewer.cpp - exposed the term "Collection" (shown under the scrollbar) to the translation engine.

- GuiPhaseBar.cpp - exposed the strings denoting "your turn", "opponent's turn", "you play", "opponent plays", to the translation engine.

- SimplePad.cpp - exposed the special keys ("Spacebar", "Confirm" etc.) to the translation engine. Had to increase the keypad width to make room for "Abbrechen" (Cancel). I couldn't translate it differently because there's also a *spell* called cancel, and to have a different translation in SimplePad, I would have had to change the official German name of the Cancel spell, which wasn't an option.

- MTGAbility.cpp - exposed the words from which the text of mana-producing abilities is constructed to the translation engine. Please review this one and suggest a better solution - the one I chose is somewhat awkward. The translation works, but when the whole translated sentence is constructed and gets returned, the calling procedure tries to translate it again (all other ability descriptions work this way, translation takes place *after* the string has been returned). However, for mana producing abilities this doesn't work, since the costructed string can take an infinite number of diffeent forms, depending on the mana produced, and we can't translate that. Hence I chose to translate the individual words during construction, with the described side effect that the engine now tries to translate them again later in the process (and the sentence ends up in missing.txt).

- Also, cheat mode menu items now aren't denoted by the ugly "(cheat)" appended to them, instead they are enclosed by asterisks. Uses less space.
2009-11-03 22:25:16 +00:00
wagic.the.homebrew@gmail.com
3af15e9901 Erwan - 2nd part for issue 119 (bad commit) 2009-10-21 13:54:41 +00:00
wagic.the.homebrew@gmail.com
9d55a43ef0 Erwan
- fix for issue 108 (mana icon disappears)
- potential fix for issue 110 (victory bonus texts). Need to check
- Fix for issue 100. A better solution would be to "stretch" the cards in hand the way it is done for the rest of the game, but this will do for now as it is a border case
- Fix for issue 55. We'll remove 2 players mode for now, and put it back when/if we get network play
2009-10-19 13:48:09 +00:00
wagic.the.homebrew@gmail.com
ad1492b888 Erwan
-some small performance enhancements
2009-10-14 14:35:26 +00:00
wagic.jeck
c9b22709ac Jeck - Alternate card renders now display X costs. 2009-10-13 17:01:52 +00:00
wagic.the.homebrew@gmail.com
d77960ede9 Erwan
-fix a display bug (shadow over non targettable cards) intriduced in revision 1007
2009-09-30 15:12:07 +00:00
wagic.the.homebrew@gmail.com
25ab86ab88 Erwan
- fix issue 57 - needs verification when one of the quads is not here /both -  target is player/card - ability/spell
2009-09-30 15:02:57 +00:00
wagic.the.homebrew@gmail.com
08bf8781cc Erwan
- fix issue 69 (Shadow.png load issue) - I put it back to a black 16x16 image. If you need more alpha, use the facilities provided by JGE rather than touching the file, thanks ;)
2009-09-29 14:07:14 +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
ec7b257531 Jeck - Minor change to alternateRender, please review.
* Displays card set and rarity where artist info would go on a real card. This makes the shop a little more user friendly, and also helps prevent "Card X, possibly from MRQ" confusion.
* Land.jpg contrast in lower left corner modified to work better with white text in that space. I might also modify the green card a bit if others feel it's necessary.
2009-09-27 02:34:35 +00:00
wagic.the.homebrew@gmail.com
48c57a4fed Erwan
- fix issue 36 (Life points hidden by big card)
2009-09-26 11:08:20 +00:00
wagic.the.homebrew@gmail.com
48dccada3b Erwan
- fix issue 52 (valid target notification problem) and issue 21 (duplicate)
- fix issue 28 (P/T Position)
- put back shadow for currently selected Card
- Armadillo cloak test is failing, I assume this is related to the Trample fix earlier, and I'll try to fix the test later on
2009-09-24 13:54:03 +00:00
wagic.the.homebrew@gmail.com
7bc8bba6f1 Erwan
- fix issue 20 (triangle button usage inplay)
- close issue 27 (gold effect on the gold bar). Please feel free to change the gold glow if you come up with something better, but I consider this perfectly releasable now
- code cleanup
2009-09-24 12:32:08 +00:00
wagic.jeck
d55fc91112 Jeck - [Requires JGE rebuild] Extensive cache improvements.
* Numerous cache fixes, reduced filesystem access.
 * Cache fails very gracefully. 
 * Cache is now a templated class, with individual caches per data-type.
 * Much easier to extend.
 * Extensively debugged. Try compiling with -DDEBUG_CACHE.
 * Caches limits can be set on a per-item basis.
 * hgeParticleSystemInfo are now cached, mana particles now fall back to defaults.
 * Samples are not cached, but track filesystem misses using the cache backbone. 
 * Avatars are cached. Default baka avatar is now baka.jpg, to prevent collision with player.

A note on the retrieval types: 
  RETRIEVE_MANAGE puts a resource into a seperate, managed resource list.
    Managed resources are guarenteed valid for the lifetime of the program. 
    Retrieving a managed quad promotes the associated texture to managed. Don't do that by mistake.
    Calls to Resources.Refresh() will attempt to reload managed resources in place.

  RETRIVE_LOCK (and by extension, RETRIEVE_VRAM), returns a resource after locking it.
    A resource may have many locks, and remains in cache until they are all released. 
    If the resource is managed, it returns it unmodified.

A note on quads:
Unlike all other RetrieveWhatever() functions, the default behavior for RetrieveQuad is RETRIEVE_LOCK. Worse, Release(JQuad*) is slow, and will /always/ release one lock from the associated texture.   

There's a long and complicated explanation for this, involving support for live relinking of textures to existing quads, but basically what it means is that we only use RetrieveQuad for quads we intend to store and later Release(). If a temporary quad is needed, the preferred method is to use NEW JQuad* and SAFE_DELETE with RetrieveTexture(). RetrieveTempQuad is also provided, but is only guaranteed until the next call to the cache.

Note that RetrieveCard has none of these problems.
2009-09-14 08:28:49 +00:00
jean.chalard
34d973c60d J :
* Create selection zones to remember the last card the cursor was on.
2009-09-12 12:57:50 +00:00
wagic.jeck
f9dbfcf025 Jeck - Alternate card rendering for land and artifacts, minor graphical tweaking. 2009-09-06 03:05:01 +00:00
jean.chalard
b6781e82f1 J :
* Add the Trash facility and use it for CardViews.
* Fix a graphical bug with card shadows.
* Fix a graphical bug with limitors.
* Enhance the graphical appearance of cards going to graveyard.
2009-09-05 11:44:34 +00:00
jean.chalard
c8af1836a0 J :
* Fix a bug where some event chains could result in reading from a
  freed memory space.
2009-09-04 17:21:34 +00:00
wagic.jeck
8ea9222122 Jeck - Initialize player avatar to NULL, cleanup some minor debug leftovers. Still eventually crashes with corrupted MTGCardInstance reference. 2009-09-03 20:10:59 +00:00
wagic.jeck
8340fdbd5b Jeck - It wasn't emptying the cache properly, so this is a step in the right direction. I'll keep looking for more issues, though. 2009-09-03 18:21:57 +00:00
wagic.the.homebrew@gmail.com
83d573f11e Erwan
-prevent a segfault (not fixing the root cause)
2009-09-03 12:17:28 +00:00
wagic.jeck
f220d2e9b9 Jeck - Cache and resource manager merged, streamlined.
This is pretty major, so there'll probably be something wrong with it... even though I did spend a few hours looking.
NOTES:
 * If you've Retrieved it, don't delete it--- Use resources.Release(Whatever). 
    Textures automatically release subordinate quads.
 * Most of the time, use resources.RetrieveQuad to grab a quad. Should handle everything for you.
    RetrieveQuad will load the required texture, if needed.
    Only managed resources have a resource name ("back", "simon", etc). 
    Managed resources can be retrieved with GetTexture/GetQuad/GetWhatever.
    Non managed quads lookup by position/dimensions, defaulting to the whole texture.
 * Use resources.RetrieveTexture only when you need to do something special to it. 
    Calling retrieve texture with RETRIEVE_MANAGE will permanently add a texture to the manager
    RETRIEVE_LOCK and RETRIEVE_VRAM will lock a texture. It will not leave the cache until
    Release(JTexture*) is called, or as a last resort during cache overflow.
 * Try to only store (as a class member) pointers to textures retrieved with RETRIEVE_MANAGE. 
    All others may become invalid, although locked textures do have a high degree of stability. It's
    pretty safe to store a locked texture if you're not going to load much between uses.

There's a lot going on here, so I might have missed something... but it runs through the test suite alright.

TODO: 
 * When called without any arguments, RetrieveQuad sometimes leaves a thin border around the image. 
    This can be bypassed by specifying a quad one or two pixels less than the image size. Why?
 * I've had a crash while runing the Demo mode, something to do with receiveEventMinus? 
    This hasn't exactly reproduced on a clean SVN copy, (being a hang, rather than a crash) so 
    I've probably done something to worsen the problem somehow? I'll look into it tomorrow.
 * Clean up lock/unlock system, memory usage. Streamline interface, consider phasing out calls using GetWhatever() format.
2009-09-03 09:28:16 +00:00
jean.chalard
7214248494 J :
* Some more tweaking for combat.
* This still doesn't work, but it's closer.
2009-09-03 02:16:53 +00:00
jean.chalard
336412f006 J :
* Fix PSP compilation errors
* This does not magically make it work
2009-08-31 16:55:03 +00:00
wagic.the.homebrew@gmail.com
0454fb20ec Erwan
- fixed textures cache bug
- fixed one card in TMP
2009-08-31 12:22:43 +00:00
wagic.the.homebrew@gmail.com
794eec8bb8 Erwan
-code cleanup
-fix one card in TSP
2009-08-31 10:17:28 +00:00
wagic.the.homebrew@gmail.com
89419f90a7 Erwan
-moved card backs to Cache instead of ResourceManager
2009-08-30 08:11:38 +00:00
jean.chalard
2ff279fad8 J :
* Order blocker interface.
2009-08-28 13:57:12 +00:00
wagic.the.homebrew@gmail.com
890c893c94 Erwan
-a few warning fixes
2009-08-27 13:11:29 +00:00
wagic.jeck
5e14efed3c Jeck - CommonRes transparently finds themed versions of files. Use JRenderer::LoadTexture for unthemed files, and CommonRes::LoadTexture for themed files. Res/graphics/back.jpg renamed to Res/graphics/backdrop.jpg due to collision with sets/back.jpg. 2009-08-27 05:58:26 +00:00
wagic.the.homebrew@gmail.com
a59fb35d78 -AlternatRender calls fixes
-Replaced "borderline" default cards design with something more generic
2009-08-22 12:12:43 +00:00
wagic.the.homebrew@gmail.com
34126f2393 Erwan
- a few graphical fixes in shop and DeckViewer
2009-08-22 10:42:15 +00:00
jean.chalard
f4ee432765 J :
* Define floats in the .cpp instead of the .h (visual says I should, that's why)
2009-08-22 06:16:04 +00:00
jean.chalard
3349f974f1 J :
* New interface.
* This breaks a lot of things. It is not feature-equivalent. It
  probably doesn't compile under windows and doesn't work on PSP.
* Damage is not resolved any more. This will have to be fixed.
* Blockers can't be ordered any more. This will have to be fixed.
* A lot of new art is included.
2009-08-22 05:59:43 +00:00
wagic.the.homebrew@gmail.com
94e199d92a Erwan
- some cleanup (gcc warnings)
2009-07-26 07:27:27 +00:00
wagic.the.homebrew@gmail.com
d52f06d98d Erwan
- Magic 2010 - blockers ordering
- Fixed a memory leak introduced in a previous revision (foreach)
2009-07-04 04:15:05 +00:00