Commit Graph

94 Commits

Author SHA1 Message Date
wagic.the.homebrew
8ff6839c8d Some preparation work for new platform support.
- Added a "PSP" compile-time define to clean up some compile time checks (replaced !WIN32 && !LINUX && !IOS with PSP) 
-- Wil, I am aware that this is redundant with the PSPENV variable you introduced recently, I think we can clean that up easily
-- This looks like lots of changes, but most of the time I just moved some blocks here and there
-- tested on VC 2010, PSP, and a bit of NDK
-- I might have broken maemo, iOS, or Linux compilation, can you guys check?
- Fixed some warnings reported by NDK
- NDK still does not compile because recent boost additions (mutex, etc...) are apparently not supported
2011-04-21 13:16:11 +00:00
wrenczes@gmail.com
ab133e9f98 Err, stupid of me. Now passing in the PSPENV flag correctly... 2011-04-19 05:49:37 +00:00
wrenczes@gmail.com
7e884b53f9 Added a PSPENV environment variable to the psp make files. Also fixed a minor compile bug where the debug flag for psp forced JLOG support, which in turn enabled a JGE_LOG_FILE macro that has long since been removed from the code. 2011-04-19 04:35:42 +00:00
wagic.the.homebrew@gmail.com
60017a6652 Erwan
- replaced variables canPutLandsIntoPlay and landsPlayerCanStillPlay with a PlayRestrictions class.
- Added  seenThisTurn(TargetChooser * tc) in MTGGameZones, which allows to count how many cards matching a targetChooser have been in a given zone in the current turn. With minor work, this can probably be reused by the ability parser for some cards that need to count how many **** where played or put on the stack during a turn.
-- for example player->game->stack->seenThisTurn([put a TypeTargetChooser("creature") here]) would give you the number of creature spells cast by the player this turn.
- This is the first step of a refactor that aims at removing all the adhoc variables for "cant cast". I plan to get rid of the following variables in Player.h (and the associated code, which hopefully will become smaller):  
    int castedspellsthisturn;
    bool onlyonecast;
    int castcount;
    bool nocreatureinstant;
    bool nospellinstant;
    bool onlyoneinstant;
    bool castrestrictedcreature;
    bool castrestrictedspell;
    bool onlyoneboth;
    bool bothrestrictedspell;
    bool bothrestrictedcreature;

They will be replaced by the PlayRestrictions system, and hopefully I'll have time to update the parser to make this more generic as well.
My initial goal with this change was to move the limit of 1 land per turn outside of the code, and make it an external rule in Rules/mtg.txt. I have yet to do it.
2011-02-12 16:31:07 +00:00
wrenczes@gmail.com
df77cc584f Err, sorry, that's not fair - I was forcing this pspsdk change on everyone. Put it back to off by default - to turn on the signing, simply uncomment SIGN_PRX = 1 in the makefile. 2011-01-19 11:05:42 +00:00
wrenczes@gmail.com
0b16401c88 Some tweaks to support automatic signing of the wagic eboot on psp. To use, you'll need to unzip the mods I made into your pspsdk folder - you should end up with two utils in the bin folder, and some slight mods to the build.mak file (under pspsdk/psp/sdk/lib/).
(Erwan, pls give this a sanity check for me).

Nice side effect:  running the signed version seems to clear up a crash I'd get when putting my psp into sleep mode in the middle of a match.
2011-01-19 11:03:09 +00:00
wrenczes
ed321e2df5 Linux specific changes to allow linking against Boost::threads. Not used by the current build. Also turned off 'unused' warnings in QTCreator to match more closely the warnings that we pay attention to in the psp build. 2010-12-06 07:44:16 +00:00
linshier
c51321d292 Fixed makefile for Boost including on linux. 2010-11-20 15:13:16 +00:00
wrenczes@gmail.com
0c4b43a491 Added an additional clean option for stale versions of the precompiled header that might have been orphaned in the include folder. 2010-11-20 07:08:25 +00:00
wrenczes@gmail.com
e0872b852d Fixed the PSP build. Turns out that the make file wasn't properly cleaning out the .pch file when running make clean. Also renamed JgeRect to JRect for consistency with other class definitions in JTypes. 2010-11-20 06:34:13 +00:00
techdragon.nguyen@gmail.com
2a8f8074e6 New descriptive text popup feature for deck selection
http://wololo.net/forum/viewtopic.php?f=13&t=2423
2010-11-18 15:48:48 +00:00
jean.chalard
1317eb0d29 J :
* Add multilingual support for utf-8.
* Use japanese as a test case (removing the old tentative support).
* A number of shortcomings affect this code.
  + Bugs :
    - This splits algorithms used to determine the length of a string
      and to render it in two: either the string starts with an ascii
      char and the monobyte, variable-space algorithm is used, or it
      does not and a multibyte but fixed-space algorithm is used.
      This shortcoming also exists in the code to support chinese.
    - From the above comes the biggest limitation: any string that
      starts with an ascii character but include non-ascii characters
      will not be rendered correctly.
    - This does not and cannot support chars outside the BMP. This
      probably won't matter, ever.
  + Todos, fixmes, wishlist :
    - Single-width characters with diacritics are reported as
      double-space chars. It doesn't matter too much at the moment, but
      should be fixed in the future.
    - Font support currently only includes japanese.
  + Performance and compatibility notes :
    - Chinese code has not been switched to utf-8, to maintain backward
      compatibility. We should switch it at some point in the future,
      but ponder the right way to do it first.
    - Retaining the support for chinese with a non-international
      charset hurts performance (by making some methods uselessly
      virtual).
* Still, this generally works and is extensible (it can be used to
  implement korean, traditional chinese, etc, without any more code).
  Implementing languages with diacritics needs an improvement of the
  bool doubleWidthChar() method.
2010-11-14 16:24:29 +00:00
wrenczes@gmail.com
fe9c43bc81 Fixed the makefile - the precompiled header additions I previously made wasn't quite syntactically correct, causing unnecessary rebuilds of untouched object files. Now only touched cpps will be rebuilt as expected. 2010-11-13 08:53:22 +00:00
wrenczes@gmail.com
eea91e9a1a Two changes here:
1) Consolidated the Loggers so that we only have one in JGE.  Added a helper constructor/destructor to the JLogger class so that you can instantiate one at the top of a function, it'll trace out a 'start' and 'end' message when it goes in & out of scope.
2) Fixed the crash part of a bug I've been chasing down where, on the psp, after saturating the cache, the game dies when trying to reload the background PNG image of the deck menu. We still need to fix the root cause of the failure (not enough memory to allocate a temporary buffer for the swizzle operation), but at least the psp doesn't lock up anymore.  I've also left behind all the log traces I inserted into the LoadPNG code, since we'll probably need them again.
2010-11-10 02:24:39 +00:00
techdragon.nguyen@gmail.com
dd163c8807 ***Note***
please copy "DeckEditorMenuBackdrop.png" into your PSP folder.  Otherwise you will have a crash when you start up!

ChangesLog:
minor refactoring of DeckMenu
added a new DeckEditorMenu which is derived from DeckMenu.  This customizes the deck editor menus with the exception of the confirmation screens (yes/no)
Still more work to be done to round out some font issues.  
TODO:
put more information text in bottom row of menu.
reorganize statistical data to allow more info to be shown.
2010-11-03 16:49:39 +00:00
techdragon.nguyen@gmail.com
a458da051d refactored how manaredux coding works
replaced literals with constants in some places.
migrated some abilities out of headers and into implementation files.
2010-11-01 13:04:06 +00:00
techdragon.nguyen@gmail.com
911189da3d added DeckMenu and DeckMenuItem to the object list. 2010-11-01 11:01:08 +00:00
wrenczes@gmail.com
5a1e8e6ffe More reorganization work around CardSelector and the singleton pattern. Broke the source for the singleton into its own separate source file, to keep things clean. Also broke apart a circular header dependency: CardSelector defines and uses a SelectorZone, which is a member inside of CardView. CardView in turn is used heavily by CardSelector. Instead SelectorZone is now defined within CardView (where it's set & controlled anyway).
I've also added my current work on the zone navigation system (class Navigator) - it's currently turned off for now (the override for this is inside of CardSelectorSingleton's Instance() call, simply comment out the NEW CardSelector and uncomment out the NEW Navigator line.)  It's functional, but I want to do more testing before considering wiring it into the game options or something similar.  (Also, note that it currently doesn't support the mouse functionality added by DJardin.)

Lastly, there's a bug crash fix in ActionStack that I tripped across while testing - basically, an illegal index value would have us walk off the bounds of a vector.
2010-10-31 07:50:53 +00:00
linshier
eb043eba5d Fixed Makefile for Linux 2010-10-24 07:20:52 +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
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
f40af0b1cb Erwan
- Chinese patch by linshier
2010-07-31 14:41:04 +00:00
wagic.the.homebrew@gmail.com
d756005093 Erwan
- fix for issue 390 (tokens available in shop)
- added "log" features in makefile
2010-06-12 06:06:27 +00:00
wagic.the.homebrew@gmail.com
a3cbbedd3c Erwan
- fix issue 392 (broken tests)
- Fix a bunch of memory leaks (guys please be careful!)
- Added Logging facility in JGE
- HBL Compatibility (cleaned up some code with MP3 in JGE)
- Added "winGame" ability. Currently used mostly by the story mode, but some cards could probably need it too
- Improved story mode and uncommented it from the source.
-- The current campaign is of course very basic, anybody who wants to improve it or create other ones feel free to do so
-- TODO (short term): save progress, rewards system, improve tutorial campaign
-- I'll talk a bit more about this on the forums/email after a night of sleep
2010-04-26 14:27:34 +00:00
wagic.the.homebrew@gmail.com
22336b7839 Erwan
-fix psp compilation
2010-03-28 04:10:15 +00:00
jean.chalard
a255ddc06e J :
* Make debug compilation possible on PSP.
2010-02-27 17:25:15 +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
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
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
jean.chalard
7c319bc77e J :
* Try fix psp compilation under windows
2010-02-02 10:41:18 +00:00
jean.chalard
5a2bae75d5 J :
* Add newlines at end of files. This is for better portability.
* Fix a direct reference to g++ in the makefile
2010-02-02 10:19:43 +00:00
jean.chalard
2163bdbec5 J :
* Fix the way features are tested.
2010-02-02 09:38:22 +00:00
jean.chalard
64260f5787 J :
* Fix linux32 compilation.
* Wagic+JGE are now expected to compile on any unix that
  has an X and an OpenGL library. If fmod is correctly
  installed it will use it, else there won't be any sound.
2010-02-02 09:15:39 +00:00
jean.chalard
18c18822c9 J :
* This update has Wagic compile and work under Darwin 64-bits.
  - Linux 64-bits is expected to compile and work from now on, but
    was not tested. As with before, Linux 64 bits can still run
    the 32 bits version.
  - Darwin version is not using Carbon but X emulation.
  - 64-bits versions have no sound because there is no 64-bits
    version of fmod.
  - Windows 64-bits probably does not compile. Windows 64-bits can
    still run the 32 bits version.
  - Darwin 32-bits probably does not work at the moment because the
    libfmod requires another name to work on Macs, but as 64-bits
    disables it it works.
  - Other unix flavors are expected to work as long as they have
    a working OpenGL library, X11, and *either* 64-bits *or* a
    working fmod. Thus in the practice Tru64, Irix and the like
    probably work, as should FreeBSD and other BSDs in 64 bits
    versions, but 32 bits versions will search for a non-existing
    fmod. All of this is pure conjecture and none was tested.
  - All 64-bits versions have no sound.
  - The mac version does not display the particles at the moment.
    This is not critical, but the cause is unknown yet. I would
    like to know if other 64 bits unices share the same bug or if
    it is mac-specific.
* Test is needed in particular to see whether the program still
  compiles and works in Linux and PSP. Windows is probably all
  right, but compiling PSP in windows may be broken by this
  update.
2010-02-02 08:27:10 +00:00
wagic.jeck
0a863bcbad Jeck - [JGE recompile needed] Shop cleanup, Interface enhancements.
Added basic transition system that works with GameApp's phases. Currently does a fade-out between elements, which works well in some places and not-so-well in others. We'll definitely want to think about where and where not to use it... they'd work a lot better if we could spawn a thread to handle loading the next state while transitioning.

Also cleaned up the shop a bit, so it uses ReadButton() instead of GetButtonClick()-- hence the slight change to JGE. Added a tiled image for the task board, which loads conservatively (I tried 128x128, but it didn't look as good).
2010-02-01 18:27:25 +00:00
wagic.the.homebrew@gmail.com
ffbcd3f2d0 ERwan
-fix issue 297
- also removed the "untapBlockers" system. The idea was nice but incorrectly implemented, and only 2 cards were using it so far.
2010-01-17 12:05:40 +00:00
wagic.the.homebrew@gmail.com
26f96c3443 Erwan
- cache system for Deck Meta Data. let's improve it as needs arise
2010-01-15 12:19:47 +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
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
ca6f507d0a Erwan
- putting valloc.c back in the project as some persons have problem using/finding the valloc library
2009-12-06 12:38:23 +00:00
wagic.the.homebrew@gmail.com
0d2c6cf3e5 Erwan
- Adding external rules mechanism. It is very crude for the moment, but I hope it will grow. Have a look at Rules/mtg.txt for basic usage
2009-12-06 04:47:29 +00:00
wagic.the.homebrew@gmail.com
d7dae0dcd9 Erwan
- Added -O2 option in the PSP Makefile. In my tests, this highly increases the probability of getting a purple screen. Fixing this bug is THE priority :)
2009-10-29 13:12:16 +00:00
wagic.the.homebrew@gmail.com
924574b0a1 Erwan
- Some cleanup in JGE
2009-10-02 14:33:05 +00:00
jean.chalard
694df9dc13 J :
* Minor fixes
2009-09-22 04:37:36 +00:00
jean.chalard
5f04e7245c J :
* Fix carriage returns.
* Fix linux compilation.
* Make flags more common between linux/psp to help reducing occurences
  of flags being different.
2009-09-21 17:40:29 +00:00
wagic.jeck
67ef5b026c Jeck - Extremely subtle lighting effect fades in on boot screen sword.
* Yeah, it's kinda gratuitous. I was playing with various overlays, and this is really the only thing I could think of, given the limited space. Blood and rust just look wrong, fading in like that... and the area for text is really limited the card, from the Wagic logo down. Feature notes like "Single and multiplayer! Over 3000 cards!" just look cramped there, and detract from the overall image.
2009-09-21 07:44:22 +00:00
wagic.jeck
f7eadb839b Jeck - Proposed pic1.png. Please comment here with thoughts / suggestions. 2009-09-21 06:40:02 +00:00
wagic.jeck
e0b225bad9 Jeck - TEMPORARY enabling of exceptions. (~6hrs) Sorry, I've been an idiot lately and coded myself into a corner with stuff that "should only take a minute" to fine tune. I honestly shouldn't have committed r871+, but I'd sworn to high heaven that the damn thing was fixed. In reality getting the cache 100% needs a bit more time, so I'm committing this in the hopes that it'll prevent sloppy cache work from interrupting other people's coding.
Exception handling in the cache means that Wagic runs slightly, but noticeably slower. However, it also means that the cache works the way it was intended to, and should prevent all sorts of awkward errors I introduced because things were half-allocated or worse. 

I've learned my lesson from tonight, and once I get this stuff put back together without exception handling I think I'll self-impose a manditory 24 hours debugging time before any commits. Sorry for the inconvenience. 

If for some reason you can't compile with exceptions, r862 should be completely without them. Again, wow, this was stupid-- I hadn't even realized exceptions were off for like 24 hours, as the compiler wasn't producing warnings. 

Apologies,
—Jeck
2009-09-20 03:10:34 +00:00