Commit Graph
100 Commits
Author SHA1 Message Date
Arseniy Shestakov 905d31b8d7 CModHandler: remove hardcoded wog mod integrity check
Now we have unpacked WoG mod version that dont need specific data files.
As far as I can tell only texts for commanders not going through proper mod system
2020-01-15 18:20:51 +00:00
ArseniyShestakovandGitHub fd2a33bc36 Merge pull request #571 from dydzio0614/VictoryCrashFix
Victory crash/freeze fix
2019-04-22 08:50:00 +03:00
Arseniy Shestakov e511ee0078 AI: fix paths after merge of #545 2019-02-09 18:46:19 +03:00
Arseniy ShestakovandAlexVinS f06c8a8725 VisitObjEngine: avoid crashes if object is no longer visible
This really shouldn't happen, but better safe than sorry
2019-01-27 05:58:46 +03:00
Arseniy Shestakov 708705aa96 CGLighthouse: workaround crash on map initialization. Fix issue 3020
Dirty hack here since proper fix would require to break saves
2018-11-01 23:31:23 +03:00
Arseniy Shestakov edcaaf036a MSVC: fixes for compatibility with latest Vcpkg packages 2018-08-27 22:19:11 +03:00
ArseniyShestakovandGitHub bbe421f9e1 Merge pull request #452 from karliss/sanitizers2
Fix memory and other problems found by address and UB sanitizers.
2018-05-01 14:35:52 +07:00
ArseniyShestakovandGitHub 6f6f399911 Merge pull request #451 from josch/develop
Remove compilation warnings
2018-04-27 17:29:15 +07:00
Arseniy Shestakov 9da3f48274 Code style: formatting and refactoring of launcher code 2018-04-13 15:23:35 +07:00
Arseniy Shestakov 25dea1a599 Code style: formatting and refactoring of VCAI code 2018-04-08 17:43:20 +07:00
Arseniy Shestakov 4af288aee4 Refactoring of main menu related code
We need to make sure it's not stay active during gameplay.
Proper fix would require actually removing menu interface from GH, but then GH needs refactoring too.
2018-04-07 18:44:21 +07:00
ArseniyShestakovandGitHub 1a6f456ac0 Merge pull request #402 from vcmi/feature/multiplayer
Refactoring of all pre-gameplay UI and networking code.
This will break some things, but I'll be able to fix them without constant rebasing.
2018-04-05 23:29:27 +07: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 674242da54 CCallback: remove unregisterAllInterfaces
Not needed since CPlayerInterface no longer handle interface removal.
It's far better when CClient::endGame doing it since they owned by CClient.
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
Arseniy Shestakov 14f03e22da CLabelGroup: add currentSize method
Might be someone will suggest me better name.
And actually I need method to clean group too.
2018-04-03 22:11:14 +07:00
Arseniy Shestakov ab2b9086d3 CLabel: add methods getWidth, setColor, setAutoRedraw
For somethign like map list we need to change CLabel data without redrawing it.
2018-04-03 22:11:14 +07:00
Arseniy Shestakov f04cbaf539 Settings: add lastMap, lastCampaign, lastSave to schema
Nice to see last used save game after client restart
2018-04-03 22:11:14 +07:00
Arseniy Shestakov 66e9db4bc3 CMake: extend linker workaround for all MSVC versions for now.
Debug builds in MSVS 2017 are also affected.

32-bit Release builds in MSVS 2015 are probably affected as well.
Though in that case problem only appear for vcmitest, but not client.
2018-03-29 11:05:48 +07:00
Arseniy Shestakov 8577bba417 CMake: add workaround for Visual Studio 2015 linking issue
I tried to workaround it in code, but completely failed that.
So for now we'll just tell linker to ignore multiple definitions.
2018-03-29 02:02:00 +07:00
ArseniyShestakovandGitHub 079cd470c2 Merge pull request #425 from vcmi/CatapultRework
Catapult rework
2018-03-06 01:16:53 +08:00
Arseniy Shestakov e48797f7e8 CMake: enable /MP flag by default for Visual Studio solution
Can be toggled with ENABLE_MULTI_PROCESS_BUILDS option to CMake
2018-02-28 22:30:31 +08:00
ArseniyShestakovandGitHub 7fd090786c Merge pull request #379 from henningkoehlernz/hero_specialty_scaling
Hero specialty scaling
2018-02-28 15:03:24 +08:00
Arseniy Shestakov 434deffb54 CAdvMapInt: improve hero reminder by checking hero path
Dialog won't show up if movement points insufficient for first step on current path.
2018-02-24 21:49:42 +08:00
Arseniy Shestakov 734441eb3b CMake: use CMAKE_DL_LIBS on Linux for linking with GNU gold
Gold only link what explicitly specified and we use dlopen.
2018-02-18 15:15:19 +08:00
Arseniy Shestakov c1138d9df7 Travis CI: use mirror on Github Releases instead of MXE repository 2018-02-11 07:26:42 +03:00
Arseniy Shestakov 8bbe747e8e Cleanup undef for min / max. NOMINMAX is already in Global.h 2018-02-11 05:42:49 +03:00
ArseniyShestakovandGitHub e11e69750a Merge pull request #411 from drizt/fallthrough
Hide "this statement may fall through" warnings
2018-02-10 22:34:39 +03:00
Arseniy Shestakov 324717acbe Spelling fixes: privilaged -> privileged, retreive -> retrieve 2018-02-10 21:52:23 +03:00
Arseniy Shestakov 15c8b192b4 CStack::prepareAttacked: fix for REBIRTH bonus after merge 2018-02-08 14:37:52 +03:00
ArseniyShestakovandGitHub d64a3899a3 Merge pull request #359 from vcmi/SpellsRefactoring9
All important issues are fixed and branch is finally ready to merge!
2018-02-08 11:41:01 +03:00
Arseniy Shestakov ff2d01a03d BinaryDeserializer: replace length check macro with inline function 2018-02-05 09:47:38 +03:00
Arseniy Shestakov fc3b8b2c87 Refactoring: replace macro with variadic templates on client-side
Big thanks to @mwu-tow for helping me with this.
2018-02-05 08:14:01 +03:00
Arseniy Shestakov 7c77249d37 Refactoring: get rid of macro in server-side request validation code 2018-01-28 08:03:48 +03:00
Arseniy Shestakov 69dbf339fc CGuiHandler: fix invalid read on event handling 2018-01-18 06:34:57 +03:00
Arseniy Shestakov da117e9255 Code style: remove void from constructors without arguments 2018-01-13 11:51:47 +03:00
Arseniy ShestakovandDJWarmonger d3b3389a37 Implement configurable object sounds: ambient, visit and removal
* If there more than one sound for visit or removal random is played
* At moment only the first ambient sound will be used
2018-01-02 18:16:35 +01:00
Arseniy ShestakovandDJWarmonger fc0ab5b970 TerrainTileObject: store ambientSound for every object
Though ambient sounds won't work for heroes objects since they added separately.
2018-01-02 09:50:05 +01:00
Arseniy ShestakovandDJWarmonger d96a3aa5b7 CAudioBase: move mutex to base class since CSoundHandler need it 2018-01-02 09:49:04 +01:00
Arseniy ShestakovandDJWarmonger c5ca75bc53 CRewardableObject: remove now unused soundID 2018-01-02 09:49:04 +01:00
Arseniy ShestakovandDJWarmonger f15cadc87b Implement configurable object sounds: ambient, visit and removal
* If there more than one sound for visit or removal random is played
* At moment only the first ambient sound will be used
2018-01-02 09:49:03 +01:00
Arseniy ShestakovandDJWarmonger e9bfbb70c1 Ambient sounds: implement chebyshev distance for getTilesInRange 2018-01-02 09:48:17 +01:00
Arseniy ShestakovandDJWarmonger e7fa9f8cd6 config: add ambient, visit and removal sounds to schemas / objects 2018-01-02 09:48:17 +01:00
Arseniy Shestakov 75c3e30404 CMake: further improvements for generated VS solutions
* Set vcmiclient as VS_STARTUP_PROJECT so it's will be default debug target instead of ALL_BUILD.
* Add AIs and server as dependencies for client so VS will suggest to rebuild them before debugging.
2017-10-31 09:30:58 +03:00
Arseniy Shestakov 719587b091 Travis CI: avoid probolems with brew for with macOS builds
Also remove Sparkle since it's no longer used
2017-10-29 23:02:37 +03:00
ArseniyShestakovandGitHub 4149662845 Merge pull request #376 from vcmi/newAnimations
New animations
2017-10-11 16:18:06 +03:00
ArseniyShestakovandGitHub 185631e94a Merge pull request #383 from godric3/text_fixes
Text fixes
2017-10-06 17:20:55 +03:00
Arseniy Shestakov ec2bef40fb CServerHandler: avoid crash without interprocess memory
Even if shared memory wasn't disabled we shouldn't crash without it.
It's important because Snap packages don't have access to /dev/shm.
2017-09-18 10:46:58 +03:00
Arseniy Shestakov ae13123129 CPlayerInterface: don't stop hero movement on embark / disembark
When hero have free boarding bonus there no reason to stop movement.
2017-09-16 10:42:27 +03:00
Arseniy Shestakov 494872937a CGuiHandler: use std:atomic to sync breaks in event handling 2017-09-11 12:18:16 +03:00
Arseniy Shestakov 986fc08b1e CGuiHandler: use SDL_PushEvent in fakeMouseMove to avoid crashes
Somehow this worked on other platforms, but on macOS it's cause constant crashes.
2017-09-11 12:18:16 +03:00
Arseniy Shestakov 940c8a0b82 CMake: add $ORIGIN into RPATH for single-directory installation
End up that single-directory installation is useful for Snap package.
2017-09-08 03:43:44 +03:00
ArseniyShestakovandGitHub d01ecbba90 Merge pull request #372 from vcmi/guiCleanup2
Gui cleanup2
2017-09-07 02:46:54 +03:00
Arseniy Shestakov 610740011c CMake: print useful debug information on every build
That way we don't need to ask more questions regarding system where build failed.
2017-09-06 13:15:49 +03:00
ArseniyShestakovandGitHub ca066841f1 Merge pull request #370 from vcmi/issue/2780
Issue/2780
2017-09-05 01:21:58 +03:00
ArseniyShestakovandGitHub 898f2908d8 Merge pull request #369 from henningkoehlernz/skill_mod
Allow modding of secondary skills via skills.json
2017-09-05 00:20:40 +03:00
Arseniy Shestakov d7f76fc433 README: add more text and provide links to instructions on wiki 2017-09-02 16:25:42 +03:00
Arseniy Shestakov 8180e4d5c5 VCMIDirs: improvements for development on Mac and Linux
Also added /usr/share/games in VCMIDirsXDG::dataPaths for mantis#2189.
2017-08-25 08:43:27 +03:00
Arseniy Shestakov 1110dd27d1 Launcher: use QDesktopWidget to get display list instead of SDL2
First of all SDL2 trying to use dbus and this conflict with Qt. Check mantis#2704.
And there no reason to use SDL2 in launcher when Qt can do the same thing as well.
2017-08-24 04:55:44 +03:00
Arseniy Shestakov c6ff28936d Client: change intro video position 2017-08-24 03:29:37 +03:00
Arseniy Shestakov 525ee8771a Launcher: avoid menu items not overlap so it's look slightly better
It's still very ugly, but less ugly than it's was.
2017-08-24 03:04:40 +03:00
Arseniy Shestakov dfe781945b CMake: try to enable automated DS_Store generation for Mac
We should see in AppleScript from CMake would work on Travis CI.
Also use VCMI as volume name of DMG for now and update pre-generated DS_Store for it.
2017-08-21 17:04:53 +03:00
Arseniy Shestakov 97db21043d Documentation: remove README.linux. Information moved to wiki
https://wiki.vcmi.eu/index.php?title=How_to_build_VCMI_(Linux)

Time is limited and duplication not make it any easier to maintain documentation.
Since we have wiki already we must move all important information here and keep it up to date.
2017-08-21 02:45:50 +03:00
ArseniyShestakovandGitHub 2f65e27464 Merge pull request #368 from dydzio0614/vstweak
Visual Studio files tweaks
2017-08-19 18:07:25 +03:00
Arseniy Shestakov c7fbbb1248 Travis CI: improve package name generation script 2017-08-17 12:01:03 +03:00
ArseniyShestakovandGitHub d0bd4efbc7 Merge pull request #362 from vcmi/appveyor/vcpkg
AppVeyor builds with Vcpkg and CMake improvements
2017-08-17 01:47:43 +03:00
Arseniy Shestakov 5fce56d23e CMake: add ENABLE_DEBUG_CONSOLE option for Windows enabled by default
For now we'll keep console, but in future we need a way to toggle it at runtime.
2017-08-16 23:45:38 +03:00
Arseniy Shestakov 03c7bf5ee6 CMake: installer building improvements for Windows
- Implement support for BundleUtilities when Vcpkg is used
- Add some hacky code to copy Qt plugins install directory
- Use same icon for launcher as used for VCMI, launcher one is ugly
2017-08-16 18:34:46 +03:00
Arseniy Shestakov adbfa09e31 CMake: restore some of old MinGW code and improve ENABLE_PCH option
- MinGW: restore DLL deploy for MXE builds
- MinGW: restore linking options for: dbghelp, mswsock, iconv, etc
- MinGW: build with -Og when Debug is used to avoid crashes / freezes
- Cotire: when ENABLE_PCH is OFF we won't include Cotire at all
- FuzzyLite: enable FORCE_BUNDLED_FL by default for Linux to avoid FL5 usage
- Remove Version.cpp from lib source list so it's won't appear in projects
- Add option ENABLE_GITVERSION to disable Version.cpp usage
2017-08-16 16:12:36 +03:00
Arseniy Shestakov 2b3a467728 CMake: structure changes and other small improvements
- Now cmake_minimum_required used properly and set to 2.8.12
- cmake_modules/CMakeCPackOptions.cmake.in is removed
2017-08-16 16:10:08 +03:00
Arseniy Shestakov fee999300e VCMIDirs: add hack to run from single directory on Mac and Linux
Also change working directory to where binary is on all platforms except Android
2017-08-16 16:10:08 +03:00
Arseniy Shestakov 40af43c46e CMake: massive rework for Mac build and other improvements
- macOS: RPATH-related code all removed or disabled
- macOS: new osx/CMakeLists.txt to run some install-code running after all subdirectories
- Assets copying into the runtime output directory implemented for Mac and Linux development
2017-08-16 16:10:07 +03:00
Arseniy Shestakov 7dca95c8cc CMake: multiple improvements for builds and project generation
- Change default build output directory name from "build" to "bin"
- Implement new function vcmi_get_cmake_debug_info
- Link client with SDL2main on Windows and disable debug console
- Remove all old MinGW-specific options since they outdated and MXE work fine
- Set AUTOGEN_TARGETS_FOLDER for better Xcode and Visual Studio projects
- Remove useless vcmitestFiles custom target for less garbage in project files
2017-08-16 16:10:07 +03:00
Arseniy Shestakov 56f89270db macOS: full rework of Mac packaging process
- Most of outdated CMakeLists code removed.
- All Mac-specific code is removed include Sparkle support and vcmibuilder app.
- DMG buidling reimplemented using macdeployqt command.
2017-08-16 16:10:07 +03:00
Arseniy Shestakov 193f492b99 CMake: cleanup, project generation and other improvements
- Use EXCLUDE_FROM_ALL for FuzzyLite and GoogleTest to avoid inclusion of unneded headers and libraries into installers.
- Set minimum CMake version only in main CMakeLists.txt
- Set project name only in main CMakeLists.txt
- Visual Studio: add assign_source_group function to generate proper filesystem tree
- Visual Studio: set PROJECT_LABEL so generated projects have same names binaries on Windows
- Visual Studio: enabled USE_FOLDERS for projects grouping. This also possibly affect other IDEs.
- Added add_subdirectory_with_folder function to make sure 3rd-party libraries are affected by USE_FOLDERS.
2017-08-16 16:10:07 +03:00
Arseniy Shestakov b3b29cfda9 CMake: update cotire to 516d78476f 2017-08-16 16:10:07 +03:00
Arseniy Shestakov 7daaa604cc AppVeyor: add scripts for Coverity Scan build submission
I thought we could use AppVeyor due to it's higher timeout of 1 hour, but it's stuck on lib compilation.
I'll still keep scripts in place so we can use them in future in case something changed
2017-08-16 16:10:07 +03:00
Arseniy Shestakov caf0edf618 AppVeyor: change config to use Vcpkg-generated deps
There also extended build matrix for toolchain_test branch.
2017-08-16 16:10:07 +03:00
Arseniy Shestakov 440226f7af CMake: use dynamic linking for Boost 2017-08-16 16:10:07 +03:00
Arseniy Shestakov 82d107b934 Merge branch 'jcrada-develop' into develop 2017-08-15 18:28:08 +03:00
Arseniy Shestakov c3e6195cc9 CServerHandler: one more small fix when server is crashed 2017-08-13 23:17:56 +03:00
Arseniy Shestakov 9c7c47c754 CServerHandler: for now don't stop client if server crashed
Currently server stable enough and only crash on shutdown.
It's certainly more annoying to crash on end of game than get freeze.
Unfortunately it's crash on shutdown almost every time on macOS.
2017-08-13 23:09:23 +03:00
Arseniy Shestakov 1a1d7c27cb Travis CI: download MXE packages with -q --yes instead of -qq
MXE server is slow and downloads could take more than 10 minutes.
2017-08-13 22:22:57 +03:00
Arseniy Shestakov fad2a0a3fb Fix memory leak and remove some garbage files added in last commit 2017-08-13 22:15:25 +03:00
Arseniy Shestakov cd98dd0b89 CGuiHandler: make terminate_cond non-static
Static variable might be not yet initialized by the time it's used inside CGuiHandler constructor.
This fix let us avoid crash that occur when built with Xcode 8.2.1
2017-08-13 21:54:07 +03:00
Arseniy Shestakov 21074e13c3 macOS: always change working directory for launcher and server
This make relative paths work properly when launched from DMG or from different directory.
2017-08-09 01:33:12 +03:00
ArseniyShestakovandGitHub cb40c093f8 Avoid boost::optional assignment for Boost 1.64 compatibility (#360)
Two options here: to use emplace from 1.56 or boost::make_optional.
Unfortunately Ubuntu 14.04 is using 1.54 and I'd rather not to break it.
2017-08-05 16:09:29 +03:00
ArseniyShestakovandGitHub 4388e12a3a Merge pull request #358 from Chocimier/altar
Fixed bugs in Altar
2017-08-05 02:25:41 +03:00
ArseniyShestakovandGitHub 9d9c026c85 Code style: serialize everything on own lines for easier debugging (#357) 2017-07-31 16:35:42 +03:00
Arseniy Shestakov 1b9daecd27 CMake: remove Boost.Test requirement 2017-07-22 03:19:17 +03:00
Arseniy Shestakov df82380d93 AUTHORS: add FeniksFire. Again
Let's hope Warmonger won't remove him on merge ;-)
2017-07-20 19:00:02 +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
Arseniy Shestakov 6d9f99d4de Code style: and one more pass on lambda expressions parameter list 2017-07-19 02:11:17 +03:00
Arseniy Shestakov b540ab73ed Code style: add empty parameters list to more lambda expressions 2017-07-19 01:39:38 +03:00
Arseniy Shestakov 2da3d8a563 Code style: remove senseless comments 2017-07-18 00:04:00 +03:00
ArseniyShestakovandGitHub b2f74a93cf Code style: add empty parameter list to all lambda expressions (#345) 2017-07-17 15:35:57 +03:00
ArseniyShestakovandGitHub b52cfe5283 Code style: use parentheses for creating heap-based objects (#344) 2017-07-16 12:58:05 +03:00
ArseniyShestakovandGitHub 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
ArseniyShestakovandGitHub ea0ceb1805 Merge pull request #323 from vcmi/CStackTweaks
CStack tweaks
2017-07-15 00:42:08 +03:00