1
0
forked from mirrors/0ad
Commit Graph

19837 Commits

Author SHA1 Message Date
Gallaecio 27a190578f correct descriptions and tooltips of siege technologies
Patch By: Nescio
Differential Revision: D2186
This was SVN commit r22783.
2019-08-25 09:19:01 +00:00
Gallaecio 37a2149cb4 update fortress tooltips
Patch By: Nescio
Differential Revision: D2189
This was SVN commit r22782.
2019-08-25 09:17:58 +00:00
Gallaecio 0dbc66a391 update workshop tooltip
Patch By: Nescio
Differential Revision: D2190
This was SVN commit r22781.
2019-08-25 09:16:53 +00:00
Gallaecio 5f6e2c789c remove incorrect book numbers from Plutarch Moralia
Patch By: Nescio
Differential Revision: D2191
This was SVN commit r22780.
2019-08-25 09:15:23 +00:00
elexis 4919a6185e Remove unused GUIUtil functions, unused GUI includes and some tails in GUIUtil.
HasSetting from 3dfa23cd25 is actually redundant with
IGUIObject::SettingExists.
GetSettingPointer from 8f4f8e240f is superseded by GetSetting reference
following 3dfa23cd25 and 040624acff.
Deregister copying SetSetting variants for CStr and CStrW following copy
removal in 040624acff.
The default template <typename T=int> from c2a71e41bf can be removed
following FallBackSprite/FallBackColor removal in 9985fcf5bd and
RecurseObject unification in d4d5187c9d.
Delete all unused GUI includes, refs D1478.
Remove GUIUtil friend class following something.

Differential Revision: https://code.wildfiregames.com/D2225
Tested on: gcc 9.1.0, Jenkins

This was SVN commit r22779.
2019-08-25 08:57:36 +00:00
elexis b197df5ee6 Fix valgrind conditional jump depending on uninitialised value warning in CGUIManager::HandleEvent from 7c2e9027c2.
The warning seems to be a false positive and happens with clang but not
gcc.

Differential Revision: https://code.wildfiregames.com/D2223
Reviewed By: Vladislav
This was SVN commit r22777.
2019-08-24 22:25:26 +00:00
Alexandermb 9977ddaeff Replace samnite_swordsman.xml actor properly following 31c128b282
reported by: @Freagarach and @Nescio
This was SVN commit r22776.
2019-08-24 19:30:12 +00:00
Alexandermb 31c128b282 Carthaginian mercenaries duplication removal.
Remove duplicated actors from carthaginian civ folder due to redundance
of having twice the same infantry in two folders.

carthaginians/infantry_slinger_e.xml > iberians/infantry_slinger_e.xml

carthaginians/infantry_swordsman_e.xml > gauls/infantry_swordsman_e.xml

Also include a fix for an unsync frame of the idle_ready_shieldsmall.dae
animation.

This was SVN commit r22775.
2019-08-24 18:54:26 +00:00
Alexandermb 51f1436ee2 Add syntagma formation variant for every civ pikeman infantry.
Also add phalanx to hoplite cape.

This was SVN commit r22774.
2019-08-24 18:07:59 +00:00
elexis 55efe4a735 Fix L10n::FormatMillisecondsIntoDateString memory leak following c92e74138a, refs a74fcdcb35, #3350, #4418, #2938.
createDefault returns a new pointer to be deleted, getGMT returned a
pointer to an icu variable not to be deleted.

Differential Revision: https://code.wildfiregames.com/D2220
Reviewed By: Vladislav
This was SVN commit r22773.
2019-08-24 17:33:29 +00:00
wraitii 62dd922bc0 pthread -> std::thread (5/7) - Replace sdl semaphore with condition variable
This removes a dependency on the SDL_Thread header.

Differential Revision: https://code.wildfiregames.com/D1921
This was SVN commit r22772.
2019-08-24 11:26:58 +00:00
Gallaecio b429d0ce03 Quote all book names in quotes.txt
Differential Revision: D2178
This was SVN commit r22771.
2019-08-24 09:24:13 +00:00
wraitii 97ee3211d4 Common template name change: hellenic_royal_stoa → stoa
The old name was unnecessary long, but also potentially misleading:
stoas are Greek, but not necessary royal, and there are no other stoas
in game. Just “stoa” is clearer, more correct, and more consistent with
other `template_structure_*.xml` names.

Patch By: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2036
This was SVN commit r22770.
2019-08-24 09:00:46 +00:00
wraitii 9280b57e79 Make damage bonuses, attack preferred classes and garrisonHolder ejectable classes use MatchesClassList.
MatchesClassList supports additional functionalities (and, not and or).

Reviewed By: wraitii
Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2115
This was SVN commit r22769.
2019-08-24 08:52:15 +00:00
wraitii 47581ea900 Fix resourceGatherer value modifications following e16c4c4800
e16c4c4800 expects player-wide modifications to invalidate entity
caches.
However, this requires the entity to have an owner when calling
ApplyModifiers.

ResourceGatherer caches its gather rates at Init, when entities do now
yet have their correct owner, and thus this fails.
Since OnOwnershipChanged also caches gather rates however, this call is
redundant (and needlessly slow) so it can just be deleted.

Differential Revision: https://code.wildfiregames.com/D2217
This was SVN commit r22768.
2019-08-24 08:20:30 +00:00
wraitii e16c4c4800 Add a system component to handle stat modifiers, make technologies and auras use this common interface.
The ModifiersManager system component provides an interface to add and
remove modifiers, and get modified stats.
The goal is to merge all the different stat-modifying systems 0 A.D. has
implemented over the years.
This commit makes technologies and auras use ModifiersManager. Some
cheats and AI bonuses also have a similar stat-modifying effect that
have not yet been updated.

Further, this system component makes it possible for e.g. triggers to
easily add modifiers, enabling the writing of Castle Blood Automatic,
RPG or Tower Defense maps without the need for mods or hacks.

The 'Modifier' name was preferred over 'Modification' as it is shorter
and more readable, along with the logic that 'modifiers' store
'modifications' and this stores modifiers. Renaming of other functions
and classes has been left for future work for now.

Internally, this uses a JS data structure. If performance issues arise
with it in the future, this data structure or the whole component could
be moved to C++.
The performance has been tested to be about as fast as the current
implementations (and specifically much faster for global auras with no
icons). Testing showed that sending value modification messages was by
far the slowest part.

Comments by: leper, Stan, elexis
Differential Revision: https://code.wildfiregames.com/D274
This was SVN commit r22767.
2019-08-24 07:37:07 +00:00
elexis 040624acff Replace copy-assigning GUI<T>::GetSetting from c2a71e41bf with the reference returning GetSetting from 3dfa23cd25.
Avoids one or two dozen unoptimizable string copies and two CPos copies,
mostly in SetupText.

The reference return allows to mark values as const where the previous
one prevented that.
This also reveals unused variables where the previous code hid them.

Thus use unused variable "buffer_zone" in the otherwise unused (since
b1422137e5, refs 0f807c643a) CCheckBox::SetupText() from b5f6d19332 and
use the unused variable "scrollbar" in CInput GUIM_MOUSE_PRESS_LEFT from
4113aa0a36.

Refs unintentionally copied DrawCall cache due to GetSetting copying in
c19f3608a5, fixed in 8f4f8e240f.

Differential Revision: https://code.wildfiregames.com/D2215
This was SVN commit r22765.
2019-08-23 14:43:10 +00:00
elexis 4d77bd6542 Fix unused glooxwrapper variable following 61261d14fc, refs #2305, #5294, #5550.
The class didn't leak the m_Wrapped gloox Jingle for this program since
it's not set to owned, and it's not set to owned because gloox deletes
it.
It would have leaked if some other app would have used glooxwrapper with
owned = true, if gloox has a situation for that.

Differential Revision: https://code.wildfiregames.com/D2090
This was SVN commit r22764.
2019-08-23 12:04:20 +00:00
elexis e02afa279c Remove hardcoded C++ fallback font from 70d84beab2 and according TODO from 924b0bf1b4 that was fixed in 6af0d7cfd3 by having the default style specify the default font.
Use references instead of copies for obtaining the font in SetupText().

Differential Revision: https://code.wildfiregames.com/D2214
This was SVN commit r22761.
2019-08-23 03:28:04 +00:00
Alexandermb fcd15d0ad5 Update elephantry_r of the following factions:
carthaginians/elephantry_c_r.xml
ptolemies/elephantry_c_r.xml

Also add new variants for the ptolemaic cavalry.

ptolemies/cavalry_spearman_e_r.xml
ptolemies/hero_cavalry_swordsman_ptolemy_IV_r.xml

This was SVN commit r22760.
2019-08-23 03:07:22 +00:00
Alexandermb 1f6b4702ee Fix the warning of fishermans unrecognized skeleton.
Thread:
https://wildfiregames.com/forum/index.php?/topic/26866-could-not-load-animation/&tab=comments#comment-383334

The issue was a variant "base" file using two of the old armature death
animations.

Also clean the repository from having the old actors with the old meshes
in the meshes/structural folder.

Issue reported by @gameboy

This was SVN commit r22759.
2019-08-23 02:50:55 +00:00
elexis 8609041ddf Fix missing actual boolean check in the commit removing the odd way to check for a boolean in 77b81d8761.
Reported By: Vladislav
Reviewed By: Vladislav
This was SVN commit r22758.
2019-08-23 00:42:00 +00:00
elexis f4990cf967 Mark some GUI functions as const, including the boolean ones from d4d5187c9d.
Rename MouseOver to IsMouseOver.

Reported By: Vladislav
This was SVN commit r22757.
2019-08-22 23:51:10 +00:00
elexis 0e26503cc6 Introduce IGUIObject::PlaySound to unify 19 copies of the UI sound play following 9565c60a14, refs #948.
Stops copying the CStrW each time a sound is played by using the
reference GetSetting variant.

Differential Revision: https://code.wildfiregames.com/D2209
This was SVN commit r22756.
2019-08-22 22:34:12 +00:00
vladislavbelov 659bf68cc7 Cleanup Camera and CGameView, removes a not needed method and refactors classes.
Commented By: Stan
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2195
This was SVN commit r22755.
2019-08-22 20:49:58 +00:00
wraitii 16b452cf91 Generalise Attack effects. All attacks, including death damage and splash, can deal any number of attack effects (damaging, capture, giving status effects.)
This moves most of what was in the Damage system component to a helper,
and renames that component DelayedDamage.
It also introduces a new global script with all possible attack effects.

Comments Taken From: Freagarach, Stan, bb

Differential Revision: https://code.wildfiregames.com/D2092
This was SVN commit r22754.
2019-08-22 18:00:33 +00:00
wraitii cc1ea7cca0 Make Promotion.js use the common Transform helper, add resource gatherer and promotion to said helper.
Fixes #4334

Differential Revision: https://code.wildfiregames.com/D2026
This was SVN commit r22753.
2019-08-22 17:25:44 +00:00
Alexandermb 1d1471aba9 Replace the horse rein with a less basic version
This was SVN commit r22752.
2019-08-22 15:11:07 +00:00
Alexandermb 7efaf75d94 Adjust some helmets following the latest changes on human bodie armature.
(Also remove two files exported from blender by mistake)

This was SVN commit r22751.
2019-08-22 15:06:31 +00:00
Alexandermb e0eb712eb5 Adjust archers right hand position and rotation according to the discussion in the thread.
Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/12/&tab=comments#comment-383214

This was SVN commit r22750.
2019-08-22 15:04:49 +00:00
Alexandermb 5bfd0a97eb Update outdated icons and last updated cavalry icons to use the new horse assets
Also separate Gauls from Britons

This was SVN commit r22748.
2019-08-21 18:03:28 +00:00
Alexandermb e513c94366 Fix seleucid hero horse antiochus_the_great from using "objectcolor" material instead of basic_trans_parallax_spec
This was SVN commit r22747.
2019-08-21 17:57:52 +00:00
Alexandermb 7db11d112e Fix warnings mentioned by @Stan
Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/12/&tab=comments#comment-383089

This was SVN commit r22746.
2019-08-21 14:18:12 +00:00
Stan 3f9f1e379c Fix the last checkrefs.pl warning.
This was SVN commit r22745.
2019-08-21 13:48:09 +00:00
elexis d4d5187c9d Use variadic template for RecurseObject from c2a71e41bf and move it from GUIutil to IGUIObject.
Unifies the four copies of the function while making it more versatile.
Supersede the hardcoded GUIRR enum and CheckIfRestricted function with a
flexible member function pointer.
Replace the custom IGUIObject iterator with a casually iterable
GetChildren getter, so that it is more obvious what it iterates on.
Implement TODO from e21ebb37f5, i.e. RecurseObject not iterating over
the base object.

Differential Revision: https://code.wildfiregames.com/D2204
Tested on: gcc 9.1.0, clang 8.0.1, VS2015

This was SVN commit r22744.
2019-08-21 13:22:25 +00:00
Alexandermb 0a29e04f1c Fix some warnings and adjust some 1 animation from having sheath throught the leg.
Assign helmet properly to philip_r.

Assing falcata sheath to iberian_infantry

This was SVN commit r22743.
2019-08-21 13:19:32 +00:00
Stan ff1191f538 Fix most of the warnings.
The last one needs a png file see
https://wildfiregames.com/forum/index.php?/topic/26720-task-aspis-remake/page/3/&tab=comments#comment-383062

Add two incorrectly deleted animations in the new folder in 9ef5e274c7
Make the erroring variants use the animations added in 3f0dcc6353 and
cf1e1b463c instead of the 'new' folder.
Make the fisherman use the death animation.
Use the c variant of an animation instead of the d one that does not
exist.

This was SVN commit r22742.
2019-08-21 11:46:12 +00:00
elexis e1014aad3b Use CGUI& instead of CGUI* so that the 50+ users stop wondering whether or not that is null and can't even be mistaken to add redundant null checks preemptively.
Remove the remaining of such checks after d3e56f0f57 removed 21 of them
already.
2c47fbd66a initialized the pointer at construction time rather than at
random conditional events later.

Differential Revision: https://code.wildfiregames.com/D2205
Comments By: Vladislav, wraitii
Tested on: gcc 9.1.0, clang 8.0.1

This was SVN commit r22741.
2019-08-21 10:12:33 +00:00
Stan 632f687ab6 Animations re-export "Infantry-Siege-Operators-Onager"
Patch by: @Alexandermb
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22740.
2019-08-21 08:29:22 +00:00
vladislavbelov 486691b49a Moves and cleanups includes and public/private section of PostprocManager.
Reviewed By: elexis
This was SVN commit r22738.
2019-08-20 21:15:15 +00:00
vladislavbelov 3285f43394 Fixes bug with disabled fog on water. The usage of USE_FOG was introduced in 2c8b78ddaa and removed in 01a8138780.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2198
This was SVN commit r22737.
2019-08-20 21:03:46 +00:00
Alexandermb 63f3428363 Fix 1 animationn
Following  a56c81a79c

front_left_walk.dae Exported all scene instead of the animation and the
mesh.

Note: Committed as two because HTTP Request timeout won't let me

This was SVN commit r22736.
2019-08-20 20:39:45 +00:00
Alexandermb d381f62113 Remove front_left_walk.dae from formations/testudo for commit the new one.
Request timeout HTTP 408 issue.

This was SVN commit r22735.
2019-08-20 20:10:26 +00:00
Alexandermb 4c1a3d9b3f Fix 1 animation.
Following  a56c81a79c

idle_ready_shield.dae Last frame not sync with first frame.

This was SVN commit r22734.
2019-08-20 20:03:26 +00:00
Alexandermb df4458e031 Fix of concern raised following the latest commits 2.
Following a56c81a79c

Emergency commit of what is fixed already because an ongoing blackout in
my country.

Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/10/

This was SVN commit r22733.
2019-08-20 19:57:10 +00:00
Alexandermb a56c81a79c Fix of concern raised following the latest commits.
Emergency commit of what is fixed already because an ongoing blackout in
my country.

Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/10/

This was SVN commit r22732.
2019-08-20 19:22:16 +00:00
Stan 3962a050f5 Rename gastraphetes template corrects the <Identity> node:
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2202
This was SVN commit r22731.
2019-08-20 18:38:25 +00:00
Alexandermb baa9ac4a50 Assignation of Shields (Aspis and Peltast) and Greaves for the infantry + Several adjustments
following the next committs:

1 - Animations re-export 9ef5e274c7
2 - Aspis Remake c0b562f79b
3 - Greaves ff8fadcd22
4 - Peltast Remake 5ae660300e
5 - Special formations 95a9ecf99e
6 - Preparation of infantry textures for the use of Greaves ebf907534a

This was SVN commit r22730.
2019-08-20 16:23:17 +00:00
Alexandermb 35a1b6759a Peltast Variants.
Forgot to committ variants in 5ae660300e.

Following the fixes of #4460

Thread:
https://wildfiregames.com/forum/index.php?/topic/26817-task-peltast-shields/page/2/

This was SVN commit r22729.
2019-08-20 16:08:21 +00:00
Alexandermb ebf907534a Preparation of infantry textures for the use of Greaves.
Following ff8fadcd22

Note: .dds textures won't be modified since they lost player color when
saving again.

This was SVN commit r22728.
2019-08-20 15:53:16 +00:00