1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-16 10:19:47 +02:00
Commit Graph

1135 Commits

Author SHA1 Message Date
SoundSSGood
03aaf849f0 CWindowWithArtifacts remove std::variant 2024-05-20 15:15:46 +03:00
SoundSSGood
0501073d4c Artifacts altar ctrl+click 2024-05-20 11:47:12 +03:00
Ivan Savenko
5feef488e3 Added Ctrl & Shift versions for swap artifacts shortcut. Exchange window
shortcuts now work even without vcmi extras
2024-05-19 12:28:03 +00:00
Ivan Savenko
d965226cbd Moved Exchange Window to new file, no functionality changes 2024-05-19 10:53:56 +00:00
Ivan Savenko
6ba36cf6c0 Add separate shortcuts for adventure map and settings window 2024-05-19 09:12:36 +00:00
Ivan Savenko
0db8266495 Implemented some of the requested shortcuts 2024-05-19 09:12:36 +00:00
Ivan Savenko
88fbb7ee71 Most of buttons created in cpp now have assigned shortcut 2024-05-19 09:12:36 +00:00
Ivan Savenko
9bfe000724 Added semi-workaround method for network thread shutdown:
Currently closing game while network thread is waiting for something is
very bug-prone, since network thread may resume during shutdown and
access partially destroyed client state.

Now if exit has been requested, the very first step would be semi-
graceful shutdown of network thread (via exception throwing). This may
in theory skip some cleanup in non-RAII code, but since game is shutting
down this does not matters much.

This logic applies to:
- shutting down while network thread is waiting for dialogs
- shuttind down while network thread waiting for animations in combat
2024-05-18 11:04:10 +00:00
Ivan Savenko
7461df161c lib now uses shared_ptr for entities. Removed manual memory management. 2024-05-17 15:04:05 +00:00
SoundSSGood
09bb9895ce refactoring 2024-05-17 14:59:54 +03:00
SoundSSGood
6a1a6b6864 weak_ptr removed 2024-05-17 14:59:54 +03:00
SoundSSGood
7abfa7b42a ArtifactPosition::TRANSITION_POS now is simple ArtSlotInfo 2024-05-17 14:59:51 +03:00
Ivan Savenko
540bd16e7b Fixed video widget playback 2024-05-16 16:50:36 +00:00
Ivan Savenko
661a66121b Cleaned up IVideoPlayed API to remove global state 2024-05-15 17:05:17 +00:00
Ivan Savenko
d08c7b7b8f Added VideoWidget to hide implementation details 2024-05-15 17:05:16 +00:00
Ivan Savenko
d27b854cb1 Reorganized music, video and sound players:
- All XXXplayers are now in client/media directory
- Reogranized code on one class per file basis
- Extracted interfaces from handlers. Handlers now implement
corresponding interface.
- CCS now only stores pointer to an interface
2024-05-15 17:05:12 +00:00
Ivan Savenko
7790b8969d Simplify TextInput constructor 2024-05-15 12:45:45 +00:00
Ivan Savenko
93c3cf372b Reworked TextInput to allow text overflow support 2024-05-15 12:45:45 +00:00
Ivan Savenko
1abe9007bc Moved CTextInput to a separate file. No changes in logic 2024-05-15 12:45:45 +00:00
Ivan Savenko
da9d82b697
Merge pull request #3973 from vcmi/master
Merge master -> beta
2024-05-14 16:59:10 +03:00
Ivan Savenko
0aa7362adf Fix possible crash on accessing faction description 2024-05-12 20:24:09 +00:00
Ivan Savenko
7267e02b8d Better handling of Ctrl / Cmd modifier keys on Apple systems:
- Test only for Cmd modifier key when processing mouse clicks
- Test both Ctrl and Cmd modifier key when processing keyboard input
- This logic is now used for all Apple systems - macOS and iOS
2024-05-12 17:09:31 +00:00
Ivan Savenko
64d6e48540 Fixed mouse double-click handling in some widgets.
Now double-click when 1st click was not inside widget should work as
expected:
- scenario list: 2nd click on non-selected scenario will select it
instead of starting unselected map
- component selection: 2nd click on non-selected component would select
it instead of confirming choice
- town portal dialog: 2nd click on non-selected town would only select
it
- tavern window: right-click would now also select this hero (h3 logic)
2024-05-10 16:05:59 +00:00
DjWarmonger
4949b98ed3
Merge pull request #3759 from Laserlicht/bio
Let's try this
2024-05-07 09:05:14 +02:00
SoundSSGood
03c6684622 Cosmetic market window fix 2024-05-03 12:36:13 +03:00
Ivan Savenko
74d3b4ab43 Added block for several more actions outside of our turn 2024-04-30 17:51:32 +03:00
Ivan Savenko
d53082e1c1 Block few more cases of access during another player turn in UI 2024-04-30 17:51:32 +03:00
SoundSSGood
7543e26d42 dismiss hero with fix 2024-04-28 19:01:14 +03:00
SoundSSGood
ce68b3f45d class CArtifactsOfHeroMain : public CKeyShortcut 2024-04-27 21:35:38 +03:00
SoundSSGood
ce9d2d8ab8 Switching costume 2024-04-27 21:35:37 +03:00
SoundSSGood
25dea7e364 Saving costume 2024-04-27 21:35:37 +03:00
Laserlicht
ab50bf9198
biography to description 2024-04-27 18:41:21 +02:00
SoundSSGood
c9a8f8e855 Sonarcloud warnings 2024-04-23 22:21:46 +03:00
SoundSSGood
20471c9c2f virtual CWindowObject 2024-04-23 18:58:41 +03:00
SoundSSGood
25d2b468c3 CWindowWithArtifacts preparations 2024-04-23 16:06:58 +03:00
Ivan Savenko
0824f50367
Merge pull request #3779 from SoundSSGood/backpackWindow-art-transfer-fix
Backpack window cursor fix
2024-04-18 15:18:36 +03:00
Ivan Savenko
3724742247
Merge pull request #3774 from Laserlicht/fix_city_gate
fix city gate
2024-04-18 15:09:53 +03:00
SoundSSGood
e8eb638bf1 backpack window cursor fix 2024-04-17 16:11:33 +03:00
Laserlicht
f847068e92
fix city gate 2024-04-16 00:54:04 +02:00
Dydzio
b351946afd Add some utility bonuses for player resources boosting 2024-04-15 21:18:45 +02:00
Ivan Savenko
8003d0d7ca Restore handling of double-clicks in message boxes 2024-04-14 13:09:39 +03:00
Ivan Savenko
ae8779779b Fix typo in file names 2024-04-14 13:09:11 +03:00
Laserlicht
e4b60baa3b
creature/town biography/description 2024-04-12 23:35:39 +02:00
Ivan Savenko
a7d47cd3d2
Merge pull request #3742 from IvanSavenko/adventure_map_spellcast_fixes
Adventure map spellcasting fixes
2024-04-12 11:17:19 +03:00
SoundSSGood
6a0e8b0cab Junkyard crash fixed 2024-04-11 01:44:15 +03:00
Ivan Savenko
8353bca34f Small refactoring of adventure map spell casting:
- Removed duplicated checks for DD possibility
- Moved most of spell-specific code from AdventureMapInterface to library
code
- AdventureSpellMechanics class now provides methods to check whether
spellcast is possible, similarly to battle spells
- If it is not possible to cast adventure map spell (e.g. no mana or no
move points) game will show infowindow immediately on clicking spellbook
instead of on cast attempt
- If hero does not have movement points for a DD, game will show correct
error message
- Added game settings 'dimensionDoorFailureSpendsPoints' due to
discovered H3 logic
2024-04-10 20:04:08 +03:00
SoundSSGood
39a0e56169 suggested changes 2024-04-08 14:57:58 +03:00
SoundSSGood
2cdf2b4083 fixed missed trader text 2024-03-25 17:38:43 +02:00
SoundSSGood
c6c213c454 CMarketBase::hRight CMarketBase::hLeft removed. Final changes 2024-03-25 12:56:46 +02:00
SoundSSGood
cc14f85445 Refactoring. Regressions fixing. 2024-03-25 12:55:05 +02:00
SoundSSGood
433d55cac3 Market window unified 2024-03-25 12:44:34 +02:00
SoundSSGood
ae8d70748b Altar artifacts widget refactoring 2024-03-25 12:44:33 +02:00
SoundSSGood
4839891de4 Cleanup & refactoring 2024-03-25 12:44:33 +02:00
SoundSSGood
f3fa6714dc Artifacts selling widget 2024-03-25 12:44:33 +02:00
SoundSSGood
bb7137545f Artifacts market widget 2024-03-25 12:44:33 +02:00
SoundSSGood
4e0ea7355b Transfer resources widget 2024-03-25 12:44:33 +02:00
SoundSSGood
4d3bf882ed market resources widget 2024-03-25 12:44:33 +02:00
SoundSSGood
6b658bf9c1 freelancer guild widget 2024-03-25 12:44:33 +02:00
SoundSSGood
0813fdbf8c market window 2024-03-25 12:44:33 +02: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
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
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
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
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
82eea1abc1 Remove unused variable 2024-02-19 16:49:59 +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
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
f2ecd4cf11 Merge branch 'develop' into 'lobby' 2024-02-11 16:13:13 +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
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
d4bedd8d8d Fixed handling of match server crash 2024-02-04 19:58:09 +02:00
Ivan Savenko
80fc2bb695 Merge remote-tracking branch 'vcmi/develop' into lobby 2024-02-03 21:11:34 +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
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
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
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
SoundSSGood
d16632b54c cleanup & fix build & sonarcloud fixes 2024-01-30 01:23:50 +02:00
Alexander Wilms
70ce090bc4 CVideoHandler: Use EVideoType::INTRO and EVideoType::SPELLBOOK 2024-01-29 16:08:53 +01:00
SoundSSGood
f66918ea14 bulk move to altar 2024-01-27 15:28:23 +02:00
Laserlicht
a2fd5039ab
setting 2024-01-27 01:16:55 +01: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
e434d5c0b7
Apply suggestions from code review
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-01-25 20:35:30 +01:00
Laserlicht
7d1553bc29
fix build 2024-01-22 20:56:35 +01:00