Removed sdl color conversion from Color.

This commit is contained in:
Relintai 2022-02-04 10:39:53 +01:00
parent 16746f513d
commit a723d748a7
2 changed files with 0 additions and 29 deletions

View File

@ -18,26 +18,6 @@ void ColorUInt8::from_key(const uint32_t key) {
a = (key & 0x000000FF) >> 0; a = (key & 0x000000FF) >> 0;
} }
#ifdef SDL_AVAILABLE
SDL_Color ColorUInt8::to_sdl_color() const {
SDL_Color c;
c.r = r;
c.g = g;
c.b = b;
c.a = a;
return c;
}
void ColorUInt8::from_sdl_color(const SDL_Color &key) {
r = key.r;
g = key.g;
b = key.b;
a = key.a;
}
#endif
ColorUInt8::ColorUInt8() { ColorUInt8::ColorUInt8() {
r = 0; r = 0;
g = 0; g = 0;

View File

@ -4,10 +4,6 @@
#include "core/typedefs.h" #include "core/typedefs.h"
#include <inttypes.h> #include <inttypes.h>
#ifdef SDL_AVAILABLE
#include <SDL.h>
#endif
//Todo add float version //Todo add float version
//Not sure but probably that should be the default //Not sure but probably that should be the default
@ -16,11 +12,6 @@ public:
uint32_t to_key() const; uint32_t to_key() const;
void from_key(const uint32_t key); void from_key(const uint32_t key);
#ifdef SDL_AVAILABLE
SDL_Color to_sdl_color() const;
void from_sdl_color(const SDL_Color &key);
#endif
_FORCE_INLINE_ uint8_t &operator[](int idx) { _FORCE_INLINE_ uint8_t &operator[](int idx) {
return components[idx]; return components[idx];
} }