From 737f8e22eb9cc7bea218274e0f1d068d7da1c193 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 11 Nov 2018 10:16:27 +0100
Subject: Makefile, use Haiku settings


diff --git a/Makefile b/Makefile
index 57882d7..2d18918 100644
--- a/Makefile
+++ b/Makefile
@@ -27,13 +27,11 @@ CHMOD=chmod
 #CHGRP=echo
 #CHMOD=echo
 ifeq ($(HOST),haiku)
-	CC=i586-pc-haiku-gcc
-	COPTS+=$(CPPFLAGS) -D_NO_SOUND
 	INSTALLBIN=/boot/common/games/asylum/asylum
 	INSTALLRESOURCEPATH=/boot/common/games/asylum/data
 	INSTALLHISCORES=/boot/common/games/asylum/hiscores
 	OS_SOURCE=asylum_haiku.c
-	LIBS=-lSDL_mixer -lSDL -lbe -lroot -ldevice -lgame -lGL -ltextencoding -lmedia
+	LIBS=-lSDL_mixer -lSDL -lbe -lroot -ldevice -lgame -lGL -lGLU -ltextencoding -lmedia
 endif
 ifeq ($(HOST),mingw)
 	INSTALLBIN="c:/program files/asylum/asylum.exe"
-- 
2.19.1


From f92dd526223060927c05239c2b62deffe1e249ed Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 11 Nov 2018 10:18:06 +0100
Subject: Don't use GL renderer


diff --git a/asylum.c b/asylum.c
index 8fe9a5b..3879333 100644
--- a/asylum.c
+++ b/asylum.c
@@ -262,8 +262,8 @@ void setdefaults()
     options.gearchange = (arm3 == 0) ? 0 : 1;
     options.explospeed = (arm3 == 0) ? 2 : 1;
     options.fullscreen = 0;
-    options.opengl = 1;
-    options.size = 1; // 640 x 512
+    options.opengl = 0;
+    options.size = 0; // 640 x 512
     options.scale = 1;
     options.joyno = 0;
     options.mentalzone = 1;
-- 
2.19.1


From e8768d00273829d9cab66ba0554e60a4cf7510c1 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 11 Nov 2018 13:37:18 +0100
Subject: Move user settings to ~/config/settings


diff --git a/file.c b/file.c
index 48e1346..2dda765 100644
--- a/file.c
+++ b/file.c
@@ -32,8 +32,8 @@ char storage[STOREAREALEN];
 static char resource_path[240];
 static char score_path[240];
 
-char configname[] = "/.asylum"; //"<PsychoResource$Path>Config";
-char savegamename[] = "/.asylum_game";
+char configname[] = "/config/settings/.asylum"; //"<PsychoResource$Path>Config";
+char savegamename[] = "/config/settings/.asylum_game";
 
 static const char* score_name[4] = {
     "/EgoHighScores", "/PsycheHighScores", "/IdHighScores", "/ExtendedHighScores"
-- 
2.19.1


From 524cf34a4959e4405f26969c05efb88faebd0b80 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Mon, 12 Nov 2018 09:32:07 +0100
Subject: Make Asylum launch from Tracker


diff --git a/asylum.c b/asylum.c
index 3879333..4412e48 100644
--- a/asylum.c
+++ b/asylum.c
@@ -18,6 +18,11 @@
 #include <SDL/SDL.h>
 #include <SDL/SDL_mixer.h>
 
+#ifdef __HAIKU__
+#include <unistd.h>
+#include <libgen.h>
+#endif
+
 #include "asylum_os.h"
 #include "asylum.h"
 
@@ -464,6 +469,9 @@ void c_array_initializers()
 
 int main(int argc, char** argv)
 {
+#ifdef __HAIKU__
+    chdir(dirname(argv[0]));
+#endif
     find_resources();
 
     if ((argc > 2) && !strcmp(argv[1], "--dumpmusic"))
-- 
2.19.1

