Selaa lähdekoodia

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

master
kevin 11 vuotta sitten
vanhempi
commit
57986dd2e1
2 muutettua tiedostoa jossa 6 lisäystä ja 17 poistoa
  1. 5
    17
      cmGr.c
  2. 1
    0
      cmGr.h

+ 5
- 17
cmGr.c Näytä tiedosto

@@ -15,21 +15,10 @@ enum
15 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 19
 typedef struct cmGrObj_str
29 20
 {
30 21
   unsigned      id;          //
31
-  unsigned      cfgFlags;    // 
32
-  unsigned      stateFlags;  // 
33 22
   cmGrObjFunc_t f;           // 
34 23
   cmGrVExt_t    wext;        // world coord's contained within this object (children of this object are contained by these extents)
35 24
   unsigned      wlimitFlags; // kLeftGrFl | kRightGrFl | kTopGrFl | kBottomGrFl
@@ -1028,7 +1017,8 @@ cmGrRC_t _cmGrObjSetWorldExt( cmGr_t* p, cmGrObj_t* op, const cmGrVExt_t* wext )
1028 1017
   {
1029 1018
     // update the world extents for this object
1030 1019
     op->wext       = we;
1031
-    op->stateFlags = cmSetFlag(op->stateFlags,kDirtyObjFl);
1020
+
1021
+    //op->stateFlags = cmSetFlag(op->stateFlags,kDirtyObjFl);
1032 1022
 
1033 1023
     //cmGrVExtPrint(cmTsPrintf("set w: %i ",op->id),&we);
1034 1024
 
@@ -1048,7 +1038,7 @@ cmGrRC_t _cmGrObjSetWorldExt( cmGr_t* p, cmGrObj_t* op, const cmGrVExt_t* wext )
1048 1038
 void  _cmGrObjReport( cmGr_t* p, cmGrObj_t* op, cmRpt_t* rpt )
1049 1039
 {
1050 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 1043
   _cmGrObjCbVExt( p, op, &vext);  
1054 1044
   cmGrVExtRpt(&vext,rpt);
@@ -1081,8 +1071,6 @@ cmGrRC_t cmGrObjCreate(  cmGrH_t h, cmGrObjH_t* ohp, cmGrObjH_t parentH, cmGrObj
1081 1071
   cmGrObj_t* op = cmMemAllocZ(cmGrObj_t,1);
1082 1072
 
1083 1073
   op->id         = id;
1084
-  op->cfgFlags   = flags;
1085
-  op->stateFlags = 0;
1086 1074
   op->f          = *f;
1087 1075
   
1088 1076
   if( wext != NULL )
@@ -1147,8 +1135,8 @@ cmGrRC_t cmGrObjCreate(  cmGrH_t h, cmGrObjH_t* ohp, cmGrObjH_t parentH, cmGrObj
1147 1135
 
1148 1136
       // if the new object is inside the view extents then mark
1149 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 Näytä tiedosto

@@ -637,6 +637,7 @@ extern "C" {
637 637
 
638 638
 
639 639
   // Create a graphic object. This function calls the user defined (*create)() function.
640
+  // ('flags' is not used)
640 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 643
   // Destroy a graphic object and all of it's children. 

Loading…
Peruuta
Tallenna