* use smart pointers for almost all widget fields
* use SDL2 texture for cursor
* a lot af small tweaks and formatting
* removed CompImage class, it is actually useless as long as regular SDLImage support margins
* CGuiHandler: use smart pointers for [push|pop]Int
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.
* Changed most gui classes to use shared pointers
* Store and use IImage as shared_ptr
* CSpellWindow redesign
* AdventureMapClasses cleanup
* CLabel: store background as smart pointer
* Store CObjectList items as smart pointers
* Removed destroy function of list item
* Store toggle buttons as smart pointers
* Use CComponent as smart pointer
* Attempt to fix artifact merchant drawing
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.
Addresses several related problems:
* Propagation / unpropagation of duplicate bonuses is inconsistent, causing bugs
* Duplicate bonuses never stack, which is not always intended behaviour (e.g. multiple copies of resource generating artifacts)
* Different bonuses always stack, which is not always intended behaviour (e.g. Angel + Archangel morale bonuses)
This is addressed as follows:
* Duplicate bonuses are never eliminated during propagation/inheritance.
* Unpropagation eliminates only a single copy of duplicated bonus
* Bonus receives a new field stacking that determines stacking behaviour:
* * empty string = no stacking with duplicates (default)
* * "ALWAYS" = stacks with duplicates & everything else
* * some other value = no stacking with bonuses with same stacking value
Also Morale/Luck window now hides non-stacking bonuses.
* Indirect spell effects loading
* Json serializer improvements
* spell->canBeCastAt do not allow useless cast for any spell
* Added proxy caster class for spell-created obstacles
* Handle damage from spell-created obstacles inside mechanics
* Experimental GameState integration/regression tests
* Ignore mod settings and load only "vcmi" mod when running tests
* fixed https://bugs.vcmi.eu/view.php?id=2765 (with tests)
* Huge improvements of BattleAI regarding spell casts
* AI can cast almost any combat spell except TELEPORT, SACRIFICE and obstacle placement spells.
* Possible fix for https://bugs.vcmi.eu/view.php?id=1811
* CStack factored out to several classes
* [Battle] Allowed RETURN_AFTER_STRIKE effect on server side to be optional
* [Battle] Allowed BattleAction have multiple destinations
* [Spells] Converted limit|immunity to target condition
* [Spells] Use partial configuration reload for backward compatibility handling
* [Tests] Started tests for CUnitState
* Partial fixes of fire shield effect
* [Battle] Do HP calculations in 64 bits
* [BattleAI] Use threading for spell cast evaluation
* [BattleAI] Made AI be able to evaluate modified turn order (on hypothetical battle state)
* Implemented https://bugs.vcmi.eu/view.php?id=2811
* plug rare freeze when hypnotized unit shots vertically
* Correctly apply ONLY_MELEE_FIGHT / ONLY_DISTANCE_FIGHT for unit damage, attack & defense
* [BattleAI] Try to not waste a cast if battle is actually won already
* Extended JsonSerializeFormat API
* fixed https://bugs.vcmi.eu/view.php?id=2847
* Any unit effect can be now chained (not only damage like Chain Lightning)
** only damage effect for now actually uses "chainFactor"
* Possible quick fix for https://bugs.vcmi.eu/view.php?id=2860
- 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
- Most of outdated CMakeLists code removed.
- All Mac-specific code is removed include Sparkle support and vcmibuilder app.
- DMG buidling reimplemented using macdeployqt command.
* All command line options now case insensetive.
* SDL_VIDEO_X11_DGAMOUS unused in SDL2 so it's removed.
* Added current year into the --help output for client and server.
* Moved DO_NOT_START_SERVER into session settings.
Now client accept following options:
--disable-shm - disable shared memory usage
--enable-shm-uuid - use UUID for shared memory identifier
UUID is useful when a lot of clients starting simultaneously.
Needed for testing and was easier to implement than alternatives.
Before when CloseServer / LeaveGame applied there was no thread sync on server.
Now server use std::atomic bool for synchronization and graceful shutdown.
If running with --spectate/-s CPlayerInterface will appear even without human players.
Following command-line options also available:
--spectate-ignore-hero
--spectate-hero-speed=N
--spectate-battle-speed=N
--spectate-skip-battle
--spectate-skip-battle-result
Boolean options can also be changed in runtime via client console:
set spectate-ignore-hero on / off
Spectator mode also:
- Work with --onlyAI option when starting game or loading saves.
- Allow to use any cheat codes.
- Give recon on towns and heroes.
* Avoid server crash on dummy connect / disconnect.
* Avoid server crash when host left from PreGame.
* Server print it's state with name when it's waiting for connection or in pregame.
* Server will use random port if specified port is busy.
* AI libs registering shenanigans on android;
* Fixed resolution aspect + mouse event scaling;
* Proper server init/deinit (through android IPC);
Enabled threaded init in CMT;
* Prevented a deadlock in logger on some devices;
* Fixed frozen intro frame after interrupting the video;
Added android progressbar displaying during initial data loading;
* Hacky fix for choppy animations during heroes movement (should look better now, but it's definitely not a good solution);
* Changes/fixes for new android launcher building process;
* Fixed app hang after getting SDL_QUIT when activity was destroyed;
* Functioanal, configurable advmap swiping support;
* VCMI changes cleanup;
Added few missing VCMI_ANDROID guards on swipe mechanics;
* Removed unneeded sleep in server startup code for android;
* Removed android ioapi hack (fixed in newest ndk);
* Removed unused android's library loading logic;
* Added android's swipe option to settings schema;
* Moved NO_STD_TOSTRING to be defined in global.h instead of build files;
Saving is slowest part of VCMI and for testing purposes like benchmarking it's helpful to create saves less often.
When --testingsavefrequency=N is specified client going to save only once in N days.
Option only active if other testing options are specified too.
Option is useful for server profiling also let me test MP over network and much more.
Also there is issues with boost::interprocess on some systems under Windows and this is the way to bypass them.
This basically starts respecting the displayIndex setting. When
changing the fullscreen setting in-game, we read the display index
from the already existing window.
std::atexit generally does not play nice with static objects in other
translation units/libraries - there are no guarantees about the order
of destruction of static objects and atexit functions coming from
different translation units/libraries. Removing calls to atexit fixes
crashes when quitting the game. The crash happened during the dispose
function somewhere inside boost's locale library that is used
indirectly by the logger - some locale function tried to lock a static
mutex that was already destroyed.
That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
gosolo: make AI to take over every human player in game. Second command would give control back to CPlayerInterface.
controlai: give control of one or all AI players to CPlayerInterface. Command "controlai orange" turn orange to human player while "controlai" without color specified make all AIs human controlled players.
Use these when you need to run multiple instances of VCMI simultaneously.
--testingport is port used to start server. Override port number from configuration files.
--testingfileprefix is prefix for auto save filenames.
Both options has to be set in order to work.
New widget specifically for volume settings.
Replace previous implementation using 10 toggle buttons.
Enable indicator animation
Fix indicator ghosting when drag and releasing
Add scroll capability to volume
Volume now can be adjusted from 0 - 99 with the mouse or the scroll wheel
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.
- Implemented "show intro" toggle in settings
- Install/Update/Enable buttons are now visible even when mod info is hidden
- Fixed behaviour of show mod info switch, added more obvious button to enable it
- Removed no longer used "Enable mods on install" switch
- Added buttons to open data, user data and temporary directories