// an experiment on potential-correct gravity namespace rogue_unlike { bool gravision; array, 256> all_locations; void entity::apply_portal_grav() { ld modv = 60. / game_fps; ld moda = modv * modv; auto d = get_scale(); int bx0 = floor(where_x / block_x); int by0 = floor(where_y / block_y); auto& loc = all_locations[by0][bx0]; auto px = (loc.get(0).potential - loc.get(2).potential) * 255 / 2; auto py = (loc.get(3).potential - loc.get(1).potential) * 255 / 2; vel_x += d * grav() * moda * px; vel_y += d * grav() * moda * py; } void load_nonhyperbolic() { enable(); non_hyperbolic = true; one_room = true; fhstream f("rogueviz/ru/rumap.txt", "rt"); vector rumap; for(int y=0; y(f)); println(hlog, rumap); auto& cr = *current_room; for(int y=0; y= 'a' && rumap[y][x] <= 'z' ? 10*8 : rumap[y][x] >= 'A' && rumap[y][x] <= 'Z' ? 11*8 : 1; for(int y=0; y where_is; for(int y=0; y