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

2222 Commits

Author SHA1 Message Date
AlexVinS
a06e34cf61 Cleanup 2015-09-29 19:14:24 +03:00
AlexVinS
70d9be8447 Use ISpellCaster in battle callback 2015-09-29 17:26:52 +03:00
AlexVinS
d9cbe487c7 remove useless function CSpell::getTargetInfo 2015-09-29 17:26:47 +03:00
AlexVinS
2b434111bf More hero|creature casting unification 2015-09-29 17:26:40 +03:00
AlexVinS
92990c887c Fix creatures can always cast on self 2015-09-29 17:26:37 +03:00
ArseniyShestakov
ffb8e6a696 Garrison: fix more issues introduced in pull #115
After 8cad23956c there was several issues remaining:
* Last creature would remain even for town garrisons.
* Impossibility to move last stack even within same garrison.
* Impossibility of partially merge of last stack into other hero stack.
All fixed. However last stack merge to other hero will now make split window appear instead of auto merge.
2015-09-23 08:12:43 +03:00
DjWarmonger
2851832f0c Fixed logs. 2015-09-20 14:02:52 +02:00
DjWarmonger
57637dd71a Added some checks & logs for empty def names, but it only delays the crash. 2015-09-20 13:02:13 +02:00
DjWarmonger
e14faea181 Merge branch 'develop' of https://github.com/vcmi/vcmi into mutexRelax 2015-09-20 09:46:52 +02:00
AlexVinS
8cad23956c Fix 2258 2015-09-19 17:16:09 +03:00
AlexVinS
d181d764bb fix 2215 2015-09-15 10:02:27 +03:00
AlexVinS
caf8ae62cc Allow custom effect animation on any stack during spell cast. 2015-09-14 06:21:49 +03:00
AlexVinS
0f0e67dbe3 Do not include resisted stacks in affected 2015-09-14 05:45:05 +03:00
AlexVinS
9d0a1f0eef Added logging for CDummyAnimation creation (like other types) 2015-09-13 00:01:36 +03:00
AlexVinS
cbd8900c0b Added CBattleConsole tracing 2015-09-12 23:03:45 +03:00
AlexVinS
075b65b31b Use dummy animations 2015-09-12 21:09:53 +03:00
AlexVinS
832d69ec11 Hide battle log algorithm in spell classes.
* not finished, to be moved to json of splitted between mechanics classes
2015-09-12 21:09:51 +03:00
AlexVinS
5d0ecd9cdf More battle log refactoring 2015-09-12 21:09:50 +03:00
AlexVinS
7cf9bd36b7 Display AGE effect with any value (not only -50%). 2015-09-12 21:09:49 +03:00
AlexVinS
3a5a02e73b Use boost::fromat in CBattleInterface::spellCast 2015-09-12 21:09:48 +03:00
AlexVinS
805c839761 More CBattleInterface::spellCast refactoring 2015-09-12 21:09:47 +03:00
AlexVinS
8171924eb4 More simplification of CBattleInterface::spellCast
* was started in previous branch
2015-09-12 21:09:46 +03:00
AlexVinS
9482852020 few tweaks 2015-09-12 21:09:45 +03:00
AlexVinS
fb5903d610 Initial experiments on hero & creature casting unification 2015-09-12 21:09:44 +03:00
AlexVinS
28087099b8 More correct usage of SDL_Palette 2015-09-05 15:03:37 +03:00
AlexVinS
8f2da66a18 fix mantiss 1967 + some refactoring
* remove TModDescr and realted APIs - they were only used in one place
2015-09-04 22:29:20 +03:00
AlexVinS
e82dfb5a85 fixed mantiss 0002254 2015-09-04 18:08:25 +03:00
AlexVinS
1510f1f14c CQuestLog: boost::bind->std::bind 2015-09-02 20:00:56 +03:00
AlexVinS
b512005d38 Get rid of CSDL_Ext::colorSetAlpha 2015-09-02 18:49:29 +03:00
AlexVinS
e80c8d16a6 Cleanup CDefHandler 2015-09-02 18:27:56 +03:00
DjWarmonger
32f3f9d76d Fixed high CPU usage by mapHandler::hideObject 2015-08-31 11:07:35 +02:00
Sandy Carter
a79ade7d44 Garrison: Move all but one creature when last slot 2015-08-26 08:44:23 -04:00
Sandy Carter
dafc40d896 Garrison: Fix selection behaviour when swapping with ally 2015-08-26 08:40:00 -04:00
Sandy Carter
a89ef88ce3 Garrison: Factor complex if statement to functions 2015-08-26 08:40:00 -04:00
Sandy Carter
cd13807115 Garrison: Clarify upg by turning into a class enum 2015-08-26 08:39:57 -04:00
Sandy Carter
b008d24c68 Garrison: Refactor Left Click
Restructure large nested if statements into more shallow blocks
Factor out contents of if statements to functions for better readability
    * viewInfo
    * hightlightOrDropArtifact
    * split
2015-08-25 09:47:23 -04:00
Sandy Carter
3d327e650a Garrison: Boyscouting: simplify clickLeft 2015-08-25 09:47:23 -04:00
Sandy Carter
c02700853a Garrison: Disable split buttons when visiting ally 2015-08-25 09:47:23 -04:00
Sandy Carter
742f244426 Garisson: Documentation: Convert comments to doc 2015-08-25 09:47:23 -04:00
Sandy Carter
6ffb03cba3 Garrison: Documentation for our() and ally() 2015-08-25 09:47:21 -04:00
Sandy Carter
219ce45866 CastleInterface: Fix tooltip saying Empty after swapping armies 2015-08-25 09:22:25 -04:00
Sandy Carter
b2da2b8ef0 Garrison: Show "(in garisson)" for garissoned heroes' creatures 2015-08-25 09:22:25 -04:00
AlexVinS
68e3948242 Fix mantiss 1965 2015-08-25 12:16:47 +03:00
Sandy Carter
ae6d3c9138 CCastleInterface: Enable right click on Hero Info 2015-08-24 13:31:03 -04:00
Sandy Carter
236492ed39 widgets: Cleanup musicButton specific hacks 2015-08-22 12:40:14 -04:00
Sandy Carter
bf353a4f5b windows: Replace CToggleGroup volume widget with CVolumeSlider 2015-08-22 12:40:14 -04:00
Sandy Carter
6a3c2d3071 gui: Fix in parameter for scroll events
Refetch mouse position before checking if mouse is in widget Rect
Give acurate position of the mouse when scrolling
2015-08-22 12:40:14 -04:00
Sandy Carter
9d62a2f0a1 Buttons: Add CVolumeSlider widget
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
2015-08-22 12:40:14 -04:00
Sandy Carter
c6b51a7beb Boyscouting: Fix doxygen format
Remove commas to separate param from description
Use three slashes-style
2015-08-22 12:40:14 -04:00
Sandy Carter
f28c33001c Boyscouting: Fix typo in comment 2015-08-22 12:40:14 -04:00
Sandy Carter
a14711b3b4 Boyscouting: Fix backwards ternary operator 2015-08-22 12:40:14 -04:00
AlexVinS
371e4b8714 Fix mantiss 2235, 2237 2015-08-22 16:47:40 +03:00
AlexVinS
782c8ec40b Changed windows minimum version back to winxp due to mingw bug
* will be changed back after newer mingw tests
2015-08-20 04:22:54 +03:00
AlexVinS
03a295f1a0 Added debug mingw64 build, minimum Windows version set to windows 7, SDL suffixes removed from Build Tagerts 2015-08-20 03:28:04 +03:00
Sandy Carter
bdee647525 CastleInterface: Exclude previous building upgrade in reqs
Hide CityHall from Capitol prerequisites in Capitol build window
2015-08-19 12:05:43 -04:00
AlexVinS
5f7a90237c More smooth fps counter 2015-06-23 01:08:25 +03:00
AlexVinS
958d596d54 Do not raise on non critical error 2015-06-23 01:07:35 +03:00
AlexVinS
32c15a8266 Extract fps counter drawing 2015-06-22 23:57:34 +03:00
AlexVinS
f58148cd94 Capture SDL log
* just a stub for now
2015-06-22 22:19:32 +03:00
AlexVinS
cc669b0ae7 Move gui locking to GUIHandler 2015-06-22 21:53:47 +03:00
AlexVinS
a8c45df732 Merge branch 'SDL1Wipe' into develop 2015-06-22 14:24:00 +03:00
AlexVinS
f81116e04d Fix mantiss #2208 2015-06-21 20:30:19 +03:00
AlexVinS
53b85d16be Cleanup C::B projects 2015-06-21 01:59:33 +03:00
AlexVinS
ed281a3cc6 SDL1 wipe, part 4. Codebase cleanup finished. Untested. 2015-06-21 01:59:32 +03:00
AlexVinS
8c236e30bb SDL1 wipe, part 3. Untested. 2015-06-21 01:59:32 +03:00
AlexVinS
b6a2323e01 SDL1 wipe, part 2. Untested. 2015-06-21 01:59:31 +03:00
AlexVinS
dca1e28bc1 SDL1 wipe, part 1. Untested. 2015-06-21 01:59:30 +03:00
AlexVinS
56a1805339 Merge branch 'issue/2185' into develop 2015-06-20 19:16:41 +03:00
AlexVinS
2cb6cb7baa Remove useless durationType selector
* duration is a mask, equality comparison is not enough
2015-06-02 07:12:02 +03:00
DjWarmonger
6890ae9f02 - Fixed improper use of playersCount. Now RMG can generate maps up to 8 players, with CPU players only as well.
- Fixes for template scheme
2015-05-27 11:30:46 +02:00
AlexVinS
3c9e4916b6 Fix printing stack stats in battle 2015-04-11 14:05:00 +03:00
AlexVinS
e1deff089d Actually use ANY_CREATURE possible action
* this fixes mantiss 0002140
2015-04-11 10:56:35 +03:00
AlexVinS
a061e3c2f7 Fix use-after-free in spell window 2015-04-11 10:18:40 +03:00
Fay
1cb54689cf Prevents first aid tents from melee attacking;
Moves attack possibility checks to battle callback (for consistency with shooting checks);
2015-04-09 21:49:11 +02:00
AlexVinS
6c334174d9 Use and check movement points in town portal.
* fixes mantiss 0002031
2015-04-01 04:48:50 +03:00
AlexVinS
d564520f04 Allow town portal to ally town.
fixes mantiss 0002064
2015-04-01 04:04:02 +03:00
Ivan Savenko
eef45b5ae8 Fixed warnings 2015-03-31 00:55:37 +03:00
AlexVinS
67a7cd8350 Allow FREE_LOCATION action over dead stack. This fixes 0001560 2015-03-29 16:24:43 +03:00
AlexVinS
9600446cf9 +smart target, +hit animation 2015-03-18 17:48:32 +03:00
AlexVinS
69c458e881 initial implementation. 2015-03-18 13:27:07 +03:00
ArseniyShestakov
323c4e1637 RMG Options: make "Computer only teams" buttons work as expected
Button "0" should be always enabled and if "Computer only players" set to "0" we should also computer only team count to "0" if it's not random.
2015-03-16 16:02:52 +03:00
ArseniyShestakov
448fbe44e9 Improve CButton::block and fix CToggleGroup->selectedID
CToggleGroup. Originally when I added initialization for selectedID I didn't find out that -1 is used for "random" buttons. So as result I fixed uninitialized variable usage, but break initial button state change in RMG options because setSelected ignore state change request because it's see -1 button already marked as selected.
2015-03-16 15:55:36 +03:00
ArseniyShestakov
120301ecc8 Split army: dont highlight down garrison slots if there no visiting hero
Before UI always highlighted all slots in both town garrisons even if there no visiting here and you can't actually set army on these slots.
Now garrison slots only highlighted if they're owned by us or our ally. If there no visiting hero in town then only suitable upper garrison slots will be highlighted.
2015-03-16 02:04:18 +03:00
ArseniyShestakov
078bf6c69c CSelectionScreen: always use isHost and isGuest when suitable 2015-03-15 19:33:58 +03:00
ArseniyShestakov
c4000f2ac7 Multiplayer: always display flags in lobby, but block them for guest 2015-03-15 19:24:03 +03:00
ArseniyShestakov
eeff8f3ea4 Multiplayer: add sync for RMG options in lobby
Sadly I'm not yet find proper way to block all buttons in CToggleGroup without make them invisible so it's still possible to press buttons for guest. Though CRandomMapTab::updateMapInfo is now disabled for guest so even if guest going to press multiple buttons it's not going to cause crash for him.
2015-03-13 23:33:46 +03:00
ArseniyShestakov
67aa869a33 Multiplayer: make chat history visible in lobby and improve CTextBox
Now we'll also play sound when new message added.
CTextBox::setText now will automatically change text height for slider.
2015-03-13 18:45:07 +03:00
ArseniyShestakov
1f1f61cf15 Custom campaigns list: redraw parent as we use it's background
This one fix issue 2057
2015-03-13 18:06:19 +03:00
ArseniyShestakov
f8747a1f16 Multiplayer: don't add newly joined players to CPU-only slots 2015-03-13 15:05:12 +03:00
ArseniyShestakov
4f3eb919e5 CHeroWindow: block dismiss button if there no other heroes and no towns
This one resolve mantis issue 530.
2015-03-12 23:47:46 +03:00
DjWarmonger
8820bc05a9 MSVS compiler doesn't allow default arguments for Lambdas. 2015-03-10 10:06:45 +01:00
DjWarmonger
ec879046ca Merge pull request #93 from ArseniyShestakov/feature/pathfindingTeleports
Okay let's do this!
2015-03-10 09:04:25 +01:00
DjWarmonger
f7f3c2f21a Migrated to SDL2. It also fixes animation speed in combat.
Library package coming soon.
2015-03-10 08:57:45 +01:00
ArseniyShestakov
5233b60243 CPlayerInterface: all new code for automatic teleport usage 2015-03-08 17:17:24 +03:00
ArseniyShestakov
21aaad6972 MoveHero: add transit movement option
Transit is new option for hero movement. If it passed for movement then hero can get get on tile without visiting of object on it.
Currently it's will be only allowed is object under destination is teleport.
2015-03-08 17:04:09 +03:00
ArseniyShestakov
25656aa586 Add showTeleportDialog everywhere except actual code for AI and player
Just like TeleportDialog it's based off showBlockingDialog, but as number of package is higher when possible showTeleportDialog will be after other dialogs handling code.
2015-03-08 16:52:50 +03:00
ArseniyShestakov
18535db0ef Add TeleportDialog and CTeleportDialogQuery
TeleportDialog is based off BlockingDialog and it's needed for server to ask client what teleport hero should be teleported to.
It's also contain list of possible exits, identifier of currently used channel and also impassable option.
If impassable set to true then client will remember that current teleport channel is lack of exit point.
2015-03-08 16:37:33 +03:00
AlexVinS
f4c683cd5e Move VievXXX logic to server side (except expert ViewEarth) 2015-02-26 17:15:17 +03:00
AlexVinS
025a00362b Simplify CBattleInterface::spellCast 2015-02-26 08:39:58 +03:00
AlexVinS
b846b717a1 implemented VISIONS spell (partially)
(-) todo: agressivnes
2015-02-26 08:39:56 +03:00
AlexVinS
36cdb2968b Refactoring 2015-02-26 08:39:54 +03:00
AlexVinS
f6e83685e7 Initial implementation of VIEW_AIR & VIEW_EARTH 2015-02-26 08:39:52 +03:00
AlexVinS
685deddac1 Start spell-relatet files reorganisation
* moved existing files to separate directory
-> todo: split mechanics
2015-02-26 08:39:48 +03:00
AlexVinS
c7c235c0ca Rename afterCast to applyBattle
* afterXXX will be used in future event-driven mechanics
2015-02-26 08:39:47 +03:00
AlexVinS
66ca4bc0c2 TOWN_PORTAL callback is too specific to ba part on spellwindow class 2015-02-26 08:39:46 +03:00
AlexVinS
33f22bf2fc More flixible way of spell cast on client side
(+) more support for custom adventure spells
2015-02-26 08:39:45 +03:00
AlexVinS
a3f2667376 Remove some deprecated fields from CSpell
* now only new SpellScholl API is used
(!) untested
2015-02-26 08:39:43 +03:00
ArseniyShestakov
00de870f17 Check input destination position when moving using arrow keys
This one fix crash I reported in 2085
2015-02-22 10:05:24 +03:00
ArseniyShestakov
a6ce45e867 Cursor: show battle cursor for garrison if there creature behind
This one fixed issue 1563
2015-02-22 09:34:02 +03:00
AlexVinS
c4cbda88ac Fix "reorder" warnings 2015-02-21 12:39:10 +03:00
Fay
9034a9d873 Fixed crashes due to invalid ptrs during advmap objects fadeout; 2015-02-20 23:19:16 +01:00
DjWarmonger
6ac00873b9 Compilation fixes - allow SDL1.
Please do not define class-specific constants that are static at same time.
2015-02-18 15:31:55 +01:00
DjWarmonger
2a082e6c21 Merge pull request #84 from Fayth/test/advMapFading
If no one objects, I will try to merge this.
2015-02-18 09:52:09 +01:00
DjWarmonger
5d1fbedf85 Merge pull request #91 from Fayth/fix-advmap-restoring
Short and clear code is always welcome.
2015-02-18 07:59:00 +01:00
ArseniyShestakov
536015f1c2 Quest Log: move slider to start when blocked
Partially fixes problem mentioned in issue 2093
2015-02-18 00:07:03 +03:00
DjWarmonger
200bcd7da6 Merge pull request #88 from ArseniyShestakov/improvedQuestLog
Awesome, thanks!
2015-02-17 06:44:38 +01:00
ArseniyShestakov
c0b78de6b4 Quest Log: block hide complete button when it useless
We only want to to be checkable when there is actually any complete quests in list.
2015-02-17 06:08:35 +03:00
ArseniyShestakov
ae20499854 Quest Log: implement option to hide complete quests 2015-02-17 05:47:49 +03:00
Fay
116e1d62a1 Makes player interface recreate advmap instead of reusing existing instance; 2015-02-16 21:45:16 +01:00
ArseniyShestakov
007f95fa44 Fix valgrind warning about uninitialised value 2015-02-16 13:28:10 +03:00
ArseniyShestakov
c865055803 Hero Exchange: fix quest log button 2015-02-16 01:33:05 +03:00
ArseniyShestakov
df2894b798 Quest Log: implement support Seer names 2015-02-16 00:44:48 +03:00
ArseniyShestakov
37a5930f84 CSoundHandler: fix memory leak and implement cache
This one fix issue 2091 and add caching that actually works.
2015-02-15 22:51:33 +03:00
AlexVinS
c46999bcb8 Conurrency related tweaks. Crashes in renderFrame should be fixed, but synchronization is still not perfect 2015-02-15 04:53:01 +03:00
AlexVinS
b71d985d49 cleanup 2015-02-15 01:46:47 +03:00
AlexVinS
aa5e9fc959 get rid of global debug macros. 2015-02-14 22:43:16 +03:00
ArseniyShestakov
9665c50f3f Quest Log: clanup code that is not needed anymore
As far as I understand once object capturing used it's no longer needed to manually call Show.
Currently CIntObject::show and CIntObject::showAll automatically call it for all children.
2015-02-14 21:35:11 +03:00
ArseniyShestakov
8beed60815 Quest Log: cleanup minimap code
Usage of shared_ptr suggested by @alexwins
2015-02-14 21:31:56 +03:00
ArseniyShestakov
5a5c126f0e Quest Log: fix background resource name
Currently it's not PCX, but PNG
2015-02-14 20:39:53 +03:00
AlexVinS
a5ebcd0f60 fix #2080. No more articaft exchange between heroes in kingdom overview. 2015-02-14 20:24:18 +03:00
AlexVinS
420e5f055c Fix warnings 2015-02-14 19:24:21 +03:00
AlexVinS
0b546a9b9f Correct placement for hero misc artifacts in kingdom overview 2015-02-14 18:59:33 +03:00
AlexVinS
c135591f81 Add comments about getArtPlace - it is a bit dangerouse 2015-02-14 16:00:57 +03:00
AlexVinS
7086fdc730 Crash fixed, but bug still present 2015-02-14 16:00:56 +03:00
AlexVinS
a6c8dcbc36 Cleanup 2015-02-14 16:00:56 +03:00
ArseniyShestakov
d06bba422a Quest Log: display components under quest description
This commit add CComponentBox under text. If quest have components description height will be changed to avoid conflicts.
Though it's would be much better if VCMI had something like QScrollArea in Qt so both text and components was using shared slider.
2015-02-14 04:21:31 +03:00
ArseniyShestakov
c978bc862d Quest Log: fix position of selection box on labels 2015-02-14 03:47:31 +03:00
ArseniyShestakov
c046f8ddc6 Quest Log: update code for new graphics and fix bugs
This one should fix issues 1988 and 2022
2015-02-14 03:38:28 +03:00
ArseniyShestakov
8648081f0a Quest Log: change minimap level when quest selected
There also no need in own setLevel as one from CMinimap works fine.
2015-02-14 02:13:17 +03:00
ArseniyShestakov
fd99f0b9f3 Quest Log: decrease number of displayed quests
New graphics only have 6 slots
2015-02-14 01:34:53 +03:00
ArseniyShestakov
0704e38697 Fix Quest Log button in hero window 2015-02-14 01:10:32 +03:00
ArseniyShestakov
ded4c18df9 CComponent: add option to choose image size
This option is used to choose small resource icons in Quest Log when there more than 4 of them.
2015-02-14 00:53:24 +03:00
ArseniyShestakov
dae03fdf92 Blick Quest Log button if map have no quests 2015-02-14 00:52:00 +03:00
Fay
f30cb0fa5b Fixes crash when loading game (if path was visible previously); 2015-02-13 11:20:13 +01:00
Fay
1c6a7a923d Fixes color-keying after scaling bitmaps for world view display; 2015-02-09 20:16:42 +01:00
DjWarmonger
71bcacaa60 Partial fix for #2053 2015-02-09 16:23:29 +01:00
Fay
cbd3a19987 Merge branch 'develop' of https://github.com/vcmi/vcmi into test/advMapFading
Conflicts:
	client/CPlayerInterface.cpp
2015-02-09 16:09:27 +01:00
Fay
cbb75d1c7a Support for fading heroes/boats (+flags);
Disabled map movement requests during fade;
2015-02-09 16:03:24 +01:00
Fay
485a8b5c9a Fixed updating camera position after teleportation (gate/teleport/spells); 2015-02-06 19:11:04 +01:00
Fay
3c3fb0e21d Added advmap config options to enable/disable fading; 2015-02-02 19:38:30 +01:00