Freeciv-3.3
Loading...
Searching...
No Matches
themebackgrounds.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 2005 - The Freeciv Project
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)
6 any later version.
7
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***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18/* utility */
19#include "registry.h"
20#include "mem.h"
21
22/* client/gui-sdl2 */
23#include "graphics.h"
24#include "themespec.h"
25
26#include "themebackgrounds.h"
27
31
32static char *background_names[] = {
33 "changeresearchdlg",
34 "choosegovernmentdlg",
35 "citydlg",
36 "citygovdlg",
37 "cityrep",
38 "connectdlg",
39 "connlistdlg",
40 "economydlg",
41 "hlpdlg",
42 "joingamedlg",
43 "loadgamedlg",
44 "mainpage",
45 "messagewin",
46 "nationdlg",
47 "newcitydlg",
48 "optiondlg",
49 "revolutiondlg",
50 "sciencedlg",
51 "spystealdlg",
52 "startmenu",
53 "unitsrep",
54 "userpasswddlg",
55 "wldlg",
56};
57
58/************************************************************************/
62{
63 int i;
65
67
68 for (i = 0; i < BACKGROUND_LAST; i++) {
69 backgrounds->backgrounds[i] =
70 themespec_gfx_filename(secfile_lookup_str(file, "backgrounds.%s",
72 }
73
74 return backgrounds;
75}
76
77/************************************************************************/
81{
82 int i;
83
84 for (i = 0; i < BACKGROUND_LAST; i++) {
85 FC_FREE(backgrounds->backgrounds[i]);
86 }
87
89}
90
91/************************************************************************/
95 enum theme_background background)
96{
98}
char * incite_cost
Definition comments.c:76
SDL_Surface * load_surf(const char *fname)
Definition graphics.c:307
struct theme_background_system * theme_background_system_read(struct section_file *file)
void theme_background_system_free(struct theme_background_system *backgrounds)
SDL_Surface * theme_get_background(const struct theme *t, enum theme_background background)
static char * background_names[]
theme_background
@ BACKGROUND_LAST
char * themespec_gfx_filename(const char *gfx_filename)
Definition themespec.c:690
struct theme_background_system * theme_get_background_system(const struct theme *t)
Definition themespec.c:1114
#define fc_assert_ret_val(condition, val)
Definition log.h:195
#define FC_FREE(ptr)
Definition mem.h:41
#define fc_malloc(sz)
Definition mem.h:34
const char * secfile_lookup_str(const struct section_file *secfile, const char *path,...)
#define ARRAY_SIZE(x)
Definition shared.h:85
char * backgrounds[BACKGROUND_LAST]