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

102 Commits

Author SHA1 Message Date
Arseniy Shestakov
9fd1cff090 Refactoring: always use std prefix for shared_ptr, unique_ptr and make_shared
Long time ago it's was used without prefix to make future switch from boost to std version easier.
I discusses this with Ivan and decide to drop these using from Global.h now.

This change wouldn't break anything because there was already code with prefix for each of three cases.
2015-12-29 05:43:33 +03:00
ArseniyShestakov
e3f2bb2c99 MXE support: avoid conflicts with some macros from headers 2015-12-22 01:59:51 +03:00
ArseniyShestakov
fc06db4c4f Move STRONG_INLINE define into Global.h 2015-11-22 07:14:52 +03:00
DjWarmonger
a6ea0981b6 Merge branch 'develop' into mutexRelax 2015-10-24 18:30:43 +02:00
Vadim Markovtsev
337276604d Fix detection of VCMI_APPLE 2015-10-17 09:23:29 +03:00
Vadim Markovtsev
74e9f23e36 Fix build with recent Boost
It has static_assert complaining on missing include
2015-10-17 09:23:28 +03:00
DjWarmonger
a3ce1521e5 Cache visible tiles within SectorMap for quicker access. 2015-08-31 07:39:03 +02:00
ArseniyShestakov
826a64b579 Pack of tiny code improvements for @alexvins request 2015-03-08 20:19:00 +03:00
ArseniyShestakov
e4f591ba84 vstd: add function to check vector intersection 2015-03-08 14:41:17 +03:00
AlexVinS
aa5e9fc959 get rid of global debug macros. 2015-02-14 22:43:16 +03:00
josch
5c356f4415 add support for the HURD 2014-11-17 16:43:26 +01:00
josch
a96b5e7905 add support for FreeBSD 2014-11-17 12:25:10 +01:00
josch
c36042f8c7 rename preprocessor variable VCMI_LINUX to VCMI_XDG
- the variable is only used to enable XDG support
 - XDG is not exclusive to linux
2014-11-17 12:19:52 +01:00
Ilya Zhuravlev
3eb3996241 Fix android build. 2014-11-02 16:19:14 +03:00
AlexVinS
54453aee73 get rid of boost::assign 2014-10-04 00:34:13 +04:00
AlexVinS
463b9e46b3 Cleanup
* WIN64 video should work with ffmpeg
* brace-initialization syntax is now allowed (TODO get rid of boost::assign)
2014-10-02 18:23:22 +04:00
Karol
37bd4790f7 VCMIDirs update #6 fix
- Apple compilation fix
- Removed unnecessary macros
- Updated macros indent style
- Fixed 1. warning.
2014-08-30 15:04:00 +02:00
Karol
53ab0593b7 VCMIDirs update #6
- Minor fixes
- CLoadFile updated to boost::filesystem::path
2014-08-27 12:31:58 +02:00
Karol
958839668c VCMIDirs update #5
- Minor fixes
- string based paths -> boost::filesystem::path paths (I hope it's
final)
- New user data path on windows
- New moving dir method on windows.
2014-08-21 22:26:28 +02:00
Karol
a302f6c7ad VCMIDirs update #3
bfs = boost::filesystem;
- Updateting filenames (std::string -> bfs::path) #1
- Added platform detection, and some specyfic boost::filesystem includes
to Global.h
- Updated CBasicLogConfigurator. Now class uses bfs::path pathes.
2014-08-10 23:42:39 +02:00
beegee1
5139378319 - migrated boost::function/ref/bind to std:: variants 2014-08-04 20:33:59 +02:00
Michael Pavlyshko
24af413d61 define M_PI
M_PI isn't a part of standard and may be undefined.
2014-07-09 17:42:22 +03:00
Ivan Savenko
ca86416953 Fixed compilation with gcc 4.7 2014-07-07 11:02:55 +03:00
Ivan Savenko
00b6232ff6 Replaced usage of DLL_LINKAGE with ELF_VISIBILITY in netpacks. Please make sure that compilation now works on all platforms 2014-06-26 18:34:54 +03:00
DjWarmonger
e54c816c92 Treasure piles can now cover several tiles. 2014-06-05 17:19:11 +02:00
Ivan Savenko
1d17d60449 gcc update:
- removed support for 4.6
- compilation fixes for 4.7
2014-05-29 13:42:05 +03:00
Macron1Robot
2d425666d7 Update Global.h
Removed commented row
2014-04-27 13:48:22 +04:00
Macron1Robot
8ec7a9b919 Moved "max heroes on map per player", "max heroes available for player" to "defaultMods.json" 2014-04-27 10:43:46 +04:00
Macron1Robot
907caedb13 Added "produce" section in "building" structure. Changed dailyIncome. 2014-04-26 18:23:35 +04:00
beegee1
1d57b75bc5 - random number generation refactoring
- fixed mantis #1743
2014-04-10 19:22:32 +02:00
Ivan Savenko
9c0df68cb8 Fixing spelling mistakes. Patch from josch, fixes #1759 2014-03-23 12:59:03 +00:00
beegee1
95034b9fa0 - Updated PCH to use our StdInc.h as the prefix header (not generated one from cotire) -> no exclude headers from ffmpeg/etc... statements required
- Fixed compilation error (VCAI ResourceSet logging)
2014-02-05 20:25:36 +00:00
beegee1
df0a28d9cb - added PCH compilation for CMake using cotire module (PCH is OFF per default, can be enabled with ENABLE_PCH=ON) 2014-02-01 13:37:26 +00:00
beegee1
b8eddcd9a8 - Moved place bonus hero before normal random hero and starting hero placement -> same behaviour as in OH3
- Moved placing campaign heroes before random object generation -> same behaviour as in OH3
- Refactored pickHero into pickNextHeroType (hero generation sequence) and pickUnusedHeroTypeRandomly
- Added a SIGSEV violation handler to vcmiserver executable for logging stacktrace (for convenience only)
- Fixed Fuzzy.cpp and VCAI.h compilation on Clang
- Added a handleException function in addition to our macros (no use of macros, enables debugging support, does not re-throw, catches ...-case too)
2013-12-28 12:47:55 +00:00
beegee1
69eee05ccc - Partially fixed mantis #1065 (Gate with hex 95 can't be attacked)
- Fixed 'catapult tried to attack non-catapultable hex!' problem, now catapult attacks attackable wall parts only
- Fixed problem that the server performed applying damage on a wall part twice
- Added methods for checking what wall parts are attackable and if a wall part is potentially attackable
- Added functionality to trace net packages
- Added functionality to trace std::vectors
- Added tracing for CatapultAttack(CPack)
- Updated various toString methods to use {} instead of []
- Refactoring
2013-12-08 17:54:13 +00:00
DjWarmonger
b3b523b768 Compile fixes for MVS. 2013-12-03 15:24:13 +00:00
Ivan Savenko
3560bbb7f3 two patches/pull requests from janisozaur
- replace our custom bmap with std::map::at()
- compile fixes for editor
2013-11-12 10:45:42 +00:00
Ivan Savenko
55577d0ac4 - fixed missing DLL_LINKAGE
- use precalculated checksum for zip files
- UNUSED macro to silence some warnings
2013-11-09 13:49:36 +00:00
Ivan Savenko
dd73573c5c - vcmi can now calculate crc32 checksum of a file
- reorganized internal filesystem structure - all files from one mod are
now grouped in same FS node
- modhandler will now calculate crc32 checksum for each mod
- modhandler now knows validation status of each mod

todo - use checksum to determine mods that have not changed since last
start and disable validation for them.
2013-11-08 20:36:26 +00:00
Ivan Savenko
208df34fc2 bigfixing & new file: launcher/jsonutils.cpp
- launcher uses json parser from vcmi lib instead of one from Qt #1469
- fixed abilities overrides for some creatures #1476
- fixed hero portraits in seer huts #1402
- ttf fonts will render text in utf-8 mode. Not really useful at this point
- new settings entry, available in launcher: encoding. Unused for now.
2013-09-21 18:29:26 +00:00
Michał W. Urbańczyk
b62bb096a7 Fixed #1430, work-around to make #1435 non-crashing.
Fixed at least one of the #1428 infinite turns cases.
2013-09-11 21:57:08 +00:00
Michał W. Urbańczyk
dd72261193 Fixed #1437. 2013-09-05 22:11:13 +00:00
Michał W. Urbańczyk
3b42cff3ec #1409 should not crash anymore.
Fixed crash on serializing empty path. [How did it got there...?]
operator<< for boost::optional.
2013-08-18 15:46:28 +00:00
Michał W. Urbańczyk
58ccaa2e93 The cmath "fix" was not needed after all, the includes order decides. 2013-08-02 08:28:52 +00:00
Michał W. Urbańczyk
d8a27d8f3c Refactored player-specific data into single struct BattleState. 2013-07-21 22:01:29 +00:00
Michał W. Urbańczyk
516684aaab Visual 2012 compile fixes.
Unfortunately no C99 math nor uniform initialization till VS 2013.
2013-07-07 08:27:27 +00:00
Michał W. Urbańczyk
a1f545792b Compile fixes specific for VS 2012"
* Reverted std::bind to boost::bind. std::bind on Visual 2012 doesn't work in some cases (especially with std::ref), not sure why [but it seems to be a bug, since 2013 preview compiles the same code fine]. 
 * Move assignment operator for VS 2012.
2013-07-02 15:23:32 +00:00
Michał W. Urbańczyk
4576719abe Visual Studio 2013 Preview compile fixes:
* 0 is not convertible to std::function, nullptr should be used
* std::ref(rand) is not convertible to function<int()>, used lambdas (why we dont just pass "rand" ? )
* CFunctionList needs to be constructible from nullptr
* move constructor for CMapInfo (Visual cannot generate them :( )
* #ifdefed some stuff that is not needed anymore since cmath is updated with C99 stuff
* using std::make_unique instead of our vstd implementation

CSelector: 
* introduced a class in place of typedef
* Having an overloaded && || operators over sth that is convertible to bool… Wasn't a good idea after all. Purged the operators, replaced  with And/Or methods (chaining-style).
* constructor that is present only when constructing from class or function (SFINAE). std::function has an implicit converting constructor from T causing ambiguities (even if the overload would cause compile error in the body)
2013-07-02 12:08:30 +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
Ivan Savenko
cb9a750701 - reverted one macro change 2013-06-26 11:33:21 +00:00