1
0
mirror of https://github.com/ssloy/tinyraycaster.git synced 2025-08-01 11:50:21 +02:00

Merge pull request #8 from RazorNeko/master

Add extra argument.
This commit is contained in:
Dmitry V. Sokolov
2019-02-13 12:47:29 +01:00
committed by GitHub

View File

@@ -16,7 +16,7 @@ void unpack_color(const uint32_t &color, uint8_t &r, uint8_t &g, uint8_t &b, uin
void drop_ppm_image(const std::string filename, const std::vector<uint32_t> &image, const size_t w, const size_t h) {
assert(image.size() == w*h);
std::ofstream ofs(filename);
std::ofstream ofs(filename, std::ios::binary);
ofs << "P6\n" << w << " " << h << "\n255\n";
for (size_t i = 0; i < h*w; ++i) {
uint8_t r, g, b, a;