comparison xrogue/wizard.c @ 225:4f6e056438eb

Merge the GCC5 and build fix branches.
author John "Elwin" Edwards
date Wed, 02 Mar 2016 21:28:34 -0500
parents f54901b9c39b
children
comparison
equal deleted inserted replaced
224:4d0f53998e8a 225:4f6e056438eb
19 /* 19 /*
20 * Special wizard commands (some of which are also non-wizard commands 20 * Special wizard commands (some of which are also non-wizard commands
21 * under strange circumstances) 21 * under strange circumstances)
22 */ 22 */
23 23
24 int getbless(void);
25
24 #include <stdlib.h> 26 #include <stdlib.h>
25 #include <curses.h> 27 #include <curses.h>
26 #include <ctype.h> 28 #include <ctype.h>
27 #include <string.h> 29 #include <string.h>
28 #include "rogue.h" 30 #include "rogue.h"
31 /* 33 /*
32 * create_obj: 34 * create_obj:
33 * Create any object for wizard, scroll, magician, or cleric 35 * Create any object for wizard, scroll, magician, or cleric
34 */ 36 */
35 37
36 create_obj(prompt, which_item, which_type) 38 void
37 bool prompt; 39 create_obj(bool prompt, int which_item, int which_type)
38 int which_item, which_type;
39 { 40 {
40 reg struct linked_list *item; 41 reg struct linked_list *item;
41 reg struct object *obj; 42 reg struct object *obj;
42 reg int wh; 43 reg int wh;
43 char *pt; 44 char *pt;
336 * getbless: 337 * getbless:
337 * Get a blessing for a wizards object 338 * Get a blessing for a wizards object
338 */ 339 */
339 340
340 int 341 int
341 getbless() 342 getbless(void)
342 { 343 {
343 reg char bless; 344 reg char bless;
344 345
345 msg("Blessing? (+,-,n)"); 346 msg("Blessing? (+,-,n)");
346 bless = wgetch(msgw); 347 bless = wgetch(msgw);
354 355
355 /* 356 /*
356 * get a non-monster death type 357 * get a non-monster death type
357 */ 358 */
358 359
359 getdeath() 360 int
361 getdeath(void)
360 { 362 {
361 register int i; 363 register int i;
362 int which_death; 364 int which_death;
363 char label[80]; 365 char label[80];
364 366
383 return(deaths[which_death-1].reason); 385 return(deaths[which_death-1].reason);
384 } 386 }
385 387
386 /* 388 /*
387 * make a monster for the wizard 389 * make a monster for the wizard
390 * showall -> show uniques and genocided creatures
388 */ 391 */
389 392
390 makemonster(showall, action) 393 short
391 bool showall; /* showall -> show uniques and genocided creatures */ 394 makemonster(bool showall, char *action)
392 char *action;
393 { 395 {
394 register int i; 396 register int i;
395 register short which_monst; 397 register short which_monst;
396 register int num_monst = NUMMONST, pres_monst=1, num_lines=2*(lines-3); 398 register int num_monst = NUMMONST, pres_monst=1, num_lines=2*(lines-3);
397 int max_monster; 399 int max_monster;
483 * passwd: 485 * passwd:
484 * see if user knows password 486 * see if user knows password
485 */ 487 */
486 488
487 bool 489 bool
488 passwd() 490 passwd(void)
489 { 491 {
490 register char *sp, c; 492 register char *sp, c;
491 char buf[LINELEN]; 493 char buf[LINELEN];
492 494
493 msg("Wizard's Password:"); 495 msg("Wizard's Password:");
520 * teleport: 522 * teleport:
521 * Bamf the hero someplace else 523 * Bamf the hero someplace else
522 */ 524 */
523 525
524 void 526 void
525 teleport() 527 teleport(void)
526 { 528 {
527 register struct room *new_rp = NULL, *old_rp = roomin(&hero); 529 register struct room *new_rp = NULL, *old_rp = roomin(&hero);
528 register int rm, which; 530 register int rm, which;
529 coord old; 531 coord old;
530 bool got_position = FALSE; 532 bool got_position = FALSE;
620 /* 622 /*
621 * whatis: 623 * whatis:
622 * What a certin object is 624 * What a certin object is
623 */ 625 */
624 626
625 whatis(what) 627 void
626 struct linked_list *what; 628 whatis(struct linked_list *what)
627 { 629 {
628 register struct object *obj; 630 register struct object *obj;
629 register struct linked_list *item; 631 register struct linked_list *item;
630 632
631 if (what == NULL) { /* do we need to ask which one? */ 633 if (what == NULL) { /* do we need to ask which one? */
684 /* 686 /*
685 * Choose a quest item 687 * Choose a quest item
686 * (if on STARTLEV equipage level = 0) 688 * (if on STARTLEV equipage level = 0)
687 */ 689 */
688 690
689 choose_qst() 691 void
692 choose_qst(void)
690 { 693 {
691 bool doit = TRUE; 694 bool doit = TRUE;
692 bool escp = TRUE; 695 bool escp = TRUE;
693 696
694 /* let wizard in on this too */ 697 /* let wizard in on this too */
716 mvwaddstr(hw, 0, 0, "Select a quest item: "); /* prompt */ 719 mvwaddstr(hw, 0, 0, "Select a quest item: "); /* prompt */
717 720
718 if (menu_overlay) /* Print the selections. The longest line is 721 if (menu_overlay) /* Print the selections. The longest line is
719 * Hruggek (26 characters). The prompt is 21. 722 * Hruggek (26 characters). The prompt is 21.
720 */ 723 */
721 over_win(cw, hw, 20, 29, 0, 21, NULL); 724 over_win(cw, hw, 20, 29, 0, 21, '\0');
722 else 725 else
723 draw(hw); 726 draw(hw);
724 727
725 while (doit) { 728 while (doit) {
726 switch (wgetch(cw)) { 729 switch (wgetch(cw)) {