Skip to content

Commit 132073f

Browse files
committed
ScreenHandler.h : Removing obsolete function write_buffer_ret().
1 parent f62163c commit 132073f

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

screen/ScreenHandler.h

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -187,51 +187,6 @@ namespace t8
187187
}
188188
}
189189

190-
// Return copy of str but with spaces where tests failed.
191-
std::string write_buffer_ret(const std::string& str, int r, int c, Color fg_color, Color bg_color = Color::Transparent)
192-
{
193-
if (str.empty())
194-
return "";
195-
std::string str_out = str;
196-
//if (c >= 0 && str.size() + c <= NC)
197-
{
198-
if (r >= 0 && r < NR)
199-
{
200-
int n = static_cast<int>(str.size());
201-
for (int ci = 0; ci < n; ++ci)
202-
{
203-
int c_tot = c + ci;
204-
auto& scr_ch = screen_buffer[r][c_tot];
205-
auto& scr_fg = fg_color_buffer[r][c_tot];
206-
auto& scr_bg = bg_color_buffer[r][c_tot];
207-
if (c_tot >= 0 && c_tot < NC
208-
&& scr_ch == ' '
209-
&& scr_bg == Color::Transparent)
210-
{
211-
scr_ch = str[ci];
212-
scr_fg = fg_color;
213-
scr_bg = bg_color;
214-
}
215-
else if (c_tot >= 0 && c_tot < NC
216-
&& scr_bg == Color::Transparent2)
217-
{
218-
scr_bg = bg_color;
219-
if (scr_ch == ' ')
220-
{
221-
scr_ch = str[ci];
222-
scr_fg = fg_color;
223-
}
224-
}
225-
else
226-
{
227-
str_out[ci] = ' ';
228-
}
229-
}
230-
}
231-
}
232-
return str_out;
233-
}
234-
235190
void replace_bg_color(Color from_bg_color, Color to_bg_color, Rectangle box)
236191
{
237192
for (int r = 0; r < NR; ++r)

0 commit comments

Comments
 (0)