1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-02 09:02:03 +02:00
Commit Graph

210 Commits

Author SHA1 Message Date
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
DjWarmonger
7db06e6bd0 Merge branch 'develop' of https://github.com/vcmi/vcmi into RMG 2014-06-01 21:53:00 +02:00
DjWarmonger
7f31b7dddb - Zone guards will now match template settings.
- Added guards for monoliths.
2014-06-01 16:31:49 +02:00
DjWarmonger
aee748d8d6 - Added monoliths between remote zones
- Fixed land connections between zones, now they're generated correctly.
2014-06-01 12:02:43 +02:00
AlexVinS
f212c8221d [RMG]Fix gcc build, remove some unused variables 2014-05-31 16:11:20 +04:00
DjWarmonger
8e8b27087a Ground connections between adjacent zones. 2014-05-31 10:56:14 +02:00
DjWarmonger
8ab2a8df86 Zone borders. 2014-05-30 21:23:41 +02:00
DjWarmonger
8c24ea0bfb Introduced 3-value logic for free, blocked and possibly occupied tiles. Refactoring. 2014-05-30 16:50:06 +02:00
beegee1
72b2e1b8fe - fixed bug when generating random map and adding player info data 2014-05-29 17:34:46 +02:00
DjWarmonger
b9de3875d9 - Attempt to move zones away from map boundaries
- Tweaking algorithm parameters
- Refactorings
2014-05-24 18:39:58 +02:00
DjWarmonger
d2fd71d087 Zone shapes & terrains work nicely. 2014-05-24 14:06:08 +02:00
DjWarmonger
27dcf70b1a Randomized center positions of zones. 2014-05-24 12:42:06 +02:00
Ivan Savenko
7f276185bd Moving files:
- new config for objects (config/objects/generic.json)
- renamed lib/CDefObjectHandler to lib/CObjectClassesHandler
2014-05-24 02:07:54 +03:00
Ivan Savenko
6bd6be0835 Object class handler is now a proper "handler"
- Some changes in interfaces
- Fixed some missing fields in serialization
- Moved object names to new handler
2014-05-24 01:56:51 +03:00
DjWarmonger
75cea9206d - Fixed uninitialized guarding creature positions
- Fix for guard placement
2014-05-23 19:45:17 +02:00
DjWarmonger
35d6215b7b jfhs patch integration is now complete:
Lots of fixes for object placement.
Fixed blocked paths on generated maps.
2014-05-23 19:14:33 +02:00
DjWarmonger
4ea9810831 First version that works:
- Covered RMG with exceptions
- Fixes for object randomization & placement
2014-05-23 17:12:31 +02:00
DjWarmonger
342aec0700 More rollback. 2014-05-23 13:23:03 +02:00
DjWarmonger
5b0b152aa3 Trying to restore recent type of mapGenOptions. 2014-05-23 11:56:51 +02:00
DjWarmonger
67793a2db4 Some more. 2014-05-22 21:40:34 +02:00
DjWarmonger
1e1dce20a8 Something that compiles, but crashes when launching RMG map. 2014-05-22 19:25:17 +02:00
DjWarmonger
88f962d6d5 Taken jfhs code as it is.
http://forum.vcmi.eu/viewtopic.php?p=10040#10040
2014-05-22 16:27:13 +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
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
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
beegee1
d6dfd8bfbc - Fixed a bug when starting a random map with a town added by a mod 2013-08-22 18:08:42 +00:00
beegee1
fd9995ff82 - Missing thing to previous commit... 2013-08-19 18:46:30 +00:00
beegee1
a13d72b636 - Fixed GCC warning
- Small refactoring
- Added RPM spec to SVN again (it's better to keep it there :) )
2013-08-19 18:20:11 +00:00
beegee1
1ac328635a - Added handler classes CRmgTemplateStorage and CTerrainViewPatternConfig to LibClasses
- Re-organized CMapGenerator
- Created CZone and CTemplate objects in the heap and used pointers
- Added stub classes CZoneGraphGenerator and CZonePlacer (include warnings of unused variables, please ignore them)
- Fixed CRandomGenerator bug that always the same number was produced
- Better structure of Visual Studio project files with using filters
- Updated project files (VS, CMake)
- Excluded compiler warning mismatched-tags (false positive)
- Fixed a bug when compiling with unit tests enabled
2013-08-17 12:46:48 +00:00
Ivan Savenko
b87897096c Filesystem handling is now more flexible
- removed CResourceLoader class in favor of one that implements resource loader interface
- removed global pool of files, in favour of more dynamic approach
- renamed some files to match current situation
All these changes are needed mostly for future mod manager + .zip support
2013-07-28 14:49:50 +00:00
Ivan Savenko
f82122d9be second part of c++11 update. gcc 4.5 and VS 2010 are no longer supported
- BOOST_FOREACH -> for
- replaced several boost classes with std (e.g. unordered)
- removed gcc-4.5 workarounds
- ran clang c++11 migration tool to detect some cases:
- - pointer initialized with "0" to nullptr
- - replace for with iterators with range-based for
- - use auto in some situations (type name specified twice, avoid long iterators type names)
2013-06-29 13:05:48 +00:00
beegee1
5328beb8e7 - Fixed some bugs when starting a RMG map - Checks if there is a template for the chosen options(rejects if not) - Added a few templates for development(2 to 4 players, medium maps are supported) - Refactoring 2013-05-21 19:08:06 +00:00
beegee1
42c2c29976 - Added support for RMG templates(subset of OH3) - Added template "Small Ring" for testing 2013-05-11 17:36:11 +00:00
beegee1
3358a8efec - Added terrain & object selection classes - Added CComposedOperation - Refactored clear terrain, it is now an operation - Added rough support for updating terrain type if required 2013-04-29 15:51:39 +00:00
beegee1
7a3f5dc23b - Replaced exceptions with assert for internal-API code 2013-04-22 16:04:17 +00:00
beegee1
dd78205ce8 -Added test subfolder and updated CMakeLists for unit testing - Added a test case for the DrawTerrainOperation class(does not pass all tests successfully, 6 failures left to fix) - Fixed a few bugs 2013-04-22 14:49:28 +00:00
Ivan Savenko
c6cc6e6301 Large changeset, first part of editing H3 objects via mods feature. Changes:
- loading of all objects (including H3 objects) will be directed by mod handlers
- common base for all handlers accessible from mod system (IHanderBase)
- json format changes: use struct with string ID's instead of vector

- fixed some gcc/clang errors and warnings
- fixed several cases of memory leaks and invalid memory access (mostly related to usage of bonus system and/or identifiers resolution)

Note that right now loading is much slower than before due to excessive json validation (or not fast enough validator)
2013-04-21 12:49:26 +00:00
DjWarmonger
87988b0ae7 Compile fixes for MVS2010 2013-04-20 16:01:58 +00:00
beegee1
03c2aa9153 - Refactored CMapEditManager(added structure for undo functionality) - Refactored CMap(terrain pointer is private, safe access via getTile) 2013-04-19 11:43:11 +00:00
beegee1
45fccfb1a6 - Added new trace macro LOG_TRACE which autom. appends leaving func message - Removed old trace macros - Small refactoring in CMapEditManager - Changed documentation comments to /// style for various mapping header files 2013-04-16 13:16:58 +00:00
beegee1
feea589648 - Bug-fixing for last commit - Moved CMapGenOptions to CMapGenerator 2013-04-15 17:18:04 +00:00
beegee1
44bde4a1d3 - Fixed indentation for various files, sorry... 2013-04-14 19:24:31 +00:00
beegee1
c10266ed97 - Reduced complexity to use the CMapGenerator(simpler interface) - Removed h3m.txt and tchar_amigaos4.h 2013-04-14 18:52:05 +00:00
beegee1
ee51c5beb5 - Renamed /lib subfolders to lowercase 2013-04-07 10:48:07 +00:00