X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Flevel.h;fp=src%2Flevel.h;h=0a1a6058c6916b79bf26cf9262ccac130a391741;hb=d5f45e3128c537f272615cf76242e1dfebccdee7;hp=260ed0abbe7bb9b66fa9201bc5b8e59c39de97b8;hpb=dd7ce87b0ad2b8a1b4758bcc9354e993b71c8599;p=raydungeon diff --git a/src/level.h b/src/level.h index 260ed0a..0a1a605 100644 --- a/src/level.h +++ b/src/level.h @@ -9,22 +9,29 @@ enum { CELL_SOLID, CELL_OPEN }; struct level_cell { int type; unsigned int wallflags[4]; + int visited; }; -struct level_span { - int start, len; +struct level_rect { + int x, y, w, h; + unsigned char dbgcol[4]; }; struct level { int xsz, ysz; + float scale; struct level_cell *cells; + int sx, sy; - struct level_span *hspans, *vspans; /* dynamic array */ + struct level_rect *rects; /* darr, empty spaces */ }; void init_level(struct level *lvl); void destroy_level(struct level *lvl); +void lvl_gen_rects(struct level *lvl); + +int save_level(const struct level *lvl, const char *fname); int load_level(struct level *lvl, const char *fname); #endif /* LEVEL_H_ */