From 57986dd2e11d73f68c4bfe8bc4cb6062b4d497d4 Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 8 Feb 2013 22:04:26 -0800 Subject: [PATCH] cmGr.h/c: Removed cfgFlags and stateFlags from cmGrObj_t --- cmGr.c | 22 +++++----------------- cmGr.h | 1 + 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/cmGr.c b/cmGr.c index a10966a..c5421d3 100644 --- a/cmGr.c +++ b/cmGr.c @@ -15,21 +15,10 @@ enum kDirtyGrFl = 0x01 // the cmGr object is dirty }; -// cmGrObj_t state flags -enum -{ - kDirtyObjFl = 0x0001, // this object is dirty - kFocusObjFl = 0x0002, // this object has focus - kSelectObjFl = 0x0004, // this object is selected - kPhysRelObjFl = 0x0008, // use physical instead of virtual offset - -}; typedef struct cmGrObj_str { unsigned id; // - unsigned cfgFlags; // - unsigned stateFlags; // cmGrObjFunc_t f; // cmGrVExt_t wext; // world coord's contained within this object (children of this object are contained by these extents) unsigned wlimitFlags; // kLeftGrFl | kRightGrFl | kTopGrFl | kBottomGrFl @@ -1028,7 +1017,8 @@ cmGrRC_t _cmGrObjSetWorldExt( cmGr_t* p, cmGrObj_t* op, const cmGrVExt_t* wext ) { // update the world extents for this object op->wext = we; - op->stateFlags = cmSetFlag(op->stateFlags,kDirtyObjFl); + + //op->stateFlags = cmSetFlag(op->stateFlags,kDirtyObjFl); //cmGrVExtPrint(cmTsPrintf("set w: %i ",op->id),&we); @@ -1048,7 +1038,7 @@ cmGrRC_t _cmGrObjSetWorldExt( cmGr_t* p, cmGrObj_t* op, const cmGrVExt_t* wext ) void _cmGrObjReport( cmGr_t* p, cmGrObj_t* op, cmRpt_t* rpt ) { cmGrVExt_t vext; - cmRptPrintf(rpt,"id:0x%x cfg:0x%x state:0x%x\n",op->id,op->cfgFlags,op->stateFlags); + cmRptPrintf(rpt,"id:0x%x \n",op->id); _cmGrObjCbVExt( p, op, &vext); cmGrVExtRpt(&vext,rpt); @@ -1081,8 +1071,6 @@ cmGrRC_t cmGrObjCreate( cmGrH_t h, cmGrObjH_t* ohp, cmGrObjH_t parentH, cmGrObj cmGrObj_t* op = cmMemAllocZ(cmGrObj_t,1); op->id = id; - op->cfgFlags = flags; - op->stateFlags = 0; op->f = *f; if( wext != NULL ) @@ -1147,8 +1135,8 @@ cmGrRC_t cmGrObjCreate( cmGrH_t h, cmGrObjH_t* ohp, cmGrObjH_t parentH, cmGrObj // if the new object is inside the view extents then mark // the object as dirty - if( cmGrVExtIsExtInside(&p->vext,&vext) ) - op->stateFlags = cmSetFlag(op->stateFlags,kDirtyObjFl); + //if( cmGrVExtIsExtInside(&p->vext,&vext) ) + // op->stateFlags = cmSetFlag(op->stateFlags,kDirtyObjFl); } } diff --git a/cmGr.h b/cmGr.h index cbb050b..4fec8c9 100644 --- a/cmGr.h +++ b/cmGr.h @@ -637,6 +637,7 @@ extern "C" { // Create a graphic object. This function calls the user defined (*create)() function. + // ('flags' is not used) cmGrRC_t cmGrObjCreate( cmGrH_t h, cmGrObjH_t* hp, cmGrObjH_t parentH, cmGrObjFunc_t* f, unsigned id, unsigned flags, const cmGrVExt_t* wext ); // Destroy a graphic object and all of it's children.