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

301 Commits

Author SHA1 Message Date
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
252f68cb1a Fix black market behavior to match H3 2017-07-12 01:21:00 +02: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
AlexVinS
dbaf3cb023 Cleanup & formatting 2017-07-04 01:32:40 +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
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
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
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
AlexVinS
195e979a18 get rid of CBattleInfoCallback::battleCanCastThisSpell 2017-06-05 23:46:55 +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
fa6a7bd1b5 Fixed CID 1375682 2017-05-28 15:06:12 +03:00
AlexVinS
1c95c51ffb Fixed CID 1375685 2017-05-28 14:40:36 +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
FeniksFire
19a9f05b80 Fix garrison highlight in city (#292) 2017-03-23 22:48:35 +03:00
FeniksFire
3de891b4b4 Moving/dividing classes from BattleState to separate files. 2017-03-17 16:48:44 +01:00
dydzio
8a2b47d967 Fix for bug #2435 2017-02-10 12:19:35 +01:00
dydzio
81a00f59d1 Basic fix for bug #2635 2017-02-02 19:17:15 +01:00
Dydzio
79c101a56d Remove leftover commander artifact code 2016-12-31 21:29:47 +01:00
AlexVinS
2dd6a47764 try to plug a few coverity false positives 2016-11-28 02:50:41 +03:00
AlexVinS
312793efd9 try to plug a few coverity false positives 2016-11-27 23:41:17 +03:00
AlexVinS
6196ae7fca Fixed a few CWE-457 2016-11-27 19:00:16 +03:00
AlexVinS
27b853618c Fixed a few CWE-457 2016-11-27 18:17:20 +03:00
AlexVinS
86e33a4c45 [Refactoring] Unified SetResources NetPack API. 2016-11-26 15:14:43 +03:00
AlexVinS
86c7bab9c1 Fixed CID 1366324 2016-11-25 22:28:16 +03:00
AlexVinS
80666fb134 Tweaks 2016-11-25 22:12:22 +03:00
AlexVinS
f0963c91bb Fixed CID 1197409 2016-11-25 21:59:27 +03:00
AlexVinS
8b6543bef2 Fixed CID 1366365, CID 1288839 2016-11-25 19:58:52 +03:00
AlexVinS
6a616a5d33 Fixed CID 1366371 2016-11-25 19:36:40 +03:00
AlexVinS
663099882c Fixed CID 1366366, CID 1366367, CID 1366368, CID 1366369, CID 1366370, CID 1366372 2016-11-25 19:28:00 +03:00
AlexVinS
5dd5a0d4a8 Fixed CID 1197445, CID 1197446 2016-11-25 17:54:01 +03:00
AlexVinS
b908c70468 Fixed CID 1197487 2016-11-25 17:29:49 +03:00
AlexVinS
04d22644e5 fixed http://bugs.vcmi.eu/view.php?id=2617 2016-11-23 14:47:57 +03:00
AlexVinS
33c0bc49f6 Merge branch 'CommanderArtifacts3' into develop 2016-11-13 15:31:16 +03:00
AlexVinS
a8a661b159 Map handler refactoring, part 2. 2016-11-08 00:19:53 +03:00
AlexVinS
aad675a7c4 Revert "Merge branch 'p254_4' into develop"
This reverts commit 37f68713a7, reversing
changes made to 4477b7c35d.
2016-11-08 00:17:20 +03:00
AlexVinS
c9a3d92ff3 cleanup 2016-11-06 17:36:46 +03:00
dydzio
96fa0fb6d4 Implement giving commander artifacts back to hero 2016-11-06 13:02:00 +01:00
dydzio
baeb3c9e55 Refactor CArtPlace + use it for commanders 2016-11-04 17:54:09 +01:00
dydzio
47a72d4441 Make artifacts worn by commander visible 2016-11-03 14:25:17 +01:00
Vadim Markovtsev
8d40a4aa95 Fix GUI disposal in creature info window 2016-10-30 22:21:26 +01:00
Vadim Markovtsev
34005228e0 Fix bugs with giving commander's badge to stacks
1. SEGFAULT
2. Memory leaks
3. Invalid drawing
4. Fix returning artifacts
2016-10-30 16:32:28 +01:00
AlexVinS
3dddbcf2e8 try to use CAnimation for Hero path 2016-10-27 16:34:15 +03:00
AlexVinS
536f36ede8 use CAnimation fro world view icons 2016-10-27 16:34:12 +03:00
AlexVinS
365c64a345 use CAnimImage for world view legend 2016-10-27 16:34:10 +03:00
AlexVinS
36ac9ac86c CAdvMapInt tweak 2016-10-27 16:34:07 +03:00
Vadim Markovtsev
d51c9a1ff0 Fix uninitialized scrolling state 2016-10-22 10:18:57 +02:00
AlexVinS
28dd12089b CSpellWindow fixes. 2016-10-18 02:15:43 +03:00
ArseniyShestakov
eec14028fe Merge pull request #242 from dydzio0614/MapScrollCursor
Implement adventure map scroll cursor change
2016-10-17 16:09:01 +03:00
dydzio
22564dde4b Implement adventure map scroll cursor change 2016-10-17 14:55:55 +02:00
AlexVinS
5346ecb6df tweak 2016-10-17 05:42:29 +03:00
AlexVinS
3bd8cde8e0 fix 2016-10-17 05:21:43 +03:00
AlexVinS
345dd913f6 use CLabel in SpellArea 2016-10-17 05:05:48 +03:00
AlexVinS
e3ee51a28f Use label object for mana 2016-10-17 04:05:33 +03:00
AlexVinS
bc2f0ba6f1 fixed spell school ordering http://bugs.vcmi.eu/view.php?id=91 2016-10-17 03:33:29 +03:00
AlexVinS
ba5b65ff93 get rid of CDefHandler in CSpellWindow 2016-10-16 15:27:35 +03:00
AlexVinS
2a6bab119b Use CAnimImage for SpellArea 2016-10-16 13:22:07 +03:00
AlexVinS
3a52a3c663 Allow CAnimImage to share animation object. 2016-10-16 12:58:18 +03:00
AlexVinS
a0300b0447 CSpellWindow widgets capturing 2016-10-16 12:01:18 +03:00
AlexVinS
e1f9b2c74a SpellArea tweak 2016-10-16 10:43:49 +03:00
AlexVinS
2eb61533fa use only CSpell in CSpellWindow 2016-10-16 10:32:12 +03:00
AlexVinS
63cbf960df cleaned up spell window creation 2016-10-16 09:27:22 +03:00
AlexVinS
415bd8247a Moved SpellbookInteractiveArea into CSpellWindow class 2016-10-16 09:17:23 +03:00
AlexVinS
c4b72342de CSpellWindow: improved constructor readability 2016-10-16 09:03:13 +03:00
AlexVinS
5506ae036a Reworked CHillFortWindow
* fixed displaying free upgrades
* do not try to print 3rd or more resource in slot cost (in theory possible with mods)
** we need dynamic gui for that
* CDefEssential--
2016-10-16 08:03:52 +03:00
AlexVinS
055c84bc7a cleanup 2016-10-16 04:23:38 +03:00
AlexVinS
abb875b400 cleanup 2016-10-16 03:52:11 +03:00
AlexVinS
41a5cc1b69 get rid of CCastleInterface::bicons 2016-10-16 03:00:57 +03:00
Vadim Markovtsev
34cf92cb9b Change logging style 2016-10-03 20:32:01 +02:00
Vadim Markovtsev
d5327f3daf Fix loading "" bitmap at game start 2016-10-02 22:45:00 +02:00
AlexVinS
85863dbed6 Fix build 2016-10-02 17:25:55 +03:00
Piotr Wójcik
ea6545b1d3 Prevent flipping empty spellbook
When hero has no travel spells he can no longer flip spell book opened from right panel button
2016-10-01 21:39:40 +02:00
AlexVinS
7c91d378c8 Display specific message if cast blocked by CURSED_GROUND 2016-10-01 18:35:56 +03:00
AlexVinS
52ae5b4a86 Fixed http://bugs.vcmi.eu/view.php?id=482 2016-10-01 18:18:46 +03:00
AlexVinS
96c17505ae get rid of IBonusBearer::getSpellBonuses & Selector::anyRange 2016-10-01 09:07:18 +03:00
dydzio
33ea28c5dd Improve creature upgrade handling. Fix issue #2172 2016-09-30 21:21:41 +02:00
Vadim Markovtsev
2c1dddde33 Fix memory problems with BonusList
Bonus * -> std::shared_ptr<Bonus>

This cures the following problems:

1) Memory corruption at exit. Some Bonus-es were deleted twice (mods?).
2) Memory leaks. Some Bonuses were not deleted.
3) Reduce the number of "Orphaned child" messages.

Valgrind reports 0 leaked memory now and no invalid reads/writes.
2016-09-29 15:08:00 +02:00
AlexVinS
921d2f6210 Fixed http://bugs.vcmi.eu/view.php?id=2522 2016-09-29 10:21:22 +03:00
Vadim Markovtsev
31e5f7b800 Fix morale widget update after dismissing a creature in garrison 2016-09-19 18:59:34 +02:00
Arseniy Shestakov
f623865991 CCastleBuildings: add dialog for shipyard when there is boat already 2016-09-14 03:32:03 +03:00
Arseniy Shestakov
02f70464fb Fix mismatched-tags Clang warnings
They're not important at all, but sicne there only few of them left just fix them.
2016-09-08 19:42:59 +03:00
Piotr Wójcik
044e2b9e51 Properly calculate building requirements
In OH3 you can't build Capitol when Tavern is not builded.
In VCMI up to now you could.
2016-08-30 22:15:24 +02:00
Arseniy Shestakov
0236309d25 CArtifactsOfHero: use shared_ptr for SCommonPart 2016-08-30 07:05:31 +03:00
AlexVinS
b8f4fdc2f2 fixed memory leak in CTradeWindow::initItems 2016-08-30 05:55:51 +03:00
AlexVinS
e4091c05ec fixed unitialized value field 2016-08-17 09:49:43 +03:00
Arseniy Shestakov
10dbbead2d Fix indentation of logging code and around it
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.
2016-03-12 04:46:21 +03:00
Arseniy Shestakov
faae305ec0 CTradeWindow: avoid crash when right click on artifact
Fix suggested by @argarak in PR #199
2016-03-12 03:19:38 +03:00
AlexVinS
3873e5047e Attempt to fix 2293 2016-03-01 13:24:46 +03:00
Vadim Markovtsev
bdd87be10d Try to fix http://bugs.vcmi.eu/view.php?id=2362 2016-02-02 11:46:33 +03:00
Vadim Markovtsev
32ece9513d Fix 2331 save menu keyboard event leak
The control flows the following way:
- we receive SDL_KEYDOWN with letter 's' in the adventure map interface
- save dialog opens
- text input receives focus
- text input enables receiving SDL_KeyboardEvent-s which go between DOWN and UP
- the button on keyboard becomes UP (the menu opens very fast)
- text input receives SDL_KeyboardEvent and inserts 's'
- text input receives SDL_KEYUP

So the apparent fix is to open the save dialog on SDL_KEYUP event
2016-01-28 10:26:40 +03:00
Vadim Markovtsev
9f3313524e Fix 2160 dismissing a VIP hero 2016-01-27 17:10:19 +03:00