ref: 536426e9e7d8bb653428e389e2051a5929dfb636
parent: b086a67e31667d8275fc799468dca77a20ba5281
author: LTCHIPS <ltchips994@gmail.com>
date: Tue May 15 13:48:13 EDT 2018
FadeOutScaledScreen now makes a new texture for every fade the loop does
--- a/rott/rt_game.c
+++ b/rott/rt_game.c
@@ -4674,7 +4674,7 @@
rng = RandomNumber ("Died",0);
- rng = 63;
+ //rng = 63;
//zooms in on screen
if (pstate->falling==true)
--- a/rott/rt_vid.c
+++ b/rott/rt_vid.c
@@ -920,9 +920,6 @@
WaitVBL ();
VL_GetPalette (&palette1[0][0]);
memcpy (palette2, palette1, 768);
-
-
- SDL_Texture * tex = GetMainSurfaceAsTexture();
//
// fade through intermediate frames
@@ -929,6 +926,7 @@
//
for (i = 0; i < steps; i++)
{
+
origptr = &palette1[start][0];
newptr = &palette2[start][0];
@@ -948,12 +946,15 @@
WaitVBL ();
VL_SetPalette (&palette2[0][0]);
- printf("%d \n", (int)((float)iGLOBAL_SCREENWIDTH*scale));
- printf("%d \n", (int)((float)iGLOBAL_SCREENHEIGHT*scale));
- printf("%f \n", scale);
+ //printf("%d \n", (int)((float)iGLOBAL_SCREENWIDTH*scale));
+ //printf("%d \n", (int)((float)iGLOBAL_SCREENHEIGHT*scale));
+ //printf("%f \n", scale);
+ SDL_Texture * tex = GetMainSurfaceAsTexture();
DoScreenRotateScale(iGLOBAL_SCREENWIDTH,iGLOBAL_SCREENHEIGHT, tex, 0, scale);
+
+ SDL_DestroyTexture(tex);
}
//
@@ -961,11 +962,9 @@
//
VL_FillPalette (red,green,blue);
-
-
screenfaded = true;
- SDL_DestroyTexture(tex);
+
}