Goober5000
9359362ea6
make clang happy
2020-06-30 14:23:18 -04:00
Goober5000
65cdb0232d
fix HUD message offset for messages that come from [none]
...
Tracked down another Volition bug, first reported by recead. When messages do not have the ": " substring (which only happens when they are from MSG_SOURCE_NONE), they would calculate the wrong string size. This is because the two-character offset was added to the pointer *before* the pointer was checked for null, and so non-matches were considered matches with strings beginning at memory offset 2.
2020-06-30 13:13:48 -04:00
asarium
1c12349990
Add extended scripting hook system
...
This moves towards defining the hooks in the code module that executes
them. Also provides the API necessary for better documentation of hooks.
This only covers a few hooks as a test and demonstration of the new API.
If no issues are found with this it can be extended in the future.
2020-04-13 14:45:19 +02:00
CasparKielwein
0692286bba
Remove dead code in hud directory.
...
Removed a lot of unused functions.
This is mostly a cleanup of a prior refactoring.
There where a lot of unimplemented functions remaining from renaming.
Removed several outcommented parts of code.
2018-12-26 20:40:20 +01:00
asarium
8dba6770ae
Convert ade argument setting to variadic templates
...
Same as with argument getting, this preserves the type information and
makes the system generally much safer.
2018-09-26 19:15:42 +02:00
asarium
c13cb44df4
Add ship display name feature
...
This adds a mission file option for ships which allows specifying a
different string which should be used for displaying the name of the
ship to the user. This name will not be used in SEXPs or other ship
lookup functions so it can be freely translated and two ships can also
have the same display name.
The new feature can be used by adding $Display name: <string> after $Name
for a ship in a mission file. I think I added proper support for FRED
(and qtFRED) so that this new value is properly saved but it would be
great if someone could test that.
This implements one of the features requested in #1730 .
2018-07-22 23:16:00 +02:00
asarium
eeed22b91a
Enable misc-unused-parameters
...
clang-tidy was used for fixing the warnings. It is not clear if this is
actually an improvement so this may still be disabled later.
2018-04-25 11:57:55 +02:00
asarium
0b4ca71eba
Enable modernize-deprecated-headers
2018-04-25 11:12:41 +02:00
asarium
8f06e338a4
Add typesafe handle types and use it in game sound system
...
This adds a new class which allows to create type safe resource handle
types. At the moment, the engine uses ints pretty much everywhere for
providing handles to resources created by the specific subsystems. Since
all ints are the same to the C/C++ typesystem it is perfectly legal to
pass a sound handle to the graphics API as a buffer handle which will
obviously cause issues.
This adds a new type called "ID" which is a wrapper class for a generic
handle but with added type safety. An instance of this class cannot be
passed to a function expecting another type of handle which provided
compile-time type safety for these APIs.
As an initial test I converted the game sound handles to this new type.
I already found a bug in the mainhall system thanks to this new type.
The mainhall used the game sound handles as sound instance handles which
probably meant that that specific code never really worked right. I
removed the code since there was no better alternative for fixing it.
2018-04-22 16:22:45 +02:00
asarium
9a8bfc0217
More const correctness
2017-01-02 13:17:59 +01:00
asarium
6dbf200cc3
Move lua to scripting folder
2016-10-03 21:38:29 +02:00
niffiwan
2e59f68e22
Fix Coverity 1363382
...
Init center_text in ctor, safety/defensive measure only since is
currently correctly set via init function in all code paths
2016-10-03 09:35:28 +10:00
Yarn366
ac0aae23fa
Fixed the position of the Fixed Messages gauge so that it's actually on the screen. (Its X-position was 0x8000, which used to be a magic number indicating that the string should be horizontally centered on the screen. Since the TrueType merge, this number no longer has any special meaning.)
...
Also added the "Center Text On Gauge X-Position:" option for the Fixed Messages gauge, which by default is enabled only if the gauge's position is not overridden.
2016-09-10 21:17:50 -04:00
m!m
22c0255277
Fix a bunch of 64-bit MSVC warnings ( #709 )
...
* Fix a bunch of 64-bit warnings
* Fix Linux compilation error
* Fix Mac error
* Fix some issues
* Fix more GCC warnings
* Remote unwanted change
* Remove accidentally readded file
* Fix wrong limit check
* Use BEAM_INDEX macro for getting beam object index
* Fix 32-bit warning
* Use BEAM_INDEX instead of pointer arithmetic
2016-08-09 11:08:54 -07:00
asarium
bbeaaa1565
Add a new particle effect system
...
This is similar to the script I wrote a few years ago but unlike that
one, this solution doesn't kill the performance.
2016-08-04 11:08:39 +02:00
asarium
1bcd5400d3
Move build system to CMake
2016-07-22 12:07:19 +02:00
Yarn366
c3c7477114
Made head animations scale to the size of the gauge window. Also deprecated "Animation Background Size" parameter and added the more accurately named "Animation Size" parameter, which sets how large animations should be.
2015-10-29 14:35:08 -04:00
niffiwan
0132e2a320
Fix comment for HudGaugeTalkingHead::render
2015-09-19 18:55:30 +10:00
Goober5000
bd3cd7eb18
Merge pull request #195 from Echelon9/fix/sort-uniq-includes
...
Review and refactor #include's
2015-08-19 00:05:02 -04:00
asarium
6b95037dcc
Fix usage of invalid iterator.
2015-06-25 18:22:51 +02:00
Echelon9
47af1ff851
Simplify duplicative hud/ includes.
2015-06-22 20:24:30 +10:00
Echelon9
c5493bb480
Scripted sort and uniq on (internal) project includes. Improves search time and as a by product removed a number of duplicative includes.
2015-06-22 20:24:30 +10:00
m_m
70d735ceb4
Added "On HUD Message Received" scripting hook which is invoked when the HUD receives message text to display.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11242 387891d4-d844-0410-90c0-e4c51a9137d3
2015-02-09 17:22:03 +10:00
Goober5000
4f06fd2435
additional string safety
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11140 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-15 18:22:57 +10:00
Goober5000
e9f5c531e0
heh... Microsoft's implementation of snprintf doesn't conform to the standard!
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11139 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-15 06:23:18 +10:00
Goober5000
65265f8ab8
fix a compile error (d'oh) and use type safety
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11134 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-13 18:23:37 +10:00
Goober5000
aee1305841
according to the C standard... "The functions snprintf() and vsnprintf() write at most size bytes (including the trailing null byte ('\0')) to str." ...so we have that going for us, which is nice
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11132 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-13 18:23:33 +10:00
Goober5000
b8a05e30a0
xt: sprintf length safety
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11123 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-12 18:22:14 +10:00
The_E
6e91857745
From Yarn: Fixes interface graphics scaling issues. If, for some reason, you want to have the interface graphics stretched, use the -stretch_menu commandline flag.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10544 387891d4-d844-0410-90c0-e4c51a9137d3
2014-03-30 12:39:54 +10:00
asarium
31d6ca5a0e
Fix a crash with invalid iterators
2014-03-16 22:32:10 +01:00
Goober5000
886018d28f
here a const, there a const, everywhere a const const
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9801 387891d4-d844-0410-90c0-e4c51a9137d3
2013-09-20 19:46:41 +10:00
Valathil
e039a4954e
Fix for Mantis 2207: Use Missiontime for F4 Logscreen entries and fix the calculation.
2012-11-20 23:42:12 +00:00
m_m
947263a047
Let's try this again, hopefully this time without reverting previous changes. See r9215 for a better description.
2012-09-24 16:17:26 +00:00
The_E
1f8dcf5494
Reverting 9215, because it conflicts massively with my fixes for hud_gauges. m|m, did you update your checkout before committing your stuff?
2012-09-22 21:41:23 +00:00
m_m
1faee4f711
Added weapon specific HUD tracking and lock-on sounds and in-flight sounds.
...
New options are $TrackingSnd, $LockedSnd, $InFlightSnd and +Inflight sound type.
2012-09-20 13:05:09 +00:00
zookeeper
7a50e19311
Turned $Comms Menu Hides Messages from a global HUD flag to a +Messages gauge flag.
2012-08-15 19:18:25 +00:00
zookeeper
ea81983597
Added a hud_gauges.tbl boolean flag to allow one to override the default behaviour of messages not being displayed while the comms menu is open.
2012-08-15 14:27:12 +00:00
Valathil
48e0517e0d
Allow generic_anim's to reuse bmpman and texture_cache slots and implement eff streaming. Changed talking heads to use generic_anim. Fixes Mantis 2417
2012-08-14 23:48:23 +00:00
niffiwan
381d50c74c
Documentation for head-ani's && messages
2012-05-20 10:07:21 +00:00
niffiwan
c634b65d24
GCC: remove trivial warning: multi-line comment [-Wcomment]
2012-05-20 06:31:09 +00:00
niffiwan
7dc94578b5
Fix for mantis 2411: allow repeated messages to play head anis
2012-05-20 05:41:53 +00:00
The_E
b006d8de1a
Since we can't change the default cutscene camera behaviour (switching off the HUD when cutscene camera is active), this introduces a mod.tbl setting to alter this behaviour.
...
The new setting is called "$Cutscene camera disables HUD:", is a boolean, and defaults to true.
2012-05-11 07:57:01 +00:00
Swifty
bebf5e8fbf
Added hud-clear-messages. Clears active messages currently displayed.
2012-03-14 05:25:07 +00:00
Swifty
dd1c4a436c
Fixed Mantis 2413. hud-set-color changes to the HUD will no longer reset when pausing or entering options menu. Introduced Color entry fields for hud_gauges.tbl.
2012-02-06 10:01:01 +00:00
Swifty
3affb86b52
Removed configOverride from HudGauge class since we don't even use it.
2012-02-05 03:41:31 +00:00
Valathil
86dcd45e50
Fix for #2570 : Changed the external camera messages to be IFF color and internal messages back to green
2012-01-15 03:11:12 +00:00
Swifty
e329d4542f
Fixed Mantis 2502. Messages gauge will no longer calculate string sizes using the incorrect font.
2011-09-23 09:14:02 +00:00
Swifty
a7383cba89
Introduced the preprocess() method in HudGauges. Allowed the HUD to peek at the HUD message buffer when HUD is disabled.
2011-06-25 09:30:47 +00:00
The_E
503fa0d19b
Fixes issue with padlock view messages not appearing
2011-06-19 12:57:26 +00:00
Goober5000
c6b4fc32d3
fix sanity check for too-long messages (Mantis #2412 )
2011-05-30 06:47:27 +00:00