#include "artifact.h"
#include "avatar.h"
#include "player-status.h"
+#include "monster.h"
-/*!
- * @brief 現在の修正後能力値を3~17及び18/xxx形式に変換する / Converts stat num into a six-char (right justified) string
- * @param val 能力値
- * @param out_val 出力先文字列ポインタ
- * @return なし
- */
-void cnv_stat(int val, char *out_val)
-{
- /* Above 18 */
- if (val > 18)
- {
- int bonus = (val - 18);
+ /*
+ * Some screen locations for various display routines
+ * Currently, row 8 and 15 are the only "blank" rows.
+ * That leaves a "border" around the "stat" values.
+ */
- if (bonus >= 220)
- {
- sprintf(out_val, "18/%3s", "***");
- }
- else if (bonus >= 100)
- {
- sprintf(out_val, "18/%03d", bonus);
- }
- else
- {
- sprintf(out_val, " 18/%02d", bonus);
- }
- }
+#define ROW_RACE 1
+#define COL_RACE 0 /* <race name> */
- /* From 3 to 18 */
- else
- {
- sprintf(out_val, " %2d", val);
- }
-}
+ /*#define ROW_CLASS 2 */
+ /*#define COL_CLASS 0 */ /* <class name> */
-/*!
- * @brief 能力値現在値から3~17及び18/xxx様式に基づく加減算を行う。
- * Modify a stat value by a "modifier", return new value
- * @param value 現在値
- * @param amount 加減算値
- * @return 加減算後の値
- * @details
- * <pre>
- * Stats go up: 3,4,...,17,18,18/10,18/20,...,18/220
- * Or even: 18/13, 18/23, 18/33, ..., 18/220
- * Stats go down: 18/220, 18/210,..., 18/10, 18, 17, ..., 3
- * Or even: 18/13, 18/03, 18, 17, ..., 3
- * </pre>
- */
-s16b modify_stat_value(int value, int amount)
-{
- int i;
+#define ROW_TITLE 2
+#define COL_TITLE 0 /* <title> or <mode> */
- /* Reward */
- if (amount > 0)
- {
- /* Apply each point */
- for (i = 0; i < amount; i++)
- {
- /* One point at a time */
- if (value < 18) value++;
+/*#define ROW_SEIKAKU 4 */
+/*#define COL_SEIKAKU 0*/ /* <seikaku> */
- /* Ten "points" at a time */
- else value += 10;
- }
- }
+#define ROW_DAY 21
+#define COL_DAY 0 /* day */
- /* Penalty */
- else if (amount < 0)
- {
- /* Apply each point */
- for (i = 0; i < (0 - amount); i++)
- {
- /* Ten points at a time */
- if (value >= 18+10) value -= 10;
+#define ROW_DUNGEON 22
+#define COL_DUNGEON 0 /* dungeon */
- /* Hack -- prevent weirdness */
- else if (value > 18) value = 18;
+#define ROW_LEVEL 3
+#define COL_LEVEL 0 /* "LEVEL xxxxxx" */
- /* One point at a time */
- else if (value > 3) value--;
- }
- }
+#define ROW_EXP 4
+#define COL_EXP 0 /* "EXP xxxxxxxx" */
- /* Return new value */
- return (s16b)(value);
-}
+#define ROW_GOLD 5
+#define COL_GOLD 0 /* "AU xxxxxxxxx" */
+
+#define ROW_EQUIPPY 6
+#define COL_EQUIPPY 0 /* equippy chars */
+
+#define ROW_STAT 7
+#define COL_STAT 0 /* "xxx xxxxxx" */
+
+#define ROW_AC 13
+#define COL_AC 0 /* "Cur AC xxxxx" */
+
+#define ROW_HPMP 14
+#define COL_HPMP 0
+
+#define ROW_CURHP 14
+#define COL_CURHP 0 /* "Cur HP xxxxx" */
+
+#define ROW_CURSP 15
+#define COL_CURSP 0 /* "Cur SP xxxxx" */
+
+#define ROW_RIDING_INFO 16
+#define COL_RIDING_INFO 0 /* "xxxxxxxxxxxx" */
+
+#define ROW_INFO 17
+#define COL_INFO 0 /* "xxxxxxxxxxxx" */
+
+#define ROW_CUT 18
+#define COL_CUT 0 /* <cut> */
+
+#define ROW_STUN 19
+#define COL_STUN 0 /* <stun> */
+
+#define ROW_HUNGRY 20
+#define COL_HUNGRY 0 /* "Weak" / "Hungry" / "Full" / "Gorged" */
+
+#define ROW_STATE 20
+#define COL_STATE 7 /* <state> */
+
+#define ROW_SPEED (-1)
+#define COL_SPEED (-24) /* "Slow (-NN)" or "Fast (+NN)" */
+
+#define ROW_STUDY (-1)
+#define COL_STUDY (-13) /* "Study" */
+
+#define ROW_DEPTH (-1)
+#define COL_DEPTH (-8) /* "Lev NNN" / "NNNN ft" */
+
+#define ROW_STATBAR (-1)
+#define COL_STATBAR 0
+#define MAX_COL_STATBAR (-26)
{
char tmp[32];
- sprintf(tmp, _("%5d", "%6d"), p_ptr->lev);
+ sprintf(tmp, "%5d", p_ptr->lev);
if (p_ptr->lev >= p_ptr->max_plv)
{
panel_row_min = y;
panel_col_min = x;
- /* Recalculate the boundaries */
panel_bounds_center();
p_ptr->update |= (PU_MONSTERS);
return (FALSE);
}
+/*!
+ * @brief プレイヤーの装備一覧シンボルを固定位置に表示する
+ * @return なし
+ */
+void print_equippy(void)
+{
+ display_player_equippy(ROW_EQUIPPY, COL_EQUIPPY, 0);
+}
+
+/*!
+ * @brief 現在のコンソール表示の縦横を返す。 /
+ * Get term size and calculate screen size
+ * @param wid_p コンソールの表示幅文字数を返す
+ * @param hgt_p コンソールの表示行数を返す
+ * @return なし
+ */
+void get_screen_size(TERM_LEN *wid_p, TERM_LEN *hgt_p)
+{
+ Term_get_size(wid_p, hgt_p);
+ *hgt_p -= ROW_MAP + 2;
+ *wid_p -= COL_MAP + 2;
+ if (use_bigtile) *wid_p /= 2;
+}