File: skins.h

package info (click to toggle)
gnurobbo 0.66%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,648 kB
  • sloc: ansic: 18,344; sh: 285; makefile: 212
file content (99 lines) | stat: -rw-r--r-- 3,105 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*  GNU Robbo
 *  Copyright (C) 2002-2010 The GNU Robbo Team (see AUTHORS).
 *
 *  GNU Robbo is free software - you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2, or (at your option)
 *  any later version.
 *
 *  GNU Robbo is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the impled warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with GNU CC; see the file COPYING. If not, write to the
 *  Free Software Foundation, 59 Temple Place - Suite 330,
 *  Boston, MA 02111-1307, USA.
 *
 */

/* Defines */
#define MAX_SKINS 10
#define DEFAULT_SKIN "tronic"

#define FONTSIZE16 10
#define FONTSIZE32 20

/* Default colours used throughout */
#define BACKGROUND_COLOUR 0x000000
#define VERSION_TEXT_COLOUR 0xFF8000
#define GENERAL_TEXT_COLOUR 0xFFFFFF
#define MENU_TEXT_COLOUR 0xFFFFFF
#define MENU_SELECTED_TEXT_COLOUR 0x639ACE
#define MENU_SELECTED_LIMIT_TEXT_COLOUR 0xFF0000
#define MENU_GREYED_TEXT_COLOUR 0x909090
#define DEFAULT_CONTROLS_TEXT_COLOUR 0xFF0000
#define CREDITS_TEXT_COLOUR 0xFF8000
#define HELP_TILE_COLOUR 0x709070
#define FADE_COLOUR 0x000000
#define AUTHOR_TEXT_COLOUR 0xFFFFFF
#define DESIGNER_TEXT_COLOUR 0xFFFF00
#define DESIGNER_GAMEOBJ_TILE_COLOUR 0x0000F0
#define DESIGNER_OBJS_TILE_COLOUR 0x6F006F
#define DESIGNER_OBJV_TILE_COLOUR 0x202020

/* Variables */
SDL_Surface *wm_icon;
SDL_Surface *icons;
SDL_Surface *ciphers;
SDL_Surface *alpha;
SDL_Surface *bgrnd;
TTF_Font *font;

SDL_Rect robbo_images_srcrect[8];
SDL_Rect score_images_srcrect[10];
SDL_Rect score_screw_srcrect;
SDL_Rect score_key_srcrect;
SDL_Rect score_bullet_srcrect;
SDL_Rect score_level_srcrect;

struct skin
{
  char foldername[100];		/* e.g. tronic */
  char name[60];		/* e.g. Tronic */
  char author[60];
  char about[3][60];		/* Up to 3 lines of text */
  char soundskin[60];		/* file name of the sound skin */
  Uint32 background_colour;
  Uint32 version_text_colour;
  Uint32 general_text_colour;
  Uint32 menu_text_colour;
  Uint32 menu_selected_text_colour;
  Uint32 menu_selected_limit_text_colour;
  Uint32 menu_greyed_text_colour;
  Uint32 default_controls_text_colour;
  Uint32 credits_text_colour;
  Uint32 help_tile_colour;
  Uint32 fade_colour;
  Uint32 author_text_colour;
  Uint32 designer_text_colour;
  Uint32 designer_GAMEOBJ_tile_colour;
  Uint32 designer_OBJS_tile_colour;
  Uint32 designer_OBJV_tile_colour;
};
struct skin skins[MAX_SKINS];

int skin_count;			/* How many skins are in the list */
int selected_skin;		/* Which skin in the list is currently selected */
int temp_selected_skin;

/* Function prototypes */
int find_all_skins (void);
void read_skinrc_files (void);
void sort_skins (void);
int read_skin_level_colour_override (void);
void load_selected_skin (void);
void set_wm_icon (void);
SDL_Surface *create_skin_preview (void);
void load_TTF_font (void);