1
0
forked from mirrors/0ad

Compare commits

...

1733 Commits

Author SHA1 Message Date
vladislavbelov 85854db8d6 Fixes water rendering on map borders.
Tested By:
Differential Revision: https://code.wildfiregames.com/D4716
This was SVN commit r27102.
2022-09-12 21:53:36 +00:00
Stan cfa4aff773 Fix translations script pipeline.
This was SVN commit r27100.
2022-09-12 11:35:27 +00:00
Stan 33762aa24e Update dockerfiles images to match jenkins
This was SVN commit r27097.
2022-09-12 07:37:47 +00:00
Stan 7e481b73cd Update jenkinsfiles to match upstream.
Windows now builds the actor editor for autobuilds, and stores the test
results.
All bundle now has an option to only build the macOS bundle and uses the
number of cores available to build.
docker-translations now builds the long string locale. Fixes #5009.
New script that is run periodically to check if the nopch build still
works.
Docker docs now builds the template analyser data and uploads it to the
server.
Add the design docs script.
Add a new script to build the game using linux with custom flags, such
as gles, clang, special linker etc.

This was SVN commit r27096.
2022-09-11 17:28:32 +00:00
wowgetoffyourcellphone 4c4562699c [Alpha 26] Fix so that swordsman heroes can use the Testudo (if their civ allows it)
This was SVN commit r27095.
2022-09-11 15:58:28 +00:00
Dunedan a72fa8f7c7 Remove code for the lobby bots from SVN
This removes the code for the lobby bots from SVN to avoid confusion as
the code is now hosted on Github at https://github.com/0ad/lobby-bots.

Differential Revision: https://code.wildfiregames.com/D4155
This was SVN commit r27094.
2022-09-11 13:21:41 +00:00
Dunedan 7f5e664eec Remove code for the lobby bots from SVN
This removes the code for the lobby bots from SVN to avoid confusion as
the code is now hosted on Github at https://github.com/0ad/lobby-bots.

Differential Revision: https://code.wildfiregames.com/D4155
This was SVN commit r27093.
2022-09-11 13:14:20 +00:00
vladislavbelov a91ff9c7f5 Replaces -1 as stencil mask value in effect XML by a positive mask.
Differential Revision: https://code.wildfiregames.com/D4785
This was SVN commit r27092.
2022-09-10 20:23:28 +00:00
Stan 6109fd3ee0 Fix the check translation script failing.
This was SVN commit r27091.
2022-09-10 17:16:32 +00:00
Stan 32ccabeba6 Fix ministers being trainable by all civs.
Reported by: @Nobbi
This was SVN commit r27088.
2022-09-04 10:47:21 +00:00
user1 40bb300efd Amend ToU to disallow account sharing.
Reviewers: Stan, Dunedan

Accepted By: Stan
Differential Revision: https://code.wildfiregames.com/D4783
This was SVN commit r27087.
2022-09-03 17:08:21 +00:00
Stan 6acc4b4a5b Don't mix locally installed python libs when building
Patch by: @baco
Differential Revision: https://code.wildfiregames.com/D4776
This was SVN commit r27084.
2022-09-01 20:49:16 +00:00
Stan 6e8e6e986d Fix glad not building on BSD
Differential Revision: https://code.wildfiregames.com/D4781
This was SVN commit r27083.
2022-09-01 20:44:49 +00:00
Stan f2c80badbf Don't try to build Atlas when wxconfig is missing
Reported by: @andy5995
Comments by: @lyv, @vladislavbelov, @andy5995
Fixes #6615
Differential Revision: https://code.wildfiregames.com/D4777
This was SVN commit r27082.
2022-09-01 20:42:59 +00:00
Stan f616327f2d Revert 10554eb5b1 as it prevents building on FreeBSD.
This was SVN commit r27081.
2022-09-01 20:39:46 +00:00
wowgetoffyourcellphone 8eae4979c3 [Alpha 26] Fixes additional unit actors, for Roman Testudo and Anti-Cav idle animations, as well as an oversight with Athenian hero Pericles.
Fixes #6614

This was SVN commit r27080.
2022-09-01 19:27:00 +00:00
wowgetoffyourcellphone c938113609 [A26] Fix Hoplite and Pikeman actors for Phalanx and Syntagma idle animations. Add syntagma variants for Han halbs, for edge cases.
Differential revision: https://code.wildfiregames.com/D4780
This was SVN commit r27079.
2022-09-01 16:32:18 +00:00
vladislavbelov 6be7bd0677 Fixes space correction after f4128208de.
Tested By: phosit
Differential Revision: https://code.wildfiregames.com/D4774
This was SVN commit r27077.
2022-08-30 17:46:33 +00:00
Stan e799ee7088 Switch names between ministry and civil_centre.xml reported by @AIEND.
https://wildfiregames.com/forum/topic/83323-balancing-the-han/page/6/#comment-517225

This was SVN commit r27075.
2022-08-27 11:57:08 +00:00
vladislavbelov 2ee13983a1 Minor fixes for NSIS - Windows distribution script, HTTP > HTTPS.
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D4756
This was SVN commit r27073.
2022-08-26 16:01:57 +00:00
Stan d1586e0edf Fix perioikoi hoplites not assuming the idle phalanx stance as the champions and heroes do.
This was SVN commit r27071.
2022-08-24 12:29:29 +00:00
Stan 6eb58a1248 Fix incorrect civilization being set in the spartan sandbox. Introduced in afde89eb33
This was SVN commit r27070.
2022-08-24 12:21:34 +00:00
Stan acb939e7bc Don't wait for observers by default and let them lag as much as needed.
Discussed with: @alre, @wraitii, @real_tabasco_sauce, @chrstgtr, @Sevda
Thread:
https://wildfiregames.com/forum/topic/18003-suggestions-for-0-ad/page/157/#comment-516302

This was SVN commit r27069.
2022-08-24 12:08:46 +00:00
marder 03e3f0f1f1 [Maps] Enable Napata citizen cavalry on Jebel barkal again
Oversight in daaa87b48c , noticed by @Freagarach

This was SVN commit r27066.
2022-08-21 08:03:24 +00:00
vladislavbelov d286080285 Fixes the default number of workers in TaskManager in case of zero hardware_concurrency.
Differential Revision: https://code.wildfiregames.com/D4768
This was SVN commit r27064.
2022-08-20 20:40:05 +00:00
Stan 2285d84d3d Fix warning reported by the NOPCH automatic CI.
This was SVN commit r27063.
2022-08-20 12:25:19 +00:00
marder fbded636a2 [Gameplay] - Small nerf to CS crossbows
patch by: @real_tabasco_sauce
accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4754
This was SVN commit r27061.
2022-08-18 18:24:51 +00:00
Stan 14b8fb3b3b Add small flower borders to the han civic center to make its footprint more obvious.
Thread:
https://wildfiregames.com/forum/topic/86856-very-strange-field-sticking-near-han-city-center-by-ctrl/

This was SVN commit r27060.
2022-08-17 09:39:54 +00:00
Stan e947dcb23c Fix ab16e60afa
Reported by: @Langbart
Accepted by: @Vladislavbelov
Tested by: @Langbart
Fixes: #6603
Differential Revision: https://code.wildfiregames.com/D4765
This was SVN commit r27058.
2022-08-16 14:57:28 +00:00
Stan ab16e60afa Fix previous commit.
This was SVN commit r27056.
2022-08-14 18:22:48 +00:00
Stan c9dc8676a6 Fix mod installation in non latin folders. Use OSString for consistency.
Refs e7ab22286e
Refs 880a797ce0
Refs 404e1a9a4a
Refs 52baaa4bbd

This was SVN commit r27055.
2022-08-14 17:55:08 +00:00
Stan 880a797ce0 Fix replay cache creation in non latin folders.
IRC:
https://irclogs.wildfiregames.com/%230ad-dev/2022-08-14-QuakeNet-%230ad-dev.log
Reported by: @AirXonix2
Thread:
https://wildfiregames.com/forum/topic/89261-a-new-series-of-bugs/#comment-514734
Discussed with: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4763
This was SVN commit r27054.
2022-08-14 17:23:50 +00:00
Stan 8c497bea0d Fix an edge case when you would delete the last savegame and thus, the metadata would be undefined.
Introduced in a8c6d7a82b
Thread:
https://wildfiregames.com/forum/topic/89261-a-new-series-of-bugs/#comment-514015

This was SVN commit r27053.
2022-08-14 15:10:38 +00:00
marder daaa87b48c [Maps] Fix Jebel barkal after 01fd2564e5
since only infantry can garrision in stables now.

Reported by: Gurken Kahn
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/page/16/#comment-514594

Troubleshooting by @lyv

This was SVN commit r27052.
2022-08-14 15:05:48 +00:00
Stan fc374d3718 Fix Athenian Gymnasion counting as a City Phase building, when it's actually a Town Phase building. Maybe we should add that class automatically at some point.
Reported by: Player of 0AD
Thread:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/?do=findComment&comment=514655

This was SVN commit r27051.
2022-08-14 10:37:43 +00:00
Stan 5cdb9f6244 Recenter Han emblem logo slightly and fix the name.
Noticed by: @vladislavbelov
This was SVN commit r27050.
2022-08-14 10:29:45 +00:00
vladislavbelov 291182683d Adds explicit z value for main menu buttons to workaround low resolutions to be able to exit.
Reviewed By: marder, Stan
Differential Revision: https://code.wildfiregames.com/D4757
This was SVN commit r27049.
2022-08-13 11:22:33 +00:00
marder c9f7bf35ac Add in 92a96785a4 removed Han swordsman templates back in under a different name
So people can use them in atlas
Request by @wowgetoffyourcellphone

This was SVN commit r27048.
2022-08-13 09:19:27 +00:00
marder 92a96785a4 [Gameplay] Enable other civ's to train champions in Han barracks and stables
Reported by Player of 0AD:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/page/16/#comment-514122

Note that this also deletes the Han swordsman templates, as they are
unused right now.

This was SVN commit r27046.
2022-08-11 20:31:05 +00:00
Stan 4f3adf7fa6 Fix mipmap issue with the camel rein. Use a very light texture as most details are not really visible.
Fixes #6556
Reported by: @Langbart
This was SVN commit r27045.
2022-08-11 17:46:35 +00:00
marder 3eea53ae66 [Gameplay] Make fences capturable
Request by Gurken Khan
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/page/16/#comment-513790

And I agree, it is annoying thay you can't just delete them once their
on your territory.

This was SVN commit r27043.
2022-08-10 22:16:38 +00:00
marder a80ce526b7 [Fix] Patch globalscripts technology template helper after 8d80a2186e and the ProductionQueue split
Patch by @s0600204.

This lets all technologies show up correctly in-game and in the
structure tree again.

accepted by: @marder @Freagarach
Fixes: #6587

Differential Revision: https://code.wildfiregames.com/D4755
This was SVN commit r27042.
2022-08-10 21:49:15 +00:00
vladislavbelov 95106b2d9b Fixes crash in Atlas when switching from the Actor viewer. Fixes #6524
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4732
This was SVN commit r27041.
2022-08-10 17:17:24 +00:00
marder d1c9e96f87 [Gameplay] Disable training han crossbow cavalry in other civ's barracks
Request by Player of 0AD:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/page/15/#comment-513182

This was SVN commit r27040.
2022-08-08 21:32:56 +00:00
marder f8ff908d73 [maps] Adjust playerPlacementRiver to group teams on the same side in most cases
Brute forcing the right arrangement, which is unnecessary but accepted
since it has only a negligible performance impact overall.

accepted by: @lyv @andy5995
Fixes: #6390

Differential revision: https://code.wildfiregames.com/D4747
This was SVN commit r27039.
2022-08-08 20:52:05 +00:00
marder 5afbdc6a09 [Gameplay] Disable training persian champions in other civ's barracks
Request by Player of 0AD:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/page/15/#comment-513143

This was SVN commit r27038.
2022-08-08 20:41:17 +00:00
marder 10f2ad4463 [Gameplay] Disable loot for trainable animals
Request by Player of 0AD:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/page/15/#comment-513143

This was SVN commit r27037.
2022-08-08 18:16:58 +00:00
Freagarach f843cf726d Cavalry vision range 92 m -> 80 m.
Patch by: @real_tabasco_sauce
Differential revision: https://code.wildfiregames.com/D4744
Comments by: @asterix, @borg-, @breakfastburrito_007, @chrstgtr,
@marder, @wowgetoffyourcellphone

This was SVN commit r27036.
2022-08-08 07:23:00 +00:00
Freagarach 96d33e02e4 Revert 774e8060d9.
Issue found:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/?do=findComment&comment=513199.
The issue introduced is significantly worse than the stuff it fixed.

This was SVN commit r27034.
2022-08-08 07:14:18 +00:00
Stan 759aa333a5 Add a function to handle custom phase techs, so they do not show as unused.
Fix autostart files being marked as unused.
Fix an issue with the researcher component. Patch by: @marder
Refs https://code.wildfiregames.com/D4750
Refs #6587
Fixes ca82935dfc

This was SVN commit r27033.
2022-08-06 15:06:03 +00:00
Stan fb94d8aa59 Fix writing mod.json on Windows in non Latin user folders.
Accepted by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4741
This was SVN commit r27031.
2022-08-05 17:55:49 +00:00
wowgetoffyourcellphone 0a54a4e2a5 [Alpha 26] [Fix] Restore the Kushite fisherman actor
Reported by @CovenantKillerJ here:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/?do=findComment&comment=512741

This was SVN commit r27029.
2022-08-04 15:36:13 +00:00
Stan 5cd08feba6 Fix issues with the sandbox_han.xml map in 08156e73fc.
Noticed by: @Langbart
This was SVN commit r27028.
2022-08-03 15:55:52 +00:00
Stan 5e824698e9 Fix false positive missing file in checkrefs.py in 22168569c6 (Game ignores double extensions)
Noticed by @Langbart

This was SVN commit r27027.
2022-08-03 15:43:07 +00:00
Stan 1e46b6f7e7 Fix material not using spectex in b8131a0f09
Noticed by @Langbart

This was SVN commit r27026.
2022-08-03 15:41:43 +00:00
marder d6d137bf5d [Fix] Adjust position of ice house and ministry in the building panel
accepted by: @asterix @Langbart
Fixes: #6502

Differential Revision: https://code.wildfiregames.com/D4746
This was SVN commit r27025.
2022-08-01 18:56:10 +00:00
marder a50d582c5f [Fix] Add missing loot to the Han minister
reported on the forums by Gurken Khan:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/page/14/#comment-511954

This was SVN commit r27023.
2022-07-31 21:05:16 +00:00
wowgetoffyourcellphone 6a48b023ad [Alpha 26] [Fix] [Persians] Remove the "City" class from the Persian Ice House.
Reported by @Gurken Khan:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/?do=findComment&comment=511945

This was SVN commit r27022.
2022-07-31 20:55:39 +00:00
marder d76daebb03 [Gameplay] Rebalancing of the Gaul fanatic
patch by : @borg-
accepted by: @chrstgtr @real_tabasco_sauce
Differential revision: https://code.wildfiregames.com/D4722
This was SVN commit r27021.
2022-07-31 11:12:46 +00:00
Stan b9e119e85e Add more world population options.
Requested by: @Edwarf
Accepted by: @Freagarach
Differential Revision: https://code.wildfiregames.com/D4742
This was SVN commit r27020.
2022-07-29 19:50:23 +00:00
wowgetoffyourcellphone b3d8b77173 [A26][Fix][Han] Add turret points to the Han wall gate.
Reported here by @0ad is the best rts game:
https://wildfiregames.com/forum/topic/87305-a26-hans-gate-cannot-be-garrisoned/

This was SVN commit r27018.
2022-07-26 14:16:29 +00:00
Stan 9d2275e26b Fix assertion when trying to draw a line with one point. This would trigger an ensure if one enabled the unitmotion overlay.
Patch by: @vladislavbelov
This was SVN commit r27016.
2022-07-25 20:08:03 +00:00
Stan fbc9e19544 New icon for the han champion_infantry_crossbowman
Fixes #6591
Refs 08156e73fc

This was SVN commit r27013.
2022-07-18 12:06:43 +00:00
Stan b8131a0f09 Use the new crossbow for han champion units.
This was SVN commit r27012.
2022-07-18 12:05:22 +00:00
Stan 22168569c6 New crossbow model for the han champion units.
Refs 08156e73fc

This was SVN commit r27011.
2022-07-18 12:04:43 +00:00
marder 08156e73fc [Gameplay] Han unit roster restructure and other balancing adjustments
After feedback on the first RC's :
https://wildfiregames.com/forum/topic/83323-balancing-the-han/
This version of the roster seems to have a minimal concensus.
This removes some units from the very big roster of the Han,
restructures it and changes the cavalry crossbow champion for an
infantry one due to histrorical issues.
It furthermore reverts the changes to the champion infantry crossbow
template introduced in 9411d8c98e as that nerf wasn't necesarry.
This means that the Han and the Macedonians now have a champion crossbow
unit with the same stats.

Also:

Fixes #6560 by only keeping the "academy" templates, so that the Han can
now only train champions from the academy. Therefore, this reverts parts
of c4bdbe4dd9 and all of 2c9a6704e0.

Discussion with : @borg- @real_tabasco_sauce @wowgetoffyourcellphone
AIEND @Stan and other people on the forums and the Diff.

Differential revision: https://code.wildfiregames.com/D4713
This was SVN commit r27009.
2022-07-17 09:20:52 +00:00
Freagarach fd08ab051f Fix other civs being able to upgrade Han CC to Court.
This ensures the `{civ}` and `{native}` tags are (properly) supported
for upgrades and uses it for the Han CC.

Reported on the forums
(https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/page/10/#comment-508908)
by @Gurken Khan.
Differential revision: https://code.wildfiregames.com/D4733
Comments by: @Stan, @wowgetoffyourcellphone
This was SVN commit r27008.
2022-07-15 17:16:00 +00:00
Stan 2ccf42a244 Add an order sound for the Maurya elephant.
Reported by: @GurkenKhan
Thread:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/?do=findComment&comment=508534

This was SVN commit r27006.
2022-07-12 08:19:14 +00:00
Stan ba9cd30c9b Add missing garrison flag for the maurya houses.
Reported by: @GurkenKhan
Thread:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/?do=findComment&comment=508540
Refs #4581, #6160

This was SVN commit r27005.
2022-07-12 08:09:25 +00:00
Freagarach 3f243b7b50 Fix d1538f7fbd.
Where I forgot to remove the other members when disbanding a formation.

Reported by: @wowgetoffyourcellphone
This was SVN commit r27000.
2022-07-04 05:06:59 +00:00
Freagarach 35e5f268da Fix properties on Persian Champion Infantry Archer XML file.
This was SVN commit r26999.
2022-07-04 05:02:44 +00:00
wowgetoffyourcellphone a7c709c58c [A26][Persians][Fixes] Fixes the Immortal Archer and Ice House for Persians.
This was SVN commit r26998.
2022-07-03 21:04:23 +00:00
wowgetoffyourcellphone 22466770f1 [Alpha 26][Fix][Macedonians] Change Macedonian Team Bonus from Barter Bonus to Siege Bonus
This changes the old bartering bonus, which has been proved to be
mathematically problematic, for a siege-focused bonus, which is also
historically relevant.
Differential revision: https://code.wildfiregames.com/D4729
Forum discussion (lengthy):
https://wildfiregames.com/forum/topic/71578-feedbacks-from-a26-svn-tests/page/6/#comment-485498
Accepted by: @chrstgtr, @real_tabasco_sauce, @borg-
This was SVN commit r26997.
2022-07-03 13:51:56 +00:00
Freagarach b6caf5eb63 Differentiate Persians.
- Allows the immortals to be "upgraded" between sword and bow yielding.
- Reduces batch training time per progressing phase.
- Don't kill the immortals partly when reducing their training time.
- More units from the CC.
- Enable the Ice House.

Patch by: @borg-
Differential revision: https://code.wildfiregames.com/D4724
Accepted by: @chrstgtr, @real_tabasco_sauce
Comments by: @marder, @Stan
This was SVN commit r26996.
2022-07-03 05:44:37 +00:00
Stan 6e3ddadc7e Fix flickering tooltip for user report button
Patch by: @Langbart
Fixes #6581

This was SVN commit r26994.
2022-06-30 13:34:34 +00:00
Freagarach d1538f7fbd Fix formation merging issues.
The motion parameters were calculated even without members, which caused
us to try set a undefined passclass.
Also were members added to previously merged twin-formations. Once
merged (i.e. disbanded), they are moved out of world now.

Some cleanups/deduplication whilst at it.

Reported by: @andy5995 at the forums
(https://wildfiregames.com/forum/topic/71578-feedbacks-from-a26-svn-tests/page/8/#comment-505078)
Differential revision: https://code.wildfiregames.com/D4727
Comments by: @Langbart, @marder
Tested by: @Langbart
Fixes #6580

This was SVN commit r26993.
2022-06-30 06:04:05 +00:00
Stan 5ab132c16c Remove unused han_hero_wei_qing_3.json aura.
Reported by: @Langbart
Fixes #6544
Fixes 77c11753c3

This was SVN commit r26992.
2022-06-28 13:47:39 +00:00
Stan ca82935dfc Add techs and auras to the list of possibly missing files.
Refs: #6544
Accepted by: @Langbart
Differential Revision: https://code.wildfiregames.com/D4725
This was SVN commit r26991.
2022-06-27 14:31:16 +00:00
marder 18bdacbb57 [maps] Adjust position of starting units on oceanside_2p.xml
For the Han they were inside the CC.

This was SVN commit r26989.
2022-06-24 18:01:15 +00:00
marder fd7f091b8c [Gameplay] Han - adjust crossbow stats & training techs
Similar dps as a slinger now, but with higher repat time. Normal citizen
soilder cost.
Nerf the crossbow training technology a bit.
Make the archer & crossbow technology availabe in the stable as well, as
it they also affect cavalry units.

accepted by : @real_tabasco_sauce
positive comment from: @borg-

Differential revision: https://code.wildfiregames.com/D4721
This was SVN commit r26988.
2022-06-24 17:31:02 +00:00
marder a6c1d5bbb9 revert last commit / 39dd5329cc
Misscommunication if this was the right move or not.

Leave the size as it was until someone has time to fix all buttons at
once.

This was SVN commit r26987.
2022-06-24 16:41:53 +00:00
marder 39dd5329cc [GUI] increase msgbox button size to fix text overlap
Report:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/page/6/#comment-504135

3ab25cbd95 added a new button which has more text and can span have
multiple lines in some languages.
Fix: increase the size.
possible todo for the future: unify button sizes or make them adaptive
depending on the text size.

comments by @Langbart @Stan

accepted by @wraitii

Differential revision: https://code.wildfiregames.com/D4707
This was SVN commit r26986.
2022-06-24 11:19:17 +00:00
Stan ec723428d1 Logic fix for very high shadows on very large screens.
ON large screens like 5120x1440 calculated shadow map was 32768. That
was 16x more than high setting, 32x more than medium setting and 64x
more than low setting.

After this change shadow map sizes using very high setting by resolution
will be following:
1920x1080 - 4096
2560x1440 - 4096
3840x1440 - 4096
5120x1440 - 8192
3840x2160 - 4096
7680x4320 - 8192
Patch by: @karmux
Reviewed by: @vladislavbelov, @Stan
Differential Revision: https://code.wildfiregames.com/D4723
This was SVN commit r26983.
2022-06-23 17:04:13 +00:00
marder 3cdd5d2bd6 [Gameplay] Han - Reduce strength of art of war technology
Seemed a bit strong, especially with the hero.

accepted by : @borg-

Differential revision: https://code.wildfiregames.com/D4714
This was SVN commit r26982.
2022-06-22 17:29:59 +00:00
marder 589dfa7a50 This was SVN commit r26981. 2022-06-22 17:18:11 +00:00
marder 77c11753c3 [Gameplay] Han - Hero adjustments
accepted by : @borg-
positive comments by: @real_tabasco_sauce
Differential revision: https://code.wildfiregames.com/D4709
This was SVN commit r26980.
2022-06-22 17:06:11 +00:00
marder b4155900d3 [Gameplay] Han - adjust farming techs to the standard 20%
accepted by : @real_tabasco_sauce

Differential revision: https://code.wildfiregames.com/D4720
This was SVN commit r26979.
2022-06-22 17:03:31 +00:00
Stan 00e29977dc Add missing frequency for the idle variant.
Noticed by: @Langbart
Fixes #6579

This was SVN commit r26978.
2022-06-21 05:38:54 +00:00
marder 3d47232ec8 [graphics] Adjust default config to give a better first impression
comments by @vladislavbelov
accepted by : @Stan

Differential revision: https://code.wildfiregames.com/D4706
This was SVN commit r26976.
2022-06-20 19:50:45 +00:00
marder f22fdcd004 [Gameplay] Han - remove Laozi gate
It is not historically correct and more importantly, I also doesn't add
that much gamplay value. Also clean up the template a bit and remove the
aura while at it.

accepted by : @Stan & people on the forum:
https://wildfiregames.com/forum/topic/83323-balancing-the-han-release-candidate-1/

Differential revision: https://code.wildfiregames.com/D4708
This was SVN commit r26975.
2022-06-20 19:16:51 +00:00
marder 2685783886 [Gameplay] Adjust cost of mer cav (again)
Add a little bit of food cost. Not enough to hugely change stuff, but
just an addition to make it a little bit harder to mass them.

Conceptual agreement from @chrstgtr @real_tabasco_sauce

Differential revision: https://code.wildfiregames.com/D4710
This was SVN commit r26974.
2022-06-20 19:07:27 +00:00
marder db1a31b701 [Gameplay] Move ptol heroes to the fortress
accepted by : @chrstgtr @borg- @real_tabasco_sauce

Differential revision: https://code.wildfiregames.com/D4711
This was SVN commit r26973.
2022-06-20 19:04:08 +00:00
marder 83bab71e8d [maps] Lighting adjustments to gulf_of_bothnia.js spring biome
Just some tweaks to make it look nicer.

This was SVN commit r26972.
2022-06-20 18:50:59 +00:00
Stan e888587116 Fix some capes not having approaching animations.
EOL native + MIME type.
Remove duplicated tools objects spawning when gathering resources.

This was SVN commit r26971.
2022-06-20 13:48:24 +00:00
Stan 833f8d0e79 Bump the max amount of instanced icons to 256 to account for Egypt 3v3 as suggested by @vladislavbelov.
192 worked as well but the error spam isn't really nice going above 256
is madness anyway.
Reported by: @Langbart
Fixes: #6578

This was SVN commit r26969.
2022-06-20 07:12:43 +00:00
marder 3294f0ea48 [GUI] Correction of the deco size at the bottom right of the ModernDialog sprite
The bottom deco on the right is 2 pixels wider than the one on the left.

Patch by @Langbart

Differential revision: https://code.wildfiregames.com/D4717
This was SVN commit r26968.
2022-06-20 06:33:27 +00:00
marder d93e29ae84 [GUI] Fix overlap in mutliplayer lobby dialog
Fixes #6573 ; reported by @phosit

Patch by @Langbart (on the ticket)

This was SVN commit r26967.
2022-06-19 21:20:47 +00:00
Stan cc13cfd7cd Add a new type of flower for decoration
This was SVN commit r26966.
2022-06-19 20:21:51 +00:00
Stan ebbc2909c8 Add missing file in 8471062bbb
This was SVN commit r26965.
2022-06-19 20:21:29 +00:00
Stan 78d1248abd Fix missing animations for grain gathering for spearmen. This workarounds a bug in UnitAI and improves consistency with other actors.
Refs #6566

This was SVN commit r26964.
2022-06-19 20:05:49 +00:00
Stan 059e71198a Fix missing animations for grain gathering for swordsmen. This workarounds a bug in UnitAI and improves consistency with other actors.
Refs #6566

This was SVN commit r26963.
2022-06-19 19:53:32 +00:00
Stan 860ab7ac31 Fix missing animations for grain gathering for pikemen. is workarounds a bug in UnitAI and improves consistency with other actors.
Refs #6566

This was SVN commit r26962.
2022-06-19 19:45:42 +00:00
Stan 8471062bbb Fix missing animations for grain gathering for han units. This workarounds a bug in UnitAI and improves consistency with other actors. Show the rice hat for approaching, returning and gathering grain.
Refs #6566

This was SVN commit r26961.
2022-06-19 19:27:31 +00:00
Stan 860521f463 Fix UVMap on tool_hoe2.dae.
Noticed while looking at #6566

This was SVN commit r26960.
2022-06-19 17:29:12 +00:00
Stan 76884ccba8 Properly clear back props when gathering. EOL native.
Noticed while looking at #6566

This was SVN commit r26959.
2022-06-19 17:28:42 +00:00
Freagarach 5a2474bd50 Fix Carths Naval Shipyard.
Which had the Trainer component, but not the user-required
ProductionQueue.

Differential revision: https://code.wildfiregames.com/D4695
Reviewed by: @Stan
Comments by: @jprahman
Fixes #6570

This was SVN commit r26958.
2022-06-19 06:37:58 +00:00
Freagarach 43aa870c68 Fix phasing by cheat with Athens.
Reported by @Langbart
Differential revision: https://code.wildfiregames.com/D4694
Reviewed by: @Langbart
Fixes #6571

This was SVN commit r26957.
2022-06-19 06:34:06 +00:00
Freagarach 774e8060d9 Make formations respond as one to threats.
Improves their functioning significantly.

Based on a patch by @lyv
Differential revision: https://code.wildfiregames.com/D4666
Reviewed by: @marder
Comments by: @Stan
This was SVN commit r26956.
2022-06-19 06:28:52 +00:00
wowgetoffyourcellphone 01fd2564e5 [Alpha 26][Fix] Barracks should garrison infantry, while stables garrison cavalry. This bug is a holdover from the unified barracks days prior to the stable split.
As reported on the forum.

This was SVN commit r26955.
2022-06-19 01:14:32 +00:00
marder 729a35c472 Choose civ randomly in gamesetup
Refs: #3987

accepted by: @Stan
Differential revision: https://code.wildfiregames.com/D4703
This was SVN commit r26954.
2022-06-18 14:40:30 +00:00
Stan 9c3d725d8b Update the mod.io key so I and other team members can sign mods.
This was SVN commit r26953.
2022-06-18 09:50:46 +00:00
Stan d51a0260bb Add garrisoned and projectile prop points to the han farmstead and storehouse.
Reported by: @Langbart
Refs: #4581

This was SVN commit r26951.
2022-06-17 19:59:32 +00:00
vladislavbelov 8ee8e63bcc Fixes same sequenced frames for LOS smooth textures. Fixes #6569
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4700
This was SVN commit r26950.
2022-06-17 19:42:48 +00:00
vladislavbelov 28e46ba765 Groups close minimap icons by path and color to decrease their visible count.
Comments By: phosit, Stan
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4702
This was SVN commit r26949.
2022-06-17 19:40:50 +00:00
wowgetoffyourcellphone e123b64ef6 [Alpha 26] [Fix] [Han] Add RallyPoint to the Han storehouse and farmstead since they are garrisonable by the Minister.
Reported by @Gerken Khan:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/?do=findComment&comment=503777

This was SVN commit r26947.
2022-06-15 20:17:02 +00:00
marder 1e654801a5 [art] [maps] Replace stone tiling texture on fortress.js
Use newer and better looking texture instead.

This was SVN commit r26946.
2022-06-13 20:46:48 +00:00
wowgetoffyourcellphone 91aee3db59 [Alpha 26] Make the Han spear cavalry into two-handed and remove the shield as requested by @AIEND
Refs:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/?do=findComment&comment=503346

This was SVN commit r26945.
2022-06-13 20:28:31 +00:00
marder 106bc68120 [maps] Fix entities placed outside of the passable map area on wild_lake.js and caledonia_meadows.js
Reported by Gurken Khan:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/page/4/#comment-503140

Fix:

rename "actor" to "entity" as that makes it clearer what it actually is
and use placeEntityPassable() to assure that nothing is placed outside
of the map.

also:
include https://code.wildfiregames.com/D2149 patch by @FeXoR
reduce the amount of entities placed on wild_lake. It looked extremely
crowded.

accepted by: @lyv
Differential revision: https://code.wildfiregames.com/D4699
This was SVN commit r26944.
2022-06-13 20:26:52 +00:00
marder e31f0f8766 [art] [maps] Replace large grass fields on Savanna & Nubia biomes
They make problems on several maps where they either float (e.g.
harbor.js) as they are placed to close to a cliff/ on a hill or they
cover way too much (e.g. D4699 / wild_lake.js).

Related: https://code.wildfiregames.com/D4699#199688

one could adjust all maps, but it is so much easier to just change the
actors here.

accepted by: @wowgetoffyourcellphone
Differential revision: https://code.wildfiregames.com/D4701
This was SVN commit r26943.
2022-06-13 19:32:38 +00:00
marder 8b03931497 [maps] Adjustments to Fortress.js
Houses are placed on top of each other, metal availability is bad (and
the textures are old).

First two problems reported by Gurken Khan:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/page/3/#comment-502958

Solution: use new balanced metal mine placement, update the textures and
replace the house switch/ the houses by a temple and a market.

An in-depth refactoring of the wall placement code should be made in the
future nevertheless.

accepted by: @lyv
Differential revision: https://code.wildfiregames.com/D4696
This was SVN commit r26940.
2022-06-12 16:09:52 +00:00
wraitii 274fe129a1 Change deprecated binary_negate<> to not_fn<>
Deprecated in C++17

Patch by: jprahman
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D4693
This was SVN commit r26939.
2022-06-12 08:45:39 +00:00
Freagarach 5f9e226625 Revert d81534d792 after 20a11614d7.
This was SVN commit r26938.
2022-06-12 04:51:50 +00:00
wowgetoffyourcellphone 20a11614d7 [Alpha 26] Remove the food.rice distinction and subsequent animation variants. Fixes some odd behavior.
Fixes #6559
Fixes #6565

Refs #6566

This was SVN commit r26937.
2022-06-11 20:16:14 +00:00
wowgetoffyourcellphone 76323e791b [Bug Fix] Han Female Citizen specific name was set to the generic name erroneously.
Fixes #6567

This was SVN commit r26936.
2022-06-11 16:53:29 +00:00
marder 36386b622e [GUI] increase main menu tooltip size
Apparently the translations got longer over the years and some don't fit
anymore

reported by Obelix
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/#comment-502315

long string looks ok now

Differential revision: https://code.wildfiregames.com/D4692
This was SVN commit r26935.
2022-06-10 15:19:44 +00:00
wraitii 26cb192f07 Improve shadow artifact problems without shadow filtering in some A25 biomes/maps
Without shadow filtering, artifacts may appear at some angle (shadow
bias issue). This change ssome settings so that these are less common.

Reported by: langbart
Accepted by: marder
Refs #6552

Differential Revision: https://code.wildfiregames.com/D4681
This was SVN commit r26934.
2022-06-10 07:39:23 +00:00
wraitii 5d0826d7d9 Fix gamesetup breakage when matchsettings.json contains incorrect victory conditions.
Reported by: gameboy, langbart
Fixes #6553

Differential Revision: https://code.wildfiregames.com/D4678
This was SVN commit r26933.
2022-06-10 07:37:59 +00:00
Freagarach d81534d792 Count rice as veggie.
Reported by @Gurken Khan at the forums:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/?do=findComment&comment=502523.

This was SVN commit r26931.
2022-06-10 04:53:25 +00:00
vladislavbelov 9845a99f77 Adds EGL support for Wayland.
Tested By: Freagarach, Mentula, phosit
Differential Revision: https://code.wildfiregames.com/D4642
This was SVN commit r26929.
2022-06-09 21:09:32 +00:00
Freagarach d19b602ecc Fix some text errors.
Reported on the forums by @Gurken Khan:
-
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/?do=findComment&comment=502270
-
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/?do=findComment&comment=502274

This was SVN commit r26928.
2022-06-09 14:16:44 +00:00
marder 80016a49ab Adjust lighting on hellas.js
It is way to bright and hard to look at.
reported during a26 rc testing:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/#comment-502290
by Salesome

accepted by: @lyv
Differential revision: https://code.wildfiregames.com/D4691
This was SVN commit r26927.
2022-06-08 21:02:52 +00:00
Stan 8b57e0eeba Fix build without precompiled headers. Fixes f4128208de
This was SVN commit r26925.
2022-06-06 21:48:07 +00:00
Stan 12dfe2ce55 Use CVector2D instead of float arrays for TexturedLineRData
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4688
This was SVN commit r26924.
2022-06-06 21:46:37 +00:00
vladislavbelov 24140bf620 Fixes crash in LOSTexture because of incorrect nullptr check introduced in 648e68e49c.
This was SVN commit r26923.
2022-06-06 21:21:52 +00:00
vladislavbelov ffe4ea24ab Fixes LOS flickering because of float precision. Fixes #6546
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4684
This was SVN commit r26922.
2022-06-06 20:48:18 +00:00
vladislavbelov b0c29b8676 Removes GL types from regular renderer code after 3ed4eaf247.
This was SVN commit r26920.
2022-06-06 07:30:45 +00:00
vladislavbelov 54aae3e6d4 Moves anisotropic filtering support check from GL texture to TextureManager to make it explicit.
This was SVN commit r26919.
2022-06-06 06:59:20 +00:00
wraitii aaa95dc00b Minor cleanup in Future and TaskManager
- Remove redundant std::move() calls
- default ctor/dtor in place of empty {}

Patch by: jprahman
Comments by; phosit

Accepted by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4675
This was SVN commit r26916.
2022-06-02 12:59:25 +00:00
wraitii f4128208de Fix text alignment handling of spaces around wrapping.
Follows f8d2927748.

There is an issue with text-wrapping and word separators (aka spaces).
Because 0 A.D. collates the space after a word to the same TextCall, we
occasionally need to ignore it when considering line-wrapping, because
we don't want empty spaces on the right-side of right-aligned text.
However, the logic to handle this is currently broken and inconsistent.

The method introduced here uses the SFeedback structure to properly
report it and generalises the checks.

Note that multiples spaces are not collapsed in 0 A.D., and for
consistency the word-separator-collapsing behaviour is ignored.

Comments by: phosit, vlasdislavbelov
Fixes #6551

Differential Revision: https://code.wildfiregames.com/D4662
This was SVN commit r26915.
2022-06-02 12:56:53 +00:00
wraitii b5abab5c79 Don't reset wonder victory timer on ally defeat.
Follows d86148defc.
Resetting the wonder time when an ally to the wonder-owner is defeated
seems like double-punishment, and should not happen.

Resetting on explicit diplomacy change remains in Allied victory mode.

Fixes #6527

Reported by: Langbart
Differential Revision: https://code.wildfiregames.com/D4661
This was SVN commit r26914.
2022-06-01 15:44:53 +00:00
Freagarach 7946def863 Fix maps with conquest CC victory conditions.
Rename the file to be consistent with its title.
Also `centre` -> `center` as per the style guide. Reported by @nwtour at
https://code.wildfiregames.com/D3530#171291.

Reported by: @Langbart
Essentially a patch by: @Langbart
Fixes #6548

This was SVN commit r26913.
2022-05-30 15:13:17 +00:00
Stan 1d9e6f30b0 Add a new icon for the han siege tower.
Reported by: @Langbart
Fixes #6549

This was SVN commit r26911.
2022-05-30 07:33:39 +00:00
Stan d4e523e0ea Slightly improve the look of the chinese siege tower. Raise the garrison flag. Remove useless unused materials from the daes.
Fixes #6503
Reported by: @Langbart
This was SVN commit r26910.
2022-05-29 21:41:45 +00:00
Stan b9adbbd8be Fix 557fa0312e by adding the js files to the list of dependencies. They were previously found under the gui folder.
Reported by: @Langbart
Fixes #6542

This was SVN commit r26909.
2022-05-28 17:01:42 +00:00
vladislavbelov 095838da0a Fixes A8 framebuffer format used for LOS interpolation and enables smooth LOS by default.
Tested By: Langbart, mastoras
Differential Revision: https://code.wildfiregames.com/D4654
This was SVN commit r26906.
2022-05-26 16:36:57 +00:00
vladislavbelov 68d73e1726 Fixes double shader program reloading after dddd599146.
This was SVN commit r26904.
2022-05-25 17:33:54 +00:00
vladislavbelov 53033ceaa2 Fixes rendering reflections and refractions in case of empty scissors.
This was SVN commit r26902.
2022-05-24 19:15:26 +00:00
vladislavbelov a6f60afdc5 Adds instancing support to backend and enables it for minimap.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4650
This was SVN commit r26901.
2022-05-24 07:11:23 +00:00
marder 7cbe8125f7 Delete some unused techs/ auras
detected by @Langbart
Fixes #6544

Differential revision: https://code.wildfiregames.com/D4663
This was SVN commit r26900.
2022-05-23 13:31:47 +00:00
marder ddb54bfe84 [Gameplay] Let the mauryan worker elephant build again
and also patch the AI by partly reverting 87ec9457c3

based on a patch by @Langbart
Fixes #6309

accepted by : @Freagarach

conceptual agreement from @chrstgtr @borg- @Stan

Differential revision: https://code.wildfiregames.com/D4249
This was SVN commit r26898.
2022-05-22 07:06:59 +00:00
marder 0f99c79dad Fix issues with han siege tower
reported by @Langbart ; Fixes #6503 , also adjusts the footprint to fit
better to the actor

comments by: @Stan
accepted by : @phosit


Differential revision: https://code.wildfiregames.com/D4655
This was SVN commit r26897.
2022-05-21 14:54:01 +00:00
Freagarach f03f19cfc5 Fix aura tooltips on panel entities.
Removed from the GUI interface in d8ed8b1462, but its uses weren't
checked (or ignored).
(https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/gui/session/session.js;20965$998)

Reported by @Langbart
Based on a patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4648
Fixes #6387

This was SVN commit r26896.
2022-05-20 10:00:31 +00:00
marder f3d8f1e797 [Gameplay] - Remove min distance from siege towers
While it may be historically correct, it arguably can lead to very
broken looking behavior where siege towers try to get out of the min
range, but fail since the are attacked and end up shifting and turning
around uselessly, which just looks broken.

And since the min distance for siege towers is very small, I doubt that
it will actually change anything about the gamplay.

accepted by : @chrstgtr

Differential revision: https://code.wildfiregames.com/D4657
This was SVN commit r26894.
2022-05-20 07:13:09 +00:00
marder efc2d39372 Fix a comment and rename the formation angle function to better reflect what it does
wrong comment noticed by: @Silier
accepted by : @Freagarach

Differential revision: https://code.wildfiregames.com/D4658
This was SVN commit r26893.
2022-05-20 07:02:22 +00:00
marder 9a3ae16087 Make ship and siege immune to poison
reported by @Langbart #6526

accepted by :
@Stan
@asterix

Differential revision: https://code.wildfiregames.com/D4656
This was SVN commit r26892.
2022-05-20 06:44:58 +00:00
marder b2e093d915 Rename the "Han Chinese" to "Han"
Han Chinese is not wrong per se but unnecessary precise.
See the forum discussion here:
https://wildfiregames.com/forum/topic/51306-thread-for-posting-suggestions-for-alpha-26/page/15/#comment-495849
and the usage of "Han" in an article from the metropilitan museeum:
https://www.metmuseum.org/toah/hd/hand/hd_hand.htm

comments by:
@Langbart

accepted by :
@asterix
@Freagarach

Differential revision: https://code.wildfiregames.com/D4659
This was SVN commit r26891.
2022-05-20 06:36:38 +00:00
bb f8d2927748 Fix an infinite loop when trying to word-wrap
Comments By: Stan, Phosit, s0600204, Langbart, Silier, marder, vladislav
Reviewed By: wraitii
Differential Revision: D4530
fixes #6451

This was SVN commit r26889.
2022-05-17 12:10:56 +00:00
Stan 10554eb5b1 Fix RAM amount detection on BSD and macOS.
Tested by: @Mastoras
Comments by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4651
This was SVN commit r26888.
2022-05-17 08:08:14 +00:00
vladislavbelov d1775169d2 Removes unused a_tangent stream in model water shaders after 779a33ee30.
This was SVN commit r26887.
2022-05-16 16:36:58 +00:00
marder c0df9b9883 Fix: Han soilder missing gather animation for non-rice grains
accepted by : @Stan

Differential revision: https://code.wildfiregames.com/D4649
This was SVN commit r26886.
2022-05-16 15:00:29 +00:00
Freagarach 9528acfb8c Fix description of water weeding.
Reported by: @azayrahmad at the forums
(https://wildfiregames.com/forum/topic/77911-water-weeding/)
Patch by: @smiley
(https://wildfiregames.com/forum/topic/77911-water-weeding/#comment-498281)
Fixes #6512

This was SVN commit r26885.
2022-05-16 14:45:26 +00:00
wraitii f82fc6431b Fix SM compilation on M1, fix cross-compilation.
Fixes 08e7efc76a.
The SM build script worked on its own, but the mac OS libraries script
passes it an unexpected value.
This also fixes cross-compilation arm -> x86.
Harfbuzz is explicitly not used when compiling freetype to avoid
pkgconfig using it.

Reorganize the logic a little bit around architecture handling.

Differential Revision: https://code.wildfiregames.com/D4647
This was SVN commit r26882.
2022-05-15 21:22:49 +00:00
wraitii 08e7efc76a Allo native builds on Mac OS M1 / Apple Silicon
- Update GMP to a version that supports arm64 darwin
- Patch spidermonkey 78 to build and run on arm64 darwin
- Choose the correct architecture dynamically in build scripts
- Include python workaround that fixes python related errors on
spidermonkey build

Based on a patch by: kumikumi
Based on a patch by: Langbart
Fixes #6474

Differential Revision: https://code.wildfiregames.com/D4607
This was SVN commit r26881.
2022-05-15 06:45:53 +00:00
wraitii 364894287d Fix 557fa0312e
Forgot to re-add the GUI autostart script after moving it.

This was SVN commit r26880.
2022-05-15 06:36:27 +00:00
wraitii 557fa0312e Fix non-visual autostart, as well as client/host autostart.
Follows 8eecc39e71.

Piping the autostart through a GUI page is easy but requires using the
GUI in non-visual mode, which is problematic since it's not initialized.
The GUI is not needed, only its ability to load scripts, so this diff
fixes the problem by adding an 'entrypoint' script in the new
`autostart` folder that gets called with this unique ability, setting
things up properly. The mod mod gets a placeholder.

Other changes:
- Fix some issues with networked autostart:
  - Players were not assigned slots.
  - The host didn't actually wait for other players.
- Move gamesettings from `gui/gamesettings/` to `gamesettings/`. This
moves attributes as well.
- Move autostart files from `gui/autostart/` to ` autostart/`. Note that
`gui/autostart/` still exists as it's used in the tutorial button from
the main menu.
- Rename the JSI_VFS functions to be explicitly about their function:
the ability to write and the potential restricted folders.
- Don't require `autostart` when using `--autostart-client` in
non-visual mode.

Starting the autostart client/host has poor UX in some situations, but
improving that feature is beyond the scope of this diff.

Suggestions for future work:
- Some files in gui/common should probably be moved elsewhere
- Template loading code is duplicated
- The gamesetup code still needs work for proper UI/logic separation.

Help & comments by: smiley

Reported by: vladislav / Langbart
Fixes #6513

Differential Revision: https://code.wildfiregames.com/D4628
This was SVN commit r26879.
2022-05-15 06:34:17 +00:00
Freagarach 967f9ea7a3 Fix double 'to' in weeding technology.
Noticed by translator @rodrigo.vegas at Transifex.

This was SVN commit r26878.
2022-05-15 05:27:05 +00:00
Freagarach eb1febd5c1 Some fixes for the Han stone thrower.
A.k.a. Mangonel.
Adds UnitMotion. Refs. #1718
Adjust footprint.
Rearrange parents.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4608
This was SVN commit r26877.
2022-05-15 05:13:39 +00:00
marder dec727ce8e Fix missing parentheses in formation turning angle calculation
The function that is calculating the difference between the two angles
is missing some parentheses.

Didn't notice it sooner as it works in 95% of all cases without them,
but sometimes you can see the formation doing a wrong turn.

reviewed by : @Freagarach

Differential revision: https://code.wildfiregames.com/D4626
This was SVN commit r26874.
2022-05-11 15:22:54 +00:00
Freagarach ed4e07e594 Allow setting the passability class depending on formation members.
Improves pathfinding for the general case (no large entities in a
formation).

Differential revision: https://code.wildfiregames.com/D4605
Comments by: @marder, @Stan, @wraitii
This was SVN commit r26873.
2022-05-11 14:47:16 +00:00
Freagarach 13d701e3d0 Fix maps after ea72437739.
Correctly fetch the civ from the player's Identity.
Also remove the notions of the CivChanged message, since it was
effectively deleted already.

Differential revision: https://code.wildfiregames.com/D4486
Reviewed by: @wraitii
Comments by: @bb, @Silier, @smiley, @Stan, @vladislavbelov
Fixes #6444

This was SVN commit r26872.
2022-05-11 06:04:20 +00:00
vladislavbelov 1f8705d8f7 Avoids drawing text in GUI if it will be clipped.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4640
This was SVN commit r26870.
2022-05-10 16:32:25 +00:00
vladislavbelov dddd599146 Fixes shader program and technique reloading.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4641
This was SVN commit r26869.
2022-05-10 12:54:57 +00:00
wraitii ee0fcf2b95 Fix map errors from GetTemplate not being available in the sim
Follows ea72437739. Fixes it by providing a convenience function in the
component Manager that matches the API in the GUI / AI

Refs #6444

Differential Revision: https://code.wildfiregames.com/D4630
This was SVN commit r26867.
2022-05-09 18:13:34 +00:00
wraitii 69c76acabb Fix crash in non-visual autostart from not loading terrain textures
Fixes 410d2e883a

Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D4627
This was SVN commit r26866.
2022-05-09 17:31:00 +00:00
wraitii 2ccd1ba280 UnitMotion - Fix Clearance serialization and only allow changing passability of formation controllers.
Fixes 5de50c447c

Changing the passability class at runtime breaks some UnitMotion
assumptions in unrecoverable ways and will lead to units getting into
impassable terrain.
Formation controllers can tolerate it since units still check their own
obstruction.
Until some code is added to recover from the above bad case,
de-activated changing passability class for non-formation controllers.

This also fixes serialization issues related to clearance & passability
classes following that diff.

Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D4629
This was SVN commit r26865.
2022-05-09 17:29:15 +00:00
vladislavbelov db8d251a8b Adds XML path of GL shader descriptions to file dependencies.
This was SVN commit r26864.
2022-05-09 10:13:19 +00:00
vladislavbelov 132058bc04 Fixes RenderDoc captures by calling glGetProgramivARB to get constants only for ARB shaders.
This was SVN commit r26863.
2022-05-09 08:22:21 +00:00
vladislavbelov ae54282794 Fixes depth texture sampling in ARB shaders after a87cb6c94d. Fixes #6537
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4639
This was SVN commit r26862.
2022-05-09 07:55:40 +00:00
vladislavbelov 67e8e28006 Fixes dynamic GL buffer orphaning forgotten in cff79b421a. Fixes #6533
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4638
This was SVN commit r26859.
2022-05-08 22:45:54 +00:00
vladislavbelov 62e589ab76 Adds renderer backend interface and dummy backend.
Comments By: phosit, Stan
Tested By: Langbart, phosit
Differential Revision: https://code.wildfiregames.com/D4636
This was SVN commit r26858.
2022-05-08 22:02:46 +00:00
vladislavbelov c5f71d6b87 Fixes grayscaleFactor usage in Canvas2D ARB shader added in 1f192f1593. Fixes #6536
Tested By: Langbart
This was SVN commit r26857.
2022-05-07 20:57:16 +00:00
vladislavbelov 5c17a11343 Fixes incorrect type of objectColor in overlay line ARB shader introduced in 34fc883317 and appeared after 04bd96cee0. Fixes #6534
This was SVN commit r26856.
2022-05-07 19:48:35 +00:00
Freagarach 27061d7bd4 Fix slow formation movement on spamclick by increasing instant turn angle to the same value as units.
Having a small instant turn angle apparently makes units (not only
formations) lag when spamclicking.

Patch by: @marder
Differential revision: https://code.wildfiregames.com/D4593
Fixes #6440

This was SVN commit r26855.
2022-05-07 04:47:03 +00:00
vladislavbelov b808adcc00 Disables writing depth for decals as they follow terrain and water (if floating) shape. Fixes #6494
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4637
This was SVN commit r26852.
2022-05-05 17:25:20 +00:00
vladislavbelov 3ed4eaf247 Removes ogl_WarnIfError from regular renderer code.
This was SVN commit r26850.
2022-05-02 21:52:21 +00:00
vladislavbelov a493a9f07f Removes ARB switch optimization as it triggers slow down. Fixes #6525
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4635
This was SVN commit r26849.
2022-05-02 21:25:13 +00:00
vladislavbelov 04bd96cee0 Moves uniform and texture binding to CDeviceCommandContext.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4631
This was SVN commit r26848.
2022-05-02 20:57:22 +00:00
vladislavbelov a8caed8348 Uses correct value_type to iterate over the map in JSInterface_Hotkey. Refs a4852c4c01.
Patch By: phosit
Differential Revision: https://code.wildfiregames.com/D4633
This was SVN commit r26847.
2022-05-02 10:03:34 +00:00
Stan a2df854547 Fix extra parenthesis in d0b2168879.
This was SVN commit r26845.
2022-05-01 15:27:33 +00:00
Angen a90ba38357 [Gameplay] Buff spear cavalry
Bonus against cavalry 1.75 -> 2

Differential revision: D4625
Patch by: @LetswaveaBook
Reviewed by: @marder
Comments by: @real_tabasco_sauce
This was SVN commit r26844.
2022-05-01 11:08:52 +00:00
Angen d0b2168879 Add Mouse drag to options
Allow to modify pixel distance when mouse input is detected as drag e.g.
for selection box.

Differential revision: D4624
Refs: #6506
Comments by: @vladislavbelow @Freagarach
Tested by: @psypherium
This was SVN commit r26843.
2022-05-01 10:50:23 +00:00
Angen 59fdc5e591 Fix chat window
Fix chat window not closing when submitting empty string introduced in
47f5c27eec
Always call submitted hanlders.

Differential revision: D4621
Fixes: #6511
Patch by: @Langbart
Comments by: @elexis
This was SVN commit r26842.
2022-04-29 17:48:01 +00:00
Freagarach 9c0817849e Fix - in previous commit.
This was SVN commit r26840.
2022-04-29 05:39:54 +00:00
Freagarach 65f631ff15 Make scythes aura only affect humans (instead of units).
Fixes affecting corpses and Siege.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4619
Comments by: @asterix, @Silier, @wowgetoffyourcellphone
This was SVN commit r26839.
2022-04-29 05:38:58 +00:00
Freagarach edccaaf84a Reduce fog on cisalpine winter map and artic biome.
People shouldn't be punished in a competitive setting for having high
graphic settings.

Patch by: @marder
Differential revision: https://code.wildfiregames.com/D4596
Reviewed by: @wowgetoffyourcellphone
This was SVN commit r26838.
2022-04-29 05:22:42 +00:00
Angen 7765393908 Shift group hotkeys to map 1 - 10 instead 0 - 9
Number groups from 1 - 10 replacing group 0 with group 10 for default
hotkey 0.

Differential revision: D4615
Reviewed by: @Langbart
Fixes: #6509

This was SVN commit r26837.
2022-04-28 17:03:58 +00:00
vladislavbelov ac60b12045 Replaces occurrences of "VBO" in comments by "backend buffer". Refs cff79b421a
This was SVN commit r26835.
2022-04-27 20:04:56 +00:00
vladislavbelov d8b8128abb Adds AsFloatArray to CMatrix3D.
This was SVN commit r26834.
2022-04-27 19:53:42 +00:00
vladislavbelov 22a4db837b Adds backend buffer upload forgotten in aba7a170d9. Fixes #6520
This was SVN commit r26833.
2022-04-27 19:00:06 +00:00
vladislavbelov b26aa5936d Avoids scoped binding of the already bound backend buffer.
This was SVN commit r26831.
2022-04-26 18:25:52 +00:00
vladislavbelov 98c18425a8 Adds more detailed debug name for backend buffers.
This was SVN commit r26830.
2022-04-26 18:16:45 +00:00
vladislavbelov 069560a290 Fixes incorrect vertex buffer offset added in aba7a170d9. Fixes #6519
This was SVN commit r26829.
2022-04-26 18:12:56 +00:00
wowgetoffyourcellphone 7e44e7ae69 [maps][alpha 26][fix] Change player owned trees to Gaia.
Reported in a video by: @psypherium
This was SVN commit r26828.
2022-04-25 19:28:08 +00:00
Stan 6214632ab1 Fix a missing ambient occlusion texture and uvmap revealed by 0766919645.
Reported in a video by: @psypherium
This was SVN commit r26827.
2022-04-25 15:27:16 +00:00
wowgetoffyourcellphone 5a1c510ff1 [maps] Fix lost comma. Reported by Gameboy.
This was SVN commit r26825.
2022-04-25 03:46:51 +00:00
wowgetoffyourcellphone e9fdb01d2b [maps][fix] Quick little map file fixes, per @Stan.
This was SVN commit r26824.
2022-04-24 22:10:31 +00:00
vladislavbelov d2d22a4538 Makes the terrain and decals rendering code load effect once per usage.
This was SVN commit r26823.
2022-04-24 13:44:00 +00:00
wowgetoffyourcellphone 42c46b41bb [maps][Alpha 26] Clean up of the Player data for Skirmish maps.
Fixes #6508

This was SVN commit r26821.
2022-04-24 04:37:27 +00:00
wowgetoffyourcellphone 8368bd6248 [art][textures] Add some player color to the Arabic robes.
This was SVN commit r26820.
2022-04-24 03:04:18 +00:00
wowgetoffyourcellphone 281ba0924f [maps][Alpha 26] Further improve corinthian_isthmus_2p and its map preview.
This was SVN commit r26819.
2022-04-24 02:58:20 +00:00
wowgetoffyourcellphone 7606fd1eec [maps][Alpha 26] Improve the terrain of Corinthian Isthmus (2) since it is the default map for Spanish language players.
Also improve the terrain for Cycladic Archipelago 2p.
Fix naming conventions for Acropolis Bay, Chang Jiang, and Tarim Basin.
Add these new and updated maps to the "New Maps" campaign.

This was SVN commit r26818.
2022-04-24 01:11:12 +00:00
vladislavbelov d3a7491724 Removes CONFIG2_GLES from CPostprocManager and renderers.
This was SVN commit r26817.
2022-04-23 23:49:52 +00:00
vladislavbelov df612ab8b4 Moves GLSL-specific uniform name workaround (added in 227f9e403f) to CShaderProgramGLSL.
This was SVN commit r26816.
2022-04-23 21:39:15 +00:00
vladislavbelov aba7a170d9 Moves vertex attribute binding to CDeviceCommandContext.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4610
This was SVN commit r26815.
2022-04-23 20:11:14 +00:00
vladislavbelov ddb8b08508 Removes lib_api.h cleared but not deleted in 8c068aab07.
This was SVN commit r26813.
2022-04-22 16:11:21 +00:00
vladislavbelov 9b6365f9f2 Removes unused Noise generator added in 18eb72a25a without any actual usage.
60befbd1cf added the exact same implementation to the rmgen tool,
469d0fe5c5 removed the rmgen tool along with the original implementation
of noise.

Patch By: smiley
Differential Revision: https://code.wildfiregames.com/D4611
This was SVN commit r26810.
2022-04-20 20:22:01 +00:00
wowgetoffyourcellphone f1a59eca29 [art] Fix Brennus actor's material.
This was SVN commit r26809.
2022-04-20 17:28:38 +00:00
wowgetoffyourcellphone da983fbe42 [art][Alpha 26] Give an easier-to-see projectile to the Han Siege Tower
This was SVN commit r26808.
2022-04-20 06:53:40 +00:00
wowgetoffyourcellphone 3dd1cd39ca [art][Alpha 26] Give an easier-to-see projectile to the Siege Tower
This was SVN commit r26807.
2022-04-19 07:50:26 +00:00
vladislavbelov 2355240eec Removes the Profiler allocation counter. Fixes #6476
Refs 5c8250ddb8, 5664f097d9, 6b0a0e83eb.

Patch By: smiley
Differential Revision: https://code.wildfiregames.com/D4606
This was SVN commit r26805.
2022-04-18 21:37:08 +00:00
vladislavbelov 7bd075d570 Moves glReadPixels to GL backend.
This was SVN commit r26802.
2022-04-17 14:55:00 +00:00
Stan 5de50c447c Allow setting the passability class dynamically. This is needed to improve formation behavior for the release.
Accepted by: @Freagarach
Refs: https://code.wildfiregames.com/D4563,
https://code.wildfiregames.com/D4605
Differential Revision: https://code.wildfiregames.com/Dr4599
This was SVN commit r26801.
2022-04-17 11:06:09 +00:00
vladislavbelov c6da4d9312 Adds a fallback texture to skies to avoid a crash if a sky texture was invalid.
This was SVN commit r26800.
2022-04-17 10:10:52 +00:00
vladislavbelov e02b402a14 Uses vertex attribute name only for GLSL. Fixes #6500
This was SVN commit r26799.
2022-04-17 08:00:10 +00:00
wowgetoffyourcellphone 28349a2067 [art] Reduce specular strength of this block wall texture.
This was SVN commit r26798.
2022-04-17 02:23:40 +00:00
wowgetoffyourcellphone 6dfe7378fd [art][actors] Fix the Temperate stone actor to use the correct textures.
This was SVN commit r26797.
2022-04-16 06:44:41 +00:00
wowgetoffyourcellphone 0e7c7f26cf [art][actors][Alpha 26] Remove a superfluous decal from these Arsenal actors. The game would display this decal inconsistently with the other decal, so I picked one over the other.
This was SVN commit r26796.
2022-04-16 05:07:54 +00:00
wowgetoffyourcellphone a2c3e7503b [art][model][decals] Fix the Spartan Forge by recentering the model, also create a new decal for it from the existing texture.
Tweak the other Spartan decals while I'm at it.

This was SVN commit r26795.
2022-04-16 05:06:01 +00:00
wowgetoffyourcellphone 9217a710ec [art] Technology portrait for Wicker shields
This was SVN commit r26793.
2022-04-15 19:55:15 +00:00
vladislavbelov eaac0b0dbe Uses vertex streams to get attribute locations reducing duplication in XML.
Also adds missing streams.

This was SVN commit r26792.
2022-04-15 18:13:33 +00:00
vladislavbelov 37645670c1 Fixes crash in shader preprocessor introduced in d295dacb9b and appeared after 25332f9b86. Fixes #6033
This was SVN commit r26791.
2022-04-15 17:45:15 +00:00
wowgetoffyourcellphone 44a6b6bd23 [maps] Add a couple of improved maps to the new maps campaign.
This was SVN commit r26790.
2022-04-15 07:34:35 +00:00
Stan 663fb3f527 Update the LIB_URL for zlib.
Fixes: #6496
Refs: #4362
Patch by: @Langbart
Differential Revision: https://code.wildfiregames.com/D4603
This was SVN commit r26788.
2022-04-14 22:35:17 +00:00
wowgetoffyourcellphone 458f4fca1e [art][fix][actors][Alpha 26] Fix the projectiles for a handful of siege engines.
This was SVN commit r26787.
2022-04-14 06:52:43 +00:00
wowgetoffyourcellphone 0e9bbd10c6 [art][icons][Fix] Fix some new aura icons, renamed/modified some too. Added them to some auras. Added some old icons to other auras.
This was SVN commit r26786.
2022-04-14 06:25:43 +00:00
vladislavbelov 2c8f4c4837 Moves AssertPointersBound to draw commands to not forget to call it for new shaders.
In the future it allows to call AssertPointersBound in a more lazy way.

This was SVN commit r26784.
2022-04-12 18:02:08 +00:00
vladislavbelov d8d736f0eb Allows tex clients decide how to handle invalid textures instead of assertions. Fixes #6436
This was SVN commit r26783.
2022-04-12 17:39:05 +00:00
vladislavbelov 8c1a469253 Uses GL device capabilities for all vertex attribute locations.
This was SVN commit r26782.
2022-04-12 16:49:04 +00:00
vladislavbelov ad2068dae0 Uses sequential numbering of GL vertex attributes for modern hardware. Refs #3054
Differential Revision: https://code.wildfiregames.com/D4601
This was SVN commit r26781.
2022-04-12 16:13:47 +00:00
vladislavbelov f6837978e8 Adds GL debug labels only if they are supported (forgotten in 3db24af763). Fixes #6495
This was SVN commit r26780.
2022-04-12 06:44:06 +00:00
vladislavbelov e6dd9f944e Moves Vulkan report code to its device to prevent crashing when a GL device is created. Fixes #6270
Differential Revision: https://code.wildfiregames.com/D4577
This was SVN commit r26779.
2022-04-12 06:39:14 +00:00
vladislavbelov 811a540382 Simplifies GL::CShaderProgram to store less data.
This was SVN commit r26777.
2022-04-11 22:10:21 +00:00
vladislavbelov 3db24af763 Adds names to GL shaders and programs.
This was SVN commit r26776.
2022-04-11 20:30:23 +00:00
Angen eafdb2339d Fix unit demo map
Split from D4589

Differential revision: D4600
Original patch by: @Langbart
Fixes: #6486
Refs: #6116

This was SVN commit r26775.
2022-04-11 18:59:25 +00:00
vladislavbelov 8a51e05c2e Avoids a crash if a texture size is not a power of two.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4586
This was SVN commit r26774.
2022-04-11 16:28:41 +00:00
wowgetoffyourcellphone b55c71ab88 [maps] Improve Median Oasis 2p with new terrain textures and new flora/geology.
This was SVN commit r26770.
2022-04-09 05:45:00 +00:00
Freagarach 06796303d7 Fix progress slider on formerly autoqueued items.
It was not resized for ghosts.

Reported by: @Langbart
Differential revision: https://code.wildfiregames.com/D4592
Fixes #6492

This was SVN commit r26769.
2022-04-09 05:34:43 +00:00
wowgetoffyourcellphone 41032b034c [ maps ] Fix the absence of stone mines on Cisalpine Winter.
This was SVN commit r26768.
2022-04-09 04:54:05 +00:00
wowgetoffyourcellphone 001da7fdb8 [ art ][ particles ] Slow down the snow fall for aesthetics.
This was SVN commit r26767.
2022-04-09 04:52:22 +00:00
wowgetoffyourcellphone 73ec3fd48b [ Alpha 26 ] In Carthaginian embassies, remove references to "researching technologies" since there are none.
Report:
https://wildfiregames.com/forum/topic/51306-thread-for-posting-suggestions-for-alpha-26/page/14/#comment-489907

This was SVN commit r26766.
2022-04-09 01:08:42 +00:00
wowgetoffyourcellphone ed6b87c0fe [art] [Alpha 26] Improve and standardize the portraits for Ruins and Rocks. Delete a now-unused portrait.
This was SVN commit r26765.
2022-04-09 00:53:25 +00:00
wowgetoffyourcellphone 0766919645 [ art ][ actors ][ Alpha 26 ] A large actor visual update (mainly buildings)
- Better fitting decals
- Player color
- Warships use the larger, easier to see projectile like buildings do
- Upgrading variants
- Standardized decals for Stables
- Fix a few death variants
- Some better tree props
- Fixed sheath position for the Roman Centurion
- Add Cavalry variants for Gallic heroes (templates will come later)
- A more "British" shield for the Brit fanatic
- Add a new Atlas building for the Spartans, the "Persian Stoa"
- Add distinct actors between lit and non-lit Fireships

This was SVN commit r26764.
2022-04-08 21:45:47 +00:00
vladislavbelov 73c0e40045 Fixes warnings about unused function arguments in renderer.
This was SVN commit r26763.
2022-04-08 06:49:38 +00:00
Stan 383df82c4a Improve acropolis_bay_2p by removing fences and tweaking roads lightly and allow rebuilding towers.
Accepted by: @marder
Patch by: @Langbart
Differential Revision: https://code.wildfiregames.com/D4591
This was SVN commit r26761.
2022-04-07 15:51:36 +00:00
vladislavbelov d3dd98418e Fixes GLES build after c842678591.
This was SVN commit r26760.
2022-04-07 06:59:40 +00:00
wowgetoffyourcellphone 6cc44f7a6f [art][textures] Reduce the resolution of the camel blanket textures by half. They were originally ginormous, 4x bigger than a standard unit texture.
This was SVN commit r26758.
2022-04-04 03:50:28 +00:00
wowgetoffyourcellphone 7da9ec6005 [art][actors] Improved the look of some actors.
- Different dirt decals for 3 Iberian structures
- Variations for the trees on the Kushite wonder
- Spec maps for a couple Athenian units
- Changed textures for Gallic elite javelineer
- New textures for the Ptolemy war elephant driver
- Peytral for the Elite Seleucid jav cav
- More helmet variants for the Elite Seleucid spear cav

This was SVN commit r26757.
2022-04-03 20:51:39 +00:00
Freagarach f9fae35b59 Fix selecting formations when cycling through idle entities.
Since formations have `cmpIdentity` now (b778caf146), they were
incorrectly selected when cycling through idle entities.

Reported and tested by: @Langbart
Differential revision: https://code.wildfiregames.com/D4588
Fixes #6490

This was SVN commit r26756.
2022-04-03 17:37:34 +00:00
Freagarach d847a1c479 Fix research icon position.
It was overlayed with the FPS overlay which rendered it unreadable.

Introduced in 7c3aed5f36
Reported by: @Langbart
Patch by: @phosit
Differential revision: https://code.wildfiregames.com/D4585
Comments by: @elexis
Fixes #6484

This was SVN commit r26755.
2022-04-03 17:32:19 +00:00
Freagarach a9d266f9f7 Rework Iphicratean Reform.
- Gymnasium to the second phase.
- Allow training the marines and cretan archers there.
- Move the above mentioned tech to that structure and the dock.

Patch by: @marder
Differential revision: https://code.wildfiregames.com/D4537
Comments (implied acceptence) by: @chrstgtr, @ValihrAnt

This was SVN commit r26754.
2022-04-03 17:18:46 +00:00
Angen 3a43cb272c [Gameplay] Ships less pierce attack, but can destroy other ships because of a multiplier
Currently garrisoned ships easily kill organic units that dare to get to
close to them. A garrisoned ship is a killing machine like nothing else
in the game.

This patch solves their absurd deadliness against organic units. Ships
get 12 pierce attack and a 3x multiplier against other ships so they can
sink enemy ships at comparable rate as in A24 and A25.

Differential revision: D4507
Patch by: @LetswaveaBook
Reviewed by: @wowgetoffyourcellphone
Comments by: @marder @wraitii @Freagarach
This was SVN commit r26753.
2022-04-03 09:24:10 +00:00
wowgetoffyourcellphone 6297d1a58f [art][actors] Use the "normal" material instead of "parallax" for these 2 Kushite actors. The normal maps don't have an alpha anyway.
This was SVN commit r26751.
2022-04-02 23:47:29 +00:00
wowgetoffyourcellphone 84531ea28a [art][textures] Significantly reduce the bump effect of 3 Kushite royal textures.
This prevents a lot of visual artifacts.

Also reduce the size of this 1 spec map (it was overlarge). Saves disk
space.

This was SVN commit r26750.
2022-04-02 23:45:45 +00:00
vladislavbelov e08590ee34 Fixes warning about unused captured variable in CDeviceCommandContext.
This was SVN commit r26749.
2022-04-02 20:40:40 +00:00
wowgetoffyourcellphone 4c17946717 [maps] Improve Saharan Oases skirmish map.
This was SVN commit r26748.
2022-04-02 08:57:27 +00:00
wowgetoffyourcellphone fdb1298efe [maps] Revamp Acropolis Bay skirmish map.
This was SVN commit r26747.
2022-04-02 08:54:47 +00:00
wowgetoffyourcellphone 77e9ec372f [music] Rename music tracks to convention.
This was SVN commit r26746.
2022-04-02 08:37:30 +00:00
wowgetoffyourcellphone 46dfad4c41 [maps][Atlas] Update Britons sandbox map. Refs #6488
This was SVN commit r26745.
2022-04-02 03:43:46 +00:00
wowgetoffyourcellphone c1fb182e5e [maps][Atlas] Fix Kushite sandbox map. Refs #6488
This was SVN commit r26744.
2022-04-02 03:28:16 +00:00
wowgetoffyourcellphone 3a22d2ec69 [art][mesh] Fix the UV map of this head mesh to remove a visual defect on the pony tail geometry.
This was SVN commit r26743.
2022-04-01 23:56:36 +00:00
Freagarach 1af385a6dd Fix attack-walk with formations.
As well as patrolling.
Formations kept moving, finding targets and instructing their members to
attack (thereby resetting their attacking state every time).
We now move into `MEMBER` upon finding a target.

Differential revision: https://code.wildfiregames.com/D4550
Comments by: @Stan
Fixes #6461

This was SVN commit r26741.
2022-04-01 05:46:13 +00:00
Freagarach a8e7bb179e Add identity tag to obstructor.
Introduced in 20bb3ea4a3.

We assume at many places that an entity has cmpIdentity and as such we
add it here as well.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4583
Fixes #6416

This was SVN commit r26740.
2022-04-01 05:29:23 +00:00
Freagarach 12ac4c7714 Fix pop indication of paused items.
Reported by @Langbart at 75aa2091b7.

Differential revision: https://code.wildfiregames.com/D4308
Comments by: @Langbart, @marder, @Silier
Fixes #6452

This was SVN commit r26739.
2022-04-01 05:22:49 +00:00
vladislavbelov 02b87cdb46 Fixes MSAA on macOS GL drivers for textures with incorrect sample count, fixes #6480
Refs #5969

Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4581
This was SVN commit r26737.
2022-03-31 07:04:51 +00:00
vladislavbelov a3248ac04b Escapes paths in user report terms to fix invisible backslashes on Windows. Fixes #6475
Patch By: Langbart
Differential Revision: https://code.wildfiregames.com/D4579
This was SVN commit r26733.
2022-03-29 22:11:58 +00:00
Stan 3f8cbecd72 Remove hardcoded shadows in Atlas UI
Fixes c9a7aabbea
Patch by: @nwtour
Accepted by: @phosit
Tested by: @Langbart
Differential Revision: https://code.wildfiregames.com/D4400
This was SVN commit r26730.
2022-03-28 22:47:52 +00:00
Stan ff7c5c7601 [maps] Improve forests on savanna and nubia biomes
Accepted by: @wowgetoffyourcellphone
Patch by: @marder
Differential Revision: https://code.wildfiregames.com/D4562
This was SVN commit r26729.
2022-03-28 22:41:05 +00:00
Stan 5836637dde [Maps] Oly use actors in the decoratives of the random biomes
Accepted by: @wowgetoffyourcellphone
Patch by: @marder
Differential Revision: https://code.wildfiregames.com/D4569
This was SVN commit r26728.
2022-03-28 22:39:45 +00:00
Stan 8f85f24608 Update the water height slider if the water height is set using the picker.
Patch by: @phosit
Fixes: #6424
Differential Revision: https://code.wildfiregames.com/D4576
This was SVN commit r26727.
2022-03-28 22:36:17 +00:00
Stan a33e0ccc84 Remove some duplicated code from ScriptInterface.cpp
Tested by: @Langbart
Patch by: @smiley
Differential Revision: https://code.wildfiregames.com/D4574
This was SVN commit r26725.
2022-03-28 21:58:22 +00:00
vladislavbelov c842678591 Removes usages of EXT and INTEL timer query GL extensions.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4571
This was SVN commit r26724.
2022-03-28 17:32:09 +00:00
wowgetoffyourcellphone 4013004040 [art] Odds n Ends. Add different trees to the Ptolemy library. Give the Polybolos a slightly larger projectile. Make a tree texture darker.
This was SVN commit r26723.
2022-03-28 09:56:17 +00:00
wowgetoffyourcellphone e341daef26 [art] Add player color to hele_struct_b.
This was SVN commit r26722.
2022-03-28 09:55:02 +00:00
wowgetoffyourcellphone 050dff3aec [art][actors] Fix/Tweak some Carthaginian and Gallic actors.
This was SVN commit r26720.
2022-03-27 09:45:15 +00:00
wowgetoffyourcellphone 8935fc8748 [art] Fix the front-back position of the Carth camel trader prop and now use it.
This was SVN commit r26719.
2022-03-27 09:43:19 +00:00
wowgetoffyourcellphone 6a0a9370e9 [art] Delete this old, unused brit unit texture.
This was SVN commit r26718.
2022-03-27 09:39:03 +00:00
wowgetoffyourcellphone d2df1e5090 [art] Fix vertical position of this Carthaginian apartment model
This was SVN commit r26717.
2022-03-27 09:37:11 +00:00
wowgetoffyourcellphone 3245cf1ad1 [art][actors] Tweaked the look of some actors and some minor style stuff.
This was SVN commit r26715.
2022-03-27 01:32:17 +00:00
wowgetoffyourcellphone 838d7de552 [ART][TEXTURES][UI] Reduce resolution of these 20 technology portraits to a consistent 128^2. Save a little bit of space.
This was SVN commit r26714.
2022-03-26 23:53:48 +00:00
wowgetoffyourcellphone 860552b166 [art] Fix 2 actors caught by Jenkins.
Reported by @Stan

This was SVN commit r26713.
2022-03-26 19:08:09 +00:00
vladislavbelov 4934784266 Adds USE_FP_SHADOW to shader context only for GL ARB.
This was SVN commit r26712.
2022-03-26 19:00:28 +00:00
wowgetoffyourcellphone 6e3b33806c [art][Atlas][Alpha 26] Improve some Atlas structures.
- Use a nicer actor for the obelisk
- Better portrait for sele_colonnade.xml and Stoas
- Tweak some civs for the tents

This was SVN commit r26711.
2022-03-26 09:00:49 +00:00
wowgetoffyourcellphone 5fa5b0ad24 [Alpha 26] Tweaked these Han technologies a little
This was SVN commit r26710.
2022-03-26 08:56:07 +00:00
wowgetoffyourcellphone efd296fb72 [art] Some additional art fixes and improvements before commit freeze.
- Date Palm actor variations for use on structures and elsewhere
- Fixed missing player color on the Celtic battering ram
- Unit actor fixes and updates
- Updated a Spartan unit texture and added a spec map for weapons

This was SVN commit r26709.
2022-03-26 08:54:24 +00:00
wowgetoffyourcellphone cf1d45042b [art][actors][Spartans] Fix and enhance some Spartan actors. Add some Helot actors for fun.
This was SVN commit r26708.
2022-03-26 02:32:12 +00:00
wowgetoffyourcellphone bc43ae9461 [art] Make is so these Lithobolos operator actors don't share the same helmet types.
This was SVN commit r26707.
2022-03-26 01:37:56 +00:00
wowgetoffyourcellphone 0422d243c6 [art] A longer spear for the Persian champion cavalry.
This was SVN commit r26706.
2022-03-26 01:36:48 +00:00
wowgetoffyourcellphone cc16f89404 [Atlas] [Maps] Keep tweaking the Han sandbox map.
This was SVN commit r26704.
2022-03-25 06:58:16 +00:00
Freagarach ca78a599db Make catapult / stonethrower more useful.
So decrease their attack spread to 3, increase their crush damage and
also increase their vision range slightly, so you can actually see what
they attack.
This still means they are primarily useful against buildings, and not
unit killer as in a23.

Patch by: @marder
Differential revision: https://code.wildfiregames.com/D4511
Accepted by: @chrstgtr, @ValihrAnt, @wowgetoffyourcellphone
Comments by: @Langbart, @Stan
This was SVN commit r26703.
2022-03-25 06:32:37 +00:00
Freagarach a98049220c Use the Introductory Tutorial as tutorial.
As opposed to the Starting Economy Walkthrough, which is less
beginner-friendly.

Patch by: @azayrahmad
Differential revision: https://code.wildfiregames.com/D4194
Fixes #6347

This was SVN commit r26702.
2022-03-25 06:25:22 +00:00
wowgetoffyourcellphone 4ddaa93a56 [art][Atlas] Move the terrains from the "new_temp" folder to the "biome-temperate" folder.
Requested by @Vladislav and @Stan

This was SVN commit r26701.
2022-03-22 07:01:43 +00:00
Stan a403a9ed2e [Atlas] [Maps] Update the Default map in Atlas
Lowers default terrain grid height, which helps with shadow
sharpness on old shadows and allows for more vertical height
    A nicer Skybox as default
    One of the new higher-quality Terrain Textures by default


Patch by: @wowgetoffyourcellphone
Accepted by: @marder
Differential Revision: https://code.wildfiregames.com/D4446
This was SVN commit r26700.
2022-03-22 00:03:28 +00:00
Stan 6db7039bb4 fix mainland: decorative bushes spawnig inside the player cc on mainland.js
Patch by: @marder
Accepted by: @Langbart
Differential Revision: https://code.wildfiregames.com/D4549
This was SVN commit r26699.
2022-03-21 23:58:44 +00:00
Stan 6ad67d6a38 [art] only use the blossoming variant of the apple tree as a fruit tree to make it more distinct.
Add a normal variant.
Patch by: @marder
Accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4555
This was SVN commit r26698.
2022-03-21 23:55:34 +00:00
Stan 1f09d43c7c Use geometry instead of transparency for han shields.
Recommended by: @vladislavbelov
Removed unused head for liu bang.

This was SVN commit r26697.
2022-03-21 23:41:08 +00:00
Stan 63841facb7 Remove not working terrain_parallax_spec.xml material and usages.
Remove two other unused/bad textures and use a better dummy texture
instead.

This was SVN commit r26696.
2022-03-21 20:29:22 +00:00
Freagarach 3c0c9098cf Adjust animal stances.
There have been complaints on the forums (e.g.
https://wildfiregames.com/forum/topic/51245-how-do-you-guys-feel-about-a25-in-terms-of-how-much-fun-you-have-compared-to-a23-or-a24/#comment-446690).
Boar and walrus now behave the same as the elephants (only attack back
when attacked), whilst most other animals have defensive stance (attack
only within some smaller distance and chase until left vision).

Differential revision: https://code.wildfiregames.com/D4533
Reviewed by: @marder, @wowgetoffyourcellphone
Comment by: @Silier
This was SVN commit r26694.
2022-03-21 06:58:13 +00:00
wowgetoffyourcellphone aca70ab800 [gameplay] Reenable the Han Academy' ability to be captured.
This was SVN commit r26692.
2022-03-21 02:43:20 +00:00
wowgetoffyourcellphone 830839d55b [art] Improved a few portraits
This was SVN commit r26691.
2022-03-21 01:55:19 +00:00
vladislavbelov 249f7cad55 Fixes cinematic camera distortion on some angles.
Differential Revision: https://code.wildfiregames.com/D4567
This was SVN commit r26690.
2022-03-20 21:59:49 +00:00
wowgetoffyourcellphone 8d9396e07e [art] Fix a space in the file name of this rock template, then fix the refs in the maps that use it.
This was SVN commit r26689.
2022-03-20 19:36:50 +00:00
vladislavbelov a57581471d Reduces the number of uniform changes in decals rendering and the number of render queries in models.
This was SVN commit r26688.
2022-03-20 16:08:19 +00:00
vladislavbelov d214745f8f Reduces the number of uniform changes in decals rendering.
This was SVN commit r26687.
2022-03-20 14:58:03 +00:00
Stan fd1eb35e07 [art] replace fig tree by the better visible date palm (or by berries)
Patch by: @marder
Accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4560
This was SVN commit r26686.
2022-03-20 14:51:51 +00:00
Stan d8f6995dba [art] switch the berries on savanan biome
Patch by: @marder
Accepted by: wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4558
This was SVN commit r26685.
2022-03-20 14:50:22 +00:00
Stan 9387020ace [art] remove a decal from the small desert mines
Patch by: @marder
Accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4557
This was SVN commit r26684.
2022-03-20 14:36:23 +00:00
Stan feb32fba1a [art] Recenter the Maurya ram mesh, it was centered with the wooden beam unlike the other ones.
Noticed by: @wowgetoffyourcellphone
This was SVN commit r26683.
2022-03-20 13:54:27 +00:00
Freagarach 74275a12f3 Fix some style issues noticed by translators.
This was SVN commit r26682.
2022-03-20 08:08:27 +00:00
wowgetoffyourcellphone e69a729b64 [art] The final new default cursor?
This was SVN commit r26681.
2022-03-20 03:24:21 +00:00
wowgetoffyourcellphone 1c95269354 [art Alpha 26] Update the footprint sizes and selectable shapes for mechanical units (Siege and Ships)
Closes #6459

This was SVN commit r26680.
2022-03-20 00:34:19 +00:00
wowgetoffyourcellphone af4317c92f [art] Remove this unused actor.
This was SVN commit r26679.
2022-03-20 00:30:41 +00:00
Stan 897b37040c [gameplay] Increase the cost of mercenary cavalry from 80 to 90 metal.
Patch by: @marder
Accepted by: @ValihrAnt
Differential Revision: https://code.wildfiregames.com/D4515
This was SVN commit r26678.
2022-03-19 17:00:56 +00:00
Stan 83bdd88f4a [Gameplay] Fix Ministers being able to capture fields, palisades and walls.
Patch by: @Langbart
Reported by: Playerof0AD
Accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4565
This was SVN commit r26677.
2022-03-19 16:56:44 +00:00
Stan 69d30d4725 Add missing Territory root tooltip information for the Han Ministry.
Patch by: @Langbart
Accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4566
This was SVN commit r26676.
2022-03-19 16:51:02 +00:00
Stan a77279ad3e [art] make the olive tree a source of wood, as it is hard to see that it is a food supply
Thread:
https://wildfiregames.com/forum/topic/73939-fruit-trees-are-too-difficult-to-tell-apart-from-other-trees/
Accepted by: @wowgetoffyourcellphone
Patch by: @marder
Differential Revision: https://code.wildfiregames.com/D4561
This was SVN commit r26675.
2022-03-19 16:38:00 +00:00
Stan bb542f3aff Capitalize population in game setup
World pop was added with edb956424e, words (no preposition & articles)
for the title heading in the game setup are all capitalized except
population.

Patch By: @Langbart
Accepted by: @wowgetoffyourcellphone, @marder
Differential Revision: https://code.wildfiregames.com/D4564
This was SVN commit r26674.
2022-03-19 16:26:23 +00:00
Stan 18e4091d65 Alpha 26 Name: Zhuangzi
This is an ancient Chinese text from the late Warring States period.

Poll:
https://wildfiregames.com/forum/topic/53736-alpha-26-name-suggestions/

This was SVN commit r26673.
2022-03-19 16:19:31 +00:00
wowgetoffyourcellphone 9365464717 [A26]
Style fix on the Ministry template. Add civ to the Han palisade
template.

This was SVN commit r26672.
2022-03-19 08:38:13 +00:00
wowgetoffyourcellphone 8f2f111c35 [art - Alpha 26]
Shrink up the Arab oval shield model slightly, as it was overlapping
with the unit's weapons, etc.

This was SVN commit r26671.
2022-03-19 07:40:53 +00:00
wowgetoffyourcellphone 67050b8a83 [art - Alpha 26] Han Chinese
Move the Han head textures to the proper folder and delete the bad
folder. Adjust the head actors to the correct texture folder.

Improve the han_fem_c.png face texture and the Han female citizen
portrait.

Improve the Han fisherman actor to use better textures.

This was SVN commit r26670.
2022-03-19 07:39:38 +00:00
wowgetoffyourcellphone 12007ee14b [art Alpha 26]
Greatly reduce the size of these quiver textures. Part of an ongoing
effort to get texture sizes under control.

This was SVN commit r26669.
2022-03-19 06:41:10 +00:00
Freagarach 42b6784f07 Nerf fire cav (differently).
Give back their stacking fire, but reduce their damage, increase their
spread and repeat time.
Based on the discussion at
https://wildfiregames.com/forum/topic/72452-tasklist-for-closing-out-a26/,
this should decrease their efficiency versus units.

Patch by: @marder
Differential revision: https://code.wildfiregames.com/D4516
Reverts 422fbbee7f
Comments by: @Silier
Reviewed by: @chrstgtr, @ValihrAnt
This was SVN commit r26667.
2022-03-18 06:53:38 +00:00
vladislavbelov 2a66c783ee Make configurable mouse edge distance for view scroll.
Differential Revision: https://code.wildfiregames.com/D4552
This was SVN commit r26665.
2022-03-17 18:25:54 +00:00
vladislavbelov 2ed2e9de0c Invalidates CDeviceCommandContext texture bind cache properly.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4553
This was SVN commit r26664.
2022-03-17 18:17:11 +00:00
wraitii ce3a47e49a Fix passibilty overlay in atlas
Broken in bb49fbe793.

Patch by: nwtour
Fixes #6374

Differential Revision: https://code.wildfiregames.com/D4338
This was SVN commit r26663.
2022-03-17 15:17:49 +00:00
vladislavbelov 37b30901b3 Removes C++ code for conditional defines removed in f29d059617.
Differential Revision: https://code.wildfiregames.com/D4551
This was SVN commit r26661.
2022-03-15 22:13:22 +00:00
Freagarach 7f279c695d Remove fortress and tower entity limits.
The distance requirement is enough:
These entity limits for fortresses and towers unnecessarily restrict
player freedom, especially on giant-size maps. See also comments by
various people on the forums (e.g.
https://wildfiregames.com/forum/topic/37687-lets-fight-gameplay-balance-mod/page/2/?tab=comments#comment-422251).

Patch by: @Nescio
Rebased by: @marder
Differential revision: https://code.wildfiregames.com/D3778
Reviewed by: @borg-, @chrstgtr
Comment from: @wowgetoffyourcellphone

This was SVN commit r26660.
2022-03-15 07:08:05 +00:00
Freagarach 7a42776b83 Increase the acceleration.
Patch by: @marder
Differential revision: https://code.wildfiregames.com/D4512
Agreed: @chrstgtr, @Effervescent, @LetswaveaBook, @PhiliptheSwaggerless,
@Stockfish, @ValihrAnt, @wowgetoffyourcellphone
Disagreed: @bb, @Freagarach

This was SVN commit r26659.
2022-03-15 07:04:42 +00:00
Freagarach 6db68dbe8e Don't show captured units in summary.
Since siege isn't capturable anymore since d583048690.

Reported by: fmmaks at
https://wildfiregames.com/forum/topic/73490-cant-capture-siege-engines-alpha-25/#comment-484544.
Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4538
Fixes #6455

This was SVN commit r26658.
2022-03-15 06:53:40 +00:00
Freagarach 4af4fa84e3 Fix using numeric cheats with a non-numeric value.
Requested by @Silier at 93b22c5f86.
This notifies players when using a non-numeric value and guards the
simulation against such cases.

Previous behaviour was that a cheat was executed with its default value.
Now the cheat is not used.

Differential revision: https://code.wildfiregames.com/D4485
Comments by: @bb, @Silier
This was SVN commit r26657.
2022-03-15 06:46:34 +00:00
Freagarach 02de932816 Remove redundant function in HasDealtWithTech in trigger helper.
The function was redundant for a long time, but made an error in
73f741d266.

Reported by: @marder
Differential revision: https://code.wildfiregames.com/D4541
Tested by: @marder
Fixes #6458

This was SVN commit r26656.
2022-03-15 06:38:46 +00:00
Freagarach 959d50b81d Add icon and tooltip for han pop bonus.
Similar to the pers and maur ones.

This was SVN commit r26655.
2022-03-15 05:39:29 +00:00
vladislavbelov ea6af3f148 Updates a model color uniform in RenderModifier only if it was changed.
This was SVN commit r26653.
2022-03-14 22:56:38 +00:00
vladislavbelov b4253d48cb Moves CShaderProgram to backend and handling via CDeviceCommandContext.
Differential Revision: https://code.wildfiregames.com/D4548
This was SVN commit r26652.
2022-03-14 22:16:14 +00:00
bb 1b0891c566 Handle OutOfWorld for formations
Comments By: Silier
Reviewed By: Freagarach
Differential Revision: D4535
fixes #6448
fixes d9d4deb6ce

This was SVN commit r26651.
2022-03-14 19:51:22 +00:00
Angen a7b7f50cc8 Move some shaders to mod
Differential revison: D4547
Fixes: #6294

This was SVN commit r26650.
2022-03-14 17:24:47 +00:00
Angen 8cec96270b Don't create thread on failed connection
Differential revision: D4545
Fixes: #6442

This was SVN commit r26649.
2022-03-14 17:19:42 +00:00
wowgetoffyourcellphone cce1005c81 [art - Alpha 26]
Fix 2 Blemmye textures. Somehow during the moving and renaming process
the textures got screwed up.

This was SVN commit r26646.
2022-03-14 06:02:21 +00:00
wowgetoffyourcellphone 36c7fff532 [Han Chinese - Alpha 26]
Renamed the Han civ bonus filename to match the Persian and Mauryan
files of the same effect. Very minor change.

This was SVN commit r26644.
2022-03-14 03:54:50 +00:00
Stan 91a1fddf9d Fix arctic biome bushes spawning too close to the CC.
Patch by: @marder
Accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4543
This was SVN commit r26643.
2022-03-14 00:15:43 +00:00
Angen 74ce45b93e Fix Macedonian bonus
Differential revision: D4544
Patch by: @ValihrAnt
Missed rebase

This was SVN commit r26642.
2022-03-13 19:14:44 +00:00
Angen 020a123ea1 [gameplay] Adjust Kushite Pyramids to be more used
Differential revision: D4280
Patch by: @ValihrAnt
Reviewed by: @chrstgtr
Accepted by: @marder
Comments by: @wowgetoffyourcellphone @LetswaveaBook @wraitii @Freagarach
This was SVN commit r26641.
2022-03-13 19:08:46 +00:00
Angen 4023b04895 [gameplay] increase attack of defensive structures slightly
This increases their damage slightly from 10 to 11

Differential revision: D4510
Patch by: @marder
Reviewed by: @wowgetoffyourcellphone
Comments by: @chrstgtr
This was SVN commit r26640.
2022-03-13 18:54:06 +00:00
Stan 87b04cc3f9 Add a word of caution to the empire map.
Patch by: @Langbart
Fixes #6456
Differential Revision: https://code.wildfiregames.com/D4546
This was SVN commit r26639.
2022-03-13 18:51:13 +00:00
Angen 8f7ee59f79 Fix 0 tech cost multiplier in session tooltips
This was SVN commit r26638.
2022-03-13 13:01:19 +00:00
vladislavbelov 376fe61df9 Adds missed shader program validation after 0456b09c3c.
Reported By: Freagarach
This was SVN commit r26637.
2022-03-13 11:01:32 +00:00
wowgetoffyourcellphone 272b4c1828 [Han Chinese - Alpha 26]
Make the Imperial Court upgrade only applicable to 1 civic center.

This was SVN commit r26636.
2022-03-13 04:54:57 +00:00
wowgetoffyourcellphone ff4e30d672 [Han Chinese - Alpha 26] This retools the Imperial Court upgrade for the Civic Center.
Discussion:
https://wildfiregames.com/forum/topic/71582-fixing-chinese-han/

This removes the Champion training aspect and reduces the GarrisonHolder
from 2x to a 1.5x bonus, the same as the health and capture points
bonus. 2x garrisoning caused there to be a prohibitive number of arrows.

Replaces the champions with faster batch training speed. Unlocked heroes
still remain.

This was SVN commit r26634.
2022-03-13 04:53:40 +00:00
wowgetoffyourcellphone 2c9a6704e0 Forgot to commit the unlock tech changes for c4bdbe4dd9
This was SVN commit r26633.
2022-03-13 04:53:08 +00:00
wowgetoffyourcellphone c4bdbe4dd9 [Han Chinese - Alpha 26] Champions trainable in captured Barracks and Stables now require Unlocking Techs
Discussion:
https://wildfiregames.com/forum/topic/71582-fixing-chinese-han/

Previously, one could capture an enemy Barracks or Stable and train Han
champions there without researching the champion unlocking techs. This
rectifies this (in an admittedly hacky way) by creating duplicate Han
champion templates with suffix "_academy" and putting those in the Han
Academy with the RequiredTechnology of City Phase.

The original Han champion templates, which are what can be trained in
captured Barracks and Stables, are given the unlocking
RequiredTechnology respective to their class (as most of civs'
champions).

Both Templates have the same SelectionGroupName, so should be selectable
together with a double-click with no problem.

Please report problems in the above linked thread.

This was SVN commit r26632.
2022-03-13 04:34:03 +00:00
wowgetoffyourcellphone 4eb65144fc [Han Chinese] Minister
- Make his capture attack be 20% less than heroes, but 40% more than
champions (previously his capture attack was a whopping 20)
- Add an attack-move soundgroup
- Discussion:
https://wildfiregames.com/forum/topic/71582-fixing-chinese-han/

This was SVN commit r26631.
2022-03-13 04:25:10 +00:00
vladislavbelov e89e55539e Removes custom vertex attribute locations for GLSL. Refs ce215cace3.
This was SVN commit r26630.
2022-03-12 23:25:23 +00:00
vladislavbelov 992c18aabb Enables ARB shaders only once since we should not mix different backends.
This was SVN commit r26629.
2022-03-12 22:10:47 +00:00
vladislavbelov 0456b09c3c Moves shader dependent XML parsing from shader manager to shader program.
This was SVN commit r26628.
2022-03-12 22:02:21 +00:00
Stan 325176fa55 [gameplay] Macedonian bonus - Instant storehouse technology research time.
Patch by: @ValihrAnt
Accepted by: @chrstgtr
Differential Revision: https://code.wildfiregames.com/D4234
This was SVN commit r26627.
2022-03-12 21:52:23 +00:00
Stan d9ccc5c499 [gameplay] Nerf Han hero Han Xin
Patch by: @ValihrAnt
Accepted by: @marder, @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4525
This was SVN commit r26626.
2022-03-12 21:22:16 +00:00
Stan 50234ba533 Slighty offset the stone mine on the tutorial map to prevent overlap.
Patch by: @Langbart
Accepted by: @marder
Thread:
https://wildfiregames.com/forum/topic/73619-tutorial-map-woman-overlapping-stone-mine

Differential Revision: https://code.wildfiregames.com/D4540
This was SVN commit r26625.
2022-03-12 19:29:18 +00:00
vladislavbelov 518a1421ab Clears the color attachment of the main framebuffer only if needed.
Differential Revision: https://code.wildfiregames.com/D4539
This was SVN commit r26623.
2022-03-11 22:26:49 +00:00
Stan 61ef7fc1d1 Adjusted walking speed and animation speed for a number of animals:
- camel, cow, sanga cattle, zebu: decreased animation speed
- deer and gazelle: decreased animation speed and walking speed.

Patch by @pszemsza
Fixes #5680
Differential Revision: https://code.wildfiregames.com/D3891
This was SVN commit r26622.
2022-03-11 13:51:43 +00:00
wowgetoffyourcellphone 4f028b0771 [art] Resize the minimap icons from 32x32 to 16x16
This was SVN commit r26621.
2022-03-11 08:18:25 +00:00
Freagarach dff79a388b Fix obstructed entities being able to drop off resources.
Introduced in 7ba4b1ffc8 by not checking the range anymore.
Reported by @FFFF at
https://wildfiregames.com/forum/topic/72985-stuck-units-delivering-resourses/.

Differential revision: https://code.wildfiregames.com/D4531
Tested by: @Langbart
Fixes #6446

This was SVN commit r26619.
2022-03-11 06:39:25 +00:00
Freagarach 41033d951e Fix stances of healers.
They fled whilst healing and not when idle. That is the other way around
than expected.
Introduced in healing introduction (c56f96040e); #999 specifically made
them flee, but it left quite undefined behaviour.
Reported by @BreakfastBurrito_007 on the forums somewhere.

Differential revision: https://code.wildfiregames.com/D4532
This was SVN commit r26618.
2022-03-11 06:37:03 +00:00
Stan 9c22f9f123 Fix the loading of subfiles for LODS. It currently failed because el_actor and el_quality levels have different ids depending on the loaded file. e.g for an actor with qualitylevels el_actor will be 18 and el_qualitylevels will be 0 while for a standard actor el_actor will be 0 and el_qualitylevels will be -1, hence failing for all the files since the code assumed wrong. XeroActor.Load() takes care of all the other cases, e.g. trying to load a variant which means the only valid check is for qualitylevels.
Fixes 76acc4e146

This was SVN commit r26616.
2022-03-10 21:32:36 +00:00
vladislavbelov 5390143b66 Fixes rendering reflections even they are disabled, broken in 9ce51f4357. Fixes #6454
Reported By: Langbart
This was SVN commit r26615.
2022-03-10 16:36:16 +00:00
vladislavbelov 1ce999a52d Creates water backend textures and framebuffers only if needed.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4536
This was SVN commit r26613.
2022-03-09 21:40:24 +00:00
wowgetoffyourcellphone ca3c3714a7 [art] Han Chinese
New portrait for Wei Qing, by kul

This was SVN commit r26612.
2022-03-09 17:50:14 +00:00
vladislavbelov cb1f0807c5 Removes FALLTHROUGH in VertexArray after 12c304e494. Fixes #6453
This was SVN commit r26611.
2022-03-09 07:07:02 +00:00
vladislavbelov 12c304e494 Removes duplication of backend format in VertexArray usages, optimizes vertex color attribute of quad overlay.
This was SVN commit r26609.
2022-03-08 23:28:31 +00:00
wowgetoffyourcellphone 6a09087225 [art] Han Chinese
- Liu Bang portrait by @kul

This was SVN commit r26608.
2022-03-08 09:21:07 +00:00
wowgetoffyourcellphone 059fbf25d1 [Fix - Alpha 26] Remove minimap icons from Stone and Metal mines for this release, as some maps have more than the max number of 128.
Refs diff: ​https://code.wildfiregames.com/D4513
Refs changeset: 9e6e6e7535

This was SVN commit r26607.
2022-03-08 07:03:58 +00:00
vladislavbelov 41f2ab87ed Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d.
Also fixes GLES.

Differential Revision: https://code.wildfiregames.com/D4528
This was SVN commit r26605.
2022-03-07 23:04:11 +00:00
Stan 687174e5d9 Fix crash when creating JSON file that do not exist.
Tested by: @Langbart
Refs: #6450
Differential Revision: https://code.wildfiregames.com/D4529
This was SVN commit r26604.
2022-03-07 15:46:28 +00:00
wowgetoffyourcellphone 3417669e97 [art] Improve the look of the loading screen parchment. From a cc0 source.
This was SVN commit r26602.
2022-03-07 07:28:48 +00:00
wowgetoffyourcellphone 2d598c34f3 [Fix] Han Minister attack soundgroup
This was SVN commit r26601.
2022-03-07 06:56:21 +00:00
wowgetoffyourcellphone 9e6e6e7535 [Minimap] Finish off the minimap feature with the rest of the icons
Refs diff: https://code.wildfiregames.com/D4513
Refs #26592

This was SVN commit r26600.
2022-03-07 06:49:08 +00:00
wowgetoffyourcellphone 839d38386c [gameplay - Alpha 26] Han Chinese
- Remove the bolt shooter tech from the Han arsenal, since they no
longer have a bolt shooter

This was SVN commit r26598.
2022-03-07 05:04:22 +00:00
wowgetoffyourcellphone c62cc86477 [art] Improve the Ptolemy merc cav actors.
This was SVN commit r26597.
2022-03-07 05:03:05 +00:00
wowgetoffyourcellphone 1fd263520c [art] Create a new material player_trans_ao_norm_spec.xml
This was SVN commit r26596.
2022-03-07 05:02:07 +00:00
wowgetoffyourcellphone 475e1a02ae [art] Allow the Spartan Syssition model to use Spartan hoplite shields instead of the ugly low res bronze disks used previously.
This was SVN commit r26595.
2022-03-07 04:59:51 +00:00
vladislavbelov 647fccd410 Replaces native GL types by backend format in vertex attributes in CShaderProgram.
This was SVN commit r26594.
2022-03-07 02:21:05 +00:00
wowgetoffyourcellphone 36faf3bb4f This was SVN commit r26593. 2022-03-07 01:59:41 +00:00
vladislavbelov ce18f297d5 Adds icons to minimap.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4513
This was SVN commit r26592.
2022-03-07 01:22:06 +00:00
wowgetoffyourcellphone ddf88a2640 [gameplay - Alpha 26] Han Chinese
- Remove GarrisonHolder from the Han Dock, as it messed up the trade
route waypoint feature.
- Maybe investigate a way to get around this.

This was SVN commit r26591.
2022-03-06 23:25:46 +00:00
wowgetoffyourcellphone ff3b6d5ac4 [Jenkins Log]
- Fixing Thespian Melanochitones and Theban Sacred Band errors
introduced in 8c8d765c06
- Fixing some shield errors introduced in f2346b6796

This was SVN commit r26589.
2022-03-06 22:32:41 +00:00
vladislavbelov 3399791677 Adds renderer backend vertex formats and normalizes texture formats.
This was SVN commit r26588.
2022-03-06 22:14:57 +00:00
bb 15ed402a12 [A26 Gameplay] Tweak the formation turning threshold
Reviewed By: marder
Differential Revision: D4517
This was SVN commit r26587.
2022-03-06 21:32:19 +00:00
bb 6a9a17606c further optimizations for map Unknown: Passes
Patch By: elexis
Transferred By: marder
aids 50fefd0605
Differential Revision: D4526
This was SVN commit r26586.
2022-03-06 21:30:19 +00:00
vladislavbelov db7894ff6b Removes redundant binding slot retrieving from CShaderProgram.
This was SVN commit r26585.
2022-03-06 21:17:24 +00:00
bb 8eecc39e71 Let the Gamesetup.cpp Autostart (starting from cl) use the gamesettings via the autostart gui page.
Comments and testing By: Langbart
Fixes #6433
Differential Revision: D4492
Includes/Obsoletes D4287

This was SVN commit r26584.
2022-03-06 21:12:16 +00:00
bb 2af020bab1 Generalize fromInitAttributes loop
Add deepCompare function to utilities to easy and reliably compare js
variables.

Comments By: Langbart, Stan, asterix
Differential Revision: D4521
This was SVN commit r26583.
2022-03-06 21:01:36 +00:00
vladislavbelov bc6ab4ac49 Removes redundant CShaderProgram streams.
This was SVN commit r26582.
2022-03-06 20:53:39 +00:00
wowgetoffyourcellphone 18c450a268 [art] Fix resolution of portrait (from 250^2 to 256^2)
This was SVN commit r26581.
2022-03-06 20:23:38 +00:00
wowgetoffyourcellphone 77978b8348 [art] New portraits of Han Xin and Cleopatra.
First art commit from user kul. Congrats!

Thread:
https://wildfiregames.com/forum/topic/27520-task-improve-hero-portraits/?do=findComment&comment=479591

This was SVN commit r26580.
2022-03-06 18:07:51 +00:00
vladislavbelov 63f749da2d Removes unused functions from CShaderProgram.
This was SVN commit r26579.
2022-03-06 16:40:04 +00:00
Stan 50fefd0605 Fix unknown map: opponent being unreachable
Patch by: @elexis
Tweaks by: @Langbart, @marder
Fixes: #6422
Differential Revision: https://code.wildfiregames.com/D4457
This was SVN commit r26578.
2022-03-06 15:22:35 +00:00
Stan 3299bc7efb Fix unpassable and unnatural forests on African Plains
Patch by: @marder
Differential Revision: https://code.wildfiregames.com/D4502
This was SVN commit r26577.
2022-03-06 15:10:16 +00:00
Stan aad2453e09 Texture update for polar sea
Patch by: @marder
Differential Revision: https://code.wildfiregames.com/D4450
This was SVN commit r26576.
2022-03-06 15:05:06 +00:00
Stan 352dd1873d Texture update/ general overhaul for Gulf of Bothnia and its biomes
Reviewed by: @smiley
Differential Revision: https://code.wildfiregames.com/D4086
This was SVN commit r26575.
2022-03-06 14:51:25 +00:00
Angen 9fcb007bb3 [Petra] Fix han civilisation
This was SVN commit r26574.
2022-03-06 13:54:03 +00:00
Stan 71a5274c52 Add 24 new music tracks.
Patch by: @Samulis, Omri Lahav
Refs: #6445

This was SVN commit r26573.
2022-03-06 11:25:57 +00:00
bb b5d5628667 Make sure PlayerCiv values are initialized
fixes daada92a82
Reviewed By: Silier
Differential Revision: D4522
This was SVN commit r26572.
2022-03-06 09:39:57 +00:00
wowgetoffyourcellphone 0668167fda [art] Seven new technology portraits.
This was SVN commit r26571.
2022-03-06 07:54:00 +00:00
wowgetoffyourcellphone 217aa91496 [art] Better decals for some building actors; added 2 new "tents" for Atlas.
This was SVN commit r26570.
2022-03-06 07:52:34 +00:00
wowgetoffyourcellphone 8c8d765c06 [art/templates] Move Sacred Band and Thespian Black Cloaks to the Theban folder; rename the templates to suit
This was SVN commit r26569.
2022-03-06 07:50:19 +00:00
wowgetoffyourcellphone 5dbb7729d6 [art/art cleanup] Some texture updates and deletions.
This was SVN commit r26568.
2022-03-06 07:47:57 +00:00
wowgetoffyourcellphone 4811b24483 [art cleanup] Reduce the resolution and file size of these Kushite statue textures.
This was SVN commit r26567.
2022-03-06 07:44:08 +00:00
wowgetoffyourcellphone f2346b6796 [art cleanup] Remove 190 unused shield textures and actors
- Attempt to fix all instances where there caused a problem. Still on
the lookout for anymore gremlins.
- Will hunt down and remove unused meshes in a later commit.

This was SVN commit r26566.
2022-03-06 07:32:38 +00:00
wowgetoffyourcellphone cbf0b49b85 [art] Cleanup these Scutum Boss textures by reducing their file dimensions and file size. (they were comically oversized)
This was SVN commit r26565.
2022-03-06 07:25:59 +00:00
wowgetoffyourcellphone 0bcf289798 [art] Darken the sand decals slightly.
This was SVN commit r26564.
2022-03-06 07:24:39 +00:00
wowgetoffyourcellphone b45bc531c4 [art] Use newer shield models for the sides of the Roman warships
This was SVN commit r26563.
2022-03-06 07:20:05 +00:00
wowgetoffyourcellphone 69daefeb2b [art] Move the prop points for the Roman tents to fit the newer Roman Scutum models.
This was SVN commit r26562.
2022-03-06 07:17:32 +00:00
wowgetoffyourcellphone fc5a165d81 [art] Add specular to the Mausoleum statues
This was SVN commit r26561.
2022-03-06 07:15:50 +00:00
wowgetoffyourcellphone 5867d96ab4 [art] Add a Bronze Quadriga to the top of the Roman Triumphal Arch
This was SVN commit r26560.
2022-03-06 07:13:05 +00:00
wowgetoffyourcellphone ee8bec703d [art] Fix the Spart temple decal.
This was SVN commit r26559.
2022-03-06 07:10:54 +00:00
Stan cddb52cd3f Fix menu music no longer playing.
This was SVN commit r26557.
2022-03-05 22:23:53 +00:00
wowgetoffyourcellphone dd499437ca [art] 4 improved unit portraits.
This was SVN commit r26556.
2022-03-05 21:56:52 +00:00
Stan 82ee4fdce2 [gameplay] Reduce pikemen pierce armor by 2
Patch by: ValihrAnt
Accepted by: @wowgetoffyourcellphone, @chrstgtr
Differential Revision: https://code.wildfiregames.com/D4524
This was SVN commit r26555.
2022-03-05 21:56:04 +00:00
wowgetoffyourcellphone db31e46030 [art] Move Han weapon textures to the right subfolder.
This was SVN commit r26554.
2022-03-05 21:37:04 +00:00
wowgetoffyourcellphone c55cd0d7f8 [art] A dozen new technology portraits.
This was SVN commit r26553.
2022-03-05 20:46:17 +00:00
wowgetoffyourcellphone ebac6b01fa [art] Some hero portrait background textures
This was SVN commit r26552.
2022-03-05 20:05:53 +00:00
wowgetoffyourcellphone d32c68eb2c Add Chinese specificName for Town and City phase techs.
Discussion:
https://wildfiregames.com/forum/topic/38729-addition-of-han-chinese-to-0ad/?do=findComment&comment=482980

Participants: @Carltonus @OliverLew @AIEND

This was SVN commit r26551.
2022-03-05 19:47:01 +00:00
wowgetoffyourcellphone d566f891d9 [art] Stopped dead Baobabs from swaying in the wind.
refs: #6423

This was SVN commit r26550.
2022-03-05 19:39:42 +00:00
wowgetoffyourcellphone ca47c244c5 [art] 2 new skyboxes; 1 updated
"Desert", "Sunrise", and "Stratus_2" skyboxes from cc0 sources.

This was SVN commit r26549.
2022-03-05 19:24:46 +00:00
wowgetoffyourcellphone 6e863d141b [gameplay - Alpha 26] Han Chinese
The Han Minister can now defend himself. Exact values open for debate.

This was SVN commit r26548.
2022-03-05 19:14:58 +00:00
Stan 38351207ba Fix Han civil service technologies
Patch by: @marder
Accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4523
This was SVN commit r26547.
2022-03-05 19:02:08 +00:00
Stan 9ce9273c35 Add quotes to the logged filenames.
Differential Revision: https://code.wildfiregames.com/D2212
This was SVN commit r26546.
2022-03-05 18:30:38 +00:00
Stan 376720e55e Fix white appearing in camel mipmaps.
Noticed by: @marder
This was SVN commit r26545.
2022-03-05 18:12:11 +00:00
Stan b9d3d00c50 Show system_info.txt, console.txt, json file, userreport_hw.txt paths in the terminal when it's written to the disk.
Discussed with: @vladislavbelov
Idea by: @elexis
Differential Revsion: https://code.wildfiregames.com/D2212

This was SVN commit r26544.
2022-03-05 17:28:00 +00:00
Stan f3fbc86529 Fix an error introduced in fa5671438a. _string was expected but message was there instead
Refs: #6197
Suggestion by: @bb
This was SVN commit r26543.
2022-03-04 14:33:06 +00:00
Stan f2f54cb23d Only add default music tracks if civ.json doesn't override them.
Comments by: @bb, @Freagarach
Differential Revision: https://code.wildfiregames.com/D4500
This was SVN commit r26542.
2022-03-04 14:09:14 +00:00
Stan ba825ac514 Fix Han practice_range triggering errors.
This was SVN commit r26541.
2022-03-04 14:04:54 +00:00
wowgetoffyourcellphone a586d94230 Use some of @Stan's new 'Polar' geology assets on the Alpine Valleys skirmish map.
This was SVN commit r26539.
2022-03-04 06:28:26 +00:00
vladislavbelov 3eee3a444d Adds final keyword to simulation component classes.
Differential Revision: https://code.wildfiregames.com/D4520
This was SVN commit r26537.
2022-03-03 22:42:26 +00:00
vladislavbelov d494bbd583 Replaces M_PIf by M_PI in Atlas, fixes compilation with gcc 11.2.0 and glibc 2.35.
There was added a workaround in glibc to fix tests.

Refs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103735
https://sourceware.org/bugzilla/show_bug.cgi?id=28713

This was SVN commit r26536.
2022-03-03 18:10:05 +00:00
bb bd4b7d4bb6 Generalise gamesettings pickRandomItems' loop
Comments By: wraitii, Stan, Silier
Suggested By: elexis
Differential Revision: D4231
This was SVN commit r26535.
2022-03-03 16:13:35 +00:00
Stan bc59f0c40b Use the correct resource type for polar stone mines.
Patch by: @marder
Differential Revision: https://code.wildfiregames.com/D4519
This was SVN commit r26534.
2022-03-03 15:04:59 +00:00
bb be2f33b661 removeable => removable
Patch By: LudovicRousseau
Comments By: vladislav, Nescio
Differential Revision: D3663
fixes #6098

This was SVN commit r26533.
2022-03-03 14:52:13 +00:00
bb aa79122b7f introduce template_unit_siege_flamethrower.xml
Patch By: Nescio
Differential Revision: D3576
This was SVN commit r26532.
2022-03-03 14:11:47 +00:00
Stan fa5671438a Fix invalid translations in the game options.
Comments and fixes by: @bb
Fixes: #6197
Differential Revision: https://code.wildfiregames.com/D4083
This was SVN commit r26531.
2022-03-03 13:34:15 +00:00
bb fefde41317 Allied chat opens with t bug (on linux)
Comments By: vladislav, elexis
Solution Proposed By: elexis
fixes #5194
refs #3870

Differential Revision: D1386
This was SVN commit r26530.
2022-03-03 11:36:08 +00:00
Stan 2fbd9ea17d Add new polar mines.
Refs: https://code.wildfiregames.com/D4450

This was SVN commit r26529.
2022-03-03 11:04:52 +00:00
Stan ab501175f9 Improve new metal mine textures. Better normal map and specular.
This was SVN commit r26528.
2022-03-03 11:02:57 +00:00
wowgetoffyourcellphone 6281499708 Move Roman legionary shoulder pad actors to the /armor/ subfolder
This was SVN commit r26527.
2022-03-03 07:15:26 +00:00
wowgetoffyourcellphone 6b158ce34d Line endings -> native
This was SVN commit r26526.
2022-03-03 07:12:04 +00:00
vladislavbelov 3a4bbd11fd Moves all GL draw commands to CDeviceCommandContext.
Differential Revision: https://code.wildfiregames.com/D4518
This was SVN commit r26525.
2022-03-03 07:09:59 +00:00
bb 7c3aed5f36 Set the size of the overlaybox without relying on the arbitrary initSize
Comments By: vladislav
Differential Revision: D4489
This was SVN commit r26523.
2022-03-02 16:27:11 +00:00
bb 8aa00041e9 Fix BufferZone in right alignment
Comments By: vladislav
Differential Revision: D4490
This was SVN commit r26522.
2022-03-02 16:14:05 +00:00
bb f69e5c01e8 Fix template type in d9d4deb6ce
This was SVN commit r26521.
2022-03-02 15:55:16 +00:00
bb d9d4deb6ce smoother formation manouvres
Implement a threshold between "turning" the formation and "rearranging"
it.

Patch By: marder
Based on Patch By: alre
Comments By: Freagarach, Stan, Silier
Glanced good By: Freagarach
Differential Revision: D4294
Forum Topic:
https://wildfiregames.com/forum/topic/44848-proposals-for-formations/#comment-452917

This was SVN commit r26520.
2022-03-02 12:54:43 +00:00
wowgetoffyourcellphone 250b0f12c6 [gameplay - Alpha 26]
Attempt at making Crossbow teching less OP:
- Remove "Repeating Crossbows" as it was historically problematic and
was also OP for crossbows.
- Reduce the RepeatTime bonus in "Crossbow Training" from -33% to -20%.

This was SVN commit r26519.
2022-03-02 07:36:23 +00:00
wowgetoffyourcellphone df0cd5ac71 Really fix the Han Sandbox this time.
This was SVN commit r26517.
2022-03-01 18:37:33 +00:00
wowgetoffyourcellphone 299df0f049 [gameplay - Alpha 26]
Removed the ability of the Han to research 'Will to Fight' from a
captured Fortress. Reported by @faction_02 here:
https://wildfiregames.com/forum/topic/71578-feedbacks-from-a26-svn-tests/?do=findComment&comment=482636

Increased the cost and research time of 'Art of War' to match the other
two Han special Fortress techs.

On the backend moved the Han techs to the Fortress parent template.
Seemed cleaner.

This was SVN commit r26516.
2022-03-01 18:24:43 +00:00
wowgetoffyourcellphone afde89eb33 Update some "sandbox" maps.
Fixed an error to the Han sandbox reported by @Stan.

This was SVN commit r26515.
2022-03-01 18:07:05 +00:00
vladislavbelov 6de2649955 Fixes empty decals drawing when a decal is outside or on a border of a map.
Reported By: Nullus
This was SVN commit r26514.
2022-03-01 18:02:52 +00:00
Stan 32ed1f9065 Fix heads forgotten in 090ce1c82f
This was SVN commit r26513.
2022-03-01 15:39:24 +00:00
Stan 75f7cde184 Fix previous commit. Removing materials only doesn't work with the game's collada importer.
Noticed by: @marder
This was SVN commit r26512.
2022-03-01 15:34:17 +00:00
Stan 8f8752fbe4 Fix incorrect normal maps for stone_furrowed_0* meshes.
Remove duplication in some actors.
Fix naming conventions for those files.
Use the correct material.

Noticed by: @marder
This was SVN commit r26511.
2022-03-01 14:17:24 +00:00
wowgetoffyourcellphone 552f66e527 Add additional animation variants to the medium player color cape.
This was SVN commit r26509.
2022-02-28 05:51:20 +00:00
wowgetoffyourcellphone 88572c5e80 New f_armor_dress.dae mesh by @Stan with a better UV map
This allows for more accurate textures for female units with intricate
patterns on their long skirts. Boudicca is the first example, provided
here.

This was SVN commit r26508.
2022-02-28 05:50:27 +00:00
wowgetoffyourcellphone 3344324a66 [gameplay - Alpha 26] More Han refactoring
Chariot Crossbowman -> Chariot Archer
- Adjusted Actors and template

Champion Cavalry
- Took away shield and gave cataphract animations

Champion Swordsman -> Champion Spearman

Liu Bang
- Gave him a different base animation variant

This was SVN commit r26507.
2022-02-28 05:46:49 +00:00
wowgetoffyourcellphone f0d7c8ec27 Fixed supersedes line in this tech. Reported by @Stan
This was SVN commit r26505.
2022-02-27 23:50:42 +00:00
wowgetoffyourcellphone 1173163066 Added a requirementsTooltip message in case the Espionage tech is ever placed in a different building, as it is for the Han.
This was SVN commit r26504.
2022-02-27 23:45:52 +00:00
Stan a04ad0beb2 Make ClumpPlacer determine the correct fraction of failed attempts to place points
Comments by: @smiley, @elexis
Patch by: @Inari
Fixes #5092
Differential Revision: https://code.wildfiregames.com/D1414
This was SVN commit r26503.
2022-02-27 21:49:32 +00:00
vladislavbelov 1ff3b45a1e Adds more checks for vertex and index buffer creations.
This was SVN commit r26502.
2022-02-27 20:21:07 +00:00
wackyserious 10c0d813bf Improved Persian head textures
This was SVN commit r26501.
2022-02-27 13:04:56 +00:00
wackyserious dd90459888 Improved numidian head texture
-Derived from an edit of the Vercingetorix face texture

This was SVN commit r26500.
2022-02-27 07:12:36 +00:00
wackyserious 090ce1c82f Numidian head fix (eye color and skin tone)
This was SVN commit r26499.
2022-02-27 06:12:02 +00:00
vladislavbelov da4ec670c1 Moves glViewport from CRenderer to CDeviceCommandContext.
This was SVN commit r26497.
2022-02-26 23:17:48 +00:00
Stan a217718254 Fix stone mine actors on maps after 1a6c1c2131.
Patch by: @marder
Differential Revision: https://code.wildfiregames.com/D4505
This was SVN commit r26496.
2022-02-26 22:52:33 +00:00
vladislavbelov 680b0215fc Adds depth bias to PipelineState and its management to CDeviceCommandContext.
Refs #2368

This was SVN commit r26495.
2022-02-26 21:49:32 +00:00
vladislavbelov bf8fe51dea Moves enabling of GL multisample to CDevice.
This was SVN commit r26494.
2022-02-26 21:10:14 +00:00
vladislavbelov 6bc2f7a783 Draws entities on minimap via triangles instead of points.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4509
This was SVN commit r26493.
2022-02-26 20:30:09 +00:00
vladislavbelov 67cafcd599 Fixes GLES and compilation warnings.
This was SVN commit r26492.
2022-02-26 20:28:39 +00:00
Stan 3651ff26d9 Fix shadow glitch on Maurya market on lowest setting.
Reported by: @marder
This was SVN commit r26491.
2022-02-26 17:36:15 +00:00
wackyserious 70dc03e20d Large round shield (no boss) mesh + complimentary variants to the new Gaul noble tunic
This was SVN commit r26489.
2022-02-26 05:00:18 +00:00
vladislavbelov 23a023507a Replaces GL_LINES, GL_QUADS, GL_TRIANGLE_STRIP and GL_TRIANGLE_FAN by GL_TRIANGLES.
This was SVN commit r26488.
2022-02-26 00:37:27 +00:00
vladislavbelov 59a0a74951 Fixes a degenerate triangle on terrain sides of map corners.
This was SVN commit r26487.
2022-02-25 23:45:54 +00:00
vladislavbelov d5d1754991 Moves polygon mode handling to PipelineState and CDeviceCommandContext.
This was SVN commit r26486.
2022-02-25 22:05:06 +00:00
vladislavbelov a87cb6c94d Moves GL depth comparison function to SamplerDesc.
This was SVN commit r26485.
2022-02-25 20:02:03 +00:00
vladislavbelov 0d2faa1cab Adds debug context option for GL context creation.
This was SVN commit r26484.
2022-02-25 16:26:56 +00:00
wowgetoffyourcellphone 1a6c1c2131 [Art] New trees, bushes, and rocks.
New "Bush" mixin

Note, the Badlands rock actors have been renamed. Might break some maps.

This was SVN commit r26483.
2022-02-25 09:31:12 +00:00
wowgetoffyourcellphone eed2cbe740 [Gameplay - Alpha 26] More Han Refactoring
- Major thing is added the Chinese Chariot as a champion, trainable at
the Academy.

- Replaced Crossbowman with Archer as the starting ranged infantry. This
is still open for changing as there is a poll on the forum about it.

This was SVN commit r26482.
2022-02-25 08:20:42 +00:00
vladislavbelov 8a63adc40d Uses CDeviceCommandContext as an input parameter for CCanvas2D.
This was SVN commit r26480.
2022-02-25 08:14:11 +00:00
vladislavbelov d1f1d41a9f Uses triangles for drawing lines in CCanvas2D.
Differential Revision: https://code.wildfiregames.com/D4444
This was SVN commit r26479.
2022-02-25 06:59:57 +00:00
Freagarach a3b99b17b0 Give an icon to the spy.
Needed after ef1d1dbed8.
Reported by: @Stan
Solution suggested by: @wowgetoffyourcellphone
Differential revision: https://code.wildfiregames.com/D4503
This was SVN commit r26478.
2022-02-25 05:58:29 +00:00
Freagarach 9373e7044e Clean PlayerManager.js.
Remove obseleted function RemoveAllPlayers in 354bd8b088.
Linter stuff.
Don't initialise undefined world population value.

Differential revision: https://code.wildfiregames.com/D4494
This was SVN commit r26477.
2022-02-24 07:04:46 +00:00
Freagarach b778caf146 Move FormationName and Icon from cmpFormation to cmpIdentity.
Reduces duplication across components.
Allows to provide specific names and history for formations.

Differential revision: https://code.wildfiregames.com/D4476
Comments by: @bb, @Stan
Fixes #6400

This was SVN commit r26476.
2022-02-24 06:51:07 +00:00
Angen 422fbbee7f [gameplay-a26] Do not stack fire damage
Fire cavalry is currently unstopable. nerf it by not stacking fire
damage.

Differential revision: D4497
This was SVN commit r26474.
2022-02-23 19:47:50 +00:00
wowgetoffyourcellphone 3bd332a401 Some geology additions and improvements.
This was SVN commit r26473.
2022-02-23 07:12:14 +00:00
wowgetoffyourcellphone 8bd9271455 Fix a few minor things with the Han refactor.
This was SVN commit r26471.
2022-02-23 03:18:59 +00:00
wowgetoffyourcellphone efea43fcb5 Use the new technology portraits.
This was SVN commit r26470.
2022-02-23 02:57:42 +00:00
wowgetoffyourcellphone 9411d8c98e Han Chinese civilization restructure.
Deep discussion here:
https://wildfiregames.com/forum/topic/71582-fixing-chinese-han/
Participants: @Yakaterina @BreakfastBurrito_007 @Lionkanzen @chrstgtr

Changes:
- New Starting units (Spearman, Crossbowman, Cavalry Swordsman)
- Farms 60 wood, 30 seconds
- Practice Range disabled (may be re-enabled in a future alpha)
- Infantry and Cavalry Crossbowmen rebalance
- New technology for the Han at the Forge: "Repeating Crossbows";
"Crossbow Training" at barracks tweaked to allow crossbows to fire
faster

This was SVN commit r26469.
2022-02-23 02:37:50 +00:00
wowgetoffyourcellphone db713e6ba9 Revert default cursor. A couple people didn't like the new one.
This was SVN commit r26468.
2022-02-23 01:31:25 +00:00
wowgetoffyourcellphone aa7cb74e3c New "Yakchal" Ice House for Persians. Just an Atlas object for now.
Concept by @wowgetoffyourcellphone
Artwork by @Stan

This was SVN commit r26467.
2022-02-23 00:28:24 +00:00
wowgetoffyourcellphone 0168252cbe New and updated UI portaits (mostly technologies)
This was SVN commit r26466.
2022-02-23 00:26:14 +00:00
vladislavbelov 6a0fc31c33 Replaces GL_QUADS by GL_TRIANGLES for drawing overlays and debug frustums.
This was SVN commit r26465.
2022-02-22 18:41:31 +00:00
bb a350ec2a74 Let StartingCamera react upon change in number of players
fixes an issue in 071fddd598

Reviewed By: marder
Comments By: nwtour
Differential Revision: D4498
fixes #6435

This was SVN commit r26464.
2022-02-22 16:34:02 +00:00
Stan da41470c2d Reduce crow texture size to match that of the seagull.
Noticed by: @vladislavbelov
This was SVN commit r26463.
2022-02-21 22:43:13 +00:00
wowgetoffyourcellphone 9e6c3c00f7 Delete a couple of unused actors.
Give the Athenian barracks a slightly larger dirt decal.

This was SVN commit r26462.
2022-02-21 08:29:32 +00:00
wowgetoffyourcellphone 291f91b59d Adjust these unit actors to the new Illyrian texture file names.
This was SVN commit r26461.
2022-02-21 08:28:24 +00:00
wackyserious dd88591f73 Rename Illyrian texture assets to standard
This was SVN commit r26459.
2022-02-21 07:50:45 +00:00
Freagarach ef1d1dbed8 Make Icon non-optional.
Requested by @bb in D4476.
Differential revision: https://code.wildfiregames.com/D4484
Reviewed by: @bb
This was SVN commit r26458.
2022-02-21 07:20:26 +00:00
wowgetoffyourcellphone 5b0f75cb6d Make the red fox texture a little more red.
This was SVN commit r26456.
2022-02-21 04:16:37 +00:00
wowgetoffyourcellphone 5e0d205d0f Dunno why, but Brennus had a completely wrong helmet. Hopefully this one stays on his head.
This was SVN commit r26455.
2022-02-21 04:09:12 +00:00
wowgetoffyourcellphone 834363d3a0 Improved/more accurate Han unit portraits.
Deleted 3 unused portraits.

This was SVN commit r26454.
2022-02-21 03:50:42 +00:00
wackyserious 86c4b023ea Balanced colorful tone for the Gauls (Work in progress)
Discussion:
https://wildfiregames.com/forum/topic/25184-task-current-issues-with-celtic-units-and-guideline-for-the-next/?do=findComment&comment=480221

This was SVN commit r26453.
2022-02-21 02:47:37 +00:00
wowgetoffyourcellphone 97e9ee2ed3 A subtle embed to the Gaia emblem.
This was SVN commit r26452.
2022-02-21 01:29:58 +00:00
wowgetoffyourcellphone b7e85b04a3 New Gaia civ emblem for @Freagarach
This was SVN commit r26451.
2022-02-21 00:47:42 +00:00
Stan 8ef83e3136 Add a murder of crows to the game.
This was SVN commit r26450.
2022-02-21 00:00:28 +00:00
wowgetoffyourcellphone cd8d4cfbfd Fix the obstruction and footprint of this treasure.
This was SVN commit r26449.
2022-02-20 23:44:44 +00:00
wowgetoffyourcellphone c4d5fb067c Improved cursors.
This was SVN commit r26448.
2022-02-20 23:29:14 +00:00
Stan edaacb4181 Slightly improve the seagull model, shorter wings, new gliding animation, slight inclination on the rotation. Fix wings not reflecting in the water.
This was SVN commit r26447.
2022-02-20 23:24:23 +00:00
wowgetoffyourcellphone d63639f7b7 A more "historical" victory icon: a laurel wreath.
This was SVN commit r26446.
2022-02-20 22:14:01 +00:00
wowgetoffyourcellphone 1cd62c38af A more explicit town bell icon.
This was SVN commit r26445.
2022-02-20 22:12:19 +00:00
vladislavbelov 731b85b9a2 Adds GPU scoped labels for console, logger and profiler.
This was SVN commit r26444.
2022-02-20 21:55:29 +00:00
Stan 81013ab198 Fix the fallback material requiring spec (3c315caa98), when the high quality material does not.
Noticed by: @Silier
This was SVN commit r26443.
2022-02-20 14:18:15 +00:00
Angen 3e13896e3f [gameplay-a26] move some trainable animals to higher phases
Differential revision: D3341
Accepted by: @borg~
Comments by: @Freagarach, @Nescio, @wraitii
This was SVN commit r26442.
2022-02-20 13:13:19 +00:00
Stan 00fb58389e Fix the red border on map flare tip
Patch by: @marder
Differential Revision: https://code.wildfiregames.com/D4496
This was SVN commit r26441.
2022-02-20 12:37:17 +00:00
Stan 928f5600ce Fix visible fps overlay in tips screenshots and red border on water.
Patch by: @marder
Differential Revision: https://code.wildfiregames.com/D4496
This was SVN commit r26440.
2022-02-20 12:32:10 +00:00
vladislavbelov a0b0effd50 Fixes minimap after map reloading.
Reported By: marder
This was SVN commit r26439.
2022-02-20 10:51:11 +00:00
Angen daada92a82 Fix not selectable civilisations not showing if defined by the map
Fix displaying unknow civilisation when civilisation defined by map is
not selectable but exists by switching two lists based on if selection
is locked or not.

Differential revision: D4429
Fixes: #6145
Reviewed by: @bb
This was SVN commit r26438.
2022-02-20 07:34:11 +00:00
Angen 26644da270 Fix landscape settings for unknown map
Reported by BreakfastBurrito_007 on forum:
https://wildfiregames.com/forum/topic/51306-thread-for-posting-suggestions-for-alpha-26/page/13/#comment-479133

Patch by: @marder
Differential revision: D4495
This was SVN commit r26437.
2022-02-20 07:29:42 +00:00
wowgetoffyourcellphone 96cf9c8fb3 Give arrow-firing buildings a slightly larger, easier to see projectile.
This was SVN commit r26435.
2022-02-20 06:11:57 +00:00
wowgetoffyourcellphone 21937ddc8a Warm up the Ptolemies struct texture a little bit.
Give their CC and MC a decal. Give the CC the new obelisks.

This was SVN commit r26434.
2022-02-20 06:06:24 +00:00
wowgetoffyourcellphone ba0e642bc6 Improved some variants for the Han. Gave the unused ones to the Han champion cav.
This was SVN commit r26433.
2022-02-20 03:51:40 +00:00
wowgetoffyourcellphone 4571f6865f This mesh has no 2nd uv for an ao map, so change actor to fix warning.
This was SVN commit r26432.
2022-02-20 03:04:20 +00:00
wowgetoffyourcellphone 5f3a2f6e0b Move the Han shield textures to the proper subfolder.
This was SVN commit r26431.
2022-02-20 02:55:12 +00:00
wowgetoffyourcellphone 3c315caa98 Move Han helmet meshes to the proper subfolder.
This was SVN commit r26430.
2022-02-20 02:45:28 +00:00
wowgetoffyourcellphone 48c369a879 Create some nice new "paving block" decals.
This was SVN commit r26429.
2022-02-20 02:32:11 +00:00
wowgetoffyourcellphone 0e36e4a33c Improve some prop textures (mainly shields). Darken up the shuttle block diffuse texture a bit.
This was SVN commit r26428.
2022-02-20 02:30:43 +00:00
wowgetoffyourcellphone ed244700d4 Modified the "Han Bandana" to be a generic headband for any civ. This replaces the old "headband_color" prop with something much much better.
This also creates a player_trans_norm.xml material, which was
conspicuously missing. Changed the material for the headband from a
parallax material to this new normal map material.

This was SVN commit r26427.
2022-02-20 02:28:08 +00:00
wowgetoffyourcellphone 63d90afeec Han female's rice hat stays on when chopping wood.
This was SVN commit r26426.
2022-02-20 00:30:27 +00:00
wowgetoffyourcellphone 55ca22bb91 Hotfix to remove the generic palisade from the Han female's builder queue. Makes her queue match that of the Han males'.
This was SVN commit r26425.
2022-02-19 20:54:14 +00:00
vladislavbelov aac1a64675 Moves dynamic geometry for rendering sky to static vertex buffer.
This was SVN commit r26424.
2022-02-19 20:07:55 +00:00
Stan cb336fb28b Fix some maps issues. Add the new maps to the new map campaign.
This was SVN commit r26423.
2022-02-19 18:39:11 +00:00
bb 0f07c368ed Allow more general contexts in json translatable strings
While at it fix the messages.json from ea72437739 (missing excludeMask
and make the keywords objects not arrays)
Comments By: Freagarach
Differential Revision: D4483
This was SVN commit r26422.
2022-02-19 17:21:23 +00:00
Stan e2bf494cf9 Add Han Chinese Maps
Patch by: artoo @wowgetoffyourcellphone
Refs #6412

This was SVN commit r26421.
2022-02-19 16:59:31 +00:00
Stan 4de188f55a Add Han Chinese Templates and Civ.json.
Patch by: artoo @wowgetoffyourcellphone, @Alexandermb, @Nescio, @Stan,
@wltonlopes, @Kate, @lastrodamo, @Kimball, @niektb, @Lionkanzen,
@Brightgalrs, @wackyserious, @Gen.Kenobi, @s0600204, @leper, sciondev,
@Mr.lie, J.R.I.B.-Wein, David Flores, @sanderd17, @asterix @thamlett
Fixes #6412

This was SVN commit r26420.
2022-02-19 16:58:44 +00:00
Stan ef5089be6e Add Han Chinese Techs, Auras
Patch by: artoo @wowgetoffyourcellphone, @Alexandermb, @Nescio, @Stan,
@wltonlopes, @Kate, @lastrodamo, @Kimball, @niektb, @Lionkanzen,
@Brightgalrs, @wackyserious, @Gen.Kenobi, @s0600204, @leper, sciondev,
@Mr.lie, J.R.I.B.-Wein, David Flores, @sanderd17, @asterix @thamlett
Refs #6412

This was SVN commit r26419.
2022-02-19 16:56:31 +00:00
Stan 5a0be24262 Add Han Chinese Actors
Patch by: artoo @wowgetoffyourcellphone, @Alexandermb, @Nescio, @Stan,
@wltonlopes, @Kate, @lastrodamo, @Kimball, @niektb, @Lionkanzen,
@Brightgalrs, @wackyserious, @Gen.Kenobi, @s0600204, @leper, sciondev,
@Mr.lie, J.R.I.B.-Wein, David Flores, rastko96
Refs #6412

This was SVN commit r26418.
2022-02-19 16:48:23 +00:00
Stan 051df5ecfb Add Han Chinese variants
Patch by: @artoo, @wowgetoffyourcellphone, @Stan, @AlexanderMB,
@s0600204, @wltonlopes
Refs #6412

This was SVN commit r26417.
2022-02-19 16:45:45 +00:00
Stan a2c0797f9d Add Han Chinese particles
Patch by: @artoo, @wowgetoffyourcellphone, @Stan, @Kimball, @EmjeR
Refs #6412

This was SVN commit r26416.
2022-02-19 16:43:31 +00:00
Stan 6c1e6b1673 Add Han Chinese models, animations, and skeletons.
Patch by: artoo, @wowgetoffyourcellphone, @Alexandermb, @Nescio, @Stan,
@wltonlopes, @Kate, @lastrodamo, @Kimball, @niektb, @Lionkanzen,
@Brightgalrs, @wackyserious, @Gen.Kenobi, @s0600204, @leper, sciondev,
@Mr.lie, J.R.I.B.-Wein
References by: Wolflance, Ayakashi
Refs #6412

This was SVN commit r26415.
2022-02-19 16:41:45 +00:00
Stan 1a44e2790a Add Han Chinese textures.
Patch by: artoo @wowgetoffyourcellphone, @Alexandermb, @Nescio, @Stan,
@wltonlopes, @Kate, @lastrodamo, @Kimball, @niektb, @Lionkanzen,
@Brightgalrs, @wackyserious, @Gen.Kenobi, @s0600204, @leper, sciondev,
J.R.I.B.-Wein
Refs #6412

This was SVN commit r26414.
2022-02-19 16:35:18 +00:00
Stan 9902faf5cb Add credits missed in 6496aea364.
This was SVN commit r26413.
2022-02-19 16:21:26 +00:00
Stan d77f0b28a0 Add two new asian themed tracks.
Patch by: Omri Lahav
This was SVN commit r26412.
2022-02-19 16:19:31 +00:00
vladislavbelov b0826da1bc Fixes not drawing brushes under water when refractions are enabled.
This was SVN commit r26411.
2022-02-19 15:44:32 +00:00
vladislavbelov 36833d1df2 Moves max texture size to backend device capabilities.
This was SVN commit r26409.
2022-02-18 23:17:48 +00:00
vladislavbelov 5eb21cbfbf Adds debug labels to backend framebuffers.
This was SVN commit r26408.
2022-02-18 23:00:11 +00:00
vladislavbelov b949f19875 Moves GL debug information toggle to run-time to make it easier to test after release.
This was SVN commit r26407.
2022-02-18 22:38:45 +00:00
vladislavbelov cff79b421a Moves GL vertex and index buffer management to CDeviceCommandContext.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4493
This was SVN commit r26406.
2022-02-18 17:33:12 +00:00
Freagarach 6a2a297c0e Clean LoadPlayerSettings in Player-helper.
- Removed obsolete C++-side `addPlayer`, introduced in 4fed9b8242, moved
out of Atlas in 1c0536bf08, unused after 9ee44bd9b8.
- Get the player settings from a local function (avoids passing
arguments).
- Removed setting the standard diplomacy (done in cmpPlayerManager since
132020f88e).
- Create entity when adding a player instead of creating it and
instructing the playermanager to add it.
- Changed/Removed some comments.

Differential revision: https://code.wildfiregames.com/D4482
Comments by: @Stan
This was SVN commit r26404.
2022-02-18 08:10:13 +00:00
Stan 6496aea364 Update unitTables.py for A25 and trunk
- Add support for mul_round
- Correct table
- BUGFIX: correct roster table via the mixin Civ fix
- avoid long lines for PEP8 compliance
- for mod development outside .svn repo, create symlink
- replace all TAB indents to 4 spaces for PEP8
- TAB to 4 spaces to be PEP8 compliant
- refactor complex inline logic to compute and formatting
- beautify and avoid long lines to be PEP8 compliant
- beautify and simplify JS table format code
- Using more accessible color scheme
- Better color scheme
- main analysis file
- Rename the new version back to keep consistancy
- dependency JS library
- Unit analysis result
- Rewrite specilized table logic to only show changed
- Prefer numeric flag over string flag to refactor
- Re-format HTML templates into readable source code
- Civ specific table now renders non-empty
- Update computeCivTemplate to parse A25 template dir
- Cleanup debugging flags
- Update copyright notice to 2022
- Explain how the code works for future development
- Initial README
- Refactor: put HTML IO code in a single function
- Refactor: include JavaScript as verbatim str
- Refactor: separate computation from IO
- Refactor: compute templates before HTML IO
- Refactor: compute CivTemplates before HTML IO
- Refactor: compute separate from IO code
- Fixed melee and ranged attack damage parsing
- Fixed Resistance parsing
- Implement the undefined function complain
- Rename Armour -> Resistance
- Simplify NumericStatProcess logic

Patch by: @hyiltiz
Differential Revision: https://code.wildfiregames.com/D4445
This was SVN commit r26403.
2022-02-17 22:41:53 +00:00
Stan 0c65e88cd5 New shuttle blocks by wowgetoffyourcellphone
This was SVN commit r26402.
2022-02-17 22:20:21 +00:00
Stan 05947ec96c Delete now unused helmet variants.
This was SVN commit r26401.
2022-02-17 22:18:12 +00:00
Stan 7492e71fc3 Fix some unused extra material textures in units reported in validator.py.
This was SVN commit r26400.
2022-02-17 21:55:31 +00:00
Stan 8d786d0bcb Fix some unused extra materials in trees and geology reported in validator.py.
This was SVN commit r26399.
2022-02-17 18:41:55 +00:00
Stan fbd536b855 Fix some unused extra materials in trees reported in validator.py.
This was SVN commit r26398.
2022-02-17 18:35:01 +00:00
Stan e30def27fd New Macedonian wonder. Based on a model by @m7600.
Thread:
https://wildfiregames.com/forum/topic/20820-macedonian-wonder/page/7/

This was SVN commit r26397.
2022-02-17 18:21:08 +00:00
wowgetoffyourcellphone cea9f9be8d Art Cleanup and Fixes found by Jenkins.
This was SVN commit r26396.
2022-02-17 07:27:58 +00:00
wowgetoffyourcellphone edb10156d5 - Kushite skeletal textures moved to their own subfolder.
- Actor texture refs updated to reflect the move. Actor aesthetics
improved.

This was SVN commit r26395.
2022-02-16 09:23:34 +00:00
bb 071fddd598 Remove useless persistMatchSettings and handle some which weren't handled
Fixing issues in dc18d94030

Everyone make sure to delete savegames, saved campaigns an most
importantly your matchsettings.json's (regular alpha players won't
notice since there is a version check, but if you already have your
stuff at A26/svn, you will have some issues)

Reported By: elexis
Comments By: wraitii, Freagarach
Differential Revision: D4240
This was SVN commit r26393.
2022-02-15 21:13:10 +00:00
bb 3484a3d483 Move parabolic range computation to rangemanager
Co-proposed By: Freagarach
Reviewed By: Freagarach
Test written By: Stan
Comments By: vladislavbelov, stan, wraitii, Silier
Depricates: D4356

Differential Revision: D3249
This was SVN commit r26392.
2022-02-15 20:31:55 +00:00
wackyserious 6c1c4e0cde Update celt tunic details
This was SVN commit r26391.
2022-02-15 11:03:23 +00:00
wowgetoffyourcellphone 8df9d31286 Improved Iberian structure textures. May improve it further at some point.
This was SVN commit r26390.
2022-02-15 10:28:14 +00:00
wowgetoffyourcellphone 9ae4db9425 Add ambient occlusion to the Mauryan Palace structure.
This was SVN commit r26389.
2022-02-15 09:59:56 +00:00
wowgetoffyourcellphone 069217b9e7 Roman sandbox map changed to be more of a debug demo.
This was SVN commit r26388.
2022-02-15 09:48:55 +00:00
wowgetoffyourcellphone d2ebe4464f - PERSIAN skeletal textures moved to their own subfolder.
- Actor texture refs updated to reflect the move. Actor aesthetics
improved.
- Persian Sandbox scenario changed up.

This was SVN commit r26387.
2022-02-15 09:47:56 +00:00
wowgetoffyourcellphone b160a62902 Fix a bunch of texture refs found by Jenkins.
This was SVN commit r26386.
2022-02-15 09:44:24 +00:00
wowgetoffyourcellphone c2310b56b4 - MAURYAN skeletal textures moved to their own subfolder.
- Actor texture refs updated to reflect the move.
- A couple of Atlas-only hero units.
- Maurya Sandbox scenario changed up.

This was SVN commit r26385.
2022-02-15 09:40:04 +00:00
wowgetoffyourcellphone 54e9f15bc7 - Replace some if the "old" helmet meshes and textures. These textures are used by some of the newer helmet prop actors. Perhaps we can find a better texture solution in the future for these props.
- Fix a couple helmet actors while I'm at it.

This was SVN commit r26384.
2022-02-15 07:38:04 +00:00
wowgetoffyourcellphone 259eced530 - Add horse actors for each color type so that they are more easily visualized for designers.
- Get rid of the dumb "pers_cav_knot" actor. Maybe we can make some
better Persian cavalry decor in the future.

This was SVN commit r26383.
2022-02-15 07:34:31 +00:00
Freagarach 3c73bb1b51 Display defeated/won before victory.
When the victory conditions dictate that someone loses when e.g. losing
their CC, the message that the other player(s) had won was sent before
the former player was actually defeated.
When the victory conditions dictate that someone wins when e.g.
capturing all relics, the message that they have won was sent after the
message that the rest has lost.

This changes those.

Differential revision: https://code.wildfiregames.com/D4478
Comments by: @bb, @Silier
This was SVN commit r26382.
2022-02-15 07:20:21 +00:00
Freagarach 73f732dc30 Replace chicken in the random maps folder with startingAnimal.
Which is more generic. It means we don't have `chicken = oPeacock` and
the like anymore.
It adds a default scaling function such that people replacing the
animals are puzzled by the different number of starting animals./To keep
the amount of food roughly equal to the amount standard provide by
chicken.

Patch by: @marder
Differential revision: https://code.wildfiregames.com/D4472
Comments by: @smiley, @Stan
This was SVN commit r26381.
2022-02-15 07:04:49 +00:00
bb 47e79c71d5 Make CGUIText variables camel case
Reviewed By: vladislavbelov
Differential Revision: D4491
This was SVN commit r26379.
2022-02-14 17:48:08 +00:00
Stan 3694a12152 Fix x86 Unix versions of 0 A.D. not being able to open the public.zip file.
Patch by: @nwtour
Differential Revision: https://code.wildfiregames.com/D4413
This was SVN commit r26378.
2022-02-14 11:01:02 +00:00
wowgetoffyourcellphone 930cc9b850 Scythian textures by Wackyserious.
Persians and Athenians will use these.

This was SVN commit r26377.
2022-02-14 08:17:02 +00:00
wowgetoffyourcellphone f8333e7deb Prop and Actor improvements.
- New destruction decal textures.
- Material fixes for actors.
- Bridge decals.
- Shields.

This was SVN commit r26375.
2022-02-14 08:13:42 +00:00
wowgetoffyourcellphone df0797e4a1 Continue the removal of the old helmets.
Move remaining helmet actors to the parent helmet folder.

This was SVN commit r26374.
2022-02-14 08:04:07 +00:00
wowgetoffyourcellphone 42b64f8ea2 - Delete 196 unused Helmet textures. Meshes and Actors to follow.
- Reduce resolution (and disk space) of some over-sized remaining helmet
textures.

This was SVN commit r26373.
2022-02-14 07:28:11 +00:00
vladislavbelov 6ec956553a Fixes builds after d0115185b9 by removing includes to res handle.
This was SVN commit r26372.
2022-02-14 06:29:50 +00:00
wowgetoffyourcellphone 939f800a26 - ROMAN skeletal textures moved to their own subfolder.
- Actor texture refs updated to reflect the move.
- A new Roman champion unit added for fun, "Praetorian."
- An "infantry" version of Scipio Africanus to match the other 2 Roman
heroes.
- New Roman helmet models and actors.
- A bunch of unused textures deleted.

This was SVN commit r26371.
2022-02-14 04:01:56 +00:00
Stan 59df75e78b Fixes two clang warnings.
Refs #5550 #5294

This was SVN commit r26370.
2022-02-13 23:41:47 +00:00
vladislavbelov d0115185b9 Removes unused and redundant h_mgr after 0e599a3176 and dd91a5e0ef.
This was SVN commit r26369.
2022-02-13 22:31:36 +00:00
vladislavbelov dd91a5e0ef Removes unused ogl_tex after 4de89c3db1 and 492a109b68.
This was SVN commit r26368.
2022-02-13 22:07:56 +00:00
vladislavbelov 492a109b68 Removes redundant ogl_tex quality option after 4de89c3db1.
This was SVN commit r26367.
2022-02-13 21:53:02 +00:00
vladislavbelov aaf378f041 Moves backend capabilities to CDevice.
This was SVN commit r26366.
2022-02-13 21:46:03 +00:00
vladislavbelov 4de89c3db1 Moves texture management to CDeviceCommandContext, adds quality options.
Comments By: nwtour, Stan
Tested By: nwtour, Stan
Differential Revision: https://code.wildfiregames.com/D4488
This was SVN commit r26365.
2022-02-13 19:30:28 +00:00
wowgetoffyourcellphone 451dc24a7e Carthaginian texture changes, deletions, additions.
This was SVN commit r26364.
2022-02-13 15:23:25 +00:00
wowgetoffyourcellphone f6a8c8cbbc This was SVN commit r26363. 2022-02-13 15:21:23 +00:00
wowgetoffyourcellphone 9536069201 Spartan unit actors improved.
This was SVN commit r26362.
2022-02-13 15:20:26 +00:00
wowgetoffyourcellphone 1c67883401 Unused and low res Celtic textures deleted.
About a dozen new Celtic tunic textures added to replace them.

This was SVN commit r26361.
2022-02-13 15:18:37 +00:00
wowgetoffyourcellphone c46c8068a3 Illyrian skeletal textures moved to their own subfolder.
A bunch of unused Thracian textures deleted.

This was SVN commit r26360.
2022-02-13 15:15:49 +00:00
wowgetoffyourcellphone abe81a0510 - Move Ptolemaic skeletal textures to their own sub-folder, et al.
This was SVN commit r26359.
2022-02-13 15:14:01 +00:00
wowgetoffyourcellphone d813cdb8fc Updated battalion standards.
This was SVN commit r26358.
2022-02-13 15:10:49 +00:00
wowgetoffyourcellphone 6d9c5652b2 - Move Seleucid skeletal textures to their own sub-folder.
- Renamed many textures to the new texture naming standards.
- Adjust many unit actor refs for these textures (and improve the look
of the actors while I'm at it).
- A bunch of unused texture deleted.

This was SVN commit r26357.
2022-02-13 15:08:34 +00:00
wowgetoffyourcellphone 47794a5cbd Athenian actor updates.
Commit the Scythian texture move while I'm at it (an Athenian unit uses
these textures).

This was SVN commit r26356.
2022-02-13 15:03:26 +00:00
wowgetoffyourcellphone 772cbcb915 - Move Hellenic and Macedonian skeletal textures to their own sub-folders.
- Renamed many textures to the new texture naming standards.
- Adjust many unit actor refs for these textures (and improve the look
of the actors while I'm at it).
- A bunch of unused texture deleted.

This was SVN commit r26355.
2022-02-13 15:00:48 +00:00
wowgetoffyourcellphone 21d13f82c0 More Standard textures. Some by Lion.Kanzen.
This was SVN commit r26354.
2022-02-12 22:52:25 +00:00
wowgetoffyourcellphone 634cb0fc66 Add a new Kushite standard texture by Lion.Kanzen as a variation.
Unlock the other Athen standard texture as a variation.

This was SVN commit r26353.
2022-02-12 22:07:26 +00:00
wowgetoffyourcellphone 8a75170c5d Fix texture refs noticed by Stan.
Add a new Cart linothorax texture while I'm at it.

This was SVN commit r26352.
2022-02-12 21:16:00 +00:00
wowgetoffyourcellphone 4ab472200d Standard Textures:
- Use stencils by Lion.Kanzen for Ptol and Sele
- Use the lotus pattern from the Maurya civ emblem to better match
visually
- Tweak the Macedonian star a little

This was SVN commit r26351.
2022-02-12 21:02:49 +00:00
Stan 936fb5a172 Replace checkrefs.pl by a python script. This makes it easier to run on Windows for non technical persons.
- Add support for tips
- Fix other scripts not writing to the correct output (they were writing
info messages to stderr)

Based on a patch by: @mammadori	and @cyrille
Differential Revision: https://code.wildfiregames.com/D3213
This was SVN commit r26350.
2022-02-12 15:43:42 +00:00
bb f17077272f Create a 3rd party gui alignment class for objects.
Use the class for the chat to accomodate size issues in some languages.

Chat size issue reported by: Zeldt on forums
Initial solution by: Nescio
Comments By: elexis, nwtour, Freagarach, vladislav, wraitii
Differential Revision: D2623
fixes #4252

This was SVN commit r26349.
2022-02-12 14:56:55 +00:00
wowgetoffyourcellphone 86ca2f192d Remove 24 outdated Carthaginian textures.
This was SVN commit r26348.
2022-02-12 11:27:03 +00:00
wowgetoffyourcellphone 3e6bb638a3 - Move Celtic/Briton/Gallic skeletal textures to their own sub-folders.
- Renamed many textures to the new texture naming standards.
- Adjust many unit actor refs for these textures (and improve the look
of the actors where applicable).
- A bunch of unused texture deleted.

This was SVN commit r26347.
2022-02-12 11:20:08 +00:00
wowgetoffyourcellphone a925ba22cf Reduce the repeating size of the Aegean_Anatolian_rocks_grass_01 terrain. The flora details in the texture seemed too big compared to units. Risked adding obvious tiling in order to make the texture look better sized. It's a balancing act.
This was SVN commit r26346.
2022-02-12 06:38:38 +00:00
wowgetoffyourcellphone 2897e32982 Fix the basic Iberian spearman actor.
Bug Report from Purgator_
https://wildfiregames.com/forum/topic/70665-[[SVN:26312]]-unit-texture-not-found/

This was SVN commit r26345.
2022-02-12 06:34:37 +00:00
wowgetoffyourcellphone 25d65afad6 Rename standard textures to the art filename convention.
This was SVN commit r26344.
2022-02-12 06:21:39 +00:00
wowgetoffyourcellphone 41cd3d3cf8 Increase the player color on the Standard flags a bit.
Delete unused Theban flag texture.

This was SVN commit r26343.
2022-02-11 08:46:09 +00:00
wowgetoffyourcellphone a04aa558c8 New Battalion Standards (meshes, textures, and actors) for all in-game civs.
Adjust formation template VisualActor to point to this new standard.

refs: d0549d7994
Differential: https://code.wildfiregames.com/D4467
Forum discussion:
https://wildfiregames.com/forum/topic/68008-formation-standards-total-war-style-flags-over-battalions/

This was SVN commit r26341.
2022-02-11 07:24:32 +00:00
Freagarach 63fcd8c559 Fix syntax in messages.json.
Noticed by @bb (and the linter), after ea72437739.

This was SVN commit r26340.
2022-02-11 06:14:53 +00:00
bb 9696b18a72 Happy new year bb.
See previous commit

This was SVN commit r26339.
2022-02-10 16:38:24 +00:00
bb 505bead1da Some minor improvements for the localization scripts
Comments By: Stan
Reviewed By Freagarach

Differential Revision: D4397
This was SVN commit r26338.
2022-02-10 16:18:49 +00:00
wowgetoffyourcellphone 8d7aa158ef - Move Thracian skeletal textures to their own sub-folder (an on-going project for all unit textures).
- Renamed some textures to the new texture naming standards.
- Adjust unit actor refs for these textures (and improve the look of the
actors where applicable).
- A bunch of unused texture deleted.

This was SVN commit r26337.
2022-02-10 10:12:24 +00:00
wowgetoffyourcellphone 5f80cb8f78 - Move Iberian skeletal textures to their own sub-folder (an on-going project for all unit textures).
- Renamed some textures to the new texture naming standards.
- Adjust unit actor refs for these textures (and improve the look of the
actors where applicable).
- Fix some file refs in some previously committed actors and variant
files noticed by silier and stan.
- Delete an old, unused elephant prop.

This was SVN commit r26336.
2022-02-10 07:59:01 +00:00
Freagarach 231eb37264 Fix typo in 93b22c5f86.
Noticed by @Silier.

This was SVN commit r26335.
2022-02-10 05:47:23 +00:00
Stan f55282fc96 Add a python equivalent to validate.pl.
Refs: D3213

This was SVN commit r26334.
2022-02-09 23:06:40 +00:00
Stan adcd1d105c Improve the validator.py script. Fix false positives with particles and variants. Use a logger instead.
This was SVN commit r26333.
2022-02-09 22:07:36 +00:00
Stan 0e1da6af7a Add missing spec map on the 7x9 decal reported by source/tools/xmlvalidation/validator.py
This was SVN commit r26332.
2022-02-09 21:37:09 +00:00
wowgetoffyourcellphone d8aac590d0 Some new Roman helmet textures. Actors coming.
This was SVN commit r26331.
2022-02-09 18:35:55 +00:00
wowgetoffyourcellphone 6010cc9aab Attempt to fix some animation variant files.
This was SVN commit r26330.
2022-02-09 18:33:49 +00:00
wowgetoffyourcellphone fa446685c8 - Move Carthaginian skeletal textures to their own sub-folder (an on-going project for all unit textures).
- Delete old and (now) unused examples.
- Renamed textures to the new texture naming standards.
- Adjust unit actor refs for these textures (and improve the look of the
actors where applicable).
- Attempt to set all txt/xml files to EOL-native

This was SVN commit r26329.
2022-02-09 18:31:53 +00:00
Freagarach 93b22c5f86 Allow cheats to convert units to arbitrary players.
This allows the "wololo" cheat to switch units to an arbitrarily defined
player. If no player is specified, it defaults to the player entering
the cheat.
The player manager will warn when using a wrong player number.

Patch by: @Nullus
Differential revision: https://code.wildfiregames.com/D4479
Comments by: @Stan
This was SVN commit r26328.
2022-02-09 15:49:26 +00:00
Freagarach 9417a345d1 Allow selecting multiple non-owned entities when control all is on.
(Not with dragging, since that would be hard to use, UX-wise.)
It allows easier debugging; less switching between players.

Differential revision: https://code.wildfiregames.com/D4477
Comments by: @asterix, @Silier, @Stan
This was SVN commit r26327.
2022-02-09 07:02:14 +00:00
Freagarach d0549d7994 Use (civ-specific) standards to show formations.
Since we can have battalion-style formations (a70a20fd42), it is nice to
show a TW-style banner for them.
Code adapted from @Silier at
https://wildfiregames.com/forum/topic/68008-formation-standards-total-war-style-flags-over-battalions/.

Differential revision: https://code.wildfiregames.com/D4467
Comments by: @asterix, @Silier
Refs. #4545

This was SVN commit r26326.
2022-02-09 06:54:12 +00:00
Angen ed70f931ba Fix missing implicit conversion in TradeDialogBarterPanel
undefined is not boolean

Implicit conversions required since 0406c4dfde

Fixes: #6429

This was SVN commit r26325.
2022-02-08 20:45:28 +00:00
wowgetoffyourcellphone 621f5ce77b Fix Italian texture refs for these actors. Noticed by @Stan.
This was SVN commit r26324.
2022-02-08 18:40:10 +00:00
wowgetoffyourcellphone 25681c99eb Add new Punic Cavalry for Carthage and Persian Skirmish Cavalry actors for Seleucids. Will improve on these later.
This was SVN commit r26323.
2022-02-08 18:37:34 +00:00
wowgetoffyourcellphone 58a6b13cb5 Improve the look of the 3 Roman heroes.
This was SVN commit r26322.
2022-02-08 18:34:57 +00:00
wowgetoffyourcellphone 03d04385b2 Additional unit variants added.
Props additions and improvements.
Made the long cape use more variants.

This was SVN commit r26321.
2022-02-08 18:33:48 +00:00
Stan 2e02f885c1 Add garrisoned and projectile prop points to cart houses. Fix naming conventions for the meshes and the ao textures.
Refs: https://code.wildfiregames.com/D4421
Refs: #4581

This was SVN commit r26320.
2022-02-08 11:17:08 +00:00
Stan 729835d59c Restore the tooltip style for the Civ Overview page.
Patch by: @Langbart
Fixes: #6380
Differential Revision: https://code.wildfiregames.com/D4481
This was SVN commit r26319.
2022-02-08 10:11:29 +00:00
wowgetoffyourcellphone f763f20535 - Move Italian/Italiote/Samnite skeletal textures to their own sub-folder (an on-going project for all unit textures).
- Delete old and (now) unused examples.
- Renamed textures to the new texture naming standards.
- Adjust unit actor refs for these textures (and improve the look of the
actors where applicable).
- Attempt to set all txt/xml files to EOL-native

This was SVN commit r26318.
2022-02-08 09:26:08 +00:00
Freagarach 3994105946 Fix checkrefs after ea72437739.
Noticed by checkrefs by @Stan.

Differential revision: https://code.wildfiregames.com/D4480
Reviewed by: @Stan
This was SVN commit r26317.
2022-02-08 05:55:01 +00:00
Stan c0d0bb850d Disable transparency for performance on some helmets. Don't use parallax, as it does nothing but artifacts on normals with no alpha channel.
EOL to native.

This was SVN commit r26316.
2022-02-07 14:11:41 +00:00
wowgetoffyourcellphone cedc674ef7 - Move Arab skeletal textures to their own sub-folder (an on-going project for all unit textures).
- Renamed them to the new texture naming standards.
- Adjust unit actor refs for these textures (and improve the look of the
actors while I'm at it).
- Fix texture refs for some spart textures noticed by @Stan.

This was SVN commit r26314.
2022-02-07 08:12:19 +00:00
wowgetoffyourcellphone ddce577e59 - Move Spartan skeletal textures to their own sub-folder (an on-going project for all unit textures).
- Renamed them to the new texture naming standards.
- Adjust unit actor refs for these textures (and improve the look of the
actors while I'm at it).
- Attempting to use the correct SVN move commands this time.

This was SVN commit r26313.
2022-02-07 05:42:20 +00:00
wowgetoffyourcellphone 845932ea55 Some unit props:
- Boeotian cavalry helmet with "plume" as seen in many references.
Bronze, Gold, and Silver variants. Silver crested Boeotian helmet with
laurel wreath.
- Custom pelte shield for the Spartan Phalangite.
- Special helmet for the '300' Leonidas.

This was SVN commit r26311.
2022-02-07 05:22:41 +00:00
wowgetoffyourcellphone be16ffe802 - Move Athenian skeletal textures to their own sub-folder (an on-going project for all unit textures).
- Renamed them to the new texture naming standards.
- Adjust unit actor refs for these textures.
- Accidentally used the wrong svn move option this time. Will use
correct one moving forward.
- Thanks be to @Stan for his assistance.

This was SVN commit r26310.
2022-02-07 03:02:36 +00:00
Stan 8ca4afcf20 Add garrisoned, smoke, and projectile prop points to brit houses. Fix naming conventions for the meshes.
Refs: D4221, #4581

This was SVN commit r26309.
2022-02-06 11:55:04 +00:00
Stan 119348f976 Add garrisoned and projectile prop points to ptol houses. Fix naming convention issues.
Now that they do not trigger errors anymore, restore the old houses as
variations.

This was SVN commit r26308.
2022-02-06 11:13:01 +00:00
Angen 0a72a02ea0 Make scale variables constant
b4fbbed379

This was SVN commit r26307.
2022-02-06 11:11:35 +00:00
Angen 7e5e06bae8 Fix timeout confirmation box depending on fps
Introduced in b4fbbed379
Use Date.now() to calculate passed time.
Rewrite to class.
Also actually pass timeout from json.

Differential revision: D4318
Comments by: @vladislavbelov, @Stan
This was SVN commit r26306.
2022-02-06 11:04:42 +00:00
Angen 8d71975cc0 [Gameplay-a26] Increase workshop garrison limit to 5
Differential revision: D4344
Patch by: @Langbart
Reviewed by: @wowgetoffyourcellphone
Comments by: @marder, @chrstgtr
This was SVN commit r26304.
2022-02-06 09:23:41 +00:00
vladislavbelov a17fad722a Moves framebuffer management to CDeviceCommandContext.
Tested By: Langbart, nwtour
Differential Revision: https://code.wildfiregames.com/D4475
This was SVN commit r26302.
2022-02-05 16:59:23 +00:00
Angen c317fb3ec0 Fix test_GuiInterface after 0a3fab87da
This was SVN commit r26301.
2022-02-05 12:46:39 +00:00
Angen 0a3fab87da Display rank action in tooltip
Patch by: @nwtour
Differential revision: D4340
Reviewed by: @Silier
The patch adds a description from the technology file to tooltip when
hovering over rank icon.

This was SVN commit r26300.
2022-02-05 12:12:58 +00:00
Freagarach eaff28c448 Store possible formations for a civ in XML instead of the JSON.
The JSON was purely GUI at first, but has gotten some simulation content
over time. Not all of that was necessary/correct to do.
When the formations were added (58836c624a) there was only a generic
player.xml
(https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/templates/special/;11735)
and differentiation was added only later.
The formations in the XML is more logical and allows inheritance.

Differential revision: https://code.wildfiregames.com/D4466
Idea approved by: @wowgetoffyourcellphone
This was SVN commit r26299.
2022-02-05 06:39:53 +00:00
Freagarach ea72437739 Move GenericName, History and Icon from the civ-JSON to cmpIdentity.
Since the players/civs already have cmpIdentity, use it.
This forces civs to have corresponding XML in the `special/players/`
folder.

Also moves the files from `special/player/` to `special/players/`
consistent with other folders. And moves the generic `player.xml` one
level up.

Differential revision: https://code.wildfiregames.com/D4473
Help and comments by: @Stan, @wraitii
This was SVN commit r26298.
2022-02-05 06:24:45 +00:00
vladislavbelov 37aa0456c8 Fixes missed assignment to currentTech in ParticleRenderer added in 5adbe4f1a3.
This was SVN commit r26296.
2022-02-04 16:27:35 +00:00
wowgetoffyourcellphone 5116a8e3b6 Skeletal folder Cleanup and Organizing
Reduced resolution of a bunch of unit textures to the consistent 256x256
(and some animals from 1024 to 512)
Introduce some new textures and texture improvements
Begin to introduce some civ folders (that reorganization is coming
later)
Adjust some unit actors to look nicer

This was SVN commit r26295.
2022-02-04 10:11:59 +00:00
wowgetoffyourcellphone 87d5ca5dd2 Reduce resolution of many shield textures. Also remove some unnecessary alpha channels. Disk savings of about 30 MB.
This was SVN commit r26294.
2022-02-04 09:45:02 +00:00
wowgetoffyourcellphone e3fc39469c Point a number of templates to their new <Icon> portraits.
Improve the look of the Seleucid cavalry actors to match their new
portraits.

This was SVN commit r26292.
2022-02-03 00:36:35 +00:00
wowgetoffyourcellphone 30f0c58a0e Improved Portraits. Reviewed by: Stan
Adds consistent backgrounds, colors, lighting, and better camera
orientations (less apparent foreshortening).

This was SVN commit r26291.
2022-02-02 23:42:38 +00:00
vladislavbelov 643894c16b Disables depth test for minimap effect after a1f98b016b. Fixes #6426
This was SVN commit r26290.
2022-02-02 18:43:23 +00:00
vladislavbelov ac77d1c3e0 Moves scissor test management to DeviceCommandContext.
This was SVN commit r26288.
2022-02-01 17:58:21 +00:00
vladislavbelov aeaf495da3 Renames GL::CTexture levelCount to MIPLevelCount to match Tex.
This was SVN commit r26287.
2022-02-01 16:48:24 +00:00
vladislavbelov a1f98b016b Moves depth and stencil tests to PipelineState and DeviceCommandContext.
Differential Revision: https://code.wildfiregames.com/D4471
This was SVN commit r26286.
2022-02-01 16:38:55 +00:00
vladislavbelov 709e8292b0 Moves color mask, depth mask and function management from CShaderPass to DeviceCommandContext.
Tested By: Langbart
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D4465
This was SVN commit r26284.
2022-01-31 20:10:06 +00:00
vladislavbelov 22db9202f1 Fixes EOL in PipelineState files after 5adbe4f1a3.
This was SVN commit r26283.
2022-01-31 11:47:58 +00:00
vladislavbelov 8c068aab07 Removes possibility to link lowlevel library dynamically.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4470
This was SVN commit r26281.
2022-01-31 06:53:30 +00:00
Stan 99118fc2b7 Add garrison flags and projectile prop points to spart houses.
Refs: https://code.wildfiregames.com/D4221, #4581
- Fix naming of files.
- Improve AO
- Disable parallax on nature.

This was SVN commit r26279.
2022-01-30 23:17:41 +00:00
Stan cfa567f24d Remove temperate_dead_forest actor from maps, as we have to no way to remove actors when placing buildings.
Patch by: @Langbart
Accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4464
This was SVN commit r26278.
2022-01-30 21:44:26 +00:00
Stan 3f73495653 Bring Walruss and Muskox back to the arctic biome.
Patch by: @marder
Accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4266
This was SVN commit r26277.
2022-01-30 21:38:05 +00:00
vladislavbelov 02c96903c5 Renames sgn function to Sign to fit the naming of other MathUtil functions.
This was SVN commit r26276.
2022-01-30 20:51:01 +00:00
wraitii 0e403632cf Allow giving different weights to different templates when pushing.
This makes it possible to make units heavier, which both push more & get
pushed less by other units.
In particular, the diff does it for siege units & elephants.

This improves movement for these units in crowd situation, since they
will now basically not move when other regular units push into them.

Supported By: asterix, marder
Refs #6127

Differential Revision: https://code.wildfiregames.com/D4452
This was SVN commit r26275.
2022-01-30 14:22:27 +00:00
wraitii 4df03ed2d2 Run the AI in the same Compartment as the simulation. Let the AI access Sim data.
This is a paradigm change for AI computation.
Historically, the AI was intended to be run in a separate thread from
the simulation. The idea was that slow AI wouldn't stop the renderer
from being smooth.

In that original design, the AI received a copy of the game world and
used that to run its logic. This meant the simulation could safely do
whatever it wanted in the meantime. This copy was done via AIProxy &
AIInterface.

This design ended up having significant flaws:
- The copying impacts the simulation negatively, particularly because
AIProxy subscribes to a lot of messages (sometimes sent exclusively to
it). This time cannot be threaded, and impacts MP games without AIs.
- Copying the data is increasingly difficult. Modifiers are a headache,
LOS is not implemented. Lots of logic is duplicated.

The intended benefits of the design also failed to realise somewhat:
- The AI was never threaded, and in fact, it is probably better to try
and thread Sim + AI from the renderer than just the AI, at which point
threading the AI specifically brings little benefit.

The new design is much simpler and straighforward, but this has some
side-effects:
- The AI can now change the simulation. This can be used for cheating,
or possibly for a tutorial AI.
- The AI runs in the same GC zone as the simulation, which may lead to
more frequent Sim GCs (but overall we might expect a reduction in
temporary objects).
- The AI state was essentially cached, so replacing some functions with
Engine.QueryInterface might be slower. The tradeoff should be balanced
by lower AIProxy computation times.

Future work:
- Threading some specific AI tasks could still be worthwhile, but should
be done in specific worker threads, allowed to run over several turns if
needed.

Technical note: the AI 'global' is in its own Realm, which means name
collisions with the same are not possible.

Other notes:
- The RL Interface uses the AI Interface and thus will gradually lose
some data there. Given that the RL Interface can now request data
however, this should be dine.

Refs #5962, #2370

Differential Revision: https://code.wildfiregames.com/D3769
This was SVN commit r26274.
2022-01-30 13:33:34 +00:00
wraitii 0779c64052 Add tests for fixed::FromFraction
Differential Revision: https://code.wildfiregames.com/D4458
This was SVN commit r26273.
2022-01-30 12:57:08 +00:00
wraitii d740b4f335 Fix bug where 'archive' XMB files could end up being written to the user mod
Users sometimes ended up with bad (wrong version) XMB files in the user
mod. This resulted in A25 loading a black screen.
There is a combination of unfortunate code paths that lead to this. The
core issue is that:
- cdd75deafb changed the XMB loading code that if there is an error in
Init from a cached XMB, it reports an error. This error happens to be
silent, because the GUI expects CXeromyces to do its own error reporting
(a pretty poor decision, all in all, but whatever). This explained why
the black screen showed no errors.
- The code flow attemps to load an 'archive' XMB first, then only a
loose cache. _But_ if the XMB that fails to load is an archive (which
generally never happens except when using incompatible mods, which is
generally less easy in A25 since we added code to stop that), then the
game will try to recreate the XMB as an 'archived' path, not a 'loose
cache' path as it would usually do.
- Because the 'archived' path already exists in the VFS, the game will
attempt to overwrite that. It so happens that in non-dev copies, this
writes to the user mod.
- Because the user-mod is always loaded, this was unexpected for users.

Fixing this is rather simple: the game should never attempt to write
'archive' XMBs in that function. Added explicit barrier, which shouldn't
matter performance-wise but fixes the issue by writing in the proper
place, and also properly recovering in case of read failure.
I will note that the game will still try to load the archived file, and
recreate it every time, but I don't think that's a particularly big
deal, in general having engine-incompatible mods in the future should be
harder because of A25 changes there.
(NB: users that have used both A24 and A25 should perhaps still be
advised to check their user mod folder, otherwise they'll end up
recreating those files forever).

Reported by: dave_k
Fixes #6320

Differential Revision: https://code.wildfiregames.com/D4275
This was SVN commit r26272.
2022-01-30 12:50:43 +00:00
wraitii e0d98cd94d Call SetTerrainDirty on CModelAbstract without going through CmpVisualActor
The UnitManager already lists all units, so we do not need to go through
the visual actor of entities to update them. This is faster and
decouples simulation & graphics code slightly.

Further, the simulation does not need to know about texture changes (see
also 410d2e883a), so remove those calls in Atlas.

Differential Revision: https://code.wildfiregames.com/D4455
This was SVN commit r26270.
2022-01-29 08:28:04 +00:00
wraitii 410d2e883a Remove leftover terrain-based movement cost code.
6581796103 removed the ability for terrain to affect movement speed. The
JPS pathfinder cannot support it, and the approach was poor anyways,
coupling rendering data with simulation data.
This lets us remove the dependency on CTerrainTextureManager everywhere.

Tested by: langbart
Differential Revision: https://code.wildfiregames.com/D4459
This was SVN commit r26269.
2022-01-29 08:22:28 +00:00
Stan 1d7eb7492e Make Palisades all use the same portrait. Remove now unused portrait.
Patch by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4462
This was SVN commit r26267.
2022-01-28 16:50:13 +00:00
Stan 144234cd05 Remove alpha from two spec textures.
Make trans_mask.png be RGBA instead of a two channel texture (Grayscale
+ Alpha)

This was SVN commit r26266.
2022-01-28 14:34:31 +00:00
vladislavbelov 1e07283bac Disables possibility to mix shader types with a single backend.
Differential Revision: https://code.wildfiregames.com/D4463
This was SVN commit r26264.
2022-01-28 06:34:34 +00:00
wackyserious 01c5facdd5 1.) Added actor files for the Ptolemaic Skirmisher Cavalry (Mercenary Tarantine Settler)
Discussion:
https://wildfiregames.com/forum/topic/27046-task-ptolemaic-tarantine-cavalry-mercenary-tarantine-settler/

2.) partial naming convention edit for the Ptolemies.

This was SVN commit r26262.
2022-01-28 01:32:16 +00:00
wraitii 1365585372 Unit pushing: lower static extension following 158cf8ea8d
The new values in 158cf8ea8d were too high, units would push each other
too much when building. This lower value should fix that, though further
adjustements may be necessary.

Reported by: Freagarach.
Differential Revision: https://code.wildfiregames.com/D4461
This was SVN commit r26261.
2022-01-27 17:34:37 +00:00
vladislavbelov 285e542a0a Removes redundant comment about alpha test in shaders forgotten in 5cbd46de94.
This was SVN commit r26260.
2022-01-27 17:32:07 +00:00
vladislavbelov d4d1bc039f Moves culling mode and front face state management to DeviceCommandContext.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4456
This was SVN commit r26259.
2022-01-27 17:25:37 +00:00
wackyserious 299cb3d34b Improve Persian Cavalry back lamellar/scale prop
This was SVN commit r26258.
2022-01-27 05:07:48 +00:00
wackyserious 599e2fc605 Gallic unit texture variant reduction
This was SVN commit r26256.
2022-01-27 02:12:41 +00:00
wackyserious 547fc96450 Assign newer textures to Macedonian Champion Crossbowman.
This was SVN commit r26255.
2022-01-27 01:17:13 +00:00
wraitii 83d251406c Move BuildAnimation to CSkeletalAnimMgr / CObjectEntry
There is no need to have BuildAnimation in CModel when everything is
done in CObjectEntry anyways.
This removes a pointer in every CModel object, which is nice.

Accepted By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4454
This was SVN commit r26254.
2022-01-26 14:55:19 +00:00
wackyserious fe816ecb1a Iberian Units Major Update
Discussion:
https://wildfiregames.com/forum/topic/27446-committed-iberian-unit-textures/page/7/#comment-475940

Historical accuracy comments and review by: Genava55, TKgokumelos,
UltimateAurelian, wowgetoffyourcellphone

This was SVN commit r26253.
2022-01-26 10:41:50 +00:00
Freagarach 73f741d266 Handle researching technologies in the TechnologyManager.
Moves the work done from cmpResearcher to cmpTechnologyManager.
No functional changes.

It allows fancy stuff in the future (#6364).

Differential revision: https://code.wildfiregames.com/D4438
This was SVN commit r26252.
2022-01-26 07:42:36 +00:00
wraitii 27f64b80ed Remove unused variable following 330b570ba8
Forgotten in that diff.

Reported by: vladislavbelov
This was SVN commit r26250.
2022-01-25 18:47:38 +00:00
wraitii 330b570ba8 Remove RENDERDATA_UPDATE_COLOR, which is not used, and cleanup.
RENDERDATA_UPDATE_COLOR was used to precompute lightEnv-dependent data
on the CPU. This is no longer done following engine upgrades, and in
particular d7d02a4740 which explictly always did this on the GPU.

ModelAbstract had a 'SetDirtyRec' hack for it because of decals, which
can also be removed. The 'dirty' bit of CRenderableObject is renderdata
for the specific item, never its props, so it never actually needs to be
recursive.

CheckLightEnv is also useless as a result, and removed.

Differential Revision: https://code.wildfiregames.com/D4453
This was SVN commit r26249.
2022-01-25 16:59:29 +00:00
vladislavbelov acb043f4a2 Adds a rasterization state to the renderer backend pipeline state.
This was SVN commit r26248.
2022-01-25 16:28:58 +00:00
Stan 588e6b0103 Fix anim sync by using another horse
Fixes
https://wildfiregames.com/forum/topic/67680-double-horse-tail/#comment-473779

This was SVN commit r26246.
2022-01-24 22:17:25 +00:00
wraitii 158cf8ea8d UnitMotion pushing improvements
The main change is the introduction of a 'pushing pressure' counter on
units. This counter increases when units get pushed around, and
decreases over time. In essence, units under high pressure move slower &
are harder to push around.
The major effect is that units can now get bogged down when very dense
groups start colliding. This makes movement more realistic, makes unit
movement more 'chokepointy', and generally improves the mathematical
soundness of the system (lower values are easier to handle for our 200ms
turns).

Other changes:
- The logic to detect units crossing each other's path has been
reworked. Units that run towards each other should not more obviously
avoid each other.
- New parameters: 'Spread' is a measure of how strong the pushing effect
is based on distance. With the current settings, static-pushing is
rather 'on/off', whereas moving-pushing is more gradual (and thus the
max influence distance was increased when moving).
- Default values have been tweaked for lower overlap.
- Units only looked at other units within their grid region. This led to
overlap near grid-borders. Units now look at neighboring grid elements,
which largely removes this issue. While this may be slower, the
performance of pushing was largely negligible before, so it is unlikely
to become a main cause of lag (and overlap was generally disliked by
players).
- Units no longer orient in the direction of pushing, but instead keep
facing their target. This can look slightly odd under very heavy pushing
forces, but vastly improves behaviour of very slow units such as rams
(since they spend much less time turning around). As a side-effect,
clean up angle code following acc780bcbb .

Engine changes:
- Add a debug rendering mode at compile-time to help understand what is
happening.
- Make it possible to constexpr initialise fractional fixed numbers by
using FromFraction

The 'pressure' change was inspired by alre's suggestion at
https://wildfiregames.com/forum/topic/56436-for-a-better-unit-movement/#comment-461987

Refs #6127

Differential Revision: https://code.wildfiregames.com/D4439
This was SVN commit r26245.
2022-01-24 15:36:13 +00:00
wraitii 026a7b1699 Fix AI counting exhausted resources in its dropsite list
dropsiteSupplies kept a list of resources and did not remove exhausted
resources, leading to possibly buggy resource-management in the AI code
(and needless computations).

Differential Revision: https://code.wildfiregames.com/D4442
This was SVN commit r26244.
2022-01-24 15:20:56 +00:00
Stan 647db0e2ee Remove usages of “fancy” grass from shaders.
Discussed with: @vladislavbelov

This was SVN commit r26243.
2022-01-24 15:14:33 +00:00
Stan c41447360c Remove usages of “fancy” grass from terrains.
Discussed with: @vladislavbelov

This was SVN commit r26242.
2022-01-24 15:13:59 +00:00
Stan 351d1d2b9a Remove usages of “fancy” grass from maps.
Discussed with: @vladislavbelov

This was SVN commit r26241.
2022-01-24 15:13:10 +00:00
vladislavbelov 4ce609bb1f Uses MIPs for terrain textures previews following e4455a8e8f.
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D4447
This was SVN commit r26239.
2022-01-24 07:00:55 +00:00
vladislavbelov c114bab396 Removes mem_get_ptr from the Tex::get_data comment forgotten in 63086f4e26.
This was SVN commit r26237.
2022-01-23 11:59:35 +00:00
Freagarach f787089588 Ceil the resource costs for insufficient resources.
A controversial change (refs. #3818, #4099,
https://code.wildfiregames.com/D1438), but good to have in some form.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4332
This was SVN commit r26236.
2022-01-23 07:41:45 +00:00
Freagarach 8926f5a94c Move the allowed formations from cmpIdentity to cmpUnitAI.
One needs UnitAI to be able to use a formation, so include the spec
therein (to keep information close to where it is used).
Modders can change their templates with the following script:
https://code.wildfiregames.com/P261.

Differential revision: https://code.wildfiregames.com/D4443
Comments by: @Stan
Idea accepted by: @wraitii
Fixes: #6399

This was SVN commit r26235.
2022-01-23 07:23:44 +00:00
Freagarach f8d64a5f2c Fix Catafalque page not showing the Macedonian metal trickle.
The ResourceTrickle component has been changed to a global aura instead.
It increases the trickle slightly, but catafalques are unbalanced
anyway.

Patch by: @Grapjas
Differential revision: https://code.wildfiregames.com/D4383
Refs. #6032 by fixing the Macedonian specific case, but not showing the
tooltips, as requested.

This was SVN commit r26234.
2022-01-23 07:14:45 +00:00
vladislavbelov ad5377bc0e Fixes fancy water shores drawing after 1d9a8b2b0b.
Reported By: wraitii
This was SVN commit r26231.
2022-01-20 17:31:21 +00:00
vladislavbelov 41fe3aafa4 Fixes minimap texture scissoring rect following b5d85e279f. Fixes #6382
This was SVN commit r26229.
2022-01-19 17:40:26 +00:00
vladislavbelov 5adbe4f1a3 Moves blend state management to DeviceCommandContext. Fixes #6420
Tested By: Langbart
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D4441
This was SVN commit r26228.
2022-01-19 17:28:47 +00:00
Stan 0b7a717c8a Fix a warning when building pyrogenesis in Debug on Windows.
This was SVN commit r26227.
2022-01-18 11:07:05 +00:00
vladislavbelov 40e75f9c89 Removes binding additional attribute for water shader added in 1d9a8b2b0b.
Reported By: Freagarach
This was SVN commit r26223.
2022-01-15 16:47:42 +00:00
vladislavbelov a4a647e9f0 Removes unused variable in ParticleRenderer after fc223e3540.
This was SVN commit r26222.
2022-01-15 16:29:26 +00:00
Freagarach f66ca01603 Deselect only part of a formation when clicking the unit icon.
As requested by @wowgetoffyourcellphone to be more in line with
afc77e20a4.

Differential revision: https://code.wildfiregames.com/D4433
Tested by: @astrix, @wowgetoffyourcellphone
This was SVN commit r26221.
2022-01-15 13:44:43 +00:00
Freagarach 0005976b2b Fix selecting multiple entities and training.
Fixes a visual bug where selecting a trainer and a non-trainer counted
as two.

Introduced in 0c4f59d0a7
Reported by Purgator_ on the forums:
https://wildfiregames.com/forum/topic/67583-[[SVN:26182]]-ui-logic-bug.
Differential revision: https://code.wildfiregames.com/D4432
Tested by: @Langbart
Fixes: #6415

This was SVN commit r26220.
2022-01-15 13:42:15 +00:00
vladislavbelov 971b734873 Moves hardcoded blend state in debug overlay and water to their techniques.
This was SVN commit r26218.
2022-01-14 18:44:40 +00:00
vladislavbelov fc223e3540 Moves hardcoded blend state in ParticleRenderer to the transparent particles technique.
This was SVN commit r26217.
2022-01-14 18:18:28 +00:00
vladislavbelov 829e37371b Moves hardcoded blend state in CCanvas2D to its technique.
This was SVN commit r26216.
2022-01-14 17:44:42 +00:00
vladislavbelov 1d9a8b2b0b Splits water surface and shore drawing functions and fixes their switch.
Differential Revision: https://code.wildfiregames.com/D4436
This was SVN commit r26215.
2022-01-14 17:34:58 +00:00
vladislavbelov 9aedcade7f Draws slider button only inside its element.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4435
This was SVN commit r26213.
2022-01-14 06:50:44 +00:00
vladislavbelov 5cbd46de94 Removes deprecated GL alpha test.
In GL3.0 alpha test mode was deprecated and removed in GL3.3. We should
use discard/kill in shaders instead.
In shaders alpha test was removed in d3a24c26ba, in FFP it was removed
with FFP in b7e6811ea6.

Differential Revision: https://code.wildfiregames.com/D4434
This was SVN commit r26211.
2022-01-13 17:50:28 +00:00
Stan fb0a311cc7 Fix a change from c6b53e1677 to a wrong alpha material.
Discussed with: @vladislavbelov

This was SVN commit r26210.
2022-01-13 15:32:28 +00:00
Stan 1ef475ed98 Add an ARB equivalent for los_interp.
Accepted by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4420
This was SVN commit r26209.
2022-01-13 15:12:28 +00:00
wraitii c1f779dff5 Fix compilation on Apple Silicon
This allows cross-compiling for x86_64 on mac ARM machines, and sets
things up for a switch later.
SDL upgrade is necessary for compilation with the GLES headers in
different SDKs.

Tested by: langbart, minohaka
Differential Revision: https://code.wildfiregames.com/D4424
This was SVN commit r26208.
2022-01-13 14:42:42 +00:00
Stan a2ab6b9b72 Allow to cap FPS up to the current max refresh rates of gaming screens: 360Hz
Patch by: @OptimusShepard
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4366
This was SVN commit r26207.
2022-01-13 14:30:23 +00:00
wraitii 712b7ebf9a Remove JS_New in favour of JS::Construct in preparation for SM91
Spidermonkey 91, the next ESR, removes JS_New in favour or
JS::Construct.
See
https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/migration-guide/docs/Migration%20Guide.md#object-construction
and
https://bugzilla.mozilla.org/show_bug.cgi?id=1491055

This change is SM78 compatible and therefore done beforehand.

Tested by: Freagarach
Refs #5986

Differential Revision: https://code.wildfiregames.com/D4427
This was SVN commit r26205.
2022-01-12 16:51:32 +00:00
Stan 6d14932d98 Convert 16-bit grayscale textures to 8 bit textures. It makes little difference for us.
Discussed with: @sera, @vladislavbelov

This was SVN commit r26204.
2022-01-12 15:21:53 +00:00
Stan 336b909c8e Convert 16-bit 16-bit/color RGB(A) textures to 8 bit textures. It makes little difference for us, and it wastes GPU memory.
Remove alpha channel for spec maps and convert an indexed color png to
rgb.

Discussed with: @sera, @vladislavbelov

This was SVN commit r26203.
2022-01-12 14:51:12 +00:00
vladislavbelov 6d28c44f0f Removes unused method from CShaderTechnique.
This was SVN commit r26201.
2022-01-11 16:02:27 +00:00
Freagarach 794fa82efb Warn when finding an entity with Reasearcher/Trainer but without ProductionQueue.
As requested by @Silier and @Stan.
Following 0c4f59d0a7.

Differential revision: https://code.wildfiregames.com/D4404
Comments by: @Silier, @smiley, @Stan
This was SVN commit r26200.
2022-01-11 06:34:07 +00:00
vladislavbelov 9757cc2539 Removes direct shader binding, uses BeginPass always following e1374252b7.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4431
This was SVN commit r26199.
2022-01-11 05:56:44 +00:00
vladislavbelov 2e38c117d2 Fixes comments of CLOSTexture and CTerritoryTexture following 57ba7c4a1c.
This was SVN commit r26197.
2022-01-10 17:58:51 +00:00
vladislavbelov 0cda752ec3 Uses CVertexBufferManager handle instead of raw VBChunk pointer management.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4430
This was SVN commit r26196.
2022-01-10 16:51:43 +00:00
vladislavbelov 795fb070af Removes asking GL of current bind framebuffer to avoid syncs.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4422
This was SVN commit r26193.
2022-01-09 07:36:56 +00:00
Freagarach 98d213a9cd Fix modifications to unspecified techCostMultipliers.
8d80a2186e removed the values for the tech cost multipliers from the
templates, since the component uses those default values, but failed to
account for modifications thereof.
Those weren't applied since the template value didn't exist.

This changes that to iterating over all resources.

Reported by: @Langbart
Differential revision: https://code.wildfiregames.com/D4409
Tested by: @Langbart
Fixes: #6408

This was SVN commit r26192.
2022-01-09 06:32:30 +00:00
vladislavbelov 95318d34ff Removes redundant layer check added in f715b73f4f.
Reported By: Freagarach
This was SVN commit r26189.
2022-01-08 13:44:40 +00:00
vladislavbelov 9924450d36 Moves default GL state setup to GL device.
This was SVN commit r26187.
2022-01-07 22:21:22 +00:00
vladislavbelov 5610c71fc6 Fixes rendering big screenshot pieces onto screen, refs 52a8793450.
This was SVN commit r26186.
2022-01-07 20:15:48 +00:00
vladislavbelov f715b73f4f Uploads cube textures in SkyManager via DeviceCommandContext.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4421
This was SVN commit r26185.
2022-01-07 20:00:41 +00:00
vladislavbelov 15c40861b4 Separates terrain alphamap combining and uploading.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4419
This was SVN commit r26184.
2022-01-07 14:33:54 +00:00
vladislavbelov 9d7457da9b Removes ogl_tex usage from CRenderer.
This was SVN commit r26181.
2022-01-06 23:23:36 +00:00
vladislavbelov b061a7ead4 Optimizes FBO usages for LOSTexture and water shore foam.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4418
This was SVN commit r26180.
2022-01-06 22:44:54 +00:00
Stan dfafdcd792 Bump version of the desktop file to 1.4 the latest stable version according to @nwtour on https://code.wildfiregames.com/D3475.
Noticed by: @asterix and @dynamofox on cf56f36a3b
This was SVN commit r26179.
2022-01-06 20:28:49 +00:00
Stan cf56f36a3b Fix two typos noticed by @Nescio, and use the performance GPU on Linux too.
Patch by: @DynamoFox, @nwtour
Comments by: @bb
Differential Revision: https://code.wildfiregames.com/D3475
This was SVN commit r26178.
2022-01-06 19:40:15 +00:00
Stan de2a368924 Modify 0ad.desktop to accept a file as an argument to allow installing mods by drag & drop on the icon.
Patch by: @nwtour
Accepted by: @Freagarach
Differential Revision: https://code.wildfiregames.com/D4410
This was SVN commit r26177.
2022-01-06 19:34:20 +00:00
vladislavbelov 9bc3dd4699 Fixes terrain overlay texture upload after fd976456d7.
Reported By: nwtour
This was SVN commit r26176.
2022-01-06 14:16:32 +00:00
vladislavbelov 912202ff0c Uses core GL functions for GLSL shaders.
Tested By: nwtour, Stan
Differential Revision: https://code.wildfiregames.com/D4416
This was SVN commit r26175.
2022-01-06 11:41:04 +00:00
vladislavbelov cee0ce48eb Disables redundant mipmap generation for postprocessing.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4417
This was SVN commit r26174.
2022-01-06 11:09:42 +00:00
vladislavbelov 27c8771a3a Fixes debug drawing of a null shadow texture introduced in 36107cb7e1, appeared after abc3190c03.
Reported By: nwtour
This was SVN commit r26173.
2022-01-06 11:04:45 +00:00
vladislavbelov f07fa81661 Renames LOS framebuffer object to follow CC.
This was SVN commit r26171.
2022-01-05 15:37:59 +00:00
vladislavbelov fd976456d7 Performs texture uploads via DeviceCommandContext interface.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4415
This was SVN commit r26170.
2022-01-05 14:49:54 +00:00
Stan 07c0d95467 Write a GLSL equivalent for overlay_solid.
Fixes #6403
Patch by: z0rg
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4406
This was SVN commit r26168.
2022-01-04 21:14:41 +00:00
Stan 0a8d382657 Fix OpenGL ES 2.0 Warnings.
This was SVN commit r26167.
2022-01-04 20:54:37 +00:00
vladislavbelov 5e3426794c Moves frame rendering function to CRenderer and combines with making screenshots.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4414
This was SVN commit r26166.
2022-01-04 18:13:45 +00:00
vladislavbelov 87b5c233c5 Splits CRenderer part about scene to CSceneRenderer.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4412
This was SVN commit r26165.
2022-01-04 13:29:01 +00:00
Stan 3d2be697a2 Fix OpenGL ES build after ae32055c9b.
This was SVN commit r26163.
2022-01-04 00:21:37 +00:00
vladislavbelov 2f90becb28 Removes SkipSubmit and unused friends from Renderer.
This was SVN commit r26162.
2022-01-03 12:16:16 +00:00
vladislavbelov 3e6b0780fa Removes unused Renderer friends of removed classes, refs 8753f881ee, 6bc33fe8bd.
This was SVN commit r26161.
2022-01-03 12:00:37 +00:00
vladislavbelov 3b8f1cdc04 Moves Renderer internals class out of the global namespace.
This was SVN commit r26160.
2022-01-03 11:11:58 +00:00
vladislavbelov 6dc0abebdb Removes unused includes from Renderer.
This was SVN commit r26159.
2022-01-03 10:59:41 +00:00
vladislavbelov 4fba543488 Unifies providing SkyManager and WaterManager like other managers, refs b889826a3d.
This was SVN commit r26158.
2022-01-03 10:49:12 +00:00
Stan 7afe489214 Remove topology.cpp. The data isn't useful to us, and it prevents some players from running the game.
Fixes #6028
Differential Revision: https://code.wildfiregames.com/D4402
This was SVN commit r26157.
2022-01-03 10:29:34 +00:00
vladislavbelov 273d336364 Removes unused Atlas functionality to set clear color added in 2f53eea71a and removed in 0d6882dad2.
This was SVN commit r26156.
2022-01-03 09:39:54 +00:00
vladislavbelov e9070a2630 Removes rand function usage from Atlas and unused rand include from particles.
This was SVN commit r26153.
2022-01-02 22:35:17 +00:00
vladislavbelov e547704a54 Removes rand function usage from test_cache_adt.
This was SVN commit r26152.
2022-01-02 22:32:38 +00:00
Angen f6d2961a81 Fix bug where scenario map was not loading as revealed when set to revealed.
Introduced in dd90dbf8b5.

Differential revision: D4305
Fixes: #6356
Patch by: @Jammyjamjamman
Comments by: @Stan, @andy5995, @vladislavbelov, @Langbart, @Freagarach
Tested by: @Freagarach, @Langbart
This was SVN commit r26151.
2022-01-01 18:15:59 +00:00
vladislavbelov 8347c94e3a Moves game load progress update function from GameSetup to CGUIManager.
This was SVN commit r26150.
2022-01-01 12:23:24 +00:00
vladislavbelov 7b8c66ec9f Adds config settings for borderless fullscreen and window modes.
Tested By: bb, Langbart
Differential Revision: https://code.wildfiregames.com/D4106
This was SVN commit r26148.
2021-12-31 12:05:48 +00:00
vladislavbelov 202e248c93 Removes cinema path recording from atlas added in 2c71c22045 and not removed with ffmpeg in [[SVN:9520]], 4c395f4bf2 and 47b26e56d3.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4411
This was SVN commit r26147.
2021-12-31 10:35:56 +00:00
vladislavbelov c9ba9299a3 Ignores sampler settings for multisample GL textures.
Reported By: Stan
This was SVN commit r26144.
2021-12-30 17:31:16 +00:00
vladislavbelov abc3190c03 Removes binding native GLuint textures from public ShaderProgram API.
Differential Revision: https://code.wildfiregames.com/D4407
This was SVN commit r26143.
2021-12-30 16:37:51 +00:00
vladislavbelov e4455a8e8f Speedups terrain painting tab in Atlas by asynchronous texture loading.
Tested By: Silier, Stan
Differential Revision: https://code.wildfiregames.com/D4405
This was SVN commit r26142.
2021-12-30 16:24:07 +00:00
Stan ae32055c9b Add support for GL_KHR_debug in Debug Mode.
Based on a patch by: @linkmauve
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2488
This was SVN commit r26141.
2021-12-30 15:07:17 +00:00
Stan b74fd6d4a2 Use the high performance GPU on Windows by default.
Reviewed by: @vladislavbelov
Accepted by: @asterix
Differential Revision: https://code.wildfiregames.com/D4401
This was SVN commit r26140.
2021-12-30 13:57:40 +00:00
vladislavbelov 92cf0c784c Removes Handle from ShaderProgram to use more high-level objects.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4403
This was SVN commit r26138.
2021-12-29 07:07:08 +00:00
vladislavbelov b9e4c14083 Fixes out of bounds access in SkyManager after 0837e369cf.
This was SVN commit r26136.
2021-12-28 10:50:42 +00:00
Angen 70bd982c85 Fix OnOwnershipChanged missing in ResourceTrickle
This was SVN commit r26135.
2021-12-28 10:03:49 +00:00
Angen e552f1280e Fix certain modifiers not being cleared corectly from cache
Issue noticed by Exodarion.

After researching technology for resourcetrickle modifiers were
returning old cached value because modifiers were not cleared for
structure when it was build and changed owner from invalid_owner to the
player so old values were kept.

Cause:
global cache depends on originalvalue.
Health and other modifiers use also player-wide modifiers and result
from that is used as the key, what means global cache is never used
because originalvalue will differ in that case.
That does not look to be case for resourcetrickle and possibly for
another scenarios.
Modifiers that get cached on init and do not get changed by player-wide
modifiers in combination with ownership being changed afterwards will
bug.
Since we dont reset cache for ownership going from invalid_player, the
old global cache is kept and used.

Another solution would be to not cache on init, but thats workaround to
hide the issue.

Differential revision: D4395
This was SVN commit r26134.
2021-12-28 10:01:36 +00:00
Freagarach 2c33c28a09 Add the ability to do simple (de)serialisation cycle in the JS unit tests. (And change the PQ, Trainer and Researcher serialisation.)
To catch e.g. typos.

- Use the same structure in the ProductionQueue item (de)serialisation
as in Trainer and Researcher.
- Also iterate over the serialisable attributes on deserialize, as
proposed by @elexis (on IRC), for its symmetry.

Proposed by: @Stan
Differential revision: D4388
This was SVN commit r26133.
2021-12-28 08:23:59 +00:00
Freagarach 32fc381017 Fix PetraAI not rushing.
A typo in the starting strategy.
Reported by: @marder on
http://irclogs.wildfiregames.com/%230ad-dev/2021-11-12-QuakeNet-%230ad-dev.log
Introduced in 4e664dd712.

Differential revision: https://code.wildfiregames.com/D4391
Fixes: #6381

This was SVN commit r26132.
2021-12-28 08:16:06 +00:00
Freagarach 60f35ff9c7 Add missing ProductionQueue component to the Mauryan Palace.
Reported by @ValihrAnt at 0c4f59d0a7.
Introduced in 8d80a2186e.

Differential revision: https://code.wildfiregames.com/D4392
Tested by: @ValihrAnt
Comments by: @Stan
This was SVN commit r26131.
2021-12-28 08:12:10 +00:00
Freagarach b3a6a1e6e5 Add a more detailed description to the showstatusbar hotkey.
For it was not really clear.

Patch by: @nwtour
Differential revision: https://code.wildfiregames.com/D4362
Accepted by: @asterix
This was SVN commit r26130.
2021-12-28 08:08:13 +00:00
vladislavbelov 3591220361 Removes redundant ogl usage to process data on CPU combining terrain alpha map.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4399
This was SVN commit r26129.
2021-12-28 06:41:06 +00:00
vladislavbelov 136f4621af Fixes crash for ARB shaders because they don't provide actual locations, triggered after c2c3a3b663.
Reported By: nwtour
This was SVN commit r26127.
2021-12-27 21:27:56 +00:00
vladislavbelov 0837e369cf Moves PostProcManager and SkyManager to GL texture class continuing 57ba7c4a1c.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4398
This was SVN commit r26126.
2021-12-27 21:01:43 +00:00
Stan c4de86973d Fix Haiku detection introduced in cc65e0e8a2
Patch by: @xone47
Differential Revision: https://code.wildfiregames.com/D4396
This was SVN commit r26125.
2021-12-27 18:59:44 +00:00
bb cbb7177fc1 Fix two comments from d95550248b
This was SVN commit r26124.
2021-12-27 16:30:58 +00:00
bb 6ed690f102 Add script to remove unneeded info from .po files
Differential Revision: D4264
This was SVN commit r26123.
2021-12-27 14:31:32 +00:00
vladislavbelov 3cb60353e1 Removes unused h_mgr includes.
This was SVN commit r26122.
2021-12-27 11:47:16 +00:00
vladislavbelov 9696df3c28 Removes unused ogl/ogl_tex includes.
This was SVN commit r26121.
2021-12-27 10:11:26 +00:00
vladislavbelov 60a422b668 Moves water textures and terrain alpha composite map to GL texture class following 57ba7c4a1c.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4394
This was SVN commit r26120.
2021-12-27 08:14:47 +00:00
vladislavbelov f59f637cbb Cleanups TerrainTextureEntry a little, removes commented member from 88ab3f0f5b.
This was SVN commit r26118.
2021-12-26 20:39:13 +00:00
vladislavbelov c2c3a3b663 Moves shadow map and terrain overlay to GL texture class continuing 57ba7c4a1c.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4393
This was SVN commit r26117.
2021-12-26 09:48:48 +00:00
Stan 6c2b9e72a0 Fix naming conventions of a few map names. Rename a dupe texture, and the fcollada readme.
Refs #6327

This was SVN commit r26114.
2021-12-26 00:17:01 +00:00
bb bd8b11676e Update translation files on translator change
Comments By: Stan
Differential Revision: D4260
This was SVN commit r26113.
2021-12-25 21:22:45 +00:00
bb 5fd4fb2b34 Restoring the colored profile name with the ranking and using the leaderboard names for autocompletion in the profile player search field.
Broken in 0a09bde961

Comments By: elexis, Dunedan, Silier, Freagarach
Patch By: Langbart
Differential Revision: D4262
fixes #6316

This was SVN commit r26112.
2021-12-25 21:06:21 +00:00
Angen ac7dc057df Add "Invalid signature" reason to modio
When signature is invalid, it does not comunicate the reason clearly.
Fix this.
Also remove silent failure in case of signature is not valid.

Differential revision: D3478
Reviewed by: @bb
This was SVN commit r26111.
2021-12-25 19:31:51 +00:00
Angen 2dc0ccc184 [gameplay] standardize animal loot experience
This patch attempts a more systematic approach, by standardizing the
<Loot/xp> to 20% of <Health/Max>.

Differential revision: D3681
Patch by: @Nescio
Reviewed by: @borg- @wowgetoffyourcellphone
Comments by: @Palaxin
This was SVN commit r26110.
2021-12-25 19:28:31 +00:00
vladislavbelov 57ba7c4a1c Encapsulates GL texture creation in a separate class.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4389
This was SVN commit r26107.
2021-12-25 00:26:10 +00:00
Freagarach 381bbb59e8 Fix (de)serialisation in the Researcher component.
A typo in the serialisation function.
Also just serialise the properties that are assigned in cmpResearcher
and cmpTrainer.

Introduced in e4925e02d0
Reported by: @nwtour
Differential revision: https://code.wildfiregames.com/D4386
Tested by: @nwtour
This was SVN commit r26105.
2021-12-24 08:11:17 +00:00
vladislavbelov 478164962f Removes static linking of OpenGL library.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4387
This was SVN commit r26104.
2021-12-24 08:02:27 +00:00
vladislavbelov f9818b7f7a Moves default texture to SingleColorTexture following 283f524fcf.
This was SVN commit r26102.
2021-12-23 17:44:24 +00:00
Stan e7cc6117ce Fix removal of added files for macOS and Windows.
Don't display Debug: and Release: if no message was printed.

This was SVN commit r26101.
2021-12-23 15:10:16 +00:00
Stan 6b7541cec5 Add more options to archive builds.
Patch by: @wraitii, @Stan
Tested for A25.

Differential Revision:
https://code.wildfiregames.com/D4141#change-nbAmEr5oWUW3

This was SVN commit r26100.
2021-12-23 14:59:37 +00:00
vladislavbelov 6f1322881e Cleanups console a little bit.
This was SVN commit r26099.
2021-12-23 07:37:03 +00:00
Stan 53734a05a6 Add a missed include in https://code.wildfiregames.com/D721; It's included for some reason in Windows NOPCH but not linux
Reported by: @Freagarach
This was SVN commit r26097.
2021-12-22 11:02:13 +00:00
Angen 2922b693ab Fix special string used in singular for english
Some languages use singular form for another counts than 1, what makes
singular strings in english with hardcoded number causing incorrect
string to be displayed.

Adding special branch for english singular string since it looks nicer.

Differential revision: D4377
Patch by: @nwtour
This was SVN commit r26096.
2021-12-22 10:54:11 +00:00
Stan c9bea80e0d Use GLAD2 a multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator.
Comments by: @nwtour, @Langbart, @bb
Based on patch by: @echotangoecho
Tested on Windows 7 & 10, Ubuntu and macos.

Differential Revision: https://code.wildfiregames.com/D721
This was SVN commit r26093.
2021-12-21 22:03:31 +00:00
vladislavbelov a32ab00f4d Moves backbuffer swap and error check to GL device.
This was SVN commit r26092.
2021-12-21 17:02:04 +00:00
wackyserious d48bc63d92 Fix missed issues bc461838ee and minor texture edits
-Move orientation of the Scythian coat to the left to make it more
visible.

This was SVN commit r26091.
2021-12-21 09:02:31 +00:00
Angen 26842451d7 Fix sorting by hasPassword/private in gamelist
Reported by @nani:
Sorting by "has password" in lobby game list does nothing

Add sorting value.

Differential revision: D4382
Reviewed by: @Freagarach
Fixes: #6392
Introduced in: c2155e31c0

This was SVN commit r26090.
2021-12-21 08:00:37 +00:00
Freagarach 84399ba248 Fix training/researching with zero time.
(Re)introduced in 0c4f59d0a7.
Reported by: @wowgetoffyourcellphone
Differential revision: https://code.wildfiregames.com/D4378
Reviewed by: @Silier
Refs. #2334

This was SVN commit r26089.
2021-12-21 06:19:50 +00:00
Freagarach a8c6d7a82b Inherit comment of previous save when overwriting.
Reported by: @allalongthetower at
https://wildfiregames.com/forum/topic/64768-save-game-name-erasing/
Patch by: @nwtour
Differential revision: https://code.wildfiregames.com/D4372
Comments by: @Silier, @Stan
This was SVN commit r26088.
2021-12-21 06:07:48 +00:00
wackyserious bc461838ee 037351c75e fix
This was SVN commit r26087.
2021-12-21 01:00:38 +00:00
wackyserious 037351c75e Update Athenian Scythian archer champion unit textures
-Standardize naming convention (sample_01_01, where first 01 = type and
following, 01 = subtype)
-Add new variants
-Minor update to previous textures

This was SVN commit r26086.
2021-12-20 12:10:45 +00:00
Freagarach e4925e02d0 Fix getting units by cheat.
Introduced in 0c4f59d0a7.
Noticed by: @loveheaven at
https://wildfiregames.com/forum/topic/64877-cannot-cheat-any-longer-by-iwanttopwnthem-50/.

Differential revision: https://code.wildfiregames.com/D4374
Comments by: @Silier, @Stan
This was SVN commit r26084.
2021-12-17 15:34:49 +00:00
vladislavbelov 3b9b7cd605 Moves GL report from HWDetect to GL device.
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D4376
This was SVN commit r26081.
2021-12-16 06:36:46 +00:00
vladislavbelov 2f4fabdd96 Fixes gamesetup slider for a too short frame time (not enough Date precision).
Patch By: nwtour
Differential Revision: https://code.wildfiregames.com/D4365
This was SVN commit r26079.
2021-12-15 10:56:20 +00:00
vladislavbelov eb004e5c98 Uses forward declaration for SDL in GL device.
This was SVN commit r26078.
2021-12-15 10:50:31 +00:00
vladislavbelov 93a9072618 Removes logs of unused GL constants which duplicate video mode settings.
This was SVN commit r26077.
2021-12-15 10:49:46 +00:00
Freagarach dfd9560748 Put the formation-selection feature behind a config.
Since it needs a better UX. (Introduced in a70a20fd42.)
Users can choose to still use it.

Differential revision: https://code.wildfiregames.com/D4360
Comment by: @wowgetoffyourcellphone
This was SVN commit r26076.
2021-12-15 08:07:59 +00:00
Freagarach afc77e20a4 Ignore formation selection when clicking an unit icon.
It was deemed unintuitive to select the whole formation when clicking an
icon.

Differential revision: https://code.wildfiregames.com/D4295
Comments by: @alre, @Langbart, @marder, @wowgetoffyourcellphone
This was SVN commit r26075.
2021-12-15 08:00:49 +00:00
Freagarach f1f744702b Rename "ElevationBonus" and "Delay" to "Origin" and "EffectDelay", respectively.
`ElevationBonus` is vague, as discussions proved. Therefore it is
renamed to `Origin`, which, describes better what the value stands for.
`Delay` is also quite vague, so renamed to `EffectDelay`.

Differential revision: https://code.wildfiregames.com/D2016
Comments by: @bb, @nani, @Nescio, @Silier, @Stan, @wraitii
This was SVN commit r26074.
2021-12-15 07:42:06 +00:00
Freagarach 5cbdc6c62a Use the attack sound for attack-move.
And define it (the attack_move sound) in the templates, such that
modders can change it at will.

Patch by: @wowgetoffyourcellphone
Differential revision: https://code.wildfiregames.com/D4364
This was SVN commit r26073.
2021-12-15 07:11:03 +00:00
vladislavbelov 89c181ded1 Encapsulates information about GL inside device.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4375
This was SVN commit r26072.
2021-12-15 06:43:41 +00:00
vladislavbelov 784f734480 Removes a hack to detect an old S3 SuperSavage card added in c1ec44d751.
This was SVN commit r26070.
2021-12-14 10:47:32 +00:00
vladislavbelov 3809457513 Replaces unclear PreferGLSL by direct renderer backend choice.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4363
This was SVN commit r26069.
2021-12-14 06:34:02 +00:00
vladislavbelov f28efbaa87 Forbids using more than 64 bones for GPU skinning.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4244
This was SVN commit r26067.
2021-12-13 19:22:27 +00:00
Stan 044346cf62 Set default big screenshot size to 4K as proposed by @wowgetoffyourcellphone in f175bc4f8d
This was SVN commit r26066.
2021-12-13 19:03:02 +00:00
vladislavbelov a3382fb3eb Removes checks for unused or always enabled GL extensions.
Differential Revision: https://code.wildfiregames.com/D4371
This was SVN commit r26065.
2021-12-13 18:36:37 +00:00
Freagarach a8c25837cb [PetraAI] - Use enum-like variables instead of magic values. -- [2]
Improved readability. Easier find-and-replace.

This commit focused on:
- Worker
- TransportPlan
- Difficulty

Patch by: @JCWasmx86
Differential revision: https://code.wildfiregames.com/D4343
Refs. #6256
Comments by: @nani, @Silier, @Stan
This was SVN commit r26063.
2021-12-13 08:04:33 +00:00
Stan 7e0a42c87d Delete broken assets reported here https://wildfiregames.com/forum/topic/49785-building-a-64-bit-pyrogenesis-and-deps-for-windows/?do=findComment&comment=452589
This was SVN commit r26061.
2021-12-12 20:41:54 +00:00
Stan e851fc019b Remove duplicate iber_struct.dds
Fixes #6326

This was SVN commit r26060.
2021-12-12 20:04:07 +00:00
Stan 0dd3bcc8e7 Remove duplicate dds textures for desert_forestfloor_palms.dds, kart_trireme.dds, tree_cypress_a.dds, farming_wheat_harvest_b.dds, road_roman.dds, celt_caratacos.dds, rome_ijv_e.dds, hele_trireme.dds, iber_sail_b.dds, kart_sail_1.dds, kart_sail_2.dds, kart_sail_3.dds.
Refs #6326

This was SVN commit r26059.
2021-12-12 19:15:40 +00:00
Stan 846b8154c2 Remove duplicate celt_prop_1 texture.
Refs #6326

This was SVN commit r26058.
2021-12-12 18:08:17 +00:00
Stan 09c39d710f Remove duplicate textures.
Refs #6326

This was SVN commit r26057.
2021-12-12 16:56:40 +00:00
Stan b7cf30fce5 Fix Windows 11 Detection
Comments by: @vladislavbelov, @Freagarach
Differential Revision: https://code.wildfiregames.com/D4337
This was SVN commit r26056.
2021-12-12 16:08:09 +00:00
Stan 5b6bb1cd89 Fix Alt Tab on Windows for SDL > 2.0.12
Comments by: @vladislavbelov,  @Freagarach
Differential Revision: https://code.wildfiregames.com/D4359
This was SVN commit r26055.
2021-12-12 16:01:30 +00:00
Stan c80da0cd3c Remove duplicate texture hele_struct_b
- Use the correct material, as texture has no alpha, therefore no player
color
- Add missing textures where necessary
- Use null_white for hele_blacksmith_bucket_water instead of loading
useless textures.

Refs: #6326

This was SVN commit r26054.
2021-12-12 15:43:50 +00:00
Angen a43ff8b088 Fix not used SIEGE_NO_TRAINER
In 2f24006afb, the siege state for no trainer was not assigned to
variable but used in condition.
Making use of that state actually.

Differential revision: D4367
Patch by: @JCWasmx86
This was SVN commit r26053.
2021-12-12 12:19:11 +00:00
vladislavbelov 5e61febf16 Resolves concerns from e4907bdb6e. Fixes #6395
Tested By: Langbart, nwtour
Differential Revision: https://code.wildfiregames.com/D4370
This was SVN commit r26051.
2021-12-10 21:29:40 +00:00
vladislavbelov 9cb6e4c105 Cleanups Font and FontManager a little.
This was SVN commit r26050.
2021-12-10 16:59:32 +00:00
vladislavbelov dfe165d6c2 Fixes unused m_Simulation after b991ef919b.
This was SVN commit r26046.
2021-12-09 18:07:10 +00:00
vladislavbelov fe81a6eec7 Refactors WaterManager to remove duplication of the current texture index calculation. Removes unused m_WaterCurrentTex from f2cae8cb9b.
This was SVN commit r26045.
2021-12-09 18:01:28 +00:00
Freagarach 1dfa8140a9 Fix infinite loop when queuing a gather order after garrison.
There was an infinite loop:
Order.Gather -> MustKill (L497) -> PushOrderFront(Attack) (L526) ->
NotInRange (L410) -> NotAbleToMove, thus finish order (L426/427) ->
Restart from Order.Gather.

We do two things here:
- Assume we don't have vision when garrisoned, which is not a bad
assumption.
- Check the range and if we are not able to move and not in range,
finish the order.

Introduced in: d3c3072c83
Reported by: @Langbart
Differential revision: https://code.wildfiregames.com/D4349
Fixes: #6377
Tested by: @Langbart
Comments by: @Silier, @Stan
This was SVN commit r26044.
2021-12-09 16:35:03 +00:00
Freagarach 695ce382ec Fix Trainer/Researcher without entities/techs.
It was explicitly allowed in 0c4f59d0a7, but not all references to
`this.template` were properly checked.

Noticed by: @nwtour
Differential revision: https://code.wildfiregames.com/D4357
Tested by: @nwtour
Comments by: @Stan
This was SVN commit r26043.
2021-12-09 16:22:52 +00:00
Freagarach a53405f697 Fix PetraAI after 5d3902498f.
In 5d3902498f there was a wrong substitution.
`AttackManager` -> `AttackPlan` for the attack types.

Patch by: @JCWasmx86
Differential revision: https://code.wildfiregames.com/D4369
Reviewed by: @Silier
Tested by: @nwtour
This was SVN commit r26041.
2021-12-09 05:47:29 +00:00
vladislavbelov fe511e88d9 Adds FreeType support to the engine.
Tested By: Langbart, Imarok, Stan, s0600204, wraitii
Differential Revision: https://code.wildfiregames.com/D4108
This was SVN commit r26040.
2021-12-08 22:14:43 +00:00
vladislavbelov 04476bf29f Normalizes AO textures according to b53c454e3e via P259.
Differential Revision: https://code.wildfiregames.com/D4361
This was SVN commit r26039.
2021-12-08 18:35:23 +00:00
vladislavbelov b53c454e3e Removes AO multiplier as a duplicate way to adjust AO, makes it closer to PBR.
Differential Revision: https://code.wildfiregames.com/D4361
This was SVN commit r26038.
2021-12-08 18:28:42 +00:00
wackyserious 22a21e4bd9 Update: Celtic Unit Actor File
-Sword sheath position switch
-Make heroes look more historically accurate
-New hero textures (Caradoc and Boudicca)

Reviewed by: Genava55, wowgetoffyourcellphone and other community
members

This was SVN commit r26037.
2021-12-08 08:26:31 +00:00
vladislavbelov 90f27d4909 Adds console toggle hotkeys to the console welcome message.
Patch By: nwtour
Differential Revision: https://code.wildfiregames.com/D4347
This was SVN commit r26035.
2021-12-07 20:09:46 +00:00
Freagarach 5ceeac3dd5 Use correct tooltip stye for the civ icon.
Introduced in 18a97cc82a.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4341
Fixes: #6378
Comment by: @vladislavbelov
This was SVN commit r26033.
2021-12-06 07:22:12 +00:00
vladislavbelov e4907bdb6e Forces GL 2.1 core context creation in VideoMode.
This was SVN commit r26031.
2021-12-04 22:01:20 +00:00
vladislavbelov 670f5f9a40 Adds more flexible dependencies to options.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4354
This was SVN commit r26030.
2021-12-04 20:09:53 +00:00
Freagarach 5d3902498f [PetraAI] - Use enum-like variables instead of magic values. -- [1]
Improved readability. Easier find-and-replace.

This commit is focused on:
- BaseManager
- AttackPlan
- GarrisonManager

Patch by: @JCWasmx86
Differential revision: https://code.wildfiregames.com/D4334
Refs. #6256
Comments by: @Silier, @Stan
This was SVN commit r26029.
2021-12-04 08:47:05 +00:00
vladislavbelov 5a7aa37cd1 Fixes without PCH build after af567560b8.
Reported By: Freagarach
This was SVN commit r26026.
2021-11-30 18:03:39 +00:00
vladislavbelov a591e5aa69 Removes unused/not implemented hooks from AppHooks. Refs f947fa6afe.
This was SVN commit r26024.
2021-11-29 18:21:49 +00:00
vladislavbelov af567560b8 Drops custom utf16 string implementation (from cdd3317ded), uses C++11 one.
Patch By: sera
Differential Revision: https://code.wildfiregames.com/D4223
This was SVN commit r26023.
2021-11-29 12:10:41 +00:00
vladislavbelov e1374252b7 Removes direct access to shaders, leaves only techniques.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4353
This was SVN commit r26020.
2021-11-27 15:01:14 +00:00
vladislavbelov 4c26a2d11f Adds disabled sprites to slider.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4355
This was SVN commit r26019.
2021-11-27 13:37:05 +00:00
vladislavbelov c0e0d620eb Draws fancy water and its shore waves only for GLSL shaders.
This was SVN commit r26017.
2021-11-26 21:47:04 +00:00
Freagarach fcd10be509 Fix Researchers' GUI without a tech cost multiplier.
This was SVN commit r26016.
2021-11-26 20:53:14 +00:00
Freagarach 8d80a2186e Some fixes after the ProductionQueue split.
0c4f59d0a7 / 8475c16c31 introduced a serialisation error (#6391).
Also the templates and the code could be improved.

Differential revision: https://code.wildfiregames.com/D4352
Comments by: @Silier, @Stan
Fixes: #6391

This was SVN commit r26015.
2021-11-26 17:12:26 +00:00
vladislavbelov 809e3ed0bd Removes rand function usage from tests to avoid non-uniform distributions.
This was SVN commit r26012.
2021-11-25 17:57:59 +00:00
vladislavbelov 6efa293fd1 Reduces number of allocations during GPU profiler processing for Intel queries.
This was SVN commit r26011.
2021-11-25 17:33:17 +00:00
vladislavbelov 265a2246f0 Removes unused fnv_lc_hash, also file paths case sensitive so we can't use the function.
This was SVN commit r26010.
2021-11-25 16:58:04 +00:00
vladislavbelov 25ce179cbc Adds collision test for fnv_hash, removes unused include forgotten in b4a33851e6.
This was SVN commit r26007.
2021-11-21 11:59:02 +00:00
Freagarach ab01a2d2fc Fix replay folders with special characters.
Implemented in e7ab22286e, broken in cb346e207b.

Patch by: @Langbart
Help by: @elexis
Differential revision: https://code.wildfiregames.com/D4345
Fixes: #6373
Reviewed by: @vladislavbelov
Tested by: @Freagarach
This was SVN commit r26005.
2021-11-19 11:34:26 +00:00
Freagarach a16ecf0f62 Missing tileclass in archipelago / fix fish on land.
This would cause fishes to be spawned on land under a specific set of
conditions. Cases where the concerned land is not painted clPlayer for
example (which fish also avoids).
Added by @marder: spacing of the forest and wood amount was corrected as
the above ^ pushed the wood away from the player.

Original patch by: @smiley
Additional changes by: @marder
Differential revision: https://code.wildfiregames.com/D1729
Comments by: @elexis
Tested by: @Freagarach
Fixes: #5797
Refs. #3746

This was SVN commit r26003.
2021-11-17 07:20:18 +00:00
vladislavbelov 9b3dcd2610 Slightly improves minimap flares, makes animation more smooth via alpha fade in/out.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4351
This was SVN commit r26001.
2021-11-16 16:58:32 +00:00
Freagarach 0c4f59d0a7 Split tasks from ProductionQueue.
The task of the production queue should first and foremost be that; a
queue for production items.
Hence, the specifics of training/researching are delegated to specific
components.

As a side effect, this improves the test coverage and fixes:
- Resource not refunding when hitting the entity limit. Introduced in
b8758c8941.
- Autoqueue changing when unable to spawn. Introduced in 956b3f96db.

Modders can change their templates using
https://code.wildfiregames.com/P256.

Differential revision: https://code.wildfiregames.com/D4333
Fixes: #6363
Comments by: @Silier
Refs. #6364

This was SVN commit r26000.
2021-11-16 07:08:39 +00:00
vladislavbelov b5d85e279f Removes border pixels drawing of the minimap texture with scissors after b991ef919b. Fixes #6382
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4350
This was SVN commit r25997.
2021-11-14 16:51:39 +00:00
vladislavbelov d1a7aa2858 Adds alpha and custom options to render debug modes.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4346
This was SVN commit r25996.
2021-11-14 08:33:59 +00:00
Angen 59a13f97be Show the correct message when exiting the multiplayer match as a client
Forgotten change in: 3ab25cbd95
Reported by: @bb
Differential revision: D4330
Patch by: @Schweini
This was SVN commit r25995.
2021-11-13 12:26:48 +00:00
vladislavbelov b991ef919b Moves MiniMap texture rendering to a separate framebuffer to update it less frequently.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4331
This was SVN commit r25993.
2021-11-12 19:15:48 +00:00
vladislavbelov 36eb92f9a4 Adds render debug modes.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4311
This was SVN commit r25992.
2021-11-12 11:22:18 +00:00
Angen dc361048aa Fix a1010b83d3 and 8f8996e338
Fix wrong renaming done in a1010b83d3
Fix missed structure change in 453fe486de

Reported by: SciGuy42 on forum
https://wildfiregames.com/forum/topic/62269-onrange-triggers-in-a25/
Tested by: SciGuy42
Differential revision: D4335
This was SVN commit r25989.
2021-11-06 11:07:28 +00:00
bb c1cd28c878 Also do a postMove update when the average speed over last turn isn't zero
Reviewed By: Freagarach
Differential Revision: D4302
refs acc780bcbb

This was SVN commit r25985.
2021-10-31 17:21:04 +00:00
Freagarach f0c708be41 Ceil the required XP in the GUI.
344d1cc837 introduced a tech that percentually increased the required XP
for archers, showing a decimal value.
This rounds that up, for 150/150 without being promoted looks bad as
well.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4322
Reviewed by: @Angen
This was SVN commit r25984.
2021-10-31 07:00:39 +00:00
vladislavbelov 4bae03c6c8 Enables GL_TEXTURE_2D always since we don't support FPP anymore.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4327
This was SVN commit r25982.
2021-10-30 14:34:20 +00:00
Angen 5924575705 Fix pathname not matching name incompatible mod detection
Differential revision: D4324
Broken in 498f0d420b

This was SVN commit r25979.
2021-10-28 20:33:01 +00:00
Freagarach 3ab25cbd95 Add an extra button to skip the summary page when quitting.
Allows devs (and players) to skip the summary page when they don't need
them.

Patch by: @Schweini
Differential revision: https://code.wildfiregames.com/D3958
Reviewed by: @Langbart
Fixes: #4300
Comments by: @nwtour, @Stan
This was SVN commit r25978.
2021-10-28 06:31:16 +00:00
Freagarach 137ec9f3d4 Fix typo in tutorial.
Triple click should have been an <Alt>+DoubleClick.
While at it, removed the unneeded brackets at the hotkey translations.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4314
Fixes: #5409

This was SVN commit r25977.
2021-10-28 06:21:14 +00:00
Freagarach 083ab0f4b0 Some layout changes to the replay menu.
Cursor should not blink in read-only.
The path was too similar to the list and thus easy to miss, it has been
changed to a 'golden' colour.
A tooltip was added to the path.
The border colour of input fields was changed from white to gold.
The buttons at the bottom of the page are spread evenly.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4296
Refs: #6350

This was SVN commit r25976.
2021-10-28 06:14:17 +00:00
Angen 3adac574b7 Prevent division by 0 for experience bar
Required experience can be set to 0 initially and because entity is
upgrated after simulation starts, there was division by 0 in atlas for
such entities causing experience bar going to infinity.

Differential revision: D4317
Fixes: #6362
Patch by: @Langbart
Reviewed by: @Angen
This was SVN commit r25974.
2021-10-27 19:00:35 +00:00
vladislavbelov f543574d61 Removes lines drawing by direct GL calls from MiniMap.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4321
This was SVN commit r25973.
2021-10-27 06:42:54 +00:00
Freagarach a00c2674b5 Fix AI attacking some bridges.
Our bridges are nothing more than actors, so using one is correct.
We also delete the template files to prevent others from making the same
mistake (if someone encountered and fixed the bug in a mod they have
modified templates anyway).

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4297
Reviewed by: @bb
Comments by: @Angen
Fixes #6352

This was SVN commit r25972.
2021-10-26 16:34:44 +00:00
Angen b4fbbed379 There have been quite a bit of number of questions how to change scale of the gui, because this option is hidden from the user.
Use dropdown with values. Implement confirmation box with countdown to
revert scale change because buttons can get unable to click.

Differential revision: D3037
Comments by: @vladislavbelov, @Stan, @wraitii, @pieq, @sera
Tested by: @Langbart
This was SVN commit r25966.
2021-10-17 10:58:51 +00:00
bb 9c2a09067f Center generic/specific name if just one is given and hide the other
Patch By: LangBart
Comments By: Freagarach
Differential Revision: D4290
fixes #6341

This was SVN commit r25964.
2021-10-12 20:25:09 +00:00
vladislavbelov 31a6ffdd3a Removes mentions of legacy and unused GL calls, unifies AsFloatArray.
This was SVN commit r25961.
2021-10-11 12:39:01 +00:00
vladislavbelov 9ee448b377 Removes direct GL calls from Atlas bandbox drawing.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4300
This was SVN commit r25960.
2021-10-11 11:30:50 +00:00
Freagarach 75aa2091b7 Allow to push items to the front of the ProductionQueue.
Refs. #6104
Differential revision: https://code.wildfiregames.com/D4241
Comments by: @bb, @Langbart, @Stan
This was SVN commit r25958.
2021-10-10 19:07:42 +00:00
Angen b1a01005b8 [Petra] Remove global constant from queueplanBuilding.js
If someone would try to copy petra and use it as base of own ai, one
would not be able to run both ais at the same time and had to fix that
global constant anyway.

Differential revision: D4301
Reviewed by: @Freagarach
This was SVN commit r25957.
2021-10-10 19:02:21 +00:00
Freagarach 0c1297de3a Add two missing hotkeys to the intro.txt.
Also change the text a bit and add the formation selection feature to
the tips.

Refs. afd1eaee0d and a70a20fd42.

Differential revision: https://code.wildfiregames.com/D4284
Reviewed by: @bb
This was SVN commit r25956.
2021-10-10 18:39:20 +00:00
Angen 76228f107c Fix mention of 'farm' instead of 'field' in tutorial
It was reported that the word farm in the Introductory Tutorial is
incorrect and it should be replaced with Field.
Game refers to them as 'Field' so change is correct.

Differential revision: D4299
Patch by: @Langbart
Fixes: #6345

This was SVN commit r25955.
2021-10-10 12:49:17 +00:00
Angen aba5369140 Fix missing sell buttons
Introduced by b12e282277.

Reported on forum:
https://wildfiregames.com/forum/topic/56568-petra-having-problems-with-fishing-on-maps-with-water-available/?do=findComment&comment=454690

Differential revision: D4298
This was SVN commit r25954.
2021-10-10 09:32:09 +00:00
bb acc780bcbb Add accelerations in unit movement.
This helps preventing arrow dodging.

Differential Revision: D3200
Reviewed By: Freagarach
Comments By: wraitii, vladislav, Palaxin, Stan
refs: #5106

This was SVN commit r25953.
2021-10-09 21:31:11 +00:00
bb 4640a1fd36 Use only the Diplomacy Color of non-defeated players
Patch By: LangBart
Differential Revision: D4288
This was SVN commit r25951.
2021-10-06 20:33:12 +00:00
Freagarach 56f5cb9e62 Use transform for changing a formation template.
As noted on the forums by @Ceres
(https://wildfiregames.com/forum/topic/44848-proposals-for-formations/?do=findComment&comment=453840)
formations change orientation when changing their template.
This uses the transform helper to change the template of the formation,
which apparently also fixes the rotation issue.

With the notion that a different design of transform is preferential
(P46).

Differential revision: https://code.wildfiregames.com/D4272
Comments by: @Angen, @bb, @Ceres, @wraitii
Tested by: @Ceres
This was SVN commit r25949.
2021-10-03 06:26:28 +00:00
Freagarach 7670a1835b Fix (de)selection functions.
Deselecting a part of a formation didn't deselect the whole formation,
since the logic was done quite weirdly.
This clarifies and fixes that.

Reported by: @Langbart on D4282.
Differential revision: https://code.wildfiregames.com/D4285
Comments by: @Angen, @Langbart
Tested by: @Langbart
This was SVN commit r25948.
2021-10-03 06:09:01 +00:00
Freagarach 65cd29696d Don't stop gathering after starting by autocontinue when in a formation.
FinishOrder called SetWaitingOnController, although the order
(constructing) had pushed another order (gather).
This is done now by telling we finished the order only when really idle.

This seems to boil down to the question: If we issued an order to a
formation, and its members have wandered off (imagine attacking an
entity and our members have finished the initial target but attack
nearby ones) do we want the whole formation to continue attacking or
execute the next order.

Also fixes reforming whilst attacking when an attack order was issued by
the player.

Reported by: @Langbart at https://code.wildfiregames.com/D2175#182343
Differential revision: https://code.wildfiregames.com/D4282
Tested by: @Langbart
This was SVN commit r25947.
2021-10-03 05:59:54 +00:00
Freagarach 9f556c8b5a Check for visibility on finding treasures in UnitAI.
Fixes an infinite loop when the next treasure is outside LOS.

Differential revision: https://code.wildfiregames.com/D4286
Comments by: @Angen, @bb
Fixes: #6329

This was SVN commit r25946.
2021-10-03 05:43:56 +00:00
Freagarach 4597cecd50 Rename misnamed lastGatheredType in ResourceGatherer.
Since it stores not the last gathered, but the last tasked type.
As discussed on IRC
(http://irclogs.wildfiregames.com/%230ad-dev/2021-09-16-QuakeNet-%230ad-dev.log).

Differential revision: https://code.wildfiregames.com/D4277
Reviewed by: @bb
Comments by: @Angen, @Stan, @wraitii
This was SVN commit r25942.
2021-09-24 06:33:53 +00:00
Freagarach be8a2258ed Fix negative number of gatherers upon ownership changes.
Differential revision: https://code.wildfiregames.com/D4274
Reviewed by: @bb
Comments by: @Langbart, @Stan, @wraitii
Fixes: #6328

This was SVN commit r25941.
2021-09-24 06:27:18 +00:00
Freagarach 0541aa04ff Let fish and fruit regenerate slightly.
This adds minor regeneration to fish (when not gathered) and fruit
(always) as a nice extra for casual players.
The values are chosen to be low, as to not affect competitive play much.

Patch by: @Nescio
Differential revision: https://code.wildfiregames.com/D3868
Comments by: @chrstgtr, @marder, @Stan, @wraitii
This was SVN commit r25940.
2021-09-24 06:22:09 +00:00
Freagarach a70a20fd42 Select formations as a whole by default.
One can override this behaviour by using a hotkey when (de)selecting
entities.
The aim of this system is to reduce micromanagement a bit.

Differential revision: https://code.wildfiregames.com/D2175
Comments by: @Angen, @azayrahmad, @Langbart, @marder, @Stan,
@submariner, @wowgetoffyourcellphone, @wraitii
Refs. #4545

This was SVN commit r25939.
2021-09-24 06:11:10 +00:00
s0600204 7382a4885b Use pkg-config more extensively in build
We now make use of `pkg-config` on Linux, BSD, and macOS systems to find
the headers and libs for the following dependencies, where we weren't
previously:

* `enet`
* `fmt` (on macOS only)
* `gloox`'s dependencies on macOS:
    * `gnutls`
    * `gmp`
    * `nettle`
* `libcurl`
* `libogg`
* `libsodium`
* `miniupnpc` (on macOS only)
* `openAL`
* `openGL`
* `vorbis`
* `zlib`

Please see revision (https://code.wildfiregames.com/D3611) for details.

NOTE: All those building on macOS will need to rebuild their libraries
(`build-osx-libs.sh --force-rebuild`)


Tested by: Langbart (macOS), Freagarach (Ubuntu 18.04), Jenkins CI
(Debian Buster)
Comments by: Stan, wraitii, Freagarach
Differential Revision: https://code.wildfiregames.com/D3611
This was SVN commit r25938.
2021-09-23 16:10:25 +00:00
vladislavbelov 0e599a3176 Moves cursor to VideoMode to draw it via SDL.
It removes the software implementation intentionally. Because it
duplicates SDL functionality. But it might be added in future on demand.

Tested By: bb, Langbart
Differential Revision: https://code.wildfiregames.com/D4278
This was SVN commit r25936.
2021-09-21 22:44:46 +00:00
Freagarach b4f0464591 Fix some typos in the hotkey specs.
Fixes the concern raised at 09ad8bfbe5.

Differential revision: https://code.wildfiregames.com/D4268
Reviewed by: @bb
This was SVN commit r25935.
2021-09-21 05:44:07 +00:00
s0600204 31b70309b3 Debundle Valgrind and make it optional
If a *nix user wishes to build `pyrogenesis` with support for Valgrind
(such as
it is), then can do so by passing `--with-valgrind` to
`update-workspaces.sh`.
(They will need Valgrind installed and locateable via `pkg-config`.)


Reviewed By: sera, Stan
Fixes: #2904
Differential Revision: https://code.wildfiregames.com/D3646
This was SVN commit r25933.
2021-09-20 22:18:28 +00:00
vladislavbelov ce08f57f51 Removes ogl_tex_find function, which duplicates cache-like logic in TextureManager.
This was SVN commit r25932.
2021-09-20 16:39:51 +00:00
vladislavbelov 3e198f1463 Removes duplication of terrain alpha map creation in Renderer.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4269
This was SVN commit r25931.
2021-09-20 12:55:39 +00:00
bb b27f9901cc Add tooltip to playerFilter in lobby
Missed in 8459160038

This was SVN commit r25929.
2021-09-19 12:40:37 +00:00
wraitii b12e282277 Fix black buttons as observer on a GAIA market.
Reported by: langbart
Reviewed By: bb
Fixes #6219

Differential Revision: https://code.wildfiregames.com/D4164
This was SVN commit r25927.
2021-09-17 17:01:50 +00:00
wraitii dfeb29b82c Fix duplicate insertion error when detecting incompatible mods.
Since f1acd22455, mods are checked for compatibility. However, they can
incorrectly be checked & added to inompatible mods several time, leading
to a potential crash.

The new code can also be simplified slightly.

Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D4276
This was SVN commit r25926.
2021-09-17 16:59:03 +00:00
bb ca4ee134fc Add tooltip to modmod explaining about loading order
Patch By: Ceres
Reviewed By: marder
Comments By: Stan
Differential Revision: D4252
This was SVN commit r25925.
2021-09-17 14:41:09 +00:00
Freagarach d59bb01a3c [PetraAI] - Disable some useless techs.
Don't try to research some techs which are useless when we have no ally.
Ideally we don't put these techs in the config as well, but check the
usefulness and/or dependencies.

Differential revision: https://code.wildfiregames.com/D4218
Reviewed by: @Angen
Comments by: @Stan
This was SVN commit r25923.
2021-09-15 16:10:40 +00:00
Freagarach 21be3944f4 Increase the spacing in the top panel and synchronize the colour in the tooltip for gatherers.
With the addition of the new resource icons for stone and metal, the
text was too close to the icon so the distance between the text and the
icon is increased.
Also, synchronises the colour of the number of gatherers in the top
panel with the colour in the tooltip explanation.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4032
Comments by: @Stan, @wraitii
This was SVN commit r25922.
2021-09-15 06:27:11 +00:00
Angen 2d1ed7ecd5 [AI] Remove code duplication from map component
Differential revision: D4235
This was SVN commit r25921.
2021-09-13 18:07:14 +00:00
Stan 64c53753de Improve desert_small's texture look using the new textures. Rename them to match the conventions
Fixes #6324

This was SVN commit r25918.
2021-09-12 22:38:32 +00:00
Freagarach 645e053fd2 Remove executable bit on some source files.
Reported by: Ralph Sennhauser
Fixes: #6325

This was SVN commit r25917.
2021-09-12 18:41:51 +00:00
Angen 2c87f6110e Fix translation of "%(unit)s can't be controlled'
Message is translated correctly.
Issue was sprintf replaced %(unit)s before message was going to be
translated so string was never found in dictionary.
Introduced in b97d251322

Differential revision: D4254
Patch by: @Ceres
Based on code by: @nwtour
Reviewer: @Angen

This was SVN commit r25916.
2021-09-11 09:23:56 +00:00
Angen 666097f96c Fix typo in validatemods introduced in 71121b8a89
Correct form is 'required' not 'require' causing to skip the check.

Differential revison: D4255
Patch by: @Langbart
This was SVN commit r25915.
2021-09-11 09:17:24 +00:00
Freagarach f2f412a6d2 Fix attacking miraged entities.
After 738b200dda, where the mirage should be queried in the
Start/StopAttacking functions.

Reported by: @bb
Differential revision: https://code.wildfiregames.com/D4267
Reviewed by: @bb
This was SVN commit r25914.
2021-09-11 04:47:25 +00:00
Freagarach e56d46548b Fix renaming fields losing the ability to be gathered.
Introduced in c888844b3a.
The problem was trying to set the amount to Infinity by substracting
Infinity from it.

Differential revision: https://code.wildfiregames.com/D4263
Tested by: @Langbart
Fixes: #6317

This was SVN commit r25912.
2021-09-10 06:22:43 +00:00
Freagarach e9f1b0799a Two fixes in PetraAI after the basesManager introduction.
Introduced in 4e664dd712.
The basesManager assumed at least one base (as was the case earlier).
`this` was used in a passed function, which therefore was undefined.

Differential revision: https://code.wildfiregames.com/D4253
Tested by: @marder
Comments by: @Langbart, @Stan
This was SVN commit r25911.
2021-09-10 06:19:45 +00:00
Freagarach 84aa4f8aeb More generalised testing in the PositionHelper.js.
Noted by: @vladislavbelov on D2940
Differential revision: https://code.wildfiregames.com/D3060
Reviewed by: @bb
This was SVN commit r25910.
2021-09-10 06:13:38 +00:00
Stan b6012ec606 Fix false positive; undefined variable in NetworkClient.cpp
refs #6321 for further cleanups.
Discussed with: @wraitii
Differential Revision: https://code.wildfiregames.com/D4258
This was SVN commit r25908.
2021-09-09 18:00:17 +00:00
Stan 6272ba2344 Remove Custom implementation of wrename on windows. 52baaa4bbd removed the other occurences.
Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D4225
This was SVN commit r25907.
2021-09-09 17:53:17 +00:00
Stan d599a86b3e Disable the false positive "mod by 0" warning on Windows.
Differential Revision: https://code.wildfiregames.com/D4259
This was SVN commit r25906.
2021-09-09 17:49:07 +00:00
vladislavbelov 96708cc6a5 Adds header for forward declarations of CStr.
This was SVN commit r25905.
2021-09-09 17:39:08 +00:00
vladislavbelov a5c82a4ef6 Removes unused forward declarations of class and struct.
This was SVN commit r25903.
2021-09-08 19:43:01 +00:00
Freagarach 9552a9720c Add pushFront logic to the entity collection of the AI.
Not done in afd1eaee0d.
Also remove references to `queued` and `pushFront` in the `setStance`
functions, since they (currently) have no meaning.

Reported by: @bb
Differential revision: https://code.wildfiregames.com/D4261
Reviewed by: @bb
This was SVN commit r25902.
2021-09-08 06:05:22 +00:00
vladislavbelov b90066a69b Moves macro-defined methods of CStr to templates.
Differential Revision: https://code.wildfiregames.com/D4251
This was SVN commit r25900.
2021-09-07 21:01:34 +00:00
Freagarach 2fc07741e3 Fix two inaccuracies in the tutorial text.
Grapes -> berries. ae5ef6d898
South-West lake -> South.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4257
Reviewed by: @marder
Fixes: #6314

This was SVN commit r25899.
2021-09-07 14:49:53 +00:00
Stan 3fdbe3e8dc Make translation pulling parallel to reduce update time.
This was SVN commit r25897.
2021-09-05 17:39:51 +00:00
bb 480228f964 Add quadratic scaling function in rmgen library and use it for decorations.
Patch By: FeldeFeld
Reviewed By: Stan, smiley
Differential Revision: D4212
This was SVN commit r25894.
2021-09-04 09:48:06 +00:00
Freagarach bd24a30567 Move camera to holder when moving to grouped units.
Instead of doing nothing.

Differential revision: https://code.wildfiregames.com/D4242
Reviewed by: @bb
Fixes: #5863
Comment by: @Langbart
This was SVN commit r25893.
2021-09-04 05:25:42 +00:00
vladislavbelov e62dac7ad4 Removes unused macro from CStr, reduces macro dependency.
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D4245
This was SVN commit r25891.
2021-09-03 21:06:22 +00:00
vladislavbelov 3b417062bb Reduces the number of possible allocations for models with multiple UV sets during loading.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4247
This was SVN commit r25890.
2021-09-03 20:11:52 +00:00
Angen 18d9cadf7d Update map size in description panel
Since dc18d94030
Fixes: #6312

This was SVN commit r25889.
2021-09-03 18:31:31 +00:00
Freagarach 7f59f46988 Remove redundant z-value from MiniMap.xml.
Introduced in 6b903e4a92.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4248
This was SVN commit r25888.
2021-09-03 17:07:31 +00:00
vladislavbelov eaddc92816 Removes unused g_GameRestarted forgotten in 7ce4552f5e.
This was SVN commit r25885.
2021-09-01 19:48:09 +00:00
vladislavbelov 55f9d78e7e Moves tex tests to the related folder, was forgotten to move in 63086f4e26.
This was SVN commit r25884.
2021-09-01 19:27:34 +00:00
Angen ba7bde9f31 Remove passability magic numbers from terrain-analysis
Put passability values to prototype variables.
Code looks more readable.

Differential revision: D4236
Refs: #6256
Comments by: @Freagarach, @Stan
This was SVN commit r25883.
2021-09-01 16:30:31 +00:00
Freagarach 6b903e4a92 Display the number of idle workers in that respective button.
Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4217
This was SVN commit r25882.
2021-09-01 16:28:28 +00:00
Angen 0c2c071aac Fix mod calling function from public
public mod does not have to be activated, moving compatibilityColor to
mod

Differential revision: D4237
Refs: #6294
Comments by: @bb
This was SVN commit r25881.
2021-09-01 16:24:12 +00:00
Angen 9b865f9b02 Update message for not supported commands
Tell user about help command, when requested command is not supported

Differential revision: D4229
Reviewed by: @Langbart, @Freagarach
Comments by: @bb
This was SVN commit r25880.
2021-08-30 18:35:56 +00:00
Freagarach 500ee2cf19 Actually implement the hotkey for the Call to Arms feature.
Refs. 4b1270f841.

Differential revision: https://code.wildfiregames.com/D4243
Reviewed by: @JCWasmx86
This was SVN commit r25879.
2021-08-30 14:58:28 +00:00
bb 380df3cf73 Enlarge "Watch Replay" button in summary screen for long translations
Patch By: Langbart
Reviewed By: marder
Differential Revision: D4168
refs #6024

This was SVN commit r25877.
2021-08-29 20:38:10 +00:00
Freagarach 4e664dd712 [PetraAI] - Manage bases in a separate BasesManager.
The HQ should only care about high-level stuff, hence something like
managing/looping individual bases is now done in a `BasesManager`,
similar to the `AttackManager`.

Differential revision: https://code.wildfiregames.com/D4192
Comments by: @Angen
Fixes: #6185

This was SVN commit r25876.
2021-08-29 06:47:05 +00:00
Freagarach 2c4427b488 A bit more refactoring in the ProductionQueue's item logic.
Remove some duplication.
Split tech and entity data.

Differential revision: https://code.wildfiregames.com/D4227
This was SVN commit r25875.
2021-08-29 05:38:23 +00:00
bb 8459160038 Lobby player search input
Based on patch By: ffffffff
Comments By: vladislavbelov
Reviewed By: Angen
Differential Revision: D285
This was SVN commit r25873.
2021-08-28 10:55:39 +00:00
bb 5b41b982f9 Give all tabs hotkeyTooltips
Removes the manual hotkey tooltips from summary and gamesetup in favor
of the general one.

Based on patch By: ffffffff
Reviewed By: Freagarach
Comments By: elexis, Stan
Differential Revision: D1264
This was SVN commit r25872.
2021-08-28 10:36:14 +00:00
bb 080cae147e Remove generated test files, stub_impl_hack on cleanup
At some point make clean should take care of this.

Proposed By: elexis in D256
Approach suggested by: leper
Reviewed By: Freagarach
Differential Revision: D4219
This was SVN commit r25871.
2021-08-28 10:21:03 +00:00
bb 7180e72d52 Reset the dust color at red sea and egypt 3v3 maps
Reported By: elexis
Reviewed By: Stan
Differential Revision: D4228
This was SVN commit r25870.
2021-08-28 10:16:20 +00:00
Freagarach dd90dbf8b5 Allow to enable Cartography at the start of a match.
Adds a checkbox to the game setup to allow players to have Cartography
autoresearched from the start of the match.
Refs.
https://wildfiregames.com/forum/topic/27265-theres-any-mod-so-you-can-see-what-your-allies-see-from-the-start.

Patch by: @Jammyjamjamman
Differential revision: https://code.wildfiregames.com/D4191
Reviewed by: @Angen
Comments by: @andy5995, @Langbart
This was SVN commit r25869.
2021-08-28 06:15:36 +00:00
Freagarach 4b1270f841 Implement "Call to the Arms"-button.
This allows a player to task entities to drop off their resources and
subsequently attack-move to a specified location with one button.

Patch by: @JCWasmx86
Icon by: @Stan
Differential revision: https://code.wildfiregames.com/D4149
Fixes: #1364
Comments by: @Langbart
Based on a patch by: @Freagarach (https://code.wildfiregames.com/D1868)
This was SVN commit r25868.
2021-08-28 05:52:37 +00:00
Angen 81ad9f746b Do not require restart when chaning Background pause option
Background pause does require a game restart to take effect.
Adding function to update it on runtime since only place where it is
used is in main.cpp.

Differential revision: D4181
Fixes: #6236
Tested by: @Langbart
This was SVN commit r25866.
2021-08-27 18:54:20 +00:00
Angen 9ff8b0758c [scripts]Update translation checks to check pluralised strings
Currently script checks only singular translations
Add branch to check plural strings as well

Differential revision: D4199
Refs: #4250
Comments by: @Stan
This was SVN commit r25865.
2021-08-27 18:48:41 +00:00
Angen 0eb9bc0762 [PetraAI] inline in DefenseManager
Differential revision: D4200
Reviewed by: @Freagarach
This was SVN commit r25864.
2021-08-27 18:43:50 +00:00
Angen f95835308a Fix wrong number in tooltip for phase requirements
Introduced in 29ab4b5af3
Reported
https://wildfiregames.com/forum/topic/41264-alpha-25-pre-releaserelease-candidate-build-testing/page/13/?tab=comments#comment-444019

Differential revision: D4202
Reviewed by: @Freagarach, @asterix
This was SVN commit r25863.
2021-08-27 18:40:47 +00:00
Angen 701ecb095e [AI] Simplify getMetadata in sharedscript
Metadata are stored in an object {} making check for key in the object
irrelevant, since not existing key will result in returning undefined
value.
On top of that, merging metadata existance if condition into returning
statement.

Differential revision: D4195
Reviewed by: @Freagarach
This was SVN commit r25862.
2021-08-27 18:35:20 +00:00
Stan 4a9bac2811 Bump version to alpha 26.
Last alpha 25 commit was [[SVN:25860]]

Accepted by: @Freagarach, @asterix
Comments by: @wraitii
Differential Revision: https://code.wildfiregames.com/D4215
This was SVN commit r25861.
2021-08-27 16:32:34 +00:00
Stan af4896b4c5 Set matchID at the start of a new match. Fix ratings being broken.
Refs: dc18d94030

Patch by: @user1
Discussed with: @bb
Reviewed by: @wraitii
This was SVN commit r25859.
2021-08-25 11:05:53 +00:00
Stan 84c2dc3f15 Add seagulls on top of fish to make them easier to spot.
This was SVN commit r25857.
2021-08-22 17:11:55 +00:00
Stan 54b832b6a6 Make big grass 25% smaller to improve visibility a bit on some maps. Ideally Random maps like wildlake would not put some next to the CCs.
This was SVN commit r25856.
2021-08-22 17:10:56 +00:00
Stan 26bfd92dbd Fix nopch build. broken in 52baaa4bbd.
This was SVN commit r25855.
2021-08-22 13:20:41 +00:00
Angen 52baaa4bbd Fix updating existing mods
Replace wrename, that fails when mod exists already with RenameFile by
@Stan
Check if mod was actually installed when downloading it
error if mod cannot be coppied into modTemp

Differential revision: D4222
This was SVN commit r25854.
2021-08-22 11:35:34 +00:00
Angen 83bb6f3ed5 Fix downloanded mods not showing in list until restart
since 498f0d420b
While at it, remove not used variable after 6400a4a0c5
also fix non visual replay broken in 6400a4a0c5

Differential revision: D4220
Tested by: @Stan, @Langbart
Fixes: #6288

This was SVN commit r25853.
2021-08-22 09:54:16 +00:00
Freagarach 2cf908a974 Fix game setup lobby player stats stanza.
Patch by: @nani
Differential revision: https://code.wildfiregames.com/D4213
Reviewed by: @Angen
This was SVN commit r25851.
2021-08-19 17:01:19 +00:00
Angen 6400a4a0c5 Update Available mods when installing them
Differential revision: D4211
Since 498f0d420b available mods where cached and not updated when new
where installed.
Fixing above.

This was SVN commit r25850.
2021-08-17 17:32:10 +00:00
Angen 8f5b5670ff Fix gui objects failing on undefined in modmod
Differential revision: D4209
Since some revision wraitii will probbaly know, I am not going to look
for it, guiobjects require exact data type so casting does not work when
it is not done beforehand.
Error reported by Stan.
Now installing pyromod should not trigger errors.

This was SVN commit r25849.
2021-08-17 17:29:54 +00:00
Freagarach 32f3d18a15 Fix walk and fight with formations.
Introduced in c87229aa48, FindWalkAndFightTargets returns after the
first UnitAI finds a target, instead of also querying the rest of the
members.

Differential revision: https://code.wildfiregames.com/D4208
Comments by: @Stan, @wraitii
Fixes: #6260

This was SVN commit r25847.
2021-08-03 16:43:43 +00:00
Freagarach c48d0c562f Fix fromations gathering treasures.
Introduced in ea96e81098.
The formation ignored the order to collect a treasure, but got into a
individual state (which should not happen).
Subsequent orders may fail due to unimplemented components/functions.

Reported by: @wowgetoffyourcellphone in
https://wildfiregames.com/forum/topic/39973-a25-feedbacks-from-testing/page/15/?tab=comments#comment-444979.

Differential revision: https://code.wildfiregames.com/D4207
Tested by: @wowgetoffyourcellphone
Comments by: @Stan, @wraitii
Fixes: #6266

This was SVN commit r25846.
2021-08-03 16:42:56 +00:00
Angen 8b0d82be33 Reject FormationWalk if entity is not part of formation anymore
Attack orders can be and looks like are pushed in front of formationwalk
order.
That is generally also logic in single entity behaviour.

In case formation gets destroyed and then target dies, attacker is
supposed to stop attacking target immediately.
That essentially leads to getting to old formationwalk command, what was
not issue for packable units until 674cdae166, that introduced
formationcompoennt into the order.

Hovewer abandoning this order without being in formation makes more
sense. Probably this one and FormationLeave should be FORMATIONMEMBER
specific commands and error out in INDIVIDUAL state, but thats too much
refactoring and potential rabbit hole.

Differential revision: D4206
Reviewed by: @wraitii
Accepted by: @asterix
Fixes: #6263

This was SVN commit r25845.
2021-08-02 16:48:00 +00:00
wraitii 0ba9cbef74 Fix units changing appearance when switching animation.
Bug introduced in 76acc4e146.
The previous CUnit code had logic to select random aesthetic variants
once initially. The new code removed that, as I completely missed its
purpose, assuming that the random selection, being based on a seed,
would pick the same variants every time. This is incorrect because
entity selections can change the RNG calls, thus the variants, and thus
entity appearance can change when the animation changes (typically, a
horse will change color when walking and running).

The solution is to re-introduce the choice of actor selections on CUnit
creation. This makes sure that units don't change their purely-aesthetic
selections when e.g. animations change.

Reported by: Wowgetoffyourcellphone
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4205
This was SVN commit r25844.
2021-07-31 17:55:10 +00:00
wraitii 12aa35eb3b Fix loading grayscale heightmaps for RM maps.
d2948937a0 introduced code to read Heightmap images into RM terrain
data. However, the original diff contained a bug where it read
Out-of-bounds array data for grayscale images. This bug was hidden by
another issue until D1816 / cbc04ba83b, which changed the code and made
the OOB read actually relevant. The effect was twofold:
- The height chosen was not the max of the 3 color channels, but the max
of the 3 neighboring pixel (thus slightly lowering the quality of
generated maps)
- The height for the bottom-right coordinates were random memory values,
thus garbage.

This random height ended up resulting in non-deterministic map
generation, which was reported on Ngorongoro.

The cause of this silent failure is that the transformation to BGRA is
not applied for grayscale images, as the alpha transformation is
processed first and exits. This is not per-se buggy, so it is not
changed here.
The fixed behaviour is specialized for the common grayscale case, and
retains the max-of-3-color-channel intended behaviour otherwise.

Fixes #6261.

Reported by: Feldfeld
Differential Revision: https://code.wildfiregames.com/D4203
This was SVN commit r25843.
2021-07-31 17:52:05 +00:00
Angen ae744f13f3 Prevent formation members to run when they should not
Reported on forum:
https://wildfiregames.com/forum/topic/41264-alpha-25-pre-releaserelease-candidate-build-testing/page/13/
Introduced in: 40cbde1925
Differential revision: D4201
Tested by: @Freagarach, @marder
This was SVN commit r25841.
2021-07-27 18:20:26 +00:00
Stan cba3528c48 Update translation credits.
- Restore original language names, and keep an English fallback in case
the font is missing for some languages.
Fixes: #6023
Fixes: #6255

This was SVN commit r25839.
2021-07-26 16:40:16 +00:00
Freagarach d3e1184191 Check range extra while gathering to prevent animation changes when gathering from dropsite.
Introduced in 3c4a341906.

Reported by: @wowgetoffyourcellphone
Differential revision: https://code.wildfiregames.com/D4198
This was SVN commit r25837.
2021-07-25 18:14:39 +00:00
Freagarach 5fba65e97d Don't lose trade gain when ordering a trader.
Introduced in 8f04d2ee90 due to overeagerly stopping trade when leaving
the trading-state.
Noticed in:
https://wildfiregames.com/forum/topic/41264-alpha-25-pre-releaserelease-candidate-build-testing/page/9/?tab=comments#comment-437888.

Differential revision: https://code.wildfiregames.com/D4197
Comment by: @Stan
This was SVN commit r25835.
2021-07-23 05:24:41 +00:00
Stan c7a6d49fc8 Translate map name in game setup
Patch by: @s0600204
Tested by: @Langbart
Differential Revision: https://code.wildfiregames.com/D4188
Fixes: #6241

This was SVN commit r25833.
2021-07-20 22:08:36 +00:00
Stan 2bda444435 Fix foundation and corpses phenotypes being different than the source entity.
Reported by: @wowgetoffyourcellphone
This was SVN commit r25832.
2021-07-20 22:04:19 +00:00
Stan c6a9e7188e Fix actor being different after foundation has been built.
Reported by: @wowgetoffyourcellphone
Introduced in: 5b3bdf3647

This was SVN commit r25831.
2021-07-20 21:51:29 +00:00
Stan 72a20be1df Fix rare crash on Linux when opening dropdowns.
Patch by: @wraitii
Accepted by: @Angen
Fixes #5598
Fixes #6225

Differential Revision: https://code.wildfiregames.com/D4183
This was SVN commit r25830.
2021-07-20 20:59:45 +00:00
Stan 5eec8039b4 Fix segfault with daytime option in gamesetup.
Based on patch by: @Angen, @wraitii
Fixes #6238
Differential Revision: https://code.wildfiregames.com/D4182
This was SVN commit r25829.
2021-07-20 20:52:25 +00:00
Freagarach b06dd26dd7 Fix PetraAI constructing ships as ordinary units.
Since 3d7af82328 PetraAI constructed many ships (and cavalry) because
they have the "Ranged" class and we didn't check for "Infantry" anymore
when training workers.

Basically a patch by: @Angen
Differential revision: https://code.wildfiregames.com/D4193
Reviewed by: @Angen
Refs. #6250 by fixing the ships case.
Fixes the concern on 3d7af82328.

This was SVN commit r25828.
2021-07-20 05:18:50 +00:00
Freagarach fe6ce8d402 (Partly) Fix PetraAI building a lot of siege and not using it.
Following 3d7af82328.
The used classes for adding siege were wrong.

Reported in
https://wildfiregames.com/forum/topic/45178-a25-svn-version-25810-not-playable/.
Differential revision: https://code.wildfiregames.com/D4184
Refs. #6250 by (partly) fixing the siege case.
Reviewed by: @Angen
This was SVN commit r25826.
2021-07-18 05:05:13 +00:00
Angen f891ed4e53 Fix treasure in statistics
Introduced in ea96e81098.
Wrong entity is passed when getting statistic tracker, so collected
treasure is not updated correctly in statistics.
Reported on forum:
https://wildfiregames.com/forum/topic/47585-a25-svn-treasures-collected-not-registering-under-resources-summary-playing-atlas-mountains/?tab=comments#comment-441383

This was SVN commit r25824.
2021-07-13 16:46:32 +00:00
Freagarach 68e40575a4 Disable autoqueue when changing ownership.
PetraAI can't cope with that and it may be a suprise for other players
as well, when a captures production entity has autoqueue enabled.

Differential revision: https://code.wildfiregames.com/D4185
Refs: #6213

This was SVN commit r25819.
2021-07-05 06:18:26 +00:00
Stan 4c2d060d73 Move wild lake biome specific entities to a json file like hellas.
Fix map not generating with nubia and steppe biomes (Missing farmsteads
and mercenaries)
Fix an oak being placed no matter the biome and use a biome tree instead
Use the goat instead of a sheep for the alpine biome.

Refs: 4de9c4c164, #6180

This was SVN commit r25816.
2021-06-29 16:48:57 +00:00
Stan dddaa67abd Fix unicode build for Atlas on OpenSuse.
Based on a patch by: @MatSharrow
Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D4178
This was SVN commit r25815.
2021-06-29 12:41:31 +00:00
Freagarach 7871d74521 Give picking up treasures back its sound.
Introduced in ea96e81098.

Reported by: Gurken Khan in
https://wildfiregames.com/forum/topic/41264-alpha-25-pre-releaserelease-candidate-build-testing/?do=findComment&comment=437100.
Differential revision: https://code.wildfiregames.com/D4180
Tested by: @Langbart
Fixes: #6237

This was SVN commit r25814.
2021-06-29 09:04:24 +00:00
Freagarach 42c3fc12cf Don't show turreted entities as idle.
Introduced in: 21e866fcf0

Reported by: @Palaiologos
Differential revision: https://code.wildfiregames.com/D4179
Tested by: @Langbart
Comments by: @Angen, @wraitii
Fixes: #6233

This was SVN commit r25813.
2021-06-29 08:51:21 +00:00
wraitii 79fb6e6ab2 Fix incorrect comment/default parameter introduced in e1a0cabf5a
Reported by: Freagarach
Differential Revision: https://code.wildfiregames.com/D4176
This was SVN commit r25811.
2021-06-26 09:09:04 +00:00
wraitii a541f3a317 Fix hotloading making models disappear.
The actors were always hotloaded because of a bad logic change in
76acc4e146.

Fixes #6228

Differential Revision: https://code.wildfiregames.com/D4175
This was SVN commit r25805.
2021-06-17 07:52:50 +00:00
Freagarach 8c7d77a610 Fix serialisation crash when patrolling.
6778fc4ea6 introduced waiting at the patrol points, but it was possible
that at such a point an enemy was noticed, thus quiting the "look
around" state, deleting `this.stopSurveying`, which was later `++`-ed.
That lead to an `NaN` property which got serialised. `NaN` serialisation
crashes as of 0e7fafebe1.

Differential revision: https://code.wildfiregames.com/D4177
Reported in:
https://wildfiregames.com/forum/topic/41264-alpha-25-pre-releaserelease-candidate-build-testing/page/4/?tab=comments#comment-435709
Reviewed by: @wraitii
This was SVN commit r25804.
2021-06-17 07:40:24 +00:00
wraitii 17c54d5a69 Fix options occasionally thinking they've been modified when they haven't.
std::array leave the values in an undefined state which can very well be
'true'.

Tested By: Freagarach
Fixes #6205

Differential Revision: https://code.wildfiregames.com/D4170
This was SVN commit r25802.
2021-06-16 15:54:55 +00:00
wraitii d8f0bde05e Reset the campaigns previews
I had used a debug image which I left in and which looks broken.
Removing it defaults to the normal 'missing preview' 0 A.D. image which
looks more correct.

Differential Revision: https://code.wildfiregames.com/D4172
This was SVN commit r25801.
2021-06-16 15:53:19 +00:00
wraitii 8e26bd0446 Fix bug with map-dependent random settings
Settings like Landscape, Daytime & team placement are map dependent. If
"random" map is chosen, we first must select the map before selecting
these.
This wasn't done correctly and so starting "random" map that picked e.g.
Unknown could fail.

Biomes were already correctly handled.

Reported by: langbart
Fixes #6227

Differential Revision: https://code.wildfiregames.com/D4173
This was SVN commit r25800.
2021-06-16 15:52:19 +00:00
wraitii eafa7fc005 Mirage unrepairable in cmpRepairable.
e0800bc092 introduced a `repairable` toggle, but did not mirage that
function, meaning one could not repair an allied miraged structure.

Reported by: Langbart
Patch by: Freagarach
Refs #6226

Differential Revision: https://code.wildfiregames.com/D4171
This was SVN commit r25799.
2021-06-15 08:46:14 +00:00
Itms 6f49e7bd6b New key for signing A25-compatible mods.
This was SVN commit r25798.
2021-06-14 19:42:00 +00:00
Freagarach fde057dd1c Provide Magadha description.
Text by: @wowgetoffyourcellphone
Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4169
Comment by: @marder
Fixes: #6222

This was SVN commit r25796.
2021-06-14 06:15:28 +00:00
vladislavbelov 6b493aa52c Fixes big screenshots, implements CCamera::GetViewQuad properly for custom projections.
Differential Revision: https://code.wildfiregames.com/D4165
This was SVN commit r25794.
2021-06-13 17:42:37 +00:00
wraitii 08400276e1 Slight size increase for the parchment background of loading screen tips.
Prevents overflow in some translations, and aligns it better with the
tip image.

Patch by: Langbart
Fixes #4754

Differential Revision: https://code.wildfiregames.com/D4167
This was SVN commit r25793.
2021-06-13 15:12:14 +00:00
wraitii 893ea3cd10 Alpha 25 Name: Yaunā
This is the old Persian variant of Ionian.

Differential Revision: https://code.wildfiregames.com/D4130
This was SVN commit r25792.
2021-06-13 15:08:27 +00:00
wraitii 467f2140be Fixup 21bbeb4bbc
I momentarily forgot that `arc patch` only pretends it works with binary
files on SVN.

This was SVN commit r25791.
2021-06-13 15:07:03 +00:00
wraitii 7ca15b42fd Add a tip about the default formation feature.
Differential Revision: https://code.wildfiregames.com/D4166
This was SVN commit r25790.
2021-06-13 15:02:54 +00:00
wraitii 21bbeb4bbc Update some MR map previews.
Updates the map previews of all the Best for MP maps & Empire

This removes the fancy mainland biome switch because it was the only map
to do that and we lack the tools to automate it.

Differential Revision: https://code.wildfiregames.com/D4159
This was SVN commit r25789.
2021-06-13 14:56:16 +00:00
wraitii b4b7a1fc3a Fix issues with Introductory Tutorial
- Actually win at the end, thus advancing the campaign
- Count rams properly
- Show the ready button for the city-phase when cheating.

Reported by: langbart
Fixes #6188

Differential Revision: https://code.wildfiregames.com/D4161
This was SVN commit r25788.
2021-06-13 08:55:37 +00:00
wraitii 9ef19ad795 Remove African Plains from "best for Mp" maps
Too similar to either Nearestern Badlands or Mainland.
It seems better to remove it from the filter for this release.

Differential Revision: https://code.wildfiregames.com/D4160
This was SVN commit r25787.
2021-06-13 08:46:12 +00:00
wraitii f189172db6 UnitMotion hack to fix units being stuck near corners.
I think there is a small mismatch between CheckMovement & the vertex
pathfinder when computing passability because one is ray-based and the
other just uses edges. However, it's out of my reach to fix it for now.
This can lead to units being stuck near building edges occasionally.
This introduces an un-intrusive recovery strategy (aka a hack) in
HandleObstructedMove that should get the units unstuck.

Should fix #6114 (to a sufficient extent anyways)

Differential Revision: https://code.wildfiregames.com/D4162
This was SVN commit r25786.
2021-06-13 08:43:32 +00:00
wraitii caebc4d3f9 Update the splash screen.
Link to the forums instead of solely the known issues. We have an FAQ
button already, and there are fewer known issues than in the past.

Remove the bit about formations, which isn't really relevant anymore,
and instead add a request for contributions.

Differential Revision: https://code.wildfiregames.com/D4156
This was SVN commit r25785.
2021-06-13 08:40:26 +00:00
wraitii a5399d34b8 Floor turn rates to 4
The pathfinders are not aware about turn time, and pathing becomes quite
poor with such low turn rates, leading to units that take much longer to
move than they used to.

Until the pathfinders are updated, we should refrain from using very low
turn rates on actual units.

Refs #6142

Differential Revision: https://code.wildfiregames.com/D4163
This was SVN commit r25784.
2021-06-13 08:11:48 +00:00
Imarok dd779872c4 Small tweak of map flare characteristics
Refs #3491

Differential Revision: https://code.wildfiregames.com/D4099
This was SVN commit r25783.
2021-06-12 22:35:30 +00:00
wraitii bfc20bc847 Add a background to campaign load page
Differential Revision: https://code.wildfiregames.com/D4157
This was SVN commit r25781.
2021-06-12 17:20:01 +00:00
wraitii 7e423fe20e Only show the full template run name + template name if they're different.
The campaign screen currently shows both the name of the run (selected
by the user) and the name of the campaign. This is, by default, the
same, and thus looks weird.

Reported by: langbart, marder
Tested by: marder
Differential Revision: https://code.wildfiregames.com/D4158
This was SVN commit r25780.
2021-06-12 17:19:09 +00:00
wraitii 956b3f96db Improvement to autoqueue usability
The graphical interface will show autoqueued units as 'ghost' units so
the player gets immediate feedback on what's happening.
The autoqueue disengages if it runs out of resources or entity limits:
this reflects that the autoqueue cannot resume on its own.

By changing the spot where the autoqueue pushes items, the autoqueue no
longer 'buffers' one unit in advance, but remains very slightly less
efficient than manual queuing. This also prevents cheats from leading to
a ton of units accidentally being created.

Accepted By: Freagarach
Refs #6213

Differential Revision: https://code.wildfiregames.com/D4144
This was SVN commit r25779.
2021-06-12 09:43:57 +00:00
wraitii 42d6893eb8 Fix lobby dgame details panel with incompatible mods.
There was an issue in 07e44a75a1 that made the game details mostly red
with incompatible mods.
This fixes that: now only the 'Mods' title is red, and I added specific
text to highlight why it's colored that way.

Based on a patch by: Langbart
Differential Revision: https://code.wildfiregames.com/D4153
This was SVN commit r25778.
2021-06-12 08:57:34 +00:00
Freagarach 721cfa7ae6 Improve some options texts.
Differential revision: https://code.wildfiregames.com/D3741
Comments by: @Nescio, @wraitii
This was SVN commit r25777.
2021-06-12 05:56:23 +00:00
Freagarach f537fdd87d Look for resources nigh the order when forced.
When tasked to gather, entities looked for resources close to their
current location when the target was invalid (e.g. full).
Now on forced orders the entities will look for resources close to that
order's location, when possible.

Differential revision: https://code.wildfiregames.com/D4146
Fixes: #6085
Reviewed by: @Imarok
Tested by: @Langbart
Comments by: @marder, @Stan, @wraitii
This was SVN commit r25776.
2021-06-12 05:47:06 +00:00
Imarok b3458d408a Add a setting for the minimap flare lifetime.
Tested by: marder, Langbart
Differential Revision: https://code.wildfiregames.com/D4135
This was SVN commit r25775.
2021-06-11 20:47:09 +00:00
Imarok abe7211e15 Remove duplicated loading tip images
In 9b50e4475f I committed some duplicated images.
Noticed by: wowgetoffyourcellphone
This was SVN commit r25774.
2021-06-11 19:07:34 +00:00
Stan ded4859e6e Fix missing templates on wild_lake.js.
Broken in 8ee6774d12

Reported by: @Nobbi
This was SVN commit r25773.
2021-06-11 15:41:40 +00:00
wraitii e1a0cabf5a RM generation: improve metal mines generation
Introduces a new helper to place mines. use it on 'Best for MP' maps for
stone and metal.

The amount of metal will scale with the # of players, and will place
slightly more mines overall for fairer distribution.

This should make 1v1 and 4v4 more playable on these maps.

Differential Revision: https://code.wildfiregames.com/D4148
This was SVN commit r25772.
2021-06-11 15:14:40 +00:00
wraitii ffd62e08d8 Speed up Corinthian Isthmus / Lorraine Plain RM generation
Both maps were using extremely high smoothness setting, that did nothing
but lag extremely.

Differential Revision: https://code.wildfiregames.com/D4150
This was SVN commit r25770.
2021-06-11 06:38:16 +00:00
Imarok fa218b66bb Loading tips: Dynamically adjust the title height and fix the width
Tested by: Langbart
Differential Revision: https://code.wildfiregames.com/D4152
This was SVN commit r25768.
2021-06-10 19:59:23 +00:00
Imarok 9b50e4475f Brush up the loading tips
New loading screen tips. Update for the pictures and the text.

Patch by: marder
Reviewed by: Freagarach
Some based on work of: wowgetoffyourcellphone
Fix #6191

Differential Revision: https://code.wildfiregames.com/D4107
This was SVN commit r25767.
2021-06-10 17:25:18 +00:00
Stan 79e772152b Fix game not closing when compiled with --without-nvtt.
Fixes: #6107

Differential Revision: https://code.wildfiregames.com/D4138
This was SVN commit r25766.
2021-06-10 15:42:38 +00:00
wraitii 4de9c4c164 Fixes for some random maps.
- Hellas_biome isn't a RM but as a JSON script it does load, and then
silently fails on mapgen. Explicitly fail.
- Fix player.js when a valid position cannot exist.
- Fix unknown.js when landscape isn't set in the settings.

Reported by: vladislavbelov
Refs #6180

Differential Revision: https://code.wildfiregames.com/D4147
This was SVN commit r25765.
2021-06-10 13:16:10 +00:00
wraitii b84e268a1f Fix arctic biome with postrocessing and tweak for nubia and steppe
- Arctic biome was much too bright with postprocess (error in
717a9d0252)
- Change sun angle in Nubia to make the grass less yellow at default
camera angle
- Change sun angle in Steppe to make the game look less flat at default
camera angle.

Patch by: marder
Differential Revision: https://code.wildfiregames.com/D4145
This was SVN commit r25764.
2021-06-10 06:48:38 +00:00
wraitii 0b6486dc7a Fix 0 A.D. quitting 'too fast' when it gains focus after alt+F4
There appears to be an SDL issue with linux and X11 that causes Keydown
events to be sent immediately when 0 A.D. gains focus. This can loead to
Alt-F4 quitting 0 A.D. immediately upon focus gain, such as when another
application was quit via Alt-F4.

The typical bug case was:
- Open 0 A.D.
- Open another app
- Alt-F4 other app
- 0 A.D. immediately receives alt-F4 as well and exits.

Since SLD handles this hotkey natively via SDL_QUIT, it seems easier to
default to "no hotkey", as that fixes the problem.

Reported by: Imarok
Fixes #6092

Differential Revision: https://code.wildfiregames.com/D4132
This was SVN commit r25762.
2021-06-09 18:39:06 +00:00
Imarok 4ee03b544d Disable the flare button for observers.
Use the new button that Stan committed in b3ec0d48ba
Reviewed by: Freagarach
Differential Revision: https://code.wildfiregames.com/D4136
This was SVN commit r25761.
2021-06-09 16:34:53 +00:00
wraitii 270378414e Uncompress cached DDS in mouse event mask.
Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D4142
This was SVN commit r25759.
2021-06-09 13:50:57 +00:00
wraitii f620ed8750 Make grass greener in temperate biome
And slightly reduce the desaturation since it now looks better.

Patch by: marder
Differential Revision: https://code.wildfiregames.com/D4139
This was SVN commit r25758.
2021-06-09 08:55:44 +00:00
wraitii 717a9d0252 Further RM biome tweaks
- Make Savanna and Nubia have a .25 Forest probability.
- Remove brightness changes from HDR, this made postproc look too
different, particularly on Savanna
- Lower postproc impact on constrast/saturation for the same reasons.
- Lighten up Aegean, Alpine, Savanna, Nubia, slightly darken Arctic
- Make Aegean water a bit bluer. Likewise lightwen Savanna water.
- Fix the sun elevation/rotation on Nubia, Sahara and Savanna
- Remove the HDR settings of Cantabrian Highlands
- Remove the water/HDR settings of Corinthian Isthmus RM

Comments by: marder
Differential Revision: https://code.wildfiregames.com/D4124
This was SVN commit r25757.
2021-06-09 08:17:12 +00:00
wraitii 324b4bdf64 Small tweak to the Roman Army Camp balance
- Max garrison reduced to 20, like fortresses (caps the capture regen
rate)
- Can construct rams
- Cost an additional 100S/100M

The capture stats have been tweaked but there's no fundamental change.

See also D4080

Differential Revision: https://code.wildfiregames.com/D4109
This was SVN commit r25756.
2021-06-09 06:42:20 +00:00
wraitii a36e7d6986 Make elephant archers cost 2 population.
This is intended to make a deathball of elephant archer less OP, as the
units are difficult to mass but really strong once that is done.

See D3599 for larger changes.

This was SVN commit r25755.
2021-06-09 06:40:35 +00:00
wraitii 05ace86b76 Fix caledonian meadows.
Broke in 6cc6d8c156

Refs #6180

Differential Revision: https://code.wildfiregames.com/D4131
This was SVN commit r25754.
2021-06-09 06:35:17 +00:00
wraitii b8758c8941 Prevent ProductionQueue.AddItem for going over the entity limits / Fix autoqueue being able to train infinite heroes.
Autoqueue can ignore entity limits like Heroes, because AddItem does not
check for them, only commands.js. This changes that, fixing the
autoqueue.

Reported by: Player of 0AD
Tested by: langbart
Refs #6213

Differential Revision: https://code.wildfiregames.com/D4133
This was SVN commit r25753.
2021-06-09 06:33:52 +00:00
s0600204 184ed2fb55 Apply modifiers from civ/team bonus auras in Reference Suite
The Reference Suite (Structure Tree, Civ Info, Viewer) wasn't taking
into
account civilization- or team-bonus auras when calculating entity stats.

This wasn't really a problem (for Vanilla 0AD) prior to a18d97b047, as
civ-bonus auras don't exist in Vanilla 0AD, and our team-bonus auras
didn't
apply to the owning civ before that change. Now they do, the Suite needs
to
take them into consideration.


Differential Revision: https://code.wildfiregames.com/D4093
This was SVN commit r25751.
2021-06-08 23:35:44 +00:00
s0600204 06672206d4 (Re)display phase idents in Structure Tree
They were all set to hidden-by-default as part of b7ff371d00, only there
wasn't anything to tell them to unhide when we actually want them. This
commit
fixes that.


Differential Revision: https://code.wildfiregames.com/D4114
This was SVN commit r25750.
2021-06-08 23:20:39 +00:00
vladislavbelov 990d61a74a Draws all characters for a very long text of the same style.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4120
This was SVN commit r25749.
2021-06-08 18:17:10 +00:00
wraitii 870e689e5f Unit pushing: fix pairs of unit being allowed to overlap.
Following 40cbde1925, the minimum pushing force is 0.2. This also
happens to be the maximum pushing force any pair of units can exert on
each other, so they can freely overlap instead of being pushed.

This tweaks settings slightly to fix that problem.

Reported by: marder
Differential Revision: https://code.wildfiregames.com/D4129
This was SVN commit r25748.
2021-06-08 16:38:06 +00:00
wraitii 83703992c9 Fix speed glitch
Introduced in 40cbde1925
MoveToFormationOffset may be called after the formation controller is
reset, leading to issues. It seems best to trust only
SetMemberOfFormation.

This causes the speed glitch experienced by wow & Valihrant.

Differential Revision: https://code.wildfiregames.com/D4128
This was SVN commit r25747.
2021-06-08 16:03:31 +00:00
wraitii b7ff371d00 Prevent OOM crash in Reference Tree on error
The structTree, in case of errors, could have enough items to draw to
trigger an OOM failure in the Arena allocator.

This fixes that by hiding elements by default and some c++ memory
optimisation (mostly, this should make all platforms take the same
memory footprint for VisibleObject).

Discussed with vladislavbelov and s0600204

Differential Revision: https://code.wildfiregames.com/D4114
This was SVN commit r25746.
2021-06-08 14:57:59 +00:00
Stan 858148d332 Add garrison flags for all wonders.
Fixes: #6160
Refs: #4581

This was SVN commit r25745.
2021-06-08 12:04:08 +00:00
Stan f3be9bd465 Fix forge garison flag and add some missing death particles.
Refs: #4581
Refs: #6160

This was SVN commit r25744.
2021-06-08 11:42:31 +00:00
Stan 1aa944b0bb Slightly improved parchment.png texture.
Patch by: @marder
Refs:  D4107

This was SVN commit r25743.
2021-06-08 11:05:44 +00:00
Stan 055c2d009b Change the mine selection sound and make it louder.
Patch by: @Langbart
Fixes #6184

Differential Revision: https://code.wildfiregames.com/D4102
This was SVN commit r25742.
2021-06-08 10:42:15 +00:00
wraitii d03112d2f6 Fix gamesetup issues with map filters.
Redo 09a33b6626.
When the host set te 'best for mp' mapfilter and a non-default maps,
ordering issues bugged things out.
This handles things slightly better.

Fixes #6208

Differential Revision: https://code.wildfiregames.com/D4121
This was SVN commit r25741.
2021-06-08 08:51:36 +00:00
wraitii 224a96373b Revert parts of 09a33b6626
There is an issue when no matchsettings.json is present.

This keeps the network synchronisation fix, that worked.

This was SVN commit r25739.
2021-06-07 19:55:05 +00:00
wraitii 1d518f5d6f Fix MouseEventMask for bundles.
The .png get converted to .dds and they failed to load. Use a custom
CacheLoader since that's lightweight enough and avoids having to hack
into the texture manager.

Thanks Stan for testing

Differential Revision: https://code.wildfiregames.com/D4119
This was SVN commit r25738.
2021-06-07 19:27:54 +00:00
wraitii 65ae6543c3 Increase maximum size of mac bundle DMG
The game is slightly over 3G now.
This doesn't affect the actual DMG size, just the maximum size we can
write into it.

Differential Revision: https://code.wildfiregames.com/D4118
This was SVN commit r25737.
2021-06-07 18:56:32 +00:00
wraitii f5f493681d Fix atlas crash with RM capture the relic.
As no default values got set, some game settings became NaN, which
triggered exceptions.
This sets sane default.

This also includes better debugging logic in case of exception, so it's
easier to know what happens.

Fixes #6200

Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D4113
This was SVN commit r25736.
2021-06-07 18:48:16 +00:00
vladislavbelov 67539a8837 Fixes an old bug with missed handle appeared in 63c1347ef7.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4115
This was SVN commit r25735.
2021-06-07 18:45:28 +00:00
wraitii d95eda9eb3 Add description for new hotkeys
Adds a proper description for flare & last attackfocus hotkeys.
Fixes eb2e489898 and 8e63a0322c

Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D4116
This was SVN commit r25734.
2021-06-07 18:45:03 +00:00
wraitii 275ee9d75b Disable TreasureCollector component in siege engines.
This is unexpected and does not seem particularly useful/sensical.

Patch by: pszemsza
Fixes #5214

Differential Revision: https://code.wildfiregames.com/D3929
This was SVN commit r25733.
2021-06-07 12:54:08 +00:00
wraitii 7e9bb4d4e8 Only save MP match settings if the player is the controller
Broken in 72f0fdb41b.

Differential Revision: https://code.wildfiregames.com/D4112
This was SVN commit r25732.
2021-06-07 11:45:14 +00:00
wraitii 09a33b6626 Fix MP gamesetup issues with mapfilter
- Settings weren't sent to the server when mapfilters change.
- Because of ordering issues, the 'multiplayer' mapfilter would be
activated at the wrong time and things would go haywire.
- Likewise, selecting a non-default map with a non-default filter
wouldn't work well.

Fixes #6208

Differential Revision: https://code.wildfiregames.com/D4111
This was SVN commit r25731.
2021-06-07 11:40:43 +00:00
wraitii 70f2ac6788 Fix error on resign with formation
Formation controllers that were about to be destroyed could bug out.
It's plausible this bug would also happen with regular units, but
couldn't reproduce.

Differential Revision: https://code.wildfiregames.com/D4110
This was SVN commit r25730.
2021-06-07 11:38:16 +00:00
Stan a8480b1dc9 Fix incorrect animation for african elephants
Patch by: @wowgetoffyourcellphone
This was SVN commit r25729.
2021-06-07 09:48:34 +00:00
Stan b3ec0d48ba Add a disabled flare icon for observers.
This was SVN commit r25728.
2021-06-07 08:51:23 +00:00
wraitii cdb73b29f2 Lower Forge technology costs, introduce a 3rd level.
Follows 9a3da390b9 / b5bbed4690.
Forge technologies are cheaper in A24, but still too expensive to use
directly, making the forge not immediately useful.
This changes the technologies from 2 levels to 3, and further decreases
costs.
Instead of 600/400 then 900/600, costs are 200/100, 350/250 then
500/400. This makes the Town Phase techs immediately accessible, and
lengthens impact of City Phase with stronger late techs.

Iberians and Mauryas had a special "wootz steel" tech that gave
swordsmen +20% damage, this is folded into the 3rd level. I have not
changed the effect because the tech was cheap, but we shall see.

Patch by: Nescio
Comments by: borg-, Valihrant
Differential Revision: https://code.wildfiregames.com/D3679
This was SVN commit r25726.
2021-06-07 07:33:59 +00:00
wraitii d0989ee3ac Expand Experience trickle to stables and elephant stables
Increases consistency, unlikely to be overpowered. Temple and Fortress
were considered but found risky of being too strong.

Patch by: langbart
Differential Revision: https://code.wildfiregames.com/D3994
This was SVN commit r25725.
2021-06-07 06:55:59 +00:00
wraitii 8e853a7a0d Lower infantry crossbowmen walk speed.
Their lowered prepare time (since c78ead79e6) makes them too good at
hit-and-run, they should be slower since a crossbow is encumbering.

Accepted By: ValihrAnt
Differential Revision: https://code.wildfiregames.com/D4096
This was SVN commit r25724.
2021-06-07 06:50:26 +00:00
wraitii add76379d4 Correctly reset teams when changing scenario.
When switching scenarios, teams should always be reset.
Do nothing in skirmish mode.

Reported by: Stan
Differential Revision: https://code.wildfiregames.com/D4104
This was SVN commit r25723.
2021-06-07 06:46:11 +00:00
wraitii 7787176802 Ship the fontbuilder folder to distribute font licenses
Fixes #6198

Differential Revision: https://code.wildfiregames.com/D4090
This was SVN commit r25722.
2021-06-07 06:43:54 +00:00
wraitii 88e6671388 Lower Champion Elephant armor against Pierce.
Elephants go from 2150 real HP to 2100 against Hack and 1700 against
Pierce.
The intention is to make them more vulnerable to range (and somewhat
spearmen as well).

Suggested by: Valihrant
Differential Revision: https://code.wildfiregames.com/D4058
This was SVN commit r25721.
2021-06-07 06:40:38 +00:00
wraitii d9511564ce Fixup tooltips after 73dcf36976
Some civ-specific variants had specific tooltips.

Differential Revision: https://code.wildfiregames.com/D4095
This was SVN commit r25720.
2021-06-07 06:36:42 +00:00
vladislavbelov 8597cd2c2e Removes FFP shader program. Fixes #5791
This was SVN commit r25717.
2021-06-06 19:49:43 +00:00
Imarok cc4087f3fe Don't open the template viewer when in special input state
Fix #6041

Differential Revision: https://code.wildfiregames.com/D4105
This was SVN commit r25716.
2021-06-06 19:00:04 +00:00
Imarok eb2e489898 Add a hotkey to focus on the last attack alarm
Fix #5608

Differential Revision: https://code.wildfiregames.com/D4101
This was SVN commit r25715.
2021-06-06 18:29:48 +00:00
vladislavbelov e0b492a83a Removes old gui_* materials, replaced by a single canvas2d material.
This was SVN commit r25714.
2021-06-06 18:25:04 +00:00
vladislavbelov 7d039f2627 Replaces gui material by solid material in water waves rendering.
This was SVN commit r25713.
2021-06-06 18:13:20 +00:00
vladislavbelov fa03eb3485 Switches ShadowMap debug rendering to canvas2d material.
This was SVN commit r25712.
2021-06-06 18:05:10 +00:00
vladislavbelov 30e135693e Implements configurable cascade shadows.
Tested By: Langbart, Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D3972
This was SVN commit r25711.
2021-06-06 16:44:54 +00:00
Imarok ca6fcb28ab Don't store the camera pointer in the minimap
Reviewed by: vladislavbelov
Fix #5973

Differential Revision: https://code.wildfiregames.com/D4100
This was SVN commit r25710.
2021-06-06 16:08:10 +00:00
vladislavbelov 63c1347ef7 Removes windows enumeration on Windows to retrieve HWND taking it from SDL and wxWidgets.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4064
This was SVN commit r25709.
2021-06-06 15:31:55 +00:00
wraitii 40cbde1925 Further Pushing tweaks: more customisable, longer ranges.
This overall decreases the deathball effect from units walking to each
other a bit.
- Fix formations - this cleans up a UnitMotion hack for formations,
making it possible to increase pushing ranges without breaking closely
knit formations like testudo.
- Make MINIMAL_PUSHING and the MOVE_EXTENSION configurable, and add a
STATIC_EXTENSION as well.
- Increase the pushing range significantly, making units sparser.

Differential Revision: https://code.wildfiregames.com/D4098
This was SVN commit r25708.
2021-06-06 15:25:52 +00:00
Stan 063408c252 New pikemen small shields.
Patch by: @wowgetoffyourcellphone,
This was SVN commit r25707.
2021-06-06 14:28:28 +00:00
Stan cea23ac864 Improve the UVMap of some old rocks. They were looking very weird with some of the new textures.
This was SVN commit r25706.
2021-06-06 14:27:02 +00:00
Stan 683759c4c6 Fix some texture bug on tree_oak_new_c the uv was referencing some transparent parts of the texture. The texture was also a bit too transparent on the bark.
Reported by: @vladislavbelov
This was SVN commit r25705.
2021-06-06 11:23:32 +00:00
vladislavbelov 7fdbe037dd Uses canvas2d material for line drawing instead of gui_solid.
This was SVN commit r25704.
2021-06-06 10:13:57 +00:00
vladislavbelov 337c4100ce Cleanups ddbf1ea770 which fixes 4ffc005a7f. Sprites can not be inserted twice.
This was SVN commit r25702.
2021-06-06 09:31:36 +00:00
wraitii 374b869480 Tweaks to the alpine RM biome
- Rename to subalpine to fit the theme better & tweak tooltip
- improve the shore textures
- remove the snow dir texture which contrasted too heavily.

Differential Revision: https://code.wildfiregames.com/D4027
This was SVN commit r25701.
2021-06-06 08:24:39 +00:00
wraitii 3f2265a09e Update for the Steppe RM biome
- Change the grass actor, which was too lighting dependent and heavy on
performance
- Change the main terrain texture which was quite noisy
- Change shore textures to be more seamless.

Based on a patch by: marder
Differential Revision: https://code.wildfiregames.com/D4025
This was SVN commit r25700.
2021-06-06 08:21:35 +00:00
wraitii 8af0689b5f Fix gamesetup player assignment issue when joining
Switch some logic from C++ to JS in PREGAME for player assignments. Refs
#3049

Fixes #6204

Reported by: Imarok
Tested By: Imarok
Differential Revision: https://code.wildfiregames.com/D4092
This was SVN commit r25699.
2021-06-06 08:02:28 +00:00
wraitii ddbf1ea770 Hotfix 4ffc005a7f
A GUI sprite can have e.g. "color:" and "stretched:", but 'sprite' was
moved from after the first call.
Refs #6206

Differential Revision: https://code.wildfiregames.com/D4094
This was SVN commit r25698.
2021-06-06 07:44:20 +00:00
wraitii 73dcf36976 Remove territory root from fortresses.
Reverts D1762 / 014c2922f2.
Because any territory connected to a root does not decay, this made it
possible to anchor CC territories by adding a fortress somewhere, thus
making it much, much harder to push against an enemy territory.
This led to a much more turtley gameplay and overall made the game
worse.

For now, I do not reintroduce the larger territory range (which was
reduced in 014c2922f2).

Differential Revision: https://code.wildfiregames.com/D3989
This was SVN commit r25697.
2021-06-06 07:35:40 +00:00
vladislavbelov 4ffc005a7f Removes raw pointers management from sprites owned by CGUI.
This was SVN commit r25695.
2021-06-06 00:32:49 +00:00
vladislavbelov 8e150199a8 Removes raw pointers management from CGUISprite.
This was SVN commit r25694.
2021-06-06 00:22:43 +00:00
vladislavbelov a2257237b3 Removes raw pointers management from GUIScrollBarOwner.
This was SVN commit r25693.
2021-06-06 00:12:31 +00:00
vladislavbelov fdb4040838 Adds HiDPI mode for testing. HiDPI on Windows isn't supported in SDL yet. So we use a custom code.
Differential Revision: https://code.wildfiregames.com/D4076
This was SVN commit r25692.
2021-06-05 19:01:37 +00:00
Imarok 8e63a0322c Map flares
Add flaring on the map and resize the minimap buttons.
Target marker and button by Stan.
Reviewed/Commented by wraitii, elexis, vladislavbelov
Refs: #3491
Refs: #57

Differential Revision: https://code.wildfiregames.com/D1751
This was SVN commit r25691.
2021-06-05 17:37:18 +00:00
s0600204 3bb5f364c2 (Reference Suite) Support aura-based civilization bonuses
As a side effect of 6b7a80b260, this is now trivial to do.

We don't (currently) have any aura-based civ bonuses in Vanilla 0A.D.,
but hopefully modders will find it useful.

This was SVN commit r25690.
2021-06-05 16:39:59 +00:00
s0600204 6b7a80b260 (Reference Suite) Fetch teambonus auras from player_{civ}.xml files
(The `civ` key (in the team bonus aura templates) was added in
190d6e7cf5 for the
purpose of identifying which aura belongs to which civ. It's no longer
used.)

Proposed by: @Nescio
Comments by: @Freagarach
Refs: 190d6e7cf5
Differential Revision: https://code.wildfiregames.com/D3864
This was SVN commit r25689.
2021-06-05 16:24:25 +00:00
wraitii ad8c7cb2e0 Fixup artic biome: add lillies replacement
Since lillies wouldn't make too much sense, add rocks.

Differential Revision: https://code.wildfiregames.com/D4087
This was SVN commit r25688.
2021-06-05 10:47:20 +00:00
wraitii f3efe47ff6 Default-init atomics in TaskManager::Impl
std::atomic<bool> does not value-initialise the boolean.
This caused windows tests to use way too much CPU and fail.

Differential Revision: https://code.wildfiregames.com/D4089
This was SVN commit r25687.
2021-06-05 09:48:41 +00:00
wraitii 3745940de8 Fix OOS in unit motion
Fixes 592453c62f
wasObstructed and wentStraight are not reset when Move() isn't called,
but PostMove may still be called (if the unit was pushed). This will
OOS.

Differential Revision: https://code.wildfiregames.com/D4088
This was SVN commit r25686.
2021-06-05 09:33:57 +00:00
wraitii 7de9487a87 "New maps" demo campaign
This shows off the new maps, and shows off campaigns in a straighforward
manner.

Differential Revision: https://code.wildfiregames.com/D4020
This was SVN commit r25684.
2021-06-04 18:04:17 +00:00
wraitii 498c2f402d Allow setting a custom page for the 'back' page in the gamesetup.
Forgotten in c012888e2a. This is useful for campaigns that would want to
use the full gamesetup, and in general makes the gamesetup slightly more
flexible.

Differential Revision: https://code.wildfiregames.com/D4082
This was SVN commit r25683.
2021-06-04 17:22:15 +00:00
wraitii f2c9c392bb Rework metal/stone techs to cost Food and Stone.
Food/Wood techs now cost Wood and metal (with food techs being slightly
less expensive as they provide less bonus). Metal/Stone techs now cost
Food and Stone instead of Wood and Metal, reducing the load on those
resources, and making Stone slightly more critical.

Initial work by: Nescio
Accepted By: chrstgtr, Valihrant
Differential Revision: https://code.wildfiregames.com/D3704
This was SVN commit r25682.
2021-06-04 17:20:15 +00:00
wraitii a359275841 Map touchup: Corinthian isthmus
- Support biomes
- Hills, forests, food & metal mines won't spawn on the isthmus anymore,
to avoid obstructions and make things a little fairer
- Stone mines spawn only on the isthmus and players start only with
small stones
- Tidier forests
- The central passageway is sometimes slightly offset left/right
- The central passageway is surrounded by a walkable shallow, which
prevents effectively walling the actual passageway.
- Widen the river slightly.

Overall the intention is to make the map less of a turtle-fest, though
it remains chokepointy by nature.

Differential Revision: https://code.wildfiregames.com/D4062
This was SVN commit r25681.
2021-06-04 17:08:10 +00:00
wraitii eae2538802 Map touchup: gulf of bothnia
- Denser forests
- frozen lake biome gets some watery holes in there, just to make it
slightly more mazey.
- Tweak the lighting of the specific biomes to avoid overexposing the
ground textures.

Differential Revision: https://code.wildfiregames.com/D4073
This was SVN commit r25680.
2021-06-04 16:50:44 +00:00
wraitii 76191d43c8 Map touchup: River/Lake/Mainland/Continent
- Slightly denser forests with the new helper
- good default biome for African Plains in Atlas.

Differential Revision: https://code.wildfiregames.com/D4072
This was SVN commit r25679.
2021-06-04 16:36:02 +00:00
wraitii bc17e1ade3 Map touchup: neareastern badlands
- Support African biomes
- Tidier forests

This was SVN commit r25678.
2021-06-04 16:34:09 +00:00
wraitii 990eea63b9 Map touchup: Cantabrian Highlands
- Support biomes
- Tidier forests

This was SVN commit r25677.
2021-06-04 16:32:37 +00:00
Imarok 146b680d63 Fix borders of game description in gamesetup
Spotted by Langbart
Reviewed by Langbart
Refs 6f9a162dfa

Differential Revision: https://code.wildfiregames.com/D4074
This was SVN commit r25676.
2021-06-04 16:30:36 +00:00
wraitii c1d3584da3 Map touchup: hyrcanian shores
- Properly split mainland & highland forests
- slightly tidier forests
- support biomes

Differential Revision: https://code.wildfiregames.com/D4063
This was SVN commit r25675.
2021-06-04 16:21:59 +00:00
wraitii e865db3bfb Map touchup: Ardennes forest
- reuse settings from the temperate biome
- More wood / slightly denser
- replace the aleppo pine with the Fir, looks better
- Rework the terrain textures

Differential Revision: https://code.wildfiregames.com/D4061
This was SVN commit r25674.
2021-06-04 16:16:53 +00:00
wraitii 5e0b65853b Map touchup: African plains
- Support the 3 african biomes.
- Bigger forests (same # of trees overall)
- More hills/watering holes, more animals there.

Differential Revision: https://code.wildfiregames.com/D4060
This was SVN commit r25673.
2021-06-04 16:00:37 +00:00
wraitii 2599289872 Update the Savanna RM biome
Patch by: marder
Differential Revision: https://code.wildfiregames.com/D4067
This was SVN commit r25672.
2021-06-04 15:39:43 +00:00
wraitii d1e51593cd Fix water texture in aegean biome
The new texture is less visually intrusive thus a better general fit.

Patch by: marder
Differential Revision: https://code.wildfiregames.com/D4026
This was SVN commit r25671.
2021-06-04 15:24:48 +00:00
wraitii 93e450c433 Increase the size of the Lobby Create match dialog
Based on a patch by: langbart
Fixes #6202

Differential Revision: https://code.wildfiregames.com/D4081
This was SVN commit r25670.
2021-06-04 13:10:34 +00:00
wraitii 54dae5257d Make Stable technologies more affordable
Patch by: ValihrAnt
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3919
This was SVN commit r25669.
2021-06-04 13:00:25 +00:00
wraitii db7d63f208 Add a 'createDefaultForests' wrapper around createForests
This new helper gives fewer but larger forests by default.

Follows 70a4406bef

Differential Revision: https://code.wildfiregames.com/D4071
This was SVN commit r25668.
2021-06-04 12:57:05 +00:00
wraitii 69901d9ffb Tweaks to TaskManager code
Reported by: Vladislav
Differential Revision: https://code.wildfiregames.com/D4077
This was SVN commit r25667.
2021-06-04 12:55:15 +00:00
Stan f9ed769355 Add a mahout for the Maurya support elephant. Re-enabling building should be done in a separate [gameplay] differential.
Fixes: #6091
Thread:
https://wildfiregames.com/forum/topic/37023-task-add-mahout-to-mauryan-worker-elephant/

This was SVN commit r25666.
2021-06-04 10:34:53 +00:00
Stan b2f887da2c Improved Seleucid pikemen and Archers.
Patch by: @wowgetoffyourcellphone
This was SVN commit r25665.
2021-06-04 08:59:11 +00:00
Stan 741d53e3e7 Do not go to the nearest dropsite when full and asked to hunt/slaughter and attack instead. This is fine as long as units don't decay.
Comments by: @wraitii, @Freagarach
Reported by: @FeldFeld
Fixes: #5954
Refs: 6d187f2145
Differential Revision: https://code.wildfiregames.com/D3444
This was SVN commit r25664.
2021-06-04 08:44:15 +00:00
wraitii dd61eb4751 Update "autumn" biome
Patch by: marder
Differential Revision: https://code.wildfiregames.com/D4065
This was SVN commit r25663.
2021-06-04 08:33:13 +00:00
user1 82c44e826d Lobbybots: Send IQ result containing the IP address to a client starting a new hosted match and remove the IP from gamelist stanza.
Refs: D3490, D3184

This was SVN commit r25660.
2021-06-04 00:33:43 +00:00
vladislavbelov b360b7bd2b Disallow hardware without VBO support to simplify vertex buffer usages.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4054
This was SVN commit r25659.
2021-06-03 22:06:59 +00:00
Stan 45d7bee29b Revert the UI change.
It looks bad on the summary graph, and might need further adjustments in
general.

Discussed with: @Langbart, @Imarok, @wraitii
cc @wowgetoffyourcellphone

This was SVN commit r25658.
2021-06-03 17:02:02 +00:00
wraitii 0ebc08b13c Thread the pathfinder computations using the task manager.
The pathfinder computations are run asynchronously (and potentially on
the main thread) in-between simulation turns, thus reducing
pathfinder-related lag considerably in common cases.

To make this most efficient, the number of paths computed during a turn
via MaxSameTurnMoves is reduced from 64 to 20.

This has a hard dependency on the obstruction manager (via the vertex
pathfinder) not being modified in-between simulation turn (or to put it
more generally on the simulation state not changing outside of turn
computation), otherwise results will be non-deterministic and go OOS.
This is currently entirely safe (as in, it indeed does not happen that
the simulation state changes in-between turn), but future work towards
improving simulation sandboxing would be good.

Thanks to Kuba386 for maintaining & improving the patch in 2020
Thanks to everyone who tested the various iterations of this patch.

Fixes #4324

Differential Revision: https://code.wildfiregames.com/D14
This was SVN commit r25657.
2021-06-03 16:21:28 +00:00
wraitii 1b35d36daa Implement a global task manager using a pool of worker threads
Tasks are simple callables (e.g. lambdas), and can be pushed with 2
priority levels. Pushing a task returns a future.
Futures can be waited on, can return results, and can be cancelled
deterministically. Futures can also not be waited on.

This gives 'hardware concurrency - 1' threads to maximize CPU usage in a
work-stealing workflow.

Reviewed by: vladislavbelov
Refs #5874

Differential Revision: https://code.wildfiregames.com/D3848
This was SVN commit r25656.
2021-06-03 14:48:38 +00:00
wraitii c78ead79e6 Standardize prepare time for ranged units.
Prepare time is the time between an attack order and the arrows actually
flying.

Archers go from 500ms to 800ms standard, making them slower to fire than
other ranged units, and making them slightly harder to micro against
e.g. raids.
Javelineers go from 750ms to 400ms, for the opposite effect.
Crossbowmen, as a 'special' feature, get 200ms, meaning they fire their
first volley really fast despite their long repeat rate.

This also standardizes all javelineer units to have 1250ms repeat time.

Differential Revision: https://code.wildfiregames.com/D4050
This was SVN commit r25655.
2021-06-03 13:49:07 +00:00
wraitii 5d542ab63b Fix new biomes: small mines are again small
The terrain update introduced large actors for both small and large
stone and metal actors. This replaces the small ones by the appropriate
small actors.

Patch by: marder
Differential Revision: https://code.wildfiregames.com/D4057
This was SVN commit r25654.
2021-06-03 13:44:14 +00:00
wraitii 70a4406bef Allow specifying forest size in createForests
This makes it easier to have more forests with fewer trees, or fewer
larger forests.

Differential Revision: https://code.wildfiregames.com/D4059
This was SVN commit r25653.
2021-06-03 13:40:48 +00:00
wraitii 37d979d898 Fix wrong textures in nubia/savanna biome
Differential Revision: https://code.wildfiregames.com/D4068
This was SVN commit r25652.
2021-06-03 13:39:32 +00:00
wraitii 3662b2d5e2 Fix error in HasSameMods with old matchsettings.
Add some retro-compatibility to avoid issues.

First reported by: gameboy
Differential Revision: https://code.wildfiregames.com/D4066
This was SVN commit r25651.
2021-06-03 10:16:59 +00:00
Stan dd0d4dc57a Some more fixes for miletus.
Patch by @wowgetoffyourcellphone.

This was SVN commit r25650.
2021-06-03 07:08:32 +00:00
vladislavbelov 83608c9205 Removes complex transform from TextRenderer.
This was SVN commit r25648.
2021-06-02 22:16:09 +00:00
Imarok 94d669c198 Fix ignoring arrays as supported biomes in gamesetup
Fix regression of dc18d94030.
Spotted by: marder
Reviewed by: wraitii
Differential Revision: https://code.wildfiregames.com/D4044
This was SVN commit r25647.
2021-06-02 22:03:59 +00:00
Imarok 455b784f62 Delete test .zip file after running tests
Issue spotted by kalimaps
Reviewed by: wraitii
Code parts by: wraitii
Differential Revision: https://code.wildfiregames.com/D4043
This was SVN commit r25646.
2021-06-02 21:31:18 +00:00
vladislavbelov 2d455df18d Removes Z value from TextRenderer translate, renames TextRenderer methods to more explicit ones.
This was SVN commit r25645.
2021-06-02 21:21:28 +00:00
Stan ad9cb9d467 Use new small shields for mace archers too.
This was SVN commit r25644.
2021-06-02 18:53:29 +00:00
Stan c8c2b03a08 Differentiate Ptolemaic archers from Seleucid ones. Use a fancier shield mesh.
Patch by: @wowgetoffyourcellphone, @Alexandermb, @Stan
Reported by @Hidan

This was SVN commit r25643.
2021-06-02 18:49:39 +00:00
Stan 6243fd07da New UI background
Patch by: @wowgetoffyourcellphone
This was SVN commit r25641.
2021-06-02 18:04:19 +00:00
Stan d4cf36574e Some map tweaks
Patch by: @wowgetoffyourcellphone
This was SVN commit r25640.
2021-06-02 18:03:38 +00:00
Angen dfbc481ec1 [Mod] Fix list and filter in mod selection breaking page when mod is missing some attribute
In case mod is missing some required field, for example label or version
for some reason, mod page would stop functioning.
Adding default to empty string in list and filter.

Differential revision: D4028
This was SVN commit r25639.
2021-06-02 17:58:49 +00:00
Angen 0f8ba775c3 Fix areFilters
Removed in 0d87ec5cf4.

Differential revision: D4041
Tested by: @marder
Reviewed by: @wraitii
This was SVN commit r25638.
2021-06-02 17:45:17 +00:00
Stan be3749a788 New savanna textures based on cc0 textures
Patch by: @marder
This was SVN commit r25637.
2021-06-02 17:44:20 +00:00
wraitii c012888e2a Allow switching to the gamesetup from the campaign screen
This allows switching to the gamesetup, with a harcoded map, from the
campaign screen. Lets player sets up a few things (e.g. their civ &
favorite AI), which can be convenient for some simple campaigns that
lack options.

Differential Revision: https://code.wildfiregames.com/D4039
This was SVN commit r25636.
2021-06-02 17:37:29 +00:00
wraitii 48ea6ee7d2 Moddability for pushing: radius in XML, allow deactivating globally/some templates.
Differential Revision: https://code.wildfiregames.com/D4040
This was SVN commit r25635.
2021-06-02 17:36:32 +00:00
wraitii 07e44a75a1 Allow mods to say they should be ignored in replay/MP compatibility checks
Since it is very non-trivial to determine which mods change checksums
and which don't, this relies on modder goodwill (and on verification on
our end for signed mods).

The declaration is an optional "ignoreInCompatibilityChecks" boolean in
mod.json

Also rework slightly the MP lobby mod display to always show the host
mods in a clear manner.

Differential Revision: https://code.wildfiregames.com/D3968
This was SVN commit r25634.
2021-06-02 06:50:16 +00:00
wraitii 693f296e71 Improve 'incompatible mods' splash screen
Fix some language elements, add some details, and update to SVN specs.
Make the window wider to have the first phrase take a single line in
English/most languages hopefully.

Differential Revision: https://code.wildfiregames.com/D4049
This was SVN commit r25633.
2021-06-02 06:44:43 +00:00
vladislavbelov 2c3a49734c Removes ShaderProgram from MiniMap header, removes unnecessary members, removes useless scissoring.
This was SVN commit r25631.
2021-06-01 21:37:14 +00:00
vladislavbelov e0fd3b532f Cleanups MiniMapTexture a bit.
This was SVN commit r25630.
2021-06-01 19:50:15 +00:00
vladislavbelov c2c9059f67 Fixes removed terrain missed in 7ce4552f5e.
This was SVN commit r25629.
2021-06-01 19:08:22 +00:00
vladislavbelov 7ce4552f5e Moves partially MiniMap texture rendering into a separate object.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4045
This was SVN commit r25628.
2021-06-01 18:55:35 +00:00
wraitii 0cc0852683 Remove build limits of structures that train champions.
The champions these structures built were not very usable in practice
because of their limited build rate.
Apadanas are a special case since they grant resources, their limit is
increased to 2 and their resource rate divided by two (this reduces
their economic impact early on, but increases their potential military
impact).
The preferred solution would be giving apadanas a pop count, but that
does not work very well right now given that they grant resources and
can still be built.

Patch by: Valihrant
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3897
This was SVN commit r25627.
2021-06-01 08:09:43 +00:00
wraitii eda3eb7cc6 Speed up citizen rotation & differentiate ranged infantry unit move speed
Refs 42c70cd508, be286d4345, refs #5106

The introduction of "turn time" in A24 has been pointed out as a
gameplay change that made rushing less viable, and made the game more
turtley overall. Combined with other changes in the same direction, this
was seen by several top MP players as a step back.
Increasing turn times to 14 for infantry makes them somewhat irrelevant,
and a value of 10 for cavalry makes them noticeably more reactive while
keeping a little speed debuff.

Champions have a lower value, and heroes keep their lower values still
to prevent a reintroduction of 'dancing'.

Patch by: Valihrant
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3971
This was SVN commit r25626.
2021-06-01 07:45:36 +00:00
wraitii 9e0c30f316 Improve Cart tech 'colonization'
It was underpowered and too costly.

Patch by: borg`
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3698
This was SVN commit r25625.
2021-06-01 07:26:07 +00:00
wraitii 44ea80977a Tweak mercenaries: no food cost, advanced rank, faster training
The intention is that while mercenaries are still difficult and costly
to train, they are more effective in their particular niche.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3699
This was SVN commit r25624.
2021-06-01 07:20:21 +00:00
wraitii 2147da9aa6 Revert citizen train times to A23 values
The significant slowdown in train times, particularly for infantry
resulted in an increase in the # of barracks and overall contributed to
shifting towards a defensive, turtley gameplay.
Cavalry was already reverted in 8bd7a4f4b5.

Reverts parts of D2866/8726a2abbf.

Patch by: ValihrAnt
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D4033
This was SVN commit r25623.
2021-06-01 07:16:16 +00:00
wraitii 6cc6d8c156 Speed up and simplify TileClass implementation
Use a more memory-efficient layout, reducing memory usage and speeding
things up considerably.

Patch by: smiley
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D4021
This was SVN commit r25622.
2021-06-01 07:06:36 +00:00
vladislavbelov 01e940217e Adds header safeguards to LOSTexture forgotten in fe21c5e023.
This was SVN commit r25620.
2021-05-31 20:47:03 +00:00
vladislavbelov 4d11256510 Adds shader technique caching to Canvas2D.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4034
This was SVN commit r25619.
2021-05-31 19:22:14 +00:00
wraitii b86b4d352e Fix broken SP persisted settings
The MP ones were always used instead.

Differential Revision: https://code.wildfiregames.com/D4038
This was SVN commit r25618.
2021-05-31 16:27:50 +00:00
wraitii 3d20791837 Add a "Best for MP" filter for random maps
This allows picking 'random' on a bunch of maps known to be playable in
MP, with the hope of increasing variety in actual maps played.

Discussed with players on the balancing forums.

Differential Revision: https://code.wildfiregames.com/D4012
This was SVN commit r25617.
2021-05-31 13:44:02 +00:00
wraitii 42e67be0ee Fix crash when pushing a page while pushing a page.
Because the page stack is a vector, if during PushPage, a new page is
pushed, the vector may re-allocate. This 'pulls the rug out' from
underneath the code stack that originally pushed, which then crashes.

To fix this, use a deque, since push/pop won't invalidate references.

Reported by: Imarok.
Based on a patch by: Imarok (tests are his)
Differential Revision: https://code.wildfiregames.com/D4037
This was SVN commit r25616.
2021-05-31 13:42:08 +00:00
Stan b1902d8e80 Allow setting texture quality in the config file. Fixes a todo.
Differential Revision: https://code.wildfiregames.com/D3020
This was SVN commit r25615.
2021-05-31 12:52:43 +00:00
Stan fcd8035fd4 Use the new "Lod" Feature for aprons
* Disable "aprons" on low quality
* Disable cast shadows on medium quality

This was SVN commit r25614.
2021-05-31 12:00:05 +00:00
wraitii 0bc7ba50ea Add an option to reduce the diversity of actor variants
Variants can now have limited or no diversity. This can occasionally
speed rendering slightly (5-10% FPS increase was reported on Combat Demo
Huge, which is very variant-heavy).

Reported by: bb
Based on a patch by: bb
Fixes #5831

Differential Revision: https://code.wildfiregames.com/D3035
This was SVN commit r25613.
2021-05-31 11:42:46 +00:00
Stan 6f72560228 Use the new "Lod" Feature for celt barrels
* Disable "castshadow" on low quality
* Adds new low quality versions for medium and low quality.

This was SVN commit r25612.
2021-05-31 11:38:34 +00:00
wraitii 9cc6228b28 Fix random biome not working.
As the available biome was a Set, pickRandom didn't work.

Reported by: Langbart
Refs #6190

Differential Revision: https://code.wildfiregames.com/D4036
This was SVN commit r25611.
2021-05-31 07:49:20 +00:00
wraitii 4188e7ff18 Remove unuseful 'siege bolt accuracy' from Kushites arsenal
Kushites should not have a bolt accuracy upgrade in arsenal, as they do
not have the ability to produce bolts.

Fixes #6167

Patch By: Langbart
Differential Revision: https://code.wildfiregames.com/D4035
This was SVN commit r25609.
2021-05-31 06:53:07 +00:00
vladislavbelov 2cc671fd36 Makes 2D text drawing via Canvas2D.
This was SVN commit r25607.
2021-05-30 19:10:10 +00:00
vladislavbelov 7f16a5c40c Moves TextRenderer shader to a more relevant place, into the rendering function argument.
This was SVN commit r25606.
2021-05-30 18:28:06 +00:00
vladislavbelov 7f6ef5db79 Removes gui_solid material usage from CChart.
This was SVN commit r25605.
2021-05-30 18:13:23 +00:00
vladislavbelov 9933fe4b69 Removes gui_solid material usage from ProfileViewer.
This was SVN commit r25604.
2021-05-30 17:35:26 +00:00
vladislavbelov 1f192f1593 Removes low level GL code from GUI sprite rendering and switches to Canvas2D.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4031
This was SVN commit r25603.
2021-05-30 13:48:58 +00:00
Angen c388ef64ad Add missing credits in 7e92f714ca
This was SVN commit r25602.
2021-05-30 10:44:48 +00:00
Angen 0d87ec5cf4 Fix and simplify areFilters functions
Workaround is not needed anymore since 37e08a4ffb

This was SVN commit r25601.
2021-05-30 09:32:18 +00:00
Angen 7e92f714ca [PetraAI] - Make easy difficulties of AI weaker
This patch decreases the popScaling so that the easy AI difficulties
have lower targeted population.
And it also decreases the size & priority of the attacks from the easy
an very easy AI.

Refs: #6149
Differential revision: D3997
Patch by: @marder
Tested by: @Langbart
Comments by: @wraitii, @Freagarach
This was SVN commit r25600.
2021-05-30 09:07:27 +00:00
vladislavbelov d08c96be43 Uses Canvas2D for str_gui_add material in GUIRenderer.
This was SVN commit r25598.
2021-05-30 01:01:42 +00:00
vladislavbelov bee5a4b3a6 Uses Canvas2D for str_gui_solid_mask material in GUIRenderer.
This was SVN commit r25597.
2021-05-30 00:30:55 +00:00
vladislavbelov 9e611e11f8 Uses Canvas2D for gui_basic material in GUIRenderer.
This was SVN commit r25596.
2021-05-29 23:41:07 +00:00
vladislavbelov a462970707 Restores GL check for tests in TextureManager forgotten in 283f524fcf.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4030
This was SVN commit r25595.
2021-05-29 23:24:36 +00:00
vladislavbelov 7f0c4ee9ab Removes unnecessary blend state changes from GUIRenderer.
This was SVN commit r25594.
2021-05-29 22:48:52 +00:00
vladislavbelov df7cabd653 Implements DrawTexture in Canvas2D.
This was SVN commit r25593.
2021-05-29 22:30:23 +00:00
vladislavbelov dacbab8b02 Fixes a mistype introduced in 283f524fcf. A smaller size might cause a write to an allocated memory.
This was SVN commit r25592.
2021-05-29 20:07:15 +00:00
vladislavbelov 57dde8d082 Provides Canvas2D for sprite rendering.
Differential Revision: https://code.wildfiregames.com/D4029
This was SVN commit r25591.
2021-05-29 19:47:36 +00:00
vladislavbelov 283f524fcf Implements DrawRect in Canvas2D, removes CConsole background drawing with low level GL calls.
This was SVN commit r25590.
2021-05-29 12:31:14 +00:00
vladislavbelov 2f3837e0b5 Adds Canvas2D to encapsulate low level GL calls for 2D rendering.
Implements DrawLine for charts.

Differential Revision: https://code.wildfiregames.com/D4024
This was SVN commit r25588.
2021-05-28 16:35:57 +00:00
Imarok 6f9a162dfa CList, COList, CDropdown, CText, CInput: Draw borders above the rest and improve scrollbar drawing order
Fixes: #6055
Differential Revision: https://code.wildfiregames.com/D4004
This was SVN commit r25587.
2021-05-28 16:32:04 +00:00
Stan d50ca8e8ec Slight tweak to the grass texture.
Patch by: @marder
This was SVN commit r25586.
2021-05-28 13:11:16 +00:00
Freagarach 3d7af82328 Improve support for classes in PetraAI.
Let PetraAI use MatchesClassList more.

Differential revision: https://code.wildfiregames.com/D2150
Reviewed by: Angen
Comments by: Stan
This was SVN commit r25584.
2021-05-28 06:54:48 +00:00
vladislavbelov f7ad2daf62 Removes gui_solid material shader usages from scene rendering.
This was SVN commit r25582.
2021-05-27 20:13:47 +00:00
wraitii 25b9faf1cb Split graphics options in two tabs
To allow incorporating more options, this splits the graphics settings
into two tabs, one containing general options (such as
silhouettes/windowed), and one with more advanced settings.

Accepted by: asterix
Differential Revision: https://code.wildfiregames.com/D3985
This was SVN commit r25581.
2021-05-27 10:12:13 +00:00
Stan f57c2f71d5 Fix map names
Noticed by @wraitii

This was SVN commit r25580.
2021-05-27 09:18:00 +00:00
wraitii bd8c6b1572 Fix GetLoadedModsWIthVersions following 498f0d420b
Accidentally broke it in 498f0d420b and didn't notice because D3968
fixes it again.

This was SVN commit r25579.
2021-05-27 08:30:27 +00:00
vladislavbelov b17e8f3043 Removes global g_xres and g_yres dependency from GUI objects.
Differential Revision: https://code.wildfiregames.com/D4014
This was SVN commit r25577.
2021-05-26 18:52:22 +00:00
Stan bcac3bb896 Fix two issues noticed by @marder.
Disable AO on quarried objects as its arguably broken.
Adds a second uv in case it's enabled again to prevent crashes in Atlas.
Use normal instead of parallax for the texture that do not have height
information.

This was SVN commit r25576.
2021-05-26 15:18:25 +00:00
wraitii 18372d665c Campaign menu: reuse default map preview if available.
Differential Revision: https://code.wildfiregames.com/D4019
This was SVN commit r25575.
2021-05-26 14:45:44 +00:00
wraitii 81457ef952 Fix potential undefined conversion.
Summary: Ran into this when testing things in the lobby - I'm not sure
it can happen if everything is working correctly, but I've had it
repeatedly when testing broken stuff. Feels safer.

Test Plan: ^

Differential Revision: https://code.wildfiregames.com/D4018
This was SVN commit r25574.
2021-05-26 13:29:11 +00:00
wraitii bce26e905f Mod selector: "start mods" saves the configuration.
Differential Revision: https://code.wildfiregames.com/D3992
This was SVN commit r25573.
2021-05-26 13:27:43 +00:00
vladislavbelov 8f4b3dfb16 Removes GL1 constants deprecated in GL3+ from HWDetect since they are not useful anymore.
This was SVN commit r25571.
2021-05-25 22:34:57 +00:00
Imarok 35601a7bb3 Fix some error in rmgen.
Reviewed by: kalimaps
Refs: #6180
Differential Revision: https://code.wildfiregames.com/D4017
This was SVN commit r25570.
2021-05-25 21:26:48 +00:00
vladislavbelov cf454fe533 Removes unused BitBuf added in 5b5726ed4d.
Bit operations can be done via std::bitset. The current implementation
is too specific to have it just for a future. Refs 479f59e386,
5ca66fc757.

This was SVN commit r25569.
2021-05-25 19:42:06 +00:00
vladislavbelov db9356944c Removes unused base32 encoding added in 5cc814759f.
For modern standards base64 costs a bit less space and might be
implemented on demand. base32 usage was introduced in e0dfbe719d and
removed in 93cffe9deb.

Refs a34b759720, 317f98a6c0.

This was SVN commit r25568.
2021-05-25 19:18:22 +00:00
vladislavbelov 38e085a8c0 Removes unused wutil command line arguments parsing added in 5383eff15c.
We already have a single place to access arguments, so we don't need
a platform dependent place for that.

Refs 3f58951808, 8c1bd05ab9.

This was SVN commit r25567.
2021-05-25 18:42:27 +00:00
vladislavbelov 007d30f4b4 Removes outdated user32.dll preload hack added in 7a889deca3 and became useless in bbcd9b34cc.
Refs 4b33f49da1, b242eafd02, 56bd5b59b4.

Tested By: Angen
Differential Revision: https://code.wildfiregames.com/D4007
This was SVN commit r25566.
2021-05-25 18:29:50 +00:00
Stan 3f371f40b1 Replace missing biomes by the closest we now have.
Reported by:  @Freagarach
This was SVN commit r25565.
2021-05-25 14:17:39 +00:00
Freagarach 23d7969ffd Fix city phase requirements in PetraAI HQ.
Defence towers were removed from the requirements in 29ab4b5af3, but
PetraAI was not made aware of this.

Differential revision: https://code.wildfiregames.com/D4015
Reviewed by: @Angen, @wraitii
Comment by: @Imarok
This was SVN commit r25564.
2021-05-25 13:46:03 +00:00
Stan 44f935562c Update mainland icons
This was SVN commit r25563.
2021-05-25 12:26:29 +00:00
Stan 95e576dbe3 Use new biomes for random maps,
Patch by: @wowgetoffyourcellphone
This was SVN commit r25562.
2021-05-25 12:25:39 +00:00
Stan de1a10ca53 New maps using the new biomes.
Patch by: @wowgetoffyourcellphone
- cisalpine_winter_2p
- crocodilopolis_4p
- gallic_highlands_2p
- hindu_kush_2p
- hydaspes_river_4p
- magadha_2p
- miletus_peninsula_2p
- nubian_frontier_2p
- saharan_oases_2p
- scythia_4p
- white_cliffs_of_dover_5p

This was SVN commit r25561.
2021-05-25 12:18:40 +00:00
Stan 88d3f50f7e Update some maps with new terrains
Patch by: @wowgetoffyourcellphone
- syria_2p
- sporades_islands_2p
- saharan_oases_4p
- butana_steppe_2p
- bactria_2p
- alpine_valleys_2p
- belgian_bog_2p

This was SVN commit r25560.
2021-05-25 12:15:41 +00:00
Stan 20bb3ea4a3 Add trading posts and shrines as map props
Add a placement obstructor (idea by @Grapjas) to prevent  construction
but not movement

This was SVN commit r25559.
2021-05-25 11:32:07 +00:00
Stan 92a4fdc8e4 Add more ruin objects
Add a new metal type of ruins
Update templates accordingly.

Patch by @wowgetoffyourcellphone

This was SVN commit r25558.
2021-05-25 11:00:13 +00:00
Stan c8f1501db4 Add templates for the new rock and stone mines
This was SVN commit r25557.
2021-05-25 10:57:22 +00:00
Stan b6ae8915de Add more prop actors for maps
- Update the stone and metal mine meshes and
textures/skins/gaia/decal_quarry_sahara_a.png
- Slight tweak to the steppe grass
- Add some ptol eyecandy

Templates will come in a following commit.

This was SVN commit r25556.
2021-05-25 10:53:20 +00:00
Stan ac33c8513b More grass types for biomes
Patch by @wowgetoffyourcellphone

This was SVN commit r25555.
2021-05-25 10:44:19 +00:00
Stan 63199dac2d Some tweaks to the grass fields.
This was SVN commit r25554.
2021-05-25 10:40:39 +00:00
Stan 47fc344567 Update the resource icons.
Patch by @wowgetoffyourcellphone.

This was SVN commit r25553.
2021-05-25 10:21:52 +00:00
Stan 463775faa4 Slight tweaks to particles.
This was SVN commit r25552.
2021-05-25 10:07:04 +00:00
Stan 6324f3369a Use correct projectiles for artillery.
Patch by @wowgetoffyourcellphone

This was SVN commit r25551.
2021-05-25 10:06:34 +00:00
Stan b3aa84adea New shark and whale icons. update the berry an tree and artic wolf icons.
This was SVN commit r25550.
2021-05-25 09:24:23 +00:00
Stan fb84adda3b New autoqueue icons.
This was SVN commit r25549.
2021-05-25 08:35:46 +00:00
wraitii 424b3cdcab Fix 498f0d420b - re-add special-casing of mod & user mods
These do not have a mod.json, triggering spurious errors.

This was SVN commit r25548.
2021-05-25 07:50:04 +00:00
wraitii 863ef0f88a Tweak sound distance attenuation & add configurability
Following D3108 / 876f6d5e50, sounds are attenuated by their actual
distance. However, as noted by players on A24, the dropoff is stark and,
when zoomed out, can easily result in not hearing things that are
happening in the middle of the screen.

The new default settings almost double the max-range, change the minimum
range to have greater dynamic range, and reduce the stereo depth
slightly to better match the default camera FOV.

These are stored per sound-grounp, possibly allowing future tweaks on a
per-soundgroup basis, and are configurable.

Tested by: Imarok
Discussed over mail with: Samulis, Porru

Differential Revision: https://code.wildfiregames.com/D3612
This was SVN commit r25547.
2021-05-25 06:19:25 +00:00
wraitii 498f0d420b Mod data parsing rework
Parses mod.json data not only in temporary JS values, but in a proper
C++ struct.
This will ultimately make it more convenient to pass more than just the
version to JS in D3968, and it enforces the schema a bit more.

Differential Revision: https://code.wildfiregames.com/D3988
This was SVN commit r25546.
2021-05-25 06:12:45 +00:00
wraitii b56f0222d9 Prevent hotkeys from firing for disabled buttons
Reported by: Angen
Accepted By: Angen
Refs #6042

Differential Revision: https://code.wildfiregames.com/D4013
This was SVN commit r25545.
2021-05-25 06:10:53 +00:00
vladislavbelov 8742fac032 Reorders GL error checks during a frame to ask only when needed, combines depth test switches.
This was SVN commit r25543.
2021-05-24 21:03:48 +00:00
Imarok 1fd940b3d0 Adjust position of replay filters
Differential Revision: https://code.wildfiregames.com/D4010
This was SVN commit r25542.
2021-05-24 20:04:28 +00:00
vladislavbelov 3e5638e548 Removes hardcoded 1px width borders from GUI sprites.
Tested By: Imarok
Differential Revision: https://code.wildfiregames.com/D4008
This was SVN commit r25541.
2021-05-24 18:42:51 +00:00
wraitii 8054097daf Mouse event mask for the diplomacy colors button
Differential Revision: https://code.wildfiregames.com/D4011
This was SVN commit r25540.
2021-05-24 12:09:30 +00:00
wraitii 581e5b8752 Remove differences in territory decay rates.
Structures now decay in the same time span, including walls/palisades.
This buffs houses/storehouses against capture slightly.

Exceptions:
- Fortresses decay 4 times slower (but, as of now, they are also
territory roots).
- Wonders decay 4 times slower.

Differential Revision: https://code.wildfiregames.com/D3993
This was SVN commit r25539.
2021-05-24 10:45:38 +00:00
wraitii 0e234dbb61 Check translations for spam, broken font tags and sprintf errors.
Supersedes D1674 and D3520.

This still generates some false positives (particularly the
singular-plural check), but in general it will suffice to better check
bundled languages.

Refs #4250

Differential Revision: https://code.wildfiregames.com/D3926
This was SVN commit r25538.
2021-05-24 10:25:19 +00:00
vladislavbelov 768313d7db Adds Vulkan check to HWDetect reports.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3429
This was SVN commit r25535.
2021-05-23 22:32:29 +00:00
Imarok 4e8691acde Clip rendered text correctly
General idea acked by: vladislavbelov
Tested by: Langbart
Differential Revision: https://code.wildfiregames.com/D4006
This was SVN commit r25534.
2021-05-23 22:05:17 +00:00
vladislavbelov 1e18a93302 Removes using shared_ptr to make STL usages consistent.
Differential Revision: https://code.wildfiregames.com/D4005
This was SVN commit r25533.
2021-05-23 22:01:18 +00:00
Angen c1f8e74717 Add Filter placeholder text to modio filter field
Differential revision: D4000
Reviewed by: @Imarok
This was SVN commit r25532.
2021-05-23 08:55:38 +00:00
vladislavbelov 10cf87f3d1 Adds std namespace to shared_ptr usages in lib/tex.
This was SVN commit r25530.
2021-05-22 19:34:39 +00:00
vladislavbelov 5656c4117d Adds std namespace to shared_ptr usages in lib.
This was SVN commit r25529.
2021-05-22 19:32:38 +00:00
vladislavbelov b927f163d6 Adds std namespace to shared_ptr usages in scriptinterface and simulation.
This was SVN commit r25528.
2021-05-22 19:30:18 +00:00
vladislavbelov d9d19543b5 Adds std namespace to shared_ptr usages in network and engine.
This was SVN commit r25527.
2021-05-22 19:28:40 +00:00
vladislavbelov babfd913fb Adds std namespace to shared_ptr usages in gui and sound.
This was SVN commit r25526.
2021-05-22 19:23:03 +00:00
vladislavbelov b03b560e71 Adds std namespace to shared_ptr usages in graphics.
This was SVN commit r25525.
2021-05-22 19:21:33 +00:00
vladislavbelov 0728c58a4d Removes unnecessary z-level from GUI sprite rendering.
Tested By: Imarok
Differential Revision: https://code.wildfiregames.com/D4003
This was SVN commit r25524.
2021-05-22 18:06:18 +00:00
vladislavbelov 2111f864d4 Removes dehydra build scripts following 53369d593b. Fixes #4446
Refs d7a057143d.

This was SVN commit r25523.
2021-05-22 14:25:53 +00:00
vladislavbelov faca950e83 Removes unused CONFIG2_CACHE_READ_ONLY config macro forgotten in 2374caac3e.
Refs 149ebb67c0, 9269be9ee3.

This was SVN commit r25522.
2021-05-22 14:04:11 +00:00
vladislavbelov 53369d593b Removes Dehydra config macro. Introduced in 378bd89c1d.
Dehydra was abandoned in 2010s.

This was SVN commit r25521.
2021-05-22 13:28:55 +00:00
vladislavbelov 0812ded348 Removes unused CONFIG_OMIT_FP config macro forgotten in 0d23e3f333.
This was SVN commit r25520.
2021-05-22 13:18:15 +00:00
vladislavbelov c73f674055 Removes unused DynHashTbl. Last usage was removed in 6c915291cc.
STL or Boost provides containers with DynHashTbl's functionality (and
not worse performance). Refs 9fd08fb044, 5ca66fc757.

This was SVN commit r25519.
2021-05-22 12:59:41 +00:00
vladislavbelov b5535c4ba3 Removes OpenMP from external libraries. It's better to avoid its usage with a custom thread management.
This was SVN commit r25518.
2021-05-22 12:24:18 +00:00
wraitii 80a8c3827b Fix CanAttack for mirages following 88549e77e1
CanAttack queries the miraged Resistance which did not exist, thus
failing.
This mirages Resistance explicitly (fixing parts of #5883)

Fixes 88549e77e1, reverts the mirage.xml change in 738b200dda

Refs #5883

Reported by: Asger_Spear
Differential Revision: https://code.wildfiregames.com/D4001
This was SVN commit r25517.
2021-05-22 10:56:40 +00:00
wraitii c535a282ac Rename ModsLoaded to EnabledMods
Differential Revision: https://code.wildfiregames.com/D3987
This was SVN commit r25516.
2021-05-22 09:50:30 +00:00
wraitii d7a4fb7c20 Try to punch a hole through local firewalls, and fallback to localhost.
Fixes (probably rare) regression in 2034136560.

Differential Revision: https://code.wildfiregames.com/D3999
This was SVN commit r25515.
2021-05-22 08:34:00 +00:00
Freagarach 0dfebc8d2b Let PetraAI check for different templates when finding the best dropsite.
Loops buildable templates to find the best.

Differential revision: https://code.wildfiregames.com/D3876
Comments by: @Angen, @Stan, @wraitii
This was SVN commit r25514.
2021-05-22 07:53:47 +00:00
Freagarach 494d12fb9c Let PetraAI check for droppable resources when finding the best dropsite location.
Instead of hardcoding resources.

Differential revision: https://code.wildfiregames.com/D3874
Comments by: @Angen, @Stan
This was SVN commit r25513.
2021-05-22 07:51:08 +00:00
Freagarach 012ac9f36b Add rated game information to the objectives dialog.
So an joined observer can see that information.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D3964
Comment by: @wraitii
Idea accepted by: @asterix
This was SVN commit r25512.
2021-05-22 07:39:17 +00:00
Freagarach 340aa419f4 Deduplicate add/remove entity to/from AIs resource map.
Also moves the function to the shared_script, since that is the
prototype it uses and the function doesn't use anything of the
terrain_analysis (as per @Angen's request).

Differential revision: https://code.wildfiregames.com/D3906
Comments by: @Angen, @wraitii
This was SVN commit r25511.
2021-05-22 07:35:16 +00:00
wraitii 8f8e29c092 Fix incompatible mods start: show both incompatible and enabled mods;
As noted by Angen in a26535d023, refs 3bcf360107
When starting with incompatible mods, the non-incompatible mods were no
longer shown. This fixes that.
I think the code looks cleaner from this new control flow that
explicitly only mounts "mod".

Tested by: Angen
Differential Revision: https://code.wildfiregames.com/D3996
This was SVN commit r25510.
2021-05-22 07:33:49 +00:00
Freagarach 3548feb16a Fix entities receiving double hunt order only attacking.
Caused by: 293cd95ccb.
Noticed by @Asger and @Kate.
Special case hunting.

Differential revision: https://code.wildfiregames.com/D3986
Comment by: @wraitii
This was SVN commit r25509.
2021-05-22 05:27:51 +00:00
vladislavbelov 2be76d52b5 Reduces CConsole interface and simplifies the initialization step.
This was SVN commit r25507.
2021-05-21 23:10:43 +00:00
vladislavbelov d7ac3c6b89 Removes macOS system version include added in 7e87211d91 and forgotten in 9a2d0f803e.
This was SVN commit r25506.
2021-05-21 21:46:01 +00:00
Imarok b2e1181982 Partly revert 5f1f768ed5.
The underlying cause was fixed by 8eb4871c9b.
Reviewed by: wraitii
Differential Revision: https://code.wildfiregames.com/D3836
This was SVN commit r25505.
2021-05-21 21:37:07 +00:00
vladislavbelov 7ae43c149e Replaces global g_VSync state by VideoMode property.
This was SVN commit r25504.
2021-05-21 21:33:43 +00:00
vladislavbelov b2d0bd9a81 Adds a warning in case ShaderManager is trying to load an ARB shader with enabled GLSL.
This was SVN commit r25503.
2021-05-21 20:32:33 +00:00
vladislavbelov 4215533ea9 Removes inclusionPath forgotten in b469983c58.
This was SVN commit r25502.
2021-05-21 20:15:58 +00:00
vladislavbelov 78aedfcb93 Removes unused declarations of g_xres and g_yres.
This was SVN commit r25501.
2021-05-21 20:02:03 +00:00
vladislavbelov fa44b9ae97 Removes g_ShowPathfindingOverlay forgotten in 72bd886f80.
This was SVN commit r25500.
2021-05-21 19:27:43 +00:00
vladislavbelov 312225570f Removes g_AutostartMap forgotten in c684c211a2.
This was SVN commit r25499.
2021-05-21 19:21:24 +00:00
vladislavbelov 7cf579c597 Removes g_TriPathfind forgotten in d3048906cb.
This was SVN commit r25498.
2021-05-21 19:11:12 +00:00
vladislavbelov 5be764e384 Removes outdated archive trace code forgotten in 63086f4e26.
This was SVN commit r25497.
2021-05-21 19:05:40 +00:00
Stan fe4890e0b2 Improved particles by @wowgetoffyourcellphone
This was SVN commit r25496.
2021-05-21 10:49:11 +00:00
Stan 9756fb3dad Darker AO for the stone quary
This was SVN commit r25495.
2021-05-21 10:42:20 +00:00
Stan 274fadaf30 More consistent animal portraits by @wowgetoffyourcellphone
This was SVN commit r25494.
2021-05-21 10:41:41 +00:00
Stan bdfacbfdd3 Add a round 9x9 decal
This was SVN commit r25493.
2021-05-21 10:40:20 +00:00
Stan 15140751a7 Improved farm decals by @wowgetoffyourcellphone
This was SVN commit r25492.
2021-05-21 10:33:13 +00:00
Stan 19f7db1681 Remove the floating property from shipwrecks.
Patch by: @wowgetoffyourcellphone
EOL native.

This was SVN commit r25491.
2021-05-21 09:49:32 +00:00
Stan db829373cb Add new cliff textures
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25490.
2021-05-21 09:23:08 +00:00
Stan 809dba254a Add new indian biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25489.
2021-05-21 09:22:17 +00:00
Stan 70a6826b51 Add new nuba biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25488.
2021-05-21 09:21:22 +00:00
Stan e10fa5b80f Add new saharan biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25487.
2021-05-21 09:19:46 +00:00
Stan b5a1e9ba51 Add new steppe biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25486.
2021-05-21 09:18:20 +00:00
Stan b00f000477 Add new sudd biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25485.
2021-05-21 09:16:38 +00:00
Stan 91e244d364 Add new temperate europe biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25484.
2021-05-21 09:15:47 +00:00
Stan 8e3ef8dd8f Add new aegean alpine arctic biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25483.
2021-05-21 09:12:35 +00:00
Stan baeceab0c8 Add new aegean anatolian biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25482.
2021-05-21 09:11:42 +00:00
wraitii 0aedcced74 Remove Gate/Defensive from ram preferred classes
This leaves them with 'Structure', undifferentiated. This avoids the
issue reported in #6096 that rams can try to hit unreachable buildings
indefinitely.

Based on a patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3684
This was SVN commit r25481.
2021-05-21 07:47:54 +00:00
wraitii b6f2dee43b Increase pushing range by 60%
Reduces the 'clumpiness' of units, particularly when ordered to move to
a single point. The minimum pushing force was increased to compensate.

Differential Revision: https://code.wildfiregames.com/D3978
This was SVN commit r25479.
2021-05-21 07:23:47 +00:00
Freagarach 37c8e9caa8 Allow right-clicking to show template panel on queued items.
Request at:
https://wildfiregames.com/forum/topic/40311-a24a23-context-information/.

Differential revision: https://code.wildfiregames.com/D3983
This was SVN commit r25478.
2021-05-21 07:11:05 +00:00
Freagarach e1f9304601 Fix alpine biome in Wild Lake RM.
After 8ee6774d12.

Differential revision: https://code.wildfiregames.com/D3984
This was SVN commit r25477.
2021-05-21 07:07:47 +00:00
wraitii a26535d023 Fix mistake in 3bcf360107 which stopped the incompatible mods page from showing.
I didn't quite understand what was supposed to happen here. This makes
things work as before.
While at it, fix a conversion bug & do some more tweaks.

Differential Revision: https://code.wildfiregames.com/D3990
This was SVN commit r25475.
2021-05-20 17:11:26 +00:00
wraitii 3bcf360107 Mod and mod-mounting cleanup and improvements.
- Non-visual replays now automatically try to load the replay mods. This
removes the annoyance that -mod=public usually had to be passed.
- MountMods is no longer called in InitVfs but later, making it possible
to load the game in one pass & simplifying things considerably.
- Explicitly ignore duplicates when loading mods
- Interface cleanup: failed mods and incompatible mods were redundant,
only incompatible mods is kept.
- Interface cleanup: `AreModsCompatible`becomes
`CheckForIncompatibleMods`, which becomes a private pure function,
simplifying the control flow somewhat.
- Interface cleanup: `CheckAndEnableMods` is just `EnableMods`, which
explicitly updates loaded & incompatible mods.
- `CacheEnabledModVersions` becomes private and is called on behalf of
the user, removing the need to be careful about updating that (fixes my
concern at 44ec2e324e)

Overall, the logic around mounting & enabled mods should be easier to
understand.

Differential Revision: https://code.wildfiregames.com/D3982
This was SVN commit r25474.
2021-05-20 14:36:42 +00:00
vladislavbelov 1e297fe212 Fixes PCH after 7bfcd9f78b.
This was SVN commit r25473.
2021-05-20 11:47:56 +00:00
Stan 21b7e8faaf Better quality acacia trees by @Sundiata. Needed for the map overhaul.
This was SVN commit r25472.
2021-05-20 11:26:49 +00:00
wraitii eda2901a33 Translate the default campaign name in NewCampaignModal
Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3977
This was SVN commit r25471.
2021-05-20 10:03:51 +00:00
Freagarach 5e6038eeaf Change the visuals of the counters in the top panel.
- Abbreviate large numbers (fixes #6063).
- Added popMax to the population counter.
- Also show `0` gatherers, highlights and changes the font.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D3911
Reviewed by: @Angen, @Freagarach
Comments by: @asterix, @nwtour, @s0600204, @wraitii
This was SVN commit r25470.
2021-05-20 08:55:08 +00:00
wraitii 04549a081d Rework Mod into a class.
`Mod` currently modifies 4 global arrays, including some that are
'public'.

The logic flow is easier to understand if this becomes a real class with
const-correctness and public/private methods.

Differential Revision: https://code.wildfiregames.com/D3981
This was SVN commit r25469.
2021-05-20 08:32:11 +00:00
Freagarach 13c1b55f42 Fix UnitAI states in PetraAI.
Sometimes PetraAI relies on UnitAI state of an entity, but those were
not changed after modifying UnitAI.
Introduced in ea96e81098 and 3579097d95.

Differential revision: https://code.wildfiregames.com/D3976
This was SVN commit r25468.
2021-05-20 08:31:30 +00:00
wraitii 453fe486de Triggers: prevent event names from conflicting with added methods
Refs c0157d613d / D3913 which removed the 'actions' suffix. The reason
for this suffix was probably avoiding this type of conflict, but this
new solution does a better job.

Fixes (at least) Survival of the Fittest, which used an
OnOnwershipChanged trigger.

Differential Revision: https://code.wildfiregames.com/D3979
This was SVN commit r25467.
2021-05-20 08:26:04 +00:00
vladislavbelov 575cd6c953 Removes unused uniforms and attributes from water shader.
This was SVN commit r25466.
2021-05-19 21:51:36 +00:00
wraitii 88549e77e1 Require 'Resistance' in CanAttack
This was already effectively the case, so this change increases
coherence.

Accepted By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3980
This was SVN commit r25465.
2021-05-19 12:36:22 +00:00
wraitii 1619be9902 Differentiate movement speeds of ranged cavalry
Ranged cavalry goes from a base 0.89 walkspeed multiplier to:
- 0.8 for crossbowmen
- 0.85 for archers
- 0.9 for javelineers

The intention is to nerf archers slightly.

Patch By: Nescio
Accepted By: ValihrAnt, chrstgtr
Differential Revision: https://code.wildfiregames.com/D3758
This was SVN commit r25464.
2021-05-19 08:21:05 +00:00
wraitii 5d1d2d27d7 Outposts have vision without garrisoning again.
Reverts D2986 / f9f7b4d49f.

Outposts have 90 base vision, increasing to 120 with the 'Carrier
pigeon' technology.
Outposts no longer decay in neutral territory, thus not needing
garrisoning. To compensate, they decay 10x faster in enemy territory.

Differential Revision: https://code.wildfiregames.com/D3898
This was SVN commit r25463.
2021-05-19 08:13:35 +00:00
Freagarach 9093e7bbe2 TreasureCollecter -> TreasureCollector.
Noticed by @Stan on ea96e81098.

Differential revision: https://code.wildfiregames.com/D3949
This was SVN commit r25461.
2021-05-18 16:51:44 +00:00
Freagarach 4195205904 Use a set for the selection internals.
Avoids recreating an object and frequent casting.
Allows some optimisations.
Simplifies some calls.

Differential revision: https://code.wildfiregames.com/D3934
Comment by: @Stan
This was SVN commit r25460.
2021-05-18 15:56:47 +00:00
wraitii 7bfcd9f78b Additional entropy when hashing match passwords.
The purpose of our client-side hashing for lobby game passwords is to
prevent malicious hosts from getting valuable passwords from clients
(e.g. accidentally typing their lobby password instead of the game, or
even their email password, etc).
However, the hashing was deterministic (and rather simple), making it
possible to compute rainbow tables and recover user passwords anyways.

By adding more variation, including some that cannot so easily be
controlled by the host (the client name), this becomes impractical. The
password hashing function used is rather fast, but given the base low
probability of mistypes, this seems fine.

Differential Revision: https://code.wildfiregames.com/D3459
This was SVN commit r25459.
2021-05-18 14:47:36 +00:00
wraitii 40f9372d29 Allow decaying only in enemy territory.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3969
This was SVN commit r25458.
2021-05-18 12:43:01 +00:00
wraitii 0c23e595fa Include CStrInternStatic where necessary only.
This makes incremental recompilation faster when changing static
interned strings.

Differential Revision: https://code.wildfiregames.com/D3975
This was SVN commit r25457.
2021-05-18 11:09:54 +00:00
Freagarach 3939e0f035 Fix autostart without default difficulty.
If a default difficulty is given by the map, use that. Else use the
default of the game.

Patch by: @JCWasmx86
Differential revision: https://code.wildfiregames.com/D3951
This was SVN commit r25455.
2021-05-17 15:59:05 +00:00
Freagarach 4f2e730d3c CodingConventions: Prefer using const on immutable values.
Using `const` for values that should not be changed is considered a good
practice (https://eslint.org/docs/rules/prefer-const).

Forum poll:
https://wildfiregames.com/forum/topic/38347-codingconventions-use-const-instead-of-let-for-immutable-values-in-functions/
Differential revision: https://code.wildfiregames.com/D3950
Comments by: @bb, @Stan, @wraitii
This was SVN commit r25454.
2021-05-17 15:50:16 +00:00
wraitii 895e4e6aa6 StunClient code cleanup: use enet functions, endianness
Instead of using platform-specific sockets, use enet_socket* functions
(which ends up doing the same).
Clean up some confusing APIs, removing the distinction between finding
the public IP for the host/join.

Fix endianness support & use simpler code.

Refs D364 / 61261d14fc (and some subsequent fixing diffs).

Differential Revision: https://code.wildfiregames.com/D3970
This was SVN commit r25453.
2021-05-17 15:14:10 +00:00
wraitii f1467d10fd Make pathfinder debug rendering thread-safe.
Also cleans up the jump point cache const-correctness.

Differential Revision: https://code.wildfiregames.com/D3966
This was SVN commit r25452.
2021-05-17 09:38:24 +00:00
vladislavbelov 8b6d4233eb Disables by default Intel Mesa workaround to save video memory.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/DD3967
This was SVN commit r25449.
2021-05-16 19:08:28 +00:00
wraitii 2034136560 Implement a workaround for routers without NAT loopback.
This allows joining a lobby game hosted on the same network (behind the
same NAT gateway).
This is relatively primitive to keep things simple: if the server and
the client have the same public IP, it is assumed that they are on the
same network and the client instead requests the local IP.

Differential Revision: https://code.wildfiregames.com/D3944
This was SVN commit r25448.
2021-05-16 15:34:38 +00:00
wraitii a19dc1717f Don't include ComponentManager.h in ScriptComponent
ScriptComponent does not use ComponentManager, and its derived classes
(most ICMP*.cpp files) do not either. Therefore, we can skip a lot of
transitive inclusions and speed up recompiling by not including it
there.

Differential Revision: https://code.wildfiregames.com/D3962
This was SVN commit r25447.
2021-05-16 15:12:39 +00:00
wraitii e908733220 Speed up GetAvailableMods for archives.
Refs 64bfa089af and 44ec2e324e

When a .zip file is encountered by the VFS population, it reads the info
for all files in the archives. This is quite slow for the public archive
(400-500ms on my computer), which means calling GetEngineInfo()
repeatedly is impossible.

By only opening the external mod.json, we skip most of the work. The
archive can still be opened if needed as fallback.


Differential Revision: https://code.wildfiregames.com/D3216
This was SVN commit r25446.
2021-05-16 13:50:05 +00:00
vladislavbelov 5ff4fa19c0 Removes unused and outdated includes, replaces some includes by forward declarations.
This was SVN commit r25444.
2021-05-15 17:27:01 +00:00
vladislavbelov 41a29a590a Fixes broken PCH after wraitii commits (4f972bc623, 0f60bf3a97) and Itms (833c9f108c).
This was SVN commit r25443.
2021-05-15 14:50:24 +00:00
wraitii 507f44f7f9 Remove all external usage of CmptPrivate. Header cleanup.
This removes usage of CmptPrivate outside of ScriptInterface.
ScriptRequest can now be used to safely recover the scriptInterface from
a JSContext instead of going through ScriptInterface, which allows more
code cleanup.

Follows 34b1920e7b

Differential Revision: https://code.wildfiregames.com/D3963
This was SVN commit r25442.
2021-05-15 13:54:58 +00:00
vladislavbelov 3ebff376cc Adds view bounds test for an ortho camera and removes commented code after 44f8d2c6f5.
This was SVN commit r25441.
2021-05-15 13:47:48 +00:00
vladislavbelov 44f8d2c6f5 Fixes a bounding box projection to an incorrect camera causes the red water bug.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D3905
This was SVN commit r25440.
2021-05-15 13:33:36 +00:00
Freagarach 6b0802836a Fix duplicating promoting entities in XP trickling structures.
The entity received a value modif. message while promoting, triggering a
second promotion.

Differential revision: https://code.wildfiregames.com/D3918
Fixes: #6162
Comments by: @Angen, @Stan
This was SVN commit r25439.
2021-05-15 05:40:13 +00:00
Stan 66c75068bc Fix broken non pot texture by @m7600
Reported by: @nwtour
Fixes: #6177 and 318a5d7a2b

This was SVN commit r25437.
2021-05-14 18:06:00 +00:00
Stan 79e294ec06 Make fruit (berries and some fruit trees)'s obstructions smaller.
Patch by: @nani
Liked by: @ffffffff
Tested by: me and @Langbart
Differential Revision: https://code.wildfiregames.com/D3957
This was SVN commit r25436.
2021-05-14 15:13:55 +00:00
wraitii cf5c815879 Fix 4f972bc623
Shouldn't make last-minute changes without recompiling...

This was SVN commit r25435.
2021-05-14 11:12:07 +00:00
wraitii 4f972bc623 Split off JSON-related function from ScriptInterface, clean up headers.
Follows 34b1920e7b.

JSON functions and ToString are movec to their own headers.
Also clean out a few PersistentRooted usage to use the 2-phase init to
clean up scriptInterface usage.

With these functions split off, we can finally clean out headers and
remove ScriptInterface.h from most of them, in favour of smaller and
more precise headers.


Take the opportunity to clarify some comments regarding Mutability.

Differential Revision: https://code.wildfiregames.com/D3961
This was SVN commit r25434.
2021-05-14 10:18:03 +00:00
wraitii f368e1a69e Remove unused m_rng member from ScriptInterface.
The one in ScriptInterface_Impl is actually used.
Introduced in e9e05f4efc and from what I can tell never actually used.

Differential Revision: https://code.wildfiregames.com/D3960
This was SVN commit r25433.
2021-05-14 09:27:12 +00:00
wraitii 0f60bf3a97 Split off Object-related functions from ScriptInterface
Follows 34b1920e7b.

This splits off the object-related functions, such as
[Set/Get/Has]Property, CreateObject, CreateArray, FreezeObject.

It also puts the definitions in the header itself, which might end up
with faster code here & there, though perhaps slower compilation time
(somewhat doubtful since we already included most things anyways).

Differential Revision: https://code.wildfiregames.com/D3956
This was SVN commit r25430.
2021-05-13 17:23:52 +00:00
Stan cb263b9f26 Add a decal to the berry bushes to make them more visible and make the fruits bigger
Suggestions by: @m7600, @wraitii, @JCWasmx86
Reported by: @Yekaterina
Thread:
https://wildfiregames.com/forum/topic/39973-a25-feedbacks-from-testing/

This was SVN commit r25429.
2021-05-13 11:19:37 +00:00
wraitii 61e0aef0b4 Split JS conversions from ScriptInterface.
All ToJSVal/FromJSVal definitions are put in a separate header.
Remove AssignOr[To/From]JSVal duplication.

The functions were already static so this is rather straightforward.

Follows 34b1920e7b and 2bae30c454

Differential Revision: https://code.wildfiregames.com/D3953
This was SVN commit r25428.
2021-05-13 09:43:33 +00:00
wraitii d798a2ec0e Fix crash in Atlas.
Fixes 6fbf036ae4

Reported by: Stan
Differential Revision: https://code.wildfiregames.com/D3954
This was SVN commit r25425.
2021-05-12 19:25:09 +00:00
user1 dd19cc3444 Major improvements to the lobby bots XpartaMuPP and EcheLOn.
Reviewers: elexis, Dunedan

Fixes: #5914

Differential Revision: https://code.wildfiregames.com/D2630
This was SVN commit r25424.
2021-05-12 15:40:50 +00:00
Stan 4ad78018f9 Fix no-pch build. Potentially fixes bb49fbe793, 0198942a79, 34b1920e7b, 8b08f4ae7a 0dbf417171, 3af1fc64d2, 5fbdbaa3bc, 6fbf036ae4.
Comments by: @vladislavbelov, @wraitii.
Differential Revision: https://code.wildfiregames.com/D3948
This was SVN commit r25423.
2021-05-12 13:48:55 +00:00
bb 412e870c55 Add defeat condition on civil centre loss
Somewhat obsoleting 171afdc7a6.

Reviewed By: Freagarach
Comments By: Stan, Nescio and wowgetoffyourcellphone
Differential Revision: D3530
This was SVN commit r25422.
2021-05-12 13:34:50 +00:00
Freagarach 441c122331 Fix collecting treasures near position.
Also refactors the order a bit to be more equal to other orders.
Removes the `autocontinue` because it was not useful (since that is more
about doing other tasks than the one ordered).
Follows ea96e81098 97addf2aa7.

Differential revision: https://code.wildfiregames.com/D3942
Tested by: @Langbart
Fixes: #6175

This was SVN commit r25421.
2021-05-11 07:41:40 +00:00
wraitii 6fbf036ae4 Split off StructuredClone from ScriptInterface
Follows 34b1920e7b.

This separates StructuredClone & DeepCopy logic into its own header,
reducing the size of the monolithic ScriptInterface header.

Differential Revision: https://code.wildfiregames.com/D3922
This was SVN commit r25419.
2021-05-10 11:51:32 +00:00
wraitii ad62707eef Ensure rated game and cheat won't be enabled at the same time.
Reported by: Freagarach
Differential Revision: https://code.wildfiregames.com/D3943
This was SVN commit r25418.
2021-05-10 07:49:30 +00:00
wraitii 5fbdbaa3bc Fix 3af1fc64d2 - incorrect texture path on Windows.
sizeof(const char*) returns the pointer size and not the string size,
and 'texture:' happend to be 8 characters long, which is the same as a
64-bit pointer but not a 32-bit pointer.

Reported by: Stan
Differential Revision: https://code.wildfiregames.com/D3947
This was SVN commit r25415.
2021-05-09 17:29:50 +00:00
Angen b4d11bda89 Fix warnings and missing break from f1acd22455
make linter happy
add missing break to loop if correct comparator has been found, reported
by @Langbart

Differential revision: D3945
Tested by: @Langbart
This was SVN commit r25414.
2021-05-09 17:05:02 +00:00
wraitii 8f8996e338 Allow registering custom data for triggers
This allows easier handling of e.g. range triggers calling into the same
function.

The original trigger data is also forwarded for convenience.

Differential Revision: https://code.wildfiregames.com/D3904
This was SVN commit r25413.
2021-05-09 16:55:36 +00:00
wraitii f653541e2c Fix warnings in 3af1fc64d2
Differential Revision: https://code.wildfiregames.com/D3946
This was SVN commit r25412.
2021-05-09 16:24:13 +00:00
Angen f1acd22455 Do not allow to start pyrogenesis with incompatible mods
Fixing following problems:
Issue number one:
Enable mod with a23 compatibility in a23b.
Save configuration.
Start a24.
Better result:
Mod will be enabled and invisible in mod selection screen producing
various errors.
Worse result:
Game will crash and refuse to start.

Issue number two:
Mods can silently set loaded mods without restarting the engine, so mods
can unlist themselves from compatibility detection.

Solution:
Enable necessary mods instead if running with gui and open mod page.
Open information window on top of mod page to infom why mod page is
showing up.
On mod page show mods which failed in compatibility check and color the
resposnible ones.
Disable start button without enabled mods.
Show non existed mods if they failed in compatibility check.

Else just log to mainlog and close.

Another fixes:
Display in enabled mods really enabled mods as current logic confuses
players about which mods they have enabled and is not helpful (ref
#4881)

Note:
this will not solve issue with mods claiming being compatible with
engine version while in fact being incompatible.

Comments by: @vladislavbelov, @Stan, @Imarok
Tested by: @wraitii
Differential revision: D3592
Fixes: #6044 #4881

This was SVN commit r25410.
2021-05-09 13:53:25 +00:00
Angen 933b331c1b Hide icon for matches without password
This should help with better visual experience.
Icon introduced in c2155e31c0.

Differential revision: D3939
Fixes: #6153

This was SVN commit r25409.
2021-05-09 13:47:03 +00:00
wraitii 3af1fc64d2 Allow GUI elements to define custom mouse event mask shapes.
This allows GUI elements to use a texture as their "mouse event mask",
making it possible to have arbitrarily-shaped GUI elements with regards
to mouse interactions.

Used for the minimap idle worker button as a proof-of-concept.

Differential Revision: https://code.wildfiregames.com/D3814
This was SVN commit r25408.
2021-05-09 13:08:07 +00:00
wraitii e94faf7827 Don't hardcode the "0ad" resource into lobby XMPP & hosting
XMPP JID has a concept of 'resources', which can be used to
differentiate multiple clients of the same account.

We currently hardcode this 'resource' to '0ad' in two places:
- The 0 A.D. client always uses '0ad'
- The network code expects a host resource to be '0ad' when connecting.

As noted in 0fd8aa2a77#31215, it is less effort to store the JI
D directly. This patch does that. It also makes 0 A.D. use a different
resource each time.
Note that resources ought not contain particular information, as the
XMPP server is free to
 clobber it. I keep '0ad-' here for debug purposes.

This allows:
- multiple 0 A.D. instances to log on the lobby at the same time (not
massively useful, but good for debugging sometimes)
- hosting a game with a custom resource, which will potentially make it
easier to have dedi
cated servers on one account.

Note that hosting multiple games on one account is currently not
supported and will have weird behaviour on the lobbybots side. They
should be upgraded independently of this.

Refs #3556

Differential Revision: https://code.wildfiregames.com/D3500
This was SVN commit r25407.
2021-05-09 12:51:32 +00:00
wraitii 88810524b3 Make it explicit that technology specific names expect an object.
Simple strings would trigger errors.

Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3921
This was SVN commit r25406.
2021-05-09 12:46:58 +00:00
wraitii abb124a36f Fix cpuid call with -fPIC on i386 architectures.
GCC < 5 used to reserve the ebx register for PIC (position-independent
code) metadata. This meant that we needed to save the state of ebx
before calling cpuid (fixed in #2675)
However, the original patch from 03eaf9b461 did not force a particular
register to store this value in. Following the GCC 5 upgrade, GCC
stopped reserving ebx, and that register silently got used instead. The
code became non-sensical, and our ASM __cpuidex started returning random
garbage in edx.

Since we now only support GCC7 and above, the PIC-specific branch is no
longer necessary and is removed.

Fixes #6028. The assertion was a result of random data in ebx.
Refs #2675 / reverts 6334ee3f8b and reverts 03eaf9b461.

Patch by: nwtour
Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3575
This was SVN commit r25405.
2021-05-09 12:41:45 +00:00
wraitii 1e1af6e2df Separate campaign replays in replay page & fix for i18n
The 'map name' dropdown filter did not work in localised interfaces.

Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3883
This was SVN commit r25404.
2021-05-09 08:39:38 +00:00
s0600204 14324b8918 Fix auto-complete chat entries for Biome names in GameSetup
The line altered here was returning an Array of Objects. This array
would
eventually passed to code that expected it to be an Array of Strings.
This was
causing an error to thrown that could be replicated by going to the
Multiplayer
GameSetup, entering text (e.g. "Winter", "Dry", "lol") into the chat
field, and
pressing `Tab` to trigger the auto-complete.

This line now returns an Array containing the user-facing names of the
Biomes
available to the selected map (if it has them), which is what this
method was
returning prior to dc18d94030.


Related: dc18d94030, dc18d94030

This was SVN commit r25403.
2021-05-08 20:45:20 +00:00
wraitii 0dbf417171 Fix 8b08f4ae7a - CGUIColor setting
Reported by: langbart
Fixes #6173

Differential Revision: https://code.wildfiregames.com/D3937
This was SVN commit r25401.
2021-05-07 11:34:20 +00:00
Freagarach f008edea73 Fx low resource supply tricking AI.
Strength was floored, resulting in possibility for `0`, which was not
handled gracefully by the map.
Since the strength is multiplied by something that can be non-integer in
the map, the floor is not needed.

Differential revision: https://code.wildfiregames.com/D3884
Comments by: @Angen, @smiley
This was SVN commit r25400.
2021-05-07 09:07:20 +00:00
Freagarach a18d97b047 Let team bonuses also apply to own player.
Requested in D3810 (and other places).
It was weird that e.g. the Romans gave their allies a training bonus but
lacked that themselves.

Differential revision: https://code.wildfiregames.com/D3899
Reviewed by: @ValihrAnt
Comment by: @darkcity
Idea approved by: @wraitii
This was SVN commit r25399.
2021-05-07 08:48:51 +00:00
Freagarach 2dfc8681d2 Fix returning resources by formation members.
Noticed by @mysticjim.
Introduced in 21645f5c1c.

Differential revision: https://code.wildfiregames.com/D3931
Differential revision: D3838
Fixes: #6170
Reviewed by: @wraitii
This was SVN commit r25397.
2021-05-07 07:05:57 +00:00
Freagarach d2d0c6b347 Some small fixes for the AutoQueue feature.
51ab4315ff
Fix using the hotkey on entities that don't have a Production Queue.
Fix showing the icon on entities that don't produce entities.

Differential revision: https://code.wildfiregames.com/D3932
Fixes: #6172
Comment by: @wraitii
Tested by: @Langbart
This was SVN commit r25396.
2021-05-07 07:01:39 +00:00
wraitii 64b475b390 Fix Profiler1 "time per turn".
Actually call Turn() when a turn is processed.

Fixes #6144

Differential Revision: https://code.wildfiregames.com/D3885
This was SVN commit r25394.
2021-05-06 16:49:34 +00:00
wraitii e0800bc092 Allow toggling repairability.
Useful for trigger maps.

Differential Revision: https://code.wildfiregames.com/D3901
This was SVN commit r25393.
2021-05-06 14:25:33 +00:00
wraitii 8b08f4ae7a Change GUI settings to explicitly be member variables.
Completes work starting in D2313 / a33fd55e81:
- Make C++ mistakes where values can be changed without messages being
sent easier to notice / harder to do.
- Make the IGUISetting interface more flexible, allowing custom settings
implementing their own logic. This is used to clean up hotkey code
introduced in 33af6da5e1.

Side effects:
- FromJSVal_Vector clears the vector being passed in. I have some vague
memory of not doing that in D24 / 2bae30c454 as an optimisation, but it
seems more like a footgun to me.
- Most usage of SetSettingFromString is replaced by direct method calls,
as we can generally cast to the proper GUI object type. Where we can't,
it is kept as a poor's man virtual dispatch.
- It moves a few member variables elsewhere, e.g. TextOwner now gets its
own member variable settings.

Differential Revision: https://code.wildfiregames.com/D3892
This was SVN commit r25392.
2021-05-06 08:22:37 +00:00
wraitii 4db5467717 Fix mistake in 100159548c
I last-minuted a "X = X * Y" into a "X *= Y" but that turns out to map
to "X = Y * X" with our matrix overloads.

Reported by: langbart
This was SVN commit r25391.
2021-05-06 07:42:49 +00:00
Stan c2167ffc7e Differentiate a bit the spart and athen rams.
- Use Athenian Shields
- Reduce Duplication
- Add default material

Patch by: @wowgetoffyourcellphone & @Stan`
This was SVN commit r25390.
2021-05-06 07:17:09 +00:00
wraitii 100159548c Fix bounding boxes after f73fa05542
Skinning calculations must happen in bone-space.

Fixes f73fa05542

Reported by: langbart
Fixes #6168

Differential Revision: https://code.wildfiregames.com/D3927
This was SVN commit r25387.
2021-05-05 16:20:33 +00:00
wraitii 781afea4b1 More broken implicit conversions.
Differential Revision: https://code.wildfiregames.com/D3928
This was SVN commit r25386.
2021-05-05 15:39:44 +00:00
wraitii 8724b86915 Fix macOS boost compilation
Bintray has moved. Also upgrade to 1_76 while at it.

Differential Revision: https://code.wildfiregames.com/D3925
This was SVN commit r25383.
2021-05-05 08:25:01 +00:00
Freagarach 51ab4315ff Enable production entities to autoqueue.
This adds a new command button that enables training of units
automatically.
Use:
- Enable auto-queue.
- Train an entity.

This adds a new item to the queue whenever the previous item starts,
such that good micro is more resource-efficient.

Patch by: @azayrahmad
Differential revision: https://code.wildfiregames.com/D3865
Comments by: @Langbart, @nani, @Stan, @wraitii
This was SVN commit r25381.
2021-05-05 06:12:31 +00:00
wraitii fe3ff1b0ff Map browser fixes and improvements
- 'Random' map is filtered correctly
 - When in 'fallback to all' mode, selecting something works (#6165).
 - Fix hotkeys being broken (fixes map browser following 0406c4dfde)
 - Clear filters when reopening the map browser (seems natural).

Based on a patch by: nani
Refs #6045.
Fixes #6165.

Differential Revision: https://code.wildfiregames.com/D3833
This was SVN commit r25379.
2021-05-04 16:40:16 +00:00
wraitii 2e08fd38ea GUI cleanup: XML & child handling.
- We only need an XMBFile, not a CXeromyces to parse GUI
objects/scripts/... This makes the interface more consistent with other
usage, notably ParamNode.
- Rename IGUIObject::AddChild to RegisterChild and flesh out the
interface a little.

Differential Revision: https://code.wildfiregames.com/D3908
This was SVN commit r25378.
2021-05-04 15:17:50 +00:00
wraitii 0198942a79 Fix warning in cdd75deafb
GCC complained, even if the path cannot be taken.

This was SVN commit r25377.
2021-05-04 14:01:18 +00:00
wraitii 911f49c655 Gamesetup: make sure GameSpeed is a number
The dropdown converted the numbers to string, and the code expected
numbers.

Differential Revision: https://code.wildfiregames.com/D3924
This was SVN commit r25376.
2021-05-04 13:59:30 +00:00
wraitii cdd75deafb XMB Improvements, parse JS into XMB, make strings more efficient.
XMB format is bumped to 4, invalidating all cached files. The
differences are:
 - element/attribute names are stored after the elements themselves, and
not before. This allows writing XMB data in one pass instead of two.
 - names themselves becomes offsets (instead of arbitrary integers),
making getting the string from the int name much more efficient.

XMBFile is renamed to XMBData to clarify that it does not, in fact,
refer to a file on disk.

XMBData::GetElementString is also changed to return a const char*, thus
not creating an std::string. A string_view version is added where
convenient.

The XML->XMB and JS->XMB conversion functions and the corresponding
storage are moved to `ps/XMB`, since that format doesn't particularly
relate to XML. CXeromyces becomes lighter and more focused as a result.
The XML->XMB conversion also benefits from the above streamlining.

Note that in a few cases, string_view gets printed to CLogger via
data(), which is generally not legal, but we know that the strings are
null-terminated here. Our libfmt (version 4) doesn't support
string_view, that would be v5.

Differential Revision: https://code.wildfiregames.com/D3909
This was SVN commit r25375.
2021-05-04 13:02:34 +00:00
wraitii a1010b83d3 Enable specifying the trigger action independently of the trigger name.
Trigger functions/actions were tied to the trigger 'identifier'. This is
inconvenient if several triggers should call the same function, e.g. for
range triggers.

By setting an 'action' in the trigger data, one can now specify the
function to call independently of the trigger name.

For clarity, the 'action' parameter in RegisterTrigger is changed to
'name'. By default, the action still matches the trigger name for
compatibility and convenience.

Differential Revision: https://code.wildfiregames.com/D3903
This was SVN commit r25374.
2021-05-04 12:33:45 +00:00
wraitii c0157d613d Simplify trigger event naming scheme.
Reduces confusion and string manipulation.

Refs #52.

Differential Revision: https://code.wildfiregames.com/D3913
This was SVN commit r25373.
2021-05-04 09:46:38 +00:00
Stan 79118e6716 Remove castshadow from decals.
This was SVN commit r25372.
2021-05-04 09:21:32 +00:00
Stan 6663b27fa2 Disable shadows for blood. Since they are decals it doesn't seem to make much difference.
This was SVN commit r25371.
2021-05-04 09:06:13 +00:00
wraitii 2efe255bbd Fix error when hosting lobby game.
Revealed by 0406c4dfde. The fix also avoids sending a redundant
lobbyregistration message.

Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D3923
This was SVN commit r25369.
2021-05-04 08:58:22 +00:00
Freagarach 738b200dda Let entity react on target death directly.
Don't let entities waste a repeat time when they've killed their target.
Done by storing a list of attackers in cmpResistance (since that cmp is
obligatory anyway).

Differential revision: https://code.wildfiregames.com/D2129
Comments by: @Angen, @wraitii
This was SVN commit r25368.
2021-05-04 05:18:11 +00:00
wraitii 34b1920e7b Split ScriptRequest in its own header.
We often only need to include ScriptRequest.h and not the full
ScriptInterface.h

Differential Revision: https://code.wildfiregames.com/D3920
This was SVN commit r25366.
2021-05-03 16:07:26 +00:00
wraitii 0406c4dfde Throw errors instead of warnings on wrong implicit conversions.
This prints out a stack trace, which is quite helpful when debugging.
Also fixes an issue with stack trace not always being reported.

Differential Revision: https://code.wildfiregames.com/D3210
This was SVN commit r25365.
2021-05-03 15:44:06 +00:00
Freagarach 5287dd768d Add some missing credits.
@mysticjim and @Sundiata manage the community, but were not named in
those credits yet.
@Langbart does a lot of valuable work (amongst which is writing patches)
and was not credited at their first patch (my fault).

Differential revision: https://code.wildfiregames.com/D3880
This was SVN commit r25364.
2021-05-03 14:03:43 +00:00
Freagarach 48cb9a2d6f Allow triggers to spawn turreted entities.
After 21e866fcf0.

Differential revision: https://code.wildfiregames.com/D3872
Comments by: @Angen
This was SVN commit r25363.
2021-05-03 08:54:54 +00:00
wraitii bb49fbe793 Further reduce usage of TERRAIN_TILE_SIZE in non-terrain components
TERRAIN_TILE_SIZE is now only used in relevant places in the simulation.
This also makes it mostly possible to use CFixed in constexpr contexts.

Refs #5566

Differential Revision: https://code.wildfiregames.com/D3078
This was SVN commit r25360.
2021-05-02 17:40:00 +00:00
wraitii 6d10a35d97 Fix some warnings.
- 25332f9b86 added 'override' to a method in ShaderProgram.cpp. This
adds it to the rest.
- BinarySerializer.cpp had custom JS includes, because putting those in
ScriptExtraHeaders failed. The cause is that gloox leaves "#define
lookup" up. This has been reported upstream, and fixed here.
- VS17 complains about an uninitialised variable, though the usage is
safe.

Differential Revision: https://code.wildfiregames.com/D3916
This was SVN commit r25359.
2021-05-02 15:45:40 +00:00
wraitii 3801a4dd47 Allow implicit JS boolean -> string conversions.
`false` becomes `"false"`, `true` becomes `"true"`.

Differential Revision: https://code.wildfiregames.com/D3917
This was SVN commit r25358.
2021-05-02 15:43:59 +00:00
wraitii e53628ab56 Remove debug code left in d9748173c7
Reported by: Freagarach
This was SVN commit r25357.
2021-05-02 07:08:40 +00:00
Angen 0ad3dba097 Do not transfer xp twice on Promotion
ChangeEntityTemplate used by Promotion is transfering xp from old unit
to new one, but also Promotion component itself does the same thing.
Introduced in cc1ea7cca0

Differential revision: D3915
This was SVN commit r25356.
2021-05-01 17:40:26 +00:00
vladislavbelov 2fcab79e15 Moves terrain independent code for viewport bounds calculations to camera.
This was SVN commit r25355.
2021-05-01 16:59:42 +00:00
wraitii d46a417748 Replace ScriptInterface::Call* with new ScriptFunction functions
Finishes work started in f3aedf88a6.
This removes the boost-CPP function wrappers entirely, in favour of pure
templated code in FunctionWrapper.h
The Call* functions were already heavily templated, so there is nothing
really new here. I just use tag dispatch to reduce the number of
overloads slightly.

The new functions do not need the script interface, only the script
request.

Differential Revision: https://code.wildfiregames.com/D3912
This was SVN commit r25354.
2021-05-01 14:04:53 +00:00
wraitii d9748173c7 Generalize icon-specific tooltips to a tag, streamline code.
We can currently specify a custom tooltip for an icon. This extends that
to a generic tag `[tooltip='something']...[/tooltip]` for any particular
piece of text, and removes the iconTooltip hardcoding by instead using a
virtual `GetTooltipText` call since all IGUIObject descendants have a
tooltip. This is both cleaner & more efficient.
Removes the ability to set a custom tooltip style (that doesn't seem
particularly useful), it'll reuse the style of the CText itself.

Differential Revision: https://code.wildfiregames.com/D3895
This was SVN commit r25353.
2021-05-01 12:38:05 +00:00
vladislavbelov 9107d6d8c7 Fixes unused CCamera argument in debug rendering in SilhouetteRenderer.
This was SVN commit r25352.
2021-05-01 12:13:48 +00:00
wraitii 8633a28b00 TriggerPoint - default required component is '0'.
Differential Revision: https://code.wildfiregames.com/D3902
This was SVN commit r25351.
2021-05-01 09:02:30 +00:00
wraitii 19b01dc710 Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers.
The main benefits are more convenient code in the component interfaces
TU and no limit on the # of arguments that can be passed.

Differential Revision: https://code.wildfiregames.com/D3910
This was SVN commit r25350.
2021-05-01 08:01:30 +00:00
wraitii c62ad8fefa Implement FromJSVal<IObject*> safely
By making all GUI proxy objects share the same class, we can easily
confirm if a given JS object is one, and from there convert to the
appropriate types.

Differential Revision: https://code.wildfiregames.com/D3907
This was SVN commit r25347.
2021-04-30 13:20:43 +00:00
Freagarach 3579097d95 Count resource gatherers also when returning their resources.
Followup on 1e0a6f66f0.
This gives a better image of the amount of units which are gathering.
By decision, entities are _not_ accounted from when the player tasks
them to return their resources.

Refs. #643
Differential revision: https://code.wildfiregames.com/D3226
Comments by: @wraitii
This was SVN commit r25345.
2021-04-30 06:24:13 +00:00
wraitii 835c081ca4 Fix large slowdown in rendering on some configurations.
Usage of GL_VERTEX_ARRAY client state apparently prevented OpenGL from
using hardware acceleration on my computer (Macos 10.14 with an Intel
GPU).
It is unclear how many people would be affected by this issue, but on my
end it makes GLSL performance competitive with ARB again.

Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3900
This was SVN commit r25343.
2021-04-29 07:38:40 +00:00
wraitii 2ce4c2e7d5 Unify pierce resistance of defensive structures.
Defensive buildings now have 25H/35P/3C resistance.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3757
This was SVN commit r25342.
2021-04-29 07:35:27 +00:00
wraitii f0b2c31533 Buff stone throwers: increased range and HP.
Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3781
This was SVN commit r25341.
2021-04-29 07:32:49 +00:00
wraitii 70149803c5 Introduce a specific limit to domestic animals pop.
- Prevents lag
- Prevents abuse by using animals to break pathfinding.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3777
This was SVN commit r25340.
2021-04-29 07:29:48 +00:00
wraitii b1267f7878 Unify resistances of non-buildable structures.
Resistance is unified to 1H/10P/1C.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3756
This was SVN commit r25339.
2021-04-29 07:27:12 +00:00
wraitii 04d242c456 Introduce an Hoplite tradition tech for Athens/Sparta.
Similar to the archer tradition tech.
Intended to boost usage of melee units.

Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3688
This was SVN commit r25338.
2021-04-29 07:26:00 +00:00
wraitii e3c7c4656a Increase archer spread slightly, introducing a compensating technology.
This new value was last changed in 4a2cc3273e. The new value sits
halfway.
The technology is available at the forge for all civilizations with
archers and independent of the already existing “Archery Tradition”
technology.

Patch by: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3736
This was SVN commit r25337.
2021-04-29 07:22:20 +00:00
wraitii 59168b015e Revert 2e1545ffc4, fix correctly.
This was SVN commit r25335.
2021-04-28 16:38:45 +00:00
Stan c9a7aabbea Fix enabling / disabling shadows in the actor viewer.
Differential Revision: https://code.wildfiregames.com/D3896
This was SVN commit r25334.
2021-04-28 11:09:16 +00:00
Stan d981536a5e Fix horses props going OOS when gathering.
- EOL native and xml mime type
- Add player_trans_norm_spec.xml
- Disable cast shadow for manes.
- Use norm instead of parallax

Reported by @Freagarach

This was SVN commit r25333.
2021-04-28 11:03:15 +00:00
wraitii cbd91ca999 Translation fixes.
- Fix in tooltip context for healing 'Health'
- Fix in tooltip for splash shape.
- Translate locale_advanced
- Translate specific name in the structure truee
- Translate player name in gamesetup.

Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3889
This was SVN commit r25332.
2021-04-28 08:04:13 +00:00
vladislavbelov b74d5bf0d8 Removes glColor* calls from scene rendering, colors are set explicitly by uniforms.
This was SVN commit r25330.
2021-04-27 19:35:36 +00:00
vladislavbelov 5b33d3a76c Removes ShaderProgramPtr argument from DebugRenderer methods.
This was SVN commit r25329.
2021-04-27 19:23:37 +00:00
vladislavbelov cd6a554198 Removes GL matrix stack usages from scene rendering.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3894
This was SVN commit r25328.
2021-04-27 18:43:49 +00:00
Stan 4718760754 Fix ugly water color in polynesia.xml
This was SVN commit r25327.
2021-04-27 14:09:57 +00:00
wraitii 66fbc23f2c De-singletonify CConfigDB, make hooks RAII.
CConfigDB is no longer a singleton, and its members are no longer
static.
This makes it possible to have several instances of it, useful for
testing of if we ever want to have different config profiles.

Also updates hooks to delete themselves on destruction, to fit a more
natural RAII pattern. Long-lived objects must take care to destroy hooks
before ConfigDB is reset.

Differential Revision: https://code.wildfiregames.com/D3866
This was SVN commit r25326.
2021-04-27 07:45:40 +00:00
vladislavbelov 2698cf8ba2 Fixes missing DrawCameraFrustum argument after 5e12424123.
This was SVN commit r25324.
2021-04-26 21:21:13 +00:00
vladislavbelov 5e12424123 Removes glBegin from scene rendering, removes GL matrix stack dependency from scene rendering.
This was SVN commit r25323.
2021-04-26 21:11:35 +00:00
Stan 67948e4229 Fix flag position for barracks.
Refs: #6160

This was SVN commit r25322.
2021-04-26 15:33:54 +00:00
wraitii 8963786a76 Improve error message for broken quality levels in Actor files.
Differential Revision: https://code.wildfiregames.com/D3887
This was SVN commit r25321.
2021-04-26 14:59:32 +00:00
wraitii ad87f1e295 More actor file validation, preventing crashes.
It's currently possible to trigger ENSUREs in the code if loading empty
groups, which is easy enough with LOD and shouldn't happen.

Recover gracefully from these errors instead.

Differential Revision: https://code.wildfiregames.com/D3888
This was SVN commit r25320.
2021-04-26 14:57:13 +00:00
Stan 9957ff1b08 Fix broken garrison flag on the athenian temple.xml
Refs: #6160

This was SVN commit r25319.
2021-04-26 14:56:50 +00:00
wraitii 2e1545ffc4 Fix unused variable warning in a97f7f3917
This was SVN commit r25318.
2021-04-26 08:47:24 +00:00
vladislavbelov 2086a66340 Adds circle drawing to DebugRenderer.
This was SVN commit r25315.
2021-04-25 21:55:19 +00:00
vladislavbelov e90aaf6348 Adds line drawing to DebugRenderer.
This was SVN commit r25314.
2021-04-25 20:48:44 +00:00
Angen 9977c73eb6 Revert 895182cbcb
This was SVN commit r25313.
2021-04-25 13:42:51 +00:00
Angen 895182cbcb Make player entities more visible on minimap
This patch is increasing contrast of player colours used on minimap in
minimap component instead of changing player colours themselves to not
mess with other cases, when they are used.

Differential revision: D3242
Comments by: @vladislavbelov, @ValihrAnt, @Freagarach
This was SVN commit r25312.
2021-04-25 11:05:41 +00:00
Angen 45805043a1 Use better colour in multiplayer lobby for away status
Colour for away status, makes it hard to spot among busy statuses.
Setting more orange colour for this.

Differential revision: D3856
Ref: #6055
Accepted by: @asterix
Comments by: @Langbart
This was SVN commit r25311.
2021-04-25 10:56:57 +00:00
wraitii 1ccb85d8d7 Unify damage of arrow-shooting structures
- Arrow shooting structures (towers, CC, fortress, camps...) now deal 10
pierce data per arrow, one arrow every 2 second (i.e. 5 pierce DPS).
- Adjust the count of arrows per building accordingly.

This makes these buildings easier to compare.

Accepted By: #balancing, borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D3668
This was SVN commit r25309.
2021-04-24 13:46:36 +00:00
wraitii a97f7f3917 Hotloading fix after 76acc4e146
Emplace does not replace existing element, insert_or_assign does.

While at it:
 - Clean up the 'outdated' logic and reuse it for actors
 - When an actor fails to load, return a placeholder. This improves
hotloading of broken actors, and makes Cunit behaviour more predictable.
 - Some minor cleanup

Reported by: Stan
Fixes #6157

Differential Revision: https://code.wildfiregames.com/D3882
This was SVN commit r25308.
2021-04-24 09:39:33 +00:00
wraitii f73fa05542 Cache the model-animation bounds more efficiently.
To render models, we need to know the maximum bounds it takes over the
course of an animation. This depends only on the ModelDef and the
AnimationDef (and thus the SkeletonDef).
Currently, we recompute this data for each model, which is inefficient.
Caching it in ModelDef is faster, particularly avoiding lag spikes at
game start on some maps.
The animations are referred by a unique ID to avoid pointer-related
issues. I would have preferred weak_ptr, but that cannot be stably
hashed for now.

While at it, switch to unique_ptr/vectors.

Differential Revision: https://code.wildfiregames.com/D2967
This was SVN commit r25306.
2021-04-23 14:26:59 +00:00
Stan 52258ce48b Use the new "Lod" Feature for reins
* Disable "castshadow" on medium quality
* Disable them on low for performance.
* EOL & Mime Type

This was SVN commit r25305.
2021-04-23 09:38:23 +00:00
vladislavbelov f3bc024e79 Draws scrollbar above list to have a correct order for Z sorting after a6cb77a204.
Reported By: nwtour
Tested By: nwtour
Differential Revision: https://code.wildfiregames.com/D3881
This was SVN commit r25303.
2021-04-23 06:56:01 +00:00
Freagarach 6f1644aac3 Some translation fixes.
Patch by: @nwtour
Differential revision: https://code.wildfiregames.com/D3875
Comment by: @vladislavbelov
This was SVN commit r25301.
2021-04-22 07:41:56 +00:00
vladislavbelov f4905066ab Reduces number of allocations during error message formatting.
Differential Revision: https://code.wildfiregames.com/D3871
This was SVN commit r25300.
2021-04-22 06:53:03 +00:00
Freagarach 19e055c6e1 Store build time modifier in template.
Instead of hardcoding it in the component.
Allows modders to easily change the value.

Differential revision: https://code.wildfiregames.com/D3792
Comments by: @Angen, @Nescio, @Stan
This was SVN commit r25299.
2021-04-22 06:18:00 +00:00
Freagarach 56aabc1242 Add note about patience on the chat-button and add FAQ-button.
We have a FAQ, that is now pretty up-to-date, so use it.
Also add note that people may want to be more patient when chatting with
us on IRC.

Patch by: @Langbart
Differential revision: D3499
Comment by: @Stan
This was SVN commit r25298.
2021-04-22 04:52:38 +00:00
Stan 8332425142 Use the new "Lod" Feature for handgrips
* Disable "castshadow" as they are never much larger than the shields
* Disable them on medium because they are part of the texture
* Disable them on low for performance.
* EOL & Mime Type
* Add a new materials/basic_trans_norm_spec.xml to disable parallax
(while keeping normal and transparency) when not needed and use it for
the handgrips with transparency.

This was SVN commit r25297.
2021-04-21 09:26:23 +00:00
Stan 228a2f49e0 Use the new "Lod" Feature for greaves
- Disable "castshadow" as they are never much larger than the legs
- Disable them on medium because they are part of the texture
- Disable them on low for performance.
- Add a missing mesh reported by @wowgetoffyourcellphone the r variant
was used for the l actor
- EOL & Mime Type

- Add a new materials/no_trans_norm_spec.xml to disable parallax (while
keeping normal) when not needed and use it for the greaves.

This was SVN commit r25296.
2021-04-20 21:27:26 +00:00
Stan e2b43b2fbf Fix no idle alarm sound;
Noticed & Tested by: @Langbart
Tweaks by: @Samulis
This was SVN commit r25294.
2021-04-20 17:15:21 +00:00
wraitii 8d02102885 Fix triggerhelper for 59d0885d68
59d0885d68 made formation take "formation", not "name". This broke
TriggerHelper.

Reported by: Angen
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D3873
This was SVN commit r25293.
2021-04-20 09:36:33 +00:00
Freagarach 80e9f2c517 Fix typo in PetraAI's extended entity.
Called the member instead of the function.
Introduced in ea96e81098. Noticed by @Angen.

Differential revision: https://code.wildfiregames.com/D3870
Reviewed by: @Angen
This was SVN commit r25291.
2021-04-19 06:43:50 +00:00
vladislavbelov fe991aaa62 Moves cinematic overlay to GUI.
Differential Revision: https://code.wildfiregames.com/D3869
This was SVN commit r25289.
2021-04-18 16:23:10 +00:00
Freagarach 9450cfcbda Move custom JS data structures to globalscripts.
These don't depend on the simulation and can be useful for e.g. the GUI
(the FSM) or map scripts.
Confer also the vector implementation.

Differential revision: D3863
Comment by: @wraitii (agreed with concept)
This was SVN commit r25288.
2021-04-18 08:31:30 +00:00
Freagarach fb3e9ad96e Play a sound when there are no idle entities.
If there are no idle units and the idle-unit hotkey is pressed there is
now a sound played.
Beneficial when there are already units selected since selection doesn't
change.

Sound courtesy of @Samualis.

Refs. #5360
Based on a patch by: @cpc
Differential revision: https://code.wildfiregames.com/D1692
Comments by: @asterix, @smiley, @Stan, @vladislavbelov
This was SVN commit r25287.
2021-04-18 08:10:00 +00:00
vladislavbelov 5c51ce2e2f Removes old ARB state.matrix usages.
This was SVN commit r25285.
2021-04-17 23:08:55 +00:00
vladislavbelov 769b0426a7 Removes unused debug render from ShadowMap.
This was SVN commit r25284.
2021-04-17 22:16:01 +00:00
vladislavbelov b7e6811ea6 Removes fixed shader technique from effects.
This was SVN commit r25283.
2021-04-17 22:07:18 +00:00
Freagarach fd008e11ad Fix some translations.
- Idle builder hotkey 28bd4f0092.
- "Other hotkey"-catagory.
- Tooltipless hotkeys.

Patch by: @nwtour
Differential revision: https://code.wildfiregames.com/D3862
This was SVN commit r25282.
2021-04-17 07:47:30 +00:00
wraitii 518fb7eafa Set a stack quota for JS scripts to prevent crashes from infinite loops.
Infinite loop will instead trigger JS exceptions, which will make error
reports much nicer.

Differential Revision: https://code.wildfiregames.com/D3851
This was SVN commit r25280.
2021-04-16 16:49:18 +00:00
wraitii 89032c4d2b Improvements on 76acc4e146
See 76acc4e146. Follows comments by @vladislavbelov.

Differential Revision: https://code.wildfiregames.com/D3852
This was SVN commit r25279.
2021-04-16 16:04:01 +00:00
wraitii 924c6ce34e Rework 7ee94f23df
Following comments by @vladislavbelov.

Differential Revision: https://code.wildfiregames.com/D3860
This was SVN commit r25278.
2021-04-16 16:01:30 +00:00
Freagarach b3e3d1f715 Use a map for the weighted list.
Less object creations at addition time, more intuitive handling.

Differential revision: https://code.wildfiregames.com/D3854
Comments by: @Stan, @wraitii
This was SVN commit r25276.
2021-04-16 07:02:58 +00:00
Freagarach 4329dd90ce Rename Attacking.js-helper to Attack.js and its global to AttackHelper.
16b452cf91#inline-4026

Differential revision: https://code.wildfiregames.com/D3858
Comment by: @wraitii
This was SVN commit r25275.
2021-04-16 06:55:23 +00:00
Freagarach 3184a51787 Add stable to fortress random map.
Replaces a house by a stable.
Since c4eeb82d83 cavalry cannot be trained at the barracks anymore.

Patch by: @Nescio
Differential revision: D3691
This was SVN commit r25274.
2021-04-16 06:26:37 +00:00
Freagarach 2e69526e26 Correct Arthashshastra quotes.
Chanakya was the teacher and minister of Chandragupta Maurya, whereas
Kautilya is the author of the Arthashshastra. While the two are often
equated (out of ignorance or for ideological reasons), they are
different persons, and the first versions of the Arthashshastra were
composed only a few centuries after the Mauryas were gone. See
https://wildfiregames.com/forum/topic/27113-bibliography-and-references-about-ancient-times-book-reviews/?tab=comments#comment-402302
for a more detailed explanation.
This patch therefore:
- changes the author from Chanakya to Kautilya;
- lists the quotes at the correct location in the file (under K instead
of C);
- removes the chapter titles (which depend on the text edition or
translation) and give a more precise location, to make it easier for
people to look up.

For those interested, the Sanskrit is:
KAZ01.4.07 na-iti kauṭilyaḥ | 7 |
KAZ01.4.08 tīkṣṇa.daṇḍo hi bhūtānām udvejanīyo bhavati | 8 |
KAZ01.4.09 mṛdu.daṇḍaḥ paribhūyate | 9 |
KAZ01.4.10 yathā.arha.daṇḍaḥ pūjyate | 10 |
and:
KAZ01.19.01 rājānam utthitam anūttiṣṭhante bhṛtyāḥ | 1 |
KAZ01.19.02 pramādyantam anupramādyanti | 2 |

And the translations in Patrick Olivelle King, Governance, and Law in
Ancient India / Kauṭilya’s Arthaśāstra / A New Annotated Translation
(Oxford 2013) are on p. 69:
7 “No,” says Kauṭilya;
8 “for one who punishes severely terrifies the people,
9 and one who punishes lightly is treated with contempt,
10 whereas one who dispenses appropriate punishment is treated with
respect.
and on p. 92:
1 When the king is energetic, people in his service, in turn, become
energetic;
2 and when he is lethargic, they, in turn, become lethargic.

Patch (and description above) by: @Nescio
Differential revision: https://code.wildfiregames.com/D3598
This was SVN commit r25273.
2021-04-16 06:23:16 +00:00
vladislavbelov 4a51012442 Adds line drawing to DebugRenderer.
This was SVN commit r25271.
2021-04-15 22:51:25 +00:00
Angen 57e85c195e Fix wrongly placed parameter in 841bf5f2dd
Correctly colour url of invalid mod.

This was SVN commit r25270.
2021-04-15 20:21:47 +00:00
vladislavbelov 389a5a4379 Removes low-level GL calls from graphics and geometrics primitives and adds DebugRenderer.
Tested By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3857
This was SVN commit r25269.
2021-04-15 18:07:01 +00:00
Angen f1a1cf11d3 Check for replay compatibility when opening summary screen
Summary screen and mainly its statistics can be influenced by mod as
much as replay itself with mod removing or adding classes and trackers
to the game.
Summary screen allows to replay the match without checking
compatibility, that is fine I think if it is prevented to see summary of
incompatible replay in a first place.

Therefore this is adding compatibility check for opening summary of
replay.

Differential revision: D3799
Fixes: #6119
Tested by: @Langbart
This was SVN commit r25268.
2021-04-15 17:19:27 +00:00
Angen 894fc1dd5d Fix EstimateFuturePosition in UnitMotionFlying
Introduced in f737831167

Differential revision: D3855
Fixes: #6141

This was SVN commit r25267.
2021-04-15 17:15:40 +00:00
wraitii 7ee94f23df Use type_identity to simplify Clamp usage.
Differential Revision: https://code.wildfiregames.com/D3859
This was SVN commit r25266.
2021-04-15 13:01:24 +00:00
Freagarach b74ab54cf7 Fix translation of damage types.
Broken in d28a91b83d.
Due to not checking for `template_helpers` in the game's files.

Patch by: @nwtour
Differential revision: https://code.wildfiregames.com/D3850
This was SVN commit r25265.
2021-04-15 05:47:54 +00:00
Freagarach 079212fe46 Fix entities able to attack allied structures in rare cases (take 2).
Caused by not checking the attack type whilst performing an attack.

Fixes: #5511
Differential revision: D3845
Refs. #3484

This was SVN commit r25264.
2021-04-15 05:45:13 +00:00
vladislavbelov 092ccfec77 Removes unused header dependencies from CTimeManager.
This was SVN commit r25262.
2021-04-14 22:14:37 +00:00
vladislavbelov 715dca0701 Removes unused shadow settings forgotten in 12e2428495, removes direct SkipSubmit access.
This was SVN commit r25261.
2021-04-14 20:25:05 +00:00
s0600204 f57ac432e8 Show correct cost/phase of template-variants in structree whilst maintaining correct build lists in viewer
("Variant" in this case means a template that is functionally the same
as its
base template - but is a different promotion level, requires a
technology to
unlock (that the base template doesn't), is an upgrade of its base, or
is a
trainable version.)

Should fix concern raised on b2842e8021.

Accepted by: Angen
Differential Revision: https://code.wildfiregames.com/D3347
This was SVN commit r25260.
2021-04-14 20:05:26 +00:00
Stan 63224865d5 Fix selection height for the apple, banana, date, fig, olive and palm trees. Use the biggest variation as reference. Forgotten in https://code.wildfiregames.com/24043 (Height was 10 initially)
Reported by: @nani
Fixes: #6075

This was SVN commit r25259.
2021-04-14 16:55:44 +00:00
wraitii 43a780504a Delete "Compact RelaxNG" / .rnc files
(Follows 76acc4e146 where I deleted actor.rnc)

This deletes the .rnc validation files, upgrading the .rng files to
being the source of truth.

- The engine uses, via LibXML2, .rng files to validate XML schemas, to
the .rnc files are redundant.
- The RelaxNG "Compact" format is a DSL for the RelaxNG XML format. Its
syntax is unique, unlike .rng files which are XML.
- Some errors are likely - I'm not sure anyone has converted the compact
files in years.
- The tool to generate .rng from .rnc files is trang
(https://github.com/relaxng/jing-trang), which runs on the JVM and is
quite annoying to install compared to "your usual text editor".
- The JS components use the full .rng format in XML, so editing this
format is already familiar to most people that mod the game.

The .rnc files were added in 2c9939ac74 along the .rng files.

Refs #413, #245

Differential Revision: https://code.wildfiregames.com/D3824
This was SVN commit r25258.
2021-04-14 07:39:36 +00:00
wraitii fde66f5134 Fix 4 small gamesetup issues
- Random lanscape option now works properly.
- Non-host clients now see the game attributes correctly in the loading
screen, including in particular the map name.
- AI bots are again translated.
- 'Cheat' setting is persisted correctly in MP gamesetup.

Reported by: myself, Freagarach, nwtour
Differential Revision: https://code.wildfiregames.com/D3841
This was SVN commit r25257.
2021-04-14 07:30:26 +00:00
wraitii 0308c2390a Rework the pathfinder path computation setup for threading.
Essentially reverts D1918 / d592bf9cb6.
Instead of copying path requests to workers, setup the result vector,
then setup an index, and compute 'in-place'.
To send messages, the result vectors are read in order. This makes the
order trivially constant no matter how many workers there are, and the
architecture overall makes it much easier to efficiently paralellise.

Tested by: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D3849
This was SVN commit r25256.
2021-04-14 07:23:47 +00:00
vladislavbelov 990265d974 Fixes warnings after minimap changes in b7db124cb5.
This was SVN commit r25254.
2021-04-13 23:16:46 +00:00
Stan c8b2c09bc3 Fix --without-pch build. fc60d80af1 was missing an include.
Reported by: @vladislavbelov
This was SVN commit r25253.
2021-04-13 17:28:01 +00:00
Stan 1508031f09 Scale down turret icons so that they don't overflow.
Reported by: @nwtour
This was SVN commit r25252.
2021-04-13 17:15:34 +00:00
wraitii e36c8c3763 Destroy components in reverse order of construction.
Components have some initialisation-order dependency. They could also
have destroy-order dependency, and from a RAII-like point of view, it
makes sense to do this.

Differential Revision: https://code.wildfiregames.com/D3843
This was SVN commit r25251.
2021-04-13 13:47:59 +00:00
wraitii 0a59489824 Use unique_ptr for secondary sim data.
Differential Revision: https://code.wildfiregames.com/D3842
This was SVN commit r25250.
2021-04-13 13:46:45 +00:00
Freagarach 67fe65e85b Fix mismatching range checks in finding a new target when gathering.
While gathering resources entities may be tasked to gather near a
position. The range check for that is 10 m. However, the relaxed range
check for the walking state is this.DefaultRelaxedMaxRange, which is 12
meter, currently. Meaning it would lead to a slow infinite loop.

Differential revision: D3839
Comments by: @wraitii
Tested by: @gameboy
(https://wildfiregames.com/forum/topic/38131-tutorial-bug/)

This was SVN commit r25249.
2021-04-13 06:48:13 +00:00
wraitii 1b844606aa Implement mul_round in checkrefs.
Missed in 19f600cfa2. In use since 2078abdcc4.

This was SVN commit r25247.
2021-04-12 16:33:54 +00:00
wraitii 5df6e688e2 Revert 189d00d811 - infinite loop in UnitAI when slaughtering.
Reverting to get some time to investigate.

Reported by: langbart
This was SVN commit r25246.
2021-04-12 16:16:57 +00:00
wraitii 2078abdcc4 Fix issue with 37790e099c
Cost cannot be non-integer, and rounding issues happened.

Reported by: gameboy
This was SVN commit r25245.
2021-04-12 14:07:59 +00:00
wraitii 6d5b710877 Fix undefined values in barter tooltip.
Patch by: nwtour
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3829
This was SVN commit r25244.
2021-04-12 13:51:02 +00:00
Freagarach 21645f5c1c Minor fixes after Gathering refactoring.
- `initPos` was used wrong.
- There were two `CanGather` functions in `cmpResourceGatherer`.
- Reduced some duplication in the ReturnResource order.

Differential revision: D3838.
This was SVN commit r25243.
2021-04-12 12:50:17 +00:00
Freagarach 189d00d811 Fix entities being able to attack allied structures in rare cases.
Caused by not checking the attack type while performing an attack.

Closes: #5511
Differential revision: D3840
References #3484

This was SVN commit r25242.
2021-04-12 12:41:35 +00:00
vladislavbelov b7db124cb5 Crops minimap view bounds to map size.
Differential Revision: https://code.wildfiregames.com/D3837
This was SVN commit r25241.
2021-04-12 12:39:07 +00:00
Freagarach e17cd7754e Split hotkeys of turrets.
Following 21e866fcf0.
Also support leaving a turret by using a hotkey.
Currently the hotkeys are by default bound to the same ones as
garrisoning.

Differential revision: D3773
Icons by: @wowgetoffyourcellphone and @Stan.
This was SVN commit r25240.
2021-04-12 12:31:29 +00:00
wraitii d0a0ed0b1c Mixins: deduplicate Athen-specific data.
Puts the athen-specific data in the mixin `civ/athen`. Deduplicates.

Differential Revision: https://code.wildfiregames.com/D3831
This was SVN commit r25239.
2021-04-12 11:30:38 +00:00
wraitii 37790e099c Mixins: Remove the special mercenary technology, apply template changes directly.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3832
This was SVN commit r25238.
2021-04-12 11:28:18 +00:00
Stan 318a5d7a2b Improve Caratacos' portrait.
Patch by: @m7600
Refs: d8709f84f3

This was SVN commit r25237.
2021-04-12 09:13:34 +00:00
Freagarach 3097a7c302 Attack using cmpAttack instead of UnitAI.
Keep responsibilities separated, allow easier modding of attacking
behaviour.
Ideally the BuildingAI attacking routine would be merged in here as
well, but not done for now.

Part of #5810
Differential revision: D3816
Comments by: @smiley, @Stan
This was SVN commit r25235.
2021-04-12 06:51:39 +00:00
Freagarach ea86790e4e Profile the Transform helper.
Differential revision: D3825
Comments by: @Stan, @wraitii
This was SVN commit r25234.
2021-04-12 06:23:30 +00:00
Freagarach 8acc3b049f Combine attack times in a single node.
Reduces duplication, allows all attack types to cause splash damage.
While at it, makes delay and minimal range optional (for obvious
defaults are available).

Split from D368, so basically a patch by @bb.

Note that it may seem like one can arbitrarily name an attack now, but
that is not true.

Differential revision: D2002
Comments by: @bb, @Nescio, @Stan, @wraitii
This was SVN commit r25233.
2021-04-12 06:17:13 +00:00
vladislavbelov a6cb77a204 Disables depth test for GUI rendering.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D3835
This was SVN commit r25231.
2021-04-11 19:36:52 +00:00
wraitii e7159c01fb Fix 3759fc8a98
3759fc8a98 broke decals and particle emitters, as I misplaced the if
block.

Reported by: langbart
This was SVN commit r25230.
2021-04-11 19:04:56 +00:00
vladislavbelov 8eb4871c9b Draws GUI elements by Z order.
Tested By: wraitii
Differential Revision: https://code.wildfiregames.com/D3780
This was SVN commit r25229.
2021-04-11 11:27:53 +00:00
wraitii 35ed55cfd6 ParamNode: switch to utf8, ToXML -> ToXMLString, test tweak, PCH tweak
This changes ParamNode to use UTF8 values internally (XMB files are UTF8
since cb9d0733ef).
This removes the need for a lot of conversions, speeding things up and
allows cleaning up the validator interface & a few other callsites.
ConstructJSVal could be a tad slower because of UTF8->16 conversions
within Spidermonkey; but the difference is unlikely to be noticeable in
practica.

Also:
- Changes `ToXML` to `ToXMLString` for clarity.
- Add a simple "op" test & show a particular behaviour of merge nodes
that I intend to change somewhat in D3830.
- Remove Component.h from simulation2 PCH - brought in too much.

Tested by: langbart
Differential Revision: https://code.wildfiregames.com/D3834
This was SVN commit r25228.
2021-04-11 09:23:10 +00:00
wraitii fcc6bbe797 Fix d73a3f59ad - wstring_view on a temporary & wrong utf16->8 conversion.
Two issues:
- The wstring_view was created on a temporary string - the data got
overwritten sometimes.
- there was some weird UTF16->UTF8 conversion going on.


Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D3828
This was SVN commit r25226.
2021-04-09 18:08:37 +00:00
wraitii fc60d80af1 Simplify GUI Proxy implementation & customisation.
This finishes 7c04ea0211 and 1b67a079fb.
GUI Proxy objects are now easier to specialize, code duplication is
reduced, code is made safer.
In details:
- the proxy private is always the IGUIObject* pointer
- the private data is accessed through a safer wrapper
- CreateJSObject returns an opaque type to allow easier extension &
prevent errors.
- The implementation of CreateJSObject is moved near the GUI Proxy
template instantiation, and both are wrapped in a convenient macro (this
makes it so that if you use the macro, you can't forget to overload the
method, and vice-versa).
- The common IGUIObject JS interface no longer needs to be repeated.
- All specialisations are again put in the same file, for improved
compile-time & clarity, given there are so few lines now.
- While at it, implement toSource which makes it possible to `uneval`
components (does the same as toString though).


Differential Revision: https://code.wildfiregames.com/D3826
This was SVN commit r25225.
2021-04-09 18:01:47 +00:00
wraitii 3759fc8a98 Allow empty actor files.
This allows empty actor files -> they map to a dummy object that renders
nothing.
The use case is automatically hiding objects at lower quality levels &
LOD settings.

Differential Revision: https://code.wildfiregames.com/D3819
This was SVN commit r25224.
2021-04-09 15:45:31 +00:00
wraitii d73a3f59ad Allow arbitrary compositions in TemplateLoader template names.
- Allows compositing any two templates in TemplateLoader, and not just
filters: 'A|B|C' is now valid for any template A, B and C.
- Allows parents to be composited paths 'A|B|C'. In such a schema, if A
or B themselves specify a parent, the actual composition becomes
A|pA|B|pB|C and so on.

This allows, by leveraging the common schema of our entities, to reduce
duplication.

For convenience, templates in "special/filters/" and "mixins/" can be
included by their direct name. Others have to be completely specified.

See the two provided cases for examples:
- 'hoplite' becomes a mixin that can be used to apply the Phalanx
formation
- 'builder' becomes a mixin that can be give a template the ability to
build the standard structures, and gives the 'Builder' identity class.
This also allows deduplicating that list of tokens.

Update checkrefs & swap std::map for std::unordered_map in
TemplateLoader.

Differential Revision: https://code.wildfiregames.com/D3801
This was SVN commit r25223.
2021-04-09 15:43:50 +00:00
wraitii 7321509d5f Fix crash in ActorViewer.
Fixes 76acc4e146 (and some 2007-2010 commit).
ObjectManager needs the Simulation to be initialised, thus needs to come
after it in the class.

Tested by: langbart
Differential Revision: https://code.wildfiregames.com/D3827
This was SVN commit r25222.
2021-04-09 15:34:51 +00:00
Freagarach 14d24e03f2 Fix promoting entities going back to default stance.
Introduced in 93d22ef16b.
Brings back the less intrusive bug of transforming while garrisoned of
turreted and unloading results in the default stance. That needs to be
fixed again.

Differential revision: D3822
This was SVN commit r25221.
2021-04-09 08:46:39 +00:00
Freagarach f7f82ecf25 Use explicit functions for passing on a builders list.
Instead of relying on the assumption that an entity which transforms
only has one of the two (and the same) before and after.
Fixes 5b3bdf3647.

Differential revision: D3821
Comment by: @Stan
This was SVN commit r25220.
2021-04-09 08:42:43 +00:00
wraitii 1af9a4702d Fix MSVC warning.
Introduced in 592453c62f.

Differential Revision: https://code.wildfiregames.com/D3815
This was SVN commit r25219.
2021-04-09 08:13:14 +00:00
Freagarach b1c1cb1657 Fix pickup error.
Introduced by forgetting to change a line in fd1d7d5d83.

This was SVN commit r25217.
2021-04-09 07:08:33 +00:00
Freagarach 8f04d2ee90 Move function to perform trade to substate.
Don't pretend it to be a callable function, while it is certainly part
of the FSM.
(Also makes it easier for us to implement a duration for the trading in
the future, might we ever want to.)

Differential revision: D3813
Comment from: @Angen
Closes: #6135

This was SVN commit r25216.
2021-04-09 06:29:49 +00:00
Freagarach 7ba4b1ffc8 Split dropping resources from approaching in UnitAI.
Allows for non-moving entities to drop resources. (When someone checks
those cases in the order.)
(Also makes it easier for us to implement a duration for the dropping in
the future, might we ever want to.)

Differential revision: D3817
This was SVN commit r25215.
2021-04-09 06:25:47 +00:00
Freagarach 6023a273df Fix phasing requirements of tutorial.
Introduced in 2ef3fd7a77.
Fixed by switching the order of task of the barracks and outpost.

Patch by: @nwtour
Differential revision: D3820
This was SVN commit r25214.
2021-04-09 06:02:22 +00:00
Freagarach 294d102a6f Queue techs at structure with the lowest queue length.
Instead of queueing all techs at the lowest ID.

Patch by: @n1xc0d3r
Differential revision: D3798
Tested by: @Langbart
This was SVN commit r25213.
2021-04-09 05:55:05 +00:00
Freagarach f5a0ab81b6 Fix missing return in 3c4a341906.
Caused entities to walk to the edge of the map when their dropsite was
destroyed.

This was SVN commit r25211.
2021-04-08 10:34:48 +00:00
wraitii 76acc4e146 Implement quality levels for actors & corresponding setting.
An actor file, as referenced by the VisualActor, can now define
different actors for different "quality level" setting.
In this initial version, the quality is handled directly by the object
manager.

Actor format impact:
- '<qualitylevels>' may be used as the root node, containing actor nodes
as children.
  - such actor nodes can refer to a file, or to an inline actor, or
simply be inlined.
  - such actor nodes may have a 'quality' attribute, specifying the
maximum quality level of this actor. By default, 255 (the maximum) is
implied.
- The actor format remains valid, but 'groups', 'variants', 'material',
'castshadow' and 'float' can be given a [minquality, maxquality[ range
via XML attributes. Outside of this range, the XML node is ignored
(making it possible to define, in a single actor file, several quality
levels).

Quality is a 0-255 value, with:
- Range 0-99 intended for lower level-of-detail actors (billboards,
etc.)
- Range 100-200 the 'normal' range for models. 100 is "low", 150
"medium", and 200 "high".
- Range 201-255 used for higher quality actors that might be used for
e.g. cinematics.
The range is wide to make it easier to add intermediate levels in the
future and it seemed easier given that an integer value of some kind was
required anyways.

Engine impacts:
- A new CActorDef class is introduced, wrapping an art/actors XML file
and its different quality levels. ObjectBase remains the definition of a
given 'actor', now at a given quality level.
- CActorDef imposes a maximal # of quality level for a particular actor
definition (5 currently).
- CUnit is made to refer to an Actor Definition explicitly, not a
particular ObjectBase.
- As a minor optimisation, variation keys are calculated on
pointer-to-sets-of-selections, instead of raw sets-of-selections, as
this reduces copying.
- some refactoring, including better const-correctness and hotloading
support via std::shared_ptr.

Differential Revision: https://code.wildfiregames.com/D3787
This was SVN commit r25210.
2021-04-08 07:22:24 +00:00
Freagarach e3695abe59 Build using Builder instead of UnitAI.
Moves the building logic from UnitAI to Builder.
Makes it easier for modders to change building behaviour, e.g. letting
structures build.

Differential revision: D3812
Comment by: @Angen
This was SVN commit r25208.
2021-04-08 05:50:18 +00:00
Freagarach f2d5603422 Heal using Heal instead of UnitAI.
Moves the healing logic from UnitAI to Heal.
Makes it easier for modders to change healing behaviour, e.g. letting
structures heal (instead of using an aura).

Differential revision: D2680
Comments by: @Stan, @wraitii
This was SVN commit r25207.
2021-04-08 05:40:49 +00:00
Freagarach 3c4a341906 Gather using ResourceGatherer instead of UnitAI.
Moves the gathering logic from UnitAI to ResourceGatherer.
Makes it easier for modders to change gathering behaviour, e.g. letting
structures gather.
Refs. #4293 by optimising a bit.

Differential revision: D2662
Comments by: @bb, @Stan, @wraitii
This was SVN commit r25206.
2021-04-08 05:31:34 +00:00
Stan 48d6b84c62 Fix initial animation sync.
UpdateAnimationID → PickAnimationID

Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D3747
This was SVN commit r25205.
2021-04-07 08:35:02 +00:00
Freagarach a7d777d69b Don't store origin market in this.goods in cmpTrader.
It was introduced in 9b98585275 but made obselete in 98b4fe6d00.

Differential revision: D3809
This was SVN commit r25204.
2021-04-07 07:04:57 +00:00
Freagarach 9ee4ccd8ec Split commit from build in cmpFoundation.
Useful if e.g. a modder wants to commit a structure before building it.

Differential revision: D3806
This was SVN commit r25203.
2021-04-07 07:02:12 +00:00
Freagarach ac7db9850b Move trader gain to cmpMarket.
Deletes the helper, since we need at least one market anyway.

Differential revision: D3808
Closes: #5890

This was SVN commit r25202.
2021-04-07 06:58:36 +00:00
wraitii 739a63828a Suppress CppCheck "unknown macro" lint error.
Including third party libraries to the cppcheck include path is annoying
and the unknownMacro errors are generally not useful.

This was SVN commit r25200.
2021-04-06 15:20:35 +00:00
Freagarach f1e4a0e6f6 Some cleaning in cmpFoundation.
- `var` -> `let`.
- Remove some comments.

Differential revision: D3803
This was SVN commit r25199.
2021-04-06 13:35:29 +00:00
Freagarach e208b703ca Only tell stuff to move from foundation when trying to commit it.
It is wasteful to do and seems not needed anymore.

Differential revision: D3802
Comments by: @Angen, @Stan
Reverts b478b9742a, b478b9742a
Refs. #3410

This was SVN commit r25198.
2021-04-06 13:06:27 +00:00
Freagarach 5b3bdf3647 Use transform to finish construction.
Decreases duplication.

Differential revision: D3804
Comment from: @wraitii (also on IRC)

This was SVN commit r25197.
2021-04-06 12:54:33 +00:00
wraitii 973de1ccd7 Fix foundation committing following 592453c62f (pushing)
592453c62f added a flag to "GetBlockMovementFlag" to return either the
current or the template value, and by default it returns the template
value.
Foundation logic needed it to return the current value.

Gates are also updated to avoid changing behaviour in unpredictable
ways.

Differential Revision: https://code.wildfiregames.com/D3796
This was SVN commit r25196.
2021-04-06 12:28:53 +00:00
wraitii 80f354a125 Fix nopch / tiny hotkey optimisation
Swap an std::set for an std::vector, the set was useful only in an
earlier iteration of the diff. This fixes nopch.

Differential Revision: https://code.wildfiregames.com/D3790
This was SVN commit r25195.
2021-04-06 12:26:34 +00:00
Freagarach 93d22ef16b Allow to specify subunits on creation.
This basically does two things:
- Allow turrets on moving entities (fixes serialisation in cmpPos).
- Allow an entity to be present on another when the other is created.

That makes it basically a boiled down version of a prior patch, omitting
the part where orders could be passed on.
This does allow e.g. ranged units on chariots that fire while the
chariot moves.

Original diff by: @sanderd17
Redone by: @Stan
Differential revision: D1958
Comments by: @Alexandermb, @Angen, @bb, @Langbart, @Nescio, @Stan,
@wraitii
Refs. #2577 by implementing the entity on platform case.

This was SVN commit r25192.
2021-04-05 05:22:25 +00:00
Freagarach e2f4ce0649 Add Upkeep component.
Adds a new component effectively handling negative resource trickles.
Prevents resources from going negative and provides an effect for not
being able to pay.
The effect chosen for 0 A.D. is having the entity not being
controllable.

Not used in the public mod itself, but it is in quite some mods.

Based on an idea of @Nescio
Differential revision: D1323
Comments by: @Angen, (@smiley,) @Stan
This was SVN commit r25191.
2021-04-04 06:52:20 +00:00
Freagarach 7562354c49 Don't pass owner to initialise a foundation.
As ownership is already set.
Refs. bdbd0b9dbf and 9213ee8c27.

Differential revision: D3795
This was SVN commit r25190.
2021-04-04 06:38:16 +00:00
Freagarach 58ec287b1f Use interval instead of timeout for healing in GarrisonHolder.
Prevents constant recreation of a timeout.

Differential revision: D3791
Refs. #6081

This was SVN commit r25189.
2021-04-04 06:32:53 +00:00
Freagarach 0d630fb113 Fix garrison rally point when unloading.
Revealed by f884848745. Noticed by @Langbart.
The holder was deleted after being tasked to garrison the new target,
but with still a holder we were not allowed to garrison.

Differential revision: D3794
Closes: #6128
Tested by: @Lanbart
This was SVN commit r25188.
2021-04-04 05:57:42 +00:00
wraitii 7032a3c12a Further hotkey work: clear hotkeys when an input box/the console gets focus.
This is necessary following 2d53308e1b, which now handles key-up in
input to prevent hotkeys from firing then.
Hotkeys are a global system, which means opening e.g. the chat window or
the summary does't reset things. If you press "S" to scroll the in-game
camera down, then press 'return' to open the chat, the camera keeps
scrolling down. Following 2d53308e1b, it never released since it never
got the keyup.

To handle this nicely, we need to explicitly clear hotkeys when input
boxes get focus (respectively the console).

Differential Revision: https://code.wildfiregames.com/D3797
This was SVN commit r25186.
2021-04-03 20:12:40 +00:00
wraitii 52e8a0c5fb Fix chasing after Motion Manager & Pushing.
The motion manager introduced in bae258f9a1 makes 'chasing' (e.g. an
entity targeting another entity, which also applies to fleeing)
behaviour symmetrical: both units see the initial state instead of it
being ID-dependent.
This allows removing hacks introduced in 6a66fb8205 (and refined in
7b88b1a0f9).

Differential Revision: https://code.wildfiregames.com/D3785
This was SVN commit r25185.
2021-04-03 07:00:58 +00:00
Freagarach fb498d97d9 Fix raising alert.
After 21e866fcf0.
AllertRaiser replaced the order instead of just calling the required
function.
While at it, check for the garrisonable size when looking for buildings.

Differential revision: D3789
Tested by: @Langbart
This was SVN commit r25183.
2021-04-02 17:01:59 +00:00
wraitii 592453c62f Add a simple 'pushing' logic to unit motion to improve movement.
This implements a form of crowd movement that I've generally called
'unit pushing' in the last few years.
Essentially, any two units will push each other away when they're too
close. This makes it possible to ignore unit-unit obstructions, and thus
makes movement much smoother in crowds.
This first iteration of this system only allows pushing between idle
units and between moving units (i.e. a moving unit does not affect an
idle one).
This is because the unitMotion logic to detect it is stuck & needs to
use the pathfinders starts breaking: units can fail to move because they
are pushed away from their intended movement, and the current logic
fails to handle this gracefully.
Thankfully, the most value of this patch in terms of player experience
is found in the improvements to group movements and shuttling.

Other impacts:
- As the short pathfinder is called less often, we can increase the
starting search range & reduce the # of max turns, both improving
collision recovery.
- The performance of idle units is slightly worsened, as they must be
checked for idle-idle collisions. If needed a 'sleeping' system, as used
in physics engine, could be implemented.
- In general, however, expect slight performance improvements, as fewer
short paths are computed.
- Gathering efficiency should increase slightly, since shuttling times
are likely reduced slightly.
- As a sanity change to improve some edge cases (units that say they're
moving, i.e. pushable, but don't actually move), the 'going straight'
logic is turned off if a short path has been computed. This requires a
few cascading changes to work correctly.

Technical notes:
- To reduce the cost of the n^2 comparisons that pushing requires, units
are only compared within a small square on a grid which is lazily
reconstructed each turn. The overhead seems rather small, and this is
much simpler than keeping an up-to-date grid.
- The design is intended to be parallelisable if needed someday.
- The pathfinder's CheckMovement ignores moving units in UnitMotion, as
that is now the spec. Idle units are not ignored, which is required for
the 'collision' detection to work correctly (see above).

Refs #3442 (not fixed - idle units are not pushed by moving units).
Fixes #5084 (the overlap can still happen, but units will push each
other away).

Differential Revision: https://code.wildfiregames.com/D1490
This was SVN commit r25182.
2021-04-02 16:30:59 +00:00
wraitii 8ed1bc2fd1 Don't error in the network delay notifier.
Differential Revision: https://code.wildfiregames.com/D3788
This was SVN commit r25181.
2021-04-02 14:20:37 +00:00
wraitii 2d53308e1b Fix console not preventing hotkeys from firing / Clean up hotkey-input conflict.
- Fix mistake in 4b46c09222 (similar to one in a4852c4c01) that allowed
hotkeys to fire while typing in the console.
- Prevent Alt+key to fire hotkeys in input boxes & console as that is
often text input.
- Split the hotkey triggering logic in two: a preparatory phase & an
actual firing phase.
This allows the GUI code to check which hotkeys are about to fire and
selectively allow them to go through. This makes it easier to change
hardcoded hotkeys, such as the console toggling one.

Differential Revision: https://code.wildfiregames.com/D3786
This was SVN commit r25180.
2021-04-02 14:18:20 +00:00
Freagarach 6842eacde9 Fix allowed classes on turret points.
Should use `_string` on init. Noticed by @wraitii.

Differential revision: D3783
This was SVN commit r25178.
2021-04-02 07:15:46 +00:00
wraitii 0232c0d017 Fix 4b46c09222 - Mouse wheel hotkeys behaving erratically.
Mouse wheel hotkeys behave differently from other hotkeys (mouse
button/keys) in that they are transient: they're always pressed/released
in one go.
As such:
- They shouldn't be added to the stored pressedHotkeys
- They shouldn't be added to active scancodes.

This fixes these issues from 4b46c09222 & also skips un-necessary
processing in those cases.

Reported by: Imarok.
Differential Revision: https://code.wildfiregames.com/D3782
This was SVN commit r25176.
2021-04-01 14:51:22 +00:00
wraitii ae1bc9b785 Show non-default hotkeys that appear in JSON spec files in the hotkey editor.
This makes sure all hotkeys from hotkeys/spec/*.json files are displayed
in the editor, even if they are not found in configuration files.

Differential Revision: https://code.wildfiregames.com/D3767
This was SVN commit r25175.
2021-04-01 09:20:29 +00:00
wraitii 28bd4f0092 Introduce a 'Builder' class for entities that can build structures.
- Increases moddability
- Increases the clarity of visible classes (gatherer & builder vs
Worker)
- Introduce an 'Idle builder' hotkey.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3290
This was SVN commit r25174.
2021-04-01 07:26:59 +00:00
vladislavbelov 1b5ed5063f Cleanups CGUISprite, removes redundant method.
This was SVN commit r25172.
2021-03-31 19:26:05 +00:00
wraitii 22ea79a56f Fix the 'Introductory Tutorial' found in the 'tutorial campaign'.
Some information & resources were outdated, preventing progress.

Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3764
This was SVN commit r25171.
2021-03-31 15:58:16 +00:00
wraitii b55b236379 Remember OOS on a per-client basis.
Change the OOS notification logic to remember the OOS-ness of each
client. Reset it on client leave.
The server will thus continue checking for OOS if the OOS-client leaves.
This is convenient to ignore observer OOS, or wait for an OOS player
without restarting the game.

Also add the turn number to the OOS dump, to fix #3348: particularly
following d4c2cf4430 the turn is likely to not be the same between
different clients.

Agree by: asterix
Differential Revision: https://code.wildfiregames.com/D3753
This was SVN commit r25170.
2021-03-31 15:55:19 +00:00
wraitii 4b46c09222 Do not trigger "HotkeyPress" events when releasing a key.
Follows d0a42f2f00.
Because only the most specific hotkeys can be active at any time,
releasing a key may require re-activating less specific hotkeys.
There were two issues with this behaviour:
- It was buggy, as it only checked one active key, when any still active
key can trigger hotkeys.
- "HotkeyPress" and "HotkeyDown" events where sent, as if the hotkey was
pressed, which was unexpected for most code/users (it is unusual to have
a "Press" event on key release).

This fixes these issues by "silently" re-triggering the hotkeys in such
a case. It also makes it easier for JS code to use "hotkeyPress" instead
of "hotkeyDown" for non-continuous behaviour.

Accepted By: nani
Fixes #6123
Refs #6064 (fixes the problem, but not the code weirdness)

Differential Revision: https://code.wildfiregames.com/D3766
This was SVN commit r25169.
2021-03-31 15:50:25 +00:00
wraitii 457c538780 GameSetup: fix selecting a map with up/down keys.
Fixes dc18d94030.
Using down/up to change the map in the map selection dropdown in the
gamesetup has a one-element lag. The reason is that on dropdown up/down,
two events are sent:
- first the current highlighted item is selected (it's usually the
selected one).
- then the new item is selected.

Because of faulty timer logic, only the first update went through.

Differential Revision: https://code.wildfiregames.com/D3774
This was SVN commit r25168.
2021-03-31 13:10:07 +00:00
wraitii 6c6204f007 Add missing player number to skirmish map names & filenames.
Patch by: langbart
Fixes #6105

Differential Revision: https://code.wildfiregames.com/D3682
This was SVN commit r25167.
2021-03-31 06:53:05 +00:00
vladislavbelov 742b636f70 Moves CRect from ps to maths to related geometric primitives.
This was SVN commit r25165.
2021-03-30 21:14:36 +00:00
Freagarach f50c98cfd1 Check for ability to move on orders that need to move.
Not all orders were checked, which would cause problems when receiving
an order that needed moving and that did not handle not being able to
move properly.

Differential revision: D3771
This was SVN commit r25164.
2021-03-30 15:50:03 +00:00
Freagarach 496884ac73 Some fixes after the split of turrets.
21e866fcf0
Crossbowmen should be able to turret (noted by @Nescio).
TurretHolders should be able to pick entities up.

Differential revision: D3744
This was SVN commit r25163.
2021-03-30 11:24:08 +00:00
Freagarach fd1d7d5d83 Reduce UnitAI duplication in range checks.
By querying the range and passing a target along.

Differential revision: D3748
Comments by: @wraitii
This was SVN commit r25162.
2021-03-30 11:17:46 +00:00
wraitii 649cc49f25 Fix off-by-one error in d8ea401a95.
d8ea401a95 replaced the ExploreTerritories logic, but I did not account
for the territory grid being N cells wide when the LOS is N+1.
Therefore, we could get out of bounds.

Reported by: Vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3765
This was SVN commit r25161.
2021-03-30 07:11:44 +00:00
vladislavbelov c56c856ed5 Moves Frustum from graphics to maths to more related geometric primitives like bounding ones.
This was SVN commit r25159.
2021-03-29 17:28:13 +00:00
vladislavbelov 4f83f1a0e9 Cleanups Frustum and removes access to members.
This was SVN commit r25158.
2021-03-29 17:15:29 +00:00
wraitii e5b971c2bf Allow modifiers without "affects" list.
This allows modifiers without "affects", or with empty "affects" lists,
to do something.
This makes it possible to force a modifier on an entity without classes
(e.g. trees) or with unknown classes.

Accepted By: asterix
Differential Revision: https://code.wildfiregames.com/D3761
This was SVN commit r25157.
2021-03-29 08:10:08 +00:00
wraitii 5ebf2020b0 Netcode: allow observers to lag behind the live game.
Observers no longer lag the game for players. There is still some time
to serialise the game when sending it to a joining observer, and
depending on the chosen 'max lag' the game may stop while observers
sufficiently catch up, but this impact too is reduced.

- Make the NetServerTurnManager ignore players marked as 'observers' for
the purpose of ending a turn, effectively making it possible for
observers to lag without it affecting the players in any way.
- Add a config option (network.observermaxlag) that specifies how many
turns behind the live game observers are allowed to be. Default to 10
turns, or 2 seconds, to keep them 'largely live'.
- The controller is not treated as an observer.
- Implement a simple UI to show this delay & allow the game to speed up
automatically to try and catch up. This can be deactivated via
network.autocatchup.
- Move network options to the renamed 'Network / Lobby' options page.
- Do not debug_warn/crash when receiving commands from the past -
instead warn and carry on, to avoid DOS and "coop play" issues.

Refs #5903, Refs #4210

Differential Revision: https://code.wildfiregames.com/D3737
This was SVN commit r25156.
2021-03-29 07:53:06 +00:00
Freagarach e3a254225a Introduce generic template for support elephants.
To keep civ-specific stuff in civ-specific templates.

Patch by: @Nescio
Differential revision: D3690
This was SVN commit r25154.
2021-03-29 06:59:34 +00:00
vladislavbelov 969112b9c8 Replaces CPos by more a consistent CVector2D, reduces geometry code duplication.
Tested By: Freagarach, Langbart
Differential Revision: https://code.wildfiregames.com/D3759
This was SVN commit r25152.
2021-03-28 21:55:13 +00:00
wraitii 0e7fafebe1 Refuse to serialize NaN values.
NaN values could not be serialised safely because of the multiple
possible NaN numbers.
Since NaN values are usually the result of bugs or dangerous code, it
seems simpler to refuse to serialise them.

(D3205 was a safe-serialization alternative, should the need arise).

Fixes #1879

Differential Revision: https://code.wildfiregames.com/D3729
This was SVN commit r25151.
2021-03-28 16:48:25 +00:00
wraitii f6a2d6da63 Fix degenerate case in UnitMotion resulting in lag.
9d82ae15af introduced logic to extend the search range of the short
pathfinder in some situations. This extension was unbounded, resulting
occasionally in search domains several hundred meters wide, and path
computation that can take several seconds.

Reported by: Vico (on the forums).
Differential Revision: https://code.wildfiregames.com/D3760
This was SVN commit r25150.
2021-03-28 13:12:51 +00:00
wraitii 4146428825 Update build/ dockerfiles & jenkinsfiles
This reflects their current state on the VM/Jenkins.

Differential Revision: https://code.wildfiregames.com/D3133
This was SVN commit r25149.
2021-03-28 13:02:06 +00:00
wraitii 37cc13010c Fix missing context in hotkey page translations.
Patch by: nwtour
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3754
This was SVN commit r25148.
2021-03-28 07:59:38 +00:00
wraitii b477892440 Fix issues in 87a2c3347f
Fixes 87a2c3347f:
- NoPCH was broken
- two warnings slipped through.

Differential Revision: https://code.wildfiregames.com/D3751
This was SVN commit r25147.
2021-03-28 07:01:34 +00:00
wraitii 2ee0e62a0e Fix 1adedf447c and 31808e6fa3
Fix 1adedf447c and 31808e6fa3.

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D3752
This was SVN commit r25146.
2021-03-28 07:01:03 +00:00
vladislavbelov d533084d7c Removes unused code from Size2D and changes eol-style to native.
This was SVN commit r25144.
2021-03-27 21:11:36 +00:00
vladislavbelov db84c2a9b2 Moves CSize into a separate file and renames it to CSize2D according to other geometric entities.
This was SVN commit r25143.
2021-03-27 16:08:06 +00:00
vladislavbelov fa3e501f8f Makes EAlign more consistent with other enums by CC.
This was SVN commit r25142.
2021-03-27 12:07:38 +00:00
vladislavbelov 6332760528 Removes implicit default value operator for CGUIColor.
This was SVN commit r25141.
2021-03-27 11:47:49 +00:00
vladislavbelov 734b672569 Removes unused and limited cell sprite functionality.
Tested By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3749
This was SVN commit r25140.
2021-03-27 11:38:34 +00:00
Freagarach f884848745 Move Can*-function implementations from UnitAI to their respective components.
Makes for less duplicated logic, easier modding and better split
responsibilities.

Differential revision: D3638
Closes: #5884

This was SVN commit r25139.
2021-03-27 11:22:34 +00:00
wraitii d0de32b2a8 Fix 8bd7a4f4b5 - crossbowman introduced in 7bf2f9ed74
This was SVN commit r25138.
2021-03-27 09:48:30 +00:00
wraitii 31808e6fa3 Fix 1adedf447c
The patch did not apply cleanly and I failed to notice it when merging.

This was SVN commit r25137.
2021-03-27 09:45:03 +00:00
wraitii 1adedf447c Remove the attack from wall turrets.
Wall turrets/towers have more HP & are cheaper than free-standing
towers, and have no build restriction distance. Their attack, while
limited, is still high when garrisoned, and this makes them awkward to
balance and is poor design in general.
This removes their attack capability entirely, and standardizes the rest
of their statistics.

Patch by: Nescio
Accepted By: borg-, wowgetoffyourcellphone, wraitii
Differential Revision: https://code.wildfiregames.com/D3706
This was SVN commit r25135.
2021-03-26 17:35:51 +00:00
wraitii 0baeb8d1fd Increase gather rate technology effects / revert 3731886e2c
Reverts D3404 / 3731886e2c, thus making economic technologies more
effective.
The lower values led to resource shortages in the late game.

Patch by: Nescio
Accepted By: borg-, chrstgtr, wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D3703
This was SVN commit r25134.
2021-03-26 17:30:25 +00:00
wraitii 29ab4b5af3 Exclude Towers from Town->City phase requirements.
Towers, unlike walls, palisades, and outposts, counted towards the
required Town Phase structures for City Phase. Given the requirement to
build 4 structures, this pushed players into making them.

This removes that, and lowers the requirement to 3.

Patch by: Nescio
Accepted By: ValihrAnt, borg-, wowgetoffyourcellphone, wraitii
Differential Revision: https://code.wildfiregames.com/D3686
This was SVN commit r25133.
2021-03-26 17:21:03 +00:00
wraitii 5376ed3e10 Unlock the Iberian monument in Town Phase
This can give Iberian an edge at defensive play earlier, fitting their
civ theme.

Approved by: borg-, wowgetoffyourcellphone, berhudar
Differential Revision: https://code.wildfiregames.com/D3685
This was SVN commit r25132.
2021-03-26 17:14:14 +00:00
wraitii 4ca8cb70dd Change 'Archery Tradition' tech to an attack range increase.
This new bonus makes the tech more predictable.
Cost has been reduced slightly.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3671
This was SVN commit r25131.
2021-03-26 17:09:16 +00:00
wraitii ac6fe96eac Unify the resistance of foundations.
All foundations now have a resistance of 1 Hack, 1 Crush, 10 pierce.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3600
This was SVN commit r25130.
2021-03-26 17:05:27 +00:00
wraitii 8bd7a4f4b5 Reduce cavalry training time and increase movement speed for ranged cavalry.
The early-game cavalry rush was overly nerfed in A24 with longer train
time, slower speed, and the need for stables.
This rolls that back slightly by reducing train tim from 16 to 15, and
increasing the movement speed of ranged cavalry from 15 to 16.

Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3664
This was SVN commit r25129.
2021-03-26 17:03:45 +00:00
wraitii eda03c54f6 Remove then entity limit for the Embassy.
Was previsouly bumped to 3 in A24.

Patch by: borg-
Approved By: ValihrAnt, chrstgtr, wraitii
Differential Revision: https://code.wildfiregames.com/D3666
This was SVN commit r25128.
2021-03-26 16:59:48 +00:00
wraitii d01a995cbb Fix missing translations (from missing context) in tooltips.
Fixes:
- A logic issue in the attack name tooltip.
- A missing context in the status effects tooltip

Patch by: nwtour
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3745
This was SVN commit r25127.
2021-03-26 16:52:09 +00:00
wraitii d050c3377d Fix unit overlapping following bae258f9a1
Following bae258f9a1, all units moved, then all messages were sent. This
could result in units overlapping, which cannot be resolved without unit
pushing. Fixing this makes for a fairer comparison with the pushing
diff, so it seems worthwhile.

Differential Revision: https://code.wildfiregames.com/D3746
This was SVN commit r25126.
2021-03-26 16:49:59 +00:00
wraitii eac613b7bf Enforce tight coupling of CCmpUnitMotion/CCmpUnitMotionManager
bae258f9a1 implemented CCmpUnitMotionManager, which handles motion for
CCmpUnitMotion (as distinct from ICmpUnitMotion, the interface).
The tight coupling between these two components was awkward at the
interface level, leaking underlying implementation details.

This diff makes CmpUnitMotionManager explicitly manage CmpUnitMotion,
instead of any implementation of ICmpUnitMotion, and moves files around
as requir
ed.
This:
- Makes it impossible to accidentally try to have the wrong
IID_UnitMotion managed by the UnitMotionManager.
- Allows devirtualising the calls from the manager to UnitMotion itself
(and inlining, as they are compiled in the same TU).
- Cleans up the manager interface - MotionState is now part of
CCmpUnitMotionManager.
- Cleans up ICmpUnitMotion interface - no need to provide a private
interface for the manager.

Differential Revision: https://code.wildfiregames.com/D3732
This was SVN commit r25125.
2021-03-26 16:47:07 +00:00
Freagarach 8eca1facde Fix the description of garrison hero aura.
Since siege engines are not capturable anymore, since d583048690.

Fixes: d583048690.
Differential revision: D3742
Reviewed by: @Nescio
This was SVN commit r25124.
2021-03-26 10:37:52 +00:00
Freagarach 21e866fcf0 Technically seperate Turrets from GarrisonHolder.
While they often look alike, their behaviour is totally different.
This split has some implications:
- There are now separate auras for garrisoning and turrets.
- Entities can now have both turret points and garrison slots,
independent of eachother.

In general previous behaviour is maintained as much as possible.

Differential revision: D3150
Comments by: @Nescio, @wraitii
Tested by: @v32itas
This was SVN commit r25123.
2021-03-26 10:18:30 +00:00
Freagarach 7bf2f9ed74 Introduce crossbowman templates.
Allows for easier differentiation. No values were changed in this patch.

Differential revision: D2886
Comments by: @Angen, @borg-, @Stan, @ValihrAnt, @wraitii
This was SVN commit r25122.
2021-03-26 09:55:52 +00:00
Freagarach db21f246f1 A bit more cleanup in ProductionQueue.
- Removed some useless comments.
- Don't assume an item only has either a tech or a unit in
ProgressTimeout.
- Don't initialise boolean values (refs. #5979).

Differential revision: D3739
Comment by: @wraitii
This was SVN commit r25119.
2021-03-25 15:55:54 +00:00
vladislavbelov 0ff0282b8f Removes unused code for GPU skinning introduced in 779a33ee30 and forgotten in 97b46d402c.
This was SVN commit r25118.
2021-03-25 13:18:49 +00:00
vladislavbelov 39c8e7f1a2 Cleanups ShadowMap, fixes possibly wrong depth format name for GLES.
This was SVN commit r25117.
2021-03-25 12:09:56 +00:00
Freagarach ebc2ec5498 Give option to switch between specific and/or generic entity names.
As requested on the forums (e.g.
https://wildfiregames.com/forum/index.php?/topic/25202-transliteration-of-ancient-greek-into-english/&tab=comments#comment-378174).

Differential revision: D2126
Closes: #3397

This was SVN commit r25116.
2021-03-25 06:58:47 +00:00
vladislavbelov 4e728bf68f Uses sky as a water reflection instead of a fixed color.
Differential Revision: https://code.wildfiregames.com/D3734
This was SVN commit r25114.
2021-03-24 16:40:03 +00:00
wraitii 0c419b5bab CI linting: fix issues with char being null for cppcheck.
The CPPCheck linter outputs 'char: null', which trips the
phabricator-jenkins-plugin, and fails to lint on CI.
To avoid this, filter out null values, since e.g. char is optional
anyways. We do want to fail if non-optional values are missing.

Differential Revision: https://code.wildfiregames.com/D3730
This was SVN commit r25112.
2021-03-23 17:43:19 +00:00
wraitii de02f9870c Make WxWidgets High-DPI aware / Upgrade WXWidgets to 3.1.4 on MacOS
Fixes issues on Big Sur with the development 0 A.D. (bundles were
working correctly because they are Low-DPI).

Thanks to @wik for investigations on High-DPI in WxWidgets.

Differential Revision: https://code.wildfiregames.com/D3326
This was SVN commit r25111.
2021-03-23 15:47:29 +00:00
s0600204 275a5bccde Always pass a civcode to Viewer when instatiated by the session gui
Previously this was only done for technologies.

The Viewer tries to determine an appropriate civcode from a passed
template,
however trainable gaia-animals have a template-assigned civ of `gaia`
(and
technologies don't have one at all).

The behaviour of the Viewer isn't changed by this commit: it will still
prefer
whatever civ is set within a template before falling back to the passed
civcode.

However, trained gaia-animals now have something to fall back to,
permitting the
appropriate build list (the list of buildings that train the animal) to
be
displayed.

This was SVN commit r25110.
2021-03-23 15:44:01 +00:00
s0600204 f06bdb31bf Use Treasure tooltip function in Template Viewer
Function added in ea96e81098

This was SVN commit r25109.
2021-03-23 13:38:16 +00:00
wraitii 1867b70d3a Properly unset the civilisation when unchecked in Atlas.
Previously, atlas would save the default value when the 'civilisation'
checkbox was unset.

Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3725
This was SVN commit r25108.
2021-03-23 13:16:53 +00:00
wraitii 87a2c3347f Make real directory paths on the VFS predictable (retry)
This is the same commit as 4bb31f084e, reverted in 5d1899785a. Noted
issues were fixed.

Partial revert/fix of 2f19cf86d3 and 2567fee329.

Before this diff, it was possible for a mod containing a cache/ or a
config/ folder to get written to incorrectly.
The issue is VFS can map multiple directories to one 'virtual' path, for
reading mods. However, writing data is problematic: which path to
choose?
The only viable solution is to use a path relative to the highest
priority directory encountered in the VFS path, or write paths could be
'hijacked' by lower-priority mods.

This fixes these issues by:
- Adding a new lookup mode ('Real-path') that explicitly picks the real
path relative to the highest-priority subdirectory in the VFS Path.
- Preventing overwriting a real directory with a lower priority one in
general.
- Revert c0c8132dd4's GetRealPath change, re-introducing the function as
GetOriginalPath.

This also cleans up some duplication that led to empty mod folders in
the user mod path, and cleans up loading the 'user' mod.
It also makes it explicit that a directory must be passed to Mount().

Note that the new 'realpath' lookup can still be somewhat complex with
many mount points at various hierarchy levels, but it is at least
predictable/deterministic without having to be careful about populating
order.

Fixes #2553

Differential Revision: https://code.wildfiregames.com/D3728
This was SVN commit r25107.
2021-03-23 12:46:59 +00:00
wraitii 5d1899785a Revert 4bb31f084e
4bb31f084e led to an issue in windows-specific code not detected by the
tests. I'll debug later.

This was SVN commit r25105.
2021-03-22 19:52:07 +00:00
wraitii 4bb31f084e Make real directory paths on the VFS predictable.
Partial revert/fix of 2f19cf86d3 and 2567fee329.

Before this diff, it was possible for a mod containing a cache/ or a
config/ folder to get written to incorrectly.
The issue is VFS can map multiple directories to one 'virtual' path, for
reading mods. However, writing data is problematic: which path to
choose?
The only viable solution is to use a path relative to the highest
priority directory encountered in the VFS path, or write paths could be
'hijacked' by lower-priority mods.

This fixes these issues by:
- Adding a new lookup mode ('Real-path') that explicitly picks the real
path relative to the highest-priority subdirectory in the VFS Path.
- Preventing overwriting a real directory with a lower priority one in
general.
- Revert c0c8132dd4's GetRealPath change, re-introducing the function as
GetOriginalPath.

This also cleans up some duplication that led to empty mod folders in
the user mod path, and cleans up loading the 'user' mod.

Note that the new 'realpath' lookup can still be somewhat complex with
many mount points at various hierarchy levels, but it is at least
predictable/deterministic without having to be careful about populating
order.

Fixes #2553

Differential Revision: https://code.wildfiregames.com/D3217
This was SVN commit r25104.
2021-03-22 18:49:42 +00:00
wraitii a048271806 Fix AI+Player from persistent settings (again)
Reintroduced in fa3b341b57, as I changed the execution order of onLoad.

This fixes the problem by explicitly handling this case, which should
avoid accidentally reintroducing the problem.

Differential Revision: https://code.wildfiregames.com/D3724
This was SVN commit r25103.
2021-03-22 16:57:10 +00:00
wraitii c87229aa48 Optimise FindWalkAndFightTargets.
FindWalkAndFightTargets is used during attack-walk (and a few other
situations) to find new entities to attack. This function can be a bit
slow, taking large chunks of time during battles.

This optimises it by assuming that one of the surrounding unit will
match preferred criteria (which, for most soldiers, are 'Human'), thus
returning the first attackable entity. In the worst case, it should
still be slightly faster than the current code.

Differential Revision: https://code.wildfiregames.com/D3446
This was SVN commit r25102.
2021-03-22 13:27:33 +00:00
wraitii 72f0fdb41b GameSetup GUI cleanup - Renaming.
- rename 'Controls' class to 'Controllers' to avoid ambiguity and mimic
MVC lingo.
- rename GameRegisterStanza into LobbyGameRegistration, and make it
explicitly a controller.
- rename GameSettingsFile to PersistentMatchSettings & move it to its
own folder (since it could be reused independently of the controllers)
- remove the StartGameController & move `launchGame` to the
GameSettingsController (simplifies the control flow)
- the GUI Object "setupWindow" was actually the GameSettingsPage, this
is corrected.
- the LoadingPage was showing the GameSettingsPage -> in the current
code, it makes more sense to have both handle their own visibility.
- make the NetMessages class independent of other gamesetup logic, so
that it can be reused by other code. Remove the custom XML object.

Differential Revision: https://code.wildfiregames.com/D3719
This was SVN commit r25101.
2021-03-22 12:26:48 +00:00
Freagarach 293cd95ccb Flush order queue when given an order to perform a action on the same entity.
Follows a4c698ac48.

Fixes: #6046
Differential revision: D3587
Reviewed by: @wraitii
This was SVN commit r25100.
2021-03-22 11:36:50 +00:00
wraitii 87fc52b780 MP: don't enforce game init attributes synchronization in PREGAME.
The NetServer stored a complete copy of the game Init Attributes, which
it sent to new clients on updates from the controller. This worked well,
but prevents incremental updates and other unrelated messages from being
sent.

This changes the system so that:
- in PREGAME state, the server does not update its copy of the game init
attributes
- the server forwards game setup messages from the controller to all
clients
- Joining clients get a full copy of the Settings, when joining, from
the controller (this is a js-driven behaviour - other situations might
not need do it).
- Make the StartNetworkGame message take a copy of the final init
attributes, to ensure synchronization (and simplify some logic).

In practice, this:
- makes it possible to send different types of gamesetup messages (this
introduces two: a regular update and the full 'initial-update' for new
clients).
- moves some C++ hardcoding into JS - here in essence the PREGAME server
state is now init-attributes-agnostic.
- does not change much for readiness control - the server already needed
to force a change at game start to set random elements.

Note that the loading page is currently still receiving the 'local' game
attributes, which assumes that all clients are correctly synchronized
(they should be).

Refs #3806, #3049

Differential Revision: https://code.wildfiregames.com/D3714
This was SVN commit r25099.
2021-03-22 10:13:27 +00:00
wraitii 8c2ab4df62 Improve & translate hotkey name/descriptions.
Improve the hotkey translations. This adds them to messages.json for
translation, closing the work from 09ad8bfbe5

Refs #5867, refs #5996

Differential Revision: https://code.wildfiregames.com/D3641
This was SVN commit r25097.
2021-03-21 14:23:57 +00:00
wraitii fa3b341b57 Further gamesetup fixes & tweaks.
Fixes dc18d94030

- Player assignment still had some trouble. This cleans things up by
moving a little more logic in the controller & fixing other usage.
 - As a consequence, in MP, if the host swaps two player, the change
will take a few frames to register. It shouldn't be too much of a
problem in practice.
 - Fix issues with AI being assigned to player slots for joiners.
- Fix issues with similar color not being correctly picked when swapping
a map.
- Fix issues with rating & locked team settings.

Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D3723
This was SVN commit r25096.
2021-03-21 13:09:52 +00:00
Angen 841bf5f2dd Color incompatible mods and add filter
This helps to see compatible mods in the list, which can get a bit long.
For incompatible mods in disabled section use gray colour.
For incompatible mods in enabled section use red colour (what can happen
when using arguments to start the game or they can be in config file).
Add option to filter compatible mods, this does not affect enabled
section, because if there is incompatible mod, it is error and it needs
to be always visible.
Add function recomputeCompatibility and g_ModsCompatibility to avoid
recomputing aredependenciesmet when coloring mods, because every column
is colored separately.
Disable enable mod button if mod is incompatible.
Remove all dependencies met messages as they are now replaced by this
mechanism.

fix getSelectedModUrl in process

Differential revision: D3687
Fixes: #6053
Tested by: @Freagarach
Comments by: @vladislavbelov
This was SVN commit r25095.
2021-03-21 10:22:50 +00:00
Angen 1c68d9890b Remove redundant applyFilters method from modmod
All functionality in applyFilters is handled by displayModLists and
modSelected functions.
This is also fixing issue of triggering selected event on the same list
multiple times and not updating mod description and buttons when
applying filters.

Differential revision: D3722
This was SVN commit r25094.
2021-03-21 08:51:17 +00:00
Angen 84bafd82b1 common-api entity.js cleanup
Do not check for undefined when result is returning undefined or the
variable and nothing else is done.
Dont create variables when might not be used or are returned without
other usage after.
Dont call get with same parameter more than necessary.

Differential revision: D3652
Comments by: @Freagarach
This was SVN commit r25093.
2021-03-21 08:49:26 +00:00
Freagarach aa9292b1fc Fix fishing boats hunting whale.
Accidentally introduced in 24f0cc7695.

Fixes: #6110
Patch by: @Langbart
Differential revision: D3716
Reviewed by: @Nescio
This was SVN commit r25092.
2021-03-20 20:08:48 +00:00
wraitii 7b00d93298 Fix MP Player assignment
Players could not be assigned beyond the first N slots.

Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D3721
This was SVN commit r25091.
2021-03-20 18:04:22 +00:00
Freagarach 07908dfd8c Store components to be miraged in cmpFogging.
Allows modders (and us) to just add an IID to the array and ensure the
`Mirage()`-function to exist in the respective component.

Differential revision: D3713
Comment by: @wraitii
This was SVN commit r25090.
2021-03-20 16:14:35 +00:00
Freagarach a4a7ef983e Move Mirage information to respective components.
Moves the functions that define the properties/functions to mirage to
their respective components, making it easier for modders to know their
existence and to modify.

Closes: #5985
Differential revision: D3695
Comments by: @wraitii
This was SVN commit r25089.
2021-03-20 16:01:11 +00:00
wraitii dd74837e6e Convert InitAttributes disabled techs/templates & starting tech to triggers.
Disabled technologies & templates are not really gamesetting concerns,
since they are map-specific and de-activating these generally does not
make sense.
Starting technologies is unused and not the correct granularity level
for game setup.

Triggers do a better job of specifying these things on a per-map basis
(in fact, some maps already use triggers for that).

Changes:
- StartingTechnologies was used by the cart sandbox and is simply
removed.
- DisabledTechnologies was used by Polar Sea RM, which already had
triggers -> into triggers.
- DisabledTemplates was used for the Ptol Lighthouse on a few maps ->
since we changed the ability to "a lot of range", it's no longer OP on
these maps and the restriction is simply lifted.
- DisabledTemplates was used on Death Canyon Invasion Force -> into
triggers.

Differential Revision: https://code.wildfiregames.com/D3712
This was SVN commit r25088.
2021-03-20 09:36:56 +00:00
Freagarach c3da0cdd0f Fix cosmetic ESLint warnings in JS components (and their tests).
Which were autofixable, with slight modifications.
Not done are the slightly more complex changes.

Refs. #5524
Patch by: @Krinkle
Differential revision: D2279
Comments by: @elexis, @Stan
Reviewed by: @wraitii
This was SVN commit r25087.
2021-03-20 09:02:22 +00:00
vladislavbelov c4d5729c73 Adds basic tests for BuildCameraRay and uses viewport instead of renderer for width and height.
This was SVN commit r25085.
2021-03-19 17:39:34 +00:00
wraitii 30432574fa Fix issues with dc18d94030
Issues from dc18d94030 fixed:
- The AI config page does not work
- Player Color/Civ/Team did not reset when switching out of Scenario,
which locked the setting
- Player color had weird issues with resetting when changing map too.
- Pop Cap could not be changed.
- Explored/Revealed were swapped in the game description (this was
actually fixed at some point in the original diff then reverted).

Reported by: Submariner and langbart

Differential Revision: https://code.wildfiregames.com/D3715
This was SVN commit r25084.
2021-03-19 16:41:17 +00:00
wraitii 76c5263607 Rename GameAttributes to InitAttributes
The initial settings for a game, used to create the map in RM & tosetup
the simulation, are named InitAttributes in the C++, but generally
referred to as GameAttributes in the JS GUI. This renames the latter to
the former to avoid confusion, since these settings are immutable once
the map starts, so InitAttributes is more accurate.

Differential Revision: https://code.wildfiregames.com/D3705
This was SVN commit r25083.
2021-03-19 10:02:10 +00:00
wraitii d751927b89 Linter fix on CI.
The CI wasn't properly reporting linting, as it turns out the output of
`arc lint --output json` is not what the Jenkins plugin expects.

This adds a custom lint printer that is compatible with the plugin
expectations.

Also delete the coala/ folder forgotten in the original diff.

Differential Revision: https://code.wildfiregames.com/D3709
This was SVN commit r25082.
2021-03-19 09:13:00 +00:00
Freagarach ce0fb7770c Clean mirage internals.
Redo 9f27f0eed8. Now! with not broken serialisation :D

Use a map that stores the functions, instead of them being part of the
Mirage component.
Doesn't need to initialise the variables anymore (refs. #5979).

Saves the mirages in a global to allow (de)serialisation.
Only assign values on Init, not on Construction (to allow
deserialisation).

Refs: #5985
Differential revision: D3702
Comments by: @wraitii
This was SVN commit r25079.
2021-03-18 17:34:53 +00:00
wraitii 961ac314ad Fix issues with motionManager / bae258f9a1
Fixes bae258f9a1.

As reported by Freagarach, garrisoned units trigger error messages.
As reported by Vladislavbelov, noPCH was broken & there were some style
issues.


Differential Revision: https://code.wildfiregames.com/D3707
This was SVN commit r25078.
2021-03-18 16:40:34 +00:00
wraitii dc18d94030 Separate Game Settings from the GUI Gamesetup
Split the gamesetup in two: the 'GameAttributes' part into gamesettings/
and the GUI/Presentation part in gamesetup/. This makes it easier to
separate the presentation from the data.

The immediate benefit is that campaigns & autostart scripts don't need
to load the gamesetup folder at all. This also makes it much easier for
any modder that would want to to change the GameSetup itself.

Each 'game attribute' is given a unique class extending GameSetting
(with a few exceptions), in charge of:
- 'Serializing' to the JSON-compatible 'InitAttributes' format, which is
used for persisted settings, network synchronization, map script
settings, hotloading.
- Deserializing from the same format.
- Watching for settings it depends on (such that e.g. unexploring the
map also unreveals it).

The GUI controls remain in charge of presenting the state accurately,
however they now directly subscribe to changes of the GameSettings for
update. The updating logic in general has been lightened on the GUI
side, making it more straightforward to know when something will update,
and reducing un-necessary computations (in theory - in practice, I
believe the gamesetup was already fairly good about this).
The 'Controller' class of the gamesetup have also been lightened, since
more responsibility now lies with GameSettings. In particular, this
include code to actually launch a game.

In general the GameSettings class is permissive - the GUI gamesetup has
tighter restriction for what the player can/cannot modify. This is
intended to give flexibility for campaign maps, which may want to change
arbitrary settings.

Further work would be useful, non-exhaustively:
- the setting of default values remains messy. They currently exist
somethings in GameSettings, sometimes in the GUI gamesetup, and in the
simulation itself (in case attributes are not set).
- the availability and 'lockedness' of settings remains a
work-in-progress.
- some attributes, like disabled technologies, should probably be
removed and triggers used instead.
- the Handling of AI and player-specific data could be improved.
- settings Persistence should follow its own path - not all settings are
worth persisting.
- GAIA settings are added simulation-side but not in the GUI, which is
confusing.

Thanks langbart & Freagarach for testing.

Follows the gamesetup rewrite in 34138a7764.

Refs #3049

Differential Revision: https://code.wildfiregames.com/D3243
This was SVN commit r25077.
2021-03-18 13:59:53 +00:00
Freagarach 413315024d Revert cleaning the mirage internals.
Broke serialisation.
Reverts 9f27f0eed8. (9f27f0eed8)

Refs. #5985
Differential revision: D3701
This was SVN commit r25076.
2021-03-18 09:42:15 +00:00
wraitii 446c134feb Fix infinite loop in healing & potential one elsewhere.
HEAL can infinite loop: if the HEAL.APPROACHING:MoveTo call fails, the
unit will fallback to FINDINGNEWTARGET, which looks for new targets to
heal, which can loop around.
In #6106, the cause was that the target was not visible despite the
order being given (presumably a rangemanager/los incompatibility issue).
When MoveTo() fail, orders usually call FinishOrder as that's
irrecoverable.

Further, GATHERING/COLLECTINGTREASURE also did not FinishOrder - there,
we do want to consider new resources if the target is e.g. unreachable,
so add an explicit check for AbleToMove.

Reported by: moiman
Reviewed By: Freagarach
Fixes #6106

Differential Revision: https://code.wildfiregames.com/D3689
This was SVN commit r25075.
2021-03-18 09:01:19 +00:00
vladislavbelov 92f94e25c6 Adds ortho projection type and its test.
This was SVN commit r25073.
2021-03-17 23:03:35 +00:00
wraitii e7612e8fed Update UnitMotion comment following d4c2cf4430
MP turns are now identical in length to SP turns.

This was SVN commit r25072.
2021-03-17 18:04:31 +00:00
wraitii bae258f9a1 Implement a Motion Manager around UnitMotion.
This new MotionManager handles movement for UnitMotion components (not
UnitMotionFlying).
This is a first step towards unit pushing, by giving a central place for
the relevant units to collide.

One important side-effect is that movement is effectively synchronous -
the positions are not actually updated until all units have moved for a
turn (refs 6a66fb8205).

As a side-effect, it's an optimisation: fewer messages are being sent
overall, which leads to a slight speedup (negligible without a lot of
units though).

This is a first step - ideally, the movement functions called from
UnitMotionManager would actually be moved there.

Differential Revision: https://code.wildfiregames.com/D3509
This was SVN commit r25071.
2021-03-17 17:04:51 +00:00
vladislavbelov ae07dcb4ff Removes joystick from camera controller.
Differential Revision: https://code.wildfiregames.com/D3700
This was SVN commit r25070.
2021-03-17 16:28:48 +00:00
Freagarach 8cdfc107b7 Let garrisoned entities be IDLE.
The "GARRISONED"-state was quite strange, for entities being garrisoned
can just as well perform other tasks (see e.g. turrets).
Also, the need for keeping a "garrison" order on the stack is removed.

Fixes: #6022
Differential revision: D3656
Refs. #6081

This was SVN commit r25069.
2021-03-17 14:53:09 +00:00
Freagarach 9f27f0eed8 Clean mirage internals.
Use a map that stores the functions instead of them being part of the
Mirage component.
Means that a lot doesn't need to be inited now (refs. #5979).

Ticket: #5985
Differential revision: D3694
Comments by: @wraitii
This was SVN commit r25068.
2021-03-17 14:42:06 +00:00
vladislavbelov bc66700e11 Adds more detailed test for perspective camera projection and its corners in world space.
Cleanups CVector3D a little bit.

This was SVN commit r25066.
2021-03-16 22:42:29 +00:00
wraitii b989a6dc8f Minor improvements to campaigns support.
- Remove LevelID harcoding
- Forward the initial data to the endgame script.
- Update the currentRun logic to make it behave more expectedly.

Differential Revision: https://code.wildfiregames.com/D3649
This was SVN commit r25065.
2021-03-16 14:48:12 +00:00
Freagarach a72423d3dc Clean up SpawnUnits in ProductionQueue.
Have an entity cache per item (refs. #6104) (which means it doesn't need
to be created at init; refs. #5979).
Cache the PQ-position instead of querying it for every spawned entity.
One could use any arbitrary player for spawning entities now, increasing
mod support.

Differential revision: D3669
Comment by: @wraitii
This was SVN commit r25064.
2021-03-16 06:01:23 +00:00
Freagarach df45f538df Clean up AddBatch (AddItem) in ProductionQueue.
Removes indentation.
Adds return value.
Cache owner instead of querying often.

This function can be cleaned even more later.

Differential revision: D3670
Comments by: @wraitii
This was SVN commit r25063.
2021-03-16 05:55:04 +00:00
Freagarach 93fe2ffa8a Handle aura and production pause on GarrisonedStateChanged message.
This reduces hard-coupling between the components.

Refs. #6081
Differential revision: D3683
Reviewed by: @wraitii
This was SVN commit r25062.
2021-03-16 05:49:36 +00:00
Freagarach 5cbbd570c0 Add range overlay to artillery.
Structures have them since ad1ab0c3d3, but units were excluded there due
to their mobility and amounts.
Artillery is not that easily massed and also not very mobile, but has a
high range and damage with a low reload time, making it nice to know
their approximate range.

Patch by: @Nescio
Differential revision: D3606
Comments by: @Angen, @borg-, @wraitii
This was SVN commit r25061.
2021-03-16 05:35:19 +00:00
wraitii 54fc516679 Fix rebase error in 8e34371deb
Reported by: Nescio
This was SVN commit r25060.
2021-03-15 18:53:35 +00:00
wraitii 9db72570c2 Disable wicker baskets on polar sea.
There is no fruit on the map, therefore much like wood techs, the fruit
tech is disabled.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3595
This was SVN commit r25059.
2021-03-15 15:52:32 +00:00
wraitii 8e34371deb Streamline ship stats.
- Fishing boat build time from 20 to 15 (5 less than bireme/merchant).
- Quinquereme population from 3 to 5 (biremes have 2, triremes 3)
- Warships get a 2:1 wood to metal cost
- Loot is standardized to 20% of costs, XP to 10% of health, similar to
siege engines and structures.
- Fishing boath & Merchant ship have the same resistance as warships but
accordingly lower HP, for easier stat comparison.

Patch by: Nescio
Accepted By: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2956
This was SVN commit r25058.
2021-03-15 15:45:20 +00:00
wraitii f05235ec09 Lower cavalry melee attack range again.
D3482/5701ffccf8 raised the melee attack range to 6 to compensate for
movement over a turn with 500ms MP turns.
Following D3275/d4c2cf4430, this is no longer necessary. Revert to 4
(half the footprint length + 1 & their capture range).

Patch by: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3673
This was SVN commit r25057.
2021-03-15 15:38:41 +00:00
wraitii c9f37fc613 Lint update: use arclint, remove JSHint, remove coala on CI.
This runs linting using the "arc lint" command of arcanist, which
notably gets run automatically as part of the arc diff workflow.

Changes:
- The major change is that arc lint reports, by default, only issues on
changed lines instead of changed files (--lintall changes that).
- JSHint is largely redundant with eslint and does not support some of
the new Javascript functionality that we are able to use in 0 A.D., such
as conditional chaining, thus it is removed (of course, users can still
run it manually).
- Eslint 7 is supported out of the box and updated to ES 2020
- cppcheck and eslint are optional - if the executable is not found
(e.g. in PATH), it will fallback to a 'dummy' PHP script that does
nothing. This has been tested on windows, mac and Debian (CI).
- The licence year linter now suggests replacement, and has been
rewritten as an arcanist linter.
- Add a JSON error linter.

The intention is to have non-intrusive external linting, and largely the
same text linting.

Coala has largely gone unmaintained in the past few years (more so than
arcanist anyways) and installing it on modern Python is convoluted.

Differential Revision: https://code.wildfiregames.com/D3639
This was SVN commit r25056.
2021-03-15 15:14:28 +00:00
wraitii ab53a351ba Fix siege_attack tech not affecting Maurya.
Patch by: borg-
Accepted By: Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D3655
This was SVN commit r25055.
2021-03-15 10:15:00 +00:00
Freagarach 7026d1a702 Fix typo in prop-point of Iberian blacksmith.
Patch by: @nwtour
Differential revision: D3667
Reviewed by: @Stan
This was SVN commit r25054.
2021-03-15 08:49:52 +00:00
Freagarach 6bd30fe150 Elephant_stables -> elephant_stable.
- Renames the elephant_stables.xml templates to elephant_stable.xml
(without plural s), as well as their generic template_*.xml parent,
consistent with e.g the stable.
- Corrects all occurrences in simulation and map files accordingly.
- Renames the stable and elephant stable audio files.
- Drops pers_ from the barrack.png and stable.png icons.

Patch by: @Nescio
Differential revision: D3343
This was SVN commit r25053.
2021-03-15 08:45:09 +00:00
Freagarach 8dc86d20bb Improve Army camp and Amun temple tooltips.
Mention they train ranked entities.

Patch by: @borg-
Differential revision: D3677
Reviewed by: @Nescio
This was SVN commit r25052.
2021-03-15 08:34:37 +00:00
Angen 2f5c99776e Fix 85f8d97859
This was SVN commit r25050.
2021-03-14 13:00:13 +00:00
Angen 85f8d97859 Add missing queueplanBuilding.js changes lost somewhere when updating D3654
This was SVN commit r25049.
2021-03-14 12:59:10 +00:00
Angen 6598433108 Call get without has in getEntityById
getEntityById calls .has before actually getting the entity by .get and
otherwise returns undefined.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get

The element associated with the specified key, or undefined if the key
can't be found in the Map object.

So calling has is redundant causing performance loss.

Differential revision: D3653
Reviewed by: @Freagarach
This was SVN commit r25048.
2021-03-14 12:45:08 +00:00
Angen 665f16d1bb Let Petra to build apartments
Teach her to build advanced houses available for cart players as they
provide more population.

Reviewed by: @Freagarach
Differential revision: D3654
This was SVN commit r25047.
2021-03-14 12:43:19 +00:00
vladislavbelov 56047ac9fa Adds logs to CameraController for speed changes of camera scroll, rotate and zoom.
Patch By: nwtour
Differential Revision: https://code.wildfiregames.com/D3604
This was SVN commit r25045.
2021-03-12 20:57:33 +00:00
Freagarach f1e1edad43 Move movement logic from UnitAIs "Garrisoned"-state to approaching.
Reduces switching of states, improves readability.

Refs. #6081
Differential revision: D2368
Comments by: @Stan, @wraitii
This was SVN commit r25044.
2021-03-12 19:53:52 +00:00
Freagarach 90831d5d88 Let PetraAI use the GarrisonHolder from cmpGarrisonable instead of UnitAI.
References 3851a48298.

Differential revision: D3645
Reviewed by: @Angen
This was SVN commit r25043.
2021-03-12 19:47:31 +00:00
vladislavbelov 4d58b0729e Moves CreateDateTimeInstance from the public L10n header to its implementation.
This was SVN commit r25042.
2021-03-12 09:11:22 +00:00
vladislavbelov d6ddc4f3ac Removes tinygettext from the L10n header.
Noticed By: nwtour
This was SVN commit r25041.
2021-03-12 08:51:50 +00:00
Freagarach 533e78b2e5 Clean up RemoveBatch -> RemoveItem code in ProductionQueue.
- Rename `RemoveBatch` to `RemoveItem`.
- Refactor that function. (Don't clear the cached entities when *any*
item is removed.)

Fixes the bug that the training is still blocked when a tech is the next
in the queue and the blocking item is removed.

Based on a patch by: @Polakrity
Differential revision: D1843
Comments by: @Angen, @bb
This was SVN commit r25040.
2021-03-12 08:45:39 +00:00
Freagarach cd705967ce Clean up timer code in production queue.
- Use an interval instead of requesting a timeout every timeout.
- Integrate the lateness-parameter.
- Some other cleanup.
- Don't create objects for null values in messages.
- Don't create this.timer on init.

Based on a patch by: @Polakrity
Differential revision: D1906
Comments by: @Angen, @Stan
This was SVN commit r25038.
2021-03-12 07:22:52 +00:00
Freagarach c4ab28cdbe Improve consistency in tutorial and random map texts.
- Combines multi-spaces into one.
- `\u000a` -> `\n`.
- Proper quotation marks instead of programmers quotes.
- A few typos.
- Capitalise classes.

Scenarios and skirmishes are excluded due to checkrefs.pl not being able
to handle proper quotes in XML.

Patch by: @Nescio
Differential revision: D3493
Comments by: @Stan
This was SVN commit r25037.
2021-03-12 06:52:26 +00:00
Freagarach d46d0032ca Clean attack lines in templates.
- Listing all damage types everywhere is not needed anymore, therefore
0-damage lines are purged.
- Trailing zeros are removed from <Attack> node lines (e.g. <MaxRange>,
<Spread>), per @bb.
- Attack nodes in templates that were effectively replaced by all their
children are deleted too.
- Clean up the confusing and haphazard attack situation in the fauna
templates.
- The now obsolete template_unit_fauna_wild_defensive_fox.xml is
deleted.
- All animals got an attack range that's at half their footprint length
+ 1 and an attack <PrepareTime> that's half their <RepeatTime>, for
consistency.

Patch by: @Nescio
Differential revision: D3342
This was SVN commit r25036.
2021-03-12 06:43:47 +00:00
Freagarach 96ab4a2de6 Fix ownership changing assertion with a garrison holder with multiple garrisoned entities.
In lieu of a better solution.

Reverts: 4b951cf4ba

This was SVN commit r25034.
2021-03-11 06:14:13 +00:00
Imarok 7376e43e06 Fix typos in log and warn messages
Patch by: LudovicRousseau
Refs: #6098

Differential Revision: https://code.wildfiregames.com/D3659
Differential Revision: https://code.wildfiregames.com/D3660
This was SVN commit r25033.
2021-03-10 16:50:15 +00:00
Freagarach 4b951cf4ba Handle ownership changes of a garrisoned entity in cmpGarrisonable.
Makes sure GarrisonHolders don't need to needlessly listen to global
ownership changes anymore.
Also fixes dying entities on turret points.

Refs. #6081
Differential revision: D3648
This was SVN commit r25031.
2021-03-08 07:26:09 +00:00
Freagarach d3c3072c83 Give the Garrisonable component the power to set garrisoned on an entity with UnitAI, instead of leaving it to UnitAI.
Since the only way of garrisoning is using `cmpGarrisonable`.
025a00340e introduced the `this.isGarrisoned`-flag, its meaning was
discussed in https://code.wildfiregames.com/D1403.

Refs. #5979, #6081
Differential revision: D2379
Comments by: @elexis, @Stan, @wraitii
This was SVN commit r25030.
2021-03-08 07:19:06 +00:00
Freagarach c310d4afcd Use seperate message to handle skirmish replacements.
Meaning GarrisonHolders won't listen for GlobalEntityRenamed messages
uselessly for the rest of the match after init.

Refs. #6081
Differential revision: D3627
This was SVN commit r25029.
2021-03-08 07:01:17 +00:00
wraitii 637e44cfd7 Hotkey search - lowercase comparison.
It is better to do case-insensitive search.
Improves on a4852c4c01, though the sensitivity is only an issue since
09ad8bfbe5

Tested by: nwtour
Reported by: nwtour
Differential Revision: https://code.wildfiregames.com/D3647
This was SVN commit r25027.
2021-03-07 15:29:19 +00:00
wraitii 839cd0ec12 Update the replay cache to consider modification time.
This makes the cache work consistently if replays are changed
externally.

Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3615
This was SVN commit r25026.
2021-03-07 08:55:27 +00:00
Freagarach e24e48f32d Fix AutoGarrison UnitAI order.
Typo introduced in e18001e897.
Found by PetraAI.

Differential revision: D3643
Fixes #6089
Comment by: @wraitii
This was SVN commit r25025.
2021-03-07 06:54:28 +00:00
Freagarach b48cd5244f Fix PushOrderFront with construction.
POF introduced in afd1eaee0d.
Placing foundations takes another route, for which was warned in the
original ticket but not done nonetheless.
This fixes that route.

Differential revision: D3642
Comments by: @wraitii
Fixes #6090

This was SVN commit r25024.
2021-03-07 05:55:57 +00:00
wraitii 09ad8bfbe5 Customize hotkey categories & ordering, prepare for translation.
- adds JSON files to specify the human-readable categorization, name and
description of hotkeys.
- clean up code

Translation support via messages.json not yet added - the strings need
another pass and that avoids translators doing redundant work. See D3641

Refs #5867, Refs #5996

Differential Revision: https://code.wildfiregames.com/D3596
This was SVN commit r25023.
2021-03-06 18:11:41 +00:00
wraitii 3b3a297cca Fix checkrefs following D11 / 1c9efa6fb5
Fixes D11 / 1c9efa6fb5.

The problem is that some GUI pages were simply named "page.xml" which
the regex didn't like.

Accepted By: Nescio
Differential Revision: https://code.wildfiregames.com/D3644
This was SVN commit r25022.
2021-03-06 13:57:11 +00:00
Freagarach afd1eaee0d Allow players to push orders to the front of the queue.
Differential revision: D3605
This was SVN commit r25020.
2021-03-06 06:12:07 +00:00
Freagarach 979636cc57 Ungarrison entities using cmpGarrisonable.
Follow-up to e18001e897.
This moves responsibilities even further to the garrisoning entity.

Fixes the garrison flag when renaming entities cannot garrison (#5906).
Allows easy fixing of #6087.

Ticket: #6081
Differential revision: D3628
Comments by: @Stan, @wraitii (also in length on IRC)
This was SVN commit r25019.
2021-03-06 06:07:32 +00:00
vladislavbelov 76af18b23a Removes deprecated gl_*Matrix builtins from GLSL shaders.
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D3635
This was SVN commit r25018.
2021-03-05 22:32:32 +00:00
wraitii 373b8b6ff1 Fix 4b7b9325ac - idle units are frozen in walk anim.
Fixes 4b7b9325ac

Differential Revision: https://code.wildfiregames.com/D3640
This was SVN commit r25017.
2021-03-05 18:34:06 +00:00
wraitii 2be7479265 Fix quickloading/quicksaving following d4c2cf4430
Fixes d4c2cf4430.

Differential Revision: https://code.wildfiregames.com/D3636
This was SVN commit r25016.
2021-03-05 13:36:27 +00:00
wraitii 4718690f71 Make attacker data explicitly optional in status effects.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3633
This was SVN commit r25015.
2021-03-05 09:40:23 +00:00
Freagarach b4fd4ab655 Combine attacker data in "data"-object in attack-related code.
Allowing for easier introduction of new parameters.
Split from D781, (D368).

Differential revision: D2269
Comments by: @Angen, @Stan, @wraitii
Idea accepted by: @wraitii
This was SVN commit r25013.
2021-03-05 06:32:44 +00:00
wraitii 4b7b9325ac Fix a rare case of unit 'gliding' while moving.
Fixes a1dc9cadd8: if the speed doesn't change, UnitMotion doesn't update
the visual actor. Unfortunately, if another component has in the
meantime reset the animation to 'Idle', the unit will now move while
Idle. This can happen when leaving formation to do something else,
though it'srare.

This fixes that by instead always calling VisualActor, which does its
own checking to avoid redundancy. It's a bit less efficient, but not too
much.
Note that this relies on UnitMotion::UpdateMovementState being called
after any UnitAI code that could reset the animation to IDLE.

Differential Revision: https://code.wildfiregames.com/D3619
This was SVN commit r25011.
2021-03-04 18:32:48 +00:00
wraitii 007bf75264 Fix map previews/descriptions in the lobby game list.
Map previews are broken in the lobby game list, except for maps with
specific previews (such as biome RMs). Descriptions were broken in
general. The error lies in 1ae4f497e8, which forgot to add the xml
extension.

Differential Revision: https://code.wildfiregames.com/D3632
This was SVN commit r25010.
2021-03-04 18:31:33 +00:00
wraitii 765a40ac5c Fix compilation with --without-audio
Compilation --without-audio was broken since D3108 / 876f6d5e50

Patch by: nwtour
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3631
This was SVN commit r25009.
2021-03-04 17:36:24 +00:00
vladislavbelov 40399011f7 Fixes revealed missed include after e104b41be2.
This was SVN commit r25008.
2021-03-04 08:55:49 +00:00
wraitii cfaddf51f9 Remove 'New' tag on Atlas Valleys
Missed in 68b81f63b1.

Reported by: langbart
This was SVN commit r25007.
2021-03-04 08:40:04 +00:00
vladislavbelov 8fe9e420ee Fixes removed include after 2e4639e6dc.
This was SVN commit r25005.
2021-03-03 23:07:50 +00:00
vladislavbelov 2e4639e6dc Removes unused containers included in headers.
This was SVN commit r25004.
2021-03-03 23:01:08 +00:00
vladislavbelov c29423c723 Fixes revealed missed includes after e104b41be2.
This was SVN commit r25003.
2021-03-03 22:38:59 +00:00
vladislavbelov e104b41be2 Cleanups includes for cassert and streams.
This was SVN commit r25002.
2021-03-03 22:26:49 +00:00
wraitii d4c2cf4430 Increase MP Command delay to 4 turns, decrease MP turns to 200ms.
To hide network latency, MP turns send commands not for the next turn
but N turns after that (introduced in c684c211a2).
Further, MP turn length was increased to 500ms compared to 200ms SP
turns (introduced in 6a15b78c98).
Unfortunately, increasing MP turn length has negative consequences:
- makes pathfinding/unit motion much worse & unit behaviour worse in
general.
- makes the game more 'lag-spikey', since computations are done less
often, but thus then can take more time.

This diff essentially reverts 6a15b78c98, instead increasing
COMMAND_DELAY from 2 to 4 in MP. This:
- Reduces the 'inherent command lag' in MP from 1000ms to 800ms
- Increases the lag range at which MP will run smoothtly from 500ms to
600ms
- makes SP and MP turns behave identically again, removing the
hindrances described above.

As a side effect, single-player was not actually using COMMAND_DELAY,
this is now done (can be used to simulate MP command lag).

Refs #3752

Differential Revision: https://code.wildfiregames.com/D3275
This was SVN commit r25001.
2021-03-03 21:02:57 +00:00
Freagarach 5e6b775d1a [Gameplay] - Search for resources near a current location before the init-pos.
This should bring the behaviour back to pre-A24 and means entities will
stray a lot less when gathering.
The entity will search close to the current position, which is mostly
next to a dropsite.
When there is nothing found there, the entity searches nigh the initPos.

Differential revision: D3607
Comments by: @wraitii
Tested by: @Nescio
This was SVN commit r25000.
2021-03-03 18:24:16 +00:00
Freagarach 97addf2aa7 Autocontinue after gathering a treasure.
Follow-up to ea96e81098.
Also adds the ability to gather near a position (e.g. when ungarrisoning
with a rally point set on a treasure that is gone).
Gathering treasures should now behave exactly the same as prior to the
split.

Differential revision: D3580
Comments by: @wraitii
This was SVN commit r24999.
2021-03-03 18:20:49 +00:00
s0600204 c879308ad6 Use pkgconfig to find libpng
Should hopefully resolve an issue raised on IRC by @spcman and @Xavi92

Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3610
This was SVN commit r24998.
2021-03-03 16:11:41 +00:00
s0600204 2d9db5ade6 Bump miniupnpc version built on MacOS
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3630
This was SVN commit r24997.
2021-03-03 16:06:43 +00:00
Stan 1c7f2661ce Add missing file in previous commit.
This was SVN commit r24996.
2021-03-03 15:18:44 +00:00
Stan c16d961cd2 Enable support for powerpc64 systems. New problems with NVTT will be addressed in another diff.
Patch by: @tpearson-raptor
Comments by: @q66
Refs:
https://github.com/void-linux/void-packages/blob/master/srcpkgs/0ad/patches/ppc64.patch

Differential Revision: https://code.wildfiregames.com/D1619
This was SVN commit r24995.
2021-03-03 15:13:47 +00:00
wraitii a4223c87f6 Fix NoPCH following cb346e207b
Broken in cb346e207b

Differential Revision: https://code.wildfiregames.com/D3629
This was SVN commit r24994.
2021-03-03 11:08:57 +00:00
Freagarach 298d459e45 Do not initialise null values in cmpGarrisonHolder.
Saves some serialisation data (refs #3834).

Ticket: #5979
Differential revision: https://code.wildfiregames.com/D3468
Comments by: @Angen, @Stan
This was SVN commit r24993.
2021-03-03 10:18:57 +00:00
Freagarach bf988bfde5 Add resources "component test".
To test more the interaction between components.

Differential revision: D3339
This was SVN commit r24992.
2021-03-03 08:57:06 +00:00
Freagarach bd1ec429a4 Let order use solely their message.
Improves consistency in UnitAI.

Differential revision: D3624
Approved by: @wraitii
This was SVN commit r24991.
2021-03-03 08:21:00 +00:00
Freagarach 17a7f691c0 Fix tests broken between latest rebase and commit of ea96e81098.
Reported by: CI.
This was SVN commit r24990.
2021-03-03 08:18:42 +00:00
Freagarach ea96e81098 Split treasures from ResourceSupply.
Removes some hardcoding and allows for easier modding of treasures.

Refs.: #5888
Differential revision: D3303
Comments by: @Imarok, @Nescio, @Stan, @wraitii
This was SVN commit r24989.
2021-03-03 07:47:38 +00:00
s0600204 0de47dd1ec Pass an install location to the fmt build on MacOS
Similar to what all the other sections do.


Differential Revision: https://code.wildfiregames.com/D2689
This was SVN commit r24987.
2021-03-02 23:40:48 +00:00
vladislavbelov 143fdf551f Moves glGetError under config to prevent a performance drop on some platforms.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3620
This was SVN commit r24986.
2021-03-02 21:24:34 +00:00
vladislavbelov 7ea57932c4 Small style fixes for framebuffer clears.
This was SVN commit r24985.
2021-03-02 21:21:08 +00:00
vladislavbelov 94ba80d0cb Removes useless framebuffer clears by glClear.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3622
This was SVN commit r24984.
2021-03-02 21:20:26 +00:00
wraitii cb346e207b Refactor all usage of RegisterFunction to ScriptFunction::Register
- Replace ScriptInterface::RegisterFunction with
ScriptFunction::Register
 - Mostly removing unused cmpPrivate*
 - Some usage introduces specific getters (mapgenerator, AIWorker,
XmppClient,...)
 - Several passthrough functions are simply removed in favour of calling
the original, reducing duplication
 - Make use of ScriptRequest/ScriptInterface capabilities where
relevant.
- Make JSI_* headers only expose necessary functions, lightening them
considerably and reducing duplication
 - Reuse namespaces in JSI_* implementations directly, reducing visual
noise there

Follows f3aedf88a6

Differential Revision: https://code.wildfiregames.com/D3626
This was SVN commit r24983.
2021-03-02 20:01:14 +00:00
wraitii 869076ebc5 Replace double division with multiplication/division
As noted by Vladislavbelov in d8ea401a95.
(Likely leads to identical assembly with optimisation & current values)

This was SVN commit r24982.
2021-03-02 18:27:06 +00:00
wraitii 2838873c0a Fixes & improvements to FunctionWrapper
- HandleValue needed to explicitly pass UndefinedHandleValue for
'default' arguments.
- Allow passing ScriptInterface as first argument.
- Statically check that a getter is provided for object methods instead
of crashing at runtime
- A few stylistic improvements

Differential Revision: https://code.wildfiregames.com/D3625
This was SVN commit r24981.
2021-03-02 16:55:22 +00:00
wraitii d8ea401a95 Decouple LOS resolution from terrain resolution
Introduce a LOS_TILE_SIZE, to replace usage of TERRITORY_TILE_SIZE in
the LOS code.
This makes it possible to change the resolution of LOS/Terrain without
affecting the other component.

Additional refactoring:
- LosTile has been renamed LosRegion (it's more comparable to the
hierarchical pathfinder regions/spatial subdivisions)
- LosState explicitly refers to "los vertices" instead of terrain
vertices.

Refs #5566

Differential Revision: https://code.wildfiregames.com/D3076
This was SVN commit r24980.
2021-03-02 16:44:40 +00:00
wraitii 1c9efa6fb5 Implement Single-Player campaigns - Barebones tutorial campaign included.
This implements necessary tooling to create a simple SP campaign.
The architecture is intended to be easily extensible in the future.

'Campaign Run' contains the metadata of a campaign, e.g. maps
played/won. It's saved in the user folder under
saves/campaigns/*.0adcampaign
Campaign templates are JSON files in campaigns/

Campaigns can specify which Menu interface they will use. This is
intended to allow more complex layouts/presentation.
For now, a simple list interface is provided. This allows making
campaigns without any fancy art required (and effectively mimics AoE1's
campaign interface).

The behaviour on game end is also intended to be extensible, supporting
things such as carrying over units between scenarios - for now, it
simply records won games.

GameSetup is not available for now - scenarios are triggered with the
settings defined in the map/default settings. Improving on this requires
refactoring the gamesetup further.

The load/save game page has been extended slightly to support
showing/hiding campaign games (campaign gamed are saved under saves/
directly, there is no strong motivation to do otherwise at this point)

Closes #4387

Differential Revision: https://code.wildfiregames.com/D11
This was SVN commit r24979.
2021-03-02 15:43:44 +00:00
wraitii b7ff2107ea Partial revert of d038b3c4f2 / REJECT_ORDER with FinishOrder()
Fixes d038b3c4f2, by partially reverting it.

If the new order is rejected, PushOrder() will call FinishOrder. If
there are no more orders on the queue, this calls SetNextState("idle"),
with the intention os switching the unit to IDLE. However, this only
works from within an FSM call, and thus does nothing if a new command
gets rejected.

The problem is that this.order/this.orderQueue is already replaced by
the point the order is rejected when called via ReplaceOrder. Ideally,
this would not happen (but doing so isn't trivial).

The current code avoids having 2 different ways to reject an order, thus
isn't a complete revert of d038b3c4f2. It triggers an IDLE re-entry that
wasn't there before if the unit is IDLE when it receives the rejected
order, which at the moment basically never happens.

Refs #5771 (reopened)

Reported by: gameboy
Comments by: Freagarach, Angen
Differential Revision: https://code.wildfiregames.com/D3618
This was SVN commit r24978.
2021-03-02 15:18:39 +00:00
Freagarach e18001e897 Let entities garrison using cmpGarrisonable.
Followup to f4c9305eee.
Moves the logic for garrisoning from cmpGarrisonHolder to the entity
that is being garrisoned.
Also fixes
https://wildfiregames.com/forum/topic/36863-teleportation-feature-in-a24/?do=findComment&comment=418441
while at it (setting garrisoned before transferring orders on
transform).

Differential revision: D3280
Refs: #5906
Comments by: @Stan, @wraitii
This was SVN commit r24977.
2021-03-02 15:06:16 +00:00
wraitii a64536b45f Fix MSVC unknown pragma warning
Follows f3aedf88a6.

Reported by: Stan
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D3623
This was SVN commit r24976.
2021-03-02 15:00:33 +00:00
wraitii 5e5ea5cba5 Fix replayprofile/ graphing tool for Profiler1
All modern browsers block ajax request to local file.
This changes extract.pl to generate a single HTML file with data
embedded.
This is now the default behaviour, --to-json to export, --from-json to
load exported.

Patch by: nwtour
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3621
This was SVN commit r24975.
2021-03-02 08:35:39 +00:00
Freagarach 23aa59e3d4 Let domestic animals flee when attacked.
Since slaughter kills animals in one strike since 3d61c227f3, domestic
animals can now be set to flee when attacked by anything else than
slaughter, like area damage or stray missiles.

Original patch by: @elexis
Differential revision: D193
Comments by: @mimo, @wraitii
This was SVN commit r24973.
2021-03-02 06:18:56 +00:00
Freagarach f020a145f1 Fix Iberian starting walls on Skirmish maps.
Typo caused by b57abe806c, pointed out by @Sundiata in
https://wildfiregames.com/forum/topic/36706-why-alpha-24-is-not-nice/page/4/?tab=comments#comment-418337.

Patch by: @Nescio
Differential revision: D3616
This was SVN commit r24972.
2021-03-02 06:14:23 +00:00
Stan bcd292d6c9 Make forge smoke only visible when the forge is researching.
Add missing particle sparks.

Thread:
https://wildfiregames.com/forum/topic/27329-visual-feedback-for-researching

This was SVN commit r24971.
2021-03-02 00:01:00 +00:00
Stan ac72fb4486 Fix compilation of Atlas on UNICODE BUILDS
Patch by: @madpilot
Tested by: nwtour
Differential Revision: https://code.wildfiregames.com/D1593
This was SVN commit r24970.
2021-03-01 23:32:23 +00:00
wraitii f3aedf88a6 Introduce C++ templates replacements for DEFINE_INTERFACE_X and RegisterFunction macros
The new methods:
- aren't included in ScriptInterface.h directly, lightening that header
- don't use boost CPP
- don't need argument types or number or constness to be specified
- can work with object methods somewhat transparently
- support optional cmptPrivate (allowing removal of many UNUSED macro)
- support optional const ScriptRequest&, which is safer.

This first diff changes only some of the JSI files & the component
manager. Further diffs will update other files and finally delete the
current code.

Differential Revision: https://code.wildfiregames.com/D2818
This was SVN commit r24969.
2021-03-01 20:52:24 +00:00
vladislavbelov 9ed3b88d25 Guarantees no memset for allocation of DynamicArena::Block
Differential Revision: https://code.wildfiregames.com/D3609
This was SVN commit r24968.
2021-03-01 20:35:30 +00:00
wraitii 502b229655 Check for missing auras in GUI Interface
Improve the explicitedness of the following error.

Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3614
This was SVN commit r24967.
2021-03-01 17:54:46 +00:00
wraitii 6dc0ffd86f Add a 'debug' catalog & PEP8 the long string file
- Adds a function to generate a 'debug' catalog. This prepends 'X_X '
to strings, to make it obvious in-game which are translated and which
aren't, while still remaining usable.
 - cleans up the code and formats to PEP8 properly (except for line
lengths).

Differential Revision: https://code.wildfiregames.com/D3617
This was SVN commit r24966.
2021-03-01 16:37:33 +00:00
Freagarach d6e0a9963d Remove corral aura which was not supposed to be committed in c888844b3a.
Spotted by: @wraitii
This was SVN commit r24964.
2021-02-28 21:00:05 +00:00
Freagarach c888844b3a Decay/Regenerate option for resources.
Allows entities to change their resource amount over time, possibly with
some constraint.

This is a not-so-bare minimum, but can certainly be improved and/or
extended later.

Part of: #1973
Original patch by: @smiley
Redone by: @Stan
Standing on the shoulders of giants: @Freagarach
(Revisions: 59; Inlines: 209)
Differential revision: D1718
Comments by: @Angen, @elexis, @Imarok, @Langbart, @nani, @Nescio,
@smiley, @Stan, @wraitii

This was SVN commit r24963.
2021-02-28 20:14:53 +00:00
wraitii df18102e96 Add an 'Evaluate' RL endpoint, intended for dynamic game balancing
This adds a new endpoint to the RL interface for evaluating custom
JavaScript. When combined with the ability to create arbitrary
modifiers, this provides the required functionality for exploring
quantitative game balancing.

Patch By: irishninja
Fixes #5981

Differential Revision: https://code.wildfiregames.com/D3479
This was SVN commit r24962.
2021-02-28 12:16:32 +00:00
wraitii 2e2ef6f3fe Increase safety of UnitAI formation code
- PushOrderFront could lead to an infinite loop if walking fails.
- Move units in formation before issuing the move order (or the
formation may not exist).

Differential Revision: https://code.wildfiregames.com/D3411
This was SVN commit r24961.
2021-02-28 10:11:30 +00:00
Freagarach 0e6cf11d86 Resupport more garrisoned slots per entity.
Basically removed in 3521c8f51e, now brought back :) (But split from the
population space.)

Differential revision: D2056
Comments by: @Angen, @Nescio, @Stan, @wraitii
This was SVN commit r24960.
2021-02-28 10:02:03 +00:00
Freagarach 41a5650a62 Allow garrisoned entities to upgrade.
Since its introduction in b2f4b0f494 garrisoned entities were not
allowed to upgrade (b2f4b0f494#inline-4821) but that is not needed (at
least since 4fadd75ace).

Changing templates to anything not being able to garrison will still
fail (#5906) but that can also be done with this code.

Differential revision: D3251
Comment by: @bb
This was SVN commit r24958.
2021-02-28 06:47:36 +00:00
Freagarach f4c9305eee Move some functionality from GarrisonHolder to Garrisonable.
Take some responsibility from GarrisonHolder to where it belongs
(Garrisonable).

Differential revision: D3223
Comments by: @Stan, @wraitii
This was SVN commit r24957.
2021-02-28 06:37:05 +00:00
Freagarach d038b3c4f2 Properly discard orders.
Instead of manually calling FinishOrder(). Also, `{ "discardOrder": true
}` is changed to a const `false`.

Differential revision: D3283
Fixes: #5771
Comments by: @Angen, @Stan, @wraitii
This was SVN commit r24956.
2021-02-28 06:29:53 +00:00
Freagarach e5ee028313 Only cancel (un)packing when in the correct state.
Differential revision: D3285
This was SVN commit r24955.
2021-02-28 05:51:55 +00:00
Freagarach c33d1192bc Only stop moving when state requests that.
In our current UnitAI implementation, the states are responsible for
whether we are moving or not. If a request to stop moving is made from
outside the state that initiated the moving order that is (mostly)
wrong. This fixes that.

Differential revision: D3289
Comment by: @wraitii
This was SVN commit r24954.
2021-02-28 05:40:08 +00:00
Freagarach e7158ae6b1 Unify UnitAI and AnimalAI.
18b317bc19 (#563) introduced an ANIMAL-state from a separate
AnimalAI-component (introduced in e19146cf25).
This patch merges that separate state and brings the ROAMING and FEEDING
(renamed to LINGERING) under the INDIVIDUAL.IDLE-state.

This enables e.g. city-building mods to have human units that linger and
roam or animals that behave like humans.

The specific values for animals might need tweaking after this.

Differential revision: D2646
Fixes: #1832, #5593
Comments by: @Angen, @Langbart, @Nescio, @Stan, @wraitii
Refs.: #3919

This was SVN commit r24953.
2021-02-27 20:13:40 +00:00
wraitii 113fefeeb7 Netcode: Identify controller client via a secret key
The 'controller' of an MP game (the host in general, though dedicated
servers would change that) is currently whoever first tells the server
that it is. This can be abused since it relies on trusting the clients.

This changes that logic: the server defines a 'controller secret', and
the first client to sent the correct controller secret is the
controller. This is safe assuming the secret is unknowable enough (the
current solution wouldn't pass strict cryptography tests, but it's
likely good enough).

Reverts 1a3fb29ff3, which introduced the 'trust the clients' mechanic,
as a change over 'the first local IP is controller'.

Necessary step towards dedicated server, if we want to use the regular
gamesetup (Refs #3556)

Differential Revision: https://code.wildfiregames.com/D3075
This was SVN commit r24952.
2021-02-27 17:44:59 +00:00
vladislavbelov 32c3f4fb90 Early return in PreprocessorWrapper in case of failed include resolve.
This was SVN commit r24951.
2021-02-27 17:21:02 +00:00
Imarok 2ce0c2b988 Remove unneeded check in JSInterface_GameView.cpp
Differential Revision: https://code.wildfiregames.com/D3608
This was SVN commit r24950.
2021-02-27 16:52:51 +00:00
wraitii bdda96a2e7 Prevent using privileged ports on *nix from the GUI
Ports 1-1023 are privileged and shouldn't be accepted by the GUI.

Patch by: DynamoFox
Differential Revision: https://code.wildfiregames.com/D3574
This was SVN commit r24949.
2021-02-27 16:40:42 +00:00
wraitii 20b1d98a84 Fix compilation following 52fcee9c91
52fcee9c91 broke compilation because spawnedRadius is not an integer.

This was SVN commit r24948.
2021-02-27 11:12:21 +00:00
wraitii e839fc29c7 Fix i18n for common map trigger scripts.
Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3570
This was SVN commit r24947.
2021-02-27 10:34:11 +00:00
wraitii c3f74494b4 Fix GUI hotkey/map/reference strings not being translated.
Fixes ae9ea5b859, a4852c4c01, bbd808349f

Differential Revision: https://code.wildfiregames.com/D3535
This was SVN commit r24946.
2021-02-27 10:27:26 +00:00
wraitii 52fcee9c91 Fix division by 0 error in PickSpawnPoint
The spawn code should not assume that obstructions will never be
0-sized.

Reported by: Zack
Fixes #6039

Differential Revision: https://code.wildfiregames.com/D3583
This was SVN commit r24945.
2021-02-27 10:21:04 +00:00
wraitii c6f50b253f Fix *nix tarballs to extract in a subfolder.
Also incorporate retry improvements by Stan

Reported by: madPilot
Differential Revision: https://code.wildfiregames.com/D3585
This was SVN commit r24944.
2021-02-27 10:19:31 +00:00
wraitii 0363ff112e Fix water wind speed computation
Fixes 2a485c5e3b

(the calculation resulted in mismatched wind speed & wave orientation)

Differential Revision: https://code.wildfiregames.com/D3551
This was SVN commit r24943.
2021-02-27 10:08:00 +00:00
wraitii f902b23255 Add Bellaz89 to the programming credits
For contributions to d07f271d60 notably.

Differential Revision: https://code.wildfiregames.com/D3591
This was SVN commit r24942.
2021-02-27 09:33:26 +00:00
Imarok 4eadb3eb9d The SetCameraTarget script function should not change the orientation
Reviewed by: Freagarach
Differential Revision: https://code.wildfiregames.com/D3569
This was SVN commit r24940.
2021-02-27 09:01:20 +00:00
Stan 68b81f63b1 Bump version to alpha 25.
Last alpha 24 commit was [[SVN:24937]]. [[SVN:24938]] was because the CI
wasn't turned off.

Comments by: @wraitii, @Freagarach, @Nescio,
Differential Revision: https://code.wildfiregames.com/D3571
This was SVN commit r24939.
2021-02-27 08:48:30 +00:00
9936 changed files with 126938 additions and 87561 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
{
"phabricator.uri" : "https://code.wildfiregames.com/",
"repository.callsign" : "P"
"repository.callsign" : "P",
"load": ["build/arclint/pyrolint"]
}
+20
View File
@@ -3,6 +3,7 @@
"(^binaries/system/)",
"(^build/premake/premake5/)",
"(^source/third_party/)",
"(test_[^.]+.cpp$)",
"(^libraries/)"
],
"linters": {
@@ -14,6 +15,25 @@
"3": "disabled",
"5": "disabled"
}
},
"licence-year": {
"type": "licence-year"
},
"json": {
"type": "json",
"include": "/\\.json$/"
},
"eslint": {
"type": "eslint",
"bin": ["eslint", "build\\arclint\\dummies\\eslint.bat", "build/arclint/dummies/eslint.php"],
"include": "/\\.js$/",
"config": "build/arclint/configs/eslintrc.json"
},
"cppcheck": {
"type": "cppcheck",
"bin": ["cppcheck", "build\\arclint\\dummies\\cppcheck.bat", "build/arclint/dummies/cppcheck.php"],
"include": "/\\.(h|cpp)$/",
"flags": ["--max-configs=40", "--language=c++", "--std=c++17", "-Isource/", "--suppress=unknownMacro"]
}
}
}
-11
View File
@@ -1,11 +0,0 @@
[Source]
bears = CPPCheckBear, LicenseYearBear
language = c++
files = source/**.(cpp|h)
ignore = source/third_party
[JS]
bears = ESLintBear, JSHintBear
eslint_config = build/coala/lint-config/eslintrc.json
jshint_config = build/coala/lint-config/jshintrc.json
files = binaries/data/**.js
+6
View File
@@ -42,6 +42,12 @@ in particular, let us know and we can try to clarify it.
/build
Various (unspecified)
/build/arclint
GPL version 2 (or later) - see license_gpl-2.0.txt
/build/arclint/pyrolint
Apache version 2 - see license_apache2.txt within that directory
/build/premake/premake5
BSD
+88 -48
View File
@@ -26,6 +26,11 @@
; Enable/disable windowed mode by default. (Use Alt+Enter to toggle in the game.)
windowed = false
; Switches between real fullscreen and borderless window on a full display size.
borderless.fullscreen = true
; Hides a window border in the windowed mode.
borderless.window = false
; Show detailed tooltips (Unit stats)
showdetailedtooltips = false
@@ -53,6 +58,9 @@ bpp = 0
; Preferred display (for multidisplay setups, only works with SDL 2.0)
display = 0
; Enable Hi-DPI where supported, currently working only for testing.
hidpi = false
; Allows to force GL version for SDL
forceglversion = false
forceglprofile = "compatibility" ; Possible values: compatibility, core, es
@@ -60,7 +68,7 @@ forceglmajorversion = 3
forceglminorversion = 3
; Big screenshot tiles
screenshot.tiles = 4
screenshot.tiles = 8
screenshot.tilewidth = 480
screenshot.tileheight = 270
@@ -79,11 +87,17 @@ waterrefraction = true
waterreflection = true
shadows = true
shadowquality = 0 ; Shadow map resolution. (-2 - Very Low, -1 - Low, 0 - Medium, 1 - High, 2 - Very High)
shadowquality = 0 ; Shadow map resolution. (-1 - Low, 0 - Medium, 1 - High, 2 - Very High)
; High values can crash the game when using a graphics card with low memory!
shadowpcf = true
shadowsfixed = false ; When enabled shadows are rendered only on the
shadowsfixeddistance = 300.0 ; fixed distance and without swimming effect.
; Increases details closer to the camera but decreases performance
; especially on low hardware.
shadowscascadecount = 1
shadowscascadedistanceratio = 1.7
; Hides shadows after the distance.
shadowscutoffdistance = 300.0
; If true shadows cover the whole map instead of the camera frustum.
shadowscovermap = false
vsync = false
particles = true
@@ -91,31 +105,44 @@ fog = true
silhouettes = true
showsky = true
novbo = false
; Uses a synchonized call to a GL driver to get an error state. Useful
; for a debugging of a system without GL_KHR_debug.
gl.checkerrorafterswap = false
; Disable hardware cursors
nohwcursor = false
; Different ways to draw a cursor, possible values are "sdl" and "system".
; The "system" one doesn't support a visual change of the cursor.
cursorbackend = "sdl"
; Specify the render path. This can be one of:
; default Automatically select one of the below, depending on system capabilities
; fixed Only use OpenGL fixed function pipeline
; shader Use vertex/fragment shaders for transform and lighting where possible
; Using 'fixed' instead of 'default' may work around some graphics-related problems,
; but will reduce performance and features when a modern graphics card is available.
; Backends for all graphics rendering:
; glarb - GL with legacy assembler-like shaders, might used only for buggy drivers.
; gl - GL with GLSL shaders, should be used by default.
; dummy - backend that does nothing, allows to check performance without backend drivers.
rendererbackend = "gl"
; Enables additional debug information in renderer backend.
renderer.backend.debugcontext = "false"
renderer.backend.debugmessages = "false"
renderer.backend.debuglabels = "false"
renderer.backend.debugscopedlabels = "false"
; Should not be edited. It's used only for preventing of running fixed pipeline.
renderpath = default
;;;;; EXPERIMENTAL ;;;;;
; Prefer GLSL shaders over ARB shaders. Allows fancier graphical effects.
preferglsl = false
; (0 - low, 1 - medium, 2 - high), higher quality means worse performance.
textures.quality = 2
; Experimental probably-non-working GPU skinning support; requires preferglsl; use at own risk
; (1, 2, 4, 8 and 16)
textures.maxanisotropy = 2
;;;;; EXPERIMENTAL ;;;;;
; Experimental probably-non-working GPU skinning support; requires GLSL; use at own risk
gpuskinning = false
; Use smooth LOS interpolation
smoothlos = false
smoothlos = true
; Use screen-space postprocessing filters (HDR, bloom, DOF, etc). Incompatible with fixed renderpath.
postproc = false
postproc = true
; Use anti-aliasing techniques.
antialiasing = "disabled"
@@ -124,20 +151,17 @@ antialiasing = "disabled"
sharpening = "disabled"
sharpness = 0.3
; Quality used for actors.
max_actor_quality=200
; Whether or not actor variants are selected randomly, possible values are "full", "limited", "none".
variant_diversity = "full"
; Quality level of shader effects (set to 10 to display all effects)
materialmgr.quality = 2.0
materialmgr.quality = 10.0
; Maximum distance to display parallax effect. Set to 0 to disable parallax.
materialmgr.PARALLAX_DIST.max = 150
; Maximum distance to display high quality parallax effect.
materialmgr.PARALLAX_HQ_DIST.max = 75
; Maximum distance to display very high quality parallax effect. Set to 30 to enable.
materialmgr.PARALLAX_VHQ_DIST.max = 0
;;;;;;;;;;;;;;;;;;;;;;;;
; Replace alpha-blending with alpha-testing, for performance experiments
forcealphatest = false
; Color of the sky (in "r g b" format)
skycolor = "0 0 0"
@@ -156,7 +180,7 @@ server.threads = "6" ; Enough for the browser's parallel co
; See keys.txt for the list of key names.
; > SYSTEM SETTINGS
exit = "Ctrl+Break", "Super+Q", "Alt+F4" ; Exit to desktop
exit = "" ; 'Custom' exit to desktop, SDL handles the native command via SDL_Quit.
cancel = Escape ; Close or cancel the current dialog box/popup
confirm = Return ; Confirm the current command
pause = Pause, "Shift+Space" ; Pause/unpause game
@@ -200,6 +224,7 @@ quickload = "Shift+F8"
reset = "R" ; Reset camera rotation to default.
follow = "F" ; Follow the first unit in the selection
rallypointfocus = "" ; Focus the camera on the rally point of the selected building
lastattackfocus = "Space" ; Focus the camera on the last notified attack
zoom.in = Plus, NumPlus ; Zoom camera in (continuous control)
zoom.out = Minus, NumMinus ; Zoom camera out (continuous control)
zoom.wheel.in = WheelUp ; Zoom camera in (stepped control)
@@ -259,12 +284,13 @@ nonmilitaryonly = "Alt+Y" ; Add only non-military units to the sel
idleonly = "I" ; Select only idle units
woundedonly = "O" ; Select only wounded units
remove = Ctrl ; Remove units from selection
idlebuilder = Semicolon ; Select next idle builder
idleworker = Period, NumDecimal ; Select next idle worker
idlewarrior = Slash, NumDivide ; Select next idle warrior
idleunit = BackSlash ; Select next idle unit
offscreen = Alt ; Include offscreen units in selection
singleselection = "" ; Modifier to select units individually, opposed to per formation.
[hotkey.selection.group.add]
0 = "Shift+0", "Shift+Num0"
1 = "Shift+1", "Shift+Num1"
2 = "Shift+2", "Shift+Num2"
3 = "Shift+3", "Shift+Num3"
@@ -274,8 +300,8 @@ offscreen = Alt ; Include offscreen units in selection
7 = "Shift+7", "Shift+Num7"
8 = "Shift+8", "Shift+Num8"
9 = "Shift+9", "Shift+Num9"
10 = "Shift+0", "Shift+Num0"
[hotkey.selection.group.save]
0 = "Ctrl+0", "Ctrl+Num0"
1 = "Ctrl+1", "Ctrl+Num1"
2 = "Ctrl+2", "Ctrl+Num2"
3 = "Ctrl+3", "Ctrl+Num3"
@@ -285,8 +311,8 @@ offscreen = Alt ; Include offscreen units in selection
7 = "Ctrl+7", "Ctrl+Num7"
8 = "Ctrl+8", "Ctrl+Num8"
9 = "Ctrl+9", "Ctrl+Num9"
10 = "Ctrl+0", "Ctrl+Num0"
[hotkey.selection.group.select]
0 = 0, Num0
1 = 1, Num1
2 = 2, Num2
3 = 3, Num3
@@ -296,6 +322,7 @@ offscreen = Alt ; Include offscreen units in selection
7 = 7, Num7
8 = 8, Num8
9 = 9, Num9
10 = 0, Num0
[hotkey.gamesetup]
mapbrowser.open = "M"
@@ -305,16 +332,20 @@ kill = Delete, Backspace ; Destroy selected units
stop = "H" ; Stop the current action
backtowork = "Y" ; The unit will go back to work
unload = "U" ; Unload garrisoned units when a building/mechanical unit is selected
unloadturrets = "U" ; Unload turreted units.
leaveturret = "U" ; Leave turret point.
move = "" ; Modifier to move to a point instead of another action (e.g. gather)
attack = Ctrl ; Modifier to attack instead of another action (e.g. capture)
attackmove = Ctrl ; Modifier to attackmove when clicking on a point
attackmoveUnit = "Ctrl+Q" ; Modifier to attackmove targeting only units when clicking on a point
garrison = Ctrl ; Modifier to garrison when clicking on building
occupyturret = Ctrl ; Modifier to occupy a turret when clicking on a turret holder.
autorallypoint = Ctrl ; Modifier to set the rally point on the building itself
guard = "G" ; Modifier to escort/guard when clicking on unit/building
patrol = "P" ; Modifier to patrol a unit
repair = "J" ; Modifier to repair when clicking on building/mechanical unit
queue = Shift ; Modifier to queue unit orders instead of replacing
pushorderfront = "" ; Modifier to push unit orders to the front instead of replacing.
orderone = Alt ; Modifier to order only one entity in selection.
batchtrain = Shift ; Modifier to train units in batches
massbarter = Shift ; Modifier to barter bunch of resources
@@ -327,6 +358,9 @@ rotate.cw = RightBracket ; Rotate building placement preview clockwise
rotate.ccw = LeftBracket ; Rotate building placement preview anticlockwise
snaptoedges = Ctrl ; Modifier to align new structures with nearby existing structure
toggledefaultformation = "" ; Switch between null default formation and the last default formation used (defaults to "box")
flare = K ; Modifier to send a flare to your allies
flareactivate = "" ; Modifier to activate the mode to send a flare to your allies
calltoarms = "" ; Modifier to call the selected units to the arms.
; Overlays
showstatusbars = Tab ; Toggle display of status bars
devcommands.toggle = "Alt+D" ; Toggle developer commands panel
@@ -360,7 +394,7 @@ noconfirmation = Shift ; Do not ask confirmation when deleting a game
8 = Comma ; add eighth unit type to queue
[hotkey.session.timewarp]
fastforward = Space ; If timewarp mode enabled, speed up the game
fastforward = "Ctrl+Space" ; If timewarp mode enabled, speed up the game
rewind = "Shift+Backspace" ; If timewarp mode enabled, go back to earlier point in the game
[hotkey.tab]
@@ -388,11 +422,13 @@ settingsslide = true ; Enable/Disable settings panel slide
progressdescription = false ; Whether to display the progress percent or a textual description
[gui.session]
dragdelta = 4 ; Number of pixels the mouse can move before the action is considered a drag
camerajump.threshold = 40 ; How close do we have to be to the actual location in order to jump back to the previous one?
timeelapsedcounter = false ; Show the game duration in the top right corner
ceasefirecounter = false ; Show the remaining ceasefire time in the top right corner
batchtrainingsize = 5 ; Number of units to be trained per batch by default (when pressing the hotkey)
scrollbatchratio = 1 ; Number of times you have to scroll to increase/decrease the batchsize by 1
flarelifetime = 6 ; How long the flare markers on the minimap are displayed in seconds
woundedunithotkeythreshold = 33 ; The wounded unit hotkey considers the selected units as wounded if their health percentage falls below this number
attackrange = true ; Display attack range overlays of selected defensive structures
aurasrange = true ; Display aura range overlays of selected units and structures
@@ -405,8 +441,14 @@ snaptoedgesdistancethreshold = 15 ; On which distance we don't snap to edges
disjointcontrolgroups = "true" ; Whether control groups are disjoint sets or entities can be in multiple control groups at the same time.
defaultformation = "special/formations/box" ; For walking orders, automatically put units into this formation if they don't have one already.
formationwalkonly = "true" ; Formations are disabled when giving gather/attack/... orders.
howtoshownames = 0 ; Whether the specific names are show as default, as opposed to the generic names. And whether the secondary names are shown. (0 - show both; specific names primary, 1 - show both; generic names primary, 2 - show only specific names, 3 - show only generic names)
selectformationasone = "true" ; Whether to select formations as a whole by default.
[gui.session.minimap]
; Icons that are displayed for some entities on a minimap.
icons.enabled = "true"
icons.opacity = 1.0
icons.sizescale = 1.0
blinkduration = 1.7 ; The blink duration while pinging
pingduration = 50.0 ; The duration for which an entity will be pinged after an attack notification
@@ -429,13 +471,6 @@ enemy = "150 20 20" ; Color of enemies when diplomacy colors are e
[joystick] ; EXPERIMENTAL: joystick/gamepad settings
enable = false
deadzone = 8192
[joystick.camera]
pan.x = 0
pan.y = 1
rotate.x = 3
rotate.y = 2
zoom.in = 5
zoom.out = 4
[chat]
timestamp = true ; Show at which time chat messages have been sent
@@ -445,7 +480,7 @@ extended = true ; Whether to display the chat history
[lobby]
history = 0 ; Number of past messages to display on join
room = "arena24" ; Default MUC room to join
room = "arena26" ; Default MUC room to join
server = "lobby.wildfiregames.com" ; Address of lobby server
tls = true ; Whether to use TLS encryption when connecting to the server.
verify_certificate = false ; Whether to reject connecting to the lobby if the TLS certificate is invalid (TODO: wait for Gloox GnuTLS trust implementation to be fixed)
@@ -453,8 +488,8 @@ terms_url = "https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/
terms_of_service = "0" ; Version (hash) of the Terms of Service that the user has accepted
terms_of_use = "0" ; Version (hash) of the Terms of Use that the user has accepted
privacy_policy = "0" ; Version (hash) of the Privacy Policy that the user has accepted
xpartamupp = "wfgbot24" ; Name of the server-side XMPP-account that manage games
echelon = "echelon24" ; Name of the server-side XMPP-account that manages ratings
xpartamupp = "wfgbot26" ; Name of the server-side XMPP-account that manage games
echelon = "echelon26" ; Name of the server-side XMPP-account that manages ratings
buddies = "," ; Comma separated list of playernames that the current user has marked as buddies
rememberpassword = true ; Whether to store the encrypted password in the user config
@@ -473,7 +508,8 @@ delay = 200 ; Duration in milliseconds that is waited b
enabledmods = "mod public"
[modio]
public_key = "RWRcbM/EwV7bucTiQVCcRBhCkYkXmJEO7s4ktyufkB+gW/NxHhOZ38xh" ; Public key corresponding to the private key valid mods are signed with
public_key = "RWQa4XiSn+BLxIYXNrXyz68wwTGWyZ7+kxDtZuLHBXkCtt+lLB8VnpdM" ; Public key corresponding to the private key valid mods are signed with
disclaimer = "0" ; Version (hash) of the Disclaimer that the user has accepted
[modio.v1]
@@ -485,6 +521,8 @@ name_id = "0ad"
duplicateplayernames = false ; Rename joining player to "User (2)" if "User" is already connected, otherwise prohibit join.
lateobservers = everyone ; Allow observers to join the game after it started. Possible values: everyone, buddies, disabled.
observerlimit = 8 ; Prevent further observer joins in running games if this limit is reached
observermaxlag = -1 ; Make clients wait for observers if they lag more than X turns behind. -1 means "never wait for observers".
autocatchup = true ; Auto-accelerate the sim rate if lagging behind (as an observer).
[overlay]
fps = "false" ; Show frames per second in top right corner
@@ -493,9 +531,7 @@ netwarnings = "true" ; Show warnings if the network connection is b
[profiler2]
autoenable = false ; Enable HTTP server output at startup (default off for security/performance)
gpu.arb.enable = true ; Allow GL_ARB_timer_query timing mode when available
gpu.ext.enable = true ; Allow GL_EXT_timer_query timing mode when available
gpu.intel.enable = true ; Allow GL_INTEL_performance_queries timing mode when available
gpu.arb.enable = true ; Allow GL_ARB_timer_query timing mode when available.
[rlinterface]
address = "127.0.0.1:6000"
@@ -506,6 +542,9 @@ musicgain = 0.2
ambientgain = 0.6
actiongain = 0.7
uigain = 0.7
mindistance = 1
maxdistance = 350
maxstereoangle = 0.62 ; About PI/5 radians
[sound.notify]
nick = true ; Play a sound when someone mentions your name in the lobby or game
@@ -523,6 +562,7 @@ terms = "0" ; Version (hash) of the UserReporter Terms tha
[view] ; Camera control settings
scroll.speed = 120.0
scroll.speed.modifier = 1.05 ; Multiplier for changing scroll speed
scroll.mouse.detectdistance = 3
rotate.x.speed = 1.2
rotate.x.min = 28.0
rotate.x.max = 60.0
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<page>
<include>common/styles.xml</include>
</page>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<page>
<include>common/styles.xml</include>
<include>regainFocus/pushWithPopOnInit.xml</include>
</page>
@@ -0,0 +1 @@
Engine.PushGuiPage("regainFocus/page_emptyPage.xml", {}, () => Engine.PopGuiPage());
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<script file="gui/regainFocus/pushWithPopOnInit.js"/>
</objects>
@@ -1,7 +1,9 @@
100
101
256 256
a
606
20
15
12
32 0 256 0 0 0 0 5
33 250 154 3 11 1 11 4
34 121 18 5 4 0 11 5
Binary file not shown.
@@ -1,19 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element Textures {
element File {
attribute pattern { text }? &
attribute format { "dxt1" | "dxt3" | "dxt5" | "rgba" | "alpha" }? &
attribute mipmap { "true" | "false" }? &
attribute normal { "true" | "false" }? &
attribute alpha { "none" | "player" | "transparency" }? &
attribute filter { "box" | "triangle" | "kaiser" }? &
attribute kaiserwidth { xsd:float }? &
attribute kaiseralpha { xsd:float }? &
attribute kaiserstretch { xsd:float }?
}*
}
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="Textures" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<zeroOrMore>
<element name="File">
<interleave>
@@ -1,36 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
##
# Types #
##
flag = "0" | "1"
start = SoundGroup
SoundGroup = element SoundGroup {
element Gain { xsd:float }? &
element Looping { flag }? &
element Omnipresent { flag }? &
element HeardBy { "owner" }? &
element Distanceless { flag }? &
element Pitch { xsd:float }? &
element Priority { xsd:float }? &
element RandOrder { flag }? &
element RandGain { flag }? &
element GainUpper { xsd:float }? &
element GainLower { xsd:float }? &
element RandPitch { flag }? &
element PitchUpper { xsd:float }? &
element PitchLower { xsd:float }? &
element ConeGain { xsd:float }? &
element ConeInner { xsd:float }? &
element ConeOuter { xsd:float }? &
element Threshold { xsd:float }? &
element Decay { xsd:float }? &
element Sound { text }+ &
element Path { text }
}
@@ -1,15 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<define name="flag">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<a:documentation/>
<!-- Types # -->
<a:documentation/>
<choice>
<value>0</value>
<value>1</value>
@@ -0,0 +1,23 @@
/**
* This file is called from the visual & non-visual paths when autostarting.
* To avoid relying on the GUI, this script has access to a special 'LoadScript' function.
* See implementation in the public mod for more details.
*/
function autostartClient(initData)
{
throw new Error("Autostart is not implemented in the 'mod' mod");
}
function autostartHost(initData, networked = false)
{
throw new Error("Autostart is not implemented in the 'mod' mod");
}
/**
* @returns false if the loop should carry on.
*/
function onTick()
{
return true;
}
@@ -15,6 +15,25 @@ function messageBox(mbWidth, mbHeight, mbMessage, mbTitle, mbButtonCaptions, mbB
});
}
function timedConfirmation(width, height, message, timeParameter, timeout, title, buttonCaptions, btnCode, callbackArgs)
{
Engine.PushGuiPage(
"page_timedconfirmation.xml",
{
"width": width,
"height": height,
"message": message,
"timeParameter": timeParameter,
"timeout": timeout,
"title": title,
"buttonCaptions": buttonCaptions
},
button => {
if (btnCode !== undefined && btnCode[button])
btnCode[button](callbackArgs ? callbackArgs[button] : undefined);
});
}
function openURL(url)
{
Engine.OpenURL(url);
@@ -21,3 +21,12 @@ function setStringTags(text, tags)
return result;
}
/**
* Adds grey font if is not compatible.
*/
function compatibilityColor(text, isCompatible)
{
return isCompatible ? text : coloredText(text, "96 96 96");
}
+20 -20
View File
@@ -122,7 +122,7 @@ function translatePluralWithContext(context, singularMessage, pluralMessage, num
/**
* The input object should contain either of the following properties:
*
* • A message property that contains a message to translate.
* • A _string property that contains a message to translate.
*
* • A list property that contains a list of messages to translate as a
* comma-separated list of translated.
@@ -137,8 +137,8 @@ function translateMessageObject(object)
if (object.context)
trans = msg => translateWithContext(object.context, msg);
if (object.message)
object = trans(object.message);
if (object._string)
object = trans(object._string);
else if (object.list)
object = object.list.map(trans).join(translateWithContext("enumeration", ", "));
@@ -152,19 +152,19 @@ function translateMessageObject(object)
* it accepts an object in the form of
*
* {
* translatedString1: "my first message",
* unTranslatedString1: "some English string",
* ignoredObject: {
* translatedString2: "my second message",
* unTranslatedString2: "some English string"
* "translatedString1": "my first message",
* "unTranslatedString1": "some English string",
* "ignoredObject": {
* "translatedString2": "my second message",
* "unTranslatedString2": "some English string"
* },
* translatedObject1: {
* message: "my third singular message",
* context: "message context",
* "translatedObject1": {
* "_string": "my third singular message",
* "context": "message context",
* },
* translatedObject2: {
* list: ["list", "of", "strings"],
* context: "message context",
* "list": ["list", "of", "strings"],
* "context": "message context",
* },
* }
*
@@ -174,14 +174,14 @@ function translateMessageObject(object)
*
* The result will be (f.e. in Dutch)
* {
* translatedString1: "mijn eerste bericht",
* unTranslatedString1: "some English string",
* ignoredObject: {
* translatedString2: "mijn tweede bericht",
* unTranslatedString2: "some English string"
* "translatedString1": "mijn eerste bericht",
* "unTranslatedString1": "some English string",
* "ignoredObject": {
* "translatedString2": "mijn tweede bericht",
* "unTranslatedString2": "some English string"
* },
* translatedObject1: "mijn derde bericht",
* translatedObject2: "lijst, van, teksten",
* "translatedObject1": "mijn derde bericht",
* "translatedObject2": "lijst, van, teksten",
* }
*
* So you see that the keys array can also contain lower-level keys,
+22 -11
View File
@@ -1,12 +1,26 @@
/**
* Check the mod compatibility between the saved game to be loaded and the engine
* Check the mod compatibility between the saved game to be loaded and the engine.
* This is a wrapper around an engine function to allow mods to to fancier or specific things.
*/
function hasSameMods(modsA, modsB)
{
if (!modsA || !modsB || modsA.length != modsB.length)
if (!modsA || !modsB)
return false;
// Mods must be loaded in the same order. 0: modname, 1: modversion
return modsA.every((mod, index) => [0, 1].every(i => mod[i] == modsB[index][i]));
return Engine.AreModsPlayCompatible(modsA, modsB);
}
/**
* Print the shorthand identifier of a mod.
*/
function modToString(mod)
{
// Skip version for play-compatible mods.
if (mod.ignoreInCompatibilityChecks)
return mod.name;
return sprintf(translateWithContext("Mod comparison", "%(mod)s (%(version)s)"), {
"mod": mod.name,
"version": mod.version
});
}
/**
@@ -14,10 +28,7 @@ function hasSameMods(modsA, modsB)
*/
function modsToString(mods)
{
return mods.map(mod => sprintf(translateWithContext("Mod comparison", "%(mod)s (%(version)s)"), {
"mod": mod[0],
"version": mod[1]
})).join(translate(", "));
return mods.map(mod => modToString(mod)).join(translate(", "));
}
/**
@@ -26,7 +37,7 @@ function modsToString(mods)
function comparedModsString(required, active)
{
return sprintf(translateWithContext("Mod comparison", "Required: %(mods)s"),
{ "mods": modsToString(required) }) + "\n" +
sprintf(translateWithContext("Mod comparison", "Active: %(mods)s"),
{ "mods": modsToString(active) });
{ "mods": modsToString(required) }
) + "\n" + sprintf(translateWithContext("Mod comparison", "Active: %(mods)s"),
{ "mods": modsToString(active) });
}
@@ -9,9 +9,11 @@
<sprite name = "ModernScrollBack">
<image backcolor="43 42 40"
size="0 0 100% 100%"
border="true"
bordercolor="0 0 0"
/>
<image backcolor="0 0 0" size="0 0 100% 1"/>
<image backcolor="0 0 0" size="0 100%-1 100% 100%"/>
<image backcolor="0 0 0" size="0 0 1 100%"/>
<image backcolor="0 0 0" size="100%-1 0 100% 100%"/>
<image texture = "global/modern/scrollback.png"
real_texture_placement = "0 0 15 128"
size = "0 0 100% 100%"
@@ -125,7 +127,7 @@
<image texture = "global/modern/dialog-deco-bottom.png"
real_texture_placement = "0 0 64 32"
texture_size = "0 0 64 32"
size = "100%-31 100%-22 100%+33 100%+10"
size = "100%-33 100%-22 100%+31 100%+10"
/>
<!-- title frame -->
@@ -147,6 +149,18 @@
- Box -
==========================================
-->
<sprite name = "ModernDarkBox">
<image backcolor = "12 12 12 100"
size = "0 0 100% 100%-1"
/>
</sprite>
<sprite name="ModernDarkBoxDisabled">
<effect grayscale=""/>
<!-- background -->
<image backcolor = "12 12 12 100"
size = "0 1 100% 100%-1"
/>
</sprite>
<sprite name="ModernDarkBoxGold">
<!-- borders -->
<image texture = "global/modern/gold-separator.png"
@@ -162,6 +176,17 @@
size = "0 1 100% 100%-1"
/>
</sprite>
<sprite name="ModernDarkBoxGoldBorder">
<!-- borders -->
<image texture = "global/modern/gold-separator.png"
real_texture_placement = "0 0 806 1"
size = "0 0 100% 1"
/>
<image texture = "global/modern/gold-separator.png"
real_texture_placement = "0 0 806 1"
size = "0 100%-1 100% 100%"
/>
</sprite>
<sprite name="ModernDarkBoxGoldDisabled">
<effect grayscale=""/>
<!-- borders -->
@@ -178,6 +203,18 @@
size = "0 1 100% 100%-1"
/>
</sprite>
<sprite name="ModernDarkBoxGoldBorderDisabled">
<effect grayscale=""/>
<!-- borders -->
<image texture = "global/modern/gold-separator.png"
real_texture_placement = "0 0 806 1"
size = "0 0 100% 1"
/>
<image texture = "global/modern/gold-separator.png"
real_texture_placement = "0 0 806 1"
size = "0 100%-1 100% 100%"
/>
</sprite>
<sprite name="ModernDarkBoxWhite">
<!-- borders -->
<image texture = "global/modern/white-separator.png"
@@ -193,6 +230,17 @@
size = "0 1 100% 100%-1"
/>
</sprite>
<sprite name="ModernDarkBoxWhiteBorder">
<!-- borders -->
<image texture = "global/modern/white-separator.png"
real_texture_placement = "0 0 806 1"
size = "0 0 100% 1"
/>
<image texture = "global/modern/white-separator.png"
real_texture_placement = "0 0 806 1"
size = "0 100%-1 100% 100%"
/>
</sprite>
<sprite name="ModernDarkBoxWhiteInvalid">
<!-- borders -->
<image texture = "global/modern/white-separator.png"
@@ -217,14 +265,11 @@
size = "0 1 100% 100%"
/>
</sprite>
<sprite name = "ModernDarkBoxGoldNoTop">
<sprite name="ModernDarkBoxBottomGold">
<image texture = "global/modern/gold-separator.png"
real_texture_placement = "0 0 806 1"
size = "0 100%-1 100% 100%"
/>
<image backcolor = "12 12 12 100"
size = "0 0 100% 100%-1"
/>
</sprite>
<!--
==========================================
@@ -513,9 +558,22 @@
<sprite name="BlackBorderOnGray">
<image backcolor="darkgray"
size="0 0 100% 100%"
border="true"
bordercolor="black"
/>
<image backcolor="0 0 0" size="0 0 100% 1"/>
<image backcolor="0 0 0" size="0 100%-1 100% 100%"/>
<image backcolor="0 0 0" size="0 0 1 100%"/>
<image backcolor="0 0 0" size="100%-1 0 100% 100%"/>
</sprite>
<sprite name="GrayBackground">
<image backcolor="darkgray"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="BlackBorder">
<image backcolor="0 0 0" size="0 0 100% 1"/>
<image backcolor="0 0 0" size="0 100%-1 100% 100%"/>
<image backcolor="0 0 0" size="0 0 1 100%"/>
<image backcolor="0 0 0" size="100%-1 0 100% 100%"/>
</sprite>
<!--
==========================================
@@ -626,12 +684,26 @@
size="50%-10 50%-10 50%+11 50%+11"
/>
</sprite>
<sprite name="ModernSliderButtonDisabled">
<effect grayscale=""/>
<image texture="global/modern/tick-on.png"
real_texture_placement="0 0 27 27"
size="50%-10 50%-10 50%+11 50%+11"
/>
</sprite>
<sprite name="ModernSliderLine">
<image texture="global/modern/gold-separator.png"
real_texture_placement="0 0 806 1"
size="0 50%-1 100% 50%+1"
/>
</sprite>
<sprite name="ModernSliderLineDisabled">
<effect grayscale=""/>
<image texture="global/modern/gold-separator.png"
real_texture_placement="0 0 806 1"
size="0 50%-1 100% 50%+1"
/>
</sprite>
<sprite name="ModernArrowDownRed">
<effect add_color="123 53 53"/>
@@ -28,9 +28,10 @@
font="sans-bold-stroke-14"
scrollbar="true"
scrollbar_style="ModernScrollBar"
sprite="ModernDarkBoxGoldNoTop"
sprite_selectarea="ModernDarkBoxWhite"
sprite_heading="ModernDarkBoxGoldNoBottom"
sprite="ModernDarkBox"
sprite_overlay="ModernDarkBoxBottomGold"
sprite_selectarea="ModernDarkBox"
sprite_selectarea_overlay="ModernDarkBoxWhiteBorder"
textcolor="white"
textcolor_selected="white"
text_align="left"
@@ -41,8 +42,10 @@
font="sans-bold-stroke-14"
scrollbar="true"
scrollbar_style="ModernScrollBar"
sprite="ModernDarkBoxGoldNoTop"
sprite_selectarea="ModernDarkBoxWhite"
sprite="ModernDarkBox"
sprite_overlay="ModernDarkBoxBottomGold"
sprite_selectarea="ModernDarkBox"
sprite_selectarea_overlay="ModernDarkBoxWhiteBorder"
sprite_heading="ModernDarkBoxGoldNoBottom"
sprite_asc="ModernArrowUp"
sprite_desc="ModernArrowDown"
@@ -59,16 +62,20 @@
text_align="left"
text_valign="center"
button_width="16"
sprite="ModernDarkBoxGold"
sprite_disabled="ModernDarkBoxGoldDisabled"
sprite="ModernDarkBox"
sprite_disabled="ModernDarkBoxDisabled"
sprite_overlay="ModernDarkBoxGoldBorder"
sprite_overlay_disabled="ModernDarkBoxGoldBorderDisabled"
sprite2="ModernDropDownArrow"
sprite2_disabled="ModernDropDownArrowDisabled"
sprite2_pressed="ModernDropDownArrowHighlight"
buffer_zone="8"
dropdown_size="225"
minimum_visible_items="3"
sprite_list="BlackBorderOnGray"
sprite_selectarea="ModernDarkBoxWhite"
sprite_list="GrayBackground"
sprite_list_overlay="BlackBorder"
sprite_selectarea="ModernDarkBox"
sprite_selectarea_overlay="ModernDarkBoxWhiteBorder"
textcolor_selected="white"
textcolor_disabled="140 140 140 255"
scrollbar="true"
@@ -125,10 +132,12 @@
textcolor="white"
text_align="left"
text_valign="center"
sprite="ModernDarkBoxGold"
sprite="ModernDarkBox"
sprite_overlay="ModernDarkBoxGoldBorder"
/>
<style name="ModernInput"
sprite="ModernDarkBoxWhite"
sprite="ModernDarkBox"
sprite_overlay="ModernDarkBoxGoldBorder"
sprite_selectarea="color:150 0 0"
textcolor="white"
textcolor_selected="white"
@@ -143,7 +152,9 @@
/>
<style name="ModernSlider"
sprite="ModernSliderButton"
sprite_disabled="ModernSliderButtonDisabled"
sprite_bar="ModernSliderLine"
sprite_bar_disabled="ModernSliderLineDisabled"
button_width="20"
tooltip_style="tooltipInstant"
sound_pressed="audio/interface/ui/ui_button_click.ogg"
@@ -0,0 +1,35 @@
function distributeButtonsHorizontally(button, captions)
{
const y1 = "100%-46";
const y2 = "100%-18";
switch (captions.length)
{
case 1:
button[0].size = "18 " + y1 + " 100%-18 " + y2;
break;
case 2:
button[0].size = "18 " + y1 + " 50%-5 " + y2;
button[1].size = "50%+5 " + y1 + " 100%-18 " + y2;
break;
case 3:
button[0].size = "18 " + y1 + " 33%-5 " + y2;
button[1].size = "33%+5 " + y1 + " 66%-5 " + y2;
button[2].size = "66%+5 " + y1 + " 100%-18 " + y2;
break;
}
}
function setButtonCaptionsAndVisibitily(button, captions, cancelHotkey, name)
{
captions.forEach((caption, i) => {
button[i] = Engine.GetGUIObjectByName(name + (i + 1));
button[i].caption = caption;
button[i].hidden = false;
button[i].onPress = () => {
Engine.PopGuiPage(i);
};
if (i == 0)
cancelHotkey.onPress = button[i].onPress;
});
}
-291
View File
@@ -1,291 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
start = object | objects | setup | sprites | styles
##
# Types #
##
# xsd:boolean could be used instead of this definition,
# though it considers "1" & "0" as valid values.
bool = "true" | "false"
align = "left" | "center" | "right"
valign = "top" | "center" | "bottom"
wrapmode = "repeat" | "mirrored_repeat" | "clamp_to_edge"
coord = xsd:string { pattern = "-?\d*\.?\d+%?([\+\-]\d*\.?\d+%?)*" }
clientarea = list { coord, coord, coord, coord }
# color can be a name or "R G B A" format string
rgba = list { xsd:integer { minInclusive = "0" maxInclusive = "255" },
xsd:integer { minInclusive = "0" maxInclusive = "255" },
xsd:integer { minInclusive = "0" maxInclusive = "255" },
xsd:integer { minInclusive = "0" maxInclusive = "255" }?}
ccolor = rgba | xsd:string { pattern = "[A-Za-z]+" }
size = list { xsd:decimal, xsd:decimal }
pos = list { xsd:decimal, xsd:decimal }
rect = list { xsd:decimal, xsd:decimal, xsd:decimal, xsd:decimal }
##
# Defines #
##
unique_settings =
attribute name { text }?,
[ a:defaultValue = "empty" ] attribute type { text }?,
attribute style { text }?
# This could probably be made more specific/strict
# with more information regarding the use/meaning
# of these attributes.
base_settings =
attribute absolute { bool }?&
attribute enable { bool }?&
attribute ghost { bool }?&
attribute hidden { bool }?&
attribute size { clientarea }?&
attribute z { xsd:decimal }?
# Defaults are not put in here, because it ruins the concept of styles.
ex_settings =
attribute anchor { valign }?&
attribute auto_scroll { bool }?&
attribute buffer_zone { xsd:decimal }?&
attribute buffer_width { xsd:decimal }?&
attribute button_width { xsd:decimal }?&
attribute checked { bool }?&
attribute clip { bool }?&
attribute dropdown_size { xsd:decimal }?&
attribute dropdown_buffer { xsd:decimal }?&
attribute minimum_visible_items { xsd:nonNegativeInteger }?&
attribute enabled { bool }?&
attribute font { text }?&
attribute format_x { text }?&
attribute format_y { text }?&
attribute fov_wedge_color { ccolor }?&
attribute hotkey { text }?&
attribute cell_id { xsd:integer }?&
attribute independent { bool }?&
attribute input_initvalue_destroyed_at_focus { bool }?&
attribute mask { bool }?&
attribute mask_char { xsd:string { minLength = "1" maxLength = "1" } }?&
attribute max_length { xsd:nonNegativeInteger }?&
attribute maxwidth { xsd:decimal }? &
attribute multiline { bool }?&
attribute offset { pos }?&
attribute placeholder_text { text }?&
attribute placeholder_color { ccolor }?&
attribute readonly { bool }?&
attribute scrollbar { bool }?&
attribute scrollbar_style { text }?&
attribute scroll_bottom { bool }?&
attribute scroll_top { bool }?&
attribute selected_column { text }?&
attribute selected_column_order { text }?&
attribute sortable { bool }?&
attribute sound_closed { text }?&
attribute sound_disabled { text }?&
attribute sound_enter { text }?&
attribute sound_leave { text }?&
attribute sound_opened { text }?&
attribute sound_pressed { text }?&
attribute sound_selected { text }?&
attribute sprite { text }?&
attribute sprite2 { text }?&
attribute sprite_asc { text }?&
attribute sprite_heading { text }?&
attribute sprite_bar { text }?&
attribute sprite_background { text }?&
attribute sprite_desc { text }?&
attribute sprite_disabled { text }?&
attribute sprite_list { text }?&
attribute sprite2_disabled { text }?&
attribute sprite_not_sorted { text }?&
attribute sprite_over { text }?&
attribute sprite2_over { text }?&
attribute sprite_pressed { text }?&
attribute sprite2_pressed { text }?&
attribute sprite_selectarea { text }?&
attribute square_side { xsd:decimal }?&
attribute textcolor { ccolor }?&
attribute textcolor_disabled { ccolor }?&
attribute textcolor_over { ccolor }?&
attribute textcolor_pressed { ccolor }?&
attribute textcolor_selected { ccolor }?&
attribute text_align { align }?&
attribute text_valign { valign }?&
attribute tooltip { text }?&
attribute tooltip_style { text }?
##
# Objects #
##
objects = element objects { (script | object)* }
script =
element script {
text &
attribute file { text }? &
attribute directory { text }?
}
object =
element object {
((object
| action
| \attribute
| column
| \include
| item
| repeat
| script
| translatableAttribute)*
| text),
unique_settings,
base_settings,
ex_settings
}
action =
element action {
text,
attribute on { text },
attribute file { text }?
}
\attribute =
element attribute {
(keep | translate)*,
attribute id { text }
}
column =
element column {
translatableAttribute?,
(
attribute id { text }&
attribute color { ccolor }?&
attribute heading { text }?&
attribute width { text }?&
attribute hidden { bool }?
)
}
\include =
element include {
attribute file { text }|
attribute directory { text }
}
item =
element item {
text,
attribute enabled { bool }?
}
keep = element keep { text }
repeat =
element repeat {
object+,
attribute count { xsd:nonNegativeInteger },
attribute var { text }?
}
translate = element translate { text }
translatableAttribute =
element translatableAttribute {
text,
(
attribute id { text }&
attribute comment { text }?&
attribute context { text }?
)
}
##
# Styles #
##
styles = element styles { style* }
style =
element style {
attribute name { text },
base_settings,
ex_settings
}
##
# Setup #
##
setup = element setup { (icon | scrollbar | tooltip | color)* }
scrollbar =
element scrollbar {
attribute name { text }&
attribute width { xsd:decimal }&
attribute alwaysshown { bool }?&
attribute maximum_bar_size { xsd:decimal }?&
attribute minimum_bar_size { xsd:decimal }?&
attribute scroll_wheel { bool }?&
attribute show_edge_buttons { bool }?&
attribute sprite_button_top { text }?&
attribute sprite_button_top_pressed { text }?&
attribute sprite_button_top_disabled { text }?&
attribute sprite_button_top_over { text }?&
attribute sprite_button_bottom { text }?&
attribute sprite_button_bottom_pressed { text }?&
attribute sprite_button_bottom_disabled { text }?&
attribute sprite_button_bottom_over { text }?&
attribute sprite_bar_vertical { text }?&
attribute sprite_bar_vertical_over { text }?&
attribute sprite_bar_vertical_pressed { text }?&
attribute sprite_back_vertical { text }?
}
icon =
element icon {
attribute name { text }&
attribute size { size }&
attribute sprite { text }&
attribute cell_id { text }?
}
tooltip =
element tooltip {
attribute name { text }&
attribute sprite { text }?&
attribute anchor { valign }?&
attribute axis_color { ccolor }?&
attribute axis_width { xsd:decimal { minInclusive = "0" } }?&
attribute buffer_zone { xsd:decimal }?&
attribute font { text }?&
attribute maxwidth { xsd:decimal }?&
attribute offset { pos }?&
attribute textcolor { ccolor }?&
attribute delay { xsd:integer }?&
attribute use_object { text }?&
attribute hide_object { bool }?
}
color =
element color {
rgba,
attribute name { text }
}
##
# Sprites #
##
sprites = element sprites { sprite* }
sprite =
element sprite {
(effect?, image+),
attribute name { text }
}
image =
element image {
effect?,
(
attribute texture { text }?&
attribute size { clientarea }?&
attribute texture_size { clientarea }?&
attribute real_texture_placement { rect }?&
attribute cell_size { size }?&
attribute backcolor { ccolor }?&
attribute bordercolor { ccolor }?&
attribute border { bool }?&
attribute z_level { xsd:float }?&
attribute fixed_h_aspect_ratio { xsd:decimal }?&
attribute round_coordinates { bool }?&
attribute wrap_mode { wrapmode }?
)
}
effect =
element effect {
attribute add_color { ccolor }?,
attribute grayscale { empty }?
}
+57 -36
View File
@@ -1,12 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<choice>
<ref name="object"/>
<ref name="objects"/>
@@ -236,6 +230,41 @@
<ref name="bool"/>
</attribute>
</optional>
<optional>
<attribute name="flare_texture_count">
<data type="nonNegativeInteger"/>
</attribute>
</optional>
<optional>
<attribute name="flare_render_size">
<data type="nonNegativeInteger"/>
</attribute>
</optional>
<optional>
<attribute name="flare_animation_speed">
<data type="decimal"/>
</attribute>
</optional>
<optional>
<attribute name="flare_interleave">
<ref name="bool"/>
</attribute>
</optional>
<optional>
<attribute name="flare_lifetime_seconds">
<data type="decimal"/>
</attribute>
</optional>
<optional>
<attribute name="flare_start_fade_seconds">
<data type="decimal"/>
</attribute>
</optional>
<optional>
<attribute name="flare_stop_fade_seconds">
<data type="decimal"/>
</attribute>
</optional>
<optional>
<attribute name="font"/>
</optional>
@@ -253,11 +282,6 @@
<optional>
<attribute name="hotkey"/>
</optional>
<optional>
<attribute name="cell_id">
<data type="integer"/>
</attribute>
</optional>
<optional>
<attribute name="independent">
<ref name="bool"/>
@@ -273,6 +297,11 @@
<ref name="bool"/>
</attribute>
</optional>
<optional>
<attribute name="mouse_event_mask">
<text/>
</attribute>
</optional>
<optional>
<attribute name="mask_char">
<data type="string">
@@ -366,13 +395,13 @@
<attribute name="sprite_asc"/>
</optional>
<optional>
<attribute name="sprite_heading"/>
<attribute name="sprite_background"/>
</optional>
<optional>
<attribute name="sprite_bar"/>
</optional>
<optional>
<attribute name="sprite_background"/>
<attribute name="sprite_bar_disabled"/>
</optional>
<optional>
<attribute name="sprite_desc"/>
@@ -380,9 +409,15 @@
<optional>
<attribute name="sprite_disabled"/>
</optional>
<optional>
<attribute name="sprite_heading"/>
</optional>
<optional>
<attribute name="sprite_list"/>
</optional>
<optional>
<attribute name="sprite_list_overlay"/>
</optional>
<optional>
<attribute name="sprite2_disabled"/>
</optional>
@@ -392,6 +427,12 @@
<optional>
<attribute name="sprite_over"/>
</optional>
<optional>
<attribute name="sprite_overlay"/>
</optional>
<optional>
<attribute name="sprite_overlay_disabled"/>
</optional>
<optional>
<attribute name="sprite2_over"/>
</optional>
@@ -404,6 +445,9 @@
<optional>
<attribute name="sprite_selectarea"/>
</optional>
<optional>
<attribute name="sprite_selectarea_overlay"/>
</optional>
<optional>
<attribute name="square_side">
<data type="decimal"/>
@@ -721,9 +765,6 @@
<ref name="size"/>
</attribute>
<attribute name="sprite"/>
<optional>
<attribute name="cell_id"/>
</optional>
</interleave>
</element>
</define>
@@ -831,31 +872,11 @@
<ref name="rect"/>
</attribute>
</optional>
<optional>
<attribute name="cell_size">
<ref name="size"/>
</attribute>
</optional>
<optional>
<attribute name="backcolor">
<ref name="ccolor"/>
</attribute>
</optional>
<optional>
<attribute name="bordercolor">
<ref name="ccolor"/>
</attribute>
</optional>
<optional>
<attribute name="border">
<ref name="bool"/>
</attribute>
</optional>
<optional>
<attribute name="z_level">
<data type="float"/>
</attribute>
</optional>
<optional>
<attribute name="fixed_h_aspect_ratio">
<data type="decimal"/>
-11
View File
@@ -1,11 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element page {
element include {
text
}*
}
-6
View File
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="page" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<zeroOrMore>
<element name="include">
<text/>
@@ -0,0 +1,11 @@
var g_IncompatibleModsFile = "gui/incompatible_mods/incompatible_mods.txt";
function init(data)
{
Engine.GetGUIObjectByName("mainText").caption = Engine.TranslateLines(Engine.ReadFile(g_IncompatibleModsFile));
}
function closePage()
{
Engine.PopGuiPage();
}
@@ -0,0 +1,6 @@
[font="sans-bold-20"]You tried to start the game with incompatible or missing mods![/font]
[font="sans-16"]
Solve the compatibility issue by disabling invalid mods or enabling required dependencies. You can then save & start the game.
Incompatible mods will appear in red in the list of enabled mods (bottom panel). Dependencies can be added by enabling them in the upper panel.
[/font]
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<script directory="gui/common/"/>
<script directory="gui/incompatible_mods/"/>
<!-- Add a translucent black background to fade out the menu page -->
<object type="image" sprite="ModernFade"/>
<object type="image" style="ModernDialog" size="50%-350 50%-200 50%+350 50%+200">
<object type="text" style="ModernLabelText" size="50%-128 -18 50%+128 14">
<translatableAttribute id="caption">Incompatible mods</translatableAttribute>
</object>
<object name="mainText" type="text" style="ModernTextPanel" size="20 20 100%-20 100%-52">
</object>
<object name="btnClose" type="button" style="ModernButtonRed" size="18 100%-45 100%-18 100%-17" hotkey="cancel">
<translatableAttribute id="caption">Ok</translatableAttribute>
<action on="Press">closePage();</action>
</object>
</object>
</objects>
@@ -32,6 +32,7 @@
>
<action on="Press">displayMods();</action>
<action on="TextEdit">displayMods();</action>
<translatableAttribute id="placeholder_text" context="placeholder text for input field to filter mods">Filter</translatableAttribute>
</object>
<object name="modsAvailableList"
+135 -89
View File
@@ -6,7 +6,7 @@
* A mod is defined by a mod.json file, for example
* {
* "name": "0ad",
* "version": "0.0.24",
* "version": "0.0.26",
* "label": "0 A.D. - Empires Ascendant",
* "url": "https://wildfiregames.com/",
* "description": "A free, open-source, historical RTS game.",
@@ -19,7 +19,7 @@
* "label": "Mod 2",
* "version": "1.1",
* "description": "",
* "dependencies": ["0ad<=0.0.24", "rote"]
* "dependencies": ["0ad<=0.0.26", "rote"]
* }
*
* A mod is identified by the directory name.
@@ -51,11 +51,27 @@ var g_ModsDisabled = [];
var g_ModsEnabledFiltered = [];
var g_ModsDisabledFiltered = [];
/**
* Cache mod compatibility recomputed when some mod is enbaled/disabled.
*/
var g_ModsCompatibility = [];
/**
* Name of the mods installed by the ModInstaller.
*/
var g_InstalledMods;
var g_HasIncompatibleMods;
var g_FakeMod = {
"name": translate("This mod does not exist"),
"version": "",
"label": "",
"url": "",
"description": "",
"dependencies": []
};
var g_ColorNoModSelected = "255 255 100";
var g_ColorDependenciesMet = "100 255 100";
var g_ColorDependenciesNotMet = "255 100 100";
@@ -63,15 +79,19 @@ var g_ColorDependenciesNotMet = "255 100 100";
function init(data, hotloadData)
{
g_InstalledMods = data && data.installedMods || hotloadData && hotloadData.installedMods || [];
g_HasIncompatibleMods = Engine.HasIncompatibleMods();
initMods();
initGUIButtons(data);
if (g_HasIncompatibleMods)
Engine.PushGuiPage("page_incompatible_mods.xml", {});
}
function initMods()
{
loadMods();
loadEnabledMods();
recomputeCompatibility();
validateMods();
initGUIFilters();
}
@@ -87,9 +107,21 @@ function loadMods()
deepfreeze(g_Mods);
}
/**
* Return fake mod for mods which do not exist
*/
function getMod(folder)
{
return !!g_Mods[folder] ? g_Mods[folder] : g_FakeMod;
}
function loadEnabledMods()
{
g_ModsEnabled = Engine.ConfigDB_GetValue("user", "mod.enabledmods").split(/\s+/).filter(folder => !!g_Mods[folder]);
if (g_HasIncompatibleMods)
g_ModsEnabled = Engine.GetEnabledMods().concat(Engine.GetIncompatibleMods())
.filter(folder => folder != "mod");
else
g_ModsEnabled = Engine.GetEnabledMods().filter(folder => !!g_Mods[folder]);
g_ModsDisabled = Object.keys(g_Mods).filter(folder => g_ModsEnabled.indexOf(folder) == -1);
g_ModsEnabledFiltered = g_ModsEnabled;
g_ModsDisabledFiltered = g_ModsDisabled;
@@ -104,6 +136,7 @@ function validateMods()
function initGUIFilters()
{
Engine.GetGUIObjectByName("negateFilter").checked = false;
Engine.GetGUIObjectByName("modCompatibleFilter").checked = true;
displayModLists();
}
@@ -111,9 +144,11 @@ function initGUIFilters()
function initGUIButtons(data)
{
// Either get back to the previous page or quit if there is no previous page
let cancelButton = !data || data.cancelbutton;
Engine.GetGUIObjectByName("cancelButton").hidden = !cancelButton;
Engine.GetGUIObjectByName("quitButton").hidden = cancelButton;
let hasPreviousPage = !data || data.cancelbutton || false;
Engine.GetGUIObjectByName("cancelButton").hidden = !hasPreviousPage;
Engine.GetGUIObjectByName("quitButton").hidden = hasPreviousPage;
// Turn 'save' off, it will be enabled on any change.
Engine.GetGUIObjectByName("saveConfigurationButton").enabled = false;
Engine.GetGUIObjectByName("toggleModButton").caption = translateWithContext("mod activation", "Enable");
}
@@ -122,43 +157,47 @@ function saveMods()
sortEnabledMods();
Engine.ConfigDB_CreateValue("user", "mod.enabledmods", ["mod"].concat(g_ModsEnabled).join(" "));
Engine.ConfigDB_WriteFile("user", "config/user.cfg");
Engine.GetGUIObjectByName("saveConfigurationButton").enabled = false;
}
function startMods()
{
sortEnabledMods();
Engine.SetMods(["mod"].concat(g_ModsEnabled));
Engine.RestartEngine();
saveMods();
if (!Engine.SetModsAndRestartEngine(["mod"].concat(g_ModsEnabled)))
Engine.GetGUIObjectByName("message").caption = coloredText(translate('Dependencies not met'), g_ColorDependenciesNotMet);
}
function displayModLists()
{
g_ModsEnabledFiltered = displayModList("modsEnabledList", g_ModsEnabled);
g_ModsDisabledFiltered = displayModList("modsDisabledList", g_ModsDisabled);
g_ModsEnabledFiltered = displayModList("modsEnabledList", g_ModsEnabled, true);
g_ModsDisabledFiltered = displayModList("modsDisabledList", g_ModsDisabled, false);
}
function displayModList(listObjectName, folders)
function displayModList(listObjectName, folders, enabled)
{
let listObject = Engine.GetGUIObjectByName(listObjectName);
if (listObjectName == "modsDisabledList")
{
let sortFolder = folder => String(g_Mods[folder][listObject.selected_column] || folder);
let sortFolder = folder => String(getMod(folder)[listObject.selected_column] || folder);
folders.sort((folder1, folder2) =>
listObject.selected_column_order *
sortFolder(folder1).localeCompare(sortFolder(folder2)));
}
folders = folders.filter(filterMod);
if (!enabled && Engine.GetGUIObjectByName("modCompatibleFilter").checked)
folders = folders.filter(folder => g_ModsCompatibility[folder]);
let selected = listObject.selected !== -1 ? listObject.list_name[listObject.selected] : null;
listObject.list_name = folders.map(folder => g_Mods[folder].name).map(name => g_InstalledMods.indexOf(name) == -1 ? name : coloredText(name, "green"));
listObject.list_folder = folders;
listObject.list_label = folders.map(folder => g_Mods[folder].label);
listObject.list_url = folders.map(folder => g_Mods[folder].url || "");
listObject.list_version = folders.map(folder => g_Mods[folder].version);
listObject.list_dependencies = folders.map(folder => g_Mods[folder].dependencies.join(" "));
listObject.list_name = folders.map(folder => colorMod(folder, getMod(folder).name || "", enabled));
listObject.list_folder = folders.map(folder => colorMod(folder, folder, enabled));
listObject.list_label = folders.map(folder => colorMod(folder, getMod(folder).label || "", enabled));
listObject.list_url = folders.map(folder => colorMod(folder, getMod(folder).url || "", enabled));
listObject.list_version = folders.map(folder => colorMod(folder, getMod(folder).version || "", enabled));
listObject.list_dependencies = folders.map(folder => colorMod(folder, getMod(folder)?.dependencies.join(" ") || "", enabled));
listObject.list = folders;
listObject.selected = selected ? listObject.list_name.indexOf(selected) : -1;
@@ -166,6 +205,21 @@ function displayModList(listObjectName, folders)
return folders;
}
function getModColor(folder, enabled)
{
if (!g_ModsCompatibility[folder])
return enabled ? g_ColorDependenciesNotMet : "gray";
if (g_InstalledMods.indexOf(getMod(folder).name) != -1)
return "green";
return false;
}
function colorMod(folder, text, enabled)
{
let color = getModColor(folder, enabled);
return color ? coloredText(text, color) : text;
}
function reloadDisabledMods()
{
g_ModsDisabled = Object.keys(g_Mods).filter(folder => g_ModsEnabled.indexOf(folder) == -1);
@@ -176,16 +230,20 @@ function enableMod()
let modsDisabledList = Engine.GetGUIObjectByName("modsDisabledList");
let pos = modsDisabledList.selected;
if (pos == -1 || !areDependenciesMet(g_ModsDisabledFiltered[pos]))
if (pos == -1 || !g_ModsCompatibility[g_ModsDisabledFiltered[pos]])
return;
g_ModsEnabled.push(g_ModsDisabledFiltered.splice(pos, 1)[0]);
reloadDisabledMods();
recomputeCompatibility();
Engine.GetGUIObjectByName("saveConfigurationButton").enabled = true;
if (pos >= g_ModsDisabledFiltered.length)
--pos;
displayModLists();
Engine.GetGUIObjectByName("message").caption = "";
modsDisabledList.selected = pos;
}
@@ -205,7 +263,8 @@ function disableMod()
break;
}
g_ModsDisabled.push(disabledMod);
if (!!g_Mods[disabledMod])
g_ModsDisabled.push(disabledMod);
// Remove mods that required the removed mod and cascade
// Sort them, so we know which ones can depend on the removed mod
@@ -214,53 +273,35 @@ function disableMod()
sortEnabledMods();
for (let i = 0; i < g_ModsEnabled.length; ++i)
if (!areDependenciesMet(g_ModsEnabled[i]))
if (!areDependenciesMet(g_ModsEnabled[i], true))
{
g_ModsDisabled.push(g_ModsEnabled.splice(i, 1)[0]);
--i;
}
Engine.GetGUIObjectByName("saveConfigurationButton").enabled = true;
recomputeCompatibility(true);
displayModLists();
Engine.GetGUIObjectByName("message").caption = "";
modsEnabledList.selected = Math.min(pos, g_ModsEnabledFiltered.length - 1);
}
function applyFilters()
{
// Save selected rows
let modsDisabledList = Engine.GetGUIObjectByName("modsDisabledList");
let modsEnabledList = Engine.GetGUIObjectByName("modsEnabledList");
let selectedDisabledFolder = modsDisabledList.list_folder[modsDisabledList.selected];
let selectedEnabledFolder = modsEnabledList.list_folder[modsEnabledList.selected];
// Remove selected rows to prevent a link to a non existing item
modsDisabledList.selected = -1;
modsEnabledList.selected = -1;
displayModLists();
// Restore previously selected rows
modsDisabledList.selected = modsDisabledList.list_folder.indexOf(selectedDisabledFolder);
modsEnabledList.selected = modsEnabledList.list_folder.indexOf(selectedEnabledFolder);
Engine.GetGUIObjectByName("globalModDescription").caption = "";
}
function filterMod(folder)
{
let mod = g_Mods[folder];
let mod = getMod(folder);
let negateFilter = Engine.GetGUIObjectByName("negateFilter").checked;
let searchText = Engine.GetGUIObjectByName("modGenericFilter").caption;
if (searchText &&
folder.indexOf(searchText) == -1 &&
mod.name.indexOf(searchText) == -1 &&
mod.label.indexOf(searchText) == -1 &&
(mod.name || "").indexOf(searchText) == -1 &&
(mod.label || "").indexOf(searchText) == -1 &&
(mod.url || "").indexOf(searchText) == -1 &&
mod.version.indexOf(searchText) == -1 &&
mod.description.indexOf(searchText) == -1 &&
mod.dependencies.indexOf(searchText) == -1)
(mod.version || "").indexOf(searchText) == -1 &&
(mod.description || "").indexOf(searchText) == -1 &&
(mod.dependencies || "").indexOf(searchText) == -1)
return negateFilter;
return !negateFilter;
@@ -271,12 +312,6 @@ function closePage()
Engine.SwitchGuiPage("page_pregame.xml", {});
}
function areFilters()
{
let searchText = Engine.GetGUIObjectByName("modGenericFilter").caption;
return searchText && searchText != translate("Filter");
}
/**
* Moves an item in the list up or down.
*/
@@ -285,7 +320,7 @@ function moveCurrItem(objectName, up)
// Prevent moving while filters are applied
// because we would need to map filtered positions
// to not filtered positions so changes will persist.
if (areFilters())
if (Engine.GetGUIObjectByName("modGenericFilter").caption)
return;
let obj = Engine.GetGUIObjectByName(objectName);
@@ -302,30 +337,34 @@ function moveCurrItem(objectName, up)
g_ModsEnabled[idx] = g_ModsEnabled[idx2];
g_ModsEnabled[idx2] = tmp;
g_ModsEnabledFiltered = displayModList("modsEnabledList", g_ModsEnabled);
g_ModsEnabledFiltered = displayModList("modsEnabledList", g_ModsEnabled, true);
obj.selected = idx2;
}
function areDependenciesMet(folder)
function areDependenciesMet(folder, disabledAction = false)
{
let guiObject = Engine.GetGUIObjectByName("message");
for (let dependency of g_Mods[folder].dependencies)
{
if (isDependencyMet(dependency))
continue;
guiObject.caption = coloredText(
sprintf(translate('Dependency not met: %(dep)s'), { "dep": dependency }),
g_ColorDependenciesNotMet);
// If we disabled mod it will not change satus of incompatible mods
if (disabledAction && !g_ModsCompatibility[folder])
return g_ModsCompatibility[folder];
if (!g_Mods[folder])
return false;
for (let dependency of getMod(folder).dependencies)
{
if (!isDependencyMet(dependency))
return false;
}
guiObject.caption = coloredText(translate('All dependencies met'), g_ColorDependenciesMet);
return true;
}
function recomputeCompatibility(disabledAction = false)
{
for (let mod in g_Mods)
g_ModsCompatibility[mod] = areDependenciesMet(mod, disabledAction);
}
/**
* @param dependency is a mod name or a mod version comparison.
*/
@@ -335,8 +374,8 @@ function isDependencyMet(dependency)
let [name, version] = operator ? dependency.split(operator[0]) : [dependency, undefined];
return g_ModsEnabled.some(folder =>
g_Mods[folder].name == name &&
(!operator || versionSatisfied(g_Mods[folder].version, operator[0], version)));
getMod(folder).name == name &&
(!operator || versionSatisfied(getMod(folder).version, operator[0], version)));
}
/**
@@ -380,42 +419,49 @@ function sortEnabledMods()
{
let dependencies = {};
for (let folder of g_ModsEnabled)
dependencies[folder] = g_Mods[folder].dependencies.map(d => d.split(g_RegExpComparisonOperator)[0]);
dependencies[folder] = getMod(folder).dependencies.map(d => d.split(g_RegExpComparisonOperator)[0]);
g_ModsEnabled.sort((folder1, folder2) =>
dependencies[folder1].indexOf(g_Mods[folder2].name) != -1 ? 1 :
dependencies[folder2].indexOf(g_Mods[folder1].name) != -1 ? -1 : 0);
dependencies[folder1].indexOf(getMod(folder2).name) != -1 ? 1 :
dependencies[folder2].indexOf(getMod(folder1).name) != -1 ? -1 : 0);
g_ModsEnabledFiltered = displayModList("modsEnabledList", g_ModsEnabled);
g_ModsEnabledFiltered = displayModList("modsEnabledList", g_ModsEnabled, true);
}
function selectedMod(listObjectName)
{
let listObject = Engine.GetGUIObjectByName(listObjectName);
let otherListObject = Engine.GetGUIObjectByName(listObjectName == "modsDisabledList" ?
let isPickedDisabledList = listObjectName == "modsDisabledList";
let otherListObject = Engine.GetGUIObjectByName(isPickedDisabledList ?
"modsEnabledList" : "modsDisabledList");
let toggleModButton = Engine.GetGUIObjectByName("toggleModButton");
let modSelected = listObject.selected != -1;
if (modSelected)
let isModSelected = listObject.selected != -1;
if (isModSelected)
{
otherListObject.selected = -1;
toggleModButton.onPress = listObjectName == "modsDisabledList" ? enableMod : disableMod;
toggleModButton.onPress = isPickedDisabledList ? enableMod : disableMod;
}
Engine.GetGUIObjectByName("visitWebButton").enabled = modSelected && !!getSelectedModUrl();
toggleModButton.caption = listObjectName == "modsDisabledList" ?
const isFiltering = Engine.GetGUIObjectByName("modGenericFilter").caption;
Engine.GetGUIObjectByName("visitWebButton").enabled = isModSelected && !!getSelectedModUrl();
toggleModButton.caption = isPickedDisabledList ?
translateWithContext("mod activation", "Enable") :
translateWithContext("mod activation", "Disable");
toggleModButton.enabled = modSelected;
Engine.GetGUIObjectByName("enabledModUp").enabled = modSelected && listObjectName == "modsEnabledList" && !areFilters();
Engine.GetGUIObjectByName("enabledModDown").enabled = modSelected && listObjectName == "modsEnabledList" && !areFilters();
toggleModButton.enabled = isPickedDisabledList ? isModSelected && g_ModsCompatibility[listObject.list[listObject.selected]] || false : isModSelected;
Engine.GetGUIObjectByName("enabledModUp").enabled = isModSelected && listObjectName == "modsEnabledList" && !isFiltering;
Engine.GetGUIObjectByName("enabledModDown").enabled = isModSelected && listObjectName == "modsEnabledList" && !isFiltering;
Engine.GetGUIObjectByName("globalModDescription").caption =
listObject.list[listObject.selected] ?
g_Mods[listObject.list[listObject.selected]].description :
getMod(listObject.list[listObject.selected]).description :
'[color="' + g_ColorNoModSelected + '"]' + translate("No mod has been selected.") + '[/color]';
if (!g_ModsEnabled.length)
Engine.GetGUIObjectByName("message").caption = coloredText(translate('Enable at least 0ad mod'), g_ColorDependenciesNotMet);
if (!Engine.GetGUIObjectByName("startButton").hidden)
Engine.GetGUIObjectByName("startButton").enabled = g_ModsEnabled.length > 0;
}
/**
@@ -427,8 +473,8 @@ function getSelectedModUrl()
let modsDisabledList = Engine.GetGUIObjectByName("modsDisabledList");
let list = modsEnabledList.selected == -1 ? modsDisabledList : modsEnabledList;
let folder = list.list_folder[list.selected];
return folder && g_Mods[folder] && g_Mods[folder].url || undefined;
let folder = list.list[list.selected];
return folder && getMod(folder) && getMod(folder).url || undefined;
}
function visitModWebsite()
+22 -7
View File
@@ -19,8 +19,8 @@
style="ModernInput"
size="16 0 176 100%"
>
<action on="Press">applyFilters();</action>
<action on="TextEdit">applyFilters();</action>
<action on="Press">displayModLists();</action>
<action on="TextEdit">displayModLists();</action>
<translatableAttribute id="placeholder_text">Filter</translatableAttribute>
</object>
@@ -31,13 +31,27 @@
style="ModernTickBox"
size="186 0 206 100%"
>
<action on="Press">applyFilters();</action>
<action on="Press">displayModLists();</action>
</object>
<object type="text" size="208 0 100% 100%" text_align="left" textcolor="white">
<translatableAttribute id="caption">Negate</translatableAttribute>
</object>
</object>
<object size = "100%-200 40 100%-20 64">
<object name="modCompatibleFilter"
type="checkbox"
checked="false"
style="ModernTickBox"
size="16 0 36 100%"
>
<action on="Press">displayModLists();</action>
</object>
<object type="text" size="40 0 100% 100%" text_align="left" textcolor="white">
<translatableAttribute id="caption">Filter compatible</translatableAttribute>
</object>
</object>
<object
name="globalModDescription"
type="text"
@@ -67,7 +81,7 @@
auto_scroll="true"
>
<action on="SelectionChange">selectedMod(this.name);</action>
<action on="SelectionColumnChange">applyFilters();</action>
<action on="SelectionColumnChange">displayModLists();</action>
<action on="MouseLeftDoubleClickItem">enableMod();</action>
<!-- List headers -->
@@ -98,10 +112,11 @@
<object style="ModernLabelText" type="text" size="0 5 100% 25">
<translatableAttribute id="caption">Enabled Mods</translatableAttribute>
<translatableAttribute id="tooltip">Enabled mods are loaded from top to bottom. Mods loaded later might overwrite settings of mods loaded earlier. It is advisable to have more complex mods loaded last. Use the arrows on the right to change the loading order.</translatableAttribute>
</object>
<object name="modsEnabledList"
style="ModernList"
style="ModernSortedList"
type="olist"
size="0 25 100%-32-2-2 100%"
font="sans-stroke-13"
@@ -198,8 +213,8 @@
<action on="Press">saveMods();</action>
</object>
<object name="startModsButton" type="button" style="ModernButtonRed" size="100%-196 100%-44 100%-16 100%-16">
<translatableAttribute id="caption">Start Mods</translatableAttribute>
<object name="startButton" type="button" style="ModernButtonRed" size="100%-196 100%-44 100%-16 100%-16">
<translatableAttribute id="caption">Save and Restart</translatableAttribute>
<action on="Press">startMods();</action>
</object>
</object>
@@ -5,7 +5,7 @@ const g_ModProperties = {
"type": "string",
"validate": validateName
},
// example: "0.0.24"
// example: "0.0.26"
"version": {
"required": true,
"type": "string",
@@ -19,7 +19,7 @@ const g_ModProperties = {
},
// example: "0 A.D. - Empires Ascendant"
"label": {
"require": true,
"required": true,
"type": "string",
"validate": validateLabel
},
+2 -32
View File
@@ -24,37 +24,7 @@ function init(data)
let captions = data.buttonCaptions || [translate("OK")];
// Set button captions and visibility
let mbButton = [];
captions.forEach((caption, i) => {
mbButton[i] = Engine.GetGUIObjectByName("mbButton" + (i + 1));
mbButton[i].caption = caption;
mbButton[i].hidden = false;
mbButton[i].onPress = () => {
Engine.PopGuiPage(i);
};
// Convention: Cancel is the first button
if (i == 0)
mbCancelHotkey.onPress = mbButton[i].onPress;
});
// Distribute buttons horizontally
let y1 = "100%-46";
let y2 = "100%-18";
switch (captions.length)
{
case 1:
mbButton[0].size = "18 " + y1 + " 100%-18 " + y2;
break;
case 2:
mbButton[0].size = "18 " + y1 + " 50%-5 " + y2;
mbButton[1].size = "50%+5 " + y1 + " 100%-18 " + y2;
break;
case 3:
mbButton[0].size = "18 " + y1 + " 33%-5 " + y2;
mbButton[1].size = "33%+5 " + y1 + " 66%-5 " + y2;
mbButton[2].size = "66%+5 " + y1 + " 100%-18 " + y2;
break;
}
setButtonCaptionsAndVisibitily(mbButton, captions, mbCancelHotkey, "mbButton");
distributeButtonsHorizontally(mbButton, captions);
}
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<page>
<include>common/modern/setup.xml</include>
<include>common/modern/styles.xml</include>
<include>common/modern/sprites.xml</include>
<include>modmod/styles.xml</include>
<include>incompatible_mods/incompatible_mods.xml</include>
</page>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<page>
<include>common/modern/setup.xml</include>
<include>common/modern/styles.xml</include>
<include>common/modern/sprites.xml</include>
<include>timedconfirmation/timedconfirmation.xml</include>
</page>
@@ -0,0 +1,74 @@
/**
* @class TimedConfirmation
* This class displays confirmation box, which will be closed after defined time in miliseconds.
*/
class TimedConfirmation
{
/**
* @param {Object} data
* @param {Number} data.width - The width of the confirmation box
* @param {Number} data.height - The height of the confirmation box
* @param {String} data.message - The message to be displayed with parameter for time which will be displayed in seconds
* @param {String} data.timeParameter - The string used in 'message' for time, e.g 'time' with %(time)s in message
* @param {Number} data.timeout - The time in miliseconds after which confirmation box closes itself
* @param {String} data.title - The string displayed in header
* @param {String|undefined} data.buttonCaptions - The captions used for buttons (if not defined, defaults to 'OK')
* @param {String|undefined} data.font - The used font
*/
constructor(data)
{
this.messageObject = Engine.GetGUIObjectByName("tmcText");
this.panel = Engine.GetGUIObjectByName("tmcMain");
this.panel.onTick = this.onTick.bind(this);
this.setup(data);
}
setup(data)
{
Engine.GetGUIObjectByName("tmcTitleBar").caption = data.title;
this.timeout = +data.timeout + Date.now();
this.message = data.message;
this.timeParameter = data.timeParameter;
if (data.font)
this.messageObject.font = data.font;
this.updateDisplayedTimer(data.timeout);
const cancelHotkey = Engine.GetGUIObjectByName("tmcCancelHotkey");
cancelHotkey.onPress = Engine.PopGuiPage;
const lRDiff = data.width / 2;
const uDDiff = data.height / 2;
this.panel.size = "50%-" + lRDiff + " 50%-" + uDDiff + " 50%+" + lRDiff + " 50%+" + uDDiff;
const captions = data.buttonCaptions || [translate("OK")];
const button = [];
setButtonCaptionsAndVisibitily(button, captions, cancelHotkey, "tmcButton");
distributeButtonsHorizontally(button, captions);
}
onTick()
{
const remaining = this.timeout - Date.now();
if (remaining < 1)
Engine.GetGUIObjectByName("tmcButton1").onPress();
this.updateDisplayedTimer(remaining);
}
updateDisplayedTimer(time)
{
this.messageObject.caption = sprintf(
this.message,
{ [this.timeParameter]: Math.ceil(time / 1000) }
);
}
}
function init(data)
{
new TimedConfirmation(data);
}
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<script directory="gui/common/"/>
<script directory="gui/timedconfirmation/"/>
<!-- Fade out the background because it's non-interactable -->
<object sprite="ModernFade" type="image"/>
<object name="tmcCancelHotkey" hotkey="cancel" />
<object name="tmcMain"
style="ModernDialog"
type="image"
>
<object name="tmcTitleBar"
style="ModernLabelText"
type="text"
size="50%-128 -18 50%+128 14"
/>
<object name="tmcTimerDisplay"
type="text"
style="ModernLabelText"
size="18 28 100%-18 38"
/>
<object name="tmcText"
type="text"
style="ModernLabelText"
size="18 40 100%-18 100%-64"
/>
<!-- The size of the following buttons is set dynamically in timedconfirmation.js -->
<object name="tmcButton1"
style="ModernButtonRed"
type="button"
hidden="true"
/>
<object name="tmcButton2"
style="ModernButtonRed"
type="button"
hidden="true"
/>
<object name="tmcButton3"
style="ModernButtonRed"
type="button"
hidden="true"
/>
</object>
</objects>
+9 -5
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2020 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -209,10 +209,10 @@ function RunDetection(settings)
var gfx_mem = settings.gfx_mem;
// Values from glGetString
var GL_VENDOR = settings.GL_VENDOR;
var GL_RENDERER = settings.GL_RENDERER;
var GL_VERSION = settings.GL_VERSION;
var GL_EXTENSIONS = settings.GL_EXTENSIONS.split(" ");
var GL_VENDOR = settings.renderer_backend.GL_VENDOR;
var GL_RENDERER = settings.renderer_backend.GL_RENDERER;
var GL_VERSION = settings.renderer_backend.GL_VERSION;
var GL_EXTENSIONS = settings.renderer_backend.GL_EXTENSIONS.split(" ");
// Enable GLSL on OpenGL 3+, which should be able to properly
// manage GLSL shaders, needed for effects like windy trees
@@ -340,6 +340,10 @@ function RunDetection(settings)
global.RunHardwareDetection = function(settings)
{
// Currently we don't have limitations for other backends than GL and GL ARB.
if (settings.renderer_backend.name != 'gl' && settings.renderer_backend.name != 'glarb')
return;
//print(JSON.stringify(settings, null, 1)+"\n");
var output = RunDetection(settings);
+3 -3
View File
@@ -15,9 +15,9 @@ print("<th>Output");
print("<th>Warnings");
hwdetectTestData.sort(function(a, b) {
if (a.GL_RENDERER < b.GL_RENDERER)
if (a.renderer_backend.GL_RENDERER < b.renderer_backend.GL_RENDERER)
return -1;
if (b.GL_RENDERER < a.GL_RENDERER)
if (b.renderer_backend.GL_RENDERER < a.renderer_backend.GL_RENDERER)
return +1;
return 0;
});
@@ -35,7 +35,7 @@ for (var settings of hwdetectTestData)
print("<tr>");
print("<td>" + os);
print("<td>" + settings.GL_RENDERER);
print("<td>" + settings.renderer_backend.GL_RENDERER);
print("<td>" + disabled.join(" "));
print("<td>" + output.warnings.concat(output.dialog_warnings).join("\n"));
}
@@ -0,0 +1,27 @@
!!ARBfp1.0
TEMP colorTex;
TEX colorTex, fragment.texcoord[0], texture[0], 2D;
TEMP grayscale;
MOV grayscale.r, 0.3;
MOV grayscale.g, 0.59;
MOV grayscale.b, 0.11;
MOV grayscale.a, 0.0;
PARAM colorAdd = program.local[1];
PARAM colorMul = program.local[2];
PARAM grayscaleFactor = program.local[3];
TEMP colorGray;
DP3 colorGray.rgb, colorTex, grayscale;
MOV colorGray.a, colorTex.a;
TEMP color;
LRP color, grayscaleFactor.r, colorGray, colorTex;
MUL color, color, colorMul;
ADD color, color, colorAdd;
MOV result.color, color;
END
@@ -0,0 +1,16 @@
!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
MOV position.z, 0.0;
MOV position.w, 1.0;
MOV result.position, position;
MOV result.texcoord[0], vertex.texcoord[0];
END
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/canvas2d.vp">
<stream name="pos"/>
<stream name="uv0"/>
<uniform name="transform" loc="0" type="mat4"/>
</vertex>
<fragment file="arb/canvas2d.fp">
<uniform name="tex" loc="0" type="sampler2D"/>
<uniform name="colorAdd" loc="1" type="vec4"/>
<uniform name="colorMul" loc="2" type="vec4"/>
<uniform name="grayscaleFactor" loc="3" type="float"/>
</fragment>
</program>
@@ -1,15 +0,0 @@
!!ARBfp1.0
TEMP tex_color;
TEX tex_color, fragment.texcoord[0], texture[0], 2D;
PARAM add_color = program.local[1];
TEMP color;
MOV color, add_color;
MAD color.rgb, color, tex_color.a, tex_color;
MOV color.a, tex_color.a;
MOV result.color, color;
END
@@ -1,16 +0,0 @@
!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
MOV result.position, position;
MOV result.texcoord[0], vertex.texcoord[0];
END
@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/gui_add.vp">
<stream name="pos"/>
<stream name="uv0"/>
<uniform name="transform" loc="0" type="mat4"/>
</vertex>
<fragment file="arb/gui_add.fp">
<uniform name="tex" loc="0" type="sampler2D"/>
<uniform name="color" loc="1" type="vec4"/>
</fragment>
</program>
@@ -1,5 +0,0 @@
!!ARBfp1.0
TEX result.color, fragment.texcoord[0], texture[0], 2D;
END
@@ -1,16 +0,0 @@
!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
MOV result.position, position;
MOV result.texcoord[0], vertex.texcoord[0];
END
@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/gui_basic.vp">
<stream name="pos"/>
<stream name="uv0"/>
<uniform name="transform" loc="0" type="mat4"/>
</vertex>
<fragment file="arb/gui_basic.fp">
<uniform name="tex" loc="0" type="sampler2D"/>
</fragment>
</program>
@@ -1,18 +0,0 @@
!!ARBfp1.0
TEMP tex_color;
TEX tex_color, fragment.texcoord[0], texture[0], 2D;
TEMP grayscale;
MOV grayscale.r, 0.3;
MOV grayscale.g, 0.59;
MOV grayscale.b, 0.11;
MOV grayscale.a, 0.0;
TEMP color;
DP3 color.rgb, tex_color, grayscale;
MOV color.a, tex_color.a;
MOV result.color, color;
END
@@ -1,16 +0,0 @@
!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
MOV result.position, position;
MOV result.texcoord[0], vertex.texcoord[0];
END
@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/gui_grayscale.vp">
<stream name="pos"/>
<stream name="uv0"/>
<uniform name="transform" loc="0" type="mat4"/>
</vertex>
<fragment file="arb/gui_grayscale.fp">
<uniform name="tex" loc="0" type="sampler2D"/>
</fragment>
</program>
@@ -1,7 +0,0 @@
!!ARBfp1.0
PARAM color = program.local[0];
MOV result.color, color;
END
@@ -1,14 +0,0 @@
!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
MOV result.position, position;
END
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/gui_solid.vp">
<uniform name="transform" loc="0" type="mat4"/>
<stream name="pos"/>
</vertex>
<fragment file="arb/gui_solid.fp">
<uniform name="color" loc="0" type="vec4"/>
</fragment>
</program>
@@ -1,14 +0,0 @@
!!ARBfp1.0
TEMP tex_color;
TEX tex_color, fragment.texcoord[0], texture[0], 2D;
PARAM add_color = program.local[1];
TEMP color;
MOV color, add_color;
MUL color.a, color.a, tex_color.a;
MOV result.color, color;
END
@@ -1,16 +0,0 @@
!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
MOV result.position, position;
MOV result.texcoord[0], vertex.texcoord[0];
END
@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/gui_solid_mask.vp">
<stream name="pos"/>
<stream name="uv0"/>
<uniform name="transform" loc="0" type="mat4"/>
</vertex>
<fragment file="arb/gui_solid_mask.fp">
<uniform name="tex" loc="0" type="sampler2D"/>
<uniform name="color" loc="1" type="vec4"/>
</fragment>
</program>
@@ -1,15 +0,0 @@
!!ARBfp1.0
TEMP tex_color;
TEX tex_color, fragment.texcoord[0], texture[0], 2D;
PARAM add_color = program.local[1];
PARAM mul_color = program.local[2];
TEMP color;
ADD color, tex_color, add_color;
MUL color, color, mul_color;
MOV result.color, color;
END
@@ -1,16 +0,0 @@
!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
MOV result.position, position;
MOV result.texcoord[0], vertex.texcoord[0];
END
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/gui_text.vp">
<stream name="pos"/>
<stream name="uv0"/>
<uniform name="transform" loc="0" type="mat4"/>
</vertex>
<fragment file="arb/gui_text.fp">
<uniform name="tex" loc="0" type="sampler2D"/>
<uniform name="colorAdd" loc="1" type="vec4"/>
<uniform name="colorMul" loc="2" type="vec4"/>
</fragment>
</program>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/canvas2d">
<depth test="FALSE" mask="false"/>
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
<technique>
<require shaders="glsl"/>
<pass shader="glsl/canvas2d">
<depth test="FALSE" mask="false"/>
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
</effect>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<pass shader="glsl/cas">
<depth test="FALSE" mask="false"/>
</pass>
</technique>
</effect>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="glsl"/>
<pass shader="glsl/fxaa">
<depth test="FALSE" mask="false"/>
</pass>
</technique>
</effect>
@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/gui_add"/>
</technique>
<technique>
<require shaders="fixed"/>
<pass shader="fixed:gui_add"/>
</technique>
<technique>
<require shaders="glsl"/>
<pass shader="glsl/gui_add"/>
</technique>
</effect>
@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/gui_basic"/>
</technique>
<technique>
<require shaders="fixed"/>
<pass shader="fixed:gui_basic"/>
</technique>
<technique>
<require shaders="glsl"/>
<pass shader="glsl/gui_basic"/>
</technique>
</effect>
@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/gui_grayscale"/>
</technique>
<technique>
<require shaders="fixed"/>
<pass shader="fixed:gui_grayscale"/>
</technique>
<technique>
<require shaders="glsl"/>
<pass shader="glsl/gui_grayscale"/>
</technique>
</effect>
@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/gui_solid"/>
</technique>
<technique>
<require shaders="fixed"/>
<pass shader="fixed:gui_solid"/>
</technique>
<technique>
<require shaders="glsl"/>
<pass shader="glsl/gui_solid"/>
</technique>
</effect>
@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/gui_solid_mask"/>
</technique>
<technique>
<require shaders="fixed"/>
<pass shader="fixed:gui_solid"/>
</technique>
<technique>
<require shaders="glsl"/>
<pass shader="glsl/gui_solid_mask"/>
</technique>
</effect>
@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/gui_text">
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
<technique>
<require shaders="fixed"/>
<pass shader="fixed:gui_text">
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
<technique>
<require shaders="glsl"/>
<pass shader="glsl/gui_text">
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
</effect>
@@ -0,0 +1,15 @@
#version 110
uniform sampler2D tex;
uniform vec4 colorAdd;
uniform vec4 colorMul;
uniform float grayscaleFactor;
varying vec2 v_uv;
void main()
{
vec4 colorTex = texture2D(tex, v_uv);
vec3 grayColor = vec3(dot(vec3(0.3, 0.59, 0.11), colorTex.rgb));
gl_FragColor = clamp(mix(colorTex, vec4(grayColor, colorTex.a), grayscaleFactor) * colorMul + colorAdd, 0.0, 1.0);
}
@@ -0,0 +1,14 @@
#version 110
uniform mat4 transform;
attribute vec2 a_vertex;
attribute vec2 a_uv0;
varying vec2 v_uv;
void main()
{
v_uv = a_uv0;
gl_Position = transform * vec4(a_vertex, 0.0, 1.0);
}
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="glsl">
<vertex file="glsl/canvas2d.vs">
<stream name="pos" attribute="a_vertex"/>
<stream name="uv0" attribute="a_uv0"/>
</vertex>
<fragment file="glsl/canvas2d.fs"/>
</program>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="glsl">
<vertex file="glsl/simple.vs">
<stream name="pos" attribute="a_vertex"/>
<stream name="uv0" attribute="a_uv0"/>
</vertex>
<fragment file="glsl/cas.fs"/>
</program>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="glsl">
<vertex file="glsl/simple.vs">
<stream name="pos" attribute="a_vertex"/>
<stream name="uv0" attribute="a_uv0"/>
</vertex>
<fragment file="glsl/fxaa.fs"/>
</program>
@@ -1,13 +0,0 @@
#version 110
uniform sampler2D tex;
uniform vec4 color;
varying vec2 v_tex;
void main()
{
vec4 t = texture2D(tex, v_tex);
gl_FragColor.rgb = t.rgb + color.rgb * t.a;
gl_FragColor.a = t.a;
}
@@ -1,15 +0,0 @@
#version 110
uniform mat4 transform;
varying vec2 v_tex;
attribute vec3 a_vertex;
attribute vec2 a_uv0;
void main()
{
gl_Position = transform * vec4(a_vertex, 1.0);
v_tex = a_uv0;
}
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="glsl">
<vertex file="glsl/gui_add.vs">
<stream name="pos"/>
<stream name="uv0"/>
<attrib name="a_vertex" semantics="gl_Vertex"/>
<attrib name="a_uv0" semantics="gl_MultiTexCoord0"/>
</vertex>
<fragment file="glsl/gui_add.fs"/>
</program>
@@ -1,10 +0,0 @@
#version 110
uniform sampler2D tex;
varying vec2 v_tex;
void main()
{
gl_FragColor = texture2D(tex, v_tex);
}
@@ -1,15 +0,0 @@
#version 110
uniform mat4 transform;
varying vec2 v_tex;
attribute vec3 a_vertex;
attribute vec2 a_uv0;
void main()
{
gl_Position = transform * vec4(a_vertex, 1.0);
v_tex = a_uv0;
}
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="glsl">
<vertex file="glsl/gui_basic.vs">
<stream name="pos"/>
<stream name="uv0"/>
<attrib name="a_vertex" semantics="gl_Vertex"/>
<attrib name="a_uv0" semantics="gl_MultiTexCoord0"/>
</vertex>
<fragment file="glsl/gui_basic.fs"/>
</program>
@@ -1,12 +0,0 @@
#version 110
uniform sampler2D tex;
varying vec2 v_tex;
void main()
{
vec4 t = texture2D(tex, v_tex);
gl_FragColor.rgb = vec3(dot(t.rgb, vec3(0.3, 0.59, 0.11)));
gl_FragColor.a = t.a;
}
@@ -1,15 +0,0 @@
#version 110
uniform mat4 transform;
varying vec2 v_tex;
attribute vec3 a_vertex;
attribute vec2 a_uv0;
void main()
{
gl_Position = transform * vec4(a_vertex, 1.0);
v_tex = a_uv0;
}
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="glsl">
<vertex file="glsl/gui_grayscale.vs">
<stream name="pos"/>
<stream name="uv0"/>
<attrib name="a_vertex" semantics="gl_Vertex"/>
<attrib name="a_uv0" semantics="gl_MultiTexCoord0"/>
</vertex>
<fragment file="glsl/gui_grayscale.fs"/>
</program>
@@ -1,8 +0,0 @@
#version 110
uniform vec4 color;
void main()
{
gl_FragColor = color;
}
@@ -1,10 +0,0 @@
#version 110
uniform mat4 transform;
attribute vec3 a_vertex;
void main()
{
gl_Position = transform * vec4(a_vertex, 1.0);
}
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="glsl">
<vertex file="glsl/gui_solid.vs">
<stream name="pos"/>
<attrib name="a_vertex" semantics="gl_Vertex"/>
</vertex>
<fragment file="glsl/gui_solid.fs"/>
</program>
@@ -1,13 +0,0 @@
#version 110
uniform sampler2D tex;
uniform vec4 color;
varying vec2 v_tex;
void main()
{
vec4 t = texture2D(tex, v_tex);
gl_FragColor.rgb = color.rgb;
gl_FragColor.a = t.a*color.a;
}
@@ -1,15 +0,0 @@
#version 110
uniform mat4 transform;
varying vec2 v_tex;
attribute vec3 a_vertex;
attribute vec2 a_uv0;
void main()
{
gl_Position = transform * vec4(a_vertex, 1.0);
v_tex = a_uv0;
}
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="glsl">
<vertex file="glsl/gui_solid_mask.vs">
<stream name="pos"/>
<stream name="uv0"/>
<attrib name="a_vertex" semantics="gl_Vertex"/>
<attrib name="a_uv0" semantics="gl_MultiTexCoord0"/>
</vertex>
<fragment file="glsl/gui_solid_mask.fs"/>
</program>
@@ -1,12 +0,0 @@
#version 110
uniform vec4 colorAdd;
uniform vec4 colorMul;
uniform sampler2D tex;
varying vec2 v_texcoord;
void main()
{
gl_FragColor = (texture2D(tex, v_texcoord) + colorAdd) * colorMul;
}
@@ -1,14 +0,0 @@
#version 110
uniform mat4 transform;
varying vec2 v_texcoord;
attribute vec3 a_vertex;
attribute vec2 a_uv0;
void main()
{
gl_Position = transform * vec4(a_vertex, 1.0);
v_texcoord = a_uv0;
}
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="glsl">
<vertex file="glsl/gui_text.vs">
<stream name="pos"/>
<stream name="uv0"/>
<attrib name="a_vertex" semantics="gl_Vertex"/>
<attrib name="a_uv0" semantics="gl_MultiTexCoord0"/>
</vertex>
<fragment file="glsl/gui_text.fs"/>
</program>
+9 -28
View File
@@ -37,7 +37,7 @@
</zeroOrMore>
</element>
</group>
<group>
<attribute name="type">
<value>glsl</value>
@@ -46,33 +46,7 @@
<element name="vertex">
<attribute name="file"><text/></attribute>
<zeroOrMore>
<choice>
<element name="attrib">
<ref name="conditional"/>
<attribute name="name"><text/></attribute>
<attribute name="semantics">
<choice>
<value>gl_Vertex</value>
<value>gl_Normal</value>
<value>gl_Color</value>
<value>gl_SecondaryColor</value>
<value>gl_FogCoord</value>
<value>gl_MultiTexCoord0</value>
<value>gl_MultiTexCoord1</value>
<value>gl_MultiTexCoord2</value>
<value>gl_MultiTexCoord3</value>
<value>gl_MultiTexCoord4</value>
<value>gl_MultiTexCoord5</value>
<value>gl_MultiTexCoord6</value>
<value>gl_MultiTexCoord7</value>
<value>CustomAttribute0</value>
<value>CustomAttribute1</value>
<value>CustomAttribute2</value>
</choice>
</attribute>
</element>
<ref name="streamContent"/>
</choice>
<ref name="streamContent"/>
</zeroOrMore>
</element>
@@ -120,8 +94,15 @@
<value>uv1</value>
<value>uv2</value>
<value>uv3</value>
<value>uv4</value>
<value>uv5</value>
<value>uv6</value>
<value>uv7</value>
</choice>
</attribute>
<optional>
<attribute name="attribute"><text/></attribute>
</optional>
</element>
</define>
@@ -1,71 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element actor {
attribute version { xsd:positiveInteger }, (
element group {
element variant {
attribute name { text }? &
attribute file { text }? &
attribute frequency { xsd:nonNegativeInteger }? &
element mesh {
text
}? &
element textures {
element texture {
attribute file { text }? &
attribute name { text }
}*
}? &
element decal {
attribute width { xsd:float } & # X
attribute depth { xsd:float } & # Z
attribute angle { xsd:float } &
attribute offsetx { xsd:float } &
attribute offsetz { xsd:float }
}? &
element particles {
attribute file { text }
}? &
element color { list {
xsd:nonNegativeInteger, # R
xsd:nonNegativeInteger, # G
xsd:nonNegativeInteger # B
} }? &
element animations {
element animation {
attribute name { text } &
attribute id { text }? &
attribute frequency { xsd:nonNegativeInteger }? &
attribute file { text }? &
attribute speed { xsd:nonNegativeInteger } &
attribute event { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }? &
attribute load { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }? &
attribute sound { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }?
}*
}? &
element props {
element prop {
(attribute actor { text }? &
attribute attachpoint { text } &
attribute minheight { xsd:float }? &
attribute maxheight { xsd:float }? &
attribute selectable { "true" | "false" }?)
}*
}?
}*
}* &
element castshadow { # flag; true if present
empty
}? &
element float { # flag; true if present
empty
}? &
element material {
text
}?
)
}

Some files were not shown because too many files have changed in this diff Show More