Browse Source

cmGr.h/c: Removed cfgFlags and stateFlags from cmGrObj_t

master
kevin 11 years ago
parent
commit
57986dd2e1
2 changed files with 6 additions and 17 deletions
  1. 5
    17
      cmGr.c
  2. 1
    0
      cmGr.h

+ 5
- 17
cmGr.c View File

15
   kDirtyGrFl = 0x01 // the cmGr object is dirty
15
   kDirtyGrFl = 0x01 // the cmGr object is dirty
16
 };
16
 };
17
 
17
 
18
-// cmGrObj_t state flags
19
-enum
20
-{
21
-  kDirtyObjFl   = 0x0001, // this object is dirty
22
-  kFocusObjFl   = 0x0002, // this object has focus
23
-  kSelectObjFl  = 0x0004, // this object is selected
24
-  kPhysRelObjFl = 0x0008, // use physical instead of virtual offset
25
-  
26
-};
27
 
18
 
28
 typedef struct cmGrObj_str
19
 typedef struct cmGrObj_str
29
 {
20
 {
30
   unsigned      id;          //
21
   unsigned      id;          //
31
-  unsigned      cfgFlags;    // 
32
-  unsigned      stateFlags;  // 
33
   cmGrObjFunc_t f;           // 
22
   cmGrObjFunc_t f;           // 
34
   cmGrVExt_t    wext;        // world coord's contained within this object (children of this object are contained by these extents)
23
   cmGrVExt_t    wext;        // world coord's contained within this object (children of this object are contained by these extents)
35
   unsigned      wlimitFlags; // kLeftGrFl | kRightGrFl | kTopGrFl | kBottomGrFl
24
   unsigned      wlimitFlags; // kLeftGrFl | kRightGrFl | kTopGrFl | kBottomGrFl
1028
   {
1017
   {
1029
     // update the world extents for this object
1018
     // update the world extents for this object
1030
     op->wext       = we;
1019
     op->wext       = we;
1031
-    op->stateFlags = cmSetFlag(op->stateFlags,kDirtyObjFl);
1020
+
1021
+    //op->stateFlags = cmSetFlag(op->stateFlags,kDirtyObjFl);
1032
 
1022
 
1033
     //cmGrVExtPrint(cmTsPrintf("set w: %i ",op->id),&we);
1023
     //cmGrVExtPrint(cmTsPrintf("set w: %i ",op->id),&we);
1034
 
1024
 
1048
 void  _cmGrObjReport( cmGr_t* p, cmGrObj_t* op, cmRpt_t* rpt )
1038
 void  _cmGrObjReport( cmGr_t* p, cmGrObj_t* op, cmRpt_t* rpt )
1049
 {
1039
 {
1050
   cmGrVExt_t vext;
1040
   cmGrVExt_t vext;
1051
-  cmRptPrintf(rpt,"id:0x%x cfg:0x%x state:0x%x\n",op->id,op->cfgFlags,op->stateFlags);
1041
+  cmRptPrintf(rpt,"id:0x%x \n",op->id);
1052
 
1042
 
1053
   _cmGrObjCbVExt( p, op, &vext);  
1043
   _cmGrObjCbVExt( p, op, &vext);  
1054
   cmGrVExtRpt(&vext,rpt);
1044
   cmGrVExtRpt(&vext,rpt);
1081
   cmGrObj_t* op = cmMemAllocZ(cmGrObj_t,1);
1071
   cmGrObj_t* op = cmMemAllocZ(cmGrObj_t,1);
1082
 
1072
 
1083
   op->id         = id;
1073
   op->id         = id;
1084
-  op->cfgFlags   = flags;
1085
-  op->stateFlags = 0;
1086
   op->f          = *f;
1074
   op->f          = *f;
1087
   
1075
   
1088
   if( wext != NULL )
1076
   if( wext != NULL )
1147
 
1135
 
1148
       // if the new object is inside the view extents then mark
1136
       // if the new object is inside the view extents then mark
1149
       // the object as dirty
1137
       // the object as dirty
1150
-      if( cmGrVExtIsExtInside(&p->vext,&vext) )
1151
-        op->stateFlags = cmSetFlag(op->stateFlags,kDirtyObjFl);
1138
+      //if( cmGrVExtIsExtInside(&p->vext,&vext) )
1139
+      //  op->stateFlags = cmSetFlag(op->stateFlags,kDirtyObjFl);
1152
     }
1140
     }
1153
   }
1141
   }
1154
 
1142
 

+ 1
- 0
cmGr.h View File

637
 
637
 
638
 
638
 
639
   // Create a graphic object. This function calls the user defined (*create)() function.
639
   // Create a graphic object. This function calls the user defined (*create)() function.
640
+  // ('flags' is not used)
640
   cmGrRC_t   cmGrObjCreate(     cmGrH_t h, cmGrObjH_t* hp, cmGrObjH_t parentH, cmGrObjFunc_t* f, unsigned id, unsigned flags, const cmGrVExt_t* wext );
641
   cmGrRC_t   cmGrObjCreate(     cmGrH_t h, cmGrObjH_t* hp, cmGrObjH_t parentH, cmGrObjFunc_t* f, unsigned id, unsigned flags, const cmGrVExt_t* wext );
641
 
642
 
642
   // Destroy a graphic object and all of it's children. 
643
   // Destroy a graphic object and all of it's children. 

Loading…
Cancel
Save