Implemented shore map / New blocks / Bugfixes

This commit is contained in:
Anuken
2019-01-30 13:34:38 -05:00
parent dbf05a1419
commit 209e3f03c1
32 changed files with 1906 additions and 1682 deletions

View File

@@ -84,10 +84,11 @@ public class BlockRenderer{
public void drawFog(){
float ww = world.width() * tilesize, wh = world.height() * tilesize;
float u = (camera.position.x - camera.width/2f) / ww,
v = (camera.position.y - camera.height/2f) / wh,
u2 = (camera.position.x + camera.width/2f) / ww,
v2 = (camera.position.y + camera.height/2f) / wh;
float x = camera.position.x + tilesize/2f, y = camera.position.y + tilesize/2f;
float u = (x - camera.width/2f) / ww,
v = (y - camera.height/2f) / wh,
u2 = (x + camera.width/2f) / ww,
v2 = (y + camera.height/2f) / wh;
Tmp.tr1.set(fog.getTexture());
Tmp.tr1.set(u, v2, u2, v);