get max row/col from ncurses

master
orange 12 years ago
parent aea9a53762
commit 9669b96e47

@ -9,8 +9,11 @@
#define MAX_C 80
void xy2rc(float x, float y, int *r, int *c) {
*c = (x / MAX_X) * MAX_C;
*r = MAX_R - ((y / MAX_Y) * MAX_R);
int mrow, mcol;
getmaxyx(stdscr, mrow, mcol);
*c = (x / MAX_X) * mcol;
*r = mrow - ((y / MAX_Y) * mrow);
}
float lerp(float from, float to, float t) {

Loading…
Cancel
Save