score feedback punctuation
"Killed by Ms. Manlobbi, the shopkeeper" has the comma changed to a semi-colon prior to being stored in 'record'. That's intentional, but "Killed by Ms. Manlobbi; the shopkeeper" looks strange when shown to the player. Change semi-colon back to comma when writing scores for display.
This commit is contained in:
+10
-4
@@ -1029,8 +1029,14 @@ outentry(int rank, struct toptenentry *t1, boolean so)
|
|||||||
Strcat(linebuf, ".");
|
Strcat(linebuf, ".");
|
||||||
|
|
||||||
/* Quit, starved, ascended, and escaped contain no second line */
|
/* Quit, starved, ascended, and escaped contain no second line */
|
||||||
if (second_line)
|
if (second_line) {
|
||||||
Sprintf(eos(linebuf), " %c%s.", highc(*(t1->death)), t1->death + 1);
|
bp = eos(linebuf);
|
||||||
|
Sprintf(bp, " %c%s.", highc(*(t1->death)), t1->death + 1);
|
||||||
|
/* fix up "Killed by Mr. Asidonhopo; the shopkeeper"; that starts
|
||||||
|
with a comma but has it changed to semi-colon to keep the comma
|
||||||
|
out of 'record'; change it back for display */
|
||||||
|
(void) strsubst(bp, "; the ", ", the ");
|
||||||
|
}
|
||||||
|
|
||||||
lngr = (int) strlen(linebuf);
|
lngr = (int) strlen(linebuf);
|
||||||
if (t1->hp <= 0)
|
if (t1->hp <= 0)
|
||||||
@@ -1038,9 +1044,9 @@ outentry(int rank, struct toptenentry *t1, boolean so)
|
|||||||
else
|
else
|
||||||
Sprintf(hpbuf, "%d", t1->hp);
|
Sprintf(hpbuf, "%d", t1->hp);
|
||||||
/* beginning of hp column after padding (not actually padded yet) */
|
/* beginning of hp column after padding (not actually padded yet) */
|
||||||
hppos = COLNO - (sizeof(" Hp [max]") - 1); /* sizeof(str) includes \0 */
|
hppos = COLNO - (int) (sizeof " Hp [max]" - sizeof "");
|
||||||
while (lngr >= hppos) {
|
while (lngr >= hppos) {
|
||||||
for (bp = eos(linebuf); !(*bp == ' ' && (bp - linebuf < hppos)); bp--)
|
for (bp = eos(linebuf); !(*bp == ' ' && bp - linebuf < hppos); bp--)
|
||||||
;
|
;
|
||||||
/* special case: word is too long, wrap in the middle */
|
/* special case: word is too long, wrap in the middle */
|
||||||
if (linebuf + 15 >= bp)
|
if (linebuf + 15 >= bp)
|
||||||
|
|||||||
Reference in New Issue
Block a user