Commit Graph

5666 Commits

Author SHA1 Message Date
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
12771edb0e Delete dynamic message subscriptions on simulation reset.
This was SVN commit r15646.
2014-08-16 01:23:50 +00:00
a4df483f60 Forgot to make a variable unused.
This was SVN commit r15631.
2014-08-13 14:52:38 +00:00
0b385384aa Fix terrain overlay rendering after water.
This was SVN commit r15628.
2014-08-12 15:58:03 +00:00
8593825eee Modifies 23c708f72a to use the NONCOPYABLE macro as suggested by leper.
This was SVN commit r15626.
2014-08-09 21:16:25 +00:00
23c708f72a Prevent copying of ScriptInterface objects.
Copying a ScriptInterface is not allowed. The destructor destroys the
JSContext and if there's a copy around that still uses it, that causes
crashes which can be quite hard to debug. This change prevents copying
by of ScriptInterface objects by making the copy constructor private,
which will reveal such errors at compile time.

This was SVN commit r15625.
2014-08-09 20:20:32 +00:00
83aa817f71 Exact stack rooting for simulation message type conversions.
Also replaces some deprecated API (jsval typedef and OBJECT_TO_JSVAL) in
that part of the code.

Refs #2415

This was SVN commit r15624.
2014-08-09 20:02:49 +00:00
8ce8e6ba9a Exact stack rooting for IGUIObject.
Refs #2415
Refs #2462

This was SVN commit r15623.
2014-08-08 13:41:47 +00:00
9872f5741f Exact stack rooting for ScriptInterface::FreezeObject.
Refs #2415

This was SVN commit r15622.
2014-08-08 11:59:49 +00:00
403b3b68af Fix some errors in WaterManager.
This was SVN commit r15620.
2014-08-06 15:24:38 +00:00
e578d215ea Fix free() of not allocated struct in the UPnP code. Patch by Echelon9. Fixes #2338, #2418.
This was SVN commit r15619.
2014-08-06 14:11:04 +00:00
5ae040ea54 Fix non-PCH build.
This was SVN commit r15618.
2014-08-06 13:23:02 +00:00
e865dc797d Revert RedFox's changes to Spatial subdivisions in the simplest possible way (hopefully won't cause OOS, but at least we'll get reports). Fixes #2573, Refs #2430 . There probably are opportunities to remove more things.
This was SVN commit r15617.
2014-08-06 09:21:00 +00:00
c662a4e9e9 Fixes #2713
This was SVN commit r15615.
2014-08-05 19:03:10 +00:00
f7e591c9f2 Hide changes to buildings in the fog-of-war.
To achieve this, mirage entities are created per player, to replace the
real entities when these ones fall into the fog-of-war. These mirage
entities are created on-the-fly, and destroyed when they get back in
sight.
This depends heavily on the VisibilityChanged message added in
2174eaaeee.

As a temporary adjustment, territories do not explore the map anymore
when their borders change. See #2709.

Fixes #599

This was SVN commit r15612.
2014-08-04 22:49:19 +00:00
e41f010f91 Fixes crash when loading maps in Atlas.
The ScriptInterface pointer can be NULL there, so using it without
checking is not safe.
This fixes the problem by continuing with the exact stack rooting
changes, which makes the temporary solution unnecessary.

Fixes #2707
Refs #2415

This was SVN commit r15611.
2014-08-04 20:14:17 +00:00
30fa275f9d Fixed some keys not being recognized after a719696658. Refs #195.
This was SVN commit r15610.
2014-08-04 16:48:54 +00:00
a719696658 Support more mouse buttons. Fixes #195. Patch by 01d55 with some minor cleanup.
This was SVN commit r15609.
2014-08-04 01:06:36 +00:00
efb889b79a Exact stack rooting for WriteStructuredClone and functions that use it.
Refs #2415

This was SVN commit r15607.
2014-08-03 19:32:39 +00:00
f4d62152e7 Exact stack rooting for GetClass and GetPrivate.
Refs #2415

This was SVN commit r15606.
2014-08-03 17:53:21 +00:00
169174824f Exact stack rooting for ScriptInterface::ToString.
I had to change a few other functions to take JS::MutableHandleValue
because JS::Stringify takes a JS::MutableHandleValue as input parameter.
That seems a bit strange because it should not change that value.
I assume it has historical reasons.

Refs #2415
Refs #2462

This was SVN commit r15605.
2014-08-03 17:29:49 +00:00
a2bd44b23a Exact stack rooting for JSON related ScriptInterface functions.
Refs #2415
Refs #2462

This was SVN commit r15603.
2014-08-02 22:21:50 +00:00
c818b8e475 Exact rooting for CallConstructor.
Refs #2415
Refs #2462

This was SVN commit r15601.
2014-08-02 16:30:15 +00:00
736d934107 Removes an unused codepath for AI deserialization and related ScriptInterface code.
It might actually be needed again in the future, but I think even then
it would be easier to rewrite it than having to update the code in the
meantime.

Refs #2462

This was SVN commit r15600.
2014-08-02 13:22:02 +00:00
4028cd425e Actually fix bugs on ATI cards. Switch reflection and refractions to use POT textures in an attempt to improve compatibility.
This was SVN commit r15598.
2014-08-02 12:54:45 +00:00
608c27fe10 Exact stack rooting for structured cloning functions.
Refs #2415
Refs #2462

This was SVN commit r15597.
2014-08-01 20:55:16 +00:00
e50147fd96 Metaprogramming 9ce51f4357.
Change something on water shaders to see if it works better on ATI
cards.

This was SVN commit r15594.
2014-08-01 10:15:29 +00:00
5c07a25ddc More exact stack rooting (CallFunction object).
Changes CallFunction and CallFunctionVoid to use a HandleValue as object
parameter. Also changes some JS serialization/deserialization functions
to only support the JSAPI rooted types (drop support for CScriptVal and
CScriptValRooted there). Some other functions got changed too because
they were closely related.

Refs #2415
Refs #2462

This was SVN commit r15592.
2014-07-31 19:18:40 +00:00
d677a30c39 Adds support for passing JS::HandleValue and JS::RootedValue& to CallFunction.
Also adds tests for these cases.

Refs #2415

This was SVN commit r15591.
2014-07-31 16:34:15 +00:00
2ae74221c7 Fixes saving/loading problems introduced in 28bdd8540f.
* CGameLoader created a new JS::Value when assigning to m_Metadata.
This means it didn't actually update metadata in SavedGames::Load. The
new approach solves this problem and should work well if
CScriptValRooted gets replaced in the future.
 * The cloning in ScriptFunctions.cpp was required. Removing it caused
compartment mismatches.
 * Now CGameLoader loads the metadata unconditinally because we didn't
actually use the option to not load load it.

Ref #2415

This was SVN commit r15589.
2014-07-31 14:44:51 +00:00
f85272e3de Small code style fix, related to a typo in the documentation. Also updates the Example component's copyright to match the current year.
This was SVN commit r15586.
2014-07-30 17:34:40 +00:00
9ce51f4357 Commit coastal waves when activating fancy effects, and incidentally completely change how this effect work. Refs #48.
This was SVN commit r15576.
2014-07-28 10:14:00 +00:00
2be86ef79e Fix crash when starting Atlas (introduced in 28bdd8540f).
This was SVN commit r15573.
2014-07-27 18:38:31 +00:00
07653c9a70 Fixes crash when generating random maps.
We must not be in a request when calling the ScriptInterface destructor.

This was SVN commit r15572.
2014-07-27 18:17:16 +00:00
cef9e7d4f0 Fixes crash in replay mode introduced in 28bdd8540f.
This was SVN commit r15571.
2014-07-27 17:28:36 +00:00
64efbfeae3 Fixes small memory leak introduced in 28bdd8540f.
Thanks to leper for pointing it out.

This was SVN commit r15569.
2014-07-26 23:09:24 +00:00
28bdd8540f Quite a lot of stack rooting related changes.
Changes GetProperty, SetProperty and HasProperty and a few other
functions to take handles. The conversions to CScriptVal or
CScriptValRooted at some places should be removed in the future. I've
done that to avoid an even larger patch.

Refs #2415
Refs #2462

This was SVN commit r15568.
2014-07-26 22:33:16 +00:00
e818b08344 Better support for SpiderMonkey rooted types in the ScriptInterface.
* Adds additional overloads/specializations which are required when
passing JS::Handle<T>/JS::MutableHandle<T> types to different functions.
* Replaces GetPropertyJS with a GetProperty specialization.
* Allows us to avoid the implementation of ToJSVal specializations for
JS::Value and JS::HandleValue. Such conversions should only happen if
there's no way around it and if you are aware of it.
* Adds test to make sure that all potentially required specializations
with custom implementations are instantiated. This should help prevent
introducing bugs in temporarily unused code.

Refs #2415

This was SVN commit r15567.
2014-07-26 20:31:29 +00:00
ea708e14bf Some changes on the VisibilityUpdate message system, aimed at correcting recent OOS problems.
I still experience troubles with serialization tests but I played a few
games without OOS. At least these changes will help us to debug more
efficiently the remaining problems.

Fixes initialization of visibility data and update order for LoS-related
systems (territory borders, etc).
Also removes a C-like array and fixes a player ID shifting.

Refs #599

This was SVN commit r15563.
2014-07-26 16:02:18 +00:00
e3888448c4 Removes rooting test.
Rooting works different now and the CScriptVal types are going to be
removed. We will need rooting tests again, but they will have to work
completely different than this test implementation.

Refs #2415

This was SVN commit r15562.
2014-07-26 14:07:56 +00:00
f41d4fa48e Fixes compartment mismatch introduced in a5ebd8dafd.
Also modifies some related functions to use SpiderMonkey stack rooting
types instead of CScriptValRooted.

Refs #2415

This was SVN commit r15561.
2014-07-26 10:58:24 +00:00
7c82e59ce5 Replace or remove uses of Engine.Console_Write. Patch by Adrian Fatol. Fixes #2141.
Cleans up list utility functions a bit.
Removes Engine.Console_Write.

This was SVN commit r15556.
2014-07-24 21:27:24 +00:00
600e0a4081 Fix an oversight in CcmpPosition from the turret changes. Reported on IRC by Falsevision.
This was SVN commit r15550.
2014-07-23 13:02:42 +00:00
a5ebd8dafd Load trigger scripts in serialization test mode.
This was SVN commit r15549.
2014-07-22 23:30:27 +00:00
a7b18d02bf Add serialization test support for replays.
This was SVN commit r15547.
2014-07-22 19:41:49 +00:00
a9048fa43d Adds support for passing JS::HandleValue to SetProperty and CallFunctionVoid without using ugly casing.
Also includes one little "demo-usecase", but additional code will be
changed to use that in future commits.

Refs #2415
Refs #2462

This was SVN commit r15542.
2014-07-20 19:45:18 +00:00
31f9ca9ebf Implements CallFunction with JS::MutableHandle<T> return type.
Changes the CallFunction implementation to use macros because otherwise
we'd have to write twice as many functions manually.
Adapts GetSavedGameData to use the new function template. Additional
callers will be changed in future commits.

Refs #2415
Refs #2462

This was SVN commit r15541.
2014-07-20 15:08:28 +00:00
e1d4c10f13 Recompute the number of LoS tiles whenever these tiles are reset (especially when loading serialized data).
Also add a verification about LoS tiles in the tests.

Fixes #2678
Refs #599

This was SVN commit r15538.
2014-07-17 19:08:06 +00:00
52f4cda439 Changes ToJSVal to take JS::MutableHandleValue instead of JS::Value&.
JS::MutableHandleValue is similar to JS::HandleValue, but the whole
JS::Value it points to can be replaced.
This change is needed for support of exact stack rooting and moving GC.
Contains a few other trivial API adjustments and style improvements too.

Refs #2462
Refs #2415

This was SVN commit r15534.
2014-07-14 19:52:35 +00:00
17634d7507 Move the minimap to only use the shader pipeline. Should make it OpenGL ES compatible (untested).
This was SVN commit r15533.
2014-07-14 17:15:22 +00:00
47426b2dad Per scythetwirler's suggestion, add some tables on my template analyzer script to compare units to their parent template.
This was SVN commit r15532.
2014-07-14 16:25:39 +00:00
09e04cb741 Adds missing request (fixes tests in debug mode).
This was SVN commit r15530.
2014-07-13 22:08:29 +00:00
a47dda7d66 Disables MSVC CRT deprecation warnings when building Atlas w/ wxWidgets 3.0
This was SVN commit r15527.
2014-07-13 21:19:30 +00:00
a82d32bd3c Fixes MSVC warning C4189: 'componentManager' : local variable is initialized but not referenced (Script_RegisterComponentType_Common is a static member function, so an instance of CComponentManager isn't needed)
This was SVN commit r15526.
2014-07-13 20:38:34 +00:00
1b5ab8142e Makes custom JS objects compatible with SpiderMonkey ESR31.
In v24 you called JS_InitClass and passed in a definition of JSNative
functions. Later you could call JS_NewObject with this class and the
object would get a prototype with the specified JSNative functions.
In ESR31 you now have to explicitly store the prototype object returned
by JS_InitClass and pass it as prototype argument to JS_NewObject to
achieve the same.
This change modifies our existing ScriptInterface implementation for
custom object types a bit and uses it at places where the JSAPI was used
directly before.

Refs #2462

This was SVN commit r15524.
2014-07-13 15:31:48 +00:00
f4949c82ff Fix how the template analyzer scripts takes walkspeed into account to some extent for ranged units, add a new script to create a RM to check balance using triggers, and add a readme file to try and explain the outputs and parameters better.
This was SVN commit r15523.
2014-07-13 14:22:32 +00:00
0cf5f57a68 Update of the template analyzer tool with more parameters and probably a more accurate representation of civs (with the right settings).
This was SVN commit r15522.
2014-07-13 10:20:35 +00:00
5a3f07b3d9 Forgot to use excnObj in db9c20e0a9. Also roots an additional jsval.
This was SVN commit r15518.
2014-07-12 19:46:12 +00:00
db9c20e0a9 Changes FromJSVal to take a JS::HandleValue instead of JS::Value.
JS::HandleValue is basically a wrapper around a JS::Value that is safe
for exact stack rooting and moving GC.
I've tried to keep this changeset rather small and isolated and
therefore create additional JS::Rooted<T> values at some places where
the function should eventually directly take a JS::Handle<T>.
The functions "CallFunction" and "CallFunctionVoid" put their arguments
inside a JS::AutoValueVector because this will be passed directly to
"CallFunction_" with ESR31.

Refs #2462
Refs #2415

This was SVN commit r15517.
2014-07-12 19:08:39 +00:00
cfa59fc4e1 Changes our JSNative functions to use JS::CallReceiver/JS::CallArgs.
This is the new way for working with arguments in JSNative functions.
JS_THIS_VALUE, JS_ARGV, JS_SET_RVAL and direct access to vp or argc are
deprecated and will probably be removed in future versions of
SpiderMonkey.
CallArgs also takes care of proper rooting and you can get the values as
Handles or MutableHandles. The interface changes a little bit for ESR
31, but commiting this now still makes it easier and the changes shout
be straigtforward (search and replace more or less).

Refs #2462
Refs #2415

This was SVN commit r15516.
2014-07-12 16:55:09 +00:00
7a1b92bffc Update my "Template Analyzer" script to have output about civ too. Try to guess if they are balanced against each other.
This was SVN commit r15515.
2014-07-12 16:08:35 +00:00
319cf16b5a Small cleanup, including a correction in the templates documentation, and the removal of residues from the culling changes.
This was SVN commit r15514.
2014-07-12 16:03:37 +00:00
5279f9625e Add a new tool to make some quick template analysis to try and detect imbalances or see if our balancing works. WIP.
This was SVN commit r15513.
2014-07-11 22:24:58 +00:00
2174eaaeee Add a VisibilityChanged message sent by the range manager whenever an entity changes visibility for any player.
This will be necessary for hiding buildings/trees/etc in fog-of-war, and
may be useful for AIs and for UnitAI.

Refs #599.

This was SVN commit r15508.
2014-07-10 20:51:39 +00:00
689272d4bd Remove collision in global namespace.
Fixes config/vfs deadlocks on OSX.

This was SVN commit r15504.
2014-07-09 19:16:03 +00:00
8b45f453e5 Fix non-PCH build.
This was SVN commit r15498.
2014-07-06 16:35:41 +00:00
8b493c2739 Revert obsolete workaround for structured clones.
Reverts 8195e767ef because that workaround isn't needed anymore with
SpiderMonkey 24 (and 31).

Refs #2241
Refs #1886

This was SVN commit r15495.
2014-07-05 11:35:00 +00:00
de6823d23f Makes tinygettext handle missing plural forms more sanely.
Print an error to the console and return the original (untranslated)
string instead of triggering an assertion in debug builds or a crash and
memory corruption in release builds.
Works around a crash on the history screen. Why the plural form is
missing is another topic and will have to be solved separately.

This was SVN commit r15493.
2014-07-05 10:29:24 +00:00
5571f7a7f9 Fix "Wind Angle" parameter not working properly. Add a precomputed "wind strength" variable so that waves look smaller behind islands. Some tweaks. Refs #48 as usual.
This was SVN commit r15492.
2014-07-05 10:20:30 +00:00
9d4665248b Check water FBOs creation correctly to detect some errors. Use two depth textures since I have a hunch the issues people encounter are caused by my using only one.
This was SVN commit r15488.
2014-07-04 10:14:35 +00:00
991d5bbd63 Fix random maps for my water changes. Fix the replay mode after I had broken it. Fix an occasional crash (that might have crashed Atlas, need someone to check).
Improve debugging slightly in case of framebuffer errors. Fix a few
style issues.

This was SVN commit r15486.
2014-07-04 09:03:21 +00:00
326290463e Further WIP water improvements. Add 3 different textures for different looks. Update some oasis maps for that. Streamline water settings (some removed, some added). Update Atlas for those (needs to be tested). Fix an issue with HQ water effects.
Please report any issue and/or crash. Those will get fixed in commits to
come. Refs #48.

This was SVN commit r15484.
2014-07-03 20:07:15 +00:00
eb7955599a Optimise silhouette rendering.
Do some intersection tests on the CPU so that the silhouette render
passes only have to draw models/patches that might actually contribute
to silhouettes, saving the CPU and GPU cost of rendering more objects
than necessary.

This was SVN commit r15483.
2014-07-03 01:00:25 +00:00
ffd6e10edf Make CGUIManager register a callback function for hotloading instead of specifically calling it.
This was SVN commit r15482.
2014-07-02 23:44:39 +00:00
30e851ab90 Forward-declare CShaderProgramPtr, to avoid pulling in more headers than necessary and to hypothetically reduce build times by a minuscule amount.
This was SVN commit r15481.
2014-07-02 22:36:45 +00:00
343066040f Remove inconsistent checks for pSimulation2 when saving maps and ensure that it is set.
Remove commented out code writing triggers that has nothing to do with
the actual triggers implementation.
Free memory that was allocated for error reporting when when fork()
fails.
Remove dead initialization.

This was SVN commit r15477.
2014-07-01 19:00:41 +00:00
f8d53d9a1d Clean up of the last commit.
This was SVN commit r15474.
2014-07-01 16:15:03 +00:00
ab30e0d4fb Change the water texture to a new, bigger one, created in Blender (thanks to Enrique). Change settings so that they are more logical, yet allow reverting back to an even lower quality setting. Add a WIP high setting (with foam) which isn't finished yet.
Change the shader itself so that the effects look nicer and are more
consistent across settings.
Rework the water mesh generation (simpler system). Fix a few issues.

May work oddly with Atlas since I haven't been able to compile yet.

Refs #1875 (maybe fix), Fixes #2077 (I'll assume it does), Fixes #2114
(assumption again), refs #48.

This was SVN commit r15473.
2014-07-01 16:05:05 +00:00
c339928c6f Disallow placing some special entities in Atlas. Fixes #1696. Patch by trompetin17
This was SVN commit r15467.
2014-06-30 10:20:20 +00:00
b4fc393f18 Change camera rotation in Atlas to be the same as in the game. Refs #1066.
This was SVN commit r15466.
2014-06-29 21:30:51 +00:00
c626cf66f9 Fix build-osx-libs properly for mavericks after learning some Bash.
Fix a long-standing typo in TerrainRenderer for water rendering that
apparently had no effect.
Don't compress the water textures to make it look better. They will be
changed anyhow.

This was SVN commit r15461.
2014-06-28 08:54:59 +00:00
789922b15a Updates LICENSE.txt files for recent changes
This was SVN commit r15459.
2014-06-28 06:21:27 +00:00
59b2493990 Missed changes from 304a7c1201
This was SVN commit r15458.
2014-06-28 05:50:32 +00:00
ae93c02ba8 Fixes a bug that caused script filenames to be defined as properties of the global object.
This was SVN commit r15450.
2014-06-26 17:08:46 +00:00
b1b96a89d6 Fix culling for shadows and reflections.
Previously we had a single culling frustum based on the main camera, and
any object outside the frustum would never get rendered, even if it
should actually contribute to shadows or reflections/refractions. This
caused ugly pop-in effects in the shadows and reflections while
scrolling.

Extend the renderer to support multiple cull groups, each with a
separate frustum and with separate lists of submitted objects, so that
shadows and reflections will render the correctly culled sets of
objects.

Update the shadow map generation to compute the (hopefully) correct
bounds and matrices for this new scheme.

Include terrain patches in the shadow bounds, so hills can cast shadows
correctly.

Remove the code that tried to render objects slightly outside the camera
frustum in order to reduce the pop-in effect, since that was a
workaround for the lack of a proper fix.

Remove the model/patch filtering code, which was used to cull objects
that were in the normal camera frustum but should be excluded from
reflections/refractions, since that's redundant now too.

Inline DistanceToPlane to save a few hundred usecs per frame inside
CCmpUnitRenderer::RenderSubmit.

Fixes #504, #579.

This was SVN commit r15445.
2014-06-25 01:11:10 +00:00
006bf42809 Fix segmentation fault in the sound destructor. Happened when the sound file doesn't exist. Errors are shown by other code.
This was SVN commit r15437.
2014-06-24 11:07:39 +00:00
9f47ed536d Add engine support to triggers + a component to provide an easy interface and to be extended by triggers. Thanks to SpahBod for the biggest part of the code, and Yves for the review.
This was SVN commit r15421.
2014-06-23 13:42:59 +00:00
600e8bd226 Fixes MSVC warning about uninitialized playerId in Atlas entity pasting code (using 0 as a sensible default value), refs #96
This was SVN commit r15415.
2014-06-22 22:19:02 +00:00
8f0772034e Don't process tokens starting with a '-' into translatable strings.
This was SVN commit r15407.
2014-06-21 08:09:24 +00:00
c793da5368 Don't allow changeing disabled dropdowns using the scrollwheel. Also corrects some things in b9a4af4cc6.
This was SVN commit r15406.
2014-06-21 00:25:12 +00:00
1659a28aa0 Correctly remove players who cancel while rejoining. Fixes #2240
This was SVN commit r15402.
2014-06-20 03:22:40 +00:00
754e76e4a1 Fix non-PCH build
This was SVN commit r15401.
2014-06-19 23:36:09 +00:00
d936bde74a Dynamic message subscriptions.
Allow components to individually subscribe/unsubscribe to messages,
instead of statically subscribing the entire component type. Use this
for most Interpolate/RenderSubmit messages, to avoid the performance
cost of passing those messages to a large number of components that will
just ignore them anyway.

On Azure Coast this reduces total time per frame by about 30% on a
CPU-bound system.

This was SVN commit r15400.
2014-06-19 23:20:12 +00:00
b8078deea8 Splitted the PO and POT files
Fixes #2494

This was SVN commit r15397.
2014-06-19 18:45:11 +00:00