void store_backup_explored_flags_for_power_sight(struct PlayerInfo *player, struct Coord3d *soe_pos) { struct Dungeon *dungeon; long stl_x,stl_y; long soe_x,soe_y; dungeon = get_players_dungeon(player); stl_y = (long)soe_pos->y.stl.num - MAX_SOE_RADIUS; for (soe_y=0; soe_y < 2*MAX_SOE_RADIUS; soe_y++,stl_y++) { stl_x = (long)soe_pos->x.stl.num - MAX_SOE_RADIUS; for (soe_x=0; soe_x < 2*MAX_SOE_RADIUS; soe_x++,stl_x++) { if (dungeon->soe_explored_flags[soe_y][soe_x]) { struct Map *mapblk; mapblk = get_map_block_at(stl_x, stl_y); if (!map_block_invalid(mapblk)) { if (map_block_revealed(mapblk, player->id_number)) backup_explored[soe_y][soe_x] |= 0x01; if ((mapblk->flags & MapFlg_Unkn04) != 0) backup_explored[soe_y][soe_x] |= 0x02; if ((mapblk->flags & MapFlg_Unkn80) != 0) backup_explored[soe_y][soe_x] |= 0x04; } } } } }
struct Column *get_column_at(MapSubtlCoord stl_x, MapSubtlCoord stl_y) { struct Map *mapblk; mapblk = get_map_block_at(stl_x, stl_y); if (map_block_invalid(mapblk)) return INVALID_COLUMN; return game.columns.lookup[mapblk->data & 0x7FF]; }
struct Column *get_map_column(const struct Map *mapblk) { if (map_block_invalid(mapblk)) return INVALID_COLUMN; return game.columns.lookup[mapblk->data & 0x7FF]; }