]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
fork tests, revised song
authorClyne Sullivan <tullivan99@gmail.com>
Fri, 18 Dec 2015 01:33:50 +0000 (20:33 -0500)
committerClyne Sullivan <tullivan99@gmail.com>
Fri, 18 Dec 2015 01:33:50 +0000 (20:33 -0500)
Makefile
assets/music/theme_jazz.wav
main.cpp
src/entities.cpp
src/gameplay.cpp
src/ui.cpp

index e48afa64b935eb0b3a43a72be0fcc07797b69bde..6eeca1a8473f8ea0c4ed261bba58728049400b37 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ all:
        @rm -f out64/*.o\r
        @cd src; $(MAKE) $(MFLAGS64)\r
        @echo "  CXX  main.cpp"\r
-       @g++ $(FLAGS) -m64 -o main main.cpp out64/*.o $(LIBS)\r
+       @g++ $(FLAGS) -m64 -o main main.cpp out64/*.o $(LIBS) -lX11\r
 \r
 win32:\r
        @g++ $(FLAGS) -o main main.cpp src/*.cpp $(WIN_LIBS)\r
index 1c62bbc738e47923cc1eb689c652c11cb3bc99bd..94f888e664013b8e3d9216532a5c8289c542c057 100644 (file)
Binary files a/assets/music/theme_jazz.wav and b/assets/music/theme_jazz.wav differ
index 0651077ce1432764f9acfd1d5cc0ebcea1768b55..7eaaa8441fe2cb117e4a55bfcbdf0711a7fbfa98 100644 (file)
--- 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.
index 7cd413c8dc00f2b6089ea5f32c9b02a7fff6f0b7..c307a31d9dd00810eca8c9f6767aa8e84b0d1d01 100644 (file)
@@ -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:
index 2361029a21811a2c5edd01f1b2db67340bc5470f..ba2c8d9f0e0d7e6d15976b6fb2be030a10cf3e19 100644 (file)
@@ -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...");
index 08f503f1f5baf64016639cb67b03ca34e960b83b..6069ef9e88e5db81b9bdb0557971a7d911de5ace 100644 (file)
@@ -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);