From dafed8ff1677c730b96e203d565b21738e8acc02 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Sat, 14 Nov 2009 14:18:44 +0100 Subject: Remove #include from all over the place. Convert COLORS to an enum. --- crawl-ref/source/abl-show.cc | 4 ---- crawl-ref/source/acr.cc | 6 ----- crawl-ref/source/beam.cc | 5 ---- crawl-ref/source/chardump.cc | 4 ---- crawl-ref/source/defines.h | 54 +++++++++++++++++++++---------------------- crawl-ref/source/describe.cc | 4 ---- crawl-ref/source/directn.cc | 4 ---- crawl-ref/source/fight.cc | 4 ---- crawl-ref/source/files.cc | 1 - crawl-ref/source/food.cc | 4 ---- crawl-ref/source/invent.cc | 4 ---- crawl-ref/source/itemname.cc | 3 --- crawl-ref/source/itemprop.cc | 4 ---- crawl-ref/source/items.cc | 4 ---- crawl-ref/source/message.cc | 4 ---- crawl-ref/source/misc.cc | 4 ---- crawl-ref/source/mon-abil.cc | 4 ---- crawl-ref/source/mon-act.cc | 4 ---- crawl-ref/source/mon-cast.cc | 4 ---- crawl-ref/source/mon-speak.cc | 4 ---- crawl-ref/source/mon-stuff.cc | 9 -------- crawl-ref/source/mutation.cc | 4 ---- crawl-ref/source/newgame.cc | 5 ---- crawl-ref/source/ouch.cc | 1 - crawl-ref/source/output.cc | 4 ---- crawl-ref/source/player.cc | 4 ---- crawl-ref/source/shopping.cc | 4 ---- crawl-ref/source/skills2.cc | 4 ---- crawl-ref/source/spl-book.cc | 4 ---- crawl-ref/source/spl-cast.cc | 4 ---- crawl-ref/source/spl-util.cc | 4 ---- crawl-ref/source/stuff.cc | 4 ---- crawl-ref/source/view.cc | 4 ---- 33 files changed, 27 insertions(+), 157 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index ceb47a2064..739118b602 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -14,10 +14,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 4ebfd170cc..ef7ea8ec7d 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -28,12 +28,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#include -#include -#endif - #ifdef USE_UNIX_SIGNALS #include #endif diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index a5cdbe3cc3..40cc227bd7 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -17,11 +17,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#include -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc index fbbeb77e76..0bd6768184 100644 --- a/crawl-ref/source/chardump.cc +++ b/crawl-ref/source/chardump.cc @@ -19,10 +19,6 @@ #endif #include -#ifdef TARGET_OS_DOS -#include -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h index 8da0d7cd2b..382eacb187 100644 --- a/crawl-ref/source/defines.h +++ b/crawl-ref/source/defines.h @@ -4,9 +4,6 @@ * Written by: Linley Henzel * * Abstract: A variety of miscellaneous constant values are found here. - * I think we should move the colors into an enum or something - * because there are in numerical order. But I'm too lazy to - * do it myself. * * Copyright © 1999 Brian Robinson. // Me? How come? */ @@ -191,33 +188,36 @@ const int MAX_SEC_ENCHANT = 2; // colors, such pretty colors ... #ifndef TARGET_OS_DOS - #define BLACK 0 - #define BLUE 1 - #define GREEN 2 - #define CYAN 3 - #define RED 4 - #define MAGENTA 5 - #define BROWN 6 - #define LIGHTGREY 7 - #define DARKGREY 8 - #define LIGHTBLUE 9 - #define LIGHTGREEN 10 - #define LIGHTCYAN 11 - #define LIGHTRED 12 - #define LIGHTMAGENTA 13 - #define YELLOW 14 - #define WHITE 15 - - #define LIGHTGRAY LIGHTGREY - #define DARKGRAY DARKGREY +// The order is important (IRGB bit patterns). +enum COLORS +{ + BLACK, + BLUE, + GREEN, + CYAN, + RED, + MAGENTA, + BROWN, + LIGHTGRAY, + LIGHTGREY = LIGHTGRAY, + DARKGRAY, + DARKGREY = DARKGRAY, + LIGHTBLUE, + LIGHTGREEN, + LIGHTCYAN, + LIGHTRED, + LIGHTMAGENTA, + YELLOW, + WHITE, + MAX_TERM_COLOUR +}; #else - #include - #define LIGHTGREY LIGHTGRAY - #define DARKGREY DARKGRAY +# include +# define LIGHTGREY LIGHTGRAY +# define DARKGREY DARKGRAY +# define MAX_TERM_COLOUR 16 #endif -#define MAX_TERM_COLOUR 16 - // Colour options... these are used as bit flags along with the colour // value in the low byte. diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 6b2283fd3d..b7855e66aa 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -15,10 +15,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#endif - #include "externs.h" #include "options.h" #include "species.h" diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index abca5f8fd4..afb9d62566 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -16,10 +16,6 @@ #include #include -#ifdef TARGET_OS_DOS - #include -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index ef309a63cc..bc90cc39de 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -13,10 +13,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 5a8f18f599..5f32136ae6 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -21,7 +21,6 @@ #include #ifdef TARGET_OS_DOS -#include #include #endif diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 0be46caba1..641aa5ce8c 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -14,10 +14,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index 83c94fe9f9..6149d99b48 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -14,10 +14,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index 5de5f16256..d9e6fae591 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -13,9 +13,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#endif #include "clua.h" #include "externs.h" diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index fd192212c5..095d19df50 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -13,10 +13,6 @@ #include #include -#ifdef TARGET_OS_DOS - #include -#endif - #include "externs.h" #include "artefact.h" diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 2e366841c7..9c012ee199 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -15,10 +15,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc index 77fb18d697..8958d52e27 100644 --- a/crawl-ref/source/message.cc +++ b/crawl-ref/source/message.cc @@ -13,10 +13,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#endif - #include "externs.h" #include "options.h" diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index abd1026f6e..92bc01db73 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -24,10 +24,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#endif - #include "externs.h" #include "options.h" #include "misc.h" diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc index e51d95214e..15cb21337d 100644 --- a/crawl-ref/source/mon-abil.cc +++ b/crawl-ref/source/mon-abil.cc @@ -10,10 +10,6 @@ #include "externs.h" #include "options.h" -#ifdef TARGET_OS_DOS -#include -#endif - #include "arena.h" #include "beam.h" #include "colour.h" diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc index 4349a2f3c3..fa6d52143b 100644 --- a/crawl-ref/source/mon-act.cc +++ b/crawl-ref/source/mon-act.cc @@ -7,10 +7,6 @@ #include "AppHdr.h" #include "mon-act.h" -#ifdef TARGET_OS_DOS -#include -#endif - #include "arena.h" #include "attitude-change.h" #include "beam.h" diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc index bc910a887d..9183a23286 100644 --- a/crawl-ref/source/mon-cast.cc +++ b/crawl-ref/source/mon-cast.cc @@ -6,10 +6,6 @@ #include "AppHdr.h" #include "mon-cast.h" -#ifdef TARGET_OS_DOS -#include -#endif - #include "beam.h" #include "cloud.h" #include "colour.h" diff --git a/crawl-ref/source/mon-speak.cc b/crawl-ref/source/mon-speak.cc index 3f21434520..5d780e8317 100644 --- a/crawl-ref/source/mon-speak.cc +++ b/crawl-ref/source/mon-speak.cc @@ -12,10 +12,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#endif - #include "externs.h" #include "beam.h" diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index eff21048af..e9d12cc846 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -7,15 +7,6 @@ #include "AppHdr.h" #include "mon-stuff.h" -//#include -//#include -//#include -//#include - -#ifdef TARGET_OS_DOS -#include -#endif - #include "arena.h" #include "artefact.h" #include "attitude-change.h" diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index b59cb87431..a606296705 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -13,10 +13,6 @@ #include -#ifdef TARGET_OS_DOS -#include -#endif - #if defined(UNIX) && !defined(USE_TILE) #include "libunix.h" #endif diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index b0760bc6de..2a2cd4c8a2 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -19,11 +19,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#include -#endif - #ifdef UNIX #include #include diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 06f8eb2d09..42c8a9f25d 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -14,7 +14,6 @@ #include #ifdef TARGET_OS_DOS -#include #include #endif diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index a1494fe726..82e4fbaecc 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -11,10 +11,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#endif - #include "externs.h" #include "options.h" #include "species.h" diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 5b3ccc4ce7..e59cf44cd9 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -8,10 +8,6 @@ #include "player.h" -#ifdef TARGET_OS_DOS -#include -#endif - #include #include #include diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 04251a8841..a64e15ed89 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -13,10 +13,6 @@ #include #include -#ifdef TARGET_OS_DOS - #include -#endif - #include "externs.h" #include "options.h" #include "artefact.h" diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc index d1719a175b..4d1f7e2971 100644 --- a/crawl-ref/source/skills2.cc +++ b/crawl-ref/source/skills2.cc @@ -16,10 +16,6 @@ #include #include -#ifdef TARGET_OS_DOS - #include -#endif - #include "artefact.h" #include "cio.h" #include "describe.h" diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc index 989e5db899..144ae43dbe 100644 --- a/crawl-ref/source/spl-book.cc +++ b/crawl-ref/source/spl-book.cc @@ -14,10 +14,6 @@ #include #include -#ifdef TARGET_OS_DOS - #include -#endif - #include "artefact.h" #include "externs.h" #include "species.h" diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 366cfe4882..bf94a30b65 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -56,10 +56,6 @@ #include "view.h" #include "shout.h" -#ifdef TARGET_OS_DOS -#include -#endif - static int _calc_spell_range(spell_type spell, int power = 0, bool real_cast = false); diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc index 72242a95ee..5d1445d669 100644 --- a/crawl-ref/source/spl-util.cc +++ b/crawl-ref/source/spl-util.cc @@ -35,10 +35,6 @@ #include "terrain.h" -#ifdef TARGET_OS_DOS -#include -#endif - struct spell_desc { int id; diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index 92e670a644..5aa65d2dca 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -35,10 +35,6 @@ #include -#ifdef TARGET_OS_DOS - #include -#endif - #ifdef UNIX #ifndef USE_TILE #include "libunix.h" diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index ca9966dfbd..5596723c49 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -16,10 +16,6 @@ #include #include -#ifdef TARGET_OS_DOS -#include -#endif - #include "externs.h" #include "map_knowledge.h" -- cgit v1.2.3-54-g00ecf