drawPos = point2i(1,1);
getmaxyx(stdscr, termsize.y, termsize.x);
winSize = termsize;
- winSize.y -= 2;
+ winSize.y -= 4;
+ //winSize.y -= 2;
win = newwin(winSize.y, winSize.x, winPos.y, winPos.x);
}
drawPos.x += p.x;
drawPos.y += p.y;
}
+
+int brndr_get_rendered_layer()
+{
+ return layer;
+}
void brndr_cleanup();
void brndr_set_board(Board *board);
void brndr_set_rendered_layer(int l);
+int brndr_get_rendered_layer();
void brndr_move_draw_pos(Point2i p);
#endif//BOARD_RENDERER_H
--- /dev/null
+#include "info_renderer.h"
+#include "point.h"
+
+static WINDOW *win = NULL;
+static Point2i winPos;
+static Point2i winSize;
+
+void irndr_init()
+{
+ Point2i termsize;
+ getmaxyx(stdscr, termsize.y, termsize.x);
+ winPos = point2i(0, termsize.y - 3);
+ winSize = point2i(termsize.x, 3);
+ win = newwin(winSize.y, winSize.x, winPos.y, winPos.x);
+}
+
+void irndr_render()
+{
+ wborder(win, '|', '|', '-', '-', '+', '+', '+', '+');
+ wrefresh(win);
+}
+
+void irndr_cleanup()
+{
+ // clearing the border
+ wborder(win, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');
+ delwin(win);
+}
#include "board.h"
#include "point.h"
#include "board_renderer.h"
+#include "info_renderer.h"
#include "err.h"
#include "input.h"
initscr();
brndr_init();
+ irndr_init();
curs_set(false);
return true;
}
brndr_set_rendered_layer(layer);
brndr_render();
+ irndr_render();
while(!quit){
switch(input_update()){
SDL_Quit();
brndr_cleanup();
+ irndr_cleanup();
endwin();
return 0;