1
0
forked from 0ad/0ad
Commit Graph

19974 Commits

Author SHA1 Message Date
aa72791b69 Fixes compilation errors about missed include and unused argument introduced in c17e7ee92f.
Patch By: elexis
Reported By: elexis
This was SVN commit r22950.
2019-09-20 19:44:58 +00:00
734d21464b Fix missing JSAutoRequest before JS_ReportError in various commits.
Differential Revision: https://code.wildfiregames.com/D2256
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22949.
2019-09-20 19:18:07 +00:00
Alexandermb
47eb30056f Latest Fix
This was SVN commit r22948.
2019-09-20 16:13:47 +00:00
Alexandermb
b56083071a Fix issues mentioned by @stan in this thread: https://wildfiregames.com/forum/index.php?/topic/25179-committed-hellenic-helmets/page/15/&tab=comments#comment-385394
This was SVN commit r22947.
2019-09-20 16:06:26 +00:00
Alexandermb
262056df42 Replace straw helmet
This was SVN commit r22946.
2019-09-20 15:37:40 +00:00
Alexandermb
cc839ec521 Enable greaves on carthaginian champions.
This was SVN commit r22945.
2019-09-20 15:32:05 +00:00
Alexandermb
bd66089319 Add updated carthaginian infantry pikeman champion shield.
This was SVN commit r22944.
2019-09-20 15:27:27 +00:00
e05f939fab Delete empty IGUIObject::Destroy function and MEGA TODO from 5122b0f906, e21ebb37f5.
None of the GUI object types implemented in the past two decades owns
children, only the CGUI page.

Differential Revision: https://code.wildfiregames.com/D2311
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22943.
2019-09-20 15:25:13 +00:00
Alexandermb
d90dffab1f Fix latest issues of the old helmets files merge.
This was SVN commit r22942.
2019-09-20 15:13:54 +00:00
1bc6d778bb Delete GUI.h umbrella include following 8d0cb1b954.
Differential Revision: https://code.wildfiregames.com/D2304
Tested on: clang 8.0.1., VS2015, Jenkins
Comments By: Vladislav, Angen, Stan
Tested by: Angen
This was SVN commit r22941.
2019-09-20 13:11:18 +00:00
8f7729bfdb Fixes values of clip planes in PostProcManager.
Reviewed By: wraitii
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D2196
This was SVN commit r22940.
2019-09-20 07:54:44 +00:00
c17e7ee92f Adds a helper function to pick entities with a given component and a given filter on screen.
Reviewed By: wraitii
Commented By: Stan, elexis
Differential Revision: https://code.wildfiregames.com/D2207
This was SVN commit r22939.
2019-09-20 07:45:55 +00:00
Alexandermb
76f82bbcac Replace hero_infantry_swordsman_marcellus.xml helmet with champion montefortino.
Replace mesh on hele_boeotian_g.xml to hele_boeotian_b.

This was SVN commit r22937.
2019-09-20 02:51:28 +00:00
Alexandermb
60049abcab Fix thracian_cap_01 missing on cavalry_javelinist_b_r.xml
This was SVN commit r22936.
2019-09-20 02:22:14 +00:00
Alexandermb
f03a18f72e Improved peytrals for persian and seleucid cavalry.
3 New peytrals:

Pers with bronze and iron.
Pers winged bronze for cavalry javelinist.
Seleucid with bronze.

This was SVN commit r22935.
2019-09-19 22:26:33 +00:00
Alexandermb
fec02fa2e3 Replace illyrian helmet on macedonian infantry with the new one.
replace mesh from hele_boeotian.xml.

This was SVN commit r22934.
2019-09-19 22:06:33 +00:00
Alexandermb
35dcdb263f Cleanup of helmets folder.
Merged all the old helmets files including meshes, textures and actors
to another sub folder called "old"

Added a better visual rome gallic helmet as replacement of the one i've
did before.

Replaced thracian helmet on spartan pikeman.

Replaced pers neckguard with one animated working like a cape.

Added the new persian conical helmet.

Added another pilos helmet for the persian cavalry.

Added another crest for the persian pilos helmet.

This was SVN commit r22933.
2019-09-19 21:53:07 +00:00
a936cc618a Move CGUIDummyObject class used for empty GUI objects to a separate file, and put the according CGUI page base object on the stack.
Differential Revision: https://code.wildfiregames.com/D2206
Tested on: clang 8.0.1., Jenkins

This was SVN commit r22931.
2019-09-18 20:51:45 +00:00
Alexandermb
b88e7d8368 Following dd2a75b630 fix latest issues mentioned by @Stan in the hellenic helmets thread.
Removing some crest's done by me and replacing old crest's on iron
corinthian helmets.

Thread:
https://wildfiregames.com/forum/index.php?/topic/25179-committed-hellenic-helmets/page/15/&tab=comments#comment-385266

This was SVN commit r22930.
2019-09-18 19:57:34 +00:00
4fd3f071a5 Fix SetGarrisoned() call when transforming an entity
Before cc1ea7cca0, the promotion code would carry the UnitAI
IsGarrisoned flag, which the Transform helper incorrectly didn't do.
However, this was missed when merging the two code paths.

This fixes an issue for example when units are promoted while atop
walls.

Reported By: faction02
Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2303
This was SVN commit r22929.
2019-09-18 19:07:16 +00:00
7985ea4b8e Removes usages of duplication of Clamp function in simulation and atlas. Refs D1763.
This was SVN commit r22927.
2019-09-18 15:02:36 +00:00
f1de8eb4ba Removes usages of duplication of Clamp function in gui, ps and renderer. Refs D1763.
This was SVN commit r22926.
2019-09-18 14:44:31 +00:00
050f1dc8df Removes usages of duplication of Clamp function in graphics. Refs D1763.
This was SVN commit r22925.
2019-09-18 08:34:36 +00:00
bdc6a7d3fd Unify loadgame and savegame dialog following e0ea53a8ee, refs #2030.
This way the save dialog gains the sortable list and details section
feature from 10b49f9c18 / D246 by removing a folder of code, refs #4413.
Fixes a style warning about the old dialog using a style for an 'olist'
type for a 'list' type, refs be963ec9b7 / D2232.

Subsequently move the gui/common/ helper file to the page code, meaning
it's not loaded for every GUI page needlessly anymore.
Fix map preview aspect ratio.
Use object-oriented code for the moved savegame code, refs #5387, but
conserve the rest of the code to limit the changes for auditability.

Differential Revision: https://code.wildfiregames.com/D2290
Tested on: Jenkins

This was SVN commit r22923.
2019-09-18 02:33:43 +00:00
003d588d13 Happy savegame hack removal following e0ea53a8ee, refs #2030.
Simply pass the JS value to the Save functions instead of letting those
obtain the data later from the topmost GUI page.
The JS hack incidence appears to be unused since 4b1297b328.

Differential Revision: https://code.wildfiregames.com/D2302
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22922.
2019-09-18 00:17:56 +00:00
93fed19c6a Reliably report and reject invalid XML files following a18fbd12ec, refs #245, fixes #5222.
Don't write XMB files for XML files that failed the validation,
otherwise the XML validation error will not be reported on consecutive
program starts anymore (as the XMB is loaded, skipping validation).
This had resulted in invalid XML  going unnoticed and committed in
credentials.xml in 80dbd1f2a3.

Differential Revision: https://code.wildfiregames.com/D1574
Reported by: gameboy
Comments By: bb
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22921.
2019-09-17 23:00:36 +00:00
41475093b0 Fix struc tree / civ info hotkeys following rebase error in adf448db4d / D2240 and don't trigger global hotkey handlers upon release following f192d4a2fa / D2260.
Differential Revision: https://code.wildfiregames.com/D2273
Tested on: clang 8.0.1., Jenkins
Tested by: Nescio
This was SVN commit r22920.
2019-09-17 22:42:50 +00:00
da958bf0e4 Fix wrong GlooxScriptConversions include in 9023f4bebb / D2264 triggering VS2015 build warning but no clang build warning, refs #5596.
Differential Revision: https://code.wildfiregames.com/D2298
Tested on: clang 8.0.1., Jenkins

This was SVN commit r22919.
2019-09-17 20:39:09 +00:00
a3d8807833 Fix 61e3f1ec0d on Windows.
Patch By: Angen
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2299
This was SVN commit r22917.
2019-09-17 19:27:38 +00:00
d468535df3 Split NetFileTransfer message parsing into one function per case, refs #5212.
Avoid redundant map lookups by caching the iterator.
Remove c-style casts by using type specific printf parameters, and
static_cast elsewhere.
Use references while at it, and typedef -> using.

Differential Revision: https://code.wildfiregames.com/D1567
Comments by: Vladislav
Tested on: clang 8.0.1, gcc 9.1.0

This was SVN commit r22916.
2019-09-17 14:18:46 +00:00
Alexandermb
7dcaf478d8 Update the corinthian helmet portrait with the ones done by @wowgetoffyourcelphone using @alexandermb new corinthian helmet render.
This was SVN commit r22915.
2019-09-16 17:40:11 +00:00
Alexandermb
9e6250660c Following dd2a75b630 Assign the new helmets and clean the unused files.
This was SVN commit r22914.
2019-09-16 17:38:19 +00:00
Alexandermb
dd2a75b630 Several adjustments to the helmets and addition of new ones.
Fixed:

Replaced the Phrygian b helmet with b1 following the name schema of the
rest as well as adding 2 variants more of the same.

Added:

Add bronze specular for the bronze helmets.
Added Phrygian B12
Added Thracian B8 and B9
Added Celt Monte Bibele
Added Illyrian Helmets (B1; B2; B3)
Added new face mask's

Reworked:

Reworked Corinthian Helmet B1 and B2 with a more historically accurate
one.
Reworked the helmet's Crest's adding a better visual ones.
Reworked Phryian Face Mask's with better visual ones.

Renamed:

Renamed Apulo roman helmet to Apulo Itallic.
Renamed Phryian b to b1.
Renamed Thracian b to b1.

This was SVN commit r22913.
2019-09-16 17:11:03 +00:00
14fff267a1 Make health correctly recalculate its cached values when the entity changes owner.
Following e16c4c4800, the ModifierManager no longer sends
ValueModificationMessages when an entity changes owner to/from
INVALID_ENTITY. This happens in particular when the entity is renamed.

For now, components must check on their own in OwnershipChanged.

Reported By: Freagarach
Patch By: Angen
Reviewed By: wraitii
Fixes #5588

Differential Revision: https://code.wildfiregames.com/D2286
This was SVN commit r22912.
2019-09-16 17:07:50 +00:00
4d4bf579b2 Report and tolerate XML GUI object setting errors when parsing XML attribute strings as values for settings that don't exist on the GUI object.
Following e326ebae46, 80b1876b77, d6db5a466d, ... the XML errors were
silently ignored.
Following 1a49ccb294 it led to a crash (m_Setting access for an item
that does not exist).

Differential Revision: https://code.wildfiregames.com/D2297
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22911.
2019-09-16 16:13:25 +00:00
61e3f1ec0d Fix hotkey events synching with hotkey state.
This is a semi-revert of 78bc56f33e and a correct fix for #3194.

The core issue is that the GUI handler must come behore the hotkey
handler, otherwise typing in boxes can set off hotkeys, and the hotkey
handler is repsonsible for updating the hotkey state.
Thus the GUI handler never has an up-to-date hotkey state, since that's
done later. 78bc56f33e fixed that by calling HotkeyInputHandler
manually, but that was still broken in some (unused) cases and was hacky
(indeed, it even looked hacky as noted by elexis).

The simplest fix is to split the 'hotkey creator' handler from the
'hotkey state change' handler, and run the 'hotkey state change handler'
before any other handler. Thus the gui handler remains in front of the
'hotkey creator' handler, but it has a correct hotkey state at any time.

Differential Revision: https://code.wildfiregames.com/D1839
This was SVN commit r22909.
2019-09-15 12:16:28 +00:00
c6e5c83b6d Workaround differences between libc and libstd string stream parsing of float/doubles.
libc and libstd differ on how they parse strings. This has a remote
chance of breaking mods and 0 A.D. code, and it broke tests on MacOS.

Add a workaround to ensure they are consistent.

Comments by: vladislavbelov
Fixes #2780

Differential Revision: https://code.wildfiregames.com/D1988
This was SVN commit r22908.
2019-09-15 12:02:26 +00:00
5faf540980 -ise → -ize
Summary: This patch corrects two occurrences of -ise into -ize in the
quotes, because US spelling.

Test Plan: Ought to be unproblematic.

Reviewers: Gallaecio

Reviewed By: Gallaecio
Subscribers: Itms, Stan, Freagarach, O8 JS GUI

Differential Revision: https://code.wildfiregames.com/D2246
This was SVN commit r22907.
2019-09-15 11:52:59 +00:00
740ba4cb78 standardize gather technology tooltips
Summary:
This patch standardizes the tooltips of gather technologies, per
https://trac.wildfiregames.com/wiki/EnglishStyleGuide#Stats
Flavour text strings are moved from the "tooltip" to the "description"
entry.

Test Plan: Check for mistakes and omissions.

Reviewers: Gallaecio

Reviewed By: Gallaecio
Subscribers: Freagarach

Differential Revision: https://code.wildfiregames.com/D2253
This was SVN commit r22906.
2019-09-15 11:51:59 +00:00
5cc49c2326 standardized hero aura descriptions
Summary:
This patch rephrases the aura descriptions of hero auras to an uniform
standard, to ensure descriptions follow the actual modifications:
[player] [class] [change] [attributes], e.g. "Spearmen +1 capture attack
strength, +25% melee attack damage." instead of "+25% attack and +1
capture for spear soldiers."

See also D1720, D1806, D1807.

The `formation` and `garrison` type aura descriptions are ugly;
improvement suggestions are welcome.

Test Plan: Check for mistakes and omissions.

Reviewers: Gallaecio, Freagarach

Reviewed By: Gallaecio, Freagarach
Subscribers: Freagarach, elexis, Vulcan

Differential Revision: https://code.wildfiregames.com/D1808
This was SVN commit r22905.
2019-09-15 11:48:59 +00:00
795f453eb7 manual/intro.txt corrections
Summary:
Another follow-up to D1719 and D1744. This one does the following:
* [font="sans-14"] (default) at the end of the line that used a
different font, rather than at the beginning of the next line (no net
change, but looks better in the file)
* two spaces for indentation of hotkeys (looks better in game)
* ` – ` (space en-dash space) instead of `: ` (colon space) to separate
hotkey and description, for better visibility and consistency.
* `6400px by 4800px` → `6400×4800 pixels`
* removed Alt+W entry (superseded by Alt+Shift+W above)
* inserted Esc entry under save game for completeness
* rephrased several descriptions

Before: {F1014718}
After: {F1014719}

Test Plan: Launch the game and open the manual.

Reviewers: O7 Catchall, Gallaecio, elexis, Itms

Reviewed By: Gallaecio
Subscribers: Freagarach, O8 JS GUI, Stan, elexis

Differential Revision: https://code.wildfiregames.com/D2110
This was SVN commit r22904.
2019-09-15 11:44:48 +00:00
98b8775cd9 Fix glooxwrapper::Message::when() memory leak in f2c76cc75d, refs #3156.
Differential Revision: https://code.wildfiregames.com/D2291
Tested on: clang 8.0.1

This was SVN commit r22903.
2019-09-15 10:28:23 +00:00
d592bf9cb6 Move path computations to an actual worker to prepare for threading.
This moves the "async" pathfinding computations to a worker, preparing
the architecture for threading.

Tested By: Kuba386, Stan`
Differential Revision: https://code.wildfiregames.com/D1918
This was SVN commit r22902.
2019-09-15 09:27:10 +00:00
2333b1814e GUI support for Status Effects and extend their functionality to all attack effects following 16b452cf91
This fixes status effects following 16b452cf91 where the GiveStatus name
change broke them.

This lets status effects deal all types of damage, capture, or inflict
other status effects, like any attack.
This further adds some basic GUI spport to status effects, by showing up
to 5 icons in the top-right of the portrait, and including status
effects in the tooltips.

Status effects can specify a custom icon.

Differential Revision: https://code.wildfiregames.com/D2218
This was SVN commit r22901.
2019-09-15 09:24:52 +00:00
89e511def9 Allow JS GUI pages to find out if the game is running.
Differential Revision: https://code.wildfiregames.com/D2289
Tested on: clang 8.0.1.

This was SVN commit r22900.
2019-09-14 15:33:46 +00:00
cab920696c Implement glooxwrapper::MUCRoom argument for muc event handlers.
I.e. don't dereference NULL if the user of the glooxwrapper library
reads from the provided room argument.
A step towards being able to use XmppClient with multiple rooms.

Differential Revision: https://code.wildfiregames.com/D2287
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22898.
2019-09-13 15:24:44 +00:00
a84e2e57df Use ScriptInterface::CreateObject for ToJSVal<CColor>, and for ToJSVal<Grid<u8> >, ToJSVal<Grid<u16> > used by the AIManager obtaining the pathfinder grid.
Make that function static, so that it can be used for these functions
without slowly having to obtain the ScriptInterface instance using
GetScriptInterfaceAndCBData just to get the JSContext again.
Remove few redundant conversions for CreateObject arguments.

Differential Revision: https://code.wildfiregames.com/D2128
Tested on: gcc 9.1.0, clang 8.0.1, Jenkins
Tedious performance testing in: D2128, D2127

This was SVN commit r22894.
2019-09-13 00:56:51 +00:00
7f943b07b7 Enable no-caller and no-irregular-whitespace in ESLint, refs #5524.
https://eslint.org/docs/rules/no-caller
https://eslint.org/docs/rules/no-irregular-whitespace

Differential Revision: https://code.wildfiregames.com/D2237
Patch By: Krinkle
This was SVN commit r22893.
2019-09-12 21:36:42 +00:00
cbc04ba83b Use all three color channels when loading heightmaps following 204b04f2d4, refs #5018.
Removes wrong debug leftover line from 204b04f2d4 and unneeded clamp
from c9abf6f68c.

Differential Revision: https://code.wildfiregames.com/D1816
Patch By: Angen
Comments By: Vladislav
This was SVN commit r22892.
2019-09-12 19:30:43 +00:00
4c454f3eee Fix missing wstring_from_utf8 for multi-user-chat messages and translated strings following 9023f4bebb / D2264.
The commit introduced support for arbitrary lobby CreateGUIMessage
JS::Value arguments but didn't transfer wstring_from_utf8 appropriately.
Instead of enlengthening the code by reintroducing utf8_from_wstring
everyhwere, shorten the code and specialize ToJSVal for
glooxwrapper::string and gloox enums.

Avoid string copies for XmppClient getters, refs D1668:
Change GetPresence() and GetRole() to return the pointer to the string
literal instead of copy constructing a std::string each call.
Don't reintroduce the unneeded utf8_from_wstring conversions for the
untranslatable ASCII identifiers returned by GetPresence() and
GetRole().
Change GetSubject() to return a const ref to the member instead of copy
assigning the std::string to an output value.
Change m_Subject to std::wstring to avoid constructing a copy using
wstring_from_utf8 each GetSubject() call.
Change gloox enum to translatable string functions to be static, so as
to use them in the new ToJSVal functions (enabled by not calling
CertificateErrorToString from ConnectionErrorToString anyymore in
92fc34c87c/D2274).

Avoid per-player string copies in m_PlayerMap:
Change m_PlayerMap value type from std::vector<std::string> to a new
PlayerMap struct with named members for readability.
Use gloox enums as PlayerMap values to avoid constructing (performance)
and storing (memory footprint) std::strings.
The JS String is created from the pointer to the ASCII string literal
without intermediaries.
Use glooxwrapper::string for nickname and m_Rating since it's the data
source type received in relevant places, but that might be improved for
performance with std::wstring.

Construct map values in place where possible and post error instead of
silently inserting if an existing value is to be modified.
Avoid repeated std::map lookups on string keys by caching the
PlayerMap::iterator where available.

Remove some glooxwrapper::string to_string() calls redundant with its
operator<< and improve DbgXMPP gloox enum output.
Transfer rating too upon nickchange.

Differential Revision: https://code.wildfiregames.com/D2271
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22891.
2019-09-12 17:23:33 +00:00