Lighting is now in its own class using the new Pathing class. This should allow me to make it more consistent and possibly make Pathing more efficient.
This commit is contained in:
parent
e05335b153
commit
3f7a9cc124
18 changed files with 209 additions and 257 deletions
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
#include "map.hpp"
|
||||
#include "point.hpp"
|
||||
#include "matrix.hpp"
|
||||
|
||||
class Pathing {
|
||||
public:
|
||||
|
@ -21,5 +21,9 @@ public:
|
|||
void compute_paths(Matrix &walls);
|
||||
void set_target(const Point &at, int value=0);
|
||||
void clear_target(const Point &at);
|
||||
Matrix &paths() { return $paths; }
|
||||
Matrix &input() { return $input; }
|
||||
int distance(Point to) { return $paths[to.y][to.x];}
|
||||
|
||||
bool INVARIANT();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue