変愚蛮怒のメインリポジトリです
Revision | 57203347efd776d1633d945f2c35269135c94c9f (tree) |
---|---|
Time | 2017-10-02 09:18:31 |
Author | Deskull <desull@user...> |
Commiter | Deskull |
@@ -932,7 +932,8 @@ static bool flush_ringbuf_client(void) | ||
932 | 932 | while (get_nextbuf(buf)) |
933 | 933 | { |
934 | 934 | char id; |
935 | - int x, y, len, col; | |
935 | + int x, y, len; | |
936 | + SYMBOL_COLOR col; | |
936 | 937 | int i; |
937 | 938 | unsigned char tmp1, tmp2, tmp3, tmp4; |
938 | 939 | char *mesg; |
@@ -4441,8 +4441,8 @@ void do_cmd_throw(void) | ||
4441 | 4441 | |
4442 | 4442 | static int flow_head = 0; |
4443 | 4443 | static int flow_tail = 0; |
4444 | -static s16b temp2_x[MAX_SHORT]; | |
4445 | -static s16b temp2_y[MAX_SHORT]; | |
4444 | +static POSITION temp2_x[MAX_SHORT]; | |
4445 | +static POSITION temp2_y[MAX_SHORT]; | |
4446 | 4446 | |
4447 | 4447 | /*! |
4448 | 4448 | * @brief トラベル処理の記憶配列を初期化する Hack: forget the "flow" information |
@@ -4514,7 +4514,7 @@ static int travel_flow_cost(int y, int x) | ||
4514 | 4514 | * @param wall プレイヤーが壁の中にいるならばTRUE |
4515 | 4515 | * @return なし |
4516 | 4516 | */ |
4517 | -static void travel_flow_aux(int y, int x, int n, bool wall) | |
4517 | +static void travel_flow_aux(POSITION y, POSITION x, int n, bool wall) | |
4518 | 4518 | { |
4519 | 4519 | cave_type *c_ptr = &cave[y][x]; |
4520 | 4520 | feature_type *f_ptr = &f_info[c_ptr->feat]; |
@@ -5449,10 +5449,11 @@ static void ang_sort_art_swap(vptr u, vptr v, int a, int b) | ||
5449 | 5449 | */ |
5450 | 5450 | static void do_cmd_knowledge_artifacts(void) |
5451 | 5451 | { |
5452 | - int i, k, x, y, n = 0; | |
5452 | + IDX i; | |
5453 | + int k, x, y, n = 0; | |
5453 | 5454 | IDX z; |
5454 | 5455 | u16b why = 3; |
5455 | - s16b *who; | |
5456 | + IDX *who; | |
5456 | 5457 | |
5457 | 5458 | FILE *fff; |
5458 | 5459 |
@@ -5617,7 +5618,8 @@ static void do_cmd_knowledge_artifacts(void) | ||
5617 | 5618 | */ |
5618 | 5619 | static void do_cmd_knowledge_uniques(void) |
5619 | 5620 | { |
5620 | - int i, k, n = 0; | |
5621 | + IDX i; | |
5622 | + int k, n = 0; | |
5621 | 5623 | u16b why = 2; |
5622 | 5624 | IDX *who; |
5623 | 5625 |
@@ -6130,9 +6132,10 @@ static void do_cmd_knowledge_pets(void) | ||
6130 | 6132 | */ |
6131 | 6133 | static void do_cmd_knowledge_kill_count(void) |
6132 | 6134 | { |
6133 | - int i, k, n = 0; | |
6135 | + IDX i; | |
6136 | + int k, n = 0; | |
6134 | 6137 | u16b why = 2; |
6135 | - s16b *who; | |
6138 | + IDX *who; | |
6136 | 6139 | |
6137 | 6140 | FILE *fff; |
6138 | 6141 |
@@ -6731,7 +6734,7 @@ static void do_cmd_knowledge_monsters(bool *need_redraw, bool visual_only, IDX d | ||
6731 | 6734 | byte attr_top = 0, char_left = 0; |
6732 | 6735 | |
6733 | 6736 | int browser_rows; |
6734 | - POSITION wid, hgt; | |
6737 | + TERM_POSITION wid, hgt; | |
6735 | 6738 | |
6736 | 6739 | BIT_FLAGS8 mode; |
6737 | 6740 |
@@ -8147,13 +8150,8 @@ static void do_cmd_knowledge_quests_current(FILE *fff) | ||
8147 | 8150 | } |
8148 | 8151 | else |
8149 | 8152 | { |
8150 | -#ifdef JP | |
8151 | - sprintf(rand_tmp_str," %s (%d 階) - %sを倒す。\n", | |
8152 | - quest[i].name, quest[i].level, name); | |
8153 | -#else | |
8154 | - sprintf(rand_tmp_str," %s (Dungeon level: %d)\n Kill %s.\n", | |
8155 | - quest[i].name, quest[i].level, name); | |
8156 | -#endif | |
8153 | + sprintf(rand_tmp_str,_(" %s (%d 階) - %sを倒す。\n", " %s (Dungeon level: %d)\n Kill %s.\n"), | |
8154 | + quest[i].name, (int)quest[i].level, name); | |
8157 | 8155 | } |
8158 | 8156 | } |
8159 | 8157 | } |
@@ -8260,13 +8258,13 @@ void do_cmd_knowledge_quests_completed(FILE *fff, IDX quest_num[]) | ||
8260 | 8258 | */ |
8261 | 8259 | void do_cmd_knowledge_quests_failed(FILE *fff, IDX quest_num[]) |
8262 | 8260 | { |
8263 | - int i; | |
8261 | + IDX i; | |
8264 | 8262 | int total = 0; |
8265 | 8263 | |
8266 | 8264 | fprintf(fff, _("《失敗したクエスト》\n", "< Failed Quest >\n")); |
8267 | 8265 | for (i = 1; i < max_quests; i++) |
8268 | 8266 | { |
8269 | - int q_idx = quest_num[i]; | |
8267 | + IDX q_idx = quest_num[i]; | |
8270 | 8268 | quest_type* const q_ptr = &quest[q_idx]; |
8271 | 8269 | |
8272 | 8270 | if (((q_ptr->status == QUEST_STATUS_FAILED_DONE) || (q_ptr->status == QUEST_STATUS_FAILED)) && |
@@ -148,7 +148,7 @@ extern bool character_xtra; | ||
148 | 148 | extern bool creating_savefile; |
149 | 149 | extern u32b seed_flavor; |
150 | 150 | extern u32b seed_town; |
151 | -extern s16b command_cmd; | |
151 | +extern COMMAND_CODE command_cmd; | |
152 | 152 | extern s16b command_arg; |
153 | 153 | extern s16b command_rep; |
154 | 154 | extern DIRECTION command_dir; |
@@ -355,7 +355,10 @@ static named_num gf_desc[] = | ||
355 | 355 | */ |
356 | 356 | errr process_pref_file_command(char *buf) |
357 | 357 | { |
358 | - int i, j, n1, n2; | |
358 | + int i, j; | |
359 | + SYMBOL_COLOR n1; | |
360 | + SYMBOL_CODE n2; | |
361 | + | |
359 | 362 | |
360 | 363 | char *zz[16]; |
361 | 364 |
@@ -143,6 +143,12 @@ typedef s16b PERCENTAGE; /*!< ゲーム中のパーセント表記の型定 | ||
143 | 143 | typedef u32b BIT_FLAGS; /*!< 32ビットのフラグ配列の型定義 */ |
144 | 144 | typedef byte BIT_FLAGS8; /*!< 8ビットのフラグ配列の型定義 */ |
145 | 145 | |
146 | +typedef s16b COMMAND_CODE; /*!< コマンド内容の型定義 */ | |
147 | + | |
148 | +typedef int TERM_POSITION; /*!< コンソール表示座標の型定義 */ | |
149 | +typedef byte SYMBOL_COLOR; /*!< キャラの色の型定義 */ | |
150 | +typedef byte SYMBOL_CODE; /*!< キャラの文字の型定義 */ | |
151 | + | |
146 | 152 | /*** Pointers to all the basic types defined above ***/ |
147 | 153 | |
148 | 154 | typedef real *real_ptr; |
@@ -133,11 +133,11 @@ struct object_kind | ||
133 | 133 | byte level; /*!< ベースアイテムの基本生成階 / Level */ |
134 | 134 | byte extra; /*!< その他色々のビットフラグ配列 / Something */ |
135 | 135 | |
136 | - byte d_attr; /*!< デフォルトのアイテムシンボルカラー / Default object attribute */ | |
137 | - byte d_char; /*!< デフォルトのアイテムシンボルアルファベット / Default object character */ | |
136 | + SYMBOL_COLOR d_attr; /*!< デフォルトのアイテムシンボルカラー / Default object attribute */ | |
137 | + SYMBOL_CODE d_char; /*!< デフォルトのアイテムシンボルアルファベット / Default object character */ | |
138 | 138 | |
139 | - byte x_attr; /*!< 設定変更後のアイテムシンボルカラー / Desired object attribute */ | |
140 | - byte x_char; /*!< 設定変更後のアイテムシンボルアルファベット / Desired object character */ | |
139 | + SYMBOL_COLOR x_attr; /*!< 設定変更後のアイテムシンボルカラー / Desired object attribute */ | |
140 | + SYMBOL_CODE x_char; /*!< 設定変更後のアイテムシンボルアルファベット / Desired object character */ | |
141 | 141 | |
142 | 142 | s16b flavor; /*!< 調査中(TODO) / Special object flavor (or zero) */ |
143 | 143 |
@@ -2320,7 +2320,7 @@ errr Term_get_cursor(int *v) | ||
2320 | 2320 | /* |
2321 | 2321 | * Extract the current window size |
2322 | 2322 | */ |
2323 | -errr Term_get_size(int *w, int *h) | |
2323 | +errr Term_get_size(TERM_POSITION *w, TERM_POSITION *h) | |
2324 | 2324 | { |
2325 | 2325 | /* Access the cursor */ |
2326 | 2326 | (*w) = Term->wid; |
@@ -37,7 +37,7 @@ struct term_win | ||
37 | 37 | bool cu, cv; |
38 | 38 | byte cx, cy; |
39 | 39 | |
40 | - byte **a; | |
40 | + SYMBOL_COLOR **a; | |
41 | 41 | char **c; |
42 | 42 | |
43 | 43 | byte *va; |
@@ -187,8 +187,8 @@ struct term | ||
187 | 187 | u16b key_xtra; |
188 | 188 | u16b key_size; |
189 | 189 | |
190 | - byte wid; | |
191 | - byte hgt; | |
190 | + TERM_POSITION wid; | |
191 | + TERM_POSITION hgt; | |
192 | 192 | |
193 | 193 | byte y1; |
194 | 194 | byte y2; |