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
10
pathing.cpp
10
pathing.cpp
|
@ -1,4 +1,5 @@
|
|||
#include "pathing.hpp"
|
||||
#include "dbc.hpp"
|
||||
#include <vector>
|
||||
|
||||
using std::vector;
|
||||
|
@ -22,12 +23,9 @@ inline void add_neighbors(PointList &neighbors, Matrix &closed, size_t y, size_t
|
|||
}
|
||||
}
|
||||
|
||||
inline void matrix_assign(Matrix &out, int new_value) {
|
||||
for(auto &row : out) {
|
||||
row.assign(row.size(), new_value);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Used https://github.com/HenrYxZ/dijkstra-map as a reference.
|
||||
*/
|
||||
void Pathing::compute_paths(Matrix &walls) {
|
||||
INVARIANT();
|
||||
// Initialize the new array with every pixel at limit distance
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue