From 989013168ccf0f9a1732a741cf8a6de0f4f2fd2a Mon Sep 17 00:00:00 2001 From: Clownacy Date: Fri, 15 Nov 2019 21:00:29 +0000 Subject: [PATCH] Clean-up Draw.cpp --- src/Draw.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Draw.cpp b/src/Draw.cpp index 924a44d7..a638c0b1 100644 --- a/src/Draw.cpp +++ b/src/Draw.cpp @@ -178,8 +178,10 @@ BOOL StartDirectDraw(HWND hWnd, int lMagnification, int lColourDepth) 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 @@ BOOL DummiedOutLogFunction(int unknown) 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 @@ int RestoreSurfaces(void) // Guessed function name - this doesn't exist in the L DummiedOutLogFunction(0x62); } - for (int s = 0; s < SURFACE_ID_MAX; ++s ) + for (s = 0; s < SURFACE_ID_MAX; ++s) { if (surf[s] != NULL) {