implimented my curses doodad to show that 3d works in ascii too.

Added camera movement with the mouse, but I need to change how it
works
This commit is contained in:
MitchellHansen
2016-08-06 11:08:05 -07:00
parent c431d7452a
commit c5858bca3e
8 changed files with 430 additions and 36 deletions

View File

@@ -86,23 +86,23 @@ sf::Color Ray::Cast() {
// If the ray went out of bounds
if (voxel.z >= dimensions.z) {
return sf::Color(0, 0, 255, 50);
return sf::Color(172, 245, 251, 200);
}
if (voxel.x >= dimensions.x) {
return sf::Color(0, 0, 255, 100);
return sf::Color(172, 245, 251, 200);
}
if (voxel.y >= dimensions.x) {
return sf::Color(0, 0, 255, 150);
return sf::Color(172, 245, 251, 200);
}
if (voxel.x < 0) {
return sf::Color(0, 255, 0, 150);
return sf::Color(172, 245, 251, 200);
}
if (voxel.y < 0) {
return sf::Color(0, 255, 0, 100);
return sf::Color(172, 245, 251, 200);
}
if (voxel.z < 0) {
return sf::Color(0, 255, 0, 50);
return sf::Color(172, 245, 251, 200);
}
// If we hit a voxel