* flag. This is useful for switching "graphics" on/off.\n
*\n
* The features, objects, and monsters, should all be encoded in the\n
- * relevant "font.pref" and/or "graf.prf" files. XXX XXX XXX\n
+ * relevant "font.pref" and/or "graf.prf" files. \n
*\n
- * The "prefs" parameter is no longer meaningful. XXX XXX XXX\n
+ * The "prefs" parameter is no longer meaningful. \n
*/
void reset_visuals(void)
{
* @param flgs フラグ情報を受け取る配列
* @return なし
*/
-void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
+void object_flags(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
{
object_kind *k_ptr = &k_info[o_ptr->k_idx];
int i;
* @param flgs フラグ情報を受け取る配列
* @return なし
*/
-void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
+void object_flags_known(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
{
bool spoil = FALSE;
int i;
static cptr item_activation_dragon_breath(object_type *o_ptr)
{
static char desc[256];
- u32b flgs[TR_FLAG_SIZE]; /* for resistance flags */
+ BIT_FLAGS flgs[TR_FLAG_SIZE]; /* for resistance flags */
int i, n = 0;
object_flags(o_ptr, flgs);
*/
cptr item_activation(object_type *o_ptr)
{
- u32b flgs[TR_FLAG_SIZE];
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
/* Extract the flags */
object_flags(o_ptr, flgs);
return _("モンスターを捕える、又は解放する。", "captures or releases a monster.");
}
- /* Oops */
return _("何も起きない", "Nothing");
}
*/
bool screen_object(object_type *o_ptr, BIT_FLAGS mode)
{
- int i = 0, j, k;
+ int i = 0, j, k;
- u32b flgs[TR_FLAG_SIZE];
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
char temp[70 * 20];
cptr info[128];
char o_name[MAX_NLEN];
int wid, hgt;
- int rad;
+ POSITION rad;
char desc[256];
int trivial_info = 0;
if (have_flag(flgs, TR_LITE_FUEL) && o_ptr->name2 != EGO_LITE_DARKNESS)
{
- if(rad > 0) sprintf(desc, _("それは燃料補給によって明かり(半径 %d)を授ける。", "It provides light (radius %d) when fueled."), rad);
+ if(rad > 0) sprintf(desc, _("それは燃料補給によって明かり(半径 %d)を授ける。", "It provides light (radius %d) when fueled."), (int)rad);
}
else
{
- if(rad > 0) sprintf(desc, _("それは永遠なる明かり(半径 %d)を授ける。", "It provides light (radius %d) forever."), rad);
- if(rad < 0) sprintf(desc, _("それは明かりの半径を狭める(半径に-%d)。", "It decreases radius of light source by %d."), -rad);
+ if(rad > 0) sprintf(desc, _("それは永遠なる明かり(半径 %d)を授ける。", "It provides light (radius %d) forever."), (int)rad);
+ if(rad < 0) sprintf(desc, _("それは明かりの半径を狭める(半径に-%d)。", "It decreases radius of light source by %d."), (int)-rad);
}
if(rad != 0) info[i++] = desc;
/* Save the screen */
screen_save();
- /* Get size */
Term_get_size(&wid, &hgt);
/* Display Item name */
{
register int i, n, z = 0;
object_type *o_ptr;
- byte attr = TERM_WHITE;
+ TERM_COLOR attr = TERM_WHITE;
char tmp_val[80];
char o_name[MAX_NLEN];
int wid, hgt;
- /* Get size */
Term_get_size(&wid, &hgt);
/* Find the "final" slot */
{
register int i, n;
object_type *o_ptr;
- byte attr = TERM_WHITE;
+ TERM_COLOR attr = TERM_WHITE;
char tmp_val[80];
char o_name[MAX_NLEN];
int wid, hgt;
- /* Get size */
Term_get_size(&wid, &hgt);
/* Display the equipment */
object_type *o_ptr;
char o_name[MAX_NLEN];
char tmp_val[80];
- COMMAND_CODE out_index[23];
- byte out_color[23];
+ COMMAND_CODE out_index[23];
+ TERM_COLOR out_color[23];
char out_desc[23][MAX_NLEN];
COMMAND_CODE target_item_label = 0;
- TERM_POSITION wid, hgt;
+ TERM_LEN wid, hgt;
char inven_label[52 + 1];
/* Starting column */
col = command_gap;
- /* Get size */
Term_get_size(&wid, &hgt);
/* Default "max-length" */
/* Is this item acceptable? */
if (!item_tester_okay(o_ptr)) continue;
- /* Describe the object */
object_desc(o_name, o_ptr, 0);
/* Save the object index, color, and description */
/* Get the index */
i = out_index[j];
- /* Get the item */
o_ptr = &inventory[i];
/* Clear the line */
object_type *o_ptr;
char tmp_val[80];
char o_name[MAX_NLEN];
- COMMAND_CODE out_index[23];
- byte out_color[23];
+ COMMAND_CODE out_index[23];
+ TERM_COLOR out_color[23];
char out_desc[23][MAX_NLEN];
COMMAND_CODE target_item_label = 0;
- TERM_POSITION wid, hgt;
+ TERM_LEN wid, hgt;
char equip_label[52 + 1];
/* Starting column */
col = command_gap;
- /* Get size */
Term_get_size(&wid, &hgt);
/* Maximal length */
if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
{
-#ifdef JP
- (void)strcpy(out_desc[k],"(武器を両手持ち)");
-#else
- (void)strcpy(out_desc[k],"(wielding with two-hands)");
-#endif
+ (void)strcpy(out_desc[k],_("(武器を両手持ち)", "(wielding with two-hands)"));
out_color[k] = TERM_WHITE;
}
else
/* Get the index */
i = out_index[j];
- /* Get the item */
o_ptr = &inventory[i];
/* Clear the line */
window_flag[j] &= ~(PW_INVEN);
window_flag[j] |= (PW_EQUIP);
- /* Window stuff */
p_ptr->window |= (PW_EQUIP);
}
window_flag[j] &= ~(PW_EQUIP);
window_flag[j] |= (PW_INVEN);
- /* Window stuff */
p_ptr->window |= (PW_INVEN);
}
}
{
o_ptr = &o_list[0 - item];
}
-
- /* Describe */
object_desc(o_name, o_ptr, 0);
/* Prompt */
static bool get_item_allow(INVENTORY_IDX item)
{
cptr s;
-
object_type *o_ptr;
-
if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
/* Inventory */
int max_inven = 0;
int max_equip = 0;
-#ifdef ALLOW_REPEAT
-
static char prev_tag = '\0';
char cur_tag = '\0';
-#endif /* ALLOW_REPEAT */
-
-#ifdef ALLOW_EASY_FLOOR /* TNB */
-
if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
-#endif /* ALLOW_EASY_FLOOR -- TNB */
-
/* Extract args */
if (mode & USE_EQUIP) equip = TRUE;
if (mode & USE_INVEN) inven = TRUE;
if (mode & USE_FLOOR) floor = TRUE;
-#ifdef ALLOW_REPEAT
-
/* Get the item index */
if (repeat_pull(cp))
{
/* Special index */
k = 0 - (*cp);
-
- /* Acquire object */
o_ptr = &o_list[k];
/* Validate the item */
}
}
-#endif /* ALLOW_REPEAT */
-
- /* Paranoia XXX XXX XXX */
+ /* Paranoia */
msg_print(NULL);
for (this_o_idx = cave[p_ptr->y][p_ptr->x].o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[this_o_idx];
/* Acquire next object */
/* Cancel p_ptr->command_see */
command_see = FALSE;
- /* Oops */
oops = TRUE;
- /* Done */
done = TRUE;
if (select_the_force) {
/* Hack -- start out in "display" mode */
if (command_see)
{
- /* Save screen */
screen_save();
}
/* Hack -- Fix screen */
if (command_see)
{
- /* Load screen */
screen_load();
-
- /* Save screen */
screen_save();
}
{
/* Flip flag */
command_see = FALSE;
-
- /* Load screen */
screen_load();
}
/* Show the list */
else
{
- /* Save screen */
screen_save();
/* Flip flag */
/* Hack -- Fix screen */
if (command_see)
{
- /* Load screen */
screen_load();
-
- /* Save screen */
screen_save();
}
for (this_o_idx = cave[p_ptr->y][p_ptr->x].o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[this_o_idx];
/* Acquire next object */
if (done) break;
}
- /* Oops */
bell();
break;
}
(*cp) = k;
item = TRUE;
done = TRUE;
-#ifdef ALLOW_REPEAT
cur_tag = which;
-#endif /* ALLOW_REPEAT */
break;
}
(*cp) = k;
item = TRUE;
done = TRUE;
-#ifdef ALLOW_REPEAT
cur_tag = which;
-#endif /* ALLOW_REPEAT */
break;
}
/* Fix the screen if necessary */
if (command_see)
{
- /* Load screen */
screen_load();
/* Hack -- Cancel "display" */
/* Update */
p_ptr->window |= (PW_INVEN | PW_EQUIP);
- /* Window stuff */
window_stuff();
if (item)
{
-#ifdef ALLOW_REPEAT
repeat_push(*cp);
if (command_cmd) prev_tag = cur_tag;
-#endif /* ALLOW_REPEAT */
-
command_cmd = 0; /* Hack -- command_cmd is no longer effective */
}
-
- /* Result */
return (item);
}
-
-#ifdef ALLOW_EASY_FLOOR
-
/*!
* @brief 床下に落ちているオブジェクトの数を返す / scan_floor
* @param items オブジェクトのIDリストを返すための配列参照ポインタ
for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[this_o_idx];
/* Acquire next object */
/* Only one */
if (mode & 0x04) break;
}
-
- /* Result */
return num;
}
* @return 選択したアイテムの添え字
* @details
*/
-COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_POSITION *min_width)
+COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_LEN *min_width)
{
COMMAND_CODE i, m;
int j, k, l;
char tmp_val[80];
COMMAND_CODE out_index[23];
- byte out_color[23];
+ TERM_COLOR out_color[23];
char out_desc[23][MAX_NLEN];
COMMAND_CODE target_item_label = 0;
OBJECT_IDX floor_list[23];
ITEM_NUMBER floor_num;
- TERM_POSITION wid, hgt;
+ TERM_LEN wid, hgt;
char floor_label[52 + 1];
bool dont_need_to_show_weights = TRUE;
- /* Get size */
Term_get_size(&wid, &hgt);
/* Default length */
len = MAX((*min_width), 20);
-
/* Scan for objects in the grid, using item_tester_okay() */
floor_num = scan_floor(floor_list, y, x, 0x03);
{
o_ptr = &o_list[floor_list[i]];
- /* Describe the object */
object_desc(o_name, o_ptr, 0);
/* Save the index */
/* Get the index */
m = floor_list[out_index[j]];
- /* Get the item */
o_ptr = &o_list[m];
/* Clear the line */
ITEM_NUMBER floor_num;
OBJECT_IDX floor_list[23];
int floor_top = 0;
- TERM_POSITION min_width = 0;
+ TERM_LEN min_width = 0;
extern bool select_the_force;
int max_inven = 0;
int max_equip = 0;
-#ifdef ALLOW_REPEAT
-
static char prev_tag = '\0';
char cur_tag = '\0';
}
}
-#endif /* ALLOW_REPEAT */
-
- /* Paranoia XXX XXX XXX */
+ /* Paranoia */
msg_print(NULL);
/* Cancel p_ptr->command_see */
command_see = FALSE;
- /* Oops */
oops = TRUE;
- /* Done */
done = TRUE;
if (select_the_force) {
/* Hack -- start out in "display" mode */
if (command_see)
{
- /* Save screen */
screen_save();
}
/* Append */
if (allow_equip)
{
-#ifdef JP
- if (!use_menu)
- strcat(out_val, " '/' 装備品,");
- else if (allow_floor)
- strcat(out_val, " '6' 装備品,");
- else
- strcat(out_val, " '4'or'6' 装備品,");
-#else
if (!use_menu)
- strcat(out_val, " / for Equip,");
+ strcat(out_val, _(" '/' 装備品,", " / for Equip,"));
else if (allow_floor)
- strcat(out_val, " 6 for Equip,");
+ strcat(out_val, _(" '6' 装備品,", " 6 for Equip,"));
else
- strcat(out_val, " 4 or 6 for Equip,");
-#endif
+ strcat(out_val, _(" '4'or'6' 装備品,", " 4 or 6 for Equip,"));
}
/* Append */
if (allow_floor)
{
-#ifdef JP
- if (!use_menu)
- strcat(out_val, " '-'床上,");
- else if (allow_equip)
- strcat(out_val, " '4' 床上,");
- else
- strcat(out_val, " '4'or'6' 床上,");
-#else
if (!use_menu)
- strcat(out_val, " - for floor,");
+ strcat(out_val, _(" '-'床上,", " - for floor,"));
else if (allow_equip)
- strcat(out_val, " 4 for floor,");
+ strcat(out_val, _(" '4' 床上,", " 4 for floor,"));
else
- strcat(out_val, " 4 or 6 for floor,");
-#endif
+ strcat(out_val, _(" '4'or'6' 床上,", " 4 or 6 for floor,"));
}
}
/* Append */
if (allow_inven)
{
-#ifdef JP
- if (!use_menu)
- strcat(out_val, " '/' 持ち物,");
- else if (allow_floor)
- strcat(out_val, " '4' 持ち物,");
- else
- strcat(out_val, " '4'or'6' 持ち物,");
-#else
if (!use_menu)
- strcat(out_val, " / for Inven,");
+ strcat(out_val, _(" '/' 持ち物,", " / for Inven,"));
else if (allow_floor)
- strcat(out_val, " 4 for Inven,");
+ strcat(out_val, _(" '4' 持ち物,", " 4 for Inven,"));
else
- strcat(out_val, " 4 or 6 for Inven,");
-#endif
+ strcat(out_val, _(" '4'or'6' 持ち物,", " 4 or 6 for Inven,"));
}
/* Append */
if (allow_floor)
{
-#ifdef JP
- if (!use_menu)
- strcat(out_val, " '-'床上,");
- else if (allow_inven)
- strcat(out_val, " '6' 床上,");
- else
- strcat(out_val, " '4'or'6' 床上,");
-#else
if (!use_menu)
- strcat(out_val, " - for floor,");
+ strcat(out_val, _(" '-'床上,", " - for floor,"));
else if (allow_inven)
- strcat(out_val, " 6 for floor,");
+ strcat(out_val, _(" '6' 床上,", " 6 for floor,"));
else
- strcat(out_val, " 4 or 6 for floor,");
-#endif
+ strcat(out_val, _(" '4'or'6' 床上,", " 4 or 6 for floor,"));
}
}
/* Hack -- Fix screen */
if (command_see)
{
- /* Load screen */
screen_load();
-
- /* Save screen */
screen_save();
}
/* Hack -- Fix screen */
if (command_see)
{
- /* Load screen */
screen_load();
-
- /* Save screen */
screen_save();
}
{
/* Flip flag */
command_see = FALSE;
-
- /* Load screen */
screen_load();
}
/* Show the list */
else
{
- /* Save screen */
screen_save();
/* Flip flag */
case '+':
{
int i;
- IDX o_idx;
+ OBJECT_IDX o_idx;
cave_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
if (command_wrk != (USE_FLOOR)) break;
/* Hack -- Fix screen */
if (command_see)
{
- /* Load screen */
screen_load();
-
- /* Save screen */
screen_save();
}
/* Hack -- Fix screen */
if (command_see)
{
- /* Load screen */
screen_load();
-
- /* Save screen */
screen_save();
}
/* Hack -- Fix screen */
if (command_see)
{
- /* Load screen */
screen_load();
-
- /* Save screen */
screen_save();
}
(*cp) = k;
item = TRUE;
done = TRUE;
-#ifdef ALLOW_REPEAT
cur_tag = which;
-#endif /* ALLOW_REPEAT */
break;
}
(*cp) = k;
item = TRUE;
done = TRUE;
-#ifdef ALLOW_REPEAT
cur_tag = which;
-#endif /* ALLOW_REPEAT */
break;
}
}
(*cp) = k;
item = TRUE;
done = TRUE;
-#ifdef ALLOW_REPEAT
cur_tag = which;
-#endif /* ALLOW_REPEAT */
break;
}
}
/* Fix the screen if necessary */
if (command_see)
{
- /* Load screen */
screen_load();
/* Hack -- Cancel "display" */
/* Update */
p_ptr->window |= (PW_INVEN | PW_EQUIP);
- /* Window stuff */
window_stuff();
if (item)
{
-#ifdef ALLOW_REPEAT
repeat_push(*cp);
if (command_cmd) prev_tag = cur_tag;
-#endif /* ALLOW_REPEAT */
-
command_cmd = 0; /* Hack -- command_cmd is no longer effective */
}
-
- /* Result */
return (item);
}
/* Access the object */
o_ptr = &o_list[this_o_idx];
- /* Describe the object */
object_desc(o_name, o_ptr, 0);
/* Access the next object */
next_o_idx = o_ptr->next_o_idx;
/* Hack -- disturb */
- disturb(0, 0);
+ disturb(FALSE, FALSE);
/* Pick up gold */
if (o_ptr->tval == TV_GOLD)
{
- /* Message */
#ifdef JP
msg_format(" $%ld の価値がある%sを見つけた。",
(long)o_ptr->pval, o_name);
/* Redraw gold */
p_ptr->redraw |= (PR_GOLD);
- /* Window stuff */
p_ptr->window |= (PW_PLAYER);
/* Delete the gold */
#endif /* ALLOW_EASY_SENSE */
- /* Describe the object */
object_desc(o_name, o_ptr, 0);
- /* Message */
msg_format(_("%sがある。", "You see %s."), o_name);
}
/* Multiple objects */
else
{
- /* Message */
msg_format(_("%d 個のアイテムの山がある。", "You see a pile of %d items."), floor_num);
}
- /* Done */
return;
}
#endif /* ALLOW_EASY_SENSE */
- /* Describe the object */
object_desc(o_name, o_ptr, 0);
- /* Message */
msg_format(_("ザックには%sを入れる隙間がない。", "You have no room for %s."), o_name);
}
/* Multiple objects */
else
{
- /* Message */
msg_print(_("ザックには床にあるどのアイテムも入らない。", "You have no room for any of the objects on the floor."));
}
- /* Done */
return;
}
#endif /* ALLOW_EASY_SENSE */
- /* Describe the object */
object_desc(o_name, o_ptr, 0);
/* Build a prompt */
/* Ask the user to confirm */
if (!get_check(out_val))
{
- /* Done */
return;
}
}
}
}
}
-
-#endif /* ALLOW_EASY_FLOOR */