~ubuntu-branches/debian/squeeze/freeciv/squeeze

« back to all changes in this revision

Viewing changes to client/gui-sdl/cma_fe.c

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams, Karl Goetz, Clint Adams
  • Date: 2010-02-23 22:09:02 UTC
  • mfrom: (1.2.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20100223220902-kiyrmr9i4152cka5
Tags: 2.2.0-1
[ Karl Goetz ]
* Remove civserver files in /etc/ggzd/ (Closes: 523772, 517787)
* Adding ${misc:Depends} to all binary packages (lintian warnings)

[ Clint Adams ]
* New upstream version.
  - Drop data_dsc_use_bindir.diff (binary pathnames have changed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
/* utility */
21
21
#include "fcintl.h"
22
22
 
 
23
/* common */
 
24
#include "game.h"
 
25
 
23
26
/* client */
24
 
#include "civclient.h" /* can_client_issue_orders() */
 
27
#include "client_main.h" /* can_client_issue_orders() */
25
28
 
26
29
/* gui-sdl */
27
30
#include "citydlg.h"
687
690
  redraw_group(pBuf->prev, pBuf, 0);
688
691
                  
689
692
  /* fill in result label */
690
 
  cm_copy_result_from_city(pCma->pCity, &result);
 
693
  cm_result_from_main_map(&result, pCma->pCity, TRUE);
691
694
  
692
695
  if(result.found_a_valid) {
693
696
    /* redraw resources */
829
832
  SDL_Color bg_color = {255, 255, 255, 136};
830
833
  
831
834
  struct widget *pWindow, *pBuf;
832
 
  SDL_Surface *pLogo, *pText[O_COUNT + 1], *pMinimal, *pFactor;
 
835
  SDL_Surface *pLogo, *pText[O_LAST + 1], *pMinimal, *pFactor;
833
836
  SDL_Surface *pCity_Map;
834
837
  SDL_String16 *pStr;
835
838
  char cBuf[128];
935
938
  } output_type_iterate_end;
936
939
  
937
940
  copy_chars_to_string16(pStr, _("Celebrate"));
938
 
  pText[O_COUNT] = create_text_surf_from_str16(pStr);
 
941
  pText[O_LAST] = create_text_surf_from_str16(pStr);
939
942
  FREESTRING16(pStr);
940
943
  
941
944
  /* happy factor label */
1071
1074
  area.y = dst.y - adj_size(20);
1072
1075
  w = area.w = adj_size(10) + text_w + adj_size(10) + pWindow->prev->prev->size.w + adj_size(5 + 70 + 5) +
1073
1076
                pWindow->prev->prev->size.w + adj_size(5 + 55 + 10);
1074
 
  area.h = (O_COUNT + 1) * (pText[0]->h + adj_size(6)) + adj_size(20);
 
1077
  area.h = (O_LAST + 1) * (pText[0]->h + adj_size(6)) + adj_size(20);
1075
1078
  SDL_FillRectAlpha(pWindow->theme, &area, &bg_color);
1076
1079
  putframe(pWindow->theme, area.x, area.y, area.x + area.w - 1, area.y + area.h - 1,
1077
1080
           map_rgba(pWindow->theme->format, *get_game_colorRGB(COLOR_THEME_CMA_FRAME)));
1135
1138
  /* happy factor label */
1136
1139
  pBuf = pBuf->prev;
1137
1140
  pBuf->size.x = pBuf->next->next->size.x;
1138
 
  pBuf->size.y = pWindow->size.y + dst.y + (pText[O_COUNT]->h - pBuf->size.h) / 2;
 
1141
  pBuf->size.y = pWindow->size.y + dst.y + (pText[O_LAST]->h - pBuf->size.h) / 2;
1139
1142
  
1140
1143
  /* happy factor sb */
1141
1144
  pBuf = pBuf->prev;
1142
1145
  pBuf->size.x = pBuf->next->size.x + pBuf->next->size.w + adj_size(5);
1143
 
  pBuf->size.y = pWindow->size.y + dst.y + (pText[O_COUNT]->h - pBuf->size.h) / 2;
 
1146
  pBuf->size.y = pWindow->size.y + dst.y + (pText[O_LAST]->h - pBuf->size.h) / 2;
1144
1147
  
1145
1148
  area.x = pBuf->size.x - pWindow->size.x - adj_size(2);
1146
1149
  area.y = pBuf->size.y - pWindow->size.y;
1157
1160
  
1158
1161
  /* celebrate static text */
1159
1162
  dst.x += (adj_size(10) + pBuf->size.w + adj_size(5));
1160
 
  dst.y += (pBuf->size.h - pText[O_COUNT]->h) / 2;
1161
 
  alphablit(pText[O_COUNT], NULL, pWindow->theme, &dst);
1162
 
  FREESURFACE(pText[O_COUNT]);
 
1163
  dst.y += (pBuf->size.h - pText[O_LAST]->h) / 2;
 
1164
  alphablit(pText[O_LAST], NULL, pWindow->theme, &dst);
 
1165
  FREESURFACE(pText[O_LAST]);
1163
1166
  /* ------------------------ */
1164
1167
  
1165
1168
  /* save as */