wrenczes@gmail.com
a0a3c59b29
Replaced unnecessary custom shuffle methods with std::random_shuffle<>.
2011-02-05 06:25:25 +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
1be97b76f8
code cleanup. No code changes
...
- removed unused variables
- added line breaks between methods (not everywhere just where i saw it while removing unused variables)
2011-01-16 07:49:34 +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
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
techdragon.nguyen@gmail.com
0c34d7a04f
removed dead code
...
reformatted statements
removed unnecessary debug statements
fixed a few floating point warnings
2010-11-06 03:49:15 +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
wagic.the.homebrew@gmail.com
882724ab4b
Erwan
...
- Yet Another Attempt at fixing i319,i365, i372
2010-03-03 14:56:12 +00:00
wagic.jeck
034e61e9fa
Jeck - partial revert of r1948, minor optimizations to where validate() is called.
2010-03-02 03:05:26 +00:00
wagic.the.homebrew@gmail.com
c09dabfdbf
Erwan
...
- attempt to fix issue 319. Jeck please review :)
2010-03-01 13:43:46 +00:00
wagic.jeck
4159aad221
Jeck - Fix to WSrcDeck's card counting, so it correctly handles negative numbers (removing cards).
2010-02-28 22:55:06 +00:00
wagic.jeck
233c1d8383
Jeck - Potential fix to issue 319.
2010-02-25 15:13:01 +00:00
wagic.jeck
bb82dc38f2
Jeck - Linked both sets into one filter menu. Requires more testing, but appears to work on PSP/PC as it should.
2010-02-19 22:38:09 +00:00
wagic.jeck
afffd4509f
Jeck - fixed issue 354, cleaned up mixed boosters, fixed a few issues with pack loading (slot pools weren't working), fixed TSP boosters to use 'S' rarity, removed some unused code.
2010-02-19 20:10:30 +00:00
wagic.jeck
a123cebfe5
Jeck - Fixed an error with packs, fixed basic info in deck editor, removed duplicated code in DeckDataWrapper.
2010-02-17 03:10:56 +00:00
wagic.jeck
ab34fc16f9
Jeck - Added custom booster packs (see miki), numerous small fixes. Once we hit feature-freeze I'll be reviewing this stuff in depth, as again there's likely a lot of room for cleaning... just wanted to get it in first :).
...
I cut some bits out that weren't ready for SVN, hopefully I've committed everything correctly.
2010-02-11 18:32:44 +00:00
wagic.jeck
4189c238b9
Jeck - Fix for issue 315.
2010-02-10 15:36:09 +00:00
wagic.jeck
e59aca67b7
Jeck - Fix for issue 320, also fix for countByName.
2010-02-10 14:46:10 +00:00
wagic.jeck
e96d4b9a07
Jeck - Cleaned up and reordered some menus, fixed potential heap corruption in GameStateShop.
2010-02-08 08:54:55 +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