Project

General

Profile

Statistics
| Revision:

root / proj / maps / map1.h @ 360

History | View | Annotate | Download (757 Bytes)

1
#ifndef MAP1_H_INCLUDED
2
#define MAP1_H_INCLUDED
3

    
4
#include "map1.xpm"
5
#include "map1_collide.xpm"
6

    
7
#include "libs.h"
8

    
9
static map_t* get_map1(void){
10
    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
    free(ret); free(ret_collide);
20
    return r;
21
}
22

    
23
#endif /* end of include guard: MAP_H_INCLUDED */