root / proj / maps / map1.h @ 360
History | View | Annotate | Download (757 Bytes)
1 | 216 | up20180642 | #ifndef MAP1_H_INCLUDED
|
---|---|---|---|
2 | #define MAP1_H_INCLUDED
|
||
3 | |||
4 | #include "map1.xpm" |
||
5 | #include "map1_collide.xpm" |
||
6 | |||
7 | 359 | up20180642 | #include "libs.h" |
8 | 217 | up20180642 | |
9 | 321 | up20180642 | static map_t* get_map1(void){ |
10 | 359 | up20180642 | char **ret = xpm_load_xpm2("/home/lcom/labs/proj/maps/xpm2/map1.xpm2"); |
11 | char **ret_collide = xpm_load_xpm2("/home/lcom/labs/proj/maps/xpm2/map1_collide.xpm2"); |
||
12 | map_t *r = NULL;
|
||
13 | if(ret != NULL && ret_collide != NULL){ |
||
14 | r = map_ctor((const char *const *)ret, (const char *const *)ret_collide); |
||
15 | }else{
|
||
16 | if(ret == NULL) printf("%s: map is NULL\n", __func__); |
||
17 | if(ret_collide == NULL) printf("%s: collide is NULL\n", __func__); |
||
18 | } |
||
19 | 352 | up20180642 | free(ret); free(ret_collide); |
20 | 359 | up20180642 | return r;
|
21 | 216 | up20180642 | } |
22 | |||
23 | #endif /* end of include guard: MAP_H_INCLUDED */ |