summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-18 07:13:31 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-18 07:13:31 +0000
commit535a994b2a97879f20e7230a65b4b0d62cee1b35 (patch)
tree2b7548c537b53038d8b3145c45e78f388211f678 /crawl-ref/source
parentffce63e01d8fa4f31edb1a04c6a45227483a4bb5 (diff)
downloadcrawl-ref-535a994b2a97879f20e7230a65b4b0d62cee1b35.tar.gz
crawl-ref-535a994b2a97879f20e7230a65b4b0d62cee1b35.zip
Set native eol on CREDITS and INSTALL, updated CREDITS.
Fixed Nemelex altar macro in crawl_macros.txt - reported on SF. Added a little hack for Crawl running in dgamelaunch so ttyplay isn't lost. Reduce the --more-- overdose on end-of-game. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@666 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/AppHdr.h34
-rw-r--r--crawl-ref/source/libunix.cc5
-rw-r--r--crawl-ref/source/ouch.cc12
3 files changed, 30 insertions, 21 deletions
diff --git a/crawl-ref/source/AppHdr.h b/crawl-ref/source/AppHdr.h
index c43f4789d3..20cb225371 100644
--- a/crawl-ref/source/AppHdr.h
+++ b/crawl-ref/source/AppHdr.h
@@ -43,10 +43,6 @@
#ifndef APPHDR_H
#define APPHDR_H
-#if _MSC_VER >= 1100 // note that we can't just check for _MSC_VER: most compilers will wind up defining this in order to work with the SDK headers...
-#pragma message("Compiling AppHeader.h (this message should only appear once)")
-#endif
-
#if defined(GCC)
# define HASH_CONTAINER_NS __gnu_cxx
# define HASH_CONTAINERS
@@ -82,6 +78,26 @@
// Define plain_term for Unix and dos_term for DOS.
#ifdef UNIX
+ // Uncomment if you're running Crawl with dgamelaunch and have
+ // problems viewing games in progress. This affects how Crawl
+ // clears the screen (see DGL_CLEAR_SCREEN) below.
+ //
+ // #define DGAMELAUNCH
+
+ // DGL_CLEAR_SCREEN specifies the escape sequence to use to clear
+ // the screen (used only when DGAMELAUNCH is defined). We make no
+ // attempt to discover an appropriate escape sequence for the
+ // term, assuming that dgamelaunch admins can adjust this as
+ // needed.
+ //
+ // Why this is necessary: dgamelaunch's ttyplay initialises
+ // playback by jumping to the last screen clear and playing back
+ // from there. For that to work, ttyplay must be able to recognise
+ // the clear screen sequence, and ncurses clear()+refresh()
+ // doesn't do the trick.
+ //
+ #define DGL_CLEAR_SCREEN "\033[2J"
+
#define PLAIN_TERM
#define MULTIUSER
#define USE_UNIX_SIGNALS
@@ -143,14 +159,6 @@
#include "libunix.h"
-#elif _MSC_VER >= 1100
- #include <string>
- #include "WinHdr.h"
- #error MSVC is not supported yet
- #define CHARACTER_SET A_ALTCHARSET
-
- #define FILE_SEPARATOR '/'
-
#elif defined(DOS)
#define DOS_TERM
#define SHORT_FILE_NAMES
@@ -170,7 +178,7 @@
#define vsnprintf(buf, size, format, args) vsprintf(buf, format, args)
#endif
-#elif defined(WIN32CONSOLE) && (defined(__IBMCPP__) || defined(__MINGW32__))
+#elif defined(WIN32CONSOLE)
#include "libw32c.h"
#define PLAIN_TERM
#define EOL "\n"
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc
index 09c01ce817..317ba174d7 100644
--- a/crawl-ref/source/libunix.cc
+++ b/crawl-ref/source/libunix.cc
@@ -399,7 +399,12 @@ int clrscr()
textcolor( LIGHTGREY );
textbackground( BLACK );
retval = clear();
+#ifndef DGAMELAUNCH
refresh();
+#else
+ printf(DGL_CLEAR_SCREEN);
+ fflush(stdout);
+#endif
return (retval);
}
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index a4a93a4383..1ee91d02b3 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -898,16 +898,12 @@ void end_game( struct scorefile_entry &se )
clrscr();
if (!dump_char( morgue_name(), !dead, true ))
+ {
mpr("Char dump unsuccessful! Sorry about that.");
-#if DEBUG_DIAGNOSTICS
- //jmf: switched logic and moved "success" message to debug-only
- else
- mpr("Char dump successful! (morgue.txt).");
-#endif // DEBUG
-
- more();
+ more();
+ clrscr();
+ }
- clrscr();
#ifdef DOS_TERM
window(1, 1, 80, 25);
#endif