summaryrefslogtreecommitdiffstats
path: root/trunk/source/debug.h
diff options
context:
space:
mode:
authorpeterb12 <peterb12@c06c8d41-db1a-0410-9941-cceddc491573>2005-07-21 02:34:44 +0000
committerpeterb12 <peterb12@c06c8d41-db1a-0410-9941-cceddc491573>2005-07-21 02:34:44 +0000
commit673bdae75485d14f759af597c3c62b99601f9a43 (patch)
tree368103f29fe0ce5dcf98060d9b5faa04590085fb /trunk/source/debug.h
parent7e900be770db24b0405fd2162491c405a425873e (diff)
downloadcrawl-ref-673bdae75485d14f759af597c3c62b99601f9a43.tar.gz
crawl-ref-673bdae75485d14f759af597c3c62b99601f9a43.zip
Initial revision
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'trunk/source/debug.h')
-rw-r--r--trunk/source/debug.h147
1 files changed, 147 insertions, 0 deletions
diff --git a/trunk/source/debug.h b/trunk/source/debug.h
new file mode 100644
index 0000000000..cbc8161d3b
--- /dev/null
+++ b/trunk/source/debug.h
@@ -0,0 +1,147 @@
+/*
+ * File: debug.h
+ * Summary: Debug and wizard related functions.
+ * Written by: Linley Henzell and Jesse Jones
+ *
+ * Change History (most recent first):
+ *
+ * <4> 5/30/99 JDJ Added synch checks.
+ * <3> 5/06/99 JDJ Added TRACE.
+ * <2> -/--/-- JDJ Added a bunch of debugging macros. Old code is now #if WIZARD.
+ * <1> -/--/-- LRH Created
+ */
+#ifndef DEBUG_H
+#define DEBUG_H
+
+// Synch with ANSI definitions.
+#if DEBUG && defined(NDEBUG)
+#error DEBUG and NDEBUG are out of sync!
+#endif
+
+#if !DEBUG && !defined(NDEBUG)
+#error DEBUG and NDEBUG are out of sync!
+#endif
+
+// Synch with MSL definitions.
+#if __MSL__ && DEBUG != defined(MSIPL_DEBUG_MODE)
+#error DEBUG and MSIPL_DEBUG_MODE are out of sync!
+#endif
+
+// Synch with MSVC.
+#if _MSC_VER >= 1100 && DEBUG != defined(_DEBUG)
+#error DEBUG and _DEBUG are out of sync!
+#endif
+
+
+#ifndef _lint
+#define COMPILE_CHECK(p) {struct _CC {char a[(p) ? 1 : -1];};} 0
+#else
+#define COMPILE_CHECK(p)
+#endif
+
+#if DEBUG
+
+void AssertFailed(const char *expr, const char *file, int line);
+
+#define ASSERT(p) do {if (!(p)) AssertFailed(#p, __FILE__, __LINE__);} while (false)
+#define VERIFY(p) ASSERT(p)
+
+void DEBUGSTR(const char *format,...);
+void TRACE(const char *format,...);
+
+#else
+
+#define ASSERT(p) ((void) 0)
+#define VERIFY(p) do {if (p) ;} while (false)
+
+inline void __DUMMY_TRACE__(...)
+{
+}
+
+#define DEBUGSTR 1 ? ((void) 0) : __DUMMY_TRACE__
+#define TRACE 1 ? ((void) 0) : __DUMMY_TRACE__
+
+#endif
+
+
+// last updated 12may2000 {dlb}
+/* ***********************************************************************
+ * called from: acr
+ * *********************************************************************** */
+void cast_spec_spell(void);
+
+
+// last updated 12may2000 {dlb}
+/* ***********************************************************************
+ * called from: acr
+ * *********************************************************************** */
+void cast_spec_spell_name(void);
+
+
+// last updated 12may2000 {dlb}
+/* ***********************************************************************
+ * called from: acr
+ * *********************************************************************** */
+void create_spec_monster(void);
+
+
+// last updated 12may2000 {dlb}
+/* ***********************************************************************
+ * called from: acr
+ * *********************************************************************** */
+void create_spec_monster_name(void);
+
+
+// last updated 12may2000 {dlb}
+/* ***********************************************************************
+ * called from: ( this does not seem to be used at all ... {dlb} )
+ * *********************************************************************** */
+void create_spec_object(void);
+void tweak_object(void);
+
+// last updated 12say2001 {dlb}
+/* ***********************************************************************
+ * called from: acr
+ * *********************************************************************** */
+void debug_add_skills(void);
+void debug_set_skills(void);
+void debug_set_all_skills(void);
+
+// last updated 12may2000 {dlb}
+/* ***********************************************************************
+ * called from: acr
+ * *********************************************************************** */
+void debug_add_skills(void);
+
+// last updated 17sep2001 {dlb}
+/* ***********************************************************************
+ * called from: acr
+ * *********************************************************************** */
+bool debug_add_mutation(void);
+
+
+// last updated 12may2000 {dlb}
+/* ***********************************************************************
+ * called from: direct - food - items
+ * *********************************************************************** */
+void error_message_to_player(void);
+
+
+// last updated 12may2000 {dlb}
+/* ***********************************************************************
+ * called from: acr
+ * *********************************************************************** */
+void level_travel( int delta );
+
+
+// last updated 12may2000 {dlb}
+/* ***********************************************************************
+ * called from: acr - direct
+ * *********************************************************************** */
+void stethoscope(int mwh);
+
+void debug_item_scan( void );
+void debug_get_religion( void );
+void debug_change_species( void );
+
+#endif