summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-20 19:57:53 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-20 19:57:53 +0000
commit14e3000983cf98d12dab9560f7ee0e3cbcc5ddfb (patch)
treefd3b76ad73117543aa98d49eb1bc7e1e57b34637
parent8ad4f44fa747a32e0d476971beeaf2c0550f16e5 (diff)
downloadcrawl-ref-14e3000983cf98d12dab9560f7ee0e3cbcc5ddfb.tar.gz
crawl-ref-14e3000983cf98d12dab9560f7ee0e3cbcc5ddfb.zip
Fixed broken compile on DOS and Windows.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1611 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/AppHdr.h4
-rw-r--r--crawl-ref/source/beam.cc8
-rw-r--r--crawl-ref/source/decks.cc2
-rw-r--r--crawl-ref/source/libdos.cc6
-rw-r--r--crawl-ref/source/libdos.h7
-rw-r--r--crawl-ref/source/libw32c.cc1
6 files changed, 17 insertions, 11 deletions
diff --git a/crawl-ref/source/AppHdr.h b/crawl-ref/source/AppHdr.h
index fa6ad69293..a42d8141a9 100644
--- a/crawl-ref/source/AppHdr.h
+++ b/crawl-ref/source/AppHdr.h
@@ -180,11 +180,13 @@
#define vsnprintf(buf, size, format, args) vsprintf(buf, format, args)
#endif
+ #include <dos.h>
+
#elif defined(WIN32CONSOLE)
#include "libw32c.h"
#define EOL "\n"
#define CHARACTER_SET A_ALTCHARSET
- #define getstr(X,Y) getConsoleString(X,Y)
+ #define getstr(X,Y) get_console_string(X,Y)
// NT and better are happy with /; I'm not sure how 9x reacts.
#define FILE_SEPARATOR '/'
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 5027becf19..e4f962eaef 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -1328,7 +1328,7 @@ void fire_beam( bolt &pbolt, item_def *item )
#ifdef WIN32CONSOLE
bool oldValue = true;
if (!pbolt.is_tracer)
- oldValue = setBuffering(false);
+ oldValue = set_buffering(false);
#endif
while(!beamTerminate)
@@ -1501,7 +1501,7 @@ void fire_beam( bolt &pbolt, item_def *item )
// that's it!
#ifdef WIN32CONSOLE
if (!pbolt.is_tracer)
- setBuffering(oldValue);
+ set_buffering(oldValue);
#endif
} // end fire_beam();
@@ -4193,7 +4193,7 @@ void explosion( bolt &beam, bool hole_in_the_middle )
#ifdef WIN32CONSOLE
bool oldValue = true;
if (!beam.is_tracer)
- oldValue = setBuffering(false);
+ oldValue = set_buffering(false);
#endif
// --------------------- begin boom ---------------
@@ -4247,7 +4247,7 @@ void explosion( bolt &beam, bool hole_in_the_middle )
#ifdef WIN32CONSOLE
if (!beam.is_tracer)
- setBuffering(oldValue);
+ set_buffering(oldValue);
#endif
// duplicate old behaviour - pause after entire explosion
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 513aee997f..5fc7aac932 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -784,7 +784,7 @@ static void genetic_engineer_card(int power, deck_rarity_type rarity)
MUT_BLURRY_VISION, MUT_FRAIL
};
- mutation_type which_mut;
+ mutation_type which_mut = NUM_MUTATIONS;
int numfound = 0;
for ( unsigned int i = 0; i < ARRAYSIZE(bad_mutations); ++i )
{
diff --git a/crawl-ref/source/libdos.cc b/crawl-ref/source/libdos.cc
index 02e1b7f85c..4d05c926ea 100644
--- a/crawl-ref/source/libdos.cc
+++ b/crawl-ref/source/libdos.cc
@@ -9,6 +9,7 @@
// Every .cc must include AppHdr or bad things happen.
#include "AppHdr.h"
#include "externs.h"
+#include "cio.h"
#include <termios.h>
#include <conio.h>
@@ -127,4 +128,9 @@ int m_getch()
return getch();
}
+void putwch(unsigned c)
+{
+ putch(static_cast<char>(c));
+}
+
#endif /* #if defined(DOS) */
diff --git a/crawl-ref/source/libdos.h b/crawl-ref/source/libdos.h
index fd6a0a0d92..38bbd48699 100644
--- a/crawl-ref/source/libdos.h
+++ b/crawl-ref/source/libdos.h
@@ -12,7 +12,7 @@ void set_cursor_enabled(bool enabled);
bool is_cursor_enabled();
void clear_to_end_of_line();
int getch_ck();
-void set_mouse_enabled(bool enabled) { }
+static inline void set_mouse_enabled(bool enabled) { }
void message_out(int mline, int colour, const char *str, int firstcol = 0,
bool newline = true);
@@ -21,9 +21,6 @@ inline void update_screen()
{
}
-inline void putwch(unsigned c)
-{
- putch(static_cast<char>(c));
-}
+void putwch(unsigned c);
#endif
diff --git a/crawl-ref/source/libw32c.cc b/crawl-ref/source/libw32c.cc
index 42f730a08e..de676656b7 100644
--- a/crawl-ref/source/libw32c.cc
+++ b/crawl-ref/source/libw32c.cc
@@ -69,6 +69,7 @@
#include <stdio.h>
#include "AppHdr.h"
#include "version.h"
+#include "cio.h"
#include "defines.h"
#include "stuff.h"
#include "view.h"