Revert "Fixing MAC build"

This reverts commit cfed6d4cd8.
This commit is contained in:
Raydelto Hernandez 2020-06-06 17:40:52 -03:00
parent cfed6d4cd8
commit 29a04f5416
7 changed files with 19 additions and 43 deletions

View file

@ -1,5 +0,0 @@
{
"files.associations": {
"iostream": "cpp"
}
}

16
.vscode/tasks.json vendored
View file

@ -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
}
}
]
}

View file

@ -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 = \ 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 Cocoa \
-framework GLUT \ -framework GLUT \
-framework OpenGL \ -framework OpenGL \
-framework SDL \ -framework SDL \
-framework SDL_image \ -framework SDL_image \
-framework SDL_mixer \ -framework SDL_mixer \
-L/usr/local/Cellar/tinyxml/2.6.2/lib \ -framework TinyXML
-ltinyxml
RESOURCES = \ RESOURCES = \
resources/Polly.icns \ 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/Info.plist $@/Contents
cp $(RESOURCES) $@/Contents/Resources cp $(RESOURCES) $@/Contents/Resources
mkdir -p $@/Contents/Frameworks mkdir -p $@/Contents/Frameworks
cp -R /Library/Frameworks/SDL.framework $@/Contents/Frameworks cp -R /System/Library/Frameworks/SDL.framework $@/Contents/Frameworks
cp -R /Library/Frameworks/SDL_image.framework $@/Contents/Frameworks cp -R /System/Library/Frameworks/SDL_image.framework $@/Contents/Frameworks
cp -R /Library/Frameworks/SDL_mixer.framework $@/Contents/Frameworks cp -R /System/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/TinyXML.framework $@/Contents/Frameworks
find $@/Contents/Frameworks -name Headers | xargs rm -r find $@/Contents/Frameworks -name Headers | xargs rm -r
# ln -sf ../../../../resources/world.xml $@/Contents/Resources/world.xml # ln -sf ../../../../resources/world.xml $@/Contents/Resources/world.xml

View file

@ -5,7 +5,7 @@
#include <SDL/SDL.h> #include <SDL/SDL.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <tinyxml.h> #include <TinyXML/tinyxml.h>
#include "room.h" #include "room.h"
#include "shader.h" #include "shader.h"
@ -25,7 +25,7 @@ static const int defaultY = 50;
static const float kd = .060f; // frame-rate dependent static const float kd = .060f; // frame-rate dependent
static bool run = true; static bool run = true;
static bool fullScreen = true; static bool fullScreen = false;
static World* world = NULL; static World* world = NULL;
static bool wireframe = false; static bool wireframe = false;
@ -194,10 +194,6 @@ static void eventLoop() {
int main(int argc, char** argv) { int main(int argc, char** argv) {
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO); SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
SDL_PumpEvents();
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1); SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);

View file

@ -1,7 +1,7 @@
// -*- C++ -*- // -*- C++ -*-
#include <SDL/SDL_error.h> #include <SDL/SDL_error.h>
#include <SDL/SDL_mixer.h> #include <SDL_mixer/SDL_mixer.h>
#include <iostream> #include <iostream>
#include <string> #include <string>
#include <vector> #include <vector>

View file

@ -3,7 +3,7 @@
#include <OpenGL/gl.h> #include <OpenGL/gl.h>
#include <OpenGL/glu.h> #include <OpenGL/glu.h>
#include <SDL/sdl.h> #include <SDL/sdl.h>
#include <SDL/SDL_image.h> #include <SDL_image/SDL_image.h>
#include <iostream> #include <iostream>
#include <string> #include <string>
#include <vector> #include <vector>

View file

@ -1,4 +1,4 @@
#include <tinyxml.h> #include <TinyXML/tinyxml.h>
#include <iostream> #include <iostream>
#include <list> #include <list>
#include <map> #include <map>