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

7954 Commits

Author SHA1 Message Date
Andrii Danylchenko
e64e331373 Switch to the latest VS generator version 2022-03-05 19:31:47 +02:00
Andrii Danylchenko
550f544592 Add logging of network failure during connect 2022-03-05 15:53:07 +02:00
Andrii Danylchenko
02b2f35143 Nullkiller: fix crash 2022-03-05 15:51:03 +02:00
Dmitry Orlov
ea2931c6ea Fix: Get rid of 'Tile is not visible' error message 2022-01-30 12:31:07 +02:00
Andrii Danylchenko
ccfa6359ad Trigger andoid build on push 2022-01-04 17:12:24 +02:00
Andrii Danylchenko
84948820b2 exchange window move single stacks buttons 2022-01-03 15:13:46 +02:00
Andrii Danylchenko
0fd13d2f3b Change HD mod assets 2022-01-03 15:13:46 +02:00
Andrii Danylchenko
78efd09e2e Refactor HD mod army exchange 2022-01-03 15:13:46 +02:00
Andrii Danylchenko
3c0935a5b9 Artifact exchange 2022-01-03 15:13:46 +02:00
Andrii Danylchenko
8fa0b30985 Army exchange implementation 2022-01-03 15:13:46 +02:00
Andrii Danylchenko
2ce73fd4e1 Army exchange implementation 2022-01-03 15:13:46 +02:00
Arseniy Lartsev
222a0e40c7 Added code to display some HD mod buttons in hero exchange window 2022-01-03 15:13:46 +02:00
Arseniy Lartsev
24d2d5b702 New layout for hero exchange dialog with HD mod features 2022-01-03 15:13:46 +02:00
Arseniy Lartsev
c502cfc223 Added constructor with target size argument for CAnimImage
The image will be scaled to the given width (height is ignored)
2022-01-03 15:13:46 +02:00
Dmitry Orlov
9e3c4b69c4 Minor fixes 2021-12-22 21:37:56 +02:00
Dmitry Orlov
8cae3398ba Feature: Army Management Shortcuts should work as in HD+ Mod 2021-11-28 20:00:43 +02:00
Andrii Danylchenko
7faa691f42
Merge pull request #719 from kambala-decapitator/chrono-from-std
replace boost::chrono with std::chrono
2021-11-26 10:10:31 +02:00
Andrey Filipenkov
af6d666778 use high_resolution_clock instead of steady_clock 2021-11-23 11:56:06 +03:00
Andrey Filipenkov
fc064b1c45 replace boost::chrono with std::chrono 2021-11-23 10:23:55 +03:00
Dmitry Orlov
a65feb29f5 Fixed: Advanced options window issues 2021-11-13 17:02:11 +02:00
Dmitry Orlov
1ce7701168 Fixed: Animation errors should not lead to hanging 2021-11-10 20:32:54 +02:00
Dmitry Orlov
0427fa45dd Fix: Terrain description should be shown correctly 2021-11-08 21:01:30 +02:00
Dmitry Orlov
7cfd1fe0ca Fix: Captured town should not be duplicated on the UI 2021-10-31 17:33:26 +02:00
Dmitry Orlov
e4c2f0c822 Fix: Skyship Grail should work immediately after capturing without battle 2021-10-31 09:01:49 +02:00
Andrii Danylchenko
e219e1febf 3187 - fix whirlpool crash when exits are blocked 2021-10-23 21:40:52 +03:00
Andrii Danylchenko
4da8341024 Android: allow run without scripting 2021-10-15 09:51:32 +03:00
Andrii Danylchenko
11e6e0d6f7 Fix pathfinding issues when hero has expert navigation 2021-10-06 08:45:48 +03:00
Andrii Danylchenko
98c6215ab6 fix negative tile cost from pathfinding skill 2021-10-06 08:45:06 +03:00
Andrii Danylchenko
7f175c7f19
Merge pull request #676 from ShubusCorporation/do/fix/mod_system/Patch3
Patch III for Mod system improvement : Negative bonuses: new feature, fixes, town building: Magic Well
2021-09-26 21:22:28 +03:00
Dmitry Orlov
30b879ae5d Fixed: duplicated bonusing building. Improved: opposite bonus propagation 2021-09-12 14:30:54 +03:00
Andrii Danylchenko
2f450f6592 Fix MXE lib address and new compilation issues 2021-09-06 21:27:17 +03:00
Dmitry Orlov
ec7453ae85 Fix some warnings, Add headers to the solution 2021-09-05 17:31:12 +03:00
Dmitry Orlov
2a39c401b8 Feature: Opposite Side Limiter. Added: Old saves support. 2021-09-04 14:15:38 +03:00
Dmitry Orlov
25d9ea1ddf Feature: Opposite Side Limiter 2021-09-04 14:15:38 +03:00
Dmitry Orlov
f861d3a509 Fix: Visiting hero should receive town bonuses during town siege 2021-09-04 14:15:37 +03:00
Dmitry Orlov
6f0864b47c Feature: Town Negative Bonuses. Fix: Negative bonus bearers should not be affected 2021-09-04 14:15:37 +03:00
Dmitry Orlov
3cb88b6964 Feature: Magic Well should work in the fan towns 2021-09-04 14:15:37 +03:00
Andrii Danylchenko
093076c6d0 Workaround msvc crash 2021-08-24 14:25:57 +03:00
Andrii Danylchenko
d56760eb4b Workaround msvc compiler crash 2021-08-24 12:19:18 +03:00
Andrii Danylchenko
83f690e059 change SDL color key alpha to transparent 2021-08-21 09:32:52 +03:00
Andrii Danylchenko
27b3a88dda Replace App Veyor 2021-08-21 09:32:52 +03:00
Andrey Filipenkov
cd10be875d [macOS] use install_name_tool to fix loading libvcmi from Nullkiller AI lib 2021-08-21 09:16:00 +03:00
Andrey Filipenkov
c2ee9e46af [macOS] use install_name_tool to fix loading libvcmi from the scripting libs 2021-08-21 09:16:00 +03:00
Alexander Wilms
ba7c9d7021 Linux packaging: Add metainfo file 2021-08-02 12:27:56 +01:00
Sergei Trofimovich
23215e039c client/CVideoHandler.cpp: fix crash on video playback
Avoid buffer overflow caused by sws_scale():
    http://trac.ffmpeg.org/ticket/9254
Currently (ffmpeg-4.4 with SSE3 enabled) sws_scale()
has a few requirements for target data buffers on rescaling:
1. buffer has to be aligned to be usable for SIMD instructions
2. buffer has to be padded to allow small overflow by SIMD instructions
Unfortunately SDL_Surface does not provide these guarantees.
This means that atempt to rescale directly into SDL surface causes
memory corruption. Usually it happens on campaign selection screen
where short video moves start spinning on mouse hover.

To fix [1.] we use av_malloc() for memory allocation.
To fix [2.] we add an `ffmpeg_pad` that provides plenty of space.
We have to use intermdiate buffer and then use memcpy() to land it
to SDL_Surface.

Without the change crash has the following backtrace:

```
(gdb) bt
    (c=0x47508940, src=0x1ffeffef50, srcStride=0x1ffeffef30, srcSliceY=0, srcSliceH=116, dst=0x1ffeffef70, dstStride=0x1ffeffef40) at src/libswscale/x86/yuv2rgb_template.c:119
    (c=<optimized out>, srcSlice=<optimized out>, srcStride=0x432afa20, srcSliceY=<optimized out>, srcSliceH=116, dst=<optimized out>, dstStride=0x1ffefff0a0) at src/libswscale/swscale.c:969
    (this=0x1abaa330, x=90, y=72, dst=0x1a85a4c0, forceRedraw=<optimized out>, update=<optimized out>)
    at ../vcmi-9999/client/CVideoHandler.cpp:332
    at ../vcmi-9999/client/gui/CIntObject.cpp:83
    at ../vcmi-9999/client/gui/CGuiHandler.cpp:462
```

valgrind points to corruption right in sws_scale():

```
Invalid write of size 8
   at 0x6C50BD3: ??? (in /usr/lib64/libswscale.so.5.7.100)
   by 0x6C4FAE6: yuv420_rgb32_ssse3 (yuv2rgb_template.c:119)
   by 0x6C28DF2: sws_scale (swscale.c:969)
   by 0x4566F6: CVideoPlayer::nextFrame() (CVideoHandler.cpp:293)
   by 0x4573A6: CVideoPlayer::update(int, int, SDL_Surface*, bool, bool) (CVideoHandler.cpp:332)
   by 0x25EC94: CIntObject::show(SDL_Surface*) [clone .part.0] (CIntObject.cpp:83)
   by 0x34E855: CMainMenu::update() (CMainMenu.cpp:319)
   by 0x25D589: CGuiHandler::renderFrame() (CGuiHandler.cpp:462)
   by 0x1F7450: mainLoop (CMT.cpp:1387)
   by 0x1F7450: main (CMT.cpp:513)
 Address 0x475088a8 is 0 bytes after a block of size 92,840 alloc'd
   at 0x483F7E5: malloc (vg_replace_malloc.c:380)
   by 0x52B4E23: SDL_malloc_REAL (SDL_malloc.c:5387)
   by 0x5266237: SDL_SIMDAlloc_REAL (SDL_cpuinfo.c:963)
   by 0x52EF042: SDL_CreateRGBSurfaceWithFormat_REAL (SDL_surface.c:123)
   by 0x2649AC: CSDL_Ext::newSurface(int, int, SDL_Surface*) (SDL_Extensions.cpp:42)
   by 0x457B20: CVideoPlayer::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, bool, bool) (CVideoHandler.cpp:182)
   by 0x457C60: CVideoPlayer::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool) (CVideoHandler.cpp:84)
   by 0x35B14E: CCampaignScreen::CCampaignButton::show(SDL_Surface*) (CCampaignScreen.cpp:126)
   by 0x25EC94: CIntObject::show(SDL_Surface*) [clone .part.0] (CIntObject.cpp:83)
   by 0x34E855: CMainMenu::update() (CMainMenu.cpp:319)
   by 0x25D589: CGuiHandler::renderFrame() (CGuiHandler.cpp:462)
   by 0x1F7450: mainLoop (CMT.cpp:1387)
   by 0x1F7450: main (CMT.cpp:513)
```

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2021-07-31 14:35:31 +03:00
Dmitry Orlov
b1db6e26d1 Fix: nextPrimarySkill crash in case when probability values are incorrect 2021-07-30 12:10:33 +03:00
Andrii Danylchenko
25ba3ae33b Replaced Travis CI build badge 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
b00a1dee28 Fix build 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
79d06bbaa6 Nullkiller: fix merge conflicts 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
d47564955e Nullkiller: fix/refactor temporary bonus nodes, fix gather army quest completion 2021-07-26 21:02:50 +03:00