Ticket #44037

mapgen: Split map_colatitude() into separate functions

Date d'ouverture: 2022-03-06 06:22 Dernière mise à jour: 2022-03-07 21:07

Rapporteur:
Propriétaire:
Type:
État:
Atteints
Composant:
Jalon:
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Fixed
Fichier:
1

Détails

Required for #44036. Split map_colatitude() into

  • an initial function handling tile position and topology, to figure out how far north/south a tile is
  • a second function adding in game settings (alltemperate/singlepole) to compute latitude (signed, for #44035)
  • a final function translating signed latitude into absolute colatitude for the map generator

Splitting the first and second should also enable actual singlepole torus maps with no added effort.

Ticket History (3/4 Histories)

2022-03-06 06:22 Updated by: alienvalkyrie
  • New Ticket "mapgen: Split map_colatitude() into separate functions" created
2022-03-06 06:50 Updated by: alienvalkyrie
  • Résolution Update from Aucun to Accepted
Commentaire

Note that this patch does change the resulting colatitude a bit (because floating-point numbers aren't great for this, and because trying to emulate the old behavior would've made for rather ugly code), so old seeds will not result in exactly the same map. More specifically, colatitude will generally be a little bit lower than before. In particular, the colatitude will generally not actually reach MAX_COLATITUDE anymore on maps with even dimensions, since the exact equator ends up between tiles.

2022-03-07 21:07 Updated by: alienvalkyrie
  • État Update from Ouvert to Atteints
  • Résolution Update from Accepted to Fixed

Modifier

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Connexion