diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/AppHdr.h | 40 | ||||
-rw-r--r-- | crawl-ref/source/command.cc | 88 | ||||
-rw-r--r-- | crawl-ref/source/misc.cc | 12 | ||||
-rw-r--r-- | crawl-ref/source/monplace.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/spells1.cc | 4 |
5 files changed, 114 insertions, 36 deletions
diff --git a/crawl-ref/source/AppHdr.h b/crawl-ref/source/AppHdr.h index adf517303f..87f5b9e55d 100644 --- a/crawl-ref/source/AppHdr.h +++ b/crawl-ref/source/AppHdr.h @@ -12,7 +12,7 @@ * that we shouldn't run into any problems on systems without precompiled * headers. * - * Copyright © 1999 Jesse Jones. + * Copyright � 1999 Jesse Jones. * * Modified for Crawl Reference by $Author$ on $Date$ * @@ -55,18 +55,18 @@ // not be available on all platforms. In most cases you want to set // this option from your makefile, not directly in AppHdr.h (See // INSTALL for more details.) -// +// // #define UNICODE_GLYPHS // Uncomment to prevent Crawl from looking for a list of saves when // asking the player to enter a name. This can speed up startup // considerably if you have a lot of saves lying around (even more so // if the saves are zipped). -// +// // #define DISABLE_SAVEGAME_LISTS // Uncomment to prevent Crawl from remembering startup preferences. -// +// // #define DISABLE_STICKY_STARTUP_OPTIONS // OS X's Terminal.app has color handling problems; dark grey is @@ -111,9 +111,9 @@ #define EOL "\n" // Unix builds use curses/ncurses, which supports colour. - // + // // This will allow using the standout attribute in curses to - // mark friendly monsters... results depend on the type of + // mark friendly monsters... results depend on the type of // term used... under X Windows try "rxvt". #define USE_COLOUR_OPTS @@ -125,11 +125,11 @@ // curses implementations. #define CURSES_SET_ESCDELAY 20 - // Use this to seed the PRNG with a bit more than just time()... turning - // this off is perfectly okay, the game just becomes more exploitable + // Use this to seed the PRNG with a bit more than just time()... turning + // this off is perfectly okay, the game just becomes more exploitable // with a bit of hacking (ie only by people who know how). // - // For now, we'll make it default to on for Linux (who should have + // For now, we'll make it default to on for Linux (who should have // no problems with compiling this). #define USE_MORE_SECURE_SEED @@ -152,12 +152,12 @@ // curses "bold == lighter" 16 colour mode. -- bwr // // Darkgrey is a particular problem in the 8 colour mode. Popular values - // for replacing it around here are: WHITE, BLUE, and MAGENTA. THis + // for replacing it around here are: WHITE, BLUE, and MAGENTA. This // option has no affect in 16 colour mode. -- bwr // // #define USE_8_COLOUR_TERM_MAP // #define COL_TO_REPLACE_DARKGREY MAGENTA - + #include "libunix.h" #elif defined(DOS) @@ -290,12 +290,12 @@ // Scan for bad items before every input (may be slow) // // This function might slow things down quite a bit - // on slow machines because it's going to go through - // every item on the level and do string comparisons + // on slow machines because it's going to go through + // every item on the level and do string comparisons // against the name. Still, it is nice to know the // turn in which "bad" items appear. #define DEBUG_ITEM_SCAN 1 -#endif +#endif #ifdef _DEBUG // this is how MSVC signals a debug build #define DEBUG 1 @@ -316,7 +316,7 @@ // ========================================================================= // Lua user scripts (NOTE: this may also be enabled in your makefile!) // ========================================================================= -// +// // Enables Crawl's Lua bindings for user scripts. See the section on // Lua in INSTALL for more information. NOTE: CLUA_BINDINGS is enabled // by default in all standard makefiles. Commenting it out here may @@ -335,10 +335,6 @@ // clamp time between command inputs at 5 minutes when reporting play time. #define IDLE_TIME_CLAMP (5 * 60) -// Uncomment this if you find the labyrinth to be buggy and want to -// remove it from the game. -// #define SHUT_LABYRINTH - // Set this to the number of runes that will be required to enter Zot's // domain. You shouldn't set this really high unless you want to // make players spend far too much time in Pandemonium/The Abyss. @@ -351,8 +347,8 @@ #define SCORE_FILE_ENTRIES 100 #endif -// Option to allow scoring of wizard characters. Note that even if -// you define this option, wizard characters are still tagged as such +// Option to allow scoring of wizard characters. Note that even if +// you define this option, wizard characters are still tagged as such // in the score file. // #define SCORE_WIZARD_CHARACTERS @@ -375,7 +371,7 @@ // mv: (new 9 Aug 01) turns off missile trails, might be slow on some computers // #define MISSILE_TRAILS_OFF -// bwr: set this to non-zero if you want to know the pluses, "runed" status +// bwr: set this to non-zero if you want to know the pluses, "runed" status // of the monster's weapons in the hiscore file. // #define HISCORE_WEAPON_DETAIL 1 diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 3d6f26c32c..f9c1650513 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -109,7 +109,7 @@ static std::string _get_version_information(void) static std::string _get_version_features(void) { - std::string result = "FEATURES" EOL; + std::string result = "<w>FEATURES</w>" EOL; result += "--------" EOL; for (unsigned int i = 0; i < ARRAYSZ(features); i++) @@ -118,7 +118,7 @@ static std::string _get_version_features(void) result += features[i]; result += EOL; } - result += "\n\n"; + result += "\n"; return (result); } @@ -127,6 +127,89 @@ static void _add_file_to_scroller(FILE* fp, formatted_scroller& m, int first_hotkey = 0, bool auto_hotkeys = false); +static std::string _get_version_changes(void) +{ + std::string result = ""; + + bool start = false; + // Attempts to print "Highlights" of the latest version. + FILE* fp = fopen(datafile_path("changes.stone_soup", true).c_str(), "r"); + if (fp) + { + char buf[200]; + std::string help; + bool skip_lines = true; + while (fgets(buf, sizeof buf, fp)) + { + // Remove trailing spaces. + for (int i = strlen(buf) - 1; i >= 0; i++) + { + if (isspace( buf[i] )) + buf[i] = 0; + else + break; + } + help = buf; + // Give up if you encountered the second set of underliners + // and still haven't found Highlights. + if (help.find("---") != std::string::npos) + { + if (skip_lines) + { + skip_lines = false; + continue; + } + else if (!start) + break; + } + + if (help.find("Highlights") != std::string::npos) + { + // Highlight the Highlights, so to speak. + std::string text = "<w>"; + text += buf; + text += "</w>"; + text += EOL; + result += text; + // And start printing from now on. + start = true; + } + else if (!start) + continue; + else if (buf[0] == 0) + { + // Stop reading and copying text with the first empty line + // following the Highlights section. + break; + } + else + { + result += buf; + result += EOL; + } + } + } + fclose(fp); + + // Did we ever get to print the Highlights? + if (start) + { + result += EOL; + result += "For a more complete list of changes, see changes.stone_soup " + "in the /docs " EOL + "folder."; + } + else + { + result += "For a list of changes, see changes.stone_soup in the /docs " + "folder."; + } + + result += "\n\n"; + + return (result); +} + void print_version(void) { formatted_scroller cmd_version; @@ -144,6 +227,7 @@ void print_version(void) cmd_version.add_text(_get_version_information()); cmd_version.add_text(_get_version_features()); + cmd_version.add_text(_get_version_changes()); // Read in information about changed in comparison to the latest version. FILE* fp = fopen(datafile_path("034_changes.txt", true).c_str(), "r"); diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index fadc4b16b3..975fd7aae0 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1744,15 +1744,6 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, level_id shaft_dest; int shaft_level = -1; -#ifdef SHUT_LABYRINTH - if (stair_find == DNGN_ENTER_LABYRINTH) - { - mpr("Sorry, this section of the dungeon is closed for fumigation."); - mpr("Try again next release."); - return; - } -#endif - // Probably still need this check here (teleportation) -- bwr if (grid_stair_direction(stair_find) != CMD_GO_DOWNSTAIRS && !shaft) { @@ -1767,9 +1758,10 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, && stair_find <= DNGN_ESCAPE_HATCH_DOWN && player_in_branch( BRANCH_VESTIBULE_OF_HELL )) { + // Down stairs in vestibule are one-way! mpr("A mysterious force prevents you from descending the staircase."); return; - } // Down stairs in vestibule are one-way! + } if (stair_find == DNGN_STONE_ARCH) { diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index efbe9c3455..260cc4b573 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -2551,6 +2551,12 @@ std::vector<coord_def> monster_pathfind::calc_waypoints() } } + // Add the actual target to the list of waypoints, so we can later check + // whether a tracked enemy has moved too much, and we have to update the + // path. + if (pos != path[path.size() - 1]) + waypoints.push_back(pos); + return waypoints; } diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index b417b5a2fd..daec507796 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -201,7 +201,7 @@ void random_blink(bool allow_partial_control, bool override_abyss) } #ifdef USE_SEMI_CONTROLLED_BLINK - //jmf: add back control, but effect is cast_semi_controlled_blink(pow) + //jmf: Add back control, but effect is cast_semi_controlled_blink(pow). else if (player_control_teleport() && !you.duration[DUR_CONF] && allow_partial_control && allow_control_teleport()) { @@ -215,7 +215,7 @@ void random_blink(bool allow_partial_control, bool override_abyss) { mpr("You blink."); - // no longer held in net + // No longer held in net. clear_trapping_net(); succ = true; |