From 8bcb968c73563276b4a225fc94baf3cb32f394c2 Mon Sep 17 00:00:00 2001 From: ennewalker Date: Sat, 12 Jul 2008 01:10:58 +0000 Subject: Applying r6506, r6507 to 0.4. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6508 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/AppHdr.h | 4 ++-- crawl-ref/source/libw32c.cc | 8 +++++++- crawl-ref/source/makefile.mgw | 2 +- crawl-ref/source/makefile_tiles.mgw | 3 +-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/crawl-ref/source/AppHdr.h b/crawl-ref/source/AppHdr.h index 87f5b9e55d..4177673947 100644 --- a/crawl-ref/source/AppHdr.h +++ b/crawl-ref/source/AppHdr.h @@ -196,8 +196,8 @@ // #define WINMM_PLAY_SOUNDS // Use Perl-compatible regular expressions. libpcre must be available and - // linked in. - // #define REGEX_PCRE + // linked in. This is optional. + #define REGEX_PCRE #else #error Missing platform #define or unsupported compiler. #endif diff --git a/crawl-ref/source/libw32c.cc b/crawl-ref/source/libw32c.cc index b2f9d1e885..2b4afc99cc 100644 --- a/crawl-ref/source/libw32c.cc +++ b/crawl-ref/source/libw32c.cc @@ -1,4 +1,5 @@ #include "AppHdr.h" +#include "externs.h" #if defined(WIN32CONSOLE) @@ -539,7 +540,12 @@ void textattr(int c) void textcolor(int c) { // change current color used to stamp chars - current_color = c; + short fg = c & 0xF; + short bg = (c >> 4) & 0xF; + short macro_fg = Options.colour[fg]; + short macro_bg = Options.colour[bg]; + + current_color = macro_fg | (macro_bg << 4); } void clear_message_window() diff --git a/crawl-ref/source/makefile.mgw b/crawl-ref/source/makefile.mgw index 5f1350c361..f60dd5ffc8 100644 --- a/crawl-ref/source/makefile.mgw +++ b/crawl-ref/source/makefile.mgw @@ -36,7 +36,7 @@ SQLLIB := sqlite3 SQLIBA := lib$(SQLLIB).a FSQLLIBA := $(SQLLIB)\$(SQLIBA) -LIB = -static -lwinmm -L$(LUASRC) -l$(LUALIB) -L$(SQLSRC) -l$(SQLLIB) +LIB = -static -lwinmm -L$(LUASRC) -l$(LUALIB) -L$(SQLSRC) -l$(SQLLIB) -lpcre INCLUDES := -Iutil -I. -I$(LUASRC) -I$(SQLSRC) CFWARN := -Wall -Wwrite-strings -Wshadow -pedantic diff --git a/crawl-ref/source/makefile_tiles.mgw b/crawl-ref/source/makefile_tiles.mgw index 523fb18a9c..dae38c86f2 100644 --- a/crawl-ref/source/makefile_tiles.mgw +++ b/crawl-ref/source/makefile_tiles.mgw @@ -36,7 +36,7 @@ SQLLIB := sqlite3 SQLIBA := lib$(SQLLIB).a FSQLLIBA := $(SQLLIB)\$(SQLIBA) -LIB = -static -lwinmm -mwindows -lcomctl32 -L$(LUASRC) -l$(LUALIB) -L$(SQLSRC) -l$(SQLLIB) +LIB = -static -lwinmm -mwindows -lcomctl32 -L$(LUASRC) -l$(LUALIB) -L$(SQLSRC) -l$(SQLLIB) -lpcre INCLUDES := -Iutil -I. -I$(LUASRC) -I$(SQLSRC) CFWARN := -Wall -Wwrite-strings -pedantic @@ -48,7 +48,6 @@ CFOTHERS := -fsigned-char \ -D$(OS_TYPE) $(EXTRA_FLAGS) \ -DWINMM_PLAY_SOUNDS -DCLUA_BINDINGS \ -DUSE_TILE -DWINVER=0x0400 -D_WIN32_IE=0x0400 -# -DREGEX_PCRE CFLAGS := $(INCLUDES) $(CFWARN) $(CFOTHERS) YCFLAGS := $(INCLUDES) $(CFOTHERS) -- cgit v1.2.3-54-g00ecf