diff --git a/framework2/WeatherLoader.cpp b/framework2/WeatherLoader.cpp index b4a848fd..fd74782e 100644 --- a/framework2/WeatherLoader.cpp +++ b/framework2/WeatherLoader.cpp @@ -59,9 +59,9 @@ bool WeatherLoader::load(const std::string &filename) return true; } -GTAData::RGB WeatherLoader::readRGB(std::stringstream &ss) +GTATypes::RGB WeatherLoader::readRGB(std::stringstream &ss) { - GTAData::RGB color; + GTATypes::RGB color; std::string r, g, b; std::getline(ss, r, ' '); diff --git a/framework2/include/renderwure/engine/GTAData.hpp b/framework2/include/renderwure/engine/GTAData.hpp index f171be6e..ba5847ae 100644 --- a/framework2/include/renderwure/engine/GTAData.hpp +++ b/framework2/include/renderwure/engine/GTAData.hpp @@ -32,24 +32,6 @@ public: bool archived; /// Is the file inside an IMG or on the filesystem? std::string path; /// Path to the file containing the file }; - - /** - * @struct RGB - * Stores 8 bit RGB data - */ - struct RGB - { - uint8_t r, g, b; - }; - - /** - * @struct RGBA - * Stores 8 bit RGBA data - */ - struct RGBA - { - uint8_t r, g, b, a; - }; /** * ctor diff --git a/framework2/include/renderwure/engine/GTATypes.hpp b/framework2/include/renderwure/engine/GTATypes.hpp new file mode 100644 index 00000000..d802b461 --- /dev/null +++ b/framework2/include/renderwure/engine/GTATypes.hpp @@ -0,0 +1,30 @@ +#pragma once +#ifndef _GTATYPES_HPP_ +#define _GTATYPES_HPP_ + +#include + +namespace GTATypes +{ + +/** + * @struct RGB + * Stores 8 bit RGB data + */ +struct RGB +{ + uint8_t r, g, b; +}; + +/** + * @struct RGBA + * Stores 8 bit RGBA data + */ +struct RGBA +{ + uint8_t r, g, b, a; +}; + +} + +#endif \ No newline at end of file diff --git a/framework2/include/renderwure/loaders/WeatherLoader.hpp b/framework2/include/renderwure/loaders/WeatherLoader.hpp index cb81ec1d..12363528 100644 --- a/framework2/include/renderwure/loaders/WeatherLoader.hpp +++ b/framework2/include/renderwure/loaders/WeatherLoader.hpp @@ -2,21 +2,22 @@ #ifndef _WEATHERLOADER_HPP_ #define _WEATHERLOADER_HPP_ -#include +#include #include #include +#include class WeatherLoader { public: struct WeatherData { - GTAData::RGB ambientColor; - GTAData::RGB directLightColor; - GTAData::RGB skyTopColor; - GTAData::RGB skyBottomColor; - GTAData::RGB sunCoreColor; - GTAData::RGB sunCoronaColor; + GTATypes::RGB ambientColor; + GTATypes::RGB directLightColor; + GTATypes::RGB skyTopColor; + GTATypes::RGB skyBottomColor; + GTATypes::RGB sunCoreColor; + GTATypes::RGB sunCoronaColor; float sunCoreSize; float sunCoronaSize; float sunBrightness; @@ -26,9 +27,9 @@ public: float farClipping; float fogStart; float amountGroundLight; - GTAData::RGB lowCloudColor; - GTAData::RGB topCloudColor; - GTAData::RGB bottomCloudColor; + GTATypes::RGB lowCloudColor; + GTATypes::RGB topCloudColor; + GTATypes::RGB bottomCloudColor; uint8_t unknown[4]; }; @@ -37,7 +38,7 @@ public: std::vector weather; private: - GTAData::RGB readRGB(std::stringstream &ss); + GTATypes::RGB readRGB(std::stringstream &ss); }; #endif \ No newline at end of file