#include "RGBA.h" #include "begin_code.h" RGBA::RGBA(int R, int G, int B, int A) { r = R; g = G; b = B; a = A; } RGBA::RGBA(ColorMode mode, int A) { r = mode.r; g = mode.g; b = mode.b; a = A; } RGBA::RGBA() { r = g = b = a = 0; } SDL_Color RGBA::toSDLColor() const { SDL_Color c; c.r = r; c.g = g; c.b = b; c.a = a; return c; } ColorMode RGBA::toColorMode() const { return ColorMode(r, g, b); } #include "end_code.h"