1
0
Fork 0

source/System/File.cpp: move path stuff to Path.cpp

This commit is contained in:
Henrik Hautakoski 2020-01-10 00:45:11 +01:00
parent 66f3bb30d9
commit 1a218532c0
No known key found for this signature in database
GPG key ID: 96765B12FEAC4745
8 changed files with 50 additions and 30 deletions

View file

@ -1,5 +1,5 @@
#include <Spectre/System/File.h>
#include <Spectre/System/Path.h>
#include <Spectre/System/Log.h>
#include <Spectre/Graphics/Image.h>
#include "ImageLoader.h"
@ -61,7 +61,7 @@ bool ImageLoader::loadFromMemory(const void *data, unsigned size, Image& img)
// TODO: Support more formats.
bool ImageLoader::saveToFile(const Image& img, const char *filename)
{
std::string ext = file::getExtension(filename);
std::string ext = Path::getExtension(filename);
std::vector<unsigned char> encoded_data;
if (ext == "png") {

View file

@ -1,6 +1,6 @@
#include <fstream>
#include <Spectre/System/File.h>
#include <Spectre/System/Path.h>
#include <Spectre/Graphics/Shader.h>
#include <Graphics/GL/gl.h>
@ -37,7 +37,7 @@ bool Shader::loadFromFile(const std::string& file)
// If this shader does not have a name, pick the filename.
if (m_name.length() < 1) {
m_name = file::getBasename(file);
m_name = Path::getBasename(file);
}
// Load file into memory.

View file

@ -1,7 +1,7 @@
#include <Spectre/Math/Color.h>
#include <Spectre/Graphics/ShaderProgram.h>
#include <Spectre/System/File.h>
#include <Spectre/System/Path.h>
#include <Graphics/GL/gl.h>
namespace sp {
@ -38,7 +38,7 @@ void ShaderProgram::addShader(const Shader& shader)
bool ShaderProgram::loadFromFile(const std::string& filename)
{
std::string extension = file::getExtension(filename);
std::string extension = Path::getExtension(filename);
// Meta file. load real shaders.
if (extension == "shader.glsl") {