Left: store_org.c
Right: store.c

Left: Sun Feb 14 13:32:46 2010 Right: Sat Aug 14 13:22:44 2010
Line 18  Line 18 
 static int store_top = 0;  static int store_top = 0;
 static int store_bottom = 0;  static int store_bottom = 0;
 static int xtra_stock = 0;  static int xtra_stock = 0;
   static int window_width = 0;
 static store_type *st_ptr = NULL;  static store_type *st_ptr = NULL;
 static owner_type *ot_ptr = NULL;  static owner_type *ot_ptr = NULL;
 static s16b old_town_num = 0;  static s16b old_town_num = 0;
Line 2220  Line 2221 
         /* Describe an item in the home */          /* Describe an item in the home */
         if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM))          if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM))
         {          {
                 maxwid = 75;                  maxwid = window_width;
   
                 /* Leave room for weights, if necessary -DRS- */                  /* Leave room for weights, if necessary -DRS- */
                 if (show_weights) maxwid -= 10;                  if (show_weights) maxwid -= 10;
Line 2237  Line 2238 
                         int wgt = o_ptr->weight;                          int wgt = o_ptr->weight;
 #ifdef JP  #ifdef JP
                         sprintf(out_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );                          sprintf(out_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
                         put_str(out_val, i+6, 67);                          put_str(out_val, i+6, window_width-9);
 #else  #else
                         (void)sprintf(out_val, "%3d.%d lb", wgt / 10, wgt % 10);                          (void)sprintf(out_val, "%3d.%d lb", wgt / 10, wgt % 10);
                         put_str(out_val, i+6, 68);                          put_str(out_val, i+6, window_width-9);
 #endif  #endif
   
                 }                  }
Line 2250  Line 2251 
         else          else
         {          {
                 /* Must leave room for the "price" */                  /* Must leave room for the "price" */
                 maxwid = 65;                  maxwid = window_width-10;
   
                 /* Leave room for weights, if necessary -DRS- */                  /* Leave room for weights, if necessary -DRS- */
                 if (show_weights) maxwid -= 7;                  if (show_weights) maxwid -= 7;
Line 2267  Line 2268 
                         int wgt = o_ptr->weight;                          int wgt = o_ptr->weight;
 #ifdef JP  #ifdef JP
                         sprintf(out_val, "%3d.%1d", lbtokg1(wgt) , lbtokg2(wgt) );                          sprintf(out_val, "%3d.%1d", lbtokg1(wgt) , lbtokg2(wgt) );
                         put_str(out_val, i+6, 60);                          put_str(out_val, i+6, window_width-12-7);
 #else  #else
                         (void)sprintf(out_val, "%3d.%d", wgt / 10, wgt % 10);                          (void)sprintf(out_val, "%3d.%d", wgt / 10, wgt % 10);
                         put_str(out_val, i+6, 61);                          put_str(out_val, i+6, window_width-12-7);
 #endif  #endif
   
                 }                  }
Line 2288  Line 2289 
                         (void)sprintf(out_val, "%9ld F", (long)x);                          (void)sprintf(out_val, "%9ld F", (long)x);
 #endif  #endif
   
                         put_str(out_val, i+6, 68);                          put_str(out_val, i+6, window_width-12);
                 }                  }
   
                 /* Display a "taxed" cost */                  /* Display a "taxed" cost */
Line 2302  Line 2303 
   
                         /* Actually draw the price (with tax) */                          /* Actually draw the price (with tax) */
                         (void)sprintf(out_val, "%9ld  ", (long)x);                          (void)sprintf(out_val, "%9ld  ", (long)x);
                         put_str(out_val, i+6, 68);                          put_str(out_val, i+6, window_width-12);
                 }                  }
   
                 /* Display a "haggle" cost */                  /* Display a "haggle" cost */
Line 2313  Line 2314 
   
                         /* Actually draw the price (not fixed) */                          /* Actually draw the price (not fixed) */
                         (void)sprintf(out_val, "%9ld  ", (long)x);                          (void)sprintf(out_val, "%9ld  ", (long)x);
                         put_str(out_val, i+6, 68);                          put_str(out_val, i+6, window_width-12);
                 }                  }
         }          }
 }  }
Line 2436  Line 2437 
                 if (show_weights)                  if (show_weights)
                 {                  {
 #ifdef JP  #ifdef JP
                         put_str("重さ", 5, 72);                          put_str("重さ", 5, window_width-5);
 #else  #else
                         put_str("Weight", 5, 70);                          put_str("Weight", 5, window_width-7);
 #endif  #endif
   
                 }                  }
Line 2467  Line 2468 
                 if (show_weights)                  if (show_weights)
                 {                  {
 #ifdef JP  #ifdef JP
                         put_str("重さ", 5, 72);                          put_str("重さ", 5, window_width-5);
 #else  #else
                         put_str("Weight", 5, 70);                          put_str("Weight", 5, window_width-7);
 #endif  #endif
   
                 }                  }
Line 2502  Line 2503 
                 if (show_weights)                  if (show_weights)
                 {                  {
 #ifdef JP  #ifdef JP
                         put_str("重さ", 5, 62);                          put_str("重さ", 5, window_width-12-6);
 #else  #else
                         put_str("Weight", 5, 60);                          put_str("Weight", 5, window_width-12-8);
 #endif  #endif
   
                 }                  }
   
                 /* Label the asking price (in stores) */                  /* Label the asking price (in stores) */
 #ifdef JP  #ifdef JP
                 put_str("価格", 5, 73);                  put_str("価格", 5, window_width-7);
 #else  #else
                 put_str("Price", 5, 72);                  put_str("Price", 5, window_width-8);
 #endif  #endif
   
         }          }
Line 4768  Line 4769 
   
         /* Get term size */          /* Get term size */
         Term_get_size(&w, &h);          Term_get_size(&w, &h);
           window_width = w;
   
         /* Calculate stocks per 1 page */          /* Calculate stocks per 1 page */
         xtra_stock = MIN(14+26, ((h > 24) ? (h - 24) : 0));          xtra_stock = MIN(14+26, ((h > 24) ? (h - 24) : 0));