Skip to content
Snippets Groups Projects
map.h 443 B
Newer Older
Le-Bao-Tin.Ha's avatar
Le-Bao-Tin.Ha committed
/*
// Created by Tiny on 2/16/2021.
*/

#ifndef INSAGAME_MAP_H
#define INSAGAME_MAP_H

Le-Bao-Tin.Ha's avatar
Le-Bao-Tin.Ha committed
typedef struct {
Le-Bao-Tin.Ha's avatar
Le-Bao-Tin.Ha committed
	char *path; //path of image bmp of map
Le-Bao-Tin.Ha's avatar
Le-Bao-Tin.Ha committed
	int width;
	int height;
Le-Bao-Tin.Ha's avatar
Le-Bao-Tin.Ha committed
	int **functional; //2D functional matrix
Le-Bao-Tin.Ha's avatar
Le-Bao-Tin.Ha committed
} MAP;

Le-Bao-Tin.Ha's avatar
Le-Bao-Tin.Ha committed
int initmap(MAP *map,char *path); //allocate the map's name and call the maptomatrix
int **maptomatrix(MAP *map); //get matrix'length and width => create a functional matrix from the bmp matrix
Le-Bao-Tin.Ha's avatar
Le-Bao-Tin.Ha committed




#endif /*INSAGAME_MAP_H*/