comparison rogue4/rip.c @ 304:e52a8a7ad4c5

Fix many compiler warnings. There should only be two changes in behavior: arogue7/fight.c, arogue7/fight.c: a to-hit bonus is now correctly applied to characters who are not monks instead of monks who are not empty-handed. urogue/fight.c: fixed an interaction with the "debug" macro that could cause the wrong message to be displayed.
author John "Elwin" Edwards
date Wed, 14 Apr 2021 18:55:33 -0400
parents 0250220d8cdd
children
comparison
equal deleted inserted replaced
303:e06ebc407615 304:e52a8a7ad4c5
97 refresh(); 97 refresh();
98 endwin(); 98 endwin();
99 } 99 }
100 #ifdef WIZARD 100 #ifdef WIZARD
101 if (wizard) 101 if (wizard)
102 {
102 if (strcmp(prbuf, "names") == 0) 103 if (strcmp(prbuf, "names") == 0)
103 prflags = 1; 104 prflags = 1;
104 else if (strcmp(prbuf, "edit") == 0) 105 else if (strcmp(prbuf, "edit") == 0)
105 prflags = 2; 106 prflags = 2;
107 }
106 #endif 108 #endif
107 for(i=0; i<10; i++) 109 for(i=0; i<10; i++)
108 { 110 {
109 encread((char *) &top_ten[i].sc_name, MAXSTR, score_file); 111 encread((char *) &top_ten[i].sc_name, MAXSTR, score_file);
110 scoreline[0] = '\0'; 112 scoreline[0] = '\0';
162 */ 164 */
163 printf("Top Ten Rogueists:\nRank\tScore\tName\n"); 165 printf("Top Ten Rogueists:\nRank\tScore\tName\n");
164 for (scp = top_ten; scp <= &top_ten[9]; scp++) 166 for (scp = top_ten; scp <= &top_ten[9]; scp++)
165 { 167 {
166 if (scp->sc_score) { 168 if (scp->sc_score) {
167 printf("%d\t%d\t%s: %s on level %d", scp - top_ten + 1, 169 printf("%d\t%d\t%s: %s on level %d", (int) (scp - top_ten + 1),
168 scp->sc_score, scp->sc_name, reason[scp->sc_flags], 170 scp->sc_score, scp->sc_name, reason[scp->sc_flags],
169 scp->sc_level); 171 scp->sc_level);
170 if (scp->sc_flags == 0) 172 if (scp->sc_flags == 0)
171 printf(" by %s", killname((char) scp->sc_monster, TRUE)); 173 printf(" by %s", killname((char) scp->sc_monster, TRUE));
172 if (prflags == 1) 174 if (prflags == 1)
412 p_know[obj->o_which] = TRUE; 414 p_know[obj->o_which] = TRUE;
413 when RING: 415 when RING:
414 worth = r_magic[obj->o_which].mi_worth; 416 worth = r_magic[obj->o_which].mi_worth;
415 if (obj->o_which == R_ADDSTR || obj->o_which == R_ADDDAM || 417 if (obj->o_which == R_ADDSTR || obj->o_which == R_ADDDAM ||
416 obj->o_which == R_PROTECT || obj->o_which == R_ADDHIT) 418 obj->o_which == R_PROTECT || obj->o_which == R_ADDHIT)
419 {
417 if (obj->o_ac > 0) 420 if (obj->o_ac > 0)
418 worth += obj->o_ac * 100; 421 worth += obj->o_ac * 100;
419 else 422 else
420 worth = 10; 423 worth = 10;
424 }
421 if (!(obj->o_flags & ISKNOW)) 425 if (!(obj->o_flags & ISKNOW))
422 worth /= 2; 426 worth /= 2;
423 obj->o_flags |= ISKNOW; 427 obj->o_flags |= ISKNOW;
424 r_know[obj->o_which] = TRUE; 428 r_know[obj->o_which] = TRUE;
425 when STICK: 429 when STICK: