diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-16 17:29:52 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-16 17:29:52 +0100 |
commit | 71adb1db298adf054f6ae453a5b40807fbf021d3 (patch) | |
tree | 7c5c057b70e2fc23e98f925a7c7d8d13d72a79a4 /crawl-ref/source/player.cc | |
parent | 6acd640e5aa287d45368f50bf5776e72b1fe4159 (diff) | |
download | crawl-ref-71adb1db298adf054f6ae453a5b40807fbf021d3.tar.gz crawl-ref-71adb1db298adf054f6ae453a5b40807fbf021d3.zip |
Wrap view flashing in flash_view.
This also removes env.show updates when flashing.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index f8e655cdc8..858b963f84 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -7024,8 +7024,7 @@ void player::hibernate(int) mpr("You fall asleep."); stop_delay(); - flash_colour = DARKGREY; - viewwindow(false); + flash_view(DARKGREY); // Do this *after* redrawing the view, or viewwindow() will no-op. set_duration(DUR_SLEEP, 3 + random2avg(5, 2)); @@ -7041,8 +7040,7 @@ void player::put_to_sleep(int power) mpr("You fall asleep!"); stop_delay(); - flash_colour = DARKGREY; - viewwindow(false); + flash_view(DARKGREY); // As above, do this after redraw. set_duration(DUR_SLEEP, 5 + random2avg(power/10, 5)); @@ -7054,8 +7052,7 @@ void player::awake() duration[DUR_SLEEP] = 0; mpr("You wake up."); - this->flash_colour = BLACK; - viewwindow(false); + flash_view(BLACK); } void player::check_awaken(int disturbance) |