1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * Mupen64plus - COLOR.h *
3 * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
4 * Copyright (C) 2002 Rice1964 *
6 * This program 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 2 of the License, or *
9 * (at your option) any later version. *
11 * This program 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. *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, write to the *
18 * Free Software Foundation, Inc., *
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
20 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
25 typedef struct _COLORVALUE
34 typedef struct XCOLOR {
42 XCOLOR( unsigned int argb );
43 XCOLOR( const float * );
44 XCOLOR( const COLORVALUE& );
45 XCOLOR( float r, float g, float b, float a );
48 operator unsigned int () const;
51 operator const float* () const;
53 operator COLORVALUE* ();
54 operator const COLORVALUE* () const;
56 operator COLORVALUE& ();
57 operator const COLORVALUE& () const;
59 // assignment operators
60 XCOLOR& operator += ( const XCOLOR& );
61 XCOLOR& operator -= ( const XCOLOR& );
62 XCOLOR& operator *= ( float );
63 XCOLOR& operator /= ( float );
66 XCOLOR operator + () const;
67 XCOLOR operator - () const;
70 XCOLOR operator + ( const XCOLOR& ) const;
71 XCOLOR operator - ( const XCOLOR& ) const;
72 XCOLOR operator * ( float ) const;
73 XCOLOR operator / ( float ) const;
75 friend XCOLOR operator * (float, const XCOLOR& );
77 bool operator == ( const XCOLOR& ) const;
78 bool operator != ( const XCOLOR& ) const;