1
0
forked from 0ad/0ad
Commit Graph

396 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
0d2faa1cab Adds debug context option for GL context creation.
This was SVN commit r26484.
2022-02-25 16:26:56 +00:00
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
492a109b68 Removes redundant ogl_tex quality option after 4de89c3db1.
This was SVN commit r26367.
2022-02-13 21:53:02 +00:00
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
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
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
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
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
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
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
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
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
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
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
6f49e7bd6b New key for signing A25-compatible mods.
This was SVN commit r25798.
2021-06-14 19:42:00 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
f175bc4f8d Fixes big screenshots with water (reflection or refraction camera), adds big screenshot customization.
Commented By: Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D3557
This was SVN commit r24891.
2021-02-12 21:20:07 +00:00
44f5c6ff50 New public key for A24 mods.
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D3471
This was SVN commit r24788.
2021-01-25 17:31:25 +00:00
e7e6fe139e Allows to override GL version for SDL.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3448
This was SVN commit r24768.
2021-01-22 19:40:02 +00:00
8c429b9a68 Fix unit-only Attack move.
attackmoveUnit is more specific than attackMove, so since d0a42f2f00
won't fire at the same time. However the GUI code expected that,
breaking it.

Instead, properly check for either attackmove or attackmoveUnit.

Also fix an issue with d0a42f2f00 where hotkeys would be release if
switching to a more specific combination of the same hotkey.

Reported by: snelius
Fixes #5944

Differential Revision: https://code.wildfiregames.com/D3436
This was SVN commit r24752.
2021-01-21 15:58:33 +00:00
4af962618e Add Shift+Space as an alternative Pause hotkey
Mac keyboards have no "Pause" button. As an alternative, introduce
'Shift+Space' (used in Factorio).
P is already used for Patrol.

Reported by: langbart
Fixes #5943

Differential Revision: https://code.wildfiregames.com/D3435
This was SVN commit r24743.
2021-01-21 09:31:50 +00:00
e10202d64d Tweaks to the 'auto formation' feature.
- Add an option to control the 'null formation' override, so it can be
turned off/on independently of having a default formation set. It
defaults to "Walk/Patrol only".
- Make only 'walk' and 'patrol' orders use the default formation.

This makes the system more flexible, and easier to use for competitive
play.

Differential Revision: https://code.wildfiregames.com/D3413
This was SVN commit r24703.
2021-01-19 16:14:07 +00:00
6bb1de61ec Format hotkey tooltip when an alternate key-name is used
Some keys have multiple names that they may be identified by in config
files,
such as the Escape key which may be identified by either "Esc" or
"Escape", or
the number-pad keys which may be identified with a name in the form
"Num{xxx}"
(e.g. "NumMinus") or the alternate "Keypad {x}" (e.g. "Keypad -").

The alternate names were not being picked up and formatted correctly
when
displayed in tooltips. Now they are.


Accepted By: wraitii
Differential Revision: https://code.wildfiregames.com/D3358
This was SVN commit r24668.
2021-01-17 16:04:51 +00:00
549b6893ce Removes sky toggling by a hotkey.
Reported By: Langbart
This was SVN commit r24663.
2021-01-17 14:27:44 +00:00