1
0
forked from 0ad/0ad
Commit Graph

382 Commits

Author SHA1 Message Date
ffc4a56b9f Revert non-ASCII characters from source and configuration files introduced in 157c6af18e.
Fixes #6846

Differential Revision: https://code.wildfiregames.com/D5185
This was SVN commit r27965.
2023-12-03 00:30:12 +00:00
bb
157c6af18e Make the space in 0 A.D. non-breaking throughout the codebase.
Avoid cases of filenames
Update years in terms and other legal(ish) documents
Don't update years in license headers, since change is not meaningful

Will add linter rule in seperate commit

Happy recompiling everyone!

Original Patch By: Nescio
Comment By: Gallaecio
Differential Revision: D2620
This was SVN commit r27786.
2023-07-27 20:54:46 +00:00
4e86f99fe2 Replaces boost string general includes by more precise ones.
Differential Revision: https://code.wildfiregames.com/D5066
This was SVN commit r27746.
2023-06-30 19:10:13 +00:00
5d7a8b9d1b Fix: Crash atlas in relation to Terrain.cpp CalcPosition
Patch by: @trompetin17
Differential revision: https://code.wildfiregames.com/D4900
Comments by: @Langbart, @Stan, @Vladislav
Fixes #6550

This was SVN commit r27499.
2023-01-28 22:42:00 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
1cb4ee1634 Combines terrain and units ambient colors into the single color.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3237
This was SVN commit r24661.
2021-01-17 13:10:00 +00:00
4942cabab5 Fix most Clang 10 Warnings
Refs: #5550, #5294

Remove dead code from f71be3c764
Fix buggy code from ff50b0b74c
Comments by: @wraitii, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3177
This was SVN commit r24487.
2020-12-31 14:25:37 +00:00
a395a0ab66 [BOOST 1.75 2/2] Update binaries for windows (1.65 → 1.75).
Refs #3004

This was SVN commit r24484.
2020-12-31 12:13:25 +00:00
764440e017 Remove the Engine threading when using Atlas
MacOS requires some UI-related API calls to happen on the main thread.
There are several SDL functions that call UI-things, and those were,
since #500 / 08b4d96cf2, in a separate thread.
This crashes on Catalina, instead of simply warning (see #5470).

It is not the first time we had such issues, as originally the Engine
was on the main thread and AtlasUI on a separate thread.
That didn't work on MacOS, so the threading was inverted in #500 /
08b4d96cf2, with AtlasUI on the main thread and the Engine in another
thread.
Unfortunately, this still wasn't enough.

This formally unthreads the engine, running it on a wxTimer, to avoid
these issues.

Future work should focus on:
- Further decoupling the simulation from the engine itself, as what
Atlas really needs is a threaded simulation, not a threaded engine.
- Making the simulation itself more threaded
- Making it possible to do tasks asynchronously under Atlas.

Refs #500
Fixes #5470

Differential Revision: https://code.wildfiregames.com/D2752
This was SVN commit r24361.
2020-12-10 09:42:58 +00:00
7e91806be3 Use C++17 to compile 0 A.D.
Supported compilers are Clang 5, GCC 7, Visual Studio 17, Xcode 9.3

Update Atlas alongside since the replacement APIs are c++17 only.
De-activate the StyledTextCtrl module of WxWidgets on mac, since that is
a wrapper around the Scintilla Text editor and doesn't compile with
C++17 (as it uses auto_ptr). We don't use the editor, so this is also a
win on the compilation time front.

Closes #5862

Differential Revision: https://code.wildfiregames.com/D3166
This was SVN commit r24308.
2020-12-01 14:17:12 +00:00
02578e46bf [SM68 2/2] Update to Spidermonkey 68 APIs
No noteworthy API changes.

Details:
- Remove UTF16 script execution since UTF8 is supported in SM68 and
going forward
- Several new headers includes are required
- Realms replace Compartments as "global holders" (see meta-Bug 1357862)
- JSRequests are removed entirely (Bug 722345), see also aae417bd29
- Trivial API updates in ProxyHandlers, ArrayBuffer, Warnings, GC
reasons, Context options, ObjectIsFunction, ValueVectors and
JSCompartment

See also the migration guide:
https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/esr78/docs/Migration%20Guide.md

Tested by: Freagarach, Stan, Subitaneo
Fixes #5860

Differential Revision: https://code.wildfiregames.com/D3144
This was SVN commit r24297.
2020-11-30 09:03:20 +00:00
770280436b Removes FFP option from Atlas and adds ARB/GLSL selection.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3055
This was SVN commit r24123.
2020-11-04 12:21:55 +00:00
b0e4eecdfe Fix map serialization bug in aeaba3c14c and 8190dd9054.
Reviewed by: @Angen
Differential Revision: https://code.wildfiregames.com/D2974
This was SVN commit r24051.
2020-09-20 09:33:18 +00:00
01118c1196 Fix issues relating to SDL and wxWidgets interaction in Atlas.
This fixes the transfer of key inputs from WxWidgets to SDL, making it
possible to type in the in-game GUI from Atlas.

Also fixes whitespace issues in some Atlas files.

The following improvements are OSX specific:
- fixes an SDL assertion related to unused subsystems in Atlas.
- Remove the 'osxguiapplication' override. This fixes the editor
starting up in the background and not accepting input when launched from
in-game.
- To prevent an issue with sdl/wxwidgets conflict when running from
inside the game, actually boot a new instance (see #2427)


Reported by: wik (Many thanks for your investigations)
Tested by: trompetin17, Stan
Fixes #2427
Fixes #2846

Differential Revision: https://code.wildfiregames.com/D2788
This was SVN commit r23926.
2020-08-03 12:23:16 +00:00
8190dd9054 Fix Atlas crash introduced by aeaba3c14c
Reviewed by: @Angen @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2898
This was SVN commit r23881.
2020-07-24 18:53:03 +00:00
3ed9df0d6c Allow map to recenter during resize in Atlas. Fixes #1109.
Patch By: Clockwork-Muse
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D825
This was SVN commit r23859.
2020-07-21 02:08:50 +00:00
aeaba3c14c Use victory conditions json's in Atlas
Reviewed by: @Angen
Differential Revision: https://code.wildfiregames.com/D2393
This was SVN commit r23847.
2020-07-18 17:39:59 +00:00
c2afb5cdb6 Fix warnings with VS2015 introduced in 800bf0da24
Reviewed by: @Angen
Differential Revision: https://code.wildfiregames.com/D2394
This was SVN commit r23531.
2020-03-15 16:13:51 +00:00
32b52f9f67 Saves sidebar/bottombar width/height between Atlas sessions
Tested By: Nescio, Stan
Differential Revision: https://code.wildfiregames.com/D2583
This was SVN commit r23424.
2020-01-20 20:58:17 +00:00
d3328f9358 Adds non-strict search to the Atlas entity list
Tested By: Nescio, elexis, Stan
Differential Revision: https://code.wildfiregames.com/D2542
This was SVN commit r23423.
2020-01-20 20:42:54 +00:00
8d2b143cb8 Cleanup Camera related code and uses constant references where possible, fixes #5408.
Patch By: shh
Reviewed By: wraitii
Tested By: Angen
Commented By: Stan, Itms, historic_bruno
Differential Revision: https://code.wildfiregames.com/D1784
This was SVN commit r23034.
2019-10-03 13:20:56 +00:00
4ced2182b2 Fixes compiler warning about unused variable introduced in 09e129bce2.
This was SVN commit r22548.
2019-07-24 23:25:45 +00:00
e6f960bca6 Makes wxWidgets 3.0 dependency explicit in the game build.
Removes a few non-behavioral workarounds for older versions.

Refs #5502, #2891.
Accepted By: asterix
Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2076
This was SVN commit r22508.
2019-07-19 04:52:03 +00:00
5fe08f1471 Actually use variable added in 80d9a44ab5. Refs #5501.
This was SVN commit r22468.
2019-07-14 05:15:51 +00:00
80d9a44ab5 Fixes #5501 null pointer exception in AtlasUI on Windows.
Contrary to wxWidgets documentation, wxMenuEvent::GetMenu() can return
NULL when the system menu is accessed on wxMSW, see
https://trac.wxwidgets.org/ticket/18443.

This was SVN commit r22467.
2019-07-14 05:02:43 +00:00
3c2f15ee8b Fix lineendings.
This was SVN commit r22460.
2019-07-12 17:40:40 +00:00
09e129bce2 Adds an tool to pick water high by terrain click in Atlas.
Reviewed By: trompetin17
Differential Revision: https://code.wildfiregames.com/D2037
This was SVN commit r22445.
2019-07-09 18:16:55 +00:00
844462b0c0 #5445
This was SVN commit r22397.
2019-06-25 05:05:06 +00:00
800bf0da24 Improve UTF-8 character handling in Atlas
(Also prevents the compile-time warnings reported in the abandoned
D1432)

Accepted by: Itms
Patch linting by: Stan, Vladislav, wraitii
Also tested by: Imarok
Fixes: #4936
Differential Revision: https://code.wildfiregames.com/D1395
This was SVN commit r22335.
2019-06-03 20:19:53 +00:00
2288943f91 Fixes
C4458 in AtlasObjectImpl.cpp line 292 and in AtlasUI/Object.cpp:547
C4456 in MapDialog.cpp:173 and in ScenarioEditor.cpp:742

Reviewed by: @Angen
Accepted by: @Itms
Comments by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1741
This was SVN commit r22161.
2019-04-05 12:37:37 +00:00
993ddcfe3e Rotate entities during placement in Atlas with the keyboard only when the window has focus. Reported by Andrettin.
Patch By: Angen
Reviewed By: Itms, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1509
This was SVN commit r22125.
2019-03-17 16:04:06 +00:00
7e2b318a1e Add particle support to the Actor Editor, fixes #1590.
Patch By: shh
Differential Revision: https://code.wildfiregames.com/D1783
This was SVN commit r22117.
2019-03-16 21:16:04 +00:00
2bbdd145ab Little cleanup for the 9f202500ea
This was SVN commit r21541.
2018-03-13 20:26:30 +00:00
9f202500ea Adds maps paths and a tutorial maps tab in Atlas
Original Patch By: Phormio
Comments By: elexis
Reviewed By: s0600204
Differential Revision: https://code.wildfiregames.com/D614
This was SVN commit r21540.
2018-03-13 20:20:45 +00:00
bb
6d54ab4c1f Implement combine victory conditions
Excluding the changes to scenario and skirmisch maps
Transform gameType string to victoryCondition array in load/replaymenu
Adapt the gamesetup to use checkboxes for every victory condition and an
array for storing them
Allow multiple queries in conquestCommon
Remove conquest from regicide, wonder and capture the relic
Move the endless gamedescription from settings to gamedescription
Fixing wrong tabulation from a8a29271ce

This commit will break all scenario and skirmisch maps, their "Gametype"
string needs to be transformed in a "VictoryCondition" array as is done
in the tutorial map (counting endless as an empty array). This counts
for mods too!
Old svn replays and savegame will throw warnings/errors as they are
incompatible after this commit. So svn users will need to delete all
those.

Comments on ai and autostart games By: mimo
Comments on Atlas By: Vladislav
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1240
fixes: #4014

This was SVN commit r21474.
2018-03-09 21:51:18 +00:00
bb
d470995bcb Fix nomad checbox scrolling wrongly, fixes 70172519b7
This was SVN commit r21360.
2018-02-24 20:19:59 +00:00