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(PlayerType *player_ptr, int cheat_type, concptr msg)
9 if (!cheat_room && cheat_type == CHEAT_DUNGEON) {
12 if (!cheat_peek && cheat_type == CHEAT_OBJECT) {
15 if (!cheat_hear && cheat_type == CHEAT_MONSTER) {
18 if (!cheat_xtra && cheat_type == CHEAT_MISC) {
22 concptr cheat_mes[] = { "ITEM", "MONS", "DUNG", "MISC" };
24 sprintf(buf, "WIZ-%s:%s", cheat_mes[cheat_type], msg);
27 if (cheat_diary_output) {
28 exe_write_diary(player_ptr, DIARY_WIZARD_LOG, 0, buf);
33 * Display a formatted message, using "vstrnfmt()" and "msg_print()".
35 void msg_format_wizard(PlayerType *player_ptr, int cheat_type, concptr fmt, ...)
37 if (!cheat_room && cheat_type == CHEAT_DUNGEON) {
40 if (!cheat_peek && cheat_type == CHEAT_OBJECT) {
43 if (!cheat_hear && cheat_type == CHEAT_MONSTER) {
46 if (!cheat_xtra && cheat_type == CHEAT_MISC) {
53 (void)vstrnfmt(buf, 1024, fmt, vp);
55 msg_print_wizard(player_ptr, cheat_type, buf);