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
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
9423555015
Declare ownership of CCursorHandler::dndObject
...
# Conflicts:
# AI/FuzzyLite
# client/gui/CGuiHandler.cpp
2017-09-05 15:25:31 +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
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
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
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
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
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
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
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
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
AlexVinS
9b8ad51cd3
Run all rendering with pim lock if possible
2014-07-03 22:05:59 +04:00
AlexVinS
8a488aeb86
Cleanup
2014-07-03 19:57:21 +04:00
AlexVinS
ecc7b8e05a
Draw cursor on each frame. Fix TTF rendering under cursor.
2014-07-03 18:05:07 +04:00
AlexVinS
c948891fc6
Fix threaded handlers initialization, cleanup
2014-07-03 12:26:15 +04:00
AlexVinS
ac7703ffb0
Fix hero movement rendering
2014-06-21 12:13:19 +04:00
AlexVinS
5fa5ba622f
Start preparation for moveHero threaded implementation
2014-06-18 14:31:11 +04:00
AlexVinS
c2dd696e96
simplify CGuiHandler::handleEvents()
...
Threre is no need to allow (and I doubt is was in fact possible with old code) new events to arrive during processing events. Let them to be processed in next frame.
2014-06-18 08:30:23 +04:00
AlexVinS
5fdc63ab5b
tiny fixes
2014-06-16 14:32:37 +04:00
AlexVinS
41a0319985
remove separate GUI thread
...
+ this fixes OGL
- has some issues(f.e. hero movement)
2014-06-13 07:55:49 +04:00
Ivan Savenko
8eb661461c
- vcmi compiles with SDL2 on Linux, video player is disabled for now
2014-06-13 07:55:45 +04:00
AlexVinS
d289c6a34a
Prefere opengl rendering
...
- broken ...
2014-06-13 07:55:44 +04:00
AlexVinS
6474e37b76
try to fix hotkeys
2014-06-13 07:55:43 +04:00
AlexVinS
ac2896da42
Implemented SDL2 unicode input. Hotkeys are sill broken.
2014-06-13 07:55:42 +04:00
AlexVinS
0ef16feca9
Refactoring towards backward compatibility (WiP)
2014-06-13 07:55:41 +04:00
AlexVinS
cd81e85a61
fix loading to pregame. Looks awful. More work to do.
...
* video temprorary disabled
* multithread loading seems to be broken - disabled
2014-06-13 07:55:39 +04:00
AlexVinS
62d42465de
fix compilation
...
* may not even run
* text input disabled
2014-06-13 07:55:38 +04:00
alexvins
4203d69525
Part 2 of new spell configuration
...
1) spell handler refactored to support modding in general way
2) imunnity icons moved to WoG as they depends on wog`s graphics
3) introduced new class template for handlers (todo: use this in other handlers)
4) save format changed
5) introduced "absolute immunity" - unaffected by "the Orb" etc. (todo: use it in config)
6) new format documented on wiki, added json schema.
* more split of registertypes - fixes 32 mingw build
2014-03-07 13:21:09 +00:00
Ivan Savenko
ee6cdbeffe
went through the rest of cppcheck warnings, mostly harmless
2013-11-07 12:48:41 +00:00
Ivan Savenko
0e3eae3095
patch from KroArtem
2013-11-03 12:51:25 +00:00
Ivan Savenko
45c2bd7511
hopefully fixes #1397 . Still too much magic in this code :(
2013-08-09 17:37:41 +00:00
Ivan Savenko
a719e03b30
- fixed #1375
...
- damage done by turrets is properly increased by built buldings
2013-07-22 16:23:23 +00:00
Ivan Savenko
f82122d9be
second part of c++11 update. gcc 4.5 and VS 2010 are no longer supported
...
- BOOST_FOREACH -> for
- replaced several boost classes with std (e.g. unordered)
- removed gcc-4.5 workarounds
- ran clang c++11 migration tool to detect some cases:
- - pointer initialized with "0" to nullptr
- - replace for with iterators with range-based for
- - use auto in some situations (type name specified twice, avoid long iterators type names)
2013-06-29 13:05:48 +00:00
Ivan Savenko
2b45e13c5c
c++03 -> c++11 switch:
...
- use std versions of function, bind and ref
- OVERRIDE -> override
- NULL -> nullptr
- use std versions of random distributions
NOTE: this may be last revision that supports gcc-4.5
2013-06-26 11:18:27 +00:00
beegee1
c7c2686379
- Integrated the logging API into the client and the lib - Remove some more comments and switched to /// style - Fixed recursive locks - Added Global.h to CMakeLists(now visible in qt-creator) - Removed usage of shared_mutex - Added unique_ptr to CLogger targets
2013-04-09 14:31:36 +00:00
beegee1
30bcec42c6
- Renamed client/BattleInterface to client/battle and client/UIFramework to client/gui
2013-04-07 11:52:07 +00:00