2013-07-27 21:26:12 +00:00
|
|
|
#include <glib.h>
|
2013-07-14 12:40:26 +00:00
|
|
|
|
2013-07-27 21:22:35 +00:00
|
|
|
#include "calculate.h"
|
|
|
|
|
2013-07-14 12:40:26 +00:00
|
|
|
#include "../swe/src/swephexp.h"
|
|
|
|
|
2013-07-14 12:38:47 +00:00
|
|
|
#define EPHEDIR "/home/polesz/Projektek/c/gradix/swe/data"
|
2013-07-14 12:40:26 +00:00
|
|
|
|
2013-08-19 21:36:54 +00:00
|
|
|
typedef struct {
|
|
|
|
int signId;
|
|
|
|
signElement_t element;
|
|
|
|
signType_t type;
|
|
|
|
} signData_t;
|
|
|
|
|
2013-07-26 14:53:08 +00:00
|
|
|
const char *signTypeName[] = {
|
|
|
|
NULL,
|
|
|
|
"Cardinal",
|
|
|
|
"Fix",
|
|
|
|
"Mutable"
|
|
|
|
};
|
|
|
|
|
|
|
|
const char *signElementName[] = {
|
|
|
|
NULL,
|
|
|
|
"Fire",
|
|
|
|
"Earth",
|
|
|
|
"Air",
|
|
|
|
"Water"
|
|
|
|
};
|
|
|
|
|
|
|
|
const char *moonStateName[] = {
|
|
|
|
"New Moon",
|
|
|
|
"Waxing Crescent Moon",
|
|
|
|
"Waxing Half Moon",
|
|
|
|
"Waxing Gibbous Moon",
|
|
|
|
"Full Moon",
|
|
|
|
"Waning Gibbous Moon",
|
|
|
|
"Waning Half Moon",
|
|
|
|
"Waning Crescent Moon",
|
|
|
|
"Dark Moon"
|
|
|
|
};
|
|
|
|
|
|
|
|
const char *signName[] = {
|
|
|
|
NULL,
|
|
|
|
"Aries",
|
|
|
|
"Taurus",
|
|
|
|
"Gemini",
|
|
|
|
"Cancer",
|
|
|
|
"Leo",
|
|
|
|
"Virgo",
|
|
|
|
"Libra",
|
|
|
|
"Scorpio",
|
|
|
|
"Saggitarius",
|
|
|
|
"Capricorn",
|
|
|
|
"Aquarius",
|
|
|
|
"Pisces"
|
|
|
|
};
|
|
|
|
|
2013-08-19 22:37:39 +00:00
|
|
|
typedef struct {
|
|
|
|
gchar *name;
|
|
|
|
guint size;
|
|
|
|
gdouble orbis;
|
|
|
|
gboolean harmonic;
|
|
|
|
gboolean strong;
|
|
|
|
} aspectData_t;
|
|
|
|
|
|
|
|
const aspectData_t aspectData[] = {
|
|
|
|
{ "Trigon", 60, 6.0, TRUE, TRUE },
|
|
|
|
{ NULL, 0, 0.0, FALSE, FALSE }
|
|
|
|
};
|
|
|
|
|
2013-08-19 21:36:54 +00:00
|
|
|
#define ADD_SIGN(ht, v, s, e, t) v = g_new0(signData_t, 1); \
|
|
|
|
(v)->signId = (s); \
|
|
|
|
(v)->element = (e); \
|
|
|
|
(v)->type = (t); \
|
|
|
|
g_hash_table_replace((ht), GINT_TO_POINTER(s), (v));
|
|
|
|
|
|
|
|
#define INCREASE_POINTS(dts, dte, dtt, vsd, s, p, val) (vsd) = g_hash_table_lookup((dts), GINT_TO_POINTER(s)); \
|
|
|
|
g_assert((vsd) != NULL); \
|
|
|
|
\
|
|
|
|
if (((p) = g_hash_table_lookup((dte), GINT_TO_POINTER((vsd)->element))) == NULL) { \
|
|
|
|
(p) = g_new0(guint, 1); \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
*(p) += (val); \
|
|
|
|
g_hash_table_replace((dte), GINT_TO_POINTER((vsd)->element), (p)); \
|
|
|
|
\
|
|
|
|
if (((p) = g_hash_table_lookup((dtt), GINT_TO_POINTER((vsd)->type))) == NULL) { \
|
|
|
|
(p) = g_new0(guint, 1); \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
*(p) += (val); \
|
|
|
|
g_hash_table_replace((dtt), GINT_TO_POINTER((vsd)->type), (p));
|
|
|
|
|
2013-07-26 14:59:09 +00:00
|
|
|
int
|
2013-07-14 16:13:41 +00:00
|
|
|
main(int argc, char *argv[])
|
2013-07-14 12:40:26 +00:00
|
|
|
{
|
2013-07-26 15:01:09 +00:00
|
|
|
int year = 1981,
|
|
|
|
month = 3,
|
|
|
|
day = 11,
|
|
|
|
hour = 23,
|
|
|
|
min = 39,
|
|
|
|
sec = 45,
|
|
|
|
p;
|
2013-08-19 21:36:54 +00:00
|
|
|
guint *point;
|
2013-07-26 15:01:09 +00:00
|
|
|
double timezone = 1.0,
|
|
|
|
lon = 19.081599,
|
|
|
|
lat = 47.462485,
|
|
|
|
alt = 200,
|
|
|
|
te,
|
|
|
|
cusps[13],
|
|
|
|
ascmc[10];
|
2013-07-26 15:08:17 +00:00
|
|
|
planetInfo_t *planetInfo;
|
|
|
|
moonPhase *phase;
|
2013-08-19 21:36:54 +00:00
|
|
|
GHashTable *signDataTable,
|
|
|
|
*elementPointsTable,
|
2013-08-19 22:35:47 +00:00
|
|
|
*typePointsTable,
|
|
|
|
*planetInfoTable;
|
2013-08-19 21:36:54 +00:00
|
|
|
signData_t *signData;
|
2013-08-19 22:37:39 +00:00
|
|
|
GList *planetIdList;
|
2013-07-14 12:40:26 +00:00
|
|
|
|
2013-07-26 14:47:44 +00:00
|
|
|
#if 1
|
|
|
|
year = 1983;
|
|
|
|
month = 3;
|
|
|
|
day = 7;
|
|
|
|
hour = 11;
|
|
|
|
min = 54;
|
|
|
|
#endif
|
|
|
|
|
2013-08-19 21:36:54 +00:00
|
|
|
signDataTable = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, g_free);
|
|
|
|
elementPointsTable = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL);
|
|
|
|
typePointsTable = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL);
|
2013-08-19 22:35:47 +00:00
|
|
|
planetInfoTable = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, g_free);
|
2013-08-19 21:36:54 +00:00
|
|
|
|
|
|
|
// Initialize sign data table
|
|
|
|
|
|
|
|
ADD_SIGN(signDataTable, signData, SIGN_ARIES, ELEMENT_FIRE, TYPE_CARDINAL);
|
|
|
|
ADD_SIGN(signDataTable, signData, SIGN_TAURUS, ELEMENT_EARTH, TYPE_FIX);
|
|
|
|
ADD_SIGN(signDataTable, signData, SIGN_GEMINI, ELEMENT_AIR, TYPE_MUTABLE);
|
|
|
|
ADD_SIGN(signDataTable, signData, SIGN_CANCER, ELEMENT_WATER, TYPE_CARDINAL);
|
|
|
|
ADD_SIGN(signDataTable, signData, SIGN_LEO, ELEMENT_FIRE, TYPE_FIX);
|
|
|
|
ADD_SIGN(signDataTable, signData, SIGN_VIRGO, ELEMENT_EARTH, TYPE_MUTABLE);
|
|
|
|
ADD_SIGN(signDataTable, signData, SIGN_LIBRA, ELEMENT_AIR, TYPE_CARDINAL);
|
|
|
|
ADD_SIGN(signDataTable, signData, SIGN_SCORPIO, ELEMENT_WATER, TYPE_FIX);
|
|
|
|
ADD_SIGN(signDataTable, signData, SIGN_SAGGITARIUS, ELEMENT_FIRE, TYPE_MUTABLE);
|
|
|
|
ADD_SIGN(signDataTable, signData, SIGN_CAPRICORN, ELEMENT_EARTH, TYPE_CARDINAL);
|
|
|
|
ADD_SIGN(signDataTable, signData, SIGN_AQUARIUS, ELEMENT_AIR, TYPE_FIX);
|
|
|
|
ADD_SIGN(signDataTable, signData, SIGN_PISCES, ELEMENT_WATER, TYPE_MUTABLE);
|
|
|
|
|
2013-07-26 15:01:09 +00:00
|
|
|
swe_set_ephe_path(EPHEDIR);
|
2013-07-14 12:40:26 +00:00
|
|
|
|
2013-07-26 15:02:55 +00:00
|
|
|
if (set_location_and_time(lon, lat, alt, year, month, day, hour, min, sec, timezone, &te) == 0) {
|
|
|
|
return 1;
|
|
|
|
}
|
2013-07-14 12:40:26 +00:00
|
|
|
|
2013-08-19 22:36:55 +00:00
|
|
|
printf("Date: %02d.%02d.%d at %02d:%02d:%02d, at %f, %f\n", year, month, day, hour, min, sec, lon, lat);
|
|
|
|
|
|
|
|
printf("\nHOUSES\n======\n\n");
|
2013-07-14 12:40:26 +00:00
|
|
|
|
2013-07-26 15:02:55 +00:00
|
|
|
swe_houses(te, lat, lon, 'P', cusps, ascmc);
|
|
|
|
|
|
|
|
for (p = 1; p < 13; p++) {
|
2013-08-19 22:36:55 +00:00
|
|
|
printf("House %2d..: %s (%f)\n", p, signName[get_sign(cusps[p])], cusps[p]);
|
2013-07-26 15:02:55 +00:00
|
|
|
}
|
2013-07-14 12:40:26 +00:00
|
|
|
|
2013-08-19 22:36:55 +00:00
|
|
|
printf("\nPLANETS AND POINTS\n==================\n\n");
|
2013-07-14 12:40:26 +00:00
|
|
|
|
2013-08-19 22:35:47 +00:00
|
|
|
planetInfo = g_new0(planetInfo_t, 1);
|
|
|
|
planetInfo->position = ascmc[0];
|
|
|
|
planetInfo->sign = get_sign(ascmc[0]);
|
|
|
|
planetInfo->house = 1;
|
|
|
|
planetInfo->retrograde = FALSE;
|
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_NPLANETS + SE_ASC), planetInfo);
|
|
|
|
printf("Asc.......: %s (%f)\n", signName[planetInfo->sign], planetInfo->position);
|
|
|
|
INCREASE_POINTS(signDataTable, elementPointsTable, typePointsTable, signData, planetInfo->sign, point, 2);
|
|
|
|
|
|
|
|
planetInfo = g_new0(planetInfo_t, 1);
|
|
|
|
planetInfo->position = ascmc[1];
|
|
|
|
planetInfo->sign = get_sign(ascmc[1]);
|
|
|
|
planetInfo->house = 10;
|
|
|
|
planetInfo->retrograde = FALSE;
|
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_NPLANETS + SE_MC), planetInfo);
|
|
|
|
printf("MC........: %s (%f)\n", signName[planetInfo->sign], planetInfo->position);
|
|
|
|
INCREASE_POINTS(signDataTable, elementPointsTable, typePointsTable, signData, planetInfo->sign, point, 1);
|
2013-07-14 12:40:26 +00:00
|
|
|
|
2013-07-26 15:06:43 +00:00
|
|
|
planetInfo = get_planet_info(SE_SUN, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_SUN), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Sun.......: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-08-19 21:36:54 +00:00
|
|
|
INCREASE_POINTS(signDataTable, elementPointsTable, typePointsTable, signData, planetInfo->sign, point, 2);
|
2013-07-14 12:40:26 +00:00
|
|
|
|
2013-07-26 15:06:43 +00:00
|
|
|
planetInfo = get_planet_info(SE_MOON, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_MOON), planetInfo);
|
2013-07-26 15:06:43 +00:00
|
|
|
phase = get_moon_phase(year, month, day, hour, min, sec);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Moon......: %s (%.2f%% visibility), %s, House: %d (%f%s)\n", moonStateName[phase->phase], phase->visiblePercentage, signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-08-19 21:36:54 +00:00
|
|
|
INCREASE_POINTS(signDataTable, elementPointsTable, typePointsTable, signData, planetInfo->sign, point, 2);
|
2013-07-26 15:06:43 +00:00
|
|
|
g_free(phase);
|
2013-07-14 16:13:41 +00:00
|
|
|
|
2013-07-26 15:06:43 +00:00
|
|
|
planetInfo = get_planet_info(SE_MERCURY, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_MERCURY), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Mercury...: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-08-19 21:36:54 +00:00
|
|
|
INCREASE_POINTS(signDataTable, elementPointsTable, typePointsTable, signData, planetInfo->sign, point, 2);
|
2013-07-14 16:13:41 +00:00
|
|
|
|
2013-07-26 15:06:43 +00:00
|
|
|
planetInfo = get_planet_info (SE_VENUS, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_VENUS), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Venus.....: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-08-19 21:36:54 +00:00
|
|
|
INCREASE_POINTS(signDataTable, elementPointsTable, typePointsTable, signData, planetInfo->sign, point, 1);
|
2013-07-14 16:13:41 +00:00
|
|
|
|
2013-07-26 15:06:43 +00:00
|
|
|
planetInfo = get_planet_info(SE_MARS, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_MARS), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Mars......: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-08-19 21:36:54 +00:00
|
|
|
INCREASE_POINTS(signDataTable, elementPointsTable, typePointsTable, signData, planetInfo->sign, point, 1);
|
2013-07-14 16:13:41 +00:00
|
|
|
|
2013-07-26 15:06:43 +00:00
|
|
|
planetInfo = get_planet_info(SE_JUPITER, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_JUPITER), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Jupiter...: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-08-19 21:36:54 +00:00
|
|
|
INCREASE_POINTS(signDataTable, elementPointsTable, typePointsTable, signData, planetInfo->sign, point, 1);
|
2013-07-14 16:13:41 +00:00
|
|
|
|
2013-07-26 15:06:43 +00:00
|
|
|
planetInfo = get_planet_info(SE_SATURN, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_SATURN), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Saturn....: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-08-19 21:36:54 +00:00
|
|
|
INCREASE_POINTS(signDataTable, elementPointsTable, typePointsTable, signData, planetInfo->sign, point, 1);
|
2013-07-14 16:13:41 +00:00
|
|
|
|
2013-07-26 15:06:43 +00:00
|
|
|
planetInfo = get_planet_info(SE_URANUS, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_URANUS), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Uranus....: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-08-19 21:36:54 +00:00
|
|
|
INCREASE_POINTS(signDataTable, elementPointsTable, typePointsTable, signData, planetInfo->sign, point, 1);
|
2013-07-14 16:13:41 +00:00
|
|
|
|
2013-07-26 15:06:43 +00:00
|
|
|
planetInfo = get_planet_info(SE_NEPTUNE, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_NEPTUNE), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Neptune...: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-08-19 21:36:54 +00:00
|
|
|
INCREASE_POINTS(signDataTable, elementPointsTable, typePointsTable, signData, planetInfo->sign, point, 1);
|
2013-07-26 15:06:43 +00:00
|
|
|
|
|
|
|
planetInfo = get_planet_info(SE_PLUTO, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_PLUTO), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Pluto.....: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-08-19 21:36:54 +00:00
|
|
|
INCREASE_POINTS(signDataTable, elementPointsTable, typePointsTable, signData, planetInfo->sign, point, 1);
|
2013-07-26 15:06:43 +00:00
|
|
|
|
|
|
|
planetInfo = get_planet_info(SE_CHIRON, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_CHIRON), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Chiron....: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-07-26 15:06:43 +00:00
|
|
|
|
|
|
|
planetInfo = get_planet_info(SE_MEAN_NODE, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_MEAN_NODE), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("North Node: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-08-19 21:36:54 +00:00
|
|
|
INCREASE_POINTS(signDataTable, elementPointsTable, typePointsTable, signData, planetInfo->sign, point, 1);
|
2013-07-14 16:13:41 +00:00
|
|
|
|
2013-07-26 15:07:03 +00:00
|
|
|
planetInfo = get_planet_info(SE_MEAN_APOG, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_MEAN_APOG), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Dark Moon.: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-07-14 12:40:26 +00:00
|
|
|
|
2013-07-26 23:31:19 +00:00
|
|
|
planetInfo = get_planet_info(SE_CERES, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_CERES), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Ceres.....: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-07-26 23:31:19 +00:00
|
|
|
|
|
|
|
planetInfo = get_planet_info(SE_PALLAS, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_PALLAS), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Pallas....: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-07-26 23:31:19 +00:00
|
|
|
|
|
|
|
planetInfo = get_planet_info(SE_JUNO, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_JUNO), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Juno......: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-07-26 23:31:19 +00:00
|
|
|
|
|
|
|
planetInfo = get_planet_info(SE_VESTA, te, cusps);
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_replace(planetInfoTable, GINT_TO_POINTER(SE_VESTA), planetInfo);
|
2013-08-19 21:38:05 +00:00
|
|
|
printf("Vesta.....: %s, House: %d (%f%s)\n", signName[planetInfo->sign], planetInfo->house, planetInfo->position, (planetInfo->retrograde) ? ", retrograde" : "");
|
2013-07-26 23:31:19 +00:00
|
|
|
|
2013-08-19 22:36:55 +00:00
|
|
|
printf("\nELEMENTS\n========\n\n");
|
|
|
|
|
2013-08-19 21:36:54 +00:00
|
|
|
point = g_hash_table_lookup(elementPointsTable, GINT_TO_POINTER(ELEMENT_FIRE));
|
2013-08-19 22:36:55 +00:00
|
|
|
printf("Fire.: %d\n", (point == NULL) ? 0 : *point);
|
2013-08-19 21:36:54 +00:00
|
|
|
point = g_hash_table_lookup(elementPointsTable, GINT_TO_POINTER(ELEMENT_EARTH));
|
|
|
|
printf("Earth: %d\n", (point == NULL) ? 0 : *point);
|
|
|
|
point = g_hash_table_lookup(elementPointsTable, GINT_TO_POINTER(ELEMENT_AIR));
|
|
|
|
printf("Air..: %d\n", (point == NULL) ? 0 : *point);
|
|
|
|
point = g_hash_table_lookup(elementPointsTable, GINT_TO_POINTER(ELEMENT_WATER));
|
|
|
|
printf("Water: %d\n", (point == NULL) ? 0 : *point);
|
|
|
|
|
2013-08-19 22:36:55 +00:00
|
|
|
printf("\nTYPES\n=====\n\n");
|
|
|
|
|
2013-08-19 21:36:54 +00:00
|
|
|
point = g_hash_table_lookup(typePointsTable, GINT_TO_POINTER(TYPE_CARDINAL));
|
2013-08-19 22:36:55 +00:00
|
|
|
printf("Cardinal: %d\n", (point == NULL) ? 0 : *point);
|
2013-08-19 21:36:54 +00:00
|
|
|
point = g_hash_table_lookup(typePointsTable, GINT_TO_POINTER(TYPE_FIX));
|
|
|
|
printf("Fix.....: %d\n", (point == NULL) ? 0 : *point);
|
|
|
|
point = g_hash_table_lookup(typePointsTable, GINT_TO_POINTER(TYPE_MUTABLE));
|
|
|
|
printf("Mutable.: %d\n", (point == NULL) ? 0 : *point);
|
|
|
|
|
2013-08-19 22:37:39 +00:00
|
|
|
printf("\nASPECTS\n=======\n\n");
|
|
|
|
|
|
|
|
planetIdList = g_hash_table_get_keys(planetInfoTable);
|
|
|
|
g_list_free(planetIdList);
|
|
|
|
|
2013-08-19 22:35:47 +00:00
|
|
|
g_hash_table_unref(planetInfoTable);
|
2013-08-19 21:36:54 +00:00
|
|
|
g_hash_table_unref(typePointsTable);
|
|
|
|
g_hash_table_unref(elementPointsTable);
|
|
|
|
g_hash_table_unref(signDataTable);
|
|
|
|
|
2013-07-26 14:46:08 +00:00
|
|
|
return OK;
|
2013-07-14 12:40:26 +00:00
|
|
|
}
|
|
|
|
|