1 #include "defines_app.h" 2 3 4 5 struct planet_atmos_comp { 6 float ammonia; /* Planet atmosphere composition percentages */ 7 float argon; 8 float carbon_dioxide; 9 float carbon_monoxide; 10 float helium; 11 float hydrogen; 12 float iodine; 13 float krypton; 14 float methane; 15 float neon; 16 float nitrogen; 17 float oxygen; 18 float ozone; 19 float sulfur_dioxide; 20 float water; 21 float xenon; 22 }; 23 24 struct planet_atmos_spec { 25 double mass; /* Planet atmomphere mass in kilograms */ 26 double volume; /* Planet atmosphere volume in cubic kilometers */ 27 double density; /* Planet atmosphere density in kilograms per cubic meter */ 28 29 double pressure; /* Planet atmosphere pressure in millibars */ 30 31 struct pixel_rgba_8 rgb; /* Planet atmosphere color in RGBA format */ 32 }; 33 34 struct planet_crust_comp { 35 float aluminum; /* Planet crust composition percentages */ 36 float ammonia; 37 float antimony; 38 float arsenic; 39 float barium; 40 float beryllium; 41 float bismuth; 42 float boron; 43 float bromine; 44 float cadmium; 45 float calcium; 46 float carbon; 47 float cerium; 48 float cesium; 49 float chlorine; 50 float chromium; 51 float cobalt; 52 float copper; 53 float dysprosium; 54 float erbium; 55 float ethane; 56 float europium; 57 float fluorine; 58 float gadolinium; 59 float gallium; 60 float germanium; 61 float gold; 62 float hafnium; 63 float helium; 64 float holmium; 65 float hydrogen; 66 float indium; 67 float iodine; 68 float iridium; 69 float iron; 70 float lanthanum; 71 float lead; 72 float lithium; 73 float lutetium; 74 float magnesium; 75 float manganese; 76 float mercury; 77 float methane; 78 float molybdenum; 79 float neodymium; 80 float nickel; 81 float niobium; 82 float nitrogen; 83 float osmium; 84 float oxygen; 85 float palladium; 86 float phosphorus; 87 float platinum; 88 float polonium; 89 float potassium; 90 float praseodymium; 91 float protactinium; 92 float radium; 93 float radon; 94 float rhenium; 95 float rhodium; 96 float rubidium; 97 float ruthenium; 98 float samarium; 99 float scandium; 100 float selenium; 101 float silicon; 102 float silver; 103 float sodium; 104 float strontium; 105 float sulfur; 106 float tantalum; 107 float tellurium; 108 float terbium; 109 float thallium; 110 float thorium; 111 float thulium; 112 float tin; 113 float titanium; 114 float tungsten; 115 float uranium; 116 float vanadium; 117 float water; 118 float ytterbium; 119 float yttrium; 120 float zinc; 121 float zirconium; 122 }; 123 124 struct planet_crust_spec { 125 double albedo; /* Planet albedo (0.1 - 1.0) */ 126 double radius; /* Planet radius in kilometers */ 127 double radius_e; /* Planet equatorial radius in kilometers */ 128 double radius_p; /* Planet polar radius in kilometers */ 129 double temperature_e; /* Planet effective (black-body) temperature in kelvin */ 130 double temperature_s; /* Planet surface (greenhouse) temperature in kelvin */ 131 132 double mass; /* Planet mass in kilograms */ 133 double area; /* Planet surface area in square kilometers */ 134 double volume; /* Planet volume in cubic kilometers */ 135 double density; /* Planet density in kilograms per cubic meter */ 136 137 double rotation; /* Planet rotation speed in meters per second */ 138 double flattening; /* Planet flattening because of rotation */ 139 140 double speed; /* Planet orbital speed in kilometers per second */ 141 double year; /* Planet year length in seconds */ 142 double day; /* Planet day length in seconds */ 143 144 float centripetal; /* Planet centripetal acceleration in meters per second */ 145 float acceleration; /* Planet gravity acceleration in meters per second */ 146 float velocity; /* Planet surface escape velocity in meters per second */ 147 148 struct pixel_rgba_8 rgb; /* Planet color in RGBA format */ 149 }; 150 151 struct planet_draw { 152 int p_w, p_h; /* Planet sphere preview dimensions in pixels */ 153 154 int e; /* Planet sphere is earth like or not */ 155 int f; /* Planet sphere turbulence type if earth like */ 156 157 unsigned int ca, cb, cc; /* Planet sphere cache handles */ 158 unsigned int c; /* Planet surface noise seed */ 159 unsigned int d; /* Planet cloud noise seed */ 160 unsigned int g; /* Planet surface noise type (for draw_sphere_*_cache()) */ 161 unsigned int h; /* Planet cloud noise type (for draw_sphere_*_cache()) */ 162 163 double u; /* Planet sphere turbulence factor */ 164 165 size_t p_t; /* Planet sphere preview pixel buffer size in bytes */ 166 167 struct pixel_rgba_8 *p_p; /* Planet sphere preview pixel buffer */ 168 169 struct region_copy_8 cp; /* Planet sphere blitting structure */ 170 171 unsigned int cp_f[1]; /* Planet live font handles */ 172 173 struct text_2 cp_t[1]; /* Planet live font structures */ 174 175 struct point_4 cl_p[2]; /* Planet live line structures */ 176 177 struct circle_2 *cc_p; /* Planet live blitting structures */ 178 struct circles_2 cc_s; 179 struct subpoint_2 *cp_p; 180 struct subpoints_2 cp_s; 181 }; 182 183 struct planet { 184 unsigned long id; /* Planet id */ 185 unsigned long pd; /* Planet parent object id */ 186 187 unsigned long satellites; /* Planet satellite count */ 188 189 double planetarysize; /* Planet system diameter */ 190 191 char *name; /* Planet name */ 192 char *nick; /* Planet nick name */ 193 194 size_t name_t; /* Planet name length */ 195 size_t nick_t; /* Planet nick name length */ 196 197 unsigned int type; /* Planet or satellite type */ 198 199 double distance; /* Planet distance from parent object in kilometers */ 200 double position; /* Planet position in its orbit */ 201 double angle; /* Planet position angle in degrees */ 202 203 struct planet_atmos_comp pa; /* Planet atmosphere composition */ 204 struct planet_atmos_spec pp; /* Planet atmosphere specs */ 205 206 struct planet_crust_comp pc; /* Planet crust composition */ 207 struct planet_crust_spec ps; /* Planet crust specs */ 208 209 struct planet_draw sd; /* Planet drawing variables */ 210 211 struct planet **ca; /* Planet satellites */ 212 }; 213 214 struct star_comp { 215 float carbon; /* Star composition percentages */ 216 float helium; 217 float hydrogen; 218 float iron; 219 float magnesium; 220 float neon; 221 float nitrogen; 222 float oxygen; 223 float silicon; 224 float sulfur; 225 }; 226 227 struct star_spec { 228 double bm; /* Star mean Bt magnitude */ 229 double vm; /* Star mean Vt magnitude */ 230 double jm; /* Star magnitude in Johnson V */ 231 double bv; /* Star BtVt index */ 232 233 double parallax; /* Star trigonometrix parallax */ 234 235 double radius; /* Star mean radius in kilometers */ 236 double radius_e; /* Star equatorial radius in kilometers */ 237 double radius_p; /* Star polar radius in kilometers */ 238 double magnitude; /* Star absolute magnitude */ 239 double temperature; /* Star temperature in kelvin */ 240 double luminance; /* Star luminance in watts */ 241 242 double mass; /* Star mass in kilograms */ 243 double area; /* Star surface area in square kilometers */ 244 double volume; /* Star volume in cubic kilometers */ 245 double energy; /* Star energy to burn in joules */ 246 double lifetime; /* Star lifetime in millions of years */ 247 248 double rotation; /* Star rotation speed in meters per second */ 249 double flattening; /* Star flattening because of rotation */ 250 251 float centripetal; /* Star centripetal acceleration in meters per second */ 252 float acceleration; /* Star gravity acceleration in meters per second */ 253 float velocity; /* Star surface escape velocity in meters per second */ 254 255 struct pixel_rgba_8 rgb; /* Star color in RGBA format */ 256 }; 257 258 struct star_draw { 259 int p_w, p_h; /* Star sphere preview dimensions in pixels */ 260 261 unsigned int c; /* Star sphere noise seed */ 262 unsigned int ca; /* Star sphere cache handles */ 263 264 size_t p_t; /* Star sphere preview pixel buffer size in bytes */ 265 266 struct pixel_rgba_8 *p_p; /* Star sphere preview pixel buffer */ 267 268 struct region_copy_8 cp; /* Star sphere blitting structure */ 269 270 unsigned int cp_f[1]; /* Star live font handles */ 271 272 struct text_2 cp_t[1]; /* Star live font structures */ 273 274 struct point_4 cl_p[2]; /* Star live line structures */ 275 276 struct circle_2 *cc_p; /* Star live blitting structures */ 277 struct circles_2 cc_s; 278 struct subpoint_2 *cp_p; 279 struct subpoints_2 cp_s; 280 }; 281 282 struct star { 283 unsigned long id; /* Star id */ 284 unsigned long pd; /* Star parent object id */ 285 286 unsigned long planets; /* Star effective planet count */ 287 unsigned long created; /* Star created planet count */ 288 289 double fusion; /* Star nuclear fusion time placeholder */ 290 double solarsize; /* Star system diameter */ 291 292 char *name; /* Star name */ 293 char *nick; /* Star nick name */ 294 char *solar; /* Star solar system name */ 295 296 size_t name_t; /* Star name length */ 297 size_t nick_t; /* Star nick name length */ 298 size_t solar_t; /* Star solar system name length */ 299 300 unsigned int class; /* Star class (STAR_CLASS_*) */ 301 unsigned int type; /* Star type (STAR_TYPE_*) */ 302 303 char spectral[2]; /* Star spectral type (STAR_SPECTRAL_*) */ 304 305 struct position sp; /* Star position in container object */ 306 struct position sv; /* Star velocity in container object */ 307 308 struct star_comp sc; /* Star composition */ 309 struct star_spec ss; /* Star specs */ 310 311 struct star_draw sd; /* Star drawing variables */ 312 313 struct planet **pa; /* Star planets */ 314 }; 315 316 struct galaxy_spec { 317 double radius; /* Galaxy arm radius */ 318 double length; /* Galaxy arm length */ 319 double steps; /* Galaxy arm steps */ 320 double sigma; /* Galaxy arm randomness */ 321 double dispersion; /* Galaxy arm dispersion */ 322 323 unsigned int arms; /* Galaxy arms if spiral galaxy */ 324 }; 325 326 struct galaxy_draw { 327 unsigned int sp_f[1]; /* Galaxy live font handles */ 328 329 struct text_2 sp_t[1]; /* Galaxy live font structures */ 330 331 struct subpoint_2 *sp_p; /* Galaxy live blitting structures */ 332 struct subpoints_2 sp_s; 333 }; 334 335 struct galaxy { 336 unsigned long id; /* Galaxy id */ 337 unsigned long pd; /* Galaxy parent object id */ 338 339 unsigned long stars; /* Galaxy star count */ 340 unsigned long solars; /* Galaxy solar system count */ 341 342 char *name; /* Galaxy name */ 343 char *nick; /* Galaxy nick name */ 344 345 size_t name_t; /* Galaxy name length */ 346 size_t nick_t; /* Galaxy nick name length */ 347 348 char class[2]; /* Galaxy class (GALAXY_CLASS_*) */ 349 350 struct position gp; /* Galaxy position in container object */ 351 struct position gd_a, gd_b; /* Galaxy dimensions */ 352 353 struct galaxy_spec gs; /* Galaxy specs */ 354 355 struct galaxy_draw sd; /* Galaxy drawing variables */ 356 357 struct star **sa; /* Galaxy stars */ 358 }; 359 360 struct universe { 361 unsigned long id; /* Universe id */ 362 363 unsigned long galaxies; /* Universe galaxy count */ 364 365 struct galaxy **ga; /* Universe galaxies */ 366 }; 367