aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-12-17 20:33:50 -0500
committerClyne Sullivan <tullivan99@gmail.com>2015-12-17 20:33:50 -0500
commit1b2510a427cea42e6381d60f434b5fdec2b181b0 (patch)
tree7603c7e2ad6ef38b76cb507a18855377626667ce
parentd9d66652af66fc824588176e5ce1136ea9965925 (diff)
fork tests, revised song
-rw-r--r--Makefile2
-rw-r--r--assets/music/theme_jazz.wavbin13193260 -> 13193260 bytes
-rw-r--r--main.cpp5
-rw-r--r--src/entities.cpp8
-rw-r--r--src/gameplay.cpp1
-rw-r--r--src/ui.cpp2
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
--- a/assets/music/theme_jazz.wav
+++ b/assets/music/theme_jazz.wav
Binary files 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);