diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 0cba2e6..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "files.associations": { - "iostream": "cpp" - } -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 65f4d2b..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "type": "shell", - "command": "cd ~/git/polly-b-gone/&&make&&cd obj/Polly-B-Gone.app/&&./Contents/MacOS/Polly-B-Gone", - "group": { - "kind": "build", - "isDefault": true - } - } - ] -} \ No newline at end of file diff --git a/Makefile b/Makefile index f8b57bb..5ff2ae9 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,20 @@ -CXXFLAGS = -L/System/Library/Frameworks +CXXFLAGS = \ + -O2 \ + -I/System/Library/Frameworks/GLUT.framework/Headers \ + -I/System/Library/Frameworks/OpenGL.framework/Headers \ + -I/System/Library/Frameworks/SDL.framework/Headers \ + -I/System/Library/Frameworks/SDL_image.framework/Headers \ + -I/System/Library/Frameworks/SDL_mixer.framework/Headers \ + -I/System/Library/Frameworks/TinyXML.framework/Headers LDFLAGS = \ - -L/System/Library/Frameworks \ - -I/usr/local/Cellar/tinyxml/2.6.2/include \ - -I/Library/Frameworks/SDL.framework/Headers \ - -I/Library/Frameworks/SDL_image.framework/Headers \ - -F/Library/Frameworks \ -framework Cocoa \ -framework GLUT \ -framework OpenGL \ - -framework SDL\ + -framework SDL \ -framework SDL_image \ -framework SDL_mixer \ - -L/usr/local/Cellar/tinyxml/2.6.2/lib \ - -ltinyxml + -framework TinyXML RESOURCES = \ resources/Polly.icns \ @@ -86,10 +87,10 @@ obj/Polly-B-Gone.app : obj/main.out $(RESOURCES) resources/Info.plist Makefile cp resources/Info.plist $@/Contents cp $(RESOURCES) $@/Contents/Resources mkdir -p $@/Contents/Frameworks - cp -R /Library/Frameworks/SDL.framework $@/Contents/Frameworks - cp -R /Library/Frameworks/SDL_image.framework $@/Contents/Frameworks - cp -R /Library/Frameworks/SDL_mixer.framework $@/Contents/Frameworks - cp /usr/local/Cellar/tinyxml/2.6.2/lib/libtinyxml.dylib $@/Contents/Resources + cp -R /System/Library/Frameworks/SDL.framework $@/Contents/Frameworks + cp -R /System/Library/Frameworks/SDL_image.framework $@/Contents/Frameworks + cp -R /System/Library/Frameworks/SDL_mixer.framework $@/Contents/Frameworks + cp -R /System/Library/Frameworks/TinyXML.framework $@/Contents/Frameworks find $@/Contents/Frameworks -name Headers | xargs rm -r # ln -sf ../../../../resources/world.xml $@/Contents/Resources/world.xml diff --git a/src/main.cpp b/src/main.cpp index 54b232c..ef4966a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include "room.h" #include "shader.h" @@ -25,7 +25,7 @@ static const int defaultY = 50; static const float kd = .060f; // frame-rate dependent static bool run = true; -static bool fullScreen = true; +static bool fullScreen = false; static World* world = NULL; static bool wireframe = false; @@ -194,10 +194,6 @@ static void eventLoop() { int main(int argc, char** argv) { SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO); - - SDL_PumpEvents(); - - SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); diff --git a/src/sound.cpp b/src/sound.cpp index 366173e..1ebf1fe 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- #include -#include +#include #include #include #include diff --git a/src/texture.cpp b/src/texture.cpp index b51d073..4331f32 100644 --- a/src/texture.cpp +++ b/src/texture.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/worlds.cpp b/src/worlds.cpp index 93f62de..e10443e 100644 --- a/src/worlds.cpp +++ b/src/worlds.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include