From 1b2510a427cea42e6381d60f434b5fdec2b181b0 Mon Sep 17 00:00:00 2001
From: Clyne Sullivan <tullivan99@gmail.com>
Date: Thu, 17 Dec 2015 20:33:50 -0500
Subject: fork tests, revised song

---
 Makefile                    |   2 +-
 assets/music/theme_jazz.wav | Bin 13193260 -> 13193260 bytes
 main.cpp                    |   5 +++++
 src/entities.cpp            |   8 +++++++-
 src/gameplay.cpp            |   1 +
 src/ui.cpp                  |   2 +-
 6 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index e48afa6..6eeca1a 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ all:
 	@rm -f out64/*.o
 	@cd src; $(MAKE) $(MFLAGS64)
 	@echo "  CXX  main.cpp"
-	@g++ $(FLAGS) -m64 -o main main.cpp out64/*.o $(LIBS)
+	@g++ $(FLAGS) -m64 -o main main.cpp out64/*.o $(LIBS) -lX11
 
 win32:
 	@g++ $(FLAGS) -o main main.cpp src/*.cpp $(WIN_LIBS)
diff --git a/assets/music/theme_jazz.wav b/assets/music/theme_jazz.wav
index 1c62bbc..94f888e 100644
Binary files a/assets/music/theme_jazz.wav and b/assets/music/theme_jazz.wav differ
diff --git a/main.cpp b/main.cpp
index 0651077..7eaaa84 100644
--- a/main.cpp
+++ b/main.cpp
@@ -199,9 +199,14 @@ extern int  fadeIntensity;
  * MAIN ************************************************************************
  *******************************************************************************/
 
+#include <X11/Xlib.h>
+
 int main(/*int argc, char *argv[]*/){
 	//*argv = (char *)argc;
 	gameRunning=false;
+	
+	XInitThreads();
+	
 	/*!
 	 *	(Attempt to) Initialize SDL libraries so that we can use SDL facilities and eventually
 	 *	make openGL calls. Exit if there was an error.
diff --git a/src/entities.cpp b/src/entities.cpp
index 7cd413c..c307a31 100644
--- a/src/entities.cpp
+++ b/src/entities.cpp
@@ -1,6 +1,8 @@
 #include <entities.h>
 #include <ui.h>
 
+#include <unistd.h>
+
 extern FILE* names;
 extern unsigned int loops;
 
@@ -462,7 +464,11 @@ void Mob::wander(int timeRun){
 	case MS_TRIGGER:
 		if(player->loc.x + player->width / 2 > loc.x		 &&
 		   player->loc.x + player->width / 2 < loc.x + width ){
-			hey(this);
+			//if(!vfork()){
+				hey(this);
+				/*_exit(0);
+			}*/
+			
 		}
 		break;
 	case MS_DOOR:
diff --git a/src/gameplay.cpp b/src/gameplay.cpp
index 2361029..ba2c8d9 100644
--- a/src/gameplay.cpp
+++ b/src/gameplay.cpp
@@ -42,6 +42,7 @@ float gen_worldSpawnHill3(float x){
  */
 
 void worldSpawnHill1_hillBlock(Mob *callee){
+	std::cout<<"oi";
 	player->vel.x = 0;
 	player->loc.x = callee->loc.x + callee->width;
 	ui::dialogBox(player->name,NULL,false,"This hill seems to steep to climb up...");
diff --git a/src/ui.cpp b/src/ui.cpp
index 08f503f..6069ef9 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -512,7 +512,7 @@ namespace ui {
 					glVertex2f(x+1+SCREEN_WIDTH-HLINE*16,y+1);
 					glVertex2f(x+1+SCREEN_WIDTH-HLINE*16,y-1-SCREEN_HEIGHT/4);
 					glVertex2f(x-1						,y-1-SCREEN_HEIGHT/4);
-					glVertex2f(x-1						,y+2);
+					glVertex2f(x						,y+1);
 				glEnd();
 			
 				glColor3ub(0,0,0);
-- 
cgit v1.2.3