From 2e311420c5089f3afc366b6808e724a6a997788c Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 23 Mar 2007 11:54:49 +0000 Subject: Small changes to the overview screen and smaller ones to the tutorial. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1080 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/acr.cc | 30 +++++++++++----------- crawl-ref/source/command.cc | 2 +- crawl-ref/source/describe.cc | 6 ++--- crawl-ref/source/mon-util.cc | 2 +- crawl-ref/source/output.cc | 41 +++++++++++++++--------------- crawl-ref/source/tutorial.cc | 59 +++----------------------------------------- 6 files changed, 45 insertions(+), 95 deletions(-) diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 5b75740269..3fa7142d3c 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -296,23 +296,23 @@ int main( int argc, char *argv[] ) wield_warning(false); } - if (Options.tutorial_left) - { - // don't allow triggering at game start - Options.tut_just_triggered = true; - // print stats and everything - prep_input(); - char ch = 'x'; - mpr("Press any key to start the tutorial intro, or Escape to skip it.", + if ( game_start ) + { + if (Options.tutorial_left) + { + // don't allow triggering at game start + Options.tut_just_triggered = true; + // print stats and everything + prep_input(); + char ch = 'x'; + mpr("Press any key to start the tutorial intro, or Escape to skip it.", MSGCH_TUTORIAL); - ch = c_getch(); + ch = c_getch(); - if (ch != ESCAPE) - tut_starting_screen(); - } - - if ( game_start ) - { + if (ch != ESCAPE) + tut_starting_screen(); + } + snprintf(info, INFO_SIZE, "%s, the %s %s, began the quest for the Orb.", you.your_name, diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index ddfe34fa6f..d8839a5160 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -1117,7 +1117,7 @@ void list_tutorial_help() "and in sight, one of f, p, t fires\n" "at it again (without selecting anything).\n", true, true, cmdhelp_textfilter,40); - + show_keyhelp_menu(cols.formatted_lines(), false); } diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index bff0ca3e99..2fc308c6ca 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -1335,13 +1335,13 @@ static std::string describe_ammo( const item_def &item ) switch (item.sub_type) { case MI_STONE: - description += "A stone. "; + description += "A stone. It can be thrown by hand or fired with a sling. "; break; case MI_ARROW: - description += "An arrow. "; + description += "An arrow, to be shot with a bow. "; break; case MI_NEEDLE: - description += "A needle. "; + description += "A needle. It can be thrown by hand or fired with a blowgun. "; break; case MI_BOLT: description += "A crossbow bolt. "; diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 4d53ff73ac..0ef81ef438 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -3040,7 +3040,7 @@ mon_enchant monsters::get_ench(enchant_type ench1, return (*i); } - return (mon_enchant()); + return mon_enchant(); } void monsters::update_ench(const mon_enchant &ench) diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index 5789c3f879..6ab31669be 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -1028,13 +1028,13 @@ void print_overview_screen() text += std::string(k, ' '); snprintf(info, INFO_SIZE, "%s", time_turns); text += info; - text += "\n\n"; + text += "\n"; cmd_help.add_text(text); char buf[1000]; - // 3 columns, splits at columns 32, 52 - column_composer cols1(4, 16, 27, 38); + // 4 columns + column_composer cols1(4, 18, 30, 40); if (!player_rotted()) snprintf(buf, sizeof buf, "HP %3d/%d",you.hp,you.hp_max); @@ -1050,30 +1050,30 @@ void print_overview_screen() cols1.add_formatted(0, buf, false); if (you.strength == you.max_strength) - snprintf(buf, sizeof buf, "Str %3d", you.strength); + snprintf(buf, sizeof buf, "Str %2d", you.strength); else - snprintf(buf, sizeof buf, "Str %3d (%d)", + snprintf(buf, sizeof buf, "Str %2d (%d)", you.strength, you.max_strength); cols1.add_formatted(1, buf, false); if (you.intel == you.max_intel) - snprintf(buf, sizeof buf, "Int %3d", you.intel); + snprintf(buf, sizeof buf, "Int %2d", you.intel); else - snprintf(buf, sizeof buf, "Int %3d (%d)", + snprintf(buf, sizeof buf, "Int %2d (%d)", you.intel, you.max_intel); cols1.add_formatted(1, buf, false); if (you.dex == you.max_dex) - snprintf(buf, sizeof buf, "Dex %3d", you.dex); + snprintf(buf, sizeof buf, "Dex %2d", you.dex); else - snprintf(buf, sizeof buf, "Dex %3d (%d)", + snprintf(buf, sizeof buf, "Dex %2d (%d)", you.dex, you.max_dex); cols1.add_formatted(1, buf, false); snprintf(buf, sizeof buf, - "AC %3d\n" - "EV %3d\n" - "Sh %3d\n", + "AC %2d\n" + "EV %2d\n" + "Sh %2d\n", player_AC(), player_evasion(), player_shield_class()); @@ -1101,20 +1101,21 @@ void print_overview_screen() } } + int xp_needed = (exp_needed(you.experience_level+2)-you.experience)+1; snprintf(buf, sizeof buf, - "Experience: %d/%lu (%d)\n" - "Spells: %2d memorised, %2d level%s left\n" - "God: %s%s Gold: %d\n", - you.experience_level, you.experience, you.exp_available, - you.spell_no, player_spell_levels(), (player_spell_levels() == 1) ? "" : "s", - god_colour_tag, godpowers.c_str(), you.gold); + "Exp: %d/%lu (%d), need: %d\n" + "God: %s%s Gold: %d\n" + "Spells: %2d memorised, %2d level%s left\n", + you.experience_level, you.experience, you.exp_available, xp_needed, + god_colour_tag, godpowers.c_str(), you.gold, + you.spell_no, player_spell_levels(), (player_spell_levels() == 1) ? "" : "s"); cols1.add_formatted(3, buf, false); std::vector blines = cols1.formatted_lines(); unsigned i; for (i = 0; i < blines.size(); ++i ) cmd_help.add_item_formatted_string(blines[i]); - cmd_help.add_text("\n"); + cmd_help.add_text(" "); // 3 columns, splits at columns 21, 38 column_composer cols(3, 21, 38); @@ -1285,7 +1286,7 @@ void print_overview_screen() for (i = 0; i < blines.size(); ++i ) cmd_help.add_item_formatted_string(blines[i]); - cmd_help.add_text("\n"); + cmd_help.add_text(" "); cmd_help.add_text(status_mut_abilities()); cmd_help.show(); diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index 39960a7275..b4ad8bf233 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -7,6 +7,7 @@ #include "command.h" #include "files.h" +#include "initfile.h" #include "itemprop.h" #include "menu.h" #include "message.h" @@ -681,7 +682,7 @@ void tutorial_finished() "explained in the file crawl_options.txt which " "can be found in the /docs directory. The " "options themselves are set in init.txt or " - ".crawlrc. Crawl will complain when it can't " + ".crawlrc. Crawl will complain if it can't " "find either file.\n"; break; default: @@ -734,7 +735,7 @@ void tutorial_healing_reminder() std::string text; text = "Remember to rest between fights and to enter unexplored " - "terrain with full hitpoints and/or magic. For resting, " + "terrain with full hitpoints and magic. For resting, " "press 5 or Shift-numpad 5."; print_formatted_paragraph(text, get_tutorial_cols(), MSGCH_TUTORIAL); } @@ -792,60 +793,10 @@ static std::string colour_to_tag(int col, bool closed = false) std::string tag = "<"; if (closed) tag += "/"; - switch(col) - { - case WHITE: - tag += "w"; - break; - case YELLOW: - tag += "yellow"; - break; - case RED: - tag += "red"; - break; - case LIGHTRED: - tag += "lightred"; - break; - case MAGENTA: - tag += "magenta"; - break; - case LIGHTMAGENTA: - tag += "lightmagenta"; - break; - case GREEN: - tag += "green"; - break; - case LIGHTGREEN: - tag += "lightgreen"; - break; - case BLUE: - tag += "blue"; - break; - case LIGHTBLUE: - tag += "lightblue"; - break; - case CYAN: - tag += "cyan"; - break; - case LIGHTCYAN: - tag += "lightcyan"; - break; - case BLACK: - tag += "black"; - break; - case BROWN: - tag += "brown"; - break; - case DARKGREY: - tag += "darkgrey"; - break; - default: - tag += "lightgrey"; - } + tag += colour_to_str(col); tag += ">"; return tag; - } void tutorial_first_monster(monsters mon) @@ -1334,8 +1285,6 @@ void learned_something_new(unsigned int seen_what, int x, int y) if (seen_what != TUT_SEEN_MONSTER && seen_what != TUT_SEEN_FIRST_OBJECT) print_formatted_paragraph(text, get_tutorial_cols(), MSGCH_TUTORIAL); -// more(); - Options.tut_just_triggered = true; Options.tutorial_events[seen_what] = 0; Options.tutorial_left--; -- cgit v1.2.3-54-g00ecf