KasyanDiGris
fa5a14e2d8
Stabilize vcmi ( #488 )
...
* Shared statusbar
* Fixed server fails on client disconnected
2018-08-26 19:09:56 +03:00
Alexander Shishkin
75f8c8b29a
Gui cleanup4 ( #446 )
...
* 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
2018-07-25 01:36:48 +03:00
Alexander Shishkin
5c09f751b3
Gui cleanup3 - UI refactoring to use smart pointers ( #440 )
...
* 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
2018-04-07 18:34:11 +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
AlexVinS
43acfa160b
[tweaks] IImage * -> auto
2018-03-30 14:02:04 +03:00
AlexVinS
cac83379f5
Fixed https://bugs.vcmi.eu/view.php?id=2928
2018-03-22 12:56:15 +07:00
Arseniy Shestakov
69dbf339fc
CGuiHandler: fix invalid read on event handling
2018-01-18 06:34:57 +03:00
Arseniy Shestakov
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
Michał Kalinowski
26a222ac62
Change JsonType to enum class ( #393 )
...
Change enum JsonType to enum class JsonType
2017-11-27 00:18:18 +03:00
AlexVinS
39194a0629
Merge branch 'SplittingShortcuts' into develop
2017-11-15 22:31:55 +03:00
FeniksFire
f2b7c85811
Adding object construction macro with parameter
...
- Adding macro "OBJECT_CONSTRUCTION_CAPTURING" that take as parameter
action flag.
- Fixed minor errors
2017-11-14 08:52:33 +01:00
AlexVinS
654fea56a4
Fixed memory leak in CAnimation (regression of #376 )
2017-11-04 06:03:43 +03:00
AlexVinS
97d73f47b0
Fixed https://bugs.vcmi.eu/view.php?id=2817
2017-11-03 18:39:43 +03:00
AlexVinS
270e1b75ce
Support for creature 2-hex attack, alternate death and cast animation types
...
* margin option .json animation
* Use ranged attack animation for spell cast if there is no cast animation, display cast animation only on active casting.
2017-09-12 19:51:54 +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
AlexVinS
3bbff27127
Wiped CDefEssential
2017-09-06 15:13:28 +03:00
AlexVinS
6cd0dd9843
Use CAnimation for creature projectiles
2017-09-05 20:04:17 +03:00
AlexVinS
05bb8b13e9
Use CAnimation for battle creature animation
2017-09-05 18:59:26 +03:00
AlexVinS
882e279818
Use CAnimation in CBattleInterfaceClasses
2017-09-05 16:44:27 +03:00
AlexVinS
69c6643893
More CCursorHandler style tweaks
...
# Conflicts:
# AI/FuzzyLite
2017-09-05 15:25:49 +03:00
AlexVinS
9423555015
Declare ownership of CCursorHandler::dndObject
...
# Conflicts:
# AI/FuzzyLite
# client/gui/CGuiHandler.cpp
2017-09-05 15:25:31 +03:00
AlexVinS
ce4b206472
More complete support of .def format
2017-09-05 14:32:52 +03:00
AlexVinS
2f7968b803
Fixed wrong animation paths
2017-09-04 18:41:22 +03:00
AlexVinS
b964a53abe
Fixed battle animation
2017-09-04 17:52:36 +03:00
AlexVinS
df34a2cc96
Dirty hackfix for https://bugs.vcmi.eu/view.php?id=2780
2017-09-03 23:38:15 +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
AlexVinS
64d9dadd64
Logging cleanup.
2017-08-11 15:47:50 +03:00
AlexVinS
61e241308d
Logging cleanup
2017-08-10 19:52:05 +03:00
Arseniy Shestakov
2da3d8a563
Code style: remove senseless comments
2017-07-18 00:04:00 +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
Arseniy Shestakov
f1e5797834
Code style: move or add licensing information on top of every file
2017-07-14 01:26:03 +03:00
Arseniy Shestakov
dbcd79c48a
Code cleanup: remove double and unneded semicolons
2017-07-12 22:01:10 +03:00
Dydzio
182210421d
Fix #2 for bug #2476
2017-07-11 14:04:43 +02: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
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
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
dydzio
944edaf0bb
Fix bug #2476
2017-03-27 23:47:26 +02:00
AlexVinS
8f7b0dac45
Fixed CID 1197332
2016-12-05 06:00:32 +03:00
AlexVinS
45ae1ef165
Fixed CID 1197342
2016-12-05 03:17:03 +03:00
AlexVinS
abe4beebc6
Fixed CID 1197516
2016-11-27 19:13:40 +03:00
AlexVinS
c4ab962cc0
Fixed a few CWE-457
2016-11-27 17:48:18 +03:00
AlexVinS
20de754141
def2bmp CLI command converted to CAnimation
2016-11-25 15:23:28 +03:00
AlexVinS
9e6bd48038
fix
2016-11-10 14:38:33 +03:00
AlexVinS
b248642468
fixes and cleanup
2016-11-09 09:32:44 +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
4d510c172d
Terrain drawing converted to CAnimation.
2016-11-07 23:48:30 +03:00
AlexVinS
6a272d8f0c
FoW drawing converted to CAnimation
2016-11-06 05:27:45 +03:00
AlexVinS
c11a660d21
Fixed and cleanup
2016-11-06 05:27:44 +03:00
AlexVinS
186cd7a163
Mao object drawing converted to CAnimation
2016-11-06 05:27:26 +03:00
AlexVinS
ffeaef2bda
fixes
2016-10-27 18:19:45 +03:00
AlexVinS
f32097339c
Use CSDL_Ext blit for paletted sprites, use SDL blit otherwise.
...
* No solution found to blit paletted images with alpha channel with SDL
2016-10-27 17:32:31 +03:00
AlexVinS
3dddbcf2e8
try to use CAnimation for Hero path
2016-10-27 16:34:15 +03:00
Vadim Markovtsev
4bcc43d3d0
Fix Mantis #2234
...
CPlayerInterface instances were removed from CClient::playerint with
clear() and finish() was not called on each. Added multiple insurance.
2016-10-22 16:22:00 +02:00
AlexVinS
3a52a3c663
Allow CAnimImage to share animation object.
2016-10-16 12:58:18 +03:00
AlexVinS
e6829bf271
Removed unused debug data in CAnimation.
2016-10-16 12:02:50 +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
153af6e07b
cleanup
2016-10-16 02:47:03 +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
Zyx-2000
7fbd5479e2
alignment & makefile fix
2016-01-29 16:08:44 +01:00
Zyx-2000
3a1a8e3d47
further refactoring-related changes
2016-01-29 15:16:14 +01:00
Ivan Savenko
7b5a7f43ad
Removed includes of CGameState from headers
2015-12-02 21:39:53 +02:00
ArseniyShestakov
fc06db4c4f
Move STRONG_INLINE define into Global.h
2015-11-22 07:14:52 +03:00
Vadim Markovtsev
d24fd10e21
Fix std::abs warning
...
Recent clang wants std::abs instead of plain abs
2015-10-13 21:05:46 +03:00
Vadim Markovtsev
e4b1ef1405
Add "override" to virtual overriden methods
2015-10-13 21:05:36 +03:00
AlexVinS
28087099b8
More correct usage of SDL_Palette
2015-09-05 15:03:37 +03:00
AlexVinS
b512005d38
Get rid of CSDL_Ext::colorSetAlpha
2015-09-02 18:49:29 +03: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
AlexVinS
371e4b8714
Fix mantiss 2235, 2237
2015-08-22 16:47:40 +03:00
AlexVinS
5f7a90237c
More smooth fps counter
2015-06-23 01:08:25 +03:00
AlexVinS
32c15a8266
Extract fps counter drawing
2015-06-22 23:57:34 +03:00
AlexVinS
cc669b0ae7
Move gui locking to GUIHandler
2015-06-22 21:53:47 +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
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
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
Fay
5a7a208617
Minor fixes (possible surface leak);
2015-02-02 17:42:42 +01:00
Fay
5e78a3147a
Abstracted fading into separate class;
...
Smoother fade animations;
Added fading when recentering hero after switching levels;
2015-01-30 23:37:28 +01:00
Fay
4b248c2762
World view impl -- initial;
2015-01-13 20:57:41 +01:00
Ilya Zhuravlev
b22973e717
Fixed crash, "pure virtual method called", when calling doUpdate lambda from CGPreGame.
2014-11-10 20:21:39 +03:00
Ivan Savenko
4092929b70
Fixed endianness
2014-08-11 16:21:23 +03:00
Ivan Savenko
1e5e02c7df
Compilation fixes caused by merge, replaced some remaining boost::bind with std's
2014-08-09 15:14:31 +03:00
Ivan Savenko
b1285bc506
Merged GUI refactoring into develop, fixed conflicts
2014-08-09 15:01:55 +03:00
Ivan Savenko
4d6ab2c32d
Fixed rendering of bitmap fonts shadow
2014-08-07 19:53:07 +03:00
beegee1
5139378319
- migrated boost::function/ref/bind to std:: variants
2014-08-04 20:33:59 +02:00
Ivan Savenko
10fc1892a8
Large refactoring of button classes:
...
- renamed CAdventureMapButton to more expectable CButton
- merged CButtonBase into CButton
- created more generic class for clickable elements
- created more generic class for selectable elements
- renamed CHighlightableButton to CToggleButton
- renamed CHighlightableButtonsGrous to CToggleGroup
- minimized differences between API of all these classes
- removed all but one contructors in buttons, with same parameters across all classes
2014-08-03 14:16:19 +03:00
Ivan Savenko
731aedf3a1
Split CIntObjectClasses into multiple smaller files. This should be the last change in files
2014-07-15 10:14:49 +03:00
Ivan Savenko
92d22bae63
Merge branch 'feature/creatureWindow' into refactoring/guiClasses
2014-07-14 17:23:24 +03:00
Ivan Savenko
647b9c683f
Reorganized client source tree:
...
- client/widgets for reusable GUI elements
- client/windows for independent windows
- client/gui for base GUI classes which should remain internal
2014-07-13 20:53:37 +03:00
Ivan Savenko
cec9161f8f
Added missing files
2014-07-13 18:40:13 +03:00
Ivan Savenko
83099fdb78
Moved all non-window GUI elements out from GUI classes file. TODO: reorganize source tree
2014-07-13 18:39:45 +03:00