X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=vrlugburz;a=blobdiff_plain;f=tools%2Fdunger%2Fsrc%2Flview.c;fp=tools%2Fdunger%2Fsrc%2Flview.c;h=e0001fe2da1d8910ce45f04f4877a5484c34ff41;hp=8e0ee270b891e35426931e3ea0d713e219de664d;hb=76c3689b01d18e5949e91d0658deb278714f882b;hpb=f242719e98650720b5d3ed43aca62a4f1fe3ec10 diff --git a/tools/dunger/src/lview.c b/tools/dunger/src/lview.c index 8e0ee27..e0001fe 100644 --- a/tools/dunger/src/lview.c +++ b/tools/dunger/src/lview.c @@ -1,4 +1,5 @@ #include +#include #include "lview.h" static struct level *lvl; @@ -129,6 +130,21 @@ void draw_lview(void) } glEnd(); + if(sel) { + int cidx = sel - lvl->cells; + int row = cidx / lvl->width; + int col = cidx % lvl->width; + + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glTranslatef(10, 10, 0); + + glColor3f(1, 1, 1); + dtx_printf("(%d, %d)", col, row); + dtx_flush(); + + glPopMatrix(); + } } void cell_to_pos(int cx, int cy, float *px, float *py)