Commit Graph

46 Commits

Author SHA1 Message Date
wrenczes@gmail.com
fc0a59a14e Moved GameOptions.h into the precompiled header. Shaves almost 20 seconds off my build times. 2011-04-20 07:50:00 +00:00
wagic.jeck
8c18d155b8 Jeck - Fix for issue 580. StyleManager initialization was causing an infinite loop. Also started documentation for OptionItem. 2011-02-01 19:11:43 +00:00
wrenczes@gmail.com
76cba56a1c Resuming on my threading support work with the card caching mechanism. This change unfortunately touches quite a few files, but I needed to get it out of the way before things got out of hand: one significant hurdle is the assumed lifetime of a JQuad pointer. In a single threaded model, the life time of the pointer is clear: you fetch it into the cache, the cache makes room, you use the pointer immediately. In a multithreaded context however, it's unsafe, as the drawing thread can request a few JQuads, and the cache operating on a separate thread can potentially bounce a JQuad out of the cache before the draw routine is done using it, which ends up in an access violation when you attempt to draw using an invalidated quad pointer. To prevent this, the bulk of this change swaps out the use of naked JQuad* pointers in the code with a JQuadPtr, which is basically a typedef to a boost shared_ptr<JQuad>.
This btw points out another circular dependancy between the texture and the JQuad - a texture owns a bunch of JQuads, yet the renderer uses JQuads and always assumes that the texture is valid.  We're going to need to add more defensiveness to JGE to protect against this.

Other changes in this check-in:  WResourceManager doesn't derive from JResourceManager anymore.  It actually didn't require anything from the base, so I killed the dependency.  Also cleaned up the notion of a WTrackedQuad in the WCachedResource - it didn't need a separate class, just a better container.

I've build this & tested against PSP, win, linux, QT (linux).  I haven't tried against iOS and QT Win, or Maemo.  If these other platforms are broken, I apologize in advance! - I'm hoping it should be fairly simple to put them back into play.
2011-02-01 10:37:21 +00:00
techdragon.nguyen@gmail.com
e53c16f700 No code change just reformatting of header files.
finishing up my reformatting of the source from November/December following the guidelines that were posted.
some extra things I added:
   * Any empty virtual declarations were kept to one line.  
   * Enums were split up into separate lines to promote uniformity across all headers. ( each header file had a different style for enums)
2011-01-21 18:01:14 +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
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
jean.chalard
db96cb5142 J :
* Partial fix for issue 380.
* This remove a bug where a variable was not initialized in profiles.
* The impact on this could have ranged all the way to a full trashing
  of the user configuration files (though it requires some bad luck)
2010-05-05 06:27:52 +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
c87a98eb14 J :
* Grab the keyboard and display the grabbed key.
* Include a tentative interface for the initial message. It's ugly.
2010-02-18 08:03:22 +00:00
jean.chalard
e7d72b7722 J :
* The key bindings now display (semi-)correctly.
  - Here, "semi-" means the local keys display as a string under X and
    a number everywhere else. The number is all but helpful and will
    have to be replaced before it is usable, but at the moment, the
    code is stable afaik.
2010-02-15 17:34:30 +00:00
jean.chalard
56ce4a14ae J :
* Create the subsystem for keybindings.
2010-02-14 13:21:12 +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
46215a2bc0 Jeck - Updated the WGui/OptionItem classes to all use ReadButton. Also updated daily build. 2010-02-01 20:58:52 +00:00
wagic.jeck
cf2dfec105 Jeck - Changes to WGui, potential fix to issue 258 (please verify). 2010-01-31 21:38:07 +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
wagic.jeck
bd0e139e6d Jeck - Minor update to trophy room, moved metadata into cards.dat
* updated daily build
* Card spoiler now sorts by collector's number.
* Metadata looks for "[m" (for speed reasons), I've been using "[meta]" in files. No sets currently use metadata.
2010-01-05 23:32:31 +00:00
jean.chalard
1cc89e63c6 J :
* Fix a compilation problem on PSP.
2009-12-17 17:44:27 +00:00
jean.chalard
54791762b1 J :
* Fix a bug where valid directories would be ignored and invalid ones
  would be accepted for profiles and themes.
* Fix a compilation fault when compiling in debug mode.
2009-12-17 17:29:24 +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
d873b573f8 Jeck - Minor improvement to delayed loading in card spoiler. 2009-12-13 16:34:35 +00:00
wagic.jeck
61c9772a66 Jeck - Included missing file for r1460, updated trophy room. Trophies now render from bottom left, so any size png can be used. 2009-12-12 11:24:23 +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
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
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
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.jeck
e10130b718 Jeck - Whoops. Forgot to make invisible cheats unselectable. Fixed. 2009-11-02 06:25:03 +00:00
wagic.jeck
6946544a2a Jeck - Minor language support fiddling, gui decorator for cheat-profile only options. 2009-11-02 06:15:37 +00:00
wagic.jeck
c87343a7f2 Jeck - Simplistic solution to issue 131. Reads only the first line of themeinfo.txt and uses the first 16 characters as the author name, if present. The rest of the file is completely ignored. Not exactly the most elegant solution, but I don't think we really need much metadata beyond who the theme's author is. My suggestion would be to let the authors use the rest of the file as a "Readme.txt" with whatever details they want to put in it. (Art credits, etc.).
The next version of Wagic will use XML-like themes, so I think it's alright to use such a non-extensible format.
2009-10-23 07:16:58 +00:00
wagic.jeck
6d62c013df Jeck - Fix for two obscure edge case bugs in the options menu.
* Confirmable options used to only check for confirmation when selecting another option. They now autoconfirm when saving & exiting. This bug could possibly result in loading the wrong theme. Fixed.
 * Changing profiles, canceling, then changing to the profile again could also result in improper theme loading. Fixed.
2009-10-21 02:34:29 +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
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
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
91a9387e33 Jeck - Profile loading fix, minor options menu improvements, minor cleanup. 2009-09-09 11:11:17 +00:00
wagic.jeck
ad7006e2de Jeck - Profile and cache improvements, booster duplicate likelihood reduced.
* Cache now tracks missing textures for RetrieveQuad, not just RetrieveCard/RetrieveTexture.
* Profile options are no longer overwritten when switching profiles.
* Main menu notifies of alternate profile- "Database: X" becomes "Profile: Y of X cards."
* Boosters iterates through cards, replacing duplicates. Stops after 15 tries to prevent infinite loops on small sets.
* Very simplistic theme switcher, only displays when alternate themes are present.
2009-09-08 03:23:19 +00:00
jean.chalard
e5bbbb358f J :
* Fix a few compilation issues.
2009-08-28 01:58:57 +00:00
wagic.jeck
62e12380a4 Jeck - Stopgap update fixing WResourceManager slowdown until complete rewrite. 2009-08-27 23:24:55 +00:00
wagic.jeck
c5b530bd3b Jeck - Forgot to commit headers. Ooops. 2009-08-27 14:13:39 +00:00
wagic.the.homebrew@gmail.com
99aa284431 Erwan
-code cleanup
-memory leaks fixes
2009-08-27 13:32:12 +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
01c62d04bf Erwan
-removing useless code
-fixed a few cards (incorrect set)
2009-07-18 14:26:58 +00:00
jean.chalard
dd054c4963 J :
* ostream printing of JGui objects.
2009-05-23 08:34:50 +00:00
wagic.the.homebrew
b14e6c318e Erwan
- Updated options system
2009-01-29 13:35:19 +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