shithub: candycrisis

Download patch

ref: d1e75dc244dde2e08dc4bc7f4d448863c83f37cf
parent: 8c92d67b5cca0acaee68803945af24633b140c9f
author: Iliyas Jorio <iliyas@jor.io>
date: Tue Jul 28 18:38:54 EDT 2020

Non-Windows compat

--- a/CandyCrisis.cpp
+++ b/CandyCrisis.cpp
@@ -6,6 +6,7 @@
 
 #define MAX_LOADSTRING 100
 
+#if 0
 // Global Variables:
 HINSTANCE hInst;                                // current instance
 WCHAR szTitle[MAX_LOADSTRING];                  // The title bar text
@@ -178,3 +179,4 @@
     }
     return (INT_PTR)FALSE;
 }
+#endif
--- a/CandyCrisis.h
+++ b/CandyCrisis.h
@@ -1,3 +1,3 @@
 #pragma once
 
-#include "resource.h"
+#include "Resource.h"
--- a/main.h
+++ b/main.h
@@ -6,7 +6,7 @@
 
 void Initialize( void );
 void RetrieveResources( void );
-__declspec(noreturn) void Error( const char* extra );
+void Error( const char* extra );
 void CenterRectOnScreen( MRect *rect, double locationX, double locationY );
 MBoolean AnyKeyIsPressed( void );
 void RefreshAll( void );
--- a/prefs.cpp
+++ b/prefs.cpp
@@ -20,9 +20,7 @@
 #if __APPLE__
     #define PREF_NAME(x)   @x
     typedef NSString*      PrefKeyName;
-#endif
-
-#if _WIN32
+#else
     #define PREF_NAME(x)   x
     typedef const char*    PrefKeyName;
 #endif
--- a/stdafx.h
+++ b/stdafx.h
@@ -4,6 +4,10 @@
 
 #pragma once
 
+#include <SDL2/SDL.h>
+#include <SDL2/SDL_endian.h>
+#include <SDL_image.h>
+
 #if _WIN32
 
 #define _CRT_SECURE_NO_WARNINGS 1