Reordered planets in GswePlanet

This is to bring some consistency in the API
This commit is contained in:
Gergely Polonkai 2014-05-24 09:58:29 +02:00
parent 21298fb219
commit b6071a4e46
2 changed files with 16 additions and 14 deletions

View File

@ -68,8 +68,13 @@
* This enum holds the planet identifiers known by SWE-GLib.
*/
typedef enum {
GSWE_PLANET_NONE,
GSWE_PLANET_SUN,
GSWE_PLANET_NONE = 0,
GSWE_PLANET_ASCENDANT,
GSWE_PLANET_MC,
GSWE_PLANET_VERTEX,
GSWE_PLANET_MOON_NODE,
GSWE_PLANET_MOON_APOGEE,
GSWE_PLANET_SUN = 11,
GSWE_PLANET_MOON,
GSWE_PLANET_MERCURY,
GSWE_PLANET_VENUS,
@ -80,7 +85,7 @@ typedef enum {
GSWE_PLANET_URANUS,
GSWE_PLANET_NEPTUNE,
GSWE_PLANET_PLUTO,
GSWE_PLANET_CHIRON,
GSWE_PLANET_CHIRON = 101,
GSWE_PLANET_CERES,
GSWE_PLANET_PALLAS,
GSWE_PLANET_JUNO,
@ -91,12 +96,7 @@ typedef enum {
GSWE_PLANET_SEDNA,
GSWE_PLANET_ERIS,
GSWE_PLANET_DEJANIRA,
GSWE_PLANET_CIRCE,
GSWE_PLANET_MOON_NODE,
GSWE_PLANET_MOON_APOGEE,
GSWE_PLANET_ASCENDANT,
GSWE_PLANET_MC,
GSWE_PLANET_VERTEX
GSWE_PLANET_CIRCE
} GswePlanet;
/* Moon Apogee in astrology is often referred to as the Dark Moon, or Lilith */

View File

@ -141,6 +141,12 @@ void gswe_init_with_dir(gchar *directory)
gswe_planet_info_table = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify)gswe_planet_info_unref);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_ASCENDANT, -1, FALSE, _("Ascendant"), 9.0, 2);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MC, -1, FALSE, _("Midheaven"), 5.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_VERTEX, -1, FALSE, _("Vertex"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MOON_NODE, SE_MEAN_NODE, TRUE, _("Ascending Moon Node"), 2.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MOON_APOGEE, SE_MEAN_APOG, TRUE, _("Dark Moon"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_SUN, SE_SUN, TRUE, _("Sun"), 13.0, 2);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MOON, SE_MOON, TRUE, _("Moon"), 9.0, 2);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MERCURY, SE_MERCURY, TRUE, _("Mercury"), 7.0, 2);
@ -151,6 +157,7 @@ void gswe_init_with_dir(gchar *directory)
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_URANUS, SE_URANUS, TRUE, _("Uranus"), 5.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_NEPTUNE, SE_NEPTUNE, TRUE, _("Neptune"), 5.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_PLUTO, SE_PLUTO, TRUE, _("Pluto"), 3.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_CHIRON, SE_CHIRON, TRUE, _("Chiron"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_CERES, SE_CERES, TRUE, _("Ceres"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_PALLAS, SE_PALLAS, TRUE, _("Pallas"), 2.0, 0);
@ -163,11 +170,6 @@ void gswe_init_with_dir(gchar *directory)
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_ERIS, SE_AST_OFFSET + 136199, TRUE, _("Eris"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_DEJANIRA, SE_AST_OFFSET + 157, TRUE, _("Dejanira"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_CIRCE, SE_AST_OFFSET + 34, TRUE, _("Circe"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MOON_NODE, SE_MEAN_NODE, TRUE, _("Ascending Moon Node"), 2.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MOON_APOGEE, SE_MEAN_APOG, TRUE, _("Dark Moon"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_ASCENDANT, -1, FALSE, _("Ascendant"), 9.0, 2);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MC, -1, FALSE, _("Midheaven"), 5.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_VERTEX, -1, FALSE, _("Vertex"), 2.0, 0);
gswe_sign_info_table = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify)gswe_sign_info_unref);