瀏覽代碼

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@644 54d463be-8e91-2dee-dedb-b68131a5f0ec

mc_cameri 20 年之前
父節點
當前提交
7d3ca1bd18
共有 3 個文件被更改,包括 14 次插入2 次删除
  1. 1 0
      Changelog.txt
  2. 2 0
      src/common/showmsg.c
  3. 11 2
      src/common/showmsg.h

+ 1 - 0
Changelog.txt

@@ -1,6 +1,7 @@
 Date	Added
 
 12/19
+	* Added ShowDebug(), Debug(), DisplayDebug(), printDebug(), CL_DEBUG, MSG_DEBUG to _ShowMessage() [MC Cameri]
 	* Replaced many \033[x;xm with their corresponding CL_xx constants [MC Cameri]
 	* Separated NPCs and Maps from map_athena.conf into npcs_list.txt and maps_list.conf [MC Cameri]
 	* Modified all the *_athena.conf's to have the import command enabled by default [Ajarn]

+ 2 - 0
src/common/showmsg.c

@@ -35,6 +35,8 @@ int _ShowMessage(const char *string, enum msg_type flag){ // by MC Cameri
 		case MSG_WARNING: //Bright Yellow
 			strcpy(prefix,CL_YELLOW"[Warning]"CL_RESET":");
 			break;
+		case MSG_DEBUG:
+			strcpy(prefix,CL_CYAN"[Debug]"CL_RESET":");
 		case MSG_ERROR: //Bright Red  (Regular errors)
 			strcpy(prefix,CL_RED"[Error]"CL_RESET":");
 			break;

+ 11 - 2
src/common/showmsg.h

@@ -1,6 +1,9 @@
 #ifndef _SHOWMSG_H_
 #define _SHOWMSG_H_
 
+//davidsiaw, 'lookee' here!
+#define SHOW_DEBUG_MSG 1
+
 #define	CL_RESET	"\033[0;0m"
 #define CL_NORMAL	CL_RESET
 #define CL_NONE		CL_RESET
@@ -15,7 +18,7 @@
 
 extern char tmp_output[1024];
 
-enum msg_type {MSG_STATUS,/* MSG_SQL, */MSG_INFORMATION,MSG_NOTICE,MSG_WARNING,MSG_ERROR,MSG_FATALERROR};
+enum msg_type {MSG_STATUS,/* MSG_SQL, */MSG_INFORMATION,MSG_NOTICE,MSG_WARNING,MSG_DEBUG,MSG_ERROR,MSG_FATALERROR};
 
 extern int _ShowMessage(const char *string, enum msg_type flag);
 
@@ -42,11 +45,17 @@ extern int _ShowMessage(const char *string, enum msg_type flag);
 	#define ShowNotice(string) _ShowMessage(string,MSG_NOTICE)
 //	#define DisplayNotice(string) _ShowMessage(string,MSG_NOTICE)
 
-/*  */
+/* MSG_WARNING */
 	#define ShowWarning(string) _ShowMessage(string,MSG_WARNING)
 //	#define DisplayWarning(string) _ShowMessage(string,MSG_WARNING)
 //	#define Warn(string) _ShowMessage(string,MSG_WARNING)
 
+/* MSG_DEBUG */
+	#define ShowDebug(string) _ShowMessage(string,MSG_DEBUG)
+	#define DisplayDebug(string) _ShowMessage(string,MSG_DEBUG)
+	#define Debug(string) _ShowMessage(string,MSG_DEBUG)
+	#define printDebug() _ShowMessage(striing,MSG_DEBUG)
+
 /* MSG_ERROR */
 	#define ShowError(string) _ShowMessage(string,MSG_ERROR)
 //	#define DisplayError(string) _ShowMessage(string,MSG_ERROR)