1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
Commit Graph

202 Commits

Author SHA1 Message Date
ArseniyShestakov
7c5af02b78 Fix saving of player's quests
This commit break saves compatibility
2015-02-12 13:19:22 +03:00
Ivan Savenko
6c0c03d74b Refactoing of pathfinder <-> client/AI interaction to remove dependency on selected hero
- finished removal of server-side setSelection
- disabled some broken code (AI & cheats). TODO: fix
2014-09-21 16:42:08 +03:00
Ivan Savenko
78709e223b Breaking things - trying to remove server-side knowledge of selected objects 2014-09-19 00:18:49 +03:00
Ivan Savenko
32240da34e Reduced number of #include's in headers. May break compilation on Win
since some net packs now need DLL_LINKAGE
2014-06-25 17:11:07 +03:00
Ivan Savenko
b2e8c92383 Cleanup:
- removed commented-out #includ'es
- renamed some files to match name of class
2014-06-05 20:26:50 +03:00
Ivan Savenko
652ceb2bde Finally shattered CObjectHandler.cpp into tiny bits
- This file is now split into multiple smaller files in mapObjects
directory
- CObjectHandler itself now contains only core classes (Handler itself,
CGObject and interfaces)
- Cleaned up excessive #include's through whole project
2014-06-05 19:52:14 +03:00
Ivan Savenko
0afdfa529c Moved all object-related files to lib/mapObjects directory.
Renamed some classes to more readable names
2014-06-05 14:19:47 +03:00
Ivan Savenko
32b6568b65 Merged changes from upstream and fixed compilation caused by API changes 2014-06-03 22:45:18 +03:00
O01eg
ad84ae64b0 Clean up. 2014-04-20 12:40:15 +04:00
O01eg
463073ebfa Move CPrivilagedInfoCallback, IGameEventCallback and CNonConstInfoCallback to IGameCallback.h 2014-04-20 11:13:37 +04:00
O01eg
927eb33c11 Split IGameCallback to reduce memory required to debug compilation. 2014-04-19 21:44:21 +04:00
beegee1
1d57b75bc5 - random number generation refactoring
- fixed mantis #1743
2014-04-10 19:22:32 +02:00
Ivan Savenko
43ba3d30ea Breaking things - first commit towards configurable object(s).
- New files: lib/CObjectWithReward.h/cpp
- Classes that will be replaced by configurable object are now in this
fil

Status: far from functional, currently at "it compiles" point, some
essential pieces are still missing.
2014-04-06 23:14:26 +03:00
DjWarmonger
30b79588db - Moved gameState::guardingCreaturePosition() to CMap so it doesn't need to be recalculated many times for every player.
- Some optimizations with local cb pinter in VCAI.
2014-04-01 11:53:28 +00:00
DjWarmonger
a64df5718f Some nontrivial optimizations based on profiling results:
- Movement bonuses will be calculated ONCE per pathfinder loop
- Goals will be sorted by hero to reduce number of calculatePaths calls
2014-03-31 14:26:09 +00:00
beegee1
fe1b16a7ec Some preparation towards mantis #1743:
- refactored CRandomGenerator (added util methods, improved method names)
- usages of std::minstd_ran are replaced by CRandomGenerator (not in entire code base, C rand() usages are still not replaced)
- refactored getArtSync method of CArtHandler -> now named pickRandomArtifact
- fixed some compiler warnings
- updated source code URL in VCMI spec
2014-03-17 19:51:07 +00:00
beegee1
d4fd361d4b - fixed #1643 -> hero placeholder handling
- fixed bug when loading victory/loss conditions of the 3rd scenario in the first ROE campaign
- fixed bug when loading artifacts to hero of the 3rd scenario in the first ROE campaign (due to corrupt H3M map)
- implemented function object to quickly find a object by it's sub ID in a list
- added netbackbase.h to header list in CMake
- removed false message which said that the server loaded the map successfully
2014-01-30 18:56:31 +00:00
beegee1
22e119770a Fixed mantis #1645 2014-01-03 16:36:22 +00:00
beegee1
9d0387140f - Fixed bug when the type id of the hero placeholder is the same as a already placed hero or prisoned hero 2013-12-30 15:34:28 +00:00
DjWarmonger
51e6961d08 Compile fix for MVS. 2013-12-29 15:48:56 +00:00
Ivan Savenko
0c5be52a42 Win/loss conditions based on logical expressions, yet another large
changeset:
- victory/defeat will be detected using triggered events
- vcmi will convert h3 conditions into set of triggered events
- it is possible to either change number of days without towns or even
remove this loss condition completely
- possibility of custom win/loss text and icons in pregame (no longer
connected to win/loss conditions)

Still missing:
- No interface to pass custom events/victory conditions into the game 
- AI would benefit from improvemets (handle all victory conditions,
select best one to fulfill)
- You have X days till defeat message still hardcoded to 7 days
2013-12-29 11:27:38 +00:00
beegee1
b8eddcd9a8 - Moved place bonus hero before normal random hero and starting hero placement -> same behaviour as in OH3
- Moved placing campaign heroes before random object generation -> same behaviour as in OH3
- Refactored pickHero into pickNextHeroType (hero generation sequence) and pickUnusedHeroTypeRandomly
- Added a SIGSEV violation handler to vcmiserver executable for logging stacktrace (for convenience only)
- Fixed Fuzzy.cpp and VCAI.h compilation on Clang
- Added a handleException function in addition to our macros (no use of macros, enables debugging support, does not re-throw, catches ...-case too)
2013-12-28 12:47:55 +00:00
beegee1
68bdf71db6 - Fixed GCC compiler warnings
- Implemented move heroes to next scenario partially
2013-12-20 13:07:58 +00:00
DjWarmonger
d085f8eee8 First implementation of fuzzy logic in VisitTile goal. 2013-12-20 09:43:12 +00:00
beegee1
f0cbbbdb70 - Refactored method CGameState::init 2013-12-18 18:18:12 +00:00
beegee1
2d095cf20a - Fixed days without castle counter
- Fixed 'you have only 0 days...' message
- Checks victory/loss conditions every player turn instead of every day
- Fixed mantis #1463
2013-12-06 19:44:11 +00:00
beegee1
c786a3076a - Refactored victory loss condition checks
- Added toString() method to EVictoryLossCheckResult enum class to improve debugging
- Removed mostly unused CFunctionList2
- Added missing header files for vcmiclient project to CMakeLists
- Tweaked SDL suggests bpp message a bit
- Added showInfoDialogAndWait (info dialog and waits, used from client thread) and showOkDialog (callback to ok click, used from GUI thread) to player interface
- Added showOkDialog method to CInfoWindow (unused for now, but may be used later)
2013-11-30 09:43:31 +00:00
beegee1
3e4407593f - Refactoring for checking victory/loss conditions (use enum class instead of magic numbers)
- Improved showing player lost message for one special case
2013-11-17 17:57:04 +00:00
Ivan Savenko
3560bbb7f3 two patches/pull requests from janisozaur
- replace our custom bmap with std::map::at()
- compile fixes for editor
2013-11-12 10:45:42 +00:00
Ivan Savenko
71d6b0fea9 - Fixed some warnings from cppcheck
- Minor improvements to JSON validation
- Cleanup in SDL_Extensions.cpp
- Implemented new propery for creature format: idle animation duration
- Disabled idle animation of some of conflux creatures (was clearly
broken)
2013-11-06 13:42:58 +00:00
Ivan Savenko
76c77d58f6 const-ified CTown. May fix #1444 2013-09-06 21:57:16 +00:00
Ivan Savenko
2b45e13c5c c++03 -> c++11 switch:
- use std versions of function, bind and ref
- OVERRIDE -> override
- NULL -> nullptr
- use std versions of random distributions

NOTE: this may be last revision that supports gcc-4.5
2013-06-26 11:18:27 +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
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
beegee1
ee51c5beb5 - Renamed /lib subfolders to lowercase 2013-04-07 10:48:07 +00:00
alexvins
2eb8263e51 Basic Configuration for bonus types
* introduced new handler BonusTypeHandler
* config\bonusnames.json converted to common format and splitted info main and localizable parts
* hanlders initialization refactored
2013-03-06 18:49:56 +00:00
mateuszb
dbec99ffc7 * PlayerColor and TeamID refactoring 2013-03-03 17:06:03 +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
mateuszb
560315bc48 * SlotID refactoring 2013-02-16 14:03:47 +00:00
mateuszb
9e00090c42 * refactoring, a few intriguing problems remain 2013-02-13 23:55:42 +00:00
mateuszb
9c1a117c1c * refactoring 2013-02-12 22:24:48 +00:00
mateuszb
d540723739 * refactoring 2013-02-11 14:42:09 +00:00
mateuszb
86dc9386d6 * refactoring, including a generic solution for IDs 2013-02-10 23:24:57 +00:00
mateuszb
d03dbf64a6 * refactoring 2013-02-09 12:56:35 +00:00
mateuszb
f1c78e3260 * creature ID refactoring
* double week creatures are configurable now
2013-02-07 17:34:50 +00:00
mateuszb
dc091a1ce1 * some work on hero crossover; still buggy 2013-02-05 23:16:13 +00:00
mateuszb
bda92a4a73 * refactoring
* fixed bug 1143
* some work on campaigns
2013-02-05 18:48:46 +00:00
mateuszb
8769f67c5d * JsonReader can convert to enums
* refactoring
2013-02-03 21:05:44 +00:00
DjWarmonger
beb1ca1bf8 - getDate function now uses enum for different modes
- Fixed Black Market (#1195)
- Fixed one-week bonuses removed eveyr day (#976)
2013-02-02 08:29:57 +00:00
mateuszb
c4e03ef0de * enum serialization/deserialization (si32 as basetype ought to be enough for anybody)
* some fields in classes refactored to use appropriate enums (not yet finished)
2013-02-01 22:04:25 +00:00