70 Commits
Author SHA1 Message Date
Goober5000 e2707549f4 add documentation for issue 4148
Per Claude:

The key things the new comments add that the old ones were missing:

1. Palette RGB colors are completely ignored — only the index value is used as alpha. This is the non-obvious invariant that @notimaginative described.
2. Exact mapping table — makes the * 18 / * 17 math immediately readable, and clarifies the ANI vs PCX difference (> 15 clamps to opaque in ANI but transparent in PCX).
3. The broken-palette consequence — explicitly states that a reversed palette causes a white square, linking to #4148 so future readers understand the context.
2026-04-30 00:35:19 -04:00
Taylor Richards 552f9990d9 remove support for memory mapped files (#6748)
FSO doesn't appear to use this any longer. And even when it was enabled the
requirements made it largely useless anyway. Removing to clean up cfile a
bit and so we don't have to keep maintaining it.
2025-06-05 17:53:13 -04:00
John Fernandez 925e2e53f4 A few more int3's 2023-10-31 13:09:03 -04:00
Sébastien Noel f149c36b44 Fix a few typos (#5598) 2023-10-24 20:33:45 -04:00
Fabian Woltermann 0fcf7e0fbe Remove the screen signature (#5108) 2023-01-14 16:45:10 +01:00
David Gibson e86bbb0138 cleanup to the cleanup of filters
Moved more things to debug filters, and associated cleanup
2022-09-27 10:25:50 -05:00
bangstk 01f4fb3f15 Fix missing HUD gauge backgrounds
Code was moved around between 3.8.0 and 19.0.0 which broke the colored backgrounds of paletted HUD gauges.

Palette index 15 is used by the HUD gauge graphics to indicate background area of HUD gauges. When the code to remap palette indexes to alpha values was moved to packunpack.cpp, palette index 15 was mistakenly mapped to the alpha for index 0 (nothing) rather than index 1 (what retail/3.8.0 code maps it to) causing all HUD gauges to be missing their dark transparent backgrounds.

Also: the code maps palette indexes [0, 15] to alpha values [0, 255]. But due to an oversight (palette index 15 not being part of this gradient] alpha value 255 is never used so the range of alpha values for HUD gauges ended up being [0, 238]. Conversion math tweaked to make the alpha range [0, 252] which is very close to 255.
2020-10-19 03:31:01 -04:00
CasparKielwein ee73694cc8 remove unused functions on anim
Functionality related to pausing animations was not being used anymore.
2018-12-22 20:10:56 +01:00
asarium bd3632d1bf Enable remaining misc- checks and fix detected issues 2018-04-25 11:57:55 +02:00
asarium 72a797f732 Move 4 bit color conversion out of graphics code
Currently, the graphics code does some color remapping on 8
bit-per-pixel textures since those textures use special 4-bit pixel
values. These changes move that conversion out of the graphics code and
into the image loading/font bitmap creation code.

The reason this is needed is because this conversion breaks 8-bit
textures that try to use the full range of colors. I need to do exactly
that for moving the cutscene renderer to our generic rendering interface
which I can't do at the moment since the existing color conversion
corrupts the video data.

I have tested this with retail data and could not find any visual
changes after applying these changes.
2017-08-16 17:20:32 +02:00
MageKing17 0a19616bc9 Correct inconsistency in anim_load() regarding memory-mapped files.
In commit 735f5e199b randomtiger changed how anim_load() worked in seemingly-bizarre ways, for reasons unclear to me. In brief, a condition's logic was reversed, a three-value enum was created of which only one value was used, and as a result loose files passed to anim_load() (and only loose files) would be opened as "memory-mapped", one consequence of which is that they'd keep a cfile block open until the corresponding call to anim_free() (which means that, if a mission had enough different loose animations, the cfile block limit could be reached). Since files in packfiles behaved the same way they always had (namely, being loaded into memory and then closed, thereby not taking up a cfile block), apparently nobody noticed the difference, and this inconsistent code has stayed for the past 13-and-a-half years.

This commit changes the condition after the one changed in the older commit so that they both match, then changes the enum so that the seemingly-meaningless third value is removed, and the other two values are swapped (and the default value of the file_mapped parameter to anim_load() changed) so that the original Volition behavior is restored.
2017-07-09 02:39:40 -07:00
Fabian Woltermann e52f23d45d Adds a small sanity check after reading an ani header 2017-05-04 19:18:06 +02:00
asarium f819db3ac5 More string const correctness fixes 2017-01-04 00:12:41 +01:00
asarium 6922d3ca2c Integrate the existing monitor system into the new tracing system
This writes the monitor updates as counter events into the event trace
file.
2016-12-21 16:10:01 +01:00
SamuelCho a481999a24 OpenGL Core support. Introduction of material based draw system. Rewrote geometry batcher. 2016-08-17 00:13:19 -07: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
Echelon9 312648668c Fix: anim/animplay.cpp:257:25: warning: variable ‘render_time’ set but not used [-Wunused-but-set-variable] 2015-07-04 23:20:18 +10:00
Echelon9 f4aa493f59 Fix: anim/animplay.cpp:257:25: warning: variable ‘decompress_time’ set but not used [-Wunused-but-set-variable] 2015-07-04 23:16:08 +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
Echelon9 aa4b76d990 Fix cppcheck (style) Consecutive return, break, continue, goto or throw statements are unnecessary.
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11014 387891d4-d844-0410-90c0-e4c51a9137d3
2014-08-23 13:05:05 +10:00
niffiwan 027f218f7f Allow any resolution for mainhalls (From Yarn)
Also includes support for more than two mainhall resolutions, zooming
so one mainhall can adapt to multiple resolutions, setting new mainhall
fonts, help overlays for all resolutions and adjustable tooltip padding.
Also allows preload screens to be any resolution & aspect ratio.

git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10844 387891d4-d844-0410-90c0-e4c51a9137d3
2014-07-05 10:38:07 +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
The_E a71b5f4247 PVS Studio fix: Add checks against NULL pointer dereferences 2012-11-03 09:23:23 +00:00
niffiwan 3eb66f7bae save a tiny amount of RAM when creating BMP_AABITMAP bitmaps 2012-05-20 06:15:23 +00:00
The_E 6157334fe8 MSVC Analyze warning fix: Incorrect type passed as parameter in call to function printf() 2012-04-03 19:44:39 +00:00
Echelon9 0615fe46f6 Mantis 2537: Help track down a memory leak problem 2011-11-09 14:01:06 +00:00
Echelon9 684b59e500 Fix Mantis 2526: Valgrind: Conditional jump or move depends on uninitialized value(s) - init_anim_instance() 2011-10-20 20:25:39 +00:00
Echelon9 dece779168 PVS-Studio fix (courtesy of niffiwan): V512 A call of the 'memcpy' function will lead to underflow of the buffer '& bit_24'. 2011-09-07 12:00:21 +00:00
The_E b15d864aac PVS Studio fix: V541 It is dangerous to print the string 'ani_name' into itself. 2011-08-30 17:23:01 +00:00
Echelon9 ea27c04867 Documentation: Resolve a Doxygen warning on the unpack_frame() and unpack_frame_from_file() functions 2011-07-23 04:38:16 +00:00
Echelon9 e1fa804c1c Documentation: Animation code function documentation 2011-05-12 13:43:00 +00:00
Zacam 09fad95070 Antipodes 7 Merge: HUD Overhaul, by Swifty. 2010-12-12 20:34:15 +00:00
The_E a5cd35a1b9 Ooops. 2010-09-03 22:51:42 +00:00
The_E 5249397161 More dead code be gone. 2010-09-03 22:41:08 +00:00
portej05 98f337f701 safe_strings - from Antipodes build #1 2009-07-27 16:06:24 +00:00
portej05 719825f80d The big CVS comment removal. This chops approx. 3.5mb off a full checkout.
I've tested this through compiling and through hand checking. 
Normalises line endings in ALL files to \n.
2009-06-20 08:08:20 +00:00
Goober5000 6e4021888d add apostrophes to contractions, lol 2009-04-10 07:49:12 +00:00
taylor 8d84d5c128 make sure that we always respect path restrictions on graphics file loads (prevents stupid load order bug) 2008-02-22 02:50:04 +00:00
taylor 1bff85ac82 Valgrind was endlessly complaining about this 2007-10-28 16:32:06 +00:00
taylor 806027e4e8 various small compiler warning and strict compiling fixes 2006-09-11 01:00:28 +00:00
taylor f09c7e2d03 fix things that strict compiling balked at (from compiling with -ansi and -pedantic) 2006-09-08 06:14:44 +00:00
taylor fc765d5e29 fix various things that Valgrind has been complaining about 2006-06-22 14:59:45 +00:00
taylor f08d2f8043 some minor cleanup 2006-03-21 00:27:27 +00:00
wmcoolmon 6912e6cc96 0...1...2...4? 2006-01-22 19:57:35 +00:00
taylor a540ad1093 add support for 8/16/24/32 bit output from ani frame decoder 2005-11-13 06:40:19 +00:00
taylor 870804583d remove Cmdline_cache_ani support, it only worked if not in a VP and only on streaming ani so it was pretty much useless 2005-11-13 06:39:38 +00:00
Goober5000 12c90e780d remove PreProcDefine #includes in FS2
--Goober5000
2005-07-13 02:50:53 +00:00
taylor 478d504f09 fix ani corruption detection so that certain streaming anis don't hit it (check was wrong anyway) 2005-05-28 19:40:59 +00:00
taylor 3b84c4512b extra check to make sure that RLE reading never goes over frame size in new ANI formats 2005-05-24 03:13:36 +00:00
taylor 481dcf346b quick catch for some corrupted anis, only a partial fix but it will do until something
a bit more heavy duty comes along in the near future
2005-05-23 05:58:31 +00:00