40 Print(
" Destroying Galaxy %s\n", (
const char*)
name);
50 if (galaxy)
delete galaxy;
51 galaxy =
new(__FILE__,__LINE__)
Galaxy(
"Galaxy");
97 Print(
"\nLoading Galaxy: %s\n", filename);
108 Print(
"WARNING: could not parse '%s'\n", filename);
113 if (!file_type || file_type->
value() !=
"GALAXY") {
114 Print(
"WARNING: invalid galaxy file '%s'\n", filename);
131 else if (def->
name()->
value() ==
"system") {
133 Print(
"WARNING: system struct missing in '%s'\n", filename);
158 else if (pdef->
name()->
value() ==
"class") {
161 switch (classname[0]) {
162 case 'O': star_class =
Star::O;
break;
163 case 'B': star_class =
Star::B;
break;
164 case 'A': star_class =
Star::A;
break;
165 case 'F': star_class =
Star::F;
break;
166 case 'G': star_class =
Star::G;
break;
167 case 'K': star_class =
Star::K;
break;
168 case 'M': star_class =
Star::M;
break;
178 StarSystem* star_system =
new(__FILE__,__LINE__)
StarSystem(sys_name, sys_loc, sys_iff, star_class);
182 Star* star =
new(__FILE__,__LINE__)
Star(sys_name, sys_loc, star_class);
188 else if (def->
name()->
value() ==
"star") {
190 Print(
"WARNING: star struct missing in '%s'\n", filename);
211 else if (pdef->
name()->
value() ==
"class") {
214 switch (classname[0]) {
215 case 'O': star_class =
Star::O;
break;
216 case 'B': star_class =
Star::B;
break;
217 case 'A': star_class =
Star::A;
break;
218 case 'F': star_class =
Star::F;
break;
219 case 'G': star_class =
Star::G;
break;
220 case 'K': star_class =
Star::K;
break;
221 case 'M': star_class =
Star::M;
break;
231 Star* star =
new(__FILE__,__LINE__)
Star(star_name, star_loc, star_class);