ff7tk
0.80.25
Work with Final Fantasy 7 game data
src
utils
PsColor.h
Go to the documentation of this file.
1
/****************************************************************************/
2
// copyright 2009 - 2021 Jérôme Arzel <myst6re@gmail.com> //
3
// //
4
// This file is part of FF7tk //
5
// //
6
// FF7tk is free software: you can redistribute it and/or modify //
7
// it under the terms of the GNU General Public License as published by //
8
// the Free Software Foundation, either version 3 of the License, or //
9
// (at your option) any later version. //
10
// //
11
// FF7tk is distributed in the hope that it will be useful, //
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
14
// GNU General Public License for more details. //
15
/****************************************************************************/
16
#pragma once
17
18
#include <QtCore>
19
#include <QRgb>
20
#include "ff7tkutils_export.h"
21
22
#define COEFF_COLOR 8.2258064516129032258064516129032
// 255/31
23
24
#define psColorAlphaBit(color) \
25
((color >> 15) & 1)
26
#define setPsColorAlphaBit(color, alpha) \
27
((color & 0x7FFF) | (alpha << 15))
28
29
class
FF7TKUTILS_EXPORT
PsColor
30
{
31
public
:
32
static
quint16 toPsColor(
const
QRgb &color);
33
static
QRgb fromPsColor(quint16 color,
bool
useAlpha =
false
);
34
};
PsColor
Definition:
PsColor.h:30
Generated by
1.9.3