[Frontierproject-cvs] frontierproject/include widget_painter.h, 1.15, 1.16
Status: Pre-Alpha
Brought to you by:
bdragon28
|
From: Brandon B. <bdr...@us...> - 2006-05-31 22:31:33
|
Update of /cvsroot/frontierproject/frontierproject/include In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv7115/include Modified Files: widget_painter.h Log Message: Move some stuff around in Painter. TRYING to make it a bit easier to understand... Index: widget_painter.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/widget_painter.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** widget_painter.h 18 May 2006 07:08:20 -0000 1.15 --- widget_painter.h 31 May 2006 22:31:30 -0000 1.16 *************** *** 107,112 **** //Public variables ! FXlong cursorx; //What universe coordinate is the focus at? ! FXlong cursory; //.. bool hasselection; --- 107,112 ---- //Public variables ! FXshort cursorx; //What universe coordinate is the focus at? ! FXshort cursory; //.. bool hasselection; *************** *** 160,167 **** //Universe bounds ! FXlong uMinX; ! FXlong uMinY; ! FXlong uMaxX; ! FXlong uMaxY; FXbool flag_showplanetnames; --- 160,167 ---- //Universe bounds ! FXshort uMinX; ! FXshort uMinY; ! FXshort uMaxX; ! FXshort uMaxY; FXbool flag_showplanetnames; *************** *** 188,196 **** */ ! FXlong u2sx(FXlong x); ! FXlong u2sy(FXlong y); ! FXlong s2ux(FXlong x); ! FXlong s2uy(FXlong y); ! FXlong u2sl(FXlong w); --- 188,196 ---- */ ! FXshort u2sx(FXshort x) {return zoom*(x-uMinX) + pos_x;}; ! FXshort u2sy(FXshort y) {return zoom*(uMaxY-y) + pos_y;}; ! FXshort s2ux(FXshort x) {return double(x-pos_x)/zoom + uMinX;}; ! FXshort s2uy(FXshort y) {return uMaxY - double(y - pos_y)/zoom;}; ! FXshort u2sl(FXshort w) {return w*zoom;}; |