Go to file
Kp ca804d5186 Clear canvas to fix missing exit tunnel movie
Global variable `grd_curcanv` is set to a variety of canvases, some of
which are local stack variables.  Use of global variables in this way is
fragile, but works as long as the global is not used beyond the life of
the backing local.

Unfortunately, some existing uses do access the canvas beyond the
lifetime of the backing local.  Playing movies sets the font of the
current canvas.  If the current canvas is an expired stack variable,
setting the font overwrites other stack data.  This data corruption
causes various symptoms, such as inability to play the escape tunnel
movie.

Prior to 03cca2b3dc, the corruption on
playing the endlevel movie had no user-visible effect.  That commit
created a large local variable, which changed stack layout.  Starting
with that commit, the corruption causes the movie to play as all black.

Fix this, and protect against some other data corruption possiblities,
by clearing the global when the local goes out of scope.

Reported-by: Havner <https://github.com/dxx-rebirth/dxx-rebirth/issues/345> (only as cutscene failure to play, not as the underlying corruption issue)
2017-11-05 20:49:08 +00:00
common Simplify calls to gr_set_default_canvas 2017-11-05 20:49:08 +00:00
contrib Add Gentoo ebuilds for beta 2017-04-08 16:48:19 +00:00
d1x-rebirth Merge branch 'psyke83/rpi' into master 2017-10-26 02:02:50 +00:00
d2x-rebirth Simplify calls to gr_set_default_canvas 2017-11-05 20:49:08 +00:00
Documentation Require support for reference qualified methods 2016-12-10 17:51:07 +00:00
similar Clear canvas to fix missing exit tunnel movie 2017-11-05 20:49:08 +00:00
.gitattributes Add experimental Windows manifest 2017-08-02 02:49:12 +00:00
.gitignore
COPYING.txt
GPL-3.txt Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
INSTALL.markdown Fix Ubuntu package name in INSTALL.markdown 2016-12-23 02:56:55 +00:00
SConstruct Move various SDL-only texture mapping functions to !DXX_USE_OGL 2017-11-01 02:01:21 +00:00