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

2622 Commits

Author SHA1 Message Date
Piotr Wójcik
886c8f63c6 Show stacks selected to sacrifice 2017-08-01 17:17:46 +02:00
ArseniyShestakov
9d9c026c85 Code style: serialize everything on own lines for easier debugging (#357) 2017-07-31 16:35:42 +03:00
Piotr Wójcik
137b9cde19 Fix crash in Altar of Sacrifice, fixes #2648 2017-07-29 19:27:39 +02:00
Fay
80f149e296 Better android input handling: sending notifications about CInputText changes to java so that we can display textinput overlay there; (#354) 2017-07-23 20:23:48 +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
ArseniyShestakov
b2f74a93cf Code style: add empty parameter list to all lambda expressions (#345) 2017-07-17 15:35:57 +03:00
Dydzio
81ccecedca Fix color change of highlighted hex borders (#343) 2017-07-17 01:15:05 +03:00
ArseniyShestakov
b52cfe5283 Code style: use parentheses for creating heap-based objects (#344) 2017-07-16 12:58:05 +03:00
AlexVinS
7374689301 Fixed https://bugs.vcmi.eu/view.php?id=2715 2017-07-16 00:02:55 +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
ArseniyShestakov
ea0ceb1805 Merge pull request #323 from vcmi/CStackTweaks
CStack tweaks
2017-07-15 00:42:08 +03:00
AlexVinS
2fb531b6d0 Display actual moral and luck for batlle stack 2017-07-14 21:42:36 +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
Dydzio
7bf1b91235 Visual Studio files tweaks 2017-07-13 13:18:40 +02:00
Alex Dunn
1d735503d1 CMake: fix macOS app bundle (#337)
Currently the vcmiclient binary is left behind in the build directory.
2017-07-13 11:29:23 +03:00
Arseniy Shestakov
dbcd79c48a Code cleanup: remove double and unneded semicolons 2017-07-12 22:01:10 +03:00
AlexVinS
09df2dcfbb fixed possible race condition 2017-07-12 19:40:14 +03:00
AlexVinS
2c525fc76e Attempt to fix headless tests crash. 2017-07-12 17:02:25 +03:00
Dydzio
252f68cb1a Fix black market behavior to match H3 2017-07-12 01:21:00 +02:00
ArseniyShestakov
2cf7c7b234 Merge pull request #335 from dydzio0614/bug2476_fix2
Fix #2 for bug #2476
2017-07-11 15:40:35 +03:00
Dydzio
182210421d Fix #2 for bug #2476 2017-07-11 14:04:43 +02:00
ArseniyShestakov
fcd63cd982 Merge pull request #333 from dydzio0614/RealFullscreen
Add optional real fullscreen mode support
2017-07-10 21:04:24 +03:00
AlexVinS
1fe01b7254 Moved defensive stance log message building to server side. 2017-07-10 04:05:36 +03:00
AlexVinS
7bf8c9bd69 fixed and cleanup 2017-07-08 21:20:38 +03:00
AlexVinS
4f14f22d3a Unified CStack ammo, casts and counterattacks
* it is possible now to add casts and shoots OTF (f.e. with spell bonus)

Centralized stack 'ammo' loading from bonus system.
* introduced small proxy class for local bonus cache
(no need to use global cache if particular selector used on node only in one place)
* handle killing resurrected creatures
* use IBonusBearer::MaxHealth() where possible
* Fixed https://bugs.vcmi.eu/view.php?id=2486
* Possible fix for 0 HP after resurrection.
* Hack-fixed https://bugs.vcmi.eu/view.php?id=2584
* Unified CStack health API
* Use CHealth for CStack count and health points
* increased SERIALIZATION_VERSION
2017-07-08 20:29:59 +03:00
Dydzio
c377f594a5 Add optional real fullscreen mode support 2017-07-08 18:43:04 +02:00
ArseniyShestakov
3634af10ba Merge pull request #330 from dydzio0614/AmountBoxTweaks
Tweak battle creatures amount box hiding
2017-07-08 15:54:18 +03:00
Dydzio
2d6f964d65 Amount box support for stacked war machines 2017-07-07 19:04:29 +02:00
Dydzio
ae2323672a Tweak battle creatures amount box hiding 2017-07-07 18:11:05 +02:00
Victor Luchits
36b8541ab5 MacOS build fix 2017-07-07 15:20:52 +03:00
Victor Luchits
30cc2f6a01 Change the output path for cmake so all files go into the same root directory 2017-07-07 13:08:53 +03:00
AlexVinS
4d204095cf fix 2017-07-07 02:55:23 +03:00
Alex Dunn
38693d83a1 macOS: use HTTPS for appcast (#325) 2017-07-06 22:48:14 +03:00
Alex Dunn
489fdaefb7 client: only copy libminizip when not provided by the system (#328) 2017-07-06 09:26:41 +03:00
Alex Dunn
34058f1396 macOS: turn Sparkle off by default (#327) 2017-07-06 09:09:30 +03:00
Victor Luchits
310f6e27cb Workaround ffmpeg linking problems 2017-07-04 03:31:13 +03:00
AlexVinS
dbaf3cb023 Cleanup & formatting 2017-07-04 01:32:40 +03:00
AlexVinS
dfbc9cea8a Hack-fixed icon position 2017-07-03 22:01:03 +03:00
AlexVinS
6dd89efc9a tweaks 2017-07-03 21:43:05 +03:00
AlexVinS
a65befaa08 Moved town portal logic to mechanics class 2017-07-03 21:43:04 +03:00
AlexVinS
3d1a84875e Queries refactoring
* Moved SUMMON_BOAT special case to mechanics
* Partially moved Town portal logic to mechanics class
* Added generic query reply to CCallback
* Redesigned Queries so that base API do not depends on CGameHandler
* Got rid of CGameHandler::castSpellRequest
* Removed CGameHandler::castSpell
* Added new Query type for town portal dialog (not used yet)
2017-07-03 21:43:04 +03:00
ArseniyShestakov
5dfb7a5771 Merge pull request #317 from vcmi/attackerOwned
Refactored CStack::attackerOwned to CStack::side
2017-07-03 16:19:54 +03:00
AlexVinS
3ce238e4d3 Tweak 2017-07-03 13:40:22 +03:00
AlexVinS
e4c14c4cc2 avoid assertions in stack position checks 2017-07-03 12:59:33 +03:00
Arseniy Shestakov
c059f95e2e CClient::loadGame: pass correct save version for BinaryDeserializer
Fix loading crashes that appear after duel mode removal.
2017-07-03 05:11:58 +03:00
AlexVinS
4f8c7bd4bb CStack refactoring
* removed all occurrences of attackerOwned
* Use BattleSide enum
* more tweaks
2017-07-01 19:17:08 +03:00
ArseniyShestakov
2f305cc68d Remove code related to duel mode (#312)
Remove code related to duel mode
2017-07-01 16:30:13 +03:00
Arseniy Shestakov
fb19a3a068 CMake: update all CMakeLists to include actual sources and headers
This make it easier to use project with newer CMake and Qt Creator.
I decided against using GLOB since we don't rename files that much.
2017-06-29 02:03:37 +03:00
ArseniyShestakov
bd27636cd9 Merge pull request #316 from FeniksFire/improvingTheBattle
Refactoring.
2017-06-28 19:55:03 +03:00
FeniksFire
8ccdda6d2d Improve formatting, update other config information about includes. 2017-06-27 17:00:44 +02:00
FeniksFire
4113bdab01 Moving some files from lib to the battle subdirectory. 2017-06-26 15:26:08 +02:00
Arseniy Shestakov
eeff7ee315 Few minor code improvements
* 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.
2017-06-26 04:56:28 +03:00
Arseniy Shestakov
6c8192956e PreGame: implement campaign saves list and improve filtering
There no campaign info screen, but dedicated list for campaign saves.
2017-06-24 03:14:32 +03:00
Fay
01e5f992d3 Android: possible solution for sdl2 colors problem 2017-06-17 00:34:18 +03:00
AlexVinS
86f9df5f68 Made gamestate lock static 2017-06-14 07:59:41 +03:00
AlexVinS
cf60aa61b0 cleanup 2017-06-14 07:39:23 +03:00
AlexVinS
0af9aa382c Possible fix for https://bugs.vcmi.eu/view.php?id=2692 2017-06-14 04:53:26 +03:00
AlexVinS
0f5202689e Cumulative spell effects
* Added experimental support for cumulative effects for ENCHANTED bonus
* Updated and fixed SPECIAL_PECULIAR_ENCHANT processing
* Initial implementation of cumulative spell effects.
* Scheme for new spell feature - cumulative bonus.
2017-06-13 21:50:50 +03:00
DJWarmonger
9623f7caf3 - Restored MSVS project files
- Fixed VCAI bu pointed out by Tow
2017-06-11 08:01:41 +02:00
Fay
65e88639a3 Minor: code format; 2017-06-08 21:07:09 +02:00
Fay
01bae590f1 Added swipe support for non-android platforms; 2017-06-07 22:42:41 +02:00
Fay
02fa478bfb Refactor: unified logic for notyfing CIntObjs about left/right mouse click events;
Added support for middle-click;
2017-06-07 20:16:18 +02:00
AlexVinS
0190c9804e formatting 2017-06-06 19:45:34 +03:00
AlexVinS
a31c28ec33 Unified war machine mechanics.
* it is possible to define new war machines
* added warMachine field to artifact configuration
2017-06-06 19:18:26 +03:00
Arseniy Shestakov
1a60c1a94b Shared memory refactoring and command line control options
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.
2017-06-06 07:30:16 +03:00
Arseniy Shestakov
a2284c3209 Automated testing: graceful shutdown for when game is ended
Before when CloseServer / LeaveGame applied there was no thread sync on server.
Now server use std::atomic bool for synchronization and graceful shutdown.
2017-06-06 07:30:16 +03:00
Arseniy Shestakov
3f7cb9f893 Client: add some shortcuts for spectator mode
Following mode only work when client is started in spectator mode:
F5 - Pause / resume game by locking of pim
F6 - Toggle spectate-ignore-hero
F7 - Toggle spectate-skip-battle
F8 - Toggle spectate-skip-battle-result
F9 - Skip current battle
2017-06-06 07:30:16 +03:00
Arseniy Shestakov
18161d3688 Client: implement spectator mode via command-line options
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.
2017-06-06 07:30:16 +03:00
Arseniy Shestakov
d95c74941b Client: add onlyAI option support for saved games
When --onlyAI option used all human players will be replaced with AIs during loading.
2017-06-06 07:30:16 +03:00
Arseniy Shestakov
f7f7fe1d32 Client: fix headless mode and add automated testing mode
Command-line option --noGUI replaced with --headless.
Added option --testmap that will run specified map with AI players
2017-06-06 07:30:16 +03:00
AlexVinS
195e979a18 get rid of CBattleInfoCallback::battleCanCastThisSpell 2017-06-05 23:46:55 +03:00
AlexVinS
6c308956f9 get rid of CBattleInfoCallback::battleCanCastThisSpellHere 2017-06-05 23:25:48 +03:00
AlexVinS
2cfb2e6ae0 get rid of CPlayerBattleCallback::battleCanCastThisSpell 2017-06-05 22:53:42 +03:00
AlexVinS
4d430f6ad8 get rid of CPlayerBattleCallback::battleCanCastSpell 2017-06-05 22:16:12 +03:00
AlexVinS
66cfc2fef9 CSpell::canBeCast tweaks 2017-06-05 21:30:25 +03:00
AlexVinS
e25ed4f358 [Tweak] Use unique_ptr for map header in pregame 2017-06-04 21:11:58 +03:00
Alexander Shishkin
7e1b0d71c5 Added option for saving generated maps on client side (#307)
* new configuration option 'general.saveRandomMaps'
* maps being saved to 'userCachePath/RandomMaps'
* no deletion of old random maps
* map filename generated based on template name and random seed
2017-06-04 20:33:28 +03:00
Arseniy Shestakov
6642816b1e Client: server port and testing options cleanup
Now we only pass port as ui16 instead of std::string
2017-06-04 08:49:23 +03:00
Arseniy Shestakov
4a302d4fe5 CBattleHero::clickRight: more elegant code for side detection 2017-06-03 04:28:03 +03:00
Arseniy Shestakov
4b0f702e7e Add LeaveGame netpack and avoid replying on it and CloseServer 2017-06-02 02:51:44 +03:00
Arseniy Shestakov
c7e7a4d7be Make usage of boost::interprocess optional
If shared memory allocation failed on client server will be started without shared memory option.
Only downside of this is that server wouldn't be able to fallback to random port if default is busy.
2017-06-02 02:44:41 +03:00
Arseniy Shestakov
cc163c4e05 Refactoring of networking code on server and client
* 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.
2017-06-02 02:44:39 +03:00
Arseniy Shestakov
db5a52a0f8 Multiplayer: gracefully handle player loss unless it's a host
We don't want server to shutdown after just one of players lost the game.
2017-05-31 08:04:26 +03:00
AlexVinS
009bfb8211 cleanup 2017-05-28 17:27:16 +03:00
AlexVinS
fa6a7bd1b5 Fixed CID 1375682 2017-05-28 15:06:12 +03:00
AlexVinS
f5cdaece6f Fixed CID 1375687 2017-05-28 14:40:36 +03:00
AlexVinS
1c95c51ffb Fixed CID 1375685 2017-05-28 14:40:36 +03:00
AlexVinS
df3574b50f Fixed https://bugs.vcmi.eu/view.php?id=2685 2017-05-27 17:07:11 +03:00
AlexVinS
a85b4cf2a5 * WIP on event condition format
* Hero portrait serialization
* Fix town spells serialization

* Added support for float exponential part in Json
* Added support for int64 in Json
* Added basic Hero definitions serialization
* Added rumors serialization
* Advanced player info serialization.
* Added Disposed heroes serialization, (!) not covered with tests yet
* Added Local event serialization
* Added Pandoras box serialization
* Added Seer hut reward serialization
* Added CQuest serialization
* Added API for map object instance names serialization.
* Added random dwelling options serialization
* Advanced town options serialization
* Advanced hero options serialization
* More map format tests
* A lot of fixes, cleanup and refactoring
2017-05-27 00:23:19 +03:00
Dydzio
5127061e28 Commander skill description support (#266)
* Added commander skill description support

* Add support for ZNPC00.txt not found
2017-05-26 22:58:33 +03:00
Fay
b5daa24982 Android support (#299)
* 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;
2017-05-25 20:57:20 +03:00
AlexVinS
f370cdf1c7 Possible fix for https://bugs.vcmi.eu/view.php?id=2678 2017-05-25 20:09:38 +03:00
ArseniyShestakov
bdb0db819d Merge pull request #300 from Chocimier/iss1761
Correctly display visiting army in kingdom overview, fixes #1761
2017-05-23 03:53:11 +03:00
Piotr Wójcik
76acc29d6c Correctly display visiting army in kingdom overview, fixes #1761
Do not modify CIntObject::pos, according to its doc
2017-05-22 22:34:05 +02:00
DjWarmonger
1b7420264f Merge pull request #295 from Chocimier/iss1293
T hotkey select first town when last is active, fixes #1293
2017-05-13 18:22:28 +02:00
Piotr Wójcik
e4d3cdca09 Simplify 2017-05-13 16:57:15 +02:00
FeniksFire
d390dff54d Fix game crash after autofight.
Vcmi makes crash when I turn on autofight in the battle and wait until I
close result battle window.
2017-05-13 09:54:03 +02:00
Piotr Wójcik
cc02001836 T hotkey select first town when last is active, fixes #1293 2017-05-11 20:49:17 +02:00