242 Commits
Author SHA1 Message Date
BMagnu fcf9f569af safety checks for unused hud gauges (#7800) 2026-09-24 03:12:38 +00:00
BMagnu 95f63218d8 Also set custom gauges + dradis radar to slew (#7769) 2026-09-06 14:39:07 +00:00
Goober5000andClaude Opus 4.6 3f85d6172a use std::move() for local variables that are copied but not reused (#7308)
* use std::move() for local variables that are copied but not reused

Addresses ~140 Coverity "Variable copied when it could be moved"
defects across 74 files.  Every std::move() targets a local variable
whose value is consumed by push_back, emplace, assignment, lambda
capture, or a function call and is never read again afterward.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* clang: use std::make_shared

* clang: use std::make_unique

* address feedback

---------

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
2026-05-07 14:40:38 +09:00
Mike Nelson 405de8d0f3 Allow setting custom gauges as message gauges (#7217) 2026-02-23 09:53:34 -05:00
Goober5000 8a8d7222f2 fix required_string_either bug
`optional_string_either` advances the parser by default, but `required_string_either` does not advance the parser by default.  So be sure to advance the parser here.

Followup to #7069.
2025-10-03 12:42:38 -04:00
Goober5000 afcb4871a3 upgrade stuff_int_list with enum class types
For type safety, use enum class rather than int.

Also make a few miscellaneous tweaks such as adding a new casting macro and making detail level settings a bit cleaner.
2025-10-01 21:47:01 -04:00
Goober5000 3d8174d0d8 color/colour updates
Add Colour as a recognized parsing option in several more places where Color is used
2025-09-29 02:05:49 -04:00
Mike Nelson 1977c083c7 Allow defining separate player and target shield icons for config (#6691)
* Allow defining separate player and target shield icons for config

* rename define to prevent confusion with a similar define in shield.cpp

* address some feedback
2025-05-02 07:58:25 -04:00
Mike Nelson 524d36332d per-hud config weapons and shield gauge ship (#6651) 2025-04-17 08:31:48 -04:00
wookieejedi df445fa8a6 Wingmen and Squad Message QoL Updates (#6682)
* Wingmen and Squad Message QoL Updates

This PR adds a few assorted HUD updates/quality of life enhancements. FotG will be using these, though they relatively general and are likely useful to most other mods, too.

1) Adds a 'Ship Name Max Width:' to the Squad Message Gauge (following the same logic as the Escort Gauge). The Escort Gauge will truncate display names of ships if they are too long, that way all the text fits in the gauge without spilling over. It would also be very useful to do this with the Squad Message Gauge, as long display names can overflow out of the gauge's boundaries currently.

2) Adds `Wingname Align Mode:` to the Wingmen Gauge, which allows modders to set how the wingnames are aligned. Currently they are centered on the calculated x-position, though this PR also adds right and left justification options (which is useful especially if displaying the full wing names).

All options are tested and work as expected.

* appease clang

* whitespace

* more safety and error checking

* and extra error helpfulness

* use safer str copy
2025-04-16 22:47:14 -04:00
Mike Nelson 1a503faa6b Better color preset handling (#6655) 2025-04-06 11:09:43 -04:00
Mike Nelson 60777154be Hud config upgrades (#6581)
* base working version

* localization and minor tweaks

* add retail UI controls

* Add way to hide gauges from Config view

* convert hud config from index matching to id matching

* clang
2025-03-22 22:47:38 -04:00
Mike Nelson 7a5f4b1d80 HUD Config Rendering Methods PR 6/7 (#6578)
* config rendering methods for wingman status and training msg gauges

* table define example wing names
2025-03-03 21:56:57 -05:00
Mike Nelson acc382d169 config rendering method for messages, talking heads, and shield gauges (#6575) 2025-03-02 08:02:09 -05:00
Mike Nelson 8afb41a368 allow scripted gauges to be off by default (#6562) 2025-02-02 11:05:35 +01:00
Goober5000 d31c33ac29 allow $Distance Unit Multiplier: as a synonym for $Length Unit Multiplier: 2024-11-25 21:12:09 -05:00
Goober5000 e90416e199 Several coverity fixes (#6232)
* coverity - using `std::move` instead of copying, and change some parameters from value to reference

* coverity - fix or mark potential copy-paste mistakes

* coverity - various checking of parameter and return values

* coverity - miscellaneous fixes, and change some 'intentional' markers to 'false positive' markers
2024-07-06 12:51:31 +02:00
Mike Nelson 6a4774dcc4 Change warning print 2024-07-02 17:06:28 -05:00
mjn-mixael a1aac15e5a Make $Name style gauge config its own thing 2024-06-10 12:54:39 -05:00
mjn-mixael 49e2d60551 Allow setting gauges in ships.tbl per ship 2024-06-10 12:08:55 -05:00
Asteroth 5cb0633314 fixes 2024-05-11 13:38:15 -04:00
Asteroth 49a1e8458f add in game options and adjustments 2024-05-11 12:19:14 -04:00
Asteroth 3df616e69d Merge remote-tracking branch 'upstream/master' into aim-cursor 2024-04-01 23:09:31 -04:00
Goober5000 9093af9b95 Merge pull request #5881 from Goober5000/hud_gauge_filename
add method for determining whether the HUD is hi-res
2024-02-26 12:19:37 -05:00
Goober5000 a80bc26bfc fix Blink Locked Animation: option
Due to a copy-paste error in #4581, this option was not set properly.
2024-02-01 02:08:56 -05:00
Goober5000 bf13ce54a8 add method for determining whether the HUD is hi-res
Check the filenames used to initialize HUD gauges and mark the gauge as hi-res if the filename starts with 2_.  Also add a script method to return this value.

Additionally, make accessor methods `const`.
2024-01-29 22:07:54 -05:00
Asteroth 46226a6cbe tweaks 2024-01-29 19:34:36 -05:00
Asteroth 84f97936aa Merge remote-tracking branch 'upstream/master' into aim-cursor 2024-01-13 00:53:37 -05:00
BMagnu c2ed03ca59 Merge branch 'master' into openxr 2023-12-02 11:42:55 +09:00
asarium 260f15624b Update PR build image and compilers
This advances the versions for Clang to 16 and GCC to 13 along with
fixing any warnings these new versions are detecting now.

The new image versions also include Vulkan so the additional workflow
step for installing that is not necessary anymore.
2023-11-26 12:23:57 +01:00
Mike Nelson bcae459b56 Add way to offset directive help text only (#5802)
* add way to offset directive help text only

* specify which offset
2023-11-15 07:50:21 -05:00
Birk Magnussen d1d64a0afb Autoslew HUD 2023-11-09 22:43:51 +01:00
Birk Magnussen 9a227de872 Add option to scale down HUD in OpenXR mode 2023-11-09 22:43:30 +01:00
Mike Nelson 7804f7fff5 add feature to always display the damage gauge (#5518) 2023-10-20 14:40:27 -04:00
Asteroth 8460218707 first draft 2023-09-20 12:20:38 -04:00
Goober5000 b265124459 add missing HUD gauges
Looks like the last time this list was updated was in commit 2cded90031, and other gauges have been added since then.  So let's update the list.
2023-03-05 01:36:09 -05:00
MjnMixael 7a5b840338 Allow setting an override wireframe color globally and add option to set target monitor style and wireframe color per gauge (#4786) 2022-10-19 21:51:35 +09:00
MjnMixael 307c770c58 Enable hud rearm timer in hud_gauges.tbl (#4777)
* Enable hud rearm timer in hud_gauges.tbl

* Comment
2022-10-18 22:21:51 +09:00
MjnMixael 0a6729b03d enable target info in hud_gauges.tbl (#4778)
* enable target info in hud_gauges.tbl

* Comment
2022-10-18 17:08:44 +09:00
MjnMixael 7ab80a0162 Toggle cockpit (#4772)
* proof of concept

* Account for shadows

* Option to tie individual HUD gauges to the cockpit option

* Do this in a more user-friendly way

* Address feedback
2022-10-13 19:42:00 +09:00
Goober5000 d1ba57bc23 fix cargo scan type parsing
Because of idiosyncrasies of `required_string_one_of`, use a different technique.
2022-09-20 14:16:04 -04:00
Goober5000 222a75f3e6 semi-deprecate dualscanlines, and put the default option in the 'else' block 2022-09-18 02:13:11 -04:00
Asteroth 5823c5f4b5 add disco scan lines 2022-09-18 01:41:14 -04:00
Goober5000 4c16c95b9b add -dualscanlines as a HUD config option
Allow different types of cargo scans, including the -dualscanline behavior, to be specified in the HUD gauges table.  Right now the options are "default" and "dualscanlines".
2022-09-18 00:50:28 -04:00
Goober5000 9c61b389d6 add missing hud_gauges.tbl options
These options for controlling the locking animation are toggled by `$Reticle Style:` but were otherwise not available to HUD gauges.
2022-08-21 22:10:45 -04:00
PhantomHoover c153fa8d26 Fix dangling pointer in hudparse.cpp (#4558) 2022-08-22 02:16:42 +09:00
Goober5000 8c7f9e5e9e don't prune HUD gauges by resolution in FRED
FRED needs to work with any HUD gauge in the table, so don't prune any based on resolution.  Fixes #4517.

This also improves checking for duplicate names in the FRED gauge list.
2022-07-30 17:31:48 -04:00
Goober5000 83bd293a3a add some script functions for HUD gauge data
These are useful for adapting scripts based on whether HUD gauges are scaled and whether they use different coordinates or fonts.
2022-04-24 16:39:10 -04:00
wookieejedi 870666dfa3 Add New Options to Wingmen Gauge (#3703)
* Add New Options to Wingmen Gauge

This PR adds two new options for modders to use in the HUD table for the wingmen gauge:
1) `Use Full Wing Names:` which draws the full wing name and does not alter the capitalization.
2) `Use Expanded Colors:` which use red, yellow, or green color to designate wingmen health (green 1.0 to > 2/3, yellow 2/3 to > 1/3, and red <= 1/3.

Also adds the bright red option to dead wingmen, which seems like it was missing before(?).

Tested and everything works as expected.

* correct string copy length

* fix out of scope case variable
2021-10-09 17:38:03 +09:00
Goober5000 6ce2a445fe retail -> builtin 2021-04-19 22:28:29 -04:00