shithub: cstory

Download patch

ref: 4e0a168533df5f36a9e255a0702ae204d69a3bc7
parent: 05fb5cf106ad47df77e56ae3660ac4275810d54c
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sat Mar 14 08:55:22 EDT 2020

Move the MSVC6 hacks to WindowsWrapper.h

Now the wrapper has a purpose again, and it keeps things neat.

--- a/src/Main.cpp
+++ b/src/Main.cpp
@@ -22,23 +22,6 @@
 #include "Sound.h"
 #include "Triangle.h"
 
-// Visual Studio 6 is missing these, so define them here just in case
-#ifndef VK_OEM_PLUS
-#define VK_OEM_PLUS 0xBB
-#endif
-
-#ifndef VK_OEM_COMMA
-#define VK_OEM_COMMA 0xBC
-#endif
-
-#ifndef VK_OEM_PERIOD
-#define VK_OEM_PERIOD 0xBE
-#endif
-
-#ifndef VK_OEM_2
-#define VK_OEM_2 0xBF
-#endif
-
 LRESULT __stdcall WindowProcedure(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
 
 char gModulePath[MAX_PATH];
--- a/src/Organya.cpp
+++ b/src/Organya.cpp
@@ -22,13 +22,6 @@
 
 #include "Sound.h"
 
-// Visual Studio 6 is missing this
-#ifdef _MSC_VER
-#ifndef DWORD_PTR
-#define DWORD_PTR DWORD
-#endif
-#endif
-
 #define PANDUMMY 0xFF
 #define VOLDUMMY 0xFF
 #define KEYDUMMY 0xFF
--- a/src/WindowsWrapper.h
+++ b/src/WindowsWrapper.h
@@ -1,3 +1,26 @@
 #pragma once
 
+// Visual Studio 6 is missing these, so define them here
+#ifdef _MSC_VER
+	#ifndef VK_OEM_PLUS
+	#define VK_OEM_PLUS 0xBB
+	#endif
+
+	#ifndef VK_OEM_COMMA
+	#define VK_OEM_COMMA 0xBC
+	#endif
+
+	#ifndef VK_OEM_PERIOD
+	#define VK_OEM_PERIOD 0xBE
+	#endif
+
+	#ifndef VK_OEM_2
+	#define VK_OEM_2 0xBF
+	#endif
+
+	#ifndef DWORD_PTR
+	#define DWORD_PTR DWORD
+	#endif
+#endif
+
 #include <windows.h>