From b9ed3dabcb67c1d212029721e5c017f3da493379 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue, 28 Jan 2014 22:43:44 +0100
Subject: Use the right compiler.


diff --git a/build/linux/Makefile b/build/linux/Makefile
index df4bb3d..3ccca0c 100644
--- a/build/linux/Makefile
+++ b/build/linux/Makefile
@@ -56,7 +56,7 @@ OBJS = \
 	$(SRC)/Symbol.o			$(SRC)/TheGooniesApp.o \
 	$(SRC)/TheGoonies.o		$(SRC)/Vector.o
 
-CC = gcc
+CC = g++
 CFLAGS = -g3 -O3 -Wno-write-strings `sdl-config --cflags` -I/usr/X11R6/include
 LDFLAGS = `sdl-config --libs` -L/usr/X11R6/lib/ -lSDL_image -lSDL_mixer -lGL -lGLU
 RM = rm -f
-- 
2.21.0


From 14feef24fb6f2a79d3664441421681646df2adb4 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Sat, 23 Jan 2016 13:22:49 +0300
Subject: main directory fix


diff --git a/src/main.cpp b/src/main.cpp
index fb8fa0a..9e8a7c0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -8,6 +8,8 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
+#include <libgen.h>
 #include "math.h"
 #include "string.h"
 #include "time.h"
@@ -233,7 +235,7 @@ int main(int argc, char** argv) {
 
     TheGooniesApp *game;
     KEYBOARDSTATE *k;
-
+	chdir(dirname(argv[0]));
     // hmm... apparently we didn't seed earlier... weird...
     srand(time(0));
 
-- 
2.21.0


From 1c49ac54587c4e3faf4096b1d59e348d8e869bce Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Fri, 19 Jul 2019 13:48:16 +0200
Subject: Fix build


diff --git a/src/auxiliar.cpp b/src/auxiliar.cpp
index ceab4de..c40d409 100644
--- a/src/auxiliar.cpp
+++ b/src/auxiliar.cpp
@@ -16,6 +16,11 @@
 #include "math.h"
 #include "string.h"
 
+#ifdef __HAIKU__
+typedef int boolean;
+#define HAVE_BOOLEAN
+#endif
+
 #include "SDL.h"
 #include "SDL_image.h"
 
@@ -94,7 +99,7 @@ SDL_Surface *load_maskedimage(char *imagefile, char *maskfile, char *path)
 
     if (tmp == 0 ||
             mask == 0)
-        return false;
+        return (boolean)false;
 
     res = SDL_DisplayFormatAlpha(tmp);
 
-- 
2.21.0

