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

333 Commits

Author SHA1 Message Date
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
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
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
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
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
Dydzio
88952aefff Restart button fix (#288) 2017-03-19 16:58:46 +03:00
FeniksFire
46a06ce184 Change the year from 2016 to 2017 in help description. 2017-03-10 19:28:01 +01:00
AlexVinS
204ee37ae4 boost/program_options has only 2 uses, and unlikely will be used more -> removed form Global.h. 2016-11-28 21:38:17 +03:00
AlexVinS
9094c99759 Fixed CID 1366403 2016-11-28 02:50:40 +03:00
AlexVinS
3216422307 Fixed a few CWE-457 2016-11-27 22:07:01 +03:00
AlexVinS
80666fb134 Tweaks 2016-11-25 22:12:22 +03:00
AlexVinS
20de754141 def2bmp CLI command converted to CAnimation 2016-11-25 15:23:28 +03:00
AlexVinS
3c9695abcc Fixed CID 1366310 2016-11-25 13:58:20 +03:00
DjWarmonger
9db3bfcbf2 Merge pull request #212 from vcmi/refactoring/serialization2
Apparently it works - both new and old saves load at least.
2016-11-01 17:25:39 +01:00
Alexander Shishkin
0cf5a10bd1 Merge pull request #243 from vcmi/guiCleanup
Gui cleanup
2016-10-28 08:53:03 +03:00
Ivan Savenko
5b76c3f4eb Rebase of codebase changes for refactored serializer
Some of newer fixes not yet merged there and save compatibility a bit off.
2016-10-27 18:12:20 +03:00
Arseniy Shestakov
15b4774076 Logging: always print version of client and server in the begining 2016-10-27 17:14:20 +03:00
AlexVinS
3dddbcf2e8 try to use CAnimation for Hero path 2016-10-27 16:34:15 +03:00
AlexVinS
8505a909e1 free Graphics object on quit. 2016-10-27 16:34:13 +03:00
Arseniy Shestakov
99dcb44851 Add option hideSystemMessages to hide server messages on client
Use "set hideSystemMessages on" in client console to activate.
2016-09-26 16:05:27 +03:00
Arseniy Shestakov
9963b9e02b New command line option for testing: testingsavefrequency
Saving is slowest part of VCMI and for testing purposes like benchmarking it's helpful to create saves less often.
When --testingsavefrequency=N is specified client going to save only once in N days.

Option only active if other testing options are specified too.
2016-09-22 03:43:30 +03:00
Arseniy Shestakov
1cbe9e1b8b Client: add donotstartserver option. Alternative way to start a game
Option is useful for server profiling also let me test MP over network and much more.
Also there is issues with boost::interprocess on some systems under Windows and this is the way to bypass them.
2016-09-16 20:01:44 +03:00
Piotr Wójcik
88ba42f91d Fix choosing display 2016-09-08 21:33:47 +02:00
Krzesimir Nowak
12f2006fbf Show the game window on the configured display
This basically starts respecting the displayIndex setting. When
changing the fullscreen setting in-game, we read the display index
from the already existing window.
2016-08-31 11:12:59 +02:00
AlexVinS
1c9dd41188 Removed unused STOP_CLIENT SDL event 2016-08-30 03:54:46 +03:00
AlexVinS
4bc27194dd do not leak screen surface etc. on quit 2016-08-30 03:43:49 +03:00
AlexVinS
2018b4d406 Rewritten video mode check.
* check only for current desktop display mode, because we are not using actual fullscreen
* also old check was wrong
2016-08-30 03:27:53 +03:00
AlexVinS
fb7ff8c7fa Do not use std::atexit. Modified patch from PR #204 by @krnowak.
std::atexit generally does not play nice with static objects in other
translation units/libraries - there are no guarantees about the order
of destruction of static objects and atexit functions coming from
different translation units/libraries. Removing calls to atexit fixes
crashes when quitting the game. The crash happened during the dispose
function somewhere inside boost's locale library that is used
indirectly by the logger - some locale function tried to lock a static
mutex that was already destroyed.
2016-08-30 01:26:05 +03:00
Arseniy Shestakov
452e28d183 Remove some useless includes found by cppclean
This of course was tested and shouldn't break anything
2016-08-26 04:42:16 +03:00
Arseniy Shestakov
948cca02cc Fixes to some crashes on exit and to have cleaner valgrind output 2016-08-18 06:52:10 +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
4f7664926e New console commands for AI debugging: gosolo and controlai
gosolo: make AI to take over every human player in game. Second command would give control back to CPlayerInterface.
controlai: give control of one or all AI players to CPlayerInterface. Command "controlai orange" turn orange to human player while "controlai" without color specified make all AIs human controlled players.
2016-02-25 00:38:10 +03:00
AlexVinS
d7c0c3759a Merge branch 'Zyx-develop' into develop
Conflicts:
	lib/filesystem/AdapterLoaders.h
2016-01-27 18:53:41 +03:00
Vadim Markovtsev
7c7bb39904 Enable right mouse button click emulation on MacOSX 2016-01-18 16:07:17 +03:00
Zyx-2000
43b364bcd4 compilation fixes... 2016-01-16 19:00:53 +01:00
ArseniyShestakov
1ec7d14637 Client: add command line options to simplify multi-instance testing
Use these when you need to run multiple instances of VCMI simultaneously.
--testingport is port used to start server. Override port number from configuration files.
--testingfileprefix is prefix for auto save filenames.
Both options has to be set in order to work.
2015-12-13 22:14:37 +03:00
ArseniyShestakov
f940e3ed42 Fix issue 2239. Pillarbox when restored after alt-tab in fullscreen
This isn't best solution and all SDL-related code need refactoring, but it's works.
2015-11-29 01:56:18 +03:00
ArseniyShestakov
a49950e958 Fix 2292. Fix chat on adventure map, increase maxOutputPerLine 2015-11-08 22:16:58 +03: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
AlexVinS
f58148cd94 Capture SDL log
* just a stub for now
2015-06-22 22:19:32 +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
dca1e28bc1 SDL1 wipe, part 1. Untested. 2015-06-21 01:59:30 +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
Ilya Zhuravlev
3eb3996241 Fix android build. 2014-11-02 16:19:14 +03:00
Patrick Simmons
cfa6f46d62 VERY buggy, unusable, but progress is being made... 2014-10-25 19:05:49 -04:00
Ivan Savenko
9a4aa8749f Fall back to first available resolution if config contains invalid value.
Fixes crash on starting game with unavailable resolution
2014-09-18 14:20:53 +03:00
Ivan Savenko
b551bdb725 Final part of the merge
Merging VCMI Dirs refactoring + GUI refactoring with current develop
2014-09-04 20:59:07 +03:00
Ivan Savenko
de9c5b1af7 Merge branch 'develop' of github.com:karol57/vcmi into karol57-develop 2014-09-04 20:29:24 +03:00
DjWarmonger
0edaf4fa8a Merge pull request #26 from vcmi/FFMpeg
Let's do this, way too many branches running now.
2014-09-01 10:35:30 +02:00
Karol
37bd4790f7 VCMIDirs update #6 fix
- Apple compilation fix
- Removed unnecessary macros
- Updated macros indent style
- Fixed 1. warning.
2014-08-30 15:04:00 +02:00
Karol
53ab0593b7 VCMIDirs update #6
- Minor fixes
- CLoadFile updated to boost::filesystem::path
2014-08-27 12:31:58 +02:00
Karol
1b6f2ea3b7 VCMIDirs update #5 fix
- Updated old OS detect macros.
- Fixed 1 misspell.
2014-08-26 12:19:04 +02:00
Karol
2da6d9e7dd VCMIDirs update #4 fix 2014-08-11 21:24:31 +02:00
Karol
a302f6c7ad VCMIDirs update #3
bfs = boost::filesystem;
- Updateting filenames (std::string -> bfs::path) #1
- Added platform detection, and some specyfic boost::filesystem includes
to Global.h
- Updated CBasicLogConfigurator. Now class uses bfs::path pathes.
2014-08-10 23:42:39 +02:00
Ivan Savenko
a115406fa3 Fixed data presence check 2014-08-10 10:58:56 +03:00
Ivan Savenko
b1285bc506 Merged GUI refactoring into develop, fixed conflicts 2014-08-09 15:01:55 +03:00
beegee1
5139378319 - migrated boost::function/ref/bind to std:: variants 2014-08-04 20:33:59 +02:00
Ivan Savenko
00cda400a1 Miscellaneous improvements for Launcher UI:
- Implemented "show intro" toggle in settings
- Install/Update/Enable buttons are now visible even when mod info is hidden
- Fixed behaviour of show mod info switch, added more obvious button to enable it
- Removed no longer used "Enable mods on install" switch
- Added buttons to open data, user data and temporary directories
2014-08-04 14:03:57 +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
679dd64ff9 Make scale a parameter of "open" methods 2014-07-10 14:18:21 +04:00
AlexVinS
18f34e14f8 set scale to off by default 2014-07-08 22:01:01 +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
5a029c88d1 cleanup 2014-07-02 23:53:23 +04:00
AlexVinS
195eae48ca Merge branch 'develop' into SDL2
Conflicts:
	client/CPlayerInterface.cpp
2014-07-02 17:15:12 +04:00
Ivan Savenko
a0689fa377 Refactoring of hoverText from objects:
- removed hoverText field
- split getHoverText() method into 3:
- - getObjectName() for generic name
- - getHoverText(Player) for player-specific text
- - getHoverText(Hero) for hero-specific strings
2014-06-24 20:39:47 +03:00
AlexVinS
3b8d0e44d4 Merge branch 'develop' into SDL2 2014-06-24 14:09:44 +04:00
AlexVinS
d707e55472 restore inGuiThread flag 2014-06-13 07:55:50 +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
AlexVinS
15fe37133c Fix compilation with SDL1
+ seems to be fully backward compatible (need more testing)
2014-06-13 07:55:48 +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
3db7fb4f63 Still try to fix opengl backend
- no success
+ make backend selection configurable
2014-06-13 07:55:45 +04:00
AlexVinS
d289c6a34a Prefere opengl rendering
- broken ...
2014-06-13 07:55:44 +04:00
AlexVinS
5bb3d859eb Nice fullscreen mode++ 2014-06-13 07:55:44 +04:00
AlexVinS
ac2896da42 Implemented SDL2 unicode input. Hotkeys are sill broken. 2014-06-13 07:55:42 +04:00
AlexVinS
d50976bf4a restore some SDL1 code in CMT.XXX 2014-06-13 07:55:41 +04:00
AlexVinS
0ef16feca9 Refactoring towards backward compatibility (WiP) 2014-06-13 07:55:41 +04:00
AlexVinS
1597254399 just a few tweaks and it works!
* enable video again
* set default bpp to 32 - SDL2 dont like 24 bit resolution
* now almost everything looks as expected (some issues are present though)
2014-06-13 07:55:40 +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
e072b2664f fix pixel format
* now it shows intro video (but then crash ...)
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
Ivan Savenko
b2e8c92383 Cleanup:
- removed commented-out #includ'es
- renamed some files to match name of class
2014-06-05 20:26:50 +03:00
Ivan Savenko
652ceb2bde Finally shattered CObjectHandler.cpp into tiny bits
- This file is now split into multiple smaller files in mapObjects
directory
- CObjectHandler itself now contains only core classes (Handler itself,
CGObject and interfaces)
- Cleaned up excessive #include's through whole project
2014-06-05 19:52:14 +03:00
Ivan Savenko
0afdfa529c Moved all object-related files to lib/mapObjects directory.
Renamed some classes to more readable names
2014-06-05 14:19:47 +03:00
Ivan Savenko
32b6568b65 Merged changes from upstream and fixed compilation caused by API changes 2014-06-03 22:45:18 +03:00
Ivan Savenko
7f276185bd Moving files:
- new config for objects (config/objects/generic.json)
- renamed lib/CDefObjectHandler to lib/CObjectClassesHandler
2014-05-24 02:07:54 +03:00
Ilya Zhuravlev
db7cd79cf7 Android port.
Conflicts:
	lib/vcmi_endian.h
2014-05-16 23:24:29 +04:00
Ivan Savenko
9c0df68cb8 Fixing spelling mistakes. Patch from josch, fixes #1759 2014-03-23 12:59:03 +00:00
Ivan Savenko
760ae7d44a Changes related to Debian packaging, based on josch patch
- AUTHORS file is now in UTF-8
- tags for desktop files
- fixed some typos
- better reaction on --help and --version commands
- vcmibuilder should work with both avconf and ffmpeg
2014-03-20 18:17:40 +00:00
alexvins
065b8366fb [Spells] Added basic support for icons and sounds
* few changes in spell format
* save format changed
2014-03-10 16:00:58 +00:00
Ivan Savenko
d2ae847ecf - files in local directories (saves & configs) now always have higher
priority than mods. Fixes #1685 and #1733
- fixed possible crash on exit in dispose() function
- (vcmibuilder) fixes problem with partial mp3 -> ogg conversion
2014-03-08 16:05:23 +00: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
5cbec833c2 - (linux) XDG filesystem support
BIG NOTE TO LINUX USERS
All user data has been moved according to XDG specs:
- Game data (H3 files and mods) and saves: from ~/.vcmi to ~/.local/
- Temporary files, including logs: from ~/.vcmi to ~/.cache/vcmi
- Config files: from ~/.vcmi/config to ~/.config/vcmi

For compatibility VCMI will read game data from ~/.vcmi as well but this
is temporary behavior and will be removed
2014-03-04 14:51:10 +00:00
Michał W. Urbańczyk
f6c2c96cdc Copyright update. 2014-03-01 18:46:54 +00:00
Michał W. Urbańczyk
93856dbe98 Quick solution for #1688. 2014-02-27 20:44:20 +00:00