Re: How to finding slope of a tile?
Reply #1 –
This can be found all in boden/grund.cc: grund_t::slope is the slope of a tile. It is a bitfield: 0/1 for each corner of the tile.
The vertical slope graphics are computed in grund_t::calc_back_bild(), these graphics belong to the tile in front of them. But there is the restriction that these graphics have max height 2 compared to the base height of the tile in front of them.
But if you want to use these graphics at the border of the map, it will not work: since there are no tiles outside of the map to keep track of the graphics. Here, it would be better to modify simview.cc:
karte_ansicht_t::display(bool force_dirty) directly, where the outside of the map (ie the ocean) is drawn.