• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision4d48c6f719ce6da3e6b0039419233cbb1f79edc0 (tree)
Time2018-12-04 19:20:36
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Refactor] #37353 型の置換。 / Type replacement.

Change Summary

Incremental Difference

--- a/src/melee1.c
+++ b/src/melee1.c
@@ -416,7 +416,6 @@ static void natural_attack(s16b m_idx, int attack, bool *fear, bool *mdeath)
416416 else
417417 {
418418 sound(SOUND_MISS);
419-
420419 msg_format(_("ミス! %sにかわされた。", "You miss %s."), m_name);
421420 }
422421 }
--- a/src/object2.c
+++ b/src/object2.c
@@ -64,9 +64,7 @@ void excise_object_idx(OBJECT_IDX o_idx)
6464 object_type *j_ptr;
6565
6666 OBJECT_IDX this_o_idx, next_o_idx = 0;
67-
68- s16b prev_o_idx = 0;
69-
67+ OBJECT_IDX prev_o_idx = 0;
7068
7169 /* Object */
7270 j_ptr = &o_list[o_idx];
@@ -262,16 +260,15 @@ void delete_object(POSITION y, POSITION x)
262260 * @param i2 整理したい配列の終点
263261 * @return なし
264262 */
265-static void compact_objects_aux(IDX i1, IDX i2)
263+static void compact_objects_aux(OBJECT_IDX i1, OBJECT_IDX i2)
266264 {
267- IDX i;
265+ OBJECT_IDX i;
268266 cave_type *c_ptr;
269267 object_type *o_ptr;
270268
271269 /* Do nothing */
272270 if (i1 == i2) return;
273271
274-
275272 /* Repair objects */
276273 for (i = 1; i < o_max; i++)
277274 {
@@ -289,11 +286,9 @@ static void compact_objects_aux(IDX i1, IDX i2)
289286 }
290287 }
291288
292-
293289 /* Acquire object */
294290 o_ptr = &o_list[i1];
295291
296-
297292 /* Monster */
298293 if (o_ptr->held_m_idx)
299294 {
@@ -330,7 +325,6 @@ static void compact_objects_aux(IDX i1, IDX i2)
330325 }
331326 }
332327
333-
334328 /* Structure copy */
335329 o_list[i2] = o_list[i1];
336330
@@ -363,14 +357,11 @@ void compact_objects(int size)
363357 int cur_lev, cur_dis, chance;
364358 object_type *o_ptr;
365359
366-
367360 /* Compact */
368361 if (size)
369362 {
370363 msg_print(_("アイテム情報を圧縮しています...", "Compacting objects..."));
371-
372364 p_ptr->redraw |= (PR_MAP);
373-
374365 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
375366 }
376367
--- a/src/types.h
+++ b/src/types.h
@@ -537,8 +537,8 @@ struct object_type
537537
538538 WEIGHT weight; /* Item weight */
539539
540- IDX name1; /* Artifact type, if any */
541- IDX name2; /* Ego-Item type, if any */
540+ ARTIFACT_IDX name1; /* Artifact type, if any */
541+ EGO_IDX name2; /* Ego-Item type, if any */
542542
543543 XTRA8 xtra1; /* Extra info type (now unused) */
544544 XTRA8 xtra2; /* Extra info activation index */
@@ -558,7 +558,6 @@ struct object_type
558558 TIME_EFFECT timeout; /* Timeout Counter */
559559
560560 byte ident; /* Special flags */
561-
562561 byte marked; /* Object is marked */
563562
564563 u16b inscription; /* Inscription index */
@@ -569,8 +568,8 @@ struct object_type
569568 BIT_FLAGS art_flags[TR_FLAG_SIZE]; /* Extra Flags for ego and artifacts */
570569 BIT_FLAGS curse_flags; /* Flags for curse */
571570
572- IDX next_o_idx; /* Next object in stack (if any) */
573- IDX held_m_idx; /* Monster holding us (if any) */
571+ OBJECT_IDX next_o_idx; /* Next object in stack (if any) */
572+ MONSTER_IDX held_m_idx; /* Monster holding us (if any) */
574573
575574 ARTIFACT_BIAS_IDX artifact_bias; /*!< ランダムアーティファクト生成時のバイアスID */
576575 };
@@ -579,9 +578,7 @@ struct object_type
579578
580579 /*
581580 * Monster information, for a specific monster.
582- *
583581 * Note: fy, fx constrain dungeon size to 256x256
584- *
585582 * The "hold_o_idx" field points to the first object of a stack
586583 * of objects (if any) being carried by the monster (see above).
587584 */
Show on old repository browser