Closed EvgenijK closed 3 months ago
When graphic is enabled monster lore list shows random(?) tiles instead of font or graphical ones.
Displaying font symbol in monster lore was made in this PR https://github.com/TomenetGame/tomenet/pull/20 (it's mine one actually, but before graphics)
I think the problem is in usage of format() in monster_lore() like in this example(line 5386 from src/client/c-cmd.c)
format()
monster_lore()
src/client/c-cmd.c
if (Client_setup.r_char[monster_list_code[i]]) { Term_putstr(5, 5, -1, selected_line == 0 ? TERM_YELLOW : TERM_UMBER, format("(%4d, L%-3d, \377%c%c\377%c/\377%c%c\377%c) %s", monster_list_code[i], monster_list_level[i], monster_list_symbol[i][0], monster_list_symbol[i][1], n == selected_line ? 'y' : 'u', monster_list_symbol[i][0], Client_setup.r_char[monster_list_code[i]], n == selected_line ? 'y' : 'u', monster_list_name[i])); } else {
Format is %c for Client_setup.r_char[monster_list_code[i]], that is char32_t now.
%c
Client_setup.r_char[monster_list_code[i]]
char32_t
I tried to change %c to %u but got just numbers instead of symbols.
%u
Solved by @CBlueGH in recent update
When graphic is enabled monster lore list shows random(?) tiles instead of font or graphical ones.
Displaying font symbol in monster lore was made in this PR https://github.com/TomenetGame/tomenet/pull/20 (it's mine one actually, but before graphics)
I think the problem is in usage of
format()
inmonster_lore()
like in this example(line 5386 fromsrc/client/c-cmd.c
)Format is
%c
forClient_setup.r_char[monster_list_code[i]]
, that ischar32_t
now.I tried to change
%c
to%u
but got just numbers instead of symbols.