shithub: cstory

Download patch

ref: 5754da507d148841c0173a483c2e03c4a7e703e9
parent: 88ed2d6eabd4067037f9cd36fed7557f9b82a448
author: Clownacy <[email protected]>
date: Thu Feb 21 15:23:24 EST 2019

Made gFade static

We don't need to leak all this

--- a/src/Fade.cpp
+++ b/src/Fade.cpp
@@ -2,12 +2,26 @@
 
 #include <string.h>
 
+#include "CommonDefines.h"
 #include "WindowsWrapper.h"
 
 #include "Draw.h"
 #include "Game.h"
 
-FADE gFade;
+#define FADE_WIDTH	(((WINDOW_WIDTH - 1) / 16) + 1)
+#define FADE_HEIGHT	(((WINDOW_HEIGHT - 1) / 16) + 1)
+
+struct FADE
+{
+	int mode;
+	BOOL bMask;
+	int count;
+	char ani_no[FADE_HEIGHT][FADE_WIDTH];
+	BOOLEAN flag[FADE_HEIGHT][FADE_WIDTH];
+	char dir;
+};
+
+static FADE gFade;
 static unsigned long mask_color;
 
 void InitFade()
--- a/src/Fade.h
+++ b/src/Fade.h
@@ -1,20 +1,6 @@
 #pragma once
 
-#include "CommonDefines.h"
 #include "WindowsWrapper.h"
-
-#define FADE_WIDTH	(((WINDOW_WIDTH - 1) >> 4) + 1)
-#define FADE_HEIGHT	(((WINDOW_HEIGHT - 1) >> 4) + 1)
-
-struct FADE
-{
-	int mode;
-	BOOL bMask;
-	int count;
-	char ani_no[FADE_HEIGHT][FADE_WIDTH];
-	BOOLEAN flag[FADE_HEIGHT][FADE_WIDTH];
-	char dir;
-};
 
 void InitFade();
 void SetFadeMask();