Commit Graph
100 Commits
Author SHA1 Message Date
Michał W. Urbańczyk eb90f93231 Dereference optional in logs. 2013-08-01 16:26:29 +00:00
Michał W. Urbańczyk f897333b2c Don't crash when music file cannot be found. 2013-08-01 13:52:01 +00:00
Michał W. Urbańczyk 7a90ead051 VS-2013 issue. 2013-08-01 11:58:30 +00:00
Michał W. Urbańczyk 91a1f0eae5 Proejct file for minizip library, fixes compilation issues. 2013-08-01 09:55:57 +00:00
Michał W. Urbańczyk d8a27d8f3c Refactored player-specific data into single struct BattleState. 2013-07-21 22:01:29 +00:00
Michał W. Urbańczyk 0eb496fb57 Fixed #1338 and #1341. Introduced post-load step to ease initialization of bonus source ids. 2013-07-21 14:19:29 +00:00
Michał W. Urbańczyk 1e11904d8a Fixed Remove Obstacle. TODO: limit its working on spell-created obstacles depending on spell school level. 2013-07-21 10:25:12 +00:00
Michał W. Urbańczyk e9d51a2670 Fixed issue that allowed to build multiple boats in town. Renamed state() to sth more sensible. 2013-07-21 10:08:32 +00:00
Michał W. Urbańczyk e45d174ba5 Fixed crashes on Land Mines / Fire Wall casting. 2013-07-20 21:35:12 +00:00
Michał W. Urbańczyk d4ce091d2b A patch from Gernsworth related to #1204 — spell effects will be layered along with the creatures. 2013-07-10 10:45:51 +00:00
Michał W. Urbańczyk 2f1cf09881 VS project for Tests, not really working ATM though. 2013-07-07 08:30:06 +00:00
Michał W. Urbańczyk 516684aaab Visual 2012 compile fixes.
Unfortunately no C99 math nor uniform initialization till VS 2013.
2013-07-07 08:27:27 +00:00
Michał W. Urbańczyk 68603245c4 Or should not be the same way as And. 2013-07-03 20:18:41 +00:00
Michał W. Urbańczyk 1e8c58ecdf Patch from O01eg fixing #1308 http://forum.vcmi.eu/viewtopic.php?t=721
Helper functions for enabling/disabling smart vector memeber serialziation. [doesn't really save writing but adds consistency]
2013-07-02 16:48:01 +00:00
Michał W. Urbańczyk a1f545792b Compile fixes specific for VS 2012"
* Reverted std::bind to boost::bind. std::bind on Visual 2012 doesn't work in some cases (especially with std::ref), not sure why [but it seems to be a bug, since 2013 preview compiles the same code fine]. 
 * Move assignment operator for VS 2012.
2013-07-02 15:23:32 +00:00
Michał W. Urbańczyk 7a8e401860 Ignore the cmath-fix block on non-vs compilers. 2013-07-02 15:19:54 +00:00
Michał W. Urbańczyk 4576719abe Visual Studio 2013 Preview compile fixes:
* 0 is not convertible to std::function, nullptr should be used
* std::ref(rand) is not convertible to function<int()>, used lambdas (why we dont just pass "rand" ? )
* CFunctionList needs to be constructible from nullptr
* move constructor for CMapInfo (Visual cannot generate them :( )
* #ifdefed some stuff that is not needed anymore since cmath is updated with C99 stuff
* using std::make_unique instead of our vstd implementation

CSelector: 
* introduced a class in place of typedef
* Having an overloaded && || operators over sth that is convertible to bool… Wasn't a good idea after all. Purged the operators, replaced  with And/Or methods (chaining-style).
* constructor that is present only when constructing from class or function (SFINAE). std::function has an implicit converting constructor from T causing ambiguities (even if the overload would cause compile error in the body)
2013-07-02 12:08:30 +00:00
Michał W. Urbańczyk 1a2c8de6ad Minor improvements. 2013-06-24 14:35:27 +00:00
Michał W. Urbańczyk 17403b544c Various fixes for quick combat.
Replaced several boost::bind usages with lambdas.
2013-06-23 16:09:15 +00:00
Michał W. Urbańczyk 06f0a29b31 Compile fixes for gcc, as per http://forum.vcmi.eu/viewtopic.php?p=9638#9638 2013-06-23 12:36:18 +00:00
Michał W. Urbańczyk 04d11519ef Quick Combat system setting works… if user doesn't click in the meantime. 2013-06-23 11:25:48 +00:00
Michał W. Urbańczyk 2a471eeb1a Addec quick combat to system options window.
Compile fixes [I don't know why it has compiled for me before].
2013-06-23 07:54:33 +00:00
Michał W. Urbańczyk 4a0587d500 More work on auto-fight.
Dynamic libraries return smart-pointers to what they create.
2013-06-22 21:47:51 +00:00
Michał W. Urbańczyk 2be2143844 Game interfaces can register another interfaces to receive info on game events. 2013-06-22 18:22:44 +00:00
Michał W. Urbańczyk 254f194220 Some very early work towards autofight feature.
Added EmptyAI to the solution.
Passing callbacks by shared_ptr.
2013-06-22 14:47:20 +00:00
Michał W. Urbańczyk 06dbdd234f Further changes for duel mode. It is possible to pass names of AIs to be used by command line. Moved things in battle AI. 2013-06-21 20:59:32 +00:00
Michał W. Urbańczyk 6a88604937 * fixed crash related to cammander's SPELL_AFTER_ATTACK spell id not initialized properly (text id was resolved on copy of bonus)
* fixed duels, added no-GUI mode for automatic AI testing
* minor things
2013-06-17 15:45:55 +00:00
Michał W. Urbańczyk 30fb552fb4 Patch from Gernsworth fixing #1283. 2013-06-15 22:09:15 +00:00
Michał W. Urbańczyk 8bfc6a1116 A patch from O01eg: http://forum.vcmi.eu/viewtopic.php?p=9313#9313 2013-06-02 19:53:13 +00:00
Michał W. Urbańczyk 1d46db6a57 Post-release version bump. 2013-06-01 20:19:03 +00:00
Michał W. Urbańczyk 7e13e85762 Changelog. 2013-06-01 14:11:28 +00:00
Michał W. Urbańczyk f19e41d38c Fixed #1269.
Version set to 0.93.
2013-05-31 22:23:53 +00:00
Michał W. Urbańczyk 1e8e932323 Logging around #1237. Typos. 2013-05-30 12:14:39 +00:00
Michał W. Urbańczyk 608a080971 Partial support for serializing std::shared_ptr. Should fix #1281. 2013-05-30 10:44:39 +00:00
Michał W. Urbańczyk 11bcc48cc3 Version bump 0.92c. Fixed #1268. Split a few mehods from CGameState::init. 2013-05-28 22:47:15 +00:00
Michał W. Urbańczyk 9f5d1ba623 Fixed #1271. 2013-05-27 21:46:04 +00:00
Michał W. Urbańczyk 79026bdfde Introduced strongly typed QueryID.
Exchange between heroes is now a proper first-class query. Fixes #1269. #66 should also be finally fully fixed.
VC projects: /Zm flag to fix compilation issues with recent Boost.
2013-05-27 10:53:28 +00:00
Michał W. Urbańczyk 1c7aad6a50 Improved handling buildings with mode "auto":
* they will properly processed (new creatures will be added if dwelling, spells learned if mage guild, and so)
* transitive dependencies are handled (A makes B build, and B makes C and D)
2013-05-22 15:16:36 +00:00
Michał W. Urbańczyk c920f29c45 More missing serialization items. 2013-05-20 17:25:19 +00:00
Michał W. Urbańczyk 096e1230ce That needs to be serialized. 2013-05-20 08:37:31 +00:00
Michał W. Urbańczyk c85829a00c * creature window prints morale/luck for actual stack in battle (CStack), not stack as seen in hero screen (CStackInstance), fixes #1264
* creature abilities bonus properties are updated when the creature id is assigned
* removed decrease morale ability from config file (it was duplicating the one from ZCRTRAIT.TXT
2013-05-19 19:53:03 +00:00
Michał W. Urbańczyk fc6e72dc75 * Fixed enchantments (#1265). Their effects were not properly added when reading config. Battle interface will be little less likely to block itself after corrupted spell cast.
* Fail gracefully when the file from which game is started is in invalid version.
* Bumped versions.
2013-05-19 15:14:23 +00:00
Michał W. Urbańczyk be7c2bd07f CGHeroInstance* can be serialized over network even when hero has been defeated. Strongly typed hero type ID introduced.
Should fix #1260.
2013-05-18 22:30:48 +00:00
Michał W. Urbańczyk f95e6c233b It is possible to set on visit query that object is to be removed after visit is over.
Fixes #1263.
2013-05-14 13:42:52 +00:00
Michał W. Urbańczyk 0eb19dc16d WoG map version is 0x33, not 33. 2013-05-09 11:45:20 +00:00
Michał W. Urbańczyk 5c2473d436 Support for saving/loading in player interfaces, including VCAI.
Minor changes.
2013-05-09 11:09:23 +00:00
Michał W. Urbańczyk 5de00c752c VC project updated. 2013-05-05 12:21:50 +00:00
Michał W. Urbańczyk be6aff5173 VC11 compile fix. 2013-04-25 08:22:04 +00:00
Michał W. Urbańczyk 8a4f81b981 Tribool - part II. 2013-04-21 12:28:26 +00:00
Michał W. Urbańczyk 6e1464b568 Tribool - I used it wrong. 2013-04-21 12:24:54 +00:00
Michał W. Urbańczyk d30571aa4d AI won't access enemy heroes' objects that went under FoW. Fixes #1235. 2013-04-21 12:11:13 +00:00
Michał W. Urbańczyk d1d67caa0b Get rid of some old serialization workaround code that is not needed because serializer was improved in the meantime.
Fixing #1254.
Fixed possible race causing corruption of the server savegame.
2013-04-20 18:44:55 +00:00
Michał W. Urbańczyk e8354908c3 Big change: Introduced new mechanism to handle queries. It should not cause any visible changes ATM apart from fixing several long-standing bugs realted to handling post-visit/battle/levelup callback, including infamous creature bank issues: #955, #1053, #1063, #1191. Needs testing.
Minor changes:
* default log level set to trace
* LOG_TRACE raii guardian lifetime will last till the end of block
* compile fixes
* minor refactorings
2013-04-20 11:34:01 +00:00
Michał W. Urbańczyk 850f47261d ID should be always outputted as number (not char). 2013-04-17 19:09:54 +00:00
Michał W. Urbańczyk f42cfa6f43 MSVC compile fixes:
1) Names of compile units need to be unique, renamed the new CLogget.cpp to CNewLogger.cpp. (at least till the old CLogger is gone)
2) Fixes for project files (a few includes were marked as compile items).
2013-04-11 01:05:51 +00:00
Michał W. Urbańczyk ac9a009516 VC project file update. 2013-03-03 14:08:39 +00:00
Michał W. Urbańczyk e708dd5545 Version set to 0.92. Changelog updated. 2013-03-01 21:48:37 +00:00
Michał W. Urbańczyk 8c7c4789ca Attempt to apply patch from stopiccot. 2013-03-01 21:32:26 +00:00
Michał W. Urbańczyk 01d1029b1f Fixed #1221. 2013-02-28 05:09:08 +00:00
Michał W. Urbańczyk 459e858756 One more fix for turrets — defender should also not be turned.
Development build 0.91c.
2013-02-27 07:40:21 +00:00
Michał W. Urbańczyk a9fd7b806c Fixed crash on the new month when there are no creatures that can get double growth. (#1219, possibly #1217)
The list of double growth creatures will be serialized.
Bumped format.
MSVC: silenced that stupid C4275 warning. (senseless when using STL)
2013-02-27 03:11:45 +00:00
Michał W. Urbańczyk 9cc7a28222 Fixed unnecessary turret turning. 2013-02-27 03:06:49 +00:00
Michał W. Urbańczyk 01e563b579 #1211 won't crash. 2013-02-21 02:25:44 +00:00
Michał W. Urbańczyk 9492592a8f Version bump. Fixed crash on desync saves. 2013-02-19 12:24:17 +00:00
Michał W. Urbańczyk ca4a34df7b Development build 0.91b.
Removed not necessary log.
2013-02-18 23:35:25 +00:00
Michał W. Urbańczyk 6fdf64c2b1 Little more logging. 2013-02-18 23:10:46 +00:00
Michał W. Urbańczyk d45a554fec Significant changes to saving system. Now both client and server store their lib part.
Desync detection upon loading. Fixed many desyncs. (more remain)
Monsters won't have creature count 0 even if that is set as creature properties.
2013-02-18 22:37:22 +00:00
Michał W. Urbańczyk d23a5dcfdf Fixed #1208. 2013-02-14 15:19:35 +00:00
Michał W. Urbańczyk 12e627ec49 Fixed #1206. 2013-02-14 13:19:03 +00:00
Michał W. Urbańczyk 827d7b8681 Fixes for previous rev. 2013-02-14 02:17:46 +00:00
Michał W. Urbańczyk 6ac70d6a0b Partially reverting r3191: DLL_LINKAGE on registerTypes def breaks compilation for MSVC. The function definition cannot be marked as dll import (and that happened, when it was included in CGameHandler.cpp)
Partially reverting r3184: user-defined include/lib paths got uploaded
2013-02-12 12:51:31 +00:00
Michał W. Urbańczyk 2f39db2375 Hero portraits in campaign bonus selection. 2013-02-09 19:19:14 +00:00
Michał W. Urbańczyk 13b3d23b26 Finally working hero crossover in campaigns.
Uncovered new secrets of h3m.
2013-02-09 18:18:55 +00:00
Michał W. Urbańczyk e31f5062f9 Fixed crashes when VCAI cannot find hero to recruit.
Bumped format version.
2013-02-09 17:37:38 +00:00
Michał W. Urbańczyk 124d732171 * fixed race condition crash
* no crash when there is no creature in dwelling (that should not happen at all... but)
* removed paths from vcxproj, use property sheets
2013-02-07 15:27:22 +00:00
Michał W. Urbańczyk 60c18f1bb8 More fixes for campaigns. 2013-02-05 21:19:08 +00:00
Michał W. Urbańczyk 17755caa10 * fixed #1199
* fixed advancing between misisons in campaigns
2013-02-05 20:06:13 +00:00
Michał W. Urbańczyk f8d7473f9a * fixed vector<bool> serialization
* fixed issue with loading castle event
2013-02-05 14:32:59 +00:00
Michał W. Urbańczyk 937b316c11 Updated VC project file. 2013-02-05 01:25:56 +00:00
Michał W. Urbańczyk 59abcac7da A patch from stopiccot http://forum.vcmi.eu/viewtopic.php?p=8340#8340 2013-02-04 23:12:43 +00:00
Michał W. Urbańczyk 1fca96257d Fixed #1197. 2013-02-03 15:05:30 +00:00
Michał W. Urbańczyk 6232a1b369 Fixed #1181. Do not change that setProperty to setPropertyDer, it has to be as it is.
Sketchy fix for BattleAIs colliding ith their callbacks.
2013-01-21 21:34:30 +00:00
Michał W. Urbańczyk a96f03e947 Crashes realted to illegal access to enemy hero data should be fixed, including #1178. 2013-01-20 20:29:35 +00:00
Michał W. Urbańczyk 5b919d88eb "More stable" opening AI. 2013-01-20 12:06:49 +00:00
Michał W. Urbańczyk 0e826915ed Fixed #1176. 2013-01-20 12:06:18 +00:00
Michał W. Urbańczyk d4c30667b8 Fixed #1168 and #1170. 2013-01-06 04:48:05 +00:00
Michał W. Urbańczyk fa3d32925e A patch from Gernsworth that fixes #166. CGStatusBar is extended to support alignment, old CStatusBar class is removed. 2012-12-22 20:05:08 +00:00
Michał W. Urbańczyk bcf8cab19a Project files update/cleanup. 2012-12-19 18:23:21 +00:00
Michał W. Urbańczyk 27f8408c52 Compile fix for MSVC.
Fixed crash when no maps are present.
Fixed crash on opening the loading screen.
Fixed crash on starting the turn when Games/ subfolder is not present.
2012-12-19 18:19:09 +00:00
Michał W. Urbańczyk 9707e73eda MSVC compile fixes:
* in projct file some headers were marked as compile objects
* pow(int,int) is ambiguous
* some missing includes
2012-11-03 14:29:54 +00:00
Michał W. Urbańczyk 77e4b72531 Changelog: version number and release date. 2012-09-30 21:53:05 +00:00
Michał W. Urbańczyk 3e82b92fce Version set to 0.9, updated changelog. 2012-09-30 21:51:23 +00:00
Michał W. Urbańczyk 3de9b71cc3 Fixed crash when unit dies by entering obstacle (eg. moat) on the way to perform attack. 2012-09-30 17:48:21 +00:00
Michał W. Urbańczyk 49c5f70551 Fixed #1112/#1114. 2012-09-30 11:33:19 +00:00
Michał W. Urbańczyk 6934ec13e2 Post-release version bump.
Minor correction for emptyAI VS project file.
2012-09-29 21:10:39 +00:00
Michał W. Urbańczyk dec3f9afd9 #1083 should be fixed.
To be released as dev build 0.89d.
2012-09-29 20:25:54 +00:00
Michał W. Urbańczyk f30ee8ff04 * fixed possible corruption of pack sent by server when player request is rejected
* BattleAI will restore callback to its previous state, fixes freeze after battle #1104
* BattleAI won't lose turn when unable to correctly evaluate a spell
* VCAI will correctly recognize hero standing on town entrance
* War machines of defender will have correctly set side
* Faction 9 as neutral causes crashes, changing to -1 as used elsewhere in the code
2012-09-29 14:44:06 +00:00
Michał W. Urbańczyk f8a27a9fdb * Moved CConfigHandler from client to lib, CMake/Makefile need updating. I believe other projects besides client also need access to settings. (surprisingly there was a "server" category used only by client... and now VCAI.)
* It is possible to set the battle ai that'll be used by neutrals by typing in VCMI console:
setBattleAI <AIName>
VCAI also respects that setting and uses given AI as its battle back-end.
2012-09-29 10:59:43 +00:00
Michał W. Urbańczyk 2ba0427432 * Fixed #1096
* serializing icon index, otherwise creature portraits are gone after loading a game
* VCAI: fixed crash on attempting revisiting a boat (that is no longer present because it was boarded)
* Fixed strange crash with "neutral hero" (there should be no such thing... but somehow it appears, needs further investigation)
2012-09-28 20:49:23 +00:00
Michał W. Urbańczyk a669831fc6 * VCAI: fixed crash when a locked hero died when attempting realizing a goal 2012-09-28 19:50:09 +00:00