summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/AppHdr.h2
-rw-r--r--crawl-ref/source/MSVC/Console.vsprops2
-rw-r--r--crawl-ref/source/MSVC/Tiles.vsprops2
-rw-r--r--crawl-ref/source/beam.cc8
-rw-r--r--crawl-ref/source/cio.cc4
-rw-r--r--crawl-ref/source/files.cc2
-rw-r--r--crawl-ref/source/initfile.cc2
-rw-r--r--crawl-ref/source/libutil.cc6
-rw-r--r--crawl-ref/source/libw32c.cc4
-rw-r--r--crawl-ref/source/makefile8
-rw-r--r--crawl-ref/source/menu.cc2
-rw-r--r--crawl-ref/source/newgame.cc2
-rw-r--r--crawl-ref/source/stuff.cc8
-rw-r--r--crawl-ref/source/tilesdl.cc8
-rw-r--r--crawl-ref/source/view.cc6
-rw-r--r--crawl-ref/source/view.h2
16 files changed, 31 insertions, 37 deletions
diff --git a/crawl-ref/source/AppHdr.h b/crawl-ref/source/AppHdr.h
index 97ceda1b6a..80357f1d85 100644
--- a/crawl-ref/source/AppHdr.h
+++ b/crawl-ref/source/AppHdr.h
@@ -199,7 +199,7 @@
#define REGEX_PCRE
#elif defined(TARGET_OS_WINDOWS)
- #if defined(WIN32CONSOLE)
+ #if !defined(USE_TILE)
#include "libw32c.h"
#endif
#define EOL "\n"
diff --git a/crawl-ref/source/MSVC/Console.vsprops b/crawl-ref/source/MSVC/Console.vsprops
index 9937955be8..213cfb9f73 100644
--- a/crawl-ref/source/MSVC/Console.vsprops
+++ b/crawl-ref/source/MSVC/Console.vsprops
@@ -6,6 +6,6 @@
>
<Tool
Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32CONSOLE"
+ PreprocessorDefinitions=""
/>
</VisualStudioPropertySheet>
diff --git a/crawl-ref/source/MSVC/Tiles.vsprops b/crawl-ref/source/MSVC/Tiles.vsprops
index 58f6db88e2..6ace6166ef 100644
--- a/crawl-ref/source/MSVC/Tiles.vsprops
+++ b/crawl-ref/source/MSVC/Tiles.vsprops
@@ -7,7 +7,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\contrib\sdl\include&quot;;&quot;$(SolutionDir)\..\contrib\sdl-image&quot;;&quot;$(SolutionDir)\..\contrib\libpng&quot;;&quot;$(SolutionDir)\..\contrib\freetype\include&quot;;&quot;$(SolutionDir)\..\contrib\zlib&quot;"
- PreprocessorDefinitions="WIN32TILES;USE_TILE"
+ PreprocessorDefinitions="USE_TILE"
/>
<Tool
Name="VCLinkerTool"
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index d2cb9b3db8..28f181a08b 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2081,7 +2081,7 @@ void bolt::do_fire()
choose_ray();
}
-#ifdef WIN32CONSOLE
+#if defined(TARGET_OS_WINDOWS) && !defined(USE_TILE)
// Before we start drawing the beam, turn buffering off.
bool oldValue = true;
if (!is_tracer)
@@ -2193,7 +2193,7 @@ void bolt::do_fire()
}
// That's it!
-#ifdef WIN32CONSOLE
+#if defined(TARGET_OS_WINDOWS) && !defined(USE_TILE)
set_buffering(oldValue);
#endif
}
@@ -5518,7 +5518,7 @@ bool bolt::explode(bool show_more, bool hole_in_the_middle)
exp_map.init(INT_MAX);
determine_affected_cells(exp_map, coord_def(), 0, r, true, true);
-#ifdef WIN32CONSOLE
+#if defined(TARGET_OS_WINDOWS) && !defined(USE_TILE)
// turn buffering off
bool oldValue = true;
if (!is_tracer)
@@ -5583,7 +5583,7 @@ bool bolt::explode(bool show_more, bool hole_in_the_middle)
}
}
-#ifdef WIN32CONSOLE
+#if defined(TARGET_OS_WINDOWS) && !defined(USE_TILE)
if (!is_tracer)
set_buffering(oldValue);
#endif
diff --git a/crawl-ref/source/cio.cc b/crawl-ref/source/cio.cc
index 9a455a77ac..8f4fb155e9 100644
--- a/crawl-ref/source/cio.cc
+++ b/crawl-ref/source/cio.cc
@@ -150,7 +150,7 @@ void get_input_line( char *const buff, int len )
get_input_line_gui( buff, len );
#elif defined(UNIX)
get_input_line_from_curses( buff, len ); // implemented in libunix.cc
-#elif defined(WIN32CONSOLE)
+#elif defined(TARGET_OS_WINDOWS)
getstr( buff, len );
#else
@@ -185,7 +185,7 @@ void get_input_line( char *const buff, int len )
// we want to use in cancelable_get_line() and menus.
int c_getch()
{
-#if defined(TARGET_OS_DOS) || defined(UNIX) || defined(WIN32CONSOLE)
+#if defined(TARGET_OS_DOS) || defined(UNIX) || (defined(TARGET_OS_WINDOWS) && !defined(USE_TILE))
return getch_ck();
#else
return m_getch();
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index c26a07e38d..d92fa90c06 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -302,7 +302,7 @@ bool is_absolute_path(const std::string &path)
{
return (!path.empty()
&& (path[0] == FILE_SEPARATOR
-#if defined(WIN32CONSOLE) || defined(WIN32TILES)
+#ifdef TARGET_OS_WINDOWS
|| path.find(':') != std::string::npos
#endif
));
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index c3719a3671..d91ecdd1c9 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -42,7 +42,7 @@
#include "view.h"
// For finding the executable's path
-#if defined ( WIN32CONSOLE ) || defined ( WIN32TILES )
+#ifdef TARGET_OS_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#elif defined ( __linux__ )
diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc
index 7be6d37930..a73bc7276d 100644
--- a/crawl-ref/source/libutil.cc
+++ b/crawl-ref/source/libutil.cc
@@ -18,7 +18,7 @@
#include <stdarg.h>
#include <string.h>
-#if defined(WIN32CONSOLE) || defined(WIN32TILES)
+#ifdef TARGET_OS_WINDOWS
#undef ARRAYSZ
#include <windows.h>
#undef max
@@ -30,7 +30,7 @@
#ifdef REGEX_PCRE
// Statically link pcre on Windows
- #if defined(WIN32CONSOLE) || defined(WIN32TILES) || defined(TARGET_OS_DOS)
+ #if defined(TARGET_OS_WINDOWS) || defined(TARGET_OS_DOS)
#define PCRE_STATIC
#endif
@@ -161,7 +161,7 @@ std::string &escape_path_spaces(std::string &s)
}
result += *ch;
}
-#elif defined(WIN32CONSOLE) || defined(WIN32TILES)
+#elif defined(TARGET_OS_WINDOWS)
if (s.find(" ") != std::string::npos &&
s.find("\"") == std::string::npos)
{
diff --git a/crawl-ref/source/libw32c.cc b/crawl-ref/source/libw32c.cc
index 74714a891e..565d94db1f 100644
--- a/crawl-ref/source/libw32c.cc
+++ b/crawl-ref/source/libw32c.cc
@@ -1,6 +1,6 @@
#include "AppHdr.h"
-#if defined(WIN32CONSOLE)
+#if defined(TARGET_OS_WINDOWS) && !defined(USE_TILE)
/*
* File: libw32c.cc
@@ -1158,4 +1158,4 @@ int ftruncate(int fp, int size)
#endif /* #ifdef TARGET_COMPILER_VC */
-#endif /* #if defined(WIN32CONSOLE) */
+#endif /* #if defined(TARGET_OS_WINDOWS) && !defined(USE_TILE) */
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile
index e4ea453a0a..0bdf29920b 100644
--- a/crawl-ref/source/makefile
+++ b/crawl-ref/source/makefile
@@ -461,14 +461,6 @@ LIB += -lncurses
endif
endif
-ifdef WIN32
-ifdef TILES
-CFOTHERS_L += -DWIN32TILES
-else
-CFOTHERS_L += -DWIN32CONSOLE
-endif
-endif
-
ifdef NEEDS_PCRE
DEFINES += -DREGEX_PCRE
LIB += -lpcre
diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc
index 6877f349d5..6ca1498c2f 100644
--- a/crawl-ref/source/menu.cc
+++ b/crawl-ref/source/menu.cc
@@ -1320,7 +1320,7 @@ int slider_menu::item_colour(int index, const MenuEntry *me) const
int colour = Menu::item_colour(index, me);
if (index == selected && selected != -1)
{
-#if defined(WIN32CONSOLE) || defined(TARGET_OS_DOS)
+#if (defined(TARGET_OS_WINDOWS) && !defined(USE_TILE)) || defined(TARGET_OS_DOS)
colour = dos_brand(colour, CHATTR_REVERSE);
#elif defined(USE_TILE)
colour = (colour == WHITE ? YELLOW : WHITE);
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index c9cb283619..56dadf1be4 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -3320,7 +3320,7 @@ static bool _validate_player_name(bool verbose)
bool validate_player_name(const char* name, bool verbose)
{
-#if defined(TARGET_OS_DOS) || defined(WIN32CONSOLE) || defined(WIN32TILES)
+#if defined(TARGET_OS_DOS) || defined(TARGET_OS_WINDOWS)
// Quick check for CON -- blows up real good under DOS/Windows.
if (stricmp(name, "con") == 0
|| stricmp(name, "nul") == 0
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index afb69d56aa..1654202916 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -749,7 +749,7 @@ void cio_init()
unixcurses_startup();
#endif
-#ifdef WIN32CONSOLE
+#if defined(TARGET_OS_WINDOWS) && !defined(USE_TILE)
init_libw32c();
#endif
@@ -782,7 +782,7 @@ void cio_cleanup()
unixcurses_shutdown();
#endif
-#ifdef WIN32CONSOLE
+#if defined(TARGET_OS_WINDOWS) && !defined(USE_TILE)
deinit_libw32c();
#endif
@@ -826,7 +826,9 @@ void end(int exit_code, bool print_error, const char *format, ...)
error.clear();
}
-#if defined(WIN32CONSOLE) || defined(TARGET_OS_DOS) || defined(DGL_PAUSE_AFTER_ERROR)
+#if (defined(TARGET_OS_WINDOWS) && !defined(USE_TILE)) || \
+ defined(TARGET_OS_DOS) || \
+ defined(DGL_PAUSE_AFTER_ERROR)
if (exit_code && !crawl_state.arena
&& !crawl_state.seen_hups && !crawl_state.test)
{
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index 9ff0166578..e36868d919 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -117,7 +117,7 @@ TilesFramework::~TilesFramework()
static void _init_consoles()
{
-#ifdef WIN32TILES
+#ifdef TARGET_OS_WINDOWS
typedef BOOL (WINAPI *ac_func)(DWORD);
ac_func attach_console = (ac_func)GetProcAddress(
GetModuleHandle(TEXT("kernel32.dll")), "AttachConsole");
@@ -134,7 +134,7 @@ static void _init_consoles()
static void _shutdown_console()
{
-#ifdef WIN32TILES
+#ifdef TARGET_OS_WINDOWS
typedef BOOL (WINAPI *fc_func)(void);
fc_func free_console = (fc_func)GetProcAddress(
GetModuleHandle(TEXT("kernel32.dll")), "FreeConsole");
@@ -227,7 +227,7 @@ void TilesFramework::calculate_default_options()
bool TilesFramework::initialise()
{
-#ifdef WIN32TILES
+#ifdef TARGET_OS_WINDOWS
putenv("SDL_VIDEO_WINDOW_POS=center");
putenv("SDL_VIDEO_CENTERED=1");
#endif
@@ -254,7 +254,7 @@ bool TilesFramework::initialise()
#ifdef DATA_DIR_PATH
DATA_DIR_PATH
#endif
-#ifdef WIN32TILES
+#ifdef TARGET_OS_WINDOWS
"dat/tiles/stone_soup_icon-win32.png";
#else
"dat/tiles/stone_soup_icon-32x32.png";
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index e032dab122..3194678f92 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -319,7 +319,7 @@ bool is_notable_terrain(dungeon_feature_type ftype)
return (Feature[ftype].is_notable());
}
-#if defined(WIN32CONSOLE) || defined(TARGET_OS_DOS) || defined(USE_TILE)
+#if defined(TARGET_OS_WINDOWS) || defined(TARGET_OS_DOS) || defined(USE_TILE)
static unsigned _colflag2brand(int colflag)
{
switch (colflag)
@@ -355,7 +355,7 @@ unsigned real_colour(unsigned raw_colour)
if (is_element_colour( raw_colour ))
raw_colour = colflags | element_colour( raw_colour );
-#if defined(WIN32CONSOLE) || defined(TARGET_OS_DOS) || defined(USE_TILE)
+#if defined(TARGET_OS_WINDOWS) || defined(TARGET_OS_DOS) || defined(USE_TILE)
if (colflags)
{
unsigned brand = _colflag2brand(colflags);
@@ -596,7 +596,7 @@ static char _get_travel_colour( const coord_def& p )
Options.tc_disconnected;
}
-#if defined(WIN32CONSOLE) || defined(TARGET_OS_DOS) || defined(USE_TILE)
+#if defined(TARGET_OS_WINDOWS) || defined(TARGET_OS_DOS) || defined(USE_TILE)
static unsigned short _dos_reverse_brand(unsigned short colour)
{
if (Options.dos_use_background_intensity)
diff --git a/crawl-ref/source/view.h b/crawl-ref/source/view.h
index b9a850e13c..bafb2f7117 100644
--- a/crawl-ref/source/view.h
+++ b/crawl-ref/source/view.h
@@ -196,7 +196,7 @@ dungeon_char_type dchar_by_name(const std::string &name);
void handle_terminal_resize(bool redraw = true);
-#if defined(WIN32CONSOLE) || defined(TARGET_OS_DOS) || defined(USE_TILE)
+#if defined(TARGET_OS_WINDOWS) || defined(TARGET_OS_DOS) || defined(USE_TILE)
unsigned short dos_brand( unsigned short colour,
unsigned brand = CHATTR_REVERSE);
#endif