1
0
forked from 0ad/0ad
Commit Graph

1606 Commits

Author SHA1 Message Date
bb
6b88ca6a11 Fix the autostart victoryDuration support, which was broken by 63ca7ad672
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D1285
This was SVN commit r21122.
2018-02-06 19:44:05 +00:00
22903b09a6 Set victory conditions for autostart games.
Reviewed By: elexis
Trac Tickets: #5016

Differential Revision: https://code.wildfiregames.com/D1278
This was SVN commit r21108.
2018-02-03 19:39:33 +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
2bfb580415 Fix non-PCH build by adding an explicit include.
This used to build so the include of CStr.h disappeared from the include
chain at some point. PCH builds kept working because this file is
included in precompiled.h for the engine project.

Differential Revision: https://code.wildfiregames.com/D1273
Reviewed By: Imarok
This was SVN commit r21075.
2018-01-30 07:20:49 +00:00
5500a96751 Delete Savegame format version, refs 7064565ff6.
It is unneeded because we won't add backwards compatibility for previous
formats and
because the engine version check from 94302a4149 is sufficient and more
accurate in testing compatibility of savegames of different releases.
The simpler code allows unifying the savegame version check with the
check used by the replay menu (to be used in multiplayer gamesetups).

Differential Revision: https://code.wildfiregames.com/D1131
Reviewed By: wraitii
Agreed with: Imarok
Discussed with: Philip

This was SVN commit r20729.
2017-12-30 14:54:13 +00:00
3319c69d97 Choose AI behavior in gamesetup
Original patch from Sandarac, reworked by elexis and finalized by mimo

Discussed with elexis

Differential Revision: https://code.wildfiregames.com/D1159
This was SVN commit r20671.
2017-12-20 22:02:15 +00:00
571562d7d7 Revert 9c180f660f until there is someone maintaining AI behaviors, refs D746.
This was SVN commit r20654.
2017-12-14 13:31:00 +00:00
9c180f660f AI behavior gamesetup setting.
Based On Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D746
Refs #812, #2550

This was SVN commit r20646.
2017-12-12 16:45:09 +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
af03c72f76 Move GetAvailableMods
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1106
This was SVN commit r20591.
2017-12-05 17:17:21 +00:00
fed3fbee5d Expose the same FileExists to JS GUI, simulation and rmgen.
Thus restrict rmgen FileExists from 871ed04521 to rmgen/ and
simulation/.

Refs #4868, 8de5c26540
Differential Revision: https://code.wildfiregames.com/D1104
Same rap as in 0cfe9ab153, 7fda43d14e.

This was SVN commit r20588.
2017-12-05 00:22:03 +00:00
7fda43d14e Expose the same file listing function to JS GUI, simulation and rmgen, refs #4868.
Removes the workaround and limitations of globalscripts Resources
(52f311da2b) and loadCivFiles (89055ef858), allowing them to actually
become actually global.
Rename to ListDirectoryFiles as proposed by wraitii.

Differential Revision: https://code.wildfiregames.com/D1103
Reviewed By: s0600204
Proofread by: echotangoecho
Comments by: wraitii
Relevant discussions with leper in #4868, D1062

This was SVN commit r20586.
2017-12-04 23:46:55 +00:00
2c8b78ddaa Option to disable fog effects.
Fixes #4626
Patch By: dp304
This was SVN commit r20584.
2017-12-04 15:54:24 +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
2da6c0ce2a Use default Unicode encoding in source code on Windows.
This change drops MBCS encoding (which was the default for premake4)
except in the Collada project which is entirely written assuming MBCS.

Tested By: wraitii
Differential Revision: https://code.wildfiregames.com/D1069
This was SVN commit r20561.
2017-11-29 20:14:22 +00:00
f7206dc77d More ScriptInterface const.
Reviewed By: elexis; some comments by bb
Differential Revision: https://code.wildfiregames.com/D863
This was SVN commit r20519.
2017-11-25 06:49:58 +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
49b7d6fb95 Test integer validation.
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D947
This was SVN commit r20274.
2017-10-09 07:00:31 +00:00
7a5c5100c0 Allow command line options to start with - or --
Reviewed by: mimo
Differential Revision: https://code.wildfiregames.com/D883
This was SVN commit r20249.
2017-09-30 16:12:18 +00:00
8629b83ed9 Remove unneeded include.
That was a leftover from a previous iteration of the code.

This was SVN commit r20247.
2017-09-30 15:29:13 +00:00
84674911cc Switch back to an unplaceable filter for templates.
This removes FindAllPlaceableTemplates, replaces the few uses of it by
FindAllTemplates,
and makes that ignore all templates starting with special/ in addition
to those starting
with template_.

Now modders can use entirely different template organization schemes
(more folders, different
folders, etc) without having to edit a file that was never well
documented.

In conjunction with a few of the template moving patches preceding this
rubble/ and other/catafalque
are now placeable. The former now does not decay anymore and users that
want that should use the
decay| filter, the latter will be taken care of in #4762.

Return to making FindAllTemplates return all placeable templates again
(switch to unplaceable filter).

To reiterate the main point: Only templates starting with special/ or
template_ will not show up as
placeable in Atlas (or show up to code querying for all (placeable)
templates. If you want to add more
of those use one of these naming schemes (and possibly subfolders in
special/).

Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D935
This was SVN commit r20246.
2017-09-30 15:22:51 +00:00
ff7511d9fc Move special_filter/ templates to special/filter/.
This should help with simplifying the (un)placeable filtering again.

Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D934
This was SVN commit r20242.
2017-09-30 07:14:35 +00:00
486aec18d4 Move Main ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20172.
2017-09-12 03:11:33 +00:00
d6cb9c845b Move Debugging ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20171.
2017-09-12 02:25:28 +00:00
5f8be8e0c6 Move Game ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20169.
2017-09-12 01:38:46 +00:00
0e3a6d811c Move SavedGame ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20166.
2017-09-11 23:22:28 +00:00
4d931b57e9 Move ReadJSONFile and WriteJSONFile GUI ScriptFunctions that only handle VFS paths to the VFS JS Interface.
This was SVN commit r20164.
2017-09-11 22:21:34 +00:00
e69a0fb9db Remove unused clumsy JS GUI ScriptFunctions debug timer from ed7b4b5fca.
GetMicroseconds from 7a91d330d3 provides microsecond precise timing.

Refs #4772.

This was SVN commit r20163.
2017-09-11 22:08:54 +00:00
ab7089ad61 Command line option for pid+timestamp in OOS dump, mainlog and interestinglog
Reviewed by: elexis Fixes #3339
Differential Revision: https://code.wildfiregames.com/D51
This was SVN commit r20141.
2017-09-09 13:16:05 +00:00
eb4e66aab3 Move VFS GUI script function registration to its interface file.
This was SVN commit r20133.
2017-09-08 04:01:26 +00:00
9cb0a60d73 Deepfreeze Aura, Technology and Resource Templates, Simulation states, GameAttributes and few other JS objects.
This reveals unintentional modifications to these objects which would
most often imply hidden bugs.

Differential Revision: https://code.wildfiregames.com/D829
Fixes #4257
Refs #3647

This was SVN commit r20100.
2017-09-03 16:37:09 +00:00
5c01b50ca4 Add FALLTHROUGH, which in the best case is just [[fallthrough]].
Note that this does not fix the warnings in AtlasObjectXML, someone
interested
in fixing those should check whether using ICU would be a nicer
solution.

Reviewed By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D740
This was SVN commit r20095.
2017-09-01 20:04:53 +00:00
27d99765bb Add an icon to pyrogenesis' application window
Tested By: Imarok (Windows, Ubuntu w. Gnome), s0600204 (Arch w. Xfce),
ffffffff (Kubuntu w. KDE)
Reviewed By: ffffffff, s0600204
Differential Revision: https://code.wildfiregames.com/D768
Trac Tickets: #4363

This was SVN commit r20067.
2017-08-28 21:56:54 +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
7970c3dc54 Pass a const reference, if someone wants to modify it they should use the global directly.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D738
This was SVN commit r20027.
2017-08-23 23:52:32 +00:00
04f2209b50 Rename WaterUgly setting to WaterEffects in order to remove the invertedboolean workaround of the options page.
Differential Revision: https://code.wildfiregames.com/D815
Refs #3737
Tested By: Stan
This was SVN commit r20010.
2017-08-21 00:09:25 +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
781cec163e Remove CTerritoryManager pointer from CWorld, a relic from before simulation2.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D731
This was SVN commit r19931.
2017-07-29 23:27:02 +00:00
99b0362edf Bump version number to Alpha 23.
Differential Revision: https://code.wildfiregames.com/D758
Reviewed By: fatherbushido
This was SVN commit r19923.
2017-07-29 16:36:55 +00:00
43137fef3f Make all Wildfire Games copyright headers consistent by always ending with a period and using (C) instead of (c).
Differential Revision: https://code.wildfiregames.com/D716
Refs 09e974e1cb
Reviewed By: bb
Change in agreement with leper.

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

Reviewed By: echotangoecho
Tested By: Imarok, elexis
Differential Revision: https://code.wildfiregames.com/D636
This was SVN commit r19877.
2017-07-06 17:29:49 +00:00
5c6f3505e8 Fix replay cache performance (broken by ea250b3d25). Also remove a TODO fixed by fca844eef6.
Reviewed by elexis.

This was SVN commit r19875.
2017-07-06 16:20:18 +00:00
e7ab22286e Fix the replay menu for people with non-latin characters in their username.
Use OsPath instead of CStr and CStrW where possible,
wstring_from_utf8(OsPath.string8()) to pass printable strings to the
JSAPI,
OsString when opening a filestream and
off_t instead of int for filesizes.

Fixes #4320
Differential Revision: https://code.wildfiregames.com/D518
Reviewed By: Imarok
Tested By: Imarok on Windows, wraitii on OSX
Special thanks to Philip for advice and the lib/path.h fix in
47cc447322.

This was SVN commit r19824.
2017-06-25 14:54:00 +00:00
e1b43137fe Fix incompatible value for WaterUgly warning on opening the options screen.
Reviewed by: vladislavbelov, Imarok. Patch by echotangoecho. Fixes:
#4230.
Differential Revision: https://code.wildfiregames.com/D89
This was SVN commit r19822.
2017-06-25 11:13:17 +00:00
abe5d9205a Remove useless file entry in replays list
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D668
This was SVN commit r19814.
2017-06-21 15:43:57 +00:00
ea250b3d25 Don't crash if there is a replay subdirectory without commands.txt following 80635665f7 / D39.
Differential Revision: https://code.wildfiregames.com/D667
Reviewed By: Imarok
This was SVN commit r19813.
2017-06-21 14:44:26 +00:00
bedb13ea28 Delete gui/common/functions_utility_error.js.
Move the one function in it that is globally called from the engine to
the other function that is called equally.

This was SVN commit r19781.
2017-06-15 22:44:24 +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