1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-16 10:19:47 +02:00
Commit Graph

193 Commits

Author SHA1 Message Date
Nordsoft91
4bd0ff680a Random map generator refactoring (#762)
random map generator refactoring and improvements
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
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
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
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
DJWarmonger
8f42cdea67 Refactoring: use private pointer to CMapGenerator 2017-11-03 21:03:51 +01: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
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
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
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
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
Vadim Markovtsev
c696746017 Fix some compilation warnings 2016-10-28 08:07:05 +02:00
Arseniy Shestakov
452e28d183 Remove some useless includes found by cppclean
This of course was tested and shouldn't break anything
2016-08-26 04:42:16 +03:00
DjWarmonger
dea39b8497 Complete solution for Subterranean Gate placement. 2016-08-15 21:37:38 +02:00
DjWarmonger
7600f8cf08 Quick fix - stop spawning Subterranean Gates at the edge of the map. 2016-08-14 08:36:15 +02:00
DjWarmonger
f995756973 First part of Subterranean Gates rework. Fixes #http://bugs.vcmi.eu/view.php?id=2450 2016-08-13 19:48:44 +02:00
DjWarmonger
8186fcae99 Removed some legacy code, work in progress. 2016-08-13 12:42:45 +02:00
DjWarmonger
2bffd4e5c1 Moar optimization! 2016-08-09 13:40:46 +02:00
DjWarmonger
7f0b852449 Huge optimization based on profiling - cut generation time by almost half (Jebus XL+U). 2016-08-09 10:12:13 +02:00
AlexVinS
57e588cba1 attempt to fix travis build 2016-07-28 13:15:19 +03:00
DjWarmonger
5a1383fea8 Correct implementation for previous fix. 2016-07-25 18:37:42 +02:00
DjWarmonger
d9556332e1 Hopefully fixed zone guards misplaced due to paths connecting at acute angles. 2016-07-24 18:15:23 +02:00
DjWarmonger
f139b70279 Changed Subterranean Gate placement algorithm - now they are meant to be equidistant from both zone centers. 2016-07-10 12:29:48 +02:00
DjWarmonger
a66893af28 Fixed bug with Subterranean Gates:
Failed to connect (-1,-1,-1) with center of teh zone.
2016-07-10 10:11:29 +02:00
AlexVinS
0c21efb202 Start integration of map format into engine 2016-02-09 20:20:03 +03:00
AlexVinS
89d986fc6a Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
Conflicts:
	lib/CArtHandler.h
	lib/mapObjects/MiscObjects.cpp
2016-01-24 15:39:41 +03:00
DjWarmonger
8c5f93dd8f Little refactoring for object placement. 2016-01-13 19:17:12 +01:00
AlexVinS
2d5a366e6c Implemented (basic) object construction and placement
* contain refactoring of RMG and class handling (will be more)
2015-12-05 12:36:42 +03:00
Ivan Savenko
faa7cbff18 Fixed gcc/clang warnings 2015-12-04 01:17:43 +02:00
DjWarmonger
6b45f323ea Fixed logic regression from previous commit. 2015-09-23 21:38:16 +02:00
DjWarmonger
237d3f2624 Refactoring: random spells 2015-08-12 16:40:08 +02:00
DjWarmonger
927dfa5565 Added correct connections for Subterranean Gates 2015-06-04 09:02:56 +02:00
DjWarmonger
55c1a7eade Clear unused tiles to make more space for roads. 2015-06-03 15:16:11 +02:00
DjWarmonger
a68b58d969 - Use straight paths for some connections
- More fixes for template schema
2015-06-02 16:40:32 +02:00
DjWarmonger
c6f714db9c Fixed generation of CPU teams. 2015-06-01 21:57:43 +02:00
DjWarmonger
6890ae9f02 - Fixed improper use of playersCount. Now RMG can generate maps up to 8 players, with CPU players only as well.
- Fixes for template scheme
2015-05-27 11:30:46 +02:00
DjWarmonger
6d502ef1a1 Implemented A* algorithm to draw shortest roads - but not correct roads yet. 2015-05-25 16:37:57 +02:00
AlexVinS
76193c4c5c More experiments WIP. 2015-04-03 05:47:22 +03:00
AlexVinS
eb60d9737f more sensible road placement 2015-04-03 05:47:20 +03:00
AlexVinS
4c4ad480c5 added experimental usage of roads 2015-04-03 05:47:01 +03:00
DjWarmonger
a0f534146c Fixed underground Lava terrain. 2015-03-28 22:03:38 +01:00
DjWarmonger
999c2a92e0 Inverted approach - first generate rock all over, then free accessible tiles. 2015-03-28 21:13:22 +01:00
DjWarmonger
9515d51bd2 Generate underground tunnels first to get a bit more of them. 2015-03-28 20:09:54 +01:00
DjWarmonger
a0d9ae4849 Refactoring - create underground rock for whole level at once. 2015-03-28 18:56:28 +01:00
ArseniyShestakov
c9eba40fe6 Updated CGTeleport and new CGMonolith / CGSubterraneanGate / CGWhirlpool
Now CGTeleport is not publicly available handler, but generic class for teleport channels usage.
Teleport channels are stored as part of information about the map.
2015-03-08 16:11:23 +03:00
DjWarmonger
9453250e0f Spawn quest arts in nearby zones. 2015-03-01 10:20:49 +01:00
DjWarmonger
4f1d96e5e8 Seer Huts part 2. 2015-02-28 22:37:04 +01:00
DjWarmonger
607375a9bc Generate Seer Huts with creature rewards 2015-02-28 21:14:45 +01:00
AlexVinS
8deee7610c CMapGenerator.cpp: remove unused variables 2015-01-03 01:04:42 +03:00
DjWarmonger
cb5a3c0f73 Fixed shortage of Prisons on random maps. 2014-12-19 14:04:59 +01:00
DjWarmonger
7ac3713d32 Significantly improved zone graph placement. 2014-10-31 12:58:55 +01:00
DjWarmonger
697e42dd24 - Fixed several legacy issues with map templates
- Added Clash of Dragons 1.2 template
- Temporarily disabled exception when RMG runs out of two-way monoliths (exception was not handled anyway)
2014-10-30 21:23:25 +01:00
DjWarmonger
e3d968e284 Generate Grail to not crash at Obelisks. 2014-09-21 21:51:51 +02:00
DjWarmonger
495c39304d Fixed crash due to incorrect RMG options. 2014-09-18 14:29:57 +02:00
DjWarmonger
0edaf4fa8a Merge pull request #26 from vcmi/FFMpeg
Let's do this, way too many branches running now.
2014-09-01 10:35:30 +02:00
DjWarmonger
8b10f70afd Migrating to MSVS 2013, which allows to delete inttypes.h file. 2014-08-31 19:08:39 +02:00
beegee1
5139378319 - migrated boost::function/ref/bind to std:: variants 2014-08-04 20:33:59 +02:00
DjWarmonger
3acbda75ef Restored old function signature for sanity. 2014-07-27 13:59:53 +02:00
AlexVinS
b654ea831b [RMG] Fix mingw build, fix some warnings 2014-07-26 10:12:45 +04:00
DjWarmonger
67d8a24f0b Experiments with object distance. 2014-07-25 17:10:16 +02:00
DjWarmonger
e65b85873c Added prisons. hero experience is set to zero due to problem with leveling http://bugs.vcmi.eu/view.php?id=1804 2014-07-25 10:44:17 +02:00
DjWarmonger
156e19cdf6 Various optimizations based on RMG profiling. 2014-07-24 19:16:49 +02:00
DjWarmonger
4b28afcaa4 Fixed counting of faction-aligned zones. 2014-07-23 19:17:07 +02:00
DjWarmonger
be8c9c8378 Correct strength of zone guards. Logs for guard strength. 2014-07-15 14:38:05 +02:00
DjWarmonger
966873181f Do not let monsters or treasures spawn near already placed monsters. 2014-07-09 22:09:06 +02:00
DjWarmonger
22d26db694 Correct placement of non-overlapping objects. 2014-07-08 20:13:51 +02:00
DjWarmonger
ced3d32f3f Scale dwelling / pandora with creatures value according to number of native zones. 2014-07-07 16:20:48 +02:00
DjWarmonger
d942858ef9 Throw exception when there are not enough two-way monoliths available. 2014-07-04 14:46:02 +02:00
DjWarmonger
05c2a4e716 Better gravity-based algorithm. 2014-07-04 11:51:28 +02:00
DjWarmonger
5fb07ded38 Correct underground terrains. More improvements for connection placement. 2014-07-04 10:45:00 +02:00
DjWarmonger
d4d3f1a568 More tweaks. 2014-07-04 09:54:55 +02:00
DjWarmonger
ab748ae221 Somewhat better gate placement, attempt to add rocky tiles to underground zones. 2014-07-03 23:11:24 +02:00
DjWarmonger
d118fbffe8 Correct placement of subterranean gates. 2014-07-03 17:24:28 +02:00
DjWarmonger
bae9f2083f Workaround for hero & town issue. Game still crashes elsewhere, though. 2014-07-01 12:07:53 +02:00
DjWarmonger
e51e2190fd Merge branch 'develop' of https://github.com/vcmi/vcmi into RMG 2014-06-26 20:12:37 +02:00
Ivan Savenko
c605e2d10c Gcc compile & warning fixes 2014-06-22 17:26:08 +03:00
DjWarmonger
901188e2e1 Merge branch 'develop' of https://github.com/vcmi/vcmi into RMG 2014-06-22 14:53:51 +02:00
DjWarmonger
3ac306f501 Merge pull request #19 from vcmi/feature/mapObjects
Feature/map objects
2014-06-22 14:49:42 +02:00
DjWarmonger
f84e25fa78 Somewhat better algorithm for paths, helps balance object distribution. 2014-06-18 09:57:36 +02:00
DjWarmonger
aa54803c50 Refactoring, clearing logs. 2014-06-15 08:48:46 +02:00
DjWarmonger
236b3ec807 Zones will get random network of passable paths inside them. Treasures will try to fill all remaining fields. 2014-06-12 21:10:43 +02:00
DjWarmonger
b3a39f4920 Misc improvements & tests. 2014-06-07 14:02:57 +02: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
DjWarmonger
62e9f13b08 - Implemented guard generation formula following this post http://forum.vcmi.eu/viewtopic.php?p=12426&sid=09f5fac8992dc880eb6a720615787ca0#12426
- Some primitive way to randomize treasures
2014-06-04 10:16:08 +02:00
Ivan Savenko
32b6568b65 Merged changes from upstream and fixed compilation caused by API changes 2014-06-03 22:45:18 +03:00