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

97 Commits

Author SHA1 Message Date
Ivan Savenko
b275d9de72 merge beta branch into develop 2022-12-29 22:08:53 +02:00
Ivan Savenko
7a35bcc812
Merge pull request #1221 from IvanSavenko/warnings_fix
Fix remaining compiler warnings
2022-12-29 21:51:55 +02:00
Andrii Danylchenko
a954cc08fb Made intermediate class to hide some implementation details from header. 2022-12-27 12:55:31 +02:00
Andrii Danylchenko
c271f9187f Connection buffered read cpack. 2022-12-26 21:49:53 +02:00
Andrii Danylchenko
cb13064a62 Socket buffered write. Write full cpack at once 2022-12-26 20:17:53 +02:00
nordsoft
f27a40dd34 Support roads and teams customization in engine 2022-12-17 03:52:40 +04:00
Ivan Savenko
facf77b3ae vstd::unique -> std::unique 2022-12-07 23:36:20 +02:00
lainon
7fdad4e0f6 Code refactor following C++ standard and condition fixes 2022-11-15 03:20:55 +03:00
Tomasz Zieliński
8c481dff46 Fix incorrect templates for mines in HoTA 2022-10-08 12:42:10 +03:00
Andrey Filipenkov
35e1b86683 remove no longer needed adjustments 2022-09-24 15:55:24 +03:00
Andrey Filipenkov
ff635edc0b wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
dde9a5d5d2 todo updates 2022-09-24 15:55:17 +03:00
Andrey Filipenkov
2e18299897 make server a static lib, run it in a separate thread
issues to solve:
- dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. 13CPackForLobby, 20LobbyClientConnected, 20LobbyClientConnected.
- error setting socket option: set_option: No buffer space available
2022-09-24 15:55:16 +03:00
DjWarmonger
7ba271edf1
Rotation rebase2 (#912)
* Instead of [x][y][z] coordinates, map will be stored as [z][x][y].
* Nullkiller AI can get it too.
* Use boost::multi_array instead of nested vectors
* In MapHandler too
* Rotate foreach algorithms, too
* VCAI gets rotated, too
2022-09-18 17:39:10 +03:00
Nordsoft91
e4ac0d4370
Editor prerequisites [part 2] (#889) 2022-09-17 14:04:01 +03:00
DjWarmonger
3d2dc2335b Switch ObjectTemplate to shared_ptr<const> (#870) 2022-09-11 16:13:53 +03:00
Nordsoft91
c4035134e5 New battlegrounds (#758) 2022-09-11 11:31:26 +03:00
Nordsoft91
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +03:00
Andrii Danylchenko
c4dec67acc Fix movement freeze after battle in teleport 2022-06-20 09:05:05 +03:00
Konstantin
c6b198ce14
Warning fix (I moved C++17 and CI to another branch) (#739)
* clang warning fixes
* use CMake 3.10 due to MXE CI does not have 3.13 yet

Co-authored-by: Konstantin <rilian@niisi.ras.ru>
2022-05-19 15:14:50 +03:00
Dmitry Orlov
2a39c401b8 Feature: Opposite Side Limiter. Added: Old saves support. 2021-09-04 14:15:38 +03:00
AlexVinS
ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
Dmitry Orlov
854a2e6c39 Feature: Mods system improvement, Part III. Bunusing buildings customization. 2021-01-14 01:02:13 +03:00
Dmitry Orlov
ef6220ebec Fix: Creature resolution failed when mod is in the custom directory 2020-12-13 03:33:28 +03:00
Dmitry Orlov
d6a4767865 Mod system improvement: Patch 2 2020-10-25 01:04:34 +03:00
Dmitry Orlov
f4816b0824 Mod system improvement Part I : Special buildings should work in the modders towns 2020-10-07 12:35:11 +03:00
John Bolton
a05ae78e67 Fixed lots of warnings.
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed.

4003: not enough actual parameters for macro 'identifier'
4250: 'class1' : inherits 'class2::member' via dominance
4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
2020-10-04 02:20:18 -07:00
krkos
ac81d0f7b4 Fix build with Boost versioni >= 1.70 (#615) 2020-01-21 11:55:28 +03:00
Dydzio
36cb9f11c4 Hardcoded feature: no random week/month effects 2019-03-17 18:27:05 +01:00
Mikko
a77cbc311e
Update JsonSerializer.cpp 2019-01-24 14:49:30 +00:00
Alexander Shishkin
b00e935e4d
Warnings fixes (#538)
Warnings fixes
* Suppress `missing-braces` for Clang
* Fixed many C4275 warnings
* Fixed almost all Clang/GCC warnings
* Silence most frequent MSVC warning.
* Fixed some pessimizing-move warnings
* Fixed some unused capture warnings
2019-01-19 13:52:02 +03:00
Fior.in
47ba3b2476 Hero scheme: allow each hero to have a unique battle animation (#480)
* attribute for battle image added on hero class, allowing on hero schemes each hero have a unique battle .def in 'images' structures sided with portraits and specialties images
2018-08-27 09:42:36 +03:00
Konstantin Vukolov
96215233bc macOS: fix packet deserialization (#479) 2018-08-14 01:03:45 +03:00
Dydzio
393b25eb7f Minor tweaks/fixes 2018-07-29 19:31:01 +02:00
Dydzio
b37ba8e046 Initial version of AI object value config 2018-07-28 00:43:56 +02:00
Karlis Senko
224ea28433 Fix various memory errors related to server and connections.
* keep connection when restarting scenario
* wrong double free in Connection
* multiple use after free when stopping server
* double free of StartInfo
2018-05-01 00:04:20 +03: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
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
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
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
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
Henning Koehler
4ee9d7f65a Configure JSON merge behaviour via #override flag (#423)
* added json flags; override flag affects how structs are merged
2018-03-05 11:30:10 +08:00
ArseniyShestakov
7fd090786c
Merge pull request #379 from henningkoehlernz/hero_specialty_scaling
Hero specialty scaling
2018-02-28 15:03:24 +08:00
AlexVinS
166c04e2e0 Hack fixed serializer assertion by completely disabling AI goals serialization 2018-02-28 15:00:38 +08:00
Henning Koehler
9850e7254e updated serialization version to 781 2018-02-18 23:32:52 +13:00
Arseniy Shestakov
324717acbe Spelling fixes: privilaged -> privileged, retreive -> retrieve 2018-02-10 21:52:23 +03:00