From: drumsetmonkey Date: Tue, 27 Oct 2015 20:22:18 +0000 (-0400) Subject: Made better tree layer X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=e32f533207c0ded45441d8c32e96247ff7119eac;p=clyne%2Fgamedev.git Made better tree layer --- diff --git a/assets/antree.png b/assets/antree.png index c3d9146..3d6aad4 100644 Binary files a/assets/antree.png and b/assets/antree.png differ diff --git a/main.cpp b/main.cpp index 1ca4c45..03c618f 100644 --- a/main.cpp +++ b/main.cpp @@ -556,12 +556,12 @@ void render(){ glEnd(); glBindTexture(GL_TEXTURE_2D, bgTreesFirst); - glColor4ub(255,255,255,200); + glColor4ub(255,255,255,255); glBegin(GL_QUADS); - 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); + glTexCoord2i(0,1);glVertex2i(-960 +player->loc.x*.25, 50); + glTexCoord2i(1,1);glVertex2i(960 +player->loc.x*.25, 50); + glTexCoord2i(1,0);glVertex2i(960 +player->loc.x*.25, 1130); + glTexCoord2i(0,0);glVertex2i(-960 +player->loc.x*.25, 1130); glEnd(); glDisable(GL_TEXTURE_2D); diff --git a/src/gameplay.cpp b/src/gameplay.cpp index d1cc69d..99b9ff0 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -34,7 +34,7 @@ void initEverything(void){ */ World *test=new World(); - test->generate(SCREEN_WIDTH/2); + test->generate(SCREEN_WIDTH); /* * Add two layers, a platform, and a hole to the world.