src/colors.h

Sun, 19 Jan 2020 02:54:48 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sun, 19 Jan 2020 02:54:48 +0200
changeset 22
6da867fa5429
parent 21
0133e565e072
child 24
1a0faaaceb84
permissions
-rw-r--r--

commit work on GL rendering

#pragma once
#include "main.h"

struct Color
{
	qint32 index;
};

inline bool operator==(const Color& one, const Color& other)
{
	return one.index == other.index;
}

inline bool operator!=(const Color& one, const Color& other)
{
	return one.index != other.index;
}

inline bool operator<(const Color& one, const Color& other)
{
	return one.index < other.index;
}

inline bool operator<=(const Color& one, const Color& other)
{
	return one.index <= other.index;
}

inline bool operator>(const Color& one, const Color& other)
{
	return one.index > other.index;
}

inline bool operator>=(const Color& one, const Color& other)
{
	return one.index >= other.index;
}

namespace colors
{
	static constexpr Color black {0};
	static constexpr Color blue {1};
	static constexpr Color green {2};
	static constexpr Color red {4};
	static constexpr Color yellow {14};
	static constexpr Color white {15};
	static constexpr Color main {16};
	static constexpr Color edge {24};
}

mercurial