Fixed all the compiler warnings, fixed depreciated screenshot function

This commit is contained in:
2017-02-06 03:47:43 -08:00
parent 88e69721e1
commit 3571bdcd61
11 changed files with 19 additions and 20 deletions

View File

@@ -1,4 +1,3 @@
#pragma once
#include "Camera.h"
#include "Pub_Sub.h"
@@ -201,4 +200,4 @@ sf::Vector3f Camera::get_position() {
sf::Vector2f Camera::get_direction() {
return direction;
}
}

View File

@@ -36,7 +36,7 @@ int Hardware_Caster::init() {
return error;
}
srand(NULL);
srand(time(NULL));
int *seed_memory = new int[1920*1080];
@@ -893,4 +893,4 @@ bool Hardware_Caster::assert(int error_code, std::string function_name) {
std::cout << err_msg << " =at= " << function_name << std::endl;
return true;
}
}

View File

@@ -1,4 +1,3 @@
#pragma once
#include "LightController.h"
//LightController::LightController(std::shared_ptr<RayCaster> raycaster) {

View File

@@ -1,5 +1,5 @@
#include "LightHandle.h"
#include "LightController.h"
LightHandle::LightHandle() {

View File

@@ -1,4 +1,3 @@
#pragma once
#include <iostream>
#include <SFML/System/Vector3.hpp>
#include <SFML/System/Vector2.hpp>
@@ -369,4 +368,4 @@ void Old_Map::diamond_square(int stepsize, double scale) {
}
}
}
}

View File

@@ -1,4 +1,3 @@
#pragma once
#include <vector>
#include "Event.hpp"
#include "Pub_Sub.h"

View File

@@ -1,5 +1,3 @@
#pragma once
#include <SFML/Graphics.hpp>
#include <iostream>
#include "Map.h"

View File

@@ -22,7 +22,6 @@
#include <OpenCL/cl_ext.h>
#endif
#pragma once
#include <iostream>
#include <chrono>
#include <SFML/Graphics.hpp>
@@ -233,7 +232,11 @@ int main() {
std::getline(std::cin, filename);
filename += ".png";
sf::Image image = window.capture();
sf::Texture window_texture;
window_texture.create(window.getSize().x, window.getSize().y);
window_texture.update(window);
sf::Image image = window_texture.copyToImage();
image.saveToFile(path + filename);
}