From 3782c6ae9581063b3ed9e45467ce43f0b320bb19 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Fri, 11 Sep 2015 22:58:02 -0400 Subject: improved layers --- src/World.cpp | 8 +++++++- src/main.cpp | 6 ++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/World.cpp b/src/World.cpp index 6b1b317..f6bb70e 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -54,13 +54,19 @@ static float back=0; void World::draw(void){ unsigned int i; if(behind){ - hline/=1.5; + hline*=.5; back+=.2; behind->draw(); + }else{ + hline*=.5; + back+=.2; } if(root){ hline=HLINE; back=0; + }else{ + hline*=2; + back-=.2; } glBegin(GL_QUADS); for(i=0;iaddLayer(); currentWorld->setRoot(); + currentWorld->addLayer(); + //currentWorld->addLayer(); + //currentWorld->addLayer(); // Save the world if necessary /*FILE *f=fopen("world.dat","r"); @@ -172,7 +174,7 @@ void render(){ **** RENDER STUFF HERE **** **************************/ - currentWorld->draw(); + currentWorld->draw(); // layers dont scale x correctly... glColor3ub(120,30,30); glRectf(player.loci.x, player.loci.y, player.loci.x + player.width, player.loci.y + player.height); -- cgit v1.2.3