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

7129 Commits

Author SHA1 Message Date
Johannes 'josch' Schauer
ed5df13e50
client/battle/CBattleInterface.cpp: uncomment unused variable until soundh->playSound() is implemented 2018-04-19 15:20:26 +02:00
Johannes 'josch' Schauer
a0be483525
server/CVCMIServer.cpp: remove variable that was only set but never used 2018-04-19 15:18:08 +02:00
Johannes 'josch' Schauer
a54e8c88a9
AI/VCAI/VCAI.cpp: Remove unused variable introduced in 2014 2018-04-19 15:15:22 +02:00
Johannes 'josch' Schauer
8ead3e3b91
lib/CGeneralTextHandler.cpp: fix misleading indentation 2018-04-19 15:12:18 +02:00
Johannes 'josch' Schauer
95bec98936
lib/rmg/CRmgTemplateZone.cpp: Remove a variable that was introduced in 2016 but never used 2018-04-19 15:07:21 +02:00
Johannes 'josch' Schauer
56fefca806
lib/rmg/CRmgTemplateZone.cpp: Add parenthesis to make operator precedence unambiguous 2018-04-19 15:06:26 +02:00
godric3
d9d01f0b68 Exposed more of existing limiters for modders (#449)
* Exposed alignment, faction and terrain limiters
* Limiters toString() use now boost:format
2018-04-17 19:59:30 +07:00
karliss
ad2c429d8f CMake: unittest improvements (#447)
* Convert TestConfig to proper test environment.
* Copy test data to build directory.
* Get test recognized by ctest, but disable gtest discovery. Allowing ctest to run each test individually isn't currently practical because it is 50 times slower.
2018-04-15 18:02:31 +07:00
Arseniy Shestakov
9da3f48274 Code style: formatting and refactoring of launcher code 2018-04-13 15:23:35 +07:00
AlexVinS
d9d5b7b6e5 [c::b] update projects 2018-04-08 18:37:54 +03:00
Arseniy Shestakov
25dea1a599 Code style: formatting and refactoring of VCAI code 2018-04-08 17:43:20 +07:00
Henning Koehler
2ede3783dd Settings: savefrequency is now configurable in launcher
* Client command-line can modify arbitrary settings now
* Only launcher auto-saves to settings.json
2018-04-08 17:12:29 +07:00
karliss
ce0b4b222d Fix double free and use of dead reference when saving (#445) 2018-04-07 22:21:28 +07:00
Arseniy Shestakov
4af288aee4 Refactoring of main menu related code
We need to make sure it's not stay active during gameplay.
Proper fix would require actually removing menu interface from GH, but then GH needs refactoring too.
2018-04-07 18:44:21 +07:00
Alexander Shishkin
5c09f751b3 Gui cleanup3 - UI refactoring to use smart pointers (#440)
* Changed most gui classes to use shared pointers
* Store and use IImage as shared_ptr
* CSpellWindow redesign
* AdventureMapClasses cleanup
* CLabel: store background as smart pointer
* Store CObjectList items as smart pointers
* Removed destroy function of list item
* Store toggle buttons as smart pointers
* Use CComponent as smart pointer
* Attempt to fix artifact merchant drawing
2018-04-07 18:34:11 +07:00
AlexVinS
db60983b5a Fixed broken town`s marketplace 2018-04-06 05:49:18 +03:00
AlexVinS
a8e1c51c36 [c::b] projects update 2018-04-05 21:12:21 +03:00
ArseniyShestakov
1a6f456ac0
Merge pull request #402 from vcmi/feature/multiplayer
Refactoring of all pre-gameplay UI and networking code.
This will break some things, but I'll be able to fix them without constant rebasing.
2018-04-05 23:29:27 +07:00
Arseniy Shestakov
f5d8e5b0cc Move Boost Asio compatibility code to Global.h. Fix by @dydzio06143 2018-04-05 19:35:08 +07:00
Arseniy Shestakov
74e5c5bf05 CGameHandler: rename CPackForClient argument and add network logging 2018-04-04 14:24:32 +07:00
Arseniy Shestakov
674242da54 CCallback: remove unregisterAllInterfaces
Not needed since CPlayerInterface no longer handle interface removal.
It's far better when CClient::endGame doing it since they owned by CClient.
2018-04-04 14:24:32 +07:00
Arseniy Shestakov
ac66fc7f42 Full rework of pre-game interface and networking
New features for players:
* Loading for multiplayer. Any save could be used for multiplayer.
* Restart for multiplayer. All clients will restart together.
* Loading from single save.
* Hotseat mixed with network game. Multiple players per client.
* Now connection to server could be cancelled.
* Return to menu on disconnections instead of crashes.
* Restoring of last selected map, save or campaign on next run.

TLDR on important changes in engine code:
* UI: work with server separated from UI
* UI: all explitic blitting replaced with IntObject's
* UI: all new code use smart pointers instead of DISPOSE
* Gameplay always start through lobby controlled by server.
* Threads receiving netpacks now shared for lobby and gameplay.
* Campaigns: heroes for crossover now serialized as JsonNode.
2018-04-04 14:24:26 +07:00
AlexVinS
1fb25c46d3 cleanup 2018-04-03 21:46:12 +03:00
Arseniy Shestakov
14f03e22da CLabelGroup: add currentSize method
Might be someone will suggest me better name.
And actually I need method to clean group too.
2018-04-03 22:11:14 +07:00
Arseniy Shestakov
ab2b9086d3 CLabel: add methods getWidth, setColor, setAutoRedraw
For somethign like map list we need to change CLabel data without redrawing it.
2018-04-03 22:11:14 +07:00
Arseniy Shestakov
f04cbaf539 Settings: add lastMap, lastCampaign, lastSave to schema
Nice to see last used save game after client restart
2018-04-03 22:11:14 +07:00
Henning Koehler
82f334b503 Enable Limiter nesting with AllOf, AnyOf, NoneOf (#439)
* Renamed LimiterList to AllOfLimiter and added AnyOfLimiter, NoneOfLimiter
* Updated bonus schema to new limiter format
2018-04-01 18:17:34 +07:00
Henning Koehler
6ddcb079a4 Enabled new secondary skills to be created (#438)
* Universities, Scholars and Witch Huts may offer new skills
* Moved encode/decodeSkill to CSkillHandler
* Refactored CSkill interface and CSkill::LevelInfo image storage
* Legacy game constants renamed to ORIGINAL_XXX_QUANTITY
2018-03-31 12:56:40 +07:00
AlexVinS
b09a54fa9c [tweaks] IImage * -> auto 2018-03-30 14:29:55 +03:00
AlexVinS
43acfa160b [tweaks] IImage * -> auto 2018-03-30 14:02:04 +03:00
AlexVinS
031d3204f7 Fixed "Error: accessing unavailable frame" in some cases 2018-03-30 13:40:40 +03:00
Arseniy Shestakov
66e9db4bc3 CMake: extend linker workaround for all MSVC versions for now.
Debug builds in MSVS 2017 are also affected.

32-bit Release builds in MSVS 2015 are probably affected as well.
Though in that case problem only appear for vcmitest, but not client.
2018-03-29 11:05:48 +07:00
Arseniy Shestakov
8577bba417 CMake: add workaround for Visual Studio 2015 linking issue
I tried to workaround it in code, but completely failed that.
So for now we'll just tell linker to ignore multiple definitions.
2018-03-29 02:02:00 +07:00
Henning Koehler
02b5a5e830 Make bonus stacking configurable + fix duplicate propagation/inheritance (#433)
Addresses several related problems:
* Propagation / unpropagation of duplicate bonuses is inconsistent, causing bugs
* Duplicate bonuses never stack, which is not always intended behaviour (e.g. multiple copies of resource generating artifacts)
* Different bonuses always stack, which is not always intended behaviour (e.g. Angel + Archangel morale bonuses)

This is addressed as follows:
* Duplicate bonuses are never eliminated during propagation/inheritance.
* Unpropagation eliminates only a single copy of duplicated bonus
* Bonus receives a new field stacking that determines stacking behaviour:
* * empty string = no stacking with duplicates (default)
* * "ALWAYS" = stacks with duplicates & everything else
* * some other value = no stacking with bonuses with same stacking value
Also Morale/Luck window now hides non-stacking bonuses.
2018-03-27 14:54:58 +07:00
Henning Koehler
2b64bf29ed Fix Issue 2214 (#437)
CGameInfoCallback::getAvailableHeroes: add checks for tavern
2018-03-22 18:14:43 +07:00
AlexVinS
cac83379f5 Fixed https://bugs.vcmi.eu/view.php?id=2928 2018-03-22 12:56:15 +07:00
Alexander Shishkin
5d0cb31504
Merge pull request #434 from vcmi/CADDINFO_FIX2
Bugfix for last CAddInfo bugfix
2018-03-20 04:11:14 +03:00
Henning Koehler
591928fc4b fixed bug introduced in last CAddInfo fix 2018-03-20 12:58:02 +13:00
AlexVinS
df0aa2f69c Removes excess assertion in HeroVisit::applyCl 2018-03-17 17:10:13 +03:00
Henning Koehler
1685641357 Flexible necromancy (#430)
* made IMPROVED_NECROMANCY bonus configurable
* updated cloak of the undead king
2018-03-17 16:46:16 +08:00
AlexVinS
e666b2740c Do not use CCreature in CSimpleArmy 2018-03-17 13:24:12 +08:00
AlexVinS
03cfd2cb78 Do not use StackLocation in netpacks 2018-03-17 13:24:12 +08:00
AlexVinS
8cec07afbd Replaced CGHeroInstance and CGObjectInstance with ObjectInstanceID in NetPacks 2018-03-17 13:24:12 +08:00
Raphnalor
0f00dbf8cf Fix highlighting of a selected bonus for campaign. (#432) 2018-03-17 12:23:22 +08:00
Alexander Shishkin
1e9a3e0fe4
Merge pull request #431 from vcmi/ISSUE_2918
Fixed Issue 2914 & 2918
2018-03-17 02:49:11 +03:00
Henning Koehler
8e7aa910cb spacing fix 2018-03-17 11:32:30 +13:00
Henning Koehler
68b757eb53 fixed CAddInfo::operator[] (mutable version) 2018-03-17 11:03:02 +13:00
Henning Koehler
7f76648a7c Extend Bonus.addInfo to integer vector (#427)
* changed Bonus::additionalInfo to integer vector

* fixed deserialization for old savegames

* removed newline from JsonNode::toJson()

* updated bonus schema; SPELL_AFTER_ATTACK and SPELL_BEFORE_ATTACK use new addInfo format

* removed unnecessary init in Bonus constructor
2018-03-12 08:20:18 +03:00
Raphnalor
83c6ffbda0 Reflect changes in boost::asio released in Boost 1.66. (#428)
The service template parameters are disabled by default for now.
Use BOOST_ASIO_ENABLE_OLD_SERVICES macro to enable the old interface.
2018-03-11 21:02:20 +08:00
AlexVinS
9d108d59db Redone RMG template serialization using JSON serializer, added tests 2018-03-10 19:36:19 +03:00