Commit Graph

29 Commits

Author SHA1 Message Date
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
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
da9a82cff4 Erwan
- removed some unused code. Please review!
- Added protection from() auto keyword. It is still possible to use protection from [color] in abilities, but when it is not possible, please use protection from([target]) in auto=
2009-11-21 07:26:26 +00:00
d32.wagic
46e21fb94d Daddy32 - Fix for issue 196. 2009-11-18 20:37:42 +00:00
d32.wagic
6de1856698 Added mana production statistics to the deck viewer.
Two new screens (5,6):
5.) Counts of manasources per color and type.
- Basic lands
- Non basic lands
- Other source
6.) Focusing on mana produced by lands only, displaying amounts of each mana potentialy produced graphically, along with percentages - to be easily compared with following screen (detailing mana cost per colors)
2009-11-11 21:19:11 +00:00
d32.wagic
af343a4a7f Some additions to the deck statistics.
- Displaying title for each page
- In screen showing games against AI, displaying actual number of games won/played in addition to percentage
- Added two new screens (3,4) - mana cost/color breakdown for creatures (3) and non-creature spells (4)

More to come...
2009-11-07 20:04:09 +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
Psyyringe
779921a53f Psyringe - This revision adds "cheat mode", as suggested and pre-reviewed here:
http://wololo.net/forum/viewtopic.php?f=15&t=730

Although the feature is named "cheat mode", its main purpose is to provide a toolbox for content creators. Currently this means to help AI deck creators, but the cheat mode is easily extensible.

Features:
- To enable cheat mode, create a new profile with the super secret cheat name (shouldn't be hard to find - or just mail me if you don't want to look). Then, leave and re-enter the Options menu. You can now enable cheat mode on the first tab. Note: The secret profile name is *not* my original suggestion from the forum, I went with Jeck's alternative suggestion so that he won't have to cringe over bad puns everytime he's using it. ;)

- Complete collection: In cheat mode, there's a new option in the deck viewer, which makes sure that you have at least 4 of any card available.

- Deck integrity: When in cheat mode, and you load a deck with cards that are not present in your collection, then these cards won't be stripped from your deck any more. Instead, they are added to your collection.

- Money cheat: In cheat mode, when you click on an item in the shop, you get the option to steal 1,000 credits from the shopkeeper.

Please review my code - I just started with C++, I may make very obvious mistakes or use inelegant style. The sooner you point this out, the sooner I'll improve.

thanks to wololo and jeck for comments and suggestions.

Jeck: Do the setVisible and setHidden methods currently work? I tried to use them to hide a menu item, but they all seem to lead to empty methods - Perhaps placeholders for a not yet implemented functionality?
2009-11-02 04:27:14 +00:00
wagic.the.homebrew@gmail.com
5b92639cca Erwan
- Translation updates
- JGE: DrawString now allows std::string objects
2009-11-01 02:52:41 +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
08a9f00100 Jeck - Fixed issue 106. 2009-10-15 23:43:19 +00:00
wagic.jeck
e23fac82e0 Jeck - Resolved issue 101, fixed "Cancel" after "Switch decks without saving". 2009-10-14 20:58:38 +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
924574b0a1 Erwan
- Some cleanup in JGE
2009-10-02 14:33:05 +00:00
wagic.jeck
98223b66f0 Jeck - Fixed issue 93, duplicate issue 91.
* Deck editor menus no longer fall through into each other.
2009-09-30 22:24:21 +00:00
wagic.jeck
247fb8d3ef Jeck - minor fix to r995, misplaced brackets prevented alternateRender when card images disabled. 2009-09-30 22:06:36 +00:00
wagic.the.homebrew@gmail.com
5b9fe719ae Erwan
-Adding Daddy32's statistics code
2009-09-28 14:28:39 +00:00
wagic.jeck
28cb659a2e Jeck - Restored cache resets between game states, fixed minor issue with deck editor displaying the wrong first 7 cards when starting to edit a deck. 2009-09-27 00:50:30 +00:00
wagic.jeck
6557c64bc0 Jeck - Deck editor no longer asks for a name for new decks. Use the rename option instead. 2009-09-24 00:36:31 +00:00
wagic.jeck
efc47e84d5 Jeck - Canceling the name for a new deck drops the player back to deck selection. 2009-09-23 19:46:08 +00:00
wagic.jeck
e2e92f58af Jeck - Keypad and deck editor fixes.
* Fixed a call to profileFile() in deck editor that was using the wrong form.
 * Spacebar works, keypad now does smart capitalization (switches to lower case on second letter)
2009-09-23 09:45:58 +00:00
wagic.the.homebrew@gmail.com
311ec5fbad Erwan
- Fixed issue 5 (Sell menu default option)
- Verified issue 2 (Moat does not work) -> can't reproduce
-Fixe Magus of Moat (FUT)
2009-09-23 06:00:23 +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
0d3686e65a Jeck - Cache fix, booster duplicate fix.
* Restored OptionItem saving fix.
 * Booster duplicate replacement was picking random cards from the wrong set. My fault, but I've fixed it :)
 * The problem with cache had nothing to do with memory fragmentation, but I've switched to an array rather than map<> just in case. The actual issue was that in GameStateDeckViewer, I'd given the cache unlimited space, thinking that AttemptNew would recover from any bad_allocs. Unfortunately, the image loading routines and similar stuff called by various implementations of WResource::Attempt() could fail halfway through, leaking memory. 

The temporary solution is to set a proper limit (8000000 px, more or less) and (in case we still run out of memory) test to make certain CACHE_SPACE_RESERVED can be malloc'd/free'd. The proper solution would be to keep byte-perfect records of memory used (right now we're kinda fuzzy-- we track pixels per image and bytes per sound, but not the space for jquads or other incidentals) instead of testing a malloc, and potentially cleaning up all calls inside of Attempt() so they fail without leaks. That's what I'm working on now.

Still, it's nice to have identified the problem. This version of the cache should be fully functional, it's just a bit inelegant.
2009-09-19 21:11:35 +00:00
wagic.jeck
0a38623746 Jeck - Minor fixes to cache: Splash.jpg releases properly, pspicons no longer use the same quad. 2009-09-14 08:46:18 +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
9d203619aa Jeck - Extremely minor speedup for cache access in GameStateDeckViewer, minor fix to WResourceManager::cleanup(). 2009-09-11 08:17:05 +00:00
wagic.the.homebrew@gmail.com
c0be024093 Erwan
- Put back delayed loading functionality for the Deck editor
2009-09-09 13:51:29 +00:00
wagic.jeck
c76d8a3976 Jeck - Separated GameStateDeckViewer.h code into GameStateDeckViewer.cpp. 2009-09-08 07:53:54 +00:00