make it possible to override CXX from the command line
[rofl0r-df-libgraphics.git] / g_src / texture_handler.h
blob50b73d12c58df21343a7c31b3000005b154851fd
1 #ifndef TEXTURE_HANDLER_H
2 #define TEXTURE_HANDLER_H
4 #include "textlines.h"
6 struct tile_pagest
8 string token;
10 string filename;
11 short tile_dim_x;
12 short tile_dim_y;
13 short page_dim_x;
14 short page_dim_y;
16 svector<int32_t> texpos;
17 svector<int32_t> datapos;
18 svector<int32_t> texpos_gs;
19 svector<int32_t> datapos_gs;
21 char loaded;
25 tile_pagest()
27 loaded=0;
30 void load_graphics(string &graphics_dir);
33 class texture_handlerst
35 public:
36 svector<tile_pagest *> page;
38 svector<int32_t> texpos;
39 svector<int32_t> datapos;
41 void clean();
42 void adopt_new_lines(textlinesst &lines,string &graphics_dir);
44 ~texture_handlerst()
46 clean();
49 tile_pagest *get_tile_page_by_token(string &tk)
51 int32_t t;
52 for(t=0;t<page.size();t++)
54 if(page[t]->token==tk)return page[t];
56 return NULL;
60 #endif