diff --git a/src/camera.h b/src/camera.h index 06cbd47..0f68329 100644 --- a/src/camera.h +++ b/src/camera.h @@ -1,6 +1,7 @@ #pragma once #include "rtweekend.h" +#include "image.h" class camera { diff --git a/src/image.h b/src/image.h new file mode 100644 index 0000000..28130ac --- /dev/null +++ b/src/image.h @@ -0,0 +1,7 @@ +#pragma once + +const double ASPECT_RATIO = 1.0; +const unsigned int WIDTH = 256; +const unsigned int HEIGHT = static_cast(WIDTH / ASPECT_RATIO); +const int SAMPLES_PER_PIXEL = 8; +const int MAX_DEPTH = 5; diff --git a/src/main.cpp b/src/main.cpp index 37dc3ad..527ca97 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,6 +5,7 @@ #include "colour.h" #include "camera.h" #include "material.h" +#include "image.h" #include @@ -15,12 +16,6 @@ #include #include -const double ASPECT_RATIO = 1.0; -const unsigned int WIDTH = 256; -const unsigned int HEIGHT = static_cast(WIDTH / ASPECT_RATIO); -const int SAMPLES_PER_PIXEL = 8; -const int MAX_DEPTH = 5; - // file descriptor of the socket we're listening for connections on // // returns fd for the client connection