Freeciv-3.2
|
#include "log.h"
#include "shared.h"
#include "player.h"
#include "rgbcolor.h"
#include "colors_g.h"
#include "tilespec.h"
#include "colors_common.h"
Go to the source code of this file.
Data Structures | |
struct | color_system |
Functions | |
struct color_system * | color_system_read (struct section_file *file) |
void | color_system_free (struct color_system *colors) |
struct color * | ensure_color (struct rgbcolor *rgb) |
struct color * | get_color (const struct tileset *t, enum color_std stdcolor) |
bool | player_has_color (const struct player *pplayer) |
struct color * | get_player_color (const struct tileset *t, const struct player *pplayer) |
struct color * | get_terrain_color (const struct tileset *t, const struct terrain *pterrain) |
struct color * | color_best_contrast (struct color *subject, struct color **candidates, int ncandidates) |
struct color * color_best_contrast | ( | struct color * | subject, |
struct color ** | candidates, | ||
int | ncandidates | ||
) |
Find the colour from 'candidates' with the best perceptual contrast from 'subject'.
Definition at line 150 of file colors_common.c.
Referenced by diplo_wdg::diplo_wdg(), and show_full_citybar().
void color_system_free | ( | struct color_system * | colors | ) |
Called when the client first starts to free any allocated colors.
Definition at line 70 of file colors_common.c.
Referenced by tileset_free_toplevel().
struct color_system * color_system_read | ( | struct section_file * | file | ) |
Called when the client first starts to allocate the default colors.
Currently this must be called in ui_main, generally after UI initialization.
Definition at line 44 of file colors_common.c.
Referenced by tileset_read_toplevel().
Return the RGB color, allocating it if necessary.
Definition at line 87 of file colors_common.c.
Referenced by get_color(), get_player_color(), get_terrain_color(), and tileset_background_init().
Return a pointer to the given "standard" color.
Definition at line 100 of file colors_common.c.
Referenced by apply_tags(), apply_text_tag(), calculate_overview_dimensions(), city_dialog_redraw_map(), create_player_icon(), create_tech_tree(), diplo_wdg::diplo_wdg(), draw_calculated_trade_routes(), draw_reqtree(), draw_segment(), draw_selection_rectangle(), draw_trade_route_line(), get_game_color(), link_mark_color(), map_canvas_resized(), overview_tile_color(), put_spaceship(), redraw_overview(), show_full_citybar(), show_small_citybar(), show_tile_label(), and update_map_canvas().
Return the color of the player. In pregame, callers should check player_has_color() before calling this.
Definition at line 125 of file colors_common.c.
Referenced by create_player_icon(), plr_item::data(), diplo_wdg::diplo_wdg(), overview_tile_color(), popup_find_dialog(), show_full_citybar(), tileset_player_init(), update_goto_dialog(), and fc_client::update_start_page().
Return a pointer to the given "terrain" color.
Definition at line 137 of file colors_common.c.
Referenced by overview_tile_color().
Return whether the player has a color assigned yet. Should only be FALSE in pregame.
Definition at line 113 of file colors_common.c.
Referenced by create_player_icon(), tileset_player_init(), and fc_client::update_start_page().