int show_inven(int target_item)
{
int i, j, k, l, z = 0;
- int col, cur_col, len, lim;
+ int col, cur_col, len;
object_type *o_ptr;
char o_name[MAX_NLEN];
char tmp_val[80];
/* Default "max-length" */
len = wid - col - 1;
- /* Maximum space allowed for descriptions */
- lim = wid - 4;
-
- /* Require space for weight (if needed) */
- if (show_weights) lim -= 9;
-
- /* Require space for icon */
- if (show_item_graph)
- {
- lim -= 2;
- if (use_bigtile) lim--;
- }
/* Find the "final" slot */
for (i = 0; i < INVEN_PACK; i++)
/* Describe the object */
object_desc(o_name, o_ptr, TRUE, 3);
- /* Hack -- enforce max length */
- o_name[lim] = '\0';
-
/* Save the object index, color, and description */
out_index[k] = i;
out_color[k] = tval_to_attr[o_ptr->tval % 128];
int show_equip(int target_item)
{
int i, j, k, l;
- int col, cur_col, len, lim;
+ int col, cur_col, len;
object_type *o_ptr;
char tmp_val[80];
char o_name[MAX_NLEN];
/* Maximal length */
len = wid - col - 1;
- /* Maximum space allowed for descriptions */
- lim = wid - 4;
-
- /* Require space for labels (if needed) */
-#ifdef JP
- if (show_labels) lim -= (7 + 2);
-#else
- if (show_labels) lim -= (14 + 2);
-#endif
-
-
- /* Require space for weight (if needed) */
-#ifdef JP
- if (show_weights) lim -= 10;
-#else
- if (show_weights) lim -= 9;
-#endif
-
-
- if (show_item_graph) lim -= 2;
/* Scan the equipment list */
for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
/* Description */
object_desc(o_name, o_ptr, TRUE, 3);
- /* Truncate the description */
- o_name[lim] = 0;
-
if ((i == INVEN_LARM) && p_ptr->ryoute)
{
#ifdef JP
int show_floor(int target_item, int y, int x, int *min_width)
{
int i, j, k, l;
- int col, len, lim;
+ int col, len;
object_type *o_ptr;
/* Default length */
len = MAX((*min_width), 20);
- /* Maximum space allowed for descriptions */
- lim = wid - 4;
-
- /* Require space for weight (if needed) */
- if (show_weights) lim -= 9;
/* Scan for objects in the grid, using item_tester_okay() */
floor_num = scan_floor(floor_list, y, x, 0x01);
/* Describe the object */
object_desc(o_name, o_ptr, TRUE, 3);
- /* Hack -- enforce max length */
- o_name[lim] = '\0';
-
/* Save the index */
out_index[k] = i;
s16b command_rep; /* Gives repetition of current command */
s16b command_dir; /* Gives direction of current command */
-s16b command_see; /* See "cmd1.c" */
-s16b command_wrk; /* See "cmd1.c" */
+s16b command_see; /* See "object1.c" */
+s16b command_wrk; /* See "object1.c" */
-s16b command_gap = 50; /* See "cmd1.c" */
+s16b command_gap = 999; /* See "object1.c" */
s16b command_new; /* Command chaining from inven/equip view */