OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
material.h
Go to the documentation of this file.
1 /*
2  * mape - C4 Landscape.txt editor
3  *
4  * Copyright (c) 2005-2009, Armin Burgmeier
5  *
6  * Distributed under the terms of the ISC license; see accompanying file
7  * "COPYING" for details.
8  *
9  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
10  * See accompanying file "TRADEMARK" for details.
11  *
12  * To redistribute this file separately, substitute the full license texts
13  * for the above references.
14  */
15 
16 #ifndef INC_MAPE_MATERIAL_MAP_H
17 #define INC_MAPE_MATERIAL_MAP_H
18 
19 #include <glib-object.h>
20 
21 #include "mape/group.h"
22 #include "mape/texture.h"
23 
24 G_BEGIN_DECLS
25 
26 #define MAPE_TYPE_MATERIAL_MAP (mape_material_map_get_type())
27 #define MAPE_MATERIAL_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), MAPE_TYPE_MATERIAL_MAP, MapeMaterialMap))
28 #define MAPE_MATERIAL_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), MAPE_TYPE_MATERIAL_MAP, MapeMaterialMapClass))
29 #define MAPE_IS_MATERIAL_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), MAPE_TYPE_MATERIAL_MAP))
30 #define MAPE_IS_MATERIAL_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MAPE_TYPE_MATERIAL_MAP))
31 #define MAPE_MATERIAL_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MAPE_TYPE_MATERIAL_MAP, MapeMaterialMapClass))
32 
33 #define MAPE_TYPE_MATERIAL (mape_material_get_type())
34 
35 typedef struct _MapeMaterial MapeMaterial;
36 
39 
47 typedef enum _MapeMaterialMapError {
50 
57  /*< private >*/
58  GObjectClass parent_class;
59 };
60 
68  /*< private >*/
69  GObject parent;
70 };
71 
72 GType
73 mape_material_get_type(void) G_GNUC_CONST;
74 
75 GType
76 mape_material_map_get_type(void) G_GNUC_CONST;
77 
80 
81 gboolean
83  MapeGroup* from,
84  GError** error);
85 
86 guint
88 
89 void
91  MapeTextureMap* texmap);
92 
93 const MapeMaterial*
95  guint index);
96 
99  const gchar* name);
100 
101 const gchar*
102 mape_material_get_name(const MapeMaterial* material);
103 
104 const gchar*
106 
107 G_END_DECLS
108 
109 #endif /* INC_MAPE_MATERIAL_MAP_H */
110 
111 /* vim:set et sw=2 ts=2: */
enum _MapeMaterialMapError MapeMaterialMapError
gboolean mape_material_map_load(MapeMaterialMap *map, MapeGroup *from, GError **error)
Definition: material.c:242
GObjectClass parent_class
Definition: material.h:58
GObject parent
Definition: material.h:69
const gchar * mape_material_get_name(const MapeMaterial *material)
Definition: material.c:371
MapeMaterialMap * mape_material_map_new(void)
Definition: material.c:223
GType mape_material_map_get_type(void) G_GNUC_CONST
MapeMaterial * mape_material_map_get_material_by_name(MapeMaterialMap *map, const gchar *name)
Definition: material.c:336
const gchar * mape_material_get_texture_overlay(const MapeMaterial *material)
Definition: material.c:388
GType mape_material_get_type(void) G_GNUC_CONST
Definition: material.c:194
const MapeMaterial * mape_material_map_get_material(MapeMaterialMap *map, guint index)
Definition: material.c:310
_MapeMaterialMapError
Definition: material.h:47
void mape_material_map_set_default_textures(MapeMaterialMap *matmap, MapeTextureMap *texmap)
Definition: material.c:290
struct _MapeMaterial MapeMaterial
Definition: material.h:35
guint mape_material_map_get_material_count(MapeMaterialMap *map)
Definition: material.c:274