mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
Removed sdl color conversion from Color.
This commit is contained in:
parent
16746f513d
commit
a723d748a7
@ -18,26 +18,6 @@ void ColorUInt8::from_key(const uint32_t key) {
|
||||
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() {
|
||||
r = 0;
|
||||
g = 0;
|
||||
|
@ -4,10 +4,6 @@
|
||||
#include "core/typedefs.h"
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef SDL_AVAILABLE
|
||||
#include <SDL.h>
|
||||
#endif
|
||||
|
||||
//Todo add float version
|
||||
//Not sure but probably that should be the default
|
||||
|
||||
@ -16,11 +12,6 @@ public:
|
||||
uint32_t to_key() const;
|
||||
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) {
|
||||
return components[idx];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user