shithub: cstory

Download patch

ref: 989013168ccf0f9a1732a741cf8a6de0f4f2fd2a
parent: a3fd87e581ecc7304fa681575c9a2f551bf42d7f
author: Clownacy <Clownacy@users.noreply.github.com>
date: Fri Nov 15 16:00:29 EST 2019

Clean-up Draw.cpp

--- a/src/Draw.cpp
+++ b/src/Draw.cpp
@@ -178,8 +178,10 @@
 
 void EndDirectDraw(HWND hWnd)
 {
+	int i;
+
 	// Release all surfaces
-	for (int i = 0; i < SURFACE_ID_MAX; ++i)
+	for (i = 0; i < SURFACE_ID_MAX; ++i)
 	{
 		if (surf[i] != NULL)
 		{
@@ -749,6 +751,7 @@
 
 int RestoreSurfaces(void)	// Guessed function name - this doesn't exist in the Linux port
 {
+	int s;
 	RECT rect;
 	int surfaces_regenerated = 0;
 
@@ -772,7 +775,7 @@
 		DummiedOutLogFunction(0x62);
 	}
 
-	for (int s = 0; s < SURFACE_ID_MAX; ++s )
+	for (s = 0; s < SURFACE_ID_MAX; ++s)
 	{
 		if (surf[s] != NULL)
 		{