playergame/src/map.h

26 lines
521 B
C

char readmap(int x, int y) {
if (x > (mapwidth - 1)) {
return '&';
}
if (y > (mapheight - 1)) {
return '&';
}
if (x < 0) {
return '&';
}
if (y < 0) {
return '&';
}
return maptest[y][x]; //TODO make it be able to rrad feom multiple maps but idk how to do that
}
int render_map(void) {
int x;
int y;
for(y = 0; y < 40; y++) {
for(x = 0; x < 80; x++) {
zom_putcharat(x, y, readmap(x, y));
}
}
return 0;
}