OSDN Git Service

Merge branch 'develop' into macos-develop
[hengbandforosx/hengbandosx.git] / src / system / grafmode.h
1 /**
2  * \file grafmode.h
3  * \brief Load a list of possible graphics modes.
4  *
5  * Copyright (c) 2011 Brett Reid
6  *
7  * This work is free software; you can redistribute it and/or modify it
8  * under the terms of either:
9  *
10  * a) the GNU General Public License as published by the Free Software
11  *    Foundation, version 2, or
12  *
13  * b) the "Angband licence":
14  *    This software may be copied and distributed for educational, research,
15  *    and not for profit purposes provided that this copyright and statement
16  *    are included in all such copies.  Other copyrights may also apply.
17  */
18 /* Imported from Angband 4.2 to support main-cocoa.m in Hengband. */
19 #ifndef INCLUDED_GRAFMODE_H
20 #define INCLUDED_GRAFMODE_H
21
22 #include "system/h-basic.h"
23
24 /**
25  * Default graphic modes
26  */
27 #define GRAPHICS_NONE           0
28
29
30 /**
31  * Specifications for graphics modes.
32  * 
33  * grafID:      ID of tile set should be >0 and unique for anything new.
34  * alphablend:  Bool whether or not the tileset needs alpha blending.
35  * overdrawRow: Row in the file where tiles in that row or lower draw the tile
36  *              above as well.
37  * overdrawMax: Row in the file where tiles in that row or above draw the tile
38  *              above as well.
39  * cell_width:  Width of an individual tile in pixels.
40  * cell_height: Height of an individual tile in pixels.
41  * pref:        Value of ANGBAND_GRAF variable.
42  * file:        Name of PNG file (if any).
43  * menuname:    Name of the tileset in menu.
44  */
45 typedef struct _graphics_mode {
46         struct _graphics_mode *pNext;
47         byte grafID;
48         byte alphablend;
49         byte overdrawRow;
50         byte overdrawMax;
51         uint16_t cell_width;
52         uint16_t cell_height;
53         char path[256];
54         char pref[32];
55         char file[32];
56         char menuname[32];
57         /*
58          * This is a hack for Hengband:  ANGBAND_GRAF set to this rather
59          * then the pref field above.
60          */
61         char graf[32];
62 } graphics_mode;
63
64 extern graphics_mode *graphics_modes;
65 extern graphics_mode *current_graphics_mode;
66 extern int graphics_mode_high_id;
67
68 bool init_graphics_modes();
69 void close_graphics_modes(void);
70 graphics_mode* get_graphics_mode(byte id);
71
72 #endif /* INCLUDED_GRAFMODE_H */