X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Flevel.h;h=ed32ce1a665af9e1fc8b7cdd4cd16fa50a19026f;hb=5e41feadc19dbc9cda954543cf2b2649ced835b4;hp=95ab9d98d517981bee88dfda0469d180c77268aa;hpb=5d7112b5fad9e69a556898a705eeef2307bb83d9;p=gbajam22 diff --git a/src/level.h b/src/level.h index 95ab9d9..ed32ce1 100644 --- a/src/level.h +++ b/src/level.h @@ -38,6 +38,7 @@ struct cell { struct level { int width, height; + int orgx, orgy; unsigned int xmask; struct cell *cells; @@ -45,17 +46,18 @@ struct level { struct item *items; /* populated by calc_vis */ - struct cell **vis; + struct cell *vis[128]; int numvis; }; +struct player; struct level *init_level(const char *descstr); void free_level(struct level *lvl); -void upd_vis(struct level *lvl, int32_t px, int32_t py, int32_t angle); +void upd_vis(struct level *lvl, struct player *p); -void cell_to_pos(int cx, int cy, int32_t *px, int32_t *py); -void pos_to_cell(int32_t px, int32_t py, int *cx, int *cy); +void cell_to_pos(struct level *lvl, int cx, int cy, int32_t *px, int32_t *py); +void pos_to_cell(struct level *lvl, int32_t px, int32_t py, int *cx, int *cy); #endif /* LEVEL_H_ */