comparison arogue7/pack.c @ 239:837044d2c362

Merge the GCC5 and build fix branches. This fixes all warnings produced by GCC 5, except the ones related to system functions. Those could be fixed by including the proper headers, but it would be better to replace the system-dependent code with functions from mdport.c.
author John "Elwin" Edwards
date Fri, 11 Mar 2016 19:47:52 -0500
parents e1cd27c5464f
children 0250220d8cdd
comparison
equal deleted inserted replaced
232:bac2c81fec78 239:837044d2c362
247 msg("%s (%c)", inv_name(obj, !terse), pack_char(pack, obj)); 247 msg("%s (%c)", inv_name(obj, !terse), pack_char(pack, obj));
248 } 248 }
249 249
250 /* Relics can do strange things when you pick them up */ 250 /* Relics can do strange things when you pick them up */
251 if (obj->o_type == RELIC) { 251 if (obj->o_type == RELIC) {
252 int newclass;
252 switch (obj->o_which) { 253 switch (obj->o_which) {
253 /* the ankh of Heil gives you prayers */ 254 /* the ankh of Heil gives you prayers */
254 case HEIL_ANKH: 255 case HEIL_ANKH:
255 msg("The ankh welds itself into your hand."); 256 msg("The ankh welds itself into your hand.");
256 if (player.t_ctype != C_CLERIC && player.t_ctype != C_PALADIN) 257 if (player.t_ctype != C_CLERIC && player.t_ctype != C_PALADIN)
257 fuse(prayer_recovery, 0, SPELLTIME, AFTER); 258 fuse(prayer_recovery, NULL, SPELLTIME, AFTER);
258 259
259 /* A cloak must be worn. */ 260 /* A cloak must be worn. */
260 when EMORI_CLOAK: 261 when EMORI_CLOAK:
261 if (cur_armor != NULL || cur_misc[WEAR_CLOAK]) { 262 if (cur_armor != NULL || cur_misc[WEAR_CLOAK]) {
262 msg("The cloak insists you remove your current garments."); 263 msg("The cloak insists you remove your current garments.");
304 } 305 }
305 waste_time(); 306 waste_time();
306 msg("The excrutiating pain slowly turns into a dull throb."); 307 msg("The excrutiating pain slowly turns into a dull throb.");
307 308
308 when QUILL_NAGROM: 309 when QUILL_NAGROM:
309 fuse(quill_charge,0,player.t_ctype==C_MAGICIAN ? 4 : 8,AFTER); 310 fuse(quill_charge,NULL,player.t_ctype==C_MAGICIAN ? 4 : 8,AFTER);
310 311
311 /* Weapons will insist on being wielded. */ 312 /* Weapons will insist on being wielded. */
312 when MUSTY_DAGGER: 313 when MUSTY_DAGGER:
313 case HRUGGEK_MSTAR: 314 case HRUGGEK_MSTAR:
314 case YEENOGHU_FLAIL: 315 case YEENOGHU_FLAIL:
315 case AXE_AKLAD: 316 case AXE_AKLAD:
316 /* For the daggers start a fuse to change player to a thief. */ 317 /* For the daggers start a fuse to change player to a thief. */
317 /* and set a daemon to eat gold. */ 318 /* and set a daemon to eat gold. */
318 if (obj->o_which == MUSTY_DAGGER) { 319 if (obj->o_which == MUSTY_DAGGER) {
319 fuse(changeclass, C_THIEF, roll(20, 20), AFTER); 320 newclass = C_THIEF;
321 fuse(changeclass, &newclass, roll(20, 20), AFTER);
320 if (purse > 0) 322 if (purse > 0)
321 msg("Your purse feels lighter"); 323 msg("Your purse feels lighter");
322 else 324 else
323 purse = 1; /* fudge to get right msg from eat_gold() */ 325 purse = 1; /* fudge to get right msg from eat_gold() */
324 eat_gold(obj); 326 eat_gold(obj);
325 start_daemon(eat_gold, obj, AFTER); 327 start_daemon(eat_gold, obj, AFTER);
326 } 328 }
327 /* For the axe start a fuse to change player to a fighter. */ 329 /* For the axe start a fuse to change player to a fighter. */
328 if (obj->o_which == AXE_AKLAD) 330 if (obj->o_which == AXE_AKLAD)
329 fuse(changeclass, C_FIGHTER, roll(20, 20), AFTER); 331 newclass = C_FIGHTER;
332 fuse(changeclass, &newclass, roll(20, 20), AFTER);
330 if (cur_weapon != NULL) { 333 if (cur_weapon != NULL) {
331 msg("The artifact insists you release your current weapon."); 334 msg("The artifact insists you release your current weapon.");
332 if (!dropcheck(cur_weapon)) { 335 if (!dropcheck(cur_weapon)) {
333 pstats.s_hpt = -1; 336 pstats.s_hpt = -1;
334 msg("The artifact forces your weapon into your heart."); 337 msg("The artifact forces your weapon into your heart.");