aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile9
-rw-r--r--src/Texture.cpp11
-rw-r--r--src/world.cpp2
3 files changed, 19 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index 972edcb..d7fea67 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -3,9 +3,16 @@ LIBS = -lGL -lSDL2 -lSDL2_image -lSDL2_mixer -lfreetype
FLAGS = -m32 -std=c++11 -I../include -I../include/freetype2
OUT = `echo "" $$(ls -c $(wildcard *.cpp)) | sed s/.cpp/.o/g | sed 's/ / ..\/out\//g'`
+OUT64 = `echo "" $$(ls -c $(wildcard *.cpp)) | sed s/.cpp/.o/g | sed 's/ / ..\/out64\//g'`
../out/%.o:
@echo " CXX " $(shell echo $@ | sed 's/..\/out\///g' | sed 's/\.o/\.cpp/')
- @g++ $(FLAGS) -o $@ -c $(shell echo $@ | sed 's/..\/out\///g' | sed 's/\.o/\.cpp/') $(LIBS)
+ @g++ $(FLAGS) -m32 -o $@ -c $(shell echo $@ | sed 's/..\/out\///g' | sed 's/\.o/\.cpp/') $(LIBS) -lSDL2main
+
+../out64/%.o:
+ @echo " CXX " $(shell echo $@ | sed 's/..\/out64\///g' | sed 's/\.o/\.cpp/')
+ @g++ $(FLAGS) -m64 -o $@ -c $(shell echo $@ | sed 's/..\/out64\///g' | sed 's/\.o/\.cpp/') $(LIBS)
all: $(shell echo $(OUT))
+
+64: $(shell echo $(OUT64))
diff --git a/src/Texture.cpp b/src/Texture.cpp
index 99d6ae7..01a19aa 100644
--- a/src/Texture.cpp
+++ b/src/Texture.cpp
@@ -10,6 +10,7 @@ namespace Texture{
glGenTextures(1, &object); //turns "object" into a texture
glBindTexture(GL_TEXTURE_2D, object); //binds "object" to the top of the stack
+ glPixelStoref(GL_UNPACK_ALIGNMENT,1 );
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); //sets the "min" filter
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); //the the "max" filter of the stack
@@ -17,7 +18,15 @@ namespace Texture{
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); //Wrap the texture to the matrix
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); //Wrap the texutre to the matrix
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image->w, image->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, image->pixels); //sets the texture to the image file loaded above
+ glTexImage2D( GL_TEXTURE_2D,
+ 0,
+ GL_RGBA,
+ image->w,
+ image->h,
+ 0,
+ GL_RGBA,
+ GL_UNSIGNED_BYTE,
+ image->pixels); //sets the texture to the image file loaded above
SDL_FreeSurface(image); //Free surface
return object;
diff --git a/src/world.cpp b/src/world.cpp
index 7b1580a..2757471 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -569,7 +569,7 @@ void World::getEntityLocation(std::vector<T*>&vecBuf, unsigned int n){
i++;
}
}*/
-
+
void World::addMob(int t,float x,float y){
mob.push_back(new Mob(t));
mob.back()->spawn(x,y);