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

357 Commits

Author SHA1 Message Date
nordsoft
915d215076 Fix connections amount problem 2022-11-15 22:09:47 +04:00
nordsoft
eeeca5ba8d Add additional logging 2022-11-11 18:00:09 +04:00
nordsoft
97e5fc8a07 Lobby works 2022-11-08 04:44:34 +04:00
nordsoft
7b6d9c23b3 Attempt to pass lobby parameters as command line arguments 2022-11-07 13:44:58 +04:00
nordsoft
0ea5a8fbe7 Merge remote-tracking branch 'upstream/develop' into mp-disconnection
# Conflicts:
#	server/CVCMIServer.cpp
2022-10-04 17:41:43 +04:00
Andrii Danylchenko
04490b709a
Merge pull request #1000 from vcmi/multiplayer
Multiplayer
2022-10-03 20:16:39 +03:00
nordsoft
512cf014aa Freeze current state 2022-10-03 20:47:00 +04:00
nordsoft
fea05a4320 Finally game restart works
# Conflicts:
#	lib/CGameState.cpp
#	server/CVCMIServer.cpp
2022-09-29 21:08:05 +04:00
Andrey Filipenkov
53ac61b52b iOS: don't create unused CConsoleHandler 2022-09-27 07:05:10 +03:00
Andrey Filipenkov
70c51e4370 iOS: don't compile unused function 2022-09-27 07:01:16 +03:00
Andrey Filipenkov
3ab21d8491 show loading indicator when starting local server
single player or hosting a multiplayer game
2022-09-24 15:55:25 +03:00
Andrey Filipenkov
5b50d69db1 use Android's letterboxing code and code style cleanup 2022-09-24 15:55:24 +03:00
Andrey Filipenkov
89f14ea586 improve setting window resolution
fix kambala-decapitator/vcmi#3
2022-09-24 15:55:23 +03:00
Andrey Filipenkov
d113155634 use best scale quality 2022-09-24 15:55:23 +03:00
Andrey Filipenkov
74ba228961 ignore window events: no need to refresh screen 2022-09-24 15:55:22 +03:00
Andrey Filipenkov
1e01780d17 start app with launcher, start SDL from launcher
kambala-decapitator/vcmi#33
2022-09-24 15:55:22 +03:00
Andrey Filipenkov
fd92150566 use same aspect ratio fix as on android
kambala-decapitator/vcmi#26
2022-09-24 15:55:18 +03:00
Andrey Filipenkov
d716db942c fall back to OpenGLES if Metal is unavailable 2022-09-24 15:55:18 +03:00
Andrey Filipenkov
59fe73e454 some random cleanup 2022-09-24 15:55:18 +03:00
Andrey Filipenkov
93e9bc4e51 restrict both apps to 64-bit iPad with multitasking and Metal 2022-09-24 15:55:17 +03:00
Andrey Filipenkov
2e18299897 make server a static lib, run it in a separate thread
issues to solve:
- dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. 13CPackForLobby, 20LobbyClientConnected, 20LobbyClientConnected.
- error setting socket option: set_option: No buffer space available
2022-09-24 15:55:16 +03:00
Andrey Filipenkov
a33db4f03b fix creating SDL window, enforce landscape 2022-09-24 15:55:16 +03:00
Andrey Filipenkov
c4233ad706 exclude some code similar to android 2022-09-24 15:55:16 +03:00
Andrey Filipenkov
7e6ed0583c disable all scripting code when configuring without scripting modules 2022-09-21 19:31:42 +03:00
Andrey Filipenkov
99af5bbe4c add dedicated method to get logs path 2022-09-18 09:24:36 +03:00
Andrey Filipenkov
d7650ce9c0
use Conan to make macOS CI builds for both Intel and ARM (#782)
* [CI] append platform to output artifact name if it's given
2022-08-30 17:29:00 +03:00
Soar Qin
b061c4988c
Changes to resolution check on window creation (#747)
* Changes to resolution check on window creation:
1. Allow scaled rendering in window mode
2. Match closest logical rendering resolution while scaling is used
2022-06-06 09:46:24 +03:00
Andrii Danylchenko
2fc7cf02b0 tray notification for windows 2022-05-14 13:23:09 +03:00
Andrii Danylchenko
b4241670ba Nullkiller: rename VCAI to AIGateway 2021-07-26 21:02:50 +03:00
AlexVinS
ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
Dmitry Orlov
c99b8b54e6 Fix: 'Load' and 'Main menu' in-game buttons should work properly 2021-01-17 19:18:26 +03:00
Dmitry Orlov
195fb8ff41 Mod system improvement Part I : Fix content losing after deserialization 2020-10-10 00:31:23 +03:00
John Bolton
c61bae4060 Fixed RETURN_IF_BATTLE(). Undid disabled warnings. Fixed indentation. 2020-10-05 16:28:28 -07:00
John Bolton
a05ae78e67 Fixed lots of warnings.
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed.

4003: not enough actual parameters for macro 'identifier'
4250: 'class1' : inherits 'class2::member' via dominance
4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
2020-10-04 02:20:18 -07:00
Victor Luchits
f68b449e5e More formatting 2020-05-17 11:21:49 +03:00
Victor Luchits
febbeaeeed Close the global log targets on exit, flushing log files to disk 2020-05-05 15:25:07 +03:00
Zsolt Sz. Sztupák
e6f1ab6539 Fix SDL letterboxing on Android builds
On Android calling `SDL_RenderSetLogicalSize` with dimensions having a different aspect ratio than the screen will cause letterboxing with blinking garbage data in that areas (instead of having black bars). This is annoying and makes the game really hard to play.

This change will make sure that on Android `SDL_RenderSetLogicalSize` will always be called with dimensions where the aspect ratio is the same as the screen to make sure there is no letterboxing.

The only problem with this is that during drawing the adventure map nothing will clear out the areas that would have been letterboxes, so there is an added explicit clear screen command for `totalRedraw()`.

The changes are only applied to Android builds in order not to affect PC builds - but some changes, especially clearing the screen could be easily added to the PC builds as well
2020-01-06 18:46:56 +00:00
Dydzio
1cc2ef537b Add proper thread synchronization for campaigns 2019-03-30 00:28:33 +01:00
Dydzio
2b6fe9298a Hackfix for campaigns 2019-03-29 23:29:48 +01:00
Alexander Shishkin
b00e935e4d
Warnings fixes (#538)
Warnings fixes
* Suppress `missing-braces` for Clang
* Fixed many C4275 warnings
* Fixed almost all Clang/GCC warnings
* Silence most frequent MSVC warning.
* Fixed some pessimizing-move warnings
* Fixed some unused capture warnings
2019-01-19 13:52:02 +03:00
AlexVinS
5693e72442 fixed crash on quit 2018-11-07 11:11:07 +03:00
AlexVinS
d1931c91d7 Fixed wrong cursor position in full screen mode 2018-08-11 17:42:28 +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
Karlis Senko
40e6292ed2 Fix memory leaks in launcher. 2018-05-01 00:01:20 +03:00
Henning Koehler
2ede3783dd Settings: savefrequency is now configurable in launcher
* Client command-line can modify arbitrary settings now
* Only launcher auto-saves to settings.json
2018-04-08 17:12:29 +07:00
Arseniy Shestakov
4af288aee4 Refactoring of main menu related code
We need to make sure it's not stay active during gameplay.
Proper fix would require actually removing menu interface from GH, but then GH needs refactoring too.
2018-04-07 18:44:21 +07: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
Henning Koehler
02b5a5e830 Make bonus stacking configurable + fix duplicate propagation/inheritance (#433)
Addresses several related problems:
* Propagation / unpropagation of duplicate bonuses is inconsistent, causing bugs
* Duplicate bonuses never stack, which is not always intended behaviour (e.g. multiple copies of resource generating artifacts)
* Different bonuses always stack, which is not always intended behaviour (e.g. Angel + Archangel morale bonuses)

This is addressed as follows:
* Duplicate bonuses are never eliminated during propagation/inheritance.
* Unpropagation eliminates only a single copy of duplicated bonus
* Bonus receives a new field stacking that determines stacking behaviour:
* * empty string = no stacking with duplicates (default)
* * "ALWAYS" = stacks with duplicates & everything else
* * some other value = no stacking with bonuses with same stacking value
Also Morale/Luck window now hides non-stacking bonuses.
2018-03-27 14:54:58 +07:00
AlexVinS
0b70baa95e Spells configuration version 2 (effect-based)
* Indirect spell effects loading
* Json serializer improvements
* spell->canBeCastAt do not allow useless cast for any spell
* Added proxy caster class for spell-created obstacles
* Handle damage from spell-created obstacles inside mechanics
* Experimental GameState integration/regression tests
* Ignore mod settings and load only "vcmi" mod when running tests
* fixed https://bugs.vcmi.eu/view.php?id=2765 (with tests)
* Huge improvements of BattleAI regarding spell casts
* AI can cast almost any combat spell except TELEPORT, SACRIFICE and obstacle placement spells.
* Possible fix for https://bugs.vcmi.eu/view.php?id=1811
* CStack factored out to several classes
* [Battle] Allowed RETURN_AFTER_STRIKE effect on server side to be optional
* [Battle] Allowed BattleAction have multiple destinations
* [Spells] Converted limit|immunity to target condition
* [Spells] Use partial configuration reload for backward compatibility handling
* [Tests] Started tests for CUnitState
* Partial fixes of fire shield effect
* [Battle] Do HP calculations in 64 bits
* [BattleAI] Use threading for spell cast evaluation
* [BattleAI] Made AI be able to evaluate modified turn order (on hypothetical battle state)
* Implemented https://bugs.vcmi.eu/view.php?id=2811
* plug rare freeze when hypnotized unit shots vertically
* Correctly apply ONLY_MELEE_FIGHT / ONLY_DISTANCE_FIGHT for unit damage, attack & defense
* [BattleAI] Try to not waste a cast if battle is actually won already
* Extended JsonSerializeFormat API
* fixed https://bugs.vcmi.eu/view.php?id=2847
* Any unit effect can be now chained (not only damage like Chain Lightning)
** only damage effect for now actually uses "chainFactor"
* Possible quick fix for https://bugs.vcmi.eu/view.php?id=2860
2018-02-08 11:37:21 +03:00