File: icons.h

package info (click to toggle)
ale-clone 1.15pre16.3-1
  • links: PTS
  • area: contrib
  • in suites: potato
  • size: 2,432 kB
  • ctags: 3,217
  • sloc: ansic: 37,483; sh: 1,105; makefile: 343
file content (67 lines) | stat: -rw-r--r-- 1,862 bytes parent folder | download
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
/*
**	A clone of a famous game.
*/
/**@name icons.h	-	The icons headerfile. */
/*
**	(c) Copyright 1998,1999 by Lutz Sammer
**
**	$Id: icons.h,v 1.13 1999/11/21 21:59:49 root Exp $
*/

#ifndef __ICONS_H__
#define __ICONS_H__

//@{

/*----------------------------------------------------------------------------
--	Icons
----------------------------------------------------------------------------*/

#define IconActive	1		/// cursor on icon
#define IconClicked	2		/// mouse button down on icon
#define IconSelected	4		/// this the selected icon

#define ICON_WIDTH	46		/// icon width in panels
#define ICON_HEIGHT	38		/// icon height in panels

/*----------------------------------------------------------------------------
--	Icons names for the slots
----------------------------------------------------------------------------*/

/**
**	Icon referencing
*/
typedef unsigned IconId;

#define NoIcon	-1			/// used for errors no valid icon

/**
**      Icon definition
*/
typedef struct _icon_config_ {
    char*	Name;			/// config icon name
    IconId	Icon;			/// identifier to use to run time
} IconConfig;

#define IconMax			195	/// Maximum used icon number

/*----------------------------------------------------------------------------
--	Variables
----------------------------------------------------------------------------*/

/*----------------------------------------------------------------------------
--	Functions
----------------------------------------------------------------------------*/

extern void LoadIcons(void);				/// load icons
extern void CleanIcons(void);				/// cleanup

extern IconId IconByIdent(const char* ident);		/// name -> icon
extern const char* IdentOfIcon(IconId icon);		/// icon -> name

    /// draw icons of an unit
extern void DrawUnitIcon(IconId num,unsigned flags,unsigned x,unsigned y);

//@}

#endif	// !__ICONS_H__