48 Commits

Author SHA1 Message Date
Anthony Calosa
626f0677f7 Fix profile status on upper left of main menu
The profile status on the upper left of main menu should update now when
changing user profiles...:)
2015-10-14 21:26:22 +08:00
wagic.the.homebrew
c9fd53808f - fix compilation issue on psp
- attempt at reducing loading times on the PSP: I merged a few graphics files together, removed some unused calls from the initialization functions, and moved some other ones to have a more lazy approach. The PSP version remains fairly slow in some parts (especially loading, but also entering the shop, or starting a new game), so I will try to reduce file access as much as possible in the days to come. Not a release blocker IMO though, but I4d sure love if it were faster.
- uppercased "Track1.mp3" to be in line with the actual filename. Most likely this had been broken forever on case-sensitive OSes
- I removed costly calls from the textscroller. I believe it wasn't very useful in its previous state. Now it's only "advertising" for unlockable stuff, which I think is ok (and allows to refresh it every time the menu is loaded)
- As a counterpart, added a "% complete" progress bar in the menu, something I wanted to add a while ago.
2011-12-11 13:48:24 +00:00
wagic.the.homebrew
e27cf56fa2 - Support for Zip Filesystem. It is now possible to zip the entire Res folder ("store" method preferred, zip so that the root of the zip has ai, player, etc...) in one single file for read only. Write access is done in another folder (hardcoded to be User/ for now, can be updated depending on platforms, etc...
-- zipFS has several limitations...
--- in a general way, seekg doesn't work... so getting a file's size needs to be done through JFileSystem.
--- getLine on files open with zipFS doesn't work so great. Not sure if it is a normal issue because files are open in binary or not... JFileSystem therefore offers a "readIntoString" function that needs to be used instead of the usual "getline" technique. However getLine can then be used on a stream connected to the string.

-- tested on Windows and PSP, I also made sure android still works, but haven't tested zip support on Android.
-- I tried to maintain backwards compatibility, but this might break on some platforms, if I broke some platforms and you can't find a way to fix them, please contact me and we'll figure something out
-- This removes wagic::ifstream. I didn't reimplement the securities that were involved in this, apologies for that. Might be useful to reimplement such securities in JFileSystem
-- I haven't tested options/profiles in a deep way, it is possible I broke that.
2011-08-21 09:04:59 +00:00
wagic.the.homebrew
cd07248df5 UPDATE YOUR rules FOLDER!!!
- This is some Work in progress to make Wagic less "game" dependent.
This change especially is an attempt at moving away from some dangerous patents owned by some company.
It introduces "modrules.xml", a global configuration file describing dynamic settings for any given Wagic mod. It is very basic for now, but allows to customize a bit. In particular, it allows to remove the concept of shop and deck editor from the game, dynamically generate the main menu, and represent card activation with a mask rather than a rotation.
I have a sample in progress which I hope to submit in the days to come, a proof of concept (nothing fancy yet) for another type of game using these ideas, as well as a few other things I introduced recently.
In the future, I am hoping to extend modrules.xml so that it entirely describes the rules of a given card game. the other files in rules.txt will describe "extensions" to the core rules, just like they do right now, so this new file does not make them obsolete.


- Also fixed minor bugs I stumbled upon while developing
2011-04-29 17:30:57 +00:00
wagic.the.homebrew
e1e52f910d - removed unused variables in Menu. These where used for the old moving "W" which is probably not coming back any time soon... 2011-04-23 13:52:46 +00:00
Xawotihs
b7b584113b - Moved the card collection out of the GameApp class to clean up the dependencies
- Added method to build a card collection independently of the GUI to ease my unitary test application
- Added part of some network GUI I'm working on, it's #ifdef out, I'm only committing this part to ease later merges
- Added the beginning of a serialization code of the Player and related classes used for network support
- various other minor cleanup
2011-02-06 11:35:40 +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
omegablast2002@yahoo.com
5939cbded8 added MnGuyens further improved menu handling and extra options. 2010-09-17 06:34:12 +00:00
wagic.the.homebrew@gmail.com
755bb04475 Erwan
- updated pt translation (thanks to almosthumane)
- Added/updated some Themes by Ilya B
- Added a random wallpaper loading at loading screen (see wallpapers.txt in Res/graphics)
- Saving decks and collection should now be a bit more secure (attempt at minimizing issue 393)
2010-05-02 12:49:36 +00:00
wagic.the.homebrew@gmail.com
8a4797a06a Erwan
- quick patch for i379
2010-03-13 07:25:07 +00:00
wagic.the.homebrew@gmail.com
f863dca678 Erwan
- Adding Dr.Solomat's WorldWake initial set :)
2010-01-31 03:08:52 +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
d32.wagic
002851a943 Daddy32: Tasks Mode
Gives the user the opportunity to earn some credits for performing various tasks.

Known bugs removed, tested stability-wise, not so much game-wise.
Lots of to-dos and ideas still remaining, better balance between task difficulty and their rewards needed - please comment.

Usage:
Enter shop, open menu, select 'See available tasks'.
All tasks in the list are active, until they expire ('Days left'; day passes after each duel (won, lost or quited)).
You can finish any of the tasks and get bonus. For particular task, the bonus gets a bit smaller every day (until expiration).
2009-12-13 22:12:14 +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.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
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.jeck
4b8d344bcd Jeck - Card ID collisions, cache fixes, cache deleted pooling.
* mtgid now defaults to 0.
 * TextScroller will not update when empty.
 * Cache now moves WCachedResources we're finished with to a garbage pool for later use (to reduce memory fragmentation). 
 * Demo still crashes... but I'm thinking that has to do with fragmentation, not a leak?
2009-09-19 01:48:42 +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.jeck
d1f6cdcd96 Jeck - Some warnings cleanup. 2009-08-28 05:40:10 +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
jean.chalard
dd054c4963 J :
* ostream printing of JGui objects.
2009-05-23 08:34:50 +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
33e79e234e Erwan
- Cache size is now an option
2009-04-19 06:02:29 +00:00
wagic.the.homebrew@gmail.com
6582a1972a Erwan
- Added Momir Basic mode :)
2009-04-04 12:52:36 +00:00
wagic.the.homebrew
415061642d Erwan
- Added splash screen management
- fixed a ruling bug (putting sorcery, enchantments, etc.. into play while interrupting)
2009-03-17 11:46:39 +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
64d80e119e J :
* Split the GameStateMenu.h that contained the code into a header file
  and a source file.
2008-12-30 05:47:45 +00:00
jean.chalard
a82d4b51bb J :
* New menu style - step one.
  More improvements are to come, but this should be stable and have a good
  portion of what is to be done.
2008-12-30 05:24:38 +00:00
jean.chalard
3e9ff2b580 J :
* Change the name of debug.h into config.h and use the new RESPATH define.
2008-12-25 16:28:03 +00:00
wagic.the.homebrew
bf314c9fa3 Erwan
- fixed a bug with mana producer
- fixed a graphical glitch with quads in the stack
2008-12-08 13:50:21 +00:00
wagic.the.homebrew
acceb55f92 Erwan
- Minor tweaks in the hope to fix some Valgrind error logs
2008-12-02 14:00:28 +00:00
wagic.the.homebrew
d5f268ba03 Erwan
- fixed SimpleMenu Heap corruption in main menu
2008-11-30 01:06:37 +00:00
wagic.the.homebrew
7bf9cc8c07 Erwan
- Fixed a bug in SampleCache
- simplified card files initial parsing
2008-11-29 15:31:56 +00:00
wagic.the.homebrew
1cec867b95 Erwan
- Using SAFE_DELETE macro for simplemenu object, in the hope to find the heap corruption problem
2008-11-29 05:21:54 +00:00
wagic.the.homebrew
1ca143abd7 Erwan
- Fixed a bug with royal Assassin
2008-11-28 15:38:05 +00:00
wagic.the.homebrew
3721247bee Erwan
- It is now possible to have avatars associated to each Deck
- Added SFX
- Added Music files
- Possibility to choose your opponent
- Opponents' difficulty is measured according to their number of victories against a given deck
2008-11-24 09:24:47 +00:00
wagic.the.homebrew
349de34106 Erwan
- Fixed MP3 play bug on the psp. MP3 files need to have NO Id3v2 tag, or they won't play. Also, volume control is broken
- added dt to moving W's easter egg movement.
- Added fullscreen for windows version
- other stuff ?
2008-11-19 12:21:23 +00:00
jean.chalard
2434571fa2 J :
* Dude, try Triangle.
2008-11-18 14:10:06 +00:00
jean.chalard
b08bd5a8c3 J :
* Add an easter egg.
2008-11-17 17:51:14 +00:00
jean.chalard
54c4524e85 J :
* New title with the moving W.
2008-11-17 16:51:26 +00:00
jean.chalard
0b5c940ae3 J :
* Fix the names of the music files
2008-11-16 10:23:29 +00:00
jean.chalard
96ea61c1ab J :
* Use new icon positions
2008-11-16 06:34:09 +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
440d6d7629 - fixed a Zombie Master bug
- fixed a graveyard bug
2008-11-03 04:27:58 +00:00
wagic.the.homebrew
d45e3b101b 2008-11-02 09:50:16 +00:00