Added centering of the vertical positions of the intermission screens.

This commit is contained in:
onpon4 2017-02-05 04:59:33 -05:00
parent 3ef498df97
commit 724582e512
1 changed files with 5 additions and 3 deletions

View File

@ -41,6 +41,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Planet intermission_planets[MAX_PLANETS]; Planet intermission_planets[MAX_PLANETS];
static const int y_center = 50 + (SCREEN_HEIGHT - 150) / 2;
void intermission_initPlanets(int system) void intermission_initPlanets(int system)
{ {
for (int i = 0 ; i < MAX_PLANETS ; i++) for (int i = 0 ; i < MAX_PLANETS ; i++)
@ -1491,7 +1493,7 @@ int intermission()
case 3: case 3:
x = screen->w / 2 - savesSurface->w / 2; x = screen->w / 2 - savesSurface->w / 2;
y = 50; y = y_center - savesSurface->h / 2;
screen_blit(savesSurface, x, y); screen_blit(savesSurface, x, y);
saveSlot = save_showSlots(savesSurface, saveSlot, x, y); saveSlot = save_showSlots(savesSurface, saveSlot, x, y);
break; break;
@ -1502,14 +1504,14 @@ int intermission()
case 5: case 5:
x = screen->w / 2 - commsSurface->w / 2; x = screen->w / 2 - commsSurface->w / 2;
y = 50; y = y_center - commsSurface->h / 2;
screen_blit(commsSurface, x, y); screen_blit(commsSurface, x, y);
intermission_doComms(commsSurface, x, y); intermission_doComms(commsSurface, x, y);
break; break;
case 6: case 6:
x = screen->w / 2 - optionsSurface->w / 2; x = screen->w / 2 - optionsSurface->w / 2;
y = 50; y = y_center - optionsSurface->h / 2;
screen_blit(optionsSurface, x, y); screen_blit(optionsSurface, x, y);
intermission_doOptions(optionsSurface, x, y); intermission_doOptions(optionsSurface, x, y);
break; break;