Mercurial > hg > early-roguelike
comparison rogue3/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 |
---|---|
190 prbuf[0] = 0; | 190 prbuf[0] = 0; |
191 get_str(prbuf, stdscr); | 191 get_str(prbuf, stdscr); |
192 endwin(); | 192 endwin(); |
193 } | 193 } |
194 if (wizard) | 194 if (wizard) |
195 { | |
195 if (strcmp(prbuf, "names") == 0) | 196 if (strcmp(prbuf, "names") == 0) |
196 prflags = 1; | 197 prflags = 1; |
197 else if (strcmp(prbuf, "edit") == 0) | 198 else if (strcmp(prbuf, "edit") == 0) |
198 prflags = 2; | 199 prflags = 2; |
200 } | |
199 | 201 |
200 md_lockfile(outf); | 202 md_lockfile(outf); |
201 | 203 |
202 encread(scoreline, 100, outf); | 204 encread(scoreline, 100, outf); |
203 (void) sscanf(scoreline, "R%d %d\n", &rogue_ver, &scorefile_ver); | 205 (void) sscanf(scoreline, "R%d %d\n", &rogue_ver, &scorefile_ver); |
242 if (flags != -1) | 244 if (flags != -1) |
243 printf("\n\n\n"); | 245 printf("\n\n\n"); |
244 printf("Top Ten Adventurers:\nRank\tScore\tName\n"); | 246 printf("Top Ten Adventurers:\nRank\tScore\tName\n"); |
245 for (scp = top_ten; scp <= &top_ten[9]; scp++) { | 247 for (scp = top_ten; scp <= &top_ten[9]; scp++) { |
246 if (scp->sc_score) { | 248 if (scp->sc_score) { |
247 printf("%d\t%d\t%s: %s on level %d", scp - top_ten + 1, | 249 printf("%d\t%d\t%s: %s on level %d", (int) (scp - top_ten + 1), |
248 scp->sc_score, scp->sc_name, reason[scp->sc_flags], | 250 scp->sc_score, scp->sc_name, reason[scp->sc_flags], |
249 scp->sc_level); | 251 scp->sc_level); |
250 if (scp->sc_flags == 0) { | 252 if (scp->sc_flags == 0) { |
251 printf(" by a"); | 253 printf(" by a"); |
252 killer = killname(scp->sc_monster); | 254 killer = killname(scp->sc_monster); |
449 obj->o_flags |= ISKNOW; | 451 obj->o_flags |= ISKNOW; |
450 r_know[obj->o_which] = TRUE; | 452 r_know[obj->o_which] = TRUE; |
451 worth = r_magic[obj->o_which].mi_worth; | 453 worth = r_magic[obj->o_which].mi_worth; |
452 if (obj->o_which == R_ADDSTR || obj->o_which == R_ADDDAM || | 454 if (obj->o_which == R_ADDSTR || obj->o_which == R_ADDDAM || |
453 obj->o_which == R_PROTECT || obj->o_which == R_ADDHIT) | 455 obj->o_which == R_PROTECT || obj->o_which == R_ADDHIT) |
456 { | |
454 if (obj->o_ac > 0) | 457 if (obj->o_ac > 0) |
455 worth += obj->o_ac * 20; | 458 worth += obj->o_ac * 20; |
456 else | 459 else |
457 worth = 50; | 460 worth = 50; |
461 } | |
458 when STICK: | 462 when STICK: |
459 obj->o_flags |= ISKNOW; | 463 obj->o_flags |= ISKNOW; |
460 ws_know[obj->o_which] = TRUE; | 464 ws_know[obj->o_which] = TRUE; |
461 worth = ws_magic[obj->o_which].mi_worth; | 465 worth = ws_magic[obj->o_which].mi_worth; |
462 worth += 20 * obj->o_charges; | 466 worth += 20 * obj->o_charges; |