spacebox/src/extension.hpp

47 lines
1.1 KiB
C++

#ifndef extension_h_
#define extension_h_
#include <vector>
#include <iostream>
#include <regex>
#include <sstream>
#include <algorithm>
#include <iomanip>
#define GLM_ENABLE_EXPERIMENTAL
#include "glm/trigonometric.hpp"
#include "glm/vec2.hpp"
#include "glm/gtx/vector_angle.hpp"
#include "SDL.h"
#include "Box.hpp"
#include "filesystem.hpp"
namespace sfw
{
glm::vec2 get_step(glm::vec2, glm::vec2, float);
void set_magnitude(glm::vec2&, float);
Box get_texture_box(SDL_Texture*);
void fill_texture(SDL_Renderer*, SDL_Texture*, int, int, int, int = 0xff);
void fill_texture(SDL_Renderer*, SDL_Texture*, SDL_Texture*);
SDL_Texture* duplicate_texture(SDL_Renderer*, SDL_Texture*);
std::vector<fs::path> glob(fs::path);
fs::path get_next_file_name(
fs::path, int = 0, std::string = "", std::string = "");
template<typename T>
std::string pad(T end, int width, char fill = '0')
{
std::stringstream padded;
padded.fill(fill);
padded.width(width);
padded << end;
return padded.str();
}
}
std::ostream& operator<<(std::ostream&, const glm::vec2&);
#endif