From 423ccea4491fde92c80d44ffebcb3214179b2d69 Mon Sep 17 00:00:00 2001 From: meep-eep Date: Fri, 10 Dec 2004 04:11:44 +0000 Subject: [PATCH] Dumping info for planets. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1431 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 1 + sc2/src/sc2code/plandata.c | 5 ---- sc2/src/sc2code/planets/plandata.h | 48 +++++++++++++++++++++++++----- sc2/src/sc2code/uqmdebug.c | 1 - 4 files changed, 41 insertions(+), 14 deletions(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 2b7afb8be..11cf660b7 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.4: +- Added dumping planet info to uqmdebug.c - SvdB - Check language.txt for locale, from Zap - Make it possible to specify the config dir on the command line. (bug #645) - Svdb diff --git a/sc2/src/sc2code/plandata.c b/sc2/src/sc2code/plandata.c index ec296e023..58236b5bb 100644 --- a/sc2/src/sc2code/plandata.c +++ b/sc2/src/sc2code/plandata.c @@ -708,11 +708,6 @@ const BYTE element_array[NUMBER_OF_ELEMENTS] = }; /*------------------------------ Global Data ------------------------------ */ -#define NO_TECTONICS 0 -#define LOW_TECTONICS 40 -#define MED_TECTONICS 80 -#define HIGH_TECTONICS 140 -#define SUPER_TECTONICS 200 #define NO_DEPOSIT 0 diff --git a/sc2/src/sc2code/planets/plandata.h b/sc2/src/sc2code/planets/plandata.h index 3f581254a..afcc3dabe 100644 --- a/sc2/src/sc2code/planets/plandata.h +++ b/sc2/src/sc2code/planets/plandata.h @@ -195,23 +195,49 @@ typedef const XLAT_DESC *PXLAT_DESC; typedef struct { BYTE ElementType; + /* Index of this element in element_array */ BYTE Density; + /* bits 0-3: quantity of the deposits (maximum number of + * deposits), one of FEW, MODERATE, or NUMEROUS + * bits 4-7: quality of the deposit, one of LOW, MEDIUM, or HEAVY + */ } ElementEntry; typedef struct { - BYTE Type; /* HiNybble is interplanetary color */ - /* \ */ - /* \ Planet size map algo */ - /* \ \ \ */ - /* \ \ \ */ - /* 0000 00 00 */ - BYTE BaseTectonics; /* Scaled with Earth at 100 */ + BYTE Type; + /* bits 0-1: size, one of SMALL_ROCKY_WORLD, LARGE_ROCKY_WORLD, or + * GAS_GIANT + * bits 2-3: map creation algoritm, one of TOPO_ALGO, + * CRATERED_ALGO, or GAS_GIANT_ALGO + * bits 4-7: interplanetary color, one of BLUE_BODY, GREEN_BODY, + * ORANGE_BODY, RED_BODY, WHITE_BODY (same as + * GRAY_BODY), YELLOW_BODY, NUM_STAR_COLORS, + * CYAN_BODY, PURPLE_BODY, VIOLET_BODY) + */ + BYTE BaseTectonics; + /* Base constant for calculation of tectonic activity, + * relative to Earth at 100. + * One of: NO_TECTONICS, LOW_TECTONICS, MED_TECTONICS, + * HIGH_TECTONICS, or SUPER_TECTONICS + */ BYTE AtmoAndDensity; + /* bits 0-3: planet density, one of GAS_DENSITY, LIGHT_DENSITY, + * LOW_DENSITY, NORMAL_DENSITY, HIGH_DENSITY, + * SUPER_DENSITY + * bits 4-7: atmosphere, one of LIGHT, MEDIUM, HEAVY, or + * (no define for this) super thick. + */ #define NUM_USEFUL_ELEMENTS 8 ElementEntry UsefulElements[NUM_USEFUL_ELEMENTS]; + /* Minerals on the planet */ - RESOURCE CMapInstance, XlatTabInstance; + RESOURCE CMapInstance; + /* Color map */ + RESOURCE XlatTabInstance; + /* Color translation map */ + + // Parameters for map-generation algoritms: COUNT num_faults; SIZE fault_depth; COUNT num_blemishes; @@ -274,6 +300,12 @@ enum /*------------------------------ Global Data ------------------------------ */ +#define NO_TECTONICS 0 +#define LOW_TECTONICS 40 +#define MED_TECTONICS 80 +#define HIGH_TECTONICS 140 +#define SUPER_TECTONICS 200 + extern const PlanetFrame *PlanData; #endif /* _PLANDATA_H */ diff --git a/sc2/src/sc2code/uqmdebug.c b/sc2/src/sc2code/uqmdebug.c index 78c41dfc9..65361d5da 100644 --- a/sc2/src/sc2code/uqmdebug.c +++ b/sc2/src/sc2code/uqmdebug.c @@ -22,7 +22,6 @@ #include #include "starcon.h" -#include "planets/plandata.h" #include "uqmdebug.h" static void dumpEventCallback (EVENTPTR eventPtr, void *arg);