Commit Graph

59 Commits

Author SHA1 Message Date
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
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
wagic.the.homebrew@gmail.com
74accec275 Erwan
- Fix issue 144 (Sound is either 0 or 100%), for PSP ONLY. The methods are now here for linux/windows, but only the music volume method will work currently, and it sets the volume globally. Patch by Yeshua with some cleanup by myself.
2009-12-12 15:10:32 +00:00
wagic.jeck
70411f025f Jeck - Trophy room added, triangle is now dedicated alt-render toggle. Hopefully I'm not forgetting anything... 2009-12-12 10:23:28 +00:00
wagic.the.homebrew@gmail.com
85adde6c61 Erwan
-shortcut to reset the GU is now start+square
2009-12-06 11:34:00 +00:00
wagic.the.homebrew@gmail.com
0d2c6cf3e5 Erwan
- Adding external rules mechanism. It is very crude for the moment, but I hope it will grow. Have a look at Rules/mtg.txt for basic usage
2009-12-06 04:47:29 +00:00
wagic.the.homebrew@gmail.com
73661a58d7 Erwan
- [PSP] pressing START + TRIANGLE on the PSP will attempt to reset the GU. If/when you get the purple screen, try to press start+triangle in the main menu and let me know if it changes something
2009-12-04 03:44:47 +00:00
wagic.the.homebrew@gmail.com
d2c4c18a7d Erwan
- update portuguese by Shinoobi
- update Italian by Icarus
- Wagic Manual Italian by Icarus
-removed test for purple screen, doesn't work :(
2009-11-29 06:45:50 +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.the.homebrew@gmail.com
7f9d22e0aa Erwan
-fixed a memory leak
- Added P02 and PTK 
- New way to create tokens in the parser, much more flexible, see the Hive in RV. Tokens can now be written as other cards, with a rarity of "T". I suggest their id to be the negative value of the card that generates them when possible. Naming convention for images is the same as before: a negative id such as -1138 will need a [id]t.jpg image (1138t.jpg). Positive ids work as "normal" pictures
2009-11-18 13:14:08 +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
f6a75a0e43 Erwan
- Fix issue 194
- Attempt at doing basic AI tests
2009-11-15 09:31:33 +00:00
wagic.the.homebrew@gmail.com
d7dae0dcd9 Erwan
- Added -O2 option in the PSP Makefile. In my tests, this highly increases the probability of getting a purple screen. Fixing this bug is THE priority :)
2009-10-29 13:12:16 +00:00
wagic.the.homebrew@gmail.com
75b0044f11 Erwan
-Load shop and backdrop in 5551. @Jeck feel free to implement the "default as 5551" for jpegs as well if you think it's worth it. I think this change is the safest for the time being, but that's mostly because I'm too lazy to touch JGE
2009-10-27 13:50:31 +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.jeck
7f7320f904 Jeck - Some basic options handling rewrites, main menu update, example alternate theme (for testing). I'm closing issues 44 and 45, as hopefully this resolves them satisfactorily.
* The alternate theme is just useful for testing themes, but please comment on the changes to the main theme.
 * Options reading and initializing separated from UI.
 * Options UI abstracted a bit, made more easily extensible.
 * With some extension, the options UI could be used as the basis for more complicated themes, if we load a file and use it to do stuff like GameStateOptions::Start()
2009-10-20 03:46:18 +00:00
wagic.the.homebrew@gmail.com
273b0672e4 Erwan
- various optimization fixes
2009-10-19 11:37:47 +00:00
wagic.jeck
8984f690b4 Jeck — Minor fix, removed unnecessary options save. 2009-10-16 01:40:33 +00:00
wagic.the.homebrew@gmail.com
6f159fb39c Erwan - cache fixes - Code review highly appreciated, please criticize my code!
- fix issue 65 (quads when no image  load slowly in shop/deck editor)
- Possibly fix issue 92, please let me know if it reproduces
- Fix issue 97 (Deck editor: weird behavior of deck display)
- Fix issue 39 - please verify
- Issue 56 can probably be closed as well
- Fix issue 86
2009-10-13 14:16:30 +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
b4d261de2f Jeck - Fix for set loading / unloading.
* This is a little dirty, as it's loading the profile multiple times. The proper way to do it would be to add any line starting with "unlocked_" to an array for deferred loading. This would also allow us to write those lines back even without the associated set being loaded. The clean solution is on my todo-list now :)
2009-09-23 20:36:10 +00:00
wagic.jeck
7510ee165f Jeck - Daily build, deck renaming, small keypad bugfix, profileFile() fix, proposed new iconspsp.png.
* Decks now support naming and renaming. Also added a "Switch decks without saving" option.
 * Removed unused static const char * menuTexts, from old 6-deck limited system
 * Keypad didn't display correctly when not given a title, and was never destructed. Fixed.
 * profileFile() default behavior was to fall back to RESPATH/player. Fixed.
 * New iconspsp.png, updated look to seem like PSP buttons, added some extra (unused) button icons.
2009-09-22 02:47:48 +00:00
wagic.jeck
8ba34dafca Jeck - WResourceManager / Cache should now be leak free. Demo mode still crashes around EnstackBlocker. 2009-09-18 01:20:46 +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
wagic.jeck
91a9387e33 Jeck - Profile loading fix, minor options menu improvements, minor cleanup. 2009-09-09 11:11:17 +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
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
e4a2c39683 Erwan
-removed unneeded file
2009-08-30 10:08:29 +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
wagic.the.homebrew@gmail.com
99aa284431 Erwan
-code cleanup
-memory leaks fixes
2009-08-27 13:32:12 +00:00
wagic.jeck
807eea7ddb Jeck - As prior, but for sounds and music as well. Use CommonRes->ssLoadMusic / CommonRes->ssLoadSample. 2009-08-27 06:31:38 +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.jeck
6728794ce9 Jeck - Quick crashfix when loading without a profiles directory, slight keypad modifications. 2009-08-27 03:17:25 +00:00
wagic.jeck
355ee7a271 Jeck - Support for user profiles, preliminary theme support, virtual keypad, options GUI update. Still a bit unorganized, but it works. 2009-08-26 20:13:09 +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
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
71cc79b949 Erwan
- Replaced the BasicAbilities Array with a map. This reduces the size of MTGCard from >500 bytes to 392. Should be cool for people who have memory issues
2009-06-25 11:09:51 +00:00
jean.chalard
2f3259fd55 J :
* Add the rolling phasebar.
* This is a preview version. It shares most of the code with the definitive
  version, but when the real code is checked in, this will be deleted.
2009-06-22 14:45:27 +00:00
jean.chalard
6f09760d08 J :
* Remove the stupid effect on cards back, at least until release
2009-05-31 05:52:49 +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
f50d7e30d4 Erwan
- Added a few "stats" to the main menu. This might slow down loading times on the PSP (needs testing). In that case I'll move it to the options, or optimize it if needed
2009-05-19 13:45:53 +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@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
33e79e234e Erwan
- Cache size is now an option
2009-04-19 06:02:29 +00:00
wagic.the.homebrew@gmail.com
e7678522ee Erwan
- fixed a few memory leaks (but Wagic still crashes on the PSP after a few games :( )
2009-04-12 12:39:44 +00:00
wagic.the.homebrew@gmail.com
6582a1972a Erwan
- Added Momir Basic mode :)
2009-04-04 12:52:36 +00:00
wagic.the.homebrew@gmail.com
3994006d7e Erwan
- fixed a few memory leaks
2009-03-29 10:33:42 +00:00
wagic.the.homebrew
e831a8e400 Erwan
- a few card updates
- back to original font for menus
2009-01-20 13:15:52 +00:00
jean.chalard
6d629b7d66 J :
* Adjust tracking for big font.
2009-01-19 06:15:12 +00:00
wagic.the.homebrew
0b03dc6d40 Erwan
- font adjustments
2009-01-18 13:49:02 +00:00