The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
overlay.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003 - 2016 by Fabian Mueller <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #ifndef OVERLAY_INCLUDED
16 #define OVERLAY_INCLUDED
17 
18 #include "halo.hpp"
19 
20 struct overlay
21 {
22 
23  overlay(const std::string& img, const std::string& halo_img,
24  halo::handle handle, const std::string& overlay_team_name, const std::string& item_id, const bool fogged) : image(img), halo(halo_img),
25  team_name(overlay_team_name), id(item_id), halo_handle(handle) , visible_in_fog(fogged)
26  {}
27 
28 
29  overlay(const config& cfg) :
30  image(cfg["image"]), halo(cfg["halo"]), team_name(cfg["team_name"]),
31  name(cfg["name"].t_str()), id(cfg["id"]),
32  halo_handle(), visible_in_fog(cfg["visible_in_fog"].to_bool())
33  {
34  }
35 
41 
44 
45 };
46 
47 
48 #endif
halo::handle halo_handle
Definition: overlay.hpp:42
bool visible_in_fog
Definition: overlay.hpp:43
std::string id
Definition: overlay.hpp:40
GLuint id
Definition: glew.h:1647
t_string name
Definition: overlay.hpp:39
GLuint const GLchar * name
Definition: glew.h:1782
std::string halo
Definition: overlay.hpp:37
Definition: display.hpp:43
GLint GLvoid * img
Definition: glew.h:1353
this module manages the cache of images.
Definition: image.cpp:75
std::string team_name
Definition: overlay.hpp:38
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:83
overlay(const std::string &img, const std::string &halo_img, halo::handle handle, const std::string &overlay_team_name, const std::string &item_id, const bool fogged)
Definition: overlay.hpp:23
GLsizei const GLcharARB ** string
Definition: glew.h:4503
overlay(const config &cfg)
Definition: overlay.hpp:29
boost::shared_ptr< halo_record > handle
Definition: halo.hpp:34
std::string image
Definition: overlay.hpp:36