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