• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision39e5d9af6613869ea2eaee658afa4e98defd951f (tree)
Time2019-07-08 12:20:43
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 add_outfit() に player_type * 引数を追加.

Change Summary

Incremental Difference

--- a/src/birth.c
+++ b/src/birth.c
@@ -2212,7 +2212,7 @@ static byte player_init[MAX_CLASS][3][2] =
22122212 * @param o_ptr 処理したいオブジェクト構造体の参照ポインタ
22132213 * @return なし
22142214 */
2215-static void add_outfit(object_type *o_ptr)
2215+static void add_outfit(player_type *creature_ptr, object_type *o_ptr)
22162216 {
22172217 s16b slot;
22182218
@@ -2224,7 +2224,7 @@ static void add_outfit(object_type *o_ptr)
22242224 autopick_alter_item(slot, FALSE);
22252225
22262226 /* Now try wielding everything */
2227- wield_all(p_ptr);
2227+ wield_all(creature_ptr);
22282228 }
22292229
22302230
@@ -2263,7 +2263,7 @@ void player_outfit(player_type *creature_ptr)
22632263 if(q_ptr->pval)
22642264 {
22652265 q_ptr->number = 1;
2266- add_outfit(q_ptr);
2266+ add_outfit(creature_ptr, q_ptr);
22672267 }
22682268 }
22692269 break;
@@ -2276,14 +2276,14 @@ void player_outfit(player_type *creature_ptr)
22762276 object_prep(q_ptr, lookup_kind(TV_STAFF, SV_STAFF_NOTHING));
22772277 q_ptr->number = 1;
22782278
2279- add_outfit(q_ptr);
2279+ add_outfit(creature_ptr, q_ptr);
22802280 break;
22812281
22822282 case RACE_ENT:
22832283 /* Potions of Water */
22842284 object_prep(q_ptr, lookup_kind(TV_POTION, SV_POTION_WATER));
22852285 q_ptr->number = (ITEM_NUMBER)rand_range(15, 23);
2286- add_outfit(q_ptr);
2286+ add_outfit(creature_ptr, q_ptr);
22872287
22882288 break;
22892289
@@ -2295,7 +2295,7 @@ void player_outfit(player_type *creature_ptr)
22952295 apply_magic(q_ptr, 1, AM_NO_FIXED_ART);
22962296
22972297 q_ptr->number = (ITEM_NUMBER)rand_range(7, 12);
2298- add_outfit(q_ptr);
2298+ add_outfit(creature_ptr, q_ptr);
22992299
23002300 break;
23012301
@@ -2304,7 +2304,7 @@ void player_outfit(player_type *creature_ptr)
23042304 object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_RATION));
23052305 q_ptr->number = (ITEM_NUMBER)rand_range(3, 7);
23062306
2307- add_outfit(q_ptr);
2307+ add_outfit(creature_ptr, q_ptr);
23082308 }
23092309 q_ptr = &forge;
23102310
@@ -2315,7 +2315,7 @@ void player_outfit(player_type *creature_ptr)
23152315
23162316 q_ptr->number = (ITEM_NUMBER)rand_range(2, 5);
23172317
2318- add_outfit(q_ptr);
2318+ add_outfit(creature_ptr, q_ptr);
23192319 }
23202320 else if (creature_ptr->pclass != CLASS_NINJA)
23212321 {
@@ -2324,7 +2324,7 @@ void player_outfit(player_type *creature_ptr)
23242324 q_ptr->number = (ITEM_NUMBER)rand_range(3, 7);
23252325 q_ptr->xtra4 = rand_range(3, 7) * 500;
23262326
2327- add_outfit(q_ptr);
2327+ add_outfit(creature_ptr, q_ptr);
23282328 }
23292329 q_ptr = &forge;
23302330
@@ -2332,7 +2332,7 @@ void player_outfit(player_type *creature_ptr)
23322332 {
23332333 object_prep(q_ptr, lookup_kind(TV_RING, SV_RING_LEVITATION_FALL));
23342334 q_ptr->number = 1;
2335- add_outfit(q_ptr);
2335+ add_outfit(creature_ptr, q_ptr);
23362336 }
23372337
23382338 if ((creature_ptr->pclass == CLASS_RANGER) || (creature_ptr->pclass == CLASS_CAVALRY))
@@ -2341,14 +2341,14 @@ void player_outfit(player_type *creature_ptr)
23412341 object_prep(q_ptr, lookup_kind(TV_ARROW, SV_AMMO_NORMAL));
23422342 q_ptr->number = (byte)rand_range(15, 20);
23432343
2344- add_outfit(q_ptr);
2344+ add_outfit(creature_ptr, q_ptr);
23452345 }
23462346 if (creature_ptr->pclass == CLASS_RANGER)
23472347 {
23482348 /* Hack -- Give the player some arrows */
23492349 object_prep(q_ptr, lookup_kind(TV_BOW, SV_SHORT_BOW));
23502350
2351- add_outfit(q_ptr);
2351+ add_outfit(creature_ptr, q_ptr);
23522352 }
23532353 else if (creature_ptr->pclass == CLASS_ARCHER)
23542354 {
@@ -2356,7 +2356,7 @@ void player_outfit(player_type *creature_ptr)
23562356 object_prep(q_ptr, lookup_kind(TV_ARROW, SV_AMMO_NORMAL));
23572357 q_ptr->number = (ITEM_NUMBER)rand_range(15, 20);
23582358
2359- add_outfit(q_ptr);
2359+ add_outfit(creature_ptr, q_ptr);
23602360 }
23612361 else if (creature_ptr->pclass == CLASS_HIGH_MAGE)
23622362 {
@@ -2365,7 +2365,7 @@ void player_outfit(player_type *creature_ptr)
23652365 q_ptr->number = 1;
23662366 q_ptr->pval = (PARAMETER_VALUE)rand_range(25, 30);
23672367
2368- add_outfit(q_ptr);
2368+ add_outfit(creature_ptr, q_ptr);
23692369 }
23702370 else if (creature_ptr->pclass == CLASS_SORCERER)
23712371 {
@@ -2376,7 +2376,7 @@ void player_outfit(player_type *creature_ptr)
23762376 object_prep(q_ptr, lookup_kind(book_tval, 0));
23772377 q_ptr->number = 1;
23782378
2379- add_outfit(q_ptr);
2379+ add_outfit(creature_ptr, q_ptr);
23802380 }
23812381 }
23822382 else if (creature_ptr->pclass == CLASS_TOURIST)
@@ -2387,33 +2387,33 @@ void player_outfit(player_type *creature_ptr)
23872387 object_prep(q_ptr, lookup_kind(TV_SHOT, SV_AMMO_LIGHT));
23882388 q_ptr->number = rand_range(15, 20);
23892389
2390- add_outfit(q_ptr);
2390+ add_outfit(creature_ptr, q_ptr);
23912391 }
23922392
23932393 object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_BISCUIT));
23942394 q_ptr->number = rand_range(2, 4);
23952395
2396- add_outfit(q_ptr);
2396+ add_outfit(creature_ptr, q_ptr);
23972397
23982398 object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_WAYBREAD));
23992399 q_ptr->number = rand_range(2, 4);
24002400
2401- add_outfit(q_ptr);
2401+ add_outfit(creature_ptr, q_ptr);
24022402
24032403 object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_JERKY));
24042404 q_ptr->number = rand_range(1, 3);
24052405
2406- add_outfit(q_ptr);
2406+ add_outfit(creature_ptr, q_ptr);
24072407
24082408 object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_PINT_OF_ALE));
24092409 q_ptr->number = rand_range(2, 4);
24102410
2411- add_outfit(q_ptr);
2411+ add_outfit(creature_ptr, q_ptr);
24122412
24132413 object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_PINT_OF_WINE));
24142414 q_ptr->number = rand_range(2, 4);
24152415
2416- add_outfit(q_ptr);
2416+ add_outfit(creature_ptr, q_ptr);
24172417 }
24182418 else if (creature_ptr->pclass == CLASS_NINJA)
24192419 {
@@ -2421,7 +2421,7 @@ void player_outfit(player_type *creature_ptr)
24212421 object_prep(q_ptr, lookup_kind(TV_SPIKE, 0));
24222422 q_ptr->number = rand_range(15, 20);
24232423
2424- add_outfit(q_ptr);
2424+ add_outfit(creature_ptr, q_ptr);
24252425 }
24262426 else if (creature_ptr->pclass == CLASS_SNIPER)
24272427 {
@@ -2429,7 +2429,7 @@ void player_outfit(player_type *creature_ptr)
24292429 object_prep(q_ptr, lookup_kind(TV_BOLT, SV_AMMO_NORMAL));
24302430 q_ptr->number = rand_range(15, 20);
24312431
2432- add_outfit(q_ptr);
2432+ add_outfit(creature_ptr, q_ptr);
24332433 }
24342434
24352435 if(creature_ptr->pseikaku == SEIKAKU_SEXY)
@@ -2472,7 +2472,7 @@ void player_outfit(player_type *creature_ptr)
24722472 q_ptr->name2 = EGO_BRAND_POIS;
24732473 }
24742474
2475- add_outfit(q_ptr);
2475+ add_outfit(creature_ptr, q_ptr);
24762476 }
24772477
24782478 /* Hack -- make aware of the water */
@@ -4527,7 +4527,7 @@ static bool ask_quick_start(player_type *creature_ptr)
45274527 }
45284528
45294529 load_prev_data(creature_ptr, FALSE);
4530- init_turn(p_ptr);
4530+ init_turn(creature_ptr);
45314531 init_dungeon_quests(creature_ptr);
45324532
45334533 sp_ptr = &sex_info[creature_ptr->psex];
Show on old repository browser