namespace rogue_unlike { /** a helper structure to mass to powerfun */ struct data { int keystate; double d; ld modv; ld moda; int dx; struct power *p; }; using powerfun = hr::function; struct power { int key; string name; string desc; string glyph; color_t color; powerfun pf; int id_status; int qty_filled; int qty_owned; flagtype flags; void init(); hr::function act, paused_act; hr::function get_name; hr::function get_desc; hr::function get_glyph; hr::function get_color; hr::function picked_up; power& is_starting(); power& be_weapon(); power& be_resource(string plural); power& while_paused(); power& identified_name(string, string); }; extern vector powers; struct bbox { int minx, miny, maxx, maxy; bool operator != (bbox& a) { return minx != a.minx || miny != a.miny || maxx != a.maxx || maxy != a.maxy; } }; bool intersect(bbox a, bbox b); struct room { // texture::texture_data *room_texture; string roomname; renderbuffer *rbuf; cell *where; char block_at[room_y][room_x]; bool fov[room_y][room_x]; bool which_map_rendered; bool infile, need_rerender; vector> entities; eWall at(int x, int y) { return eWall(block_at[y][x] >> 3); } void clear() { for(int y=0; ymaster->distance; if(ylev <= 0) for(int y=room_y-6; y