1
0
forked from 0ad/0ad
Commit Graph

6032 Commits

Author SHA1 Message Date
0868d03e74 Fix previous commit.
This was SVN commit r16898.
2015-07-30 17:27:27 +00:00
2238a18aee Close and free replay streams. Based on patch by elexis.
This was SVN commit r16897.
2015-07-30 16:43:22 +00:00
47336b770f Add clipping to OList cells. Patch by elexis. Fixes #3353.
This was SVN commit r16895.
2015-07-30 01:33:48 +00:00
8bfe16cac8 Use in-place construction.
This was SVN commit r16894.
2015-07-29 23:44:17 +00:00
c5eb9b7bb7 Range-based for for VfsPath loops.
This was SVN commit r16893.
2015-07-29 23:44:12 +00:00
540cf75794 L10n code cleanup.
This was SVN commit r16892.
2015-07-29 23:44:05 +00:00
a07add11c6 Some range-based for loops and some style cleanup.
This was SVN commit r16888.
2015-07-29 01:07:23 +00:00
b4d517c261 Fix infinite loop in key code to key name mapping.
Also make some data const and construct data in-place.

This was SVN commit r16887.
2015-07-29 01:07:18 +00:00
851e863892 Remove animation name compatibility mapping.
10 years should have given everyone enough time to move to the new
naming scheme.

This was SVN commit r16884.
2015-07-27 01:08:29 +00:00
da48c8c26f Some const refs and one const function.
This was SVN commit r16882.
2015-07-27 01:08:25 +00:00
bd53e9d736 Remove unused ah_translate code.
This was SVN commit r16881.
2015-07-27 01:08:15 +00:00
f240374b28 Fix a number of short/long range pathfinder inconsistencies revealed by 128a603287.
This was SVN commit r16869.
2015-07-18 12:33:40 +00:00
128a603287 Use the terrain-only grid for terrain edges in the short pathfinder algorithm. This grid is updated on each terrain change, whereas the passability grid is updated once a turn. This caused OOS on rejoin, fixes #3292.
However, using the terrain-only grid reveals one discrepancy between the
short pathfinder (which uses unit radii) and the long one (which uses
unit clearances). So I implemented the change proposed by sanderd17 in
#3294, which is removing unit radius and using only the pathfinder
clearance. Refs #3294
Now some tweaking has to be done in the templates, so that units get a
passability class suited to their apparent size. In the meantime the
unit motion is quite bugged.

This was SVN commit r16867.
2015-07-18 08:37:49 +00:00
8fc4ecaa6b Fix previous commit, stupid typo...
This was SVN commit r16859.
2015-07-15 16:57:23 +00:00
b58f8ab969 Serialize the activation flag of the scripted Visibility component.
Currently only preview entities are affected, and they are not
serialized, but it could break a lot of things in the future.

This was SVN commit r16858.
2015-07-15 16:55:05 +00:00
39d93ea17c Change the handling of modified entities in the visibility update.
The game has to deal with situations such as: the visibility of an
entity changes, a mirage is created for it -> the mirage visibility is
updated -> the entity visibility is updated back.
All of this process now happens in the same turn, and all updates are
guaranteed to be performed. This fixes a source of serialization errors
and rejoin OOSes.

Fixes #3107

This was SVN commit r16857.
2015-07-15 16:46:59 +00:00
9f1b85d562 Remove a useless global terrain update when modifying environment settings in Atlas.
Also make sure that the settings are updated in the game view in a
non-hacky way.

This was SVN commit r16855.
2015-07-14 17:08:02 +00:00
04982b0bf5 Fix compiler warning
This was SVN commit r16849.
2015-07-12 16:49:26 +00:00
edf6e909b2 ...aaaaand I forgot this guy.
This was SVN commit r16846.
2015-07-12 08:11:30 +00:00
0d32afd688 Improve the style of GUI string text call functions.
This was SVN commit r16845.
2015-07-12 08:09:55 +00:00
0682190def Don't postpone rendering of icons when they are at the end of a GUI string.
Fixes #2502

This was SVN commit r16844.
2015-07-12 07:38:04 +00:00
0c45e3b5d0 Correctly compute the masks for shared visibility updates. The old code was working only because of luck when shared vision was always reciprocal.
Refs #2055, fixes #3327

This was SVN commit r16842.
2015-07-11 16:45:09 +00:00
aa78c1be66 Make the connectivity grid generation algorithm of the hierarchical pathfinder a bit less stupid.
This was SVN commit r16834.
2015-07-05 20:32:52 +00:00
11c9471ad6 Change back the long pathfinder to take into account non-pathfinding classes, but only when reloading, to avoid impacting the performance.
Also make the GetPassabilityClasses functions use references instead of
wild allocations. Use a reference when passing pass classes to the AI
worker.

This was SVN commit r16833.
2015-07-05 19:14:52 +00:00
0e4e3754e9 Update the passability grid properly when changing the map shape or the water height. Also include a fix for a possible bad memory access.
This was SVN commit r16832.
2015-07-04 21:25:57 +00:00
3018359576 Improve a little bit Atlas performance when modifying terrain elevation.
This was SVN commit r16827.
2015-07-01 19:13:56 +00:00
30e5f032d8 Adapt Atlas to the new pathfinder. Fixes #3298
This was SVN commit r16824.
2015-06-29 19:59:41 +00:00
e1a34eb4ea Handle (de)serialization of the AI pathfinder.
This was SVN commit r16815.
2015-06-24 20:24:58 +00:00
0b7343dccc Preserve the dirtiness informations of the passability grid at deserialization for proper AI updates.
Refs #3310

This was SVN commit r16814.
2015-06-24 20:15:06 +00:00
152d39d8a6 Fix save/load games, and use the new code to enhance the tests.
This was SVN commit r16812.
2015-06-23 20:39:11 +00:00
1793a96c14 Actually remove the unused expression.
This was SVN commit r16805.
2015-06-21 20:44:31 +00:00
495aa7bec5 Expose TemplateExists() to RM scripts.
This was SVN commit r16804.
2015-06-21 20:22:34 +00:00
c5814ef76c Fixes tests adding system components without using the SYSTEM_ENTITY id - this caused assertion failures in debug builds
This was SVN commit r16803.
2015-06-21 19:22:12 +00:00
ae4dfe294d Actually state the file instead of the directory in some error messages.
This was SVN commit r16802.
2015-06-21 18:46:33 +00:00
5a0b9b0e70 Fix some issues found by static analysis (clang-analyzer and cppcheck).
This was SVN commit r16801.
2015-06-21 18:46:31 +00:00
caa8f51c2e Annotate custom assert for clang-analyzer.
This was SVN commit r16800.
2015-06-21 18:46:23 +00:00
bbafed7fbf Lobby code cleanup.
This was SVN commit r16796.
2015-06-19 17:25:28 +00:00
1830c6346b Revert most of 989f164500, and add a comment to prevent people from making the same mistake.
This code used to make units with the pass class "ship-small" blocked
nearly everywhere.

This was SVN commit r16794.
2015-06-18 19:54:30 +00:00
c6ca83949c Prevent players from rejoining that were not present on game start. Patch by elexis. Fixes #3305.
This was SVN commit r16792.
2015-06-18 18:20:54 +00:00
9701a85554 Fix a possible problem with grid updates. Refs #3296.
This was SVN commit r16791.
2015-06-18 16:31:38 +00:00
e7707f0f0c Fix issue with OOS in replays. Patch by elexis
This was SVN commit r16790.
2015-06-18 15:29:03 +00:00
989f164500 Make the terrain analysis slightly more efficient for pathfinding passability classes, and fix a mistake introduced in 1709353e2c.
This was SVN commit r16787.
2015-06-17 20:48:41 +00:00
155c6e6ccd Properly initialize the AI pathfinder, and clean whitespace.
This was SVN commit r16786.
2015-06-17 20:35:23 +00:00
1709353e2c Changes the general behavior of non-pathfinding passability classes, in order to make the handling of foundation obstructions less difficult. This will allow the AI to be fixed, as reported in #3295.
Also some cleanup and comments updates.

Refs #3295.

This was SVN commit r16784.
2015-06-17 20:19:53 +00:00
b8fce56821 Implement sortable columns for the gui, and use them in the lobby. Patch by Vladislav. Fixes #2405.
This was SVN commit r16781.
2015-06-17 09:10:50 +00:00
c8a5708654 Fix tests.
This was SVN commit r16777.
2015-06-15 19:48:42 +00:00
8380b67f94 Move GUI schemas to the mod mod. Fix some validation related errors in the mod mod.
Check if the used directory exists before trying to add a validator.
Refs #245.

This was SVN commit r16773.
2015-06-15 16:00:26 +00:00
68ea5f37f4 Remove unused ctors. Fixes compilation with GCC 4.6.
This was SVN commit r16771.
2015-06-14 23:50:38 +00:00
4af117434d Fixes clang unused parameter warning
This was SVN commit r16770.
2015-06-14 23:45:15 +00:00
25a7d79d1e FIXE ERROR: CCmpPosition::GetPosition called on entity when IsInWorld is false, when you save a map with garrisoned units, thx to daniel for report
This was SVN commit r16769.
2015-06-14 22:17:39 +00:00
0a67de37bc Fixes clang warning about unknown warning group -Wunused-but-set-variable
This was SVN commit r16768.
2015-06-14 21:07:42 +00:00
473b282265 Refactor the grid update code. Should give a significant performance boost to the simulation update.
Also fixes some bad code that could lead to hidden bugs.

Fixes #3296, thanks elexis for testing ;)

This was SVN commit r16764.
2015-06-14 19:22:07 +00:00
0e7f0f861b Fixes A19 map converter script to be compatible with Python 2 (uses struct instead of to_bytes and from_bytes)
This was SVN commit r16763.
2015-06-14 17:53:12 +00:00
d676b047a0 Move ~LongPathfinder after the declaration of LongOverlay.
Also improve the style.

This was SVN commit r16762.
2015-06-13 21:02:01 +00:00
30efa73a38 FIX error: comparison between pointer and integer ('IReplayLogger *' and 'int') introduced in [16727] over osx
This was SVN commit r16754.
2015-06-13 02:42:21 +00:00
6581796103 New long-range pathfinder.
Based on Philip's work located at
http://git.wildfiregames.com/gitweb/?p=0ad.git;a=shortlog;h=refs/heads/projects/philip/pathfinder
Includes code by wraitii, sanderd17 and kanetaka.

An updated version of docs/pathfinder.pdf describing the changes in
detail will be committed ASAP.

Running update-workspaces is needed after this change.

Fixes #1756.
Fixes #930, #1259, #2908, #2960, #3097
Refs #1200, #1914, #1942, #2568, #2132, #2563

This was SVN commit r16751.
2015-06-12 18:58:24 +00:00
fd3d697edf Make it easier to add different backgrounds
This was SVN commit r16747.
2015-06-11 09:08:46 +00:00
7cac7cd65e Add RNC to RNG conversion script that uses trang. Fixes #245.
Also fix the material.rnc.

This was SVN commit r16734.
2015-06-07 23:52:52 +00:00
a18fbd12ec XML validation. Based on patch by historic_bruno. Refs #245.
This was SVN commit r16733.
2015-06-07 21:56:52 +00:00
2457b69fb3 Fix const attribute for some function parameters.
This was SVN commit r16730.
2015-06-07 09:24:19 +00:00
be93b31411 Visual replay of command files, patch by elexis.
Works with the command line argument
"-replay-visual=/path/to/commands.txt". It is not integrated to the main
menu GUI yet.

Refs #9.

This was SVN commit r16727.
2015-06-06 08:45:49 +00:00
14bfbbf9d4 Allow sprites to have color multiplication, which allows player-colored bars. Patch by Vladislav. Fixes #3233
This was SVN commit r16715.
2015-06-04 12:16:52 +00:00
f6f4f83784 Fixes instant multiplayer crash on OS X Lion (10.7). libc++ had a bug where it set eofbit on reading the last character in a stringstream, we compare gcount with the expected length as a workaround to detect real eofs. Fixes #3109.
This was SVN commit r16714.
2015-06-04 05:11:47 +00:00
6506bc20cb Fixes #3238, SetGlobal 'TriggerHelper' called multiple times
This was SVN commit r16713.
2015-06-03 20:34:59 +00:00
2092ed4396 Removes use of 'register' storage class, deprecated in C++11. Fixes -Wdeprecated-register build warnings in clang, fixes #3068.
This was SVN commit r16708.
2015-06-02 03:20:04 +00:00
c3b8923ff7 Update tinygettext.
Updates tinygettext to upstream commit
0e34a55e514763a48f8abe7812405ffe722a31f4.
No actual code changes from the previously bundled version, but it was
relicensed to zlib.
Keeps the addition of precompiled.h and win32 dirent.

This was SVN commit r16705.
2015-06-01 01:09:19 +00:00
f71be3c764 Use iterators for XMBAttributeList and XMBElementList. Fixes #3269.
This was SVN commit r16704.
2015-06-01 00:29:35 +00:00
d3da00dc99 Fix some issues found by static analysis.
Actually abort in case of recursive includes again. Refs #2622.

This was SVN commit r16703.
2015-06-01 00:29:23 +00:00
b738772d65 Fix typo
This was SVN commit r16696.
2015-05-29 19:51:48 +00:00
e68ef21334 Don't decay when connected to connected allied territory, and also allow the decay script to determine which parts of the territory should blink
This was SVN commit r16692.
2015-05-29 07:02:16 +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
e638af5422 Clean up some unused variables and assignments.
This was SVN commit r16684.
2015-05-26 15:40:07 +00:00
4ccc9130ba Add missing include.
This was SVN commit r16683.
2015-05-26 15:40:04 +00:00
60f784900a Fix the territory influence weight to fit into an u16 number. (no idea why the buildings have so many different weights though).
This was SVN commit r16682.
2015-05-26 14:25:23 +00:00
0054486dba Implement methods to find the neighbour of a certain territory, and use it for territory decay. Fixes #3204
This was SVN commit r16676.
2015-05-25 14:17:45 +00:00
c93c1c92eb Replace std::auto_ptr uses by std::unique_ptr since the former is deprecated.
This was SVN commit r16674.
2015-05-25 01:23:27 +00:00
8b4b8431e3 Small cleanup, based on a change from one of Philip's old patches
This was SVN commit r16653.
2015-05-16 09:39:27 +00:00
a39aa76e62 These temporary roots aren't needed anymore with SpiderMonkey 31
This was SVN commit r16647.
2015-05-10 09:01:39 +00:00
399daeddbf prevent loading of templates in AIManager when no AIs, fixes #3101
This was SVN commit r16633.
2015-05-07 19:09:39 +00:00
8e44687ae3 Properly fix #3223.
The previous commit destroyed the context while it was still in use.

This was SVN commit r16631.
2015-05-06 20:28:28 +00:00
642500b49e Make the Ptolemaic lighthouse reveal the shore on the entire map.
Fixes #3174

This was SVN commit r16628.
2015-05-06 18:47:02 +00:00
4db041e3c6 Stop leaking g_ScriptStatsTable in replay mode. Fixes #3223.
This was SVN commit r16627.
2015-05-05 22:34:41 +00:00
7f606250f8 Fix build failure on GCC 4.6.
This was SVN commit r16623.
2015-05-04 19:37:25 +00:00
b8a20c958c Do not serialize properties for Sets. Serialization tests for Map and Set.
This was SVN commit r16620.
2015-05-04 01:41:09 +00:00
0a44d24c96 Flip the overlay sprites face around to show the non-mirrored side. Now sprites are rendered correctly (which should have happened in d4794b5474).
This was SVN commit r16617.
2015-05-03 15:55:17 +00:00
7a70c475df Improve rejoin messages. Patch by elexis. Fixes #1949.
This was SVN commit r16614.
2015-05-03 02:06:17 +00:00
a9afa61a7b Serialization support for ES6 Sets.
This was SVN commit r16608.
2015-05-01 23:04:28 +00:00
e758701da5 Include missing header.
This was SVN commit r16595.
2015-04-29 15:54:08 +00:00
7d953ff0a7 Fix compiler warning.
This was SVN commit r16594.
2015-04-29 00:07:48 +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
bda45f6526 Clarify the XpartaMuPP readme. Fixes #3163.
Also converts it to markdown.

This was SVN commit r16567.
2015-04-22 23:43:59 +00:00
535d612e06 Small fixes.
This was SVN commit r16552.
2015-04-20 14:51:06 +00:00
a0cf780e1e Amend 5c84c3e9e5
This was SVN commit r16547.
2015-04-16 13:17:58 +00:00
2042e6b2d4 Added TriggerScripts Reload(Hotloading) when you change the file and save
This was SVN commit r16546.
2015-04-16 04:30:51 +00:00
5c84c3e9e5 Some entities (like birds) can have negative positions without being marked as out-of-world.
Refs #2430

This was SVN commit r16544.
2015-04-15 12:19:47 +00:00
120ff2c60c Fix the structure tree a second time, this should also work on Windows.
This was SVN commit r16542.
2015-04-15 09:10:05 +00:00
6aa99d762f Add a new spatial subdivision, based on an old patch by wraitii.
This subdivision is faster but less precise, so range queries get more
entities and are a bit slower (up to 1ms approx.), but the overall gain
on a simulation update is always positive and can reach 10ms per frame.

For now, this new subdivision is only used by the range manager,
integrating it in the obstruction manager might be sensible.

Refs #2430

This was SVN commit r16540.
2015-04-14 21:33:43 +00:00
a980d8fdfc Fix structure tree by allowing undefined templates in the productionqueue
This was SVN commit r16537.
2015-04-14 18:45:02 +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
01673b4c58 Add the -ooslog support for replays. Refs #3169, see also a7b18d02bf.
This was SVN commit r16531.
2015-04-11 18:12:35 +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
f2c76cc75d Fix a number of issues related to historical messages and initial join in the multiplayer lobby. Fixes #3156
This was SVN commit r16507.
2015-04-06 19:33:37 +00:00
7afaacda19 Improve ARRAY_SIZE.
This was SVN commit r16499.
2015-04-05 16:50:26 +00:00
a6a2914882 Fix error when you paste entities over another entity and you try to rotate at the same time while pressing alt/shift key
This was SVN commit r16497.
2015-04-04 21:45:11 +00:00
0e2c30c7d2 Reduce the strength of the elevation brushes in Atlas.
This was SVN commit r16488.
2015-04-02 13:43:47 +00:00
4e763ef26e Move civ JSON files to simulation/data. Patch by MattDoerksen. Fixes #2562.
This was SVN commit r16485.
2015-04-01 23:48:33 +00:00
41863d6ae2 Explicitly cast to unsigned to fix a warning.
This was SVN commit r16483.
2015-04-01 23:48:23 +00:00
96410ee9a4 Fix heightmap rectangle. Take the water plain height as the base plane, instead of a hardcoded value.
This was SVN commit r16482.
2015-04-01 14:17:18 +00:00
ebb57aa516 Fix tests by enlarging the precision bumped in 7ed45213a9
This was SVN commit r16479.
2015-03-31 16:56:09 +00:00
7ed45213a9 Allow heightmaps to be 8 times as high by lessening precisions. Includes conversion script and modified standard maps. Bump the map version number. Fixes #3112
This was SVN commit r16478.
2015-03-31 16:48:31 +00:00
c73c9370ee Update tinygettext. Fixes #2522.
Updates to upstream changeset f71a8e5e84bffadd61ac93768b332262989844fd,
with some additions
that will be submitted upstream (without the addition of precompiled.h
and win32 dirent).

This was SVN commit r16462.
2015-03-24 17:47:08 +00:00
dec4552ffe Removes special handling of fullscreen toggle on OS X w/ SDL 1.2, which is no longer used
This was SVN commit r16453.
2015-03-21 21:01:01 +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
99cb4b42fd Deletes old autobuilder files.
Deletes old dds_analyse.pl script.
Updates tools LICENSE.txt

This was SVN commit r16435.
2015-03-15 22:18:02 +00:00
333c4401b9 Deletes obsolete entity converter tool.
Deletes unmaintained contributors.txt list, see forum topic for more
useful list: http://wildfiregames.com/forum/index.php?showtopic=15542

This was SVN commit r16434.
2015-03-15 21:38:43 +00:00
caf89fa04e Rename ps/Overlay(.h|.cpp) to ps/Shapes(.h|.cpp), fixes a TODO located in graphics/Overlay.h.
The file name did not match the content.

Also little cleanup of some unnecessary includes.

This was SVN commit r16431.
2015-03-15 18:06:32 +00:00
618fe81814 Check when loading an actor that it defines all the texture samplers required by its material. Print out a readable error otherwise. Fixes #1613 (note that this does not check for unnecessary samplers as that is non-trivial and does not lead to graphical glitches).
Also add a shortcut for some defines to clean-up material files slightly
and make the link between sampler and shader more explicit.

This was SVN commit r16427.
2015-03-15 11:37:26 +00:00
e41ec77eb6 Remove unused file.
This was SVN commit r16417.
2015-03-15 04:16:31 +00:00
3c093ef741 Update lobby room.
This was SVN commit r16412.
2015-03-15 04:15:45 +00:00
2b5de1df93 Do not send VisionRangeChanged messages when deserializing. Fixes #3075.
This was SVN commit r16401.
2015-03-03 01:59:42 +00:00
a5db659ce4 Update translations to be included in the release.
This was SVN commit r16399.
2015-03-02 00:10:00 +00:00
607bbcc2f1 Fixes invisible particles (clouds, dust storms) due to incorrect bounds calculations on the emitters, fixes #2643.
Makes the emitters a little more efficient by only setting
position/rotation when their transform changes.

This was SVN commit r16397.
2015-03-01 23:58:53 +00:00
aab15123f1 I hate myself.
This was SVN commit r16389.
2015-02-28 14:11:21 +00:00
2d7d5b446d Fix Atlas so that changing water type will actually change water type.
Fix the water shader so that object reflections are more visible. Looks
better.

This was SVN commit r16388.
2015-02-28 13:50:52 +00:00
7ce48dda69 Adds macmouse config option, this enables SDL2's Ctrl+Click emulation of right-clicking on OS X. NOTE: enabling this option will affect game hotkeys (e.g. garrisoning), so they should be reassigned to something like Super in that case
This was SVN commit r16380.
2015-02-22 21:24:27 +00:00
1ac24adde2 Disables some SpiderMonkey-related build warnings with clang
This was SVN commit r16379.
2015-02-22 21:15:47 +00:00
8bf1fe1437 Disables water in actor viewer, as a temporary workaround for the "red water" bug, see #2692 for proper fix
This was SVN commit r16378.
2015-02-22 19:49:06 +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
21f3be7df5 Always select a texture unit before calling glEnable(GL_TEXTURE_2D).
Without this, some code will enable (and set other parameters for)
whatever random texture unit the previous stage had selected. This can
break any fixed-function rendering, since either it will not have
enabled the correct texture unit, or its correct setup will be
interfered with by another texture unit that shouldn't be enabled. (This
doesn't affect ARB/GLSL shader rendering, since they don't care about
the enabled state, but the GUI (and some debug things) are still FFP in
the default ARB mode.)

Fixes #2833 (in which the fancy water shader selected texture units 5/6,
which then got enabled, and remained enabled forever).

This was SVN commit r16372.
2015-02-21 21:40:10 +00:00
f8ff206169 Recreate some tech modified values upon deserialization. Fixes #3055.
Also check for some possible null pointers.

This was SVN commit r16364.
2015-02-21 01:41:24 +00:00
0da0b062e1 Return the correct projectile id to fix serialization test failure.
This was SVN commit r16363.
2015-02-21 01:41:09 +00:00
00da480b83 Trigger a global visibility update after shared LoS changes. Fixes the entities of new mutual allies not visible.
Also add some player-dependent logic to avoid performance bottlenecks.

This was SVN commit r16359.
2015-02-20 14:35:19 +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
d644845ae5 Fixes Atlas on Linux with SDL2 by reordering OpenGL init, based on patch by yashi, fixes #2847
This was SVN commit r16356.
2015-02-20 05:46:24 +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
70219ab61f Fixes GLSL terrain decal flicker by initializing normal vectors, fixes #2064
This was SVN commit r16349.
2015-02-17 08:13:24 +00:00
ba210c4d59 Fix c229b46ac2.
This was SVN commit r16343.
2015-02-16 14:38:13 +00:00
c229b46ac2 Move visibility component activation check to C++. Patch by Itms.
This improves performance quite a lot because it avoids a huge number of
calls from C++ to JS. Check the ticket for performance measurements.
Refs #2913

This was SVN commit r16337.
2015-02-14 17:13:50 +00:00
49222a4c6a Fix Windows build
This was SVN commit r16334.
2015-02-14 02:22:22 +00:00
bb9de80dd4 Convert CConsole to take UTF-8 strings.
This avoids vswprintf failures when printing non-ASCII char* strings
from CLogger into the console.

Also convert ScriptInterface::ToString to return UTF-8, to avoid some
utf8_from_wstring calls.

Also remove some unused and redundant CConsole functions.

This was SVN commit r16333.
2015-02-14 01:49:34 +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
682a944d7e Little code tweak without performance impact
This was SVN commit r16329.
2015-02-12 23:24:48 +00:00
bd7b07cc80 Make the visibility cache a bit more clever, by making LoS tiles as dirty separately for each player.
It is necessary to rely on shared los masks, else some visibility
updates will be missing.

Refs #2913, see this ticket for a performance graph.

This was SVN commit r16328.
2015-02-12 23:22:29 +00:00
c049b0ae27 Treat \t as whitespace in config files. Fixes #3050.
This was SVN commit r16326.
2015-02-12 17:31:10 +00:00
1e54289aa8 Only check binaries/data for po/pot files.
This was SVN commit r16324.
2015-02-12 00:25:47 +00:00
143e199d45 Add a new function to update the water renderer textures when resizing the renderer window. Patch by pendingchaos.
This fixes #2692 though the same issue might appear in some other cases
(possibly Atlas) and those will have to be checked.

This was SVN commit r16315.
2015-02-10 19:41:29 +00:00
bb99c42aa5 Increase max VBO size back to 4MB.
Some meshes (e.g. pers_gardens_struct with gentangents enabled) have
>32K vertexes, and won't fit in a 2MB VBO. 0ef6c7555e had reduced them
from 4MB to 2MB. So just make the VBOs bigger again, and try not to
worry about the waste of memory.

Fixes #3026, #3042.

This was SVN commit r16309.
2015-02-08 23:39:02 +00:00
f9c95b6953 Do not send gaia stats for rated games.
This was SVN commit r16292.
2015-02-08 01:59:02 +00:00
5e7b55996c Fixes build with libmozjs-31-dev package from Ubuntu PPA. Fixes #3039.
This was SVN commit r16283.
2015-02-07 18:28:44 +00:00
da0f33f137 Reduce drastically the number of mirages by making fogging conditional: entities will be miraged only if their health/resource amount is modified, or if they have a non-gaia owner.
Fixes the animals hidden in the FoW, and adds the missing status bars
for mirages.

Also small cleanup of the code.

Refs #2913

This was SVN commit r16281.
2015-02-07 15:48:32 +00:00
b66465de73 Improve code clarity after 0a53c5e06a by removing a fall-through.
Also fix the indentation to follow the coding conventions.

This was SVN commit r16280.
2015-02-07 15:38:22 +00:00
f6903393bd Add various rotation modes for multiple object selections (individual rotation, global rotation with or without individual rotation).
Patch by trompetin17, fixes #1213

This was SVN commit r16275.
2015-02-06 22:23:50 +00:00
0a53c5e06a Fix hero selection ring not cleared when the unit goes out of the world (when garrisoning for instance).
Patch by trompetin17, fixes #2627.

This was SVN commit r16274.
2015-02-06 20:47:31 +00:00
846fdc1ed8 Provide explicit spezializations of hash_value for CTexturePtr and CTextureProperties. Fixes #3036.
This was SVN commit r16271.
2015-02-06 02:03:20 +00:00
bf6323a71f Amend 7020d17886 and also fix observer mode. Fixes #3032.
This was SVN commit r16267.
2015-02-04 09:20:00 +00:00
53b335f5ae Improve auto-completition of nick names and add it to the in-game chat. Patch by trompetin17. Refs #1767.
This was SVN commit r16261.
2015-02-02 23:44:06 +00:00
e75498a655 Fix d71161fe4c on WxWidgets 2.8
This was SVN commit r16258.
2015-02-02 20:20:37 +00:00
ec7c8f2d65 Move gain config setting retrieval to the sound manager. Fixes #3030.
Also clean up the sound manager a bit.

This was SVN commit r16257.
2015-02-02 13:44:06 +00:00
d71161fe4c Add a list of selected entities, grouped by template.
Patch by trompetin17, fixes #1392

This was SVN commit r16255.
2015-02-01 21:23:06 +00:00
3225e564fe Fix 1564a10120, plus code cleanup
This was SVN commit r16254.
2015-02-01 19:04:21 +00:00
7020d17886 Fix Gaia perspective, in which one could only see entities with a dirty visibility cache.
This was SVN commit r16250.
2015-01-30 18:08:16 +00:00
f52e3ea052 Fix uninitialized variable, fix by trompetin17, fixes #3027.
This was SVN commit r16249.
2015-01-30 17:37:40 +00:00
1564a10120 Move back the computation of most of the visibilities from JS to engine, to improve performance.
Also fix the remaining TODO left by #958, as a use case of the scripted
Visibility component.

Refs #2913, #958.

This was SVN commit r16248.
2015-01-30 15:28:06 +00:00
df2e077870 Trailing spaces cleanup, based on patch by trompetin17, refs #1767.
This was SVN commit r16244.
2015-01-29 16:10:03 +00:00
6a70e3a62f Updates checkrefs.pl to support mod mod and GUI XML change
This was SVN commit r16242.
2015-01-28 03:26:39 +00:00
0ef6c7555e Optimise VBO updates.
Some drivers (at least the Intel drivers on Windows) are slow at
incrementally updating a VBO with hundreds of calls to glBufferSubData
every frame. Performance is significantly better if you use
glBufferData(NULL) to tell it to discard all the previous contents, and
then re-upload all the data at once.

Update CVertexBuffer so that GL_DYNAMIC_DRAW/GL_STREAM_DRAW buffers are
handled with the new mechanism. This requires the caller to hold onto
the backing store so it can be re-uploaded when necessary, and needs a
bit more signalling to indicate exactly what needs uploading.

I see an improvement from roughly 60 to 75 fps on Intel HD Graphics
3000, Windows, 1024x768, Siwa Oasis.

This was SVN commit r16241.
2015-01-28 00:48:00 +00:00
0a34e6106d Improve readability printing a single error message.
This was SVN commit r16237.
2015-01-27 09:14:30 +00:00
ee08dff5ad Updates Windows installer config, making the SM debug dll exclusion more generic
This was SVN commit r16234.
2015-01-26 05:01:53 +00:00
4473ed5c88 glext_funcs: Support glMapBuffer, glMapBufferRange
This was SVN commit r16231.
2015-01-25 16:36:23 +00:00
a8499e89eb Pad vertex data to power-of-two sizes.
This reduces the total number of different vertex sizes in the system,
allowing more data to share a single CVertexBuffer, therefore reducing
the amount of wasted space in each CVertexBuffer and reducing VRAM
usage.

This was SVN commit r16230.
2015-01-25 15:38:51 +00:00
123bab6793 Replace use of safe bool by explicit bool operator.
This was SVN commit r16228.
2015-01-25 03:11:24 +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
59503b9ae9 Add basic support for GUI scaling factor, to help with high-res displays (e.g. 4K monitors and 1080p tablets).
Use the config setting "gui.scale = 0.5" to make the GUI bigger.

This was SVN commit r16223.
2015-01-24 20:06:37 +00:00
c976366590 Added a script for i18n maintenance tasks
The script updates the local repository, regenerates the POT files,
downloads the
latest PO files, reverts any change that Pology determines as not
meaningful, and
adds the modified files to the local VCS.

The script does not actually perform the final commit, that is left for
the user.

Ref #2492

This was SVN commit r16222.
2015-01-24 19:57:44 +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
15e8637b67 Fix build with Visual Studio
I've reverted this workaround before the SM31 commit because I thought
it's only a problem with VS2010. Actually VS2013 still doesn't support
C++11 well enough and still requires the workaround.

Refs #2669, #2462

This was SVN commit r16215.
2015-01-24 16:33:27 +00:00
c02a7e1a7b SpiderMonkey 31 upgrade
This upgrade also introduces exact stack rooting (see to the wiki:
JSRootingGuide) and fixes problems with moving GC. This allows us to
enable generational garbage collection (GGC).
Measurements a few months ago have shown a performance improvement of a
non-visual replay of around 13.5%. This probably varies quite a bit, but
it should be somewhere between 5-20%. Memory usage has also been
improved. Check the forum thread for details.

Thanks to everyone from the team who helped with this directly or
indirectly (review, finding and fixing issues, the required C++11
upgrade, the new autobuilder etc.)! Also thanks to the SpiderMonkey
developers who helped on the #jsapi channel or elsewhere!

Fixes #2462, #2415, #2428, #2684, #1374
Refs #2973, #2669

This was SVN commit r16214.
2015-01-24 14:46:52 +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
8ca674d461 cppformat: Fix Android build.
The NDK only exposes the BSD-style strerror_r, not the GNU-style, so
select the appropriate code path.

This was SVN commit r16208.
2015-01-23 21:15:48 +00:00
2e01b157d6 Fix build error in GLES configurations
This was SVN commit r16207.
2015-01-23 20:54:14 +00:00
c9dee72667 GLES doesn't have glDisable(GL_TEXTURE_2D).
Patch by BogDan. Refs #2996.

This was SVN commit r16206.
2015-01-23 20:40:02 +00:00
8a39ea5543 Avoid misaligned pointer dereferences, which can fail on ARM.
Based on patch by BogDan. Refs #2996.

This was SVN commit r16205.
2015-01-23 20:39:40 +00:00
c9c80a9d94 SDL_SetWindowGammaRamp fails on Android, so don't bother using it.
Based on patch by BogDan. Refs #2996.

This was SVN commit r16204.
2015-01-23 20:39:02 +00:00
ad3e330861 Workaround for limitations of Android's vswprintf implementation.
Based on patch by BogDan. Refs #2996.

This was SVN commit r16203.
2015-01-23 20:38:13 +00:00
b64ff8d09a Remove Android hack to autoload a map.
Patch by BogDan. Refs #2996.

This was SVN commit r16202.
2015-01-23 20:36:52 +00:00
adcd9191a6 Updates Windows installer config for 65cc47f6c0
This was SVN commit r16200.
2015-01-23 03:38:02 +00:00
65cc47f6c0 Deletes unused bundled MSVC runtime libs for old 2005 and 2008 versions.
Removes VC80 manifest info.

This was SVN commit r16199.
2015-01-23 03:21:48 +00:00
f3f2717c66 Fix tests on 32-bit builds.
This was SVN commit r16193.
2015-01-22 21:13:09 +00:00
f350a24c73 Disable "assignment operator could not be generated" warning globally on Windows, since it's never useful.
This was SVN commit r16192.
2015-01-22 21:09:33 +00:00
d7926eb612 Add basic tests for %s/%hs/%ls in sprintf_s, swprintf_s.
This was SVN commit r16191.
2015-01-22 20:39:53 +00:00
ef2a358f87 Remove sys_vswprintf.
The implementation on Windows was gross. The only user was CLogger,
which no longer uses it.

Also fix vswprintf_s to handle truncated output correctly (by returning
"") on Linux, now that CLogger is no longer relying on the buggy
behaviour.

This was SVN commit r16190.
2015-01-22 20:39:28 +00:00
afa492f473 Preprocessor: Avoid using "%.*hs" in log format string, since cppformat doesn't support it.
This was SVN commit r16189.
2015-01-22 20:38:16 +00:00