[brlcad-commits] SF.net SVN: brlcad:[38830] brlcad/trunk/src/mged
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2010-04-27 20:39:18
|
Revision: 38830 http://brlcad.svn.sourceforge.net/brlcad/?rev=38830&view=rev Author: brlcad Date: 2010-04-27 20:39:11 +0000 (Tue, 27 Apr 2010) Log Message: ----------- remove ndrawn indirection as it just obfuscates code by making ndrawn seem like a global. Modified Paths: -------------- brlcad/trunk/src/mged/dozoom.c brlcad/trunk/src/mged/mged_dm.h brlcad/trunk/src/mged/usepen.c Modified: brlcad/trunk/src/mged/dozoom.c =================================================================== --- brlcad/trunk/src/mged/dozoom.c 2010-04-27 19:42:13 UTC (rev 38829) +++ brlcad/trunk/src/mged/dozoom.c 2010-04-27 20:39:11 UTC (rev 38830) @@ -249,11 +249,11 @@ if (displaylist && mged_variables->mv_dlist) { DM_DRAWDLIST(dmp, sp->s_dlist); sp->s_flag = UP; - ndrawn++; + curr_dm_list->dml_ndrawn++; } else { if (DM_DRAW_VLIST(dmp, (struct bn_vlist *)&sp->s_vlist) == TCL_OK) { sp->s_flag = UP; - ndrawn++; + curr_dm_list->dml_ndrawn++; } } } @@ -288,7 +288,7 @@ */ struct dm_list *save_dm_list = curr_dm_list; - ndrawn = 0; + curr_dm_list->dml_ndrawn = 0; inv_viewsize = view_state->vs_gvp->gv_isize; /* @@ -586,12 +586,12 @@ if (displaylist && mged_variables->mv_dlist) { DM_DRAWDLIST(dmp, sp->s_dlist); sp->s_flag = UP; - ndrawn++; + curr_dm_list->dml_ndrawn++; } else { /* draw in immediate mode */ if (DM_DRAW_VLIST(dmp, (struct bn_vlist *)&sp->s_vlist) == TCL_OK) { sp->s_flag = UP; - ndrawn++; + curr_dm_list->dml_ndrawn++; } } } Modified: brlcad/trunk/src/mged/mged_dm.h =================================================================== --- brlcad/trunk/src/mged/mged_dm.h 2010-04-27 19:42:13 UTC (rev 38829) +++ brlcad/trunk/src/mged/mged_dm.h 2010-04-27 20:39:11 UTC (rev 38830) @@ -468,7 +468,6 @@ #define mapped curr_dm_list->dml_mapped #define owner curr_dm_list->dml_owner #define am_mode curr_dm_list->dml_am_mode -#define ndrawn curr_dm_list->dml_ndrawn #define perspective_angle curr_dm_list->dml_perspective_angle #define zclip_ptr curr_dm_list->dml_zclip_ptr Modified: brlcad/trunk/src/mged/usepen.c =================================================================== --- brlcad/trunk/src/mged/usepen.c 2010-04-27 19:42:13 UTC (rev 38829) +++ brlcad/trunk/src/mged/usepen.c 2010-04-27 20:39:11 UTC (rev 38830) @@ -281,11 +281,11 @@ struct solid *sp; /* - * Divide the mouse into 'ndrawn' VERTICAL zones, and use the - * zone number as a sequential position among solids - * which are drawn. + * Divide the mouse into 'curr_dm_list->dml_ndrawn' VERTICAL + * zones, and use the zone number as a sequential position among + * solids which are drawn. */ - count = ((fastf_t)y + GED_MAX) * ndrawn / GED_RANGE; + count = ((fastf_t)y + GED_MAX) * curr_dm_list->dml_ndrawn / GED_RANGE; gdlp = BU_LIST_NEXT(ged_display_list, &gedp->ged_gdp->gd_headDisplay); while (BU_LIST_NOT_HEAD(gdlp, &gedp->ged_gdp->gd_headDisplay)) { @@ -337,7 +337,7 @@ return TCL_ERROR; } - if (!ndrawn) { + if (!(curr_dm_list->dml_ndrawn)) { return TCL_OK; } else if (state != ST_S_PICK && state != ST_O_PICK && state != ST_O_PATH) { return TCL_OK; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |