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

404 Commits

Author SHA1 Message Date
Andrii Danylchenko
4b4cc3cf4b battlefields in VLC and custom bonuses for terrain patches 2022-09-11 11:31:27 +03:00
Nordsoft91
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +03:00
Nordsoft91
5054ee011a Rmg water support (#751)
* Roads added to shipyard
* Load general rmg parameters from config
* Fix issue with default zone guard
* Move magic numbers related to balance to randomMap.json
2022-06-11 18:40:24 +03:00
Nordsoft91
5c1a66ab69 Rmg water support (#745)
* RMG: water support and refactoring
* Fix seers hut bug
2022-06-11 18:40:24 +03:00
Nordsoft91
9d06e51631
Place proper towns in underground (#743)
Implement feature of proper town selection in underground and surface
* Some minor refactoring of rmg
2022-05-28 16:03:50 +03:00
Nordsoft91
a8265c7052
[0002285] Implement feature with extra resources near mines (#742)
* RMG: clear start position
* [0002285] some heaps of resources are placed nearby mines
* Fix leak in case of inability to place resource
* Fix indentation according to vcmi style
* Add constant for random amount of resources
* Code review fixes
2022-05-23 13:08:36 +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
Andrii Danylchenko
8b11b42aaf Fix RMG to place special dwellings like elemental conflux 2022-04-09 10:57:24 +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
55b3f0b24c Fix: Map objects sometimes do not increment primary skills for some heroes 2021-02-13 00:24:14 +03:00
Dmitry Orlov
3cb0dfb143 Fix: RMG issues: 1) hota 2) assertions 2020-10-25 01:03:32 +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
laikh
edc1d06f4e Random Map Generator Option: Allow having more computer only players than human/computer players
Remove unused variable humanPlayersCount and function getHumanOnlyPlayerCount()
2020-07-07 19:45:53 +08:00
Michał Kalinowski
ac6b477aa2 Simplify statements
-Simplify return statements across the code
2019-03-31 09:43:14 +03: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
Michał Janiszewski
7be9aa4868 Prevent shadowing of function arguments by local vars 2018-10-29 16:56:14 +01:00
Alexander Shishkin
f563712782
fix formatting
Co-Authored-By: godric3 <godric3@users.noreply.github.com>
2018-10-28 16:36:11 +01:00
godric3
7ded9dbda8 Fix crash when generating random map with random number of players 2018-10-27 18:18:08 +02:00
DJWarmonger
273802c92c I have no idea what I'm doing 2018-07-26 12:14:29 +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
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
9d108d59db Redone RMG template serialization using JSON serializer, added tests 2018-03-10 19:36:19 +03:00
AlexVinS
26aad17295 Actually copy zone data from map generator template
* fixes https://bugs.vcmi.eu/view.php?id=2482
2018-03-05 17:05:48 +03:00
Nikolay Shalakin
3795985de9 Eliminate warnings / errors. Pull request #388 2018-02-11 15:17:14 +03:00
Michał Kalinowski
26a222ac62 Change JsonType to enum class (#393)
Change enum JsonType to enum class JsonType
2017-11-27 00:18:18 +03:00
DJWarmonger
8f42cdea67 Refactoring: use private pointer to CMapGenerator 2017-11-03 21:03:51 +01:00
AlexVinS
0868164147 (int) -> static_cast<int> 2017-08-12 15:43:41 +03:00
AlexVinS
15138c23de Finished conversion to new logging API
* removed logger streams
* (float3|int3)::operator() -> (float3|int3)::toString(), it was too ugly and confusing.
2017-08-11 23:06:27 +03:00
AlexVinS
143ff682bc Logging cleanup 2017-08-10 21:59:55 +03:00
AlexVinS
85e952f25f Logging cleanup 3 2017-08-10 20:17:10 +03:00
AlexVinS
61e241308d Logging cleanup 2017-08-10 19:52:05 +03:00
ArseniyShestakov
9d9c026c85 Code style: serialize everything on own lines for easier debugging (#357) 2017-07-31 16:35:42 +03:00
Arseniy Shestakov
cdd9dbc7f1 Code style: avoid some ambiguous else if indentation
If some code intentionally want to break else if to achieve specific indentation there must be braces.
2017-07-19 03:42:26 +03:00
ArseniyShestakov
a4c0ad94b1 Code style: remove default value hints in definitions (#342)
Some are outdated and this is something IDE are useful for.
2017-07-15 14:08:20 +03:00
Arseniy Shestakov
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
Arseniy Shestakov
dbcd79c48a Code cleanup: remove double and unneded semicolons 2017-07-12 22:01:10 +03:00
DJWarmonger
4d1fb67594 Sanity check for Coverity #1366290.
(Vector should never be empty, especially for chosen zone).
2017-05-27 21:37:05 +02:00
DJWarmonger
346d2ac588 Possible fix for #2681. 2017-05-27 14:57:45 +02:00
AlexVinS
a85b4cf2a5 * WIP on event condition format
* Hero portrait serialization
* Fix town spells serialization

* Added support for float exponential part in Json
* Added support for int64 in Json
* Added basic Hero definitions serialization
* Added rumors serialization
* Advanced player info serialization.
* Added Disposed heroes serialization, (!) not covered with tests yet
* Added Local event serialization
* Added Pandoras box serialization
* Added Seer hut reward serialization
* Added CQuest serialization
* Added API for map object instance names serialization.
* Added random dwelling options serialization
* Advanced town options serialization
* Advanced hero options serialization
* More map format tests
* A lot of fixes, cleanup and refactoring
2017-05-27 00:23:19 +03:00
DjWarmonger
73c62f1b4c Restore cut ring around main town. 2016-12-21 22:23:55 +01:00
DjWarmonger
4b3a878c00 Fix for passability. 2016-12-21 13:37:19 +01:00
DjWarmonger
a0596ebecf Add clearance under town to ensure passability. 2016-12-21 10:43:24 +01:00
DjWarmonger
cc452bdfa9 Improved road routing so they can go under any passable object. 2016-12-21 10:10:37 +01:00
DjWarmonger
f78b524731 - Remove obstacle in front of player-owned towns
- Allow obstacles to touch town object
2016-12-20 15:23:47 +01:00
DjWarmonger
e37c35e439 Zone guard will cause object be placed as far away from it as possible in both zones. 2016-12-20 11:58:39 +01:00
DjWarmonger
ee3aec55f2 Correct implementations of A* algorithm. Seemingly fixes #2496, it's also faster. 2016-12-15 16:29:23 +01:00
DjWarmonger
63d33a1e7c Extract priority queue construction for reuse. 2016-12-15 12:58:16 +01:00
DjWarmonger
4102546977 Corrected road generation - they will be straight whenever possible. 2016-12-15 12:36:47 +01:00
AlexVinS
609c6f81bd Fixed a few CWE-457 2016-11-27 22:37:41 +03:00