fixed the macros

This commit is contained in:
Solomon W. 2020-05-28 15:27:11 -04:00
parent 3cb2c936fd
commit a35793128b
2 changed files with 28 additions and 12 deletions

View File

@ -1,9 +1,9 @@
#include "Color.h"
myColor::myColor(float r,float g,float b,float a) {
Color::Color(Uint8 r,Uint8 g,Uint8 b,Uint8 a) {
this->r=r;
this->g=g;
this->b=b;
this->a=a;
}
myColor::myColor() {}
Color::Color() {};

View File

@ -1,13 +1,29 @@
#define RED_f4 1.0f,0.0f,0.0f,1.0f
#define GREEN_f4 0.0f,1.0f,0.0f,1.0f
#define BLUE_f4 0.0f,0.0f,1.0f,1.0f
#define PURPLE_f4 1.0f,0.0f,1.0f,1.0f
#define WHITE_f4 1.0f,1.0f,1.0f,1.0f
#define BLACK_f4 0.0f,0.0f,0.0f,1.0f
#include <stdint.h>
class myColor {
#ifndef RED
#define RED 255,0,0,255
#endif
#ifndef GREEN
#define GREEN 0,255,0,255
#endif
#ifndef BLUE
#define BLUE 0,0,255,255
#endif
#ifndef PURPLE
#define PURPLE 255,0,255,255
#endif
#ifndef WHITE
#define WHITE 255,255,255,255
#endif
#ifndef BLACK
#define BLACK 0,0,0,255
#endif
typedef unsigned char Uint8;
class Color {
public:
float r,g,b,a;
myColor();
myColor(float r,float g,float b,float a);
uint8_t r,g,b,a;
Color();
Color(uint8_t r,uint8_t g,uint8_t b,uint8_t a);
};