1
0
forked from 0ad/0ad
Commit Graph

5859 Commits

Author SHA1 Message Date
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
568c415d0a Convert wchar_t*/wstring arguments to UTF-8 strings in CLogger messages.
This was SVN commit r16188.
2015-01-22 20:37:38 +00:00
e02d7ad949 Automatically replace %hs/%ls with %s in CLogger format strings.
Everything is char* now, so we don't need to mess around with different
string types.

Done with:

  ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs perl
-pi -e'1 while
s/(LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR).*)%[hl]s/$1%s/g'

This was SVN commit r16187.
2015-01-22 20:36:24 +00:00
38a8e2e0d6 Automatically convert most path.string().c_str() to path.string8()
Done with:

  ag -l 'LOG.*string\(\).c_str\(\)' source | xargs perl -pi -e'1 while
s/(LOG.*string)\(\)\.c_str\(\)/${1}8()/g'

This was SVN commit r16186.
2015-01-22 20:35:17 +00:00
b90bc147c9 Add Path::string8 (which returns a UTF-8 encoded std::string).
This saves the hassle of writing utf8_from_wstring(path.string()) in
places like log messages, and can be extended to better handle
non-ISO-8859-1 paths on Linux.

This was SVN commit r16185.
2015-01-22 20:33:11 +00:00
e9a33b71ae Manually fix the less trivial CLogger format strings.
This was SVN commit r16184.
2015-01-22 20:32:06 +00:00
49e2ecea63 Automatically convert all CLogger format strings from wchar_t* to char*.
Done with:

  ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs sed
-i 's/LOG\(MESSAGE\|MESSAGERENDER\|WARNING\|ERROR\)(L/LOG\1(/g'

This was SVN commit r16183.
2015-01-22 20:31:30 +00:00
dcf5a2667f CLogger: Use cppformat instead of sys_vswprintf.
sys_vswprintf relies on platform-specific printf implementations, which
vary widely between platforms (in handling of truncation, return values,
use of %s/%S/%hs/%ls for mixing char and wchar_t strings, etc) and are
therefore a pain.

Use cppformat's fmt::sprintf instead, which has very similar syntax to
sprintf but is more C++ish and is portable.

Also, wchar_t is stupid, so use char* strings (which are expected to be
UTF-8) in CLogger. This creates a bit of a pain with changing all
callers to convert to char* strings, but that's their fault for not
using UTF-8 already.

Refs #3011.

This was SVN commit r16182.
2015-01-22 20:30:05 +00:00
ca7b890e16 cppformat: Add basic tests for the functionality we use.
This was SVN commit r16181.
2015-01-22 20:28:57 +00:00
47b9a043b2 cppformat: Permit NULL arguments for %s.
Throwing exception on NULL is a bit extreme, and unhelpful when it
happens in rarely-tested error paths. Printing "(null)" is safer and
provides compatibility with glibc sprintf.

This was SVN commit r16180.
2015-01-22 20:27:58 +00:00
9c8798b592 cppformat: Remove support for CUSTOM types.
These cause a lot of type-safety trouble - unsupported types passed into
fmt::sprintf (like CStr or enums) will be accepted at compile time, but
trigger an exception at runtime. Remove them, so we'll get either an
implicit conversion to a supported type, or a compile-time error.

This was SVN commit r16179.
2015-01-22 20:27:34 +00:00
8875ae9cdf cppformat: Fix compatibility with our build system on Windows.
This was SVN commit r16178.
2015-01-22 20:26:58 +00:00
f16407f6e9 cppformat: Fix -Wundef build warnings from GCC.
This was SVN commit r16177.
2015-01-22 20:26:32 +00:00
f96593a9f3 Import cppformat v0.11.0
Refs #3011.

This was SVN commit r16176.
2015-01-22 20:25:10 +00:00
1857c33602 Remove use of __attribute__ that breaks the Windows build. Refs #2522.
This was SVN commit r16172.
2015-01-21 22:37:25 +00:00
b5b9c0f2ae Improve template code style for the Decay component.
This was SVN commit r16171.
2015-01-21 21:45:05 +00:00
76120d888b Add some tinygettext changes from SuperTuxKart. Refs #2522.
Move some data to RO. Pass some parameters as references.
Taken from https://github.com/Grumbel/tinygettext/issues/3.

This was SVN commit r16169.
2015-01-21 21:17:45 +00:00
aeb18239c3 Update tinygettext to upstream commit ca0f3ff640. Refs #2522.
Keeps our addition of precompiled.h (fd3d335265), win32/dirent,
4c9d99ff68, de6823d23f, and 8fc14655b5.

This was SVN commit r16168.
2015-01-21 20:37:37 +00:00
852cd11305 Improve the performance of the GetLosVisibility function by using the cache (currently used for mirages only) whenever possible.
This was SVN commit r16166.
2015-01-20 16:29:50 +00:00
7a48606471 GLES compatibility for particle shader
This needs to use the model-view matrix, not model-view-projection (the
transform uniform), else the axes won't be unit vectors and the particle
sizes will be wrong. But GLES doesn't have the pre-defined matrices, so
pass it in explicitly.

This was SVN commit r16165.
2015-01-19 21:44:53 +00:00
e1e163b3f7 Improve ogl_WarnIfError() to report the file/line where the error was detected
This was SVN commit r16164.
2015-01-19 20:06:16 +00:00
b74e853144 Fix typo which caused GLES errors
This was SVN commit r16163.
2015-01-19 20:04:46 +00:00
a72d490759 Fix Atlas compile problems with C++11 and clang. Thanks to trompetin17 for investigating this.
Refs #2669

This was SVN commit r16158.
2015-01-18 09:48:41 +00:00
840c8215b6 Fixes build error 'no viable conversion' on OS X with clang, libc++ and c++11, refs #2462.
Removes explicit use of _Unwrap(), prefer deference operator * instead

This was SVN commit r16157.
2015-01-18 06:36:15 +00:00
8976fb7646 Fixes MSVC warning C4100 unreferenced formal parameter
This was SVN commit r16156.
2015-01-18 06:26:00 +00:00
02a50fce62 Notify map makers when they are placing obstructed entities (overlapping other ones or placed outside the borders of the map). Patch by trompetin17
Fix #1163, refs #2829.

This was SVN commit r16149.
2015-01-14 09:11:11 +00:00
755ec45a14 Use correct format specifiers. Patch by bog_dan_ro.
This was SVN commit r16148.
2015-01-13 18:37:50 +00:00
851d3d964a Fixes MSVC build warnings about unhanded cases in switch statement (C4062) and missing parameter in macro (C4003)
This was SVN commit r16141.
2015-01-11 21:37:53 +00:00
8fc14655b5 Improve 524a942b52. Refs #2637.
This was SVN commit r16140.
2015-01-11 19:14:03 +00:00
524a942b52 Only print add_translation warning when translations do not match
FIXES 2637

This was SVN commit r16138.
2015-01-11 14:08:01 +00:00
5cf2086a33 Fix the initial exploration of territories, which shouldn't be performed in Atlas.
Also clean up the code a bit.

Fixes #2969

This was SVN commit r16129.
2015-01-08 22:36:13 +00:00
57033850a8 Check for unsaved changes in Atlas. Patch by trompetin17, fixes #2819.
This was SVN commit r16126.
2015-01-08 21:29:27 +00:00
b36c78b4c4 Fix build warning
This was SVN commit r16115.
2015-01-05 20:05:53 +00:00
045fea23aa Properly adjust Atlas for the init changes.
This was SVN commit r16112.
2015-01-03 17:42:42 +00:00
f0d7346b8f Happy New Year! :D
This was SVN commit r16103.
2015-01-02 14:22:23 +00:00
8441a3f8d6 Fix compilation failure with GCC and C++98/03.
Local types shall not be used as a template argument. So move it
to a higher scope. This restriction was lifted in C++11, so we
might want to change this back when we switch to that.

This was SVN commit r16101.
2015-01-01 23:57:04 +00:00
a472944689 Clean up LoadPlayerSettings.
Include gaia to make iteration easier.
Add TemplateExists() to the TemplateLoader. Refs #2877.

This was SVN commit r16099.
2015-01-01 23:10:24 +00:00
8e30410109 Improve PickEntitiesAtPoint
First, do a ray intersection test with the bounding-sphere for all
entities on the map and then check the more detailed selection shape for
the remaining candidates. Do checks that require component lookups after
the ray intersection tests because these are relatively expensive.
The old method for figuring out which entities are below the mouse
cursor was incorrect because it does a 2D check to filter out the first
candidates which can lead to incorrect results with lower camera angles
and high buildings or buildings with a large footprint. Such problems
were avoided with quite a large radius for this 2D test and resulted in
a large number of candiate entities after this first test (200-500).
Also rename PickEntitiesAtPoint to PickEntityAtPoint and make it return
only one (the closest) match.

I've tested performance with the tracelogger by starting a map and then
moving the mouse in circles for one minute. The results were relatively
stable. I've compared the total time percentage of input.js:836, which
spends nearly all of the time in PickEntityAtPoint.
Ardennes Forest - Normal size:       Original: 41.46%    Patched: 31.6%
Ardennes Forest - Giant size:        Original: 40.59%    Patched: 51.55%

As we see, it's faster on normal map sizes but slower on giant maps with
a lot of entities.
This approach can be further improved with some kind of spatial
subdivision for the culling (like an octree), which would help the unit
renderer too. This way it should be possible to make it faster (and
still correct) on all map sizes and with a large total numbers of
entities.

This was SVN commit r16098.
2015-01-01 23:05:26 +00:00
9329506e0d add support for civ specific player template, see #2877
This was SVN commit r16092.
2014-12-31 09:31:41 +00:00
913674a202 Remove useless call.
This was SVN commit r16090.
2014-12-31 00:21:41 +00:00
2c20936ce3 Save map settings. Patch by @aBothe. Fixes #2963.
This was SVN commit r16089.
2014-12-31 00:21:24 +00:00
8f387e0044 Remove code duplication and some cleanup.
This was SVN commit r16088.
2014-12-30 18:21:02 +00:00
992169c3ab Fix indentation in daaddaf433.
This was SVN commit r16087.
2014-12-30 17:27:18 +00:00
daaddaf433 Stop music in Atlas when reloading a map, patch by trompetin17, fixes #1712.
This was SVN commit r16084.
2014-12-29 21:01:54 +00:00
354bd8b088 Only delete/create players until the needed number is reached. Patch by trompetin17. Fixes #1953.
Previously we removed all players and created them anew. This caused
issues in Atlas,
as some components were recreated, but did not get informed about
already existing
entities (eg cmpTechnologyManager). By only creating/deleting players
until we obtain
the new number of players we do not have this issue.

This was SVN commit r16080.
2014-12-29 17:33:39 +00:00
d68a057153 Fix warning.
This was SVN commit r16077.
2014-12-28 16:45:06 +00:00
4c12440868 Give access to the templates to the GUI. This will be useful for eventually displaying factions specificities in main menus.
This was SVN commit r16075.
2014-12-28 16:21:07 +00:00
2ef3c0c42e Compute the actual percentage of map explored by the team in the summary screen.
Fixes #2587.

This was SVN commit r16071.
2014-12-26 19:13:40 +00:00
1e17cbe33c Use the range manager to pick entities when drawing a selection box during a game. This allows for a significant performance improvement.
Fixes #2961, patch by @aBothe.

This was SVN commit r16068.
2014-12-26 13:07:49 +00:00
49187dd990 Drop support for AIs that are not using modules.
This was SVN commit r16061.
2014-12-23 01:20:50 +00:00
d21cf8f3aa Clarify some comments.
This was SVN commit r16060.
2014-12-23 00:46:00 +00:00
ce0c1e4302 Report names of components or interfaces in case of error when registering those.
This was SVN commit r16059.
2014-12-23 00:29:14 +00:00
efce88b97b Call setlocale(3) on BSDs so that we can log unicode strings. Patch by Teiresias. Fixes #1142.
This was SVN commit r16058.
2014-12-22 00:23:07 +00:00
71ba68e3a3 Fix performance problem with unnecessary global message subscription
On my ESR31 branch, I've made two measurements with different replays
(both around 15000 turns).
In the first, I got around 3% performance improvement and in the second
about 7.5%. It mainly depends on how often aura changes related to the
female citizen aura happen.

This was SVN commit r16055.
2014-12-21 01:44:00 +00:00
a9c6b7080a Fixes intermittent error messages caused by uninitialized variable
This was SVN commit r16049.
2014-12-14 17:43:40 +00:00
add113a2a1 Remove duplicated layers of unescaping which required multiple escapes in some places.
This was SVN commit r16043.
2014-12-13 01:08:29 +00:00
eb8a6c9427 Explictly use GMT when displaying a localized time that is not a date. Patch by lafferjm. Fixes #2938.
Also make some parameters const references.

This was SVN commit r16037.
2014-12-12 01:11:00 +00:00
622614de02 Allow nesting repeat tags in the GUI.
This was SVN commit r16034.
2014-12-10 20:10:02 +00:00
fd93e4ae74 Remove testing of some special templates. We need to find a good way to generate template subsets, refs #2951.
This fixes the tests fail introduced in b05879e151.

This was SVN commit r16033.
2014-12-09 23:20:31 +00:00
f80adad667 Fixes some inconsistent line endings and EOL-related SVN properties.
This was SVN commit r16024.
2014-12-06 12:11:42 +00:00
b05879e151 Move template items GetRetainInFog and AlwaysVisible from Vision to Visibility.
Refs #2913

This was SVN commit r16022.
2014-12-05 18:33:59 +00:00
7e0e566346 Fix typo in include. Refs #2086.
This was SVN commit r16018.
2014-12-03 16:43:51 +00:00
3c45599be5 fix default ai difficulty when using autostart, was easy since f90841cf78
This was SVN commit r16015.
2014-11-30 16:35:32 +00:00
1cc19e9176 Specify that my templatesanalyzer tool is distributed under the MIT license. Thanks to leper for noticing that it was currently unspecified.
This was SVN commit r16014.
2014-11-30 16:28:04 +00:00
759a6701f6 Fix test build.
The parser that extracts the methods to call does not care about
defines.

This was SVN commit r16013.
2014-11-29 21:26:01 +00:00
1430efa9d6 Properly handle auto-research promotion techs at game start.
This was SVN commit r16009.
2014-11-25 22:47:02 +00:00
87d5d37488 Some source string fixes.
This was SVN commit r16002.
2014-11-22 22:21:54 +00:00
c385a88c88 Remove unused overload of GetSavedGameData
This was SVN commit r16001.
2014-11-22 19:46:24 +00:00
504e23acb8 Make some things static.
This was SVN commit r15997.
2014-11-20 22:19:33 +00:00
335ac3d0cb Query /proc for the executable path on Linux. Patch by starslayer. Refs #2086.
Factor out unix_ExecutablePathname() which is used by BSDs and Linux (as
a fallback).

This was SVN commit r15996.
2014-11-20 22:19:21 +00:00
8a66a732c7 Add "Copy" and "Paste" entries to the Atlas "Edit" menu. Patch by stilz_, fixes #2642.
This was SVN commit r15994.
2014-11-20 20:52:32 +00:00
1abd5669c9 Replace spaces in source file paths with non-breaking spaces. Refs #2539.
This way our map file paths are not split due to word wrapping in the po
files.

This was SVN commit r15993.
2014-11-19 23:10:51 +00:00
f90841cf78 add a very-easy level for AI, addresses #2899
This was SVN commit r15990.
2014-11-18 21:21:21 +00:00
3589aa39b9 Update documentation on how to generate the entity component documentation.
This was SVN commit r15987.
2014-11-18 03:57:21 +00:00
afecbf02f3 Extend the config parser to support ini-style config files. Refs #1810.
Config settings in a section are stored as "sectionname.setting"
internally.
Do not write section headers when writing config files as we would need
to write
settings without a dot first or ignore them. This can be changed once
all settings
belong to a section.

This was SVN commit r15986.
2014-11-18 03:57:07 +00:00
73de625089 Also change GameSetup.cpp.
This was SVN commit r15985.
2014-11-18 00:24:29 +00:00
9407dbe45e Remove useless parameter from CFG_GET_VALUE.
This was SVN commit r15984.
2014-11-17 23:29:49 +00:00
6695f1a3e8 Remove CParser. Fixes #2589.
This was SVN commit r15981.
2014-11-17 01:04:24 +00:00
b995135138 Use an FSM to parse our config files instead of using CParser. Refs #2589.
Properly write config settings with multiple values back to files. Refs
#1810.
Print error messages if we encountered an invalid setting.

This was SVN commit r15980.
2014-11-17 01:03:59 +00:00
f88ee2766e use by default a random seed for the AI to make it less repetitive
This was SVN commit r15973.
2014-11-16 19:53:29 +00:00
59676dfc84 Update tools/LICENSE.txt
This was SVN commit r15970.
2014-11-16 02:10:31 +00:00
df4c07238d Change GUI tag parsing to use a FSM instead of using CParser. Refs #2589.
Parameters now have to be quoted with ".
Supports " in parameters by escaping them with \.
Tag start characters can be included in normal text by escaping them
with \.
Better error handling and a error messages to help with fixing
invalid/malformed strings.

This was SVN commit r15969.
2014-11-16 02:10:28 +00:00
d15e2f0cf6 Check for availability of XmppClient.
Move Lobby script function registration to the lobby JS interface.

This was SVN commit r15968.
2014-11-16 02:10:24 +00:00
d58189d510 Parse terrain properties without CParser. Refs #2589.
This was SVN commit r15967.
2014-11-16 02:09:02 +00:00
fc1fe174cd Amend the "Reveal All" behavior by always hiding mirages.
This was SVN commit r15966.
2014-11-14 20:29:35 +00:00
4d89820f1c Fixes build errors on Windows introduced in c813a11427 and 1a0f9b086e.
This was SVN commit r15964.
2014-11-13 22:37:43 +00:00
49a31c5de2 prevent events from the first turn after deserialization to be thrown away
This was SVN commit r15962.
2014-11-13 20:21:00 +00:00
c813a11427 Split ScriptRuntime and ScriptInterface code to separate files.
The runtime is becoming more and more important in the JSAPI. As a
result, we also have more functionality on the runtime level and having
the whole ScriptRuntime class hidden in ScriptInterface.cpp doesn't make
sense anymore. ScriptInterface.cpp also has become quite a large file
and pulling out the runtime part makes it a bit smaller.

Refs #2462

This was SVN commit r15961.
2014-11-13 11:19:28 +00:00
1a0f9b086e GUI cleanup.
Remove toTitleCase(). Unify iColorToString() and rgbToGuiColor().
Translate XMPP errors (displayed when connecting).

This was SVN commit r15960.
2014-11-13 01:26:36 +00:00
6e788fb15e Clean up JSON parsing code. Refs #1374.
Fix Engine.ReadJSONFile() which did throw a JS exception that was not
caught. Discovered by s0600204.
Expose Engine.ReadJSONFile() to the gui scripts.

This was SVN commit r15959.
2014-11-13 01:26:22 +00:00
e108b162b6 Add hotloading for translation files. Fixes #2915.
This was SVN commit r15947.
2014-11-09 16:58:14 +00:00
8b9847e007 Replace CScriptValRooted with JS::Heap<T> and custom tracer for CNetClient
Refs #2462

This was SVN commit r15946.
2014-11-09 15:16:00 +00:00
8e2d514228 Exact stack rooting for CParamNode
Refs #2415
Refs #2462

This was SVN commit r15944.
2014-11-09 11:08:53 +00:00
edd9622050 wip petra support of saved games, still incomplete
This was SVN commit r15940.
2014-11-08 19:23:29 +00:00
f4b5054815 Fix valgrind warning about uninitialized variable. Patch by Echelon9. Fixes #2878.
This was SVN commit r15936.
2014-11-08 00:37:42 +00:00
7dad37c78f Some cleanup. Fix a comment.
This was SVN commit r15928.
2014-11-05 00:22:14 +00:00
d07d1a17f3 Add a new Visibility component that will eventually allow scripted components and mods to influence an entity's visibility.
This first commit only refactors code and does not add any new feature.

Refs #2913 (see this ticket for more information about the change)

This was SVN commit r15925.
2014-11-04 20:53:25 +00:00
199eb46d86 Fixes GLES build
This was SVN commit r15914.
2014-10-29 02:36:42 +00:00
10d13a991c Use fitplural added in upstream revision 1404284. Refs #2539.
This was SVN commit r15913.
2014-10-28 16:03:19 +00:00
7f1fd01174 Moves some includes out of Renderer.h to slightly optimize compilation
This was SVN commit r15912.
2014-10-28 03:57:22 +00:00
ff50b0b74c Fixes incorrect input handling in dropdowns and lists, they were manually handling all events, but should only handle certain key presses. Fixes #2885.
Fixes bug where lists/dropdowns could select an invalid index.

This was SVN commit r15909.
2014-10-27 04:37:06 +00:00
570b0374f4 Convert path separator after building the full path.
This was SVN commit r15908.
2014-10-27 03:09:36 +00:00
d06ecc1b89 Fixes some errors in i18n scripts: use ASCII quotes to avoid charset errors in Windows command line, and use function form of print
This was SVN commit r15907.
2014-10-27 02:42:06 +00:00
e3e86e2a29 Fixes init of post processing effects, so they can be cleanly enabled/disabled at runtime. Fixes #2890, refs #2672, #2893.
Updates descriptions on options screen and fixes comment in default.cfg
(smoothlos does not require preferglsl)

This was SVN commit r15905.
2014-10-27 00:53:31 +00:00
4a68170aeb Add msgstrs for plural forms to pots.
This was SVN commit r15904.
2014-10-26 17:25:12 +00:00
b4997dc7c6 Fixes minimap GLES compatibility by making point size a uniform and passing into the shaders
This was SVN commit r15901.
2014-10-26 04:37:26 +00:00
7f247580b3 Remove outdated bundled transifex client. Fixes #2789.
Anyone wanting to pull updates from transifex should install the client.

This was SVN commit r15896.
2014-10-26 00:28:41 +00:00
ae10d34d99 Switch i18n scripts to use Pology. Fixes #2539.
Still requires a patch to Pology to keep the source file ordering.

This was SVN commit r15894.
2014-10-26 00:28:35 +00:00
6334ee3f8b Reverts 03eaf9b461 due to licensing issues (source/lib is MIT licensed) and replaces with compatible FreeBSD/clang-based solution, patch by pstumpf. Refs #2675
This was SVN commit r15890.
2014-10-18 20:45:11 +00:00
c65817829f Adds compatibility for XMPP differences between platforms that can cause case inconsistencies.
This was SVN commit r15888.
2014-10-18 14:28:46 +00:00
03eaf9b461 Fixes cpuid to work with i386 CPUs and PIE/PIC, based on old GCC cpuid.h source and patch by pstumpf, fixes #2675
This was SVN commit r15886.
2014-10-18 03:07:24 +00:00
1631b8de14 Fixes Atlas error when using the map open/save dialog on Linux, based on patch by njm, fixes #2858
This was SVN commit r15885.
2014-10-18 01:53:06 +00:00
18ab827886 Change L10n code to use ps/Singleton, so that we can recreate it.
This allows for adding locales in mods.

This was SVN commit r15874.
2014-10-15 16:04:37 +00:00
227d828b67 Updates Windows version strings for 8.1 and 10 (technical preview)
This was SVN commit r15869.
2014-10-14 21:37:19 +00:00
6ec902ec20 Fix a typo in the packaging scripts.
This was SVN commit r15857.
2014-10-12 20:53:13 +00:00
849cbc13ee Fix path in fontbuilder.
This was SVN commit r15852.
2014-10-12 19:27:55 +00:00
46fd718ac1 Initialize some variables. Patch by Echelon9. Fixes #2862.
This was SVN commit r15851.
2014-10-12 19:27:49 +00:00
3c8ef99007 Switch lobby room. Update mod version.
This was SVN commit r15850.
2014-10-12 19:27:42 +00:00
a028027f75 Fix previous commit.
This was SVN commit r15847.
2014-10-05 22:46:24 +00:00
41ea9539a2 Update the translations selection script to match our choices for A17.
This was SVN commit r15846.
2014-10-05 22:05:22 +00:00
5d9d9a67bf Allow enabling the post processing filters during a game.
Includes numerous code updates, also updated the copyright for
cd5de73f3a.

Patch by dan@sstrev.com, fixes #2672.

This was SVN commit r15843.
2014-10-05 20:50:10 +00:00
cd5de73f3a Allow setting the "Smoothing LoS" option during a game.
Patch by dan@sstrev.com, fixes #2513

This was SVN commit r15841.
2014-10-05 20:02:04 +00:00
69c8b89f84 Fixes blank window after maximizing, minimizing, then restoring the game on Windows. In SDL2, this is an SDL_WINDOWEVENT_EXPOSED event, which we must handle to reset the game's minimized state. Refs #2041
This was SVN commit r15832.
2014-10-04 00:46:53 +00:00
5a985e18f4 Modify GC scheduling and reduce VFS cache size.
It seems like there is a memory leak if we haven't finished with the
marking phase of an incremental GC and SpiderMonkey has to trigger a
full GC because it runs out of memory. With this patch we stop trying to
make incremental GCs if we are above 1/2 of the runtime size and do Full
GCs instead. This should make such low memory conditions even less
likely than they were already after the previous patch. Also reduce the
maximum VFS cache size to 400 MB.
Refs #2808

This was SVN commit r15831.
2014-10-04 00:43:04 +00:00
9c4eb0295a Fixes some bugs related to IME text input in SDL2, including a possible crash, refs #2041. Behavior seems reasonably consistent now on Windows and OS X
This was SVN commit r15830.
2014-10-03 23:33:41 +00:00
f10bdf5089 Fixes some issues when toggling fullscreen mode with SDL2, refs #2041:
* SDL_WINDOW_RESIZABLE must be set when creating the window, apparently
only fullscreen flags take effect in SDL_SetWindowFullscreen
* Stores window position, so a window can be restored to both its
original position and size, rather than defaults
* Changes initial window position from undefined to centered, it caused
some problems with window positioning returning from fullscreen mode

This was SVN commit r15827.
2014-09-28 22:10:09 +00:00
2afeec0c01 Unify removal of incomplete translations in packaging scripts. Fixes #2825.
This was SVN commit r15826.
2014-09-28 21:51:48 +00:00
5200ea0365 Fixes starting Atlas from in-game on OS X, patch by trompetin17, refs #2427
This was SVN commit r15821.
2014-09-28 07:03:51 +00:00
857698e231 Fix memory leak when loading mods from config.
This was SVN commit r15818.
2014-09-28 00:13:55 +00:00
0caab0429f Fixes Reset Water Data button position in Atlas, fixes #2820
This was SVN commit r15815.
2014-09-27 02:42:42 +00:00
ea2db5386b Fixes water rendering and crashes on GPUs without FBO support, fixes #2667
This was SVN commit r15814.
2014-09-27 01:32:03 +00:00
2f8ed7980d Makes the bot more lenient on case sensitivity due to inconsistencies in case between Windows and Unix.
This was SVN commit r15813.
2014-09-27 01:06:28 +00:00
119aad9da9 fix a debug message
This was SVN commit r15811.
2014-09-26 17:07:17 +00:00
d1a31b3f54 Fixes regex for excluding translations from release packages, refs #2494
This was SVN commit r15800.
2014-09-25 02:07:46 +00:00
533fb6f7bc Load the public mod by default. Fixes #2754.
This was SVN commit r15796.
2014-09-24 17:49:22 +00:00
4753a0c1c2 Replace usage of "GUIs" in cxxtest with the command line,
and extend that to support -libdir <dir> and -disabled. Fixes #2488.

This was SVN commit r15795.
2014-09-24 15:35:31 +00:00
29effb5089 Build fixes and improvements for BSDs. Fixes #2804.
This was SVN commit r15793.
2014-09-24 14:11:13 +00:00
3b49576fa6 Tunes GC scheduling a bit to reduce memory usage.
The main problem was that GC was only called from the simulation before
this patch. This means when you were waiting in the multiplayer lobby or
just had the GUI open, it only called GC when getting close to the JS
runtime size limit (I assume). Another problem was the Net Server
runtime which didn't GC either. Here the runtime size limit is 16 MB
though, so it's not too terrible. These issues have both been addressed
and GC has been given a bit more time per incremental slice to make sure
it gets done in time. It's still far from perfect, but there are too
many changes in SpiderMonkey related to GC, so I don't want to spend too
much time on this yet.

Refs #2808

This was SVN commit r15787.
2014-09-22 20:13:04 +00:00
5593f573f4 Cleans up handling of SDL2 text input events, no behavior change expected.
Implements SDL2 text editing handler for input fields, this is for IME
support, so users entering CJK text can see what they're composing
before committing it. Should have no effect on SDL1 or normal text
input.

This was SVN commit r15785.
2014-09-22 19:00:20 +00:00
9592c59704 Fixes crash in Atlas color picker tool, noticeable with wxWidgets 3.0. Colors returned by wxColourData::GetCustomColour aren't always valid, so we have to test them with IsOk() before accessing them. Fixes #2805
This was SVN commit r15782.
2014-09-21 21:25:51 +00:00
b1ca37eead Extend visibility update to all tiles around LoS vertices. Incidentally prevent an issue from arising on square maps. Also improve a code comment.
This should be enough to fix #2760.

This was SVN commit r15779.
2014-09-21 20:29:54 +00:00
f5336c42b8 Adds Serialization support for ES6 Maps.
Also includes the patch from Sanderd17 to use Maps and Sets for the
Timer components. Sets can't be serialized yet, but in this case they
don't require serialization.
Refs #2475

This was SVN commit r15770.
2014-09-20 17:14:53 +00:00
6b2677a3fd Adds profiles to the multiplayer lobby. Fixes #2504.
This was SVN commit r15768.
2014-09-20 15:35:26 +00:00
d62e3729d5 Improves SDL2 support, includes patch by yashi and fabio, refs #2041:
* Adds SDL color cursor implementation
* Adds config option for choosing preferred display in multimonitor
setup
* Uses text input API to better handle CJK input
* Fixes various hotkey and input bugs

SDL 1.2 is still the default and recommended, to test experimental SDL2
support, pass the --sdl2 flag to update-workspaces

This was SVN commit r15767.
2014-09-20 12:12:35 +00:00
801d13aa8b Address some possible causes of bad handling of visibility updates. Also includes a little code tweaking allowing the global update of all visibility data.
Refs #2760

This was SVN commit r15765.
2014-09-20 08:26:45 +00:00
aa5fded9ae This was SVN commit r15762. 2014-09-17 23:22:20 +00:00
c56407a1f8 Fixes autostart init of player data, patch by mimo, fixes #2798.
Cleans up some of the autostart logic, removes and renames a few options
for clarity.
Updates readme.txt to reflect these changes and include some examples

This was SVN commit r15761.
2014-09-17 01:15:03 +00:00
66a2fe6308 Unload hotkeys on shutdown.
Fixes double registration of hotkeys on engine restart.

This was SVN commit r15755.
2014-09-15 01:27:06 +00:00
28c0b00b2e Sorts games in gamesList by status, then name. Refs #2463, #2448.
This was SVN commit r15754.
2014-09-14 22:11:03 +00:00
113f72a503 Makes running games visible in the lobby. These will be colored in red. Refs #2463, #2448.
This was SVN commit r15751.
2014-09-14 20:59:35 +00:00
0f0f4f7b03 Fixes crash on OS X if dir_watch_Poll is called during init before dir_watch_Add, refs #2427, #2650
This was SVN commit r15748.
2014-09-14 00:27:38 +00:00
60d92b643d Fixes some unused variables in Atlas
This was SVN commit r15746.
2014-09-13 19:34:04 +00:00
01395ce96d Fixes clang warning about hidden overloaded virtual function
This was SVN commit r15745.
2014-09-13 19:06:55 +00:00
70d81040cb Fixes Atlas copy/paste not copying actor seeds, patch by trompetin17, fixes #2791
This was SVN commit r15742.
2014-09-13 16:53:43 +00:00
acd86047dc Only split strings if they are non-empty. Fixes previous commit.
This was SVN commit r15737.
2014-09-12 23:11:03 +00:00
134e3c84b0 Clean up some code.
Fixes linker error on OSX.

This was SVN commit r15735.
2014-09-12 21:45:30 +00:00
a8189f89e5 Stop music when resetting the simulation test mode in Atlas.
Patch by trompetin17, fixes #1712

This was SVN commit r15734.
2014-09-12 21:38:10 +00:00
7ada7dd2a8 Some tweaks to profiler2:
* separate the HTTP profiling server from the on-screen profiler
* allow shutting down the HTTP profiler
* print messages when enabling/disabling HTTP and GPU profilers

Patch by kingbasil, fixes #1862

This was SVN commit r15723.
2014-09-09 18:17:08 +00:00
fee304d789 Fixes crash from 41b98a6f12 where a VBChunk* was released but not set to NULL
This was SVN commit r15721.
2014-09-09 04:13:50 +00:00
9c683af1e4 Fixes undefined property reference in Atlas after generating random map.
Fixes crash after failed random map generation in Atlas

This was SVN commit r15719.
2014-09-08 03:48:24 +00:00
881ad4090b Fixes weird unconventional use of logical not operator that also triggered a warning in clang
This was SVN commit r15717.
2014-09-08 00:19:35 +00:00
3d1cd08a4c Suppresses noisy clang/libc++ warnings from SpiderMonkey headers on OS X
This was SVN commit r15716.
2014-09-07 23:58:22 +00:00
41b98a6f12 Fixes incorrect reuse of a member variable in WaterManager, caused a crash when starting a new map in Atlas after loading a water map. Fixes #2784.
Fixes likely mem leaks from not cleaning up vertex buffer allocations

This was SVN commit r15715.
2014-09-07 23:49:24 +00:00
7ce9097d1c small cleaning of d0472b021b
This was SVN commit r15710.
2014-09-07 10:28:18 +00:00
d0472b021b Supersede the "Reveal all" flag when displaying mirages, to avoid seeing other players' mirages. This is especially problematic when switching perspective to an AI player.
Fixes #2712, thanks mimo for the report and for having looked into the
related code.

This was SVN commit r15705.
2014-09-06 19:59:49 +00:00
69bd930219 Excludes debug DLLs from Windows installer, fixes #855
This was SVN commit r15697.
2014-09-01 01:44:10 +00:00
5bfe2a4b65 Don't call miraging codes while iterating through the range manager's entities map.
I already had made that mistake when working on the fogging system so I
documented it in the code.

Fixes #2756

This was SVN commit r15692.
2014-08-29 09:01:08 +00:00
30b5fb6c41 Pass map settings also to Scenario games, including in particular trigger scripts for victory conditions.
Fixes #2715

This was SVN commit r15688.
2014-08-27 15:25:16 +00:00
ea78d97989 Explore the map inside a player's territory border at the beginning of a game.
Also handle properly the "Explore Map" option with the new fogging
system.

Fixes #2709

This was SVN commit r15681.
2014-08-26 10:01:04 +00:00
be2f0e69fc Make the modmod standalone.
Mount public in case we are starting Atlas and no mods are specified in
the config.
If users remove all mods and save this to the config and try to start
Atlas it will
crash, as it cannot find some needed files.

This was SVN commit r15678.
2014-08-25 16:38:54 +00:00
64bfa089af Add mod selection mod.
Includes some contributions by rada and sanderd17.

This was SVN commit r15677.
2014-08-25 16:02:54 +00:00
523d220ac5 Add engine support to load mods from config and restart into mods.
Restructure mod mounting code a bit to make it reusable, and use it for
replays. Fixes #2703.

This was SVN commit r15676.
2014-08-25 16:02:40 +00:00
c5c394fd17 Fix some disabled tests.
This was SVN commit r15673.
2014-08-24 15:29:53 +00:00
2b7e9728b6 Fix failure in TestNetComms::test_basic_DISABLED. Patch by Echelon9. Fixes #2426.
This was SVN commit r15672.
2014-08-24 12:02:52 +00:00