playergame/src/map.c
zombie maniac dbd54b9ebe
i have no idea what changed
im just doing this so i can see if gpg key signing works
2023-10-30 18:30:16 -04:00

31 lines
634 B
C

#include "map.h"
#include "scroll.h"
#include "arch/universal.h"
#include "maptest.h"
char readmap(int x, int y) {
if (x > (MAP_WIDTH - 1)) {
return '&';
}
if (y > (MAP_HEIGHT - 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(scrolled_x(x), scrolled_y(y), readmap(x, y));
}
}
return 0;
}