Now have more fancy rooms with different floors to play with.
This commit is contained in:
parent
f46b5f15ef
commit
9c03e850b5
7 changed files with 96 additions and 41 deletions
|
@ -16,8 +16,8 @@ TEST_CASE("lighting a map works", "[lighting]") {
|
|||
|
||||
Point light1 = map.place_entity(0);
|
||||
Point light2 = map.place_entity(1);
|
||||
LightSource source1{0,2};
|
||||
LightSource source2{1,3};
|
||||
LightSource source1{6, 1.0};
|
||||
LightSource source2{4,3};
|
||||
|
||||
LightRender lr(map.width(), map.height());
|
||||
|
||||
|
@ -37,7 +37,9 @@ TEST_CASE("lighting a map works", "[lighting]") {
|
|||
Matrix &lighting = lr.lighting();
|
||||
|
||||
matrix::dump("WALLS=====", map.walls(), light1.x, light1.y);
|
||||
matrix::dump("LIGHTING======", lighting, light1.x, light1.y);
|
||||
matrix::dump("PATHS=====", lr.paths(), light1.x, light1.y);
|
||||
matrix::dump("LIGHTING 1", lighting, light1.x, light1.y);
|
||||
matrix::dump("LIGHTING 2", lighting, light2.x, light2.y);
|
||||
|
||||
// confirm light is set at least at and around the two points
|
||||
REQUIRE(lighting[light1.y][light1.x] == lighting::LEVELS[source1.strength]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue