diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-03-31 20:08:29 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-03-31 20:08:29 +0400 |
commit | cfbab6f6a4112af0bbb161df2fca26d4988a706d (patch) | |
tree | 5a08406fff64eec450466d591d06d3434aac2b20 /source/blender | |
parent | d4b9ace5ae3dd9015c9fd5d9893cc7f30a646e1b (diff) |
- fix warnings for gcc
- some subsurf settings not correctly changed in editmode
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf.c | 7 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 10 | ||||
-rw-r--r-- | source/blender/src/buttons_editing.c | 8 |
5 files changed, 12 insertions, 24 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c index ae4c802f901..27882320d58 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.c +++ b/source/blender/blenkernel/intern/CCGSubSurf.c @@ -104,10 +104,10 @@ static void _ehash_insert(EHash *eh, EHEntry *entry) { static void *_ehash_lookupWithPrev(EHash *eh, void *key, void ***prevp_r) { int hash = EHASH_hash(eh, key); - void **prevp = &eh->buckets[hash]; + void **prevp = (void**) &eh->buckets[hash]; EHEntry *entry; - for (; (entry = *prevp); prevp = &entry->next) { + for (; (entry = *prevp); prevp = (void**) &entry->next) { if (entry->key==key) { *prevp_r = (void**) prevp; return entry; @@ -720,7 +720,7 @@ CCGError ccgSubSurf_syncEdgeDel(CCGSubSurf *ss, CCGEdgeHDL eHDL) { return eCCGError_InvalidSyncState; } else { void **prevp; - CCGEdge *e = _ehash_lookupWithPrev(ss->eMap, eHDL, (EHEntry***) &prevp); + CCGEdge *e = _ehash_lookupWithPrev(ss->eMap, eHDL, &prevp); if (!e || e->numFaces) { return eCCGError_InvalidValue; diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 09e038bab7e..391abe64376 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -399,7 +399,7 @@ static DerivedMesh *getMeshDerivedMesh(Object *ob, float *extverts, float *nors) mdm->dm.drawFacesTex = meshDM_drawFacesTex; mdm->dm.drawMappedFacesEM = NULL; - mdm->dm.release = MEM_freeN; + mdm->dm.release = (void(*)(DerivedMesh*)) MEM_freeN; mdm->ob = ob; mdm->extverts = extverts; @@ -438,7 +438,6 @@ static void emDM_drawMappedVertsEM(DerivedMesh *dm, int (*setDrawOptions)(void * } static void emDM_drawMappedEdgeEM(DerivedMesh *dm, void *edge) { - EditMeshDerivedMesh *emdm= (EditMeshDerivedMesh*) dm; EditEdge *eed = edge; glBegin(GL_LINES); @@ -556,7 +555,7 @@ static DerivedMesh *getEditMeshDerivedMesh(EditMesh *em) emdm->dm.drawFacesTex = NULL; emdm->dm.drawMappedFacesEM = emDM_drawMappedFacesEM; - emdm->dm.release = MEM_freeN; + emdm->dm.release = (void(*)(DerivedMesh*)) MEM_freeN; emdm->em = em; diff --git a/source/blender/blenkernel/intern/subsurf.c b/source/blender/blenkernel/intern/subsurf.c index 44c9f3a13bb..bad13a57adf 100644 --- a/source/blender/blenkernel/intern/subsurf.c +++ b/source/blender/blenkernel/intern/subsurf.c @@ -592,13 +592,6 @@ static void hypermesh_calc_smooth_vert(HyperVert *v, float co[3]) } -static void hypermesh_calc_sharp_vert(HyperVert *v, float co[3]) -{ - co[0] = v->co[0]; - co[1] = v->co[1]; - co[2] = v->co[2]; -} - static void hypermesh_calc_creased_vert(HyperVert *v, float co[3], float w) { LinkNode *l; diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 79121022c59..66062efcd70 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -675,11 +675,7 @@ static DispListMesh *ccgDM_convertToDispListMesh(DerivedMesh *dm) { } static void ccgDM_drawVerts(DerivedMesh *dm) { - CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm; - - bglBegin(GL_POINTS); - // XXX - bglEnd(); +// CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm; } static void ccgDM_drawEdges(DerivedMesh *dm) { CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm; @@ -823,10 +819,10 @@ static void ccgDM_drawFacesSolid(DerivedMesh *dm, void (*setMaterial)(int)) { ccgFaceIterator_free(fi); } static void ccgDM_drawFacesColored(DerivedMesh *dm, int useTwoSided, unsigned char *col1, unsigned char *col2) { - CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm; +// CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm; } static void ccgDM_drawFacesTex(DerivedMesh *dm, int (*setDrawParams)(TFace *tf, int matnr)) { - CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm; +// CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm; } static void ccgDM_drawMappedVertsEM(DerivedMesh *dm, int (*setDrawOptions)(void *userData, EditVert *vert), void *userData) { diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 43de0786dc5..a98c4974973 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -667,12 +667,12 @@ static void editing_panel_mesh_type(Object *ob, Mesh *me) uiBlockBeginAlign(block); uiBlockSetCol(block, TH_BUT_SETTING1); - uiDefButS(block, TOG|BIT|7, B_MAKEDISP, "SubSurf", 10,134,70,19, &me->flag, 0, 0, 0, 0, "Treats the active object as a Subdivision Surface"); + uiDefButS(block, TOG|BIT|7, B_SUBSURFTYPE, "SubSurf", 10,134,70,19, &me->flag, 0, 0, 0, 0, "Treats the active object as a Subdivision Surface"); uiDefButS(block, MENU, B_SUBSURFTYPE, subsurfmenu, 80,134,84,19, &(me->subsurftype), 0, 0, 0, 0, "Selects type of Subsurf algorithm."); uiBlockSetCol(block, TH_AUTO); - uiDefButS(block, NUM, B_MAKEDISP, "Subdiv:", 10, 114,110,19, &me->subdiv, 0, 6, 0, 0, "Defines the level of subdivision to display in real time interactively"); + uiDefButS(block, NUM, B_SUBSURFTYPE, "Subdiv:", 10, 114,110,19, &me->subdiv, 0, 6, 0, 0, "Defines the level of subdivision to display in real time interactively"); uiDefButS(block, NUM, B_DIFF, "", 120,114, 44, 19, &me->subdivr, 0, 6, 0, 0, "Defines the level of subdivision to apply during rendering"); - uiDefButS(block, TOG|BIT|8, B_MAKEDISP, "Optimal", 10, 94,154,19, &me->flag, 0, 0, 0, 0, "Only draws optimal wireframe"); + uiDefButS(block, TOG|BIT|8, B_SUBSURFTYPE, "Optimal", 10, 94,154,19, &me->flag, 0, 0, 0, 0, "Only draws optimal wireframe"); uiBlockBeginAlign(block); @@ -1087,7 +1087,7 @@ void do_curvebuts(unsigned short event) break; case B_SUBSURFTYPE: /* Icky, find better system */ - if(ob->type==OB_MESH && ob->data==G.obedit->data) { + if(ob->type==OB_MESH && G.obedit && ob->data==G.obedit->data) { if(G.editMesh->derived) { G.editMesh->derived->release(G.editMesh->derived); G.editMesh->derived= NULL; |