From 91f907a184d1ba2fa743bc1d49a2961276521987 Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 26 Mar 2020 18:19:01 -0400 Subject: [PATCH] gradient_sized (C++): fix parameter name --- include/ncpp/Plane.hh | 4 ++-- src/tetris/background.h | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/ncpp/Plane.hh b/include/ncpp/Plane.hh index a88891030..29231f201 100644 --- a/include/ncpp/Plane.hh +++ b/include/ncpp/Plane.hh @@ -131,9 +131,9 @@ namespace ncpp return ncplane_gradient (plane, egc, attrword, ul, ur, ll, lr, ystop, xstop) != -1; } - bool gradient_sized (const char* egc, uint32_t attrword, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr, int ylen, int xstop) const noexcept + bool gradient_sized (const char* egc, uint32_t attrword, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr, int ylen, int xlen) const noexcept { - return ncplane_gradient_sized (plane, egc, attrword, ul, ur, ll, lr, ylen, xstop) != -1; + return ncplane_gradient_sized (plane, egc, attrword, ul, ur, ll, lr, ylen, xlen) != -1; } bool high_gradient (uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr, int ylen, int xlen) const noexcept diff --git a/src/tetris/background.h b/src/tetris/background.h index 37b2c22ab..203b3b0ce 100644 --- a/src/tetris/background.h +++ b/src/tetris/background.h @@ -1,5 +1,4 @@ -// background is drawn to the standard plane, at the bottom. -void DrawBackground(const std::string& s) { +void DrawBackground(const std::string& s) { // drawn to the standard plane int averr; try{ backg_ = std::make_unique(s.c_str(), &averr, 0, 0, ncpp::NCScale::Stretch); @@ -15,8 +14,7 @@ void DrawBackground(const std::string& s) { backg_->get_plane()->greyscale(); } -// draw the background on the standard plane, then create a new plane for the play area. -void DrawBoard() { +void DrawBoard() { // draw all fixed components of the game DrawBackground(BackgroundFile); int y, x; stdplane_->get_dim(&y, &x);