Commit Graph

44 Commits

Author SHA1 Message Date
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
jean.chalard
dd054c4963 J :
* ostream printing of JGui objects.
2009-05-23 08:34:50 +00:00
wagic.the.homebrew@gmail.com
f94df3862b Erwan
- Added translation mechanism, and basic french translation as an example
2009-05-16 15:23:26 +00:00
wagic.the.homebrew
658ef1fb12 Erwan
- fixed a few bugs with the parser for subtypes
- fixed a bug for plague rats
- fixed a bug for P/T parser
- First release for the following sets: Mirrodin, Mirage, Lorwyn
2009-03-14 11:00:31 +00:00
wagic.the.homebrew
ba3b272558 Erwan
- Fixed a few font problems with alternate rendering
2009-02-05 12:48:51 +00:00
jean.chalard
2f3eaac9a5 J :
* Font unification.
2009-02-04 16:42:59 +00:00
wagic.the.homebrew
9454ac88fe Erwan
- Added CC Avatar
- Fixed a segfault bug when selling cards
- Added a few messages in the credits
- Show types of a card in "Alternate" display
- This update should get rid of all copyrighted contents
2009-02-01 06:29:29 +00:00
wagic.the.homebrew
f5693e0b6f Erwan
- Added extra rendering for "text" mode
2009-01-26 13:04:58 +00:00
jean.chalard
5466a7004c J :
* Fix a number of warnings
2009-01-18 14:13:13 +00:00
wagic.the.homebrew
0b03dc6d40 Erwan
- font adjustments
2009-01-18 13:49:02 +00:00
wagic.the.homebrew
027e1b9bba Erwan
- Updated alternate render
- Display hybrid mana cost on alternate Render
- Display big card in graveyard
- gray out alternate render when targetChooser is active
- Non-copyrighted avatars for the AI. They suck...
2009-01-17 10:16:10 +00:00
wagic.the.homebrew
1251ef0096 Erwan
- Prevent TestSuite from crashing, by not showing big cards during the test suite
- Updated font size in game, to be readable
- WARNING!!! One test (brass man) not working anymore !!! High priority
2009-01-17 01:46:11 +00:00
jean.chalard
3bb2c431c9 J :
* Split constants file to have them in a single place.
2009-01-06 13:07:28 +00:00
jean.chalard
3e9ff2b580 J :
* Change the name of debug.h into config.h and use the new RESPATH define.
2008-12-25 16:28:03 +00:00
wagic.the.homebrew
9dfc89815f Erwan
- Added Tokens (needs testing !!!)
- Added a few cards that create tokens
2008-12-16 14:20:03 +00:00
wagic.the.homebrew
b89c4522de Erwan
- display the thumbnail as a "shadow" over the text version of the card if the big picture is not available
- fixed a bug with circles of protection, although graphically it is difficult to understand what's going on when using those cards
- fixed a bug with a card in Ice age
2008-12-06 12:41:23 +00:00
wagic.the.homebrew
3721247bee Erwan
- It is now possible to have avatars associated to each Deck
- Added SFX
- Added Music files
- Possibility to choose your opponent
- Opponents' difficulty is measured according to their number of victories against a given deck
2008-11-24 09:24:47 +00:00
jean.chalard
80784ae1bb J :
* The definitive (?) answer to the signed/unsigned conversions.
2008-11-23 06:21:25 +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