1
0
forked from 0ad/0ad
Commit Graph

2357 Commits

Author SHA1 Message Date
dd9e14d5d1 Move SSE.h to a better place. Rename it to simd.h after discussion with @OptimusShepard and @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3437
This was SVN commit r24840.
2021-02-05 12:40:59 +00:00
321e3652f9 Fix and disable some pesky Windows warnings.
Differential Revision: https://code.wildfiregames.com/D3511
This was SVN commit r24838.
2021-02-05 12:20:06 +00:00
b1a89fbd89 Replaces UNICODE characters in the code by consistent ASCII characters.
Beside consistency improves reading for such console tools like svn diff
or vim diff.

This was SVN commit r24625.
2021-01-15 10:07:36 +00:00
687a9335f0 Remove cache detection
Reviewed by: wraitii
Fixes: #4360
Differential Revision: https://code.wildfiregames.com/D3165
This was SVN commit r24550.
2021-01-11 17:30:16 +00:00
5ee8354e99 Fix windows SEH hook when crashing in an std::thread
Follows 107d3d461f and other 'pthread->std::thread' diffs.

Windows uses Structured Exception Handling to allow reporting errors
(both C++ and hardware) nicely. This works by wrapping the code in a
__try __catch block.
The pthread wrapper did this automatically, but we now need to do it
explicitly for std::thread.

Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3261
This was SVN commit r24530.
2021-01-10 08:39:54 +00:00
8ae3c09dc0 Fix renderer crash in GCC 7.5.
The 'arena' allocator does not take memory alignment into account, which
can result in crashes at -O3 with gcc 7.5 (presumably because of SSE
instructions).

This accounts for alignment issues, fixing the issue.
Also do various cleanup in lib/allocators.

Reported by: Bellaz89, Freagarach
Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3181
This was SVN commit r24517.
2021-01-06 14:56:17 +00:00
b5243cd574 Fix compilation error on FreeBSD. MAP_NO_RESERVE was never implemented, and as such had no effect there.
Reported by: @madpilot
Refs: https://reviews.llvm.org/D7485, #5255

Differential Revision: https://code.wildfiregames.com/D1594
This was SVN commit r24513.
2021-01-05 19:06:36 +00:00
bc00a6b8df Replace CLOCK_REALTIME by CLOCK_MONOTONIC as suggested by @janwas.
Add sanity checks
Fixes #5760

Tested by: @wraitii, @OptimusShepard
Differential Revision: https://code.wildfiregames.com/D3066
This was SVN commit r24507.
2021-01-04 11:08:19 +00:00
1bb336829d Add initial support for MCST Elbrus 2000 (e2k) CPU architecture
patch by: @r-a-sattarov
Reviewed by: @Stan
Fixes #5877, Refs #5869

Differential Revision: https://code.wildfiregames.com/D3162
This was SVN commit r24490.
2020-12-31 15:52:12 +00:00
d28d17e96c Remove SSE detection duplication in Colors and ModelRenderer
- Rename macros to be more explicit
 - Move detection code to a separate file
 - Remove a lot of checks in ARB mode (ModelDef.cpp would check for sse
multiple times per frame)
 - Make explicit the SSE2 dependency for Windows

Comments by: @vladislavbelov @wraitii @OptimusShepard
Differential Revision: https://code.wildfiregames.com/D3212
This was SVN commit r24489.
2020-12-31 15:37:28 +00:00
e009d322cc Add missing files in 4942cabab5
This was SVN commit r24488.
2020-12-31 14:27:02 +00:00
a395a0ab66 [BOOST 1.75 2/2] Update binaries for windows (1.65 → 1.75).
Refs #3004

This was SVN commit r24484.
2020-12-31 12:13:25 +00:00
596155cede Use C++17 std::size instead of sizeOf
This was SVN commit r24413.
2020-12-17 22:17:46 +00:00
387b2106ae Fix style issues in archive_zip code. test for more things.
This was SVN commit r24410.
2020-12-17 22:00:31 +00:00
de1a42d937 Fix test macro introduced in b6114adc8d
This was SVN commit r24409.
2020-12-17 21:17:16 +00:00
dd0b56c8aa Replace DISCARD macro with ignore_result template.
Fixes eb7940b418.
As reported by Vladislav, there is possibly confusion on what exactly is
being ignored when there are multiple statements after DISCARD. Explicit
wrapping avoids that.

Differential Revision: https://code.wildfiregames.com/D3206
This was SVN commit r24397.
2020-12-15 09:03:44 +00:00
aa3bd08513 Fix non-visual replay on Windows. Use the actual detected resolution.
Differential Revision: https://code.wildfiregames.com/D3208
This was SVN commit r24381.
2020-12-12 08:18:24 +00:00
14cc771b6d Fix zip with comments triggering assertion on game startup
Fixes #5165

Patch by: @Teiresias
Differential Revision: https://code.wildfiregames.com/D1511
This was SVN commit r24368.
2020-12-10 19:09:10 +00:00
ea38089853 Fix userreport detection of sound cards
Differential Revision: https://code.wildfiregames.com/D3025
This was SVN commit r24367.
2020-12-10 18:36:05 +00:00
cc65e0e8a2 Add support for HAIKU detection by the SDL.
This was SVN commit r24366.
2020-12-10 18:15:50 +00:00
d09c5bf8bc Small cleanup of test_wdbg_sym.h
This was SVN commit r24364.
2020-12-10 16:13:29 +00:00
b6114adc8d Fix tests on Windows in no pch mode.
This was SVN commit r24363.
2020-12-10 15:58:17 +00:00
369c2e8801 Further header & precompiled cleanup, fix no-PCH builds.
GUIObjectBase is made a IGUIObject* to avoid including those headers
un-necessarily. Subsequent diffs ought to clean up the various of
pointers for that with a similar type with reference semantics.

Also:
- Add standard C and C++ headers (mostly cstring for memcpy, string and
vector) where needed.
- Swap out some includes for forward declarations
- Clean up un-necessary boost includes in precompiled and other headers.
- Clean up precompiled headers, including fewer things.
- Move ACPI to the windows-specific folder as it's included there only
and mostly specific to that platform.

Thanks Stan for the testing.

Differential Revision: https://code.wildfiregames.com/D3129
This was SVN commit r24352.
2020-12-09 14:39:14 +00:00
d95550248b Rework bundle creation scripts.
This reworks the OSX bundle script, to run it easily on CI and to
further also build the unix tarballs and the windows installer.

Clean up the MacOS bundle detection, by not forcing a compilation-time
switch.
Clean up shared library compilation: changing the installation name
isn't necessary for 0 A.D.

Differential Revision: https://code.wildfiregames.com/D3161
This was SVN commit r24343.
2020-12-07 13:44:42 +00:00
40f3a967d9 Handle unknown APIC IDs in the ACPI SRAT
Patch by: Itms
Fixes: #5412

Differential Revision: https://code.wildfiregames.com/D1789
This was SVN commit r24326.
2020-12-05 13:40:29 +00:00
416cc90c3e Drop support for compiling with Visual Studio 2015
Ahead of the SM68 migration, where we will need to use VS17, drop
support for compiling with VS16.

Refs #5862

Differential Revision: https://code.wildfiregames.com/D3158
This was SVN commit r24286.
2020-11-28 16:54:48 +00:00
d7d0f142d8 Update (and debundle) fmt dependancy
We now support the most recent released version of `fmt` available (at
the time
of committing).

As we no longer patch `fmt` to get it to work within `pyrogenesis`, this
commit
also mostly removes its source from our code-tree (some headers are
retained for
Windows builds).


If you are a user of...

Linux/BSD: You will now need to have `fmt` installed from your
distribution's
           package repository. The minimum supported version of `fmt` is
`4.0`.

      OSX: The source is acquired and compiled (in `build-osx-libs.sh`),
           then included and linked automatically.

  Windows: The relevant header files are retained and, along with a
pre-built
           library, are the only things still bundled.


Accepted by: wraitii
Tested by:
* Freagarach (Lubuntu 18.04, `fmt 4.0.0`)
* Krinkle (MacOS 10.14, `fmt 6.1.2`)
* nephele (Alpine Linux)
* wraitii (MacOS 10.14)
* Nescio (Fedora 33, `fmt 7.0.3`)

Windows library files built by: Stan
Fixes: #3190
Differential Revision: https://code.wildfiregames.com/D2689
This was SVN commit r24267.
2020-11-26 21:01:32 +00:00
eb7940b418 Silence warnings about unused result.
Introduce a DISCARD macro to ignore the warn_unused_result attribute
used by Spidermonkey, and reuse it elsewhere.

Differential Revision: https://code.wildfiregames.com/D3147
This was SVN commit r24261.
2020-11-26 13:58:59 +00:00
1fbf51ccf1 Fix OS detection on Windows 10.
Compatibility mode will be handled in a later diff.

Comments by: @Itms, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2420
This was SVN commit r24238.
2020-11-23 10:11:37 +00:00
2288de4aa6 Remove UniqueRange custom code in favour of unique_ptr
UniqueRange was a unique_ptr replacement with a few tweaks (such as a
compulsory custom deleter). Its features are not really used, it
contains outdated atomic calls, and it blocks D1511, thus it is removed.

Refs #5165

Differential Revision: https://code.wildfiregames.com/D613
This was SVN commit r24234.
2020-11-22 13:43:19 +00:00
f6348b9617 Clean up header includes, add new forward declarations.
This cleans up many un-necessary header includes, either simply
providing nothing or forward declarations in their place.

No major compilation time change here, though this does reduce depencies
in some headers.

Also fix up old MacOS STL-include fixes that are no longer relevant.

Differential Revision: https://code.wildfiregames.com/D3128
This was SVN commit r24227.
2020-11-21 11:20:29 +00:00
9937116f2b Adds MSAA to anti-aliasing techniques.
Tested By: Freagarach, OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D2812
This was SVN commit r24188.
2020-11-15 20:07:48 +00:00
6b5fe442c7 Remove unused function that triggers warnings on Windows.
This was SVN commit r24183.
2020-11-14 18:11:58 +00:00
ada16439ab Fix the random slowdowns and speedups on AMD CPUs for Windows
Remove the MAHAF code and binaries, which doesn't work on anything more
recent than Windows XP due to the usage of an unsigned driver.
Remove the custom timer (PMT, TSC...) code to use the Windows
recommended way aka, QueryPerformanceCounter (QPC)
Remove the deprecated functions in wpthread relating to this. Some
further cleanup will be needed, but this patch is already big enough.

This patch voluntarily excludes the Linux Fix for further investigation
as we haven't ruled out a kernel bug yet;

Discussed with: @wraitii, @vladislavbelov, @janwas, AMD Inc,
Tested by: Dakara, @OptimusShepard, Stan (On W10, Win7; with and without
PCH)

Threads:
https://wildfiregames.com/forum/topic/28367-amd-ryzen-threadripper-user-read-before-posting/
https://wildfiregames.com/forum/index.php?/topic/26890-problem-with-ryzen-3000er-series/page/3/

Differential Revision: https://code.wildfiregames.com/D2726
This was SVN commit r24137.
2020-11-06 23:18:16 +00:00
acc254533b Refactors water shader to move refraction in a separate function.
Commented By: Angen, asterix, linkmauve, Stan, wraitii
Reviewed By: Angen
Tested By: Angen, asterix, linkmauve, Stan
Differential Revision: https://code.wildfiregames.com/D2908
This was SVN commit r24110.
2020-10-25 21:00:52 +00:00
996b37f07b Fix logic issue with the DXT1a texture format, refs #4549.
Before the NVTT upgrade, no DXT1a file would have been properly decoded:
they would all have been mistaken for a 8bpp greyscale due to a logic
issue in our code, which would have triggered a crash. I did not notice
the logic issue when performing the upgrade. As a result, decoding those
files now fails silently: their alpha bit will be ignored and they will
be handled as DXT1.

This patch fixes the logic and allows us to decode DXT1a properly, in
accordance with the format specifications. Currently, we do not use this
format.

Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2522
This was SVN commit r23973.
2020-08-18 16:45:56 +00:00
01118c1196 Fix issues relating to SDL and wxWidgets interaction in Atlas.
This fixes the transfer of key inputs from WxWidgets to SDL, making it
possible to type in the in-game GUI from Atlas.

Also fixes whitespace issues in some Atlas files.

The following improvements are OSX specific:
- fixes an SDL assertion related to unused subsystems in Atlas.
- Remove the 'osxguiapplication' override. This fixes the editor
starting up in the background and not accepting input when launched from
in-game.
- To prevent an issue with sdl/wxwidgets conflict when running from
inside the game, actually boot a new instance (see #2427)


Reported by: wik (Many thanks for your investigations)
Tested by: trompetin17, Stan
Fixes #2427
Fixes #2846

Differential Revision: https://code.wildfiregames.com/D2788
This was SVN commit r23926.
2020-08-03 12:23:16 +00:00
5176f848b8 Fixes missing deletion of files in 409c436ae2.
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2476
This was SVN commit r23755.
2020-06-08 22:36:19 +00:00
409c436ae2 Remove obsolete GetVideoMode platform-specifics, replaces by platform-agnostic SDL2`s APIs.
Before and after the commit we don't support multiple displays and HiDPI
properly.

Patch By: linkmauve
Tested By: Angen, elexis, Stan
Differential Revision: https://code.wildfiregames.com/D2476
This was SVN commit r23754.
2020-06-08 17:49:26 +00:00
a4341acaa6 Fixes macOS builds after 76909984b2 because of removed header.
This was SVN commit r23625.
2020-05-05 11:31:19 +00:00
76909984b2 Removes obsolete clipboard, replaces by platform-agnostic SDL2`s APIs. Refs D2476.
Patch By: linkmauve
Tested By: bb, elexis, Stan
This was SVN commit r23624.
2020-05-05 11:18:00 +00:00
accf7ade37 Add thread names on Linux (implements debug_SetThreadName), also add the thread name of the UPnP thread.
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2479
This was SVN commit r23568.
2020-04-06 20:20:27 +00:00
365e6c58e8 Removes unused gfx::GetMonitorSize function
GetMonitorSize was added in 5b5726ed4d. Its usage wasn't added. We don't
need to have the custom implementation of the function, since SDL2 can
do this. Also it doesn't make sense to get the default monitor size in
multi-monitor environments since the application window might be located
on each of them.

Patch By: linkmauve
This was SVN commit r23426.
2020-01-20 21:54:31 +00:00
421124d486 Removes unused MemorySizeMiB. Refs D2476.
We don't need to account #2145 anymore, since we dropped SDL1. SDL2
doesn't have SDL_GetVideoInfo. We might use OpenGL extensions like
GL_ATI_meminfo, GLX_MESA_query_renderer or GL_NVX_gpu_memory_info.
But they aren't spreaded very well. Also VRAM size isn't so useful for
us, since OpenGL driver can swap memory pages when it needs to.

Patch By: linkmauve
This was SVN commit r23425.
2020-01-20 21:24:09 +00:00
Angen
d33f1c7321 Remove not needed checks and code for VS2015 [VS2013 -> VS2015]
Some pragma warnings are not more needed for VS2015 compilation this
removes them.
Removing some specific code for older version than VS2015.
Forcing build to fail if compiling with VS older than VS2015.

Differential Revision: https://code.wildfiregames.com/D1396
Reviewed by: @Itms
This was SVN commit r23416.
2020-01-19 12:43:41 +00:00
7c72cb7bb9 Reports SDL builtin and runtime versions and video backend in hwdetect report.
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2485
This was SVN commit r23412.
2020-01-18 16:45:50 +00:00
1750b0b34c Fixes GLES mode builds on Mesa and running on Intel Iris drivers.
Patch By: linkmauve
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2448
This was SVN commit r23410.
2020-01-17 21:13:51 +00:00
bbcd9b34cc Removes obsolete sys_cursor. Refs D2557.
sys_cursor was introduced in 7e1bcd5159 and partially in 5299dcad86.
Usage of sys_cursor was completely removed in 9a2d0f803e. At the moment
we use SDL and GL cursors.

Patch By: linkmauve
Comments By: Stan
This was SVN commit r23364.
2020-01-10 23:45:40 +00:00
Angen
5ad75fa580 Precompiled logic update [Windows build]
Nuke HAVE_PCH and use only one macro for PCH logic.
This macro is enabled (=1) or disabled (=0) based on --without-pch and
no_pch parameters in premake5
Visual studio does not more override this logic

Differential Revision: https://code.wildfiregames.com/D1380
Reviewed by: @Itms
This was SVN commit r23314.
2019-12-31 13:58:48 +00:00
cc7071c691 Upgrade NVTT to version 2.1.1, fixes #4549.
Windows binaries built with toolset v140_xp.
Tested under Windows, Linux and macOS.
Includes a patch for building on musl Linux, contributed by voroskoi,
containing code by leper.
Use the opportunity to set native line endings in the NVTT bundle.

The NVTT DLL was the last one built with VS 2010, refs #5379, #5527.

Differential Revision: https://code.wildfiregames.com/D2475
This was SVN commit r23305.
2019-12-29 11:21:33 +00:00
dd1678287d Marks unused arguments in macOS implementation of try_gui_display_error
This was SVN commit r23275.
2019-12-21 14:31:47 +00:00
b276c9b76f Enable hardware S3TC on GLES too by using GL_EXT_texture_compression_s3tc
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2489
This was SVN commit r23274.
2019-12-21 12:12:38 +00:00
091f3167e0 Use raise() instead of kill() for debug_break()
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2480
This was SVN commit r23271.
2019-12-21 00:30:34 +00:00
4171d62d1b Workaround for L3 cache detection of Ryzen 3000
This code is planned to get refactored or removed anyway, so just do a
cheap workaround.

Reviewed by: Imarok
Fixes: #4360
Differential Revision: https://code.wildfiregames.com/D2353
This was SVN commit r23262.
2019-12-19 16:52:47 +00:00
b2665437fc Allow calling timer_DisplayClientTotals multiple times.
According to the `timer_DisplayClientTotals` comment 953d2621dd broke
correctness of `clients` after the function call.

Patch By: echotangoecho
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D812
This was SVN commit r23240.
2019-12-14 22:49:44 +00:00
5d2c20beb0 Replace boost::unordered_map, boost::unordered_set with std::unordered_map, std::unordered_set to establish consistency.
Replace boost::hash_combine with a lib/hash.h hash_combine performing
the same statement.
Replace inconspicuous global boost hash_value specializations with
std::hash specializations.
No performance difference was observed in three simple MeshManager
measurements.

Remove unused TAG_MASK and h_tag in h_mgr.cpp following 0748c5a75e.
Replace typedef with using keyword and sort header includes.

Differential Revision: https://code.wildfiregames.com/D2441
Tested on: clang  9.0.0, gcc 9.2.0, Jenkins/vs2015, Jenkins/gcc6

This was SVN commit r23191.
2019-11-25 14:30:25 +00:00
7790fd7d29 Removes duplication of Clamp function.
Reviewed By: wraitii
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D1763
This was SVN commit r23002.
2019-09-26 21:14:21 +00:00
61e3f1ec0d Fix hotkey events synching with hotkey state.
This is a semi-revert of 78bc56f33e and a correct fix for #3194.

The core issue is that the GUI handler must come behore the hotkey
handler, otherwise typing in boxes can set off hotkeys, and the hotkey
handler is repsonsible for updating the hotkey state.
Thus the GUI handler never has an up-to-date hotkey state, since that's
done later. 78bc56f33e fixed that by calling HotkeyInputHandler
manually, but that was still broken in some (unused) cases and was hacky
(indeed, it even looked hacky as noted by elexis).

The simplest fix is to split the 'hotkey creator' handler from the
'hotkey state change' handler, and run the 'hotkey state change handler'
before any other handler. Thus the gui handler remains in front of the
'hotkey creator' handler, but it has a correct hotkey state at any time.

Differential Revision: https://code.wildfiregames.com/D1839
This was SVN commit r22909.
2019-09-15 12:16:28 +00:00
1ff20e8f6a pthread -> std::thread (4/7) - Replace pthread in remaining files
This removes pthread mutexes/threads from:
- vfs
- the resource handler manager
- timer
- the network server.

This allows removing it from our general posix include header.

Differential Revision: https://code.wildfiregames.com/D1920
This was SVN commit r22666.
2019-08-15 09:07:16 +00:00
07dfacdc67 Fix build without precompiled headers in 107d3d461f.
Also remove an un-needed variable.

Patch by: elexis
This was SVN commit r22652.
2019-08-12 12:56:32 +00:00
107d3d461f pthread -> std::thread (3/7) - Replace pthread in other engine files
MapGenerator, TextureConverter, and some other files used pthread.

Differential Revision: https://code.wildfiregames.com/D1917
This was SVN commit r22649.
2019-08-12 08:16:28 +00:00
3028551b91 MOVABLE idiom, const CGUI struct maps, in place move construction instead of copying temporaries during CGUI XML loading and GenerateText.
Introduce MOVABLE idiom indicating that a class can use move semantics.
Make values of CGUI struct maps holding XML data const to ensure at the
root that the data is not modified.
Use NONCOPYABLE and MOVABLE for SGUIIcon and SGUIStyle to enforce the
non-copy policy on the compiler level (until someone changes the GUI
design to make modifications needed).

As indicated by that:
  Replace copy operations by in place move operations for these CGUI
struct maps in the CGUI Xeromyces XML loading functions.
  Replace copy operations by const references for CSize and SGUIIcon in
CGUIString::GenerateTextCall and CGUI::GenerateText.
  This avoids copying of non primitive members, such as the strings and
containers of strings.

Further related cleanup to be kept separated for auditability.

Differential Revision: https://code.wildfiregames.com/D2163
Few comments on IRC by: wraitii, Itms
Tested on: gcc 9, Jenkins, partially VS2015

Refs #1984,
  NONCOPYABLE CGUISpriteInstances: 0a7d0ecdde, 8f4f8e240f, c19f3608a5
  NONCOPYABLE Image, Sprite: fb8032043b
  NONCOPYABLE GUI page: 94c57085e9
  NONCOPYABLE GUIManager: 7c2e9027c2
  NONCOPYABLE macro: 16ccae10cd

This was SVN commit r22637.
2019-08-09 17:25:55 +00:00
d35f16e4f5 Remove unused texture test helper function obsolete since dee3cb84b5 and ef888367aa that throws a compiler warning with gcc 7 and beyond.
Refs #2456, #5294.
Differential Revision: https://code.wildfiregames.com/D2153
This was SVN commit r22621.
2019-08-06 21:00:36 +00:00
8d293db6eb Removes clipboard debug logging on X11, fixes #5535
This was SVN commit r22551.
2019-07-25 05:34:04 +00:00
13209c3183 Revert 09916ce6cb which broken jenkins build.
This was SVN commit r22519.
2019-07-20 13:10:53 +00:00
09916ce6cb Fix incorrect use of setlocale() in cppformat CStr tests following 61db02790c
Reported By: elexis
Differential Revision: https://code.wildfiregames.com/D2013
This was SVN commit r22518.
2019-07-20 12:57:03 +00:00
fc32e28c0a Fixes some ambiguous calls of abs().
Fixes #5515.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2091
This was SVN commit r22500.
2019-07-17 22:39:30 +00:00
8a32b0b3d4 Fix some gcc 8 and gcc 9 compiler warnings that were thrown 4500 times.
Refs #5294
Differential Revision: https://code.wildfiregames.com/D2055
Reviewed By: Vladislav
This was SVN commit r22443.
2019-07-09 00:18:48 +00:00
6cde90104a Update precompiled win32 libogg to 1.3.3 and libvorbis to 1.3.6, building them with VS2015, refs #5379.
Use the default naming for both libraries (libvorbis instead of vorbis),
and use our default suffix for debug versions of the libs.

This was SVN commit r22406.
2019-06-27 22:36:04 +00:00
70ccc3e5cb Adds Camera test for ortho projection.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1948
This was SVN commit r22340.
2019-06-05 19:55:37 +00:00
e2233a4a90 Don't clear pathnames in vfs::GetPathnames so it can be called several times.
Differential Revision: https://code.wildfiregames.com/D1914
This was SVN commit r22312.
2019-05-28 10:18:04 +00:00
65fcd66556 Update precompiled headers to improve build times.
Expect a 10-25% build time improvement.

Original Patch By: Angen
Reviewed By: Angen
References #5038

Differential Revision: https://code.wildfiregames.com/D1333
This was SVN commit r22303.
2019-05-26 07:21:12 +00:00
9ea68317ad Use pkg-config where possible instead of hard-coding or library-specific programs
Accepted by: Itms, wraitii
Previously tested by: andy5995
Fixes: #5157
Refs: D1582
Differential Revision: https://code.wildfiregames.com/D1611
This was SVN commit r22302.
2019-05-25 18:00:40 +00:00
734ea4fd6b Improve the error window on Windows by adding a link to https://trac.wildfiregames.com/wiki/GameDataPaths.
Patch By: Angen
Reviewed By: Itms, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1799
This was SVN commit r22157.
2019-04-04 20:30:52 +00:00
43a291a071 Simple refactoring of Singleton. Make it non-copyable.
Reviewed By: wraitii
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D1564
This was SVN commit r22050.
2019-01-13 15:11:40 +00:00
9536f0a5cc Do not actually Kill in debug_break() in non-debug binaries
Revelead by the A23 crash when hosting a game in the lobby. We have a
debug_break() call that calls "kill" with SIGTRAP, which generally
doesn't get handled correctly in release versions, particularly on OSX.

Differential Revision: https://code.wildfiregames.com/D1499
This was SVN commit r21998.
2019-01-01 16:06:20 +00:00
962815c898 Fix build without PCH for some targets.
Patch By: Angen
Reviewed By: vladislavbelov
Tested By: Stan, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1361
This was SVN commit r21964.
2018-12-28 14:58:35 +00:00
404e1a9a4a Add a mod installer, fixes #4027.
pyrogenesis can now take a zip file (rename it to .pyromod for direct
file association following 943a61e4ea) and install it. It then starts
the mod selector.

Patch by vladislavbelov, with contributions from Imarok, elexis and
myself.
Differential Revision: https://code.wildfiregames.com/D1142
This was SVN commit r21726.
2018-04-15 01:46:28 +00:00
cc67d54aeb Fix compiler warnings on VS 2015, refs #3439, refs #5069.
Patch By: Stan
Reviewed By: Itms, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1262
This was SVN commit r21480.
2018-03-10 09:58:53 +00:00
4fe59c141d Fix crash at start in snd_detect(), fixes #4786.
Reviewed By: s0600204, echotangoecho
Differential Revision: https://code.wildfiregames.com/D1254
This was SVN commit r21097.
2018-02-01 18:12:53 +00:00
89e339dd16 Remove VFS cache, because it is less effective and less efficient than the OS cache (and partially redundant with higher level application caches).
Patch By: Sandarac
Discussed with: Philip, echotangoecho, Bezerra
Fixes #4072.
Differential Revision: https://code.wildfiregames.com/D587
This was SVN commit r20639.
2017-12-10 17:33:03 +00:00
f22dfba717 Support Visual Studio 2015 (MSVC 14.0), fixes #3439.
VS 2013 stays the default Windows compiler, but support for it will be
dropped as soon as possible.
Tested By: Stan
This was SVN commit r20562.
2017-11-29 21:16:10 +00:00
d0ca03d7ba Fix OSX compilation
A check for OSX version that seemed useless broke compilation on Xcode
9.

Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D986
This was SVN commit r20530.
2017-11-26 16:50:21 +00:00
5c01b50ca4 Add FALLTHROUGH, which in the best case is just [[fallthrough]].
Note that this does not fix the warnings in AtlasObjectXML, someone
interested
in fixing those should check whether using ICU would be a nicer
solution.

Reviewed By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D740
This was SVN commit r20095.
2017-09-01 20:04:53 +00:00
9defd11440 Pass ScriptInterface as a const ref where possible.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D739
This was SVN commit r20028.
2017-08-24 00:32:42 +00:00
43137fef3f Make all Wildfire Games copyright headers consistent by always ending with a period and using (C) instead of (c).
Differential Revision: https://code.wildfiregames.com/D716
Refs 09e974e1cb
Reviewed By: bb
Change in agreement with leper.

This was SVN commit r19899.
2017-07-10 14:26:24 +00:00
9aad0137ba Stop using WMI for detecting the sound card, and use OpenAL instead. Delete WMI code altogether now it is unused.
This fixes #4561 and makes sound card detection work on non-Windows
platforms.

Reviewed By: echotangoecho
Tested By: Imarok, elexis
Differential Revision: https://code.wildfiregames.com/D636
This was SVN commit r19877.
2017-07-06 17:29:49 +00:00
47cc447322 Fix OsPath string8 function on Unix to account for characters that aren't covered by ISO-8859-1,
thus allow proper printing of such paths.

Fixes #4647
Refs #4320 D518
Patch By: Philip
Tested By: Imarok on Windows, wraitii on OSX
This was SVN commit r19823.
2017-06-25 14:30:26 +00:00
a7c09a500d That what leper said. Refs 9ff7ec3465, 31d1536e52.
This was SVN commit r19688.
2017-05-29 02:56:34 +00:00
d44a407fc4 That what mimo said.
This was SVN commit r19684.
2017-05-28 17:45:17 +00:00
9ff7ec3465 Scale the cursor according to the GUI scale (HiDPI support).
Differential Revision: https://code.wildfiregames.com/D320
Fixes #3875
Patch By: Dariost
Reviewed By: domdomegg
This was SVN commit r19667.
2017-05-27 09:24:04 +00:00
f0a008c821 Refactor NONCOPYABLE to remove unneeded semicolons. Remove visibility keywords that were hidden in the macro. Patch by echotangoecho.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D481
This was SVN commit r19626.
2017-05-21 13:11:07 +00:00
7c88529b45 Call std::terminate() instead of throwing in a destructor.
We don't catch this specific exception, so no behavioural change, but we
do no longer violate the implicit noexcept for destructors in C++11.
(Fixes a GCC6 and VS2015 warning.)

Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D416
This was SVN commit r19612.
2017-05-19 17:48:43 +00:00
51f7502bb1 Don't move temporaries, so possibly allowing for copy elision.
Pointed out by clang's -Wpessimizing-move.

Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D421
This was SVN commit r19559.
2017-05-11 23:24:54 +00:00
36a16a4576 Remove debug breakpoint that is triggered whenever an unsupported UTF32 character is encountered,
for example when someone would send a lobby chat message containing such
a character, it effectively ended the game of the recipients.

Differential Revision: https://code.wildfiregames.com/D456
Fixes #4433
Reviewed By: leper
Reported and tested by: Hannibal_Barca
This was SVN commit r19540.
2017-05-08 22:29:00 +00:00
c5ab9925d4 Fix possible null dereferences.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D420
This was SVN commit r19532.
2017-05-08 02:41:23 +00:00
09e974e1cb Bump year number of files changed this year in the license headers.
This was SVN commit r19503.
2017-05-01 14:28:22 +00:00
6ee830068a Print the name of OpenGL errors when they occur.
Patch by vladislavbelov
Differential Revision: https://code.wildfiregames.com/D313
This was SVN commit r19496.
2017-05-01 07:19:39 +00:00
584ccd690e Remove lib/pointer_typedefs.h. Patch by echotangoecho.
Reviewed By: Itms, leper
Differential Revision: https://code.wildfiregames.com/D83
This was SVN commit r19184.
2017-01-29 00:06:28 +00:00
8fec942e8a Fix Atlas under macOS Sierra.
We were polling SDL messages from two different threads (by mistake),
and Sierra now refuses to do that.
Tested by Stan, Itms, Fatherbushido, and discussed with Philip for the
code change itself.
Fixes #4408.
Differential Revision: https://code.wildfiregames.com/D42
This was SVN commit r19160.
2017-01-21 09:54:08 +00:00
4068f2e14a Fix warning with GCC in our lowlevel PNG texture code.
Ensure a variable is not clobbered by libpng's use of longjmp. Make code
more consistent.

Differential Revision: https://code.wildfiregames.com/D35
This was SVN commit r19111.
2017-01-04 21:05:08 +00:00
417c84870c Actually remove trailing tabs from source/.
This was SVN commit r18991.
2016-11-23 14:09:58 +00:00
6149dd3841 Actually remove trailing whitespace for non-header files as well.
This was SVN commit r18989.
2016-11-23 13:02:58 +00:00
944ba16eb4 End source files with a newline.
This was SVN commit r18988.
2016-11-23 11:27:54 +00:00
b18f74da44 Remove trailing whitespace and whitespace in empty lines of source/ except source/third_party/.
This was SVN commit r18987.
2016-11-23 11:18:37 +00:00
12ad190a51 Allow .Deleted to work on directories. Fixes #2641. Patch by leper.
This was SVN commit r18916.
2016-11-10 22:52:39 +00:00
b9a6d2af16 Use the debugger output on Windows for invalid parameter tests (see bd9bc6db78).
This way, the test output is not polluted by the error messages when
running in debug mode.

This was SVN commit r18608.
2016-08-15 12:15:19 +00:00
bcbf25bfbd Fix line endings of all files in source/ except source/third_party/.
This was SVN commit r18558.
2016-07-25 09:07:45 +00:00
f4e69b7c07 Cleanup of #3255, fixes #3966.
Don't create an empty oos_logs directory when starting the game.
Rename getDateIndexSubdirectory to createDateIndexSubdirectory.
Add a comment for the breakpoint argument of CreateDirectories.

This was SVN commit r18183.
2016-05-16 00:56:07 +00:00
c9cecab0be Remove libjpeg. Fixes #2828.
Based on patch by dalerank, tested on Windows, might need to be amended
for OSX.

This was SVN commit r17870.
2016-03-12 18:15:04 +00:00
a32ed75bff Fix a race-condition when two games have been started simultaneously and attempt to create the same replay directory, refs #3255.
Instead of triggering a debug-breakpoint, print a warning to stdout and
succeed in the N'th retry when having started N processes
simultaneously.
Previously the problem had been addressed by using the processID in the
directory name.

This was SVN commit r17776.
2016-02-19 11:22:32 +00:00
48ba4d9cb4 Updates precompiled win32 SDL libs to 2.0.4 from libsdl.org.
Fixes windows build with SDL 2.0.4, fixes #3138, #3225

This was SVN commit r17658.
2016-01-17 23:11:37 +00:00
c33d1e3741 Remove commented out code and comments invalid since 9542ecdd7e.
This was SVN commit r17647.
2016-01-13 22:39:09 +00:00
89aef0b6eb Cinematic camera core functionality. Patch by Vladislav Belov.
Based on existing code that was still around from an old(not working)
implementation.
Supports basic control from trigger scirpts (queue, start and stop
camera paths) and works in multiplayer.

This was SVN commit r17594.
2016-01-03 12:41:04 +00:00
9a2d0f803e Remove disabled by default SDL1 support.
Refs #2041.

This was SVN commit r17470.
2015-12-14 10:52:21 +00:00
5b2738b0cb Doubles size of sound card string buffers, for users with many sound devices present. Fixes #3660
This was SVN commit r17365.
2015-12-02 22:41:17 +00:00
6f09803e8c TerrainTextureManager file loading rewrite. Fixes #3358.
Add directory callback to vfs::ForEachFile.
Each terrain directory should now have a terrains.xml file,
as using the previous terrains.xml file is unlikely to be what was
intended.

This was SVN commit r17341.
2015-11-30 20:12:12 +00:00
c0b4e78801 Fixes stream serialization bug on OS X 10.8 and older, which caused instant OOS in multiplayer games, fixes #3108.
Fixes test failures on OS X 10.7 and older, refs #3109

This was SVN commit r17133.
2015-10-15 03:31:30 +00:00
36c6b50944 Revert emplace for associative containers. Fixes #3366.
GCC < 4.8.0 does not support emplace for those.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44436.

This was SVN commit r16922.
2015-08-19 03:32:47 +00:00
674f49f1a8 Remove generated test files during clean-workspaces.sh. Patch by otero. Fixes #3275.
Also remove two generated and disabled test files.

This was SVN commit r16921.
2015-08-19 01:30:09 +00:00
217a500d60 Add missing license headers. Fixes #3357.
This was SVN commit r16903.
2015-07-31 11:28:14 +00:00
c5aad60776 Actually stop iterating if retval != INFO::OK. Also fix comments.
This was SVN commit r16900.
2015-07-30 21:50:58 +00:00
15a4c813d6 Add support for AArch64 (ARM64). Patch by tbm. Fixes #3345.
This was SVN commit r16899.
2015-07-30 19:52:55 +00:00
8bfe16cac8 Use in-place construction.
This was SVN commit r16894.
2015-07-29 23:44:17 +00:00
bd53e9d736 Remove unused ah_translate code.
This was SVN commit r16881.
2015-07-27 01:08:15 +00:00
caa8f51c2e Annotate custom assert for clang-analyzer.
This was SVN commit r16800.
2015-06-21 18:46:23 +00:00
e5727980da Adds debug output to display return code of failing SHGetFolderPathW, refs #3267
This was SVN commit r16688.
2015-05-27 02:02:32 +00:00
487d6a1afc When using SDL2 recommend a >= 2.0.2 version to avoid incurring in possible bugs with older versions.
This was SVN commit r16585.
2015-04-27 07:56:34 +00:00
b6bcfdbb2e Fixes missing newlines in debug_printf, patch by elexis, fixes #3056
This was SVN commit r16534.
2015-04-12 19:38:31 +00:00
cf527707da Revert "Improve ARRAY_SIZE." (7afaacda19).
constexpr and noexcept are only supported by VS November 2013 CTP.

This was SVN commit r16508.
2015-04-06 21:24:53 +00:00
7afaacda19 Improve ARRAY_SIZE.
This was SVN commit r16499.
2015-04-05 16:50:26 +00:00
89107d1406 Fixes grayscale PNG handling, there is no need to convert them all to RGB and 4741e896c4 broke special font texture handling. Instead, only grayscale with alpha PNGs will be converted to RGBA (they fail to load otherwise).
Removes warning about converting grayscale textures, refs #1640.

This was SVN commit r16449.
2015-03-19 03:04:01 +00:00
4741e896c4 Improves handling of PNG textures based on GdkPixbuf's setup_png_transformations. The PNG decoder should now support grayscale, RGB or indexed color; bit depth up to 16; and interlacing. Fixes #1640, refs #2823, #3082
This was SVN commit r16439.
2015-03-16 02:28:00 +00:00
b1c4e29ac8 Fixes inconsistencies in spelling of colour/color by preferring "color" (only wxWidgets remains with some API that requires "colour"), fixes #1029.
NOTE: requires update-workspaces and may require correction of some
modded actors/scenarios

This was SVN commit r16438.
2015-03-15 23:59:48 +00:00
e41ec77eb6 Remove unused file.
This was SVN commit r16417.
2015-03-15 04:16:31 +00:00
7fe9eb956f Fixes error in SMBIOS::InitStructures by not warning on invalid header size, fixes #2985
This was SVN commit r16374.
2015-02-22 00:42:11 +00:00
e48e330db7 Sets SDL2 as default and only build option on Windows.
Removes remnants of WSDL. Refs #2041

This was SVN commit r16357.
2015-02-20 05:52:18 +00:00
a5e940430f Suppresses libpng warning "iCCP: known incorrect sRGB profile" by manually handling warning messages (errors still use default handler), fixes #2184
This was SVN commit r16350.
2015-02-17 10:50:19 +00:00
49222a4c6a Fix Windows build
This was SVN commit r16334.
2015-02-14 02:22:22 +00:00
e06a7b37d8 Convert debug_printf to take UTF-8 strings instead of wchar_t.
This fixes the problem where passing a non-ASCII string to
debug_printf(L"%hs", s) caused vswprintf_s to fail on Linux (because it
doesn't know what encoding the char* is meant to have). Now debug
messages will remain as UTF-8 until they reach the OS.

Fixes #3021.

This was SVN commit r16332.
2015-02-14 01:45:13 +00:00
4473ed5c88 glext_funcs: Support glMapBuffer, glMapBufferRange
This was SVN commit r16231.
2015-01-25 16:36:23 +00:00
4c1903500b Switch to std::shared_ptr and std::weak_ptr.
This was SVN commit r16227.
2015-01-25 03:10:58 +00:00
0843100d11 Remove partial emulation of some C++11 features for older compilers.
This was SVN commit r16226.
2015-01-24 20:37:18 +00:00
0261d12727 Remove some checks for usupported VS versions (<2013).
This was SVN commit r16225.
2015-01-24 20:37:16 +00:00
fc902df07c Remove checks for unsupported GCC versions (<4.6).
This was SVN commit r16224.
2015-01-24 20:37:07 +00:00
67956f969e Make ARRAY_SIZE(pointer) complain in GCC, not just in MSVC.
The ArraySizeDeducer trick has worked since at least GCC 4.4, so it's
fine to rely on it now.

This was SVN commit r16218.
2015-01-24 17:35:25 +00:00
de25e536c3 Update NONCOPYABLE to use C++11 "=delete".
This gives slightly better error messages.

This was SVN commit r16217.
2015-01-24 17:33:49 +00:00
3ce38e536e Update cassert to use C++11 static_assert.
This gives clearer error messages, and simplifies the code.

This was SVN commit r16216.
2015-01-24 17:29:19 +00:00
8f0ace2658 Make Android %ls/%hs workaround work on secure_crt as well as wsecure_crt.
Refs #2996.

This was SVN commit r16210.
2015-01-24 00:22:12 +00:00
4d4ddb5978 Add workaround for Android libc++ swprintf bug.
Based on patch by BogDan. Refs #2996.

This was SVN commit r16209.
2015-01-24 00:20:15 +00:00