diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-03-27 18:17:28 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-03-27 18:17:28 +0400 |
commit | 3c5a013c2e397299c42037baeb5188a36ae7519c (patch) | |
tree | c39ef1ddc156d1052ef79f33cd0de0a33292caf6 /source | |
parent | c9c47bd44efc7c45a99968036450db1553efd349 (diff) |
- get rid of some warnings in CCG code, thanks lukep
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf.c | 36 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 9 |
3 files changed, 4 insertions, 43 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c index 906e390d8fd..d2e51d37019 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.c +++ b/source/blender/blenkernel/intern/CCGSubSurf.c @@ -362,20 +362,6 @@ static int _vert_isBoundary(CCGVert *v) { return 1; return 0; } -static int _vert_getEdgeIndex(CCGVert *v, CCGEdge *e) { - int i; - for (i=0; v->numEdges; i++) - if (v->edges[i]==e) - return i; - return -1; -} -static int _vert_getFaceIndex(CCGVert *v, CCGFace *f) { - int i; - for (i=0; v->numFaces; i++) - if (v->faces[i]==f) - return i; - return -1; -} static void *_vert_getCo(CCGVert *v, int lvl, int dataSize) { return &VERT_getLevelData(v)[lvl*dataSize]; @@ -408,7 +394,7 @@ static CCGEdge *_edge_new(CCGEdgeHDL eHDL, CCGVert *v0, CCGVert *v1, int levels, return e; } -void _edge_remFace(CCGEdge *e, CCGFace *f, CCGSubSurf *ss) { +static void _edge_remFace(CCGEdge *e, CCGFace *f, CCGSubSurf *ss) { int i; for (i=0; i<e->numFaces; i++) { if (e->faces[i]==f) { @@ -417,17 +403,10 @@ void _edge_remFace(CCGEdge *e, CCGFace *f, CCGSubSurf *ss) { } } } -void _edge_addFace(CCGEdge *e, CCGFace *f, CCGSubSurf *ss) { +static void _edge_addFace(CCGEdge *e, CCGFace *f, CCGSubSurf *ss) { e->faces = CCGSUBSURF_realloc(ss, e->faces, (e->numFaces+1)*sizeof(*e->faces), e->numFaces*sizeof(*e->faces)); e->faces[e->numFaces++] = f; } -static int _edge_getFaceIndex(CCGEdge *e, CCGFace *f) { - int i; - for (i=0; i<e->numFaces; i++) - if (e->faces[i]==f) - return i; - return -1; -} static int _edge_isBoundary(CCGEdge *e) { return e->numFaces<2; } @@ -466,7 +445,7 @@ static void _edge_unlinkMarkAndFree(CCGEdge *e, CCGSubSurf *ss) { } #ifdef USE_CREASING -float EDGE_getSharpness(CCGEdge *e, int lvl, CCGSubSurf *ss) { +static float EDGE_getSharpness(CCGEdge *e, int lvl, CCGSubSurf *ss) { float f,sharpness = f=(((float*) ccgSubSurf_getEdgeUserData(ss, e))[1]); while ((sharpness>1.0) && lvl--) sharpness -= 1.0; @@ -479,7 +458,6 @@ float EDGE_getSharpness(CCGEdge *e, int lvl, CCGSubSurf *ss) { static CCGFace *_face_new(CCGFaceHDL fHDL, CCGVert **verts, CCGEdge **edges, int numVerts, int levels, int dataSize, CCGSubSurf *ss) { int maxGridSize = 1 + (1<<(ss->subdivLevels-1)); CCGFace *f = CCGSUBSURF_alloc(ss, sizeof(CCGFace) + sizeof(CCGVert*)*numVerts + sizeof(CCGEdge*)*numVerts + ss->meshIFC.vertDataSize *(1 + numVerts*maxGridSize + numVerts*maxGridSize*maxGridSize) + ss->meshIFC.faceUserSize); - CCGVert **fVerts = FACE_getVerts(f); byte *userData; int i; @@ -520,13 +498,6 @@ static int _face_getVertIndex(CCGFace *f, CCGVert *v) { return i; return -1; } -static int _face_getEdgeIndex(CCGFace *f, CCGEdge *e) { - int i; - for (i=0; i<f->numVerts; i++) - if (FACE_getEdges(f)[i]==e) - return i; - return -1; -} static void *_face_getIFCoEdge(CCGFace *f, CCGEdge *e, int lvl, int eX, int eY, int levels, int dataSize) { int maxGridSize = 1 + (1<<(levels-1)); int spacing = 1<<(levels-lvl); @@ -1655,7 +1626,6 @@ static void ccgSubSurf__sync(CCGSubSurf *ss) { float sharpness = EDGE_getSharpness(e, curLvl, ss); int sharpCount = 0; float avgSharpness = 0.0; - CCGVert *sharpV0 = NULL, *sharpV1 = NULL; if (sharpness!=0.0f) { sharpCount = 2; diff --git a/source/blender/blenkernel/intern/subsurf.c b/source/blender/blenkernel/intern/subsurf.c index 7af3dcf48ff..aa451928923 100644 --- a/source/blender/blenkernel/intern/subsurf.c +++ b/source/blender/blenkernel/intern/subsurf.c @@ -1102,7 +1102,6 @@ DispListMesh *subsurf_make_dispListMesh_from_editmesh(EditMesh *em, int subdivLe return displistmesh_from_editmesh(em); #ifdef USE_CCGSUBSURFLIB } else if (type==ME_CCG_SUBSURF) { - extern DispListMesh *subsurf_ccg_make_dispListMesh_from_editmesh(EditMesh *em, int subdivLevels, int flags); return subsurf_ccg_make_dispListMesh_from_editmesh(em, subdivLevels, flags); #endif } else { @@ -1117,7 +1116,6 @@ DispListMesh *subsurf_make_dispListMesh_from_mesh(Mesh *me, float *extverts, int return displistmesh_from_mesh(me, extverts); #ifdef USE_CCGSUBSURFLIB } else if (me->subsurftype==ME_CCG_SUBSURF) { - extern DispListMesh *subsurf_ccg_make_dispListMesh_from_mesh(Mesh *me, float *extverts, int subdivLevels, int flags); return subsurf_ccg_make_dispListMesh_from_mesh(me, extverts, subdivLevels, flags); #endif } else { diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 8a4c0c2064e..4aeb6fa43e3 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -148,7 +148,7 @@ static SubSurf *subSurf_fromMesh(Mesh *me, float *extverts, int subdivLevels) { return ss; } -void subSurf_free(SubSurf *ss) { +static void subSurf_free(SubSurf *ss) { ccgSubSurf_free(ss->subSurf); MEM_freeN(ss); } @@ -159,13 +159,6 @@ static void Vec3Cpy(float *t, float *a) { t[2]= a[2]; } -static void VColAvgT(unsigned char *t, unsigned char *a, unsigned char *b) { - t[0]= (a[0]+b[0])>>1; - t[1]= (a[1]+b[1])>>1; - t[2]= (a[2]+b[2])>>1; - t[3]= (a[3]+b[3])>>1; -} - static int getEdgeIndex(CCGSubSurf *ss, CCGEdge *e, int x, int edgeSize) { CCGVert *v0 = ccgSubSurf_getEdgeVert0(ss, e); CCGVert *v1 = ccgSubSurf_getEdgeVert1(ss, e); |