1 /**********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
15 #include <fc_config.h>
22 #include "qtg_cxxside.h"
26 /****************************************************************************
27 Allocate a color (adjusting it for our colormap if necessary on paletted
28 systems) and return a pointer to it.
29 ****************************************************************************/
30 struct color
*qtg_color_alloc(int r
, int g
, int b
)
32 struct color
*pcolor
= new color
;
34 pcolor
->qcolor
.setRgb(r
, g
, b
);
39 /****************************************************************************
40 Free a previously allocated color. See qtg_color_alloc.
41 ****************************************************************************/
42 void qtg_color_free(struct color
*pcolor
)