1 #include "wizard/wizard-messages.h"
2 #include "game-option/cheat-options.h"
3 #include "game-option/cheat-types.h"
4 #include "io/write-diary.h"
5 #include "view/display-messages.h"
7 void msg_print_wizard(player_type *player_ptr, int cheat_type, concptr msg)
9 if (!cheat_room && cheat_type == CHEAT_DUNGEON)
11 if (!cheat_peek && cheat_type == CHEAT_OBJECT)
13 if (!cheat_hear && cheat_type == CHEAT_MONSTER)
15 if (!cheat_xtra && cheat_type == CHEAT_MISC)
18 concptr cheat_mes[] = { "ITEM", "MONS", "DUNG", "MISC" };
20 sprintf(buf, "WIZ-%s:%s", cheat_mes[cheat_type], msg);
23 if (cheat_diary_output) {
24 exe_write_diary(player_ptr, DIARY_WIZARD_LOG, 0, buf);
29 * Display a formatted message, using "vstrnfmt()" and "msg_print()".
31 void msg_format_wizard(player_type *player_ptr, int cheat_type, concptr fmt, ...)
33 if (!cheat_room && cheat_type == CHEAT_DUNGEON)
35 if (!cheat_peek && cheat_type == CHEAT_OBJECT)
37 if (!cheat_hear && cheat_type == CHEAT_MONSTER)
39 if (!cheat_xtra && cheat_type == CHEAT_MISC)
45 (void)vstrnfmt(buf, 1024, fmt, vp);
47 msg_print_wizard(player_ptr, cheat_type, buf);