OSDN Git Service

#37449 (2.2.0.61) msg_format_wizard()とmsg_print_wizard()にチートオプション判定を織り込む。 / Integrat...
authorDeskull <desull@users.sourceforge.jp>
Sun, 27 Aug 2017 05:21:16 +0000 (14:21 +0900)
committerDeskull <desull@users.sourceforge.jp>
Sun, 27 Aug 2017 05:43:53 +0000 (14:43 +0900)
src/defines.h
src/util.c

index 2bb4504..025676b 100644 (file)
@@ -53,7 +53,7 @@
 #define FAKE_VER_MAJOR 12 /*!< ゲームのバージョン番号定義(メジャー番号 + 10) */
 #define FAKE_VER_MINOR 2 /*!< ゲームのバージョン番号定義(マイナー番号) */
 #define FAKE_VER_PATCH 0 /*!< ゲームのバージョン番号定義(パッチ番号) */
-#define FAKE_VER_EXTRA 60 /*!< ゲームのバージョン番号定義(エクストラ番号) */
+#define FAKE_VER_EXTRA 61 /*!< ゲームのバージョン番号定義(エクストラ番号) */
 
 
  /*!
index 7eeb72b..b61ade5 100644 (file)
@@ -2970,6 +2970,11 @@ void msg_print(cptr msg)
 
 void msg_print_wizard(int cheat_type, cptr msg)
 {
+       if (!cheat_room && cheat_type == CHEAT_DUNGEON) return;
+       if (!cheat_peek && cheat_type == CHEAT_OBJECT) return;
+       if (!cheat_hear && cheat_type == CHEAT_MONSTER) return;
+       if (!cheat_xtra && cheat_type == CHEAT_MISC) return;
+
        cptr cheat_mes[] = {"ITEM", "MONS", "DUNG", "MISC"};
        char buf[1024];
        sprintf(buf, "WIZ-%s:%s", cheat_mes[cheat_type], msg);
@@ -3045,6 +3050,11 @@ void msg_format(cptr fmt, ...)
  */
 void msg_format_wizard(int cheat_type, cptr fmt, ...)
 {
+       if(!cheat_room && cheat_type == CHEAT_DUNGEON) return;
+       if(!cheat_peek && cheat_type == CHEAT_OBJECT) return;
+       if(!cheat_hear && cheat_type == CHEAT_MONSTER) return;
+       if(!cheat_xtra && cheat_type == CHEAT_MISC) return;
+
        va_list vp;
        char buf[1024];