[Add] System names are now viewable in starmap.

This commit is contained in:
Allanis 2013-03-10 18:59:54 +00:00
parent 4e2f8aa56d
commit 5221a51241

View File

@ -154,10 +154,17 @@ static void map_render(double bx, double by, double w, double h) {
if(sys == cur_system) COLOUR(cRadar_targ); if(sys == cur_system) COLOUR(cRadar_targ);
else if(sys->nplanets == 0) COLOUR(cInert); else if(sys->nplanets == 0) COLOUR(cInert);
else COLOUR(cYellow); else COLOUR(cYellow);
gl_drawCircleInRect(x + sys->pos.x*map_zoom, gl_drawCircleInRect(x + sys->pos.x*map_zoom,
y + sys->pos.y*map_zoom, y + sys->pos.y*map_zoom,
r, bx, by, w, h); r, bx, by, w, h);
// Draw the system name.
gl_printMax(&gl_smallFont, (bx+w)-(x+7. + sys->pos.x * map_zoom),
x + 7. + sys->pos.x * map_zoom + gl_screen.w/2.,
y - 5. + sys->pos.y * map_zoom + gl_screen.h/2.,
&cWhite, sys->name);
// Draw the hyperspace paths. // Draw the hyperspace paths.
glShadeModel(GL_SMOOTH); glShadeModel(GL_SMOOTH);
// Cheaply use transparency instead of actually // Cheaply use transparency instead of actually
@ -168,7 +175,7 @@ static void map_render(double bx, double by, double w, double h) {
((cur_system == &systems_stack[sys->jumps[j]]) && ((cur_system == &systems_stack[sys->jumps[j]]) &&
(sys = &systems_stack[cur_system->jumps[hyperspace_target]]))) (sys = &systems_stack[cur_system->jumps[hyperspace_target]])))
col = &cRed; col = &cRed;
else col = &cInert; else col = &cDarkBlue;
glBegin(GL_LINE_STRIP); glBegin(GL_LINE_STRIP);
ACOLOUR(*col, 0.); ACOLOUR(*col, 0.);
tx = x + sys->pos.x * map_zoom; tx = x + sys->pos.x * map_zoom;