Commit Graph

69 Commits

Author SHA1 Message Date
wrenczes@gmail.com
2693f35506 Fixed the graphics whiteout bug I introduced when switching profiles. When Refresh() was being called on the texture, the bitmap wasn't been re-transferred back into the openGL context.
While debugging this, I noticed a separate issue:  when changing profiles, we'd actually call refresh twice.  Removed the spurious call, as reloading profiles doesn't need to concern itself with the image cache - that's already covered by the game options menu.

Also did some minor formatting / cleanup in the JGfx code for PSP - stubbed out a bunch of JLOG calls I had put in while debugging the PNG loading code.
2010-12-02 04:04:03 +00:00
wrenczes@gmail.com
65e38b0694 Another change that looks bigger than it is: changed out the global extern WResourceManager to a real singleton. This means that it's no longer being init'ed at static initialization time, and we can debug construction/destruction properly; it's also safer in a multithreaded context. 2010-12-01 08:22:17 +00:00
omegablast2002@yahoo.com
29fc58388d Added 2 new cheats, "Optimize starting hand" and "Unlock all Ai decks"
added new mana display option "No Glitter" acciddently(?) lost "both" options somehow.
the new "no glitter mana display is basically "eye candy without particle effects" on PC created 2000 mana...no FPS drop...on PSP created an EXTREMELY large amount of mana before i noticed an FPS drop of any kind, this is dramatically better then 
what was in previous rev, create 20 mana and crash.

if someone could figure out how i manage to lose the "Both" option, please explain to me why it wasnt showing up, i spent 2 hours trying to get it back.

both "optimize starting hand" and "Unlock all Ai Decks" appear in options under the option to "enable cheats"

optimize gives you decent starting hands, and Unlock all Ai decks is basically just a bypass options for the unlock deck mode varible wololo added.

tweaked abilitygranting Eff in Ai lessons to be divided by the number of cards in hand, this will mean Ai will tend to focus on using mana to cast spells instead of using them to grant abilities, until theres only 1 or less cards in hand, at this point it will go all out. there is a splash of randomness in Ai so it will still often do whatever it freaking wants lol, you should notice a proformence increase from Ai in this aspect. no more giving unblockable to a creature in 2nd main.

please note, one of the recent previous revs broke cheat mode "unlock cards" in deck editor, i filed a bug report. its a probelm i was not able to fix myself so there is no fix included in this rev....i came across the bug while testing cheat mode stuff.
2010-11-28 20:55:04 +00:00
wagic.the.homebrew@gmail.com
52fce24bf8 Erwan
- Added AI Decks unlock system. Please update your graphics folder, and crossing fingers that Ilya B. is still around as I don't have the correct fonts.
2010-11-28 04:15:58 +00:00
techdragon.nguyen@gmail.com
acd7bb1aa4 reformatting code according to guidelines defined at
http://wololo.net/forum/viewtopic.php?f=35&t=2235&start=10
2010-11-16 00:55:16 +00:00
wagic.the.homebrew@gmail.com
5d907f5abe Erwan
- Added a possibility to put a file "Res.txt" instead of the folder "Res". The file Res.txt is a simple 1 line text file, telling where to find the Res folder, terminated by "/". For example: "../../wagic_res".
This addresses issue 428 . This could also help us in the future, to develop mods.
2010-11-07 09:26:29 +00:00
wrenczes@gmail.com
e74c0fcc7c Moved a few more common shared includes into the precompiled header. 2010-10-24 06:55:40 +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
wrenczes@gmail.com
e45735267b More work on cleaning up debug trace logs. Added getDisplayName() overrides to the Ability & NextGamePhase interrupts so that there's now more contextual info in the output log. You'll now see what game phase is being added/resolved on the stack, and instead of a generic 'StackAbility' entry, it'll tell you what source it's coming from.
Also deleted a few debug output traces that were truly uninformative.
2010-10-07 08:13:22 +00:00
wagic.the.homebrew@gmail.com
508040b3a7 Erwan
- fix for issue 467 (simultaneous triggers + "trigger" keyword)
- MootPoint's patch for some string parsing
- some random int/float compilation warning fixes
2010-10-01 16:33:07 +00:00
omegablast2002@yahoo.com
99da45f400 Added support for "buyback" and "flashback" with optional auto=buyback/flashback line support. 2010-09-10 18:00:37 +00:00
omegablast2002@yahoo.com
79ea200d97 Added MNGuyen's improved and alphabatized deck handling(noticeable speed increase btween menus) and almosthumane's automated pass phase option. 2010-09-08 11:44:11 +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.the.homebrew@gmail.com
c1073c83e6 Erwan
- Removed some none working cards from mtg.txt
- Added the "unofficial" grade 
- Added a system to give a grade to an entire file, avoids reading the file any further if not necessary
- Added Zeth's addons to the primitives folder, with a grade of "Unofficial"
2010-07-25 06:29:33 +00:00
wagic.jeck
e9b6860923 Jeck - reverted fix for invalid issue 359. 2010-02-26 00:46:03 +00:00
wagic.jeck
5e0be442b0 Jeck - Removed "Reverse Triggers" option, as per issue 359. 2010-02-25 15:22:19 +00:00
jean.chalard
abd92ffcbf J :
* This finalizes the functionality for key bindings.
* Key bindings are saved in the user's configuration file and read
  back the next time.
* Still got to do : display, instead of a number, an icon on PSP and a
  string on windows (linux/mac already done).
2010-02-18 20:36:31 +00:00
jean.chalard
16ca1a929f J :
* Some interface for key bindings
2010-02-15 14:32:56 +00:00
jean.chalard
ac29f9715c J :
* Seems Visual doesn't understand #elsif... lol
2010-02-14 14:25:23 +00:00
jean.chalard
56ce4a14ae J :
* Create the subsystem for keybindings.
2010-02-14 13:21:12 +00:00
wagic.jeck
7fd2956399 Jeck - Added option to disable screen transitions. 2010-02-10 02:38:41 +00:00
wagic.jeck
f962297d6b Jeck - Repair faulty merge from r1845. 2010-02-09 19:37:25 +00:00
wagic.jeck
5444c4e507 Jeck - Changed filter pricing scheme- filter tax is now inversely proportional to the amount of results. Added preliminary "economic difficulty" option. Note that it requires difficulty modes to be unlocked (at least to appear in the gui). Should we make it available from the start? 2010-02-09 16:23:29 +00:00
wagic.jeck
46215a2bc0 Jeck - Updated the WGui/OptionItem classes to all use ReadButton. Also updated daily build. 2010-02-01 20:58:52 +00:00
wagic.the.homebrew@gmail.com
dd01706527 Erwan
- introducing "grade" system for cards
- Fixed a few typos in _cards.dat
2010-01-30 06:33:40 +00:00
jean.chalard
ccdda4e7a8 J :
* Fix some coding style misses.
2010-01-30 02:40:48 +00:00
wagic.jeck
b7b48a0ab3 Jeck - "Fix" to issue 247 (see issue for notes), added additional award ("Collection valued over 10,000 credits"), minor enhancement to trophy room UI (floating "O - Details" notification).
The new award will need some art before we ship, but it won't take too much work to add that :)
2009-12-15 18:03:42 +00:00
wagic.jeck
87d8922207 Jeck - quick fix to r1496. 2009-12-13 15:03:56 +00:00
wagic.jeck
b766dd6e4a Jeck - Fixes for how options handle first boot, should resolve trophy room issue (no unlocked set on first boot). 2009-12-13 15:00:53 +00:00
wagic.jeck
608255e251 Jeck - Fix signed/unsigned in AllAbilities (please review), bug fixes for trophy room (new status now saves). 2009-12-13 14:36:58 +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.jeck
a96b3b50aa Jeck - Quick fix to r1305. Because card text is only loaded on reboot, language can not be a per profile option. Switching profiles would result in partially translated cards. 2009-11-19 09:58:12 +00:00
wagic.jeck
e27fbac7be Jeck - Language is now a per-profile option settable in the options menu. Also, game no longer crashes when no language files are present. 2009-11-19 03:13:55 +00:00
wagic.jeck
0085c9b548 Jeck - Quick fix to issue 198, options loading. Unknown options are now preserved: this should prevent any future options lossage... assuming the file loads properly. 2009-11-19 01:58:18 +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
8390a94440 Erwan
- Language is now an option at startup
- "text" line translation for cards made easier, check Res/lang/xx_cards.txt
- TODO: test on PSP/Linux, performance issues ? Allow possibility to change language in options menu
2009-11-13 16:10:06 +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.jeck
63ddbd52ad Jeck - Hopefully fixes issue 114.
* Options before the desired optionID were not using the correct option class.
 * Enums were expected to be lower-case.
2009-10-20 16:54:53 +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
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.jeck
d5556d0a43 Jeck - Fix issue 96. 2009-10-12 23:46:30 +00:00
wagic.the.homebrew@gmail.com
620ea034b8 Erwan
-Issue 26: added an option for Mana Display. This needs a bit testing, but it should also lower the priority of "manapool slowness" as this mode probably fixes performance issue as well.
-I can't seem to be able to "save" some options (hand position, mana display) ion the windows version, does this change break something ?
2009-10-04 06:01:00 +00:00
wagic.jeck
24611fedd3 Jeck - Fix for issue 53, r908. optionNames && Options::enum didn't match. 2009-09-25 05:17:44 +00:00
wagic.jeck
2020dce4fd Jeck - unsigned/signed fix, options fixes
* Abstracted out option calls to "f3" behind Constants::OPTION_FONT
 * Added option to disable card image loading.
2009-09-24 23:26:32 +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
db8247ddd7 Jeck - Bugfix: repaired set unlocking.
* Checks for unlocked sets /after/ they've finished loading.
2009-09-23 20:03:19 +00:00
jean.chalard
5461785e9f J :
* Put back a change that was inadvertently reverted.
2009-09-23 15:15:39 +00:00
wagic.jeck
e577f3e378 Jeck - Resolved issue 44 and issue 45.
* Options can now use specialized loading functions. OptionEnum should work now.
 * Options are now stored in memory as a map<integer,GameOption>.
2009-09-23 00:24:43 +00:00
jean.chalard
f6aba5c5cb J :
* Hand option.
2009-09-22 07:39:24 +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