39 Commits

Author SHA1 Message Date
Vittorio Alfieri
d3379c9c08 Fixed a crash when AI try to activate a combo (caused by new ANYTYPEOFMANA management), fixed the Visual C++ project file descriptor, fixed ELD set DAT file, improved Andorid downloader, fixed primitives. 2021-02-19 18:50:25 +01:00
Vittorio Alfieri
f982124209 Added boast ability, refactored WParsedInt class (this class has been removed from AllAbilities.h file and it has been included into two dedicated .h and .cpp files), refactored all makefiles (Windows, Linux, PSP and Android) in order to to include the new .h and .cpp files added for WParsedInt class. 2021-01-18 17:11:09 +01:00
Vittorio Alfieri
21b5308420 Fixed code trying to make the 2 Players mode work better. 2021-01-03 01:07:18 +01:00
Tobias Loose
197540763e Remove unused Effects.h/.cpp and class Effect
There was an empty vector of effect* in PlayGuiObject.
2014-02-03 13:52:40 +01:00
xawotihs
ee217e94a8 Fixed carousel pull request with Visual Studio. 2013-12-07 20:29:42 +01:00
xawotihs
965d4f6d45 Fixes Windows project 2013-11-29 19:31:23 +01:00
Tobias Loose
bbc310dec7 Remove some dead code 2013-11-20 11:43:27 +01:00
Xawotihs@gmail.com
9db8478dfe Created a NetworkGameObserver class able to extend the serialization code of GameObserver to synchronize and forward game actions on the network
Fixes in GameObserver serialization/deserialization code
Fixes in JNetwork and JSocket on windows
Various code cleanup (currentGamePhase access in particular)
Updated GUI code to re-enable a basic network GUI
Activated threaded tests on Windows. It uses 4 threads by default.
2013-01-22 22:39:49 +00:00
techdragon.nguyen@gmail.com
85451f69ee vs 2010 update for deck editor changes as well as SDL update 2012-01-26 14:54:07 +00:00
wagic.the.homebrew
6825082d6d - Add a simple macro system for auto lines (the goal is to help mostly with repetitive card auto lines such as the ones we have in MotD mod) Check the MotD mod for examples.
-- I added an AbilityParser.cpp file, mid term goal is to move AbilityFactory there, so that MTGAbility.cpp becomes a bit less big.
-- I tried to add the file reference in Makefiles, but only tested windows compilation so far
- Fixed bugs related to "castRestriction" variables in MTGAbility. these variables were declared in both the parent and children classes, leading to bugs and duplicate code/content

The test suite passes
2011-10-15 16:19:29 +00:00
wagic.the.homebrew
fe88b747c0 - fix for ACounterTracker (this fixes the ability - it wasn't working before - as well as the memory leak)
- fix "release" build in VC++
- Let AI play creatures with ACounterTracker by making that ability a "positive" one (used for MotD)
2011-09-23 10:24:20 +00:00
wagic.the.homebrew
44d9951246 Adding a system to compare two AI implementations (AIPlayerBaka and AIPlayerBakaB). This can be used to make sure a change to the AI is not making the AI weaker, for example. 2011-09-20 11:32:24 +00:00
wagic.the.homebrew
4c45e971c6 Fix missing file (AIPlayerBakaB) 2011-09-20 03:58:12 +00:00
wagic.the.homebrew
fbfac78b09 - Split AIPlayer and AIPlayerBaka in 2 files. Moved all "AI" specific code into AIPlayerBaka, as much as possible.
-- This is a copy/paste and shouldn't have any impact on the logic. I just moved some functions from AIPlayer to AIPlayerBaka
- Added back the possibility to select a different Resource folder with file Res.txt
- Fix a crash when a token id does not exist
2011-09-20 03:06:06 +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
52b83a135c - Added TutorialMessage ability
-- Tutorial Messages are an ability like any other, except it can only be displayed once. Subsequent calls are ignored, the ability is removed from the game as soon as it is added
-- This allows to add event triggered messages ingame. Messages are either text, or images (I don't have an image sample, but rules/classic.txt has a few examples that might help)
-- only tested on Windows, although I made sure the PSP version compiles. Hopefully I also made the necessary for it to work in the touch version (touching the screen should be enough to close the tuto message)
-- Room for improvement: possibility to choose a title in text mode, possibility to have some messages depending on others (e.g.: don't show message X until message Y has been shown), improve some of the abilities and triggers to give more flexibility, add events outside of game, to allow tuto messages in deck creator, etc...
2011-07-03 08:47:51 +00:00
wrenczes@gmail.com
bed971c84c Last of my warning cleanup - as of this revision, all warnings in the windows build are gone. I've turned on the 'treat warnings as errors' option in the mtg project to mirror our makefile behaviour on psp. 2011-06-03 01:07:48 +00:00
wrenczes@gmail.com
842ba7aa56 Added a 'W' application icon for the Windows version. Could be improved - I didn't spend much time on it, and I also didn't bother with making versions for large icon mode, but better than nothing. 2011-06-02 18:29:23 +00:00
Xawotihs
0e26368c89 Fixed JGE key binding in SDL config 2011-05-26 21:24:17 +00:00
Xawotihs
7ba1ef14bb - Modified the windows project to use SDL as DLL, so that we all get mouse support now.
- I think I fixed issue 664, it's funny how the problem is visible on Windows and on some HTC devices but totally absent on Linux and some Samsung devices
- The SDL fullscreen is not working that good, it would need to be improved.
2011-05-22 21:47:31 +00:00
wagic.the.homebrew
691a1e1b91 - Fixed a Bug where AI would not block any attacker in Demo mode (bug introduced in r2759)
- Fixed a Bug where AI would not correctly assign blockers if the first attacker is super strong.
- Added a hack to prevent AI from an infinite loop while choosing a target. There are edge cases where the AI gets to choose the targets for a TargetChooser that doesn't belong to it. I couldn't dig too long for the root cause, so I added a "return 0" when the case happens. Should probably open a ticket
- Added a "Hint" System in AI decks, to help the AI with its strategy. This is not really usable yet, it only works with abilities (not cards to play), and I only added some basic code for counters and tokens. This can probably be extended, but let's wait until we see it working on that other game I'm working on, before rushing into adding hints to all AI decks...
- minor cleanup of AI Code
2011-05-05 14:27:46 +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
wrenczes@gmail.com
bd56723bc0 Checkpoint on a utility helper class. Basically, if you have a class that you want to count the numbers of instances, you do this:
class Foo
#ifdef TRACK_OBJECT_USAGE
      : public InstanceCounter<Foo>
#endif

Then, use this macro somewhere in the class body:
SUPPORT_OBJECT_ANALYTICS(Foo)

Lastly, add whatever information you want to trace out to the function ObjectAnalytics::DumpStatistics().

Here's a sample of the output of what I've instrumented so far:

-----------------------------------------------------------
Object Usage Stats

CardPrimitive current count: 7899
CardPrimitive current byte usage: 2053740
CardPrimitive max count: 7908
CardPrimitive max byte usage: 2056080

MTGCard current count: 13973
MTGCard current byte usage: 670704
MTGCard max count: 13982
MTGCard max byte usage: 671136

MTGCardInstance current count: 180
MTGCardInstance current byte usage: 172080
MTGCardInstance max count: 189
MTGCardInstance max byte usage: 180684

-----------------------------------------------------------
2011-04-23 05:16:53 +00:00
wrenczes@gmail.com
ae227a7cb8 Minor project cleanup:
- Consolidated duplicate PSP / PSPENV defines;
- removed some ancillary file crap from the 2010 projects;
- pulled 1xx references from the makefiles;
- consolidated multiple #defines for OutputDebugString into one header (previously was split between config.h & DebugRoutines.h).
2011-04-22 13:12:36 +00:00
wrenczes@gmail.com
3c03251027 Added WResourceManagerImpl.h to the VS2010 project. 2011-04-20 06:34:58 +00:00
wrenczes@gmail.com
43e105cce0 Updated VS2010 file inclusions. 2011-04-13 04:57:52 +00:00
wrenczes@gmail.com
9901329caf Moved Threading.h into JGE so that it can be used at that level. 2011-03-02 08:14:47 +00:00
wrenczes@gmail.com
be4a7ce412 VS2010 file inclusions. 2011-03-01 10:59:39 +00:00
techdragon.nguyen@gmail.com
0686979750 updating vs2010 solution with new PlayerRestriction class 2011-02-12 23:25:57 +00:00
wrenczes@gmail.com
2cb95076a0 Revert unwanted additions from Intel Amplifier profiling to the VS 2010 project files. AnkhSVN strikes again! 2010-12-28 06:34:33 +00:00
wrenczes@gmail.com
9005fd7af7 Fixed a problem I noticed after adding Z's 6 new decks to my res folder: if the number of AI decks wasn't a multiple of 10, the game would slow to a crawl, since there was a check that compared the number of actual decks against the number of unlocked AI decks (which is always incremented by 10 when new decks are unlocked) to determine whether the list of AI deck names should be refreshed or not. This was a pointless check, since we can load all the names once, and simply use the unlocked AI count value when determining what decks to allow to be used during random match playing.
This change restores the performance on psp back to where it was with 0.13.1, where the ai deck number happened to be a neat 100 count.
2010-12-28 06:31:50 +00:00
wrenczes@gmail.com
76d5b57c1e More VS2010 configuration changes - includes a boost include/lib path (not currently in the trunk), and new file additions/deletions. 2010-11-19 07:14:19 +00:00
wrenczes@gmail.com
ab49a0c6e1 Added new files to the VS2010 sln; Fixed a bunch of int to float warnings.
Minor note to others:  if you're writing drawing code, the coordinate system in JGE uses floats, so don't bother with ints for x/y coords & the like.  You're forcing the processor to do float to long conversions for nothing.
2010-11-04 04:33:04 +00:00
wrenczes@gmail.com
1325fff26b Fixed the vs2010 solution - included newly added files to the project. 2010-11-02 04:28:32 +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
wrenczes@gmail.com
8f7e4850ba Apply the same precompiler modifications to the VS2010 solution. Also turned off the C++ code analysis entirely for the debug target. Old build time: 5 minutes. New build time: 30 seconds. (note that the VS2010 code analysis slows things down considerably - but it also shows that one major bottleneck is AllAbilities.h, as it's included multiple times. That file should be refactored asap.) 2010-10-24 06:29:20 +00:00
wrenczes@gmail.com
0ef555dca9 Minor tweaks to the VS2010 project files, including turning down the code analysis verbosity. 2010-10-16 15:20:27 +00:00
techdragon.nguyen@gmail.com
34027bcabc adding DebugRoutines.h and mtg.txt to solution. 2010-10-07 03:03:04 +00:00
wrenczes@gmail.com
88ac1dd9a6 2010-10-06 08:45:55 +00:00