aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-03-30 08:41:16 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-03-30 08:41:16 -0400
commitc35571e37bdd6d2fe9b95e4265c150265585f3a9 (patch)
tree31478f777e27f345cc20f2eaf796a176b55cb4fe /src/world.cpp
parent82c178d797b9a23c31d7dad1cc8cac29d27c6eb1 (diff)
Inv and textures
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/world.cpp b/src/world.cpp
index d8fd2d3..54ff921 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -1,8 +1,8 @@
#include <algorithm>
#include <sstream>
-#include <world.h>
-#include <ui.h>
+#include <world.hpp>
+#include <ui.hpp>
#include <tinyxml2.h>
using namespace tinyxml2;
@@ -433,10 +433,10 @@ void World::draw(Player *p){
safeSetColorA( 255, 255, 255, weather == WorldWeather::Snowy ? 150 : 255 - worldShade * 4);
glBegin( GL_QUADS );
- glTexCoord2i( 0, 0 ); glVertex2i( worldStart, SCREEN_HEIGHT );
- glTexCoord2i( 1, 0 ); glVertex2i( -worldStart, SCREEN_HEIGHT );
- glTexCoord2i( 1, 1 ); glVertex2i( -worldStart, 0 );
- glTexCoord2i( 0, 1 ); glVertex2i( worldStart, 0 );
+ glTexCoord2i( 0, 0 ); glVertex2i( offset.x - SCREEN_WIDTH/2, SCREEN_HEIGHT );
+ glTexCoord2i( 1, 0 ); glVertex2i( offset.x + SCREEN_WIDTH/2, SCREEN_HEIGHT );
+ glTexCoord2i( 1, 1 ); glVertex2i( offset.x + SCREEN_WIDTH/2, 0 );
+ glTexCoord2i( 0, 1 ); glVertex2i( offset.x - SCREEN_WIDTH/2, 0 );
glEnd();
bgTex->bindNext();