1
0
forked from 0ad/0ad
Commit Graph

991 Commits

Author SHA1 Message Date
16fbe90342 Fix 204b04f2d4 compatibility with zipped mods, refs #5018.
Differential Revision: https://code.wildfiregames.com/D1480
Reviewed By: Itms
This was SVN commit r21814.
2018-05-01 21:15:55 +00:00
13e1702777 Add missing ScriptInterface includes to
JSInterface_L10n.cpp from d6db5a466d,
JSInterface_Renderer.cpp and JSInterface_GUITypes.cpp from 4b1297b328,
JSInterface_VisualReplay.cpp from b830233498,
JSInterface_Game.cpp from 5f8be8e0c6,
JSInterface_Simulation.cpp from 921c5515a6,
JSInterface_Debug.cpp from d6cb9c845b,
JSInterface_Main.cpp from 486aec18d4, refs #4772,
JSInterface_Mod.cpp where it was incorrectly removed in af03c72f76.

Refs D1470.
Sort includes alphabetically, add recent Coding Convention macro
comments.

This was SVN commit r21789.
2018-04-27 16:48:44 +00:00
6d93be0f58 Fix the display of light broken by cc67d54aeb
Reviewed by: Elexis, vladislav
Differential Revisions : https://code.wildfiregames.com/D1389
Refs: https://code.wildfiregames.com/D1262
https://code.wildfiregames.com/D1372

This was SVN commit r21557.
2018-03-15 18:19:12 +00:00
cc67d54aeb Fix compiler warnings on VS 2015, refs #3439, refs #5069.
Patch By: Stan
Reviewed By: Itms, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1262
This was SVN commit r21480.
2018-03-10 09:58:53 +00:00
2be4293dff Complain if an RMS tries to revert the loading progress.
Also increase estimated mapgen time, refs 942a45372c, 0e0ed94926.

Differential Revision: https://code.wildfiregames.com/D1341
Proposed By: Vladislav in D1340
This was SVN commit r21400.
2018-03-01 12:06:55 +00:00
bb
c0349931c0 Update the animation immediately after a varaint is changed, so we don't have sliding issues when we do so.
Differential Revision: https://code.wildfiregames.com/D1322
Reviewed By: temple
This was SVN commit r21335.
2018-02-23 20:11:16 +00:00
e497672a9c Bump copyright header year numbers.
This was SVN commit r21305.
2018-02-21 18:44:52 +00:00
8fbc095a88 Stop the random map generation upon quit request (Alt+F4), refs #4822.
Differential Revision: https://code.wildfiregames.com/D1304
Discussed with: Yves

This was SVN commit r21264.
2018-02-19 15:46:25 +00:00
470d3eb129 Replace a territory texture hack
Differential Revision: https://code.wildfiregames.com/D1293
This was SVN commit r21233.
2018-02-17 01:37:52 +00:00
2180862d40 Implement random map script backend to read terrain PMP files created with Atlas, fixes #4816.
Allows developers to set elevation and terrain textures in the map
editor and use that for a random map.

This was SVN commit r21131.
2018-02-06 23:05:58 +00:00
204b04f2d4 Allow random map scripts to load heightmap image files, fixes #5018.
Move the atlas heightmap import code to MapIO.cpp and reuse it.
Implements what 33e3e6c2ab and 69b7f39bf1 wanted to be.

This was SVN commit r21113.
2018-02-05 16:02:00 +00:00
7819ea434e Diplomacy Colors
Add a button to toggle between normal and "diplomacy" colors.
Reviewed by: elexis
Comments by: leper, ffffffff, Stan
Fixes: #4747

This was SVN commit r21107.
2018-02-03 14:17:31 +00:00
c90d72deb5 Replace DataTemplateManager simulation component with a globalscript, refs #4868.
Removes the serialization of JSON files, shrinking savegame files and
rejoin states sent across the network, refs #3834, #4239, #3909,
f24523dc8f.
Removes the AI C++ code to read JSON files from e33d4a52e9 since the AI
can now use the globalscript.
Allows the AI to read Aura templates and removal of GUIInterface code to
improve performance.
Serialization of the JSON objects in other simulation components was
removed in 9c0e37f2c0 / D1109, a6f14f5631 / D1130.

Serialization removal planned by sanderd17
AI part proofread by mimo
Simulation part proofread by bb
Discussed with Itms on irc

Differential Revision: https://code.wildfiregames.com/D1108
This was SVN commit r20737.
2017-12-31 01:02:21 +00:00
d18374bffe Fix ugly font rendering using GL linear interpolation if the UI scale was changed.
Patch By: Dariost
Refs D332

This was SVN commit r20735.
2017-12-30 17:56:07 +00:00
89e339dd16 Remove VFS cache, because it is less effective and less efficient than the OS cache (and partially redundant with higher level application caches).
Patch By: Sandarac
Discussed with: Philip, echotangoecho, Bezerra
Fixes #4072.
Differential Revision: https://code.wildfiregames.com/D587
This was SVN commit r20639.
2017-12-10 17:33:03 +00:00
f7aa7ac79e Optimise HierarchicalPathfinder::Update by speeding up the chunk dirtiness check.
By adding a custom function in Grid, the code gets vectorised on both
gcc and clang, resulting in much faster code and faster update times,
sometimes substantially (on giant maps or when few chunks must be
updated).

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D73
This was SVN commit r20630.
2017-12-10 08:59:43 +00:00
13ad114dd6 Move selection ring OverlayTexture code from CCmpSelectable::UpdateTexturedLineOverlay to the SOverlayTexturedLine struct in graphics/Overlay.cpp and SimRender in simulation2/helpers/Render.cpp.
This abstraction allows calling that code again from other simulation
components, like the RangeOverlayRenderer in D555.

Differential Revision: https://code.wildfiregames.com/D1139
Refs #3915, D555
Comments By: Vladislav, echotangoecho
This was SVN commit r20621.
2017-12-10 00:19:51 +00:00
53c9e89591 Move EOverlayType and SOverlayDescriptor from the Selectable component to Overlay.h.
Refs #3915, D568
Patch By: Sandarac
Taken from D555
Reviewed By: Vladislav
This was SVN commit r20618.
2017-12-09 19:49:56 +00:00
0cfe9ab153 Expose the same ReadJSONFile function to simulation, GUI and rmgen.
This way globalscripts/ can use the same code in all contexts, all paths
are absolute and only one function name is needed.
Remove ReadCivJSONFile which is redundant with this function as well.
Restrict read access of rmgen/ to rmgen/ and simulation/, refs
4275a8a33c, 89055ef858.

Refs #4868
Differential Revision: https://code.wildfiregames.com/D1085
Reviewed By: wraitii
Partial agreement with leper

This was SVN commit r20576.
2017-12-03 23:02:27 +00:00
9f0484e5ce Delete unused SpiderMonkey GarbageCollection ScriptFunctions ForceGC in the AI and GUI context (e9e05f4efc) and MaybeGC in the random mapgen context (942a45372c).
Optimizing the memory footprint requires likely different functions
following the new SM versions and a lot of testing,
so having these doesn't lower the effort to achieve optimization while
confusing the reader.

Differential Revision: https://code.wildfiregames.com/D1073
Reviewed By: Yves
This was SVN commit r20572.
2017-12-03 12:48:21 +00:00
89055ef858 Delete GetCivData from MapGeneratorWorker.cpp which is redundant with the ReadJSONFile from 871ed04521.
Unify civ file loading from gui/common/functions_civinfo.js and
rmgen/library.js in globalscripts/Templates.js.
Delete the two forgotton headers in 4275a8a33c.

Refs #4868, #4804, D900.
Differential Revision: https://code.wildfiregames.com/D1062
Discussed with: leper

This was SVN commit r20528.
2017-11-26 13:30:57 +00:00
69b7f39bf1 Rename RMS to Engine.
This was SVN commit r20525.
2017-11-25 22:17:01 +00:00
4275a8a33c Unify two rmgen and GUI JSON file loading script functions, refs #4868.
Revert the introduction of the exact copies of FileExists ReadJSONFile
functions in MapGenerator.cpp introduced by 871ed04521.
Include JSInterface_VFS.cpp from MapGenerator.cpp to remove that code
while gaining the other missing VFS file loading functions in rmgen/.
Split RegisterScriptFunctions of JSInterface_VFS.cpp from eb4e66aab3
into RegisterReadOnlyScriptFunctions and RegisterWriteScriptFunctions to
prevent unintentional write access.

This was SVN commit r20507.
2017-11-24 17:19:16 +00:00
7a17a3152c Pass the size in meters of a terrain grid tile from Terrain.h to the rmgen JS code to avoid hardcoding thereof.
Refs #4034, D900
Differential Revision: https://code.wildfiregames.com/D1059
Reviewed By: s0600204
This was SVN commit r20504.
2017-11-23 20:54:48 +00:00
63e77de94e Use only one coordinate system for locations in the rmgen system.
Thereby fix the distance check of the SimpleObject, refs #4338, D189 and
remove the CELL_SIZE engine constant magic number, refs #4034.

Differential Revision: https://code.wildfiregames.com/D996
Thanks a lot to rapidelectron and temple who independently discovered
this!

This was SVN commit r20396.
2017-11-01 22:59:27 +00:00
7e239f38a3 Adds a wireframe mode to the water rendering.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D769
This was SVN commit r20378.
2017-10-30 00:02:29 +00:00
38d09ce35c Adds a perspective matrix, refracts a matrix projection setup to prepare for an isometric view.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D971
This was SVN commit r20377.
2017-10-29 23:41:59 +00:00
7b93690c76 Fix few typos found with the Debian lintian tool.
Differential Revision: https://code.wildfiregames.com/D973
Differential Revision: https://code.wildfiregames.com/D974
Differential Revision: https://code.wildfiregames.com/D975
Patch By: LudovicRousseau
Reviewed By: Dunedan, bb
This was SVN commit r20369.
2017-10-28 22:34:57 +00:00
1fcdc3d7f4 Deepfreeze the map settings object (created from g_GameAttributes.settings by the gamesetup extending the map JSON data) to prevent random map scripts from unintentionally modifying that, refs #4257.
This was SVN commit r20265.
2017-10-06 18:53:24 +00:00
f1cc54cc18 Move GameView ScriptFunctions to its JS Interface, refs #4772.
Use early returns as initialization checks.

This was SVN commit r20165.
2017-09-11 23:03:27 +00:00
871ed04521 Move biome definitions to JSON and JS files, so that mods can easily remove or add new biomes, refs cc0d4f25da.
Move environment biome constants from JS to JSON.

This was SVN commit r20129.
2017-09-08 02:15:54 +00:00
1b44946078 Replace deprecated jsval with JS::Value.
Remove unused SGUIBaseSettings and GUI comment.
Fix indentation of a macro, refs D794.

Differential Revision: https://code.wildfiregames.com/D838
Review by: leper.
Itms came up with the same patch for the SpiderMonkey 45 update
independently.

This was SVN commit r20062.
2017-08-28 10:27:36 +00:00
ce580f0de0 Always delete CMapReader. Patch by Sandarac. Fixes #4154.
This fixes an assertion failure in ScriptEngine that can occur when
closing
the game while in the loading screen.

Reviewed By: vladislavbelov, leper
Differential Revision: https://code.wildfiregames.com/D684
This was SVN commit r20035.
2017-08-25 00:37:48 +00:00
9defd11440 Pass ScriptInterface as a const ref where possible.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D739
This was SVN commit r20028.
2017-08-24 00:32:42 +00:00
cb18830a81 Remove CinemaManager input handler to allow user interaction on other GUI pages like message boxes and possibly few selected hotkeys.
Disable gameview/camera hotkeys while cinematic paths are playing.

Differential Revision: https://code.wildfiregames.com/D697
Refs #3301, #3814, 89aef0b6eb
Reviewed By: Vladislav
This was SVN commit r19980.
2017-08-12 10:32:07 +00:00
00fafda955 Stop copying the territory grid when recomputing the texture.
Before inlining territories it was changed to be a const reference, thus
avoiding the copy.

Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D741
This was SVN commit r19936.
2017-07-30 23:37:05 +00:00
98d7763765 Remove code that doesn't do anything.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D743
This was SVN commit r19933.
2017-07-29 23:27:28 +00:00
5ab426d621 Remove commented out code.
Reviewed By: Sandarac
Differential Revision: https://code.wildfiregames.com/D742
This was SVN commit r19932.
2017-07-29 23:27:14 +00:00
d49bf8b1bf Ensure the camera position being above the water level (without smoothing the water level with the terrain).
Differential Revision: https://code.wildfiregames.com/D700
Fixes #3892, D229, D638

This was SVN commit r19896.
2017-07-10 02:16:57 +00:00
cfd08bbf28 Cinema Path GUI hiding and silhouettes fixes.
Let the JS GUI take care of hiding the GUI and silhouettes and remove
the according hardcoding in the engine following 89aef0b6eb.
Thereby fix some bugs (like not having hid the GUI if there was a
message box or different page shown while playing a path) and
fix these two hotkeys broken by 5d49e6c456.

Differential Revision: https://code.wildfiregames.com/D631
Fixes #4633
Reviewed By: Vladislav
This was SVN commit r19797.
2017-06-17 14:17:30 +00:00
b94a54b18a Use direct gui.scale instead of reciprocal gui.scale
Patch by Dariost.

Differential Revision: https://code.wildfiregames.com/D328
This was SVN commit r19774.
2017-06-14 17:13:44 +00:00
51f62818f7 Fix all broken checks for the absent (random-mapgen+simulation) Seed property in the engine, refs #3965.
Hence display the originally intended useful warnings (instead of the
characterless JS "Script value conversion check failed" warning and
skipping the intended warnings).

This was SVN commit r19718.
2017-06-02 15:07:58 +00:00
25b1837603 Pass CVector3D as const reference in a few places.
Reviewed By: Sandarac
Differential Revision: https://code.wildfiregames.com/D424
This was SVN commit r19534.
2017-05-08 04:04:45 +00:00
bdfe500f98 Draw paths only when cinematics isn't playing. Patch by Vladislav.
Also show the GUI after the cinematics stopped playing in Atlas.

Differential Revision: https://code.wildfiregames.com/D411
This was SVN commit r19533.
2017-05-08 04:02:33 +00:00
09e974e1cb Bump year number of files changed this year in the license headers.
This was SVN commit r19503.
2017-05-01 14:28:22 +00:00
ecaa8434b1 Cinematic path node moving tool for Atlas. Patch by Vladislav.
Differential Revision: https://code.wildfiregames.com/D369
This was SVN commit r19483.
2017-04-30 23:47:16 +00:00
5a4cbc9261 Move CinemaManager includes forgotton in 5d49e6c456 to the right place, thus fixing the build without precompiled headers.
Refs https://code.wildfiregames.com/D385
Reported by: leper
Fix proposed by: Vladislav
This was SVN commit r19473.
2017-04-29 18:08:06 +00:00
5462f26aba Move CinemaPath class to the simulation helper directory, because it contains predominantly simulation data that is already serialized.
The remaining graphics code should be moved or removed.

Differential Revision: https://code.wildfiregames.com/D324
Patch By: Vladislav
This was SVN commit r19414.
2017-04-14 23:20:49 +00:00
2e37e6a8d9 Remove redundant path name argument from the CinemaManager AddPath function.
Differential Revision: https://code.wildfiregames.com/D310
Patch By: Vladislav
This was SVN commit r19406.
2017-04-11 01:37:00 +00:00
ee987d3b0d Add some consts to ShaderProgram functions
Reviewed by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D315
This was SVN commit r19403.
2017-04-10 15:44:33 +00:00