diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2015-10-27 08:41:26 -0400 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2015-10-27 08:41:26 -0400 |
commit | 26391278f21c173971bfc1f53f324ae29737dfeb (patch) | |
tree | 4249fbd09e94782e4f6feab0b0486f98f57126b5 /main.cpp | |
parent | 0544b1c561540ee5c86f66b019b160e866acefb3 (diff) |
Added proof of concept tree layer
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -49,8 +49,7 @@ SDL_GLContext mainGLContext = NULL; * */ -static GLuint bgImage; -static GLuint bgFar; +static GLuint bgImage, bgTreesFirst; /* * gameRunning @@ -368,7 +367,7 @@ int main(int argc, char *argv[]){ */ bgImage=Texture::loadTexture("assets/bg.png"); - bgFar = Texture::loadTexture("assets/bgfarMountains.png"); + bgTreesFirst = Texture::loadTexture("assets/antree.png"); /* * Load sprites used in the inventory menu. See src/inventory.cpp @@ -556,13 +555,13 @@ void render(){ glTexCoord2i(0,0);glVertex2i(-SCREEN_WIDTH*2,SCREEN_HEIGHT); glEnd(); - glBindTexture(GL_TEXTURE_2D, bgFar); - glColor4ub(255,255,255,155); + glBindTexture(GL_TEXTURE_2D, bgTreesFirst); + glColor4ub(255,255,255,200); glBegin(GL_QUADS); - glTexCoord2i(0,1);glVertex2i(-SCREEN_WIDTH,0); - glTexCoord2i(1,1);glVertex2i( SCREEN_WIDTH,0); - glTexCoord2i(1,0);glVertex2i( SCREEN_WIDTH,391); - glTexCoord2i(0,0);glVertex2i(-SCREEN_WIDTH,391); + glTexCoord2i(0,1);glVertex2i(0 +player->loc.x*.25, 100); + glTexCoord2i(1,1);glVertex2i(7680 +player->loc.x*.25, 100); + glTexCoord2i(1,0);glVertex2i(7680 +player->loc.x*.25, 2260); + glTexCoord2i(0,0);glVertex2i(0 +player->loc.x*.25, 2260); glEnd(); glDisable(GL_TEXTURE_2D); |