Commits

Anonymous committed 3592f6d

typo fix and fov works

Comments (0)

Files changed (2)

src/main/java/net/fishbulb/jcod/demo/Fov.java

         console.clear();
         console.setDefaultForeground(Color.BLACK);
         console.putChar(px, py, '@', BlendMode.None);
-        // algo.computeFov(px, py, 10, false);
-        // algo.castRay(px,py,0,0,10,true);
-        light.setFov(px,py,true);
+        algo.computeFov(px, py, 10, false);
 
         for (int y = 0; y < height; y++) {
             for (int x = 0; x < width; x++) {

src/main/java/net/fishbulb/jcod/fov/FovAlgorithm.java

     }
 
     public void castRay(int x0, int y0, int x1, int y1, int r, boolean w) {
-        new RayCast(x0, x0, x1, y1, r, w).cast();
+        new RayCast(x0, y0, x1, y1, r, w).cast();
     }
 
     public abstract void computeFov(int x, int y, int maxRadius, boolean walls);