Browse Source

Class cleanup and comments

combat-2
MagicBot 1 year ago
parent
commit
1764041272
  1. 10
      src/engine/InterestManagement/Terrain.java

10
src/engine/InterestManagement/Terrain.java

@ -145,7 +145,7 @@ public class Terrain { @@ -145,7 +145,7 @@ public class Terrain {
Vector2f terrain_cell = getTerrainCell(terrainLoc);
int pixel_x = (int) Math.floor(terrain_cell.x);
int pixel_t = (int) Math.floor(terrain_cell.y);
int pixel_y = (int) Math.floor(terrain_cell.y);
Vector2f pixel_offset = new Vector2f(terrain_cell.x % 1, terrain_cell.y % 1);
@ -156,10 +156,10 @@ public class Terrain { @@ -156,10 +156,10 @@ public class Terrain {
float bottomLeftHeight;
float bottomRightHeight;
topLeftHeight = terrain_pixel_data[pixel_x][pixel_t];
topRightHeight = terrain_pixel_data[pixel_x + 1][pixel_t];
bottomLeftHeight = terrain_pixel_data[pixel_x][pixel_t + 1];
bottomRightHeight = terrain_pixel_data[pixel_x + 1][pixel_t + 1];
topLeftHeight = terrain_pixel_data[pixel_x][pixel_y];
topRightHeight = terrain_pixel_data[pixel_x + 1][pixel_y];
bottomLeftHeight = terrain_pixel_data[pixel_x][pixel_y + 1];
bottomRightHeight = terrain_pixel_data[pixel_x + 1][pixel_y + 1];
// Interpolate between the 4 vertices

Loading…
Cancel
Save