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

303 Commits

Author SHA1 Message Date
Arseniy Shestakov
c6ff28936d Client: change intro video position 2017-08-24 03:29:37 +03:00
Arseniy Shestakov
5fce56d23e CMake: add ENABLE_DEBUG_CONSOLE option for Windows enabled by default
For now we'll keep console, but in future we need a way to toggle it at runtime.
2017-08-16 23:45:38 +03:00
Arseniy Shestakov
fee999300e VCMIDirs: add hack to run from single directory on Mac and Linux
Also change working directory to where binary is on all platforms except Android
2017-08-16 16:10:08 +03:00
Arseniy Shestakov
7dca95c8cc CMake: multiple improvements for builds and project generation
- Change default build output directory name from "build" to "bin"
- Implement new function vcmi_get_cmake_debug_info
- Link client with SDL2main on Windows and disable debug console
- Remove all old MinGW-specific options since they outdated and MXE work fine
- Set AUTOGEN_TARGETS_FOLDER for better Xcode and Visual Studio projects
- Remove useless vcmitestFiles custom target for less garbage in project files
2017-08-16 16:10:07 +03:00
Arseniy Shestakov
56f89270db macOS: full rework of Mac packaging process
- Most of outdated CMakeLists code removed.
- All Mac-specific code is removed include Sparkle support and vcmibuilder app.
- DMG buidling reimplemented using macdeployqt command.
2017-08-16 16:10:07 +03:00
AlexVinS
64d9dadd64 Logging cleanup. 2017-08-11 15:47:50 +03:00
AlexVinS
143ff682bc Logging cleanup 2017-08-10 21:59:55 +03:00
AlexVinS
85e952f25f Logging cleanup 3 2017-08-10 20:17:10 +03:00
AlexVinS
61e241308d Logging cleanup 2017-08-10 19:52:05 +03:00
Arseniy Shestakov
21074e13c3 macOS: always change working directory for launcher and server
This make relative paths work properly when launched from DMG or from different directory.
2017-08-09 01:33:12 +03:00
ArseniyShestakov
b52cfe5283 Code style: use parentheses for creating heap-based objects (#344) 2017-07-16 12:58:05 +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
AlexVinS
09df2dcfbb fixed possible race condition 2017-07-12 19:40:14 +03:00
Dydzio
c377f594a5 Add optional real fullscreen mode support 2017-07-08 18:43:04 +02:00
ArseniyShestakov
2f305cc68d Remove code related to duel mode (#312)
Remove code related to duel mode
2017-07-01 16:30:13 +03:00
Arseniy Shestakov
eeff7ee315 Few minor code improvements
* All command line options now case insensetive.
* SDL_VIDEO_X11_DGAMOUS unused in SDL2 so it's removed.
* Added current year into the --help output for client and server.
* Moved DO_NOT_START_SERVER into session settings.
2017-06-26 04:56:28 +03:00
Fay
01e5f992d3 Android: possible solution for sdl2 colors problem 2017-06-17 00:34:18 +03:00
Arseniy Shestakov
1a60c1a94b Shared memory refactoring and command line control options
Now client accept following options:
 --disable-shm - disable shared memory usage
 --enable-shm-uuid - use UUID for shared memory identifier
UUID is useful when a lot of clients starting simultaneously.
Needed for testing and was easier to implement than alternatives.
2017-06-06 07:30:16 +03:00
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