src/colors.h

Sun, 19 Jan 2020 13:53:07 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sun, 19 Jan 2020 13:53:07 +0200
changeset 23
3387a84ddaba
parent 21
0133e565e072
child 24
1a0faaaceb84
permissions
-rw-r--r--

fixed a pile of nonsense that caused subfiles to go haywire

#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