diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-22 19:33:33 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-22 19:33:33 -0700 |
commit | c04baba4f2cddeb07b94c5f0ce4efb7199b38281 (patch) | |
tree | 523fd527f51cbfe328dd2060c3a01545e9ca00e1 | |
parent | 9a31c34f0f2aab901be29e0844ae2fcb9b3f4a13 (diff) | |
download | mu-c04baba4f2cddeb07b94c5f0ce4efb7199b38281.tar.gz |
1140
Dump deprecated interface.
-rw-r--r-- | cpp/termbox/termbox.c | 34 | ||||
-rw-r--r-- | cpp/termbox/termbox.h | 8 |
2 files changed, 0 insertions, 42 deletions
diff --git a/cpp/termbox/termbox.c b/cpp/termbox/termbox.c index 6035b0c1..48719e2c 100644 --- a/cpp/termbox/termbox.c +++ b/cpp/termbox/termbox.c @@ -237,40 +237,6 @@ void tb_change_cell(int x, int y, uint32_t ch, uint16_t fg, uint16_t bg) tb_put_cell(x, y, &c); } -void tb_blit(int x, int y, int w, int h, const struct tb_cell *cells) -{ - if (x + w < 0 || x >= back_buffer.width) - return; - if (y + h < 0 || y >= back_buffer.height) - return; - int xo = 0, yo = 0, ww = w, hh = h; - if (x < 0) { - xo = -x; - ww -= xo; - x = 0; - } - if (y < 0) { - yo = -y; - hh -= yo; - y = 0; - } - if (ww > back_buffer.width - x) - ww = back_buffer.width - x; - if (hh > back_buffer.height - y) - hh = back_buffer.height - y; - - int sy; - struct tb_cell *dst = &CELL(&back_buffer, x, y); - const struct tb_cell *src = cells + yo * w + xo; - size_t size = sizeof(struct tb_cell) * ww; - - for (sy = 0; sy < hh; ++sy) { - memcpy(dst, src, size); - dst += back_buffer.width; - src += w; - } -} - struct tb_cell *tb_cell_buffer() { return back_buffer.cells; diff --git a/cpp/termbox/termbox.h b/cpp/termbox/termbox.h index 65a965fc..e4a1086f 100644 --- a/cpp/termbox/termbox.h +++ b/cpp/termbox/termbox.h @@ -206,14 +206,6 @@ SO_IMPORT void tb_set_cursor(int cx, int cy); SO_IMPORT void tb_put_cell(int x, int y, const struct tb_cell *cell); SO_IMPORT void tb_change_cell(int x, int y, uint32_t ch, uint16_t fg, uint16_t bg); -/* Copies the buffer from 'cells' at the specified position, assuming the - * buffer is a two-dimensional array of size ('w' x 'h'), represented as a - * one-dimensional buffer containing lines of cells starting from the top. - * - * (DEPRECATED: use tb_cell_buffer() instead and copy memory on your own) - */ -SO_IMPORT void tb_blit(int x, int y, int w, int h, const struct tb_cell *cells); - /* Returns a pointer to internal cell back buffer. You can get its dimensions * using tb_width() and tb_height() functions. The pointer stays valid as long * as no tb_clear() and tb_present() calls are made. The buffer is |