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

1951 Commits

Author SHA1 Message Date
DjWarmonger
e074c9b310 Merge branch 'develop' of https://github.com/vcmi/vcmi into develop 2014-05-18 09:00:32 +02:00
DjWarmonger
e2d44f6ac6 Fixed #868 - wrong battlefield in ship-to-ship combat 2014-05-18 08:52:03 +02:00
DjWarmonger
9f28e4e4ca Merge pull request #10 from Macron1Robot/works
Bug 0001789 correction (incorrect battle field detection)
2014-05-18 08:26:36 +02:00
Macron1Robot
e4cbfe7f0b Bug 0001789 correction (incorrect battle field detection) 2014-05-18 03:16:53 +04:00
Ivan Savenko
419a2797c8 Implemented basic loading from JSON 2014-05-17 17:50:11 +03:00
AlexVinS
5be005ee36 Try to fix #1763 and a small refactoring 2014-05-17 11:24:26 +04:00
DjWarmonger
1ea6723a32 Merge pull request #8 from xyzz/android-rolling
Android port.
2014-05-17 05:17:54 +02:00
Ivan Savenko
b5160acbac Finalization of object type handler interface
- updated code to use new interface
- removed old DefObjHandler (todo - rename file)

Summary:
- most code but loading is now in place
- type names may deserve improvements (some of them are too similar)
- still barely compiles and not tested
2014-05-16 23:50:02 +03:00
Ilya Zhuravlev
db7cd79cf7 Android port.
Conflicts:
	lib/vcmi_endian.h
2014-05-16 23:24:29 +04:00
DjWarmonger
eb337d7407 Fixed #1638 - spells banned in map settings appeared in town guild 2014-05-16 12:15:35 +02:00
Ilya Zhuravlev
3c35b3eefe Replace defined(linux) with __linux__/__linux/linux in vcmi_endian.h 2014-05-14 09:49:25 +04:00
beegee1
60f6c00f2e Logging API: - removed unused method declaration - updated comments - ensured thread safety 2014-05-10 21:12:33 +02:00
AlexVinS
3e101d89ef few formatting. Mostly space-> tab 2014-05-07 03:58:58 +04:00
DjWarmonger
fb5152254d Merge branch 'develop' of git://github.com/Macron1Robot/vcmi into WarmysBackup
Conflicts:
	client/CKingdomInterface.cpp
2014-05-02 12:03:02 +02:00
Macron1Robot
345df14d60 Update JsonDetail.cpp
Replaced new JSON by previous version of JSON comitted by IvanSav and added video file test again
2014-04-30 13:11:04 +04:00
Macron1Robot
9494c6d335 Update JsonDetail.cpp
Added video file existence check
2014-04-29 21:53:50 +04:00
Macron1Robot
cd7ec5716f Update CObjectHandler.cpp
Changed type of "for" variable to auto in dailyIncome
2014-04-28 23:23:24 +04:00
Macron1Robot
558b155c0e Update CTownHandler.h
Removed definition of unnecessary type
2014-04-28 23:18:56 +04:00
Macron1Robot
324bb3c98d Update CModHandler.h
Returned type of loadConfigFromFile back to void
2014-04-28 23:17:24 +04:00
Macron1Robot
13ea6e39f0 Update CModHandler.cpp
Removed checking of defaultMods.json values
2014-04-28 23:15:36 +04:00
Macron1Robot
a3aa7314fe Update CObjectHandler.cpp
Corrected daily resource income calculation for town buildings
2014-04-28 18:22:21 +04:00
Macron1Robot
2355f3abe1 Update CModHandler.cpp
Corrected errors
2014-04-28 11:07:44 +04:00
Macron1Robot
13cd400d27 Update CModHandler.cpp
Corrected error handling in CModHandler::loadConfigFromFile
2014-04-28 11:03:54 +04:00
Macron1Robot
7c1d3d17fc Update CTownHandler.cpp
Corrected hadling of null "produce" section for legacy mod to make it more readable
2014-04-28 10:48:00 +04:00
Macron1Robot
1982ca861b Update CObjectHandler.cpp
Deleted commented text and excessive assignment
2014-04-28 10:37:18 +04:00
Ivan Savenko
d805376ab8 Mostly final interface for object type handler
Partial implementation of object with reward constructor
2014-04-27 20:37:53 +03:00
DjWarmonger
4a71442c80 Missing changes. 2014-04-27 14:38:20 +02:00
Ivan Savenko
153dd1f5f9 - Added new files that should have been in last commit 2014-04-27 15:19:23 +03:00
Macron1Robot
8ec7a9b919 Moved "max heroes on map per player", "max heroes available for player" to "defaultMods.json" 2014-04-27 10:43:46 +04:00
Macron1Robot
907caedb13 Added "produce" section in "building" structure. Changed dailyIncome. 2014-04-26 18:23:35 +04:00
Ivan Savenko
7725232253 backup of current progress, started design of "Object configurer" that
will be responsible for configuring of ObjectWithReward's from json
config.
2014-04-25 17:59:05 +03:00
Macron1Robot
b7b890acff Added "tavernVideo","guildBackground" to "faction" JSON config and schema. If "primaryResource" is set to "gold", silo will generate 500 gold per day 2014-04-24 23:36:18 +04:00
DjWarmonger
9e7013de77 Backup for my own MVS project configuration 2014-04-24 21:07:43 +02:00
O01eg
8110b65647 Fix for linking in MS VS and CodeBlocks. 2014-04-24 19:54:05 +04:00
O01eg
334bd28bd4 It compiles with -gdwarf-3 2014-04-20 14:10:46 +04:00
O01eg
c6238588bd Rename new files. 2014-04-20 12:58:58 +04: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
Ivan Savenko
a6c0886d03 It is possible to remove object as part of "reward" 2014-04-12 16:47:48 +03:00
Ivan Savenko
2c8af871fc Added possibility to add custom components to reward description.
Used to properly display morale/luck rewards since bonuses don't provide
components associated with them.
2014-04-12 16:16:23 +03:00
Ivan Savenko
cb5b5a05c1 Player can refuse single reward (e.g. Tree of Knowledge) 2014-04-12 14:47:20 +03:00
Ivan Savenko
a4e7987835 Fixed some missing elements, mostly messages 2014-04-12 14:35:48 +03:00
Ivan Savenko
ba5092d669 Some bugfixing, basic functionality of map objects seems to be working 2014-04-11 22:49:25 +03:00
Ivan Savenko
d14a16249d Core functionality for new objects in now in place, not yet tested
- added selection of rewards
- moved "on grant" message to reward struct
- multiple minor fixes
2014-04-11 20:38:27 +03:00
beegee1
1d57b75bc5 - random number generation refactoring
- fixed mantis #1743
2014-04-10 19:22:32 +02:00
Ivan Savenko
dab9fd7148 Heroes will be properly marked as visited on visiting 2014-04-07 20:32:15 +03:00
Ivan Savenko
8beea4ec6a More work on configurable objects:
- maps can be started
- visiting will be registered properly
2014-04-07 14:56:59 +03: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
beegee1
48e7b7d805 - Some performance improvements for logging 2014-04-01 19:46:47 +00: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
ec54381b12 Some more optimization. 2014-03-31 15:26:47 +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
DjWarmonger
8683c8c0eb - Added and improved some propagators, including Crystal Dragons ability (#1232)
- Minor refactoring in AI
2014-03-29 21:39:19 +00:00
Ivan Savenko
1cec8d4cfc Some bits towards replacements of objects.txt, first step towards
configurable objects support:
- fixes for object template loader
- schema for current object template format
2014-03-23 20:26:18 +00:00
Ivan Savenko
771c1ce255 - some effords to get rid of bottlenecks in AI code
- fixes, probably partially #1577
- enabled code for reading map object templates from json, still not
used
- disabled PCH for launcher due to speed issues.
2014-03-23 16:36:16 +00:00
Ivan Savenko
9c0df68cb8 Fixing spelling mistakes. Patch from josch, fixes #1759 2014-03-23 12:59:03 +00:00
Ivan Savenko
760ae7d44a Changes related to Debian packaging, based on josch patch
- AUTHORS file is now in UTF-8
- tags for desktop files
- fixed some typos
- better reaction on --help and --version commands
- vcmibuilder should work with both avconf and ffmpeg
2014-03-20 18:17:40 +00:00
Ivan Savenko
333a51a48a Launcher now supports submods. See forum thread for details. 2014-03-20 17:06:25 +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
alexvins
1aff899f5b Hotfix 2
* fix loading range attribute
* fix config for massive spells
2014-03-17 14:39:28 +00:00
alexvins
8cc586ab7f hotfix 2014-03-17 14:06:32 +00:00
alexvins
9cac0af7be [Spells] More spell related refactoring
+ smart target modifier
- CREATURE_EXPERT_MASSIVE target type
* save format changed

spell format changes already documented in http://wiki.vcmi.eu/index.php?title=Spell_Format
2014-03-17 13:11:10 +00:00
Ivan Savenko
7f6f125b4c First part of submods support.
- VCMI will load mods from Mods directory recursively. Submods must be
placed into additional Mods directory, e.g.
<data dir>/Mods/<mod name>/Mods/<submod name>

- submods will be loaded only if their parent mod was enabled
- submods namespace for objects will be "<parent mod ID>.<submod ID>"

- TODO: Launcher is not aware of submods yet (seems to be working but
may behave incorrectly)
2014-03-15 10:57:34 +00:00
alexvins
065b8366fb [Spells] Added basic support for icons and sounds
* few changes in spell format
* save format changed
2014-03-10 16:00:58 +00:00
alexvins
9f01a92f4c fix crash in jsonschema in case of invalid typename 2014-03-10 15:58:13 +00:00
DjWarmonger
1d6e265e34 - Fixed special spells spawning in Pyramid
- Allowed new spells to spawn in Pyramid
2014-03-09 12:33:26 +00:00
DjWarmonger
0347c61dd2 All new spells will be possible to spawn in town magic guilds. 2014-03-09 09:37:20 +00:00
alexvins
c959fdcce0 SpellHandler: cleanup, formatting, simplification. 2014-03-08 23:18:51 +00:00
Michał W. Urbańczyk
7d1e54baa7 Fixed compilation with MSVC. 2014-03-08 19:02:47 +00:00
Ivan Savenko
d2ae847ecf - files in local directories (saves & configs) now always have higher
priority than mods. Fixes #1685 and #1733
- fixed possible crash on exit in dispose() function
- (vcmibuilder) fixes problem with partial mp3 -> ogg conversion
2014-03-08 16:05:23 +00:00
alexvins
afcb7072eb Implemented #1379
+ added new flag for special spells. Special spells can be obtained only with BONUS::SPELL.
* made Titans` thunder special.
2014-03-07 16:10:20 +00:00
alexvins
33935ceb67 cmake/msvc project updates. untested. 2014-03-07 13:23:30 +00:00
alexvins
4203d69525 Part 2 of new spell configuration
1) spell handler refactored to support modding in general way
2) imunnity icons moved to WoG as they depends on wog`s graphics
3) introduced new class template for handlers (todo: use this in other handlers)
4) save format changed
5) introduced "absolute immunity" - unaffected by "the Orb" etc. (todo: use it in config)
6) new format documented on wiki, added json schema.

* more split of registertypes - fixes 32 mingw build
2014-03-07 13:21:09 +00:00
Ivan Savenko
5cbec833c2 - (linux) XDG filesystem support
BIG NOTE TO LINUX USERS
All user data has been moved according to XDG specs:
- Game data (H3 files and mods) and saves: from ~/.vcmi to ~/.local/
- Temporary files, including logs: from ~/.vcmi to ~/.cache/vcmi
- Config files: from ~/.vcmi/config to ~/.config/vcmi

For compatibility VCMI will read game data from ~/.vcmi as well but this
is temporary behavior and will be removed
2014-03-04 14:51:10 +00:00
Michał W. Urbańczyk
fe4171eb63 Fixed #1719. 2014-03-01 17:41:29 +00:00
Michał W. Urbańczyk
a6f68d6870 Fixed #1726. 2014-03-01 13:42:23 +00:00
Michał W. Urbańczyk
2e04738859 Version bumped to 0.95. 2014-03-01 12:24:15 +00:00
Michał W. Urbańczyk
93856dbe98 Quick solution for #1688. 2014-02-27 20:44:20 +00:00
Michał W. Urbańczyk
07aef4f2f6 Compilation fixes for MSVC (relative include paths) 2014-02-27 20:42:17 +00:00
Michał W. Urbańczyk
71e76966af Updated MSVC project file after registerTypes split. 2014-02-27 20:35:05 +00:00
beegee1
55a4561926 - fixed mantis #1729 2014-02-26 19:51:44 +00:00
Ivan Savenko
78609871ae bugfixing:
- fixed parsing of campaign bonuses (conversion to building ID)
- CONTROL event condition can be also fulfilled by allies
- fix for crash on opening exchange window in Russian version
2014-02-26 17:32:42 +00:00
Ivan Savenko
8d36bcabce Split registerTypes into multiple files, now in lib/registerTypes
directory in order to reduce huge memory usage by gcc
2014-02-24 19:57:33 +00:00
Michał W. Urbańczyk
6d73052ca1 Development release 0.94f 2014-02-23 23:45:58 +00:00
stopiccot
d66f0222f2 more portable OS X library install names 2014-02-23 16:40:55 +00:00
beegee1
d0a5a6eab4 - Implemented hero recreate handling correctly 2014-02-23 13:52:06 +00:00
beegee1
8a9f2781c2 - Fixed #1674 (Xeron should be re-created on AB campaign)
- Remove all hero placeholders after placing campaign heroes
2014-02-19 19:14:32 +00:00
Ivan Savenko
b5568edcc0 fixed compilation with gcc/clang
fix for #1699
2014-02-19 07:27:41 +00:00
Michał W. Urbańczyk
1e555a8ee3 Improved serializer. See: http://forum.vcmi.eu/viewtopic.php?p=11562#11562
Save format changed, removed compatibility workarounds.
2014-02-19 01:04:27 +00:00
DjWarmonger
a3cad2883f - Restored correct specialty serialization (#1599 and all its children)
- Fixed rare AI crash
- Fixed AI visiting some objects many times
- Some cleanup and refactoring
2014-02-17 17:28:39 +00:00
DjWarmonger
6ee823298a - Various improvements for exploration
* Heroes will try to use SectorMap if there are no accessible tiles
* Remove some loopholes and pitfalls when all the ways are blocked
* Fixed AI not conquering some (reserved) objects
Still missing: SectorMap does not use Subterranean Gates :(

- Improvements for army exchange
* Fixed exchange condition
* Bidirectional exchange is possible
2014-02-17 07:36:03 +00:00
DjWarmonger
d8933b5c36 - AI will now use SectorMap to find a way to guarded / covered objects.
- Improvements to SectorMap needed for use of multiple heroes
2014-02-15 16:38:51 +00:00
alexvins
d01b84b460 [mechanics] fix copy-paste errors in magic skill arrays
[c::b] few tweaks to configuration
2014-02-15 09:40:33 +00:00
Ivan Savenko
48d6e2cd59 - move campaigns description into new config file, campaignSets.json
- campaigns parser uses binary reader, fixes #1711
- fixed description of change resolution button
2014-02-14 22:46:06 +00:00
Michał W. Urbańczyk
f5e3e578e6 Version bump 0.94e. 2014-02-09 22:44:57 +00:00
Ivan Savenko
8d178fbcf5 Minor fixes:
- fog of war will be initialized after bonuses are set (needed if heroes
have scouting or arts with sight bonus)
- victory condition "control all dwellings" also requires golem factory/
- it is possible to dismiss troops during exchange between heroes
2014-02-09 19:47:23 +00:00
Ivan Savenko
7f07a30d7d More fixes for map-specific crashes, fixes #1427 and #733
- if special victory condition is present AND there is only one player
normal victory condition will be disabled
- added new triggered condition, constant value
- if target of CONTROL/DESTROY condition is removed from map, triggered
condition will be replaced with constant
- fixed randomization of armies with random stacks
2014-02-09 12:10:02 +00:00
Michał W. Urbańczyk
30aa07f86c Fixed #1652. 2014-02-09 09:57:00 +00:00
Michał W. Urbańczyk
343dd1a7d1 Properly removing stuff from hero, fixes #1646. 2014-02-08 23:07:33 +00:00
Michał W. Urbańczyk
d6f8a6d4bf Preparing crossover heroes works on deep copies of heroes, so the original post-mission state is not lost in the process. 2014-02-08 22:14:54 +00:00
Michał W. Urbańczyk
43ef565e7e Added serializer-based class able to make deep copies of objects — CMemorySerializer.
CGameState::init will work on the deep copy of StartInfo.
Some casts to reduce warnings.
2014-02-08 21:54:35 +00:00
Ivan Savenko
e6f433795b - fixed some crashes on staring a map/campaign 2014-02-08 21:05:24 +00:00
Ivan Savenko
562dc02b3b - fixed crash on decompressing some files from gzip stream (reported on
forums)
2014-02-08 10:30:10 +00:00
beegee1
95034b9fa0 - Updated PCH to use our StdInc.h as the prefix header (not generated one from cotire) -> no exclude headers from ffmpeg/etc... statements required
- Fixed compilation error (VCAI ResourceSet logging)
2014-02-05 20:25:36 +00:00
Michał W. Urbańczyk
8eafb9f951 Savegames loader fixed to properly know save version. 2014-02-02 14:54:12 +00:00
Michał W. Urbańczyk
55165a8535 Fixed #1686. Compatibility measures to be removed later, when format changes become to big. 2014-02-02 14:31:56 +00:00
Ivan Savenko
94a6e02107 - found yet another missing victory condition, fixes 1684 2014-02-02 11:05:05 +00:00
Michał W. Urbańczyk
fabbe1eae8 Version bump. 2014-02-01 21:34:28 +00:00
beegee1
df0a28d9cb - added PCH compilation for CMake using cotire module (PCH is OFF per default, can be enabled with ENABLE_PCH=ON) 2014-02-01 13:37:26 +00:00
Ivan Savenko
6e252aa0d5 - metadata will be printed before node value, fixes #1678 2014-02-01 13:23:12 +00:00
Michał W. Urbańczyk
6f8974bab3 Fix for #1673 — objects vector may contain nullptr (for objects that have been removed). 2014-02-01 12:54:55 +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
Ivan Savenko
27be6a8f13 - new mods (not mentioned in modSettings.json) will be enabled by
default
2014-01-30 14:51:15 +00:00
Ivan Savenko
3779a54ddd - probably fixed 1671
- fixed missing loss condition in Birth of Barbarian
- fixed some bugs found by cppcheck
2014-01-30 11:08:37 +00:00
Michał W. Urbańczyk
f159f28b9f Version bump 0.94c. 2014-01-29 16:55:38 +00:00
DjWarmonger
5377b163d2 Compile fix for Windows. 2014-01-21 17:03:21 +00:00
alexvins
f837afdc47 CBonusTypeHandler small refactoring 2014-01-19 13:29:13 +00:00
alexvins
16d6292be9 [refactor] extract often used classes from lib\NetPacks.h to separate header - less dependecies on whole packets class tree
[mingw build] fix linking issues with netpacks. 
Mingw build is finally fixed! 

[c::b] update projects

[config] fix and cleanup spell_info.json
2014-01-16 20:24:06 +00:00
Ivan Savenko
c5b74a2dce Miscellaneous fixes:
- proper block of "back" button in campaign menu.
- proper block of AI switch in battles
- vertical garrisons can now be attacked from top
- better UI logging, vcmi will print to log file all pressed buttons
- server will not try to build already existing building
2014-01-13 17:44:21 +00:00
Ivan Savenko
fb5c9fc972 - creatures availability tests no longer check for built buildings.
Fixes #1650
- do not crash if town has 0 creatures on some dwelling level
- do not crash if dwelling for some level is not present in town at all
2014-01-11 18:12:09 +00:00
Ivan Savenko
bc1e726be4 - fixed crash on loading modsettings.json from 0.94 2014-01-09 20:15:32 +00:00
Michał W. Urbańczyk
4674e8e3d8 Initializing CHeroClass::commander. 2014-01-06 17:45:21 +00:00
alexvins
a740f7989c [c::b] update projects, disable PHC for now, +few fixes (still wip) 2014-01-05 17:48:50 +00:00
Ivan Savenko
1f325bafb3 fixes #1619 and #1647
- removed some no longer needed code from map handler
- blocked "back" button on campaign map screen if some of scenarios are
already completed
2014-01-05 13:45:44 +00:00
Michał W. Urbańczyk
5e812492e0 VC project updated. 2014-01-04 23:01:28 +00:00
beegee1
22e119770a Fixed mantis #1645 2014-01-03 16:36:22 +00:00
alexvins
339e1cd98b [c::b] project file for minizip, lib & client update (wip) 2014-01-03 15:43:54 +00:00
Ivan Savenko
2c4c964a45 Large rewrite of adventure map objects:
- replaced CDefObjInfo with ObjectTemplate class
- ObjectTempate is a direct member of objects instead of pointer with
shared ownership across CMap, handler and game objects
- simplified handling of objects that can change appearance (e.g. towns)
- all object queries regarding object appearance/blockmaps use h3m pos
instead of relative positions
- removed need of modhandler::reload
- cleanup of some old code
2014-01-02 23:48:38 +00:00
Ivan Savenko
2b9e074d54 - implements level limit (Mantis #1620)
- added workaround to weird bug where vcmi fails to find objects for
win/loss conditions
2014-01-01 16:12:53 +00:00
Ivan Savenko
cd8a0c01e4 Data for campaign win/loss conditions. All campaigns should now have
correct conditions.
All custom conditions are now validated using schema.

Note that some of scenarios may not work due to instant win/loss, mostly
because some placeholders fail to import (Mantis #1643)
2014-01-01 13:30:31 +00:00
beegee1
aff704d1ca - Fixed mantis #1643 2013-12-31 16:58:11 +00:00
beegee1
5971ceaa7f - Fixed hero / army strength handling 2013-12-31 16:11:18 +00:00
Ivan Savenko
7e02f6b670 Support for overriding victory/defeat conditions from h3m map or
campaign:
- new file MapFormatJson that implements small subset of Json map
format, as described on wiki
- vcmi will read overrides from file config/mapOverrides.json (currently
empty)
- Json writer for logical expressions

TODO: write data for map overrides
2013-12-30 23:09:58 +00:00
beegee1
a03d01bd3f - Updated TODOs, removed unused method declaration, updated comments
- Fixed hero strength calculation (power, knowledge should be included as well)
2013-12-30 20:04:24 +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
a8b9258840 missing dll_linkage 2013-12-29 14:35:38 +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
Ivan Savenko
f6c1dace6c Minors:
- By default, cmake will keep debug info
- removed warnings from adventure map infobox (part of #1636)
- adventure map infobox will refresh on artifact changes (part of #1636)
- moved terrain music files to terrains.json file
- player should act before AI in all games, not only campaigns
2013-12-28 18:57:08 +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
Ivan Savenko
7806bda663 fixed possibly duplicated skills on levelup 2013-12-23 16:05:19 +00:00
beegee1
11ca1ec1f8 - Fixed custom main hero handling (map options)
- Refactoring
2013-12-23 15:59:37 +00:00
DjWarmonger
473250e223 - Removed slow and buggy part of exploration code
- Various tweaks and performance improvements. remove_if on long vector is a bad idea.
2013-12-21 17:34:59 +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
Ivan Savenko
29f4a12814 - fixed some evil memory leaks
- fixed recursive dependency of castles
2013-12-19 19:43:16 +00:00
DjWarmonger
f8028f512d Fixed #1585 - destroyed war machines will be removed from hero's equipment. 2013-12-19 14:35:49 +00:00
beegee1
f0cbbbdb70 - Refactored method CGameState::init 2013-12-18 18:18:12 +00:00
beegee1
b9b25ef552 - Fixed mantis #1422 (starting another scenario crashes VCMI for now)
- Refactoring
2013-12-16 18:39:56 +00:00
Ivan Savenko
7d7e65a316 changes in hero class format:
- new property: affinity (might/magic) since in mods it is impossible to
rely on odd/even numeric indexes
- property commander is now part of hero class
2013-12-13 18:27:54 +00:00
Ivan Savenko
c7899fc14a - improved detection of missing files
Now vcmi will detect situations when file is present in another mod
which is not marked as dependency
2013-12-13 08:53:44 +00:00
Ivan Savenko
ed329c5a1f - minor refactoring for filesystem, moved checksum calculation to
loading stage from initialization
- fixes for launcher
2013-12-11 17:12:39 +00:00
beegee1
69eee05ccc - Partially fixed mantis #1065 (Gate with hex 95 can't be attacked)
- Fixed 'catapult tried to attack non-catapultable hex!' problem, now catapult attacks attackable wall parts only
- Fixed problem that the server performed applying damage on a wall part twice
- Added methods for checking what wall parts are attackable and if a wall part is potentially attackable
- Added functionality to trace net packages
- Added functionality to trace std::vectors
- Added tracing for CatapultAttack(CPack)
- Updated various toString methods to use {} instead of []
- Refactoring
2013-12-08 17:54:13 +00:00
Ivan Savenko
5de70ba235 Minor fixes:
- properly re-enable necessary mods during update
- do not crash if building border is fully-colored
2013-12-08 10:07:06 +00:00
beegee1
30b3081ac4 - Fixed castle.json (building structures) 2013-12-07 12:23:43 +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
Ivan Savenko
6427827b33 Fixed extremely slow parsing of maps directory 2013-12-06 09:13:55 +00:00
Ivan Savenko
122db9963b More string ID's for buildings:
- town hall slots now use string ID's
- converted building requirements to new format
- "upgrades" property from buildings now uses string ID's
- several fixes for improved support of alternative creatures
- removed no longer needed "id" property from structures

Old mods should still work but will produce error messages during
validation
2013-12-04 10:36:39 +00:00
Ivan Savenko
b1e638d1af More fixes:
- logical expressions should compile without cpp include
- fixed #1608 and #1610
2013-12-04 03:54:02 +00:00
DjWarmonger
b3b523b768 Compile fixes for MVS. 2013-12-03 15:24:13 +00:00
Ivan Savenko
3d3f93275d Multiple minor fixes:
- fixed starting armies of some heroes, including Bron #1602
- (debian) added vcmi-dbg package with debug information
- proper randomization of hero secondary skills, fixes #1603
- second capitol will show up as disabled immediately #1604
- proper deserialization of boost::variant
- empty file will no longer crash JsonNode parser
- fixed some compiler warnings
2013-12-03 09:03:37 +00:00
Ivan Savenko
ee1b0459e6 Extended building dependencies:
- buiding/structure lists must use object format. This may break some
outdated mods.
- generic support for logical expressions that consist from and/or/not
operators.
- string ID's for buidings are now actually used.
2013-12-02 11:58:02 +00:00
DjWarmonger
1e619c95bc Bumping version for Povelitiel request. 2013-12-01 16:30:52 +00:00
beegee1
36a69aaa2f - Fixed VS project files (added missing .cpp files)
- Structured VS project files (added a filter for every subfolder)
2013-11-30 14:22:03 +00:00
beegee1
41e274b4aa - Moved FunctionList from /client to /lib -> used in client and server
- Updated project files
2013-11-30 10:08:38 +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
Ivan Savenko
27a30b5ff9 - compile fix
- fixed crash if json defines only one creature horde
2013-11-24 11:36:51 +00:00
DjWarmonger
e6bb39d3a4 More work on VCAI Goals, still derived functions are not called :/ 2013-11-23 12:30:10 +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
beegee1
39d3102905 - Fixed compilation errors on clang
- Removed compiler warnings of unused variables
2013-11-16 09:17:19 +00:00
Ivan Savenko
2b3405fa50 - minor optimizations
- fixed incorrect error reporting in launcher
- set WoG version to "0.0.0" so full version will be installed from repo
in future
- updated debian required packages list
- launcher will be enabled by default
2013-11-14 13:21:09 +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
f56cccb716 - fixed bug where having towns with less than 16 heroes would result in
invalid random heroes on map start.
2013-11-12 10:09:55 +00:00
Ivan Savenko
29d655c621 Trying to organize mod handler a bit better.
- vcmi will now generate checksum for base game (H3 data)
- only text files in Data in config directories affect checksum
2013-11-11 20:11:51 +00:00
Ivan Savenko
f691061d94 A bit improved error reporting for checksum calculation. 2013-11-10 13:43:55 +00:00
DjWarmonger
1657f124e1 - Compile fixes for MVS
- AI goals will now be handled by smart pointers
2013-11-09 21:29:46 +00:00
Ivan Savenko
29e98b2d51 - modhandler will only validate new, changed or mods that failed
validation last time.
- fixed several issues with modSettings.json file
- some refactoring of modhandler, still needs some work.
2013-11-09 19:10:16 +00:00
beegee1
e01ef8e36a - Fixed mantis #1576 (doesn't hang game)
- Implemented output stream operator<< for various classes(BattleAction, BattleHex,...) to improve debugging and logging
2013-11-09 16:25:20 +00:00
Ivan Savenko
55577d0ac4 - fixed missing DLL_LINKAGE
- use precalculated checksum for zip files
- UNUSED macro to silence some warnings
2013-11-09 13:49:36 +00:00
Ivan Savenko
dd73573c5c - vcmi can now calculate crc32 checksum of a file
- reorganized internal filesystem structure - all files from one mod are
now grouped in same FS node
- modhandler will now calculate crc32 checksum for each mod
- modhandler now knows validation status of each mod

todo - use checksum to determine mods that have not changed since last
start and disable validation for them.
2013-11-08 20:36:26 +00:00
Ivan Savenko
ee6cdbeffe went through the rest of cppcheck warnings, mostly harmless 2013-11-07 12:48:41 +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
0e3eae3095 patch from KroArtem 2013-11-03 12:51:25 +00:00
Ivan Savenko
c4716d0a9a - reordered files in cmake so files with long compile times will be
compiled first.
- changed format of modSettings.json, VCMI should properly update file
on the first run.
- implemented property "defaultTavern" that acts as default value for
"tavern" entry in hero class and town formats.
2013-11-03 12:07:23 +00:00
Ivan Savenko
6cb3cb006d Several minor fixes/features
- moved all traslatable strings into one json file, removed threats.txt file
- implemented "spellbook animation" option
- fixed missing central tower when attacking fort
2013-10-27 13:05:01 +00:00
Ivan Savenko
9237e6d97d Improved json validation
- split JsonNode.cpp into JsonNode and JsonDetail files
- validation should be notably faster (at least 10% faster loading)
- support for "format" field, allows checking existance of files.
- minor fixes in schemas
- msk/msg files are now optional
2013-10-26 19:33:34 +00:00
Ivan Savenko
e2c037402c Unicode support.
- boost-locale library is now required (boost 1.48 or higher)
- Unicode namespace that contains UTF-8 handling
- All non-ASCII strings from H3 data will be converted to UTF-8 during loading
- All JSON files MUST use UTF-8. 
- H3 data encoding can be selected via launcher or directly in config file
2013-10-25 21:45:14 +00:00
Michał W. Urbańczyk
fde8c71c5e Fixed setting -1 as hero direction that was causing crashes, like #1488. 2013-10-13 20:05:34 +00:00
Michał W. Urbańczyk
f927bca146 Index for pyramid. 2013-10-13 16:05:41 +00:00
DjWarmonger
cc505ce935 Fixed values for some of stack experience bonuses.
TODO: Move 0-level bonuses from CREXPBON.txt to wog mod.
2013-10-12 18:23:01 +00:00
stopiccot
585024e763 Fixed OS X client and server paths 2013-10-07 03:19:11 +00:00
stopiccot
cbc8cde10a some OS X fixes 2013-10-07 01:19:02 +00:00
Michał W. Urbańczyk
4a9194a644 Version set to 0.94.
Updated changelog.
2013-10-01 18:44:44 +00:00
Ivan Savenko
d09294e40a compile fix, fixes blit order of heroes in siege 2013-09-30 08:45:26 +00:00
Michał W. Urbańczyk
5cd17cd338 Version set to 0.93e. 2013-09-29 22:37:38 +00:00
Michał W. Urbańczyk
dca1f709a9 And another one. I'm sloppy today :( 2013-09-29 21:31:14 +00:00
Michał W. Urbańczyk
5c6d12400f Fixed AI detection of battle end (solves some freezes). 2013-09-29 20:54:29 +00:00
Michał W. Urbańczyk
9ee3133077 Fixed crash on game start when buildings are customized, should finally solve #1444. 2013-09-29 20:53:45 +00:00
Ivan Savenko
84dea676f2 compile fix, fixes missing end-of-line #1483 2013-09-28 13:32:49 +00:00