diff options
author | Valaris <Valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-01-29 16:10:48 +0000 |
---|---|---|
committer | Valaris <Valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-01-29 16:10:48 +0000 |
commit | 620e60eebce2c1f35c5c9a82f6ca365b316587f5 (patch) | |
tree | 38a39e0415f419d9a49ae456ed0e26654c23d559 /src/common/showmsg.h | |
parent | a2675f07d7da22a7c6ae11f545bf8f671e785a82 (diff) | |
download | hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.tar.gz hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.tar.bz2 hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.tar.xz hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.zip |
AS OF SVN REV. 5901, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EVERYTHING ELSE
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/showmsg.h')
-rw-r--r-- | src/common/showmsg.h | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/src/common/showmsg.h b/src/common/showmsg.h new file mode 100644 index 000000000..af851de40 --- /dev/null +++ b/src/common/showmsg.h @@ -0,0 +1,88 @@ +// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _SHOWMSG_H_
+#define _SHOWMSG_H_
+
+#define SHOW_DEBUG_MSG 1
+
+// for help with the console colors look here:
+// http://www.edoceo.com/liberum/?doc=printf-with-color
+// some code explanation (used here):
+// \033[2J : clear screen and go up/left (0, 0 position)
+// \033[K : clear line from actual position to end of the line
+// \033[0m : reset color parameter
+// \033[1m : use bold for font
+
+#ifdef _WIN32
+ #define CL_RESET ""
+ #define CL_CLS ""
+ #define CL_CLL ""
+ #define CL_BOLD ""
+ #define CL_NORMAL CL_RESET
+ #define CL_NONE CL_RESET
+ #define CL_WHITE ""
+ #define CL_GRAY ""
+ #define CL_RED ""
+ #define CL_GREEN ""
+ #define CL_YELLOW ""
+ #define CL_BLUE ""
+ #define CL_MAGENTA ""
+ #define CL_CYAN ""
+ #define CL_BT_YELLOW ""
+ #define CL_WTBL ""
+ #define CL_XXBL ""
+ #define CL_PASS ""
+#else
+ #define CL_RESET "\033[0;0m"
+ #define CL_CLS "\033[2J"
+ #define CL_CLL "\033[K"
+
+ // font settings
+ #define CL_BOLD "\033[1m"
+ #define CL_NORMAL CL_RESET
+ #define CL_NONE CL_RESET
+
+ #define CL_WHITE "\033[1;29m"
+ #define CL_GRAY "\033[1;30m"
+ #define CL_RED "\033[1;31m"
+ #define CL_GREEN "\033[1;32m"
+ #define CL_YELLOW "\033[1;33m"
+ #define CL_BLUE "\033[1;34m"
+ #define CL_MAGENTA "\033[1;35m"
+ #define CL_CYAN "\033[1;36m"
+
+ #define CL_BT_YELLOW "\033[1;33m"
+ #define CL_WTBL "\033[37;44m" // white on blue
+ #define CL_XXBL "\033[0;44m" // default on blue
+ #define CL_PASS "\033[0;32;42m" // green on green
+#endif
+
+extern int msg_silent; //Specifies how silent the console is. [Skotlex]
+extern char timestamp_format[20]; //For displaying Timestamps [Skotlex]
+extern char tmp_output[1024];
+
+enum msg_type {
+ MSG_NONE,
+ MSG_STATUS,
+ MSG_SQL,
+ MSG_INFORMATION,
+ MSG_NOTICE,
+ MSG_WARNING,
+ MSG_DEBUG,
+ MSG_ERROR,
+ MSG_FATALERROR
+};
+
+extern void ClearScreen(void);
+extern int ShowMessage(const char *, ...);
+extern int ShowStatus(const char *, ...);
+extern int ShowSQL(const char *, ...);
+extern int ShowInfo(const char *, ...);
+extern int ShowNotice(const char *, ...);
+extern int ShowWarning(const char *, ...);
+extern int ShowDebug(const char *, ...);
+extern int ShowError(const char *, ...);
+extern int ShowFatalError(const char *, ...);
+
+#endif
|