farlook /[mMoO] feedback, take II

Redo the way coordinate pairs are lined up for /m /O &c.

Original
|   <8,9>  $  gold pieces
| <10,10>  *  rocks
|  <9,12>  %  newt corpse
Previous
|  <8, 9>  $  gold pieces
| <10,10>  *  rocks
|  <9,12>  %  newt corpse
Now
|  <8,9>   $  gold pieces
| <10,10>  *  rocks
|  <9,12>  %  newt corpse

Override right justification instead of inserting a space.  It looks
better for the situation where all y values are 1 digit.
This commit is contained in:
PatR
2022-12-03 23:51:00 -08:00
parent 9329c7881d
commit 9e3f5502a3

View File

@@ -1726,9 +1726,10 @@ look_all(
and 2 digit values; done unconditionally because we
would need two passes over the map to determine whether
y width is uniform or a mixture; x width is not a factor
because the result gets right-justified by %8s */
because the result gets right-justified by %8s; adding
a trailing space effectively pushes non-space text left */
if (cmode == GPCOORDS_MAP && y < 10)
(void) strsubst(coordbuf, ",", ", ");
(void) strkitten(coordbuf, ' ');
/* prefix: "coords C " where 'C' is mon or obj symbol */
Sprintf(outbuf, (cmode == GPCOORDS_SCREEN) ? "%s "
: (cmode == GPCOORDS_MAP) ? "%8s "