EDuke32 Changelog Unofficial archive

Build 2225

28 December 2011 · 9 commits by 1 author · SVN

Builds by month 2 builds

  1. Jan

  2. Feb

  3. Mar

  4. Apr

  5. May

  6. Jun

  7. Jul

  8. Aug

  9. Sep

  10. Oct

  11. Nov

  12. Dec

Original log file · 20111228-2225.txt
------------------------------------------------------------------------
r2225 | helixhorned | 2011-12-28 12:36:01 -0800 (Wed, 28 Dec 2011) | 7 lines

Besides the performance issues, there's another reason why changing the palette
'frequently' isn't such a good idea.  Assume an actor constantly changes the
palette to some value and you're attacked by a newbeast at the same time. Then
the pain tinting would be reset each time the actor's code is run.  This commit
adds a new flag 16 to setbrightness(), meaning "don't reset the fade tinting".
Its only use right now is from CON's setgamepalette command (and there, always).
The change is done in the engine and thus affects all platforms.
------------------------------------------------------------------------
r2224 | helixhorned | 2011-12-28 12:35:44 -0800 (Wed, 28 Dec 2011) | 2 lines

Trivial tweaks of setbrightness. Add an assertion that bits 1 and 4 are clear,
mainly.  Also remove setvgapalette() from source.
------------------------------------------------------------------------
r2223 | helixhorned | 2011-12-28 12:35:23 -0800 (Wed, 28 Dec 2011) | 6 lines

The earlier changes introduced bugs when palettes were not set correctly in
certain situations (mostly cutscenes etc). This commit removes bit 1 from all
flags that make it to setbrightness, the meaning of which is "don't actually
update the palette". I have no idea what it was for and since the corresponding
P_SetGamePalette() calls were from places like the mentioned cutscenes, I don't
think it matters performance-wise.
------------------------------------------------------------------------
r2222 | helixhorned | 2011-12-28 12:34:57 -0800 (Wed, 28 Dec 2011) | 10 lines

SDL layer: don't call SDL_SetGammaRamp() if there would be no change.

This is in the similar vein as the set-palette deferring and it's this
that fixes the low FPS in the radioactively contaminated area in AMC TC:
Megabase (since setgamma() is called from setbrightness()).

Again, update issues might be expected, but changing focus between EDuke32
and the desktop and back seems to restore the gamma settings properly on
Kubuntu. Looks like X (or whatever above handles this stuff) maintains it
on a per-application basis.
------------------------------------------------------------------------
r2221 | helixhorned | 2011-12-28 12:34:41 -0800 (Wed, 28 Dec 2011) | 16 lines

SDL layer: in 8-bit mode, defer setting the palette until showing the next frame.

CON code sometimes uses 'setgamepalette' from withing actors, which is a bit too
frequent.  Deferring the actual palette updating means that multiple requests in
between two screen redraws are coalesced into one, which is desirable for
performance reasons and for the reduction of 'tearing' artefacts (but not
prevention, since the drawing isn't synced to the screen refresh rate with
vsync off).

(Did-not-)update issues might be introduced.

Windows isn't touched because
 - I expect it to be more brittle, especially in light of the ATI HW gamma
   problems.
 - I haven't tested whether the particular performance penalty that lead to this
   change ('gas' in AMC TC) exists there too
------------------------------------------------------------------------
r2220 | helixhorned | 2011-12-28 12:34:26 -0800 (Wed, 28 Dec 2011) | 1 line

screenshots: remove the old inversion and PCX code from the source
------------------------------------------------------------------------
r2219 | helixhorned | 2011-12-28 12:34:10 -0800 (Wed, 28 Dec 2011) | 4 lines

screenshots: if compiled with USE_LIBPNG, always use PNG, even for
color-inversed shots. For both PNG and TGA, change the way they're
done in 8-bit mode: instead of XORing every byte with 15, save the
inverse palette (each component taken 255-x).
------------------------------------------------------------------------
r2218 | helixhorned | 2011-12-28 12:33:54 -0800 (Wed, 28 Dec 2011) | 1 line

savegame.c: fix compilation warnings with release build, add timing for debug
------------------------------------------------------------------------
r2217 | helixhorned | 2011-12-28 12:33:40 -0800 (Wed, 28 Dec 2011) | 2 lines

Factor out two nearly identical pieces of code in game.c and gameexec.c
into G_HandleMirror().
------------------------------------------------------------------------
r2216 | helixhorned | 2011-12-27 06:22:45 -0800 (Tue, 27 Dec 2011) | 3 lines

engine: make smoststart[] (which saves starting "smostcnt"s) an array of int32's
instead of shorts. This fixes their values' overflow in AMC TC megabase and
probably a couple of other large maps.
------------------------------------------------------------------------
EngineCON

Besides the performance issues, there's another reason why changing the palette

Philipp Kutin (Helixhorned) 28 Dec 2011, 12:36 UTC−8 r2225

'frequently' isn't such a good idea. Assume an actor constantly changes the palette to some value and you're attacked by a newbeast at the same time. Then the pain tinting would be reset each time the actor's code is run. This commit adds a new flag 16 to setbrightness(), meaning "don't reset the fade tinting". Its only use right now is from CON's setgamepalette command (and there, always). The change is done in the engine and thus affects all platforms.

Trivial tweaks of setbrightness. Add an assertion that bits 1 and 4 are clear,

Philipp Kutin (Helixhorned) 28 Dec 2011, 12:35 UTC−8 r2224

mainly. Also remove setvgapalette() from source.

Fix

The earlier changes introduced bugs when palettes were not set correctly in

Philipp Kutin (Helixhorned) 28 Dec 2011, 12:35 UTC−8 r2223

certain situations (mostly cutscenes etc). This commit removes bit 1 from all flags that make it to setbrightness, the meaning of which is "don't actually update the palette". I have no idea what it was for and since the corresponding P_SetGamePalette() calls were from places like the mentioned cutscenes, I don't think it matters performance-wise.

Fix

SDL layer: don't call SDL_SetGammaRamp() if there would be no change.

Philipp Kutin (Helixhorned) 28 Dec 2011, 12:34 UTC−8 r2222

This is in the similar vein as the set-palette deferring and it's this that fixes the low FPS in the radioactively contaminated area in AMC TC: Megabase (since setgamma() is called from setbrightness()). Again, update issues might be expected, but changing focus between EDuke32 and the desktop and back seems to restore the gamma settings properly on Kubuntu. Looks like X (or whatever above handles this stuff) maintains it on a per-application basis.

CON

SDL layer: in 8-bit mode, defer setting the palette until showing the next frame.

Philipp Kutin (Helixhorned) 28 Dec 2011, 12:34 UTC−8 r2221

CON code sometimes uses 'setgamepalette' from withing actors, which is a bit too frequent. Deferring the actual palette updating means that multiple requests in between two screen redraws are coalesced into one, which is desirable for performance reasons and for the reduction of 'tearing' artefacts (but not prevention, since the drawing isn't synced to the screen refresh rate with vsync off). (Did-not-)update issues might be introduced. Windows isn't touched because - I expect it to be more brittle, especially in light of the ATI HW gamma problems. - I haven't tested whether the particular performance penalty that lead to this change ('gas' in AMC TC) exists there too

if compiled with USE_LIBPNG, always use PNG, even for

Philipp Kutin (Helixhorned) 28 Dec 2011, 12:34 UTC−8 r2219

color-inversed shots. For both PNG and TGA, change the way they're done in 8-bit mode: instead of XORing every byte with 15, save the inverse palette (each component taken 255-x).

Engine FixEngine
Already listed in build 2216

make smoststart[] (which saves starting "smostcnt"s) an array of int32's

Philipp Kutin (Helixhorned) 27 Dec 2011, 06:22 UTC−8 r2216

instead of shorts. This fixes their values' overflow in AMC TC megabase and probably a couple of other large maps.