#include "stdafx.h"
#include "ogColor.h"

RGBA::RGBA(BYTE _r, BYTE _g, BYTE _b, BYTE _a) {
	r = _r; g = _g; b = _b; a = _a;
}

RGBA::RGBA(DWORD c) {
	color = c;
}

void RGBA::set(BYTE _r, BYTE _g, BYTE _b, BYTE _a) {
	r = _r; g = _g; b = _b; a = _a;
}

void RGBA::set(DWORD c) {
	color = c;
}

// standard colors
CBaseColors baseColors;

CBaseColors::CBaseColors() {
	colors[0].color = 0xFF1D19B4;
	colors[1].color = 0xFF2C6836;
	colors[2].color = 0xFF7F3C32;
	colors[3].color = 0xFFF1CBAC;
	colors[4].color = 0xFFE1E1E1;
	colors[5].color = 0xFF000000;
	colors[6].color = 0xFF106290;
	colors[7].color = 0xFFFC6EA8;
	colors[8].color = 0xFF969696;
	colors[9].color = 0xFF110F68;
	colors[10].color = 0xFF1F4726;
	colors[11].color = 0xFF63C0E2;
	colors[12].color = 0xFF6B5A4A;
	colors[13].color = 0xFFC81914;
	colors[14].color = 0xFF00FFFF;
}

RGBA * CBaseColors::get(RGBA *c, int index) {
	if (index < 15)
		c->color = colors[index].color;
	return c;
}

RGBA * CBaseColors::get(RGBA *c, int index, BYTE alpha) {
	if (index < 15) {
		c->color = colors[index].color;
		c->a = alpha;
	}
	return c;
}