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

5818 Commits

Author SHA1 Message Date
SoundSSGood
b1f52eec41 ManageBackpackArtifacts 2024-03-07 18:16:22 +02:00
SoundSSGood
d143f53d7e using deque for hero's backpack storage 2024-03-07 18:16:21 +02:00
Tomasz Zieliński
e7af9d5607 Code review fixes, Sonarcloud fixes 2024-03-04 21:23:17 +01:00
Ivan Savenko
4b2cba96cc
Merge pull request #3646 from IvanSavenko/configurable_button
Configurable buttons
2024-03-04 13:34:40 +02:00
Ivan Savenko
83eb0ea28f
Merge pull request #3625 from IvanSavenko/exchange_in_town
Better hero exchange in town
2024-03-04 13:34:15 +02:00
Andrii Danylchenko
fb6fd63a58 NKAI: water paths in graph 2024-03-02 15:55:36 +02:00
Andrii Danylchenko
047e076d05 NKAI: visual logger 2024-03-02 15:54:05 +02:00
Tomasz Zieliński
f650072da1 Remove useless code 2024-03-01 11:46:01 +01:00
Tomasz Zieliński
35c1ef7be2 How about now? 2024-03-01 11:18:08 +01:00
Tomasz Zieliński
7df36279c5 Compile fix? 2024-03-01 11:10:40 +01:00
Tomasz Zieliński
5f95955535 Store and load last difficulty setting 2024-03-01 10:57:48 +01:00
Tomasz Zieliński
17fc1604ca Remove unused file 2024-02-29 20:20:35 +01:00
Ivan Savenko
22f23ba6f8 Restore previously disabled functionality 2024-02-29 16:47:44 +02:00
Ivan Savenko
ddb2acb9c2 Code cleanup 2024-02-29 15:39:13 +02:00
Tomasz Zieliński
b7320bbc8a Cleanup 2024-02-29 13:04:48 +01:00
Ivan Savenko
20008cd5a5 Replaced premade buttons on hero screen with generated ones 2024-02-29 13:57:25 +02:00
Ivan Savenko
0051ffa7a9 Implemented configurable buttons. Replaced 'animateLonelyFrame' logic. 2024-02-29 13:57:25 +02:00
Ivan Savenko
07d201502e Refactoring of button class to prepare for configurable button 2024-02-29 13:57:25 +02:00
Tomasz Zieliński
2c32c770f7 First version that works in lobby 2024-02-29 12:45:08 +01:00
Ivan Savenko
658747d342 Code cleanup 2024-02-27 14:45:15 +02:00
Ivan Savenko
99cb1df91d Fixes for positioning on popups with components 2024-02-27 13:15:16 +02:00
Ivan Savenko
93b3cb3af5 Better size & positioning of infoboxes 2024-02-26 22:04:30 +02:00
Ivan Savenko
ec159f2fdd Fixed bad line breaks in starting faction description popup 2024-02-26 22:04:02 +02:00
Ivan Savenko
4b4dedeab9 Code formatting 2024-02-26 18:53:12 +02:00
Ivan Savenko
e6b339448f Refactoring & deduplication of infowindow code 2024-02-26 18:32:15 +02:00
Ivan Savenko
658cc14cd0 Removed direct usage of SDL_Surface in info windows 2024-02-26 15:49:27 +02:00
Ivan Savenko
5419df1140 Removed no longer used class 2024-02-26 15:49:27 +02:00
Ivan Savenko
922966dcf8 Renamed JsonNode::meta to more logical modScope. Member is now private 2024-02-26 12:55:49 +02:00
Ivan Savenko
08a27663f9 Reworked JsonNode constructors to more logical form 2024-02-26 12:55:49 +02:00
Ivan Savenko
54796c7c56 Rename toJson to toString/toCompactString for consistency 2024-02-26 12:55:49 +02:00
Ivan Savenko
8647abb94b
Merge pull request #3629 from IvanSavenko/ui_generation
Unify graphical primitives elements
2024-02-25 15:02:06 +02:00
Ivan Savenko
bd901cb001 Replaced lines in settings with primitives 2024-02-19 16:55:07 +02:00
Ivan Savenko
82eea1abc1 Remove unused variable 2024-02-19 16:49:59 +02:00
Ivan Savenko
fe918de2df Remove invalid assertion 2024-02-19 00:36:21 +02:00
Ivan Savenko
ef8ff00973 Unified common primitive-based UI elements 2024-02-18 22:15:31 +02:00
Ivan Savenko
14e3c762c0 Fix slot selection in markets 2024-02-18 21:18:55 +02:00
Ivan Savenko
8b60275a6e Hero exchange in town is now activated by clicking on hero portrait 2024-02-18 21:02:24 +02:00
Ivan Savenko
af671d109f Made graphical primitive-based UI more configurable 2024-02-18 20:48:45 +02:00
Ivan Savenko
110ef5f66e
Merge pull request #3614 from IvanSavenko/sonarcloud_fixes_2
Sonarcloud fixes 2
2024-02-14 16:44:58 +02:00
Ivan Savenko
c3957c2c2a Moved json files to new directory, split on per-class basis 2024-02-14 13:08:24 +02:00
Ivan Savenko
c23953eac5 Remove custom casts 2024-02-14 12:56:37 +02:00
Ivan Savenko
7359b66f99 Do not use floating point equality checks 2024-02-14 12:07:07 +02:00
Ivan Savenko
9ebd194ab1
Merge pull request #3609 from IvanSavenko/single_process
Allow running server as part of client process
2024-02-14 12:06:22 +02:00
Alexander Wilms
c65794b9e3 Fix typos 2024-02-13 15:23:30 +01:00
Ivan Savenko
bfdb9a85f0
Merge pull request #3611 from IvanSavenko/lobby_fixes
Networking code fixes
2024-02-13 15:30:26 +02:00
Ivan Savenko
7c34d48258 Minor fixes and corrections to network-related code. No functionality
changes.
2024-02-12 18:57:20 +02:00
Ivan Savenko
74f9b03516 Fix crash on closing client while server is active 2024-02-12 16:36:13 +02:00
Ivan Savenko
62148e1506 Fix build 2024-02-12 15:08:46 +02:00
Ivan Savenko
4c70abbeb5 Reduced usage of global variables - removed or made const / constexpr 2024-02-12 13:49:45 +02:00
Ivan Savenko
6e399eb21a Make some non-const static variables const or constexpr 2024-02-12 13:22:54 +02:00
Ivan Savenko
392c360f88 Replaced some usages of void * with more clear CPack * 2024-02-12 12:53:10 +02:00
Ivan Savenko
b796ed8626 Fix undefined behavior 2024-02-12 12:33:09 +02:00
Ivan Savenko
c577ea3e8d Fix potentially uninitialized values 2024-02-12 12:31:27 +02:00
Ivan Savenko
a909d7ddde Removed cmake_modules/VCMI_lib macro, use it directly in place 2024-02-11 20:38:24 +02:00
Ivan Savenko
19ccef7131 Fix build 2024-02-11 19:54:30 +02:00
Ivan Savenko
cded8b1999 Show human-readable thread name in log 2024-02-11 17:55:02 +02:00
Ivan Savenko
0fc0ad238b Fixes for server shutdown logic, implemented connection aborting for
local server
2024-02-11 17:55:02 +02:00
Ivan Savenko
f08c9f4d59 Renamed ENABLE_STATIC_AI_LIBS option to match its actual effect 2024-02-11 17:55:02 +02:00
Ivan Savenko
0d263c5571 Implemented option to run server as a thread with shared VLC 2024-02-11 17:55:02 +02:00
Ivan Savenko
ef8eb330d6
Merge branch 'develop' into random_template_description 2024-02-11 17:54:18 +02:00
Ivan Savenko
38ba42ef7a Rename 'c' to 'logicConnection' 2024-02-11 16:26:27 +02:00
Ivan Savenko
f2ecd4cf11 Merge branch 'develop' into 'lobby' 2024-02-11 16:13:13 +02:00
Ivan Savenko
a3462acac3
Merge pull request #3602 from Laserlicht/campaignExtraButton
Campaign extra options button
2024-02-11 12:27:14 +02:00
Alexander Wilms
522cb571b3 Remove redundant virtual specifiers
`grep -nr virtual | grep -v googletest | grep override > ../redundant_virtual.txt`

```python
import os

with open("../redundant_virtual.txt") as f:
    for line in f:
        print()
        line: str = line.strip()
        print(line)
        tmp = line.split(":")
        file = tmp[0].strip()
        code = tmp[-1].strip()
        print(file)
        print(code)
        new_code = code.replace("virtual ", "", 1)
        # https://superuser.com/a/802490/578501
        command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}"
        os.system(command)
```
2024-02-10 20:46:13 +01:00
Ivan Savenko
1a144fc516 Some progress on private rooms support 2024-02-10 19:02:25 +02:00
Ivan Savenko
4a0dd2da2c Added option to create new account even if player already have one 2024-02-09 23:02:41 +02:00
Laserlicht
4e8152f268 reorder gui 2024-02-07 22:04:50 +01:00
Laserlicht
c8b6d6a684 add extra button for campaigns 2024-02-07 21:40:56 +01:00
Ivan Savenko
b319d16de6
Merge pull request #3597 from IvanSavenko/bugfixing
Fixes for map/save loading
2024-02-07 00:16:43 +02:00
Ivan Savenko
c068c92c92
Merge pull request #3201 from Alexander-Wilms/fix-huge-texture-crash
Fix broken intro and crash when resizing window
2024-02-07 00:16:15 +02:00
Ivan Savenko
87059be67b Added range checks to values read from h3m.
Fixes reading of morale/luck values (-3..3) as unsigned leading to
overflow.
2024-02-05 21:27:55 +02:00
Alexander Wilms
0495c52cf4 Don't call ScreenHandler::onScreenResize() when the window has been (un)maximized to avoid creating a huge texture and crashing 2024-02-05 18:59:55 +01:00
Ivan Savenko
156f1d9311
Merge pull request #3589 from Laserlicht/queue_adjust
adjustable queue size for embedded queue
2024-02-05 18:44:45 +02:00
Ivan Savenko
8cd6832297 Handle errors from global lobby on client 2024-02-04 21:23:21 +02:00
Ivan Savenko
d4bedd8d8d Fixed handling of match server crash 2024-02-04 19:58:09 +02:00
Ivan Savenko
7dee24edae Cleanup 2024-02-03 23:30:16 +02:00
Ivan Savenko
1b6ac1052a Properly lock UI mutex on accessing GUI state from network thread 2024-02-03 22:24:32 +02:00
Ivan Savenko
80fc2bb695 Merge remote-tracking branch 'vcmi/develop' into lobby 2024-02-03 21:11:34 +02:00
Ivan Savenko
bd4c7e3ac0 Added LobbyPrepareStartGame pack to replace old workarounds 2024-02-03 19:57:23 +02:00
Ivan Savenko
2c2bec791c Fixes and cleanup of game client network shutdown and restart 2024-02-03 19:27:04 +02:00
Tomasz Zieliński
b7df6064cd Add random map description and display it in RMG menu 2024-02-03 16:23:56 +01:00
Ivan Savenko
03fcfe3392 Use std::byte in serializer 2024-02-02 13:09:12 +02:00
Alexander Wilms
caa22ad9d8 Don't call recreateWindowAndScreenBuffers() in ScreenHandler::onScreenResize() to fix crash due to a huge texture being created 2024-02-02 08:52:59 +01:00
Ivan Savenko
29c0989849 Use std::byte to manage network data 2024-02-02 02:02:09 +02:00
Ivan Savenko
c12558bf8a Simplified code 2024-02-02 01:26:53 +02:00
Ivan Savenko
c9ebf32efd Send error messages if operation fails 2024-02-02 00:12:30 +02:00
Ivan Savenko
58ee72f684
Merge pull request #3588 from IvanSavenko/fix_regressions
Fix regressions
2024-02-01 22:27:52 +02:00
Ivan Savenko
7247038458
Merge pull request #3574 from SoundSSGood/altar-fixes
Artifacts altar related fixes
2024-02-01 22:27:41 +02:00
Laserlicht
5e3f0e631c
possibility to show small queue outside 2024-02-01 21:17:08 +01:00
Laserlicht
25188aead8
change config name 2024-02-01 20:50:58 +01:00
Laserlicht
aa2fc4b88a
adjustable queue size for embedded queue 2024-02-01 20:38:38 +01:00
Ivan Savenko
46fe6c1b09 Fixed crash on missing campaign audio files 2024-02-01 18:08:01 +02:00
SoundSSGood
a42b60feb9 suggested changes 2024-02-01 13:28:08 +02:00
Ivan Savenko
facdc9f993
Merge pull request #3583 from Laserlicht/town_portal
town portal dialog adjustments
2024-02-01 11:30:51 +02:00
Laserlicht
9e7fbc3ca2
use localstate 2024-01-31 21:29:04 +01:00
Laserlicht
9cd6a6838b
fix 2024-01-31 11:32:35 +01:00
Laserlicht
ebb2cce8b8
rework town portal 2024-01-31 02:30:10 +01:00
Ivan Savenko
a9866bb5c6 Added RandomGeneratorUtil::nextItemWeighted convenience method 2024-01-31 00:17:40 +02:00
Ivan Savenko
7992144763 Gem class is now Sorceress 2024-01-30 23:34:27 +02:00
Ivan Savenko
3abc26e789 Moved checks for campaign heroes to CGHeroInstance class 2024-01-30 23:33:58 +02:00
Ivan Savenko
c5c46a7c9a Implemented connecting to server via proxy 2024-01-30 21:31:41 +02:00
Ivan Savenko
5d8b65befd
Merge pull request #3575 from Laserlicht/infobox_pos
fix infobox position while disabling
2024-01-30 17:36:30 +02:00
Ivan Savenko
26703af8b0
Merge pull request #3576 from Alexander-Wilms/conditional-screen-clearing
CVideoHandler: Call SDL_RenderClear() when playing intro, call SDL_Re…
2024-01-30 17:36:18 +02:00
Ivan Savenko
9051cd9654
Merge pull request #3569 from Laserlicht/end_autocombat
instant finish of battle with autocombat
2024-01-30 17:34:56 +02:00
Ivan Savenko
48006307e1
Merge pull request #3563 from Laserlicht/quick_combat
quick combat vs ai
2024-01-30 17:33:34 +02:00
SoundSSGood
d16632b54c cleanup & fix build & sonarcloud fixes 2024-01-30 01:23:50 +02:00
Laserlicht
1124b43d91
check tactic side 2024-01-29 21:52:11 +01:00
Laserlicht
4aaebc834e
Merge branch 'develop' into end_autocombat 2024-01-29 21:36:11 +01:00
Laserlicht
7cc004e139
code review 2024-01-29 21:33:20 +01:00
Laserlicht
7ddc87f4a2
removed unused param; optimized pos 2024-01-29 21:11:18 +01:00
Alexander Wilms
6085893c0d CVideoPlayer: Make overlay an argument of playVideo() instead of an attribute 2024-01-29 20:27:00 +01:00
Alexander Wilms
70ce090bc4 CVideoHandler: Use EVideoType::INTRO and EVideoType::SPELLBOOK 2024-01-29 16:08:53 +01:00
Ivan Savenko
dc2f8cb81d
Merge pull request #3553 from Laserlicht/sync_subtitle
sync subtitle with audio
2024-01-29 12:54:43 +02:00
Alexander Wilms
33e170d562 CVideoHandler: Call SDL_RenderClear() when playing intro, call SDL_RenderFillRect() for spellbook animation 2024-01-28 22:53:51 +01:00
Ivan Savenko
bed05eb52d WIP: Implemented joining public rooms 2024-01-28 00:04:54 +02:00
Laserlicht
36881c226f
fix infobox position while disabling 2024-01-27 22:08:15 +01:00
SoundSSGood
c6ca6ad835 sacrifice routine 2024-01-27 23:01:57 +02:00
Laserlicht
0225590bb5
add info for not implemented replay; reorder button code; fix exit position 2024-01-27 17:36:19 +01:00
Laserlicht
cad0d5db16
consider unlimited replay (or not) 2024-01-27 15:02:03 +01:00
Laserlicht
3e71cbcc39
Block feature is battle against human 2024-01-27 14:35:54 +01:00
SoundSSGood
f66918ea14 bulk move to altar 2024-01-27 15:28:23 +02:00
SoundSSGood
652f009181 arts altar - arts holder 2024-01-27 15:28:21 +02:00
Laserlicht
a2fd5039ab
setting 2024-01-27 01:16:55 +01:00
Laserlicht
e8c541f873
end with auto combat 2024-01-26 23:15:56 +01:00
Laserlicht
d53dd83466
fix; cleanup; optimized times 2024-01-26 21:58:39 +01:00
Laserlicht
6e957d4913
fix build 2024-01-26 20:31:57 +01:00
Laserlicht
3d57437e52
move logic to tick 2024-01-26 20:13:02 +01:00
Laserlicht
c426382687
Apply suggestions from code review
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-01-26 20:09:17 +01:00
Ivan Savenko
eaca128c99 Code cleanup 2024-01-26 19:15:57 +02:00
Ivan Savenko
322c5faf63 Merge remote-tracking branch 'vcmi/develop' into lobby 2024-01-26 16:52:23 +02:00
Ivan Savenko
388ca6e776 Added list of active accounts and rooms to UI. Added room creation logic 2024-01-26 16:32:36 +02:00
Ivan Savenko
4d0c0f10a9
Merge pull request #3530 from Laserlicht/tavern
Invite hero
2024-01-26 13:12:55 +02:00
Laserlicht
28c6385211
fix 2024-01-26 11:17:38 +01:00
Laserlicht
7f58333ef9
quick combat vs ai 2024-01-25 23:44:41 +01:00
Laserlicht
c2c86ec278
fix 2024-01-25 21:11:42 +01:00
Laserlicht
3b9372c51c
Code review 2024-01-25 20:49:59 +01:00
Laserlicht
e434d5c0b7
Apply suggestions from code review
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-01-25 20:35:30 +01:00
Ivan Savenko
891d25a634
Merge pull request #3552 from Laserlicht/video_button
video button
2024-01-25 16:31:24 +02:00
Ivan Savenko
2a193effcc Merge branch 'master' into 'develop' 2024-01-25 16:23:13 +02:00
Laserlicht
e3acb92863
codestyle 2024-01-24 20:32:39 +01:00
Ivan Savenko
2f5bf64340 Do not crash on attempt to load campaign with unsupported maps 2024-01-24 13:44:22 +02:00
Laserlicht
8870547d02
simplyfied 2024-01-24 01:23:35 +01:00
Laserlicht
e59078320c
format fix 2024-01-24 01:22:34 +01:00
Laserlicht
134eaa1583
sync subtitle 2024-01-24 01:17:23 +01:00
Laserlicht
56db0e06cf
fix render artefacts remaining after video playback 2024-01-24 00:04:56 +01:00
Laserlicht
0df4f9bda5
video button 2024-01-23 23:45:31 +01:00
Ivan Savenko
ea439ad175 Dispatch text input SDL calls in main thread on all platforms 2024-01-22 22:19:52 +02:00
Laserlicht
7d1553bc29
fix build 2024-01-22 20:56:35 +01:00
Ivan Savenko
6a42494b12 Merge CKeyboardFocusListener and IFocusListener into CFocusable 2024-01-22 21:48:03 +02:00
Laserlicht
9b2908d464
Apply suggestions from code review
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-01-22 20:19:49 +01:00
Ivan Savenko
284273379e
Merge pull request #3536 from IvanSavenko/serialization_refactor
Refactoring of serialization versioning handling
2024-01-22 19:49:24 +02:00
Laserlicht
0a4b5dbe10
code review 2024-01-21 18:12:46 +01:00
Andrii Danylchenko
33f8f6dc53
Merge pull request #3409 from vcmi/fix-headless
Fix headless
2024-01-21 14:51:10 +02:00
Ivan Savenko
d8a96066c6
Merge pull request #3533 from Laserlicht/battle_text
fix battle text position
2024-01-21 10:10:26 +02:00
Ivan Savenko
9e62eb28c5 Fix merge 2024-01-21 00:53:22 +02:00
Ivan Savenko
fc4ae3bd8c Merge remote-tracking branch 'vcmi/develop' into lobby 2024-01-20 23:01:49 +02:00
Andrii Danylchenko
0c1664dbe7 NKAI: various AI fixes after tests in headless 2024-01-20 22:55:30 +02:00
Andrii Danylchenko
cc7fc4a2c6 Fix headless mode 2024-01-20 22:55:27 +02:00
Ivan Savenko
0c07384293 Refactoring of serialization versioning handling
- Removed 'version' field from serialize() method
- Handler classes - Binary(De)Serializer now have 'version' field
- Serialization versioning now uses named enum

Save compatibility with 1.4.X saves should be intact
2024-01-20 20:34:51 +02:00
Ivan Savenko
6b760089a4
Merge pull request #3473 from IvanSavenko/const_lib
[1.5] Remove non-const global variables from library
2024-01-20 19:22:46 +02:00
Laserlicht
883ea23495
moved to gameconfig 2024-01-20 17:54:15 +01:00
Ivan Savenko
9920783628 Avoid crash on invalid H3 data 2024-01-20 18:50:59 +02:00
Ivan Savenko
24d25730ad Changed checks for null with checks for hasValue 2024-01-20 16:41:10 +02:00
Laserlicht
3084cb2e46 fix battle text position
fix space
2024-01-20 14:35:21 +01:00
Laserlicht
d6172a9c4c
disable buttons while loading (not changable) 2024-01-20 13:42:37 +01:00
Laserlicht
a0098eb065 Gui for hero invite 2024-01-20 12:54:06 +01:00
Laserlicht
4813179abb
Invite hero setting 2024-01-20 01:24:34 +01:00
Laserlicht
346beea49c
invite hero backend 2024-01-20 01:09:55 +01:00
Laserlicht
1fb2a026ec
enable doubleclick 2024-01-19 23:31:21 +01:00
Ivan Savenko
baa73f5433 Code cleanup 2024-01-20 00:26:25 +02:00
Ivan Savenko
709905b1a0 Simplified networking API 2024-01-19 23:52:28 +02:00
Ivan Savenko
80e960bc8e Finalized new TCP networking API 2024-01-19 23:52:28 +02:00
Ivan Savenko
476a05fed3 Formatting 2024-01-19 23:52:28 +02:00
Ivan Savenko
ffa58152ac Client-side support for hosting game server via lobby 2024-01-19 23:49:59 +02:00
Ivan Savenko
47f72af556 Client-side update, adapted and fixed login and chat 2024-01-19 23:49:59 +02:00
Ivan Savenko
461bca73f3 Minor cleanup - move reinterpret_cast to jsonNode 2024-01-19 23:49:59 +02:00
Ivan Savenko
55b504792e Implemented basic version of login window and persistent connection on
client
2024-01-19 23:49:59 +02:00
Ivan Savenko
78833a1015 Split LobbyWindow file into one file per class 2024-01-19 23:49:59 +02:00
Ivan Savenko
20a38d8514 Renamed new LobbyXXX classes to GlobaLobbyXXX 2024-01-19 23:49:59 +02:00
Ivan Savenko
78b7d9e726 Replaced open port check with server crash check 2024-01-19 23:49:59 +02:00
Ivan Savenko
0196707083 Fix UUID initialization on client 2024-01-19 23:49:59 +02:00
Ivan Savenko
2396c14114 Fixed logic for reconnection attempts to local server. Cleanup.
Added distinct fields in config for local and remote connection.
Removed code for restoring last session since it does not works as
intended and often triggers after crash
2024-01-19 23:49:59 +02:00
Ivan Savenko
a3639e77b1 Fixed handling of connection failure on client 2024-01-19 23:49:59 +02:00
Ivan Savenko
a50cdbda0c Added timer functionality to NetworkServer
Might not be related to networking strictly speaking, but useful to have
functionality for network thread
2024-01-19 23:49:59 +02:00
Ivan Savenko
5694777a96 Simplified connection logic 2024-01-19 23:49:59 +02:00
Ivan Savenko
8ea69e457a Simplified applying of lobby packs 2024-01-19 23:49:59 +02:00
Ivan Savenko
22f0ca67c6 Fix connection to game lobby & map load 2024-01-19 23:49:59 +02:00
Ivan Savenko
0a1153e1c6 Switch client-server communication to new API 2024-01-19 23:49:59 +02:00
Ivan Savenko
de5227142b Implemented message receiving / broadcasting 2024-01-19 23:49:59 +02:00
Ivan Savenko
07fb313765 Implemented loading of latest messages on joining chat 2024-01-19 23:49:59 +02:00
Ivan Savenko
f10b6df989 Implemented messages sending and storing in database 2024-01-19 23:49:59 +02:00
Ivan Savenko
dff9cf39c0 Implemented connection handling 2024-01-19 23:49:59 +02:00
Ivan Savenko
c2c43602ea Initial version of global lobby server available in client 2024-01-19 23:49:59 +02:00
Ivan Savenko
d04241b10a Code cleanup 2024-01-19 23:02:00 +02:00
Ivan Savenko
1f7e53a609 Code style fixes 2024-01-19 21:21:23 +02:00
Ivan Savenko
6e629a6a5f split getBonusLocalFirst into two distinct method:
- const method getFirstBonus that returns single matching bonusToString
- non-const method getLocalBonus that returns bonus from current node
2024-01-19 13:56:06 +02:00
Ivan Savenko
496c13b34a Stabilization 2024-01-19 13:56:06 +02:00
Ivan Savenko
9af7c63a26 Fix build 2024-01-19 13:56:05 +02:00
Ivan Savenko
ea1f05d15a Stabilization 2024-01-19 13:55:22 +02:00
Ivan Savenko
e67e4430ba Removed most of non-const static fields in lib. Reduced header includes. 2024-01-19 13:55:22 +02:00
Ivan Savenko
a15366f5a5 Make IObjectInterface::cb non-static 2024-01-19 13:55:21 +02:00
Ivan Savenko
2c4cad7d9c Slight simplification of bonus system node class 2024-01-19 13:54:49 +02:00
Ivan Savenko
d5c4478816 Remove most of non-const access to VLC entities 2024-01-19 13:54:49 +02:00
Ivan Savenko
bd5682ecc3 Merge remote-tracking branch 'vcmi/master' into develop 2024-01-19 13:49:54 +02:00
Ivan Savenko
b2527c3775 Do not attempt to answer non-existing query 2024-01-18 22:21:07 +02:00
Ivan Savenko
3e8f110482
Merge pull request #3515 from SoundSSGood/backpack-statusbar
Backpack statusbar
2024-01-18 16:05:42 +02:00
Ivan Savenko
b698b6e79d
Merge pull request #3512 from Alexander-Wilms/use-auto-with-template-factory-functions-for-smart-pointers
Use auto with template factory functions for smart pointers
2024-01-18 16:05:05 +02:00
Ivan Savenko
9025744cc5
Merge pull request #3510 from Alexander-Wilms/remove-semicolons-from-macros
Remove trailing semicolons from more macros
2024-01-18 16:03:55 +02:00
SoundSSGood
a753319ad0 backpack window statusbar 2024-01-18 15:55:54 +02:00
Laserlicht
a1f4fcb78a
hide adventuremap 2024-01-18 00:47:18 +01:00
Alexander Wilms
b364f707cd Fix issues introduced by automated replacement of redundant types 2024-01-17 20:12:57 +00:00
Alexander Wilms
7a1cee1a60 Fix error: 'auto' not allowed in non-static struct member 2024-01-17 14:49:28 +00:00
Alexander Wilms
73019c204d Replace redundant types with auto for the lvalues of template factory functions for smart pointers
grep -r --include \*.h --include \*.cpp "= std::" * | grep -v auto | grep -Po ".*[^ ]+ [^ ]+ [^ ]*[ ]*=.*;" | grep -v "auto\|int\|char\|bool\|float|\double\|for\|if\|googletest\|fuzzylite\|size_t\|using\|return" | grep -v double | grep -v si64 | grep -v si32 | grep -v ui32 | grep \< | grep -v float | tr -d '\t' | grep -v assert > redundant_types.txt

import re

with open("redundant_types.txt") as f:
    for line in f:
        line = line.strip()
        path = line.split(":", 1)[0]
        original_code = ":".join(line.split(":")[1:]).strip()

        print()
        print(path)
        print(original_code)
        prefix = "auto "
        if original_code.startswith("static"):
            static = True
        else:
            static = False

        cpp_type = " ".join(original_code.split("=")[0].strip().split(" ")[0:-1])
        print(cpp_type)

        if static:
            new_code = "static auto "+ " ".join(original_code.split(" ")[2:])
        else:
            new_code = "auto "+ " ".join(original_code.split(" ")[1:])
        print(new_code)

        if True:
            with open(path, "r") as f:
                filedata = f.read()

            filedata = filedata.replace(original_code, new_code)

            with open(path, "w") as f:
                f.write(filedata)
2024-01-17 12:50:00 +00:00
Ivan Savenko
e849e4170a
Merge pull request #3486 from Alexander-Wilms/replace-redundant-types-with-auto
Replace redundant types with `auto`
2024-01-17 13:31:05 +02:00
Alexander Wilms
1b85abb508 Use auto instead of redundant type in initializations using new
grep -r --include \*.h --include \*.cpp "=" * | grep -v "auto\|int\|char\|bool\|float|\double\|for\|if\|googletest\|fuzzylite\|size_t\|using\|return\|{\|}\|= \"\|= tr(\|virtual\|void" | grep -Po ".*[^ ]+ [^ ]+ [^ ]*[ ]*=.*;" | grep -v "float\|nullptr" | grep "new" | grep -v "AI/FuzzyLite" | grep \( | grep "= new" > redundant_types.txt

import re

with open("redundant_types.txt") as f:
    for line in f:
        line = line.strip()
        path = line.split(":", 1)[0]
        original_code = line.split(":")[1].strip()
        if "new " in original_code:

            cpp_type = original_code.split(" ")[0]
            if original_code.count(cpp_type) == 2:
                print()
                print(path)
                print(original_code)
                new_code = "auto "+" ".join(original_code.split(" ")[1:])
                print(new_code)

                with open(path, "r") as f:
                    filedata = f.read()

                filedata = filedata.replace(original_code, new_code)

                with open(path, "w") as f:
                    f.write(filedata)
2024-01-16 21:40:53 +00:00
Alexander Wilms
ccac73fb69 Remove trailing semicolons from more macros 2024-01-16 19:46:21 +00:00
Alexander Wilms
cca08e29da Remove duplicate semicolons 2024-01-16 19:02:39 +00:00
Ivan Savenko
6270c81c1a Add logging to trace crash 2024-01-16 15:21:49 +02:00
Ivan Savenko
b9f4c557fa Fix cursor on visiting sea objects from land 2024-01-16 00:12:51 +02:00
Ivan Savenko
c21913f661 Fixed initialization of move points and mana for dismissed heroes 2024-01-15 23:16:48 +02:00
Ivan Savenko
a582cb554e
Merge pull request #3500 from IvanSavenko/fix_dendroid_bind
[1.4.3] Fix handling of Dendroid's Bind ability
2024-01-15 12:02:06 +02:00
Ivan Savenko
b4a1a755a4
Merge pull request #3498 from IvanSavenko/simturns_pathfinder
[1.4.3] Fixes for simultaneous turns
2024-01-15 12:00:54 +02:00
Ivan Savenko
0d0d3d8c80 Renamed speed -> getMovementRange, remove misleading default parameter 2024-01-14 17:14:36 +02:00
Ivan Savenko
d3a1cdb97a
Merge pull request #3485 from Laserlicht/fix_selection
fix buggy multiplayer selection
2024-01-14 14:23:32 +02:00
Ivan Savenko
b453b9d6d0 Fix UI lock on ending turn while simturns are active 2024-01-13 23:38:43 +02:00
Laserlicht
e25c8c21e0
fix buggy multiplayer selection 2024-01-13 21:51:56 +01:00
Ivan Savenko
fc163898d9 Fixed delayed updates in timer editing, limited to 24 hours at most 2024-01-13 22:31:26 +02:00
Laserlicht
2d511ecf1c
console fix 2024-01-13 18:59:59 +01:00
Ivan Savenko
f6e0f46040
Merge pull request #3467 from dydzio0614/hota-fixes
Fix HotA creature abilities (add bonuses allowing implementing them)
2024-01-12 21:55:18 +02:00
Ivan Savenko
7cf738b20e
Merge pull request #3462 from Laserlicht/trim_text
limit textboxes
2024-01-12 21:53:30 +02:00
Ivan Savenko
019a4151b9
Merge pull request #3258 from SoundSSGood/trade-panels
Market rework
2024-01-12 21:53:13 +02:00
SoundSSGood
4df7de36c1 fixed regression 2024-01-11 14:51:42 +02:00
SoundSSGood
b840cf3650 suggested changes 2024-01-11 12:46:32 +02:00
M
815fa26fb3 Change nix rounding, revert assert comment 2024-01-10 22:18:53 +01:00
Ivan Savenko
d6224eef5b
Merge pull request #3457 from Laserlicht/queue
make queue interactable
2024-01-10 15:51:13 +02:00
Alexander Wilms
781328f282 Convert C-style casts to the more verbose C++ style 2024-01-10 00:30:35 +00:00
Alexander Wilms
5e9f98b15c Resolve intentionality issues 2024-01-10 00:23:24 +00:00
Alexander Wilms
f3277b7953 Define each identifier in a dedicated statement 2024-01-10 00:22:23 +00:00
SoundSSGood
fdf60b2151 moved to widgets/markets 2024-01-09 20:21:09 +02:00
Ivan Savenko
eae3d806db
Merge pull request #3460 from Laserlicht/changedate_sort
add sort for changedate
2024-01-09 12:43:01 +02:00
Ivan Savenko
0d47c01de7
Merge pull request #3458 from Laserlicht/sel_window_bonus
correct starting bonus in selection windows
2024-01-09 12:41:55 +02:00
SoundSSGood
d0ca63d2c9 subclasses for market composition 2024-01-08 16:24:47 +02:00
SoundSSGood
50a5c72d1b Creatures trade panel 2024-01-08 16:24:47 +02:00
SoundSSGood
791ee78cc4 players trade panel 2024-01-08 16:24:47 +02:00
SoundSSGood
f043c417a1 Artifacts trade panel 2024-01-08 16:24:47 +02:00
SoundSSGood
b246e24811 reworking slot selection 2024-01-08 16:24:47 +02:00
SoundSSGood
6c828d1be9 Resources trade panel 2024-01-08 16:24:47 +02:00
Ivan Savenko
6641418218
Merge pull request #3452 from IvanSavenko/glibc_assertions
Enable & fix glibc assertions
2024-01-08 11:08:37 +02:00
Laserlicht
056dccda30
different max width 2024-01-08 00:08:05 +01:00
Laserlicht
24d4816a36
trim text 2024-01-07 23:42:48 +01:00