diff --git a/BlenderWork/exportScript b/BlenderWork/exportScript index f0f59c2..ceef4b5 100644 --- a/BlenderWork/exportScript +++ b/BlenderWork/exportScript @@ -1,295 +1,295 @@ -import os -import shutil - -import bpy -import Blender -import copy -from Blender import * - - - - -def createDirectory( d ): - try: - os.mkdir( d ) - except: - dummy = 0 - - -def compareVertexIndexPair(a, b): - if( a[1] < b[1]): - return -1 - elif( a[1] == b[1] ): - return 0 - else: - return 1 - - -def meshProcess(object): - print "---- meshProcess start ----" - print object.getData(name_only=1) - - - outFile = open("meshes/%s" % object.getData(name_only=1), "w") - - outFile.write( "type Mesh\n" ) - outFile.write( "name %s\n" % object.getData(name_only=1) ) - - mesh = object.getData(mesh=1) - print "vertex count %d" % len(mesh.verts) - print "face count %d" % len(mesh.faces) - - # - #mesh data - # - newUVvertexList = []; - solidFaceList = []; - - indexList = []; - normalList = []; - - #base smooth vertex to new indexes - baseVertex = {} - - # - #mesh prepare, generate vertex and new indexes - #genereate vertexes for solid faces - # - currentIndex = 0 - - for face in mesh.faces: - if( face.smooth ): - for vert in face.verts: - vertIndex = face.verts.index(vert) - - if( face.verts[ vertIndex ] not in baseVertex.keys() ): - baseVertex[ face.verts[ vertIndex ] ] = currentIndex - currentIndex = currentIndex + 1 - - else: - solidFaceList.append( face ) - - - #for smooth: genereate vertex if found save vertex with different uv coordinates - - #vertex to found uv data, to found uv repeat - vertexUVdict = {} - - #face to dict with [ face vertex index, new vertex index ] - faceVertexReplaceDict = {} - - baseVertexCount = len( baseVertex ) - - for face in mesh.faces: - if( face.smooth ): - for vert in face.verts: - vertIndex = face.verts.index(vert) - - if( vert not in vertexUVdict.keys() ): - vertexUVdict[ vert ] = face.uv[ vertIndex ] - - elif vertexUVdict[ vert ].x != face.uv[ vertIndex ].x or vertexUVdict[ vert ].y != face.uv[ vertIndex ].y: - - if face in faceVertexReplaceDict.keys(): - faceVertexReplaceDict[ face ][vertIndex] = baseVertexCount + len( newUVvertexList ) - else: - faceVertexReplaceDict[ face ] = {} - faceVertexReplaceDict[ face ][vertIndex] = baseVertexCount + len( newUVvertexList ) - - newUVvertexList.append( vert ) - - - # - #vertex export - # - baseVertexPair = baseVertex.items() - baseVertexPair.sort(compareVertexIndexPair) - - print "vertexUVdict len=", len( vertexUVdict ) - print "newUVvertexList len = ", len(newUVvertexList) - print "solicFaceList len = ", len(solidFaceList) - - outFile.write( "vertexCount %d\n" % (len(baseVertex.keys()) + len( newUVvertexList ) + len(solidFaceList)*3) ) - for pair in baseVertexPair: - outFile.write( "vert %f %f %f\n" % ( pair[0].co.x, pair[0].co.y, pair[0].co.z) ) - - for vert in newUVvertexList: - outFile.write( "vert %f %f %f\n" % ( vert.co.x, vert.co.y, vert.co.z) ) - - for face in solidFaceList: - outFile.write( "vert %f %f %f\n" % (face.verts[0].co.x, face.verts[0].co.y, face.verts[0].co.z) ) - outFile.write( "vert %f %f %f\n" % (face.verts[1].co.x, face.verts[1].co.y, face.verts[1].co.z) ) - outFile.write( "vert %f %f %f\n" % (face.verts[2].co.x, face.verts[2].co.y, face.verts[2].co.z) ) - - - #delimeter it need to reload loader state - outFile.write( "\n" ) - - # - #normal export - # - for pair in baseVertexPair: - outFile.write( "norm %f %f %f\n" % ( pair[0].no.x, pair[0].no.y, pair[0].no.z) ) - - for vert in newUVvertexList: - outFile.write( "norm %f %f %f\n" % ( vert.no.x, vert.no.y, vert.no.z) ) - - for face in solidFaceList: - outFile.write( "norm %f %f %f\n" % (face.no.x, face.no.y, face.no.z) ) - outFile.write( "norm %f %f %f\n" % (face.no.x, face.no.y, face.no.z) ) - outFile.write( "norm %f %f %f\n" % (face.no.x, face.no.y, face.no.z) ) - - # - #uv export - # - if( mesh.faceUV ): - print "export face UV" - - #delimeter need to reload loader state - outFile.write( "\n" ) - - for pair in baseVertexPair: - pair[0].sel = 1 - - for face in mesh.faces: - for vert in face.verts: - if( vert in baseVertex.keys() and vert.sel == 1 ): - outFile.write( "uv %f %f\n" % ( face.uv[ face.verts.index(vert) ][0], face.uv[ face.verts.index(vert) ][1] ) ) - vert.sel = 0 - - for face in mesh.faces: - if face in faceVertexReplaceDict.keys(): - for vert in face.verts: - if face.verts.index(vert) in faceVertexReplaceDict[face].keys(): - #print faceVertexReplaceDict[face][ face.verts.index(vert) ] - #outFile.write( "uv 1 1\n" ) - outFile.write( "uv %f %f\n" % ( face.uv[ face.verts.index(vert) ][0], face.uv[ face.verts.index(vert) ][1] ) ) - - for face in solidFaceList: - for uv in face.uv: - outFile.write( "uv %f %f\n" % ( uv[0], uv[1] ) ) - - # - #vertexGroupIndex export - # - for groupName in mesh.getVertGroupNames(): - vertIndexes = mesh.getVertsFromGroup(groupName) - outFile.write( "vertexGroup %s\n" % groupName ) - - for vertIndex in vertIndexes: - mesh.verts[vertIndex].sel = 1 - - faceCount = 0 - materialNumber = -1 - for face in mesh.faces: - if( face.verts[0].sel == 1 and face.verts[1].sel == 1 and face.verts[2].sel == 1 ): - faceCount += 1 - materialNumber = face.mat - #print face.mat - - - outFile.write( "vertexIndexCount %d\n" % faceCount ) - solidIndexOffset = len( mesh.verts ) - - for face in mesh.faces: - if( face.verts[0].sel == 1 and face.verts[1].sel == 1 and face.verts[2].sel == 1 ): - if( face.smooth ): - - #check - if face in faceVertexReplaceDict.keys(): - outFile.write( "face") - - for vert in face.verts: - if face.verts.index( vert ) in faceVertexReplaceDict[face].keys(): - outFile.write( " %d" % faceVertexReplaceDict[face][ face.verts.index(vert) ] ) - else: - outFile.write( " %d" % baseVertex[ face.verts[ face.verts.index(vert) ] ] ) - - outFile.write( "\n" ) - - else: - outFile.write( "face %d %d %d\n" % ( baseVertex[ face.verts[0] ], baseVertex[ face.verts[1] ], baseVertex[ face.verts[2] ] ) ) - - else: - - solidVertexIndex = len(baseVertex) + len(newUVvertexList) + solidFaceList.index(face)*3 - outFile.write( "face %d %d %d\n" % (solidVertexIndex, solidVertexIndex+1, solidVertexIndex+2) ) - - for vertIndex in vertIndexes: - mesh.verts[vertIndex].sel = 0 - - #material link - outFile.write( "material %s\n" % mesh.materials[materialNumber].name ) - - outFile.write( "end\n" ) - - - outFile.write( "end\n" ) - outFile.close() - - # - #material export - # - print "materials" - for material in mesh.materials: - - outMaterialFile = open("materials\\"+material.name, "w") - outMaterialFile.write( "type Material\n" ) - outMaterialFile.write( "name %s\n" % material.name ) - - for texture in material.getTextures(): - if(texture != None): - outMaterialFile.write( "texture\n" ) - - filename = texture.tex.image.filename - rInd = filename.rfind("\\") - print len(filename) - filename = filename[rInd+1:len(filename) ] - - shutil.copyfile( Blender.sys.expandpath( texture.tex.image.filename ), "images\\"+filename ) - - outMaterialFile.write( "path ..\\images\%s\n" % filename ) - outMaterialFile.write( "end\n" ) - - outMaterialFile.write( "end\n" ) - - outMaterialFile.close() - - - print "---- meshProcess end ----" - - -def cameraProcess(object): - print "---- cameraProcess start ----" - print object.getData(name_only=1) - print "---- cameraProcess end ----" - - -def lampProcess(object): - print "---- lampProcess start ----" - print object.getData(name_only=1) - print "---- lampProcess end ----" - - -print "---- start ----" - -createDirectory("images") -createDirectory("materials") -createDirectory("meshes") - -print list(bpy.data.objects) - -for obj in bpy.data.objects: - mesh = obj.getData(mesh=1) - print type(mesh) - - if( type(mesh) == Types.MeshType ): - meshProcess(obj) - - elif( type(mesh) == Types.CameraType ): - cameraProcess(obj) - - elif( type(mesh) == Types.LampType ): - lampProcess(obj) - +import os +import shutil + +import bpy +import Blender +import copy +from Blender import * + + + + +def createDirectory( d ): + try: + os.mkdir( d ) + except: + dummy = 0 + + +def compareVertexIndexPair(a, b): + if( a[1] < b[1]): + return -1 + elif( a[1] == b[1] ): + return 0 + else: + return 1 + + +def meshProcess(object): + print "---- meshProcess start ----" + print object.getData(name_only=1) + + + outFile = open("meshes/%s" % object.getData(name_only=1), "w") + + outFile.write( "type Mesh\n" ) + outFile.write( "name %s\n" % object.getData(name_only=1) ) + + mesh = object.getData(mesh=1) + print "vertex count %d" % len(mesh.verts) + print "face count %d" % len(mesh.faces) + + # + #mesh data + # + newUVvertexList = []; + solidFaceList = []; + + indexList = []; + normalList = []; + + #base smooth vertex to new indexes + baseVertex = {} + + # + #mesh prepare, generate vertex and new indexes + #genereate vertexes for solid faces + # + currentIndex = 0 + + for face in mesh.faces: + if( face.smooth ): + for vert in face.verts: + vertIndex = face.verts.index(vert) + + if( face.verts[ vertIndex ] not in baseVertex.keys() ): + baseVertex[ face.verts[ vertIndex ] ] = currentIndex + currentIndex = currentIndex + 1 + + else: + solidFaceList.append( face ) + + + #for smooth: genereate vertex if found save vertex with different uv coordinates + + #vertex to found uv data, to found uv repeat + vertexUVdict = {} + + #face to dict with [ face vertex index, new vertex index ] + faceVertexReplaceDict = {} + + baseVertexCount = len( baseVertex ) + + for face in mesh.faces: + if( face.smooth ): + for vert in face.verts: + vertIndex = face.verts.index(vert) + + if( vert not in vertexUVdict.keys() ): + vertexUVdict[ vert ] = face.uv[ vertIndex ] + + elif vertexUVdict[ vert ].x != face.uv[ vertIndex ].x or vertexUVdict[ vert ].y != face.uv[ vertIndex ].y: + + if face in faceVertexReplaceDict.keys(): + faceVertexReplaceDict[ face ][vertIndex] = baseVertexCount + len( newUVvertexList ) + else: + faceVertexReplaceDict[ face ] = {} + faceVertexReplaceDict[ face ][vertIndex] = baseVertexCount + len( newUVvertexList ) + + newUVvertexList.append( vert ) + + + # + #vertex export + # + baseVertexPair = baseVertex.items() + baseVertexPair.sort(compareVertexIndexPair) + + print "vertexUVdict len=", len( vertexUVdict ) + print "newUVvertexList len = ", len(newUVvertexList) + print "solicFaceList len = ", len(solidFaceList) + + outFile.write( "vertexCount %d\n" % (len(baseVertex.keys()) + len( newUVvertexList ) + len(solidFaceList)*3) ) + for pair in baseVertexPair: + outFile.write( "vert %f %f %f\n" % ( pair[0].co.x, pair[0].co.y, pair[0].co.z) ) + + for vert in newUVvertexList: + outFile.write( "vert %f %f %f\n" % ( vert.co.x, vert.co.y, vert.co.z) ) + + for face in solidFaceList: + outFile.write( "vert %f %f %f\n" % (face.verts[0].co.x, face.verts[0].co.y, face.verts[0].co.z) ) + outFile.write( "vert %f %f %f\n" % (face.verts[1].co.x, face.verts[1].co.y, face.verts[1].co.z) ) + outFile.write( "vert %f %f %f\n" % (face.verts[2].co.x, face.verts[2].co.y, face.verts[2].co.z) ) + + + #delimeter it need to reload loader state + outFile.write( "\n" ) + + # + #normal export + # + for pair in baseVertexPair: + outFile.write( "norm %f %f %f\n" % ( pair[0].no.x, pair[0].no.y, pair[0].no.z) ) + + for vert in newUVvertexList: + outFile.write( "norm %f %f %f\n" % ( vert.no.x, vert.no.y, vert.no.z) ) + + for face in solidFaceList: + outFile.write( "norm %f %f %f\n" % (face.no.x, face.no.y, face.no.z) ) + outFile.write( "norm %f %f %f\n" % (face.no.x, face.no.y, face.no.z) ) + outFile.write( "norm %f %f %f\n" % (face.no.x, face.no.y, face.no.z) ) + + # + #uv export + # + if( mesh.faceUV ): + print "export face UV" + + #delimeter need to reload loader state + outFile.write( "\n" ) + + for pair in baseVertexPair: + pair[0].sel = 1 + + for face in mesh.faces: + for vert in face.verts: + if( vert in baseVertex.keys() and vert.sel == 1 ): + outFile.write( "uv %f %f\n" % ( face.uv[ face.verts.index(vert) ][0], face.uv[ face.verts.index(vert) ][1] ) ) + vert.sel = 0 + + for face in mesh.faces: + if face in faceVertexReplaceDict.keys(): + for vert in face.verts: + if face.verts.index(vert) in faceVertexReplaceDict[face].keys(): + #print faceVertexReplaceDict[face][ face.verts.index(vert) ] + #outFile.write( "uv 1 1\n" ) + outFile.write( "uv %f %f\n" % ( face.uv[ face.verts.index(vert) ][0], face.uv[ face.verts.index(vert) ][1] ) ) + + for face in solidFaceList: + for uv in face.uv: + outFile.write( "uv %f %f\n" % ( uv[0], uv[1] ) ) + + # + #vertexGroupIndex export + # + for groupName in mesh.getVertGroupNames(): + vertIndexes = mesh.getVertsFromGroup(groupName) + outFile.write( "vertexGroup %s\n" % groupName ) + + for vertIndex in vertIndexes: + mesh.verts[vertIndex].sel = 1 + + faceCount = 0 + materialNumber = -1 + for face in mesh.faces: + if( face.verts[0].sel == 1 and face.verts[1].sel == 1 and face.verts[2].sel == 1 ): + faceCount += 1 + materialNumber = face.mat + #print face.mat + + + outFile.write( "vertexIndexCount %d\n" % faceCount ) + solidIndexOffset = len( mesh.verts ) + + for face in mesh.faces: + if( face.verts[0].sel == 1 and face.verts[1].sel == 1 and face.verts[2].sel == 1 ): + if( face.smooth ): + + #check + if face in faceVertexReplaceDict.keys(): + outFile.write( "face") + + for vert in face.verts: + if face.verts.index( vert ) in faceVertexReplaceDict[face].keys(): + outFile.write( " %d" % faceVertexReplaceDict[face][ face.verts.index(vert) ] ) + else: + outFile.write( " %d" % baseVertex[ face.verts[ face.verts.index(vert) ] ] ) + + outFile.write( "\n" ) + + else: + outFile.write( "face %d %d %d\n" % ( baseVertex[ face.verts[0] ], baseVertex[ face.verts[1] ], baseVertex[ face.verts[2] ] ) ) + + else: + + solidVertexIndex = len(baseVertex) + len(newUVvertexList) + solidFaceList.index(face)*3 + outFile.write( "face %d %d %d\n" % (solidVertexIndex, solidVertexIndex+1, solidVertexIndex+2) ) + + for vertIndex in vertIndexes: + mesh.verts[vertIndex].sel = 0 + + #material link + outFile.write( "material %s\n" % mesh.materials[materialNumber].name ) + + outFile.write( "end\n" ) + + + outFile.write( "end\n" ) + outFile.close() + + # + #material export + # + print "materials" + for material in mesh.materials: + + outMaterialFile = open("materials\\"+material.name, "w") + outMaterialFile.write( "type Material\n" ) + outMaterialFile.write( "name %s\n" % material.name ) + + for texture in material.getTextures(): + if(texture != None): + outMaterialFile.write( "texture\n" ) + + filename = texture.tex.image.filename + rInd = filename.rfind("\\") + print len(filename) + filename = filename[rInd+1:len(filename) ] + + shutil.copyfile( Blender.sys.expandpath( texture.tex.image.filename ), "images\\"+filename ) + + outMaterialFile.write( "path ..\\images\%s\n" % filename ) + outMaterialFile.write( "end\n" ) + + outMaterialFile.write( "end\n" ) + + outMaterialFile.close() + + + print "---- meshProcess end ----" + + +def cameraProcess(object): + print "---- cameraProcess start ----" + print object.getData(name_only=1) + print "---- cameraProcess end ----" + + +def lampProcess(object): + print "---- lampProcess start ----" + print object.getData(name_only=1) + print "---- lampProcess end ----" + + +print "---- start ----" + +createDirectory("images") +createDirectory("materials") +createDirectory("meshes") + +print list(bpy.data.objects) + +for obj in bpy.data.objects: + mesh = obj.getData(mesh=1) + print type(mesh) + + if( type(mesh) == Types.MeshType ): + meshProcess(obj) + + elif( type(mesh) == Types.CameraType ): + cameraProcess(obj) + + elif( type(mesh) == Types.LampType ): + lampProcess(obj) + print "---- end ----" \ No newline at end of file diff --git a/BlenderWork/materials/Material.002 b/BlenderWork/materials/Material.002 index 12d6a6c..5658e2e 100644 --- a/BlenderWork/materials/Material.002 +++ b/BlenderWork/materials/Material.002 @@ -1,6 +1,6 @@ -material Material.002 -erial.002 -texture -path ..\images\test.jpg -end -end +material Material.002 +erial.002 +texture +path ..\images\test.jpg +end +end diff --git a/BlenderWork/meshes/Plane b/BlenderWork/meshes/Plane index d4685b8..9856557 100644 --- a/BlenderWork/meshes/Plane +++ b/BlenderWork/meshes/Plane @@ -1,910 +1,910 @@ -type Mesh -name Plane -vertexCount 236 -vert 0.500000 1.000000 0.000000 -vert 0.000000 1.000000 0.000000 -vert 0.500000 1.000000 0.500000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 0.999999 1.000000 -vert 0.500000 1.000000 -0.500000 -vert 0.000000 1.000000 -0.500000 -vert 0.000000 1.000000 -1.000000 -vert -0.500000 1.000000 -1.000000 -vert -1.000000 1.000000 -1.000000 -vert -0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 -1.000000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 1.000000 -1.000000 -vert 0.000000 1.000000 0.500000 -vert 0.000000 1.000000 1.000000 -vert 0.500000 1.000000 1.000000 -vert -0.500000 1.000000 0.000000 -vert -0.500000 1.000000 0.500000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 1.000000 1.000000 -vert -0.500000 1.000000 1.000000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 -0.500000 0.000000 -vert -1.000000 0.000000 0.000000 -vert -1.000000 -0.500000 -0.500000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 0.000000 -vert -1.000000 -1.000000 -1.000000 -vert -1.000000 -0.500000 0.500000 -vert -1.000000 0.000000 0.500000 -vert -1.000000 0.000000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 -1.000000 0.500000 -vert -1.000000 -1.000000 1.000000 -vert -1.000000 0.000000 -0.500000 -vert -1.000000 0.000000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -1.000000 0.500000 0.000000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 0.500000 -1.000000 -vert 0.500000 -1.000000 -0.500000 -vert -0.000000 -1.000000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 -1.000000 -vert 0.500000 -1.000000 0.000000 -vert -0.000000 -1.000000 -0.500000 -vert -0.000000 -1.000000 0.000000 -vert -0.500000 -1.000000 -0.500000 -vert -0.500000 -1.000000 -1.000000 -vert 0.499999 -1.000000 0.500000 -vert 1.000000 -1.000000 0.500000 -vert 0.999999 -1.000001 1.000000 -vert -0.000000 -1.000000 0.500000 -vert 0.499999 -1.000000 1.000000 -vert -0.000001 -1.000000 1.000000 -vert -0.500000 -1.000000 0.500000 -vert -0.500000 -1.000000 0.000000 -vert -0.500000 -1.000000 1.000000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 -0.000000 -1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 0.500000 0.000000 -vert 1.000000 -0.000000 -0.500000 -vert 1.000000 -0.000000 0.000000 -vert 1.000000 -0.500000 -0.500000 -vert 1.000000 -0.500000 -1.000000 -vert 1.000000 0.500000 0.500000 -vert 1.000000 -0.000000 0.500000 -vert 1.000000 0.499999 1.000000 -vert 1.000000 -0.000001 1.000000 -vert 1.000000 -0.500000 0.500000 -vert 1.000000 -0.500000 0.000000 -vert 1.000000 -0.500001 1.000000 -vert 0.500000 0.500000 1.000000 -vert -0.000000 0.500000 1.000000 -vert 0.500000 -0.000000 1.000000 -vert -0.000000 -0.000000 1.000000 -vert 0.500000 -0.500000 1.000000 -vert -0.500000 0.500000 1.000000 -vert -0.500000 -0.000000 1.000000 -vert -0.500000 -0.500000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert 0.500000 0.000000 -1.000000 -vert -0.000000 0.000000 -1.000000 -vert 0.500000 0.500000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert -0.000000 -0.500000 -1.000000 -vert -0.500000 -0.500000 -1.000000 -vert 0.000000 0.500000 -1.000000 -vert -0.500000 0.000000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert 0.500000 1.000000 0.000000 -vert 0.500000 1.000000 0.000000 -vert 0.500000 1.000000 0.000000 -vert 0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 0.500000 -vert 0.500000 1.000000 0.500000 -vert 0.500000 1.000000 0.500000 -vert -1.000000 1.000000 1.000000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 1.000000 -1.000000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 1.000000 1.000000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 -1.000000 0.000000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 0.000000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 0.500000 -vert -1.000000 -1.000000 0.000000 -vert -0.500000 -1.000000 0.500000 -vert -0.500000 -1.000000 0.500000 -vert -1.000000 -1.000000 0.500000 -vert -1.000000 -1.000000 0.500000 -vert -0.500000 -1.000000 0.500000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 1.000000 -1.000000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 0.999999 1.000000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 0.999999 1.000000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 0.500000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 0.500000 -vert 1.000000 -1.000000 0.500000 -vert 1.000000 -0.000001 1.000000 -vert 1.000000 0.499999 1.000000 -vert 1.000000 0.499999 1.000000 -vert 0.500000 1.000000 1.000000 -vert 0.500000 1.000000 1.000000 -vert 0.500000 1.000000 1.000000 -vert 1.000000 0.499999 1.000000 -vert 0.500000 0.500000 1.000000 -vert 0.500000 0.500000 1.000000 -vert 1.000000 -0.000001 1.000000 -vert 0.500000 0.500000 1.000000 -vert 1.000000 -0.500001 1.000000 -vert 1.000000 -0.500001 1.000000 -vert 1.000000 -0.500001 1.000000 -vert 1.000000 -0.000001 1.000000 -vert -0.500000 1.000000 1.000000 -vert -0.500000 1.000000 1.000000 -vert -0.500000 1.000000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.000000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.000000 1.000000 -vert 0.499999 -1.000000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert 0.499999 -1.000000 1.000000 -vert 0.499999 -1.000000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 0.000000 1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 -0.000000 -1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 -0.000000 -1.000000 -vert -0.000000 -1.000000 -1.000000 -vert -0.500000 -1.000000 -1.000000 -vert -1.000000 -1.000000 -1.000000 -vert -0.500000 -1.000000 -1.000000 -vert -0.000000 -1.000000 -1.000000 -vert -0.500000 -1.000000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert -0.000000 -1.000000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert 1.000000 -0.500000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert 1.000000 -1.000000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert 1.000000 -0.500000 -1.000000 -vert 1.000000 -0.500000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert 1.000000 -0.000000 -1.000000 -vert 0.500000 1.000000 -1.000000 -vert 0.500000 1.000000 -1.000000 -vert 0.500000 1.000000 -1.000000 -vert -1.000000 0.000000 -1.000000 -vert -1.000000 0.500000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert -1.000000 0.500000 -1.000000 -vert -1.000000 0.000000 -1.000000 -vert -1.000000 0.500000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -1.000000 0.000000 -1.000000 -vert -0.500000 -0.500000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -1.000000 -1.000000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -0.500000 -0.500000 -1.000000 -vert -0.500000 -0.500000 -1.000000 - -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.666646 0.666646 0.333323 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 0.707083 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm -0.408246 0.816492 -0.408246 -norm 0.000000 1.000000 0.000000 -norm 0.000000 0.707083 -0.707083 -norm 0.707083 0.707083 0.000000 -norm 0.408246 0.408246 -0.816492 -norm 0.000000 1.000000 0.000000 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.666646 0.333323 0.666646 -norm 0.000000 0.707083 0.707083 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.577349 -0.577349 -0.577349 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 0.707083 -norm -0.707083 -0.707083 0.000000 -norm -0.577349 -0.577349 0.577349 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.816492 -0.408246 -0.408246 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -1.000000 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.333323 -0.666646 0.666646 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 0.707083 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 -0.707083 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm -0.666646 0.333323 0.666646 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.408246 0.816492 -0.408246 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.666646 0.333323 0.666646 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.408246 0.408246 -0.816492 -norm 0.707083 0.707083 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.666646 0.666646 0.333323 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.666646 0.666646 0.333323 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm -0.577349 -0.577349 -0.577349 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.816492 -0.408246 -0.408246 -norm 0.000000 -0.707083 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.577349 -0.577349 -0.577349 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 - -uv 0.437500 0.625000 -uv 0.375000 0.625000 -uv 0.437500 0.562500 -uv 0.500000 0.562500 -uv 0.500000 0.625000 -uv 0.500000 0.500000 -uv 0.437500 0.687500 -uv 0.375000 0.687500 -uv 0.375000 0.750000 -uv 0.312500 0.750000 -uv 0.250000 0.750000 -uv 0.312500 0.687500 -uv 0.437500 0.750000 -uv 0.500000 0.687500 -uv 0.500000 0.750000 -uv 0.375000 0.562500 -uv 0.375000 0.500000 -uv 0.437500 0.500000 -uv 0.312500 0.625000 -uv 0.312500 0.562500 -uv 0.250000 0.625000 -uv 0.249999 0.562500 -uv 0.249999 0.500000 -uv 0.312499 0.500000 -uv 0.250000 0.687500 -uv 0.187500 0.125000 -uv 0.125000 0.125000 -uv 0.187500 0.062500 -uv 0.250000 0.062500 -uv 0.250000 0.125000 -uv 0.250000 0.000000 -uv 0.187500 0.187500 -uv 0.125000 0.187500 -uv 0.125000 0.250000 -uv 0.062500 0.250000 -uv 0.062500 0.187500 -uv 0.187500 0.250000 -uv 0.249999 0.187500 -uv 0.249999 0.250000 -uv 0.125000 0.062500 -uv 0.125000 0.000000 -uv 0.187500 0.000000 -uv 0.062500 0.125000 -uv 0.062500 0.062500 -uv 0.062500 0.000000 -uv 0.437499 0.062500 -uv 0.374999 0.000000 -uv 0.437499 0.000000 -uv 0.499999 0.062500 -uv 0.499999 0.125000 -uv 0.499999 0.000000 -uv 0.437499 0.125000 -uv 0.374999 0.062500 -uv 0.374999 0.125000 -uv 0.312499 0.062500 -uv 0.312499 0.000000 -uv 0.437499 0.187500 -uv 0.499999 0.187500 -uv 0.499999 0.250000 -uv 0.374999 0.187500 -uv 0.437499 0.250000 -uv 0.374999 0.250000 -uv 0.312499 0.187500 -uv 0.312499 0.125000 -uv 0.312499 0.250000 -uv 0.687499 0.062500 -uv 0.624999 0.000000 -uv 0.687499 0.000000 -uv 0.687499 0.125000 -uv 0.624999 0.062500 -uv 0.624999 0.125000 -uv 0.562499 0.062500 -uv 0.562499 0.000000 -uv 0.687499 0.187500 -uv 0.624999 0.187500 -uv 0.687499 0.250000 -uv 0.624999 0.250000 -uv 0.562499 0.187500 -uv 0.562499 0.125000 -uv 0.562499 0.250000 -uv 0.437499 0.437500 -uv 0.374999 0.437500 -uv 0.437499 0.375000 -uv 0.374999 0.375000 -uv 0.437499 0.312500 -uv 0.312499 0.437500 -uv 0.312499 0.375000 -uv 0.312499 0.312500 -uv 0.374999 0.312500 -uv 0.437500 0.875000 -uv 0.375000 0.875000 -uv 0.437500 0.812500 -uv 0.437500 0.937500 -uv 0.375000 0.937500 -uv 0.312500 0.937500 -uv 0.375000 0.812500 -uv 0.312500 0.875000 -uv 0.312500 0.812500 -uv 0.437500 0.625000 -uv 0.437500 0.625000 -uv 0.437500 0.625000 -uv 0.437500 0.687500 -uv 0.437500 0.687500 -uv 0.437500 0.687500 -uv 0.437500 0.562500 -uv 0.437500 0.562500 -uv 0.437500 0.562500 -uv 0.000000 0.250000 -uv -0.000000 0.125000 -uv 0.000000 0.062500 -uv 0.000000 0.000000 -uv 0.062500 0.062500 -uv 0.000000 0.062500 -uv -0.000000 0.125000 -uv 0.000000 0.062500 -uv 0.062500 0.062500 -uv 0.062500 0.062500 -uv -0.000000 0.187500 -uv -0.000000 0.125000 -uv 0.062500 0.187500 -uv -0.000000 0.187500 -uv 0.000000 0.250000 -uv -0.000000 0.187500 -uv 0.062500 0.187500 -uv 0.062500 0.187500 -uv 0.249999 0.125000 -uv 0.249999 0.062500 -uv 0.249999 0.062500 -uv 0.249999 0.125000 -uv 0.249999 0.062500 -uv 0.249999 0.187500 -uv 0.249999 0.125000 -uv 0.312499 0.187500 -uv 0.312499 0.187500 -uv 0.249999 0.187500 -uv 0.249999 0.187500 -uv 0.312499 0.187500 -uv 0.749999 0.062500 -uv 0.749999 0.125000 -uv 0.749999 0.062500 -uv 0.749999 0.000000 -uv 0.749999 0.062500 -uv 0.687499 0.062500 -uv 0.749999 0.125000 -uv 0.687499 0.062500 -uv 0.687499 0.062500 -uv 0.749999 0.187500 -uv 0.749999 0.250000 -uv 0.749999 0.187500 -uv 0.749999 0.187500 -uv 0.749999 0.125000 -uv 0.749999 0.250000 -uv 0.499999 0.125000 -uv 0.499999 0.062500 -uv 0.499999 0.062500 -uv 0.499999 0.125000 -uv 0.499999 0.062500 -uv 0.499999 0.187500 -uv 0.499999 0.125000 -uv 0.499999 0.187500 -uv 0.499999 0.187500 -uv 0.499999 0.375000 -uv 0.500000 0.437500 -uv 0.500000 0.437500 -uv 0.437500 0.500000 -uv 0.437500 0.500000 -uv 0.437500 0.500000 -uv 0.500000 0.437500 -uv 0.437500 0.437500 -uv 0.437500 0.437500 -uv 0.499999 0.375000 -uv 0.437500 0.437500 -uv 0.499999 0.312500 -uv 0.499999 0.312500 -uv 0.499999 0.312500 -uv 0.499999 0.375000 -uv 0.312499 0.500000 -uv 0.312499 0.500000 -uv 0.312499 0.500000 -uv 0.249999 0.437500 -uv 0.249999 0.375000 -uv 0.249999 0.437500 -uv 0.249999 0.437500 -uv 0.249999 0.375000 -uv 0.437499 0.250000 -uv 0.374999 0.312500 -uv 0.437499 0.250000 -uv 0.437499 0.250000 -uv 0.374999 0.312500 -uv 0.374999 0.312500 -uv 0.249999 0.312500 -uv 0.249999 0.312500 -uv 0.249999 0.312500 -uv 0.249999 0.375000 -uv 0.500000 0.812500 -uv 0.500000 0.875000 -uv 0.500000 0.812500 -uv 0.500000 0.812500 -uv 0.500000 0.875000 -uv 0.375000 1.000000 -uv 0.312500 1.000000 -uv 0.250000 1.000000 -uv 0.312500 1.000000 -uv 0.375000 1.000000 -uv 0.312500 1.000000 -uv 0.437500 1.000000 -uv 0.375000 1.000000 -uv 0.437500 0.937500 -uv 0.437500 0.937500 -uv 0.500000 0.937500 -uv 0.437500 1.000000 -uv 0.500000 1.000000 -uv 0.437500 1.000000 -uv 0.500000 0.937500 -uv 0.500000 0.937500 -uv 0.437500 0.937500 -uv 0.500000 0.875000 -uv 0.437500 0.750000 -uv 0.437500 0.750000 -uv 0.437500 0.750000 -uv 0.250000 0.875000 -uv 0.250000 0.812500 -uv 0.312500 0.812500 -uv 0.250000 0.812500 -uv 0.250000 0.875000 -uv 0.250000 0.812500 -uv 0.312500 0.812500 -uv 0.312500 0.812500 -uv 0.250000 0.937500 -uv 0.250000 0.875000 -uv 0.312500 0.937500 -uv 0.250000 0.937500 -uv 0.250000 1.000000 -uv 0.250000 0.937500 -uv 0.312500 0.937500 -uv 0.312500 0.937500 -vertexGroup Group -vertexIndexCount 192 -face 0 1 2 -face 2 3 0 -face 4 0 3 -face 3 2 5 -face 98 4 6 -face 6 7 99 -face 1 100 7 -face 7 6 8 -face 9 10 11 -face 11 7 9 -face 8 9 7 -face 7 11 1 -face 12 8 101 -face 102 13 12 -face 14 12 13 -face 13 103 4 -face 15 16 17 -face 17 104 15 -face 1 15 105 -face 106 17 5 -face 15 1 18 -face 18 19 15 -face 16 15 19 -face 19 18 20 -face 21 22 23 -face 23 19 21 -face 20 21 19 -face 19 23 16 -face 24 20 18 -face 18 11 24 -face 10 24 11 -face 11 18 1 -face 25 26 27 -face 27 28 25 -face 29 25 28 -face 28 27 30 -face 25 29 31 -face 31 32 25 -face 26 25 32 -face 32 31 33 -face 34 107 35 -face 35 32 34 -face 33 34 32 -face 32 35 26 -face 36 33 31 -face 31 37 36 -face 38 36 37 -face 37 31 29 -face 39 40 41 -face 41 27 39 -face 26 39 27 -face 27 41 30 -face 39 26 42 -face 42 43 39 -face 40 39 43 -face 43 42 108 -face 109 110 44 -face 44 111 112 -face 113 114 115 -face 116 44 40 -face 117 118 42 -face 42 119 120 -face 121 122 123 -face 124 42 26 -face 45 46 47 -face 47 48 45 -face 49 45 48 -face 48 47 50 -face 45 49 51 -face 51 52 45 -face 46 45 52 -face 52 51 53 -face 54 30 55 -face 55 52 54 -face 53 54 52 -face 52 55 46 -face 56 53 51 -face 51 57 56 -face 58 56 57 -face 57 51 49 -face 59 53 56 -face 56 60 59 -face 61 59 60 -face 60 56 58 -face 59 61 62 -face 62 63 59 -face 53 59 63 -face 63 62 125 -face 126 30 54 -face 54 63 127 -face 128 129 63 -face 63 54 53 -face 130 131 132 -face 133 64 134 -face 38 135 64 -face 64 136 61 -face 65 66 67 -face 67 137 65 -face 138 65 139 -face 67 140 141 -face 142 143 68 -face 68 69 144 -face 66 145 69 -face 69 68 70 -face 71 50 72 -face 72 69 71 -face 70 71 69 -face 69 72 66 -face 73 70 68 -face 68 146 73 -face 147 73 148 -face 149 68 150 -face 74 70 73 -face 73 75 74 -face 76 74 75 -face 75 73 151 -face 74 76 77 -face 77 78 74 -face 70 74 78 -face 78 77 152 -face 153 50 71 -face 71 78 154 -face 155 156 78 -face 78 71 70 -face 157 158 77 -face 77 79 159 -face 58 160 79 -face 79 77 76 -face 80 161 162 -face 163 164 80 -face 16 80 165 -face 166 167 5 -face 168 16 81 -face 81 82 169 -face 170 171 82 -face 82 81 83 -face 84 58 172 -face 173 82 84 -face 83 84 82 -face 82 174 175 -face 85 83 81 -face 81 176 85 -face 22 85 177 -face 178 81 16 -face 86 83 85 -face 85 179 86 -face 180 86 181 -face 182 85 22 -face 86 183 87 -face 87 88 86 -face 83 86 88 -face 88 87 61 -face 184 58 84 -face 84 185 186 -face 61 187 188 -face 189 84 83 -face 64 61 87 -face 87 190 64 -face 38 64 191 -face 192 87 193 -face 89 90 91 -face 91 194 89 -face 195 89 196 -face 91 14 197 -face 89 198 92 -face 92 93 89 -face 90 89 93 -face 93 92 199 -face 200 201 94 -face 94 93 202 -face 203 204 93 -face 93 94 90 -face 205 206 207 -face 208 209 210 -face 211 212 213 -face 214 215 216 -face 95 8 217 -face 218 91 95 -face 90 95 91 -face 219 14 91 -face 95 90 96 -face 96 97 95 -face 8 95 97 -face 97 96 220 -face 221 10 9 -face 9 222 223 -face 224 225 226 -face 227 9 8 -face 228 229 96 -face 96 230 231 -face 232 233 234 -face 235 96 90 -material Material.002 -end -end +type Mesh +name Plane +vertexCount 236 +vert 0.500000 1.000000 0.000000 +vert 0.000000 1.000000 0.000000 +vert 0.500000 1.000000 0.500000 +vert 1.000000 1.000000 0.500000 +vert 1.000000 1.000000 0.000000 +vert 1.000000 0.999999 1.000000 +vert 0.500000 1.000000 -0.500000 +vert 0.000000 1.000000 -0.500000 +vert 0.000000 1.000000 -1.000000 +vert -0.500000 1.000000 -1.000000 +vert -1.000000 1.000000 -1.000000 +vert -0.500000 1.000000 -0.500000 +vert 0.500000 1.000000 -1.000000 +vert 1.000000 1.000000 -0.500000 +vert 1.000000 1.000000 -1.000000 +vert 0.000000 1.000000 0.500000 +vert 0.000000 1.000000 1.000000 +vert 0.500000 1.000000 1.000000 +vert -0.500000 1.000000 0.000000 +vert -0.500000 1.000000 0.500000 +vert -1.000000 1.000000 0.000000 +vert -1.000000 1.000000 0.500000 +vert -1.000000 1.000000 1.000000 +vert -0.500000 1.000000 1.000000 +vert -1.000000 1.000000 -0.500000 +vert -1.000000 -0.500000 0.000000 +vert -1.000000 0.000000 0.000000 +vert -1.000000 -0.500000 -0.500000 +vert -1.000000 -1.000000 -0.500000 +vert -1.000000 -1.000000 0.000000 +vert -1.000000 -1.000000 -1.000000 +vert -1.000000 -0.500000 0.500000 +vert -1.000000 0.000000 0.500000 +vert -1.000000 0.000000 1.000000 +vert -1.000000 0.500000 1.000000 +vert -1.000000 0.500000 0.500000 +vert -1.000000 -0.500000 1.000000 +vert -1.000000 -1.000000 0.500000 +vert -1.000000 -1.000000 1.000000 +vert -1.000000 0.000000 -0.500000 +vert -1.000000 0.000000 -1.000000 +vert -1.000000 -0.500000 -1.000000 +vert -1.000000 0.500000 0.000000 +vert -1.000000 0.500000 -0.500000 +vert -1.000000 0.500000 -1.000000 +vert 0.500000 -1.000000 -0.500000 +vert -0.000000 -1.000000 -1.000000 +vert 0.500000 -1.000000 -1.000000 +vert 1.000000 -1.000000 -0.500000 +vert 1.000000 -1.000000 0.000000 +vert 1.000000 -1.000000 -1.000000 +vert 0.500000 -1.000000 0.000000 +vert -0.000000 -1.000000 -0.500000 +vert -0.000000 -1.000000 0.000000 +vert -0.500000 -1.000000 -0.500000 +vert -0.500000 -1.000000 -1.000000 +vert 0.499999 -1.000000 0.500000 +vert 1.000000 -1.000000 0.500000 +vert 0.999999 -1.000001 1.000000 +vert -0.000000 -1.000000 0.500000 +vert 0.499999 -1.000000 1.000000 +vert -0.000001 -1.000000 1.000000 +vert -0.500000 -1.000000 0.500000 +vert -0.500000 -1.000000 0.000000 +vert -0.500000 -1.000000 1.000000 +vert 1.000000 0.500000 -0.500000 +vert 1.000000 -0.000000 -1.000000 +vert 1.000000 0.500000 -1.000000 +vert 1.000000 0.500000 0.000000 +vert 1.000000 -0.000000 -0.500000 +vert 1.000000 -0.000000 0.000000 +vert 1.000000 -0.500000 -0.500000 +vert 1.000000 -0.500000 -1.000000 +vert 1.000000 0.500000 0.500000 +vert 1.000000 -0.000000 0.500000 +vert 1.000000 0.499999 1.000000 +vert 1.000000 -0.000001 1.000000 +vert 1.000000 -0.500000 0.500000 +vert 1.000000 -0.500000 0.000000 +vert 1.000000 -0.500001 1.000000 +vert 0.500000 0.500000 1.000000 +vert -0.000000 0.500000 1.000000 +vert 0.500000 -0.000000 1.000000 +vert -0.000000 -0.000000 1.000000 +vert 0.500000 -0.500000 1.000000 +vert -0.500000 0.500000 1.000000 +vert -0.500000 -0.000000 1.000000 +vert -0.500000 -0.500000 1.000000 +vert -0.000000 -0.500000 1.000000 +vert 0.500000 0.000000 -1.000000 +vert -0.000000 0.000000 -1.000000 +vert 0.500000 0.500000 -1.000000 +vert 0.500000 -0.500000 -1.000000 +vert -0.000000 -0.500000 -1.000000 +vert -0.500000 -0.500000 -1.000000 +vert 0.000000 0.500000 -1.000000 +vert -0.500000 0.000000 -1.000000 +vert -0.500000 0.500000 -1.000000 +vert 0.500000 1.000000 0.000000 +vert 0.500000 1.000000 0.000000 +vert 0.500000 1.000000 0.000000 +vert 0.500000 1.000000 -0.500000 +vert 0.500000 1.000000 -0.500000 +vert 0.500000 1.000000 -0.500000 +vert 0.500000 1.000000 0.500000 +vert 0.500000 1.000000 0.500000 +vert 0.500000 1.000000 0.500000 +vert -1.000000 1.000000 1.000000 +vert -1.000000 1.000000 0.000000 +vert -1.000000 1.000000 -0.500000 +vert -1.000000 1.000000 -1.000000 +vert -1.000000 0.500000 -0.500000 +vert -1.000000 1.000000 -0.500000 +vert -1.000000 1.000000 0.000000 +vert -1.000000 1.000000 -0.500000 +vert -1.000000 0.500000 -0.500000 +vert -1.000000 0.500000 -0.500000 +vert -1.000000 1.000000 0.500000 +vert -1.000000 1.000000 0.000000 +vert -1.000000 0.500000 0.500000 +vert -1.000000 1.000000 0.500000 +vert -1.000000 1.000000 1.000000 +vert -1.000000 1.000000 0.500000 +vert -1.000000 0.500000 0.500000 +vert -1.000000 0.500000 0.500000 +vert -1.000000 -1.000000 0.000000 +vert -1.000000 -1.000000 -0.500000 +vert -1.000000 -1.000000 -0.500000 +vert -1.000000 -1.000000 0.000000 +vert -1.000000 -1.000000 -0.500000 +vert -1.000000 -1.000000 0.500000 +vert -1.000000 -1.000000 0.000000 +vert -0.500000 -1.000000 0.500000 +vert -0.500000 -1.000000 0.500000 +vert -1.000000 -1.000000 0.500000 +vert -1.000000 -1.000000 0.500000 +vert -0.500000 -1.000000 0.500000 +vert 1.000000 1.000000 -0.500000 +vert 1.000000 1.000000 0.000000 +vert 1.000000 1.000000 -0.500000 +vert 1.000000 1.000000 -1.000000 +vert 1.000000 1.000000 -0.500000 +vert 1.000000 0.500000 -0.500000 +vert 1.000000 1.000000 0.000000 +vert 1.000000 0.500000 -0.500000 +vert 1.000000 0.500000 -0.500000 +vert 1.000000 1.000000 0.500000 +vert 1.000000 0.999999 1.000000 +vert 1.000000 1.000000 0.500000 +vert 1.000000 1.000000 0.500000 +vert 1.000000 1.000000 0.000000 +vert 1.000000 0.999999 1.000000 +vert 1.000000 -1.000000 0.000000 +vert 1.000000 -1.000000 -0.500000 +vert 1.000000 -1.000000 -0.500000 +vert 1.000000 -1.000000 0.000000 +vert 1.000000 -1.000000 -0.500000 +vert 1.000000 -1.000000 0.500000 +vert 1.000000 -1.000000 0.000000 +vert 1.000000 -1.000000 0.500000 +vert 1.000000 -1.000000 0.500000 +vert 1.000000 -0.000001 1.000000 +vert 1.000000 0.499999 1.000000 +vert 1.000000 0.499999 1.000000 +vert 0.500000 1.000000 1.000000 +vert 0.500000 1.000000 1.000000 +vert 0.500000 1.000000 1.000000 +vert 1.000000 0.499999 1.000000 +vert 0.500000 0.500000 1.000000 +vert 0.500000 0.500000 1.000000 +vert 1.000000 -0.000001 1.000000 +vert 0.500000 0.500000 1.000000 +vert 1.000000 -0.500001 1.000000 +vert 1.000000 -0.500001 1.000000 +vert 1.000000 -0.500001 1.000000 +vert 1.000000 -0.000001 1.000000 +vert -0.500000 1.000000 1.000000 +vert -0.500000 1.000000 1.000000 +vert -0.500000 1.000000 1.000000 +vert -1.000000 0.500000 1.000000 +vert -1.000000 0.000000 1.000000 +vert -1.000000 0.500000 1.000000 +vert -1.000000 0.500000 1.000000 +vert -1.000000 0.000000 1.000000 +vert 0.499999 -1.000000 1.000000 +vert -0.000000 -0.500000 1.000000 +vert 0.499999 -1.000000 1.000000 +vert 0.499999 -1.000000 1.000000 +vert -0.000000 -0.500000 1.000000 +vert -0.000000 -0.500000 1.000000 +vert -1.000000 -0.500000 1.000000 +vert -1.000000 -0.500000 1.000000 +vert -1.000000 -0.500000 1.000000 +vert -1.000000 0.000000 1.000000 +vert 1.000000 0.500000 -1.000000 +vert 1.000000 -0.000000 -1.000000 +vert 1.000000 0.500000 -1.000000 +vert 1.000000 0.500000 -1.000000 +vert 1.000000 -0.000000 -1.000000 +vert -0.000000 -1.000000 -1.000000 +vert -0.500000 -1.000000 -1.000000 +vert -1.000000 -1.000000 -1.000000 +vert -0.500000 -1.000000 -1.000000 +vert -0.000000 -1.000000 -1.000000 +vert -0.500000 -1.000000 -1.000000 +vert 0.500000 -1.000000 -1.000000 +vert -0.000000 -1.000000 -1.000000 +vert 0.500000 -0.500000 -1.000000 +vert 0.500000 -0.500000 -1.000000 +vert 1.000000 -0.500000 -1.000000 +vert 0.500000 -1.000000 -1.000000 +vert 1.000000 -1.000000 -1.000000 +vert 0.500000 -1.000000 -1.000000 +vert 1.000000 -0.500000 -1.000000 +vert 1.000000 -0.500000 -1.000000 +vert 0.500000 -0.500000 -1.000000 +vert 1.000000 -0.000000 -1.000000 +vert 0.500000 1.000000 -1.000000 +vert 0.500000 1.000000 -1.000000 +vert 0.500000 1.000000 -1.000000 +vert -1.000000 0.000000 -1.000000 +vert -1.000000 0.500000 -1.000000 +vert -0.500000 0.500000 -1.000000 +vert -1.000000 0.500000 -1.000000 +vert -1.000000 0.000000 -1.000000 +vert -1.000000 0.500000 -1.000000 +vert -0.500000 0.500000 -1.000000 +vert -0.500000 0.500000 -1.000000 +vert -1.000000 -0.500000 -1.000000 +vert -1.000000 0.000000 -1.000000 +vert -0.500000 -0.500000 -1.000000 +vert -1.000000 -0.500000 -1.000000 +vert -1.000000 -1.000000 -1.000000 +vert -1.000000 -0.500000 -1.000000 +vert -0.500000 -0.500000 -1.000000 +vert -0.500000 -0.500000 -1.000000 + +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.666646 0.666646 0.333323 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 0.707083 -0.707083 +norm 0.000000 0.707083 -0.707083 +norm -0.408246 0.816492 -0.408246 +norm 0.000000 1.000000 0.000000 +norm 0.000000 0.707083 -0.707083 +norm 0.707083 0.707083 0.000000 +norm 0.408246 0.408246 -0.816492 +norm 0.000000 1.000000 0.000000 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.666646 0.333323 0.666646 +norm 0.000000 0.707083 0.707083 +norm -0.707083 0.707083 0.000000 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.577349 -0.577349 -0.577349 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.000000 0.707083 +norm -0.707083 -0.707083 0.000000 +norm -0.577349 -0.577349 0.577349 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.816492 -0.408246 -0.408246 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -1.000000 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.333323 -0.666646 0.666646 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -0.707083 0.707083 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.000000 -0.707083 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm -0.666646 0.333323 0.666646 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.408246 0.816492 -0.408246 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.666646 0.333323 0.666646 +norm -0.707083 0.707083 0.000000 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.408246 0.408246 -0.816492 +norm 0.707083 0.707083 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.707083 0.000000 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.666646 0.666646 0.333323 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.666646 0.666646 0.333323 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm -0.577349 -0.577349 -0.577349 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.707083 0.000000 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.816492 -0.408246 -0.408246 +norm 0.000000 -0.707083 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm 0.707083 0.000000 -0.707083 +norm 0.000000 0.707083 -0.707083 +norm 0.000000 0.707083 -0.707083 +norm 0.000000 0.707083 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm -0.707083 0.000000 -0.707083 +norm -0.577349 -0.577349 -0.577349 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 + +uv 0.437500 0.625000 +uv 0.375000 0.625000 +uv 0.437500 0.562500 +uv 0.500000 0.562500 +uv 0.500000 0.625000 +uv 0.500000 0.500000 +uv 0.437500 0.687500 +uv 0.375000 0.687500 +uv 0.375000 0.750000 +uv 0.312500 0.750000 +uv 0.250000 0.750000 +uv 0.312500 0.687500 +uv 0.437500 0.750000 +uv 0.500000 0.687500 +uv 0.500000 0.750000 +uv 0.375000 0.562500 +uv 0.375000 0.500000 +uv 0.437500 0.500000 +uv 0.312500 0.625000 +uv 0.312500 0.562500 +uv 0.250000 0.625000 +uv 0.249999 0.562500 +uv 0.249999 0.500000 +uv 0.312499 0.500000 +uv 0.250000 0.687500 +uv 0.187500 0.125000 +uv 0.125000 0.125000 +uv 0.187500 0.062500 +uv 0.250000 0.062500 +uv 0.250000 0.125000 +uv 0.250000 0.000000 +uv 0.187500 0.187500 +uv 0.125000 0.187500 +uv 0.125000 0.250000 +uv 0.062500 0.250000 +uv 0.062500 0.187500 +uv 0.187500 0.250000 +uv 0.249999 0.187500 +uv 0.249999 0.250000 +uv 0.125000 0.062500 +uv 0.125000 0.000000 +uv 0.187500 0.000000 +uv 0.062500 0.125000 +uv 0.062500 0.062500 +uv 0.062500 0.000000 +uv 0.437499 0.062500 +uv 0.374999 0.000000 +uv 0.437499 0.000000 +uv 0.499999 0.062500 +uv 0.499999 0.125000 +uv 0.499999 0.000000 +uv 0.437499 0.125000 +uv 0.374999 0.062500 +uv 0.374999 0.125000 +uv 0.312499 0.062500 +uv 0.312499 0.000000 +uv 0.437499 0.187500 +uv 0.499999 0.187500 +uv 0.499999 0.250000 +uv 0.374999 0.187500 +uv 0.437499 0.250000 +uv 0.374999 0.250000 +uv 0.312499 0.187500 +uv 0.312499 0.125000 +uv 0.312499 0.250000 +uv 0.687499 0.062500 +uv 0.624999 0.000000 +uv 0.687499 0.000000 +uv 0.687499 0.125000 +uv 0.624999 0.062500 +uv 0.624999 0.125000 +uv 0.562499 0.062500 +uv 0.562499 0.000000 +uv 0.687499 0.187500 +uv 0.624999 0.187500 +uv 0.687499 0.250000 +uv 0.624999 0.250000 +uv 0.562499 0.187500 +uv 0.562499 0.125000 +uv 0.562499 0.250000 +uv 0.437499 0.437500 +uv 0.374999 0.437500 +uv 0.437499 0.375000 +uv 0.374999 0.375000 +uv 0.437499 0.312500 +uv 0.312499 0.437500 +uv 0.312499 0.375000 +uv 0.312499 0.312500 +uv 0.374999 0.312500 +uv 0.437500 0.875000 +uv 0.375000 0.875000 +uv 0.437500 0.812500 +uv 0.437500 0.937500 +uv 0.375000 0.937500 +uv 0.312500 0.937500 +uv 0.375000 0.812500 +uv 0.312500 0.875000 +uv 0.312500 0.812500 +uv 0.437500 0.625000 +uv 0.437500 0.625000 +uv 0.437500 0.625000 +uv 0.437500 0.687500 +uv 0.437500 0.687500 +uv 0.437500 0.687500 +uv 0.437500 0.562500 +uv 0.437500 0.562500 +uv 0.437500 0.562500 +uv 0.000000 0.250000 +uv -0.000000 0.125000 +uv 0.000000 0.062500 +uv 0.000000 0.000000 +uv 0.062500 0.062500 +uv 0.000000 0.062500 +uv -0.000000 0.125000 +uv 0.000000 0.062500 +uv 0.062500 0.062500 +uv 0.062500 0.062500 +uv -0.000000 0.187500 +uv -0.000000 0.125000 +uv 0.062500 0.187500 +uv -0.000000 0.187500 +uv 0.000000 0.250000 +uv -0.000000 0.187500 +uv 0.062500 0.187500 +uv 0.062500 0.187500 +uv 0.249999 0.125000 +uv 0.249999 0.062500 +uv 0.249999 0.062500 +uv 0.249999 0.125000 +uv 0.249999 0.062500 +uv 0.249999 0.187500 +uv 0.249999 0.125000 +uv 0.312499 0.187500 +uv 0.312499 0.187500 +uv 0.249999 0.187500 +uv 0.249999 0.187500 +uv 0.312499 0.187500 +uv 0.749999 0.062500 +uv 0.749999 0.125000 +uv 0.749999 0.062500 +uv 0.749999 0.000000 +uv 0.749999 0.062500 +uv 0.687499 0.062500 +uv 0.749999 0.125000 +uv 0.687499 0.062500 +uv 0.687499 0.062500 +uv 0.749999 0.187500 +uv 0.749999 0.250000 +uv 0.749999 0.187500 +uv 0.749999 0.187500 +uv 0.749999 0.125000 +uv 0.749999 0.250000 +uv 0.499999 0.125000 +uv 0.499999 0.062500 +uv 0.499999 0.062500 +uv 0.499999 0.125000 +uv 0.499999 0.062500 +uv 0.499999 0.187500 +uv 0.499999 0.125000 +uv 0.499999 0.187500 +uv 0.499999 0.187500 +uv 0.499999 0.375000 +uv 0.500000 0.437500 +uv 0.500000 0.437500 +uv 0.437500 0.500000 +uv 0.437500 0.500000 +uv 0.437500 0.500000 +uv 0.500000 0.437500 +uv 0.437500 0.437500 +uv 0.437500 0.437500 +uv 0.499999 0.375000 +uv 0.437500 0.437500 +uv 0.499999 0.312500 +uv 0.499999 0.312500 +uv 0.499999 0.312500 +uv 0.499999 0.375000 +uv 0.312499 0.500000 +uv 0.312499 0.500000 +uv 0.312499 0.500000 +uv 0.249999 0.437500 +uv 0.249999 0.375000 +uv 0.249999 0.437500 +uv 0.249999 0.437500 +uv 0.249999 0.375000 +uv 0.437499 0.250000 +uv 0.374999 0.312500 +uv 0.437499 0.250000 +uv 0.437499 0.250000 +uv 0.374999 0.312500 +uv 0.374999 0.312500 +uv 0.249999 0.312500 +uv 0.249999 0.312500 +uv 0.249999 0.312500 +uv 0.249999 0.375000 +uv 0.500000 0.812500 +uv 0.500000 0.875000 +uv 0.500000 0.812500 +uv 0.500000 0.812500 +uv 0.500000 0.875000 +uv 0.375000 1.000000 +uv 0.312500 1.000000 +uv 0.250000 1.000000 +uv 0.312500 1.000000 +uv 0.375000 1.000000 +uv 0.312500 1.000000 +uv 0.437500 1.000000 +uv 0.375000 1.000000 +uv 0.437500 0.937500 +uv 0.437500 0.937500 +uv 0.500000 0.937500 +uv 0.437500 1.000000 +uv 0.500000 1.000000 +uv 0.437500 1.000000 +uv 0.500000 0.937500 +uv 0.500000 0.937500 +uv 0.437500 0.937500 +uv 0.500000 0.875000 +uv 0.437500 0.750000 +uv 0.437500 0.750000 +uv 0.437500 0.750000 +uv 0.250000 0.875000 +uv 0.250000 0.812500 +uv 0.312500 0.812500 +uv 0.250000 0.812500 +uv 0.250000 0.875000 +uv 0.250000 0.812500 +uv 0.312500 0.812500 +uv 0.312500 0.812500 +uv 0.250000 0.937500 +uv 0.250000 0.875000 +uv 0.312500 0.937500 +uv 0.250000 0.937500 +uv 0.250000 1.000000 +uv 0.250000 0.937500 +uv 0.312500 0.937500 +uv 0.312500 0.937500 +vertexGroup Group +vertexIndexCount 192 +face 0 1 2 +face 2 3 0 +face 4 0 3 +face 3 2 5 +face 98 4 6 +face 6 7 99 +face 1 100 7 +face 7 6 8 +face 9 10 11 +face 11 7 9 +face 8 9 7 +face 7 11 1 +face 12 8 101 +face 102 13 12 +face 14 12 13 +face 13 103 4 +face 15 16 17 +face 17 104 15 +face 1 15 105 +face 106 17 5 +face 15 1 18 +face 18 19 15 +face 16 15 19 +face 19 18 20 +face 21 22 23 +face 23 19 21 +face 20 21 19 +face 19 23 16 +face 24 20 18 +face 18 11 24 +face 10 24 11 +face 11 18 1 +face 25 26 27 +face 27 28 25 +face 29 25 28 +face 28 27 30 +face 25 29 31 +face 31 32 25 +face 26 25 32 +face 32 31 33 +face 34 107 35 +face 35 32 34 +face 33 34 32 +face 32 35 26 +face 36 33 31 +face 31 37 36 +face 38 36 37 +face 37 31 29 +face 39 40 41 +face 41 27 39 +face 26 39 27 +face 27 41 30 +face 39 26 42 +face 42 43 39 +face 40 39 43 +face 43 42 108 +face 109 110 44 +face 44 111 112 +face 113 114 115 +face 116 44 40 +face 117 118 42 +face 42 119 120 +face 121 122 123 +face 124 42 26 +face 45 46 47 +face 47 48 45 +face 49 45 48 +face 48 47 50 +face 45 49 51 +face 51 52 45 +face 46 45 52 +face 52 51 53 +face 54 30 55 +face 55 52 54 +face 53 54 52 +face 52 55 46 +face 56 53 51 +face 51 57 56 +face 58 56 57 +face 57 51 49 +face 59 53 56 +face 56 60 59 +face 61 59 60 +face 60 56 58 +face 59 61 62 +face 62 63 59 +face 53 59 63 +face 63 62 125 +face 126 30 54 +face 54 63 127 +face 128 129 63 +face 63 54 53 +face 130 131 132 +face 133 64 134 +face 38 135 64 +face 64 136 61 +face 65 66 67 +face 67 137 65 +face 138 65 139 +face 67 140 141 +face 142 143 68 +face 68 69 144 +face 66 145 69 +face 69 68 70 +face 71 50 72 +face 72 69 71 +face 70 71 69 +face 69 72 66 +face 73 70 68 +face 68 146 73 +face 147 73 148 +face 149 68 150 +face 74 70 73 +face 73 75 74 +face 76 74 75 +face 75 73 151 +face 74 76 77 +face 77 78 74 +face 70 74 78 +face 78 77 152 +face 153 50 71 +face 71 78 154 +face 155 156 78 +face 78 71 70 +face 157 158 77 +face 77 79 159 +face 58 160 79 +face 79 77 76 +face 80 161 162 +face 163 164 80 +face 16 80 165 +face 166 167 5 +face 168 16 81 +face 81 82 169 +face 170 171 82 +face 82 81 83 +face 84 58 172 +face 173 82 84 +face 83 84 82 +face 82 174 175 +face 85 83 81 +face 81 176 85 +face 22 85 177 +face 178 81 16 +face 86 83 85 +face 85 179 86 +face 180 86 181 +face 182 85 22 +face 86 183 87 +face 87 88 86 +face 83 86 88 +face 88 87 61 +face 184 58 84 +face 84 185 186 +face 61 187 188 +face 189 84 83 +face 64 61 87 +face 87 190 64 +face 38 64 191 +face 192 87 193 +face 89 90 91 +face 91 194 89 +face 195 89 196 +face 91 14 197 +face 89 198 92 +face 92 93 89 +face 90 89 93 +face 93 92 199 +face 200 201 94 +face 94 93 202 +face 203 204 93 +face 93 94 90 +face 205 206 207 +face 208 209 210 +face 211 212 213 +face 214 215 216 +face 95 8 217 +face 218 91 95 +face 90 95 91 +face 219 14 91 +face 95 90 96 +face 96 97 95 +face 8 95 97 +face 97 96 220 +face 221 10 9 +face 9 222 223 +face 224 225 226 +face 227 9 8 +face 228 229 96 +face 96 230 231 +face 232 233 234 +face 235 96 90 +material Material.002 +end +end diff --git a/BlenderWork/out.txt b/BlenderWork/out.txt index d0365d5..ca551a7 100644 --- a/BlenderWork/out.txt +++ b/BlenderWork/out.txt @@ -1,911 +1,911 @@ -type Mesh -name Plane -vertexCount 236 -vert 0.500000 1.000000 0.000000 -vert 0.000000 1.000000 0.000000 -vert 0.500000 1.000000 0.500000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 0.999999 1.000000 -vert 0.500000 1.000000 -0.500000 -vert 0.000000 1.000000 -0.500000 -vert 0.000000 1.000000 -1.000000 -vert -0.500000 1.000000 -1.000000 -vert -1.000000 1.000000 -1.000000 -vert -0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 -1.000000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 1.000000 -1.000000 -vert 0.000000 1.000000 0.500000 -vert 0.000000 1.000000 1.000000 -vert 0.500000 1.000000 1.000000 -vert -0.500000 1.000000 0.000000 -vert -0.500000 1.000000 0.500000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 1.000000 1.000000 -vert -0.500000 1.000000 1.000000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 -0.500000 0.000000 -vert -1.000000 0.000000 0.000000 -vert -1.000000 -0.500000 -0.500000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 0.000000 -vert -1.000000 -1.000000 -1.000000 -vert -1.000000 -0.500000 0.500000 -vert -1.000000 0.000000 0.500000 -vert -1.000000 0.000000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 -1.000000 0.500000 -vert -1.000000 -1.000000 1.000000 -vert -1.000000 0.000000 -0.500000 -vert -1.000000 0.000000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -1.000000 0.500000 0.000000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 0.500000 -1.000000 -vert 0.500000 -1.000000 -0.500000 -vert -0.000000 -1.000000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 -1.000000 -vert 0.500000 -1.000000 0.000000 -vert -0.000000 -1.000000 -0.500000 -vert -0.000000 -1.000000 0.000000 -vert -0.500000 -1.000000 -0.500000 -vert -0.500000 -1.000000 -1.000000 -vert 0.499999 -1.000000 0.500000 -vert 1.000000 -1.000000 0.500000 -vert 0.999999 -1.000001 1.000000 -vert -0.000000 -1.000000 0.500000 -vert 0.499999 -1.000000 1.000000 -vert -0.000001 -1.000000 1.000000 -vert -0.500000 -1.000000 0.500000 -vert -0.500000 -1.000000 0.000000 -vert -0.500000 -1.000000 1.000000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 -0.000000 -1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 0.500000 0.000000 -vert 1.000000 -0.000000 -0.500000 -vert 1.000000 -0.000000 0.000000 -vert 1.000000 -0.500000 -0.500000 -vert 1.000000 -0.500000 -1.000000 -vert 1.000000 0.500000 0.500000 -vert 1.000000 -0.000000 0.500000 -vert 1.000000 0.499999 1.000000 -vert 1.000000 -0.000001 1.000000 -vert 1.000000 -0.500000 0.500000 -vert 1.000000 -0.500000 0.000000 -vert 1.000000 -0.500001 1.000000 -vert 0.500000 0.500000 1.000000 -vert -0.000000 0.500000 1.000000 -vert 0.500000 -0.000000 1.000000 -vert -0.000000 -0.000000 1.000000 -vert 0.500000 -0.500000 1.000000 -vert -0.500000 0.500000 1.000000 -vert -0.500000 -0.000000 1.000000 -vert -0.500000 -0.500000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert 0.500000 0.000000 -1.000000 -vert -0.000000 0.000000 -1.000000 -vert 0.500000 0.500000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert -0.000000 -0.500000 -1.000000 -vert -0.500000 -0.500000 -1.000000 -vert 0.000000 0.500000 -1.000000 -vert -0.500000 0.000000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert 0.500000 1.000000 0.000000 -vert 0.500000 1.000000 0.000000 -vert 0.500000 1.000000 0.000000 -vert 0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 0.500000 -vert 0.500000 1.000000 0.500000 -vert 0.500000 1.000000 0.500000 -vert -1.000000 1.000000 1.000000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 1.000000 -1.000000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 1.000000 1.000000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 -1.000000 0.000000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 0.000000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 0.500000 -vert -1.000000 -1.000000 0.000000 -vert -0.500000 -1.000000 0.500000 -vert -0.500000 -1.000000 0.500000 -vert -1.000000 -1.000000 0.500000 -vert -1.000000 -1.000000 0.500000 -vert -0.500000 -1.000000 0.500000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 1.000000 -1.000000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 0.999999 1.000000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 0.999999 1.000000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 0.500000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 0.500000 -vert 1.000000 -1.000000 0.500000 -vert 1.000000 -0.000001 1.000000 -vert 1.000000 0.499999 1.000000 -vert 1.000000 0.499999 1.000000 -vert 0.500000 1.000000 1.000000 -vert 0.500000 1.000000 1.000000 -vert 0.500000 1.000000 1.000000 -vert 1.000000 0.499999 1.000000 -vert 0.500000 0.500000 1.000000 -vert 0.500000 0.500000 1.000000 -vert 1.000000 -0.000001 1.000000 -vert 0.500000 0.500000 1.000000 -vert 1.000000 -0.500001 1.000000 -vert 1.000000 -0.500001 1.000000 -vert 1.000000 -0.500001 1.000000 -vert 1.000000 -0.000001 1.000000 -vert -0.500000 1.000000 1.000000 -vert -0.500000 1.000000 1.000000 -vert -0.500000 1.000000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.000000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.000000 1.000000 -vert 0.499999 -1.000000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert 0.499999 -1.000000 1.000000 -vert 0.499999 -1.000000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 0.000000 1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 -0.000000 -1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 -0.000000 -1.000000 -vert -0.000000 -1.000000 -1.000000 -vert -0.500000 -1.000000 -1.000000 -vert -1.000000 -1.000000 -1.000000 -vert -0.500000 -1.000000 -1.000000 -vert -0.000000 -1.000000 -1.000000 -vert -0.500000 -1.000000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert -0.000000 -1.000000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert 1.000000 -0.500000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert 1.000000 -1.000000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert 1.000000 -0.500000 -1.000000 -vert 1.000000 -0.500000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert 1.000000 -0.000000 -1.000000 -vert 0.500000 1.000000 -1.000000 -vert 0.500000 1.000000 -1.000000 -vert 0.500000 1.000000 -1.000000 -vert -1.000000 0.000000 -1.000000 -vert -1.000000 0.500000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert -1.000000 0.500000 -1.000000 -vert -1.000000 0.000000 -1.000000 -vert -1.000000 0.500000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -1.000000 0.000000 -1.000000 -vert -0.500000 -0.500000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -1.000000 -1.000000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -0.500000 -0.500000 -1.000000 -vert -0.500000 -0.500000 -1.000000 - -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.666646 0.666646 0.333323 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 0.707083 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm -0.408246 0.816492 -0.408246 -norm 0.000000 1.000000 0.000000 -norm 0.000000 0.707083 -0.707083 -norm 0.707083 0.707083 0.000000 -norm 0.408246 0.408246 -0.816492 -norm 0.000000 1.000000 0.000000 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.666646 0.333323 0.666646 -norm 0.000000 0.707083 0.707083 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.577349 -0.577349 -0.577349 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 0.707083 -norm -0.707083 -0.707083 0.000000 -norm -0.577349 -0.577349 0.577349 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.816492 -0.408246 -0.408246 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -1.000000 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.333323 -0.666646 0.666646 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 0.707083 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 -0.707083 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm -0.666646 0.333323 0.666646 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.408246 0.816492 -0.408246 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.666646 0.333323 0.666646 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.408246 0.408246 -0.816492 -norm 0.707083 0.707083 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.666646 0.666646 0.333323 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.666646 0.666646 0.333323 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm -0.577349 -0.577349 -0.577349 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.816492 -0.408246 -0.408246 -norm 0.000000 -0.707083 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.577349 -0.577349 -0.577349 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 - -uv 0.437500 0.625000 -uv 0.375000 0.625000 -uv 0.437500 0.562500 -uv 0.500000 0.562500 -uv 0.500000 0.625000 -uv 0.500000 0.500000 -uv 0.437500 0.687500 -uv 0.375000 0.687500 -uv 0.375000 0.750000 -uv 0.312500 0.750000 -uv 0.250000 0.750000 -uv 0.312500 0.687500 -uv 0.437500 0.750000 -uv 0.500000 0.687500 -uv 0.500000 0.750000 -uv 0.375000 0.562500 -uv 0.375000 0.500000 -uv 0.437500 0.500000 -uv 0.312500 0.625000 -uv 0.312500 0.562500 -uv 0.250000 0.625000 -uv 0.249999 0.562500 -uv 0.249999 0.500000 -uv 0.312499 0.500000 -uv 0.250000 0.687500 -uv 0.187500 0.125000 -uv 0.125000 0.125000 -uv 0.187500 0.062500 -uv 0.250000 0.062500 -uv 0.250000 0.125000 -uv 0.250000 0.000000 -uv 0.187500 0.187500 -uv 0.125000 0.187500 -uv 0.125000 0.250000 -uv 0.062500 0.250000 -uv 0.062500 0.187500 -uv 0.187500 0.250000 -uv 0.249999 0.187500 -uv 0.249999 0.250000 -uv 0.125000 0.062500 -uv 0.125000 0.000000 -uv 0.187500 0.000000 -uv 0.062500 0.125000 -uv 0.062500 0.062500 -uv 0.062500 0.000000 -uv 0.437499 0.062500 -uv 0.374999 0.000000 -uv 0.437499 0.000000 -uv 0.499999 0.062500 -uv 0.499999 0.125000 -uv 0.499999 0.000000 -uv 0.437499 0.125000 -uv 0.374999 0.062500 -uv 0.374999 0.125000 -uv 0.312499 0.062500 -uv 0.312499 0.000000 -uv 0.437499 0.187500 -uv 0.499999 0.187500 -uv 0.499999 0.250000 -uv 0.374999 0.187500 -uv 0.437499 0.250000 -uv 0.374999 0.250000 -uv 0.312499 0.187500 -uv 0.312499 0.125000 -uv 0.312499 0.250000 -uv 0.687499 0.062500 -uv 0.624999 0.000000 -uv 0.687499 0.000000 -uv 0.687499 0.125000 -uv 0.624999 0.062500 -uv 0.624999 0.125000 -uv 0.562499 0.062500 -uv 0.562499 0.000000 -uv 0.687499 0.187500 -uv 0.624999 0.187500 -uv 0.687499 0.250000 -uv 0.624999 0.250000 -uv 0.562499 0.187500 -uv 0.562499 0.125000 -uv 0.562499 0.250000 -uv 0.437499 0.437500 -uv 0.374999 0.437500 -uv 0.437499 0.375000 -uv 0.374999 0.375000 -uv 0.437499 0.312500 -uv 0.312499 0.437500 -uv 0.312499 0.375000 -uv 0.312499 0.312500 -uv 0.374999 0.312500 -uv 0.437500 0.875000 -uv 0.375000 0.875000 -uv 0.437500 0.812500 -uv 0.437500 0.937500 -uv 0.375000 0.937500 -uv 0.312500 0.937500 -uv 0.375000 0.812500 -uv 0.312500 0.875000 -uv 0.312500 0.812500 -uv 0.437500 0.625000 -uv 0.437500 0.625000 -uv 0.437500 0.625000 -uv 0.437500 0.687500 -uv 0.437500 0.687500 -uv 0.437500 0.687500 -uv 0.437500 0.562500 -uv 0.437500 0.562500 -uv 0.437500 0.562500 -uv 0.000000 0.250000 -uv -0.000000 0.125000 -uv 0.000000 0.062500 -uv 0.000000 0.000000 -uv 0.062500 0.062500 -uv 0.000000 0.062500 -uv -0.000000 0.125000 -uv 0.000000 0.062500 -uv 0.062500 0.062500 -uv 0.062500 0.062500 -uv -0.000000 0.187500 -uv -0.000000 0.125000 -uv 0.062500 0.187500 -uv -0.000000 0.187500 -uv 0.000000 0.250000 -uv -0.000000 0.187500 -uv 0.062500 0.187500 -uv 0.062500 0.187500 -uv 0.249999 0.125000 -uv 0.249999 0.062500 -uv 0.249999 0.062500 -uv 0.249999 0.125000 -uv 0.249999 0.062500 -uv 0.249999 0.187500 -uv 0.249999 0.125000 -uv 0.312499 0.187500 -uv 0.312499 0.187500 -uv 0.249999 0.187500 -uv 0.249999 0.187500 -uv 0.312499 0.187500 -uv 0.749999 0.062500 -uv 0.749999 0.125000 -uv 0.749999 0.062500 -uv 0.749999 0.000000 -uv 0.749999 0.062500 -uv 0.687499 0.062500 -uv 0.749999 0.125000 -uv 0.687499 0.062500 -uv 0.687499 0.062500 -uv 0.749999 0.187500 -uv 0.749999 0.250000 -uv 0.749999 0.187500 -uv 0.749999 0.187500 -uv 0.749999 0.125000 -uv 0.749999 0.250000 -uv 0.499999 0.125000 -uv 0.499999 0.062500 -uv 0.499999 0.062500 -uv 0.499999 0.125000 -uv 0.499999 0.062500 -uv 0.499999 0.187500 -uv 0.499999 0.125000 -uv 0.499999 0.187500 -uv 0.499999 0.187500 -uv 0.499999 0.375000 -uv 0.500000 0.437500 -uv 0.500000 0.437500 -uv 0.437500 0.500000 -uv 0.437500 0.500000 -uv 0.437500 0.500000 -uv 0.500000 0.437500 -uv 0.437500 0.437500 -uv 0.437500 0.437500 -uv 0.499999 0.375000 -uv 0.437500 0.437500 -uv 0.499999 0.312500 -uv 0.499999 0.312500 -uv 0.499999 0.312500 -uv 0.499999 0.375000 -uv 0.312499 0.500000 -uv 0.312499 0.500000 -uv 0.312499 0.500000 -uv 0.249999 0.437500 -uv 0.249999 0.375000 -uv 0.249999 0.437500 -uv 0.249999 0.437500 -uv 0.249999 0.375000 -uv 0.437499 0.250000 -uv 0.374999 0.312500 -uv 0.437499 0.250000 -uv 0.437499 0.250000 -uv 0.374999 0.312500 -uv 0.374999 0.312500 -uv 0.249999 0.312500 -uv 0.249999 0.312500 -uv 0.249999 0.312500 -uv 0.249999 0.375000 -uv 0.500000 0.812500 -uv 0.500000 0.875000 -uv 0.500000 0.812500 -uv 0.500000 0.812500 -uv 0.500000 0.875000 -uv 0.375000 1.000000 -uv 0.312500 1.000000 -uv 0.250000 1.000000 -uv 0.312500 1.000000 -uv 0.375000 1.000000 -uv 0.312500 1.000000 -uv 0.437500 1.000000 -uv 0.375000 1.000000 -uv 0.437500 0.937500 -uv 0.437500 0.937500 -uv 0.500000 0.937500 -uv 0.437500 1.000000 -uv 0.500000 1.000000 -uv 0.437500 1.000000 -uv 0.500000 0.937500 -uv 0.500000 0.937500 -uv 0.437500 0.937500 -uv 0.500000 0.875000 -uv 0.437500 0.750000 -uv 0.437500 0.750000 -uv 0.437500 0.750000 -uv 0.250000 0.875000 -uv 0.250000 0.812500 -uv 0.312500 0.812500 -uv 0.250000 0.812500 -uv 0.250000 0.875000 -uv 0.250000 0.812500 -uv 0.312500 0.812500 -uv 0.312500 0.812500 -uv 0.250000 0.937500 -uv 0.250000 0.875000 -uv 0.312500 0.937500 -uv 0.250000 0.937500 -uv 0.250000 1.000000 -uv 0.250000 0.937500 -uv 0.312500 0.937500 -uv 0.312500 0.937500 -vertexGroup Group -vertexIndexCount 192 -face 0 1 2 -face 2 3 0 -face 4 0 3 -face 3 2 5 -face 98 4 6 -face 6 7 99 -face 1 100 7 -face 7 6 8 -face 9 10 11 -face 11 7 9 -face 8 9 7 -face 7 11 1 -face 12 8 101 -face 102 13 12 -face 14 12 13 -face 13 103 4 -face 15 16 17 -face 17 104 15 -face 1 15 105 -face 106 17 5 -face 15 1 18 -face 18 19 15 -face 16 15 19 -face 19 18 20 -face 21 22 23 -face 23 19 21 -face 20 21 19 -face 19 23 16 -face 24 20 18 -face 18 11 24 -face 10 24 11 -face 11 18 1 -face 25 26 27 -face 27 28 25 -face 29 25 28 -face 28 27 30 -face 25 29 31 -face 31 32 25 -face 26 25 32 -face 32 31 33 -face 34 107 35 -face 35 32 34 -face 33 34 32 -face 32 35 26 -face 36 33 31 -face 31 37 36 -face 38 36 37 -face 37 31 29 -face 39 40 41 -face 41 27 39 -face 26 39 27 -face 27 41 30 -face 39 26 42 -face 42 43 39 -face 40 39 43 -face 43 42 108 -face 109 110 44 -face 44 111 112 -face 113 114 115 -face 116 44 40 -face 117 118 42 -face 42 119 120 -face 121 122 123 -face 124 42 26 -face 45 46 47 -face 47 48 45 -face 49 45 48 -face 48 47 50 -face 45 49 51 -face 51 52 45 -face 46 45 52 -face 52 51 53 -face 54 30 55 -face 55 52 54 -face 53 54 52 -face 52 55 46 -face 56 53 51 -face 51 57 56 -face 58 56 57 -face 57 51 49 -face 59 53 56 -face 56 60 59 -face 61 59 60 -face 60 56 58 -face 59 61 62 -face 62 63 59 -face 53 59 63 -face 63 62 125 -face 126 30 54 -face 54 63 127 -face 128 129 63 -face 63 54 53 -face 130 131 132 -face 133 64 134 -face 38 135 64 -face 64 136 61 -face 65 66 67 -face 67 137 65 -face 138 65 139 -face 67 140 141 -face 142 143 68 -face 68 69 144 -face 66 145 69 -face 69 68 70 -face 71 50 72 -face 72 69 71 -face 70 71 69 -face 69 72 66 -face 73 70 68 -face 68 146 73 -face 147 73 148 -face 149 68 150 -face 74 70 73 -face 73 75 74 -face 76 74 75 -face 75 73 151 -face 74 76 77 -face 77 78 74 -face 70 74 78 -face 78 77 152 -face 153 50 71 -face 71 78 154 -face 155 156 78 -face 78 71 70 -face 157 158 77 -face 77 79 159 -face 58 160 79 -face 79 77 76 -face 80 161 162 -face 163 164 80 -face 16 80 165 -face 166 167 5 -face 168 16 81 -face 81 82 169 -face 170 171 82 -face 82 81 83 -face 84 58 172 -face 173 82 84 -face 83 84 82 -face 82 174 175 -face 85 83 81 -face 81 176 85 -face 22 85 177 -face 178 81 16 -face 86 83 85 -face 85 179 86 -face 180 86 181 -face 182 85 22 -face 86 183 87 -face 87 88 86 -face 83 86 88 -face 88 87 61 -face 184 58 84 -face 84 185 186 -face 61 187 188 -face 189 84 83 -face 64 61 87 -face 87 190 64 -face 38 64 191 -face 192 87 193 -face 89 90 91 -face 91 194 89 -face 195 89 196 -face 91 14 197 -face 89 198 92 -face 92 93 89 -face 90 89 93 -face 93 92 199 -face 200 201 94 -face 94 93 202 -face 203 204 93 -face 93 94 90 -face 205 206 207 -face 208 209 210 -face 211 212 213 -face 214 215 216 -face 95 8 217 -face 218 91 95 -face 90 95 91 -face 219 14 91 -face 95 90 96 -face 96 97 95 -face 8 95 97 -face 97 96 220 -face 221 10 9 -face 9 222 223 -face 224 225 226 -face 227 9 8 -face 228 229 96 -face 96 230 231 -face 232 233 234 -face 235 96 90 -material Material.002 -end -texture -end +type Mesh +name Plane +vertexCount 236 +vert 0.500000 1.000000 0.000000 +vert 0.000000 1.000000 0.000000 +vert 0.500000 1.000000 0.500000 +vert 1.000000 1.000000 0.500000 +vert 1.000000 1.000000 0.000000 +vert 1.000000 0.999999 1.000000 +vert 0.500000 1.000000 -0.500000 +vert 0.000000 1.000000 -0.500000 +vert 0.000000 1.000000 -1.000000 +vert -0.500000 1.000000 -1.000000 +vert -1.000000 1.000000 -1.000000 +vert -0.500000 1.000000 -0.500000 +vert 0.500000 1.000000 -1.000000 +vert 1.000000 1.000000 -0.500000 +vert 1.000000 1.000000 -1.000000 +vert 0.000000 1.000000 0.500000 +vert 0.000000 1.000000 1.000000 +vert 0.500000 1.000000 1.000000 +vert -0.500000 1.000000 0.000000 +vert -0.500000 1.000000 0.500000 +vert -1.000000 1.000000 0.000000 +vert -1.000000 1.000000 0.500000 +vert -1.000000 1.000000 1.000000 +vert -0.500000 1.000000 1.000000 +vert -1.000000 1.000000 -0.500000 +vert -1.000000 -0.500000 0.000000 +vert -1.000000 0.000000 0.000000 +vert -1.000000 -0.500000 -0.500000 +vert -1.000000 -1.000000 -0.500000 +vert -1.000000 -1.000000 0.000000 +vert -1.000000 -1.000000 -1.000000 +vert -1.000000 -0.500000 0.500000 +vert -1.000000 0.000000 0.500000 +vert -1.000000 0.000000 1.000000 +vert -1.000000 0.500000 1.000000 +vert -1.000000 0.500000 0.500000 +vert -1.000000 -0.500000 1.000000 +vert -1.000000 -1.000000 0.500000 +vert -1.000000 -1.000000 1.000000 +vert -1.000000 0.000000 -0.500000 +vert -1.000000 0.000000 -1.000000 +vert -1.000000 -0.500000 -1.000000 +vert -1.000000 0.500000 0.000000 +vert -1.000000 0.500000 -0.500000 +vert -1.000000 0.500000 -1.000000 +vert 0.500000 -1.000000 -0.500000 +vert -0.000000 -1.000000 -1.000000 +vert 0.500000 -1.000000 -1.000000 +vert 1.000000 -1.000000 -0.500000 +vert 1.000000 -1.000000 0.000000 +vert 1.000000 -1.000000 -1.000000 +vert 0.500000 -1.000000 0.000000 +vert -0.000000 -1.000000 -0.500000 +vert -0.000000 -1.000000 0.000000 +vert -0.500000 -1.000000 -0.500000 +vert -0.500000 -1.000000 -1.000000 +vert 0.499999 -1.000000 0.500000 +vert 1.000000 -1.000000 0.500000 +vert 0.999999 -1.000001 1.000000 +vert -0.000000 -1.000000 0.500000 +vert 0.499999 -1.000000 1.000000 +vert -0.000001 -1.000000 1.000000 +vert -0.500000 -1.000000 0.500000 +vert -0.500000 -1.000000 0.000000 +vert -0.500000 -1.000000 1.000000 +vert 1.000000 0.500000 -0.500000 +vert 1.000000 -0.000000 -1.000000 +vert 1.000000 0.500000 -1.000000 +vert 1.000000 0.500000 0.000000 +vert 1.000000 -0.000000 -0.500000 +vert 1.000000 -0.000000 0.000000 +vert 1.000000 -0.500000 -0.500000 +vert 1.000000 -0.500000 -1.000000 +vert 1.000000 0.500000 0.500000 +vert 1.000000 -0.000000 0.500000 +vert 1.000000 0.499999 1.000000 +vert 1.000000 -0.000001 1.000000 +vert 1.000000 -0.500000 0.500000 +vert 1.000000 -0.500000 0.000000 +vert 1.000000 -0.500001 1.000000 +vert 0.500000 0.500000 1.000000 +vert -0.000000 0.500000 1.000000 +vert 0.500000 -0.000000 1.000000 +vert -0.000000 -0.000000 1.000000 +vert 0.500000 -0.500000 1.000000 +vert -0.500000 0.500000 1.000000 +vert -0.500000 -0.000000 1.000000 +vert -0.500000 -0.500000 1.000000 +vert -0.000000 -0.500000 1.000000 +vert 0.500000 0.000000 -1.000000 +vert -0.000000 0.000000 -1.000000 +vert 0.500000 0.500000 -1.000000 +vert 0.500000 -0.500000 -1.000000 +vert -0.000000 -0.500000 -1.000000 +vert -0.500000 -0.500000 -1.000000 +vert 0.000000 0.500000 -1.000000 +vert -0.500000 0.000000 -1.000000 +vert -0.500000 0.500000 -1.000000 +vert 0.500000 1.000000 0.000000 +vert 0.500000 1.000000 0.000000 +vert 0.500000 1.000000 0.000000 +vert 0.500000 1.000000 -0.500000 +vert 0.500000 1.000000 -0.500000 +vert 0.500000 1.000000 -0.500000 +vert 0.500000 1.000000 0.500000 +vert 0.500000 1.000000 0.500000 +vert 0.500000 1.000000 0.500000 +vert -1.000000 1.000000 1.000000 +vert -1.000000 1.000000 0.000000 +vert -1.000000 1.000000 -0.500000 +vert -1.000000 1.000000 -1.000000 +vert -1.000000 0.500000 -0.500000 +vert -1.000000 1.000000 -0.500000 +vert -1.000000 1.000000 0.000000 +vert -1.000000 1.000000 -0.500000 +vert -1.000000 0.500000 -0.500000 +vert -1.000000 0.500000 -0.500000 +vert -1.000000 1.000000 0.500000 +vert -1.000000 1.000000 0.000000 +vert -1.000000 0.500000 0.500000 +vert -1.000000 1.000000 0.500000 +vert -1.000000 1.000000 1.000000 +vert -1.000000 1.000000 0.500000 +vert -1.000000 0.500000 0.500000 +vert -1.000000 0.500000 0.500000 +vert -1.000000 -1.000000 0.000000 +vert -1.000000 -1.000000 -0.500000 +vert -1.000000 -1.000000 -0.500000 +vert -1.000000 -1.000000 0.000000 +vert -1.000000 -1.000000 -0.500000 +vert -1.000000 -1.000000 0.500000 +vert -1.000000 -1.000000 0.000000 +vert -0.500000 -1.000000 0.500000 +vert -0.500000 -1.000000 0.500000 +vert -1.000000 -1.000000 0.500000 +vert -1.000000 -1.000000 0.500000 +vert -0.500000 -1.000000 0.500000 +vert 1.000000 1.000000 -0.500000 +vert 1.000000 1.000000 0.000000 +vert 1.000000 1.000000 -0.500000 +vert 1.000000 1.000000 -1.000000 +vert 1.000000 1.000000 -0.500000 +vert 1.000000 0.500000 -0.500000 +vert 1.000000 1.000000 0.000000 +vert 1.000000 0.500000 -0.500000 +vert 1.000000 0.500000 -0.500000 +vert 1.000000 1.000000 0.500000 +vert 1.000000 0.999999 1.000000 +vert 1.000000 1.000000 0.500000 +vert 1.000000 1.000000 0.500000 +vert 1.000000 1.000000 0.000000 +vert 1.000000 0.999999 1.000000 +vert 1.000000 -1.000000 0.000000 +vert 1.000000 -1.000000 -0.500000 +vert 1.000000 -1.000000 -0.500000 +vert 1.000000 -1.000000 0.000000 +vert 1.000000 -1.000000 -0.500000 +vert 1.000000 -1.000000 0.500000 +vert 1.000000 -1.000000 0.000000 +vert 1.000000 -1.000000 0.500000 +vert 1.000000 -1.000000 0.500000 +vert 1.000000 -0.000001 1.000000 +vert 1.000000 0.499999 1.000000 +vert 1.000000 0.499999 1.000000 +vert 0.500000 1.000000 1.000000 +vert 0.500000 1.000000 1.000000 +vert 0.500000 1.000000 1.000000 +vert 1.000000 0.499999 1.000000 +vert 0.500000 0.500000 1.000000 +vert 0.500000 0.500000 1.000000 +vert 1.000000 -0.000001 1.000000 +vert 0.500000 0.500000 1.000000 +vert 1.000000 -0.500001 1.000000 +vert 1.000000 -0.500001 1.000000 +vert 1.000000 -0.500001 1.000000 +vert 1.000000 -0.000001 1.000000 +vert -0.500000 1.000000 1.000000 +vert -0.500000 1.000000 1.000000 +vert -0.500000 1.000000 1.000000 +vert -1.000000 0.500000 1.000000 +vert -1.000000 0.000000 1.000000 +vert -1.000000 0.500000 1.000000 +vert -1.000000 0.500000 1.000000 +vert -1.000000 0.000000 1.000000 +vert 0.499999 -1.000000 1.000000 +vert -0.000000 -0.500000 1.000000 +vert 0.499999 -1.000000 1.000000 +vert 0.499999 -1.000000 1.000000 +vert -0.000000 -0.500000 1.000000 +vert -0.000000 -0.500000 1.000000 +vert -1.000000 -0.500000 1.000000 +vert -1.000000 -0.500000 1.000000 +vert -1.000000 -0.500000 1.000000 +vert -1.000000 0.000000 1.000000 +vert 1.000000 0.500000 -1.000000 +vert 1.000000 -0.000000 -1.000000 +vert 1.000000 0.500000 -1.000000 +vert 1.000000 0.500000 -1.000000 +vert 1.000000 -0.000000 -1.000000 +vert -0.000000 -1.000000 -1.000000 +vert -0.500000 -1.000000 -1.000000 +vert -1.000000 -1.000000 -1.000000 +vert -0.500000 -1.000000 -1.000000 +vert -0.000000 -1.000000 -1.000000 +vert -0.500000 -1.000000 -1.000000 +vert 0.500000 -1.000000 -1.000000 +vert -0.000000 -1.000000 -1.000000 +vert 0.500000 -0.500000 -1.000000 +vert 0.500000 -0.500000 -1.000000 +vert 1.000000 -0.500000 -1.000000 +vert 0.500000 -1.000000 -1.000000 +vert 1.000000 -1.000000 -1.000000 +vert 0.500000 -1.000000 -1.000000 +vert 1.000000 -0.500000 -1.000000 +vert 1.000000 -0.500000 -1.000000 +vert 0.500000 -0.500000 -1.000000 +vert 1.000000 -0.000000 -1.000000 +vert 0.500000 1.000000 -1.000000 +vert 0.500000 1.000000 -1.000000 +vert 0.500000 1.000000 -1.000000 +vert -1.000000 0.000000 -1.000000 +vert -1.000000 0.500000 -1.000000 +vert -0.500000 0.500000 -1.000000 +vert -1.000000 0.500000 -1.000000 +vert -1.000000 0.000000 -1.000000 +vert -1.000000 0.500000 -1.000000 +vert -0.500000 0.500000 -1.000000 +vert -0.500000 0.500000 -1.000000 +vert -1.000000 -0.500000 -1.000000 +vert -1.000000 0.000000 -1.000000 +vert -0.500000 -0.500000 -1.000000 +vert -1.000000 -0.500000 -1.000000 +vert -1.000000 -1.000000 -1.000000 +vert -1.000000 -0.500000 -1.000000 +vert -0.500000 -0.500000 -1.000000 +vert -0.500000 -0.500000 -1.000000 + +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.666646 0.666646 0.333323 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 0.707083 -0.707083 +norm 0.000000 0.707083 -0.707083 +norm -0.408246 0.816492 -0.408246 +norm 0.000000 1.000000 0.000000 +norm 0.000000 0.707083 -0.707083 +norm 0.707083 0.707083 0.000000 +norm 0.408246 0.408246 -0.816492 +norm 0.000000 1.000000 0.000000 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.666646 0.333323 0.666646 +norm 0.000000 0.707083 0.707083 +norm -0.707083 0.707083 0.000000 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.577349 -0.577349 -0.577349 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.000000 0.707083 +norm -0.707083 -0.707083 0.000000 +norm -0.577349 -0.577349 0.577349 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.816492 -0.408246 -0.408246 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -1.000000 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.333323 -0.666646 0.666646 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -0.707083 0.707083 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.000000 -0.707083 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm -0.666646 0.333323 0.666646 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.408246 0.816492 -0.408246 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.666646 0.333323 0.666646 +norm -0.707083 0.707083 0.000000 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.408246 0.408246 -0.816492 +norm 0.707083 0.707083 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.707083 0.000000 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.666646 0.666646 0.333323 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.666646 0.666646 0.333323 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm -0.577349 -0.577349 -0.577349 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.707083 0.000000 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.816492 -0.408246 -0.408246 +norm 0.000000 -0.707083 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm 0.707083 0.000000 -0.707083 +norm 0.000000 0.707083 -0.707083 +norm 0.000000 0.707083 -0.707083 +norm 0.000000 0.707083 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm -0.707083 0.000000 -0.707083 +norm -0.577349 -0.577349 -0.577349 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 + +uv 0.437500 0.625000 +uv 0.375000 0.625000 +uv 0.437500 0.562500 +uv 0.500000 0.562500 +uv 0.500000 0.625000 +uv 0.500000 0.500000 +uv 0.437500 0.687500 +uv 0.375000 0.687500 +uv 0.375000 0.750000 +uv 0.312500 0.750000 +uv 0.250000 0.750000 +uv 0.312500 0.687500 +uv 0.437500 0.750000 +uv 0.500000 0.687500 +uv 0.500000 0.750000 +uv 0.375000 0.562500 +uv 0.375000 0.500000 +uv 0.437500 0.500000 +uv 0.312500 0.625000 +uv 0.312500 0.562500 +uv 0.250000 0.625000 +uv 0.249999 0.562500 +uv 0.249999 0.500000 +uv 0.312499 0.500000 +uv 0.250000 0.687500 +uv 0.187500 0.125000 +uv 0.125000 0.125000 +uv 0.187500 0.062500 +uv 0.250000 0.062500 +uv 0.250000 0.125000 +uv 0.250000 0.000000 +uv 0.187500 0.187500 +uv 0.125000 0.187500 +uv 0.125000 0.250000 +uv 0.062500 0.250000 +uv 0.062500 0.187500 +uv 0.187500 0.250000 +uv 0.249999 0.187500 +uv 0.249999 0.250000 +uv 0.125000 0.062500 +uv 0.125000 0.000000 +uv 0.187500 0.000000 +uv 0.062500 0.125000 +uv 0.062500 0.062500 +uv 0.062500 0.000000 +uv 0.437499 0.062500 +uv 0.374999 0.000000 +uv 0.437499 0.000000 +uv 0.499999 0.062500 +uv 0.499999 0.125000 +uv 0.499999 0.000000 +uv 0.437499 0.125000 +uv 0.374999 0.062500 +uv 0.374999 0.125000 +uv 0.312499 0.062500 +uv 0.312499 0.000000 +uv 0.437499 0.187500 +uv 0.499999 0.187500 +uv 0.499999 0.250000 +uv 0.374999 0.187500 +uv 0.437499 0.250000 +uv 0.374999 0.250000 +uv 0.312499 0.187500 +uv 0.312499 0.125000 +uv 0.312499 0.250000 +uv 0.687499 0.062500 +uv 0.624999 0.000000 +uv 0.687499 0.000000 +uv 0.687499 0.125000 +uv 0.624999 0.062500 +uv 0.624999 0.125000 +uv 0.562499 0.062500 +uv 0.562499 0.000000 +uv 0.687499 0.187500 +uv 0.624999 0.187500 +uv 0.687499 0.250000 +uv 0.624999 0.250000 +uv 0.562499 0.187500 +uv 0.562499 0.125000 +uv 0.562499 0.250000 +uv 0.437499 0.437500 +uv 0.374999 0.437500 +uv 0.437499 0.375000 +uv 0.374999 0.375000 +uv 0.437499 0.312500 +uv 0.312499 0.437500 +uv 0.312499 0.375000 +uv 0.312499 0.312500 +uv 0.374999 0.312500 +uv 0.437500 0.875000 +uv 0.375000 0.875000 +uv 0.437500 0.812500 +uv 0.437500 0.937500 +uv 0.375000 0.937500 +uv 0.312500 0.937500 +uv 0.375000 0.812500 +uv 0.312500 0.875000 +uv 0.312500 0.812500 +uv 0.437500 0.625000 +uv 0.437500 0.625000 +uv 0.437500 0.625000 +uv 0.437500 0.687500 +uv 0.437500 0.687500 +uv 0.437500 0.687500 +uv 0.437500 0.562500 +uv 0.437500 0.562500 +uv 0.437500 0.562500 +uv 0.000000 0.250000 +uv -0.000000 0.125000 +uv 0.000000 0.062500 +uv 0.000000 0.000000 +uv 0.062500 0.062500 +uv 0.000000 0.062500 +uv -0.000000 0.125000 +uv 0.000000 0.062500 +uv 0.062500 0.062500 +uv 0.062500 0.062500 +uv -0.000000 0.187500 +uv -0.000000 0.125000 +uv 0.062500 0.187500 +uv -0.000000 0.187500 +uv 0.000000 0.250000 +uv -0.000000 0.187500 +uv 0.062500 0.187500 +uv 0.062500 0.187500 +uv 0.249999 0.125000 +uv 0.249999 0.062500 +uv 0.249999 0.062500 +uv 0.249999 0.125000 +uv 0.249999 0.062500 +uv 0.249999 0.187500 +uv 0.249999 0.125000 +uv 0.312499 0.187500 +uv 0.312499 0.187500 +uv 0.249999 0.187500 +uv 0.249999 0.187500 +uv 0.312499 0.187500 +uv 0.749999 0.062500 +uv 0.749999 0.125000 +uv 0.749999 0.062500 +uv 0.749999 0.000000 +uv 0.749999 0.062500 +uv 0.687499 0.062500 +uv 0.749999 0.125000 +uv 0.687499 0.062500 +uv 0.687499 0.062500 +uv 0.749999 0.187500 +uv 0.749999 0.250000 +uv 0.749999 0.187500 +uv 0.749999 0.187500 +uv 0.749999 0.125000 +uv 0.749999 0.250000 +uv 0.499999 0.125000 +uv 0.499999 0.062500 +uv 0.499999 0.062500 +uv 0.499999 0.125000 +uv 0.499999 0.062500 +uv 0.499999 0.187500 +uv 0.499999 0.125000 +uv 0.499999 0.187500 +uv 0.499999 0.187500 +uv 0.499999 0.375000 +uv 0.500000 0.437500 +uv 0.500000 0.437500 +uv 0.437500 0.500000 +uv 0.437500 0.500000 +uv 0.437500 0.500000 +uv 0.500000 0.437500 +uv 0.437500 0.437500 +uv 0.437500 0.437500 +uv 0.499999 0.375000 +uv 0.437500 0.437500 +uv 0.499999 0.312500 +uv 0.499999 0.312500 +uv 0.499999 0.312500 +uv 0.499999 0.375000 +uv 0.312499 0.500000 +uv 0.312499 0.500000 +uv 0.312499 0.500000 +uv 0.249999 0.437500 +uv 0.249999 0.375000 +uv 0.249999 0.437500 +uv 0.249999 0.437500 +uv 0.249999 0.375000 +uv 0.437499 0.250000 +uv 0.374999 0.312500 +uv 0.437499 0.250000 +uv 0.437499 0.250000 +uv 0.374999 0.312500 +uv 0.374999 0.312500 +uv 0.249999 0.312500 +uv 0.249999 0.312500 +uv 0.249999 0.312500 +uv 0.249999 0.375000 +uv 0.500000 0.812500 +uv 0.500000 0.875000 +uv 0.500000 0.812500 +uv 0.500000 0.812500 +uv 0.500000 0.875000 +uv 0.375000 1.000000 +uv 0.312500 1.000000 +uv 0.250000 1.000000 +uv 0.312500 1.000000 +uv 0.375000 1.000000 +uv 0.312500 1.000000 +uv 0.437500 1.000000 +uv 0.375000 1.000000 +uv 0.437500 0.937500 +uv 0.437500 0.937500 +uv 0.500000 0.937500 +uv 0.437500 1.000000 +uv 0.500000 1.000000 +uv 0.437500 1.000000 +uv 0.500000 0.937500 +uv 0.500000 0.937500 +uv 0.437500 0.937500 +uv 0.500000 0.875000 +uv 0.437500 0.750000 +uv 0.437500 0.750000 +uv 0.437500 0.750000 +uv 0.250000 0.875000 +uv 0.250000 0.812500 +uv 0.312500 0.812500 +uv 0.250000 0.812500 +uv 0.250000 0.875000 +uv 0.250000 0.812500 +uv 0.312500 0.812500 +uv 0.312500 0.812500 +uv 0.250000 0.937500 +uv 0.250000 0.875000 +uv 0.312500 0.937500 +uv 0.250000 0.937500 +uv 0.250000 1.000000 +uv 0.250000 0.937500 +uv 0.312500 0.937500 +uv 0.312500 0.937500 +vertexGroup Group +vertexIndexCount 192 +face 0 1 2 +face 2 3 0 +face 4 0 3 +face 3 2 5 +face 98 4 6 +face 6 7 99 +face 1 100 7 +face 7 6 8 +face 9 10 11 +face 11 7 9 +face 8 9 7 +face 7 11 1 +face 12 8 101 +face 102 13 12 +face 14 12 13 +face 13 103 4 +face 15 16 17 +face 17 104 15 +face 1 15 105 +face 106 17 5 +face 15 1 18 +face 18 19 15 +face 16 15 19 +face 19 18 20 +face 21 22 23 +face 23 19 21 +face 20 21 19 +face 19 23 16 +face 24 20 18 +face 18 11 24 +face 10 24 11 +face 11 18 1 +face 25 26 27 +face 27 28 25 +face 29 25 28 +face 28 27 30 +face 25 29 31 +face 31 32 25 +face 26 25 32 +face 32 31 33 +face 34 107 35 +face 35 32 34 +face 33 34 32 +face 32 35 26 +face 36 33 31 +face 31 37 36 +face 38 36 37 +face 37 31 29 +face 39 40 41 +face 41 27 39 +face 26 39 27 +face 27 41 30 +face 39 26 42 +face 42 43 39 +face 40 39 43 +face 43 42 108 +face 109 110 44 +face 44 111 112 +face 113 114 115 +face 116 44 40 +face 117 118 42 +face 42 119 120 +face 121 122 123 +face 124 42 26 +face 45 46 47 +face 47 48 45 +face 49 45 48 +face 48 47 50 +face 45 49 51 +face 51 52 45 +face 46 45 52 +face 52 51 53 +face 54 30 55 +face 55 52 54 +face 53 54 52 +face 52 55 46 +face 56 53 51 +face 51 57 56 +face 58 56 57 +face 57 51 49 +face 59 53 56 +face 56 60 59 +face 61 59 60 +face 60 56 58 +face 59 61 62 +face 62 63 59 +face 53 59 63 +face 63 62 125 +face 126 30 54 +face 54 63 127 +face 128 129 63 +face 63 54 53 +face 130 131 132 +face 133 64 134 +face 38 135 64 +face 64 136 61 +face 65 66 67 +face 67 137 65 +face 138 65 139 +face 67 140 141 +face 142 143 68 +face 68 69 144 +face 66 145 69 +face 69 68 70 +face 71 50 72 +face 72 69 71 +face 70 71 69 +face 69 72 66 +face 73 70 68 +face 68 146 73 +face 147 73 148 +face 149 68 150 +face 74 70 73 +face 73 75 74 +face 76 74 75 +face 75 73 151 +face 74 76 77 +face 77 78 74 +face 70 74 78 +face 78 77 152 +face 153 50 71 +face 71 78 154 +face 155 156 78 +face 78 71 70 +face 157 158 77 +face 77 79 159 +face 58 160 79 +face 79 77 76 +face 80 161 162 +face 163 164 80 +face 16 80 165 +face 166 167 5 +face 168 16 81 +face 81 82 169 +face 170 171 82 +face 82 81 83 +face 84 58 172 +face 173 82 84 +face 83 84 82 +face 82 174 175 +face 85 83 81 +face 81 176 85 +face 22 85 177 +face 178 81 16 +face 86 83 85 +face 85 179 86 +face 180 86 181 +face 182 85 22 +face 86 183 87 +face 87 88 86 +face 83 86 88 +face 88 87 61 +face 184 58 84 +face 84 185 186 +face 61 187 188 +face 189 84 83 +face 64 61 87 +face 87 190 64 +face 38 64 191 +face 192 87 193 +face 89 90 91 +face 91 194 89 +face 195 89 196 +face 91 14 197 +face 89 198 92 +face 92 93 89 +face 90 89 93 +face 93 92 199 +face 200 201 94 +face 94 93 202 +face 203 204 93 +face 93 94 90 +face 205 206 207 +face 208 209 210 +face 211 212 213 +face 214 215 216 +face 95 8 217 +face 218 91 95 +face 90 95 91 +face 219 14 91 +face 95 90 96 +face 96 97 95 +face 8 95 97 +face 97 96 220 +face 221 10 9 +face 9 222 223 +face 224 225 226 +face 227 9 8 +face 228 229 96 +face 96 230 231 +face 232 233 234 +face 235 96 90 +material Material.002 +end +texture +end diff --git a/iPhone/Classes/EAGLView.h b/iPhone/Classes/EAGLView.h index f99501b..8681317 100644 --- a/iPhone/Classes/EAGLView.h +++ b/iPhone/Classes/EAGLView.h @@ -1,40 +1,40 @@ -// -// EAGLView.h -// sample -// -// Created by alexey on 1/4/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -#import -#import - -#import "ESRenderer.h" - -// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. -// The view content is basically an EAGL surface you render your OpenGL scene into. -// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel. -@interface EAGLView : UIView -{ -@private - id renderer; - - BOOL animating; - BOOL displayLinkSupported; - NSInteger animationFrameInterval; - // Use of the CADisplayLink class is the preferred method for controlling your animation timing. - // CADisplayLink will link to the main display and fire every vsync when added to a given run-loop. - // The NSTimer class is used only as fallback when running on a pre 3.1 device where CADisplayLink - // isn't available. - id displayLink; - NSTimer *animationTimer; -} - -@property (readonly, nonatomic, getter=isAnimating) BOOL animating; -@property (nonatomic) NSInteger animationFrameInterval; - -- (void) startAnimation; -- (void) stopAnimation; -- (void) drawView:(id)sender; - -@end +// +// EAGLView.h +// sample +// +// Created by alexey on 1/4/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import +#import + +#import "ESRenderer.h" + +// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. +// The view content is basically an EAGL surface you render your OpenGL scene into. +// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel. +@interface EAGLView : UIView +{ +@private + id renderer; + + BOOL animating; + BOOL displayLinkSupported; + NSInteger animationFrameInterval; + // Use of the CADisplayLink class is the preferred method for controlling your animation timing. + // CADisplayLink will link to the main display and fire every vsync when added to a given run-loop. + // The NSTimer class is used only as fallback when running on a pre 3.1 device where CADisplayLink + // isn't available. + id displayLink; + NSTimer *animationTimer; +} + +@property (readonly, nonatomic, getter=isAnimating) BOOL animating; +@property (nonatomic) NSInteger animationFrameInterval; + +- (void) startAnimation; +- (void) stopAnimation; +- (void) drawView:(id)sender; + +@end diff --git a/iPhone/Classes/EAGLView.m b/iPhone/Classes/EAGLView.m index 74520a4..d35a0a5 100644 --- a/iPhone/Classes/EAGLView.m +++ b/iPhone/Classes/EAGLView.m @@ -1,150 +1,150 @@ -// -// EAGLView.m -// sample -// -// Created by alexey on 1/4/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -#import "EAGLView.h" - -#import "ES1Renderer.h" -#import "ES2Renderer.h" - -@implementation EAGLView - -@synthesize animating; -@dynamic animationFrameInterval; - -// You must implement this method -+ (Class) layerClass -{ - return [CAEAGLLayer class]; -} - -//The GL view is stored in the nib file. When it's unarchived it's sent -initWithCoder: -- (id) initWithCoder:(NSCoder*)coder -{ - if ((self = [super initWithCoder:coder])) - { - // Get the layer - CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer; - - eaglLayer.opaque = TRUE; - eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil]; - - //renderer = [[ES2Renderer alloc] init]; - - if (!renderer) - { - renderer = [[ES1Renderer alloc] init]; - - if (!renderer) - { - [self release]; - return nil; - } - } - - animating = FALSE; - displayLinkSupported = FALSE; - animationFrameInterval = 1; - displayLink = nil; - animationTimer = nil; - - // A system version of 3.1 or greater is required to use CADisplayLink. The NSTimer - // class is used as fallback when it isn't available. - NSString *reqSysVer = @"3.1"; - NSString *currSysVer = [[UIDevice currentDevice] systemVersion]; - if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending) - displayLinkSupported = TRUE; - } - - return self; -} - -- (void) drawView:(id)sender -{ - [renderer render]; -} - -- (void) layoutSubviews -{ - [renderer resizeFromLayer:(CAEAGLLayer*)self.layer]; - [self drawView:nil]; -} - -- (NSInteger) animationFrameInterval -{ - return animationFrameInterval; -} - -- (void) setAnimationFrameInterval:(NSInteger)frameInterval -{ - // Frame interval defines how many display frames must pass between each time the - // display link fires. The display link will only fire 30 times a second when the - // frame internal is two on a display that refreshes 60 times a second. The default - // frame interval setting of one will fire 60 times a second when the display refreshes - // at 60 times a second. A frame interval setting of less than one results in undefined - // behavior. - if (frameInterval >= 1) - { - animationFrameInterval = frameInterval; - - if (animating) - { - [self stopAnimation]; - [self startAnimation]; - } - } -} - -- (void) startAnimation -{ - if (!animating) - { - if (displayLinkSupported) - { - // CADisplayLink is API new to iPhone SDK 3.1. Compiling against earlier versions will result in a warning, but can be dismissed - // if the system version runtime check for CADisplayLink exists in -initWithCoder:. The runtime check ensures this code will - // not be called in system versions earlier than 3.1. - - displayLink = [NSClassFromString(@"CADisplayLink") displayLinkWithTarget:self selector:@selector(drawView:)]; - [displayLink setFrameInterval:animationFrameInterval]; - [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; - } - else - animationTimer = [NSTimer scheduledTimerWithTimeInterval:(NSTimeInterval)((1.0 / 60.0) * animationFrameInterval) target:self selector:@selector(drawView:) userInfo:nil repeats:TRUE]; - - animating = TRUE; - } -} - -- (void)stopAnimation -{ - if (animating) - { - if (displayLinkSupported) - { - [displayLink invalidate]; - displayLink = nil; - } - else - { - [animationTimer invalidate]; - animationTimer = nil; - } - - animating = FALSE; - } -} - -- (void) dealloc -{ - [renderer release]; - - [super dealloc]; -} - -@end +// +// EAGLView.m +// sample +// +// Created by alexey on 1/4/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import "EAGLView.h" + +#import "ES1Renderer.h" +#import "ES2Renderer.h" + +@implementation EAGLView + +@synthesize animating; +@dynamic animationFrameInterval; + +// You must implement this method ++ (Class) layerClass +{ + return [CAEAGLLayer class]; +} + +//The GL view is stored in the nib file. When it's unarchived it's sent -initWithCoder: +- (id) initWithCoder:(NSCoder*)coder +{ + if ((self = [super initWithCoder:coder])) + { + // Get the layer + CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer; + + eaglLayer.opaque = TRUE; + eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil]; + + //renderer = [[ES2Renderer alloc] init]; + + if (!renderer) + { + renderer = [[ES1Renderer alloc] init]; + + if (!renderer) + { + [self release]; + return nil; + } + } + + animating = FALSE; + displayLinkSupported = FALSE; + animationFrameInterval = 1; + displayLink = nil; + animationTimer = nil; + + // A system version of 3.1 or greater is required to use CADisplayLink. The NSTimer + // class is used as fallback when it isn't available. + NSString *reqSysVer = @"3.1"; + NSString *currSysVer = [[UIDevice currentDevice] systemVersion]; + if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending) + displayLinkSupported = TRUE; + } + + return self; +} + +- (void) drawView:(id)sender +{ + [renderer render]; +} + +- (void) layoutSubviews +{ + [renderer resizeFromLayer:(CAEAGLLayer*)self.layer]; + [self drawView:nil]; +} + +- (NSInteger) animationFrameInterval +{ + return animationFrameInterval; +} + +- (void) setAnimationFrameInterval:(NSInteger)frameInterval +{ + // Frame interval defines how many display frames must pass between each time the + // display link fires. The display link will only fire 30 times a second when the + // frame internal is two on a display that refreshes 60 times a second. The default + // frame interval setting of one will fire 60 times a second when the display refreshes + // at 60 times a second. A frame interval setting of less than one results in undefined + // behavior. + if (frameInterval >= 1) + { + animationFrameInterval = frameInterval; + + if (animating) + { + [self stopAnimation]; + [self startAnimation]; + } + } +} + +- (void) startAnimation +{ + if (!animating) + { + if (displayLinkSupported) + { + // CADisplayLink is API new to iPhone SDK 3.1. Compiling against earlier versions will result in a warning, but can be dismissed + // if the system version runtime check for CADisplayLink exists in -initWithCoder:. The runtime check ensures this code will + // not be called in system versions earlier than 3.1. + + displayLink = [NSClassFromString(@"CADisplayLink") displayLinkWithTarget:self selector:@selector(drawView:)]; + [displayLink setFrameInterval:animationFrameInterval]; + [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; + } + else + animationTimer = [NSTimer scheduledTimerWithTimeInterval:(NSTimeInterval)((1.0 / 60.0) * animationFrameInterval) target:self selector:@selector(drawView:) userInfo:nil repeats:TRUE]; + + animating = TRUE; + } +} + +- (void)stopAnimation +{ + if (animating) + { + if (displayLinkSupported) + { + [displayLink invalidate]; + displayLink = nil; + } + else + { + [animationTimer invalidate]; + animationTimer = nil; + } + + animating = FALSE; + } +} + +- (void) dealloc +{ + [renderer release]; + + [super dealloc]; +} + +@end diff --git a/iPhone/Classes/ES1Renderer.h b/iPhone/Classes/ES1Renderer.h index bb423ae..80404f6 100644 --- a/iPhone/Classes/ES1Renderer.h +++ b/iPhone/Classes/ES1Renderer.h @@ -1,30 +1,30 @@ -// -// ES1Renderer.h -// sample -// -// Created by alexey on 1/4/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -#import "ESRenderer.h" - -#import -#import - -@interface ES1Renderer : NSObject -{ -@private - EAGLContext *context; - - // The pixel dimensions of the CAEAGLLayer - GLint backingWidth; - GLint backingHeight; - - // The OpenGL names for the framebuffer and renderbuffer used to render to this view - GLuint defaultFramebuffer, colorRenderbuffer; -} - -- (void) render; -- (BOOL) resizeFromLayer:(CAEAGLLayer *)layer; - -@end +// +// ES1Renderer.h +// sample +// +// Created by alexey on 1/4/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import "ESRenderer.h" + +#import +#import + +@interface ES1Renderer : NSObject +{ +@private + EAGLContext *context; + + // The pixel dimensions of the CAEAGLLayer + GLint backingWidth; + GLint backingHeight; + + // The OpenGL names for the framebuffer and renderbuffer used to render to this view + GLuint defaultFramebuffer, colorRenderbuffer; +} + +- (void) render; +- (BOOL) resizeFromLayer:(CAEAGLLayer *)layer; + +@end diff --git a/iPhone/Classes/ES1Renderer.m b/iPhone/Classes/ES1Renderer.m index 82590f5..8f1f510 100644 --- a/iPhone/Classes/ES1Renderer.m +++ b/iPhone/Classes/ES1Renderer.m @@ -17,6 +17,9 @@ #define USE_DEPTH_BUFFER 1 +SEPhysicObjectPtr physicObject1; +SEPhysicObjectPtr physicObject2; + @implementation ES1Renderer // Create an ES 1.1 context @@ -61,6 +64,17 @@ - (id) init // Enable blending //glEnable(GL_BLEND); + SELoadDefaultOpenGLSettings(); + + btCollisionConfigurationPtr collisionConfiguration = btCollisionConfigurationPtr( SENewObject() ); + btDispatcherPtr dispatcher = btDispatcherPtr ( SENewObject(collisionConfiguration.get()) ); + btBroadphaseInterfacePtr overlappingPairCache = btBroadphaseInterfacePtr( SENewObject() ); + btConstraintSolverPtr solver = btConstraintSolverPtr( SENewObject() ); + + SEPhysicWorld::sharedInstance()->InitDiscreteDynamicsWorld( dispatcher ,overlappingPairCache, solver, collisionConfiguration ); + SEPhysicWorld::sharedInstance()->world()->setGravity(btVector3(0,-10,0)); + + SEPath currentPath; SEPath::CurrentDirectory(¤tPath); currentPath.AppendName("objects"); @@ -68,6 +82,66 @@ - (id) init SESceneLoader loader; loader.Load( ¤tPath ); + + //add physic objects + + ///create a few basic rigid bodies + btCollisionShape* groundShape = SENewObject(btVector3(btScalar(1.0),btScalar(1.0),btScalar(1.0))); + + + btTransform groundTransform; + groundTransform.setIdentity(); + groundTransform.setOrigin(btVector3(0,0,0)); + + { + btScalar mass(0.0); + + //rigidbody is dynamic if and only if mass is non zero, otherwise static + bool isDynamic = (mass != 0.f); + + btVector3 localInertia(0,0,0); + if (isDynamic) + groundShape->calculateLocalInertia(mass,localInertia); + + //using motionstate is recommended, it provides interpolation capabilities, and only synchronizes 'active' objects + btDefaultMotionState* myMotionState = SENewObject(groundTransform); + btRigidBody::btRigidBodyConstructionInfo rbInfo(mass,myMotionState,groundShape,localInertia); + //btRigidBody* body = new btRigidBody(rbInfo); + + SEMeshPtr mesh = SEObjectStore::sharedInstance()->GetMesh( "Plane" ); + + physicObject1 = SEPhysicObjectPtr(SENewObject()); + physicObject1->Init( mesh, rbInfo ); + + //add the body to the dynamics world + SEPhysicWorld::sharedInstance()->world()->addRigidBody( physicObject1->rigidBody().get() ); + } + + groundTransform.setOrigin(btVector3(0.0,8,1)); + + { + btScalar mass(0.1); + + //rigidbody is dynamic if and only if mass is non zero, otherwise static + bool isDynamic = (mass != 0.f); + + btVector3 localInertia(0,0,0); + if (isDynamic) + groundShape->calculateLocalInertia(mass,localInertia); + + //using motionstate is recommended, it provides interpolation capabilities, and only synchronizes 'active' objects + btDefaultMotionState* myMotionState = SENewObject(groundTransform); + btRigidBody::btRigidBodyConstructionInfo rbInfo(mass,myMotionState,groundShape,localInertia); + + SEMeshPtr mesh = SEObjectStore::sharedInstance()->GetMesh( "Plane" ); + + physicObject2 = SEPhysicObjectPtr(SENewObject()); + physicObject2->Init( mesh, rbInfo ); + + //add the body to the dynamics world + SEPhysicWorld::sharedInstance()->world()->addRigidBody( physicObject2->rigidBody().get() ); + } + //SEImageLoader imageLoader; //SEImagePtr image = imageLoader.Load("test.jpg"); @@ -113,17 +187,26 @@ - (void) render glClearColor(0.5f, 0.5f, 0.5f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - static float angle = 0; - angle += 0.1f; + //static float angle = 0; + //angle += 0.1f; + + SEPhysicWorld::sharedInstance()->world()->stepSimulation(1.f/60.f,10); + + glTranslatef(0,0,-10); + //glRotatef(angle,1,1,0); + + //SEMeshPtr mesh = SEObjectStore::sharedInstance()->GetMesh("Plane"); + //mesh->Draw(); + + if( physicObject1.get() ) + physicObject1->Draw(); - glTranslatef(0,0,-5); - glRotatef(angle,1,1,0); + if( physicObject2.get() ) + physicObject2->Draw(); - SEMeshPtr mesh = SEObjectStore::sharedInstance()->GetMesh("Cube"); - mesh->Draw(); - glRotatef(-angle,1,1,0); - glTranslatef(0,0,5); + //glRotatef(-angle,1,1,0); + glTranslatef(0,0,10); /* glTranslatef(0.0f, (GLfloat)(sinf(transY)/2.0f), 0.0f); diff --git a/iPhone/Classes/ES2Renderer.h b/iPhone/Classes/ES2Renderer.h index 3a6956b..683f3f1 100644 --- a/iPhone/Classes/ES2Renderer.h +++ b/iPhone/Classes/ES2Renderer.h @@ -1,33 +1,33 @@ -// -// ES2Renderer.h -// sample -// -// Created by alexey on 1/4/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -#import "ESRenderer.h" - -#import -#import - -@interface ES2Renderer : NSObject -{ -@private - EAGLContext *context; - - // The pixel dimensions of the CAEAGLLayer - GLint backingWidth; - GLint backingHeight; - - // The OpenGL names for the framebuffer and renderbuffer used to render to this view - GLuint defaultFramebuffer, colorRenderbuffer; - - GLuint program; -} - -- (void) render; -- (BOOL) resizeFromLayer:(CAEAGLLayer *)layer; - -@end - +// +// ES2Renderer.h +// sample +// +// Created by alexey on 1/4/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import "ESRenderer.h" + +#import +#import + +@interface ES2Renderer : NSObject +{ +@private + EAGLContext *context; + + // The pixel dimensions of the CAEAGLLayer + GLint backingWidth; + GLint backingHeight; + + // The OpenGL names for the framebuffer and renderbuffer used to render to this view + GLuint defaultFramebuffer, colorRenderbuffer; + + GLuint program; +} + +- (void) render; +- (BOOL) resizeFromLayer:(CAEAGLLayer *)layer; + +@end + diff --git a/iPhone/Classes/ES2Renderer.m b/iPhone/Classes/ES2Renderer.m index 76d9992..67977c8 100644 --- a/iPhone/Classes/ES2Renderer.m +++ b/iPhone/Classes/ES2Renderer.m @@ -1,308 +1,308 @@ -// -// ES2Renderer.m -// sample -// -// Created by alexey on 1/4/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -#import "ES2Renderer.h" - -// uniform index -enum { - UNIFORM_TRANSLATE, - NUM_UNIFORMS -}; -GLint uniforms[NUM_UNIFORMS]; - -// attribute index -enum { - ATTRIB_VERTEX, - ATTRIB_COLOR, - NUM_ATTRIBUTES -}; - -@interface ES2Renderer (PrivateMethods) -- (BOOL) loadShaders; -- (BOOL) compileShader:(GLuint *)shader type:(GLenum)type file:(NSString *)file; -- (BOOL) linkProgram:(GLuint)prog; -- (BOOL) validateProgram:(GLuint)prog; -@end - -@implementation ES2Renderer - -// Create an ES 2.0 context -- (id) init -{ - if (self = [super init]) - { - context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; - - if (!context || ![EAGLContext setCurrentContext:context] || ![self loadShaders]) - { - [self release]; - return nil; - } - - // Create default framebuffer object. The backing will be allocated for the current layer in -resizeFromLayer - glGenFramebuffers(1, &defaultFramebuffer); - glGenRenderbuffers(1, &colorRenderbuffer); - glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer); - glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer); - } - - return self; -} - -- (void) render -{ - // Replace the implementation of this method to do your own custom drawing - - static const GLfloat squareVertices[] = { - -0.5f, -0.33f, - 0.5f, -0.33f, - -0.5f, 0.33f, - 0.5f, 0.33f, - }; - - static const GLubyte squareColors[] = { - 255, 255, 0, 255, - 0, 255, 255, 255, - 0, 0, 0, 0, - 255, 0, 255, 255, - }; - - static float transY = 0.0f; - - // This application only creates a single context which is already set current at this point. - // This call is redundant, but needed if dealing with multiple contexts. - [EAGLContext setCurrentContext:context]; - - // This application only creates a single default framebuffer which is already bound at this point. - // This call is redundant, but needed if dealing with multiple framebuffers. - glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer); - glViewport(0, 0, backingWidth, backingHeight); - - glClearColor(0.5f, 0.5f, 0.5f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - // Use shader program - glUseProgram(program); - - // Update uniform value - glUniform1f(uniforms[UNIFORM_TRANSLATE], (GLfloat)transY); - transY += 0.075f; - - // Update attribute values - glVertexAttribPointer(ATTRIB_VERTEX, 2, GL_FLOAT, 0, 0, squareVertices); - glEnableVertexAttribArray(ATTRIB_VERTEX); - glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, 1, 0, squareColors); - glEnableVertexAttribArray(ATTRIB_COLOR); - - // Validate program before drawing. This is a good check, but only really necessary in a debug build. - // DEBUG macro must be defined in your debug configurations if that's not already the case. -#if defined(DEBUG) - if (![self validateProgram:program]) - { - NSLog(@"Failed to validate program: %d", program); - return; - } -#endif - - // Draw - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - // This application only creates a single color renderbuffer which is already bound at this point. - // This call is redundant, but needed if dealing with multiple renderbuffers. - glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer); - [context presentRenderbuffer:GL_RENDERBUFFER]; -} - -- (BOOL) compileShader:(GLuint *)shader type:(GLenum)type file:(NSString *)file -{ - GLint status; - const GLchar *source; - - source = (GLchar *)[[NSString stringWithContentsOfFile:file encoding:NSUTF8StringEncoding error:nil] UTF8String]; - if (!source) - { - NSLog(@"Failed to load vertex shader"); - return FALSE; - } - - *shader = glCreateShader(type); - glShaderSource(*shader, 1, &source, NULL); - glCompileShader(*shader); - -#if defined(DEBUG) - GLint logLength; - glGetShaderiv(*shader, GL_INFO_LOG_LENGTH, &logLength); - if (logLength > 0) - { - GLchar *log = (GLchar *)malloc(logLength); - glGetShaderInfoLog(*shader, logLength, &logLength, log); - NSLog(@"Shader compile log:\n%s", log); - free(log); - } -#endif - - glGetShaderiv(*shader, GL_COMPILE_STATUS, &status); - if (status == 0) - { - glDeleteShader(*shader); - return FALSE; - } - - return TRUE; -} - -- (BOOL) linkProgram:(GLuint)prog -{ - GLint status; - - glLinkProgram(prog); - -#if defined(DEBUG) - GLint logLength; - glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &logLength); - if (logLength > 0) - { - GLchar *log = (GLchar *)malloc(logLength); - glGetProgramInfoLog(prog, logLength, &logLength, log); - NSLog(@"Program link log:\n%s", log); - free(log); - } -#endif - - glGetProgramiv(prog, GL_LINK_STATUS, &status); - if (status == 0) - return FALSE; - - return TRUE; -} - -- (BOOL) validateProgram:(GLuint)prog -{ - GLint logLength, status; - - glValidateProgram(prog); - glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &logLength); - if (logLength > 0) - { - GLchar *log = (GLchar *)malloc(logLength); - glGetProgramInfoLog(prog, logLength, &logLength, log); - NSLog(@"Program validate log:\n%s", log); - free(log); - } - - glGetProgramiv(prog, GL_VALIDATE_STATUS, &status); - if (status == 0) - return FALSE; - - return TRUE; -} - -- (BOOL) loadShaders -{ - GLuint vertShader, fragShader; - NSString *vertShaderPathname, *fragShaderPathname; - - // create shader program - program = glCreateProgram(); - - // create and compile vertex shader - vertShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"vsh"]; - if (![self compileShader:&vertShader type:GL_VERTEX_SHADER file:vertShaderPathname]) - { - NSLog(@"Failed to compile vertex shader"); - return FALSE; - } - - // create and compile fragment shader - fragShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"fsh"]; - if (![self compileShader:&fragShader type:GL_FRAGMENT_SHADER file:fragShaderPathname]) - { - NSLog(@"Failed to compile fragment shader"); - return FALSE; - } - - // attach vertex shader to program - glAttachShader(program, vertShader); - - // attach fragment shader to program - glAttachShader(program, fragShader); - - // bind attribute locations - // this needs to be done prior to linking - glBindAttribLocation(program, ATTRIB_VERTEX, "position"); - glBindAttribLocation(program, ATTRIB_COLOR, "color"); - - // link program - if (![self linkProgram:program]) - { - NSLog(@"Failed to link program: %d", program); - return FALSE; - } - - // get uniform locations - uniforms[UNIFORM_TRANSLATE] = glGetUniformLocation(program, "translate"); - - // release vertex and fragment shaders - if (vertShader) - glDeleteShader(vertShader); - if (fragShader) - glDeleteShader(fragShader); - - return TRUE; -} - -- (BOOL) resizeFromLayer:(CAEAGLLayer *)layer -{ - // Allocate color buffer backing based on the current layer size - glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer); - [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:layer]; - glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &backingWidth); - glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &backingHeight); - - if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) - { - NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER)); - return NO; - } - - return YES; -} - -- (void) dealloc -{ - // Tear down GL - if (defaultFramebuffer) - { - glDeleteFramebuffers(1, &defaultFramebuffer); - defaultFramebuffer = 0; - } - - if (colorRenderbuffer) - { - glDeleteRenderbuffers(1, &colorRenderbuffer); - colorRenderbuffer = 0; - } - - if (program) - { - glDeleteProgram(program); - program = 0; - } - - // Tear down context - if ([EAGLContext currentContext] == context) - [EAGLContext setCurrentContext:nil]; - - [context release]; - context = nil; - - [super dealloc]; -} - -@end +// +// ES2Renderer.m +// sample +// +// Created by alexey on 1/4/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import "ES2Renderer.h" + +// uniform index +enum { + UNIFORM_TRANSLATE, + NUM_UNIFORMS +}; +GLint uniforms[NUM_UNIFORMS]; + +// attribute index +enum { + ATTRIB_VERTEX, + ATTRIB_COLOR, + NUM_ATTRIBUTES +}; + +@interface ES2Renderer (PrivateMethods) +- (BOOL) loadShaders; +- (BOOL) compileShader:(GLuint *)shader type:(GLenum)type file:(NSString *)file; +- (BOOL) linkProgram:(GLuint)prog; +- (BOOL) validateProgram:(GLuint)prog; +@end + +@implementation ES2Renderer + +// Create an ES 2.0 context +- (id) init +{ + if (self = [super init]) + { + context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; + + if (!context || ![EAGLContext setCurrentContext:context] || ![self loadShaders]) + { + [self release]; + return nil; + } + + // Create default framebuffer object. The backing will be allocated for the current layer in -resizeFromLayer + glGenFramebuffers(1, &defaultFramebuffer); + glGenRenderbuffers(1, &colorRenderbuffer); + glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer); + glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer); + } + + return self; +} + +- (void) render +{ + // Replace the implementation of this method to do your own custom drawing + + static const GLfloat squareVertices[] = { + -0.5f, -0.33f, + 0.5f, -0.33f, + -0.5f, 0.33f, + 0.5f, 0.33f, + }; + + static const GLubyte squareColors[] = { + 255, 255, 0, 255, + 0, 255, 255, 255, + 0, 0, 0, 0, + 255, 0, 255, 255, + }; + + static float transY = 0.0f; + + // This application only creates a single context which is already set current at this point. + // This call is redundant, but needed if dealing with multiple contexts. + [EAGLContext setCurrentContext:context]; + + // This application only creates a single default framebuffer which is already bound at this point. + // This call is redundant, but needed if dealing with multiple framebuffers. + glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer); + glViewport(0, 0, backingWidth, backingHeight); + + glClearColor(0.5f, 0.5f, 0.5f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + + // Use shader program + glUseProgram(program); + + // Update uniform value + glUniform1f(uniforms[UNIFORM_TRANSLATE], (GLfloat)transY); + transY += 0.075f; + + // Update attribute values + glVertexAttribPointer(ATTRIB_VERTEX, 2, GL_FLOAT, 0, 0, squareVertices); + glEnableVertexAttribArray(ATTRIB_VERTEX); + glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, 1, 0, squareColors); + glEnableVertexAttribArray(ATTRIB_COLOR); + + // Validate program before drawing. This is a good check, but only really necessary in a debug build. + // DEBUG macro must be defined in your debug configurations if that's not already the case. +#if defined(DEBUG) + if (![self validateProgram:program]) + { + NSLog(@"Failed to validate program: %d", program); + return; + } +#endif + + // Draw + glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); + + // This application only creates a single color renderbuffer which is already bound at this point. + // This call is redundant, but needed if dealing with multiple renderbuffers. + glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer); + [context presentRenderbuffer:GL_RENDERBUFFER]; +} + +- (BOOL) compileShader:(GLuint *)shader type:(GLenum)type file:(NSString *)file +{ + GLint status; + const GLchar *source; + + source = (GLchar *)[[NSString stringWithContentsOfFile:file encoding:NSUTF8StringEncoding error:nil] UTF8String]; + if (!source) + { + NSLog(@"Failed to load vertex shader"); + return FALSE; + } + + *shader = glCreateShader(type); + glShaderSource(*shader, 1, &source, NULL); + glCompileShader(*shader); + +#if defined(DEBUG) + GLint logLength; + glGetShaderiv(*shader, GL_INFO_LOG_LENGTH, &logLength); + if (logLength > 0) + { + GLchar *log = (GLchar *)malloc(logLength); + glGetShaderInfoLog(*shader, logLength, &logLength, log); + NSLog(@"Shader compile log:\n%s", log); + free(log); + } +#endif + + glGetShaderiv(*shader, GL_COMPILE_STATUS, &status); + if (status == 0) + { + glDeleteShader(*shader); + return FALSE; + } + + return TRUE; +} + +- (BOOL) linkProgram:(GLuint)prog +{ + GLint status; + + glLinkProgram(prog); + +#if defined(DEBUG) + GLint logLength; + glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &logLength); + if (logLength > 0) + { + GLchar *log = (GLchar *)malloc(logLength); + glGetProgramInfoLog(prog, logLength, &logLength, log); + NSLog(@"Program link log:\n%s", log); + free(log); + } +#endif + + glGetProgramiv(prog, GL_LINK_STATUS, &status); + if (status == 0) + return FALSE; + + return TRUE; +} + +- (BOOL) validateProgram:(GLuint)prog +{ + GLint logLength, status; + + glValidateProgram(prog); + glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &logLength); + if (logLength > 0) + { + GLchar *log = (GLchar *)malloc(logLength); + glGetProgramInfoLog(prog, logLength, &logLength, log); + NSLog(@"Program validate log:\n%s", log); + free(log); + } + + glGetProgramiv(prog, GL_VALIDATE_STATUS, &status); + if (status == 0) + return FALSE; + + return TRUE; +} + +- (BOOL) loadShaders +{ + GLuint vertShader, fragShader; + NSString *vertShaderPathname, *fragShaderPathname; + + // create shader program + program = glCreateProgram(); + + // create and compile vertex shader + vertShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"vsh"]; + if (![self compileShader:&vertShader type:GL_VERTEX_SHADER file:vertShaderPathname]) + { + NSLog(@"Failed to compile vertex shader"); + return FALSE; + } + + // create and compile fragment shader + fragShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"fsh"]; + if (![self compileShader:&fragShader type:GL_FRAGMENT_SHADER file:fragShaderPathname]) + { + NSLog(@"Failed to compile fragment shader"); + return FALSE; + } + + // attach vertex shader to program + glAttachShader(program, vertShader); + + // attach fragment shader to program + glAttachShader(program, fragShader); + + // bind attribute locations + // this needs to be done prior to linking + glBindAttribLocation(program, ATTRIB_VERTEX, "position"); + glBindAttribLocation(program, ATTRIB_COLOR, "color"); + + // link program + if (![self linkProgram:program]) + { + NSLog(@"Failed to link program: %d", program); + return FALSE; + } + + // get uniform locations + uniforms[UNIFORM_TRANSLATE] = glGetUniformLocation(program, "translate"); + + // release vertex and fragment shaders + if (vertShader) + glDeleteShader(vertShader); + if (fragShader) + glDeleteShader(fragShader); + + return TRUE; +} + +- (BOOL) resizeFromLayer:(CAEAGLLayer *)layer +{ + // Allocate color buffer backing based on the current layer size + glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer); + [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:layer]; + glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &backingWidth); + glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &backingHeight); + + if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) + { + NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER)); + return NO; + } + + return YES; +} + +- (void) dealloc +{ + // Tear down GL + if (defaultFramebuffer) + { + glDeleteFramebuffers(1, &defaultFramebuffer); + defaultFramebuffer = 0; + } + + if (colorRenderbuffer) + { + glDeleteRenderbuffers(1, &colorRenderbuffer); + colorRenderbuffer = 0; + } + + if (program) + { + glDeleteProgram(program); + program = 0; + } + + // Tear down context + if ([EAGLContext currentContext] == context) + [EAGLContext setCurrentContext:nil]; + + [context release]; + context = nil; + + [super dealloc]; +} + +@end diff --git a/iPhone/Classes/ESRenderer.h b/iPhone/Classes/ESRenderer.h index 31dc4ef..efdfb88 100644 --- a/iPhone/Classes/ESRenderer.h +++ b/iPhone/Classes/ESRenderer.h @@ -1,19 +1,19 @@ -// -// ESRenderer.h -// sample -// -// Created by alexey on 1/4/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -#import - -#import -#import - -@protocol ESRenderer - -- (void) render; -- (BOOL) resizeFromLayer:(CAEAGLLayer *)layer; - -@end +// +// ESRenderer.h +// sample +// +// Created by alexey on 1/4/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import + +#import +#import + +@protocol ESRenderer + +- (void) render; +- (BOOL) resizeFromLayer:(CAEAGLLayer *)layer; + +@end diff --git a/iPhone/Classes/sampleAppDelegate.h b/iPhone/Classes/sampleAppDelegate.h index 8496dc9..ad88b27 100644 --- a/iPhone/Classes/sampleAppDelegate.h +++ b/iPhone/Classes/sampleAppDelegate.h @@ -1,22 +1,22 @@ -// -// sampleAppDelegate.h -// sample -// -// Created by alexey on 1/4/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -#import - -@class EAGLView; - -@interface sampleAppDelegate : NSObject { - UIWindow *window; - EAGLView *glView; -} - -@property (nonatomic, retain) IBOutlet UIWindow *window; -@property (nonatomic, retain) IBOutlet EAGLView *glView; - -@end - +// +// sampleAppDelegate.h +// sample +// +// Created by alexey on 1/4/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import + +@class EAGLView; + +@interface sampleAppDelegate : NSObject { + UIWindow *window; + EAGLView *glView; +} + +@property (nonatomic, retain) IBOutlet UIWindow *window; +@property (nonatomic, retain) IBOutlet EAGLView *glView; + +@end + diff --git a/iPhone/Classes/sampleAppDelegate.m b/iPhone/Classes/sampleAppDelegate.m index 4876a0e..69c8e86 100644 --- a/iPhone/Classes/sampleAppDelegate.m +++ b/iPhone/Classes/sampleAppDelegate.m @@ -1,45 +1,45 @@ -// -// sampleAppDelegate.m -// sample -// -// Created by alexey on 1/4/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -#import "sampleAppDelegate.h" -#import "EAGLView.h" - -@implementation sampleAppDelegate - -@synthesize window; -@synthesize glView; - -- (void) applicationDidFinishLaunching:(UIApplication *)application -{ - [glView startAnimation]; -} - -- (void) applicationWillResignActive:(UIApplication *)application -{ - [glView stopAnimation]; -} - -- (void) applicationDidBecomeActive:(UIApplication *)application -{ - [glView startAnimation]; -} - -- (void)applicationWillTerminate:(UIApplication *)application -{ - [glView stopAnimation]; -} - -- (void) dealloc -{ - [window release]; - [glView release]; - - [super dealloc]; -} - -@end +// +// sampleAppDelegate.m +// sample +// +// Created by alexey on 1/4/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import "sampleAppDelegate.h" +#import "EAGLView.h" + +@implementation sampleAppDelegate + +@synthesize window; +@synthesize glView; + +- (void) applicationDidFinishLaunching:(UIApplication *)application +{ + [glView startAnimation]; +} + +- (void) applicationWillResignActive:(UIApplication *)application +{ + [glView stopAnimation]; +} + +- (void) applicationDidBecomeActive:(UIApplication *)application +{ + [glView startAnimation]; +} + +- (void)applicationWillTerminate:(UIApplication *)application +{ + [glView stopAnimation]; +} + +- (void) dealloc +{ + [window release]; + [glView release]; + + [super dealloc]; +} + +@end diff --git a/iPhone/MainWindow.xib b/iPhone/MainWindow.xib index a839c1c..f2c5727 100644 --- a/iPhone/MainWindow.xib +++ b/iPhone/MainWindow.xib @@ -1,231 +1,231 @@ - - - - 784 - 10A394 - 732 - 1027.1 - 430.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 60 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - - - IBFirstResponder - - - - - 1316 - - YES - - - 1298 - {320, 480} - - - 3 - MQA - - NO - - - - {320, 480} - - - 1 - MSAxIDEAA - - NO - YES - - - - - YES - - - delegate - - - - 4 - - - - window - - - - 5 - - - - glView - - - - 9 - - - - - YES - - 0 - - - - - - 2 - - - YES - - - - - - -1 - - - File's Owner - - - 3 - - - - - 8 - - - - - -2 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 2.IBAttributePlaceholdersKey - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - 8.CustomClassName - 8.IBPluginDependency - - - YES - UIApplication - UIResponder - - YES - - - YES - - - {{500, 343}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - sampleAppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - EAGLView - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 9 - - - - YES - - EAGLView - UIView - - IBProjectSource - Classes/EAGLView.h - - - - sampleAppDelegate - NSObject - - YES - - YES - glView - window - - - YES - EAGLView - UIWindow - - - - IBProjectSource - Classes/sampleAppDelegate.h - - - - - 0 - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - sample.xcodeproj - 3 - 3.1 - - + + + + 784 + 10A394 + 732 + 1027.1 + 430.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 60 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + + + IBFirstResponder + + + + + 1316 + + YES + + + 1298 + {320, 480} + + + 3 + MQA + + NO + + + + {320, 480} + + + 1 + MSAxIDEAA + + NO + YES + + + + + YES + + + delegate + + + + 4 + + + + window + + + + 5 + + + + glView + + + + 9 + + + + + YES + + 0 + + + + + + 2 + + + YES + + + + + + -1 + + + File's Owner + + + 3 + + + + + 8 + + + + + -2 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 2.IBAttributePlaceholdersKey + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 3.CustomClassName + 3.IBPluginDependency + 8.CustomClassName + 8.IBPluginDependency + + + YES + UIApplication + UIResponder + + YES + + + YES + + + {{500, 343}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + sampleAppDelegate + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + EAGLView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 9 + + + + YES + + EAGLView + UIView + + IBProjectSource + Classes/EAGLView.h + + + + sampleAppDelegate + NSObject + + YES + + YES + glView + window + + + YES + EAGLView + UIWindow + + + + IBProjectSource + Classes/sampleAppDelegate.h + + + + + 0 + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + sample.xcodeproj + 3 + 3.1 + + diff --git a/iPhone/Shaders/Shader.fsh b/iPhone/Shaders/Shader.fsh index f2dbbc8..fc4ff3b 100644 --- a/iPhone/Shaders/Shader.fsh +++ b/iPhone/Shaders/Shader.fsh @@ -1,14 +1,14 @@ -// -// Shader.fsh -// sample -// -// Created by alexey on 1/4/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -varying lowp vec4 colorVarying; - -void main() -{ - gl_FragColor = colorVarying; -} +// +// Shader.fsh +// sample +// +// Created by alexey on 1/4/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +varying lowp vec4 colorVarying; + +void main() +{ + gl_FragColor = colorVarying; +} diff --git a/iPhone/Shaders/Shader.vsh b/iPhone/Shaders/Shader.vsh index 879b9d3..1322c84 100644 --- a/iPhone/Shaders/Shader.vsh +++ b/iPhone/Shaders/Shader.vsh @@ -1,22 +1,22 @@ -// -// Shader.vsh -// sample -// -// Created by alexey on 1/4/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -attribute vec4 position; -attribute vec4 color; - -varying vec4 colorVarying; - -uniform float translate; - -void main() -{ - gl_Position = position; - gl_Position.y += sin(translate) / 2.0; - - colorVarying = color; -} +// +// Shader.vsh +// sample +// +// Created by alexey on 1/4/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +attribute vec4 position; +attribute vec4 color; + +varying vec4 colorVarying; + +uniform float translate; + +void main() +{ + gl_Position = position; + gl_Position.y += sin(translate) / 2.0; + + colorVarying = color; +} diff --git a/iPhone/main.m b/iPhone/main.m index 8c06057..5ad0e2a 100644 --- a/iPhone/main.m +++ b/iPhone/main.m @@ -1,17 +1,17 @@ -// -// main.m -// sample -// -// Created by alexey on 1/4/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) { - - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - return retVal; -} +// +// main.m +// sample +// +// Created by alexey on 1/4/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, nil); + [pool release]; + return retVal; +} diff --git a/iPhone/sample-Info.plist b/iPhone/sample-Info.plist index 97cccc5..166ff90 100644 --- a/iPhone/sample-Info.plist +++ b/iPhone/sample-Info.plist @@ -1,30 +1,30 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.soniccat.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - NSMainNibFile - MainWindow - - + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.soniccat.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + NSMainNibFile + MainWindow + + diff --git a/iPhone/sample.xcodeproj/alexey.mode1v3 b/iPhone/sample.xcodeproj/alexey.mode1v3 index 2a8f150..66771b6 100644 --- a/iPhone/sample.xcodeproj/alexey.mode1v3 +++ b/iPhone/sample.xcodeproj/alexey.mode1v3 @@ -252,7 +252,7 @@ PBXSmartGroupTreeModuleColumnWidthsKey - 257 + 262 PBXSmartGroupTreeModuleColumnsKey_v4 @@ -265,29 +265,28 @@ 29B97314FDCFA39411CA2CEA 8A8A2FEE10F26BA4004F63F5 + 8AA6416E11042F4300F70400 8AA2436D10F8532600AAAC13 - 8A3B3B3B10F31DA100CDC4D4 8A8A2FF010F26BB1004F63F5 8A8A2FEF10F26BAA004F63F5 080E96DDFE201D6D7F000001 2514C27610084DB600A42282 29B97315FDCFA39411CA2CEA - 29B97317FDCFA39411CA2CEA - 8AA2440910F854F600AAAC13 + 19C28FACFE9D520D11CA2CBB 1C37FBAC04509CD000000102 1C37FABC05509CD000000102 PBXSmartGroupTreeModuleOutlineStateSelectionKey - 47 - 38 + 6 + 2 1 0 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 559}, {257, 588}} + {{0, 0}, {262, 583}} PBXTopSmartGroupGIDs @@ -299,19 +298,19 @@ GeometryConfiguration Frame - {{0, 0}, {274, 606}} + {{0, 0}, {279, 601}} GroupTreeTableConfiguration MainColumn - 257 + 262 RubberWindowFrame - -1 131 1280 647 0 0 1280 778 + -1 136 1280 642 0 0 1280 778 Module PBXSmartGroupTreeModule Proportion - 274pt + 279pt Dock @@ -324,7 +323,7 @@ PBXProjectModuleGUID 1CE0B20306471E060097A5F4 PBXProjectModuleLabel - SEMesh.cpp + SEPhysicWorld.cpp PBXSplitModuleInNavigatorKey Split0 @@ -332,18 +331,17 @@ PBXProjectModuleGUID 1CE0B20406471E060097A5F4 PBXProjectModuleLabel - SEMesh.cpp + SEPhysicWorld.cpp _historyCapacity 0 bookmark - 8A3CCF2210FF5C1900879847 + 8A6F6F6A11049E04006A8EF4 history 8A8A313910F27CB7004F63F5 8A8A313A10F27CB7004F63F5 8A3B3BB410F3281500CDC4D4 8A3B3BB610F3281500CDC4D4 - 8A3B3BB910F3281500CDC4D4 8A3B3BBA10F3281500CDC4D4 8A3B3C7A10F3353800CDC4D4 8A3B3C9710F3383300CDC4D4 @@ -360,48 +358,59 @@ 8AA2457210F861B100AAAC13 8AA2457510F861B100AAAC13 8AA2457610F861B100AAAC13 - 8AA2458510F8621200AAAC13 8AA245C110F8649100AAAC13 8AA245C310F8649100AAAC13 8AA245C510F8649100AAAC13 8AA245DF10F865EB00AAAC13 - 8AA245E010F865EB00AAAC13 8AA245FF10F8677A00AAAC13 8AA2460010F8677A00AAAC13 - 8AA2463210F868C000AAAC13 8AA2467F10F86AC400AAAC13 8AA2468010F86AC400AAAC13 - 8AA2468110F86AC400AAAC13 8AA2468210F86AC400AAAC13 8AA2468310F86AC400AAAC13 8AA2469D10F86C8200AAAC13 - 8AA246A810F86D2B00AAAC13 - 8AA246C510F86E6400AAAC13 8AA246C610F86E6400AAAC13 8AA2470510F86F9E00AAAC13 8AA2470610F86F9E00AAAC13 8AA2471610F8702600AAAC13 8AA2479310F8765600AAAC13 8AA2479510F8765600AAAC13 - 8AC3BB8910FB86800001CD77 - 8AC3BB8A10FB86800001CD77 - 8AC3BB8B10FB86800001CD77 8AC3BB8D10FB86800001CD77 8AC3BB9010FB86800001CD77 8AC3BB9110FB86800001CD77 8AC3BB9210FB86800001CD77 8AC3BB9310FB86800001CD77 8A3CCE9A10FF56F900879847 - 8A3CCE9D10FF56F900879847 8A3CCE9E10FF56F900879847 8A3CCEC710FF58C100879847 - 8A3CCF0610FF5BFD00879847 8A3CCF0710FF5BFD00879847 - 8A3CCF0810FF5BFD00879847 8A3CCF0910FF5BFD00879847 - 8A3CCF0A10FF5BFD00879847 - 8A3CCF2010FF5C1900879847 - 8A3CCF1D10FF5C1700879847 + 8AA643C51104318E00F70400 + 8AA643C61104318E00F70400 + 8AA643C71104318E00F70400 + 8AA643C81104318E00F70400 + 8AA643C91104318E00F70400 + 8AA644051104340B00F70400 + 8A6F6EB6110483F4006A8EF4 + 8A6F6EB7110483F4006A8EF4 + 8A6F6EB8110483F4006A8EF4 + 8A6F6EEE110485BE006A8EF4 + 8A6F6EEF110485BE006A8EF4 + 8A6F6EF0110485BE006A8EF4 + 8A6F6F061104868D006A8EF4 + 8A6F6F071104868D006A8EF4 + 8A6F6F261104894F006A8EF4 + 8A6F6F271104894F006A8EF4 + 8A6F6F3111048983006A8EF4 + 8A6F6F4E11048C36006A8EF4 + 8A6F6F5011048C36006A8EF4 + 8A6F6F5211048C36006A8EF4 + 8A6F6F5411048C36006A8EF4 + 8A6F6F5611048C36006A8EF4 + 8A6F6F5711048C36006A8EF4 + 8A6F6F6011049DE0006A8EF4 + 8A6F6F6111049DE0006A8EF4 + 8A6F6F6211049DE0006A8EF4 prevStack @@ -411,7 +420,6 @@ 8A8A2FD610F26B1B004F63F5 8A8A2FD910F26B1B004F63F5 8A8A2FDA10F26B1B004F63F5 - 8A8A2FDB10F26B1B004F63F5 8A8A2FDD10F26B1B004F63F5 8A8A2FDF10F26B1B004F63F5 8A8A309910F26EBE004F63F5 @@ -432,40 +440,36 @@ 8AA2457A10F861B100AAAC13 8AA2457D10F861B100AAAC13 8AA245C810F8649100AAAC13 - 8AA245C910F8649100AAAC13 8AA245CC10F8649100AAAC13 8AA245CD10F8649100AAAC13 8AA245CF10F8649100AAAC13 8AA245E710F865EB00AAAC13 8AA2460310F8677A00AAAC13 - 8AA2460D10F867B000AAAC13 8AA246BD10F86D8D00AAAC13 8AA246C910F86E6400AAAC13 8AA246E610F86F3300AAAC13 8AA246E710F86F3300AAAC13 8AA246E910F86F3300AAAC13 - 8AA2470910F86F9E00AAAC13 8AA2470A10F86F9E00AAAC13 8AA2471910F8702600AAAC13 8AA247A710F878A000AAAC13 8AC3BB9F10FB86800001CD77 - 8A3CCEA710FF56F900879847 - 8A3CCEA810FF56F900879847 - 8A3CCEAA10FF56F900879847 - 8A3CCEAF10FF56F900879847 - 8A3CCF0C10FF5BFD00879847 - 8A3CCF0D10FF5BFD00879847 - 8A3CCF0E10FF5BFD00879847 - 8A3CCF0F10FF5BFD00879847 - 8A3CCF1010FF5BFD00879847 - 8A3CCF1110FF5BFD00879847 - 8A3CCF1210FF5BFD00879847 - 8A3CCF1310FF5BFD00879847 - 8A3CCF1410FF5BFD00879847 - 8A3CCF1510FF5BFD00879847 - 8A3CCF1610FF5BFD00879847 - 8A3CCF1710FF5BFD00879847 - 8A3CCF2110FF5C1900879847 + 8AA643CC1104318E00F70400 + 8AA643CD1104318E00F70400 + 8AA643CE1104318E00F70400 + 8AA643CF1104318E00F70400 + 8AA643FE110432DC00F70400 + 8AA644061104340B00F70400 + 8A6F6EBC110483F4006A8EF4 + 8A6F6EBD110483F4006A8EF4 + 8A6F6EBE110483F4006A8EF4 + 8A6F6EF2110485BE006A8EF4 + 8A6F6EF3110485BE006A8EF4 + 8A6F6F0A1104868D006A8EF4 + 8A6F6F0C1104868D006A8EF4 + 8A6F6F2A1104894F006A8EF4 + 8A6F6F3411048983006A8EF4 + 8A6F6F6311049DE0006A8EF4 SplitCount @@ -477,14 +481,14 @@ GeometryConfiguration Frame - {{0, 0}, {1001, 516}} + {{0, 0}, {996, 513}} RubberWindowFrame - -1 131 1280 647 0 0 1280 778 + -1 136 1280 642 0 0 1280 778 Module PBXNavigatorGroup Proportion - 516pt + 513pt ContentConfiguration @@ -497,18 +501,18 @@ GeometryConfiguration Frame - {{0, 521}, {1001, 85}} + {{0, 518}, {996, 83}} RubberWindowFrame - -1 131 1280 647 0 0 1280 778 + -1 136 1280 642 0 0 1280 778 Module XCDetailModule Proportion - 85pt + 83pt Proportion - 1001pt + 996pt Name @@ -523,9 +527,9 @@ TableOfContents - 8A3CCF1910FF5BFD00879847 + 8A6F6EC2110483F4006A8EF4 1CE0B1FE06471DED0097A5F4 - 8A3CCF1A10FF5BFD00879847 + 8A6F6EC3110483F4006A8EF4 1CE0B20306471E060097A5F4 1CE0B20506471E060097A5F4 @@ -659,11 +663,15 @@ 5 WindowOrderList + 8A6F6ED81104841C006A8EF4 + 8A6F6ECD110483F4006A8EF4 + 1CD10A99069EF8BA00B06720 8A8A2FAE10F26A5D004F63F5 + 1C78EAAD065D492600B07095 /Volumes/SECOND/iPhoneProjects/3dEngine/iPhone/sample.xcodeproj WindowString - -1 131 1280 647 0 0 1280 778 + -1 136 1280 642 0 0 1280 778 WindowToolsV3 @@ -686,7 +694,7 @@ PBXProjectModuleGUID 1CD0528F0623707200166675 PBXProjectModuleLabel - SEMesh.cpp + SEPhysicWorld.cpp StatusBarVisibility @@ -695,7 +703,7 @@ Frame {{0, 0}, {881, 397}} RubberWindowFrame - 297 158 881 583 0 0 1280 778 + 297 159 881 583 0 0 1280 778 Module PBXNavigatorGroup @@ -719,7 +727,7 @@ Frame {{0, 402}, {881, 140}} RubberWindowFrame - 297 158 881 583 0 0 1280 778 + 297 159 881 583 0 0 1280 778 Module PBXBuildResultsModule @@ -742,14 +750,14 @@ TableOfContents 8A8A2FAE10F26A5D004F63F5 - 8A3CCEE510FF5A5700879847 + 8A6F6EC4110483F4006A8EF4 1CD0528F0623707200166675 XCMainBuildResultsModuleGUID ToolbarConfiguration xcode.toolbar.config.buildV3 WindowString - 297 158 881 583 0 0 1280 778 + 297 159 881 583 0 0 1280 778 WindowToolGUID 8A8A2FAE10F26A5D004F63F5 WindowToolIsVisible @@ -784,8 +792,8 @@ yes sizes - {{0, 0}, {395, 261}} - {{395, 0}, {439, 261}} + {{0, 0}, {395, 275}} + {{395, 0}, {439, 275}} VerticalSplitView @@ -800,8 +808,8 @@ yes sizes - {{0, 0}, {834, 261}} - {{0, 261}, {834, 261}} + {{0, 0}, {834, 275}} + {{0, 275}, {834, 247}} @@ -834,7 +842,7 @@ 149 Frame - {{395, 0}, {439, 261}} + {{395, 0}, {439, 275}} RubberWindowFrame 267 157 834 563 0 0 1280 778 @@ -862,13 +870,13 @@ TableOfContents 1CD10A99069EF8BA00B06720 - 8A3CCE9010FF52C300879847 + 8A6F6EC5110483F4006A8EF4 1C162984064C10D400B95A72 - 8A3CCE9110FF52C300879847 - 8A3CCE9210FF52C300879847 - 8A3CCE9310FF52C300879847 - 8A3CCE9410FF52C300879847 - 8A3CCE9510FF52C300879847 + 8A6F6EC6110483F4006A8EF4 + 8A6F6EC7110483F4006A8EF4 + 8A6F6EC8110483F4006A8EF4 + 8A6F6EC9110483F4006A8EF4 + 8A6F6ECA110483F4006A8EF4 ToolbarConfiguration xcode.toolbar.config.debugV3 @@ -987,6 +995,8 @@ Dock + BecomeActive + ContentConfiguration PBXProjectModuleGUID @@ -1022,7 +1032,7 @@ TableOfContents 1C78EAAD065D492600B07095 - 8A3CCE9610FF52C300879847 + 8A6F6ECB110483F4006A8EF4 1C78EAAC065D492600B07095 ToolbarConfiguration @@ -1032,7 +1042,7 @@ WindowToolGUID 1C78EAAD065D492600B07095 WindowToolIsVisible - + Identifier diff --git a/iPhone/sample.xcodeproj/alexey.pbxuser b/iPhone/sample.xcodeproj/alexey.pbxuser index 0d7730f..6c28e10 100644 --- a/iPhone/sample.xcodeproj/alexey.pbxuser +++ b/iPhone/sample.xcodeproj/alexey.pbxuser @@ -10,8 +10,8 @@ 1D3623250D0F684500981E51 /* sampleAppDelegate.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {940, 736}}"; - sepNavSelRange = "{0, 0}"; - sepNavVisRange = "{264, 469}"; + sepNavSelRange = "{383, 0}"; + sepNavVisRange = "{0, 587}"; }; }; 1D6058900D05DD3D006BFB54 /* sample */ = { @@ -24,21 +24,21 @@ uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {940, 496}}"; sepNavSelRange = "{501, 17}"; - sepNavVisRange = "{0, 593}"; + sepNavVisRange = "{0, 623}"; }; }; 2514C26E10084DB100A42282 /* ES1Renderer.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {880, 4020}}"; - sepNavSelRange = "{2385, 44}"; - sepNavVisRange = "{2383, 904}"; + sepNavIntBoundsRect = "{{0, 0}, {935, 5316}}"; + sepNavSelRange = "{5237, 0}"; + sepNavVisRange = "{4369, 1051}"; }; }; 2514C26F10084DB100A42282 /* ES2Renderer.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {940, 544}}"; sepNavSelRange = "{130, 0}"; - sepNavVisRange = "{0, 607}"; + sepNavVisRange = "{0, 638}"; }; }; 2514C27010084DB100A42282 /* ES2Renderer.m */ = { @@ -50,9 +50,9 @@ }; 2514C27110084DB100A42282 /* ESRenderer.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {676, 429}}"; + sepNavIntBoundsRect = "{{0, 0}, {940, 481}}"; sepNavSelRange = "{0, 0}"; - sepNavVisRange = "{0, 329}"; + sepNavVisRange = "{0, 348}"; }; }; 2514C27910084DCA00A42282 /* Shader.fsh */ = { @@ -78,9 +78,9 @@ }; 28FD14FD0DC6FC130079059D /* EAGLView.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1370, 2416}}"; - sepNavSelRange = "{3542, 0}"; - sepNavVisRange = "{225, 888}"; + sepNavIntBoundsRect = "{{0, 0}, {1223, 2480}}"; + sepNavSelRange = "{514, 0}"; + sepNavVisRange = "{1121, 763}"; }; }; 29B97313FDCFA39411CA2CEA /* Project object */ = { @@ -117,7 +117,7 @@ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; PBXFileTableDataSourceColumnWidthsKey = ( 20, - 762, + 757, 20, 48, 43, @@ -156,208 +156,140 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 285170092; - PBXWorkspaceStateSaveDate = 285170092; + PBXPerProjectTemplateStateSaveDate = 285508550; + PBXWorkspaceStateSaveDate = 285508550; }; perUserProjectItems = { - 8A3B3BB410F3281500CDC4D4 = 8A3B3BB410F3281500CDC4D4 /* PBXTextBookmark */; - 8A3B3BB610F3281500CDC4D4 = 8A3B3BB610F3281500CDC4D4 /* PBXTextBookmark */; - 8A3B3BB910F3281500CDC4D4 = 8A3B3BB910F3281500CDC4D4 /* PBXTextBookmark */; - 8A3B3BBA10F3281500CDC4D4 = 8A3B3BBA10F3281500CDC4D4 /* PBXTextBookmark */; - 8A3B3BC610F3281500CDC4D4 = 8A3B3BC610F3281500CDC4D4 /* PBXTextBookmark */; - 8A3B3BC810F3281500CDC4D4 = 8A3B3BC810F3281500CDC4D4 /* PBXTextBookmark */; - 8A3B3BCA10F3281500CDC4D4 = 8A3B3BCA10F3281500CDC4D4 /* PBXTextBookmark */; - 8A3B3BCC10F3281500CDC4D4 = 8A3B3BCC10F3281500CDC4D4 /* PBXTextBookmark */; - 8A3B3C4010F3307A00CDC4D4 = 8A3B3C4010F3307A00CDC4D4 /* PBXTextBookmark */; - 8A3B3C7A10F3353800CDC4D4 = 8A3B3C7A10F3353800CDC4D4 /* PBXTextBookmark */; - 8A3B3C9710F3383300CDC4D4 = 8A3B3C9710F3383300CDC4D4 /* PBXTextBookmark */; - 8A3B3CA610F3383300CDC4D4 = 8A3B3CA610F3383300CDC4D4 /* PBXTextBookmark */; - 8A3B3CAA10F3383300CDC4D4 = 8A3B3CAA10F3383300CDC4D4 /* PBXTextBookmark */; - 8A3B3CC710F33A1200CDC4D4 = 8A3B3CC710F33A1200CDC4D4 /* PBXTextBookmark */; - 8A3B3CD810F33BCF00CDC4D4 = 8A3B3CD810F33BCF00CDC4D4 /* PBXTextBookmark */; - 8A3B3CDA10F33BCF00CDC4D4 = 8A3B3CDA10F33BCF00CDC4D4 /* PBXTextBookmark */; - 8A3B3CDB10F33BCF00CDC4D4 = 8A3B3CDB10F33BCF00CDC4D4 /* PBXTextBookmark */; - 8A3B3CE210F33BCF00CDC4D4 = 8A3B3CE210F33BCF00CDC4D4 /* PBXTextBookmark */; - 8A3B3CE510F33BCF00CDC4D4 = 8A3B3CE510F33BCF00CDC4D4 /* PBXTextBookmark */; - 8A3B3D3810F33F4300CDC4D4 = 8A3B3D3810F33F4300CDC4D4 /* PBXTextBookmark */; - 8A3B3D3910F33F4300CDC4D4 = 8A3B3D3910F33F4300CDC4D4 /* PBXTextBookmark */; - 8A3B3D5510F3424D00CDC4D4 = 8A3B3D5510F3424D00CDC4D4 /* PBXTextBookmark */; - 8A3B3D5610F3424D00CDC4D4 = 8A3B3D5610F3424D00CDC4D4 /* PBXTextBookmark */; - 8A3B3D5910F3424D00CDC4D4 = 8A3B3D5910F3424D00CDC4D4 /* PBXTextBookmark */; - 8A3B3D5A10F3424D00CDC4D4 = 8A3B3D5A10F3424D00CDC4D4 /* PBXTextBookmark */; - 8A3B3D5C10F3424D00CDC4D4 = 8A3B3D5C10F3424D00CDC4D4 /* PBXTextBookmark */; - 8A3B3D6610F3424D00CDC4D4 = 8A3B3D6610F3424D00CDC4D4 /* PBXTextBookmark */; - 8A3B3D6810F3424D00CDC4D4 = 8A3B3D6810F3424D00CDC4D4 /* PBXTextBookmark */; - 8A3CCE9A10FF56F900879847 = 8A3CCE9A10FF56F900879847 /* PBXTextBookmark */; - 8A3CCE9D10FF56F900879847 = 8A3CCE9D10FF56F900879847 /* PBXTextBookmark */; - 8A3CCE9E10FF56F900879847 = 8A3CCE9E10FF56F900879847 /* PBXTextBookmark */; - 8A3CCEA110FF56F900879847 = 8A3CCEA110FF56F900879847 /* PBXTextBookmark */; - 8A3CCEA310FF56F900879847 = 8A3CCEA310FF56F900879847 /* PBXTextBookmark */; - 8A3CCEA410FF56F900879847 = 8A3CCEA410FF56F900879847 /* PBXTextBookmark */; - 8A3CCEA510FF56F900879847 = 8A3CCEA510FF56F900879847 /* PBXTextBookmark */; - 8A3CCEA610FF56F900879847 = 8A3CCEA610FF56F900879847 /* PBXTextBookmark */; - 8A3CCEA710FF56F900879847 = 8A3CCEA710FF56F900879847 /* PBXTextBookmark */; - 8A3CCEA810FF56F900879847 = 8A3CCEA810FF56F900879847 /* PBXTextBookmark */; - 8A3CCEA910FF56F900879847 = 8A3CCEA910FF56F900879847 /* PBXTextBookmark */; - 8A3CCEAA10FF56F900879847 = 8A3CCEAA10FF56F900879847 /* PBXTextBookmark */; - 8A3CCEAB10FF56F900879847 = 8A3CCEAB10FF56F900879847 /* PBXTextBookmark */; - 8A3CCEAC10FF56F900879847 = 8A3CCEAC10FF56F900879847 /* PBXTextBookmark */; - 8A3CCEAD10FF56F900879847 = 8A3CCEAD10FF56F900879847 /* PBXTextBookmark */; - 8A3CCEAE10FF56F900879847 = 8A3CCEAE10FF56F900879847 /* PBXTextBookmark */; - 8A3CCEAF10FF56F900879847 = 8A3CCEAF10FF56F900879847 /* PBXTextBookmark */; - 8A3CCEB010FF56F900879847 = 8A3CCEB010FF56F900879847 /* PBXTextBookmark */; - 8A3CCEB110FF56F900879847 = 8A3CCEB110FF56F900879847 /* PBXTextBookmark */; - 8A3CCEB210FF56F900879847 = 8A3CCEB210FF56F900879847 /* PBXTextBookmark */; - 8A3CCEB310FF56F900879847 = 8A3CCEB310FF56F900879847 /* PBXTextBookmark */; - 8A3CCEB410FF56F900879847 = 8A3CCEB410FF56F900879847 /* PBXTextBookmark */; - 8A3CCEB510FF56F900879847 = 8A3CCEB510FF56F900879847 /* PBXTextBookmark */; - 8A3CCEB610FF56F900879847 = 8A3CCEB610FF56F900879847 /* PBXTextBookmark */; - 8A3CCEBC10FF580000879847 = 8A3CCEBC10FF580000879847 /* PBXTextBookmark */; - 8A3CCEBE10FF580000879847 = 8A3CCEBE10FF580000879847 /* PBXTextBookmark */; - 8A3CCEBF10FF580000879847 = 8A3CCEBF10FF580000879847 /* PBXTextBookmark */; - 8A3CCEC010FF580000879847 = 8A3CCEC010FF580000879847 /* PBXTextBookmark */; - 8A3CCEC110FF580000879847 = 8A3CCEC110FF580000879847 /* PBXTextBookmark */; - 8A3CCEC210FF580000879847 = 8A3CCEC210FF580000879847 /* PBXTextBookmark */; - 8A3CCEC310FF580000879847 = 8A3CCEC310FF580000879847 /* PBXTextBookmark */; - 8A3CCEC410FF580000879847 = 8A3CCEC410FF580000879847 /* PBXTextBookmark */; - 8A3CCEC510FF580000879847 = 8A3CCEC510FF580000879847 /* PBXTextBookmark */; - 8A3CCEC710FF58C100879847 = 8A3CCEC710FF58C100879847 /* PBXTextBookmark */; - 8A3CCEC810FF58C100879847 = 8A3CCEC810FF58C100879847 /* PBXTextBookmark */; - 8A3CCEC910FF58C100879847 = 8A3CCEC910FF58C100879847 /* PBXTextBookmark */; - 8A3CCECA10FF58C100879847 = 8A3CCECA10FF58C100879847 /* PBXTextBookmark */; - 8A3CCECB10FF58C100879847 = 8A3CCECB10FF58C100879847 /* PBXTextBookmark */; - 8A3CCECC10FF58C100879847 = 8A3CCECC10FF58C100879847 /* PBXTextBookmark */; - 8A3CCECD10FF58C100879847 = 8A3CCECD10FF58C100879847 /* PBXTextBookmark */; - 8A3CCECE10FF58C100879847 = 8A3CCECE10FF58C100879847 /* PBXTextBookmark */; - 8A3CCECF10FF58C100879847 = 8A3CCECF10FF58C100879847 /* PBXTextBookmark */; - 8A3CCED010FF58C100879847 = 8A3CCED010FF58C100879847 /* PBXTextBookmark */; - 8A3CCED110FF58C100879847 = 8A3CCED110FF58C100879847 /* PBXTextBookmark */; - 8A3CCED210FF58C100879847 = 8A3CCED210FF58C100879847 /* PBXTextBookmark */; - 8A3CCED310FF58C100879847 = 8A3CCED310FF58C100879847 /* PBXTextBookmark */; - 8A3CCED410FF58C100879847 = 8A3CCED410FF58C100879847 /* PBXTextBookmark */; - 8A3CCED510FF58C100879847 = 8A3CCED510FF58C100879847 /* PBXTextBookmark */; - 8A3CCED610FF58C100879847 = 8A3CCED610FF58C100879847 /* PBXTextBookmark */; - 8A3CCEE110FF5A5700879847 /* PBXTextBookmark */ = 8A3CCEE110FF5A5700879847 /* PBXTextBookmark */; - 8A3CCEE210FF5A5700879847 /* PBXTextBookmark */ = 8A3CCEE210FF5A5700879847 /* PBXTextBookmark */; - 8A3CCEE310FF5A5700879847 /* PBXTextBookmark */ = 8A3CCEE310FF5A5700879847 /* PBXTextBookmark */; - 8A3CCEE410FF5A5700879847 /* PBXTextBookmark */ = 8A3CCEE410FF5A5700879847 /* PBXTextBookmark */; - 8A3CCEE610FF5A5D00879847 /* PBXTextBookmark */ = 8A3CCEE610FF5A5D00879847 /* PBXTextBookmark */; - 8A3CCEE710FF5A5D00879847 /* PBXTextBookmark */ = 8A3CCEE710FF5A5D00879847 /* PBXTextBookmark */; - 8A3CCEE810FF5A5D00879847 /* PBXTextBookmark */ = 8A3CCEE810FF5A5D00879847 /* PBXTextBookmark */; - 8A3CCEE910FF5A5D00879847 /* PBXTextBookmark */ = 8A3CCEE910FF5A5D00879847 /* PBXTextBookmark */; - 8A3CCEEE10FF5AC900879847 /* PBXTextBookmark */ = 8A3CCEEE10FF5AC900879847 /* PBXTextBookmark */; - 8A3CCEEF10FF5AC900879847 /* PBXTextBookmark */ = 8A3CCEEF10FF5AC900879847 /* PBXTextBookmark */; - 8A3CCEF010FF5AC900879847 /* PBXTextBookmark */ = 8A3CCEF010FF5AC900879847 /* PBXTextBookmark */; - 8A3CCEF110FF5AC900879847 /* PBXTextBookmark */ = 8A3CCEF110FF5AC900879847 /* PBXTextBookmark */; - 8A3CCEF210FF5AC900879847 /* PBXTextBookmark */ = 8A3CCEF210FF5AC900879847 /* PBXTextBookmark */; - 8A3CCEF310FF5AC900879847 /* PBXTextBookmark */ = 8A3CCEF310FF5AC900879847 /* PBXTextBookmark */; - 8A3CCEF410FF5AC900879847 /* PBXTextBookmark */ = 8A3CCEF410FF5AC900879847 /* PBXTextBookmark */; - 8A3CCEF910FF5BD300879847 /* PBXTextBookmark */ = 8A3CCEF910FF5BD300879847 /* PBXTextBookmark */; - 8A3CCEFA10FF5BD300879847 /* PBXTextBookmark */ = 8A3CCEFA10FF5BD300879847 /* PBXTextBookmark */; - 8A3CCEFB10FF5BD300879847 /* PBXTextBookmark */ = 8A3CCEFB10FF5BD300879847 /* PBXTextBookmark */; - 8A3CCEFC10FF5BD300879847 /* PBXTextBookmark */ = 8A3CCEFC10FF5BD300879847 /* PBXTextBookmark */; - 8A3CCEFD10FF5BD300879847 /* PBXTextBookmark */ = 8A3CCEFD10FF5BD300879847 /* PBXTextBookmark */; - 8A3CCEFE10FF5BD300879847 /* PBXTextBookmark */ = 8A3CCEFE10FF5BD300879847 /* PBXTextBookmark */; - 8A3CCEFF10FF5BD300879847 /* PBXTextBookmark */ = 8A3CCEFF10FF5BD300879847 /* PBXTextBookmark */; - 8A3CCF0010FF5BD300879847 /* PBXTextBookmark */ = 8A3CCF0010FF5BD300879847 /* PBXTextBookmark */; - 8A3CCF0110FF5BD300879847 /* PBXTextBookmark */ = 8A3CCF0110FF5BD300879847 /* PBXTextBookmark */; - 8A3CCF0210FF5BD300879847 /* PBXTextBookmark */ = 8A3CCF0210FF5BD300879847 /* PBXTextBookmark */; - 8A3CCF0310FF5BD300879847 /* PBXTextBookmark */ = 8A3CCF0310FF5BD300879847 /* PBXTextBookmark */; - 8A3CCF0410FF5BEB00879847 /* PBXTextBookmark */ = 8A3CCF0410FF5BEB00879847 /* PBXTextBookmark */; - 8A3CCF0610FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF0610FF5BFD00879847 /* PBXTextBookmark */; + 8A3B3BB410F3281500CDC4D4 /* PBXTextBookmark */ = 8A3B3BB410F3281500CDC4D4 /* PBXTextBookmark */; + 8A3B3BB610F3281500CDC4D4 /* PBXTextBookmark */ = 8A3B3BB610F3281500CDC4D4 /* PBXTextBookmark */; + 8A3B3BBA10F3281500CDC4D4 /* PBXTextBookmark */ = 8A3B3BBA10F3281500CDC4D4 /* PBXTextBookmark */; + 8A3B3BC610F3281500CDC4D4 /* PBXTextBookmark */ = 8A3B3BC610F3281500CDC4D4 /* PBXTextBookmark */; + 8A3B3BC810F3281500CDC4D4 /* PBXTextBookmark */ = 8A3B3BC810F3281500CDC4D4 /* PBXTextBookmark */; + 8A3B3BCA10F3281500CDC4D4 /* PBXTextBookmark */ = 8A3B3BCA10F3281500CDC4D4 /* PBXTextBookmark */; + 8A3B3BCC10F3281500CDC4D4 /* PBXTextBookmark */ = 8A3B3BCC10F3281500CDC4D4 /* PBXTextBookmark */; + 8A3B3C4010F3307A00CDC4D4 /* PBXTextBookmark */ = 8A3B3C4010F3307A00CDC4D4 /* PBXTextBookmark */; + 8A3B3C7A10F3353800CDC4D4 /* PBXTextBookmark */ = 8A3B3C7A10F3353800CDC4D4 /* PBXTextBookmark */; + 8A3B3C9710F3383300CDC4D4 /* PBXTextBookmark */ = 8A3B3C9710F3383300CDC4D4 /* PBXTextBookmark */; + 8A3B3CA610F3383300CDC4D4 /* PBXTextBookmark */ = 8A3B3CA610F3383300CDC4D4 /* PBXTextBookmark */; + 8A3B3CAA10F3383300CDC4D4 /* PBXTextBookmark */ = 8A3B3CAA10F3383300CDC4D4 /* PBXTextBookmark */; + 8A3B3CC710F33A1200CDC4D4 /* PBXTextBookmark */ = 8A3B3CC710F33A1200CDC4D4 /* PBXTextBookmark */; + 8A3B3CD810F33BCF00CDC4D4 /* PBXTextBookmark */ = 8A3B3CD810F33BCF00CDC4D4 /* PBXTextBookmark */; + 8A3B3CDA10F33BCF00CDC4D4 /* PBXTextBookmark */ = 8A3B3CDA10F33BCF00CDC4D4 /* PBXTextBookmark */; + 8A3B3CDB10F33BCF00CDC4D4 /* PBXTextBookmark */ = 8A3B3CDB10F33BCF00CDC4D4 /* PBXTextBookmark */; + 8A3B3CE210F33BCF00CDC4D4 /* PBXTextBookmark */ = 8A3B3CE210F33BCF00CDC4D4 /* PBXTextBookmark */; + 8A3B3CE510F33BCF00CDC4D4 /* PBXTextBookmark */ = 8A3B3CE510F33BCF00CDC4D4 /* PBXTextBookmark */; + 8A3B3D3810F33F4300CDC4D4 /* PBXTextBookmark */ = 8A3B3D3810F33F4300CDC4D4 /* PBXTextBookmark */; + 8A3B3D3910F33F4300CDC4D4 /* PBXTextBookmark */ = 8A3B3D3910F33F4300CDC4D4 /* PBXTextBookmark */; + 8A3B3D5510F3424D00CDC4D4 /* PBXTextBookmark */ = 8A3B3D5510F3424D00CDC4D4 /* PBXTextBookmark */; + 8A3B3D5610F3424D00CDC4D4 /* PBXTextBookmark */ = 8A3B3D5610F3424D00CDC4D4 /* PBXTextBookmark */; + 8A3B3D5910F3424D00CDC4D4 /* PBXTextBookmark */ = 8A3B3D5910F3424D00CDC4D4 /* PBXTextBookmark */; + 8A3B3D5A10F3424D00CDC4D4 /* PBXTextBookmark */ = 8A3B3D5A10F3424D00CDC4D4 /* PBXTextBookmark */; + 8A3B3D5C10F3424D00CDC4D4 /* PBXTextBookmark */ = 8A3B3D5C10F3424D00CDC4D4 /* PBXTextBookmark */; + 8A3B3D6610F3424D00CDC4D4 /* PBXTextBookmark */ = 8A3B3D6610F3424D00CDC4D4 /* PBXTextBookmark */; + 8A3B3D6810F3424D00CDC4D4 /* PBXTextBookmark */ = 8A3B3D6810F3424D00CDC4D4 /* PBXTextBookmark */; + 8A3CCE9A10FF56F900879847 /* PBXTextBookmark */ = 8A3CCE9A10FF56F900879847 /* PBXTextBookmark */; + 8A3CCE9E10FF56F900879847 /* PBXTextBookmark */ = 8A3CCE9E10FF56F900879847 /* PBXTextBookmark */; + 8A3CCEC710FF58C100879847 /* PBXTextBookmark */ = 8A3CCEC710FF58C100879847 /* PBXTextBookmark */; 8A3CCF0710FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF0710FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF0810FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF0810FF5BFD00879847 /* PBXTextBookmark */; 8A3CCF0910FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF0910FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF0A10FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF0A10FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF0B10FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF0B10FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF0C10FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF0C10FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF0D10FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF0D10FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF0E10FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF0E10FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF0F10FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF0F10FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF1010FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF1010FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF1110FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF1110FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF1210FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF1210FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF1310FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF1310FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF1410FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF1410FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF1510FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF1510FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF1610FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF1610FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF1710FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF1710FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF1810FF5BFD00879847 /* PBXTextBookmark */ = 8A3CCF1810FF5BFD00879847 /* PBXTextBookmark */; - 8A3CCF1C10FF5C1700879847 /* PBXTextBookmark */ = 8A3CCF1C10FF5C1700879847 /* PBXTextBookmark */; - 8A3CCF1D10FF5C1700879847 /* PBXTextBookmark */ = 8A3CCF1D10FF5C1700879847 /* PBXTextBookmark */; - 8A3CCF1E10FF5C1700879847 /* PBXTextBookmark */ = 8A3CCF1E10FF5C1700879847 /* PBXTextBookmark */; - 8A3CCF1F10FF5C1700879847 /* PBXTextBookmark */ = 8A3CCF1F10FF5C1700879847 /* PBXTextBookmark */; - 8A3CCF2010FF5C1900879847 /* PBXTextBookmark */ = 8A3CCF2010FF5C1900879847 /* PBXTextBookmark */; - 8A3CCF2110FF5C1900879847 /* PBXTextBookmark */ = 8A3CCF2110FF5C1900879847 /* PBXTextBookmark */; - 8A3CCF2210FF5C1900879847 /* PBXTextBookmark */ = 8A3CCF2210FF5C1900879847 /* PBXTextBookmark */; - 8A8A2FD210F26B1B004F63F5 = 8A8A2FD210F26B1B004F63F5 /* PBXTextBookmark */; - 8A8A2FD310F26B1B004F63F5 = 8A8A2FD310F26B1B004F63F5 /* PBXTextBookmark */; - 8A8A2FD510F26B1B004F63F5 = 8A8A2FD510F26B1B004F63F5 /* PBXTextBookmark */; - 8A8A2FD610F26B1B004F63F5 = 8A8A2FD610F26B1B004F63F5 /* PBXTextBookmark */; - 8A8A2FD910F26B1B004F63F5 = 8A8A2FD910F26B1B004F63F5 /* PBXTextBookmark */; - 8A8A2FDA10F26B1B004F63F5 = 8A8A2FDA10F26B1B004F63F5 /* PBXTextBookmark */; - 8A8A2FDB10F26B1B004F63F5 = 8A8A2FDB10F26B1B004F63F5 /* PBXTextBookmark */; - 8A8A2FDD10F26B1B004F63F5 = 8A8A2FDD10F26B1B004F63F5 /* PBXTextBookmark */; - 8A8A2FDF10F26B1B004F63F5 = 8A8A2FDF10F26B1B004F63F5 /* PBXTextBookmark */; - 8A8A309910F26EBE004F63F5 = 8A8A309910F26EBE004F63F5 /* PBXTextBookmark */; - 8A8A313910F27CB7004F63F5 = 8A8A313910F27CB7004F63F5 /* PBXTextBookmark */; - 8A8A313A10F27CB7004F63F5 = 8A8A313A10F27CB7004F63F5 /* PBXTextBookmark */; - 8AA243BD10F853DD00AAAC13 = 8AA243BD10F853DD00AAAC13 /* PBXTextBookmark */; - 8AA2449D10F85AC100AAAC13 = 8AA2449D10F85AC100AAAC13 /* PBXTextBookmark */; - 8AA2457210F861B100AAAC13 = 8AA2457210F861B100AAAC13 /* PBXTextBookmark */; - 8AA2457510F861B100AAAC13 = 8AA2457510F861B100AAAC13 /* PBXTextBookmark */; - 8AA2457610F861B100AAAC13 = 8AA2457610F861B100AAAC13 /* PBXTextBookmark */; - 8AA2457A10F861B100AAAC13 = 8AA2457A10F861B100AAAC13 /* PBXTextBookmark */; - 8AA2457D10F861B100AAAC13 = 8AA2457D10F861B100AAAC13 /* PBXTextBookmark */; - 8AA2458510F8621200AAAC13 = 8AA2458510F8621200AAAC13 /* PBXTextBookmark */; - 8AA245C110F8649100AAAC13 = 8AA245C110F8649100AAAC13 /* PBXTextBookmark */; - 8AA245C310F8649100AAAC13 = 8AA245C310F8649100AAAC13 /* PBXTextBookmark */; - 8AA245C510F8649100AAAC13 = 8AA245C510F8649100AAAC13 /* PBXTextBookmark */; - 8AA245C810F8649100AAAC13 = 8AA245C810F8649100AAAC13 /* PBXTextBookmark */; - 8AA245C910F8649100AAAC13 = 8AA245C910F8649100AAAC13 /* PBXTextBookmark */; - 8AA245CC10F8649100AAAC13 = 8AA245CC10F8649100AAAC13 /* PBXTextBookmark */; - 8AA245CD10F8649100AAAC13 = 8AA245CD10F8649100AAAC13 /* PBXTextBookmark */; - 8AA245CF10F8649100AAAC13 = 8AA245CF10F8649100AAAC13 /* PBXTextBookmark */; - 8AA245DF10F865EB00AAAC13 = 8AA245DF10F865EB00AAAC13 /* PBXTextBookmark */; - 8AA245E010F865EB00AAAC13 = 8AA245E010F865EB00AAAC13 /* PBXTextBookmark */; - 8AA245E710F865EB00AAAC13 = 8AA245E710F865EB00AAAC13 /* PBXTextBookmark */; - 8AA245FF10F8677A00AAAC13 = 8AA245FF10F8677A00AAAC13 /* PBXTextBookmark */; - 8AA2460010F8677A00AAAC13 = 8AA2460010F8677A00AAAC13 /* PBXTextBookmark */; - 8AA2460310F8677A00AAAC13 = 8AA2460310F8677A00AAAC13 /* PBXTextBookmark */; - 8AA2460D10F867B000AAAC13 = 8AA2460D10F867B000AAAC13 /* PBXTextBookmark */; - 8AA2463210F868C000AAAC13 = 8AA2463210F868C000AAAC13 /* PBXTextBookmark */; - 8AA2467F10F86AC400AAAC13 = 8AA2467F10F86AC400AAAC13 /* PBXTextBookmark */; - 8AA2468010F86AC400AAAC13 = 8AA2468010F86AC400AAAC13 /* PBXTextBookmark */; - 8AA2468110F86AC400AAAC13 = 8AA2468110F86AC400AAAC13 /* PBXTextBookmark */; - 8AA2468210F86AC400AAAC13 = 8AA2468210F86AC400AAAC13 /* PBXTextBookmark */; - 8AA2468310F86AC400AAAC13 = 8AA2468310F86AC400AAAC13 /* PBXTextBookmark */; - 8AA2469D10F86C8200AAAC13 = 8AA2469D10F86C8200AAAC13 /* PBXTextBookmark */; - 8AA246A810F86D2B00AAAC13 = 8AA246A810F86D2B00AAAC13 /* PBXTextBookmark */; - 8AA246BD10F86D8D00AAAC13 = 8AA246BD10F86D8D00AAAC13 /* PBXTextBookmark */; - 8AA246C510F86E6400AAAC13 = 8AA246C510F86E6400AAAC13 /* PBXTextBookmark */; - 8AA246C610F86E6400AAAC13 = 8AA246C610F86E6400AAAC13 /* PBXTextBookmark */; - 8AA246C910F86E6400AAAC13 = 8AA246C910F86E6400AAAC13 /* PBXTextBookmark */; - 8AA246E610F86F3300AAAC13 = 8AA246E610F86F3300AAAC13 /* PBXTextBookmark */; - 8AA246E710F86F3300AAAC13 = 8AA246E710F86F3300AAAC13 /* PBXTextBookmark */; - 8AA246E910F86F3300AAAC13 = 8AA246E910F86F3300AAAC13 /* PBXTextBookmark */; - 8AA2470510F86F9E00AAAC13 = 8AA2470510F86F9E00AAAC13 /* PBXTextBookmark */; - 8AA2470610F86F9E00AAAC13 = 8AA2470610F86F9E00AAAC13 /* PBXTextBookmark */; - 8AA2470910F86F9E00AAAC13 = 8AA2470910F86F9E00AAAC13 /* PBXTextBookmark */; - 8AA2470A10F86F9E00AAAC13 = 8AA2470A10F86F9E00AAAC13 /* PBXTextBookmark */; - 8AA2471610F8702600AAAC13 = 8AA2471610F8702600AAAC13 /* PBXBookmark */; - 8AA2471910F8702600AAAC13 = 8AA2471910F8702600AAAC13 /* PBXBookmark */; - 8AA2479310F8765600AAAC13 = 8AA2479310F8765600AAAC13 /* PBXTextBookmark */; - 8AA2479510F8765600AAAC13 = 8AA2479510F8765600AAAC13 /* PBXTextBookmark */; - 8AA247A710F878A000AAAC13 = 8AA247A710F878A000AAAC13 /* PBXTextBookmark */; - 8AC3BB8910FB86800001CD77 = 8AC3BB8910FB86800001CD77 /* PBXTextBookmark */; - 8AC3BB8A10FB86800001CD77 = 8AC3BB8A10FB86800001CD77 /* PBXTextBookmark */; - 8AC3BB8B10FB86800001CD77 = 8AC3BB8B10FB86800001CD77 /* PBXTextBookmark */; - 8AC3BB8D10FB86800001CD77 = 8AC3BB8D10FB86800001CD77 /* PBXTextBookmark */; - 8AC3BB9010FB86800001CD77 = 8AC3BB9010FB86800001CD77 /* PBXTextBookmark */; - 8AC3BB9110FB86800001CD77 = 8AC3BB9110FB86800001CD77 /* PBXTextBookmark */; - 8AC3BB9210FB86800001CD77 = 8AC3BB9210FB86800001CD77 /* PBXTextBookmark */; - 8AC3BB9310FB86800001CD77 = 8AC3BB9310FB86800001CD77 /* PBXTextBookmark */; - 8AC3BB9F10FB86800001CD77 = 8AC3BB9F10FB86800001CD77 /* PBXTextBookmark */; + 8A6F6EB6110483F4006A8EF4 /* PBXTextBookmark */ = 8A6F6EB6110483F4006A8EF4 /* PBXTextBookmark */; + 8A6F6EB7110483F4006A8EF4 /* PBXTextBookmark */ = 8A6F6EB7110483F4006A8EF4 /* PBXTextBookmark */; + 8A6F6EB8110483F4006A8EF4 /* PBXTextBookmark */ = 8A6F6EB8110483F4006A8EF4 /* PBXTextBookmark */; + 8A6F6EBC110483F4006A8EF4 /* PBXTextBookmark */ = 8A6F6EBC110483F4006A8EF4 /* PBXTextBookmark */; + 8A6F6EBD110483F4006A8EF4 /* PBXTextBookmark */ = 8A6F6EBD110483F4006A8EF4 /* PBXTextBookmark */; + 8A6F6EBE110483F4006A8EF4 /* PBXTextBookmark */ = 8A6F6EBE110483F4006A8EF4 /* PBXTextBookmark */; + 8A6F6EEE110485BE006A8EF4 /* PBXTextBookmark */ = 8A6F6EEE110485BE006A8EF4 /* PBXTextBookmark */; + 8A6F6EEF110485BE006A8EF4 /* PBXTextBookmark */ = 8A6F6EEF110485BE006A8EF4 /* PBXTextBookmark */; + 8A6F6EF0110485BE006A8EF4 /* PBXTextBookmark */ = 8A6F6EF0110485BE006A8EF4 /* PBXTextBookmark */; + 8A6F6EF2110485BE006A8EF4 /* PBXTextBookmark */ = 8A6F6EF2110485BE006A8EF4 /* PBXTextBookmark */; + 8A6F6EF3110485BE006A8EF4 /* PBXTextBookmark */ = 8A6F6EF3110485BE006A8EF4 /* PBXTextBookmark */; + 8A6F6F061104868D006A8EF4 /* PBXTextBookmark */ = 8A6F6F061104868D006A8EF4 /* PBXTextBookmark */; + 8A6F6F071104868D006A8EF4 /* PBXTextBookmark */ = 8A6F6F071104868D006A8EF4 /* PBXTextBookmark */; + 8A6F6F0A1104868D006A8EF4 /* PBXTextBookmark */ = 8A6F6F0A1104868D006A8EF4 /* PBXTextBookmark */; + 8A6F6F0C1104868D006A8EF4 /* PBXTextBookmark */ = 8A6F6F0C1104868D006A8EF4 /* PBXTextBookmark */; + 8A6F6F261104894F006A8EF4 /* PBXTextBookmark */ = 8A6F6F261104894F006A8EF4 /* PBXTextBookmark */; + 8A6F6F271104894F006A8EF4 /* PBXTextBookmark */ = 8A6F6F271104894F006A8EF4 /* PBXTextBookmark */; + 8A6F6F2A1104894F006A8EF4 /* PBXTextBookmark */ = 8A6F6F2A1104894F006A8EF4 /* PBXTextBookmark */; + 8A6F6F3111048983006A8EF4 /* PBXTextBookmark */ = 8A6F6F3111048983006A8EF4 /* PBXTextBookmark */; + 8A6F6F3411048983006A8EF4 /* PBXTextBookmark */ = 8A6F6F3411048983006A8EF4 /* PBXTextBookmark */; + 8A6F6F4E11048C36006A8EF4 /* PBXTextBookmark */ = 8A6F6F4E11048C36006A8EF4 /* PBXTextBookmark */; + 8A6F6F5011048C36006A8EF4 /* PBXTextBookmark */ = 8A6F6F5011048C36006A8EF4 /* PBXTextBookmark */; + 8A6F6F5211048C36006A8EF4 /* PBXTextBookmark */ = 8A6F6F5211048C36006A8EF4 /* PBXTextBookmark */; + 8A6F6F5411048C36006A8EF4 /* PBXTextBookmark */ = 8A6F6F5411048C36006A8EF4 /* PBXTextBookmark */; + 8A6F6F5611048C36006A8EF4 /* PBXTextBookmark */ = 8A6F6F5611048C36006A8EF4 /* PBXTextBookmark */; + 8A6F6F5711048C36006A8EF4 /* PBXTextBookmark */ = 8A6F6F5711048C36006A8EF4 /* PBXTextBookmark */; + 8A6F6F6011049DE0006A8EF4 /* PBXTextBookmark */ = 8A6F6F6011049DE0006A8EF4 /* PBXTextBookmark */; + 8A6F6F6111049DE0006A8EF4 /* PBXTextBookmark */ = 8A6F6F6111049DE0006A8EF4 /* PBXTextBookmark */; + 8A6F6F6211049DE0006A8EF4 /* PBXTextBookmark */ = 8A6F6F6211049DE0006A8EF4 /* PBXTextBookmark */; + 8A6F6F6311049DE0006A8EF4 /* PBXTextBookmark */ = 8A6F6F6311049DE0006A8EF4 /* PBXTextBookmark */; + 8A6F6F6A11049E04006A8EF4 /* PBXTextBookmark */ = 8A6F6F6A11049E04006A8EF4 /* PBXTextBookmark */; + 8A8A2FD210F26B1B004F63F5 /* PBXTextBookmark */ = 8A8A2FD210F26B1B004F63F5 /* PBXTextBookmark */; + 8A8A2FD310F26B1B004F63F5 /* PBXTextBookmark */ = 8A8A2FD310F26B1B004F63F5 /* PBXTextBookmark */; + 8A8A2FD510F26B1B004F63F5 /* PBXTextBookmark */ = 8A8A2FD510F26B1B004F63F5 /* PBXTextBookmark */; + 8A8A2FD610F26B1B004F63F5 /* PBXTextBookmark */ = 8A8A2FD610F26B1B004F63F5 /* PBXTextBookmark */; + 8A8A2FD910F26B1B004F63F5 /* PBXTextBookmark */ = 8A8A2FD910F26B1B004F63F5 /* PBXTextBookmark */; + 8A8A2FDA10F26B1B004F63F5 /* PBXTextBookmark */ = 8A8A2FDA10F26B1B004F63F5 /* PBXTextBookmark */; + 8A8A2FDD10F26B1B004F63F5 /* PBXTextBookmark */ = 8A8A2FDD10F26B1B004F63F5 /* PBXTextBookmark */; + 8A8A2FDF10F26B1B004F63F5 /* PBXTextBookmark */ = 8A8A2FDF10F26B1B004F63F5 /* PBXTextBookmark */; + 8A8A309910F26EBE004F63F5 /* PBXTextBookmark */ = 8A8A309910F26EBE004F63F5 /* PBXTextBookmark */; + 8A8A313910F27CB7004F63F5 /* PBXTextBookmark */ = 8A8A313910F27CB7004F63F5 /* PBXTextBookmark */; + 8A8A313A10F27CB7004F63F5 /* PBXTextBookmark */ = 8A8A313A10F27CB7004F63F5 /* PBXTextBookmark */; + 8AA243BD10F853DD00AAAC13 /* PBXTextBookmark */ = 8AA243BD10F853DD00AAAC13 /* PBXTextBookmark */; + 8AA2449D10F85AC100AAAC13 /* PBXTextBookmark */ = 8AA2449D10F85AC100AAAC13 /* PBXTextBookmark */; + 8AA2457210F861B100AAAC13 /* PBXTextBookmark */ = 8AA2457210F861B100AAAC13 /* PBXTextBookmark */; + 8AA2457510F861B100AAAC13 /* PBXTextBookmark */ = 8AA2457510F861B100AAAC13 /* PBXTextBookmark */; + 8AA2457610F861B100AAAC13 /* PBXTextBookmark */ = 8AA2457610F861B100AAAC13 /* PBXTextBookmark */; + 8AA2457A10F861B100AAAC13 /* PBXTextBookmark */ = 8AA2457A10F861B100AAAC13 /* PBXTextBookmark */; + 8AA2457D10F861B100AAAC13 /* PBXTextBookmark */ = 8AA2457D10F861B100AAAC13 /* PBXTextBookmark */; + 8AA245C110F8649100AAAC13 /* PBXTextBookmark */ = 8AA245C110F8649100AAAC13 /* PBXTextBookmark */; + 8AA245C310F8649100AAAC13 /* PBXTextBookmark */ = 8AA245C310F8649100AAAC13 /* PBXTextBookmark */; + 8AA245C510F8649100AAAC13 /* PBXTextBookmark */ = 8AA245C510F8649100AAAC13 /* PBXTextBookmark */; + 8AA245C810F8649100AAAC13 /* PBXTextBookmark */ = 8AA245C810F8649100AAAC13 /* PBXTextBookmark */; + 8AA245CC10F8649100AAAC13 /* PBXTextBookmark */ = 8AA245CC10F8649100AAAC13 /* PBXTextBookmark */; + 8AA245CD10F8649100AAAC13 /* PBXTextBookmark */ = 8AA245CD10F8649100AAAC13 /* PBXTextBookmark */; + 8AA245CF10F8649100AAAC13 /* PBXTextBookmark */ = 8AA245CF10F8649100AAAC13 /* PBXTextBookmark */; + 8AA245DF10F865EB00AAAC13 /* PBXTextBookmark */ = 8AA245DF10F865EB00AAAC13 /* PBXTextBookmark */; + 8AA245E710F865EB00AAAC13 /* PBXTextBookmark */ = 8AA245E710F865EB00AAAC13 /* PBXTextBookmark */; + 8AA245FF10F8677A00AAAC13 /* PBXTextBookmark */ = 8AA245FF10F8677A00AAAC13 /* PBXTextBookmark */; + 8AA2460010F8677A00AAAC13 /* PBXTextBookmark */ = 8AA2460010F8677A00AAAC13 /* PBXTextBookmark */; + 8AA2460310F8677A00AAAC13 /* PBXTextBookmark */ = 8AA2460310F8677A00AAAC13 /* PBXTextBookmark */; + 8AA2467F10F86AC400AAAC13 /* PBXTextBookmark */ = 8AA2467F10F86AC400AAAC13 /* PBXTextBookmark */; + 8AA2468010F86AC400AAAC13 /* PBXTextBookmark */ = 8AA2468010F86AC400AAAC13 /* PBXTextBookmark */; + 8AA2468210F86AC400AAAC13 /* PBXTextBookmark */ = 8AA2468210F86AC400AAAC13 /* PBXTextBookmark */; + 8AA2468310F86AC400AAAC13 /* PBXTextBookmark */ = 8AA2468310F86AC400AAAC13 /* PBXTextBookmark */; + 8AA2469D10F86C8200AAAC13 /* PBXTextBookmark */ = 8AA2469D10F86C8200AAAC13 /* PBXTextBookmark */; + 8AA246BD10F86D8D00AAAC13 /* PBXTextBookmark */ = 8AA246BD10F86D8D00AAAC13 /* PBXTextBookmark */; + 8AA246C610F86E6400AAAC13 /* PBXTextBookmark */ = 8AA246C610F86E6400AAAC13 /* PBXTextBookmark */; + 8AA246C910F86E6400AAAC13 /* PBXTextBookmark */ = 8AA246C910F86E6400AAAC13 /* PBXTextBookmark */; + 8AA246E610F86F3300AAAC13 /* PBXTextBookmark */ = 8AA246E610F86F3300AAAC13 /* PBXTextBookmark */; + 8AA246E710F86F3300AAAC13 /* PBXTextBookmark */ = 8AA246E710F86F3300AAAC13 /* PBXTextBookmark */; + 8AA246E910F86F3300AAAC13 /* PBXTextBookmark */ = 8AA246E910F86F3300AAAC13 /* PBXTextBookmark */; + 8AA2470510F86F9E00AAAC13 /* PBXTextBookmark */ = 8AA2470510F86F9E00AAAC13 /* PBXTextBookmark */; + 8AA2470610F86F9E00AAAC13 /* PBXTextBookmark */ = 8AA2470610F86F9E00AAAC13 /* PBXTextBookmark */; + 8AA2470A10F86F9E00AAAC13 /* PBXTextBookmark */ = 8AA2470A10F86F9E00AAAC13 /* PBXTextBookmark */; + 8AA2471610F8702600AAAC13 /* PBXBookmark */ = 8AA2471610F8702600AAAC13 /* PBXBookmark */; + 8AA2471910F8702600AAAC13 /* PBXBookmark */ = 8AA2471910F8702600AAAC13 /* PBXBookmark */; + 8AA2479310F8765600AAAC13 /* PBXTextBookmark */ = 8AA2479310F8765600AAAC13 /* PBXTextBookmark */; + 8AA2479510F8765600AAAC13 /* PBXTextBookmark */ = 8AA2479510F8765600AAAC13 /* PBXTextBookmark */; + 8AA247A710F878A000AAAC13 /* PBXTextBookmark */ = 8AA247A710F878A000AAAC13 /* PBXTextBookmark */; + 8AA643C51104318E00F70400 /* PBXTextBookmark */ = 8AA643C51104318E00F70400 /* PBXTextBookmark */; + 8AA643C61104318E00F70400 /* PBXTextBookmark */ = 8AA643C61104318E00F70400 /* PBXTextBookmark */; + 8AA643C71104318E00F70400 /* PBXTextBookmark */ = 8AA643C71104318E00F70400 /* PBXTextBookmark */; + 8AA643C81104318E00F70400 /* PBXTextBookmark */ = 8AA643C81104318E00F70400 /* PBXTextBookmark */; + 8AA643C91104318E00F70400 /* PBXTextBookmark */ = 8AA643C91104318E00F70400 /* PBXTextBookmark */; + 8AA643CC1104318E00F70400 /* PBXTextBookmark */ = 8AA643CC1104318E00F70400 /* PBXTextBookmark */; + 8AA643CD1104318E00F70400 /* PBXTextBookmark */ = 8AA643CD1104318E00F70400 /* PBXTextBookmark */; + 8AA643CE1104318E00F70400 /* PBXTextBookmark */ = 8AA643CE1104318E00F70400 /* PBXTextBookmark */; + 8AA643CF1104318E00F70400 /* PBXTextBookmark */ = 8AA643CF1104318E00F70400 /* PBXTextBookmark */; + 8AA643FE110432DC00F70400 /* PBXTextBookmark */ = 8AA643FE110432DC00F70400 /* PBXTextBookmark */; + 8AA644051104340B00F70400 /* PBXTextBookmark */ = 8AA644051104340B00F70400 /* PBXTextBookmark */; + 8AA644061104340B00F70400 /* PBXTextBookmark */ = 8AA644061104340B00F70400 /* PBXTextBookmark */; + 8AC3BB8D10FB86800001CD77 /* PBXTextBookmark */ = 8AC3BB8D10FB86800001CD77 /* PBXTextBookmark */; + 8AC3BB9010FB86800001CD77 /* PBXTextBookmark */ = 8AC3BB9010FB86800001CD77 /* PBXTextBookmark */; + 8AC3BB9110FB86800001CD77 /* PBXTextBookmark */ = 8AC3BB9110FB86800001CD77 /* PBXTextBookmark */; + 8AC3BB9210FB86800001CD77 /* PBXTextBookmark */ = 8AC3BB9210FB86800001CD77 /* PBXTextBookmark */; + 8AC3BB9310FB86800001CD77 /* PBXTextBookmark */ = 8AC3BB9310FB86800001CD77 /* PBXTextBookmark */; + 8AC3BB9F10FB86800001CD77 /* PBXTextBookmark */ = 8AC3BB9F10FB86800001CD77 /* PBXTextBookmark */; }; sourceControlManager = 8A8A2FB710F26A5D004F63F5 /* Source Control */; userBuildSettings = { @@ -419,16 +351,6 @@ path = /Volumes/SECOND/iPhoneProjects/boost_1_41_0/boost/filesystem/convenience.hpp; sourceTree = ""; }; - 8A3B3BB910F3281500CDC4D4 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2514C27110084DB100A42282 /* ESRenderer.h */; - name = "ESRenderer.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 329; - vrLoc = 0; - }; 8A3B3BBA10F3281500CDC4D4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 28FD14FC0DC6FC130079059D /* EAGLView.h */; @@ -665,6 +587,11 @@ name = GLUT_Window_Template.cpp; path = /Volumes/SECOND/iPhoneProjects/3dEngine/vs/GLUT_Window_Template.cpp; sourceTree = ""; + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1069, 9360}}"; + sepNavSelRange = "{4335, 112}"; + sepNavVisRange = "{3920, 758}"; + }; }; 8A3B3D3810F33F4300CDC4D4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; @@ -801,16 +728,6 @@ vrLen = 544; vrLoc = 0; }; - 8A3CCE9D10FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2437010F8535A00AAAC13 /* SEDefinition.h */; - name = "SEDefinition.h: 9"; - rLen = 0; - rLoc = 264; - rType = 0; - vrLen = 752; - vrLoc = 0; - }; 8A3CCE9E10FF56F900879847 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8A3B3C4110F3307A00CDC4D4 /* out.txt */; @@ -821,306 +738,6 @@ vrLen = 452; vrLoc = 21136; }; - 8A3CCEA110FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439510F8537000AAAC13 /* SEVertexGroup.h */; - name = "SEVertexGroup.h: 26"; - rLen = 0; - rLoc = 601; - rType = 0; - vrLen = 786; - vrLoc = 225; - }; - 8A3CCEA310FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439B10F8537F00AAAC13 /* SEImage.h */; - name = "SEImage.h: 8"; - rLen = 0; - rLoc = 130; - rType = 0; - vrLen = 544; - vrLoc = 0; - }; - 8A3CCEA410FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8A3B3C4110F3307A00CDC4D4 /* out.txt */; - name = "out.txt: 717"; - rLen = 0; - rLoc = 21390; - rType = 0; - vrLen = 452; - vrLoc = 21136; - }; - 8A3CCEA510FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439310F8537000AAAC13 /* SETexture.h */; - name = "SETexture.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 365; - vrLoc = 0; - }; - 8A3CCEA610FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439110F8537000AAAC13 /* SEMesh.h */; - name = "SEMesh.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 676; - vrLoc = 0; - }; - 8A3CCEA710FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 296; - vrLoc = 0; - }; - 8A3CCEA810FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */; - name = "SEVertexGroup.cpp: 49"; - rLen = 199; - rLoc = 978; - rType = 0; - vrLen = 761; - vrLoc = 857; - }; - 8A3CCEA910FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 296; - vrLoc = 0; - }; - 8A3CCEAA10FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 21"; - rLen = 0; - rLoc = 696; - rType = 0; - vrLen = 316; - vrLoc = 0; - }; - 8A3CCEAB10FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 296; - vrLoc = 0; - }; - 8A3CCEAC10FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 15"; - rLen = 0; - rLoc = 415; - rType = 0; - vrLen = 316; - vrLoc = 0; - }; - 8A3CCEAD10FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 296; - vrLoc = 0; - }; - 8A3CCEAE10FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 14"; - rLen = 17; - rLoc = 260; - rType = 0; - vrLen = 317; - vrLoc = 0; - }; - 8A3CCEAF10FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439510F8537000AAAC13 /* SEVertexGroup.h */; - name = "SEVertexGroup.h: 22"; - rLen = 0; - rLoc = 543; - rType = 0; - vrLen = 774; - vrLoc = 225; - }; - 8A3CCEB010FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */; - name = "SEVertexGroup.cpp: 100"; - rLen = 0; - rLoc = 2232; - rType = 0; - vrLen = 599; - vrLoc = 1633; - }; - 8A3CCEB110FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 5"; - rLen = 0; - rLoc = 135; - rType = 0; - vrLen = 332; - vrLoc = 0; - }; - 8A3CCEB210FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 14"; - rLen = 17; - rLoc = 260; - rType = 0; - vrLen = 317; - vrLoc = 0; - }; - 8A3CCEB310FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 4"; - rLen = 0; - rLoc = 120; - rType = 0; - vrLen = 345; - vrLoc = 0; - }; - 8A3CCEB410FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439510F8537000AAAC13 /* SEVertexGroup.h */; - name = "SEVertexGroup.h: 26"; - rLen = 0; - rLoc = 619; - rType = 0; - vrLen = 786; - vrLoc = 225; - }; - 8A3CCEB510FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */; - name = "SEVertexGroup.cpp: 99"; - rLen = 0; - rLoc = 2232; - rType = 0; - vrLen = 628; - vrLoc = 1604; - }; - 8A3CCEB610FF56F900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439510F8537000AAAC13 /* SEVertexGroup.h */; - name = "SEVertexGroup.h: 26"; - rLen = 0; - rLoc = 601; - rType = 0; - vrLen = 786; - vrLoc = 225; - }; - 8A3CCEBC10FF580000879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 13"; - rLen = 0; - rLoc = 236; - rType = 0; - vrLen = 334; - vrLoc = 0; - }; - 8A3CCEBE10FF580000879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */; - name = "SEVertexGroup.cpp: 86"; - rLen = 0; - rLoc = 1930; - rType = 0; - vrLen = 572; - vrLoc = 0; - }; - 8A3CCEBF10FF580000879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439010F8537000AAAC13 /* SEMesh.cpp */; - name = "SEMesh.cpp: 98"; - rLen = 0; - rLoc = 1916; - rType = 0; - vrLen = 683; - vrLoc = 1647; - }; - 8A3CCEC010FF580000879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439110F8537000AAAC13 /* SEMesh.h */; - name = "SEMesh.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 676; - vrLoc = 0; - }; - 8A3CCEC110FF580000879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 11"; - rLen = 0; - rLoc = 233; - rType = 0; - vrLen = 317; - vrLoc = 0; - }; - 8A3CCEC210FF580000879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439310F8537000AAAC13 /* SETexture.h */; - name = "SETexture.h: 23"; - rLen = 12; - rLoc = 434; - rType = 0; - vrLen = 365; - vrLoc = 0; - }; - 8A3CCEC310FF580000879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 12"; - rLen = 0; - rLoc = 233; - rType = 0; - vrLen = 334; - vrLoc = 0; - }; - 8A3CCEC410FF580000879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 3"; - rLen = 16; - rLoc = 99; - rType = 0; - vrLen = 345; - vrLoc = 0; - }; - 8A3CCEC510FF580000879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 13"; - rLen = 0; - rLoc = 236; - rType = 0; - vrLen = 334; - vrLoc = 0; - }; 8A3CCEC710FF58C100879847 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8AA2439110F8537000AAAC13 /* SEMesh.h */; @@ -1131,675 +748,359 @@ vrLen = 676; vrLoc = 0; }; - 8A3CCEC810FF58C100879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */; - name = "SEVertexGroup.cpp: 50"; - rLen = 199; - rLoc = 978; - rType = 0; - vrLen = 726; - vrLoc = 882; - }; - 8A3CCEC910FF58C100879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439310F8537000AAAC13 /* SETexture.h */; - name = "SETexture.h: 14"; - rLen = 0; - rLoc = 251; - rType = 0; - vrLen = 370; - vrLoc = 0; - }; - 8A3CCECA10FF58C100879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 11"; - rLen = 0; - rLoc = 315; - rType = 0; - vrLen = 514; - vrLoc = 0; - }; - 8A3CCECB10FF58C100879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439010F8537000AAAC13 /* SEMesh.cpp */; - name = "SEMesh.cpp: 98"; - rLen = 0; - rLoc = 1916; - rType = 0; - vrLen = 683; - vrLoc = 1647; - }; - 8A3CCECC10FF58C100879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439210F8537000AAAC13 /* SETexture.cpp */; - name = "SETexture.cpp: 13"; - rLen = 0; - rLoc = 190; - rType = 0; - vrLen = 794; - vrLoc = 51; - }; - 8A3CCECD10FF58C100879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 9"; - rLen = 0; - rLoc = 310; - rType = 0; - vrLen = 514; - vrLoc = 0; - }; - 8A3CCECE10FF58C100879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439110F8537000AAAC13 /* SEMesh.h */; - name = "SEMesh.h: 22"; - rLen = 30; - rLoc = 472; - rType = 0; - vrLen = 676; - vrLoc = 0; - }; - 8A3CCECF10FF58C100879847 /* PBXTextBookmark */ = { + 8A3CCF0710FF5BFD00879847 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8AA2439310F8537000AAAC13 /* SETexture.h */; - name = "SETexture.h: 10"; + name = "SETexture.h: 21"; rLen = 0; - rLoc = 212; + rLoc = 377; rType = 0; - vrLen = 370; + vrLen = 412; vrLoc = 0; }; - 8A3CCED010FF58C100879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */; - name = "SEVertexGroup.cpp: 50"; - rLen = 199; - rLoc = 978; - rType = 0; - vrLen = 726; - vrLoc = 882; - }; - 8A3CCED110FF58C100879847 /* PBXTextBookmark */ = { + 8A3CCF0910FF5BFD00879847 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8AA2439210F8537000AAAC13 /* SETexture.cpp */; - name = "SETexture.cpp: 33"; - rLen = 0; - rLoc = 832; - rType = 0; - vrLen = 751; - vrLoc = 0; - }; - 8A3CCED210FF58C100879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439310F8537000AAAC13 /* SETexture.h */; - name = "SETexture.h: 14"; + name = "SETexture.cpp: 3"; rLen = 0; - rLoc = 251; + rLoc = 70; rType = 0; - vrLen = 370; + vrLen = 747; vrLoc = 0; }; - 8A3CCED310FF58C100879847 /* PBXTextBookmark */ = { + 8A6F6EB6110483F4006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 11"; + fRef = 8AA2437910F8535A00AAAC13 /* SEIncludeLibrary.h */; + name = "SEIncludeLibrary.h: 13"; rLen = 0; - rLoc = 315; + rLoc = 237; rType = 0; - vrLen = 514; + vrLen = 436; vrLoc = 0; }; - 8A3CCED410FF58C100879847 /* PBXTextBookmark */ = { + 8A6F6EB7110483F4006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439210F8537000AAAC13 /* SETexture.cpp */; - name = "SETexture.cpp: 13"; - rLen = 0; - rLoc = 190; - rType = 0; - vrLen = 794; - vrLoc = 51; - }; - 8A3CCED510FF58C100879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439010F8537000AAAC13 /* SEMesh.cpp */; - name = "SEMesh.cpp: 98"; - rLen = 0; - rLoc = 1916; - rType = 0; - vrLen = 683; - vrLoc = 1647; - }; - 8A3CCED610FF58C100879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2439210F8537000AAAC13 /* SETexture.cpp */; - name = "SETexture.cpp: 49"; - rLen = 0; - rLoc = 1116; - rType = 0; - vrLen = 619; - vrLoc = 522; - }; - 8A3CCEE110FF5A5700879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 7"; + fRef = 1D3623250D0F684500981E51 /* sampleAppDelegate.m */; + name = "sampleAppDelegate.m: 21"; rLen = 0; - rLoc = 130; + rLoc = 383; rType = 0; - vrLen = 357; + vrLen = 587; vrLoc = 0; }; - 8A3CCEE210FF5A5700879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - comments = "warning: unused variable 'squareColors'"; - fRef = 2514C26E10084DB100A42282 /* ES1Renderer.m */; - rLen = 1; - rLoc = 94; - rType = 1; - }; - 8A3CCEE310FF5A5700879847 /* PBXTextBookmark */ = { + 8A6F6EB8110483F4006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 7"; + fRef = 2514C26F10084DB100A42282 /* ES2Renderer.h */; + name = "ES2Renderer.h: 6"; rLen = 0; rLoc = 130; rType = 0; - vrLen = 357; - vrLoc = 0; - }; - 8A3CCEE410FF5A5700879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2514C26E10084DB100A42282 /* ES1Renderer.m */; - name = "ES1Renderer.m: 95"; - rLen = 44; - rLoc = 2385; - rType = 0; - vrLen = 720; - vrLoc = 2352; - }; - 8A3CCEE610FF5A5D00879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2514C26E10084DB100A42282 /* ES1Renderer.m */; - name = "ES1Renderer.m: 95"; - rLen = 44; - rLoc = 2385; - rType = 0; - vrLen = 720; - vrLoc = 2352; - }; - 8A3CCEE710FF5A5D00879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - comments = "error: 'SEVertexGroup' has not been declared"; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - rLen = 1; - rLoc = 19; - rType = 1; - }; - 8A3CCEE810FF5A5D00879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2514C26E10084DB100A42282 /* ES1Renderer.m */; - name = "ES1Renderer.m: 95"; - rLen = 44; - rLoc = 2385; - rType = 0; - vrLen = 720; - vrLoc = 2352; - }; - 8A3CCEE910FF5A5D00879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 13"; - rLen = 0; - rLoc = 323; - rType = 0; - vrLen = 271; - vrLoc = 0; - }; - 8A3CCEEE10FF5AC900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 19"; - rLen = 0; - rLoc = 372; - rType = 0; - vrLen = 379; - vrLoc = 22; - }; - 8A3CCEEF10FF5AC900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - comments = "error: 'streq' was not declared in this scope"; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - rLen = 1; - rLoc = 24; - rType = 1; - }; - 8A3CCEF010FF5AC900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 13"; - rLen = 51; - rLoc = 308; - rType = 0; - vrLen = 271; - vrLoc = 0; - }; - 8A3CCEF110FF5AC900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 19"; - rLen = 0; - rLoc = 372; - rType = 0; - vrLen = 381; - vrLoc = 0; - }; - 8A3CCEF210FF5AC900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 1"; - rLen = 0; - rLoc = 71; - rType = 0; - vrLen = 276; - vrLoc = 0; - }; - 8A3CCEF310FF5AC900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 19"; - rLen = 0; - rLoc = 372; - rType = 0; - vrLen = 379; - vrLoc = 22; - }; - 8A3CCEF410FF5AC900879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 2"; - rLen = 47; - rLoc = 24; - rType = 0; - vrLen = 351; - vrLoc = 0; - }; - 8A3CCEF910FF5BD300879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 20"; - rLen = 0; - rLoc = 361; - rType = 0; - vrLen = 424; - vrLoc = 1; - }; - 8A3CCEFA10FF5BD300879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 14"; - rLen = 0; - rLoc = 212; - rType = 0; - vrLen = 402; + vrLen = 638; vrLoc = 0; }; - 8A3CCEFB10FF5BD300879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - comments = "error: expected class-name before '{' token"; - fRef = 8AA2439310F8537000AAAC13 /* SETexture.h */; - rLen = 1; - rLoc = 10; - rType = 1; - }; - 8A3CCEFC10FF5BD300879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 27"; - rLen = 27; - rLoc = 608; - rType = 0; - vrLen = 391; - vrLoc = 168; - }; - 8A3CCEFD10FF5BD300879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 19"; - rLen = 0; - rLoc = 372; - rType = 0; - vrLen = 379; - vrLoc = 22; - }; - 8A3CCEFE10FF5BD300879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 27"; - rLen = 0; - rLoc = 634; - rType = 0; - vrLen = 407; - vrLoc = 133; - }; - 8A3CCEFF10FF5BD300879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 20"; - rLen = 40; - rLoc = 332; - rType = 0; - vrLen = 404; - vrLoc = 22; - }; - 8A3CCF0010FF5BD300879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 14"; - rLen = 35; - rLoc = 187; - rType = 0; - vrLen = 312; - vrLoc = 51; - }; - 8A3CCF0110FF5BD300879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 20"; - rLen = 0; - rLoc = 361; - rType = 0; - vrLen = 424; - vrLoc = 1; - }; - 8A3CCF0210FF5BD300879847 /* PBXTextBookmark */ = { + 8A6F6EBC110483F4006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 14"; + fRef = 8AA2437910F8535A00AAAC13 /* SEIncludeLibrary.h */; + name = "SEIncludeLibrary.h: 13"; rLen = 0; - rLoc = 212; + rLoc = 237; rType = 0; - vrLen = 402; + vrLen = 436; vrLoc = 0; }; - 8A3CCF0310FF5BD300879847 /* PBXTextBookmark */ = { + 8A6F6EBD110483F4006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439310F8537000AAAC13 /* SETexture.h */; - name = "SETexture.h: 18"; + fRef = 1D3623250D0F684500981E51 /* sampleAppDelegate.m */; + name = "sampleAppDelegate.m: 21"; rLen = 0; - rLoc = 284; + rLoc = 383; rType = 0; - vrLen = 382; + vrLen = 587; vrLoc = 0; }; - 8A3CCF0410FF5BEB00879847 /* PBXTextBookmark */ = { + 8A6F6EBE110483F4006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439310F8537000AAAC13 /* SETexture.h */; - name = "SETexture.h: 18"; + fRef = 2514C26F10084DB100A42282 /* ES2Renderer.h */; + name = "ES2Renderer.h: 6"; rLen = 0; - rLoc = 284; - rType = 0; - vrLen = 382; - vrLoc = 0; - }; - 8A3CCF0610FF5BFD00879847 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 13"; - rLen = 24; - rLoc = 200; + rLoc = 130; rType = 0; - vrLen = 357; + vrLen = 638; vrLoc = 0; }; - 8A3CCF0710FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6EEE110485BE006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439310F8537000AAAC13 /* SETexture.h */; - name = "SETexture.h: 21"; - rLen = 0; - rLoc = 377; + fRef = 8AA2437810F8535A00AAAC13 /* SEImageLoader.h */; + name = "SEImageLoader.h: 8"; + rLen = 21; + rLoc = 136; rType = 0; - vrLen = 412; + vrLen = 475; vrLoc = 0; }; - 8A3CCF0810FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6EEF110485BE006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 15"; - rLen = 0; - rLoc = 323; + fRef = 8AA2437010F8535A00AAAC13 /* SEDefinition.h */; + name = "SEDefinition.h: 9"; + rLen = 63; + rLoc = 272; rType = 0; - vrLen = 499; + vrLen = 1039; vrLoc = 0; }; - 8A3CCF0910FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6EF0110485BE006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439210F8537000AAAC13 /* SETexture.cpp */; - name = "SETexture.cpp: 3"; - rLen = 0; - rLoc = 70; + fRef = 8AA2437510F8535A00AAAC13 /* SEFileReaderBase.cpp */; + name = "SEFileReaderBase.cpp: 21"; + rLen = 32; + rLoc = 358; rType = 0; - vrLen = 747; - vrLoc = 0; + vrLen = 651; + vrLoc = 149; }; - 8A3CCF0A10FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6EF2110485BE006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439510F8537000AAAC13 /* SEVertexGroup.h */; - name = "SEVertexGroup.h: 38"; + fRef = 8AA6417211042F5800F70400 /* SEPhysicWorld.cpp */; + name = "SEPhysicWorld.cpp: 1"; rLen = 0; - rLoc = 922; + rLoc = 0; rType = 0; - vrLen = 788; - vrLoc = 225; + vrLen = 773; + vrLoc = 0; }; - 8A3CCF0B10FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6EF3110485BE006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */; - name = "SEVertexGroup.cpp: 50"; - rLen = 199; - rLoc = 978; + fRef = 8AA2437810F8535A00AAAC13 /* SEImageLoader.h */; + name = "SEImageLoader.h: 8"; + rLen = 21; + rLoc = 136; rType = 0; - vrLen = 518; - vrLoc = 27; + vrLen = 475; + vrLoc = 0; }; - 8A3CCF0C10FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6F061104868D006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439210F8537000AAAC13 /* SETexture.cpp */; - name = "SETexture.cpp: 53"; + fRef = 8AA2437710F8535A00AAAC13 /* SEImageLoader.cpp */; + name = "SEImageLoader.cpp: 39"; rLen = 0; - rLoc = 1176; + rLoc = 827; rType = 0; - vrLen = 751; - vrLoc = 0; + vrLen = 694; + vrLoc = 473; }; - 8A3CCF0D10FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6F071104868D006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439310F8537000AAAC13 /* SETexture.h */; - name = "SETexture.h: 16"; + fRef = 2514C27110084DB100A42282 /* ESRenderer.h */; + name = "ESRenderer.h: 1"; rLen = 0; - rLoc = 251; + rLoc = 0; rType = 0; - vrLen = 370; + vrLen = 348; vrLoc = 0; }; - 8A3CCF0E10FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6F0A1104868D006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; - name = "SEMaterial.h: 13"; - rLen = 24; - rLoc = 200; + fRef = 8AA2437710F8535A00AAAC13 /* SEImageLoader.cpp */; + name = "SEImageLoader.cpp: 39"; + rLen = 0; + rLoc = 827; rType = 0; - vrLen = 357; - vrLoc = 0; + vrLen = 694; + vrLoc = 473; }; - 8A3CCF0F10FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6F0C1104868D006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 13"; + fRef = 2514C27110084DB100A42282 /* ESRenderer.h */; + name = "ESRenderer.h: 1"; rLen = 0; - rLoc = 323; + rLoc = 0; rType = 0; - vrLen = 361; + vrLen = 348; vrLoc = 0; }; - 8A3CCF1010FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6F261104894F006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439210F8537000AAAC13 /* SETexture.cpp */; - name = "SETexture.cpp: 44"; - rLen = 34; - rLoc = 1006; + fRef = 28FD14FD0DC6FC130079059D /* EAGLView.m */; + name = "EAGLView.m: 26"; + rLen = 0; + rLoc = 514; rType = 0; - vrLen = 635; - vrLoc = 453; + vrLen = 763; + vrLoc = 1121; }; - 8A3CCF1110FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6F271104894F006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439310F8537000AAAC13 /* SETexture.h */; - name = "SETexture.h: 21"; - rLen = 0; - rLoc = 377; + fRef = 8A3B3D1D10F33E1E00CDC4D4 /* GLUT_Window_Template.cpp */; + name = "GLUT_Window_Template.cpp: 147"; + rLen = 112; + rLoc = 4335; rType = 0; - vrLen = 412; - vrLoc = 0; + vrLen = 758; + vrLoc = 3920; }; - 8A3CCF1210FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6F2A1104894F006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439210F8537000AAAC13 /* SETexture.cpp */; - name = "SETexture.cpp: 38"; + fRef = 28FD14FD0DC6FC130079059D /* EAGLView.m */; + name = "EAGLView.m: 26"; rLen = 0; - rLoc = 926; + rLoc = 514; rType = 0; - vrLen = 592; - vrLoc = 453; + vrLen = 763; + vrLoc = 1121; }; - 8A3CCF1310FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6F3111048983006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; - name = "SEMaterial.cpp: 15"; - rLen = 0; - rLoc = 323; + fRef = 2514C26D10084DB100A42282 /* ES1Renderer.h */; + name = "ES1Renderer.h: 24"; + rLen = 17; + rLoc = 501; rType = 0; - vrLen = 499; + vrLen = 623; vrLoc = 0; }; - 8A3CCF1410FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6F3411048983006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439210F8537000AAAC13 /* SETexture.cpp */; - name = "SETexture.cpp: 3"; - rLen = 0; - rLoc = 70; + fRef = 2514C26D10084DB100A42282 /* ES1Renderer.h */; + name = "ES1Renderer.h: 24"; + rLen = 17; + rLoc = 501; rType = 0; - vrLen = 747; + vrLen = 623; vrLoc = 0; }; - 8A3CCF1510FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6F4E11048C36006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439510F8537000AAAC13 /* SEVertexGroup.h */; - name = "SEVertexGroup.h: 26"; + fRef = 8A6F6F4F11048C36006A8EF4 /* btCollisionObject.h */; + name = "btCollisionObject.h: 34"; rLen = 0; - rLoc = 601; + rLoc = 1456; rType = 0; - vrLen = 786; - vrLoc = 225; + vrLen = 1006; + vrLoc = 1059; }; - 8A3CCF1610FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6F4F11048C36006A8EF4 /* btCollisionObject.h */ = { + isa = PBXFileReference; + name = btCollisionObject.h; + path = "/Volumes/SECOND/iPhoneProjects/bullet-trunk/src/BulletCollision/CollisionDispatch/btCollisionObject.h"; + sourceTree = ""; + }; + 8A6F6F5011048C36006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */; - name = "SEVertexGroup.cpp: 50"; - rLen = 199; - rLoc = 978; + fRef = 8A6F6F5111048C36006A8EF4 /* btCollisionWorld.h */; + name = "btCollisionWorld.h: 391"; + rLen = 0; + rLoc = 14625; rType = 0; - vrLen = 491; - vrLoc = 54; + vrLen = 860; + vrLoc = 14240; + }; + 8A6F6F5111048C36006A8EF4 /* btCollisionWorld.h */ = { + isa = PBXFileReference; + name = btCollisionWorld.h; + path = "/Volumes/SECOND/iPhoneProjects/bullet-trunk/src/BulletCollision/CollisionDispatch/btCollisionWorld.h"; + sourceTree = ""; }; - 8A3CCF1710FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6F5211048C36006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439510F8537000AAAC13 /* SEVertexGroup.h */; - name = "SEVertexGroup.h: 38"; + fRef = 8A6F6F5311048C36006A8EF4 /* btDynamicsWorld.h */; + name = "btDynamicsWorld.h: 39"; rLen = 0; - rLoc = 922; + rLoc = 1687; rType = 0; - vrLen = 788; - vrLoc = 225; + vrLen = 885; + vrLoc = 964; + }; + 8A6F6F5311048C36006A8EF4 /* btDynamicsWorld.h */ = { + isa = PBXFileReference; + name = btDynamicsWorld.h; + path = "/Volumes/SECOND/iPhoneProjects/bullet-trunk/src/BulletDynamics/Dynamics/btDynamicsWorld.h"; + sourceTree = ""; }; - 8A3CCF1810FF5BFD00879847 /* PBXTextBookmark */ = { + 8A6F6F5411048C36006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */; - name = "SEVertexGroup.cpp: 93"; - rLen = 0; - rLoc = 2083; + fRef = 8A6F6F5511048C36006A8EF4 /* btRigidBody.h */; + name = "btRigidBody.h: 41"; + rLen = 47; + rLoc = 2373; rType = 0; - vrLen = 711; - vrLoc = 936; + vrLen = 1413; + vrLoc = 3046; + }; + 8A6F6F5511048C36006A8EF4 /* btRigidBody.h */ = { + isa = PBXFileReference; + name = btRigidBody.h; + path = "/Volumes/SECOND/iPhoneProjects/bullet-trunk/src/BulletDynamics/Dynamics/btRigidBody.h"; + sourceTree = ""; }; - 8A3CCF1C10FF5C1700879847 /* PBXTextBookmark */ = { + 8A6F6F5611048C36006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439310F8537000AAAC13 /* SETexture.h */; - name = "SETexture.h: 18"; + fRef = 8AA6417111042F5800F70400 /* SEPhysicObject.h */; + name = "SEPhysicObject.h: 10"; rLen = 0; - rLoc = 284; + rLoc = 170; rType = 0; - vrLen = 382; + vrLen = 611; vrLoc = 0; }; - 8A3CCF1D10FF5C1700879847 /* PBXTextBookmark */ = { + 8A6F6F5711048C36006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - comments = "error: 'class SEVertexGroup' has no member named 'SetName'"; - fRef = 8AA2439010F8537000AAAC13 /* SEMesh.cpp */; - rLen = 1; - rLoc = 106; - rType = 1; + fRef = 8AA6417311042F5800F70400 /* SEPhysicWorld.h */; + name = "SEPhysicWorld.h: 12"; + rLen = 0; + rLoc = 199; + rType = 0; + vrLen = 1037; + vrLoc = 87; }; - 8A3CCF1E10FF5C1700879847 /* PBXTextBookmark */ = { + 8A6F6F6011049DE0006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439310F8537000AAAC13 /* SETexture.h */; - name = "SETexture.h: 18"; + fRef = 8AA2437110F8535A00AAAC13 /* SEError.cpp */; + name = "SEError.cpp: 11"; rLen = 0; - rLoc = 284; + rLoc = 118; rType = 0; - vrLen = 382; + vrLen = 447; vrLoc = 0; }; - 8A3CCF1F10FF5C1700879847 /* PBXTextBookmark */ = { + 8A6F6F6111049DE0006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439010F8537000AAAC13 /* SEMesh.cpp */; - name = "SEMesh.cpp: 107"; + fRef = 2514C26E10084DB100A42282 /* ES1Renderer.m */; + name = "ES1Renderer.m: 151"; rLen = 0; - rLoc = 2147; + rLoc = 5237; rType = 0; - vrLen = 590; - vrLoc = 1742; + vrLen = 1023; + vrLoc = 4369; }; - 8A3CCF2010FF5C1900879847 /* PBXTextBookmark */ = { + 8A6F6F6211049DE0006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */; - name = "SEVertexGroup.cpp: 68"; + fRef = 8AA6417211042F5800F70400 /* SEPhysicWorld.cpp */; + name = "SEPhysicWorld.cpp: 14"; rLen = 0; - rLoc = 1376; + rLoc = 220; rType = 0; - vrLen = 711; - vrLoc = 936; + vrLen = 773; + vrLoc = 0; }; - 8A3CCF2110FF5C1900879847 /* PBXTextBookmark */ = { + 8A6F6F6311049DE0006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */; - name = "SEVertexGroup.cpp: 68"; + fRef = 2514C26E10084DB100A42282 /* ES1Renderer.m */; + name = "ES1Renderer.m: 151"; rLen = 0; - rLoc = 1376; + rLoc = 5237; rType = 0; - vrLen = 711; - vrLoc = 936; + vrLen = 1023; + vrLoc = 4369; }; - 8A3CCF2210FF5C1900879847 /* PBXTextBookmark */ = { + 8A6F6F6A11049E04006A8EF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2439010F8537000AAAC13 /* SEMesh.cpp */; - name = "SEMesh.cpp: 93"; + fRef = 8AA6417211042F5800F70400 /* SEPhysicWorld.cpp */; + name = "SEPhysicWorld.cpp: 21"; rLen = 0; - rLoc = 1766; + rLoc = 349; rType = 0; - vrLen = 685; - vrLoc = 1647; + vrLen = 885; + vrLoc = 178; }; 8A8A2F9410F26A34004F63F5 /* sample */ = { isa = PBXExecutable; @@ -1900,16 +1201,6 @@ vrLen = 734; vrLoc = 0; }; - 8A8A2FDB10F26B1B004F63F5 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 28FD14FD0DC6FC130079059D /* EAGLView.m */; - name = "EAGLView.m: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 462; - vrLoc = 0; - }; 8A8A2FDD10F26B1B004F63F5 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2514C27110084DB100A42282 /* ESRenderer.h */; @@ -1976,30 +1267,53 @@ }; 8AA2437010F8535A00AAAC13 /* SEDefinition.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {940, 484}}"; - sepNavSelRange = "{264, 0}"; - sepNavVisRange = "{0, 752}"; + sepNavIntBoundsRect = "{{0, 0}, {820, 496}}"; + sepNavSelRange = "{286, 0}"; + sepNavVisRange = "{0, 761}"; + }; + }; + 8AA2437110F8535A00AAAC13 /* SEError.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {935, 481}}"; + sepNavSelRange = "{118, 0}"; + sepNavVisRange = "{0, 447}"; }; }; 8AA2437510F8535A00AAAC13 /* SEFileReaderBase.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {940, 976}}"; - sepNavSelRange = "{358, 0}"; - sepNavVisRange = "{151, 633}"; + sepNavIntBoundsRect = "{{0, 0}, {820, 992}}"; + sepNavSelRange = "{362, 0}"; + sepNavVisRange = "{151, 552}"; }; }; 8AA2437710F8535A00AAAC13 /* SEImageLoader.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {940, 560}}"; - sepNavSelRange = "{337, 0}"; - sepNavVisRange = "{103, 534}"; + sepNavIntBoundsRect = "{{0, 0}, {940, 880}}"; + sepNavSelRange = "{827, 0}"; + sepNavVisRange = "{473, 694}"; + sepNavWindowFrame = "{{15, 153}, {1071, 620}}"; }; }; 8AA2437810F8535A00AAAC13 /* SEImageLoader.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {940, 484}}"; + sepNavIntBoundsRect = "{{0, 0}, {940, 481}}"; sepNavSelRange = "{136, 21}"; - sepNavVisRange = "{0, 357}"; + sepNavVisRange = "{0, 475}"; + }; + }; + 8AA2437910F8535A00AAAC13 /* SEIncludeLibrary.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {940, 481}}"; + sepNavSelRange = "{237, 0}"; + sepNavVisRange = "{0, 436}"; + sepNavWindowFrame = "{{38, 132}, {1071, 620}}"; + }; + }; + 8AA2437B10F8535A00AAAC13 /* SEObjectStore.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {773, 1136}}"; + sepNavSelRange = "{749, 0}"; + sepNavVisRange = "{634, 281}"; }; }; 8AA2437D10F8535A00AAAC13 /* SEPathBase.cpp */ = { @@ -2032,24 +1346,24 @@ }; 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {820, 624}}"; - sepNavSelRange = "{212, 0}"; - sepNavVisRange = "{0, 402}"; + sepNavIntBoundsRect = "{{0, 0}, {940, 992}}"; + sepNavSelRange = "{696, 0}"; + sepNavVisRange = "{0, 621}"; sepNavWindowFrame = "{{61, 111}, {1071, 620}}"; }; }; 8AA2438F10F8537000AAAC13 /* SEMaterial.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {820, 416}}"; - sepNavSelRange = "{361, 0}"; - sepNavVisRange = "{1, 424}"; + sepNavIntBoundsRect = "{{0, 0}, {940, 512}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 591}"; }; }; 8AA2439010F8537000AAAC13 /* SEMesh.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {940, 2992}}"; + sepNavIntBoundsRect = "{{0, 0}, {940, 2848}}"; sepNavSelRange = "{1766, 0}"; - sepNavVisRange = "{1647, 685}"; + sepNavVisRange = "{1634, 691}"; sepNavWindowFrame = "{{38, 132}, {1071, 620}}"; }; }; @@ -2076,16 +1390,16 @@ }; 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {940, 1664}}"; - sepNavSelRange = "{1376, 0}"; - sepNavVisRange = "{936, 711}"; + sepNavIntBoundsRect = "{{0, 0}, {940, 1840}}"; + sepNavSelRange = "{978, 199}"; + sepNavVisRange = "{883, 789}"; }; }; 8AA2439510F8537000AAAC13 /* SEVertexGroup.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {940, 688}}"; - sepNavSelRange = "{922, 0}"; - sepNavVisRange = "{225, 788}"; + sepNavIntBoundsRect = "{{0, 0}, {940, 720}}"; + sepNavSelRange = "{543, 0}"; + sepNavVisRange = "{201, 840}"; }; }; 8AA2439A10F8537F00AAAC13 /* SEImage.cpp */ = { @@ -2215,16 +1529,6 @@ vrLen = 353; vrLoc = 0; }; - 8AA2458510F8621200AAAC13 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8A3B3D1D10F33E1E00CDC4D4 /* GLUT_Window_Template.cpp */; - name = "GLUT_Window_Template.cpp: 431"; - rLen = 83; - rLoc = 11236; - rType = 0; - vrLen = 658; - vrLoc = 10756; - }; 8AA245B310F8642900AAAC13 /* NSObjCRuntime.h */ = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; @@ -2272,16 +1576,6 @@ vrLen = 544; vrLoc = 0; }; - 8AA245C910F8649100AAAC13 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2514C26D10084DB100A42282 /* ES1Renderer.h */; - name = "ES1Renderer.h: 11"; - rLen = 58; - rLoc = 155; - rType = 0; - vrLen = 593; - vrLoc = 0; - }; 8AA245CC10F8649100AAAC13 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8AA2437D10F8535A00AAAC13 /* SEPathBase.cpp */; @@ -2322,16 +1616,6 @@ vrLen = 413; vrLoc = 268; }; - 8AA245E010F865EB00AAAC13 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2437510F8535A00AAAC13 /* SEFileReaderBase.cpp */; - name = "SEFileReaderBase.cpp: 21"; - rLen = 0; - rLoc = 358; - rType = 0; - vrLen = 633; - vrLoc = 151; - }; 8AA245E710F865EB00AAAC13 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8AA2437510F8535A00AAAC13 /* SEFileReaderBase.cpp */; @@ -2372,26 +1656,6 @@ vrLen = 332; vrLoc = 0; }; - 8AA2460D10F867B000AAAC13 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8AA2437710F8535A00AAAC13 /* SEImageLoader.cpp */; - name = "SEImageLoader.cpp: 23"; - rLen = 0; - rLoc = 474; - rType = 0; - vrLen = 482; - vrLoc = 155; - }; - 8AA2463210F868C000AAAC13 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2514C26F10084DB100A42282 /* ES2Renderer.h */; - name = "ES2Renderer.h: 8"; - rLen = 0; - rLoc = 130; - rType = 0; - vrLen = 607; - vrLoc = 0; - }; 8AA2467F10F86AC400AAAC13 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 32CA4F630368D1EE00C91783 /* sample_Prefix.pch */; @@ -2412,16 +1676,6 @@ vrLen = 353; vrLoc = 0; }; - 8AA2468110F86AC400AAAC13 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1D3623250D0F684500981E51 /* sampleAppDelegate.m */; - name = "sampleAppDelegate.m: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 469; - vrLoc = 264; - }; 8AA2468210F86AC400AAAC13 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 1D3623240D0F684500981E51 /* sampleAppDelegate.h */; @@ -2459,16 +1713,6 @@ path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES1/gl.h; sourceTree = ""; }; - 8AA246A810F86D2B00AAAC13 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2514C26D10084DB100A42282 /* ES1Renderer.h */; - name = "ES1Renderer.h: 24"; - rLen = 17; - rLoc = 501; - rType = 0; - vrLen = 593; - vrLoc = 0; - }; 8AA246BD10F86D8D00AAAC13 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8AA2439B10F8537F00AAAC13 /* SEImage.h */; @@ -2479,16 +1723,6 @@ vrLen = 544; vrLoc = 0; }; - 8AA246C510F86E6400AAAC13 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 28FD14FD0DC6FC130079059D /* EAGLView.m */; - name = "EAGLView.m: 131"; - rLen = 0; - rLoc = 3542; - rType = 0; - vrLen = 888; - vrLoc = 225; - }; 8AA246C610F86E6400AAAC13 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8AA246C710F86E6400AAAC13 /* gl.h */; @@ -2513,7 +1747,7 @@ rLen = 0; rLoc = 3867; rType = 0; - vrLen = 861; + vrLen = 798; vrLoc = 3122; }; 8AA246E610F86F3300AAAC13 /* PBXTextBookmark */ = { @@ -2580,16 +1814,6 @@ vrLen = 567; vrLoc = 3912; }; - 8AA2470910F86F9E00AAAC13 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2514C26E10084DB100A42282 /* ES1Renderer.m */; - name = "ES1Renderer.m: 74"; - rLen = 0; - rLoc = 2093; - rType = 0; - vrLen = 494; - vrLoc = 1963; - }; 8AA2470A10F86F9E00AAAC13 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 8AA2439110F8537000AAAC13 /* SEMesh.h */; @@ -2652,35 +1876,153 @@ vrLen = 1256; vrLoc = 121; }; - 8AC3BB8910FB86800001CD77 /* PBXTextBookmark */ = { + 8AA6417111042F5800F70400 /* SEPhysicObject.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {940, 528}}"; + sepNavSelRange = "{170, 0}"; + sepNavVisRange = "{0, 611}"; + }; + }; + 8AA6417211042F5800F70400 /* SEPhysicWorld.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1503, 656}}"; + sepNavSelRange = "{349, 0}"; + sepNavVisRange = "{178, 885}"; + }; + }; + 8AA6417311042F5800F70400 /* SEPhysicWorld.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1433, 672}}"; + sepNavSelRange = "{199, 0}"; + sepNavVisRange = "{87, 1037}"; + }; + }; + 8AA643C51104318E00F70400 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 2514C26E10084DB100A42282 /* ES1Renderer.m */; - name = "ES1Renderer.m: 63"; + fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; + name = "SEMaterial.h: 1"; rLen = 0; - rLoc = 1727; + rLoc = 0; rType = 0; - vrLen = 822; - vrLoc = 1307; + vrLen = 591; + vrLoc = 0; }; - 8AC3BB8A10FB86800001CD77 /* PBXTextBookmark */ = { + 8AA643C61104318E00F70400 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2437810F8535A00AAAC13 /* SEImageLoader.h */; - name = "SEImageLoader.h: 8"; - rLen = 21; - rLoc = 136; + fRef = 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */; + name = "SEVertexGroup.cpp: 46"; + rLen = 199; + rLoc = 978; + rType = 0; + vrLen = 789; + vrLoc = 883; + }; + 8AA643C71104318E00F70400 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; + name = "SEMaterial.cpp: 35"; + rLen = 0; + rLoc = 696; rType = 0; - vrLen = 357; + vrLen = 621; vrLoc = 0; }; - 8AC3BB8B10FB86800001CD77 /* PBXTextBookmark */ = { + 8AA643C81104318E00F70400 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 8AA2437710F8535A00AAAC13 /* SEImageLoader.cpp */; - name = "SEImageLoader.cpp: 19"; + fRef = 8AA2439510F8537000AAAC13 /* SEVertexGroup.h */; + name = "SEVertexGroup.h: 22"; rLen = 0; - rLoc = 337; + rLoc = 543; rType = 0; - vrLen = 534; - vrLoc = 103; + vrLen = 840; + vrLoc = 201; + }; + 8AA643C91104318E00F70400 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8AA2439010F8537000AAAC13 /* SEMesh.cpp */; + name = "SEMesh.cpp: 84"; + rLen = 0; + rLoc = 1766; + rType = 0; + vrLen = 691; + vrLoc = 1634; + }; + 8AA643CC1104318E00F70400 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8AA2438F10F8537000AAAC13 /* SEMaterial.h */; + name = "SEMaterial.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 591; + vrLoc = 0; + }; + 8AA643CD1104318E00F70400 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8AA2439410F8537000AAAC13 /* SEVertexGroup.cpp */; + name = "SEVertexGroup.cpp: 46"; + rLen = 199; + rLoc = 978; + rType = 0; + vrLen = 789; + vrLoc = 883; + }; + 8AA643CE1104318E00F70400 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8AA2438E10F8537000AAAC13 /* SEMaterial.cpp */; + name = "SEMaterial.cpp: 35"; + rLen = 0; + rLoc = 696; + rType = 0; + vrLen = 621; + vrLoc = 0; + }; + 8AA643CF1104318E00F70400 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8AA2439510F8537000AAAC13 /* SEVertexGroup.h */; + name = "SEVertexGroup.h: 22"; + rLen = 0; + rLoc = 543; + rType = 0; + vrLen = 840; + vrLoc = 201; + }; + 8AA643FC110432DC00F70400 /* btDbvt.h */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = btDbvt.h; + path = /Volumes/SECOND/iPhoneProjects/SIO2_SDK_v1.3.5/src/bullet/btDbvt.h; + sourceTree = ""; + }; + 8AA643FE110432DC00F70400 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8AA2437910F8535A00AAAC13 /* SEIncludeLibrary.h */; + name = "SEIncludeLibrary.h: 9"; + rLen = 0; + rLoc = 123; + rType = 0; + vrLen = 436; + vrLoc = 0; + }; + 8AA644051104340B00F70400 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8AA643FC110432DC00F70400 /* btDbvt.h */; + name = "btDbvt.h: 488"; + rLen = 0; + rLoc = 14365; + rType = 0; + vrLen = 916; + vrLoc = 13907; + }; + 8AA644061104340B00F70400 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8AA643FC110432DC00F70400 /* btDbvt.h */; + name = "btDbvt.h: 488"; + rLen = 0; + rLoc = 14365; + rType = 0; + vrLen = 916; + vrLoc = 13907; }; 8AC3BB8D10FB86800001CD77 /* PBXTextBookmark */ = { isa = PBXTextBookmark; diff --git a/iPhone/sample.xcodeproj/project.pbxproj b/iPhone/sample.xcodeproj/project.pbxproj index 950aa52..6aa4b77 100644 --- a/iPhone/sample.xcodeproj/project.pbxproj +++ b/iPhone/sample.xcodeproj/project.pbxproj @@ -89,6 +89,9 @@ 8AA2456F10F861AD00AAAC13 /* test.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 8AA2456E10F861AD00AAAC13 /* test.jpg */; }; 8AA2472410F871D000AAAC13 /* fon.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 8AA2472310F871D000AAAC13 /* fon.jpg */; }; 8AA2477110F8755900AAAC13 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8AA2477010F8755900AAAC13 /* CoreGraphics.framework */; }; + 8AA6417411042F5800F70400 /* SEPhysicObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AA6417011042F5800F70400 /* SEPhysicObject.cpp */; }; + 8AA6417511042F5800F70400 /* SEPhysicWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AA6417211042F5800F70400 /* SEPhysicWorld.cpp */; }; + 8AEF088E110438E30045B7C6 /* libbulletLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8AEF088D110438E30045B7C6 /* libbulletLibrary.a */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -213,6 +216,12 @@ 8AA2456E10F861AD00AAAC13 /* test.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = test.jpg; sourceTree = ""; }; 8AA2472310F871D000AAAC13 /* fon.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = fon.jpg; sourceTree = ""; }; 8AA2477010F8755900AAAC13 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 8AA6416F11042F5800F70400 /* SEObjectInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SEObjectInterface.h; path = ../src/Objects/SEObjectInterface.h; sourceTree = SOURCE_ROOT; }; + 8AA6417011042F5800F70400 /* SEPhysicObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SEPhysicObject.cpp; path = ../src/Objects/SEPhysicObject.cpp; sourceTree = SOURCE_ROOT; }; + 8AA6417111042F5800F70400 /* SEPhysicObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SEPhysicObject.h; path = ../src/Objects/SEPhysicObject.h; sourceTree = SOURCE_ROOT; }; + 8AA6417211042F5800F70400 /* SEPhysicWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SEPhysicWorld.cpp; path = ../src/Objects/SEPhysicWorld.cpp; sourceTree = SOURCE_ROOT; }; + 8AA6417311042F5800F70400 /* SEPhysicWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SEPhysicWorld.h; path = ../src/Objects/SEPhysicWorld.h; sourceTree = SOURCE_ROOT; }; + 8AEF088D110438E30045B7C6 /* libbulletLibrary.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbulletLibrary.a; path = simlib/libbulletLibrary.a; sourceTree = ""; }; 8D1107310486CEB800E47090 /* sample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "sample-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -277,6 +286,7 @@ 8AA2456B10F85F6900AAAC13 /* jcdctmgr.o in Frameworks */, 8AA2456C10F85F6900AAAC13 /* jchuff.o in Frameworks */, 8AA2477110F8755900AAAC13 /* CoreGraphics.framework in Frameworks */, + 8AEF088E110438E30045B7C6 /* libbulletLibrary.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -327,7 +337,6 @@ 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, - 8AA2477010F8755900AAAC13 /* CoreGraphics.framework */, ); name = CustomTemplate; sourceTree = ""; @@ -335,6 +344,7 @@ 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( + 8AEF088D110438E30045B7C6 /* libbulletLibrary.a */, 32CA4F630368D1EE00C91783 /* sample_Prefix.pch */, 29B97316FDCFA39411CA2CEA /* main.m */, ); @@ -356,6 +366,7 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( + 8AA2477010F8755900AAAC13 /* CoreGraphics.framework */, 28FD15070DC6FC5B0079059D /* QuartzCore.framework */, 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, @@ -381,6 +392,7 @@ 8A8A2FEE10F26BA4004F63F5 /* engine */ = { isa = PBXGroup; children = ( + 8AA6416E11042F4300F70400 /* Objects */, 8AA2436D10F8532600AAAC13 /* images */, 8A3B3B3B10F31DA100CDC4D4 /* libs */, 8A8A2FF010F26BB1004F63F5 /* tools */, @@ -516,6 +528,18 @@ name = jpgInclude; sourceTree = ""; }; + 8AA6416E11042F4300F70400 /* Objects */ = { + isa = PBXGroup; + children = ( + 8AA6416F11042F5800F70400 /* SEObjectInterface.h */, + 8AA6417011042F5800F70400 /* SEPhysicObject.cpp */, + 8AA6417111042F5800F70400 /* SEPhysicObject.h */, + 8AA6417211042F5800F70400 /* SEPhysicWorld.cpp */, + 8AA6417311042F5800F70400 /* SEPhysicWorld.h */, + ); + name = Objects; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -594,6 +618,8 @@ 8AA2439910F8537000AAAC13 /* SEVertexGroup.cpp in Sources */, 8AA2439E10F8537F00AAAC13 /* SEImage.cpp in Sources */, 8AA2439F10F8537F00AAAC13 /* SEJpegImage.cpp in Sources */, + 8AA6417411042F5800F70400 /* SEPhysicObject.cpp in Sources */, + 8AA6417511042F5800F70400 /* SEPhysicWorld.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -614,10 +640,15 @@ DEBUG, ); "GCC_THUMB_SUPPORT[arch=armv6]" = ""; + HEADER_SEARCH_PATHS = ( + /Volumes/SECOND/iPhoneProjects/boost_1_41_0, + "/Volumes/SECOND/iPhoneProjects/bullet-trunk/src", + ); INFOPLIST_FILE = "sample-Info.plist"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)\"", + "\"$(SRCROOT)/simlib\"", ); PRODUCT_NAME = tetris3d; SDKROOT = iphonesimulator3.0; @@ -636,6 +667,7 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)\"", + "\"$(SRCROOT)/simlib\"", ); PRODUCT_NAME = sample; }; @@ -653,7 +685,10 @@ GCC_VERSION = 4.0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = /Volumes/SECOND/iPhoneProjects/boost_1_41_0; + HEADER_SEARCH_PATHS = ( + /Volumes/SECOND/iPhoneProjects/SIO2_SDK_v1.3.5/src/bullet, + /Volumes/SECOND/iPhoneProjects/boost_1_41_0, + ); PREBINDING = NO; PROVISIONING_PROFILE = "AE662ED0-4764-40ED-ABD1-48E1409FA30C"; "PROVISIONING_PROFILE[sdk=iphoneos*]" = "AE662ED0-4764-40ED-ABD1-48E1409FA30C"; diff --git a/iPhone/sample_Prefix.pch b/iPhone/sample_Prefix.pch index 01d615f..49ae4d5 100644 --- a/iPhone/sample_Prefix.pch +++ b/iPhone/sample_Prefix.pch @@ -1,14 +1,14 @@ -// -// Prefix header for all source files of the 'sample' target in the 'sample' project -// - -#import - -#ifndef __IPHONE_3_0 -#warning "This project uses features only available in iPhone SDK 3.0 and later." -#endif - -#ifdef __OBJC__ -#import -#import -#endif +// +// Prefix header for all source files of the 'sample' target in the 'sample' project +// + +#import + +#ifndef __IPHONE_3_0 +#warning "This project uses features only available in iPhone SDK 3.0 and later." +#endif + +#ifdef __OBJC__ +#import +#import +#endif diff --git a/iPhone/simlib/libbulletLibrary.a b/iPhone/simlib/libbulletLibrary.a new file mode 100644 index 0000000..de2dce4 Binary files /dev/null and b/iPhone/simlib/libbulletLibrary.a differ diff --git a/iPhone/untitled.py b/iPhone/untitled.py index c274adf..3a4dea7 100644 --- a/iPhone/untitled.py +++ b/iPhone/untitled.py @@ -1,7 +1,7 @@ -# -# untitled.py -# sample -# -# Created by alexey on 1/11/10. -# Copyright (c) 2010 __MyCompanyName__. All rights reserved. -# +# +# untitled.py +# sample +# +# Created by alexey on 1/11/10. +# Copyright (c) 2010 __MyCompanyName__. All rights reserved. +# diff --git a/libjpg/cderror.h b/libjpg/cderror.h index 70435e1..c19d38f 100644 --- a/libjpg/cderror.h +++ b/libjpg/cderror.h @@ -1,132 +1,132 @@ -/* - * cderror.h - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file defines the error and message codes for the cjpeg/djpeg - * applications. These strings are not needed as part of the JPEG library - * proper. - * Edit this file to add new codes, or to translate the message strings to - * some other language. - */ - -/* - * To define the enum list of message codes, include this file without - * defining macro JMESSAGE. To create a message string table, include it - * again with a suitable JMESSAGE definition (see jerror.c for an example). - */ -#ifndef JMESSAGE -#ifndef CDERROR_H -#define CDERROR_H -/* First time through, define the enum list */ -#define JMAKE_ENUM_LIST -#else -/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ -#define JMESSAGE(code,string) -#endif /* CDERROR_H */ -#endif /* JMESSAGE */ - -#ifdef JMAKE_ENUM_LIST - -typedef enum { - -#define JMESSAGE(code,string) code , - -#endif /* JMAKE_ENUM_LIST */ - -JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */ - -#ifdef BMP_SUPPORTED -JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format") -JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported") -JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length") -JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1") -JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB") -JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported") -JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM") -JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image") -JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image") -JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image") -JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image") -#endif /* BMP_SUPPORTED */ - -#ifdef GIF_SUPPORTED -JMESSAGE(JERR_GIF_BUG, "GIF output got confused") -JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d") -JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB") -JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file") -JMESSAGE(JERR_GIF_NOT, "Not a GIF file") -JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image") -JMESSAGE(JTRC_GIF_BADVERSION, - "Warning: unexpected GIF version number '%c%c%c'") -JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x") -JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input") -JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file") -JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring") -JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image") -JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits") -#endif /* GIF_SUPPORTED */ - -#ifdef PPM_SUPPORTED -JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB") -JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file") -JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file") -JMESSAGE(JTRC_PGM, "%ux%u PGM image") -JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image") -JMESSAGE(JTRC_PPM, "%ux%u PPM image") -JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image") -#endif /* PPM_SUPPORTED */ - -#ifdef RLE_SUPPORTED -JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library") -JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB") -JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE") -JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file") -JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header") -JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header") -JMESSAGE(JERR_RLE_NOT, "Not an RLE file") -JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE") -JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup") -JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file") -JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d") -JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file") -JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d") -JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d") -#endif /* RLE_SUPPORTED */ - -#ifdef TARGA_SUPPORTED -JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format") -JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file") -JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB") -JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image") -JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image") -JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image") -#else -JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled") -#endif /* TARGA_SUPPORTED */ - -JMESSAGE(JERR_BAD_CMAP_FILE, - "Color map file is invalid or of unsupported format") -JMESSAGE(JERR_TOO_MANY_COLORS, - "Output file format cannot handle %d colormap entries") -JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed") -#ifdef TARGA_SUPPORTED -JMESSAGE(JERR_UNKNOWN_FORMAT, - "Unrecognized input file format --- perhaps you need -targa") -#else -JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format") -#endif -JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format") - -#ifdef JMAKE_ENUM_LIST - - JMSG_LASTADDONCODE -} ADDON_MESSAGE_CODE; - -#undef JMAKE_ENUM_LIST -#endif /* JMAKE_ENUM_LIST */ - -/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ -#undef JMESSAGE +/* + * cderror.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the error and message codes for the cjpeg/djpeg + * applications. These strings are not needed as part of the JPEG library + * proper. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef CDERROR_H +#define CDERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code,string) +#endif /* CDERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code,string) code , + +#endif /* JMAKE_ENUM_LIST */ + +JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */ + +#ifdef BMP_SUPPORTED +JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format") +JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported") +JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length") +JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1") +JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB") +JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported") +JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM") +JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image") +JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image") +JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image") +JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image") +#endif /* BMP_SUPPORTED */ + +#ifdef GIF_SUPPORTED +JMESSAGE(JERR_GIF_BUG, "GIF output got confused") +JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d") +JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB") +JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file") +JMESSAGE(JERR_GIF_NOT, "Not a GIF file") +JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image") +JMESSAGE(JTRC_GIF_BADVERSION, + "Warning: unexpected GIF version number '%c%c%c'") +JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x") +JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input") +JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file") +JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring") +JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image") +JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits") +#endif /* GIF_SUPPORTED */ + +#ifdef PPM_SUPPORTED +JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB") +JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file") +JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file") +JMESSAGE(JTRC_PGM, "%ux%u PGM image") +JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image") +JMESSAGE(JTRC_PPM, "%ux%u PPM image") +JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image") +#endif /* PPM_SUPPORTED */ + +#ifdef RLE_SUPPORTED +JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library") +JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB") +JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE") +JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file") +JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header") +JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header") +JMESSAGE(JERR_RLE_NOT, "Not an RLE file") +JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE") +JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup") +JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file") +JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d") +JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file") +JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d") +JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d") +#endif /* RLE_SUPPORTED */ + +#ifdef TARGA_SUPPORTED +JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format") +JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file") +JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB") +JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image") +JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image") +JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image") +#else +JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled") +#endif /* TARGA_SUPPORTED */ + +JMESSAGE(JERR_BAD_CMAP_FILE, + "Color map file is invalid or of unsupported format") +JMESSAGE(JERR_TOO_MANY_COLORS, + "Output file format cannot handle %d colormap entries") +JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed") +#ifdef TARGA_SUPPORTED +JMESSAGE(JERR_UNKNOWN_FORMAT, + "Unrecognized input file format --- perhaps you need -targa") +#else +JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format") +#endif +JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format") + +#ifdef JMAKE_ENUM_LIST + + JMSG_LASTADDONCODE +} ADDON_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE diff --git a/libjpg/cdjpeg.h b/libjpg/cdjpeg.h index ed024ac..c0d064c 100644 --- a/libjpg/cdjpeg.h +++ b/libjpg/cdjpeg.h @@ -1,187 +1,187 @@ -/* - * cdjpeg.h - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains common declarations for the sample applications - * cjpeg and djpeg. It is NOT used by the core JPEG library. - */ - -#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ -#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ -#include "jinclude.h" -#include "jpeglib.h" -#include "jerror.h" /* get library error codes too */ -#include "cderror.h" /* get application-specific error codes */ - - -/* - * Object interface for cjpeg's source file decoding modules - */ - -typedef struct cjpeg_source_struct * cjpeg_source_ptr; - -struct cjpeg_source_struct { - JMETHOD(void, start_input, (j_compress_ptr cinfo, - cjpeg_source_ptr sinfo)); - JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, - cjpeg_source_ptr sinfo)); - JMETHOD(void, finish_input, (j_compress_ptr cinfo, - cjpeg_source_ptr sinfo)); - - FILE *input_file; - - JSAMPARRAY buffer; - JDIMENSION buffer_height; -}; - - -/* - * Object interface for djpeg's output file encoding modules - */ - -typedef struct djpeg_dest_struct * djpeg_dest_ptr; - -struct djpeg_dest_struct { - /* start_output is called after jpeg_start_decompress finishes. - * The color map will be ready at this time, if one is needed. - */ - JMETHOD(void, start_output, (j_decompress_ptr cinfo, - djpeg_dest_ptr dinfo)); - /* Emit the specified number of pixel rows from the buffer. */ - JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo, - djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied)); - /* Finish up at the end of the image. */ - JMETHOD(void, finish_output, (j_decompress_ptr cinfo, - djpeg_dest_ptr dinfo)); - - /* Target file spec; filled in by djpeg.c after object is created. */ - FILE * output_file; - - /* Output pixel-row buffer. Created by module init or start_output. - * Width is cinfo->output_width * cinfo->output_components; - * height is buffer_height. - */ - JSAMPARRAY buffer; - JDIMENSION buffer_height; -}; - - -/* - * cjpeg/djpeg may need to perform extra passes to convert to or from - * the source/destination file format. The JPEG library does not know - * about these passes, but we'd like them to be counted by the progress - * monitor. We use an expanded progress monitor object to hold the - * additional pass count. - */ - -struct cdjpeg_progress_mgr { - struct jpeg_progress_mgr pub; /* fields known to JPEG library */ - int completed_extra_passes; /* extra passes completed */ - int total_extra_passes; /* total extra */ - /* last printed percentage stored here to avoid multiple printouts */ - int percent_done; -}; - -typedef struct cdjpeg_progress_mgr * cd_progress_ptr; - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jinit_read_bmp jIRdBMP -#define jinit_write_bmp jIWrBMP -#define jinit_read_gif jIRdGIF -#define jinit_write_gif jIWrGIF -#define jinit_read_ppm jIRdPPM -#define jinit_write_ppm jIWrPPM -#define jinit_read_rle jIRdRLE -#define jinit_write_rle jIWrRLE -#define jinit_read_targa jIRdTarga -#define jinit_write_targa jIWrTarga -#define read_quant_tables RdQTables -#define read_scan_script RdScnScript -#define set_quality_ratings SetQRates -#define set_quant_slots SetQSlots -#define set_sample_factors SetSFacts -#define read_color_map RdCMap -#define enable_signal_catcher EnSigCatcher -#define start_progress_monitor StProgMon -#define end_progress_monitor EnProgMon -#define read_stdin RdStdin -#define write_stdout WrStdout -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - -/* Module selection routines for I/O modules. */ - -EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo, - boolean is_os2)); -EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo)); -EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo)); -EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo)); -EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo)); - -/* cjpeg support routines (in rdswitch.c) */ - -EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename, - boolean force_baseline)); -EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename)); -EXTERN(boolean) set_quality_ratings JPP((j_compress_ptr cinfo, char *arg, - boolean force_baseline)); -EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg)); -EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg)); - -/* djpeg support routines (in rdcolmap.c) */ - -EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile)); - -/* common support routines (in cdjpeg.c) */ - -EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo)); -EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo, - cd_progress_ptr progress)); -EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo)); -EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars)); -EXTERN(FILE *) read_stdin JPP((void)); -EXTERN(FILE *) write_stdout JPP((void)); - -/* miscellaneous useful macros */ - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#define WRITE_BINARY "w" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#define WRITE_BINARY "wb", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#define WRITE_BINARY "wb" -#endif -#endif - -#ifndef EXIT_FAILURE /* define exit() codes if not provided */ -#define EXIT_FAILURE 1 -#endif -#ifndef EXIT_SUCCESS -#ifdef VMS -#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ -#else -#define EXIT_SUCCESS 0 -#endif -#endif -#ifndef EXIT_WARNING -#ifdef VMS -#define EXIT_WARNING 1 /* VMS is very nonstandard */ -#else -#define EXIT_WARNING 2 -#endif -#endif +/* + * cdjpeg.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains common declarations for the sample applications + * cjpeg and djpeg. It is NOT used by the core JPEG library. + */ + +#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ +#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jerror.h" /* get library error codes too */ +#include "cderror.h" /* get application-specific error codes */ + + +/* + * Object interface for cjpeg's source file decoding modules + */ + +typedef struct cjpeg_source_struct * cjpeg_source_ptr; + +struct cjpeg_source_struct { + JMETHOD(void, start_input, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); + JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); + JMETHOD(void, finish_input, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); + + FILE *input_file; + + JSAMPARRAY buffer; + JDIMENSION buffer_height; +}; + + +/* + * Object interface for djpeg's output file encoding modules + */ + +typedef struct djpeg_dest_struct * djpeg_dest_ptr; + +struct djpeg_dest_struct { + /* start_output is called after jpeg_start_decompress finishes. + * The color map will be ready at this time, if one is needed. + */ + JMETHOD(void, start_output, (j_decompress_ptr cinfo, + djpeg_dest_ptr dinfo)); + /* Emit the specified number of pixel rows from the buffer. */ + JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo, + djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied)); + /* Finish up at the end of the image. */ + JMETHOD(void, finish_output, (j_decompress_ptr cinfo, + djpeg_dest_ptr dinfo)); + + /* Target file spec; filled in by djpeg.c after object is created. */ + FILE * output_file; + + /* Output pixel-row buffer. Created by module init or start_output. + * Width is cinfo->output_width * cinfo->output_components; + * height is buffer_height. + */ + JSAMPARRAY buffer; + JDIMENSION buffer_height; +}; + + +/* + * cjpeg/djpeg may need to perform extra passes to convert to or from + * the source/destination file format. The JPEG library does not know + * about these passes, but we'd like them to be counted by the progress + * monitor. We use an expanded progress monitor object to hold the + * additional pass count. + */ + +struct cdjpeg_progress_mgr { + struct jpeg_progress_mgr pub; /* fields known to JPEG library */ + int completed_extra_passes; /* extra passes completed */ + int total_extra_passes; /* total extra */ + /* last printed percentage stored here to avoid multiple printouts */ + int percent_done; +}; + +typedef struct cdjpeg_progress_mgr * cd_progress_ptr; + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jinit_read_bmp jIRdBMP +#define jinit_write_bmp jIWrBMP +#define jinit_read_gif jIRdGIF +#define jinit_write_gif jIWrGIF +#define jinit_read_ppm jIRdPPM +#define jinit_write_ppm jIWrPPM +#define jinit_read_rle jIRdRLE +#define jinit_write_rle jIWrRLE +#define jinit_read_targa jIRdTarga +#define jinit_write_targa jIWrTarga +#define read_quant_tables RdQTables +#define read_scan_script RdScnScript +#define set_quality_ratings SetQRates +#define set_quant_slots SetQSlots +#define set_sample_factors SetSFacts +#define read_color_map RdCMap +#define enable_signal_catcher EnSigCatcher +#define start_progress_monitor StProgMon +#define end_progress_monitor EnProgMon +#define read_stdin RdStdin +#define write_stdout WrStdout +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Module selection routines for I/O modules. */ + +EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo, + boolean is_os2)); +EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo)); + +/* cjpeg support routines (in rdswitch.c) */ + +EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename, + boolean force_baseline)); +EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename)); +EXTERN(boolean) set_quality_ratings JPP((j_compress_ptr cinfo, char *arg, + boolean force_baseline)); +EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg)); +EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg)); + +/* djpeg support routines (in rdcolmap.c) */ + +EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile)); + +/* common support routines (in cdjpeg.c) */ + +EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo)); +EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo, + cd_progress_ptr progress)); +EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo)); +EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars)); +EXTERN(FILE *) read_stdin JPP((void)); +EXTERN(FILE *) write_stdout JPP((void)); + +/* miscellaneous useful macros */ + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#define WRITE_BINARY "w" +#else +#ifdef VMS /* VMS is very nonstandard */ +#define READ_BINARY "rb", "ctx=stm" +#define WRITE_BINARY "wb", "ctx=stm" +#else /* standard ANSI-compliant case */ +#define READ_BINARY "rb" +#define WRITE_BINARY "wb" +#endif +#endif + +#ifndef EXIT_FAILURE /* define exit() codes if not provided */ +#define EXIT_FAILURE 1 +#endif +#ifndef EXIT_SUCCESS +#ifdef VMS +#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ +#else +#define EXIT_SUCCESS 0 +#endif +#endif +#ifndef EXIT_WARNING +#ifdef VMS +#define EXIT_WARNING 1 /* VMS is very nonstandard */ +#else +#define EXIT_WARNING 2 +#endif +#endif diff --git a/libjpg/jdct.h b/libjpg/jdct.h index 360dec8..b1ff912 100644 --- a/libjpg/jdct.h +++ b/libjpg/jdct.h @@ -1,393 +1,393 @@ -/* - * jdct.h - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This include file contains common declarations for the forward and - * inverse DCT modules. These declarations are private to the DCT managers - * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. - * The individual DCT algorithms are kept in separate files to ease - * machine-dependent tuning (e.g., assembly coding). - */ - - -/* - * A forward DCT routine is given a pointer to an input sample array and - * a pointer to a work area of type DCTELEM[]; the DCT is to be performed - * in-place in that buffer. Type DCTELEM is int for 8-bit samples, INT32 - * for 12-bit samples. (NOTE: Floating-point DCT implementations use an - * array of type FAST_FLOAT, instead.) - * The input data is to be fetched from the sample array starting at a - * specified column. (Any row offset needed will be applied to the array - * pointer before it is passed to the FDCT code.) - * Note that the number of samples fetched by the FDCT routine is - * DCT_h_scaled_size * DCT_v_scaled_size. - * The DCT outputs are returned scaled up by a factor of 8; they therefore - * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This - * convention improves accuracy in integer implementations and saves some - * work in floating-point ones. - * Quantization of the output coefficients is done by jcdctmgr.c. - */ - -#if BITS_IN_JSAMPLE == 8 -typedef int DCTELEM; /* 16 or 32 bits is fine */ -#else -typedef INT32 DCTELEM; /* must have 32 bits */ -#endif - -typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data, - JSAMPARRAY sample_data, - JDIMENSION start_col)); -typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data, - JSAMPARRAY sample_data, - JDIMENSION start_col)); - - -/* - * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer - * to an output sample array. The routine must dequantize the input data as - * well as perform the IDCT; for dequantization, it uses the multiplier table - * pointed to by compptr->dct_table. The output data is to be placed into the - * sample array starting at a specified column. (Any row offset needed will - * be applied to the array pointer before it is passed to the IDCT code.) - * Note that the number of samples emitted by the IDCT routine is - * DCT_h_scaled_size * DCT_v_scaled_size. - */ - -/* typedef inverse_DCT_method_ptr is declared in jpegint.h */ - -/* - * Each IDCT routine has its own ideas about the best dct_table element type. - */ - -typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ -#if BITS_IN_JSAMPLE == 8 -typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ -#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ -#else -typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ -#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ -#endif -typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ - - -/* - * Each IDCT routine is responsible for range-limiting its results and - * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could - * be quite far out of range if the input data is corrupt, so a bulletproof - * range-limiting step is required. We use a mask-and-table-lookup method - * to do the combined operations quickly. See the comments with - * prepare_range_limit_table (in jdmaster.c) for more info. - */ - -#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE) - -#define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */ - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_fdct_islow jFDislow -#define jpeg_fdct_ifast jFDifast -#define jpeg_fdct_float jFDfloat -#define jpeg_fdct_7x7 jFD7x7 -#define jpeg_fdct_6x6 jFD6x6 -#define jpeg_fdct_5x5 jFD5x5 -#define jpeg_fdct_4x4 jFD4x4 -#define jpeg_fdct_3x3 jFD3x3 -#define jpeg_fdct_2x2 jFD2x2 -#define jpeg_fdct_1x1 jFD1x1 -#define jpeg_fdct_9x9 jFD9x9 -#define jpeg_fdct_10x10 jFD10x10 -#define jpeg_fdct_11x11 jFD11x11 -#define jpeg_fdct_12x12 jFD12x12 -#define jpeg_fdct_13x13 jFD13x13 -#define jpeg_fdct_14x14 jFD14x14 -#define jpeg_fdct_15x15 jFD15x15 -#define jpeg_fdct_16x16 jFD16x16 -#define jpeg_fdct_16x8 jFD16x8 -#define jpeg_fdct_14x7 jFD14x7 -#define jpeg_fdct_12x6 jFD12x6 -#define jpeg_fdct_10x5 jFD10x5 -#define jpeg_fdct_8x4 jFD8x4 -#define jpeg_fdct_6x3 jFD6x3 -#define jpeg_fdct_4x2 jFD4x2 -#define jpeg_fdct_2x1 jFD2x1 -#define jpeg_fdct_8x16 jFD8x16 -#define jpeg_fdct_7x14 jFD7x14 -#define jpeg_fdct_6x12 jFD6x12 -#define jpeg_fdct_5x10 jFD5x10 -#define jpeg_fdct_4x8 jFD4x8 -#define jpeg_fdct_3x6 jFD3x6 -#define jpeg_fdct_2x4 jFD2x4 -#define jpeg_fdct_1x2 jFD1x2 -#define jpeg_idct_islow jRDislow -#define jpeg_idct_ifast jRDifast -#define jpeg_idct_float jRDfloat -#define jpeg_idct_7x7 jRD7x7 -#define jpeg_idct_6x6 jRD6x6 -#define jpeg_idct_5x5 jRD5x5 -#define jpeg_idct_4x4 jRD4x4 -#define jpeg_idct_3x3 jRD3x3 -#define jpeg_idct_2x2 jRD2x2 -#define jpeg_idct_1x1 jRD1x1 -#define jpeg_idct_9x9 jRD9x9 -#define jpeg_idct_10x10 jRD10x10 -#define jpeg_idct_11x11 jRD11x11 -#define jpeg_idct_12x12 jRD12x12 -#define jpeg_idct_13x13 jRD13x13 -#define jpeg_idct_14x14 jRD14x14 -#define jpeg_idct_15x15 jRD15x15 -#define jpeg_idct_16x16 jRD16x16 -#define jpeg_idct_16x8 jRD16x8 -#define jpeg_idct_14x7 jRD14x7 -#define jpeg_idct_12x6 jRD12x6 -#define jpeg_idct_10x5 jRD10x5 -#define jpeg_idct_8x4 jRD8x4 -#define jpeg_idct_6x3 jRD6x3 -#define jpeg_idct_4x2 jRD4x2 -#define jpeg_idct_2x1 jRD2x1 -#define jpeg_idct_8x16 jRD8x16 -#define jpeg_idct_7x14 jRD7x14 -#define jpeg_idct_6x12 jRD6x12 -#define jpeg_idct_5x10 jRD5x10 -#define jpeg_idct_4x8 jRD4x8 -#define jpeg_idct_3x6 jRD3x8 -#define jpeg_idct_2x4 jRD2x4 -#define jpeg_idct_1x2 jRD1x2 -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - -/* Extern declarations for the forward and inverse DCT routines. */ - -EXTERN(void) jpeg_fdct_islow - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_ifast - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_float - JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_7x7 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_6x6 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_5x5 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_4x4 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_3x3 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_2x2 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_1x1 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_9x9 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_10x10 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_11x11 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_12x12 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_13x13 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_14x14 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_15x15 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_16x16 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_16x8 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_14x7 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_12x6 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_10x5 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_8x4 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_6x3 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_4x2 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_2x1 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_8x16 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_7x14 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_6x12 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_5x10 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_4x8 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_3x6 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_2x4 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_1x2 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); - -EXTERN(void) jpeg_idct_islow - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_ifast - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_float - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_7x7 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_6x6 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_5x5 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_4x4 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_3x3 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_2x2 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_1x1 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_9x9 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_10x10 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_11x11 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_12x12 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_13x13 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_14x14 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_15x15 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_16x16 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_16x8 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_14x7 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_12x6 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_10x5 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_8x4 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_6x3 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_4x2 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_2x1 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_8x16 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_7x14 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_6x12 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_5x10 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_4x8 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_3x6 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_2x4 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_1x2 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); - - -/* - * Macros for handling fixed-point arithmetic; these are used by many - * but not all of the DCT/IDCT modules. - * - * All values are expected to be of type INT32. - * Fractional constants are scaled left by CONST_BITS bits. - * CONST_BITS is defined within each module using these macros, - * and may differ from one module to the next. - */ - -#define ONE ((INT32) 1) -#define CONST_SCALE (ONE << CONST_BITS) - -/* Convert a positive real constant to an integer scaled by CONST_SCALE. - * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, - * thus causing a lot of useless floating-point operations at run time. - */ - -#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) - -/* Descale and correctly round an INT32 value that's scaled by N bits. - * We assume RIGHT_SHIFT rounds towards minus infinity, so adding - * the fudge factor is correct for either sign of X. - */ - -#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) - -/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. - * This macro is used only when the two inputs will actually be no more than - * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a - * full 32x32 multiply. This provides a useful speedup on many machines. - * Unfortunately there is no way to specify a 16x16->32 multiply portably - * in C, but some C compilers will do the right thing if you provide the - * correct combination of casts. - */ - -#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ -#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) -#endif -#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ -#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const))) -#endif - -#ifndef MULTIPLY16C16 /* default definition */ -#define MULTIPLY16C16(var,const) ((var) * (const)) -#endif - -/* Same except both inputs are variables. */ - -#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ -#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) -#endif - -#ifndef MULTIPLY16V16 /* default definition */ -#define MULTIPLY16V16(var1,var2) ((var1) * (var2)) -#endif +/* + * jdct.h + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This include file contains common declarations for the forward and + * inverse DCT modules. These declarations are private to the DCT managers + * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. + * The individual DCT algorithms are kept in separate files to ease + * machine-dependent tuning (e.g., assembly coding). + */ + + +/* + * A forward DCT routine is given a pointer to an input sample array and + * a pointer to a work area of type DCTELEM[]; the DCT is to be performed + * in-place in that buffer. Type DCTELEM is int for 8-bit samples, INT32 + * for 12-bit samples. (NOTE: Floating-point DCT implementations use an + * array of type FAST_FLOAT, instead.) + * The input data is to be fetched from the sample array starting at a + * specified column. (Any row offset needed will be applied to the array + * pointer before it is passed to the FDCT code.) + * Note that the number of samples fetched by the FDCT routine is + * DCT_h_scaled_size * DCT_v_scaled_size. + * The DCT outputs are returned scaled up by a factor of 8; they therefore + * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This + * convention improves accuracy in integer implementations and saves some + * work in floating-point ones. + * Quantization of the output coefficients is done by jcdctmgr.c. + */ + +#if BITS_IN_JSAMPLE == 8 +typedef int DCTELEM; /* 16 or 32 bits is fine */ +#else +typedef INT32 DCTELEM; /* must have 32 bits */ +#endif + +typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data, + JSAMPARRAY sample_data, + JDIMENSION start_col)); +typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data, + JSAMPARRAY sample_data, + JDIMENSION start_col)); + + +/* + * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer + * to an output sample array. The routine must dequantize the input data as + * well as perform the IDCT; for dequantization, it uses the multiplier table + * pointed to by compptr->dct_table. The output data is to be placed into the + * sample array starting at a specified column. (Any row offset needed will + * be applied to the array pointer before it is passed to the IDCT code.) + * Note that the number of samples emitted by the IDCT routine is + * DCT_h_scaled_size * DCT_v_scaled_size. + */ + +/* typedef inverse_DCT_method_ptr is declared in jpegint.h */ + +/* + * Each IDCT routine has its own ideas about the best dct_table element type. + */ + +typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ +#if BITS_IN_JSAMPLE == 8 +typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ +#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ +#else +typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ +#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ +#endif +typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ + + +/* + * Each IDCT routine is responsible for range-limiting its results and + * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could + * be quite far out of range if the input data is corrupt, so a bulletproof + * range-limiting step is required. We use a mask-and-table-lookup method + * to do the combined operations quickly. See the comments with + * prepare_range_limit_table (in jdmaster.c) for more info. + */ + +#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE) + +#define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */ + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_fdct_islow jFDislow +#define jpeg_fdct_ifast jFDifast +#define jpeg_fdct_float jFDfloat +#define jpeg_fdct_7x7 jFD7x7 +#define jpeg_fdct_6x6 jFD6x6 +#define jpeg_fdct_5x5 jFD5x5 +#define jpeg_fdct_4x4 jFD4x4 +#define jpeg_fdct_3x3 jFD3x3 +#define jpeg_fdct_2x2 jFD2x2 +#define jpeg_fdct_1x1 jFD1x1 +#define jpeg_fdct_9x9 jFD9x9 +#define jpeg_fdct_10x10 jFD10x10 +#define jpeg_fdct_11x11 jFD11x11 +#define jpeg_fdct_12x12 jFD12x12 +#define jpeg_fdct_13x13 jFD13x13 +#define jpeg_fdct_14x14 jFD14x14 +#define jpeg_fdct_15x15 jFD15x15 +#define jpeg_fdct_16x16 jFD16x16 +#define jpeg_fdct_16x8 jFD16x8 +#define jpeg_fdct_14x7 jFD14x7 +#define jpeg_fdct_12x6 jFD12x6 +#define jpeg_fdct_10x5 jFD10x5 +#define jpeg_fdct_8x4 jFD8x4 +#define jpeg_fdct_6x3 jFD6x3 +#define jpeg_fdct_4x2 jFD4x2 +#define jpeg_fdct_2x1 jFD2x1 +#define jpeg_fdct_8x16 jFD8x16 +#define jpeg_fdct_7x14 jFD7x14 +#define jpeg_fdct_6x12 jFD6x12 +#define jpeg_fdct_5x10 jFD5x10 +#define jpeg_fdct_4x8 jFD4x8 +#define jpeg_fdct_3x6 jFD3x6 +#define jpeg_fdct_2x4 jFD2x4 +#define jpeg_fdct_1x2 jFD1x2 +#define jpeg_idct_islow jRDislow +#define jpeg_idct_ifast jRDifast +#define jpeg_idct_float jRDfloat +#define jpeg_idct_7x7 jRD7x7 +#define jpeg_idct_6x6 jRD6x6 +#define jpeg_idct_5x5 jRD5x5 +#define jpeg_idct_4x4 jRD4x4 +#define jpeg_idct_3x3 jRD3x3 +#define jpeg_idct_2x2 jRD2x2 +#define jpeg_idct_1x1 jRD1x1 +#define jpeg_idct_9x9 jRD9x9 +#define jpeg_idct_10x10 jRD10x10 +#define jpeg_idct_11x11 jRD11x11 +#define jpeg_idct_12x12 jRD12x12 +#define jpeg_idct_13x13 jRD13x13 +#define jpeg_idct_14x14 jRD14x14 +#define jpeg_idct_15x15 jRD15x15 +#define jpeg_idct_16x16 jRD16x16 +#define jpeg_idct_16x8 jRD16x8 +#define jpeg_idct_14x7 jRD14x7 +#define jpeg_idct_12x6 jRD12x6 +#define jpeg_idct_10x5 jRD10x5 +#define jpeg_idct_8x4 jRD8x4 +#define jpeg_idct_6x3 jRD6x3 +#define jpeg_idct_4x2 jRD4x2 +#define jpeg_idct_2x1 jRD2x1 +#define jpeg_idct_8x16 jRD8x16 +#define jpeg_idct_7x14 jRD7x14 +#define jpeg_idct_6x12 jRD6x12 +#define jpeg_idct_5x10 jRD5x10 +#define jpeg_idct_4x8 jRD4x8 +#define jpeg_idct_3x6 jRD3x8 +#define jpeg_idct_2x4 jRD2x4 +#define jpeg_idct_1x2 jRD1x2 +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Extern declarations for the forward and inverse DCT routines. */ + +EXTERN(void) jpeg_fdct_islow + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_ifast + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_float + JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_7x7 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_6x6 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_5x5 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_4x4 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_3x3 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_2x2 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_1x1 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_9x9 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_10x10 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_11x11 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_12x12 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_13x13 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_14x14 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_15x15 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_16x16 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_16x8 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_14x7 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_12x6 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_10x5 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_8x4 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_6x3 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_4x2 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_2x1 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_8x16 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_7x14 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_6x12 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_5x10 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_4x8 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_3x6 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_2x4 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_1x2 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); + +EXTERN(void) jpeg_idct_islow + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_ifast + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_float + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_7x7 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_6x6 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_5x5 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_4x4 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_3x3 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_2x2 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_1x1 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_9x9 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_10x10 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_11x11 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_12x12 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_13x13 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_14x14 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_15x15 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_16x16 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_16x8 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_14x7 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_12x6 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_10x5 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_8x4 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_6x3 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_4x2 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_2x1 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_8x16 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_7x14 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_6x12 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_5x10 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_4x8 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_3x6 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_2x4 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_1x2 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); + + +/* + * Macros for handling fixed-point arithmetic; these are used by many + * but not all of the DCT/IDCT modules. + * + * All values are expected to be of type INT32. + * Fractional constants are scaled left by CONST_BITS bits. + * CONST_BITS is defined within each module using these macros, + * and may differ from one module to the next. + */ + +#define ONE ((INT32) 1) +#define CONST_SCALE (ONE << CONST_BITS) + +/* Convert a positive real constant to an integer scaled by CONST_SCALE. + * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, + * thus causing a lot of useless floating-point operations at run time. + */ + +#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) + +/* Descale and correctly round an INT32 value that's scaled by N bits. + * We assume RIGHT_SHIFT rounds towards minus infinity, so adding + * the fudge factor is correct for either sign of X. + */ + +#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * This macro is used only when the two inputs will actually be no more than + * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a + * full 32x32 multiply. This provides a useful speedup on many machines. + * Unfortunately there is no way to specify a 16x16->32 multiply portably + * in C, but some C compilers will do the right thing if you provide the + * correct combination of casts. + */ + +#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ +#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) +#endif +#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ +#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const))) +#endif + +#ifndef MULTIPLY16C16 /* default definition */ +#define MULTIPLY16C16(var,const) ((var) * (const)) +#endif + +/* Same except both inputs are variables. */ + +#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ +#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) +#endif + +#ifndef MULTIPLY16V16 /* default definition */ +#define MULTIPLY16V16(var1,var2) ((var1) * (var2)) +#endif diff --git a/libjpg/jerror.h b/libjpg/jerror.h index 1cfb2b1..478b74d 100644 --- a/libjpg/jerror.h +++ b/libjpg/jerror.h @@ -1,304 +1,304 @@ -/* - * jerror.h - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 1997-2009 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file defines the error and message codes for the JPEG library. - * Edit this file to add new codes, or to translate the message strings to - * some other language. - * A set of error-reporting macros are defined too. Some applications using - * the JPEG library may wish to include this file to get the error codes - * and/or the macros. - */ - -/* - * To define the enum list of message codes, include this file without - * defining macro JMESSAGE. To create a message string table, include it - * again with a suitable JMESSAGE definition (see jerror.c for an example). - */ -#ifndef JMESSAGE -#ifndef JERROR_H -/* First time through, define the enum list */ -#define JMAKE_ENUM_LIST -#else -/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ -#define JMESSAGE(code,string) -#endif /* JERROR_H */ -#endif /* JMESSAGE */ - -#ifdef JMAKE_ENUM_LIST - -typedef enum { - -#define JMESSAGE(code,string) code , - -#endif /* JMAKE_ENUM_LIST */ - -JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ - -/* For maintenance convenience, list is alphabetical by message code name */ -JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") -JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") -JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") -JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") -JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") -JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") -JMESSAGE(JERR_BAD_DCTSIZE, "DCT scaled block size %dx%d not supported") -JMESSAGE(JERR_BAD_DROP_SAMPLING, - "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") -JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") -JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") -JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") -JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") -JMESSAGE(JERR_BAD_LIB_VERSION, - "Wrong JPEG library version: library is %d, caller expects %d") -JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") -JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") -JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") -JMESSAGE(JERR_BAD_PROGRESSION, - "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") -JMESSAGE(JERR_BAD_PROG_SCRIPT, - "Invalid progressive parameters at scan script entry %d") -JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") -JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") -JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") -JMESSAGE(JERR_BAD_STRUCT_SIZE, - "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") -JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") -JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") -JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") -JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") -JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") -JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") -JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") -JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") -JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") -JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") -JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") -JMESSAGE(JERR_EMS_READ, "Read from EMS failed") -JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") -JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") -JMESSAGE(JERR_FILE_READ, "Input file read error") -JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") -JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") -JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") -JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") -JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") -JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") -JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") -JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, - "Cannot transcode due to multiple use of quantization table %d") -JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") -JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") -JMESSAGE(JERR_NOTIMPL, "Not implemented yet") -JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") -JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") -JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") -JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") -JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") -JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") -JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") -JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") -JMESSAGE(JERR_QUANT_COMPONENTS, - "Cannot quantize more than %d color components") -JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") -JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") -JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") -JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") -JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") -JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") -JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") -JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") -JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") -JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") -JMESSAGE(JERR_TFILE_WRITE, - "Write failed on temporary file --- out of disk space?") -JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") -JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") -JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") -JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") -JMESSAGE(JERR_XMS_READ, "Read from XMS failed") -JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") -JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) -JMESSAGE(JMSG_VERSION, JVERSION) -JMESSAGE(JTRC_16BIT_TABLES, - "Caution: quantization tables are too coarse for baseline JPEG") -JMESSAGE(JTRC_ADOBE, - "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") -JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") -JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") -JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") -JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") -JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") -JMESSAGE(JTRC_DRI, "Define Restart Interval %u") -JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") -JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") -JMESSAGE(JTRC_EOI, "End Of Image") -JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") -JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") -JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, - "Warning: thumbnail image size does not match data length %u") -JMESSAGE(JTRC_JFIF_EXTENSION, - "JFIF extension marker: type 0x%02x, length %u") -JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") -JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") -JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") -JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") -JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") -JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") -JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") -JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") -JMESSAGE(JTRC_RST, "RST%d") -JMESSAGE(JTRC_SMOOTH_NOTIMPL, - "Smoothing not supported with nonstandard sampling ratios") -JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") -JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") -JMESSAGE(JTRC_SOI, "Start of Image") -JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") -JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") -JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") -JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") -JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") -JMESSAGE(JTRC_THUMB_JPEG, - "JFIF extension marker: JPEG-compressed thumbnail image, length %u") -JMESSAGE(JTRC_THUMB_PALETTE, - "JFIF extension marker: palette thumbnail image, length %u") -JMESSAGE(JTRC_THUMB_RGB, - "JFIF extension marker: RGB thumbnail image, length %u") -JMESSAGE(JTRC_UNKNOWN_IDS, - "Unrecognized component IDs %d %d %d, assuming YCbCr") -JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") -JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") -JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") -JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") -JMESSAGE(JWRN_BOGUS_PROGRESSION, - "Inconsistent progression sequence for component %d coefficient %d") -JMESSAGE(JWRN_EXTRANEOUS_DATA, - "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") -JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") -JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") -JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") -JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") -JMESSAGE(JWRN_MUST_RESYNC, - "Corrupt JPEG data: found marker 0x%02x instead of RST%d") -JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") -JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") - -#ifdef JMAKE_ENUM_LIST - - JMSG_LASTMSGCODE -} J_MESSAGE_CODE; - -#undef JMAKE_ENUM_LIST -#endif /* JMAKE_ENUM_LIST */ - -/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ -#undef JMESSAGE - - -#ifndef JERROR_H -#define JERROR_H - -/* Macros to simplify using the error and trace message stuff */ -/* The first parameter is either type of cinfo pointer */ - -/* Fatal errors (print message and exit) */ -#define ERREXIT(cinfo,code) \ - ((cinfo)->err->msg_code = (code), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT1(cinfo,code,p1) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT2(cinfo,code,p1,p2) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT3(cinfo,code,p1,p2,p3) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (cinfo)->err->msg_parm.i[2] = (p3), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (cinfo)->err->msg_parm.i[2] = (p3), \ - (cinfo)->err->msg_parm.i[3] = (p4), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT6(cinfo,code,p1,p2,p3,p4,p5,p6) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (cinfo)->err->msg_parm.i[2] = (p3), \ - (cinfo)->err->msg_parm.i[3] = (p4), \ - (cinfo)->err->msg_parm.i[4] = (p5), \ - (cinfo)->err->msg_parm.i[5] = (p6), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXITS(cinfo,code,str) \ - ((cinfo)->err->msg_code = (code), \ - strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) - -#define MAKESTMT(stuff) do { stuff } while (0) - -/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ -#define WARNMS(cinfo,code) \ - ((cinfo)->err->msg_code = (code), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) -#define WARNMS1(cinfo,code,p1) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) -#define WARNMS2(cinfo,code,p1,p2) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) - -/* Informational/debugging messages */ -#define TRACEMS(cinfo,lvl,code) \ - ((cinfo)->err->msg_code = (code), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) -#define TRACEMS1(cinfo,lvl,code,p1) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) -#define TRACEMS2(cinfo,lvl,code,p1,p2) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) -#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ - _mp[4] = (p5); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ - _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMSS(cinfo,lvl,code,str) \ - ((cinfo)->err->msg_code = (code), \ - strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) - -#endif /* JERROR_H */ +/* + * jerror.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * Modified 1997-2009 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the error and message codes for the JPEG library. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + * A set of error-reporting macros are defined too. Some applications using + * the JPEG library may wish to include this file to get the error codes + * and/or the macros. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef JERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code,string) +#endif /* JERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code,string) code , + +#endif /* JMAKE_ENUM_LIST */ + +JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ + +/* For maintenance convenience, list is alphabetical by message code name */ +JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") +JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") +JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") +JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") +JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") +JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") +JMESSAGE(JERR_BAD_DCTSIZE, "DCT scaled block size %dx%d not supported") +JMESSAGE(JERR_BAD_DROP_SAMPLING, + "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") +JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") +JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") +JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") +JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") +JMESSAGE(JERR_BAD_LIB_VERSION, + "Wrong JPEG library version: library is %d, caller expects %d") +JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") +JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") +JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") +JMESSAGE(JERR_BAD_PROGRESSION, + "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") +JMESSAGE(JERR_BAD_PROG_SCRIPT, + "Invalid progressive parameters at scan script entry %d") +JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") +JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") +JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") +JMESSAGE(JERR_BAD_STRUCT_SIZE, + "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") +JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") +JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") +JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") +JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") +JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") +JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") +JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") +JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") +JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") +JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") +JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") +JMESSAGE(JERR_EMS_READ, "Read from EMS failed") +JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") +JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") +JMESSAGE(JERR_FILE_READ, "Input file read error") +JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") +JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") +JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") +JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") +JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") +JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") +JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") +JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, + "Cannot transcode due to multiple use of quantization table %d") +JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") +JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") +JMESSAGE(JERR_NOTIMPL, "Not implemented yet") +JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") +JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") +JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") +JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") +JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") +JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") +JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") +JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") +JMESSAGE(JERR_QUANT_COMPONENTS, + "Cannot quantize more than %d color components") +JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") +JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") +JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") +JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") +JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") +JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") +JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") +JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") +JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") +JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") +JMESSAGE(JERR_TFILE_WRITE, + "Write failed on temporary file --- out of disk space?") +JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") +JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") +JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") +JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") +JMESSAGE(JERR_XMS_READ, "Read from XMS failed") +JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") +JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) +JMESSAGE(JMSG_VERSION, JVERSION) +JMESSAGE(JTRC_16BIT_TABLES, + "Caution: quantization tables are too coarse for baseline JPEG") +JMESSAGE(JTRC_ADOBE, + "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") +JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") +JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") +JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") +JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") +JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") +JMESSAGE(JTRC_DRI, "Define Restart Interval %u") +JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") +JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") +JMESSAGE(JTRC_EOI, "End Of Image") +JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") +JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") +JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, + "Warning: thumbnail image size does not match data length %u") +JMESSAGE(JTRC_JFIF_EXTENSION, + "JFIF extension marker: type 0x%02x, length %u") +JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") +JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") +JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") +JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") +JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") +JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") +JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") +JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") +JMESSAGE(JTRC_RST, "RST%d") +JMESSAGE(JTRC_SMOOTH_NOTIMPL, + "Smoothing not supported with nonstandard sampling ratios") +JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") +JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") +JMESSAGE(JTRC_SOI, "Start of Image") +JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") +JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") +JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") +JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") +JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") +JMESSAGE(JTRC_THUMB_JPEG, + "JFIF extension marker: JPEG-compressed thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_PALETTE, + "JFIF extension marker: palette thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_RGB, + "JFIF extension marker: RGB thumbnail image, length %u") +JMESSAGE(JTRC_UNKNOWN_IDS, + "Unrecognized component IDs %d %d %d, assuming YCbCr") +JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") +JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") +JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") +JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") +JMESSAGE(JWRN_BOGUS_PROGRESSION, + "Inconsistent progression sequence for component %d coefficient %d") +JMESSAGE(JWRN_EXTRANEOUS_DATA, + "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") +JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") +JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") +JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") +JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") +JMESSAGE(JWRN_MUST_RESYNC, + "Corrupt JPEG data: found marker 0x%02x instead of RST%d") +JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") +JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") + +#ifdef JMAKE_ENUM_LIST + + JMSG_LASTMSGCODE +} J_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE + + +#ifndef JERROR_H +#define JERROR_H + +/* Macros to simplify using the error and trace message stuff */ +/* The first parameter is either type of cinfo pointer */ + +/* Fatal errors (print message and exit) */ +#define ERREXIT(cinfo,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT1(cinfo,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT2(cinfo,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT3(cinfo,code,p1,p2,p3) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT6(cinfo,code,p1,p2,p3,p4,p5,p6) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (cinfo)->err->msg_parm.i[4] = (p5), \ + (cinfo)->err->msg_parm.i[5] = (p6), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXITS(cinfo,code,str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) + +#define MAKESTMT(stuff) do { stuff } while (0) + +/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ +#define WARNMS(cinfo,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS1(cinfo,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS2(cinfo,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) + +/* Informational/debugging messages */ +#define TRACEMS(cinfo,lvl,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS1(cinfo,lvl,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS2(cinfo,lvl,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMSS(cinfo,lvl,code,str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) + +#endif /* JERROR_H */ diff --git a/libjpg/jinclude.h b/libjpg/jinclude.h index 0a4f151..5ff60fe 100644 --- a/libjpg/jinclude.h +++ b/libjpg/jinclude.h @@ -1,91 +1,91 @@ -/* - * jinclude.h - * - * Copyright (C) 1991-1994, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file exists to provide a single place to fix any problems with - * including the wrong system include files. (Common problems are taken - * care of by the standard jconfig symbols, but on really weird systems - * you may have to edit this file.) - * - * NOTE: this file is NOT intended to be included by applications using the - * JPEG library. Most applications need only include jpeglib.h. - */ - - -/* Include auto-config file to find out which system include files we need. */ - -#include "jconfig.h" /* auto configuration options */ -#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ - -/* - * We need the NULL macro and size_t typedef. - * On an ANSI-conforming system it is sufficient to include . - * Otherwise, we get them from or ; we may have to - * pull in as well. - * Note that the core JPEG library does not require ; - * only the default error handler and data source/destination modules do. - * But we must pull it in because of the references to FILE in jpeglib.h. - * You can remove those references if you want to compile without . - */ - -#ifdef HAVE_STDDEF_H -#include -#endif - -#ifdef HAVE_STDLIB_H -#include -#endif - -#ifdef NEED_SYS_TYPES_H -#include -#endif - -#include - -/* - * We need memory copying and zeroing functions, plus strncpy(). - * ANSI and System V implementations declare these in . - * BSD doesn't have the mem() functions, but it does have bcopy()/bzero(). - * Some systems may declare memset and memcpy in . - * - * NOTE: we assume the size parameters to these functions are of type size_t. - * Change the casts in these macros if not! - */ - -#ifdef NEED_BSD_STRINGS - -#include -#define MEMZERO(target,size) bzero((void *)(target), (size_t)(size)) -#define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size)) - -#else /* not BSD, assume ANSI/SysV string lib */ - -#include -#define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size)) -#define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size)) - -#endif - -/* - * In ANSI C, and indeed any rational implementation, size_t is also the - * type returned by sizeof(). However, it seems there are some irrational - * implementations out there, in which sizeof() returns an int even though - * size_t is defined as long or unsigned long. To ensure consistent results - * we always use this SIZEOF() macro in place of using sizeof() directly. - */ - -#define SIZEOF(object) ((size_t) sizeof(object)) - -/* - * The modules that use fread() and fwrite() always invoke them through - * these macros. On some systems you may need to twiddle the argument casts. - * CAUTION: argument order is different from underlying functions! - */ - -#define JFREAD(file,buf,sizeofbuf) \ - ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) -#define JFWRITE(file,buf,sizeofbuf) \ - ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) +/* + * jinclude.h + * + * Copyright (C) 1991-1994, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file exists to provide a single place to fix any problems with + * including the wrong system include files. (Common problems are taken + * care of by the standard jconfig symbols, but on really weird systems + * you may have to edit this file.) + * + * NOTE: this file is NOT intended to be included by applications using the + * JPEG library. Most applications need only include jpeglib.h. + */ + + +/* Include auto-config file to find out which system include files we need. */ + +#include "jconfig.h" /* auto configuration options */ +#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ + +/* + * We need the NULL macro and size_t typedef. + * On an ANSI-conforming system it is sufficient to include . + * Otherwise, we get them from or ; we may have to + * pull in as well. + * Note that the core JPEG library does not require ; + * only the default error handler and data source/destination modules do. + * But we must pull it in because of the references to FILE in jpeglib.h. + * You can remove those references if you want to compile without . + */ + +#ifdef HAVE_STDDEF_H +#include +#endif + +#ifdef HAVE_STDLIB_H +#include +#endif + +#ifdef NEED_SYS_TYPES_H +#include +#endif + +#include + +/* + * We need memory copying and zeroing functions, plus strncpy(). + * ANSI and System V implementations declare these in . + * BSD doesn't have the mem() functions, but it does have bcopy()/bzero(). + * Some systems may declare memset and memcpy in . + * + * NOTE: we assume the size parameters to these functions are of type size_t. + * Change the casts in these macros if not! + */ + +#ifdef NEED_BSD_STRINGS + +#include +#define MEMZERO(target,size) bzero((void *)(target), (size_t)(size)) +#define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size)) + +#else /* not BSD, assume ANSI/SysV string lib */ + +#include +#define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size)) +#define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size)) + +#endif + +/* + * In ANSI C, and indeed any rational implementation, size_t is also the + * type returned by sizeof(). However, it seems there are some irrational + * implementations out there, in which sizeof() returns an int even though + * size_t is defined as long or unsigned long. To ensure consistent results + * we always use this SIZEOF() macro in place of using sizeof() directly. + */ + +#define SIZEOF(object) ((size_t) sizeof(object)) + +/* + * The modules that use fread() and fwrite() always invoke them through + * these macros. On some systems you may need to twiddle the argument casts. + * CAUTION: argument order is different from underlying functions! + */ + +#define JFREAD(file,buf,sizeofbuf) \ + ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) +#define JFWRITE(file,buf,sizeofbuf) \ + ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) diff --git a/libjpg/jmemsys.h b/libjpg/jmemsys.h index 6c3c6d3..2a87961 100644 --- a/libjpg/jmemsys.h +++ b/libjpg/jmemsys.h @@ -1,198 +1,198 @@ -/* - * jmemsys.h - * - * Copyright (C) 1992-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This include file defines the interface between the system-independent - * and system-dependent portions of the JPEG memory manager. No other - * modules need include it. (The system-independent portion is jmemmgr.c; - * there are several different versions of the system-dependent portion.) - * - * This file works as-is for the system-dependent memory managers supplied - * in the IJG distribution. You may need to modify it if you write a - * custom memory manager. If system-dependent changes are needed in - * this file, the best method is to #ifdef them based on a configuration - * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR - * and USE_MAC_MEMMGR. - */ - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_get_small jGetSmall -#define jpeg_free_small jFreeSmall -#define jpeg_get_large jGetLarge -#define jpeg_free_large jFreeLarge -#define jpeg_mem_available jMemAvail -#define jpeg_open_backing_store jOpenBackStore -#define jpeg_mem_init jMemInit -#define jpeg_mem_term jMemTerm -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* - * These two functions are used to allocate and release small chunks of - * memory. (Typically the total amount requested through jpeg_get_small is - * no more than 20K or so; this will be requested in chunks of a few K each.) - * Behavior should be the same as for the standard library functions malloc - * and free; in particular, jpeg_get_small must return NULL on failure. - * On most systems, these ARE malloc and free. jpeg_free_small is passed the - * size of the object being freed, just in case it's needed. - * On an 80x86 machine using small-data memory model, these manage near heap. - */ - -EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject)); -EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object, - size_t sizeofobject)); - -/* - * These two functions are used to allocate and release large chunks of - * memory (up to the total free space designated by jpeg_mem_available). - * The interface is the same as above, except that on an 80x86 machine, - * far pointers are used. On most other machines these are identical to - * the jpeg_get/free_small routines; but we keep them separate anyway, - * in case a different allocation strategy is desirable for large chunks. - */ - -EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo, - size_t sizeofobject)); -EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object, - size_t sizeofobject)); - -/* - * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may - * be requested in a single call to jpeg_get_large (and jpeg_get_small for that - * matter, but that case should never come into play). This macro is needed - * to model the 64Kb-segment-size limit of far addressing on 80x86 machines. - * On those machines, we expect that jconfig.h will provide a proper value. - * On machines with 32-bit flat address spaces, any large constant may be used. - * - * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type - * size_t and will be a multiple of sizeof(align_type). - */ - -#ifndef MAX_ALLOC_CHUNK /* may be overridden in jconfig.h */ -#define MAX_ALLOC_CHUNK 1000000000L -#endif - -/* - * This routine computes the total space still available for allocation by - * jpeg_get_large. If more space than this is needed, backing store will be - * used. NOTE: any memory already allocated must not be counted. - * - * There is a minimum space requirement, corresponding to the minimum - * feasible buffer sizes; jmemmgr.c will request that much space even if - * jpeg_mem_available returns zero. The maximum space needed, enough to hold - * all working storage in memory, is also passed in case it is useful. - * Finally, the total space already allocated is passed. If no better - * method is available, cinfo->mem->max_memory_to_use - already_allocated - * is often a suitable calculation. - * - * It is OK for jpeg_mem_available to underestimate the space available - * (that'll just lead to more backing-store access than is really necessary). - * However, an overestimate will lead to failure. Hence it's wise to subtract - * a slop factor from the true available space. 5% should be enough. - * - * On machines with lots of virtual memory, any large constant may be returned. - * Conversely, zero may be returned to always use the minimum amount of memory. - */ - -EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo, - long min_bytes_needed, - long max_bytes_needed, - long already_allocated)); - - -/* - * This structure holds whatever state is needed to access a single - * backing-store object. The read/write/close method pointers are called - * by jmemmgr.c to manipulate the backing-store object; all other fields - * are private to the system-dependent backing store routines. - */ - -#define TEMP_NAME_LENGTH 64 /* max length of a temporary file's name */ - - -#ifdef USE_MSDOS_MEMMGR /* DOS-specific junk */ - -typedef unsigned short XMSH; /* type of extended-memory handles */ -typedef unsigned short EMSH; /* type of expanded-memory handles */ - -typedef union { - short file_handle; /* DOS file handle if it's a temp file */ - XMSH xms_handle; /* handle if it's a chunk of XMS */ - EMSH ems_handle; /* handle if it's a chunk of EMS */ -} handle_union; - -#endif /* USE_MSDOS_MEMMGR */ - -#ifdef USE_MAC_MEMMGR /* Mac-specific junk */ -#include -#endif /* USE_MAC_MEMMGR */ - - -typedef struct backing_store_struct * backing_store_ptr; - -typedef struct backing_store_struct { - /* Methods for reading/writing/closing this backing-store object */ - JMETHOD(void, read_backing_store, (j_common_ptr cinfo, - backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count)); - JMETHOD(void, write_backing_store, (j_common_ptr cinfo, - backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count)); - JMETHOD(void, close_backing_store, (j_common_ptr cinfo, - backing_store_ptr info)); - - /* Private fields for system-dependent backing-store management */ -#ifdef USE_MSDOS_MEMMGR - /* For the MS-DOS manager (jmemdos.c), we need: */ - handle_union handle; /* reference to backing-store storage object */ - char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ -#else -#ifdef USE_MAC_MEMMGR - /* For the Mac manager (jmemmac.c), we need: */ - short temp_file; /* file reference number to temp file */ - FSSpec tempSpec; /* the FSSpec for the temp file */ - char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ -#else - /* For a typical implementation with temp files, we need: */ - FILE * temp_file; /* stdio reference to temp file */ - char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */ -#endif -#endif -} backing_store_info; - - -/* - * Initial opening of a backing-store object. This must fill in the - * read/write/close pointers in the object. The read/write routines - * may take an error exit if the specified maximum file size is exceeded. - * (If jpeg_mem_available always returns a large value, this routine can - * just take an error exit.) - */ - -EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo, - backing_store_ptr info, - long total_bytes_needed)); - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. jpeg_mem_init will be called before anything is - * allocated (and, therefore, nothing in cinfo is of use except the error - * manager pointer). It should return a suitable default value for - * max_memory_to_use; this may subsequently be overridden by the surrounding - * application. (Note that max_memory_to_use is only important if - * jpeg_mem_available chooses to consult it ... no one else will.) - * jpeg_mem_term may assume that all requested memory has been freed and that - * all opened backing-store objects have been closed. - */ - -EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo)); -EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo)); +/* + * jmemsys.h + * + * Copyright (C) 1992-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This include file defines the interface between the system-independent + * and system-dependent portions of the JPEG memory manager. No other + * modules need include it. (The system-independent portion is jmemmgr.c; + * there are several different versions of the system-dependent portion.) + * + * This file works as-is for the system-dependent memory managers supplied + * in the IJG distribution. You may need to modify it if you write a + * custom memory manager. If system-dependent changes are needed in + * this file, the best method is to #ifdef them based on a configuration + * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR + * and USE_MAC_MEMMGR. + */ + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_get_small jGetSmall +#define jpeg_free_small jFreeSmall +#define jpeg_get_large jGetLarge +#define jpeg_free_large jFreeLarge +#define jpeg_mem_available jMemAvail +#define jpeg_open_backing_store jOpenBackStore +#define jpeg_mem_init jMemInit +#define jpeg_mem_term jMemTerm +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* + * These two functions are used to allocate and release small chunks of + * memory. (Typically the total amount requested through jpeg_get_small is + * no more than 20K or so; this will be requested in chunks of a few K each.) + * Behavior should be the same as for the standard library functions malloc + * and free; in particular, jpeg_get_small must return NULL on failure. + * On most systems, these ARE malloc and free. jpeg_free_small is passed the + * size of the object being freed, just in case it's needed. + * On an 80x86 machine using small-data memory model, these manage near heap. + */ + +EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject)); +EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object, + size_t sizeofobject)); + +/* + * These two functions are used to allocate and release large chunks of + * memory (up to the total free space designated by jpeg_mem_available). + * The interface is the same as above, except that on an 80x86 machine, + * far pointers are used. On most other machines these are identical to + * the jpeg_get/free_small routines; but we keep them separate anyway, + * in case a different allocation strategy is desirable for large chunks. + */ + +EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo, + size_t sizeofobject)); +EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object, + size_t sizeofobject)); + +/* + * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may + * be requested in a single call to jpeg_get_large (and jpeg_get_small for that + * matter, but that case should never come into play). This macro is needed + * to model the 64Kb-segment-size limit of far addressing on 80x86 machines. + * On those machines, we expect that jconfig.h will provide a proper value. + * On machines with 32-bit flat address spaces, any large constant may be used. + * + * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type + * size_t and will be a multiple of sizeof(align_type). + */ + +#ifndef MAX_ALLOC_CHUNK /* may be overridden in jconfig.h */ +#define MAX_ALLOC_CHUNK 1000000000L +#endif + +/* + * This routine computes the total space still available for allocation by + * jpeg_get_large. If more space than this is needed, backing store will be + * used. NOTE: any memory already allocated must not be counted. + * + * There is a minimum space requirement, corresponding to the minimum + * feasible buffer sizes; jmemmgr.c will request that much space even if + * jpeg_mem_available returns zero. The maximum space needed, enough to hold + * all working storage in memory, is also passed in case it is useful. + * Finally, the total space already allocated is passed. If no better + * method is available, cinfo->mem->max_memory_to_use - already_allocated + * is often a suitable calculation. + * + * It is OK for jpeg_mem_available to underestimate the space available + * (that'll just lead to more backing-store access than is really necessary). + * However, an overestimate will lead to failure. Hence it's wise to subtract + * a slop factor from the true available space. 5% should be enough. + * + * On machines with lots of virtual memory, any large constant may be returned. + * Conversely, zero may be returned to always use the minimum amount of memory. + */ + +EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo, + long min_bytes_needed, + long max_bytes_needed, + long already_allocated)); + + +/* + * This structure holds whatever state is needed to access a single + * backing-store object. The read/write/close method pointers are called + * by jmemmgr.c to manipulate the backing-store object; all other fields + * are private to the system-dependent backing store routines. + */ + +#define TEMP_NAME_LENGTH 64 /* max length of a temporary file's name */ + + +#ifdef USE_MSDOS_MEMMGR /* DOS-specific junk */ + +typedef unsigned short XMSH; /* type of extended-memory handles */ +typedef unsigned short EMSH; /* type of expanded-memory handles */ + +typedef union { + short file_handle; /* DOS file handle if it's a temp file */ + XMSH xms_handle; /* handle if it's a chunk of XMS */ + EMSH ems_handle; /* handle if it's a chunk of EMS */ +} handle_union; + +#endif /* USE_MSDOS_MEMMGR */ + +#ifdef USE_MAC_MEMMGR /* Mac-specific junk */ +#include +#endif /* USE_MAC_MEMMGR */ + + +typedef struct backing_store_struct * backing_store_ptr; + +typedef struct backing_store_struct { + /* Methods for reading/writing/closing this backing-store object */ + JMETHOD(void, read_backing_store, (j_common_ptr cinfo, + backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count)); + JMETHOD(void, write_backing_store, (j_common_ptr cinfo, + backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count)); + JMETHOD(void, close_backing_store, (j_common_ptr cinfo, + backing_store_ptr info)); + + /* Private fields for system-dependent backing-store management */ +#ifdef USE_MSDOS_MEMMGR + /* For the MS-DOS manager (jmemdos.c), we need: */ + handle_union handle; /* reference to backing-store storage object */ + char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ +#else +#ifdef USE_MAC_MEMMGR + /* For the Mac manager (jmemmac.c), we need: */ + short temp_file; /* file reference number to temp file */ + FSSpec tempSpec; /* the FSSpec for the temp file */ + char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ +#else + /* For a typical implementation with temp files, we need: */ + FILE * temp_file; /* stdio reference to temp file */ + char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */ +#endif +#endif +} backing_store_info; + + +/* + * Initial opening of a backing-store object. This must fill in the + * read/write/close pointers in the object. The read/write routines + * may take an error exit if the specified maximum file size is exceeded. + * (If jpeg_mem_available always returns a large value, this routine can + * just take an error exit.) + */ + +EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo, + backing_store_ptr info, + long total_bytes_needed)); + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. jpeg_mem_init will be called before anything is + * allocated (and, therefore, nothing in cinfo is of use except the error + * manager pointer). It should return a suitable default value for + * max_memory_to_use; this may subsequently be overridden by the surrounding + * application. (Note that max_memory_to_use is only important if + * jpeg_mem_available chooses to consult it ... no one else will.) + * jpeg_mem_term may assume that all requested memory has been freed and that + * all opened backing-store objects have been closed. + */ + +EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo)); +EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo)); diff --git a/libjpg/jmorecfg.h b/libjpg/jmorecfg.h index c610bc2..bbb1cae 100644 --- a/libjpg/jmorecfg.h +++ b/libjpg/jmorecfg.h @@ -1,369 +1,369 @@ -/* - * jmorecfg.h - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 1997-2009 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains additional configuration options that customize the - * JPEG software for special applications or support machine-dependent - * optimizations. Most users will not need to touch this file. - */ - - -/* - * Define BITS_IN_JSAMPLE as either - * 8 for 8-bit sample values (the usual setting) - * 12 for 12-bit sample values - * Only 8 and 12 are legal data precisions for lossy JPEG according to the - * JPEG standard, and the IJG code does not support anything else! - * We do not support run-time selection of data precision, sorry. - */ - -#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ - - -/* - * Maximum number of components (color channels) allowed in JPEG image. - * To meet the letter of the JPEG spec, set this to 255. However, darn - * few applications need more than 4 channels (maybe 5 for CMYK + alpha - * mask). We recommend 10 as a reasonable compromise; use 4 if you are - * really short on memory. (Each allowed component costs a hundred or so - * bytes of storage, whether actually used in an image or not.) - */ - -#define MAX_COMPONENTS 10 /* maximum number of image components */ - - -/* - * Basic data types. - * You may need to change these if you have a machine with unusual data - * type sizes; for example, "char" not 8 bits, "short" not 16 bits, - * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, - * but it had better be at least 16. - */ - -/* Representation of a single sample (pixel element value). - * We frequently allocate large arrays of these, so it's important to keep - * them small. But if you have memory to burn and access to char or short - * arrays is very slow on your hardware, you might want to change these. - */ - -#if BITS_IN_JSAMPLE == 8 -/* JSAMPLE should be the smallest type that will hold the values 0..255. - * You can use a signed char by having GETJSAMPLE mask it with 0xFF. - */ - -#ifdef HAVE_UNSIGNED_CHAR - -typedef unsigned char JSAMPLE; -#define GETJSAMPLE(value) ((int) (value)) - -#else /* not HAVE_UNSIGNED_CHAR */ - -typedef char JSAMPLE; -#ifdef CHAR_IS_UNSIGNED -#define GETJSAMPLE(value) ((int) (value)) -#else -#define GETJSAMPLE(value) ((int) (value) & 0xFF) -#endif /* CHAR_IS_UNSIGNED */ - -#endif /* HAVE_UNSIGNED_CHAR */ - -#define MAXJSAMPLE 255 -#define CENTERJSAMPLE 128 - -#endif /* BITS_IN_JSAMPLE == 8 */ - - -#if BITS_IN_JSAMPLE == 12 -/* JSAMPLE should be the smallest type that will hold the values 0..4095. - * On nearly all machines "short" will do nicely. - */ - -typedef short JSAMPLE; -#define GETJSAMPLE(value) ((int) (value)) - -#define MAXJSAMPLE 4095 -#define CENTERJSAMPLE 2048 - -#endif /* BITS_IN_JSAMPLE == 12 */ - - -/* Representation of a DCT frequency coefficient. - * This should be a signed value of at least 16 bits; "short" is usually OK. - * Again, we allocate large arrays of these, but you can change to int - * if you have memory to burn and "short" is really slow. - */ - -typedef short JCOEF; - - -/* Compressed datastreams are represented as arrays of JOCTET. - * These must be EXACTLY 8 bits wide, at least once they are written to - * external storage. Note that when using the stdio data source/destination - * managers, this is also the data type passed to fread/fwrite. - */ - -#ifdef HAVE_UNSIGNED_CHAR - -typedef unsigned char JOCTET; -#define GETJOCTET(value) (value) - -#else /* not HAVE_UNSIGNED_CHAR */ - -typedef char JOCTET; -#ifdef CHAR_IS_UNSIGNED -#define GETJOCTET(value) (value) -#else -#define GETJOCTET(value) ((value) & 0xFF) -#endif /* CHAR_IS_UNSIGNED */ - -#endif /* HAVE_UNSIGNED_CHAR */ - - -/* These typedefs are used for various table entries and so forth. - * They must be at least as wide as specified; but making them too big - * won't cost a huge amount of memory, so we don't provide special - * extraction code like we did for JSAMPLE. (In other words, these - * typedefs live at a different point on the speed/space tradeoff curve.) - */ - -/* UINT8 must hold at least the values 0..255. */ - -#ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char UINT8; -#else /* not HAVE_UNSIGNED_CHAR */ -#ifdef CHAR_IS_UNSIGNED -typedef char UINT8; -#else /* not CHAR_IS_UNSIGNED */ -typedef short UINT8; -#endif /* CHAR_IS_UNSIGNED */ -#endif /* HAVE_UNSIGNED_CHAR */ - -/* UINT16 must hold at least the values 0..65535. */ - -#ifdef HAVE_UNSIGNED_SHORT -typedef unsigned short UINT16; -#else /* not HAVE_UNSIGNED_SHORT */ -typedef unsigned int UINT16; -#endif /* HAVE_UNSIGNED_SHORT */ - -/* INT16 must hold at least the values -32768..32767. */ - -#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ -typedef short INT16; -#endif - -/* INT32 must hold at least signed 32-bit values. */ - -#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ -#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ -#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ -typedef long INT32; -#endif -#endif -#endif - -/* Datatype used for image dimensions. The JPEG standard only supports - * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore - * "unsigned int" is sufficient on all machines. However, if you need to - * handle larger images and you don't mind deviating from the spec, you - * can change this datatype. - */ - -typedef unsigned int JDIMENSION; - -#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ - - -/* These macros are used in all function definitions and extern declarations. - * You could modify them if you need to change function linkage conventions; - * in particular, you'll need to do that to make the library a Windows DLL. - * Another application is to make all functions global for use with debuggers - * or code profilers that require it. - */ - -/* a function called through method pointers: */ -#define METHODDEF(type) static type -/* a function used only in its module: */ -#define LOCAL(type) static type -/* a function referenced thru EXTERNs: */ -#define GLOBAL(type) type -/* a reference to a GLOBAL function: */ -#define EXTERN(type) extern type - - -/* This macro is used to declare a "method", that is, a function pointer. - * We want to supply prototype parameters if the compiler can cope. - * Note that the arglist parameter must be parenthesized! - * Again, you can customize this if you need special linkage keywords. - */ - -#ifdef HAVE_PROTOTYPES -#define JMETHOD(type,methodname,arglist) type (*methodname) arglist -#else -#define JMETHOD(type,methodname,arglist) type (*methodname) () -#endif - - -/* Here is the pseudo-keyword for declaring pointers that must be "far" - * on 80x86 machines. Most of the specialized coding for 80x86 is handled - * by just saying "FAR *" where such a pointer is needed. In a few places - * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. - */ - -#ifndef FAR -#ifdef NEED_FAR_POINTERS -#define FAR far -#else -#define FAR -#endif -#endif - - -/* - * On a few systems, type boolean and/or its values FALSE, TRUE may appear - * in standard header files. Or you may have conflicts with application- - * specific header files that you want to include together with these files. - * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. - */ - -#ifndef HAVE_BOOLEAN -typedef int boolean; -#endif -#ifndef FALSE /* in case these macros already exist */ -#define FALSE 0 /* values of boolean */ -#endif -#ifndef TRUE -#define TRUE 1 -#endif - - -/* - * The remaining options affect code selection within the JPEG library, - * but they don't need to be visible to most applications using the library. - * To minimize application namespace pollution, the symbols won't be - * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. - */ - -#ifdef JPEG_INTERNALS -#define JPEG_INTERNAL_OPTIONS -#endif - -#ifdef JPEG_INTERNAL_OPTIONS - - -/* - * These defines indicate whether to include various optional functions. - * Undefining some of these symbols will produce a smaller but less capable - * library. Note that you can leave certain source files out of the - * compilation/linking process if you've #undef'd the corresponding symbols. - * (You may HAVE to do that if your compiler doesn't like null source files.) - */ - -/* Capability options common to encoder and decoder: */ - -#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ -#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ -#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ - -/* Encoder capability options: */ - -#define C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ -#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ -#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ -#define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW)*/ -#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ -/* Note: if you selected 12-bit data precision, it is dangerous to turn off - * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit - * precision, so jchuff.c normally uses entropy optimization to compute - * usable tables for higher precision. If you don't want to do optimization, - * you'll have to supply different default Huffman tables. - * The exact same statements apply for progressive JPEG: the default tables - * don't work for progressive mode. (This may get fixed, however.) - */ -#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ - -/* Decoder capability options: */ - -#define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ -#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ -#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ -#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ -#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ -#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ -#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ -#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ -#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ -#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ - -/* more capability options later, no doubt */ - - -/* - * Ordering of RGB data in scanlines passed to or from the application. - * If your application wants to deal with data in the order B,G,R, just - * change these macros. You can also deal with formats such as R,G,B,X - * (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing - * the offsets will also change the order in which colormap data is organized. - * RESTRICTIONS: - * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. - * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not - * useful if you are using JPEG color spaces other than YCbCr or grayscale. - * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE - * is not 3 (they don't understand about dummy color components!). So you - * can't use color quantization if you change that value. - */ - -#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ -#define RGB_GREEN 1 /* Offset of Green */ -#define RGB_BLUE 2 /* Offset of Blue */ -#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ - - -/* Definitions for speed-related optimizations. */ - - -/* If your compiler supports inline functions, define INLINE - * as the inline keyword; otherwise define it as empty. - */ - -#ifndef INLINE -#ifdef __GNUC__ /* for instance, GNU C knows about inline */ -#define INLINE __inline__ -#endif -#ifndef INLINE -#define INLINE /* default is to define it as empty */ -#endif -#endif - - -/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying - * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER - * as short on such a machine. MULTIPLIER must be at least 16 bits wide. - */ - -#ifndef MULTIPLIER -#define MULTIPLIER int /* type for fastest integer multiply */ -#endif - - -/* FAST_FLOAT should be either float or double, whichever is done faster - * by your compiler. (Note that this type is only used in the floating point - * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) - * Typically, float is faster in ANSI C compilers, while double is faster in - * pre-ANSI compilers (because they insist on converting to double anyway). - * The code below therefore chooses float if we have ANSI-style prototypes. - */ - -#ifndef FAST_FLOAT -#ifdef HAVE_PROTOTYPES -#define FAST_FLOAT float -#else -#define FAST_FLOAT double -#endif -#endif - -#endif /* JPEG_INTERNAL_OPTIONS */ +/* + * jmorecfg.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 1997-2009 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains additional configuration options that customize the + * JPEG software for special applications or support machine-dependent + * optimizations. Most users will not need to touch this file. + */ + + +/* + * Define BITS_IN_JSAMPLE as either + * 8 for 8-bit sample values (the usual setting) + * 12 for 12-bit sample values + * Only 8 and 12 are legal data precisions for lossy JPEG according to the + * JPEG standard, and the IJG code does not support anything else! + * We do not support run-time selection of data precision, sorry. + */ + +#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ + + +/* + * Maximum number of components (color channels) allowed in JPEG image. + * To meet the letter of the JPEG spec, set this to 255. However, darn + * few applications need more than 4 channels (maybe 5 for CMYK + alpha + * mask). We recommend 10 as a reasonable compromise; use 4 if you are + * really short on memory. (Each allowed component costs a hundred or so + * bytes of storage, whether actually used in an image or not.) + */ + +#define MAX_COMPONENTS 10 /* maximum number of image components */ + + +/* + * Basic data types. + * You may need to change these if you have a machine with unusual data + * type sizes; for example, "char" not 8 bits, "short" not 16 bits, + * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, + * but it had better be at least 16. + */ + +/* Representation of a single sample (pixel element value). + * We frequently allocate large arrays of these, so it's important to keep + * them small. But if you have memory to burn and access to char or short + * arrays is very slow on your hardware, you might want to change these. + */ + +#if BITS_IN_JSAMPLE == 8 +/* JSAMPLE should be the smallest type that will hold the values 0..255. + * You can use a signed char by having GETJSAMPLE mask it with 0xFF. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JSAMPLE; +#ifdef CHAR_IS_UNSIGNED +#define GETJSAMPLE(value) ((int) (value)) +#else +#define GETJSAMPLE(value) ((int) (value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + +#define MAXJSAMPLE 255 +#define CENTERJSAMPLE 128 + +#endif /* BITS_IN_JSAMPLE == 8 */ + + +#if BITS_IN_JSAMPLE == 12 +/* JSAMPLE should be the smallest type that will hold the values 0..4095. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 4095 +#define CENTERJSAMPLE 2048 + +#endif /* BITS_IN_JSAMPLE == 12 */ + + +/* Representation of a DCT frequency coefficient. + * This should be a signed value of at least 16 bits; "short" is usually OK. + * Again, we allocate large arrays of these, but you can change to int + * if you have memory to burn and "short" is really slow. + */ + +typedef short JCOEF; + + +/* Compressed datastreams are represented as arrays of JOCTET. + * These must be EXACTLY 8 bits wide, at least once they are written to + * external storage. Note that when using the stdio data source/destination + * managers, this is also the data type passed to fread/fwrite. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JOCTET; +#define GETJOCTET(value) (value) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JOCTET; +#ifdef CHAR_IS_UNSIGNED +#define GETJOCTET(value) (value) +#else +#define GETJOCTET(value) ((value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + + +/* These typedefs are used for various table entries and so forth. + * They must be at least as wide as specified; but making them too big + * won't cost a huge amount of memory, so we don't provide special + * extraction code like we did for JSAMPLE. (In other words, these + * typedefs live at a different point on the speed/space tradeoff curve.) + */ + +/* UINT8 must hold at least the values 0..255. */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char UINT8; +#else /* not HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char UINT8; +#else /* not CHAR_IS_UNSIGNED */ +typedef short UINT8; +#endif /* CHAR_IS_UNSIGNED */ +#endif /* HAVE_UNSIGNED_CHAR */ + +/* UINT16 must hold at least the values 0..65535. */ + +#ifdef HAVE_UNSIGNED_SHORT +typedef unsigned short UINT16; +#else /* not HAVE_UNSIGNED_SHORT */ +typedef unsigned int UINT16; +#endif /* HAVE_UNSIGNED_SHORT */ + +/* INT16 must hold at least the values -32768..32767. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ +typedef short INT16; +#endif + +/* INT32 must hold at least signed 32-bit values. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ +#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ +#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ +typedef long INT32; +#endif +#endif +#endif + +/* Datatype used for image dimensions. The JPEG standard only supports + * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore + * "unsigned int" is sufficient on all machines. However, if you need to + * handle larger images and you don't mind deviating from the spec, you + * can change this datatype. + */ + +typedef unsigned int JDIMENSION; + +#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ + + +/* These macros are used in all function definitions and extern declarations. + * You could modify them if you need to change function linkage conventions; + * in particular, you'll need to do that to make the library a Windows DLL. + * Another application is to make all functions global for use with debuggers + * or code profilers that require it. + */ + +/* a function called through method pointers: */ +#define METHODDEF(type) static type +/* a function used only in its module: */ +#define LOCAL(type) static type +/* a function referenced thru EXTERNs: */ +#define GLOBAL(type) type +/* a reference to a GLOBAL function: */ +#define EXTERN(type) extern type + + +/* This macro is used to declare a "method", that is, a function pointer. + * We want to supply prototype parameters if the compiler can cope. + * Note that the arglist parameter must be parenthesized! + * Again, you can customize this if you need special linkage keywords. + */ + +#ifdef HAVE_PROTOTYPES +#define JMETHOD(type,methodname,arglist) type (*methodname) arglist +#else +#define JMETHOD(type,methodname,arglist) type (*methodname) () +#endif + + +/* Here is the pseudo-keyword for declaring pointers that must be "far" + * on 80x86 machines. Most of the specialized coding for 80x86 is handled + * by just saying "FAR *" where such a pointer is needed. In a few places + * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. + */ + +#ifndef FAR +#ifdef NEED_FAR_POINTERS +#define FAR far +#else +#define FAR +#endif +#endif + + +/* + * On a few systems, type boolean and/or its values FALSE, TRUE may appear + * in standard header files. Or you may have conflicts with application- + * specific header files that you want to include together with these files. + * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. + */ + +#ifndef HAVE_BOOLEAN +typedef int boolean; +#endif +#ifndef FALSE /* in case these macros already exist */ +#define FALSE 0 /* values of boolean */ +#endif +#ifndef TRUE +#define TRUE 1 +#endif + + +/* + * The remaining options affect code selection within the JPEG library, + * but they don't need to be visible to most applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. + */ + +#ifdef JPEG_INTERNALS +#define JPEG_INTERNAL_OPTIONS +#endif + +#ifdef JPEG_INTERNAL_OPTIONS + + +/* + * These defines indicate whether to include various optional functions. + * Undefining some of these symbols will produce a smaller but less capable + * library. Note that you can leave certain source files out of the + * compilation/linking process if you've #undef'd the corresponding symbols. + * (You may HAVE to do that if your compiler doesn't like null source files.) + */ + +/* Capability options common to encoder and decoder: */ + +#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ +#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ +#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ + +/* Encoder capability options: */ + +#define C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW)*/ +#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ +/* Note: if you selected 12-bit data precision, it is dangerous to turn off + * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit + * precision, so jchuff.c normally uses entropy optimization to compute + * usable tables for higher precision. If you don't want to do optimization, + * you'll have to supply different default Huffman tables. + * The exact same statements apply for progressive JPEG: the default tables + * don't work for progressive mode. (This may get fixed, however.) + */ +#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ + +/* Decoder capability options: */ + +#define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ +#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ +#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ +#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ +#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ +#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ +#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ + +/* more capability options later, no doubt */ + + +/* + * Ordering of RGB data in scanlines passed to or from the application. + * If your application wants to deal with data in the order B,G,R, just + * change these macros. You can also deal with formats such as R,G,B,X + * (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing + * the offsets will also change the order in which colormap data is organized. + * RESTRICTIONS: + * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. + * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not + * useful if you are using JPEG color spaces other than YCbCr or grayscale. + * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE + * is not 3 (they don't understand about dummy color components!). So you + * can't use color quantization if you change that value. + */ + +#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ +#define RGB_GREEN 1 /* Offset of Green */ +#define RGB_BLUE 2 /* Offset of Blue */ +#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ + + +/* Definitions for speed-related optimizations. */ + + +/* If your compiler supports inline functions, define INLINE + * as the inline keyword; otherwise define it as empty. + */ + +#ifndef INLINE +#ifdef __GNUC__ /* for instance, GNU C knows about inline */ +#define INLINE __inline__ +#endif +#ifndef INLINE +#define INLINE /* default is to define it as empty */ +#endif +#endif + + +/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying + * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER + * as short on such a machine. MULTIPLIER must be at least 16 bits wide. + */ + +#ifndef MULTIPLIER +#define MULTIPLIER int /* type for fastest integer multiply */ +#endif + + +/* FAST_FLOAT should be either float or double, whichever is done faster + * by your compiler. (Note that this type is only used in the floating point + * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) + * Typically, float is faster in ANSI C compilers, while double is faster in + * pre-ANSI compilers (because they insist on converting to double anyway). + * The code below therefore chooses float if we have ANSI-style prototypes. + */ + +#ifndef FAST_FLOAT +#ifdef HAVE_PROTOTYPES +#define FAST_FLOAT float +#else +#define FAST_FLOAT double +#endif +#endif + +#endif /* JPEG_INTERNAL_OPTIONS */ diff --git a/libjpg/jpegint.h b/libjpg/jpegint.h index 69b781b..23454d6 100644 --- a/libjpg/jpegint.h +++ b/libjpg/jpegint.h @@ -1,395 +1,395 @@ -/* - * jpegint.h - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 1997-2009 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file provides common declarations for the various JPEG modules. - * These declarations are considered internal to the JPEG library; most - * applications using the library shouldn't need to include this file. - */ - - -/* Declarations for both compression & decompression */ - -typedef enum { /* Operating modes for buffer controllers */ - JBUF_PASS_THRU, /* Plain stripwise operation */ - /* Remaining modes require a full-image buffer to have been created */ - JBUF_SAVE_SOURCE, /* Run source subobject only, save output */ - JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */ - JBUF_SAVE_AND_PASS /* Run both subobjects, save output */ -} J_BUF_MODE; - -/* Values of global_state field (jdapi.c has some dependencies on ordering!) */ -#define CSTATE_START 100 /* after create_compress */ -#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */ -#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */ -#define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */ -#define DSTATE_START 200 /* after create_decompress */ -#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */ -#define DSTATE_READY 202 /* found SOS, ready for start_decompress */ -#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/ -#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */ -#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */ -#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */ -#define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */ -#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */ -#define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */ -#define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */ - - -/* Declarations for compression modules */ - -/* Master control module */ -struct jpeg_comp_master { - JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo)); - JMETHOD(void, pass_startup, (j_compress_ptr cinfo)); - JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); - - /* State variables made visible to other modules */ - boolean call_pass_startup; /* True if pass_startup must be called */ - boolean is_last_pass; /* True during last pass */ -}; - -/* Main buffer control (downsampled-data buffer) */ -struct jpeg_c_main_controller { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, process_data, (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail)); -}; - -/* Compression preprocessing (downsampling input buffer control) */ -struct jpeg_c_prep_controller { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, pre_process_data, (j_compress_ptr cinfo, - JSAMPARRAY input_buf, - JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail, - JSAMPIMAGE output_buf, - JDIMENSION *out_row_group_ctr, - JDIMENSION out_row_groups_avail)); -}; - -/* Coefficient buffer control */ -struct jpeg_c_coef_controller { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(boolean, compress_data, (j_compress_ptr cinfo, - JSAMPIMAGE input_buf)); -}; - -/* Colorspace conversion */ -struct jpeg_color_converter { - JMETHOD(void, start_pass, (j_compress_ptr cinfo)); - JMETHOD(void, color_convert, (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows)); -}; - -/* Downsampling */ -struct jpeg_downsampler { - JMETHOD(void, start_pass, (j_compress_ptr cinfo)); - JMETHOD(void, downsample, (j_compress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION in_row_index, - JSAMPIMAGE output_buf, - JDIMENSION out_row_group_index)); - - boolean need_context_rows; /* TRUE if need rows above & below */ -}; - -/* Forward DCT (also controls coefficient quantization) */ -typedef JMETHOD(void, forward_DCT_ptr, - (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY sample_data, JBLOCKROW coef_blocks, - JDIMENSION start_row, JDIMENSION start_col, - JDIMENSION num_blocks)); - -struct jpeg_forward_dct { - JMETHOD(void, start_pass, (j_compress_ptr cinfo)); - /* It is useful to allow each component to have a separate FDCT method. */ - forward_DCT_ptr forward_DCT[MAX_COMPONENTS]; -}; - -/* Entropy encoding */ -struct jpeg_entropy_encoder { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics)); - JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data)); - JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); -}; - -/* Marker writing */ -struct jpeg_marker_writer { - JMETHOD(void, write_file_header, (j_compress_ptr cinfo)); - JMETHOD(void, write_frame_header, (j_compress_ptr cinfo)); - JMETHOD(void, write_scan_header, (j_compress_ptr cinfo)); - JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo)); - JMETHOD(void, write_tables_only, (j_compress_ptr cinfo)); - /* These routines are exported to allow insertion of extra markers */ - /* Probably only COM and APPn markers should be written this way */ - JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker, - unsigned int datalen)); - JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val)); -}; - - -/* Declarations for decompression modules */ - -/* Master control module */ -struct jpeg_decomp_master { - JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo)); - - /* State variables made visible to other modules */ - boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ -}; - -/* Input control module */ -struct jpeg_input_controller { - JMETHOD(int, consume_input, (j_decompress_ptr cinfo)); - JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo)); - JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo)); - - /* State variables made visible to other modules */ - boolean has_multiple_scans; /* True if file has multiple scans */ - boolean eoi_reached; /* True when EOI has been consumed */ -}; - -/* Main buffer control (downsampled-data buffer) */ -struct jpeg_d_main_controller { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, process_data, (j_decompress_ptr cinfo, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); -}; - -/* Coefficient buffer control */ -struct jpeg_d_coef_controller { - JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); - JMETHOD(int, consume_data, (j_decompress_ptr cinfo)); - JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo)); - JMETHOD(int, decompress_data, (j_decompress_ptr cinfo, - JSAMPIMAGE output_buf)); - /* Pointer to array of coefficient virtual arrays, or NULL if none */ - jvirt_barray_ptr *coef_arrays; -}; - -/* Decompression postprocessing (color quantization buffer control) */ -struct jpeg_d_post_controller { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, post_process_data, (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, - JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); -}; - -/* Marker reading & parsing */ -struct jpeg_marker_reader { - JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo)); - /* Read markers until SOS or EOI. - * Returns same codes as are defined for jpeg_consume_input: - * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. - */ - JMETHOD(int, read_markers, (j_decompress_ptr cinfo)); - /* Read a restart marker --- exported for use by entropy decoder only */ - jpeg_marker_parser_method read_restart_marker; - - /* State of marker reader --- nominally internal, but applications - * supplying COM or APPn handlers might like to know the state. - */ - boolean saw_SOI; /* found SOI? */ - boolean saw_SOF; /* found SOF? */ - int next_restart_num; /* next restart number expected (0-7) */ - unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */ -}; - -/* Entropy decoding */ -struct jpeg_entropy_decoder { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, - JBLOCKROW *MCU_data)); - - /* This is here to share code between baseline and progressive decoders; */ - /* other modules probably should not use it */ - boolean insufficient_data; /* set TRUE after emitting warning */ -}; - -/* Inverse DCT (also performs dequantization) */ -typedef JMETHOD(void, inverse_DCT_method_ptr, - (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col)); - -struct jpeg_inverse_dct { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - /* It is useful to allow each component to have a separate IDCT method. */ - inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; -}; - -/* Upsampling (note that upsampler must also call color converter) */ -struct jpeg_upsampler { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, upsample, (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, - JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); - - boolean need_context_rows; /* TRUE if need rows above & below */ -}; - -/* Colorspace conversion */ -struct jpeg_color_deconverter { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, color_convert, (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows)); -}; - -/* Color quantization or color precision reduction */ -struct jpeg_color_quantizer { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan)); - JMETHOD(void, color_quantize, (j_decompress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPARRAY output_buf, - int num_rows)); - JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, new_color_map, (j_decompress_ptr cinfo)); -}; - - -/* Miscellaneous useful macros */ - -#undef MAX -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#undef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) - - -/* We assume that right shift corresponds to signed division by 2 with - * rounding towards minus infinity. This is correct for typical "arithmetic - * shift" instructions that shift in copies of the sign bit. But some - * C compilers implement >> with an unsigned shift. For these machines you - * must define RIGHT_SHIFT_IS_UNSIGNED. - * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. - * It is only applied with constant shift counts. SHIFT_TEMPS must be - * included in the variables of any routine using RIGHT_SHIFT. - */ - -#ifdef RIGHT_SHIFT_IS_UNSIGNED -#define SHIFT_TEMPS INT32 shift_temp; -#define RIGHT_SHIFT(x,shft) \ - ((shift_temp = (x)) < 0 ? \ - (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \ - (shift_temp >> (shft))) -#else -#define SHIFT_TEMPS -#define RIGHT_SHIFT(x,shft) ((x) >> (shft)) -#endif - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jinit_compress_master jICompress -#define jinit_c_master_control jICMaster -#define jinit_c_main_controller jICMainC -#define jinit_c_prep_controller jICPrepC -#define jinit_c_coef_controller jICCoefC -#define jinit_color_converter jICColor -#define jinit_downsampler jIDownsampler -#define jinit_forward_dct jIFDCT -#define jinit_huff_encoder jIHEncoder -#define jinit_arith_encoder jIAEncoder -#define jinit_marker_writer jIMWriter -#define jinit_master_decompress jIDMaster -#define jinit_d_main_controller jIDMainC -#define jinit_d_coef_controller jIDCoefC -#define jinit_d_post_controller jIDPostC -#define jinit_input_controller jIInCtlr -#define jinit_marker_reader jIMReader -#define jinit_huff_decoder jIHDecoder -#define jinit_arith_decoder jIADecoder -#define jinit_inverse_dct jIIDCT -#define jinit_upsampler jIUpsampler -#define jinit_color_deconverter jIDColor -#define jinit_1pass_quantizer jI1Quant -#define jinit_2pass_quantizer jI2Quant -#define jinit_merged_upsampler jIMUpsampler -#define jinit_memory_mgr jIMemMgr -#define jdiv_round_up jDivRound -#define jround_up jRound -#define jcopy_sample_rows jCopySamples -#define jcopy_block_row jCopyBlocks -#define jzero_far jZeroFar -#define jpeg_zigzag_order jZIGTable -#define jpeg_natural_order jZAGTable -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* Compression module initialization routines */ -EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo, - boolean transcode_only)); -EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo)); -/* Decompression module initialization routines */ -EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo)); -/* Memory manager initialization */ -EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo)); - -/* Utility routines in jutils.c */ -EXTERN(long) jdiv_round_up JPP((long a, long b)); -EXTERN(long) jround_up JPP((long a, long b)); -EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row, - JSAMPARRAY output_array, int dest_row, - int num_rows, JDIMENSION num_cols)); -EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row, - JDIMENSION num_blocks)); -EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero)); -/* Constant tables in jutils.c */ -#if 0 /* This table is not actually needed in v6a */ -extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ -#endif -extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ - -/* Suppress undefined-structure complaints if necessary. */ - -#ifdef INCOMPLETE_TYPES_BROKEN -#ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */ -struct jvirt_sarray_control { long dummy; }; -struct jvirt_barray_control { long dummy; }; -#endif -#endif /* INCOMPLETE_TYPES_BROKEN */ +/* + * jpegint.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 1997-2009 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides common declarations for the various JPEG modules. + * These declarations are considered internal to the JPEG library; most + * applications using the library shouldn't need to include this file. + */ + + +/* Declarations for both compression & decompression */ + +typedef enum { /* Operating modes for buffer controllers */ + JBUF_PASS_THRU, /* Plain stripwise operation */ + /* Remaining modes require a full-image buffer to have been created */ + JBUF_SAVE_SOURCE, /* Run source subobject only, save output */ + JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */ + JBUF_SAVE_AND_PASS /* Run both subobjects, save output */ +} J_BUF_MODE; + +/* Values of global_state field (jdapi.c has some dependencies on ordering!) */ +#define CSTATE_START 100 /* after create_compress */ +#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */ +#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */ +#define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */ +#define DSTATE_START 200 /* after create_decompress */ +#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */ +#define DSTATE_READY 202 /* found SOS, ready for start_decompress */ +#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/ +#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */ +#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */ +#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */ +#define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */ +#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */ +#define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */ +#define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */ + + +/* Declarations for compression modules */ + +/* Master control module */ +struct jpeg_comp_master { + JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo)); + JMETHOD(void, pass_startup, (j_compress_ptr cinfo)); + JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean call_pass_startup; /* True if pass_startup must be called */ + boolean is_last_pass; /* True during last pass */ +}; + +/* Main buffer control (downsampled-data buffer) */ +struct jpeg_c_main_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, process_data, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail)); +}; + +/* Compression preprocessing (downsampling input buffer control) */ +struct jpeg_c_prep_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, pre_process_data, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, + JDIMENSION *out_row_group_ctr, + JDIMENSION out_row_groups_avail)); +}; + +/* Coefficient buffer control */ +struct jpeg_c_coef_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(boolean, compress_data, (j_compress_ptr cinfo, + JSAMPIMAGE input_buf)); +}; + +/* Colorspace conversion */ +struct jpeg_color_converter { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + JMETHOD(void, color_convert, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows)); +}; + +/* Downsampling */ +struct jpeg_downsampler { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + JMETHOD(void, downsample, (j_compress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_index, + JSAMPIMAGE output_buf, + JDIMENSION out_row_group_index)); + + boolean need_context_rows; /* TRUE if need rows above & below */ +}; + +/* Forward DCT (also controls coefficient quantization) */ +typedef JMETHOD(void, forward_DCT_ptr, + (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_row, JDIMENSION start_col, + JDIMENSION num_blocks)); + +struct jpeg_forward_dct { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + /* It is useful to allow each component to have a separate FDCT method. */ + forward_DCT_ptr forward_DCT[MAX_COMPONENTS]; +}; + +/* Entropy encoding */ +struct jpeg_entropy_encoder { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics)); + JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data)); + JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); +}; + +/* Marker writing */ +struct jpeg_marker_writer { + JMETHOD(void, write_file_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_frame_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_scan_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo)); + JMETHOD(void, write_tables_only, (j_compress_ptr cinfo)); + /* These routines are exported to allow insertion of extra markers */ + /* Probably only COM and APPn markers should be written this way */ + JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker, + unsigned int datalen)); + JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val)); +}; + + +/* Declarations for decompression modules */ + +/* Master control module */ +struct jpeg_decomp_master { + JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ +}; + +/* Input control module */ +struct jpeg_input_controller { + JMETHOD(int, consume_input, (j_decompress_ptr cinfo)); + JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo)); + JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean has_multiple_scans; /* True if file has multiple scans */ + boolean eoi_reached; /* True when EOI has been consumed */ +}; + +/* Main buffer control (downsampled-data buffer) */ +struct jpeg_d_main_controller { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, process_data, (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +}; + +/* Coefficient buffer control */ +struct jpeg_d_coef_controller { + JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); + JMETHOD(int, consume_data, (j_decompress_ptr cinfo)); + JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo)); + JMETHOD(int, decompress_data, (j_decompress_ptr cinfo, + JSAMPIMAGE output_buf)); + /* Pointer to array of coefficient virtual arrays, or NULL if none */ + jvirt_barray_ptr *coef_arrays; +}; + +/* Decompression postprocessing (color quantization buffer control) */ +struct jpeg_d_post_controller { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, post_process_data, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, + JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +}; + +/* Marker reading & parsing */ +struct jpeg_marker_reader { + JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo)); + /* Read markers until SOS or EOI. + * Returns same codes as are defined for jpeg_consume_input: + * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + */ + JMETHOD(int, read_markers, (j_decompress_ptr cinfo)); + /* Read a restart marker --- exported for use by entropy decoder only */ + jpeg_marker_parser_method read_restart_marker; + + /* State of marker reader --- nominally internal, but applications + * supplying COM or APPn handlers might like to know the state. + */ + boolean saw_SOI; /* found SOI? */ + boolean saw_SOF; /* found SOF? */ + int next_restart_num; /* next restart number expected (0-7) */ + unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */ +}; + +/* Entropy decoding */ +struct jpeg_entropy_decoder { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); + + /* This is here to share code between baseline and progressive decoders; */ + /* other modules probably should not use it */ + boolean insufficient_data; /* set TRUE after emitting warning */ +}; + +/* Inverse DCT (also performs dequantization) */ +typedef JMETHOD(void, inverse_DCT_method_ptr, + (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col)); + +struct jpeg_inverse_dct { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + /* It is useful to allow each component to have a separate IDCT method. */ + inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; +}; + +/* Upsampling (note that upsampler must also call color converter) */ +struct jpeg_upsampler { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, upsample, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, + JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); + + boolean need_context_rows; /* TRUE if need rows above & below */ +}; + +/* Colorspace conversion */ +struct jpeg_color_deconverter { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, color_convert, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows)); +}; + +/* Color quantization or color precision reduction */ +struct jpeg_color_quantizer { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan)); + JMETHOD(void, color_quantize, (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, + int num_rows)); + JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, new_color_map, (j_decompress_ptr cinfo)); +}; + + +/* Miscellaneous useful macros */ + +#undef MAX +#define MAX(a,b) ((a) > (b) ? (a) : (b)) +#undef MIN +#define MIN(a,b) ((a) < (b) ? (a) : (b)) + + +/* We assume that right shift corresponds to signed division by 2 with + * rounding towards minus infinity. This is correct for typical "arithmetic + * shift" instructions that shift in copies of the sign bit. But some + * C compilers implement >> with an unsigned shift. For these machines you + * must define RIGHT_SHIFT_IS_UNSIGNED. + * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. + * It is only applied with constant shift counts. SHIFT_TEMPS must be + * included in the variables of any routine using RIGHT_SHIFT. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define SHIFT_TEMPS INT32 shift_temp; +#define RIGHT_SHIFT(x,shft) \ + ((shift_temp = (x)) < 0 ? \ + (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \ + (shift_temp >> (shft))) +#else +#define SHIFT_TEMPS +#define RIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jinit_compress_master jICompress +#define jinit_c_master_control jICMaster +#define jinit_c_main_controller jICMainC +#define jinit_c_prep_controller jICPrepC +#define jinit_c_coef_controller jICCoefC +#define jinit_color_converter jICColor +#define jinit_downsampler jIDownsampler +#define jinit_forward_dct jIFDCT +#define jinit_huff_encoder jIHEncoder +#define jinit_arith_encoder jIAEncoder +#define jinit_marker_writer jIMWriter +#define jinit_master_decompress jIDMaster +#define jinit_d_main_controller jIDMainC +#define jinit_d_coef_controller jIDCoefC +#define jinit_d_post_controller jIDPostC +#define jinit_input_controller jIInCtlr +#define jinit_marker_reader jIMReader +#define jinit_huff_decoder jIHDecoder +#define jinit_arith_decoder jIADecoder +#define jinit_inverse_dct jIIDCT +#define jinit_upsampler jIUpsampler +#define jinit_color_deconverter jIDColor +#define jinit_1pass_quantizer jI1Quant +#define jinit_2pass_quantizer jI2Quant +#define jinit_merged_upsampler jIMUpsampler +#define jinit_memory_mgr jIMemMgr +#define jdiv_round_up jDivRound +#define jround_up jRound +#define jcopy_sample_rows jCopySamples +#define jcopy_block_row jCopyBlocks +#define jzero_far jZeroFar +#define jpeg_zigzag_order jZIGTable +#define jpeg_natural_order jZAGTable +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Compression module initialization routines */ +EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo, + boolean transcode_only)); +EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo)); +/* Decompression module initialization routines */ +EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo)); +/* Memory manager initialization */ +EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo)); + +/* Utility routines in jutils.c */ +EXTERN(long) jdiv_round_up JPP((long a, long b)); +EXTERN(long) jround_up JPP((long a, long b)); +EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row, + JSAMPARRAY output_array, int dest_row, + int num_rows, JDIMENSION num_cols)); +EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row, + JDIMENSION num_blocks)); +EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero)); +/* Constant tables in jutils.c */ +#if 0 /* This table is not actually needed in v6a */ +extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ +#endif +extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ + +/* Suppress undefined-structure complaints if necessary. */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +#endif +#endif /* INCOMPLETE_TYPES_BROKEN */ diff --git a/libjpg/jpeglib.h b/libjpg/jpeglib.h index 341a19c..0b32872 100644 --- a/libjpg/jpeglib.h +++ b/libjpg/jpeglib.h @@ -1,1135 +1,1135 @@ -/* - * jpeglib.h - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2002-2009 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file defines the application interface for the JPEG library. - * Most applications using the library need only include this file, - * and perhaps jerror.h if they want to know the exact error codes. - */ - -#ifndef JPEGLIB_H -#define JPEGLIB_H - -/* - * First we include the configuration files that record how this - * installation of the JPEG library is set up. jconfig.h can be - * generated automatically for many systems. jmorecfg.h contains - * manual configuration options that most people need not worry about. - */ - -#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ -#include "jconfig.h" /* widely used configuration options */ -#endif -#include "jmorecfg.h" /* seldom changed options */ - - -#ifdef __cplusplus -#ifndef DONT_USE_EXTERN_C -extern "C" { -#endif -#endif - -/* Version ID for the JPEG library. - * Might be useful for tests like "#if JPEG_LIB_VERSION >= 70". - */ - -#define JPEG_LIB_VERSION 70 /* Version 7.0 */ - - -/* Various constants determining the sizes of things. - * All of these are specified by the JPEG standard, so don't change them - * if you want to be compatible. - */ - -#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ -#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ -#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ -#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ -#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ -#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ -#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ -/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; - * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. - * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU - * to handle it. We even let you do this from the jconfig.h file. However, - * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe - * sometimes emits noncompliant files doesn't mean you should too. - */ -#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ -#ifndef D_MAX_BLOCKS_IN_MCU -#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ -#endif - - -/* Data structures for images (arrays of samples and of DCT coefficients). - * On 80x86 machines, the image arrays are too big for near pointers, - * but the pointer arrays can fit in near memory. - */ - -typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */ -typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ -typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ - -typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ -typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */ -typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ -typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ - -typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */ - - -/* Types for JPEG compression parameters and working tables. */ - - -/* DCT coefficient quantization tables. */ - -typedef struct { - /* This array gives the coefficient quantizers in natural array order - * (not the zigzag order in which they are stored in a JPEG DQT marker). - * CAUTION: IJG versions prior to v6a kept this array in zigzag order. - */ - UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ - /* This field is used only during compression. It's initialized FALSE when - * the table is created, and set TRUE when it's been output to the file. - * You could suppress output of a table by setting this to TRUE. - * (See jpeg_suppress_tables for an example.) - */ - boolean sent_table; /* TRUE when table has been output */ -} JQUANT_TBL; - - -/* Huffman coding tables. */ - -typedef struct { - /* These two fields directly represent the contents of a JPEG DHT marker */ - UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ - /* length k bits; bits[0] is unused */ - UINT8 huffval[256]; /* The symbols, in order of incr code length */ - /* This field is used only during compression. It's initialized FALSE when - * the table is created, and set TRUE when it's been output to the file. - * You could suppress output of a table by setting this to TRUE. - * (See jpeg_suppress_tables for an example.) - */ - boolean sent_table; /* TRUE when table has been output */ -} JHUFF_TBL; - - -/* Basic info about one component (color channel). */ - -typedef struct { - /* These values are fixed over the whole image. */ - /* For compression, they must be supplied by parameter setup; */ - /* for decompression, they are read from the SOF marker. */ - int component_id; /* identifier for this component (0..255) */ - int component_index; /* its index in SOF or cinfo->comp_info[] */ - int h_samp_factor; /* horizontal sampling factor (1..4) */ - int v_samp_factor; /* vertical sampling factor (1..4) */ - int quant_tbl_no; /* quantization table selector (0..3) */ - /* These values may vary between scans. */ - /* For compression, they must be supplied by parameter setup; */ - /* for decompression, they are read from the SOS marker. */ - /* The decompressor output side may not use these variables. */ - int dc_tbl_no; /* DC entropy table selector (0..3) */ - int ac_tbl_no; /* AC entropy table selector (0..3) */ - - /* Remaining fields should be treated as private by applications. */ - - /* These values are computed during compression or decompression startup: */ - /* Component's size in DCT blocks. - * Any dummy blocks added to complete an MCU are not counted; therefore - * these values do not depend on whether a scan is interleaved or not. - */ - JDIMENSION width_in_blocks; - JDIMENSION height_in_blocks; - /* Size of a DCT block in samples, - * reflecting any scaling we choose to apply during the DCT step. - * Values from 1 to 16 are supported. - * Note that different components may receive different DCT scalings. - */ - int DCT_h_scaled_size; - int DCT_v_scaled_size; - /* The downsampled dimensions are the component's actual, unpadded number - * of samples at the main buffer (preprocessing/compression interface); - * DCT scaling is included, so - * downsampled_width = ceil(image_width * Hi/Hmax * DCT_h_scaled_size/DCTSIZE) - * and similarly for height. - */ - JDIMENSION downsampled_width; /* actual width in samples */ - JDIMENSION downsampled_height; /* actual height in samples */ - /* This flag is used only for decompression. In cases where some of the - * components will be ignored (eg grayscale output from YCbCr image), - * we can skip most computations for the unused components. - */ - boolean component_needed; /* do we need the value of this component? */ - - /* These values are computed before starting a scan of the component. */ - /* The decompressor output side may not use these variables. */ - int MCU_width; /* number of blocks per MCU, horizontally */ - int MCU_height; /* number of blocks per MCU, vertically */ - int MCU_blocks; /* MCU_width * MCU_height */ - int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_scaled_size */ - int last_col_width; /* # of non-dummy blocks across in last MCU */ - int last_row_height; /* # of non-dummy blocks down in last MCU */ - - /* Saved quantization table for component; NULL if none yet saved. - * See jdinput.c comments about the need for this information. - * This field is currently used only for decompression. - */ - JQUANT_TBL * quant_table; - - /* Private per-component storage for DCT or IDCT subsystem. */ - void * dct_table; -} jpeg_component_info; - - -/* The script for encoding a multiple-scan file is an array of these: */ - -typedef struct { - int comps_in_scan; /* number of components encoded in this scan */ - int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ - int Ss, Se; /* progressive JPEG spectral selection parms */ - int Ah, Al; /* progressive JPEG successive approx. parms */ -} jpeg_scan_info; - -/* The decompressor can save APPn and COM markers in a list of these: */ - -typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr; - -struct jpeg_marker_struct { - jpeg_saved_marker_ptr next; /* next in list, or NULL */ - UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ - unsigned int original_length; /* # bytes of data in the file */ - unsigned int data_length; /* # bytes of data saved at data[] */ - JOCTET FAR * data; /* the data contained in the marker */ - /* the marker length word is not counted in data_length or original_length */ -}; - -/* Known color spaces. */ - -typedef enum { - JCS_UNKNOWN, /* error/unspecified */ - JCS_GRAYSCALE, /* monochrome */ - JCS_RGB, /* red/green/blue */ - JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ - JCS_CMYK, /* C/M/Y/K */ - JCS_YCCK /* Y/Cb/Cr/K */ -} J_COLOR_SPACE; - -/* DCT/IDCT algorithm options. */ - -typedef enum { - JDCT_ISLOW, /* slow but accurate integer algorithm */ - JDCT_IFAST, /* faster, less accurate integer method */ - JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ -} J_DCT_METHOD; - -#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ -#define JDCT_DEFAULT JDCT_ISLOW -#endif -#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ -#define JDCT_FASTEST JDCT_IFAST -#endif - -/* Dithering options for decompression. */ - -typedef enum { - JDITHER_NONE, /* no dithering */ - JDITHER_ORDERED, /* simple ordered dither */ - JDITHER_FS /* Floyd-Steinberg error diffusion dither */ -} J_DITHER_MODE; - - -/* Common fields between JPEG compression and decompression master structs. */ - -#define jpeg_common_fields \ - struct jpeg_error_mgr * err; /* Error handler module */\ - struct jpeg_memory_mgr * mem; /* Memory manager module */\ - struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\ - void * client_data; /* Available for use by application */\ - boolean is_decompressor; /* So common code can tell which is which */\ - int global_state /* For checking call sequence validity */ - -/* Routines that are to be used by both halves of the library are declared - * to receive a pointer to this structure. There are no actual instances of - * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. - */ -struct jpeg_common_struct { - jpeg_common_fields; /* Fields common to both master struct types */ - /* Additional fields follow in an actual jpeg_compress_struct or - * jpeg_decompress_struct. All three structs must agree on these - * initial fields! (This would be a lot cleaner in C++.) - */ -}; - -typedef struct jpeg_common_struct * j_common_ptr; -typedef struct jpeg_compress_struct * j_compress_ptr; -typedef struct jpeg_decompress_struct * j_decompress_ptr; - - -/* Master record for a compression instance */ - -struct jpeg_compress_struct { - jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ - - /* Destination for compressed data */ - struct jpeg_destination_mgr * dest; - - /* Description of source image --- these fields must be filled in by - * outer application before starting compression. in_color_space must - * be correct before you can even call jpeg_set_defaults(). - */ - - JDIMENSION image_width; /* input image width */ - JDIMENSION image_height; /* input image height */ - int input_components; /* # of color components in input image */ - J_COLOR_SPACE in_color_space; /* colorspace of input image */ - - double input_gamma; /* image gamma of input image */ - - /* Compression parameters --- these fields must be set before calling - * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to - * initialize everything to reasonable defaults, then changing anything - * the application specifically wants to change. That way you won't get - * burnt when new parameters are added. Also note that there are several - * helper routines to simplify changing parameters. - */ - - unsigned int scale_num, scale_denom; /* fraction by which to scale image */ - - JDIMENSION jpeg_width; /* scaled JPEG image width */ - JDIMENSION jpeg_height; /* scaled JPEG image height */ - /* Dimensions of actual JPEG image that will be written to file, - * derived from input dimensions by scaling factors above. - * These fields are computed by jpeg_start_compress(). - * You can also use jpeg_calc_jpeg_dimensions() to determine these values - * in advance of calling jpeg_start_compress(). - */ - - int data_precision; /* bits of precision in image data */ - - int num_components; /* # of color components in JPEG image */ - J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ - - jpeg_component_info * comp_info; - /* comp_info[i] describes component that appears i'th in SOF */ - - JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; - int q_scale_factor[NUM_QUANT_TBLS]; - /* ptrs to coefficient quantization tables, or NULL if not defined, - * and corresponding scale factors (percentage, initialized 100). - */ - - JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; - JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; - /* ptrs to Huffman coding tables, or NULL if not defined */ - - UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ - UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ - UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ - - int num_scans; /* # of entries in scan_info array */ - const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */ - /* The default value of scan_info is NULL, which causes a single-scan - * sequential JPEG file to be emitted. To create a multi-scan file, - * set num_scans and scan_info to point to an array of scan definitions. - */ - - boolean raw_data_in; /* TRUE=caller supplies downsampled data */ - boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ - boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ - boolean CCIR601_sampling; /* TRUE=first samples are cosited */ - boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */ - int smoothing_factor; /* 1..100, or 0 for no input smoothing */ - J_DCT_METHOD dct_method; /* DCT algorithm selector */ - - /* The restart interval can be specified in absolute MCUs by setting - * restart_interval, or in MCU rows by setting restart_in_rows - * (in which case the correct restart_interval will be figured - * for each scan). - */ - unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ - int restart_in_rows; /* if > 0, MCU rows per restart interval */ - - /* Parameters controlling emission of special markers. */ - - boolean write_JFIF_header; /* should a JFIF marker be written? */ - UINT8 JFIF_major_version; /* What to write for the JFIF version number */ - UINT8 JFIF_minor_version; - /* These three values are not used by the JPEG code, merely copied */ - /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ - /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ - /* ratio is defined by X_density/Y_density even when density_unit=0. */ - UINT8 density_unit; /* JFIF code for pixel size units */ - UINT16 X_density; /* Horizontal pixel density */ - UINT16 Y_density; /* Vertical pixel density */ - boolean write_Adobe_marker; /* should an Adobe marker be written? */ - - /* State variable: index of next scanline to be written to - * jpeg_write_scanlines(). Application may use this to control its - * processing loop, e.g., "while (next_scanline < image_height)". - */ - - JDIMENSION next_scanline; /* 0 .. image_height-1 */ - - /* Remaining fields are known throughout compressor, but generally - * should not be touched by a surrounding application. - */ - - /* - * These fields are computed during compression startup - */ - boolean progressive_mode; /* TRUE if scan script uses progressive mode */ - int max_h_samp_factor; /* largest h_samp_factor */ - int max_v_samp_factor; /* largest v_samp_factor */ - - int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ - int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ - - JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ - /* The coefficient controller receives data in units of MCU rows as defined - * for fully interleaved scans (whether the JPEG file is interleaved or not). - * There are v_samp_factor * DCTSIZE sample rows of each component in an - * "iMCU" (interleaved MCU) row. - */ - - /* - * These fields are valid during any one scan. - * They describe the components and MCUs actually appearing in the scan. - */ - int comps_in_scan; /* # of JPEG components in this scan */ - jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; - /* *cur_comp_info[i] describes component that appears i'th in SOS */ - - JDIMENSION MCUs_per_row; /* # of MCUs across the image */ - JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ - - int blocks_in_MCU; /* # of DCT blocks per MCU */ - int MCU_membership[C_MAX_BLOCKS_IN_MCU]; - /* MCU_membership[i] is index in cur_comp_info of component owning */ - /* i'th block in an MCU */ - - int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ - - /* - * Links to compression subobjects (methods and private variables of modules) - */ - struct jpeg_comp_master * master; - struct jpeg_c_main_controller * main; - struct jpeg_c_prep_controller * prep; - struct jpeg_c_coef_controller * coef; - struct jpeg_marker_writer * marker; - struct jpeg_color_converter * cconvert; - struct jpeg_downsampler * downsample; - struct jpeg_forward_dct * fdct; - struct jpeg_entropy_encoder * entropy; - jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */ - int script_space_size; -}; - - -/* Master record for a decompression instance */ - -struct jpeg_decompress_struct { - jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ - - /* Source of compressed data */ - struct jpeg_source_mgr * src; - - /* Basic description of image --- filled in by jpeg_read_header(). */ - /* Application may inspect these values to decide how to process image. */ - - JDIMENSION image_width; /* nominal image width (from SOF marker) */ - JDIMENSION image_height; /* nominal image height */ - int num_components; /* # of color components in JPEG image */ - J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ - - /* Decompression processing parameters --- these fields must be set before - * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes - * them to default values. - */ - - J_COLOR_SPACE out_color_space; /* colorspace for output */ - - unsigned int scale_num, scale_denom; /* fraction by which to scale image */ - - double output_gamma; /* image gamma wanted in output */ - - boolean buffered_image; /* TRUE=multiple output passes */ - boolean raw_data_out; /* TRUE=downsampled data wanted */ - - J_DCT_METHOD dct_method; /* IDCT algorithm selector */ - boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ - boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ - - boolean quantize_colors; /* TRUE=colormapped output wanted */ - /* the following are ignored if not quantize_colors: */ - J_DITHER_MODE dither_mode; /* type of color dithering to use */ - boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ - int desired_number_of_colors; /* max # colors to use in created colormap */ - /* these are significant only in buffered-image mode: */ - boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ - boolean enable_external_quant;/* enable future use of external colormap */ - boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ - - /* Description of actual output image that will be returned to application. - * These fields are computed by jpeg_start_decompress(). - * You can also use jpeg_calc_output_dimensions() to determine these values - * in advance of calling jpeg_start_decompress(). - */ - - JDIMENSION output_width; /* scaled image width */ - JDIMENSION output_height; /* scaled image height */ - int out_color_components; /* # of color components in out_color_space */ - int output_components; /* # of color components returned */ - /* output_components is 1 (a colormap index) when quantizing colors; - * otherwise it equals out_color_components. - */ - int rec_outbuf_height; /* min recommended height of scanline buffer */ - /* If the buffer passed to jpeg_read_scanlines() is less than this many rows - * high, space and time will be wasted due to unnecessary data copying. - * Usually rec_outbuf_height will be 1 or 2, at most 4. - */ - - /* When quantizing colors, the output colormap is described by these fields. - * The application can supply a colormap by setting colormap non-NULL before - * calling jpeg_start_decompress; otherwise a colormap is created during - * jpeg_start_decompress or jpeg_start_output. - * The map has out_color_components rows and actual_number_of_colors columns. - */ - int actual_number_of_colors; /* number of entries in use */ - JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ - - /* State variables: these variables indicate the progress of decompression. - * The application may examine these but must not modify them. - */ - - /* Row index of next scanline to be read from jpeg_read_scanlines(). - * Application may use this to control its processing loop, e.g., - * "while (output_scanline < output_height)". - */ - JDIMENSION output_scanline; /* 0 .. output_height-1 */ - - /* Current input scan number and number of iMCU rows completed in scan. - * These indicate the progress of the decompressor input side. - */ - int input_scan_number; /* Number of SOS markers seen so far */ - JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ - - /* The "output scan number" is the notional scan being displayed by the - * output side. The decompressor will not allow output scan/row number - * to get ahead of input scan/row, but it can fall arbitrarily far behind. - */ - int output_scan_number; /* Nominal scan number being displayed */ - JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ - - /* Current progression status. coef_bits[c][i] indicates the precision - * with which component c's DCT coefficient i (in zigzag order) is known. - * It is -1 when no data has yet been received, otherwise it is the point - * transform (shift) value for the most recent scan of the coefficient - * (thus, 0 at completion of the progression). - * This pointer is NULL when reading a non-progressive file. - */ - int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ - - /* Internal JPEG parameters --- the application usually need not look at - * these fields. Note that the decompressor output side may not use - * any parameters that can change between scans. - */ - - /* Quantization and Huffman tables are carried forward across input - * datastreams when processing abbreviated JPEG datastreams. - */ - - JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; - /* ptrs to coefficient quantization tables, or NULL if not defined */ - - JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; - JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; - /* ptrs to Huffman coding tables, or NULL if not defined */ - - /* These parameters are never carried across datastreams, since they - * are given in SOF/SOS markers or defined to be reset by SOI. - */ - - int data_precision; /* bits of precision in image data */ - - jpeg_component_info * comp_info; - /* comp_info[i] describes component that appears i'th in SOF */ - - boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ - boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ - - UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ - UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ - UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ - - unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ - - /* These fields record data obtained from optional markers recognized by - * the JPEG library. - */ - boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ - /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ - UINT8 JFIF_major_version; /* JFIF version number */ - UINT8 JFIF_minor_version; - UINT8 density_unit; /* JFIF code for pixel size units */ - UINT16 X_density; /* Horizontal pixel density */ - UINT16 Y_density; /* Vertical pixel density */ - boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ - UINT8 Adobe_transform; /* Color transform code from Adobe marker */ - - boolean CCIR601_sampling; /* TRUE=first samples are cosited */ - - /* Aside from the specific data retained from APPn markers known to the - * library, the uninterpreted contents of any or all APPn and COM markers - * can be saved in a list for examination by the application. - */ - jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ - - /* Remaining fields are known throughout decompressor, but generally - * should not be touched by a surrounding application. - */ - - /* - * These fields are computed during decompression startup - */ - int max_h_samp_factor; /* largest h_samp_factor */ - int max_v_samp_factor; /* largest v_samp_factor */ - - int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ - int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ - - JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ - /* The coefficient controller's input and output progress is measured in - * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows - * in fully interleaved JPEG scans, but are used whether the scan is - * interleaved or not. We define an iMCU row as v_samp_factor DCT block - * rows of each component. Therefore, the IDCT output contains - * v_samp_factor*DCT_v_scaled_size sample rows of a component per iMCU row. - */ - - JSAMPLE * sample_range_limit; /* table for fast range-limiting */ - - /* - * These fields are valid during any one scan. - * They describe the components and MCUs actually appearing in the scan. - * Note that the decompressor output side must not use these fields. - */ - int comps_in_scan; /* # of JPEG components in this scan */ - jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; - /* *cur_comp_info[i] describes component that appears i'th in SOS */ - - JDIMENSION MCUs_per_row; /* # of MCUs across the image */ - JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ - - int blocks_in_MCU; /* # of DCT blocks per MCU */ - int MCU_membership[D_MAX_BLOCKS_IN_MCU]; - /* MCU_membership[i] is index in cur_comp_info of component owning */ - /* i'th block in an MCU */ - - int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ - - /* This field is shared between entropy decoder and marker parser. - * It is either zero or the code of a JPEG marker that has been - * read from the data source, but has not yet been processed. - */ - int unread_marker; - - /* - * Links to decompression subobjects (methods, private variables of modules) - */ - struct jpeg_decomp_master * master; - struct jpeg_d_main_controller * main; - struct jpeg_d_coef_controller * coef; - struct jpeg_d_post_controller * post; - struct jpeg_input_controller * inputctl; - struct jpeg_marker_reader * marker; - struct jpeg_entropy_decoder * entropy; - struct jpeg_inverse_dct * idct; - struct jpeg_upsampler * upsample; - struct jpeg_color_deconverter * cconvert; - struct jpeg_color_quantizer * cquantize; -}; - - -/* "Object" declarations for JPEG modules that may be supplied or called - * directly by the surrounding application. - * As with all objects in the JPEG library, these structs only define the - * publicly visible methods and state variables of a module. Additional - * private fields may exist after the public ones. - */ - - -/* Error handler object */ - -struct jpeg_error_mgr { - /* Error exit handler: does not return to caller */ - JMETHOD(void, error_exit, (j_common_ptr cinfo)); - /* Conditionally emit a trace or warning message */ - JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level)); - /* Routine that actually outputs a trace or error message */ - JMETHOD(void, output_message, (j_common_ptr cinfo)); - /* Format a message string for the most recent JPEG error or message */ - JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer)); -#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ - /* Reset error state variables at start of a new image */ - JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo)); - - /* The message ID code and any parameters are saved here. - * A message can have one string parameter or up to 8 int parameters. - */ - int msg_code; -#define JMSG_STR_PARM_MAX 80 - union { - int i[8]; - char s[JMSG_STR_PARM_MAX]; - } msg_parm; - - /* Standard state variables for error facility */ - - int trace_level; /* max msg_level that will be displayed */ - - /* For recoverable corrupt-data errors, we emit a warning message, - * but keep going unless emit_message chooses to abort. emit_message - * should count warnings in num_warnings. The surrounding application - * can check for bad data by seeing if num_warnings is nonzero at the - * end of processing. - */ - long num_warnings; /* number of corrupt-data warnings */ - - /* These fields point to the table(s) of error message strings. - * An application can change the table pointer to switch to a different - * message list (typically, to change the language in which errors are - * reported). Some applications may wish to add additional error codes - * that will be handled by the JPEG library error mechanism; the second - * table pointer is used for this purpose. - * - * First table includes all errors generated by JPEG library itself. - * Error code 0 is reserved for a "no such error string" message. - */ - const char * const * jpeg_message_table; /* Library errors */ - int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ - /* Second table can be added by application (see cjpeg/djpeg for example). - * It contains strings numbered first_addon_message..last_addon_message. - */ - const char * const * addon_message_table; /* Non-library errors */ - int first_addon_message; /* code for first string in addon table */ - int last_addon_message; /* code for last string in addon table */ -}; - - -/* Progress monitor object */ - -struct jpeg_progress_mgr { - JMETHOD(void, progress_monitor, (j_common_ptr cinfo)); - - long pass_counter; /* work units completed in this pass */ - long pass_limit; /* total number of work units in this pass */ - int completed_passes; /* passes completed so far */ - int total_passes; /* total number of passes expected */ -}; - - -/* Data destination object for compression */ - -struct jpeg_destination_mgr { - JOCTET * next_output_byte; /* => next byte to write in buffer */ - size_t free_in_buffer; /* # of byte spaces remaining in buffer */ - - JMETHOD(void, init_destination, (j_compress_ptr cinfo)); - JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo)); - JMETHOD(void, term_destination, (j_compress_ptr cinfo)); -}; - - -/* Data source object for decompression */ - -struct jpeg_source_mgr { - const JOCTET * next_input_byte; /* => next byte to read from buffer */ - size_t bytes_in_buffer; /* # of bytes remaining in buffer */ - - JMETHOD(void, init_source, (j_decompress_ptr cinfo)); - JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo)); - JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes)); - JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired)); - JMETHOD(void, term_source, (j_decompress_ptr cinfo)); -}; - - -/* Memory manager object. - * Allocates "small" objects (a few K total), "large" objects (tens of K), - * and "really big" objects (virtual arrays with backing store if needed). - * The memory manager does not allow individual objects to be freed; rather, - * each created object is assigned to a pool, and whole pools can be freed - * at once. This is faster and more convenient than remembering exactly what - * to free, especially where malloc()/free() are not too speedy. - * NB: alloc routines never return NULL. They exit to error_exit if not - * successful. - */ - -#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ -#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ -#define JPOOL_NUMPOOLS 2 - -typedef struct jvirt_sarray_control * jvirt_sarray_ptr; -typedef struct jvirt_barray_control * jvirt_barray_ptr; - - -struct jpeg_memory_mgr { - /* Method pointers */ - JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, - size_t sizeofobject)); - JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id, - size_t sizeofobject)); - JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id, - JDIMENSION samplesperrow, - JDIMENSION numrows)); - JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, - JDIMENSION blocksperrow, - JDIMENSION numrows)); - JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, - int pool_id, - boolean pre_zero, - JDIMENSION samplesperrow, - JDIMENSION numrows, - JDIMENSION maxaccess)); - JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo, - int pool_id, - boolean pre_zero, - JDIMENSION blocksperrow, - JDIMENSION numrows, - JDIMENSION maxaccess)); - JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo)); - JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo, - jvirt_sarray_ptr ptr, - JDIMENSION start_row, - JDIMENSION num_rows, - boolean writable)); - JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo, - jvirt_barray_ptr ptr, - JDIMENSION start_row, - JDIMENSION num_rows, - boolean writable)); - JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id)); - JMETHOD(void, self_destruct, (j_common_ptr cinfo)); - - /* Limit on memory allocation for this JPEG object. (Note that this is - * merely advisory, not a guaranteed maximum; it only affects the space - * used for virtual-array buffers.) May be changed by outer application - * after creating the JPEG object. - */ - long max_memory_to_use; - - /* Maximum allocation request accepted by alloc_large. */ - long max_alloc_chunk; -}; - - -/* Routine signature for application-supplied marker processing methods. - * Need not pass marker code since it is stored in cinfo->unread_marker. - */ -typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); - - -/* Declarations for routines called by application. - * The JPP macro hides prototype parameters from compilers that can't cope. - * Note JPP requires double parentheses. - */ - -#ifdef HAVE_PROTOTYPES -#define JPP(arglist) arglist -#else -#define JPP(arglist) () -#endif - - -/* Short forms of external names for systems with brain-damaged linkers. - * We shorten external names to be unique in the first six letters, which - * is good enough for all known systems. - * (If your compiler itself needs names to be unique in less than 15 - * characters, you are out of luck. Get a better compiler.) - */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_std_error jStdError -#define jpeg_CreateCompress jCreaCompress -#define jpeg_CreateDecompress jCreaDecompress -#define jpeg_destroy_compress jDestCompress -#define jpeg_destroy_decompress jDestDecompress -#define jpeg_stdio_dest jStdDest -#define jpeg_stdio_src jStdSrc -#define jpeg_set_defaults jSetDefaults -#define jpeg_set_colorspace jSetColorspace -#define jpeg_default_colorspace jDefColorspace -#define jpeg_set_quality jSetQuality -#define jpeg_set_linear_quality jSetLQuality -#define jpeg_default_qtables jDefQTables -#define jpeg_add_quant_table jAddQuantTable -#define jpeg_quality_scaling jQualityScaling -#define jpeg_simple_progression jSimProgress -#define jpeg_suppress_tables jSuppressTables -#define jpeg_alloc_quant_table jAlcQTable -#define jpeg_alloc_huff_table jAlcHTable -#define jpeg_start_compress jStrtCompress -#define jpeg_write_scanlines jWrtScanlines -#define jpeg_finish_compress jFinCompress -#define jpeg_calc_jpeg_dimensions jCjpegDimensions -#define jpeg_write_raw_data jWrtRawData -#define jpeg_write_marker jWrtMarker -#define jpeg_write_m_header jWrtMHeader -#define jpeg_write_m_byte jWrtMByte -#define jpeg_write_tables jWrtTables -#define jpeg_read_header jReadHeader -#define jpeg_start_decompress jStrtDecompress -#define jpeg_read_scanlines jReadScanlines -#define jpeg_finish_decompress jFinDecompress -#define jpeg_read_raw_data jReadRawData -#define jpeg_has_multiple_scans jHasMultScn -#define jpeg_start_output jStrtOutput -#define jpeg_finish_output jFinOutput -#define jpeg_input_complete jInComplete -#define jpeg_new_colormap jNewCMap -#define jpeg_consume_input jConsumeInput -#define jpeg_calc_output_dimensions jCalcDimensions -#define jpeg_save_markers jSaveMarkers -#define jpeg_set_marker_processor jSetMarker -#define jpeg_read_coefficients jReadCoefs -#define jpeg_write_coefficients jWrtCoefs -#define jpeg_copy_critical_parameters jCopyCrit -#define jpeg_abort_compress jAbrtCompress -#define jpeg_abort_decompress jAbrtDecompress -#define jpeg_abort jAbort -#define jpeg_destroy jDestroy -#define jpeg_resync_to_restart jResyncRestart -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* Default error-management setup */ -EXTERN(struct jpeg_error_mgr *) jpeg_std_error - JPP((struct jpeg_error_mgr * err)); - -/* Initialization of JPEG compression objects. - * jpeg_create_compress() and jpeg_create_decompress() are the exported - * names that applications should call. These expand to calls on - * jpeg_CreateCompress and jpeg_CreateDecompress with additional information - * passed for version mismatch checking. - * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. - */ -#define jpeg_create_compress(cinfo) \ - jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ - (size_t) sizeof(struct jpeg_compress_struct)) -#define jpeg_create_decompress(cinfo) \ - jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ - (size_t) sizeof(struct jpeg_decompress_struct)) -EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo, - int version, size_t structsize)); -EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo, - int version, size_t structsize)); -/* Destruction of JPEG compression objects */ -EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo)); - -/* Standard data source and destination managers: stdio streams. */ -/* Caller is responsible for opening the file before and closing after. */ -EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); -EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); - -/* Default parameter setup for compression */ -EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); -/* Compression parameter setup aids */ -EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo, - J_COLOR_SPACE colorspace)); -EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality, - boolean force_baseline)); -EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo, - int scale_factor, - boolean force_baseline)); -EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo, - boolean force_baseline)); -EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, - const unsigned int *basic_table, - int scale_factor, - boolean force_baseline)); -EXTERN(int) jpeg_quality_scaling JPP((int quality)); -EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo, - boolean suppress)); -EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo)); -EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo)); - -/* Main entry points for compression */ -EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo, - boolean write_all_tables)); -EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo, - JSAMPARRAY scanlines, - JDIMENSION num_lines)); -EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo)); - -/* Precalculate JPEG dimensions for current compression parameters. */ -EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo)); - -/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ -EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo, - JSAMPIMAGE data, - JDIMENSION num_lines)); - -/* Write a special marker. See libjpeg.txt concerning safe usage. */ -EXTERN(void) jpeg_write_marker - JPP((j_compress_ptr cinfo, int marker, - const JOCTET * dataptr, unsigned int datalen)); -/* Same, but piecemeal. */ -EXTERN(void) jpeg_write_m_header - JPP((j_compress_ptr cinfo, int marker, unsigned int datalen)); -EXTERN(void) jpeg_write_m_byte - JPP((j_compress_ptr cinfo, int val)); - -/* Alternate compression function: just write an abbreviated table file */ -EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo)); - -/* Decompression startup: read start of JPEG datastream to see what's there */ -EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo, - boolean require_image)); -/* Return value is one of: */ -#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ -#define JPEG_HEADER_OK 1 /* Found valid image datastream */ -#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ -/* If you pass require_image = TRUE (normal case), you need not check for - * a TABLES_ONLY return code; an abbreviated file will cause an error exit. - * JPEG_SUSPENDED is only possible if you use a data source module that can - * give a suspension return (the stdio source module doesn't). - */ - -/* Main entry points for decompression */ -EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo)); -EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo, - JSAMPARRAY scanlines, - JDIMENSION max_lines)); -EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo)); - -/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ -EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo, - JSAMPIMAGE data, - JDIMENSION max_lines)); - -/* Additional entry points for buffered-image mode. */ -EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo)); -EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo, - int scan_number)); -EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo)); -EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo)); -EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo)); -EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo)); -/* Return value is one of: */ -/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ -#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ -#define JPEG_REACHED_EOI 2 /* Reached end of image */ -#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ -#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ - -/* Precalculate output dimensions for current decompression parameters. */ -EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo)); - -/* Control saving of COM and APPn markers into marker_list. */ -EXTERN(void) jpeg_save_markers - JPP((j_decompress_ptr cinfo, int marker_code, - unsigned int length_limit)); - -/* Install a special processing method for COM or APPn markers. */ -EXTERN(void) jpeg_set_marker_processor - JPP((j_decompress_ptr cinfo, int marker_code, - jpeg_marker_parser_method routine)); - -/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ -EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo)); -EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo, - jvirt_barray_ptr * coef_arrays)); -EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo, - j_compress_ptr dstinfo)); - -/* If you choose to abort compression or decompression before completing - * jpeg_finish_(de)compress, then you need to clean up to release memory, - * temporary files, etc. You can just call jpeg_destroy_(de)compress - * if you're done with the JPEG object, but if you want to clean it up and - * reuse it, call this: - */ -EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo)); - -/* Generic versions of jpeg_abort and jpeg_destroy that work on either - * flavor of JPEG object. These may be more convenient in some places. - */ -EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo)); -EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo)); - -/* Default restart-marker-resync procedure for use by data source modules */ -EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo, - int desired)); - - -/* These marker codes are exported since applications and data source modules - * are likely to want to use them. - */ - -#define JPEG_RST0 0xD0 /* RST0 marker code */ -#define JPEG_EOI 0xD9 /* EOI marker code */ -#define JPEG_APP0 0xE0 /* APP0 marker code */ -#define JPEG_COM 0xFE /* COM marker code */ - - -/* If we have a brain-damaged compiler that emits warnings (or worse, errors) - * for structure definitions that are never filled in, keep it quiet by - * supplying dummy definitions for the various substructures. - */ - -#ifdef INCOMPLETE_TYPES_BROKEN -#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ -struct jvirt_sarray_control { long dummy; }; -struct jvirt_barray_control { long dummy; }; -struct jpeg_comp_master { long dummy; }; -struct jpeg_c_main_controller { long dummy; }; -struct jpeg_c_prep_controller { long dummy; }; -struct jpeg_c_coef_controller { long dummy; }; -struct jpeg_marker_writer { long dummy; }; -struct jpeg_color_converter { long dummy; }; -struct jpeg_downsampler { long dummy; }; -struct jpeg_forward_dct { long dummy; }; -struct jpeg_entropy_encoder { long dummy; }; -struct jpeg_decomp_master { long dummy; }; -struct jpeg_d_main_controller { long dummy; }; -struct jpeg_d_coef_controller { long dummy; }; -struct jpeg_d_post_controller { long dummy; }; -struct jpeg_input_controller { long dummy; }; -struct jpeg_marker_reader { long dummy; }; -struct jpeg_entropy_decoder { long dummy; }; -struct jpeg_inverse_dct { long dummy; }; -struct jpeg_upsampler { long dummy; }; -struct jpeg_color_deconverter { long dummy; }; -struct jpeg_color_quantizer { long dummy; }; -#endif /* JPEG_INTERNALS */ -#endif /* INCOMPLETE_TYPES_BROKEN */ - - -/* - * The JPEG library modules define JPEG_INTERNALS before including this file. - * The internal structure declarations are read only when that is true. - * Applications using the library should not include jpegint.h, but may wish - * to include jerror.h. - */ - -#ifdef JPEG_INTERNALS -#include "jpegint.h" /* fetch private declarations */ -#include "jerror.h" /* fetch error codes too */ -#endif - -#ifdef __cplusplus -#ifndef DONT_USE_EXTERN_C -} -#endif -#endif - -#endif /* JPEGLIB_H */ +/* + * jpeglib.h + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * Modified 2002-2009 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the application interface for the JPEG library. + * Most applications using the library need only include this file, + * and perhaps jerror.h if they want to know the exact error codes. + */ + +#ifndef JPEGLIB_H +#define JPEGLIB_H + +/* + * First we include the configuration files that record how this + * installation of the JPEG library is set up. jconfig.h can be + * generated automatically for many systems. jmorecfg.h contains + * manual configuration options that most people need not worry about. + */ + +#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ +#include "jconfig.h" /* widely used configuration options */ +#endif +#include "jmorecfg.h" /* seldom changed options */ + + +#ifdef __cplusplus +#ifndef DONT_USE_EXTERN_C +extern "C" { +#endif +#endif + +/* Version ID for the JPEG library. + * Might be useful for tests like "#if JPEG_LIB_VERSION >= 70". + */ + +#define JPEG_LIB_VERSION 70 /* Version 7.0 */ + + +/* Various constants determining the sizes of things. + * All of these are specified by the JPEG standard, so don't change them + * if you want to be compatible. + */ + +#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ +#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ +#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ +#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ +#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ +#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ +#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ +/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; + * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. + * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU + * to handle it. We even let you do this from the jconfig.h file. However, + * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe + * sometimes emits noncompliant files doesn't mean you should too. + */ +#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ +#ifndef D_MAX_BLOCKS_IN_MCU +#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ +#endif + + +/* Data structures for images (arrays of samples and of DCT coefficients). + * On 80x86 machines, the image arrays are too big for near pointers, + * but the pointer arrays can fit in near memory. + */ + +typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */ +typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ +typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ + +typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ +typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */ +typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ +typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ + +typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */ + + +/* Types for JPEG compression parameters and working tables. */ + + +/* DCT coefficient quantization tables. */ + +typedef struct { + /* This array gives the coefficient quantizers in natural array order + * (not the zigzag order in which they are stored in a JPEG DQT marker). + * CAUTION: IJG versions prior to v6a kept this array in zigzag order. + */ + UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JQUANT_TBL; + + +/* Huffman coding tables. */ + +typedef struct { + /* These two fields directly represent the contents of a JPEG DHT marker */ + UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ + /* length k bits; bits[0] is unused */ + UINT8 huffval[256]; /* The symbols, in order of incr code length */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JHUFF_TBL; + + +/* Basic info about one component (color channel). */ + +typedef struct { + /* These values are fixed over the whole image. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOF marker. */ + int component_id; /* identifier for this component (0..255) */ + int component_index; /* its index in SOF or cinfo->comp_info[] */ + int h_samp_factor; /* horizontal sampling factor (1..4) */ + int v_samp_factor; /* vertical sampling factor (1..4) */ + int quant_tbl_no; /* quantization table selector (0..3) */ + /* These values may vary between scans. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOS marker. */ + /* The decompressor output side may not use these variables. */ + int dc_tbl_no; /* DC entropy table selector (0..3) */ + int ac_tbl_no; /* AC entropy table selector (0..3) */ + + /* Remaining fields should be treated as private by applications. */ + + /* These values are computed during compression or decompression startup: */ + /* Component's size in DCT blocks. + * Any dummy blocks added to complete an MCU are not counted; therefore + * these values do not depend on whether a scan is interleaved or not. + */ + JDIMENSION width_in_blocks; + JDIMENSION height_in_blocks; + /* Size of a DCT block in samples, + * reflecting any scaling we choose to apply during the DCT step. + * Values from 1 to 16 are supported. + * Note that different components may receive different DCT scalings. + */ + int DCT_h_scaled_size; + int DCT_v_scaled_size; + /* The downsampled dimensions are the component's actual, unpadded number + * of samples at the main buffer (preprocessing/compression interface); + * DCT scaling is included, so + * downsampled_width = ceil(image_width * Hi/Hmax * DCT_h_scaled_size/DCTSIZE) + * and similarly for height. + */ + JDIMENSION downsampled_width; /* actual width in samples */ + JDIMENSION downsampled_height; /* actual height in samples */ + /* This flag is used only for decompression. In cases where some of the + * components will be ignored (eg grayscale output from YCbCr image), + * we can skip most computations for the unused components. + */ + boolean component_needed; /* do we need the value of this component? */ + + /* These values are computed before starting a scan of the component. */ + /* The decompressor output side may not use these variables. */ + int MCU_width; /* number of blocks per MCU, horizontally */ + int MCU_height; /* number of blocks per MCU, vertically */ + int MCU_blocks; /* MCU_width * MCU_height */ + int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_scaled_size */ + int last_col_width; /* # of non-dummy blocks across in last MCU */ + int last_row_height; /* # of non-dummy blocks down in last MCU */ + + /* Saved quantization table for component; NULL if none yet saved. + * See jdinput.c comments about the need for this information. + * This field is currently used only for decompression. + */ + JQUANT_TBL * quant_table; + + /* Private per-component storage for DCT or IDCT subsystem. */ + void * dct_table; +} jpeg_component_info; + + +/* The script for encoding a multiple-scan file is an array of these: */ + +typedef struct { + int comps_in_scan; /* number of components encoded in this scan */ + int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ + int Ss, Se; /* progressive JPEG spectral selection parms */ + int Ah, Al; /* progressive JPEG successive approx. parms */ +} jpeg_scan_info; + +/* The decompressor can save APPn and COM markers in a list of these: */ + +typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr; + +struct jpeg_marker_struct { + jpeg_saved_marker_ptr next; /* next in list, or NULL */ + UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ + unsigned int original_length; /* # bytes of data in the file */ + unsigned int data_length; /* # bytes of data saved at data[] */ + JOCTET FAR * data; /* the data contained in the marker */ + /* the marker length word is not counted in data_length or original_length */ +}; + +/* Known color spaces. */ + +typedef enum { + JCS_UNKNOWN, /* error/unspecified */ + JCS_GRAYSCALE, /* monochrome */ + JCS_RGB, /* red/green/blue */ + JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ + JCS_CMYK, /* C/M/Y/K */ + JCS_YCCK /* Y/Cb/Cr/K */ +} J_COLOR_SPACE; + +/* DCT/IDCT algorithm options. */ + +typedef enum { + JDCT_ISLOW, /* slow but accurate integer algorithm */ + JDCT_IFAST, /* faster, less accurate integer method */ + JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ +} J_DCT_METHOD; + +#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ +#define JDCT_DEFAULT JDCT_ISLOW +#endif +#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ +#define JDCT_FASTEST JDCT_IFAST +#endif + +/* Dithering options for decompression. */ + +typedef enum { + JDITHER_NONE, /* no dithering */ + JDITHER_ORDERED, /* simple ordered dither */ + JDITHER_FS /* Floyd-Steinberg error diffusion dither */ +} J_DITHER_MODE; + + +/* Common fields between JPEG compression and decompression master structs. */ + +#define jpeg_common_fields \ + struct jpeg_error_mgr * err; /* Error handler module */\ + struct jpeg_memory_mgr * mem; /* Memory manager module */\ + struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\ + void * client_data; /* Available for use by application */\ + boolean is_decompressor; /* So common code can tell which is which */\ + int global_state /* For checking call sequence validity */ + +/* Routines that are to be used by both halves of the library are declared + * to receive a pointer to this structure. There are no actual instances of + * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. + */ +struct jpeg_common_struct { + jpeg_common_fields; /* Fields common to both master struct types */ + /* Additional fields follow in an actual jpeg_compress_struct or + * jpeg_decompress_struct. All three structs must agree on these + * initial fields! (This would be a lot cleaner in C++.) + */ +}; + +typedef struct jpeg_common_struct * j_common_ptr; +typedef struct jpeg_compress_struct * j_compress_ptr; +typedef struct jpeg_decompress_struct * j_decompress_ptr; + + +/* Master record for a compression instance */ + +struct jpeg_compress_struct { + jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ + + /* Destination for compressed data */ + struct jpeg_destination_mgr * dest; + + /* Description of source image --- these fields must be filled in by + * outer application before starting compression. in_color_space must + * be correct before you can even call jpeg_set_defaults(). + */ + + JDIMENSION image_width; /* input image width */ + JDIMENSION image_height; /* input image height */ + int input_components; /* # of color components in input image */ + J_COLOR_SPACE in_color_space; /* colorspace of input image */ + + double input_gamma; /* image gamma of input image */ + + /* Compression parameters --- these fields must be set before calling + * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to + * initialize everything to reasonable defaults, then changing anything + * the application specifically wants to change. That way you won't get + * burnt when new parameters are added. Also note that there are several + * helper routines to simplify changing parameters. + */ + + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + JDIMENSION jpeg_width; /* scaled JPEG image width */ + JDIMENSION jpeg_height; /* scaled JPEG image height */ + /* Dimensions of actual JPEG image that will be written to file, + * derived from input dimensions by scaling factors above. + * These fields are computed by jpeg_start_compress(). + * You can also use jpeg_calc_jpeg_dimensions() to determine these values + * in advance of calling jpeg_start_compress(). + */ + + int data_precision; /* bits of precision in image data */ + + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + int q_scale_factor[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined, + * and corresponding scale factors (percentage, initialized 100). + */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + int num_scans; /* # of entries in scan_info array */ + const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */ + /* The default value of scan_info is NULL, which causes a single-scan + * sequential JPEG file to be emitted. To create a multi-scan file, + * set num_scans and scan_info to point to an array of scan definitions. + */ + + boolean raw_data_in; /* TRUE=caller supplies downsampled data */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */ + int smoothing_factor; /* 1..100, or 0 for no input smoothing */ + J_DCT_METHOD dct_method; /* DCT algorithm selector */ + + /* The restart interval can be specified in absolute MCUs by setting + * restart_interval, or in MCU rows by setting restart_in_rows + * (in which case the correct restart_interval will be figured + * for each scan). + */ + unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ + int restart_in_rows; /* if > 0, MCU rows per restart interval */ + + /* Parameters controlling emission of special markers. */ + + boolean write_JFIF_header; /* should a JFIF marker be written? */ + UINT8 JFIF_major_version; /* What to write for the JFIF version number */ + UINT8 JFIF_minor_version; + /* These three values are not used by the JPEG code, merely copied */ + /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ + /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ + /* ratio is defined by X_density/Y_density even when density_unit=0. */ + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean write_Adobe_marker; /* should an Adobe marker be written? */ + + /* State variable: index of next scanline to be written to + * jpeg_write_scanlines(). Application may use this to control its + * processing loop, e.g., "while (next_scanline < image_height)". + */ + + JDIMENSION next_scanline; /* 0 .. image_height-1 */ + + /* Remaining fields are known throughout compressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during compression startup + */ + boolean progressive_mode; /* TRUE if scan script uses progressive mode */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ + int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ + /* The coefficient controller receives data in units of MCU rows as defined + * for fully interleaved scans (whether the JPEG file is interleaved or not). + * There are v_samp_factor * DCTSIZE sample rows of each component in an + * "iMCU" (interleaved MCU) row. + */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[C_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* + * Links to compression subobjects (methods and private variables of modules) + */ + struct jpeg_comp_master * master; + struct jpeg_c_main_controller * main; + struct jpeg_c_prep_controller * prep; + struct jpeg_c_coef_controller * coef; + struct jpeg_marker_writer * marker; + struct jpeg_color_converter * cconvert; + struct jpeg_downsampler * downsample; + struct jpeg_forward_dct * fdct; + struct jpeg_entropy_encoder * entropy; + jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */ + int script_space_size; +}; + + +/* Master record for a decompression instance */ + +struct jpeg_decompress_struct { + jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ + + /* Source of compressed data */ + struct jpeg_source_mgr * src; + + /* Basic description of image --- filled in by jpeg_read_header(). */ + /* Application may inspect these values to decide how to process image. */ + + JDIMENSION image_width; /* nominal image width (from SOF marker) */ + JDIMENSION image_height; /* nominal image height */ + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + /* Decompression processing parameters --- these fields must be set before + * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes + * them to default values. + */ + + J_COLOR_SPACE out_color_space; /* colorspace for output */ + + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + double output_gamma; /* image gamma wanted in output */ + + boolean buffered_image; /* TRUE=multiple output passes */ + boolean raw_data_out; /* TRUE=downsampled data wanted */ + + J_DCT_METHOD dct_method; /* IDCT algorithm selector */ + boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ + boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ + + boolean quantize_colors; /* TRUE=colormapped output wanted */ + /* the following are ignored if not quantize_colors: */ + J_DITHER_MODE dither_mode; /* type of color dithering to use */ + boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ + int desired_number_of_colors; /* max # colors to use in created colormap */ + /* these are significant only in buffered-image mode: */ + boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ + boolean enable_external_quant;/* enable future use of external colormap */ + boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ + + /* Description of actual output image that will be returned to application. + * These fields are computed by jpeg_start_decompress(). + * You can also use jpeg_calc_output_dimensions() to determine these values + * in advance of calling jpeg_start_decompress(). + */ + + JDIMENSION output_width; /* scaled image width */ + JDIMENSION output_height; /* scaled image height */ + int out_color_components; /* # of color components in out_color_space */ + int output_components; /* # of color components returned */ + /* output_components is 1 (a colormap index) when quantizing colors; + * otherwise it equals out_color_components. + */ + int rec_outbuf_height; /* min recommended height of scanline buffer */ + /* If the buffer passed to jpeg_read_scanlines() is less than this many rows + * high, space and time will be wasted due to unnecessary data copying. + * Usually rec_outbuf_height will be 1 or 2, at most 4. + */ + + /* When quantizing colors, the output colormap is described by these fields. + * The application can supply a colormap by setting colormap non-NULL before + * calling jpeg_start_decompress; otherwise a colormap is created during + * jpeg_start_decompress or jpeg_start_output. + * The map has out_color_components rows and actual_number_of_colors columns. + */ + int actual_number_of_colors; /* number of entries in use */ + JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ + + /* State variables: these variables indicate the progress of decompression. + * The application may examine these but must not modify them. + */ + + /* Row index of next scanline to be read from jpeg_read_scanlines(). + * Application may use this to control its processing loop, e.g., + * "while (output_scanline < output_height)". + */ + JDIMENSION output_scanline; /* 0 .. output_height-1 */ + + /* Current input scan number and number of iMCU rows completed in scan. + * These indicate the progress of the decompressor input side. + */ + int input_scan_number; /* Number of SOS markers seen so far */ + JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ + + /* The "output scan number" is the notional scan being displayed by the + * output side. The decompressor will not allow output scan/row number + * to get ahead of input scan/row, but it can fall arbitrarily far behind. + */ + int output_scan_number; /* Nominal scan number being displayed */ + JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ + + /* Current progression status. coef_bits[c][i] indicates the precision + * with which component c's DCT coefficient i (in zigzag order) is known. + * It is -1 when no data has yet been received, otherwise it is the point + * transform (shift) value for the most recent scan of the coefficient + * (thus, 0 at completion of the progression). + * This pointer is NULL when reading a non-progressive file. + */ + int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ + + /* Internal JPEG parameters --- the application usually need not look at + * these fields. Note that the decompressor output side may not use + * any parameters that can change between scans. + */ + + /* Quantization and Huffman tables are carried forward across input + * datastreams when processing abbreviated JPEG datastreams. + */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + /* These parameters are never carried across datastreams, since they + * are given in SOF/SOS markers or defined to be reset by SOI. + */ + + int data_precision; /* bits of precision in image data */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ + + /* These fields record data obtained from optional markers recognized by + * the JPEG library. + */ + boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ + /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ + UINT8 JFIF_major_version; /* JFIF version number */ + UINT8 JFIF_minor_version; + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ + UINT8 Adobe_transform; /* Color transform code from Adobe marker */ + + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + + /* Aside from the specific data retained from APPn markers known to the + * library, the uninterpreted contents of any or all APPn and COM markers + * can be saved in a list for examination by the application. + */ + jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ + + /* Remaining fields are known throughout decompressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during decompression startup + */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ + int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ + /* The coefficient controller's input and output progress is measured in + * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows + * in fully interleaved JPEG scans, but are used whether the scan is + * interleaved or not. We define an iMCU row as v_samp_factor DCT block + * rows of each component. Therefore, the IDCT output contains + * v_samp_factor*DCT_v_scaled_size sample rows of a component per iMCU row. + */ + + JSAMPLE * sample_range_limit; /* table for fast range-limiting */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + * Note that the decompressor output side must not use these fields. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[D_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* This field is shared between entropy decoder and marker parser. + * It is either zero or the code of a JPEG marker that has been + * read from the data source, but has not yet been processed. + */ + int unread_marker; + + /* + * Links to decompression subobjects (methods, private variables of modules) + */ + struct jpeg_decomp_master * master; + struct jpeg_d_main_controller * main; + struct jpeg_d_coef_controller * coef; + struct jpeg_d_post_controller * post; + struct jpeg_input_controller * inputctl; + struct jpeg_marker_reader * marker; + struct jpeg_entropy_decoder * entropy; + struct jpeg_inverse_dct * idct; + struct jpeg_upsampler * upsample; + struct jpeg_color_deconverter * cconvert; + struct jpeg_color_quantizer * cquantize; +}; + + +/* "Object" declarations for JPEG modules that may be supplied or called + * directly by the surrounding application. + * As with all objects in the JPEG library, these structs only define the + * publicly visible methods and state variables of a module. Additional + * private fields may exist after the public ones. + */ + + +/* Error handler object */ + +struct jpeg_error_mgr { + /* Error exit handler: does not return to caller */ + JMETHOD(void, error_exit, (j_common_ptr cinfo)); + /* Conditionally emit a trace or warning message */ + JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level)); + /* Routine that actually outputs a trace or error message */ + JMETHOD(void, output_message, (j_common_ptr cinfo)); + /* Format a message string for the most recent JPEG error or message */ + JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer)); +#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ + /* Reset error state variables at start of a new image */ + JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo)); + + /* The message ID code and any parameters are saved here. + * A message can have one string parameter or up to 8 int parameters. + */ + int msg_code; +#define JMSG_STR_PARM_MAX 80 + union { + int i[8]; + char s[JMSG_STR_PARM_MAX]; + } msg_parm; + + /* Standard state variables for error facility */ + + int trace_level; /* max msg_level that will be displayed */ + + /* For recoverable corrupt-data errors, we emit a warning message, + * but keep going unless emit_message chooses to abort. emit_message + * should count warnings in num_warnings. The surrounding application + * can check for bad data by seeing if num_warnings is nonzero at the + * end of processing. + */ + long num_warnings; /* number of corrupt-data warnings */ + + /* These fields point to the table(s) of error message strings. + * An application can change the table pointer to switch to a different + * message list (typically, to change the language in which errors are + * reported). Some applications may wish to add additional error codes + * that will be handled by the JPEG library error mechanism; the second + * table pointer is used for this purpose. + * + * First table includes all errors generated by JPEG library itself. + * Error code 0 is reserved for a "no such error string" message. + */ + const char * const * jpeg_message_table; /* Library errors */ + int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ + /* Second table can be added by application (see cjpeg/djpeg for example). + * It contains strings numbered first_addon_message..last_addon_message. + */ + const char * const * addon_message_table; /* Non-library errors */ + int first_addon_message; /* code for first string in addon table */ + int last_addon_message; /* code for last string in addon table */ +}; + + +/* Progress monitor object */ + +struct jpeg_progress_mgr { + JMETHOD(void, progress_monitor, (j_common_ptr cinfo)); + + long pass_counter; /* work units completed in this pass */ + long pass_limit; /* total number of work units in this pass */ + int completed_passes; /* passes completed so far */ + int total_passes; /* total number of passes expected */ +}; + + +/* Data destination object for compression */ + +struct jpeg_destination_mgr { + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + + JMETHOD(void, init_destination, (j_compress_ptr cinfo)); + JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo)); + JMETHOD(void, term_destination, (j_compress_ptr cinfo)); +}; + + +/* Data source object for decompression */ + +struct jpeg_source_mgr { + const JOCTET * next_input_byte; /* => next byte to read from buffer */ + size_t bytes_in_buffer; /* # of bytes remaining in buffer */ + + JMETHOD(void, init_source, (j_decompress_ptr cinfo)); + JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo)); + JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes)); + JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired)); + JMETHOD(void, term_source, (j_decompress_ptr cinfo)); +}; + + +/* Memory manager object. + * Allocates "small" objects (a few K total), "large" objects (tens of K), + * and "really big" objects (virtual arrays with backing store if needed). + * The memory manager does not allow individual objects to be freed; rather, + * each created object is assigned to a pool, and whole pools can be freed + * at once. This is faster and more convenient than remembering exactly what + * to free, especially where malloc()/free() are not too speedy. + * NB: alloc routines never return NULL. They exit to error_exit if not + * successful. + */ + +#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ +#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ +#define JPOOL_NUMPOOLS 2 + +typedef struct jvirt_sarray_control * jvirt_sarray_ptr; +typedef struct jvirt_barray_control * jvirt_barray_ptr; + + +struct jpeg_memory_mgr { + /* Method pointers */ + JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, + JDIMENSION numrows)); + JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, + JDIMENSION numrows)); + JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION samplesperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION blocksperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo)); + JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo, + jvirt_sarray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + boolean writable)); + JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo, + jvirt_barray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + boolean writable)); + JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id)); + JMETHOD(void, self_destruct, (j_common_ptr cinfo)); + + /* Limit on memory allocation for this JPEG object. (Note that this is + * merely advisory, not a guaranteed maximum; it only affects the space + * used for virtual-array buffers.) May be changed by outer application + * after creating the JPEG object. + */ + long max_memory_to_use; + + /* Maximum allocation request accepted by alloc_large. */ + long max_alloc_chunk; +}; + + +/* Routine signature for application-supplied marker processing methods. + * Need not pass marker code since it is stored in cinfo->unread_marker. + */ +typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); + + +/* Declarations for routines called by application. + * The JPP macro hides prototype parameters from compilers that can't cope. + * Note JPP requires double parentheses. + */ + +#ifdef HAVE_PROTOTYPES +#define JPP(arglist) arglist +#else +#define JPP(arglist) () +#endif + + +/* Short forms of external names for systems with brain-damaged linkers. + * We shorten external names to be unique in the first six letters, which + * is good enough for all known systems. + * (If your compiler itself needs names to be unique in less than 15 + * characters, you are out of luck. Get a better compiler.) + */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_std_error jStdError +#define jpeg_CreateCompress jCreaCompress +#define jpeg_CreateDecompress jCreaDecompress +#define jpeg_destroy_compress jDestCompress +#define jpeg_destroy_decompress jDestDecompress +#define jpeg_stdio_dest jStdDest +#define jpeg_stdio_src jStdSrc +#define jpeg_set_defaults jSetDefaults +#define jpeg_set_colorspace jSetColorspace +#define jpeg_default_colorspace jDefColorspace +#define jpeg_set_quality jSetQuality +#define jpeg_set_linear_quality jSetLQuality +#define jpeg_default_qtables jDefQTables +#define jpeg_add_quant_table jAddQuantTable +#define jpeg_quality_scaling jQualityScaling +#define jpeg_simple_progression jSimProgress +#define jpeg_suppress_tables jSuppressTables +#define jpeg_alloc_quant_table jAlcQTable +#define jpeg_alloc_huff_table jAlcHTable +#define jpeg_start_compress jStrtCompress +#define jpeg_write_scanlines jWrtScanlines +#define jpeg_finish_compress jFinCompress +#define jpeg_calc_jpeg_dimensions jCjpegDimensions +#define jpeg_write_raw_data jWrtRawData +#define jpeg_write_marker jWrtMarker +#define jpeg_write_m_header jWrtMHeader +#define jpeg_write_m_byte jWrtMByte +#define jpeg_write_tables jWrtTables +#define jpeg_read_header jReadHeader +#define jpeg_start_decompress jStrtDecompress +#define jpeg_read_scanlines jReadScanlines +#define jpeg_finish_decompress jFinDecompress +#define jpeg_read_raw_data jReadRawData +#define jpeg_has_multiple_scans jHasMultScn +#define jpeg_start_output jStrtOutput +#define jpeg_finish_output jFinOutput +#define jpeg_input_complete jInComplete +#define jpeg_new_colormap jNewCMap +#define jpeg_consume_input jConsumeInput +#define jpeg_calc_output_dimensions jCalcDimensions +#define jpeg_save_markers jSaveMarkers +#define jpeg_set_marker_processor jSetMarker +#define jpeg_read_coefficients jReadCoefs +#define jpeg_write_coefficients jWrtCoefs +#define jpeg_copy_critical_parameters jCopyCrit +#define jpeg_abort_compress jAbrtCompress +#define jpeg_abort_decompress jAbrtDecompress +#define jpeg_abort jAbort +#define jpeg_destroy jDestroy +#define jpeg_resync_to_restart jResyncRestart +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Default error-management setup */ +EXTERN(struct jpeg_error_mgr *) jpeg_std_error + JPP((struct jpeg_error_mgr * err)); + +/* Initialization of JPEG compression objects. + * jpeg_create_compress() and jpeg_create_decompress() are the exported + * names that applications should call. These expand to calls on + * jpeg_CreateCompress and jpeg_CreateDecompress with additional information + * passed for version mismatch checking. + * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. + */ +#define jpeg_create_compress(cinfo) \ + jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_compress_struct)) +#define jpeg_create_decompress(cinfo) \ + jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_decompress_struct)) +EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo, + int version, size_t structsize)); +EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo, + int version, size_t structsize)); +/* Destruction of JPEG compression objects */ +EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo)); + +/* Standard data source and destination managers: stdio streams. */ +/* Caller is responsible for opening the file before and closing after. */ +EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); +EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); + +/* Default parameter setup for compression */ +EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); +/* Compression parameter setup aids */ +EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo, + J_COLOR_SPACE colorspace)); +EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality, + boolean force_baseline)); +EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo, + int scale_factor, + boolean force_baseline)); +EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo, + boolean force_baseline)); +EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, + boolean force_baseline)); +EXTERN(int) jpeg_quality_scaling JPP((int quality)); +EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo, + boolean suppress)); +EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo)); +EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo)); + +/* Main entry points for compression */ +EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo, + boolean write_all_tables)); +EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION num_lines)); +EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo)); + +/* Precalculate JPEG dimensions for current compression parameters. */ +EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo)); + +/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION num_lines)); + +/* Write a special marker. See libjpeg.txt concerning safe usage. */ +EXTERN(void) jpeg_write_marker + JPP((j_compress_ptr cinfo, int marker, + const JOCTET * dataptr, unsigned int datalen)); +/* Same, but piecemeal. */ +EXTERN(void) jpeg_write_m_header + JPP((j_compress_ptr cinfo, int marker, unsigned int datalen)); +EXTERN(void) jpeg_write_m_byte + JPP((j_compress_ptr cinfo, int val)); + +/* Alternate compression function: just write an abbreviated table file */ +EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo)); + +/* Decompression startup: read start of JPEG datastream to see what's there */ +EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo, + boolean require_image)); +/* Return value is one of: */ +#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ +#define JPEG_HEADER_OK 1 /* Found valid image datastream */ +#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ +/* If you pass require_image = TRUE (normal case), you need not check for + * a TABLES_ONLY return code; an abbreviated file will cause an error exit. + * JPEG_SUSPENDED is only possible if you use a data source module that can + * give a suspension return (the stdio source module doesn't). + */ + +/* Main entry points for decompression */ +EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo)); +EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION max_lines)); +EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo)); + +/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION max_lines)); + +/* Additional entry points for buffered-image mode. */ +EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo, + int scan_number)); +EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo)); +EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo)); +/* Return value is one of: */ +/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ +#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ +#define JPEG_REACHED_EOI 2 /* Reached end of image */ +#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ +#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ + +/* Precalculate output dimensions for current decompression parameters. */ +EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo)); + +/* Control saving of COM and APPn markers into marker_list. */ +EXTERN(void) jpeg_save_markers + JPP((j_decompress_ptr cinfo, int marker_code, + unsigned int length_limit)); + +/* Install a special processing method for COM or APPn markers. */ +EXTERN(void) jpeg_set_marker_processor + JPP((j_decompress_ptr cinfo, int marker_code, + jpeg_marker_parser_method routine)); + +/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ +EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays)); +EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo, + j_compress_ptr dstinfo)); + +/* If you choose to abort compression or decompression before completing + * jpeg_finish_(de)compress, then you need to clean up to release memory, + * temporary files, etc. You can just call jpeg_destroy_(de)compress + * if you're done with the JPEG object, but if you want to clean it up and + * reuse it, call this: + */ +EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo)); + +/* Generic versions of jpeg_abort and jpeg_destroy that work on either + * flavor of JPEG object. These may be more convenient in some places. + */ +EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo)); +EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo)); + +/* Default restart-marker-resync procedure for use by data source modules */ +EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo, + int desired)); + + +/* These marker codes are exported since applications and data source modules + * are likely to want to use them. + */ + +#define JPEG_RST0 0xD0 /* RST0 marker code */ +#define JPEG_EOI 0xD9 /* EOI marker code */ +#define JPEG_APP0 0xE0 /* APP0 marker code */ +#define JPEG_COM 0xFE /* COM marker code */ + + +/* If we have a brain-damaged compiler that emits warnings (or worse, errors) + * for structure definitions that are never filled in, keep it quiet by + * supplying dummy definitions for the various substructures. + */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +struct jpeg_comp_master { long dummy; }; +struct jpeg_c_main_controller { long dummy; }; +struct jpeg_c_prep_controller { long dummy; }; +struct jpeg_c_coef_controller { long dummy; }; +struct jpeg_marker_writer { long dummy; }; +struct jpeg_color_converter { long dummy; }; +struct jpeg_downsampler { long dummy; }; +struct jpeg_forward_dct { long dummy; }; +struct jpeg_entropy_encoder { long dummy; }; +struct jpeg_decomp_master { long dummy; }; +struct jpeg_d_main_controller { long dummy; }; +struct jpeg_d_coef_controller { long dummy; }; +struct jpeg_d_post_controller { long dummy; }; +struct jpeg_input_controller { long dummy; }; +struct jpeg_marker_reader { long dummy; }; +struct jpeg_entropy_decoder { long dummy; }; +struct jpeg_inverse_dct { long dummy; }; +struct jpeg_upsampler { long dummy; }; +struct jpeg_color_deconverter { long dummy; }; +struct jpeg_color_quantizer { long dummy; }; +#endif /* JPEG_INTERNALS */ +#endif /* INCOMPLETE_TYPES_BROKEN */ + + +/* + * The JPEG library modules define JPEG_INTERNALS before including this file. + * The internal structure declarations are read only when that is true. + * Applications using the library should not include jpegint.h, but may wish + * to include jerror.h. + */ + +#ifdef JPEG_INTERNALS +#include "jpegint.h" /* fetch private declarations */ +#include "jerror.h" /* fetch error codes too */ +#endif + +#ifdef __cplusplus +#ifndef DONT_USE_EXTERN_C +} +#endif +#endif + +#endif /* JPEGLIB_H */ diff --git a/libjpg/jversion.h b/libjpg/jversion.h index 5151731..3a7789f 100644 --- a/libjpg/jversion.h +++ b/libjpg/jversion.h @@ -1,14 +1,14 @@ -/* - * jversion.h - * - * Copyright (C) 1991-2009, Thomas G. Lane, Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains software version identification. - */ - - -#define JVERSION "7 27-Jun-2009" - -#define JCOPYRIGHT "Copyright (C) 2009, Thomas G. Lane, Guido Vollbeding" +/* + * jversion.h + * + * Copyright (C) 1991-2009, Thomas G. Lane, Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains software version identification. + */ + + +#define JVERSION "7 27-Jun-2009" + +#define JCOPYRIGHT "Copyright (C) 2009, Thomas G. Lane, Guido Vollbeding" diff --git a/libjpg/transupp.h b/libjpg/transupp.h index 981b1ce..858e2f4 100644 --- a/libjpg/transupp.h +++ b/libjpg/transupp.h @@ -1,205 +1,205 @@ -/* - * transupp.h - * - * Copyright (C) 1997-2001, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains declarations for image transformation routines and - * other utility code used by the jpegtran sample application. These are - * NOT part of the core JPEG library. But we keep these routines separate - * from jpegtran.c to ease the task of maintaining jpegtran-like programs - * that have other user interfaces. - * - * NOTE: all the routines declared here have very specific requirements - * about when they are to be executed during the reading and writing of the - * source and destination files. See the comments in transupp.c, or see - * jpegtran.c for an example of correct usage. - */ - -/* If you happen not to want the image transform support, disable it here */ -#ifndef TRANSFORMS_SUPPORTED -#define TRANSFORMS_SUPPORTED 1 /* 0 disables transform code */ -#endif - -/* - * Although rotating and flipping data expressed as DCT coefficients is not - * hard, there is an asymmetry in the JPEG format specification for images - * whose dimensions aren't multiples of the iMCU size. The right and bottom - * image edges are padded out to the next iMCU boundary with junk data; but - * no padding is possible at the top and left edges. If we were to flip - * the whole image including the pad data, then pad garbage would become - * visible at the top and/or left, and real pixels would disappear into the - * pad margins --- perhaps permanently, since encoders & decoders may not - * bother to preserve DCT blocks that appear to be completely outside the - * nominal image area. So, we have to exclude any partial iMCUs from the - * basic transformation. - * - * Transpose is the only transformation that can handle partial iMCUs at the - * right and bottom edges completely cleanly. flip_h can flip partial iMCUs - * at the bottom, but leaves any partial iMCUs at the right edge untouched. - * Similarly flip_v leaves any partial iMCUs at the bottom edge untouched. - * The other transforms are defined as combinations of these basic transforms - * and process edge blocks in a way that preserves the equivalence. - * - * The "trim" option causes untransformable partial iMCUs to be dropped; - * this is not strictly lossless, but it usually gives the best-looking - * result for odd-size images. Note that when this option is active, - * the expected mathematical equivalences between the transforms may not hold. - * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim - * followed by -rot 180 -trim trims both edges.) - * - * We also offer a lossless-crop option, which discards data outside a given - * image region but losslessly preserves what is inside. Like the rotate and - * flip transforms, lossless crop is restricted by the JPEG format: the upper - * left corner of the selected region must fall on an iMCU boundary. If this - * does not hold for the given crop parameters, we silently move the upper left - * corner up and/or left to make it so, simultaneously increasing the region - * dimensions to keep the lower right crop corner unchanged. (Thus, the - * output image covers at least the requested region, but may cover more.) - * - * If both crop and a rotate/flip transform are requested, the crop is applied - * last --- that is, the crop region is specified in terms of the destination - * image. - * - * We also offer a "force to grayscale" option, which simply discards the - * chrominance channels of a YCbCr image. This is lossless in the sense that - * the luminance channel is preserved exactly. It's not the same kind of - * thing as the rotate/flip transformations, but it's convenient to handle it - * as part of this package, mainly because the transformation routines have to - * be aware of the option to know how many components to work on. - */ - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jtransform_parse_crop_spec jTrParCrop -#define jtransform_request_workspace jTrRequest -#define jtransform_adjust_parameters jTrAdjust -#define jtransform_execute_transform jTrExec -#define jtransform_perfect_transform jTrPerfect -#define jcopy_markers_setup jCMrkSetup -#define jcopy_markers_execute jCMrkExec -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* - * Codes for supported types of image transformations. - */ - -typedef enum { - JXFORM_NONE, /* no transformation */ - JXFORM_FLIP_H, /* horizontal flip */ - JXFORM_FLIP_V, /* vertical flip */ - JXFORM_TRANSPOSE, /* transpose across UL-to-LR axis */ - JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */ - JXFORM_ROT_90, /* 90-degree clockwise rotation */ - JXFORM_ROT_180, /* 180-degree rotation */ - JXFORM_ROT_270 /* 270-degree clockwise (or 90 ccw) */ -} JXFORM_CODE; - -/* - * Codes for crop parameters, which can individually be unspecified, - * positive, or negative. (Negative width or height makes no sense, though.) - */ - -typedef enum { - JCROP_UNSET, - JCROP_POS, - JCROP_NEG -} JCROP_CODE; - -/* - * Transform parameters struct. - * NB: application must not change any elements of this struct after - * calling jtransform_request_workspace. - */ - -typedef struct { - /* Options: set by caller */ - JXFORM_CODE transform; /* image transform operator */ - boolean perfect; /* if TRUE, fail if partial MCUs are requested */ - boolean trim; /* if TRUE, trim partial MCUs as needed */ - boolean force_grayscale; /* if TRUE, convert color image to grayscale */ - boolean crop; /* if TRUE, crop source image */ - - /* Crop parameters: application need not set these unless crop is TRUE. - * These can be filled in by jtransform_parse_crop_spec(). - */ - JDIMENSION crop_width; /* Width of selected region */ - JCROP_CODE crop_width_set; - JDIMENSION crop_height; /* Height of selected region */ - JCROP_CODE crop_height_set; - JDIMENSION crop_xoffset; /* X offset of selected region */ - JCROP_CODE crop_xoffset_set; /* (negative measures from right edge) */ - JDIMENSION crop_yoffset; /* Y offset of selected region */ - JCROP_CODE crop_yoffset_set; /* (negative measures from bottom edge) */ - - /* Internal workspace: caller should not touch these */ - int num_components; /* # of components in workspace */ - jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */ - JDIMENSION output_width; /* cropped destination dimensions */ - JDIMENSION output_height; - JDIMENSION x_crop_offset; /* destination crop offsets measured in iMCUs */ - JDIMENSION y_crop_offset; - int max_h_samp_factor; /* destination iMCU size */ - int max_v_samp_factor; -} jpeg_transform_info; - - -#if TRANSFORMS_SUPPORTED - -/* Parse a crop specification (written in X11 geometry style) */ -EXTERN(boolean) jtransform_parse_crop_spec - JPP((jpeg_transform_info *info, const char *spec)); -/* Request any required workspace */ -EXTERN(void) jtransform_request_workspace - JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info)); -/* Adjust output image parameters */ -EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters - JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jpeg_transform_info *info)); -/* Execute the actual transformation, if any */ -EXTERN(void) jtransform_execute_transform - JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jpeg_transform_info *info)); -/* Determine whether lossless transformation is perfectly - * possible for a specified image and transformation. - */ -EXTERN(boolean) jtransform_perfect_transform - JPP((JDIMENSION image_width, JDIMENSION image_height, - int MCU_width, int MCU_height, - JXFORM_CODE transform)); - -/* jtransform_execute_transform used to be called - * jtransform_execute_transformation, but some compilers complain about - * routine names that long. This macro is here to avoid breaking any - * old source code that uses the original name... - */ -#define jtransform_execute_transformation jtransform_execute_transform - -#endif /* TRANSFORMS_SUPPORTED */ - - -/* - * Support for copying optional markers from source to destination file. - */ - -typedef enum { - JCOPYOPT_NONE, /* copy no optional markers */ - JCOPYOPT_COMMENTS, /* copy only comment (COM) markers */ - JCOPYOPT_ALL /* copy all optional markers */ -} JCOPY_OPTION; - -#define JCOPYOPT_DEFAULT JCOPYOPT_COMMENTS /* recommended default */ - -/* Setup decompression object to save desired markers in memory */ -EXTERN(void) jcopy_markers_setup - JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option)); -/* Copy markers saved in the given source object to the destination object */ -EXTERN(void) jcopy_markers_execute - JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JCOPY_OPTION option)); +/* + * transupp.h + * + * Copyright (C) 1997-2001, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains declarations for image transformation routines and + * other utility code used by the jpegtran sample application. These are + * NOT part of the core JPEG library. But we keep these routines separate + * from jpegtran.c to ease the task of maintaining jpegtran-like programs + * that have other user interfaces. + * + * NOTE: all the routines declared here have very specific requirements + * about when they are to be executed during the reading and writing of the + * source and destination files. See the comments in transupp.c, or see + * jpegtran.c for an example of correct usage. + */ + +/* If you happen not to want the image transform support, disable it here */ +#ifndef TRANSFORMS_SUPPORTED +#define TRANSFORMS_SUPPORTED 1 /* 0 disables transform code */ +#endif + +/* + * Although rotating and flipping data expressed as DCT coefficients is not + * hard, there is an asymmetry in the JPEG format specification for images + * whose dimensions aren't multiples of the iMCU size. The right and bottom + * image edges are padded out to the next iMCU boundary with junk data; but + * no padding is possible at the top and left edges. If we were to flip + * the whole image including the pad data, then pad garbage would become + * visible at the top and/or left, and real pixels would disappear into the + * pad margins --- perhaps permanently, since encoders & decoders may not + * bother to preserve DCT blocks that appear to be completely outside the + * nominal image area. So, we have to exclude any partial iMCUs from the + * basic transformation. + * + * Transpose is the only transformation that can handle partial iMCUs at the + * right and bottom edges completely cleanly. flip_h can flip partial iMCUs + * at the bottom, but leaves any partial iMCUs at the right edge untouched. + * Similarly flip_v leaves any partial iMCUs at the bottom edge untouched. + * The other transforms are defined as combinations of these basic transforms + * and process edge blocks in a way that preserves the equivalence. + * + * The "trim" option causes untransformable partial iMCUs to be dropped; + * this is not strictly lossless, but it usually gives the best-looking + * result for odd-size images. Note that when this option is active, + * the expected mathematical equivalences between the transforms may not hold. + * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim + * followed by -rot 180 -trim trims both edges.) + * + * We also offer a lossless-crop option, which discards data outside a given + * image region but losslessly preserves what is inside. Like the rotate and + * flip transforms, lossless crop is restricted by the JPEG format: the upper + * left corner of the selected region must fall on an iMCU boundary. If this + * does not hold for the given crop parameters, we silently move the upper left + * corner up and/or left to make it so, simultaneously increasing the region + * dimensions to keep the lower right crop corner unchanged. (Thus, the + * output image covers at least the requested region, but may cover more.) + * + * If both crop and a rotate/flip transform are requested, the crop is applied + * last --- that is, the crop region is specified in terms of the destination + * image. + * + * We also offer a "force to grayscale" option, which simply discards the + * chrominance channels of a YCbCr image. This is lossless in the sense that + * the luminance channel is preserved exactly. It's not the same kind of + * thing as the rotate/flip transformations, but it's convenient to handle it + * as part of this package, mainly because the transformation routines have to + * be aware of the option to know how many components to work on. + */ + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jtransform_parse_crop_spec jTrParCrop +#define jtransform_request_workspace jTrRequest +#define jtransform_adjust_parameters jTrAdjust +#define jtransform_execute_transform jTrExec +#define jtransform_perfect_transform jTrPerfect +#define jcopy_markers_setup jCMrkSetup +#define jcopy_markers_execute jCMrkExec +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* + * Codes for supported types of image transformations. + */ + +typedef enum { + JXFORM_NONE, /* no transformation */ + JXFORM_FLIP_H, /* horizontal flip */ + JXFORM_FLIP_V, /* vertical flip */ + JXFORM_TRANSPOSE, /* transpose across UL-to-LR axis */ + JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */ + JXFORM_ROT_90, /* 90-degree clockwise rotation */ + JXFORM_ROT_180, /* 180-degree rotation */ + JXFORM_ROT_270 /* 270-degree clockwise (or 90 ccw) */ +} JXFORM_CODE; + +/* + * Codes for crop parameters, which can individually be unspecified, + * positive, or negative. (Negative width or height makes no sense, though.) + */ + +typedef enum { + JCROP_UNSET, + JCROP_POS, + JCROP_NEG +} JCROP_CODE; + +/* + * Transform parameters struct. + * NB: application must not change any elements of this struct after + * calling jtransform_request_workspace. + */ + +typedef struct { + /* Options: set by caller */ + JXFORM_CODE transform; /* image transform operator */ + boolean perfect; /* if TRUE, fail if partial MCUs are requested */ + boolean trim; /* if TRUE, trim partial MCUs as needed */ + boolean force_grayscale; /* if TRUE, convert color image to grayscale */ + boolean crop; /* if TRUE, crop source image */ + + /* Crop parameters: application need not set these unless crop is TRUE. + * These can be filled in by jtransform_parse_crop_spec(). + */ + JDIMENSION crop_width; /* Width of selected region */ + JCROP_CODE crop_width_set; + JDIMENSION crop_height; /* Height of selected region */ + JCROP_CODE crop_height_set; + JDIMENSION crop_xoffset; /* X offset of selected region */ + JCROP_CODE crop_xoffset_set; /* (negative measures from right edge) */ + JDIMENSION crop_yoffset; /* Y offset of selected region */ + JCROP_CODE crop_yoffset_set; /* (negative measures from bottom edge) */ + + /* Internal workspace: caller should not touch these */ + int num_components; /* # of components in workspace */ + jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */ + JDIMENSION output_width; /* cropped destination dimensions */ + JDIMENSION output_height; + JDIMENSION x_crop_offset; /* destination crop offsets measured in iMCUs */ + JDIMENSION y_crop_offset; + int max_h_samp_factor; /* destination iMCU size */ + int max_v_samp_factor; +} jpeg_transform_info; + + +#if TRANSFORMS_SUPPORTED + +/* Parse a crop specification (written in X11 geometry style) */ +EXTERN(boolean) jtransform_parse_crop_spec + JPP((jpeg_transform_info *info, const char *spec)); +/* Request any required workspace */ +EXTERN(void) jtransform_request_workspace + JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info)); +/* Adjust output image parameters */ +EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters + JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jpeg_transform_info *info)); +/* Execute the actual transformation, if any */ +EXTERN(void) jtransform_execute_transform + JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jpeg_transform_info *info)); +/* Determine whether lossless transformation is perfectly + * possible for a specified image and transformation. + */ +EXTERN(boolean) jtransform_perfect_transform + JPP((JDIMENSION image_width, JDIMENSION image_height, + int MCU_width, int MCU_height, + JXFORM_CODE transform)); + +/* jtransform_execute_transform used to be called + * jtransform_execute_transformation, but some compilers complain about + * routine names that long. This macro is here to avoid breaking any + * old source code that uses the original name... + */ +#define jtransform_execute_transformation jtransform_execute_transform + +#endif /* TRANSFORMS_SUPPORTED */ + + +/* + * Support for copying optional markers from source to destination file. + */ + +typedef enum { + JCOPYOPT_NONE, /* copy no optional markers */ + JCOPYOPT_COMMENTS, /* copy only comment (COM) markers */ + JCOPYOPT_ALL /* copy all optional markers */ +} JCOPY_OPTION; + +#define JCOPYOPT_DEFAULT JCOPYOPT_COMMENTS /* recommended default */ + +/* Setup decompression object to save desired markers in memory */ +EXTERN(void) jcopy_markers_setup + JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option)); +/* Copy markers saved in the given source object to the destination object */ +EXTERN(void) jcopy_markers_execute + JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JCOPY_OPTION option)); diff --git a/objects/out.txt b/objects/out.txt deleted file mode 100644 index 81facd4..0000000 --- a/objects/out.txt +++ /dev/null @@ -1,917 +0,0 @@ -type Mesh -name Cube -vertexCount 236 -vert 0.500000 1.000000 0.000000 -vert 0.000000 1.000000 0.000000 -vert 0.500000 1.000000 0.500000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 0.999999 1.000000 -vert 0.500000 1.000000 -0.500000 -vert 0.000000 1.000000 -0.500000 -vert 0.000000 1.000000 -1.000000 -vert -0.500000 1.000000 -1.000000 -vert -1.000000 1.000000 -1.000000 -vert -0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 -1.000000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 1.000000 -1.000000 -vert 0.000000 1.000000 0.500000 -vert 0.000000 1.000000 1.000000 -vert 0.500000 1.000000 1.000000 -vert -0.500000 1.000000 0.000000 -vert -0.500000 1.000000 0.500000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 1.000000 1.000000 -vert -0.500000 1.000000 1.000000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 -0.500000 0.000000 -vert -1.000000 0.000000 0.000000 -vert -1.000000 -0.500000 -0.500000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 0.000000 -vert -1.000000 -1.000000 -1.000000 -vert -1.000000 -0.500000 0.500000 -vert -1.000000 0.000000 0.500000 -vert -1.000000 0.000000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 -1.000000 0.500000 -vert -1.000000 -1.000000 1.000000 -vert -1.000000 0.000000 -0.500000 -vert -1.000000 0.000000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -1.000000 0.500000 0.000000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 0.500000 -1.000000 -vert 0.500000 -1.000000 -0.500000 -vert -0.000000 -1.000000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 -1.000000 -vert 0.500000 -1.000000 0.000000 -vert -0.000000 -1.000000 -0.500000 -vert -0.000000 -1.000000 0.000000 -vert -0.500000 -1.000000 -0.500000 -vert -0.500000 -1.000000 -1.000000 -vert 0.499999 -1.000000 0.500000 -vert 1.000000 -1.000000 0.500000 -vert 0.999999 -1.000001 1.000000 -vert -0.000000 -1.000000 0.500000 -vert 0.499999 -1.000000 1.000000 -vert -0.000001 -1.000000 1.000000 -vert -0.500000 -1.000000 0.500000 -vert -0.500000 -1.000000 0.000000 -vert -0.500000 -1.000000 1.000000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 -0.000000 -1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 0.500000 0.000000 -vert 1.000000 -0.000000 -0.500000 -vert 1.000000 -0.000000 0.000000 -vert 1.000000 -0.500000 -0.500000 -vert 1.000000 -0.500000 -1.000000 -vert 1.000000 0.500000 0.500000 -vert 1.000000 -0.000000 0.500000 -vert 1.000000 0.499999 1.000000 -vert 1.000000 -0.000001 1.000000 -vert 1.000000 -0.500000 0.500000 -vert 1.000000 -0.500000 0.000000 -vert 1.000000 -0.500001 1.000000 -vert 0.500000 0.500000 1.000000 -vert -0.000000 0.500000 1.000000 -vert 0.500000 -0.000000 1.000000 -vert -0.000000 -0.000000 1.000000 -vert 0.500000 -0.500000 1.000000 -vert -0.500000 0.500000 1.000000 -vert -0.500000 -0.000000 1.000000 -vert -0.500000 -0.500000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert 0.500000 0.000000 -1.000000 -vert -0.000000 0.000000 -1.000000 -vert 0.500000 0.500000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert -0.000000 -0.500000 -1.000000 -vert -0.500000 -0.500000 -1.000000 -vert 0.000000 0.500000 -1.000000 -vert -0.500000 0.000000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert 0.500000 1.000000 0.000000 -vert 0.500000 1.000000 0.000000 -vert 0.500000 1.000000 0.000000 -vert 0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 0.500000 -vert 0.500000 1.000000 0.500000 -vert 0.500000 1.000000 0.500000 -vert -1.000000 1.000000 1.000000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 1.000000 -1.000000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 1.000000 1.000000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 -1.000000 0.000000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 0.000000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 0.500000 -vert -1.000000 -1.000000 0.000000 -vert -0.500000 -1.000000 0.500000 -vert -0.500000 -1.000000 0.500000 -vert -1.000000 -1.000000 0.500000 -vert -1.000000 -1.000000 0.500000 -vert -0.500000 -1.000000 0.500000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 1.000000 -1.000000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 0.999999 1.000000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 0.999999 1.000000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 0.500000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 0.500000 -vert 1.000000 -1.000000 0.500000 -vert 1.000000 -0.000001 1.000000 -vert 1.000000 0.499999 1.000000 -vert 1.000000 0.499999 1.000000 -vert 0.500000 1.000000 1.000000 -vert 0.500000 1.000000 1.000000 -vert 0.500000 1.000000 1.000000 -vert 1.000000 0.499999 1.000000 -vert 0.500000 0.500000 1.000000 -vert 0.500000 0.500000 1.000000 -vert 1.000000 -0.000001 1.000000 -vert 0.500000 0.500000 1.000000 -vert 1.000000 -0.500001 1.000000 -vert 1.000000 -0.500001 1.000000 -vert 1.000000 -0.500001 1.000000 -vert 1.000000 -0.000001 1.000000 -vert -0.500000 1.000000 1.000000 -vert -0.500000 1.000000 1.000000 -vert -0.500000 1.000000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.000000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.000000 1.000000 -vert 0.499999 -1.000000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert 0.499999 -1.000000 1.000000 -vert 0.499999 -1.000000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 0.000000 1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 -0.000000 -1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 -0.000000 -1.000000 -vert -0.000000 -1.000000 -1.000000 -vert -0.500000 -1.000000 -1.000000 -vert -1.000000 -1.000000 -1.000000 -vert -0.500000 -1.000000 -1.000000 -vert -0.000000 -1.000000 -1.000000 -vert -0.500000 -1.000000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert -0.000000 -1.000000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert 1.000000 -0.500000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert 1.000000 -1.000000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert 1.000000 -0.500000 -1.000000 -vert 1.000000 -0.500000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert 1.000000 -0.000000 -1.000000 -vert 0.500000 1.000000 -1.000000 -vert 0.500000 1.000000 -1.000000 -vert 0.500000 1.000000 -1.000000 -vert -1.000000 0.000000 -1.000000 -vert -1.000000 0.500000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert -1.000000 0.500000 -1.000000 -vert -1.000000 0.000000 -1.000000 -vert -1.000000 0.500000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -1.000000 0.000000 -1.000000 -vert -0.500000 -0.500000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -1.000000 -1.000000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -0.500000 -0.500000 -1.000000 -vert -0.500000 -0.500000 -1.000000 - -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.666646 0.666646 0.333323 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 0.707083 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm -0.408246 0.816492 -0.408246 -norm 0.000000 1.000000 0.000000 -norm 0.000000 0.707083 -0.707083 -norm 0.707083 0.707083 0.000000 -norm 0.408246 0.408246 -0.816492 -norm 0.000000 1.000000 0.000000 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.666646 0.333323 0.666646 -norm 0.000000 0.707083 0.707083 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.577349 -0.577349 -0.577349 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 0.707083 -norm -0.707083 -0.707083 0.000000 -norm -0.577349 -0.577349 0.577349 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.816492 -0.408246 -0.408246 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -1.000000 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.333323 -0.666646 0.666646 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 0.707083 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 -0.707083 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm -0.666646 0.333323 0.666646 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.408246 0.816492 -0.408246 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.666646 0.333323 0.666646 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.408246 0.408246 -0.816492 -norm 0.707083 0.707083 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.666646 0.666646 0.333323 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.666646 0.666646 0.333323 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm -0.577349 -0.577349 -0.577349 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.816492 -0.408246 -0.408246 -norm 0.000000 -0.707083 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.577349 -0.577349 -0.577349 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 - -uv 0.437500 0.625000 -uv 0.375000 0.625000 -uv 0.437500 0.562500 -uv 0.500000 0.562500 -uv 0.500000 0.625000 -uv 0.500000 0.500000 -uv 0.437500 0.687500 -uv 0.375000 0.687500 -uv 0.375000 0.750000 -uv 0.312500 0.750000 -uv 0.250000 0.750000 -uv 0.312500 0.687500 -uv 0.437500 0.750000 -uv 0.500000 0.687500 -uv 0.500000 0.750000 -uv 0.375000 0.562500 -uv 0.375000 0.500000 -uv 0.437500 0.500000 -uv 0.312500 0.625000 -uv 0.312500 0.562500 -uv 0.250000 0.625000 -uv 0.249999 0.562500 -uv 0.249999 0.500000 -uv 0.312499 0.500000 -uv 0.250000 0.687500 -uv 0.187500 0.125000 -uv 0.125000 0.125000 -uv 0.187500 0.062500 -uv 0.250000 0.062500 -uv 0.250000 0.125000 -uv 0.250000 0.000000 -uv 0.187500 0.187500 -uv 0.125000 0.187500 -uv 0.125000 0.250000 -uv 0.062500 0.250000 -uv 0.062500 0.187500 -uv 0.187500 0.250000 -uv 0.249999 0.187500 -uv 0.249999 0.250000 -uv 0.125000 0.062500 -uv 0.125000 0.000000 -uv 0.187500 0.000000 -uv 0.062500 0.125000 -uv 0.062500 0.062500 -uv 0.062500 0.000000 -uv 0.437499 0.062500 -uv 0.374999 0.000000 -uv 0.437499 0.000000 -uv 0.499999 0.062500 -uv 0.499999 0.125000 -uv 0.499999 0.000000 -uv 0.437499 0.125000 -uv 0.374999 0.062500 -uv 0.374999 0.125000 -uv 0.312499 0.062500 -uv 0.312499 0.000000 -uv 0.437499 0.187500 -uv 0.499999 0.187500 -uv 0.499999 0.250000 -uv 0.374999 0.187500 -uv 0.437499 0.250000 -uv 0.374999 0.250000 -uv 0.312499 0.187500 -uv 0.312499 0.125000 -uv 0.312499 0.250000 -uv 0.687499 0.062500 -uv 0.624999 0.000000 -uv 0.687499 0.000000 -uv 0.687499 0.125000 -uv 0.624999 0.062500 -uv 0.624999 0.125000 -uv 0.562499 0.062500 -uv 0.562499 0.000000 -uv 0.687499 0.187500 -uv 0.624999 0.187500 -uv 0.687499 0.250000 -uv 0.624999 0.250000 -uv 0.562499 0.187500 -uv 0.562499 0.125000 -uv 0.562499 0.250000 -uv 0.437499 0.437500 -uv 0.374999 0.437500 -uv 0.437499 0.375000 -uv 0.374999 0.375000 -uv 0.437499 0.312500 -uv 0.312499 0.437500 -uv 0.312499 0.375000 -uv 0.312499 0.312500 -uv 0.374999 0.312500 -uv 0.437500 0.875000 -uv 0.375000 0.875000 -uv 0.437500 0.812500 -uv 0.437500 0.937500 -uv 0.375000 0.937500 -uv 0.312500 0.937500 -uv 0.375000 0.812500 -uv 0.312500 0.875000 -uv 0.312500 0.812500 -uv 0.437500 0.625000 -uv 0.437500 0.625000 -uv 0.437500 0.625000 -uv 0.437500 0.687500 -uv 0.437500 0.687500 -uv 0.437500 0.687500 -uv 0.437500 0.562500 -uv 0.437500 0.562500 -uv 0.437500 0.562500 -uv 0.000000 0.250000 -uv -0.000000 0.125000 -uv 0.000000 0.062500 -uv 0.000000 0.000000 -uv 0.062500 0.062500 -uv 0.000000 0.062500 -uv -0.000000 0.125000 -uv 0.000000 0.062500 -uv 0.062500 0.062500 -uv 0.062500 0.062500 -uv -0.000000 0.187500 -uv -0.000000 0.125000 -uv 0.062500 0.187500 -uv -0.000000 0.187500 -uv 0.000000 0.250000 -uv -0.000000 0.187500 -uv 0.062500 0.187500 -uv 0.062500 0.187500 -uv 0.249999 0.125000 -uv 0.249999 0.062500 -uv 0.249999 0.062500 -uv 0.249999 0.125000 -uv 0.249999 0.062500 -uv 0.249999 0.187500 -uv 0.249999 0.125000 -uv 0.312499 0.187500 -uv 0.312499 0.187500 -uv 0.249999 0.187500 -uv 0.249999 0.187500 -uv 0.312499 0.187500 -uv 0.749999 0.062500 -uv 0.749999 0.125000 -uv 0.749999 0.062500 -uv 0.749999 0.000000 -uv 0.749999 0.062500 -uv 0.687499 0.062500 -uv 0.749999 0.125000 -uv 0.687499 0.062500 -uv 0.687499 0.062500 -uv 0.749999 0.187500 -uv 0.749999 0.250000 -uv 0.749999 0.187500 -uv 0.749999 0.187500 -uv 0.749999 0.125000 -uv 0.749999 0.250000 -uv 0.499999 0.125000 -uv 0.499999 0.062500 -uv 0.499999 0.062500 -uv 0.499999 0.125000 -uv 0.499999 0.062500 -uv 0.499999 0.187500 -uv 0.499999 0.125000 -uv 0.499999 0.187500 -uv 0.499999 0.187500 -uv 0.499999 0.375000 -uv 0.500000 0.437500 -uv 0.500000 0.437500 -uv 0.437500 0.500000 -uv 0.437500 0.500000 -uv 0.437500 0.500000 -uv 0.500000 0.437500 -uv 0.437500 0.437500 -uv 0.437500 0.437500 -uv 0.499999 0.375000 -uv 0.437500 0.437500 -uv 0.499999 0.312500 -uv 0.499999 0.312500 -uv 0.499999 0.312500 -uv 0.499999 0.375000 -uv 0.312499 0.500000 -uv 0.312499 0.500000 -uv 0.312499 0.500000 -uv 0.249999 0.437500 -uv 0.249999 0.375000 -uv 0.249999 0.437500 -uv 0.249999 0.437500 -uv 0.249999 0.375000 -uv 0.437499 0.250000 -uv 0.374999 0.312500 -uv 0.437499 0.250000 -uv 0.437499 0.250000 -uv 0.374999 0.312500 -uv 0.374999 0.312500 -uv 0.249999 0.312500 -uv 0.249999 0.312500 -uv 0.249999 0.312500 -uv 0.249999 0.375000 -uv 0.500000 0.812500 -uv 0.500000 0.875000 -uv 0.500000 0.812500 -uv 0.500000 0.812500 -uv 0.500000 0.875000 -uv 0.375000 1.000000 -uv 0.312500 1.000000 -uv 0.250000 1.000000 -uv 0.312500 1.000000 -uv 0.375000 1.000000 -uv 0.312500 1.000000 -uv 0.437500 1.000000 -uv 0.375000 1.000000 -uv 0.437500 0.937500 -uv 0.437500 0.937500 -uv 0.500000 0.937500 -uv 0.437500 1.000000 -uv 0.500000 1.000000 -uv 0.437500 1.000000 -uv 0.500000 0.937500 -uv 0.500000 0.937500 -uv 0.437500 0.937500 -uv 0.500000 0.875000 -uv 0.437500 0.750000 -uv 0.437500 0.750000 -uv 0.437500 0.750000 -uv 0.250000 0.875000 -uv 0.250000 0.812500 -uv 0.312500 0.812500 -uv 0.250000 0.812500 -uv 0.250000 0.875000 -uv 0.250000 0.812500 -uv 0.312500 0.812500 -uv 0.312500 0.812500 -uv 0.250000 0.937500 -uv 0.250000 0.875000 -uv 0.312500 0.937500 -uv 0.250000 0.937500 -uv 0.250000 1.000000 -uv 0.250000 0.937500 -uv 0.312500 0.937500 -uv 0.312500 0.937500 - -vertexGroup Group - -material mt -texture -path fon.jpg -end -end - -vertexIndexCount 192 -face 0 1 2 -face 2 3 0 -face 4 0 3 -face 3 2 5 -face 98 4 6 -face 6 7 99 -face 1 100 7 -face 7 6 8 -face 9 10 11 -face 11 7 9 -face 8 9 7 -face 7 11 1 -face 12 8 101 -face 102 13 12 -face 14 12 13 -face 13 103 4 -face 15 16 17 -face 17 104 15 -face 1 15 105 -face 106 17 5 -face 15 1 18 -face 18 19 15 -face 16 15 19 -face 19 18 20 -face 21 22 23 -face 23 19 21 -face 20 21 19 -face 19 23 16 -face 24 20 18 -face 18 11 24 -face 10 24 11 -face 11 18 1 -face 25 26 27 -face 27 28 25 -face 29 25 28 -face 28 27 30 -face 25 29 31 -face 31 32 25 -face 26 25 32 -face 32 31 33 -face 34 107 35 -face 35 32 34 -face 33 34 32 -face 32 35 26 -face 36 33 31 -face 31 37 36 -face 38 36 37 -face 37 31 29 -face 39 40 41 -face 41 27 39 -face 26 39 27 -face 27 41 30 -face 39 26 42 -face 42 43 39 -face 40 39 43 -face 43 42 108 -face 109 110 44 -face 44 111 112 -face 113 114 115 -face 116 44 40 -face 117 118 42 -face 42 119 120 -face 121 122 123 -face 124 42 26 -face 45 46 47 -face 47 48 45 -face 49 45 48 -face 48 47 50 -face 45 49 51 -face 51 52 45 -face 46 45 52 -face 52 51 53 -face 54 30 55 -face 55 52 54 -face 53 54 52 -face 52 55 46 -face 56 53 51 -face 51 57 56 -face 58 56 57 -face 57 51 49 -face 59 53 56 -face 56 60 59 -face 61 59 60 -face 60 56 58 -face 59 61 62 -face 62 63 59 -face 53 59 63 -face 63 62 125 -face 126 30 54 -face 54 63 127 -face 128 129 63 -face 63 54 53 -face 130 131 132 -face 133 64 134 -face 38 135 64 -face 64 136 61 -face 65 66 67 -face 67 137 65 -face 138 65 139 -face 67 140 141 -face 142 143 68 -face 68 69 144 -face 66 145 69 -face 69 68 70 -face 71 50 72 -face 72 69 71 -face 70 71 69 -face 69 72 66 -face 73 70 68 -face 68 146 73 -face 147 73 148 -face 149 68 150 -face 74 70 73 -face 73 75 74 -face 76 74 75 -face 75 73 151 -face 74 76 77 -face 77 78 74 -face 70 74 78 -face 78 77 152 -face 153 50 71 -face 71 78 154 -face 155 156 78 -face 78 71 70 -face 157 158 77 -face 77 79 159 -face 58 160 79 -face 79 77 76 -face 80 161 162 -face 163 164 80 -face 16 80 165 -face 166 167 5 -face 168 16 81 -face 81 82 169 -face 170 171 82 -face 82 81 83 -face 84 58 172 -face 173 82 84 -face 83 84 82 -face 82 174 175 -face 85 83 81 -face 81 176 85 -face 22 85 177 -face 178 81 16 -face 86 83 85 -face 85 179 86 -face 180 86 181 -face 182 85 22 -face 86 183 87 -face 87 88 86 -face 83 86 88 -face 88 87 61 -face 184 58 84 -face 84 185 186 -face 61 187 188 -face 189 84 83 -face 64 61 87 -face 87 190 64 -face 38 64 191 -face 192 87 193 -face 89 90 91 -face 91 194 89 -face 195 89 196 -face 91 14 197 -face 89 198 92 -face 92 93 89 -face 90 89 93 -face 93 92 199 -face 200 201 94 -face 94 93 202 -face 203 204 93 -face 93 94 90 -face 205 206 207 -face 208 209 210 -face 211 212 213 -face 214 215 216 -face 95 8 217 -face 218 91 95 -face 90 95 91 -face 219 14 91 -face 95 90 96 -face 96 97 95 -face 8 95 97 -face 97 96 220 -face 221 10 9 -face 9 222 223 -face 224 225 226 -face 227 9 8 -face 228 229 96 -face 96 230 231 -face 232 233 234 -face 235 96 90 -end -end diff --git a/pwd.txt b/pwd.txt index c50eb7d..f69feab 100644 --- a/pwd.txt +++ b/pwd.txt @@ -1 +1 @@ -/cygdrive/e/Programs/VS2005/MyProjects/OpenGL/3dEngine +/cygdrive/e/Programs/VS2005/MyProjects/OpenGL/3dEngine diff --git a/src/3D/SEIncludeOpenGL.h b/src/3D/SEIncludeOpenGL.h index 62ec522..6f0b2a6 100644 --- a/src/3D/SEIncludeOpenGL.h +++ b/src/3D/SEIncludeOpenGL.h @@ -1,14 +1,14 @@ - - -#if (TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE) - -#import -#import - -#else - -#include -#include -#include - + + +#if (TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE) + +#import +#import + +#else + +#include +#include +#include + #endif \ No newline at end of file diff --git a/src/3D/SEMaterial.cpp b/src/3D/SEMaterial.cpp index 0832747..6c79064 100644 --- a/src/3D/SEMaterial.cpp +++ b/src/3D/SEMaterial.cpp @@ -1,65 +1,65 @@ -#include "SEMaterial.h" -#include "SESceneLoader.h" -#include "SETools.h" - -SEMaterial::SEMaterial( ) -{ - -} - -SEMaterial::~SEMaterial(void) -{ -} - -void SEMaterial::SetTexture( SETexturePtr texture ) -{ - SEAssert( mTexture.get() == 0, "Texture already inited" ); - mTexture = texture; -} - -void SEMaterial::ParseData( SESceneLoader* loader ) -{ - switch( loader->validValueCount() ) - { - case 1: - if( streq( loader->dataType(), "end") ) - { - loader->PopDelegate(); - - }else if( streq( loader->dataType(), "texture") ) - { - SETexturePtr texture = SETexturePtr( SENewObject() ); - SetTexture( texture ); - - loader->AddDelegate( texture ); - } - break; - - case 2: - if( streq( loader->dataType(), "name") ) - { - SetName( loader->value1() ); - } - break; - - default: - SEAssert(false, "Unknow material value"); - break; - } -} - -void SEMaterial::Use() -{ - if( mTexture.get() ) - mTexture->Use(); -} - -void SEMaterial::SetName( const char* name ) -{ - mName = name; -} - -const SEString& SEMaterial::name() -{ - return mName; +#include "SEMaterial.h" +#include "SESceneLoader.h" +#include "SETools.h" + +SEMaterial::SEMaterial( ) +{ + +} + +SEMaterial::~SEMaterial(void) +{ +} + +void SEMaterial::SetTexture( SETexturePtr texture ) +{ + SEAssert( mTexture.get() == 0, "Texture already inited" ); + mTexture = texture; +} + +void SEMaterial::ParseData( SESceneLoader* loader ) +{ + switch( loader->validValueCount() ) + { + case 1: + if( streq( loader->dataType(), "end") ) + { + loader->PopDelegate(); + + }else if( streq( loader->dataType(), "texture") ) + { + SETexturePtr texture = SETexturePtr( SENewObject() ); + SetTexture( texture ); + + loader->AddDelegate( texture ); + } + break; + + case 2: + if( streq( loader->dataType(), "name") ) + { + SetName( loader->value1() ); + } + break; + + default: + SEAssert(false, "Unknow material value"); + break; + } +} + +void SEMaterial::Use() +{ + if( mTexture.get() ) + mTexture->Use(); +} + +void SEMaterial::SetName( const char* name ) +{ + mName = name; +} + +const SEString& SEMaterial::name() +{ + return mName; } \ No newline at end of file diff --git a/src/3D/SEMaterial.h b/src/3D/SEMaterial.h index 37aa2a8..f163452 100644 --- a/src/3D/SEMaterial.h +++ b/src/3D/SEMaterial.h @@ -1,32 +1,32 @@ - -#ifndef SEMaterial_H -#define SEMaterial_H - -#include "SEIncludeLibrary.h" -#include "SESceneLoaderDelegate.h" -#include "SETexture.h" - - -class SEMaterial: public SESceneLoaderDelegate -{ - SEString mName; - SETexturePtr mTexture; - -public: - SEMaterial( ); - ~SEMaterial(void); - - void SetName( const char* name ); - const SEString& name(); - - void ParseData( SESceneLoader* loader ); - void SetTexture( SETexturePtr texture ); - - void Use(); -}; - -typedef shared_ptr SEMaterialPtr; -typedef vector< SEMaterialPtr, SEAllocator > SEMaterialArray; - - + +#ifndef SEMaterial_H +#define SEMaterial_H + +#include "SEIncludeLibrary.h" +#include "SESceneLoaderDelegate.h" +#include "SETexture.h" + + +class SEMaterial: public SESceneLoaderDelegate +{ + SEString mName; + SETexturePtr mTexture; + +public: + SEMaterial( ); + ~SEMaterial(void); + + void SetName( const char* name ); + const SEString& name(); + + void ParseData( SESceneLoader* loader ); + void SetTexture( SETexturePtr texture ); + + void Use(); +}; + +typedef shared_ptr SEMaterialPtr; +typedef vector< SEMaterialPtr, SEAllocator > SEMaterialArray; + + #endif SEMaterial_H \ No newline at end of file diff --git a/src/3D/SEMesh.cpp b/src/3D/SEMesh.cpp index 59b5a65..ca03663 100644 --- a/src/3D/SEMesh.cpp +++ b/src/3D/SEMesh.cpp @@ -1,168 +1,168 @@ -#include "SEMesh.h" -#include "SETools.h" -#include "SESceneLoader.h" -#include "SEIncludeOpenGL.h" - -#define MESHLOADER_BUFFER_SIZE 128 - - -SEMesh::SEMesh(void) -{ - mVertexArraySize = -1; -} - -SEMesh::~SEMesh(void) -{ - BREAKPOINTPLACE; -} - -SEVertexNativeArrayPtr SEMesh::vertexArray() -{ - return mVertexArray; -} - -void SEMesh::SetName( const char* name ) -{ - mName = SEString(name); -} - -const SEString& SEMesh::name() -{ - return mName; -} - -void SEMesh::SetVertexArrayCount( int count ) -{ - SEAssert( mVertexArray.get() == 0, "not allocated check" ); - mVertexArraySize = count*3; - mVertexArray = SEVertexNativeArrayPtr( SENewArray(count*3) ); - mNormalArray = SENormalNativeArrayPtr( SENewArray(count*3) ); - mUVArray = SEUVNativeArrayPtr( SENewArray(count*3) ); -} - -void SEMesh::SetVertex( int index, float x, float y, float z) -{ - SEAssert( index*3 < mVertexArraySize, "vertex bound check" ); - - mVertexArray[index*3] = x; - mVertexArray[index*3+1] = y; - mVertexArray[index*3+2] = z; -} - -void SEMesh::SetNormal( int index, float x, float y, float z) -{ - SEAssert( index*3 < mVertexArraySize, "normal bound check" ); - - mNormalArray[index*3] = x; - mNormalArray[index*3+1] = y; - mNormalArray[index*3+2] = z; -} - -void SEMesh::SetUV( int index, float u, float v ) -{ - SEAssert( index*2 < mVertexArraySize, "uv bound check" ); - - mUVArray[index*2] = u; - mUVArray[index*2+1] = v; -} - -void SEMesh::AddVertexGroup( SEVertexGroupPtr group ) -{ - mVertexGroupArray.push_back( group ); -} - -void SEMesh::ParseData( SESceneLoader* loader ) -{ - if( loader->currentIndex() == 97 ) - BREAKPOINTPLACE; - - switch( loader->validValueCount() ) - { - case 1: - if( streq( loader->dataType(), "end") ) - { - loader->PopDelegate(); - } - break; - - case 2: - if( streq( loader->dataType(), "vertexCount" ) ) - { - int size = atoi( loader->value1() ); - SEAssert( size > 0, "vertextCount check" ); - - SetVertexArrayCount( size ); - - }else if( streq( loader->dataType(), "name" ) ) - { - SetName( loader->value1() ); - - }else if( streq( loader->dataType(), "vertexGroup" ) ) - { - SEVertexGroupPtr vertexGroup( SENewObject( loader->value1() ) ); - AddVertexGroup( vertexGroup ); - - loader->AddDelegate( vertexGroup ); - } - break; - - case 3: - if( streq( loader->dataType(), "uv" ) ) - { - SetUV( loader->currentIndex(), atof(loader->value1()), atof(loader->value2()) ); - loader->SetCurrentIndex( loader->currentIndex() + 1 ); - } - break; - - case 4: - if( streq( loader->dataType(), "vert" ) ) - { - SetVertex( loader->currentIndex(), atof(loader->value1()), atof(loader->value2()), atof(loader->value3()) ); - loader->SetCurrentIndex( loader->currentIndex() + 1 ); - - }else if( streq( loader->dataType(), "norm" ) ) - { - SetNormal( loader->currentIndex(), atof(loader->value1()), atof(loader->value2()), atof(loader->value3()) ); - loader->SetCurrentIndex( loader->currentIndex() + 1 ); - - } - break; - } - - if( !streq( loader->dataType(), "vert" ) && - !streq( loader->dataType(), "norm" ) && - !streq( loader->dataType(), "uv" ) ) - loader->SetCurrentIndex( 0 ); -} - -void SEMesh::Draw() -{ - SEVertexGroupArray::iterator start = mVertexGroupArray.begin(); - SEVertexGroupArray::iterator end = mVertexGroupArray.end(); - - SEIndexNativeArrayPtr indexArrayPtr; - - /*for( int i=0; iDraw(); - ++start; - } - - if( !mUVArray.get() ) - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - - SEGLAssert; +#include "SEMesh.h" +#include "SETools.h" +#include "SESceneLoader.h" +#include "SEIncludeOpenGL.h" + +#define MESHLOADER_BUFFER_SIZE 128 + + +SEMesh::SEMesh(void) +{ + mVertexArraySize = -1; +} + +SEMesh::~SEMesh(void) +{ + BREAKPOINTPLACE; +} + +SEVertexNativeArrayPtr SEMesh::vertexArray() +{ + return mVertexArray; +} + +void SEMesh::SetName( const char* name ) +{ + mName = SEString(name); +} + +const SEString& SEMesh::name() +{ + return mName; +} + +void SEMesh::SetVertexArrayCount( int count ) +{ + SEAssert( mVertexArray.get() == 0, "not allocated check" ); + mVertexArraySize = count*3; + mVertexArray = SEVertexNativeArrayPtr( SENewArray(count*3) ); + mNormalArray = SENormalNativeArrayPtr( SENewArray(count*3) ); + mUVArray = SEUVNativeArrayPtr( SENewArray(count*3) ); +} + +void SEMesh::SetVertex( int index, float x, float y, float z) +{ + SEAssert( index*3 < mVertexArraySize, "vertex bound check" ); + + mVertexArray[index*3] = x; + mVertexArray[index*3+1] = y; + mVertexArray[index*3+2] = z; +} + +void SEMesh::SetNormal( int index, float x, float y, float z) +{ + SEAssert( index*3 < mVertexArraySize, "normal bound check" ); + + mNormalArray[index*3] = x; + mNormalArray[index*3+1] = y; + mNormalArray[index*3+2] = z; +} + +void SEMesh::SetUV( int index, float u, float v ) +{ + SEAssert( index*2 < mVertexArraySize, "uv bound check" ); + + mUVArray[index*2] = u; + mUVArray[index*2+1] = v; +} + +void SEMesh::AddVertexGroup( SEVertexGroupPtr group ) +{ + mVertexGroupArray.push_back( group ); +} + +void SEMesh::ParseData( SESceneLoader* loader ) +{ + if( loader->currentIndex() == 97 ) + BREAKPOINTPLACE; + + switch( loader->validValueCount() ) + { + case 1: + if( streq( loader->dataType(), "end") ) + { + loader->PopDelegate(); + } + break; + + case 2: + if( streq( loader->dataType(), "vertexCount" ) ) + { + int size = atoi( loader->value1() ); + SEAssert( size > 0, "vertextCount check" ); + + SetVertexArrayCount( size ); + + }else if( streq( loader->dataType(), "name" ) ) + { + SetName( loader->value1() ); + + }else if( streq( loader->dataType(), "vertexGroup" ) ) + { + SEVertexGroupPtr vertexGroup( SENewObject( loader->value1() ) ); + AddVertexGroup( vertexGroup ); + + loader->AddDelegate( vertexGroup ); + } + break; + + case 3: + if( streq( loader->dataType(), "uv" ) ) + { + SetUV( loader->currentIndex(), atof(loader->value1()), atof(loader->value2()) ); + loader->SetCurrentIndex( loader->currentIndex() + 1 ); + } + break; + + case 4: + if( streq( loader->dataType(), "vert" ) ) + { + SetVertex( loader->currentIndex(), atof(loader->value1()), atof(loader->value2()), atof(loader->value3()) ); + loader->SetCurrentIndex( loader->currentIndex() + 1 ); + + }else if( streq( loader->dataType(), "norm" ) ) + { + SetNormal( loader->currentIndex(), atof(loader->value1()), atof(loader->value2()), atof(loader->value3()) ); + loader->SetCurrentIndex( loader->currentIndex() + 1 ); + + } + break; + } + + if( !streq( loader->dataType(), "vert" ) && + !streq( loader->dataType(), "norm" ) && + !streq( loader->dataType(), "uv" ) ) + loader->SetCurrentIndex( 0 ); +} + +void SEMesh::Draw() +{ + SEVertexGroupArray::iterator start = mVertexGroupArray.begin(); + SEVertexGroupArray::iterator end = mVertexGroupArray.end(); + + SEIndexNativeArrayPtr indexArrayPtr; + + /*for( int i=0; iDraw(); + ++start; + } + + if( !mUVArray.get() ) + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + + SEGLAssert; } \ No newline at end of file diff --git a/src/3D/SEMesh.h b/src/3D/SEMesh.h index 38d75cf..2bc2f27 100644 --- a/src/3D/SEMesh.h +++ b/src/3D/SEMesh.h @@ -1,54 +1,54 @@ - -#ifndef SEMesh_H -#define SEMesh_H - - -#include "SEIncludeLibrary.h" - -#include "SEAllocator.h" -#include "SEVertexGroup.h" -#include "SEFileReaderBase.h" -#include "SESceneLoaderDelegate.h" - -class SEMesh; -class SESceneLoader; - -typedef shared_ptr SEMeshPtr; -typedef vector< SEMeshPtr, SEAllocator > SEMeshArray; -typedef shared_array SEVertexNativeArrayPtr; -typedef shared_array SENormalNativeArrayPtr; -typedef shared_array SEUVNativeArrayPtr; - -class SEMesh: public SESceneLoaderDelegate -{ - SEString mName; - - int mVertexArraySize; - SEVertexNativeArrayPtr mVertexArray; - SENormalNativeArrayPtr mNormalArray; - SEUVNativeArrayPtr mUVArray; - - SEVertexGroupArray mVertexGroupArray; - -public: - SEMesh(void); - ~SEMesh(void); - - SEVertexNativeArrayPtr vertexArray(); - - void SetName( const char* name ); - const SEString& name(); - - void SetVertexArrayCount( int count ); - void SetVertex( int index, float x, float y, float z); - void SetNormal( int index, float x, float y, float z); - void SetUV( int index, float u, float v ); - - void AddVertexGroup( SEVertexGroupPtr group ); - - virtual void ParseData( SESceneLoader* loader ); - - void Draw(); -}; - -#endif SEMesh_H + +#ifndef SEMesh_H +#define SEMesh_H + + +#include "SEIncludeLibrary.h" + +#include "SEAllocator.h" +#include "SEVertexGroup.h" +#include "SEFileReaderBase.h" +#include "SESceneLoaderDelegate.h" + +class SEMesh; +class SESceneLoader; + +typedef shared_ptr SEMeshPtr; +typedef vector< SEMeshPtr, SEAllocator > SEMeshArray; +typedef shared_array SEVertexNativeArrayPtr; +typedef shared_array SENormalNativeArrayPtr; +typedef shared_array SEUVNativeArrayPtr; + +class SEMesh: public SESceneLoaderDelegate +{ + SEString mName; + + int mVertexArraySize; + SEVertexNativeArrayPtr mVertexArray; + SENormalNativeArrayPtr mNormalArray; + SEUVNativeArrayPtr mUVArray; + + SEVertexGroupArray mVertexGroupArray; + +public: + SEMesh(void); + ~SEMesh(void); + + SEVertexNativeArrayPtr vertexArray(); + + void SetName( const char* name ); + const SEString& name(); + + void SetVertexArrayCount( int count ); + void SetVertex( int index, float x, float y, float z); + void SetNormal( int index, float x, float y, float z); + void SetUV( int index, float u, float v ); + + void AddVertexGroup( SEVertexGroupPtr group ); + + virtual void ParseData( SESceneLoader* loader ); + + void Draw(); +}; + +#endif SEMesh_H diff --git a/src/3D/SETexture.cpp b/src/3D/SETexture.cpp index cb9650c..c1b2ae6 100644 --- a/src/3D/SETexture.cpp +++ b/src/3D/SETexture.cpp @@ -1,71 +1,71 @@ -#include "SETexture.h" -#include "SESceneLoader.h" -#include "SETools.h" -#include "SEImageLoader.h" - -SETexture::SETexture(void) -{ - id = -1; -} - -SETexture::~SETexture(void) -{ - if( id != -1 ) - glDeleteTextures(1, &id); -} - -void SETexture::Init( const SEImagePtr image ) -{ - SEAssert( id == -1, "recreate now not support"); - - mImage = image; - - glGenTextures( 1, &id ); - glBindTexture(GL_TEXTURE_2D, id ); - //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - - glTexImage2D( GL_TEXTURE_2D, - 0, - image->pixelFormat(), - image->width(), - image->height(), - 0, - image->pixelFormat(), - image->pixelDataType(), - image->data().get() ); -} - -void SETexture::Use() -{ - glBindTexture(GL_TEXTURE_2D, id ); -} - -void SETexture::ParseData( SESceneLoader* loader ) -{ - switch( loader->validValueCount() ) - { - case 1: - if( streq( loader->dataType(), "end") ) - { - loader->PopDelegate(); - } - break; - - case 2: - if( streq( loader->dataType(), "path") ) - { - SEImageLoader imageLoader; - - SEPath path = loader->currentPath()->ParentPath(); - path.AppendName( loader->value1() ); - - SEImagePtr image = imageLoader.Load( path.cString() ); - Init( image ); - } - break; - } +#include "SETexture.h" +#include "SESceneLoader.h" +#include "SETools.h" +#include "SEImageLoader.h" + +SETexture::SETexture(void) +{ + id = -1; +} + +SETexture::~SETexture(void) +{ + if( id != -1 ) + glDeleteTextures(1, &id); +} + +void SETexture::Init( const SEImagePtr image ) +{ + SEAssert( id == -1, "recreate now not support"); + + mImage = image; + + glGenTextures( 1, &id ); + glBindTexture(GL_TEXTURE_2D, id ); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + + glTexImage2D( GL_TEXTURE_2D, + 0, + image->pixelFormat(), + image->width(), + image->height(), + 0, + image->pixelFormat(), + image->pixelDataType(), + image->data().get() ); +} + +void SETexture::Use() +{ + glBindTexture(GL_TEXTURE_2D, id ); +} + +void SETexture::ParseData( SESceneLoader* loader ) +{ + switch( loader->validValueCount() ) + { + case 1: + if( streq( loader->dataType(), "end") ) + { + loader->PopDelegate(); + } + break; + + case 2: + if( streq( loader->dataType(), "path") ) + { + SEImageLoader imageLoader; + + SEPath path = loader->currentPath()->ParentPath(); + path.AppendName( loader->value1() ); + + SEImagePtr image = imageLoader.Load( path.cString() ); + Init( image ); + } + break; + } } \ No newline at end of file diff --git a/src/3D/SETexture.h b/src/3D/SETexture.h index 3dba012..fc12e13 100644 --- a/src/3D/SETexture.h +++ b/src/3D/SETexture.h @@ -1,27 +1,27 @@ - -#ifndef SETexture_H -#define SETexture_H - -#include "SEIncludeOpenGL.h" -#include "SEIncludeLibrary.h" -#include "SEImage.h" -#include "SESceneLoaderDelegate.h" - -class SETexture: public SESceneLoaderDelegate -{ - GLuint id; - SEImagePtr mImage; - -public: - SETexture(void); - ~SETexture(void); - - void Init( const SEImagePtr image ); - void Use(); - void ParseData( SESceneLoader* loader ); -}; - -typedef shared_ptr SETexturePtr; - - + +#ifndef SETexture_H +#define SETexture_H + +#include "SEIncludeOpenGL.h" +#include "SEIncludeLibrary.h" +#include "SEImage.h" +#include "SESceneLoaderDelegate.h" + +class SETexture: public SESceneLoaderDelegate +{ + GLuint id; + SEImagePtr mImage; + +public: + SETexture(void); + ~SETexture(void); + + void Init( const SEImagePtr image ); + void Use(); + void ParseData( SESceneLoader* loader ); +}; + +typedef shared_ptr SETexturePtr; + + #endif SETexture_H \ No newline at end of file diff --git a/src/3D/SEVertexGroup.cpp b/src/3D/SEVertexGroup.cpp index 0f963c8..ab8b390 100644 --- a/src/3D/SEVertexGroup.cpp +++ b/src/3D/SEVertexGroup.cpp @@ -1,115 +1,115 @@ -#include "SEVertexGroup.h" -#include "SESceneLoader.h" -#include "SETools.h" -#include "SEObjectStore.h" - -SEVertexGroup::SEVertexGroup(const char* name) -{ - mName = name; - mIndexArraySize = -1; -} - -SEVertexGroup::~SEVertexGroup(void) -{ - BREAKPOINTPLACE; -} - -void SEVertexGroup::Init( SEIndexNativeArrayPtr indexArray, int size ) -{ - SEAssert( mIndexArraySize == -1, "Object already inited" ); - - mIndexArray = indexArray; - mIndexArraySize = size; -} - -SEIndexNativeArrayPtr SEVertexGroup::indexArray() -{ - return mIndexArray; -} - -int SEVertexGroup::indexArraySize() -{ - return mIndexArraySize; -} - -void SEVertexGroup::SetFace( int index, SEIndexType v1, SEIndexType v2, SEIndexType v3) -{ - SEAssert( index*3 < mIndexArraySize, "Vertex index bound check" ); - - mIndexArray[index*3 ] = v1; - mIndexArray[index*3 + 1] = v2; - mIndexArray[index*3 + 2] = v3; -} - -void SEVertexGroup::SetMaterial( SEMaterialPtr material ) -{ - SEAssert( mMaterial.get() == NULL, "Material already inited" ) - - mMaterial = material; -} - -void SEVertexGroup::ParseData( SESceneLoader* loader ) -{ - switch( loader->validValueCount() ) - { - case 1: - if( streq( loader->dataType(), "end") ) - { - loader->PopDelegate(); - } - break; - - case 2: - if( streq( loader->dataType(), "vertexIndexCount" ) ) - { - int size = atoi( loader->value1() ); - SEAssert( size > 0, "vertexIndexCount value check" ); - - SEIndexNativeArrayPtr arrayPtr( SENewArray( size*3 ) ); - Init( arrayPtr, size*3 ); - - }else if( streq( loader->dataType(), "material" ) ) - { - SetMaterial( SEObjectStore::sharedInstance()->GetMaterial( loader->value1() ) ); - } - break; - - case 4: - if( streq( loader->dataType(), "face" ) ) - { - /*printf("%d %d %d\n", atoi( loader->value1() ), atoi( loader->value2() ), atoi( loader->value3()) ); - - if( atoi( loader->value1()) == 25 && - atoi( loader->value2()) == 96 && - atoi( loader->value3()) == 73 ) - { - BREAKPOINTPLACE; - }*/ - - SetFace( loader->currentIndex(), atoi( loader->value1() ), atoi( loader->value2() ), atoi( loader->value3() ) ); - loader->SetCurrentIndex( loader->currentIndex() + 1 ); - } - break; - } - - if( !streq( loader->dataType(), "face" ) ) - loader->SetCurrentIndex( 0 ); -} - -const SEString& SEVertexGroup::name() -{ - return mName; -} - -SEMaterialPtr SEVertexGroup::material() -{ - return mMaterial; -} - -void SEVertexGroup::Draw() -{ - if( mMaterial.get() ) - mMaterial->Use(); - - glDrawElements( GL_TRIANGLES, mIndexArraySize ,GL_UNSIGNED_SHORT, mIndexArray.get() ); +#include "SEVertexGroup.h" +#include "SESceneLoader.h" +#include "SETools.h" +#include "SEObjectStore.h" + +SEVertexGroup::SEVertexGroup(const char* name) +{ + mName = name; + mIndexArraySize = -1; +} + +SEVertexGroup::~SEVertexGroup(void) +{ + BREAKPOINTPLACE; +} + +void SEVertexGroup::Init( SEIndexNativeArrayPtr indexArray, int size ) +{ + SEAssert( mIndexArraySize == -1, "Object already inited" ); + + mIndexArray = indexArray; + mIndexArraySize = size; +} + +SEIndexNativeArrayPtr SEVertexGroup::indexArray() +{ + return mIndexArray; +} + +int SEVertexGroup::indexArraySize() +{ + return mIndexArraySize; +} + +void SEVertexGroup::SetFace( int index, SEIndexType v1, SEIndexType v2, SEIndexType v3) +{ + SEAssert( index*3 < mIndexArraySize, "Vertex index bound check" ); + + mIndexArray[index*3 ] = v1; + mIndexArray[index*3 + 1] = v2; + mIndexArray[index*3 + 2] = v3; +} + +void SEVertexGroup::SetMaterial( SEMaterialPtr material ) +{ + SEAssert( mMaterial.get() == NULL, "Material already inited" ) + + mMaterial = material; +} + +void SEVertexGroup::ParseData( SESceneLoader* loader ) +{ + switch( loader->validValueCount() ) + { + case 1: + if( streq( loader->dataType(), "end") ) + { + loader->PopDelegate(); + } + break; + + case 2: + if( streq( loader->dataType(), "vertexIndexCount" ) ) + { + int size = atoi( loader->value1() ); + SEAssert( size > 0, "vertexIndexCount value check" ); + + SEIndexNativeArrayPtr arrayPtr( SENewArray( size*3 ) ); + Init( arrayPtr, size*3 ); + + }else if( streq( loader->dataType(), "material" ) ) + { + SetMaterial( SEObjectStore::sharedInstance()->GetMaterial( loader->value1() ) ); + } + break; + + case 4: + if( streq( loader->dataType(), "face" ) ) + { + /*printf("%d %d %d\n", atoi( loader->value1() ), atoi( loader->value2() ), atoi( loader->value3()) ); + + if( atoi( loader->value1()) == 25 && + atoi( loader->value2()) == 96 && + atoi( loader->value3()) == 73 ) + { + BREAKPOINTPLACE; + }*/ + + SetFace( loader->currentIndex(), atoi( loader->value1() ), atoi( loader->value2() ), atoi( loader->value3() ) ); + loader->SetCurrentIndex( loader->currentIndex() + 1 ); + } + break; + } + + if( !streq( loader->dataType(), "face" ) ) + loader->SetCurrentIndex( 0 ); +} + +const SEString& SEVertexGroup::name() +{ + return mName; +} + +SEMaterialPtr SEVertexGroup::material() +{ + return mMaterial; +} + +void SEVertexGroup::Draw() +{ + if( mMaterial.get() ) + mMaterial->Use(); + + glDrawElements( GL_TRIANGLES, mIndexArraySize ,GL_UNSIGNED_SHORT, mIndexArray.get() ); } \ No newline at end of file diff --git a/src/3D/SEVertexGroup.h b/src/3D/SEVertexGroup.h index e3834ac..6c3b408 100644 --- a/src/3D/SEVertexGroup.h +++ b/src/3D/SEVertexGroup.h @@ -1,47 +1,47 @@ - -#ifndef SEVertexGroup_H -#define SEVertexGroup_H - - -#include "SEIncludeLibrary.h" -#include "SEDefinition.h" -#include "SEAllocator.h" -#include "SESceneLoaderDelegate.h" -#include "SEMaterial.h" - -class SEVertexGroup; - -typedef unsigned short SEIndexType; -typedef shared_array SEIndexNativeArrayPtr; -typedef shared_ptr SEVertexGroupPtr; -typedef vector< SEVertexGroupPtr, SEAllocator > SEVertexGroupArray; - -class SEVertexGroup: public SESceneLoaderDelegate -{ - SEString mName; - int mIndexArraySize; - SEIndexNativeArrayPtr mIndexArray; - SEMaterialPtr mMaterial; - -public: - SEVertexGroup(const char* name); - ~SEVertexGroup(void); - - void Init( SEIndexNativeArrayPtr indexArray, int size ); - SEIndexNativeArrayPtr indexArray(); - int indexArraySize(); - - void SetFace( int index, SEIndexType v1, SEIndexType v2, SEIndexType v3); - void SetMaterial( SEMaterialPtr material ); - SEMaterialPtr material(); - - - virtual void ParseData( SESceneLoader* loader ); - void Draw(); - - //void SetName( const char* name ); - const SEString& name(); -}; - - + +#ifndef SEVertexGroup_H +#define SEVertexGroup_H + + +#include "SEIncludeLibrary.h" +#include "SEDefinition.h" +#include "SEAllocator.h" +#include "SESceneLoaderDelegate.h" +#include "SEMaterial.h" + +class SEVertexGroup; + +typedef unsigned short SEIndexType; +typedef shared_array SEIndexNativeArrayPtr; +typedef shared_ptr SEVertexGroupPtr; +typedef vector< SEVertexGroupPtr, SEAllocator > SEVertexGroupArray; + +class SEVertexGroup: public SESceneLoaderDelegate +{ + SEString mName; + int mIndexArraySize; + SEIndexNativeArrayPtr mIndexArray; + SEMaterialPtr mMaterial; + +public: + SEVertexGroup(const char* name); + ~SEVertexGroup(void); + + void Init( SEIndexNativeArrayPtr indexArray, int size ); + SEIndexNativeArrayPtr indexArray(); + int indexArraySize(); + + void SetFace( int index, SEIndexType v1, SEIndexType v2, SEIndexType v3); + void SetMaterial( SEMaterialPtr material ); + SEMaterialPtr material(); + + + virtual void ParseData( SESceneLoader* loader ); + void Draw(); + + //void SetName( const char* name ); + const SEString& name(); +}; + + #endif SEVertexGroup_H \ No newline at end of file diff --git a/src/Images/SEJpegImage.cpp b/src/Images/SEJpegImage.cpp index 871e586..b92067b 100644 --- a/src/Images/SEJpegImage.cpp +++ b/src/Images/SEJpegImage.cpp @@ -1,71 +1,71 @@ -#include "SEJpegImage.h" -#include "jpeglib.h" - -SEJpegImage::SEJpegImage(void) -{ -} - -SEJpegImage::~SEJpegImage(void) -{ -} - -void SEJpegImage::Load( const sechar* filePath ) -{ - struct jpeg_decompress_struct cinfo; - struct jpeg_error_mgr jerr; - - memset( &cinfo, 0 , sizeof(jpeg_decompress_struct) ); - memset( &jerr, 0 , sizeof(jpeg_error_mgr) ); - - cinfo.err = jpeg_std_error( &jerr ); - jpeg_create_decompress( &cinfo ); - - FILE* imageFile = fopen( filePath, "rb"); - SEAssert( imageFile, "image not open" ); - jpeg_stdio_src( &cinfo, imageFile ); - - jpeg_read_header( &cinfo, 1 ); - jpeg_start_decompress( &cinfo ); - - - mWidth = cinfo.image_width; - mHeight = cinfo.image_height; - mPixelDataType = GL_UNSIGNED_BYTE; - - switch( cinfo.output_components ) - { - case 1: - mPixelFormat = GL_LUMINANCE; - break; - case 3: - mPixelFormat = GL_RGB; - break; - default: - SEAssert( false, "unsupported jpeg" ); - } - - int bits = cinfo.output_components; - - unsigned int size = mWidth * mHeight * bits; - unsigned char* buffer = ( unsigned char * ) malloc( size ); - unsigned char* row = buffer; - - while( cinfo.output_scanline < mHeight ) - { - row = buffer + - bits * - mWidth * - cinfo.output_scanline; - - jpeg_read_scanlines( &cinfo, &row, 1 ); - - //printf("%d %d %d %d", row[0], row[1], row[2], row[3] ); - } - - mData = SEImageDataPtr( buffer ); - - jpeg_finish_decompress ( &cinfo ); - jpeg_destroy_decompress( &cinfo ); - - fclose( imageFile ); +#include "SEJpegImage.h" +#include "jpeglib.h" + +SEJpegImage::SEJpegImage(void) +{ +} + +SEJpegImage::~SEJpegImage(void) +{ +} + +void SEJpegImage::Load( const sechar* filePath ) +{ + struct jpeg_decompress_struct cinfo; + struct jpeg_error_mgr jerr; + + memset( &cinfo, 0 , sizeof(jpeg_decompress_struct) ); + memset( &jerr, 0 , sizeof(jpeg_error_mgr) ); + + cinfo.err = jpeg_std_error( &jerr ); + jpeg_create_decompress( &cinfo ); + + FILE* imageFile = fopen( filePath, "rb"); + SEAssert( imageFile, "image not open" ); + jpeg_stdio_src( &cinfo, imageFile ); + + jpeg_read_header( &cinfo, 1 ); + jpeg_start_decompress( &cinfo ); + + + mWidth = cinfo.image_width; + mHeight = cinfo.image_height; + mPixelDataType = GL_UNSIGNED_BYTE; + + switch( cinfo.output_components ) + { + case 1: + mPixelFormat = GL_LUMINANCE; + break; + case 3: + mPixelFormat = GL_RGB; + break; + default: + SEAssert( false, "unsupported jpeg" ); + } + + int bits = cinfo.output_components; + + unsigned int size = mWidth * mHeight * bits; + unsigned char* buffer = ( unsigned char * ) malloc( size ); + unsigned char* row = buffer; + + while( cinfo.output_scanline < mHeight ) + { + row = buffer + + bits * + mWidth * + cinfo.output_scanline; + + jpeg_read_scanlines( &cinfo, &row, 1 ); + + //printf("%d %d %d %d", row[0], row[1], row[2], row[3] ); + } + + mData = SEImageDataPtr( buffer ); + + jpeg_finish_decompress ( &cinfo ); + jpeg_destroy_decompress( &cinfo ); + + fclose( imageFile ); } \ No newline at end of file diff --git a/src/Objects/SEObjectInterface.h b/src/Objects/SEObjectInterface.h index b8fad93..c9dea11 100644 --- a/src/Objects/SEObjectInterface.h +++ b/src/Objects/SEObjectInterface.h @@ -1,13 +1,13 @@ - -#ifndef SEObjectInterface_H -#define SEObjectInterface_H - - -class SEObjectInterface -{ -public: - virtual void Draw()=0; -}; - - + +#ifndef SEObjectInterface_H +#define SEObjectInterface_H + + +class SEObjectInterface +{ +public: + virtual void Draw()=0; +}; + + #endif SEObjectInterface_H \ No newline at end of file diff --git a/src/Objects/SEPhysicObject.cpp b/src/Objects/SEPhysicObject.cpp index 9d704c9..611bb00 100644 --- a/src/Objects/SEPhysicObject.cpp +++ b/src/Objects/SEPhysicObject.cpp @@ -1,41 +1,41 @@ -#include "SEPhysicObject.h" -#include "SEDefinition.h" -#include "SEPhysicWorld.h" - -SEPhysicObject::SEPhysicObject(void) -{ -} - -SEPhysicObject::~SEPhysicObject(void) -{ - //SEPhysicWorld::sharedInstance()->world()->removeRigidBody( mRigidBody.get() ); -} - -void SEPhysicObject::Init( SEMeshPtr mesh, const btRigidBody::btRigidBodyConstructionInfo& info ) -{ - mMesh = mesh; - mRigidBody = btRigidBodyPtr( SENewObject( info ) ); -} - -void SEPhysicObject::Draw() -{ - btTransform trans; - mRigidBody->getMotionState()->getWorldTransform(trans); - - glTranslatef( trans.getOrigin().getX(), trans.getOrigin().getY(), trans.getOrigin().getZ() ); - - //FIXME: replace rotation for increase perfomance - btQuaternion quatern = trans.getRotation(); - btVector3 vec = quatern.getAxis(); - - glRotatef( quatern.getAngle()*RAD_TO_DEG, vec.x(), vec.y(), vec.z() ); - mMesh->Draw(); - glRotatef( -quatern.getAngle()*RAD_TO_DEG, vec.x(), vec.y(), vec.z() ); - - glTranslatef(-trans.getOrigin().getX(),-trans.getOrigin().getY(),-trans.getOrigin().getZ() ); -} - -btRigidBodyPtr SEPhysicObject::rigidBody() -{ - return mRigidBody; +#include "SEPhysicObject.h" +#include "SEDefinition.h" +#include "SEPhysicWorld.h" + +SEPhysicObject::SEPhysicObject(void) +{ +} + +SEPhysicObject::~SEPhysicObject(void) +{ + //SEPhysicWorld::sharedInstance()->world()->removeRigidBody( mRigidBody.get() ); +} + +void SEPhysicObject::Init( SEMeshPtr mesh, const btRigidBody::btRigidBodyConstructionInfo& info ) +{ + mMesh = mesh; + mRigidBody = btRigidBodyPtr( SENewObject( info ) ); +} + +void SEPhysicObject::Draw() +{ + btTransform trans; + mRigidBody->getMotionState()->getWorldTransform(trans); + + glTranslatef( trans.getOrigin().getX(), trans.getOrigin().getY(), trans.getOrigin().getZ() ); + + //FIXME: replace rotation for increase perfomance + btQuaternion quatern = trans.getRotation(); + btVector3 vec = quatern.getAxis(); + + glRotatef( quatern.getAngle()*RAD_TO_DEG, vec.x(), vec.y(), vec.z() ); + mMesh->Draw(); + glRotatef( -quatern.getAngle()*RAD_TO_DEG, vec.x(), vec.y(), vec.z() ); + + glTranslatef(-trans.getOrigin().getX(),-trans.getOrigin().getY(),-trans.getOrigin().getZ() ); +} + +btRigidBodyPtr SEPhysicObject::rigidBody() +{ + return mRigidBody; } \ No newline at end of file diff --git a/src/Objects/SEPhysicObject.h b/src/Objects/SEPhysicObject.h index 51c8104..6aeb5b4 100644 --- a/src/Objects/SEPhysicObject.h +++ b/src/Objects/SEPhysicObject.h @@ -1,33 +1,33 @@ - -#ifndef SEPhysicObject_H -#define SEPhysicObject_H - -#include "SEIncludeLibrary.h" -#include "SEObjectInterface.h" -#include "SEMesh.h" - - -typedef shared_ptr btRigidBodyPtr; - -class SEPhysicObject; -typedef shared_ptr SEPhysicObjectPtr; - - -class SEPhysicObject: public SEObjectInterface -{ - btRigidBodyPtr mRigidBody; - SEMeshPtr mMesh; - -public: - SEPhysicObject(); - virtual ~SEPhysicObject(void); - - void Init( SEMeshPtr mesh, const btRigidBody::btRigidBodyConstructionInfo& info ); - - virtual void Draw(); - btRigidBodyPtr rigidBody(); - SEMeshPtr mesh(); -}; - - + +#ifndef SEPhysicObject_H +#define SEPhysicObject_H + +#include "SEIncludeLibrary.h" +#include "SEObjectInterface.h" +#include "SEMesh.h" + + +typedef shared_ptr btRigidBodyPtr; + +class SEPhysicObject; +typedef shared_ptr SEPhysicObjectPtr; + + +class SEPhysicObject: public SEObjectInterface +{ + btRigidBodyPtr mRigidBody; + SEMeshPtr mMesh; + +public: + SEPhysicObject(); + virtual ~SEPhysicObject(void); + + void Init( SEMeshPtr mesh, const btRigidBody::btRigidBodyConstructionInfo& info ); + + virtual void Draw(); + btRigidBodyPtr rigidBody(); + SEMeshPtr mesh(); +}; + + #endif SEPhysicObject_H \ No newline at end of file diff --git a/src/Objects/SEPhysicWorld.cpp b/src/Objects/SEPhysicWorld.cpp index 34e4d0d..d03797f 100644 --- a/src/Objects/SEPhysicWorld.cpp +++ b/src/Objects/SEPhysicWorld.cpp @@ -37,4 +37,4 @@ void SEPhysicWorld::InitDiscreteDynamicsWorld( btDispatcherPtr dispatcher, btBro btDynamicsWorldPtr SEPhysicWorld::world() { return mWorld; -} \ No newline at end of file +} diff --git a/src/Objects/SEPhysicWorld.h b/src/Objects/SEPhysicWorld.h index 650182a..9f5ddb7 100644 --- a/src/Objects/SEPhysicWorld.h +++ b/src/Objects/SEPhysicWorld.h @@ -1,42 +1,42 @@ - -#ifndef SEPhysicWorld_H -#define SEPhysicWorld_H - - -#include "SEIncludeLibrary.h" - - -class SEPhysicWorld; -typedef shared_ptr SEPhysicWorldPtr; - -typedef shared_ptr btDynamicsWorldPtr; -typedef shared_ptr btCollisionConfigurationPtr; -typedef shared_ptr btBroadphaseInterfacePtr; -typedef shared_ptr btDispatcherPtr; -typedef shared_ptr btConstraintSolverPtr; - - -class SEPhysicWorld -{ - static SEPhysicWorldPtr mInstance; - - btDynamicsWorldPtr mWorld; - - btCollisionConfigurationPtr mCollisionConfiguration; - btBroadphaseInterfacePtr mBroadphaseInterface; - btDispatcherPtr mDispatcher; - btConstraintSolverPtr mConstraintSolver; - -public: - SEPhysicWorld(void); - virtual ~SEPhysicWorld(void); - - static SEPhysicWorldPtr sharedInstance(); - void InitDiscreteDynamicsWorld( btDispatcherPtr dispatcher, btBroadphaseInterfacePtr broadphaseInterface, btConstraintSolverPtr constraintSolver, btCollisionConfigurationPtr collisionConfiguration ); - - btDynamicsWorldPtr world(); -}; - - - + +#ifndef SEPhysicWorld_H +#define SEPhysicWorld_H + + +#include "SEIncludeLibrary.h" + + +class SEPhysicWorld; +typedef shared_ptr SEPhysicWorldPtr; + +typedef shared_ptr btDynamicsWorldPtr; +typedef shared_ptr btCollisionConfigurationPtr; +typedef shared_ptr btBroadphaseInterfacePtr; +typedef shared_ptr btDispatcherPtr; +typedef shared_ptr btConstraintSolverPtr; + + +class SEPhysicWorld +{ + static SEPhysicWorldPtr mInstance; + + btDynamicsWorldPtr mWorld; + + btCollisionConfigurationPtr mCollisionConfiguration; + btBroadphaseInterfacePtr mBroadphaseInterface; + btDispatcherPtr mDispatcher; + btConstraintSolverPtr mConstraintSolver; + +public: + SEPhysicWorld(void); + virtual ~SEPhysicWorld(void); + + static SEPhysicWorldPtr sharedInstance(); + void InitDiscreteDynamicsWorld( btDispatcherPtr dispatcher, btBroadphaseInterfacePtr broadphaseInterface, btConstraintSolverPtr constraintSolver, btCollisionConfigurationPtr collisionConfiguration ); + + btDynamicsWorldPtr world(); +}; + + + #endif SEPhysicWorld_H \ No newline at end of file diff --git a/src/Tools/SEAllocator.h b/src/Tools/SEAllocator.h index 5155345..0007755 100644 --- a/src/Tools/SEAllocator.h +++ b/src/Tools/SEAllocator.h @@ -1,79 +1,79 @@ - -#ifndef SEAllocator_H -#define SEAllocator_H - -#include - -template -class SEAllocator -{ -public: - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef T* pointer; - typedef const T* const_pointer; - typedef T& reference; - typedef const T& const_reference; - typedef T value_type; - - SEAllocator() {} - SEAllocator(const SEAllocator&) {} - - - - pointer allocate(size_type n, const void * = 0) { - T* t = (T*) malloc(n * sizeof(T)); - //std::cout - //<< " used SEAllocator to allocate at address " - //<< t << " (+)" << std::endl; - return t; - } - - void deallocate(void* p, size_type) { - if (p) { - free(p); - //std::cout - //<< " used SEAllocator to deallocate at address " - //<< p << " (-)" << - //std::endl; - } - } - - pointer address(reference x) const { return &x; } - const_pointer address(const_reference x) const { return &x; } - SEAllocator& operator=(const SEAllocator&) { return *this; } - - void construct(pointer p, const T& val) - { - new ((T*) p) T(val); - } - void destroy(pointer p) { p->~T(); } - - - size_type max_size() const { return size_t(-1); } - - template - struct rebind { typedef SEAllocator other; }; - - template - SEAllocator(const SEAllocator&) {} - - template - SEAllocator& operator=(const SEAllocator&) { return *this; } -}; - -//basic_string.h:213: error: no match for 'operator==' in '__alloc1 == __alloc2 - -//operators ( ==, != ) added to resolve iPhone compiler error: -template -inline bool -operator==(const SEAllocator<_T1>&, const SEAllocator<_T2>&) -{ return true; } - -template -inline bool -operator!=(const SEAllocator<_T1>&, const SEAllocator<_T2>&) -{ return false; } - - + +#ifndef SEAllocator_H +#define SEAllocator_H + +#include + +template +class SEAllocator +{ +public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef T* pointer; + typedef const T* const_pointer; + typedef T& reference; + typedef const T& const_reference; + typedef T value_type; + + SEAllocator() {} + SEAllocator(const SEAllocator&) {} + + + + pointer allocate(size_type n, const void * = 0) { + T* t = (T*) malloc(n * sizeof(T)); + //std::cout + //<< " used SEAllocator to allocate at address " + //<< t << " (+)" << std::endl; + return t; + } + + void deallocate(void* p, size_type) { + if (p) { + free(p); + //std::cout + //<< " used SEAllocator to deallocate at address " + //<< p << " (-)" << + //std::endl; + } + } + + pointer address(reference x) const { return &x; } + const_pointer address(const_reference x) const { return &x; } + SEAllocator& operator=(const SEAllocator&) { return *this; } + + void construct(pointer p, const T& val) + { + new ((T*) p) T(val); + } + void destroy(pointer p) { p->~T(); } + + + size_type max_size() const { return size_t(-1); } + + template + struct rebind { typedef SEAllocator other; }; + + template + SEAllocator(const SEAllocator&) {} + + template + SEAllocator& operator=(const SEAllocator&) { return *this; } +}; + +//basic_string.h:213: error: no match for 'operator==' in '__alloc1 == __alloc2 + +//operators ( ==, != ) added to resolve iPhone compiler error: +template +inline bool +operator==(const SEAllocator<_T1>&, const SEAllocator<_T2>&) +{ return true; } + +template +inline bool +operator!=(const SEAllocator<_T1>&, const SEAllocator<_T2>&) +{ return false; } + + #endif SEAllocator_H \ No newline at end of file diff --git a/src/Tools/SEDefinition.h b/src/Tools/SEDefinition.h index 758ca1a..7cd0639 100644 --- a/src/Tools/SEDefinition.h +++ b/src/Tools/SEDefinition.h @@ -6,6 +6,7 @@ #define SEAssert(a,str) if(!(a)){ printf(str);printf("\n");assert(false); } #define SEGLAssert if( glGetError() != 0 ) { printf("OpenGL error %d", glGetError()); assert(false); } #define TRACE( a ) { printf(a); printf("\n"); } +#define TRACE2( str, arg ) { printf(str,arg); printf("\n"); } // A macro to disallow the copy constructor and operator= functions // This should be used in the private: declarations for a class @@ -24,6 +25,6 @@ typedef char sechar; typedef unsigned int uint; typedef basic_string , SEAllocator > SEString; typedef shared_ptr SEStringPtr; -typedef vector> SEStringArray; +typedef vector > SEStringArray; typedef shared_array SEStringNativeArrayPtr; diff --git a/src/Tools/SEError.h b/src/Tools/SEError.h index 0aa4e23..b295c36 100644 --- a/src/Tools/SEError.h +++ b/src/Tools/SEError.h @@ -1,33 +1,33 @@ - -#ifndef SEError_H -#define SEError_H - -#include "SEIncludeLibrary.h" -#include "SEDefinition.h" - -class SEError; - -class SEErrorInterface -{ -public: - const SEError* error()const; -}; - -class SEError -{ - const char* mFileName; - int mLine; - - SEString mDescription; - -public: - SEError(void); - ~SEError(void); - - void Init( const char* fileName, int line, const char* description ); - void Init( const char* fileName, int line, const SEString& description ); -}; - -#define INIT_ERROR( s ) error.Init( __FILE__, __LINE__, s ) - + +#ifndef SEError_H +#define SEError_H + +#include "SEIncludeLibrary.h" +#include "SEDefinition.h" + +class SEError; + +class SEErrorInterface +{ +public: + const SEError* error()const; +}; + +class SEError +{ + const char* mFileName; + int mLine; + + SEString mDescription; + +public: + SEError(void); + ~SEError(void); + + void Init( const char* fileName, int line, const char* description ); + void Init( const char* fileName, int line, const SEString& description ); +}; + +#define INIT_ERROR( s ) error.Init( __FILE__, __LINE__, s ) + #endif SEError_H \ No newline at end of file diff --git a/src/Tools/SEFileLineReader.cpp b/src/Tools/SEFileLineReader.cpp index 1e64d99..4df933b 100644 --- a/src/Tools/SEFileLineReader.cpp +++ b/src/Tools/SEFileLineReader.cpp @@ -1,39 +1,39 @@ -#include "SEFileLineReader.h" - -SEFileLineReader::SEFileLineReader(void) -{ - lastEndOfLineIndex = 0; -} - -SEFileLineReader::~SEFileLineReader(void) -{ -} - -void SEFileLineReader::HandleString(const sechar* string, bool isEndOfFile) -{ - //split string - stringBuffer.append( string ); - - int currentEndOfLineIndex = lastEndOfLineIndex; - SEString substring; - - while( true ) - { - currentEndOfLineIndex = stringBuffer.find( "\n", currentEndOfLineIndex+1 ); - if( currentEndOfLineIndex == string::npos && !isEndOfFile ) - { - //substring = stringBuffer.substr( lastEndOfLineIndex, stringBuffer.length() - 1 - lastEndOfLineIndex ); - //mHandler->HandleString( substring.c_str(), isEndOfFile ); - break; - - }else if( currentEndOfLineIndex != string::npos ) - { - substring = stringBuffer.substr( lastEndOfLineIndex, currentEndOfLineIndex-lastEndOfLineIndex ); - - lastEndOfLineIndex = currentEndOfLineIndex; - mDelegate->HandleString( substring.c_str(), isEndOfFile ); - - }else - break; - } +#include "SEFileLineReader.h" + +SEFileLineReader::SEFileLineReader(void) +{ + lastEndOfLineIndex = 0; +} + +SEFileLineReader::~SEFileLineReader(void) +{ +} + +void SEFileLineReader::HandleString(const sechar* string, bool isEndOfFile) +{ + //split string + stringBuffer.append( string ); + + int currentEndOfLineIndex = lastEndOfLineIndex; + SEString substring; + + while( true ) + { + currentEndOfLineIndex = stringBuffer.find( "\n", currentEndOfLineIndex+1 ); + if( currentEndOfLineIndex == string::npos && !isEndOfFile ) + { + //substring = stringBuffer.substr( lastEndOfLineIndex, stringBuffer.length() - 1 - lastEndOfLineIndex ); + //mHandler->HandleString( substring.c_str(), isEndOfFile ); + break; + + }else if( currentEndOfLineIndex != string::npos ) + { + substring = stringBuffer.substr( lastEndOfLineIndex, currentEndOfLineIndex-lastEndOfLineIndex ); + + lastEndOfLineIndex = currentEndOfLineIndex; + mDelegate->HandleString( substring.c_str(), isEndOfFile ); + + }else + break; + } } \ No newline at end of file diff --git a/src/Tools/SEFileReaderBase.cpp b/src/Tools/SEFileReaderBase.cpp index f2710a8..c5072f5 100644 --- a/src/Tools/SEFileReaderBase.cpp +++ b/src/Tools/SEFileReaderBase.cpp @@ -1,61 +1,61 @@ -#include "SEFileReaderBase.h" -#include "SEPathBase.h" - -#define SEFILEREADER_BUFFER_LENGHT 1024 - -SEFileReaderBase::SEFileReaderBase(void) -{ -} - -SEFileReaderBase::~SEFileReaderBase(void) -{ - Close(); -} - -void SEFileReaderBase::Load(const SEPathBase* filePath) -{ - Close(); - mCurrentFile = filePath; - - sechar buffer[SEFILEREADER_BUFFER_LENGHT]; - TRACE( filePath->cString() ); - - FILE* file = fopen(filePath->cString(), "r"); - SEAssert(file!=0, "file not open"); - - int feofFlag = feof(file); - - while( feofFlag == 0 ) - { - memset(buffer,0,sizeof(buffer)); - - //fgets( buffer, SEWindowsFileReader_BUFFER_LENGHT-1, file ); - fread(buffer, SEFILEREADER_BUFFER_LENGHT-1, 1, file); - - feofFlag = feof(file); - HandleString( buffer, static_cast( feofFlag != 0 ) ); - } - - fclose(file); -} - -void SEFileReaderBase::Close() -{ - mCurrentFile = NULL; -} - -void SEFileReaderBase::HandleString(const sechar* string, bool isEndOfFile) -{ - if( mDelegate ) - mDelegate->HandleString(string, isEndOfFile); -} - -void SEFileReaderBase::SetDelegate( SEFileReaderDelegate* _delegate ) -{ - mDelegate = _delegate; -} - -SEFileReaderDelegate* SEFileReaderBase::delegate() -{ - return mDelegate; -} +#include "SEFileReaderBase.h" +#include "SEPathBase.h" + +#define SEFILEREADER_BUFFER_LENGHT 1024 + +SEFileReaderBase::SEFileReaderBase(void) +{ +} + +SEFileReaderBase::~SEFileReaderBase(void) +{ + Close(); +} + +void SEFileReaderBase::Load(const SEPathBase* filePath) +{ + Close(); + mCurrentFile = filePath; + + sechar buffer[SEFILEREADER_BUFFER_LENGHT]; + TRACE( filePath->cString() ); + + FILE* file = fopen(filePath->cString(), "r"); + SEAssert(file!=0, "file not open"); + + int feofFlag = feof(file); + + while( feofFlag == 0 ) + { + memset(buffer,0,sizeof(buffer)); + + //fgets( buffer, SEWindowsFileReader_BUFFER_LENGHT-1, file ); + fread(buffer, SEFILEREADER_BUFFER_LENGHT-1, 1, file); + + feofFlag = feof(file); + HandleString( buffer, static_cast( feofFlag != 0 ) ); + } + + fclose(file); +} + +void SEFileReaderBase::Close() +{ + mCurrentFile = NULL; +} + +void SEFileReaderBase::HandleString(const sechar* string, bool isEndOfFile) +{ + if( mDelegate ) + mDelegate->HandleString(string, isEndOfFile); +} + +void SEFileReaderBase::SetDelegate( SEFileReaderDelegate* _delegate ) +{ + mDelegate = _delegate; +} + +SEFileReaderDelegate* SEFileReaderBase::delegate() +{ + return mDelegate; +} diff --git a/src/Tools/SEFileReaderBase.h b/src/Tools/SEFileReaderBase.h index 20e73f3..44ea8ef 100644 --- a/src/Tools/SEFileReaderBase.h +++ b/src/Tools/SEFileReaderBase.h @@ -1,47 +1,47 @@ - -#ifndef SEFileReaderBase_H -#define SEFileReaderBase_H - -#include "SEIncludeLibrary.h" -#include "SEDefinition.h" -#include "SEError.h" - - -class SEPathBase; - -class SEFileReaderDelegate -{ -public: - virtual void HandleString(const sechar* string, bool isEndOfFile)=0; -}; - -typedef shared_ptr SEFileReaderDelegatePtr; -typedef vector< SEFileReaderDelegatePtr, SEAllocator > SEFileReaderDelegateArray; - - -class SEFileReaderBase: public SEFileReaderDelegate, public SEErrorInterface -{ -protected: - SEError error; - - sechar* mCurrentType; - const SEPathBase* mCurrentFile; - - SEFileReaderDelegate* mDelegate; - -public: - SEFileReaderBase(void); - virtual ~SEFileReaderBase(void); - - virtual void Load(const SEPathBase* filePath); - virtual void Close(); - virtual void HandleString(const sechar* string, bool isEndOfFile); - - void SetDelegate( SEFileReaderDelegate* _delegate ); - SEFileReaderDelegate* delegate(); -}; - -typedef SEFileReaderBase SEFileReader; - - -#endif SEFileReaderBase_H + +#ifndef SEFileReaderBase_H +#define SEFileReaderBase_H + +#include "SEIncludeLibrary.h" +#include "SEDefinition.h" +#include "SEError.h" + + +class SEPathBase; + +class SEFileReaderDelegate +{ +public: + virtual void HandleString(const sechar* string, bool isEndOfFile)=0; +}; + +typedef shared_ptr SEFileReaderDelegatePtr; +typedef vector< SEFileReaderDelegatePtr, SEAllocator > SEFileReaderDelegateArray; + + +class SEFileReaderBase: public SEFileReaderDelegate, public SEErrorInterface +{ +protected: + SEError error; + + sechar* mCurrentType; + const SEPathBase* mCurrentFile; + + SEFileReaderDelegate* mDelegate; + +public: + SEFileReaderBase(void); + virtual ~SEFileReaderBase(void); + + virtual void Load(const SEPathBase* filePath); + virtual void Close(); + virtual void HandleString(const sechar* string, bool isEndOfFile); + + void SetDelegate( SEFileReaderDelegate* _delegate ); + SEFileReaderDelegate* delegate(); +}; + +typedef SEFileReaderBase SEFileReader; + + +#endif SEFileReaderBase_H diff --git a/src/Tools/SEImageLoader.cpp b/src/Tools/SEImageLoader.cpp index ad3cf7b..4d0e825 100644 --- a/src/Tools/SEImageLoader.cpp +++ b/src/Tools/SEImageLoader.cpp @@ -36,6 +36,8 @@ SEImagePtr SEImageLoader::Load( const sechar* filePath ) SEImagePtr SEImageLoader::Load(const SEPath& filePath) { + TRACE2( "Load file %s", filePath.cString() ); + SEString ext = filePath.Extension(); SEImagePtr returnImagePtr; diff --git a/src/Tools/SEImageLoader.h b/src/Tools/SEImageLoader.h index 0a2e713..00c3e8b 100644 --- a/src/Tools/SEImageLoader.h +++ b/src/Tools/SEImageLoader.h @@ -1,23 +1,23 @@ - -#ifndef SEImageLoader_H -#define SEImageLoader_H - -#include "SEIncludeLibrary.h" -#include "SEDefinition.h" -#include "SEImage.h" -#include "SEPathBase.h" - -class SEImageLoader -{ -public: - SEImageLoader(void); - ~SEImageLoader(void); - - static void GetSupportedTypes( SEStringArray* outArray ); - static bool IsTypeSupported( const SEString& type ); - - SEImagePtr Load(const SEPath& filePath); - SEImagePtr Load(const sechar* filePath); -}; - + +#ifndef SEImageLoader_H +#define SEImageLoader_H + +#include "SEIncludeLibrary.h" +#include "SEDefinition.h" +#include "SEImage.h" +#include "SEPathBase.h" + +class SEImageLoader +{ +public: + SEImageLoader(void); + ~SEImageLoader(void); + + static void GetSupportedTypes( SEStringArray* outArray ); + static bool IsTypeSupported( const SEString& type ); + + SEImagePtr Load(const SEPath& filePath); + SEImagePtr Load(const sechar* filePath); +}; + #endif SEImageLoader_H \ No newline at end of file diff --git a/src/Tools/SEIncludeLibrary.h b/src/Tools/SEIncludeLibrary.h index 6337ef1..f897ace 100644 --- a/src/Tools/SEIncludeLibrary.h +++ b/src/Tools/SEIncludeLibrary.h @@ -1,21 +1,21 @@ - -#include - -#include -#include -#include -#include -using namespace std; - -#include -#include -using namespace boost; - -#define BOOST_FILESYSTEM_NO_DEPRECATED -#include -using namespace boost::filesystem; - -#include - -#include "SEAllocator.h" + +#include + +#include +#include +#include +#include +using namespace std; + +#include +#include +using namespace boost; + +#define BOOST_FILESYSTEM_NO_DEPRECATED +#include +using namespace boost::filesystem; + +#include + +#include "SEAllocator.h" #include "SEMemory.h" \ No newline at end of file diff --git a/src/Tools/SEMain.h b/src/Tools/SEMain.h index 56ed196..1fec4e5 100644 --- a/src/Tools/SEMain.h +++ b/src/Tools/SEMain.h @@ -1,25 +1,25 @@ - -#ifndef SEMainDEF -#define SEMainDEF - -#include "SEIncludeLibrary.h" - -#include "SEDefinition.h" -#include "SETools.h" - -#include "SEError.h" -#include "SEPathBase.h" -#include "SEFileReaderBase.h" -#include "SEFileLineReader.h" - -#include "SEMesh.h" -#include "SEObjectStore.h" -#include "SESceneLoader.h" - -#include "SEImageLoader.h" -#include "SETexture.h" - -#include "SEPhysicWorld.h" -#include "SEPhysicObject.h" - + +#ifndef SEMainDEF +#define SEMainDEF + +#include "SEIncludeLibrary.h" + +#include "SEDefinition.h" +#include "SETools.h" + +#include "SEError.h" +#include "SEPathBase.h" +#include "SEFileReaderBase.h" +#include "SEFileLineReader.h" + +#include "SEMesh.h" +#include "SEObjectStore.h" +#include "SESceneLoader.h" + +#include "SEImageLoader.h" +#include "SETexture.h" + +#include "SEPhysicWorld.h" +#include "SEPhysicObject.h" + #endif //SEMainDEF \ No newline at end of file diff --git a/src/Tools/SEMemory.h b/src/Tools/SEMemory.h index 3d9f4b8..f40b294 100644 --- a/src/Tools/SEMemory.h +++ b/src/Tools/SEMemory.h @@ -1,100 +1,100 @@ - -#ifndef SESharedAllocator_H -#define SESharedAllocator_H - -#include "SEAllocator.h" - -template -T* SENewObject() -{ - return new T; - - //void* mem = malloc(sizeof(T)); - //return new(mem)T; -} - -template -T* SENewObject( ARG1 arg1) -{ - return new T(arg1); - - //void* mem = malloc(sizeof(T)); - //return new(mem)T(arg1); -} - -template -T* SENewObject( ARG1 arg1, ARG2 arg2) -{ - return new T(arg1, arg2); - - //void* mem = malloc(sizeof(T)); - //return new(mem)T(arg1, arg2); -} - -template -T* SENewObject( ARG1 arg1, ARG2 arg2, ARG3 arg3) -{ - return new T(arg1, arg2, arg3); - - //void* mem = malloc(sizeof(T)); - //return new(mem)T(arg1, arg2, arg3); -} - -template -T* SENewObject( ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4) -{ - return new T(arg1, arg2, arg3, arg4); - - //void* mem = malloc(sizeof(T)); - //return new(mem)T(arg1, arg2, arg3, arg4); -} - -template -T* SENewArray( size_t itemCount ) -{ - return new T[itemCount]; - - //T* arr = (T*)calloc( itemCount, sizeof(T) ); - //return new(arr) T[itemCount]; -} - - -template -void SEDeleteObject(T* p) -{ - delete p; -} - -template -void SEDeleteArray(T* p) -{ - delete[] p; -} - - - -/* -class SESharedAllocator -{ - static SESharedAllocatorPtr mAllocator; - - SESharedAllocator(void); - -public: - ~SESharedAllocator(void); - - static SESharedAllocatorPtr allocator(); - - template - static T* NewObject( ) - { - void* mem = SESharedAllocator::allocator()-> - } - - template - static T* NewObject( A arg ); -}; - -*/ - + +#ifndef SESharedAllocator_H +#define SESharedAllocator_H + +#include "SEAllocator.h" + +template +T* SENewObject() +{ + return new T; + + //void* mem = malloc(sizeof(T)); + //return new(mem)T; +} + +template +T* SENewObject( ARG1 arg1) +{ + return new T(arg1); + + //void* mem = malloc(sizeof(T)); + //return new(mem)T(arg1); +} + +template +T* SENewObject( ARG1 arg1, ARG2 arg2) +{ + return new T(arg1, arg2); + + //void* mem = malloc(sizeof(T)); + //return new(mem)T(arg1, arg2); +} + +template +T* SENewObject( ARG1 arg1, ARG2 arg2, ARG3 arg3) +{ + return new T(arg1, arg2, arg3); + + //void* mem = malloc(sizeof(T)); + //return new(mem)T(arg1, arg2, arg3); +} + +template +T* SENewObject( ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4) +{ + return new T(arg1, arg2, arg3, arg4); + + //void* mem = malloc(sizeof(T)); + //return new(mem)T(arg1, arg2, arg3, arg4); +} + +template +T* SENewArray( size_t itemCount ) +{ + return new T[itemCount]; + + //T* arr = (T*)calloc( itemCount, sizeof(T) ); + //return new(arr) T[itemCount]; +} + + +template +void SEDeleteObject(T* p) +{ + delete p; +} + +template +void SEDeleteArray(T* p) +{ + delete[] p; +} + + + +/* +class SESharedAllocator +{ + static SESharedAllocatorPtr mAllocator; + + SESharedAllocator(void); + +public: + ~SESharedAllocator(void); + + static SESharedAllocatorPtr allocator(); + + template + static T* NewObject( ) + { + void* mem = SESharedAllocator::allocator()-> + } + + template + static T* NewObject( A arg ); +}; + +*/ + #endif SESharedAllocator_H \ No newline at end of file diff --git a/src/Tools/SEObjectStore.cpp b/src/Tools/SEObjectStore.cpp index 8c63174..cdadba0 100644 --- a/src/Tools/SEObjectStore.cpp +++ b/src/Tools/SEObjectStore.cpp @@ -1,67 +1,67 @@ -#include "SEObjectStore.h" -#include "SETools.h" - -SEObjectStorePtr SEObjectStore::mInstance; - -SEObjectStore::SEObjectStore(void) -{ -} - -SEObjectStore::~SEObjectStore(void) -{ - BREAKPOINTPLACE; -} - -SEObjectStorePtr SEObjectStore::sharedInstance() -{ - if( mInstance.get() == 0 ) - { - mInstance = SEObjectStorePtr( SENewObject() ); - } - - return mInstance; -} - -void SEObjectStore::AddMesh( SEMeshPtr mesh ) -{ - mMeshArray.push_back( mesh ); -} - -SEMeshPtr SEObjectStore::GetMesh( const char* name ) -{ - SEMeshArray::iterator start = mMeshArray.begin(); - SEMeshArray::iterator end = mMeshArray.end(); - - while( start != end ) - { - if( streq( (*start)->name().c_str(), name) ) - return *start; - - ++start; - } - - SEAssert(false, "Mesh not found"); - return SEMeshPtr(); -} - -void SEObjectStore::AddMaterial( SEMaterialPtr material ) -{ - mMaterialArray.push_back( material ); -} - -SEMaterialPtr SEObjectStore::GetMaterial( const char* name ) -{ - SEMaterialArray::iterator start = mMaterialArray.begin(); - SEMaterialArray::iterator end = mMaterialArray.end(); - - while( start != end ) - { - if( streq( (*start)->name().c_str(), name) ) - return *start; - - ++start; - } - - SEAssert(false, "Material not found"); - return SEMaterialPtr(); +#include "SEObjectStore.h" +#include "SETools.h" + +SEObjectStorePtr SEObjectStore::mInstance; + +SEObjectStore::SEObjectStore(void) +{ +} + +SEObjectStore::~SEObjectStore(void) +{ + BREAKPOINTPLACE; +} + +SEObjectStorePtr SEObjectStore::sharedInstance() +{ + if( mInstance.get() == 0 ) + { + mInstance = SEObjectStorePtr( SENewObject() ); + } + + return mInstance; +} + +void SEObjectStore::AddMesh( SEMeshPtr mesh ) +{ + mMeshArray.push_back( mesh ); +} + +SEMeshPtr SEObjectStore::GetMesh( const char* name ) +{ + SEMeshArray::iterator start = mMeshArray.begin(); + SEMeshArray::iterator end = mMeshArray.end(); + + while( start != end ) + { + if( streq( (*start)->name().c_str(), name) ) + return *start; + + ++start; + } + + SEAssert(false, "Mesh not found"); + return SEMeshPtr(); +} + +void SEObjectStore::AddMaterial( SEMaterialPtr material ) +{ + mMaterialArray.push_back( material ); +} + +SEMaterialPtr SEObjectStore::GetMaterial( const char* name ) +{ + SEMaterialArray::iterator start = mMaterialArray.begin(); + SEMaterialArray::iterator end = mMaterialArray.end(); + + while( start != end ) + { + if( streq( (*start)->name().c_str(), name) ) + return *start; + + ++start; + } + + SEAssert(false, "Material not found"); + return SEMaterialPtr(); } \ No newline at end of file diff --git a/src/Tools/SEObjectStore.h b/src/Tools/SEObjectStore.h index 45c3384..ed7dfea 100644 --- a/src/Tools/SEObjectStore.h +++ b/src/Tools/SEObjectStore.h @@ -1,26 +1,26 @@ - - -#include "SEMesh.h" - -class SEObjectStore; - -typedef shared_ptr SEObjectStorePtr; - -class SEObjectStore -{ - static SEObjectStorePtr mInstance; - SEMeshArray mMeshArray; - SEMaterialArray mMaterialArray; - -public: - SEObjectStore(void); - ~SEObjectStore(void); - - static SEObjectStorePtr sharedInstance(); - - void AddMesh( SEMeshPtr mesh ); - SEMeshPtr GetMesh( const char* name ); - - void AddMaterial( SEMaterialPtr material ); - SEMaterialPtr GetMaterial( const char* name ); -}; + + +#include "SEMesh.h" + +class SEObjectStore; + +typedef shared_ptr SEObjectStorePtr; + +class SEObjectStore +{ + static SEObjectStorePtr mInstance; + SEMeshArray mMeshArray; + SEMaterialArray mMaterialArray; + +public: + SEObjectStore(void); + ~SEObjectStore(void); + + static SEObjectStorePtr sharedInstance(); + + void AddMesh( SEMeshPtr mesh ); + SEMeshPtr GetMesh( const char* name ); + + void AddMaterial( SEMaterialPtr material ); + SEMaterialPtr GetMaterial( const char* name ); +}; diff --git a/src/Tools/SEPathBase.cpp b/src/Tools/SEPathBase.cpp index 0de8e05..b7f6f2e 100644 --- a/src/Tools/SEPathBase.cpp +++ b/src/Tools/SEPathBase.cpp @@ -1,107 +1,107 @@ - -#include "SEMemory.h" -#include "SEPathBase.h" - - -#if (TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE) -#include -#endif - -void SEPathBase::CurrentDirectory(SEPathBase* outPath) -{ -#if (TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE) - - outPath->Init( [[[NSBundle mainBundle] bundlePath] cStringUsingEncoding:NSWindowsCP1251StringEncoding] ); - TRACE( outPath->cString() ); - -#else - path pt = current_path( ); - TRACE( pt.string().c_str() ); - - outPath->Init( pt.string().c_str() ); -#endif -} - -SEPathBase::SEPathBase(const sechar* _cString) -{ - Init( _cString ); -} - -SEPathBase::SEPathBase(void) -{ - BREAKPOINTPLACE; -} - -SEPathBase::SEPathBase(const SEPathBase* pathBase) -{ - Init( pathBase->cString() ); -} - -SEPathBase::~SEPathBase(void) -{ - BREAKPOINTPLACE; -} - -void SEPathBase::Init( const sechar* _cString) -{ - SEAssert( strlen(_cString) < EPATH_MAX_LENGHT, "path length check" ); - mPath/=_cString; -} - -const sechar* SEPathBase::cString() const -{ - return mPath.string().c_str(); -} - -const sechar* SEPathBase::name() const -{ - /*SEAssert( mcString, "path must exist" ); - - int delimeterIndex = -1; - int len = strlen( mcString ); - for( int i=len; --i>=0; ) - if( mcString[i] == PATH_DELIMETER ) - { - delimeterIndex = i; - break; - } - - return mcString + delimeterIndex;*/ - - return mPath.filename().c_str(); -} - -void SEPathBase::AppendName( const char* name ) -{ - //append - mPath /= name; -} - -void SEPathBase::ChildArray(SEPathArray* pathArray) const -{ - SEAssert( IsFolder(), "is directory check" ); - SEAssert( mPath.string().length(), "NULL check"); - - directory_iterator end_itr; - for ( directory_iterator itr( mPath ); itr != end_itr; ++itr ) - { - SEPathPtr pathPtr( SENewObject() ); - pathPtr->Init( itr->path().string().c_str() ); - pathArray->push_back( pathPtr ); - } -} - -bool SEPathBase::IsFolder() const -{ - return is_directory( mPath ); -} - -SEPathBase SEPathBase::ParentPath() const -{ - return SEPathBase( mPath.parent_path().string().c_str() ); -} - -const SEString SEPathBase::Extension() const -{ - return SEString( mPath.extension().c_str() ); + +#include "SEMemory.h" +#include "SEPathBase.h" + + +#if (TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE) +#include +#endif + +void SEPathBase::CurrentDirectory(SEPathBase* outPath) +{ +#if (TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE) + + outPath->Init( [[[NSBundle mainBundle] bundlePath] cStringUsingEncoding:NSWindowsCP1251StringEncoding] ); + TRACE( outPath->cString() ); + +#else + path pt = current_path( ); + TRACE( pt.string().c_str() ); + + outPath->Init( pt.string().c_str() ); +#endif +} + +SEPathBase::SEPathBase(const sechar* _cString) +{ + Init( _cString ); +} + +SEPathBase::SEPathBase(void) +{ + BREAKPOINTPLACE; +} + +SEPathBase::SEPathBase(const SEPathBase* pathBase) +{ + Init( pathBase->cString() ); +} + +SEPathBase::~SEPathBase(void) +{ + BREAKPOINTPLACE; +} + +void SEPathBase::Init( const sechar* _cString) +{ + SEAssert( strlen(_cString) < EPATH_MAX_LENGHT, "path length check" ); + mPath/=_cString; +} + +const sechar* SEPathBase::cString() const +{ + return mPath.string().c_str(); +} + +const sechar* SEPathBase::name() const +{ + /*SEAssert( mcString, "path must exist" ); + + int delimeterIndex = -1; + int len = strlen( mcString ); + for( int i=len; --i>=0; ) + if( mcString[i] == PATH_DELIMETER ) + { + delimeterIndex = i; + break; + } + + return mcString + delimeterIndex;*/ + + return mPath.filename().c_str(); +} + +void SEPathBase::AppendName( const char* name ) +{ + //append + mPath /= name; +} + +void SEPathBase::ChildArray(SEPathArray* pathArray) const +{ + SEAssert( IsFolder(), "is directory check" ); + SEAssert( mPath.string().length(), "NULL check"); + + directory_iterator end_itr; + for ( directory_iterator itr( mPath ); itr != end_itr; ++itr ) + { + SEPathPtr pathPtr( SENewObject() ); + pathPtr->Init( itr->path().string().c_str() ); + pathArray->push_back( pathPtr ); + } +} + +bool SEPathBase::IsFolder() const +{ + return is_directory( mPath ); +} + +SEPathBase SEPathBase::ParentPath() const +{ + return SEPathBase( mPath.parent_path().string().c_str() ); +} + +const SEString SEPathBase::Extension() const +{ + return SEString( mPath.extension().c_str() ); } \ No newline at end of file diff --git a/src/Tools/SEPathBase.h b/src/Tools/SEPathBase.h index 6e2e32a..b386d41 100644 --- a/src/Tools/SEPathBase.h +++ b/src/Tools/SEPathBase.h @@ -1,45 +1,45 @@ - -#ifndef SEPathBase_H -#define SEPathBase_H - - -#include "SEIncludeLibrary.h" -#include "SEDefinition.h" - - -class SEPathBase; - -typedef shared_ptr SEPathPtr; -typedef vector< SEPathPtr, SEAllocator > SEPathArray; - -class SEPathBase -{ -protected: - path mPath; - -public: - - static void CurrentDirectory(SEPathBase* outPath); - - SEPathBase(const sechar* _cString); - SEPathBase(const SEPathBase* pathBase); - SEPathBase(void); - virtual ~SEPathBase(void); - - virtual void Init( const sechar* _cString); - const sechar* cString() const; - const sechar* name() const; - const SEString Extension() const; - void AppendName( const char* name ); - - SEPathBase ParentPath() const; - - virtual void ChildArray(SEPathArray* pathArray) const; - virtual bool IsFolder() const; -}; - -typedef SEPathBase SEPath; - - -#endif SEPathBase_H - + +#ifndef SEPathBase_H +#define SEPathBase_H + + +#include "SEIncludeLibrary.h" +#include "SEDefinition.h" + + +class SEPathBase; + +typedef shared_ptr SEPathPtr; +typedef vector< SEPathPtr, SEAllocator > SEPathArray; + +class SEPathBase +{ +protected: + path mPath; + +public: + + static void CurrentDirectory(SEPathBase* outPath); + + SEPathBase(const sechar* _cString); + SEPathBase(const SEPathBase* pathBase); + SEPathBase(void); + virtual ~SEPathBase(void); + + virtual void Init( const sechar* _cString); + const sechar* cString() const; + const sechar* name() const; + const SEString Extension() const; + void AppendName( const char* name ); + + SEPathBase ParentPath() const; + + virtual void ChildArray(SEPathArray* pathArray) const; + virtual bool IsFolder() const; +}; + +typedef SEPathBase SEPath; + + +#endif SEPathBase_H + diff --git a/src/Tools/SESceneLoader.cpp b/src/Tools/SESceneLoader.cpp index 74bdce4..bd18bb5 100644 --- a/src/Tools/SESceneLoader.cpp +++ b/src/Tools/SESceneLoader.cpp @@ -1,132 +1,132 @@ -#include "SESceneLoader.h" -#include "SEMain.h" - -SESceneLoader::SESceneLoader(void) -{ - mFileReader.SetDelegate( this ); - mCurrentIndex = 0; -} - -SESceneLoader::~SESceneLoader(void) -{ - mFileReader.Close(); -} - -void SESceneLoader::Load(const SEPathBase* path) -{ - TRACE(path->cString()); - - if( path->IsFolder() ) - { - //SEPath* debugPath; - - { - SEPathArray pathArray; - path->ChildArray(&pathArray); - //debugPath = pathArray[0].get(); - - for( uint i=0; iExtension() ) ) - return; - - mCurrentPath = path; - mFileReader.Load( path ); - } -} - -void SESceneLoader::Close() -{ - mFileReader.Close(); -} - -void SESceneLoader::AddDelegate( SESceneLoaderDelegatePtr loaderDelegatePtr ) -{ - mDelegateStack.push( loaderDelegatePtr ); -} - -void SESceneLoader::PopDelegate( ) -{ - mDelegateStack.pop(); -} - -void SESceneLoader::HandleString(const sechar* string, bool isEndOfFile) -{ - memset( mDataType, 0, sizeof(mDataType) ); - mValidValueCount = sscanf(string,"%s %s %s %s", mDataType, mValue1, mValue2, mValue3); - - if( mDelegateStack.size() ) - { - mDelegateStack.top()->ParseData( this ); - return; - } - - if( mValidValueCount == 2 && streq( mDataType, "type" ) ) - { - if( streq( mValue1, "Mesh" ) ) - { - SEMeshPtr mesh( SENewObject() ); - mDelegateStack.push( mesh ); - - SEObjectStore::sharedInstance()->AddMesh( mesh ); - - }else if( streq( mValue1, "Material" ) ) - { - SEMaterialPtr material( SENewObject() ); - mDelegateStack.push( material ); - - SEObjectStore::sharedInstance()->AddMaterial( material ); - } - } -} - -int SESceneLoader::validValueCount() const -{ - return mValidValueCount; -} - -const sechar* SESceneLoader::dataType() const -{ - return mDataType; -} - -const sechar* SESceneLoader::value1() const -{ - return mValue1; -} - -const sechar* SESceneLoader::value2() const -{ - return mValue2; -} - -const sechar* SESceneLoader::value3() const -{ - return mValue3; -} - -void SESceneLoader::SetCurrentIndex( int value ) -{ - mCurrentIndex = value; -} - -int SESceneLoader::currentIndex() -{ - return mCurrentIndex; -} - -const SEPathBase* SESceneLoader::currentPath() -{ - return mCurrentPath; +#include "SESceneLoader.h" +#include "SEMain.h" + +SESceneLoader::SESceneLoader(void) +{ + mFileReader.SetDelegate( this ); + mCurrentIndex = 0; +} + +SESceneLoader::~SESceneLoader(void) +{ + mFileReader.Close(); +} + +void SESceneLoader::Load(const SEPathBase* path) +{ + TRACE(path->cString()); + + if( path->IsFolder() ) + { + //SEPath* debugPath; + + { + SEPathArray pathArray; + path->ChildArray(&pathArray); + //debugPath = pathArray[0].get(); + + for( uint i=0; iExtension() ) ) + return; + + mCurrentPath = path; + mFileReader.Load( path ); + } +} + +void SESceneLoader::Close() +{ + mFileReader.Close(); +} + +void SESceneLoader::AddDelegate( SESceneLoaderDelegatePtr loaderDelegatePtr ) +{ + mDelegateStack.push( loaderDelegatePtr ); +} + +void SESceneLoader::PopDelegate( ) +{ + mDelegateStack.pop(); +} + +void SESceneLoader::HandleString(const sechar* string, bool isEndOfFile) +{ + memset( mDataType, 0, sizeof(mDataType) ); + mValidValueCount = sscanf(string,"%s %s %s %s", mDataType, mValue1, mValue2, mValue3); + + if( mDelegateStack.size() ) + { + mDelegateStack.top()->ParseData( this ); + return; + } + + if( mValidValueCount == 2 && streq( mDataType, "type" ) ) + { + if( streq( mValue1, "Mesh" ) ) + { + SEMeshPtr mesh( SENewObject() ); + mDelegateStack.push( mesh ); + + SEObjectStore::sharedInstance()->AddMesh( mesh ); + + }else if( streq( mValue1, "Material" ) ) + { + SEMaterialPtr material( SENewObject() ); + mDelegateStack.push( material ); + + SEObjectStore::sharedInstance()->AddMaterial( material ); + } + } +} + +int SESceneLoader::validValueCount() const +{ + return mValidValueCount; +} + +const sechar* SESceneLoader::dataType() const +{ + return mDataType; +} + +const sechar* SESceneLoader::value1() const +{ + return mValue1; +} + +const sechar* SESceneLoader::value2() const +{ + return mValue2; +} + +const sechar* SESceneLoader::value3() const +{ + return mValue3; +} + +void SESceneLoader::SetCurrentIndex( int value ) +{ + mCurrentIndex = value; +} + +int SESceneLoader::currentIndex() +{ + return mCurrentIndex; +} + +const SEPathBase* SESceneLoader::currentPath() +{ + return mCurrentPath; } \ No newline at end of file diff --git a/src/Tools/SESceneLoader.h b/src/Tools/SESceneLoader.h index 52fbcd1..a6696d6 100644 --- a/src/Tools/SESceneLoader.h +++ b/src/Tools/SESceneLoader.h @@ -1,51 +1,51 @@ - -#ifndef SESceneLoader_H -#define SESceneLoader_H - - -#include "SEIncludeLibrary.h" -#include "SESceneLoaderDelegate.h" -#include "SEFileLineReader.h" - -#define LOADER_BUFFER_SIZE 128 - - -//executing string from file export in subclass -class SESceneLoader: public SEFileReaderDelegate -{ - SEFileLineReader mFileReader; - SESceneLoaderDelegateStack mDelegateStack; - - //buffers for delegates - int mValidValueCount; - - sechar mDataType[LOADER_BUFFER_SIZE]; - sechar mValue1[LOADER_BUFFER_SIZE]; - sechar mValue2[LOADER_BUFFER_SIZE]; - sechar mValue3[LOADER_BUFFER_SIZE]; - int mCurrentIndex; - const SEPathBase* mCurrentPath; - -public: - SESceneLoader(void); - ~SESceneLoader(void); - - virtual void Load(const SEPathBase* path); - virtual void HandleString(const sechar* string, bool isEndOfFile); - virtual void Close(); - - void AddDelegate( SESceneLoaderDelegatePtr loaderDelegatePtr ); - void PopDelegate( ); - - int validValueCount() const; - const sechar* dataType() const; - const sechar* value1() const; - const sechar* value2() const; - const sechar* value3() const; - - void SetCurrentIndex( int value ); - int currentIndex(); - const SEPathBase* currentPath(); -}; - -#endif SESceneLoader_H + +#ifndef SESceneLoader_H +#define SESceneLoader_H + + +#include "SEIncludeLibrary.h" +#include "SESceneLoaderDelegate.h" +#include "SEFileLineReader.h" + +#define LOADER_BUFFER_SIZE 128 + + +//executing string from file export in subclass +class SESceneLoader: public SEFileReaderDelegate +{ + SEFileLineReader mFileReader; + SESceneLoaderDelegateStack mDelegateStack; + + //buffers for delegates + int mValidValueCount; + + sechar mDataType[LOADER_BUFFER_SIZE]; + sechar mValue1[LOADER_BUFFER_SIZE]; + sechar mValue2[LOADER_BUFFER_SIZE]; + sechar mValue3[LOADER_BUFFER_SIZE]; + int mCurrentIndex; + const SEPathBase* mCurrentPath; + +public: + SESceneLoader(void); + ~SESceneLoader(void); + + virtual void Load(const SEPathBase* path); + virtual void HandleString(const sechar* string, bool isEndOfFile); + virtual void Close(); + + void AddDelegate( SESceneLoaderDelegatePtr loaderDelegatePtr ); + void PopDelegate( ); + + int validValueCount() const; + const sechar* dataType() const; + const sechar* value1() const; + const sechar* value2() const; + const sechar* value3() const; + + void SetCurrentIndex( int value ); + int currentIndex(); + const SEPathBase* currentPath(); +}; + +#endif SESceneLoader_H diff --git a/src/Tools/SESceneLoaderDelegate.h b/src/Tools/SESceneLoaderDelegate.h index b2d6fc2..81f2c06 100644 --- a/src/Tools/SESceneLoaderDelegate.h +++ b/src/Tools/SESceneLoaderDelegate.h @@ -1,19 +1,19 @@ - -#ifndef SESceneLoaderDelegate_H -#define SESceneLoaderDelegate_H - - -class SESceneLoader; - -class SESceneLoaderDelegate -{ -public: - virtual void ParseData( SESceneLoader* loader )=0; -}; - -typedef shared_ptr SESceneLoaderDelegatePtr; -typedef vector > SESceneLoaderDelegateArray; -typedef stack< SESceneLoaderDelegatePtr, SESceneLoaderDelegateArray> SESceneLoaderDelegateStack; - - + +#ifndef SESceneLoaderDelegate_H +#define SESceneLoaderDelegate_H + + +class SESceneLoader; + +class SESceneLoaderDelegate +{ +public: + virtual void ParseData( SESceneLoader* loader )=0; +}; + +typedef shared_ptr SESceneLoaderDelegatePtr; +typedef vector > SESceneLoaderDelegateArray; +typedef stack< SESceneLoaderDelegatePtr, SESceneLoaderDelegateArray> SESceneLoaderDelegateStack; + + #endif SESceneLoaderDelegate_H \ No newline at end of file diff --git a/src/Tools/SETools.cpp b/src/Tools/SETools.cpp index 9482f67..e4d4878 100644 --- a/src/Tools/SETools.cpp +++ b/src/Tools/SETools.cpp @@ -1,32 +1,32 @@ - -#include "SEIncludeLibrary.h" -#include "SEDefinition.h" -#include "SEIncludeOpenGL.h" - -bool streq(const sechar *s1, const sechar *s2) -{ - for (;;) - { - if( *(s1++)!=*(s2++) ) - return 0; - - if( *s1 == 0 && *s2 == 0 ) - return 1; - - if( *s1 == 0 || *s2 == 0 ) - return 0; - } -} - -void SELoadDefaultOpenGLSettings() -{ - glEnable( GL_DEPTH_TEST ); - - glEnable( GL_LIGHTING ); - glEnable( GL_LIGHT0 ); - glEnable( GL_TEXTURE_2D); - - glEnableClientState( GL_VERTEX_ARRAY ); - glEnableClientState( GL_NORMAL_ARRAY ); - glEnableClientState( GL_TEXTURE_COORD_ARRAY ); + +#include "SEIncludeLibrary.h" +#include "SEDefinition.h" +#include "SEIncludeOpenGL.h" + +bool streq(const sechar *s1, const sechar *s2) +{ + for (;;) + { + if( *(s1++)!=*(s2++) ) + return 0; + + if( *s1 == 0 && *s2 == 0 ) + return 1; + + if( *s1 == 0 || *s2 == 0 ) + return 0; + } +} + +void SELoadDefaultOpenGLSettings() +{ + glEnable( GL_DEPTH_TEST ); + + glEnable( GL_LIGHTING ); + glEnable( GL_LIGHT0 ); + glEnable( GL_TEXTURE_2D); + + glEnableClientState( GL_VERTEX_ARRAY ); + glEnableClientState( GL_NORMAL_ARRAY ); + glEnableClientState( GL_TEXTURE_COORD_ARRAY ); } \ No newline at end of file diff --git a/src/Tools/SETools.h b/src/Tools/SETools.h index b20575e..f48d06c 100644 --- a/src/Tools/SETools.h +++ b/src/Tools/SETools.h @@ -1,4 +1,4 @@ - -bool streq(const sechar *s1, const sechar *s2); - + +bool streq(const sechar *s1, const sechar *s2); + void SELoadDefaultOpenGLSettings(); \ No newline at end of file diff --git a/src/Tools/b2BlockAllocator.cpp b/src/Tools/b2BlockAllocator.cpp index fb2aaa2..6d7d806 100644 --- a/src/Tools/b2BlockAllocator.cpp +++ b/src/Tools/b2BlockAllocator.cpp @@ -1,213 +1,213 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -*/ - -#include "b2BlockAllocator.h" -#include -#include -#include - -#include - -int32 b2BlockAllocator::s_blockSizes[b2_blockSizes] = -{ - 16, // 0 - 32, // 1 - 64, // 2 - 96, // 3 - 128, // 4 - 160, // 5 - 192, // 6 - 224, // 7 - 256, // 8 - 320, // 9 - 384, // 10 - 448, // 11 - 512, // 12 - 640, // 13 -}; -uint8 b2BlockAllocator::s_blockSizeLookup[b2_maxBlockSize + 1]; -bool b2BlockAllocator::s_blockSizeLookupInitialized; - -struct b2Chunk -{ - int32 blockSize; - b2Block* blocks; -}; - -struct b2Block -{ - b2Block* next; -}; - -b2BlockAllocator::b2BlockAllocator() -{ - b2Assert(b2_blockSizes < UCHAR_MAX); - - m_chunkSpace = b2_chunkArrayIncrement; - m_chunkCount = 0; - m_chunks = (b2Chunk*)b2Alloc(m_chunkSpace * sizeof(b2Chunk)); - - memset(m_chunks, 0, m_chunkSpace * sizeof(b2Chunk)); - memset(m_freeLists, 0, sizeof(m_freeLists)); - - if (s_blockSizeLookupInitialized == false) - { - int32 j = 0; - for (int32 i = 1; i <= b2_maxBlockSize; ++i) - { - b2Assert(j < b2_blockSizes); - if (i <= s_blockSizes[j]) - { - s_blockSizeLookup[i] = (uint8)j; - } - else - { - ++j; - s_blockSizeLookup[i] = (uint8)j; - } - } - - s_blockSizeLookupInitialized = true; - } -} - -b2BlockAllocator::~b2BlockAllocator() -{ - for (int32 i = 0; i < m_chunkCount; ++i) - { - b2Free(m_chunks[i].blocks); - } - - b2Free(m_chunks); -} - -void* b2BlockAllocator::Allocate(int32 size) -{ - if (size == 0) - return NULL; - - //return malloc(size); - - - b2Assert(0 < size && size <= b2_maxBlockSize); - - int32 index = s_blockSizeLookup[size]; - b2Assert(0 <= index && index < b2_blockSizes); - - if (m_freeLists[index]) - { - b2Block* block = m_freeLists[index]; - m_freeLists[index] = block->next; - return block; - } - else - { - if (m_chunkCount == m_chunkSpace) - { - b2Chunk* oldChunks = m_chunks; - m_chunkSpace += b2_chunkArrayIncrement; - m_chunks = (b2Chunk*)b2Alloc(m_chunkSpace * sizeof(b2Chunk)); - memcpy(m_chunks, oldChunks, m_chunkCount * sizeof(b2Chunk)); - memset(m_chunks + m_chunkCount, 0, b2_chunkArrayIncrement * sizeof(b2Chunk)); - b2Free(oldChunks); - } - - b2Chunk* chunk = m_chunks + m_chunkCount; - - printf(" b2Alloc %d\r\n",b2_chunkSize); - chunk->blocks = (b2Block*)b2Alloc(b2_chunkSize); -#if defined(_DEBUG) - memset(chunk->blocks, 0xcd, b2_chunkSize); -#endif - int32 blockSize = s_blockSizes[index]; - chunk->blockSize = blockSize; - int32 blockCount = b2_chunkSize / blockSize; - b2Assert(blockCount * blockSize <= b2_chunkSize); - for (int32 i = 0; i < blockCount - 1; ++i) - { - b2Block* block = (b2Block*)((int8*)chunk->blocks + blockSize * i); - b2Block* next = (b2Block*)((int8*)chunk->blocks + blockSize * (i + 1)); - block->next = next; - } - b2Block* last = (b2Block*)((int8*)chunk->blocks + blockSize * (blockCount - 1)); - last->next = NULL; - - m_freeLists[index] = chunk->blocks->next; - ++m_chunkCount; - - return chunk->blocks; - } - -} - -void b2BlockAllocator::Free(void* p, int32 size) -{ - if (size == 0) - return; - - //free(p); - - b2Assert(0 < size && size <= b2_maxBlockSize); - - int32 index = s_blockSizeLookup[size]; - b2Assert(0 <= index && index < b2_blockSizes); - -#ifdef _DEBUG - // Verify the memory address and size is valid. - int32 blockSize = s_blockSizes[index]; - bool found = false; - int32 gap = (int32)((int8*)&m_chunks->blocks - (int8*)m_chunks); - for (int32 i = 0; i < m_chunkCount; ++i) - { - b2Chunk* chunk = m_chunks + i; - if (chunk->blockSize != blockSize) - { - b2Assert( (int8*)p + blockSize <= (int8*)chunk->blocks || - (int8*)chunk->blocks + b2_chunkSize + gap <= (int8*)p); - } - else - { - if ((int8*)chunk->blocks <= (int8*)p && (int8*)p + blockSize <= (int8*)chunk->blocks + b2_chunkSize) - { - found = true; - } - } - } - - b2Assert(found); - - memset(p, 0xfd, blockSize); -#endif - - b2Block* block = (b2Block*)p; - block->next = m_freeLists[index]; - m_freeLists[index] = block; -} - -void b2BlockAllocator::Clear() -{ - for (int32 i = 0; i < m_chunkCount; ++i) - { - b2Free(m_chunks[i].blocks); - } - - m_chunkCount = 0; - memset(m_chunks, 0, m_chunkSpace * sizeof(b2Chunk)); - - memset(m_freeLists, 0, sizeof(m_freeLists)); -} +/* +* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#include "b2BlockAllocator.h" +#include +#include +#include + +#include + +int32 b2BlockAllocator::s_blockSizes[b2_blockSizes] = +{ + 16, // 0 + 32, // 1 + 64, // 2 + 96, // 3 + 128, // 4 + 160, // 5 + 192, // 6 + 224, // 7 + 256, // 8 + 320, // 9 + 384, // 10 + 448, // 11 + 512, // 12 + 640, // 13 +}; +uint8 b2BlockAllocator::s_blockSizeLookup[b2_maxBlockSize + 1]; +bool b2BlockAllocator::s_blockSizeLookupInitialized; + +struct b2Chunk +{ + int32 blockSize; + b2Block* blocks; +}; + +struct b2Block +{ + b2Block* next; +}; + +b2BlockAllocator::b2BlockAllocator() +{ + b2Assert(b2_blockSizes < UCHAR_MAX); + + m_chunkSpace = b2_chunkArrayIncrement; + m_chunkCount = 0; + m_chunks = (b2Chunk*)b2Alloc(m_chunkSpace * sizeof(b2Chunk)); + + memset(m_chunks, 0, m_chunkSpace * sizeof(b2Chunk)); + memset(m_freeLists, 0, sizeof(m_freeLists)); + + if (s_blockSizeLookupInitialized == false) + { + int32 j = 0; + for (int32 i = 1; i <= b2_maxBlockSize; ++i) + { + b2Assert(j < b2_blockSizes); + if (i <= s_blockSizes[j]) + { + s_blockSizeLookup[i] = (uint8)j; + } + else + { + ++j; + s_blockSizeLookup[i] = (uint8)j; + } + } + + s_blockSizeLookupInitialized = true; + } +} + +b2BlockAllocator::~b2BlockAllocator() +{ + for (int32 i = 0; i < m_chunkCount; ++i) + { + b2Free(m_chunks[i].blocks); + } + + b2Free(m_chunks); +} + +void* b2BlockAllocator::Allocate(int32 size) +{ + if (size == 0) + return NULL; + + //return malloc(size); + + + b2Assert(0 < size && size <= b2_maxBlockSize); + + int32 index = s_blockSizeLookup[size]; + b2Assert(0 <= index && index < b2_blockSizes); + + if (m_freeLists[index]) + { + b2Block* block = m_freeLists[index]; + m_freeLists[index] = block->next; + return block; + } + else + { + if (m_chunkCount == m_chunkSpace) + { + b2Chunk* oldChunks = m_chunks; + m_chunkSpace += b2_chunkArrayIncrement; + m_chunks = (b2Chunk*)b2Alloc(m_chunkSpace * sizeof(b2Chunk)); + memcpy(m_chunks, oldChunks, m_chunkCount * sizeof(b2Chunk)); + memset(m_chunks + m_chunkCount, 0, b2_chunkArrayIncrement * sizeof(b2Chunk)); + b2Free(oldChunks); + } + + b2Chunk* chunk = m_chunks + m_chunkCount; + + printf(" b2Alloc %d\r\n",b2_chunkSize); + chunk->blocks = (b2Block*)b2Alloc(b2_chunkSize); +#if defined(_DEBUG) + memset(chunk->blocks, 0xcd, b2_chunkSize); +#endif + int32 blockSize = s_blockSizes[index]; + chunk->blockSize = blockSize; + int32 blockCount = b2_chunkSize / blockSize; + b2Assert(blockCount * blockSize <= b2_chunkSize); + for (int32 i = 0; i < blockCount - 1; ++i) + { + b2Block* block = (b2Block*)((int8*)chunk->blocks + blockSize * i); + b2Block* next = (b2Block*)((int8*)chunk->blocks + blockSize * (i + 1)); + block->next = next; + } + b2Block* last = (b2Block*)((int8*)chunk->blocks + blockSize * (blockCount - 1)); + last->next = NULL; + + m_freeLists[index] = chunk->blocks->next; + ++m_chunkCount; + + return chunk->blocks; + } + +} + +void b2BlockAllocator::Free(void* p, int32 size) +{ + if (size == 0) + return; + + //free(p); + + b2Assert(0 < size && size <= b2_maxBlockSize); + + int32 index = s_blockSizeLookup[size]; + b2Assert(0 <= index && index < b2_blockSizes); + +#ifdef _DEBUG + // Verify the memory address and size is valid. + int32 blockSize = s_blockSizes[index]; + bool found = false; + int32 gap = (int32)((int8*)&m_chunks->blocks - (int8*)m_chunks); + for (int32 i = 0; i < m_chunkCount; ++i) + { + b2Chunk* chunk = m_chunks + i; + if (chunk->blockSize != blockSize) + { + b2Assert( (int8*)p + blockSize <= (int8*)chunk->blocks || + (int8*)chunk->blocks + b2_chunkSize + gap <= (int8*)p); + } + else + { + if ((int8*)chunk->blocks <= (int8*)p && (int8*)p + blockSize <= (int8*)chunk->blocks + b2_chunkSize) + { + found = true; + } + } + } + + b2Assert(found); + + memset(p, 0xfd, blockSize); +#endif + + b2Block* block = (b2Block*)p; + block->next = m_freeLists[index]; + m_freeLists[index] = block; +} + +void b2BlockAllocator::Clear() +{ + for (int32 i = 0; i < m_chunkCount; ++i) + { + b2Free(m_chunks[i].blocks); + } + + m_chunkCount = 0; + memset(m_chunks, 0, m_chunkSpace * sizeof(b2Chunk)); + + memset(m_freeLists, 0, sizeof(m_freeLists)); +} diff --git a/src/Tools/b2BlockAllocator.h b/src/Tools/b2BlockAllocator.h index 02b411a..8608ab8 100644 --- a/src/Tools/b2BlockAllocator.h +++ b/src/Tools/b2BlockAllocator.h @@ -1,60 +1,60 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef B2_BLOCK_ALLOCATOR_H -#define B2_BLOCK_ALLOCATOR_H - -//#include "b2Settings.h" -#include "b2Func.h" - - -const int32 b2_chunkSize = 4096; -const int32 b2_maxBlockSize = 640; -const int32 b2_blockSizes = 14; -const int32 b2_chunkArrayIncrement = 128; - -struct b2Block; -struct b2Chunk; - -// This is a small object allocator used for allocating small -// objects that persist for more than one time step. -// See: http://www.codeproject.com/useritems/Small_Block_Allocator.asp -class b2BlockAllocator -{ -public: - b2BlockAllocator(); - ~b2BlockAllocator(); - - void* Allocate(int32 size); - void Free(void* p, int32 size); - - void Clear(); - -private: - b2Chunk* m_chunks; - int32 m_chunkCount; - int32 m_chunkSpace; - - b2Block* m_freeLists[b2_blockSizes]; - - static int32 s_blockSizes[b2_blockSizes]; - static uint8 s_blockSizeLookup[b2_maxBlockSize + 1]; - static bool s_blockSizeLookupInitialized; -}; - -#endif +/* +* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef B2_BLOCK_ALLOCATOR_H +#define B2_BLOCK_ALLOCATOR_H + +//#include "b2Settings.h" +#include "b2Func.h" + + +const int32 b2_chunkSize = 4096; +const int32 b2_maxBlockSize = 640; +const int32 b2_blockSizes = 14; +const int32 b2_chunkArrayIncrement = 128; + +struct b2Block; +struct b2Chunk; + +// This is a small object allocator used for allocating small +// objects that persist for more than one time step. +// See: http://www.codeproject.com/useritems/Small_Block_Allocator.asp +class b2BlockAllocator +{ +public: + b2BlockAllocator(); + ~b2BlockAllocator(); + + void* Allocate(int32 size); + void Free(void* p, int32 size); + + void Clear(); + +private: + b2Chunk* m_chunks; + int32 m_chunkCount; + int32 m_chunkSpace; + + b2Block* m_freeLists[b2_blockSizes]; + + static int32 s_blockSizes[b2_blockSizes]; + static uint8 s_blockSizeLookup[b2_maxBlockSize + 1]; + static bool s_blockSizeLookupInitialized; +}; + +#endif diff --git a/src/Tools/iPhone/SEiPhoneFileReader.cpp b/src/Tools/iPhone/SEiPhoneFileReader.cpp index 126d592..4a912e4 100644 --- a/src/Tools/iPhone/SEiPhoneFileReader.cpp +++ b/src/Tools/iPhone/SEiPhoneFileReader.cpp @@ -1,83 +1,83 @@ - -#include "SEiPhoneFileReader.h" -#include "SEPathBase.h" - -#define SEWindowsFileReader_BUFFER_LENGHT 1024 - -SEWindowsFileReader::SEWindowsFileReader(void) -{ - //mhFile = INVALID_HANDLE_VALUE; -} - -SEWindowsFileReader::~SEWindowsFileReader(void) -{ -} - -void SEWindowsFileReader::Load(const SEPathBase* filePath) -{ - TRACE( filePath->cString() ); - SEFileReaderBase::Load(filePath); - - sechar buffer[SEWindowsFileReader_BUFFER_LENGHT]; - //size_t readed = 1; - - FILE* file = fopen(filePath->cString(), "r"); - - while( feof(file) == 0 ) - { - memset(buffer,0,sizeof(buffer)); - - //fgets( buffer, SEWindowsFileReader_BUFFER_LENGHT-1, file ); - fread(buffer, SEWindowsFileReader_BUFFER_LENGHT-1, 1, file); - - HandleString( buffer, feof(file) ); - } - - fclose(file); - - /* - mhFile = CreateFile( filePath->cString(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL ); - //SEAssert( mhFile != INVALID_HANDLE_VALUE, filePath->cString() ); - if( mhFile == INVALID_HANDLE_VALUE ) - { - INIT_ERROR( "File not open" ); - return; - } - - //read file - sechar buffer[SEWindowsFileReader_BUFFER_LENGHT]; - DWORD readed = 1; - - while(true) - { - memset(buffer,0,sizeof(buffer)); - - if( !ReadFile( mhFile, buffer, SEWindowsFileReader_BUFFER_LENGHT-1, &readed , NULL) ) - { - SEAssert(false, "error when file read"); - break; - } - - buffer[readed]='\0'; - HandleString( buffer, readed == 0 ); - - if(!readed) - break; - } - - Close(); - */ -} - -void SEWindowsFileReader::Close() -{ - SEFileReaderBase::Close(); - - /* - if( mhFile != INVALID_HANDLE_VALUE ) - { - CloseHandle(mhFile); - mhFile = INVALID_HANDLE_VALUE; - } - */ + +#include "SEiPhoneFileReader.h" +#include "SEPathBase.h" + +#define SEWindowsFileReader_BUFFER_LENGHT 1024 + +SEWindowsFileReader::SEWindowsFileReader(void) +{ + //mhFile = INVALID_HANDLE_VALUE; +} + +SEWindowsFileReader::~SEWindowsFileReader(void) +{ +} + +void SEWindowsFileReader::Load(const SEPathBase* filePath) +{ + TRACE( filePath->cString() ); + SEFileReaderBase::Load(filePath); + + sechar buffer[SEWindowsFileReader_BUFFER_LENGHT]; + //size_t readed = 1; + + FILE* file = fopen(filePath->cString(), "r"); + + while( feof(file) == 0 ) + { + memset(buffer,0,sizeof(buffer)); + + //fgets( buffer, SEWindowsFileReader_BUFFER_LENGHT-1, file ); + fread(buffer, SEWindowsFileReader_BUFFER_LENGHT-1, 1, file); + + HandleString( buffer, feof(file) ); + } + + fclose(file); + + /* + mhFile = CreateFile( filePath->cString(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL ); + //SEAssert( mhFile != INVALID_HANDLE_VALUE, filePath->cString() ); + if( mhFile == INVALID_HANDLE_VALUE ) + { + INIT_ERROR( "File not open" ); + return; + } + + //read file + sechar buffer[SEWindowsFileReader_BUFFER_LENGHT]; + DWORD readed = 1; + + while(true) + { + memset(buffer,0,sizeof(buffer)); + + if( !ReadFile( mhFile, buffer, SEWindowsFileReader_BUFFER_LENGHT-1, &readed , NULL) ) + { + SEAssert(false, "error when file read"); + break; + } + + buffer[readed]='\0'; + HandleString( buffer, readed == 0 ); + + if(!readed) + break; + } + + Close(); + */ +} + +void SEWindowsFileReader::Close() +{ + SEFileReaderBase::Close(); + + /* + if( mhFile != INVALID_HANDLE_VALUE ) + { + CloseHandle(mhFile); + mhFile = INVALID_HANDLE_VALUE; + } + */ } \ No newline at end of file diff --git a/src/Tools/iPhone/SEiPhoneFileReader.h b/src/Tools/iPhone/SEiPhoneFileReader.h index 90d373f..213d8c7 100644 --- a/src/Tools/iPhone/SEiPhoneFileReader.h +++ b/src/Tools/iPhone/SEiPhoneFileReader.h @@ -1,23 +1,23 @@ - -#ifndef SEWindowsFileReader_H -#define SEWindowsFileReader_H - -#include "SEIncludeLibrary.h" -#include "SEFileReaderBase.h" - -class SEWindowsFileReader: public SEFileReaderBase -{ -protected: - //HANDLE mhFile; - -public: - SEWindowsFileReader(void); - virtual ~SEWindowsFileReader(void); - - virtual void Load(const SEPathBase* filePath); - virtual void Close(); -}; - -typedef SEWindowsFileReader EFileReader; - + +#ifndef SEWindowsFileReader_H +#define SEWindowsFileReader_H + +#include "SEIncludeLibrary.h" +#include "SEFileReaderBase.h" + +class SEWindowsFileReader: public SEFileReaderBase +{ +protected: + //HANDLE mhFile; + +public: + SEWindowsFileReader(void); + virtual ~SEWindowsFileReader(void); + + virtual void Load(const SEPathBase* filePath); + virtual void Close(); +}; + +typedef SEWindowsFileReader EFileReader; + #endif SEWindowsFileReader_H \ No newline at end of file diff --git a/src/Tools/iPhone/SEiPhonePath.cpp b/src/Tools/iPhone/SEiPhonePath.cpp index ae5477b..e8c0aef 100644 --- a/src/Tools/iPhone/SEiPhonePath.cpp +++ b/src/Tools/iPhone/SEiPhonePath.cpp @@ -1,80 +1,80 @@ -#include "SEiPhonePath.h" -#include "SETools.h" -//#include "windows.h" - -#include -using namespace boost::filesystem; - -void SEWindowsPath::CurrentDirectory(SEPathBase* outPath) -{ - outPath->Init( [[[NSBundle mainBundle] bundlePath] cStringUsingEncoding:NSWindowsCP1251StringEncoding] ); -} - -void SEWindowsPath::Init( const sechar* _cString) -{ - SEAssert(exists(_cString), "exist path check" ); - - SEPathBase::Init(_cString); - - //DWORD attributes = GetFileAttributes( _cString ); - //SEAssert(attributes != INVALID_FILE_ATTRIBUTES, "Getting file attribute check"); - - mIsFolder = is_directory(_cString); -} - -void SEWindowsPath::ChildArray(SEPathArray* pathArray) const -{ - SEAssert(mIsFolder, "is directory check" ); - SEAssert(mcString, "NULL check"); - - sechar pathBuffer[EPATH_MAX_LENGHT+2]; - memset(pathBuffer,0,sizeof(pathBuffer)); - - strcpy(pathBuffer, mcString); - - int len = strlen(pathBuffer); - if( pathBuffer[ len-2 ] != '*' && pathBuffer[ len-1 ] != PATH_DELIMETER ) - { - pathBuffer[ len ] = PATH_DELIMETER; - pathBuffer[ len+1 ] = '*'; - } - - directory_iterator end_itr; // default construction yields past-the-end - for ( directory_iterator itr( mcString ); itr != end_itr; ++itr ) - { - SEPathPtr pathPtr( new SEPath ); - pathPtr->Init( itr->path().native_file_string().c_str() ); - pathArray->push_back( pathPtr ); - } - - /*WIN32_FIND_DATA findData; - HANDLE searchHandle = FindFirstFile(pathBuffer, &findData); - SEAssert( searchHandle != INVALID_HANDLE_VALUE, "Open directory check" ); - - do - { - if( !streq( findData.cFileName, "." ) && !streq( findData.cFileName, ".." ) ) - { - //build full path - sechar currentPathBuffer[EPATH_MAX_LENGHT]; - memset(currentPathBuffer,0,sizeof(currentPathBuffer)); - strcpy(currentPathBuffer, mcString); - if( currentPathBuffer[ len-1 ]!= PATH_DELIMETER ) - currentPathBuffer[ len ] = PATH_DELIMETER; - - strcpy( currentPathBuffer + strlen(currentPathBuffer), findData.cFileName ); - - SEPathPtr pathPtr( new SEPath ); - pathPtr->Init( currentPathBuffer ); - pathArray->push_back( pathPtr ); - } - } - while(FindNextFile(searchHandle, &findData) != 0); - - FindClose(searchHandle);*/ -} - -bool SEWindowsPath::IsFolder() const -{ - return mIsFolder; +#include "SEiPhonePath.h" +#include "SETools.h" +//#include "windows.h" + +#include +using namespace boost::filesystem; + +void SEWindowsPath::CurrentDirectory(SEPathBase* outPath) +{ + outPath->Init( [[[NSBundle mainBundle] bundlePath] cStringUsingEncoding:NSWindowsCP1251StringEncoding] ); +} + +void SEWindowsPath::Init( const sechar* _cString) +{ + SEAssert(exists(_cString), "exist path check" ); + + SEPathBase::Init(_cString); + + //DWORD attributes = GetFileAttributes( _cString ); + //SEAssert(attributes != INVALID_FILE_ATTRIBUTES, "Getting file attribute check"); + + mIsFolder = is_directory(_cString); +} + +void SEWindowsPath::ChildArray(SEPathArray* pathArray) const +{ + SEAssert(mIsFolder, "is directory check" ); + SEAssert(mcString, "NULL check"); + + sechar pathBuffer[EPATH_MAX_LENGHT+2]; + memset(pathBuffer,0,sizeof(pathBuffer)); + + strcpy(pathBuffer, mcString); + + int len = strlen(pathBuffer); + if( pathBuffer[ len-2 ] != '*' && pathBuffer[ len-1 ] != PATH_DELIMETER ) + { + pathBuffer[ len ] = PATH_DELIMETER; + pathBuffer[ len+1 ] = '*'; + } + + directory_iterator end_itr; // default construction yields past-the-end + for ( directory_iterator itr( mcString ); itr != end_itr; ++itr ) + { + SEPathPtr pathPtr( new SEPath ); + pathPtr->Init( itr->path().native_file_string().c_str() ); + pathArray->push_back( pathPtr ); + } + + /*WIN32_FIND_DATA findData; + HANDLE searchHandle = FindFirstFile(pathBuffer, &findData); + SEAssert( searchHandle != INVALID_HANDLE_VALUE, "Open directory check" ); + + do + { + if( !streq( findData.cFileName, "." ) && !streq( findData.cFileName, ".." ) ) + { + //build full path + sechar currentPathBuffer[EPATH_MAX_LENGHT]; + memset(currentPathBuffer,0,sizeof(currentPathBuffer)); + strcpy(currentPathBuffer, mcString); + if( currentPathBuffer[ len-1 ]!= PATH_DELIMETER ) + currentPathBuffer[ len ] = PATH_DELIMETER; + + strcpy( currentPathBuffer + strlen(currentPathBuffer), findData.cFileName ); + + SEPathPtr pathPtr( new SEPath ); + pathPtr->Init( currentPathBuffer ); + pathArray->push_back( pathPtr ); + } + } + while(FindNextFile(searchHandle, &findData) != 0); + + FindClose(searchHandle);*/ +} + +bool SEWindowsPath::IsFolder() const +{ + return mIsFolder; } \ No newline at end of file diff --git a/src/Tools/iPhone/SEiPhonePath.h b/src/Tools/iPhone/SEiPhonePath.h index 5d57543..e289da8 100644 --- a/src/Tools/iPhone/SEiPhonePath.h +++ b/src/Tools/iPhone/SEiPhonePath.h @@ -1,17 +1,17 @@ - - -#include "SEPathBase.h" - -class SEWindowsPath: public SEPathBase -{ - bool mIsFolder; -public: - - static void CurrentDirectory(SEPathBase* outPath); - - virtual void Init( const sechar* _cString); - virtual void ChildArray(SEPathArray* pathArray) const; - virtual bool IsFolder() const; -}; - + + +#include "SEPathBase.h" + +class SEWindowsPath: public SEPathBase +{ + bool mIsFolder; +public: + + static void CurrentDirectory(SEPathBase* outPath); + + virtual void Init( const sechar* _cString); + virtual void ChildArray(SEPathArray* pathArray) const; + virtual bool IsFolder() const; +}; + typedef SEWindowsPath SEPath; \ No newline at end of file diff --git a/src/Tools/ifDynamicArray.cpp b/src/Tools/ifDynamicArray.cpp index cde8f29..e972996 100644 --- a/src/Tools/ifDynamicArray.cpp +++ b/src/Tools/ifDynamicArray.cpp @@ -1,11 +1,11 @@ -// -// ifDynamicArray.m -// iFighter -// -// Created by System Administrator on 5/7/09. -// Copyright 2009 __MyCompanyName__. All rights reserved. -// - -#import "ifDynamicArray.h" - - +// +// ifDynamicArray.m +// iFighter +// +// Created by System Administrator on 5/7/09. +// Copyright 2009 __MyCompanyName__. All rights reserved. +// + +#import "ifDynamicArray.h" + + diff --git a/src/Tools/ifDynamicArray.h b/src/Tools/ifDynamicArray.h index 212b9b8..2c341c8 100644 --- a/src/Tools/ifDynamicArray.h +++ b/src/Tools/ifDynamicArray.h @@ -1,129 +1,129 @@ -// -// ifDynamicArray.h -// iFighter -// -// Created by System Administrator on 5/7/09. -// Copyright 2009 __MyCompanyName__. All rights reserved. -// - -//#import -//#import "Box2D.h" -#import "b2BlockAllocator.h" - -//аналог класса vector -template< typename T , int SA=10, int NA=10 > -class ifDynamicArray -{ - const static size_t startAlloc = sizeof(T)*SA; - const static size_t nextAlloc = sizeof(T)*NA; - - size_t m_elementCount; - size_t m_arraySize; - T* m_array; - b2BlockAllocator* m_allocator; - -public: - - ifDynamicArray() - { - } - - ifDynamicArray( b2BlockAllocator* _allocator ) - { - Init(_allocator); - } - - ~ifDynamicArray() - { - m_allocator->Free(m_array, m_arraySize); - } - - void Init(b2BlockAllocator* _allocator) - { - m_allocator = _allocator; - m_arraySize = startAlloc; - //printf("alloc size = %d",startAlloc); - - m_elementCount = 0; - - if( _allocator ) - m_array = (T*) m_allocator->Allocate(m_arraySize); - } - - void Realloc( size_t newSize ) - { - b2Assert( m_allocator ); - - T* buffer = (T*) m_allocator->Allocate(newSize); - memset(buffer, 0, newSize); - memcpy(buffer, m_array, m_arraySize ); - - m_allocator->Free(m_array, m_arraySize); - m_array = buffer; - - m_arraySize = newSize; - - printf("realloc = %d\r\n",newSize); - } - - void Add(T obj) - { - if( m_elementCount == m_arraySize/sizeof(T)) - Realloc(m_arraySize + nextAlloc); - - m_array[m_elementCount] = obj; - ++m_elementCount; - } - - void Remove(T obj) - { - int i=0; - for( ; i= m_elementCount ) - return; - - for( int g = i; g +//#import "Box2D.h" +#import "b2BlockAllocator.h" + +//аналог класса vector +template< typename T , int SA=10, int NA=10 > +class ifDynamicArray +{ + const static size_t startAlloc = sizeof(T)*SA; + const static size_t nextAlloc = sizeof(T)*NA; + + size_t m_elementCount; + size_t m_arraySize; + T* m_array; + b2BlockAllocator* m_allocator; + +public: + + ifDynamicArray() + { + } + + ifDynamicArray( b2BlockAllocator* _allocator ) + { + Init(_allocator); + } + + ~ifDynamicArray() + { + m_allocator->Free(m_array, m_arraySize); + } + + void Init(b2BlockAllocator* _allocator) + { + m_allocator = _allocator; + m_arraySize = startAlloc; + //printf("alloc size = %d",startAlloc); + + m_elementCount = 0; + + if( _allocator ) + m_array = (T*) m_allocator->Allocate(m_arraySize); + } + + void Realloc( size_t newSize ) + { + b2Assert( m_allocator ); + + T* buffer = (T*) m_allocator->Allocate(newSize); + memset(buffer, 0, newSize); + memcpy(buffer, m_array, m_arraySize ); + + m_allocator->Free(m_array, m_arraySize); + m_array = buffer; + + m_arraySize = newSize; + + printf("realloc = %d\r\n",newSize); + } + + void Add(T obj) + { + if( m_elementCount == m_arraySize/sizeof(T)) + Realloc(m_arraySize + nextAlloc); + + m_array[m_elementCount] = obj; + ++m_elementCount; + } + + void Remove(T obj) + { + int i=0; + for( ; i= m_elementCount ) + return; + + for( int g = i; g - : - : "r0", - ); -*/ - -// NOTE: Lots of VFP macros overwrite register r0, therefore you have to make sure -// to include "r0" in the list of registers used, as in above example. - -#ifndef NO_THUMB -#warning "Compiling in Thumb Mode. Mode switches activated." -#else -#warning "Compiling in ARM mode. Mode switches deactivated." -#endif - -// Switches to from THUMB to ARM mode. -#ifndef NO_THUMB - #define VFP_SWITCH_TO_ARM ".align 4 \n\t" \ - "mov r0, pc \n\t" \ - "bx r0 \n\t" \ - ".arm \n\t" -#else - #define VFP_SWITCH_TO_ARM -#endif - -// Switches from ARM to THUMB mode. -#ifndef NO_THUMB - #define VFP_SWITCH_TO_THUMB "add r0, pc, #1 \n\t" \ - "bx r0 \n\t" \ - ".thumb \n\t" -#else - #define VFP_SWITCH_TO_THUMB -#endif - -// NOTE: Both VFP_VECTOR_LENGTH* macros will stall the FP unit, -// until all currently processed operations have been executed. -// Call wisely. -// FP operations (except load/stores) will interpret a command like -// fadds s8, s16, s24 -// AS -// fadds {s8-s11}, {s16-s19}, {s24-s27} in case length is set to zero. - - -// Sets length and stride to 0. -#define VFP_VECTOR_LENGTH_ZERO "fmrx r0, fpscr \n\t" \ - "bic r0, r0, #0x00370000 \n\t" \ - "fmxr fpscr, r0 \n\t" - -// Set vector length. VEC_LENGTH has to be bitween 0 for length 1 and 3 for length 4. -#define VFP_VECTOR_LENGTH(VEC_LENGTH) "fmrx r0, fpscr \n\t" \ - "bic r0, r0, #0x00370000 \n\t" \ - "orr r0, r0, #0x000" #VEC_LENGTH "0000 \n\t" \ - "fmxr fpscr, r0 \n\t" - -// Fixed vector operation for vectors of length 1, i.e. scalars. -// Expects pointers to source and destination data. -// Use VFP_OP_* macros for VFP_OP or any FP assembler opcode that fits. -#define VFP_FIXED_1_VECTOR_OP(VFP_OP, P_SRC_1, P_SRC_2, P_DST) \ - asm volatile (VFP_SWITCH_TO_ARM \ - "fldmias %1, s8 \n\t" \ - "fldmias %2, s16 \n\t" \ - VFP_OP " s8, s8, s16 \n\t" \ - "fstmias %0, s8 \n\t" \ - VFP_SWITCH_TO_THUMB \ - : \ - : "r" (P_DST), "r" (P_SRC_1), "r" (P_SRC_2) \ - : "r0" \ - ); - -// Fixed vector operation for vectors of length 2, i.e. scalars. -// Expects pointers to source and destination data. -// Use VFP_OP_* macros for VFP_OP or any FP assembler opcode that fits. -#define VFP_FIXED_2_VECTOR_OP(VFP_OP, P_SRC_1, P_SRC_2, P_DST) \ - asm volatile (VFP_SWITCH_TO_ARM \ - "fldmias %1, {s8-s9} \n\t" \ - "fldmias %2, {s16-s17} \n\t" \ - VFP_OP " s8, s8, s16 \n\t" \ - VFP_OP " s9, s9, s17 \n\t" \ - "fstmias %0, {s8-s9} \n\t" \ - VFP_SWITCH_TO_THUMB \ - : \ - : "r" (P_DST), "r" (P_SRC_1), "r" (P_SRC_2) \ - : "r0" \ - ); - -// Fixed vector operation for vectors of length 3, i.e. scalars. -// Expects pointers to source and destination data. -// Use VFP_OP_* macros for VFP_OP or any FP assembler opcode that fits. -#define VFP_FIXED_3_VECTOR_OP(VFP_OP, P_SRC_1, P_SRC_2, P_DST) \ - asm volatile (VFP_SWITCH_TO_ARM \ - "fldmias %1, {s8-s10} \n\t" \ - "fldmias %2, {s16-s18} \n\t" \ - VFP_OP " s8, s8, s16 \n\t" \ - VFP_OP " s9, s9, s17 \n\t" \ - VFP_OP " s10, s10, s18 \n\t" \ - "fstmias %0, {s8-s10} \n\t" \ - VFP_SWITCH_TO_THUMB \ - : \ - : "r" (P_DST), "r" (P_SRC_1), "r" (P_SRC_2) \ - : "r0" \ - ); - -// Fixed vector operation for vectors of length 4, i.e. scalars. -// Expects pointers to source and destination data. -// Use VFP_OP_* macros for VFP_OP or any FP assembler opcode that fits. -#define VFP_FIXED_4_VECTOR_OP(VFP_OP, P_SRC_1, P_SRC_2, P_DST) \ - asm volatile (VFP_SWITCH_TO_ARM \ - "fldmias %1, {s8-s11} \n\t" \ - "fldmias %2, {s16-s19} \n\t" \ - VFP_OP " s8, s8, s16 \n\t" \ - VFP_OP " s9, s9, s17 \n\t" \ - VFP_OP " s10, s10, s18 \n\t" \ - VFP_OP " s11, s11, s19 \n\t" \ - "fstmias %0, {s8-s11} \n\t" \ - VFP_SWITCH_TO_THUMB \ - : \ - : "r" (P_DST), "r" (P_SRC_1), "r" (P_SRC_2) \ - : "r0" \ - ); - -// NOTE: Usage example for VFP_FIXED_?_VECTOR_OP -// float* src_ptr_1; -// float* src_ptr_2; -// float* dst_ptr; -// VFP_FIXED_4_VECTOR_OP(VFP_OP_ADD, src_ptr_1, src_ptr_2, dst_ptr) - -#define VFP_OP_ADD "fadds" -#define VFP_OP_SUB "fsubs" -#define VFP_OP_MUL "fmuls" -#define VFP_OP_DIV "fdivs" -#define VFP_OP_ABS "fabss" -#define VFP_OP_SQRT "fsqrts" - -#endif // COMMON_MACROS_H__ +/* +VFP math library for the iPhone / iPod touch + +Copyright (c) 2007-2008 Wolfgang Engel and Matthias Grundmann +http://code.google.com/p/vfpmathlibrary/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising +from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must +not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef COMMON_MACROS_H__ +#define COMMON_MACROS_H__ + +// Usage for any VFP routine is: + +/* + asm volatile (VFP_SWITCH_TO_ARM + + <-- your code goes here + + VFP_SWITCH_TO_THUMB + : + : + : "r0", + ); +*/ + +// NOTE: Lots of VFP macros overwrite register r0, therefore you have to make sure +// to include "r0" in the list of registers used, as in above example. + +#ifndef NO_THUMB +#warning "Compiling in Thumb Mode. Mode switches activated." +#else +#warning "Compiling in ARM mode. Mode switches deactivated." +#endif + +// Switches to from THUMB to ARM mode. +#ifndef NO_THUMB + #define VFP_SWITCH_TO_ARM ".align 4 \n\t" \ + "mov r0, pc \n\t" \ + "bx r0 \n\t" \ + ".arm \n\t" +#else + #define VFP_SWITCH_TO_ARM +#endif + +// Switches from ARM to THUMB mode. +#ifndef NO_THUMB + #define VFP_SWITCH_TO_THUMB "add r0, pc, #1 \n\t" \ + "bx r0 \n\t" \ + ".thumb \n\t" +#else + #define VFP_SWITCH_TO_THUMB +#endif + +// NOTE: Both VFP_VECTOR_LENGTH* macros will stall the FP unit, +// until all currently processed operations have been executed. +// Call wisely. +// FP operations (except load/stores) will interpret a command like +// fadds s8, s16, s24 +// AS +// fadds {s8-s11}, {s16-s19}, {s24-s27} in case length is set to zero. + + +// Sets length and stride to 0. +#define VFP_VECTOR_LENGTH_ZERO "fmrx r0, fpscr \n\t" \ + "bic r0, r0, #0x00370000 \n\t" \ + "fmxr fpscr, r0 \n\t" + +// Set vector length. VEC_LENGTH has to be bitween 0 for length 1 and 3 for length 4. +#define VFP_VECTOR_LENGTH(VEC_LENGTH) "fmrx r0, fpscr \n\t" \ + "bic r0, r0, #0x00370000 \n\t" \ + "orr r0, r0, #0x000" #VEC_LENGTH "0000 \n\t" \ + "fmxr fpscr, r0 \n\t" + +// Fixed vector operation for vectors of length 1, i.e. scalars. +// Expects pointers to source and destination data. +// Use VFP_OP_* macros for VFP_OP or any FP assembler opcode that fits. +#define VFP_FIXED_1_VECTOR_OP(VFP_OP, P_SRC_1, P_SRC_2, P_DST) \ + asm volatile (VFP_SWITCH_TO_ARM \ + "fldmias %1, s8 \n\t" \ + "fldmias %2, s16 \n\t" \ + VFP_OP " s8, s8, s16 \n\t" \ + "fstmias %0, s8 \n\t" \ + VFP_SWITCH_TO_THUMB \ + : \ + : "r" (P_DST), "r" (P_SRC_1), "r" (P_SRC_2) \ + : "r0" \ + ); + +// Fixed vector operation for vectors of length 2, i.e. scalars. +// Expects pointers to source and destination data. +// Use VFP_OP_* macros for VFP_OP or any FP assembler opcode that fits. +#define VFP_FIXED_2_VECTOR_OP(VFP_OP, P_SRC_1, P_SRC_2, P_DST) \ + asm volatile (VFP_SWITCH_TO_ARM \ + "fldmias %1, {s8-s9} \n\t" \ + "fldmias %2, {s16-s17} \n\t" \ + VFP_OP " s8, s8, s16 \n\t" \ + VFP_OP " s9, s9, s17 \n\t" \ + "fstmias %0, {s8-s9} \n\t" \ + VFP_SWITCH_TO_THUMB \ + : \ + : "r" (P_DST), "r" (P_SRC_1), "r" (P_SRC_2) \ + : "r0" \ + ); + +// Fixed vector operation for vectors of length 3, i.e. scalars. +// Expects pointers to source and destination data. +// Use VFP_OP_* macros for VFP_OP or any FP assembler opcode that fits. +#define VFP_FIXED_3_VECTOR_OP(VFP_OP, P_SRC_1, P_SRC_2, P_DST) \ + asm volatile (VFP_SWITCH_TO_ARM \ + "fldmias %1, {s8-s10} \n\t" \ + "fldmias %2, {s16-s18} \n\t" \ + VFP_OP " s8, s8, s16 \n\t" \ + VFP_OP " s9, s9, s17 \n\t" \ + VFP_OP " s10, s10, s18 \n\t" \ + "fstmias %0, {s8-s10} \n\t" \ + VFP_SWITCH_TO_THUMB \ + : \ + : "r" (P_DST), "r" (P_SRC_1), "r" (P_SRC_2) \ + : "r0" \ + ); + +// Fixed vector operation for vectors of length 4, i.e. scalars. +// Expects pointers to source and destination data. +// Use VFP_OP_* macros for VFP_OP or any FP assembler opcode that fits. +#define VFP_FIXED_4_VECTOR_OP(VFP_OP, P_SRC_1, P_SRC_2, P_DST) \ + asm volatile (VFP_SWITCH_TO_ARM \ + "fldmias %1, {s8-s11} \n\t" \ + "fldmias %2, {s16-s19} \n\t" \ + VFP_OP " s8, s8, s16 \n\t" \ + VFP_OP " s9, s9, s17 \n\t" \ + VFP_OP " s10, s10, s18 \n\t" \ + VFP_OP " s11, s11, s19 \n\t" \ + "fstmias %0, {s8-s11} \n\t" \ + VFP_SWITCH_TO_THUMB \ + : \ + : "r" (P_DST), "r" (P_SRC_1), "r" (P_SRC_2) \ + : "r0" \ + ); + +// NOTE: Usage example for VFP_FIXED_?_VECTOR_OP +// float* src_ptr_1; +// float* src_ptr_2; +// float* dst_ptr; +// VFP_FIXED_4_VECTOR_OP(VFP_OP_ADD, src_ptr_1, src_ptr_2, dst_ptr) + +#define VFP_OP_ADD "fadds" +#define VFP_OP_SUB "fsubs" +#define VFP_OP_MUL "fmuls" +#define VFP_OP_DIV "fdivs" +#define VFP_OP_ABS "fabss" +#define VFP_OP_SQRT "fsqrts" + +#endif // COMMON_MACROS_H__ diff --git a/vfpmathlibrary/matrix_impl.cpp b/vfpmathlibrary/matrix_impl.cpp index c47d417..dcba499 100644 --- a/vfpmathlibrary/matrix_impl.cpp +++ b/vfpmathlibrary/matrix_impl.cpp @@ -1,474 +1,474 @@ -/* -VFP math library for the iPhone / iPod touch - -Copyright (c) 2007-2008 Wolfgang Engel and Matthias Grundmann -http://code.google.com/p/vfpmathlibrary/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising -from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must -not claim that you wrote the original software. If you use this -software in a product, an acknowledgment in the product documentation -would be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must -not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifdef __APPLE__ -#include -#if (TARGET_IPHONE_SIMULATOR == 0) && (TARGET_OS_IPHONE == 1) - -#include "matrix_impl.h" -#include "common_macros.h" -#include "vfp_clobbers.h" - -void Matrix4Mul(const float* src_mat_1, const float* src_mat_2, float* dst_mat) { - asm volatile (VFP_SWITCH_TO_ARM - VFP_VECTOR_LENGTH(3) - - // Interleaving loads and adds/muls for faster calculation. - // Let A:=src_ptr_1, B:=src_ptr_2, then - // function computes A*B as (B^T * A^T)^T. - - // Load the whole matrix into memory. - "fldmias %2, {s8-s23} \n\t" - // Load first column to scalar bank. - "fldmias %1!, {s0-s3} \n\t" - // First column times matrix. - "fmuls s24, s8, s0 \n\t" - "fmacs s24, s12, s1 \n\t" - - // Load second column to scalar bank. - "fldmias %1!, {s4-s7} \n\t" - - "fmacs s24, s16, s2 \n\t" - "fmacs s24, s20, s3 \n\t" - // Save first column. - "fstmias %0!, {s24-s27} \n\t" - - // Second column times matrix. - "fmuls s28, s8, s4 \n\t" - "fmacs s28, s12, s5 \n\t" - - // Load third column to scalar bank. - "fldmias %1!, {s0-s3} \n\t" - - "fmacs s28, s16, s6 \n\t" - "fmacs s28, s20, s7 \n\t" - // Save second column. - "fstmias %0!, {s28-s31} \n\t" - - // Third column times matrix. - "fmuls s24, s8, s0 \n\t" - "fmacs s24, s12, s1 \n\t" - - // Load fourth column to scalar bank. - "fldmias %1, {s4-s7} \n\t" - - "fmacs s24, s16, s2 \n\t" - "fmacs s24, s20, s3 \n\t" - // Save third column. - "fstmias %0!, {s24-s27} \n\t" - - // Fourth column times matrix. - "fmuls s28, s8, s4 \n\t" - "fmacs s28, s12, s5 \n\t" - "fmacs s28, s16, s6 \n\t" - "fmacs s28, s20, s7 \n\t" - // Save fourth column. - "fstmias %0!, {s28-s31} \n\t" - - VFP_VECTOR_LENGTH_ZERO - VFP_SWITCH_TO_THUMB - : "=r" (dst_mat), "=r" (src_mat_2) - : "r" (src_mat_1), "0" (dst_mat), "1" (src_mat_2) - : "r0", "cc", "memory", VFP_CLOBBER_S0_S31 - ); -} - -// Load the matrix transposed into memory. -// Uses registers 24 - 31 as scratch. -// Increments sources address in register %0. -#define VFP_LOAD_MATRIX0_T_TO_S8_S23 "fldmias %0!, {s8-s11} \n\t" \ - "fcpys s12, s9 \n\t" \ - "fcpys s16, s10 \n\t" \ - "fldmias %0!, {s24-s27} \n\t" \ - "fcpys s20, s11 \n\t" \ - "fcpys s9, s24 \n\t" \ - "fcpys s13, s25 \n\t" \ - "fldmias %0!, {s28-s31} \n\t" \ - "fcpys s17, s26 \n\t" \ - "fcpys s21, s27 \n\t" \ - \ - "fcpys s10, s28 \n\t" \ - "fcpys s14, s29 \n\t" \ - "fldmias %0!, {s24-s27} \n\t" \ - "fcpys s18, s30 \n\t" \ - "fcpys s22, s31 \n\t" \ - \ - "fcpys s11, s24 \n\t" \ - "fcpys s15, s25 \n\t" \ - \ - "fcpys s19, s26 \n\t" \ - "fcpys s23, s27 \n\t" - -// s0 s1 s2 s3 -// s4 s5 s6 s7 -// s8 s9 s10 s11 -// s12 s13 s14 s15 - -// Load the matrix transposed into memory. -// Uses registers 24 - 31 as scratch. -// Increments sources address in register %0. -#define VFP_LOAD_MATRIX0_T_TO_S0_S15 "fldmias %0!, {s0-s3} \n\t" \ - "fcpys s4, s1 \n\t" \ - "fcpys s8, s2 \n\t" \ - "fldmias %0!, {s24-s27} \n\t" \ - "fcpys s12, s3 \n\t" \ - \ - "fcpys s1, s24 \n\t" \ - "fcpys s5, s25 \n\t" \ - "fldmias %0!, {s28-s31} \n\t" \ - "fcpys s9, s26 \n\t" \ - "fcpys s13, s27 \n\t" \ - \ - "fcpys s2, s28 \n\t" \ - "fcpys s6, s29 \n\t" \ - "fldmias %0!, {s24-s27} \n\t" \ - "fcpys s10, s30 \n\t" \ - "fcpys s14, s31 \n\t" \ - \ - "fcpys s3, s24 \n\t" \ - "fcpys s7, s25 \n\t" \ - "fcpys s11, s26 \n\t" \ - "fcpys s15, s27 \n\t" - -void Matrix4Vector4Mul(const float* src_mat, const float* src_vec, float* dst_vec) { - asm volatile (VFP_SWITCH_TO_ARM - - // Load the whole matrix. - "fldmias %0, {s8-s23} \n\t" - // Load vector to scalar bank. - "fldmias %1, {s0-s3} \n\t" - - VFP_VECTOR_LENGTH(3) - - // First column times matrix. - "fmuls s24, s8, s0 \n\t" - "fmacs s24, s12, s1 \n\t" - "fmacs s24, s16, s2 \n\t" - "fmacs s24, s20, s3 \n\t" - - // Save vector. - "fstmias %2, {s24-s27} \n\t" - - VFP_VECTOR_LENGTH_ZERO - VFP_SWITCH_TO_THUMB - : - : "r" (src_mat), "r" (src_vec), "r" (dst_vec) - : "r0", "cc", "memory", VFP_CLOBBER_S0_S3, VFP_CLOBBER_S8_S27 - ); -} - -void Matrix4Vector3Mul(const float* src_mat, const float* src_vec, float* dst_vec) { - asm volatile (VFP_SWITCH_TO_ARM - // Load the whole matrix. - "fldmias %0, {s8-s23} \n\t" - - // Load vector to scalar bank. - "fldmias %1, {s0-s2} \n\t" - - VFP_VECTOR_LENGTH(3) - - // First column times matrix. - "fmuls s24, s8, s0 \n\t" - "fmacs s24, s12, s1 \n\t" - "fmacs s24, s16, s2 \n\t" - "fadds s24, s24, s20 \n\t" - - // Save vector. - "fstmias %2, {s24-s27} \n\t" - - VFP_VECTOR_LENGTH_ZERO - VFP_SWITCH_TO_THUMB - : - : "r" (src_mat), "r" (src_vec), "r" (dst_vec) - : "r0", "cc", "memory", VFP_CLOBBER_S0_S2, VFP_CLOBBER_S8_S27 - ); -} - -void Matrix4Vector3Mul(const float* src_mat, const float* src_vec, float w, float* dst_vec) { - asm volatile (VFP_SWITCH_TO_ARM - - // Load the whole matrix. - "fldmias %0, {s8-s23} \n\t" - - // Load vector to scalar bank. - "fldmias %1, {s0-s2} \n\t" - - // Load w. - "fmsr s3, %3 \n\t" - - VFP_VECTOR_LENGTH(3) - - // First column times matrix. - "fmuls s24, s8, s0 \n\t" - "fmacs s24, s12, s1 \n\t" - "fmacs s24, s16, s2 \n\t" - "fmacs s24, s20, s3 \n\t" - - // Save vector. - "fstmias %2, {s24-s27} \n\t" - - VFP_VECTOR_LENGTH_ZERO - VFP_SWITCH_TO_THUMB - : - : "r" (src_mat), "r" (src_vec), "r" (dst_vec), "r" (w) - : "r0", "cc", "memory", VFP_CLOBBER_S0_S3, VFP_CLOBBER_S8_S27 - ); -} - -void Matrix4Vector3ArrayMul(int num, const float* src_mat, int src_stride, - const float* src_vec_array, int dst_stride, - float* dst_vec_array) { - asm volatile (VFP_SWITCH_TO_ARM - // Load the whole matrix. - "fldmias %2, {s8-s23} \n\t" - - VFP_VECTOR_LENGTH(3) - "L2000: \n\t" - // Load vector to scalar bank. - "fldmias %0, {s0-s2} \n\t" - "adds %0, %0, %3 \n\t" - - // First column times matrix. - "fmuls s24, s8, s0 \n\t" - "fmacs s24, s12, s1 \n\t" - "fmacs s24, s16, s2 \n\t" - "fadds s24, s24, s20 \n\t" - - // Save vector. - "fstmias %1, {s24-s27} \n\t" - "adds %1, %1, %4 \n\t" - - "subs %5, %5, #1 \n\t" - "bne L2000 \n\t" - - VFP_VECTOR_LENGTH_ZERO - VFP_SWITCH_TO_THUMB - : "=r" (src_vec_array), "=r" (dst_vec_array) - : "r" (src_mat), "r" (src_stride), "r" (dst_stride), "r" (num), - "0" (src_vec_array), "1" (dst_vec_array) - : "r0", "cc", "memory", VFP_CLOBBER_S0_S2, VFP_CLOBBER_S8_S27 - ); -} - -void Matrix4Vector3ArrayMul(int num, const float* src_mat, float w, int src_stride, - const float* src_vec_array, int dst_stride, - float* dst_vec_array) { - asm volatile (VFP_SWITCH_TO_ARM - // Load the whole matrix. - "fldmias %2, {s8-s23} \n\t" - - "fmsr s3, %6 \n\t" - - VFP_VECTOR_LENGTH(3) - "L2010: \n\t" - // Load vector to scalar bank. - "fldmias %0, {s0-s2} \n\t" - "adds %0, %0, %3 \n\t" - - // First column times matrix. - "fmuls s24, s8, s0 \n\t" - "fmacs s24, s12, s1 \n\t" - "fmacs s24, s16, s2 \n\t" - "fmacs s24, s20, s3 \n\t" - - // Save vector. - "fstmias %1, {s24-s27} \n\t" - "adds %1, %1, %4 \n\t" - - "subs %5, %5, #1 \n\t" - "bne L2010 \n\t" - - VFP_VECTOR_LENGTH_ZERO - VFP_SWITCH_TO_THUMB - : "=r" (src_vec_array), "=r" (dst_vec_array) - : "r" (src_mat), "r" (src_stride), "r" (dst_stride), "r" (num), "r" (w), - "0" (src_vec_array), "1" (dst_vec_array) - : "r0", "cc", "memory", VFP_CLOBBER_S0_S3, VFP_CLOBBER_S8_S27 - ); - -} - -// Computes the inverse of a 4x4 matrix by using the Laplace Extension Theorem -// in 94 multiplications and 1 division. -// Comments in the code refer to David Eberly's definitions -// http://www.geometrictools.com/Documentation/LaplaceExpansionTheorem.pdf -// page 9 (retrieved Feb. 20, 2009). - -void Matrix4Invert(const float* src_mat, float* dst_mat) { - - const float one = 1.0; - - asm volatile (VFP_SWITCH_TO_ARM - // Load the whole matrix transposed. - // Transposing is necessary to be able to execute inversion - // with only 32 fpregs. - VFP_LOAD_MATRIX0_T_TO_S0_S15 - - // Destination matrix will be {s8 - s23}. - - // Mapping of matrix elements is - // s0 s1 s2 s3 a00 a01 a02 a03 - // s4 s5 s6 s7 <= a10 a11 a12 a13 - // s8 s9 s10 s11 a20 a21 a22 a23 - // s12 s13 s14 s15 a30 a31 a32 a33 - - // Compute s_0 to s_5 (in s25 - s30). - "fmuls s25, s0, s5 \n\t" - "fnmacs s25, s4, s1 \n\t" - - "fmuls s26, s0, s6 \n\t" - "fnmacs s26, s4, s2 \n\t" - - "fmuls s27, s0, s7 \n\t" - "fnmacs s27, s4, s3 \n\t" - - "fmuls s28, s1, s6 \n\t" - "fnmacs s28, s5, s2 \n\t" - - "fmuls s29, s1, s7 \n\t" - "fnmacs s29, s5, s3 \n\t" - - "fmuls s30, s2, s7 \n\t" - "fnmacs s30, s6, s3 \n\t" - - // Process last two columns -> s16-s23. - // Last column. - "fnmuls s20, s9, s30 \n\t" - "fmacs s20, s10, s29 \n\t" - "fnmacs s20, s11, s28 \n\t" - - "fmuls s21, s8, s30 \n\t" - "fnmacs s21, s10, s27 \n\t" - "fmacs s21, s11, s26 \n\t" - - "fnmuls s22, s8, s29 \n\t" - "fmacs s22, s9, s27 \n\t" - "fnmacs s22, s11, s25 \n\t" - - "fmuls s23, s8, s28 \n\t" - "fnmacs s23, s9, s26 \n\t" - "fmacs s23, s10, s25 \n\t" - - // Third column. - "fmuls s16, s13, s30 \n\t" - "fnmacs s16, s14, s29 \n\t" - "fmacs s16, s15, s28 \n\t" - - "fnmuls s17, s12, s30 \n\t" - "fmacs s17, s14, s27 \n\t" - "fnmacs s17, s15, s26 \n\t" - - "fmuls s18, s12, s29 \n\t" - "fnmacs s18, s13, s27 \n\t" - "fmacs s18, s15, s25 \n\t" - - "fnmuls s19, s12, s28 \n\t" - "fmacs s19, s13, s26 \n\t" - "fnmacs s19, s14, s25 \n\t" - - // Compute c_5 to c_0 (in s24 - s29). - // Determinant will be in s31. - "fmuls s24, s10, s15 \n\t" - "fnmacs s24, s14, s11 \n\t" - "fmuls s31, s24, s25 \n\t" - - "fmuls s25, s9, s15 \n\t" - "fnmacs s25, s13, s11 \n\t" - "fnmacs s31, s25, s26 \n\t" - - "fmuls s26, s9, s14 \n\t" - "fnmacs s26, s13, s10 \n\t" - "fmacs s31, s26, s27 \n\t" - - "fmuls s27, s8, s15 \n\t" - "fnmacs s27, s12, s11 \n\t" - "fmacs s31, s27, s28 \n\t" - - "fmuls s28, s8, s14 \n\t" - "fnmacs s28, s12, s10 \n\t" - "fnmacs s31, s28, s29 \n\t" - - "fmuls s29, s8, s13 \n\t" - "fnmacs s29, s12, s9 \n\t" - "fmacs s31, s29, s30 \n\t" - - // Second column. - "fnmuls s12, s1, s24 \n\t" - "fmacs s12, s2, s25 \n\t" - "fnmacs s12, s3, s26 \n\t" - - "fmuls s13, s0, s24 \n\t" - "fnmacs s13, s2, s27 \n\t" - "fmacs s13, s3, s28 \n\t" - - "fnmuls s14, s0, s25 \n\t" - "fmacs s14, s1, s27 \n\t" - "fnmacs s14, s3, s29 \n\t" - - "fmuls s15, s0, s26 \n\t" - "fnmacs s15, s1, s28 \n\t" - "fmacs s15, s2, s29 \n\t" - - // First column. - "fmuls s8, s5, s24 \n\t" - "fnmacs s8, s6, s25 \n\t" - "fmacs s8, s7, s26 \n\t" - - "fnmuls s9, s4, s24 \n\t" - "fmacs s9, s6, s27 \n\t" - "fnmacs s9, s7, s28 \n\t" - - "fmuls s10, s4, s25 \n\t" - "fnmacs s10, s5, s27 \n\t" - "fmacs s10, s7, s29 \n\t" - - "fnmuls s11, s4, s26 \n\t" - "fmacs s11, s5, s28 \n\t" - "fnmacs s11, s6, s29 \n\t" - - // Multiply with inverse of determinant. - "fmsr s1, %2 \n\t" - "fdivs s0, s1, s31 \n\t" - - VFP_VECTOR_LENGTH(7) - - // Remember: destination matrix is in {s8 - s23} - "fmuls s24, s8, s0 \n\t" - "fstmias %1!, {s24-s31} \n\t" - "fmuls s8, s16, s0 \n\t" - "fstmias %1, {s8-s15} \n\t" - - VFP_VECTOR_LENGTH(0) - - VFP_SWITCH_TO_THUMB - : "=r" (src_mat), "=r" (dst_mat) - : "r" (one), "0" (src_mat), "1" (dst_mat) - : "r0", "cc", "memory", VFP_CLOBBER_S0_S31 - ); - -} - - -#endif -#endif +/* +VFP math library for the iPhone / iPod touch + +Copyright (c) 2007-2008 Wolfgang Engel and Matthias Grundmann +http://code.google.com/p/vfpmathlibrary/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising +from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must +not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifdef __APPLE__ +#include +#if (TARGET_IPHONE_SIMULATOR == 0) && (TARGET_OS_IPHONE == 1) + +#include "matrix_impl.h" +#include "common_macros.h" +#include "vfp_clobbers.h" + +void Matrix4Mul(const float* src_mat_1, const float* src_mat_2, float* dst_mat) { + asm volatile (VFP_SWITCH_TO_ARM + VFP_VECTOR_LENGTH(3) + + // Interleaving loads and adds/muls for faster calculation. + // Let A:=src_ptr_1, B:=src_ptr_2, then + // function computes A*B as (B^T * A^T)^T. + + // Load the whole matrix into memory. + "fldmias %2, {s8-s23} \n\t" + // Load first column to scalar bank. + "fldmias %1!, {s0-s3} \n\t" + // First column times matrix. + "fmuls s24, s8, s0 \n\t" + "fmacs s24, s12, s1 \n\t" + + // Load second column to scalar bank. + "fldmias %1!, {s4-s7} \n\t" + + "fmacs s24, s16, s2 \n\t" + "fmacs s24, s20, s3 \n\t" + // Save first column. + "fstmias %0!, {s24-s27} \n\t" + + // Second column times matrix. + "fmuls s28, s8, s4 \n\t" + "fmacs s28, s12, s5 \n\t" + + // Load third column to scalar bank. + "fldmias %1!, {s0-s3} \n\t" + + "fmacs s28, s16, s6 \n\t" + "fmacs s28, s20, s7 \n\t" + // Save second column. + "fstmias %0!, {s28-s31} \n\t" + + // Third column times matrix. + "fmuls s24, s8, s0 \n\t" + "fmacs s24, s12, s1 \n\t" + + // Load fourth column to scalar bank. + "fldmias %1, {s4-s7} \n\t" + + "fmacs s24, s16, s2 \n\t" + "fmacs s24, s20, s3 \n\t" + // Save third column. + "fstmias %0!, {s24-s27} \n\t" + + // Fourth column times matrix. + "fmuls s28, s8, s4 \n\t" + "fmacs s28, s12, s5 \n\t" + "fmacs s28, s16, s6 \n\t" + "fmacs s28, s20, s7 \n\t" + // Save fourth column. + "fstmias %0!, {s28-s31} \n\t" + + VFP_VECTOR_LENGTH_ZERO + VFP_SWITCH_TO_THUMB + : "=r" (dst_mat), "=r" (src_mat_2) + : "r" (src_mat_1), "0" (dst_mat), "1" (src_mat_2) + : "r0", "cc", "memory", VFP_CLOBBER_S0_S31 + ); +} + +// Load the matrix transposed into memory. +// Uses registers 24 - 31 as scratch. +// Increments sources address in register %0. +#define VFP_LOAD_MATRIX0_T_TO_S8_S23 "fldmias %0!, {s8-s11} \n\t" \ + "fcpys s12, s9 \n\t" \ + "fcpys s16, s10 \n\t" \ + "fldmias %0!, {s24-s27} \n\t" \ + "fcpys s20, s11 \n\t" \ + "fcpys s9, s24 \n\t" \ + "fcpys s13, s25 \n\t" \ + "fldmias %0!, {s28-s31} \n\t" \ + "fcpys s17, s26 \n\t" \ + "fcpys s21, s27 \n\t" \ + \ + "fcpys s10, s28 \n\t" \ + "fcpys s14, s29 \n\t" \ + "fldmias %0!, {s24-s27} \n\t" \ + "fcpys s18, s30 \n\t" \ + "fcpys s22, s31 \n\t" \ + \ + "fcpys s11, s24 \n\t" \ + "fcpys s15, s25 \n\t" \ + \ + "fcpys s19, s26 \n\t" \ + "fcpys s23, s27 \n\t" + +// s0 s1 s2 s3 +// s4 s5 s6 s7 +// s8 s9 s10 s11 +// s12 s13 s14 s15 + +// Load the matrix transposed into memory. +// Uses registers 24 - 31 as scratch. +// Increments sources address in register %0. +#define VFP_LOAD_MATRIX0_T_TO_S0_S15 "fldmias %0!, {s0-s3} \n\t" \ + "fcpys s4, s1 \n\t" \ + "fcpys s8, s2 \n\t" \ + "fldmias %0!, {s24-s27} \n\t" \ + "fcpys s12, s3 \n\t" \ + \ + "fcpys s1, s24 \n\t" \ + "fcpys s5, s25 \n\t" \ + "fldmias %0!, {s28-s31} \n\t" \ + "fcpys s9, s26 \n\t" \ + "fcpys s13, s27 \n\t" \ + \ + "fcpys s2, s28 \n\t" \ + "fcpys s6, s29 \n\t" \ + "fldmias %0!, {s24-s27} \n\t" \ + "fcpys s10, s30 \n\t" \ + "fcpys s14, s31 \n\t" \ + \ + "fcpys s3, s24 \n\t" \ + "fcpys s7, s25 \n\t" \ + "fcpys s11, s26 \n\t" \ + "fcpys s15, s27 \n\t" + +void Matrix4Vector4Mul(const float* src_mat, const float* src_vec, float* dst_vec) { + asm volatile (VFP_SWITCH_TO_ARM + + // Load the whole matrix. + "fldmias %0, {s8-s23} \n\t" + // Load vector to scalar bank. + "fldmias %1, {s0-s3} \n\t" + + VFP_VECTOR_LENGTH(3) + + // First column times matrix. + "fmuls s24, s8, s0 \n\t" + "fmacs s24, s12, s1 \n\t" + "fmacs s24, s16, s2 \n\t" + "fmacs s24, s20, s3 \n\t" + + // Save vector. + "fstmias %2, {s24-s27} \n\t" + + VFP_VECTOR_LENGTH_ZERO + VFP_SWITCH_TO_THUMB + : + : "r" (src_mat), "r" (src_vec), "r" (dst_vec) + : "r0", "cc", "memory", VFP_CLOBBER_S0_S3, VFP_CLOBBER_S8_S27 + ); +} + +void Matrix4Vector3Mul(const float* src_mat, const float* src_vec, float* dst_vec) { + asm volatile (VFP_SWITCH_TO_ARM + // Load the whole matrix. + "fldmias %0, {s8-s23} \n\t" + + // Load vector to scalar bank. + "fldmias %1, {s0-s2} \n\t" + + VFP_VECTOR_LENGTH(3) + + // First column times matrix. + "fmuls s24, s8, s0 \n\t" + "fmacs s24, s12, s1 \n\t" + "fmacs s24, s16, s2 \n\t" + "fadds s24, s24, s20 \n\t" + + // Save vector. + "fstmias %2, {s24-s27} \n\t" + + VFP_VECTOR_LENGTH_ZERO + VFP_SWITCH_TO_THUMB + : + : "r" (src_mat), "r" (src_vec), "r" (dst_vec) + : "r0", "cc", "memory", VFP_CLOBBER_S0_S2, VFP_CLOBBER_S8_S27 + ); +} + +void Matrix4Vector3Mul(const float* src_mat, const float* src_vec, float w, float* dst_vec) { + asm volatile (VFP_SWITCH_TO_ARM + + // Load the whole matrix. + "fldmias %0, {s8-s23} \n\t" + + // Load vector to scalar bank. + "fldmias %1, {s0-s2} \n\t" + + // Load w. + "fmsr s3, %3 \n\t" + + VFP_VECTOR_LENGTH(3) + + // First column times matrix. + "fmuls s24, s8, s0 \n\t" + "fmacs s24, s12, s1 \n\t" + "fmacs s24, s16, s2 \n\t" + "fmacs s24, s20, s3 \n\t" + + // Save vector. + "fstmias %2, {s24-s27} \n\t" + + VFP_VECTOR_LENGTH_ZERO + VFP_SWITCH_TO_THUMB + : + : "r" (src_mat), "r" (src_vec), "r" (dst_vec), "r" (w) + : "r0", "cc", "memory", VFP_CLOBBER_S0_S3, VFP_CLOBBER_S8_S27 + ); +} + +void Matrix4Vector3ArrayMul(int num, const float* src_mat, int src_stride, + const float* src_vec_array, int dst_stride, + float* dst_vec_array) { + asm volatile (VFP_SWITCH_TO_ARM + // Load the whole matrix. + "fldmias %2, {s8-s23} \n\t" + + VFP_VECTOR_LENGTH(3) + "L2000: \n\t" + // Load vector to scalar bank. + "fldmias %0, {s0-s2} \n\t" + "adds %0, %0, %3 \n\t" + + // First column times matrix. + "fmuls s24, s8, s0 \n\t" + "fmacs s24, s12, s1 \n\t" + "fmacs s24, s16, s2 \n\t" + "fadds s24, s24, s20 \n\t" + + // Save vector. + "fstmias %1, {s24-s27} \n\t" + "adds %1, %1, %4 \n\t" + + "subs %5, %5, #1 \n\t" + "bne L2000 \n\t" + + VFP_VECTOR_LENGTH_ZERO + VFP_SWITCH_TO_THUMB + : "=r" (src_vec_array), "=r" (dst_vec_array) + : "r" (src_mat), "r" (src_stride), "r" (dst_stride), "r" (num), + "0" (src_vec_array), "1" (dst_vec_array) + : "r0", "cc", "memory", VFP_CLOBBER_S0_S2, VFP_CLOBBER_S8_S27 + ); +} + +void Matrix4Vector3ArrayMul(int num, const float* src_mat, float w, int src_stride, + const float* src_vec_array, int dst_stride, + float* dst_vec_array) { + asm volatile (VFP_SWITCH_TO_ARM + // Load the whole matrix. + "fldmias %2, {s8-s23} \n\t" + + "fmsr s3, %6 \n\t" + + VFP_VECTOR_LENGTH(3) + "L2010: \n\t" + // Load vector to scalar bank. + "fldmias %0, {s0-s2} \n\t" + "adds %0, %0, %3 \n\t" + + // First column times matrix. + "fmuls s24, s8, s0 \n\t" + "fmacs s24, s12, s1 \n\t" + "fmacs s24, s16, s2 \n\t" + "fmacs s24, s20, s3 \n\t" + + // Save vector. + "fstmias %1, {s24-s27} \n\t" + "adds %1, %1, %4 \n\t" + + "subs %5, %5, #1 \n\t" + "bne L2010 \n\t" + + VFP_VECTOR_LENGTH_ZERO + VFP_SWITCH_TO_THUMB + : "=r" (src_vec_array), "=r" (dst_vec_array) + : "r" (src_mat), "r" (src_stride), "r" (dst_stride), "r" (num), "r" (w), + "0" (src_vec_array), "1" (dst_vec_array) + : "r0", "cc", "memory", VFP_CLOBBER_S0_S3, VFP_CLOBBER_S8_S27 + ); + +} + +// Computes the inverse of a 4x4 matrix by using the Laplace Extension Theorem +// in 94 multiplications and 1 division. +// Comments in the code refer to David Eberly's definitions +// http://www.geometrictools.com/Documentation/LaplaceExpansionTheorem.pdf +// page 9 (retrieved Feb. 20, 2009). + +void Matrix4Invert(const float* src_mat, float* dst_mat) { + + const float one = 1.0; + + asm volatile (VFP_SWITCH_TO_ARM + // Load the whole matrix transposed. + // Transposing is necessary to be able to execute inversion + // with only 32 fpregs. + VFP_LOAD_MATRIX0_T_TO_S0_S15 + + // Destination matrix will be {s8 - s23}. + + // Mapping of matrix elements is + // s0 s1 s2 s3 a00 a01 a02 a03 + // s4 s5 s6 s7 <= a10 a11 a12 a13 + // s8 s9 s10 s11 a20 a21 a22 a23 + // s12 s13 s14 s15 a30 a31 a32 a33 + + // Compute s_0 to s_5 (in s25 - s30). + "fmuls s25, s0, s5 \n\t" + "fnmacs s25, s4, s1 \n\t" + + "fmuls s26, s0, s6 \n\t" + "fnmacs s26, s4, s2 \n\t" + + "fmuls s27, s0, s7 \n\t" + "fnmacs s27, s4, s3 \n\t" + + "fmuls s28, s1, s6 \n\t" + "fnmacs s28, s5, s2 \n\t" + + "fmuls s29, s1, s7 \n\t" + "fnmacs s29, s5, s3 \n\t" + + "fmuls s30, s2, s7 \n\t" + "fnmacs s30, s6, s3 \n\t" + + // Process last two columns -> s16-s23. + // Last column. + "fnmuls s20, s9, s30 \n\t" + "fmacs s20, s10, s29 \n\t" + "fnmacs s20, s11, s28 \n\t" + + "fmuls s21, s8, s30 \n\t" + "fnmacs s21, s10, s27 \n\t" + "fmacs s21, s11, s26 \n\t" + + "fnmuls s22, s8, s29 \n\t" + "fmacs s22, s9, s27 \n\t" + "fnmacs s22, s11, s25 \n\t" + + "fmuls s23, s8, s28 \n\t" + "fnmacs s23, s9, s26 \n\t" + "fmacs s23, s10, s25 \n\t" + + // Third column. + "fmuls s16, s13, s30 \n\t" + "fnmacs s16, s14, s29 \n\t" + "fmacs s16, s15, s28 \n\t" + + "fnmuls s17, s12, s30 \n\t" + "fmacs s17, s14, s27 \n\t" + "fnmacs s17, s15, s26 \n\t" + + "fmuls s18, s12, s29 \n\t" + "fnmacs s18, s13, s27 \n\t" + "fmacs s18, s15, s25 \n\t" + + "fnmuls s19, s12, s28 \n\t" + "fmacs s19, s13, s26 \n\t" + "fnmacs s19, s14, s25 \n\t" + + // Compute c_5 to c_0 (in s24 - s29). + // Determinant will be in s31. + "fmuls s24, s10, s15 \n\t" + "fnmacs s24, s14, s11 \n\t" + "fmuls s31, s24, s25 \n\t" + + "fmuls s25, s9, s15 \n\t" + "fnmacs s25, s13, s11 \n\t" + "fnmacs s31, s25, s26 \n\t" + + "fmuls s26, s9, s14 \n\t" + "fnmacs s26, s13, s10 \n\t" + "fmacs s31, s26, s27 \n\t" + + "fmuls s27, s8, s15 \n\t" + "fnmacs s27, s12, s11 \n\t" + "fmacs s31, s27, s28 \n\t" + + "fmuls s28, s8, s14 \n\t" + "fnmacs s28, s12, s10 \n\t" + "fnmacs s31, s28, s29 \n\t" + + "fmuls s29, s8, s13 \n\t" + "fnmacs s29, s12, s9 \n\t" + "fmacs s31, s29, s30 \n\t" + + // Second column. + "fnmuls s12, s1, s24 \n\t" + "fmacs s12, s2, s25 \n\t" + "fnmacs s12, s3, s26 \n\t" + + "fmuls s13, s0, s24 \n\t" + "fnmacs s13, s2, s27 \n\t" + "fmacs s13, s3, s28 \n\t" + + "fnmuls s14, s0, s25 \n\t" + "fmacs s14, s1, s27 \n\t" + "fnmacs s14, s3, s29 \n\t" + + "fmuls s15, s0, s26 \n\t" + "fnmacs s15, s1, s28 \n\t" + "fmacs s15, s2, s29 \n\t" + + // First column. + "fmuls s8, s5, s24 \n\t" + "fnmacs s8, s6, s25 \n\t" + "fmacs s8, s7, s26 \n\t" + + "fnmuls s9, s4, s24 \n\t" + "fmacs s9, s6, s27 \n\t" + "fnmacs s9, s7, s28 \n\t" + + "fmuls s10, s4, s25 \n\t" + "fnmacs s10, s5, s27 \n\t" + "fmacs s10, s7, s29 \n\t" + + "fnmuls s11, s4, s26 \n\t" + "fmacs s11, s5, s28 \n\t" + "fnmacs s11, s6, s29 \n\t" + + // Multiply with inverse of determinant. + "fmsr s1, %2 \n\t" + "fdivs s0, s1, s31 \n\t" + + VFP_VECTOR_LENGTH(7) + + // Remember: destination matrix is in {s8 - s23} + "fmuls s24, s8, s0 \n\t" + "fstmias %1!, {s24-s31} \n\t" + "fmuls s8, s16, s0 \n\t" + "fstmias %1, {s8-s15} \n\t" + + VFP_VECTOR_LENGTH(0) + + VFP_SWITCH_TO_THUMB + : "=r" (src_mat), "=r" (dst_mat) + : "r" (one), "0" (src_mat), "1" (dst_mat) + : "r0", "cc", "memory", VFP_CLOBBER_S0_S31 + ); + +} + + +#endif +#endif diff --git a/vfpmathlibrary/matrix_impl.h b/vfpmathlibrary/matrix_impl.h index 20e959a..93f846b 100644 --- a/vfpmathlibrary/matrix_impl.h +++ b/vfpmathlibrary/matrix_impl.h @@ -1,71 +1,71 @@ -/* -VFP math library for the iPhone / iPod touch - -Copyright (c) 2007-2008 Wolfgang Engel and Matthias Grundmann -http://code.google.com/p/vfpmathlibrary/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising -from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must -not claim that you wrote the original software. If you use this -software in a product, an acknowledgment in the product documentation -would be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must -not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef MATRIX_IMPL_H__ -#define MATRIX_IMPL_H__ - -// Matrixes are assumed to be stored in column major format according to OpenGL -// specification. - -// Multiplies two 4x4 matrices. -void Matrix4Mul(const float* src_mat_1, const float* src_mat_2, float* dst_ptr); - -// Multiplies a 4x4 matrix with a 4-dim. vector. -void Matrix4Vector4Mul(const float* src_mat, const float* src_vec, float* dst_vec); - -// Multiplies a 4x4 matrix with a 3-dim. vector. Last coordinate is assumed to be 1. -// Output is 4-dim. -void Matrix4Vector3Mul(const float* src_mat, const float* src_vec, float* dst_vec); - -// Multiplies a 4x4 matrix with a 3-dim. vector. Last coordinate is assumed to be w. -// Output is 4-dim. -void Matrix4Vector3Mul(const float* src_mat, const float* src_vec, float w, float* dst_vec); - -// Multiplies a 4x4 matrix with a 3-dim. vector. Last coordinate is assumed to be 1. -// Output is 4-dim. -void Matrix4Vector3ArrayMul(int num, // Number of Vertices. - const float* src_mat, // Source matrix. - int src_stride, // Source vector stride in bytes. - const float* src_vec_array, // Source vector array. - int dst_stride, // Dest. vector stride in bytes. - float* dest_vec_array); // Dest. vector array. - - -// Multiplies a 4x4 matrix with a 3-dim. vector. Last coordinate is assumed to be w. -// Output is 4-dim. -void Matrix4Vector3ArrayMul(int num, // Number of Vertices. - const float* src_mat, // Source matrix. - float w, // Last coordinate of vectors. - int src_stride, // Source vector stride in bytes. - const float* src_vec_array, // Source vector array. - int dst_stride, // Dest. vector stride in bytes. - float* dest_vec_array); // Dest. vector array. - -// Inverts a 4x4 Matrix with 94 multiplications and one division. -// This is not the fastest possible implementation (60 mult + 2 divisions) but it is -// not dependent on the determinants of submatrices. -// Furthermore on iPhone, division has IPC of 15 vs. 1 IPC for multiplication. -void Matrix4Invert(const float* src_mat, float* dst_mat); - -#endif // MATRIX_IMPL_H__ +/* +VFP math library for the iPhone / iPod touch + +Copyright (c) 2007-2008 Wolfgang Engel and Matthias Grundmann +http://code.google.com/p/vfpmathlibrary/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising +from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must +not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef MATRIX_IMPL_H__ +#define MATRIX_IMPL_H__ + +// Matrixes are assumed to be stored in column major format according to OpenGL +// specification. + +// Multiplies two 4x4 matrices. +void Matrix4Mul(const float* src_mat_1, const float* src_mat_2, float* dst_ptr); + +// Multiplies a 4x4 matrix with a 4-dim. vector. +void Matrix4Vector4Mul(const float* src_mat, const float* src_vec, float* dst_vec); + +// Multiplies a 4x4 matrix with a 3-dim. vector. Last coordinate is assumed to be 1. +// Output is 4-dim. +void Matrix4Vector3Mul(const float* src_mat, const float* src_vec, float* dst_vec); + +// Multiplies a 4x4 matrix with a 3-dim. vector. Last coordinate is assumed to be w. +// Output is 4-dim. +void Matrix4Vector3Mul(const float* src_mat, const float* src_vec, float w, float* dst_vec); + +// Multiplies a 4x4 matrix with a 3-dim. vector. Last coordinate is assumed to be 1. +// Output is 4-dim. +void Matrix4Vector3ArrayMul(int num, // Number of Vertices. + const float* src_mat, // Source matrix. + int src_stride, // Source vector stride in bytes. + const float* src_vec_array, // Source vector array. + int dst_stride, // Dest. vector stride in bytes. + float* dest_vec_array); // Dest. vector array. + + +// Multiplies a 4x4 matrix with a 3-dim. vector. Last coordinate is assumed to be w. +// Output is 4-dim. +void Matrix4Vector3ArrayMul(int num, // Number of Vertices. + const float* src_mat, // Source matrix. + float w, // Last coordinate of vectors. + int src_stride, // Source vector stride in bytes. + const float* src_vec_array, // Source vector array. + int dst_stride, // Dest. vector stride in bytes. + float* dest_vec_array); // Dest. vector array. + +// Inverts a 4x4 Matrix with 94 multiplications and one division. +// This is not the fastest possible implementation (60 mult + 2 divisions) but it is +// not dependent on the determinants of submatrices. +// Furthermore on iPhone, division has IPC of 15 vs. 1 IPC for multiplication. +void Matrix4Invert(const float* src_mat, float* dst_mat); + +#endif // MATRIX_IMPL_H__ diff --git a/vfpmathlibrary/vfp_clobbers.h b/vfpmathlibrary/vfp_clobbers.h index d12f847..0de05bc 100644 --- a/vfpmathlibrary/vfp_clobbers.h +++ b/vfpmathlibrary/vfp_clobbers.h @@ -1,975 +1,975 @@ -/* - VFP math library for the iPhone / iPod touch - - Copyright (c) 2007-2008 Wolfgang Engel and Matthias Grundmann - http://code.google.com/p/vfpmathlibrary/ - - This software is provided 'as-is', without any express or implied warranty. - In no event will the authors be held liable for any damages arising - from the use of this software. - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it freely, - subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product documentation - would be appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source distribution. - */ - - -// VFP registers clobber list specified by intervals [s0, s31] -// Header file is created by the following snippet. - -/* -#include - -int main() { - int min_reg = 0; - int max_reg = 31; - - for (int i = min_reg; i < max_reg; ++i) { - for (int j = i+1; j <= max_reg; ++j) { - std::cout << "#define VFP_CLOBBER_S" << i << "_" - << "S" << j << " "; - for (int k = i; k <= j; ++k) { - std::cout << "\"s" << k << "\""; - if (k != j) { - std::cout << ", "; - if (k > i && (k-i) % 8 == 0) { - std::cout << " \\\n "; - } - } - } - - std::cout << "\n"; - } - } -} -*/ - -#define VFP_CLOBBER_S0_S1 "s0", "s1" -#define VFP_CLOBBER_S0_S2 "s0", "s1", "s2" -#define VFP_CLOBBER_S0_S3 "s0", "s1", "s2", "s3" -#define VFP_CLOBBER_S0_S4 "s0", "s1", "s2", "s3", "s4" -#define VFP_CLOBBER_S0_S5 "s0", "s1", "s2", "s3", "s4", "s5" -#define VFP_CLOBBER_S0_S6 "s0", "s1", "s2", "s3", "s4", "s5", "s6" -#define VFP_CLOBBER_S0_S7 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7" -#define VFP_CLOBBER_S0_S8 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8" -#define VFP_CLOBBER_S0_S9 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9" -#define VFP_CLOBBER_S0_S10 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10" -#define VFP_CLOBBER_S0_S11 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11" -#define VFP_CLOBBER_S0_S12 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12" -#define VFP_CLOBBER_S0_S13 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13" -#define VFP_CLOBBER_S0_S14 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14" -#define VFP_CLOBBER_S0_S15 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15" -#define VFP_CLOBBER_S0_S16 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16" -#define VFP_CLOBBER_S0_S17 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17" -#define VFP_CLOBBER_S0_S18 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18" -#define VFP_CLOBBER_S0_S19 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19" -#define VFP_CLOBBER_S0_S20 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20" -#define VFP_CLOBBER_S0_S21 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21" -#define VFP_CLOBBER_S0_S22 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S0_S23 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S0_S24 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S0_S25 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25" -#define VFP_CLOBBER_S0_S26 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26" -#define VFP_CLOBBER_S0_S27 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27" -#define VFP_CLOBBER_S0_S28 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S0_S29 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S0_S30 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S0_S31 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ - "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S1_S2 "s1", "s2" -#define VFP_CLOBBER_S1_S3 "s1", "s2", "s3" -#define VFP_CLOBBER_S1_S4 "s1", "s2", "s3", "s4" -#define VFP_CLOBBER_S1_S5 "s1", "s2", "s3", "s4", "s5" -#define VFP_CLOBBER_S1_S6 "s1", "s2", "s3", "s4", "s5", "s6" -#define VFP_CLOBBER_S1_S7 "s1", "s2", "s3", "s4", "s5", "s6", "s7" -#define VFP_CLOBBER_S1_S8 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8" -#define VFP_CLOBBER_S1_S9 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9" -#define VFP_CLOBBER_S1_S10 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10" -#define VFP_CLOBBER_S1_S11 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11" -#define VFP_CLOBBER_S1_S12 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12" -#define VFP_CLOBBER_S1_S13 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13" -#define VFP_CLOBBER_S1_S14 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14" -#define VFP_CLOBBER_S1_S15 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15" -#define VFP_CLOBBER_S1_S16 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16" -#define VFP_CLOBBER_S1_S17 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17" -#define VFP_CLOBBER_S1_S18 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18" -#define VFP_CLOBBER_S1_S19 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19" -#define VFP_CLOBBER_S1_S20 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20" -#define VFP_CLOBBER_S1_S21 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21" -#define VFP_CLOBBER_S1_S22 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S1_S23 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S1_S24 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S1_S25 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S1_S26 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26" -#define VFP_CLOBBER_S1_S27 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27" -#define VFP_CLOBBER_S1_S28 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27", "s28" -#define VFP_CLOBBER_S1_S29 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S1_S30 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S1_S31 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ - "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S2_S3 "s2", "s3" -#define VFP_CLOBBER_S2_S4 "s2", "s3", "s4" -#define VFP_CLOBBER_S2_S5 "s2", "s3", "s4", "s5" -#define VFP_CLOBBER_S2_S6 "s2", "s3", "s4", "s5", "s6" -#define VFP_CLOBBER_S2_S7 "s2", "s3", "s4", "s5", "s6", "s7" -#define VFP_CLOBBER_S2_S8 "s2", "s3", "s4", "s5", "s6", "s7", "s8" -#define VFP_CLOBBER_S2_S9 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9" -#define VFP_CLOBBER_S2_S10 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10" -#define VFP_CLOBBER_S2_S11 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11" -#define VFP_CLOBBER_S2_S12 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12" -#define VFP_CLOBBER_S2_S13 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13" -#define VFP_CLOBBER_S2_S14 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14" -#define VFP_CLOBBER_S2_S15 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15" -#define VFP_CLOBBER_S2_S16 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16" -#define VFP_CLOBBER_S2_S17 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17" -#define VFP_CLOBBER_S2_S18 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18" -#define VFP_CLOBBER_S2_S19 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19" -#define VFP_CLOBBER_S2_S20 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20" -#define VFP_CLOBBER_S2_S21 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21" -#define VFP_CLOBBER_S2_S22 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S2_S23 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S2_S24 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S2_S25 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S2_S26 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S2_S27 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27" -#define VFP_CLOBBER_S2_S28 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27", "s28" -#define VFP_CLOBBER_S2_S29 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27", "s28", "s29" -#define VFP_CLOBBER_S2_S30 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S2_S31 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ - "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S3_S4 "s3", "s4" -#define VFP_CLOBBER_S3_S5 "s3", "s4", "s5" -#define VFP_CLOBBER_S3_S6 "s3", "s4", "s5", "s6" -#define VFP_CLOBBER_S3_S7 "s3", "s4", "s5", "s6", "s7" -#define VFP_CLOBBER_S3_S8 "s3", "s4", "s5", "s6", "s7", "s8" -#define VFP_CLOBBER_S3_S9 "s3", "s4", "s5", "s6", "s7", "s8", "s9" -#define VFP_CLOBBER_S3_S10 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10" -#define VFP_CLOBBER_S3_S11 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11" -#define VFP_CLOBBER_S3_S12 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12" -#define VFP_CLOBBER_S3_S13 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13" -#define VFP_CLOBBER_S3_S14 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14" -#define VFP_CLOBBER_S3_S15 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15" -#define VFP_CLOBBER_S3_S16 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16" -#define VFP_CLOBBER_S3_S17 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17" -#define VFP_CLOBBER_S3_S18 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18" -#define VFP_CLOBBER_S3_S19 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19" -#define VFP_CLOBBER_S3_S20 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20" -#define VFP_CLOBBER_S3_S21 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21" -#define VFP_CLOBBER_S3_S22 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22" -#define VFP_CLOBBER_S3_S23 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S3_S24 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S3_S25 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S3_S26 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S3_S27 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S3_S28 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ - "s28" -#define VFP_CLOBBER_S3_S29 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ - "s28", "s29" -#define VFP_CLOBBER_S3_S30 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ - "s28", "s29", "s30" -#define VFP_CLOBBER_S3_S31 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ - "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ - "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S4_S5 "s4", "s5" -#define VFP_CLOBBER_S4_S6 "s4", "s5", "s6" -#define VFP_CLOBBER_S4_S7 "s4", "s5", "s6", "s7" -#define VFP_CLOBBER_S4_S8 "s4", "s5", "s6", "s7", "s8" -#define VFP_CLOBBER_S4_S9 "s4", "s5", "s6", "s7", "s8", "s9" -#define VFP_CLOBBER_S4_S10 "s4", "s5", "s6", "s7", "s8", "s9", "s10" -#define VFP_CLOBBER_S4_S11 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11" -#define VFP_CLOBBER_S4_S12 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12" -#define VFP_CLOBBER_S4_S13 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13" -#define VFP_CLOBBER_S4_S14 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14" -#define VFP_CLOBBER_S4_S15 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15" -#define VFP_CLOBBER_S4_S16 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16" -#define VFP_CLOBBER_S4_S17 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17" -#define VFP_CLOBBER_S4_S18 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18" -#define VFP_CLOBBER_S4_S19 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18", "s19" -#define VFP_CLOBBER_S4_S20 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20" -#define VFP_CLOBBER_S4_S21 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21" -#define VFP_CLOBBER_S4_S22 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22" -#define VFP_CLOBBER_S4_S23 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23" -#define VFP_CLOBBER_S4_S24 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S4_S25 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S4_S26 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S4_S27 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S4_S28 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S4_S29 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ - "s29" -#define VFP_CLOBBER_S4_S30 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ - "s29", "s30" -#define VFP_CLOBBER_S4_S31 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ - "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ - "s29", "s30", "s31" -#define VFP_CLOBBER_S5_S6 "s5", "s6" -#define VFP_CLOBBER_S5_S7 "s5", "s6", "s7" -#define VFP_CLOBBER_S5_S8 "s5", "s6", "s7", "s8" -#define VFP_CLOBBER_S5_S9 "s5", "s6", "s7", "s8", "s9" -#define VFP_CLOBBER_S5_S10 "s5", "s6", "s7", "s8", "s9", "s10" -#define VFP_CLOBBER_S5_S11 "s5", "s6", "s7", "s8", "s9", "s10", "s11" -#define VFP_CLOBBER_S5_S12 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12" -#define VFP_CLOBBER_S5_S13 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13" -#define VFP_CLOBBER_S5_S14 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14" -#define VFP_CLOBBER_S5_S15 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15" -#define VFP_CLOBBER_S5_S16 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16" -#define VFP_CLOBBER_S5_S17 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17" -#define VFP_CLOBBER_S5_S18 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18" -#define VFP_CLOBBER_S5_S19 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18", "s19" -#define VFP_CLOBBER_S5_S20 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18", "s19", "s20" -#define VFP_CLOBBER_S5_S21 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21" -#define VFP_CLOBBER_S5_S22 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22" -#define VFP_CLOBBER_S5_S23 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23" -#define VFP_CLOBBER_S5_S24 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24" -#define VFP_CLOBBER_S5_S25 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S5_S26 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S5_S27 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S5_S28 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S5_S29 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S5_S30 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", \ - "s30" -#define VFP_CLOBBER_S5_S31 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ - "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", \ - "s30", "s31" -#define VFP_CLOBBER_S6_S7 "s6", "s7" -#define VFP_CLOBBER_S6_S8 "s6", "s7", "s8" -#define VFP_CLOBBER_S6_S9 "s6", "s7", "s8", "s9" -#define VFP_CLOBBER_S6_S10 "s6", "s7", "s8", "s9", "s10" -#define VFP_CLOBBER_S6_S11 "s6", "s7", "s8", "s9", "s10", "s11" -#define VFP_CLOBBER_S6_S12 "s6", "s7", "s8", "s9", "s10", "s11", "s12" -#define VFP_CLOBBER_S6_S13 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13" -#define VFP_CLOBBER_S6_S14 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14" -#define VFP_CLOBBER_S6_S15 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15" -#define VFP_CLOBBER_S6_S16 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16" -#define VFP_CLOBBER_S6_S17 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17" -#define VFP_CLOBBER_S6_S18 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18" -#define VFP_CLOBBER_S6_S19 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18", "s19" -#define VFP_CLOBBER_S6_S20 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18", "s19", "s20" -#define VFP_CLOBBER_S6_S21 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18", "s19", "s20", "s21" -#define VFP_CLOBBER_S6_S22 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S6_S23 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23" -#define VFP_CLOBBER_S6_S24 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24" -#define VFP_CLOBBER_S6_S25 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25" -#define VFP_CLOBBER_S6_S26 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S6_S27 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S6_S28 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S6_S29 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S6_S30 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S6_S31 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ - "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30", \ - "s31" -#define VFP_CLOBBER_S7_S8 "s7", "s8" -#define VFP_CLOBBER_S7_S9 "s7", "s8", "s9" -#define VFP_CLOBBER_S7_S10 "s7", "s8", "s9", "s10" -#define VFP_CLOBBER_S7_S11 "s7", "s8", "s9", "s10", "s11" -#define VFP_CLOBBER_S7_S12 "s7", "s8", "s9", "s10", "s11", "s12" -#define VFP_CLOBBER_S7_S13 "s7", "s8", "s9", "s10", "s11", "s12", "s13" -#define VFP_CLOBBER_S7_S14 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14" -#define VFP_CLOBBER_S7_S15 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15" -#define VFP_CLOBBER_S7_S16 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16" -#define VFP_CLOBBER_S7_S17 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17" -#define VFP_CLOBBER_S7_S18 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18" -#define VFP_CLOBBER_S7_S19 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18", "s19" -#define VFP_CLOBBER_S7_S20 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18", "s19", "s20" -#define VFP_CLOBBER_S7_S21 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18", "s19", "s20", "s21" -#define VFP_CLOBBER_S7_S22 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18", "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S7_S23 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S7_S24 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24" -#define VFP_CLOBBER_S7_S25 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25" -#define VFP_CLOBBER_S7_S26 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25", "s26" -#define VFP_CLOBBER_S7_S27 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S7_S28 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S7_S29 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S7_S30 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25", "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S7_S31 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ - "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S8_S9 "s8", "s9" -#define VFP_CLOBBER_S8_S10 "s8", "s9", "s10" -#define VFP_CLOBBER_S8_S11 "s8", "s9", "s10", "s11" -#define VFP_CLOBBER_S8_S12 "s8", "s9", "s10", "s11", "s12" -#define VFP_CLOBBER_S8_S13 "s8", "s9", "s10", "s11", "s12", "s13" -#define VFP_CLOBBER_S8_S14 "s8", "s9", "s10", "s11", "s12", "s13", "s14" -#define VFP_CLOBBER_S8_S15 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15" -#define VFP_CLOBBER_S8_S16 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16" -#define VFP_CLOBBER_S8_S17 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17" -#define VFP_CLOBBER_S8_S18 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18" -#define VFP_CLOBBER_S8_S19 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19" -#define VFP_CLOBBER_S8_S20 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20" -#define VFP_CLOBBER_S8_S21 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21" -#define VFP_CLOBBER_S8_S22 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S8_S23 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S8_S24 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S8_S25 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25" -#define VFP_CLOBBER_S8_S26 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26" -#define VFP_CLOBBER_S8_S27 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27" -#define VFP_CLOBBER_S8_S28 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S8_S29 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S8_S30 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S8_S31 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ - "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S9_S10 "s9", "s10" -#define VFP_CLOBBER_S9_S11 "s9", "s10", "s11" -#define VFP_CLOBBER_S9_S12 "s9", "s10", "s11", "s12" -#define VFP_CLOBBER_S9_S13 "s9", "s10", "s11", "s12", "s13" -#define VFP_CLOBBER_S9_S14 "s9", "s10", "s11", "s12", "s13", "s14" -#define VFP_CLOBBER_S9_S15 "s9", "s10", "s11", "s12", "s13", "s14", "s15" -#define VFP_CLOBBER_S9_S16 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16" -#define VFP_CLOBBER_S9_S17 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17" -#define VFP_CLOBBER_S9_S18 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18" -#define VFP_CLOBBER_S9_S19 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19" -#define VFP_CLOBBER_S9_S20 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20" -#define VFP_CLOBBER_S9_S21 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21" -#define VFP_CLOBBER_S9_S22 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S9_S23 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S9_S24 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S9_S25 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S9_S26 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26" -#define VFP_CLOBBER_S9_S27 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27" -#define VFP_CLOBBER_S9_S28 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27", "s28" -#define VFP_CLOBBER_S9_S29 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S9_S30 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S9_S31 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ - "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S10_S11 "s10", "s11" -#define VFP_CLOBBER_S10_S12 "s10", "s11", "s12" -#define VFP_CLOBBER_S10_S13 "s10", "s11", "s12", "s13" -#define VFP_CLOBBER_S10_S14 "s10", "s11", "s12", "s13", "s14" -#define VFP_CLOBBER_S10_S15 "s10", "s11", "s12", "s13", "s14", "s15" -#define VFP_CLOBBER_S10_S16 "s10", "s11", "s12", "s13", "s14", "s15", "s16" -#define VFP_CLOBBER_S10_S17 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17" -#define VFP_CLOBBER_S10_S18 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18" -#define VFP_CLOBBER_S10_S19 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19" -#define VFP_CLOBBER_S10_S20 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20" -#define VFP_CLOBBER_S10_S21 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21" -#define VFP_CLOBBER_S10_S22 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S10_S23 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S10_S24 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S10_S25 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S10_S26 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S10_S27 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27" -#define VFP_CLOBBER_S10_S28 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27", "s28" -#define VFP_CLOBBER_S10_S29 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27", "s28", "s29" -#define VFP_CLOBBER_S10_S30 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S10_S31 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ - "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S11_S12 "s11", "s12" -#define VFP_CLOBBER_S11_S13 "s11", "s12", "s13" -#define VFP_CLOBBER_S11_S14 "s11", "s12", "s13", "s14" -#define VFP_CLOBBER_S11_S15 "s11", "s12", "s13", "s14", "s15" -#define VFP_CLOBBER_S11_S16 "s11", "s12", "s13", "s14", "s15", "s16" -#define VFP_CLOBBER_S11_S17 "s11", "s12", "s13", "s14", "s15", "s16", "s17" -#define VFP_CLOBBER_S11_S18 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18" -#define VFP_CLOBBER_S11_S19 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19" -#define VFP_CLOBBER_S11_S20 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20" -#define VFP_CLOBBER_S11_S21 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21" -#define VFP_CLOBBER_S11_S22 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22" -#define VFP_CLOBBER_S11_S23 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S11_S24 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S11_S25 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S11_S26 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S11_S27 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S11_S28 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ - "s28" -#define VFP_CLOBBER_S11_S29 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ - "s28", "s29" -#define VFP_CLOBBER_S11_S30 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ - "s28", "s29", "s30" -#define VFP_CLOBBER_S11_S31 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ - "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ - "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S12_S13 "s12", "s13" -#define VFP_CLOBBER_S12_S14 "s12", "s13", "s14" -#define VFP_CLOBBER_S12_S15 "s12", "s13", "s14", "s15" -#define VFP_CLOBBER_S12_S16 "s12", "s13", "s14", "s15", "s16" -#define VFP_CLOBBER_S12_S17 "s12", "s13", "s14", "s15", "s16", "s17" -#define VFP_CLOBBER_S12_S18 "s12", "s13", "s14", "s15", "s16", "s17", "s18" -#define VFP_CLOBBER_S12_S19 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19" -#define VFP_CLOBBER_S12_S20 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20" -#define VFP_CLOBBER_S12_S21 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21" -#define VFP_CLOBBER_S12_S22 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22" -#define VFP_CLOBBER_S12_S23 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23" -#define VFP_CLOBBER_S12_S24 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S12_S25 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S12_S26 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S12_S27 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S12_S28 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S12_S29 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ - "s29" -#define VFP_CLOBBER_S12_S30 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ - "s29", "s30" -#define VFP_CLOBBER_S12_S31 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ - "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ - "s29", "s30", "s31" -#define VFP_CLOBBER_S13_S14 "s13", "s14" -#define VFP_CLOBBER_S13_S15 "s13", "s14", "s15" -#define VFP_CLOBBER_S13_S16 "s13", "s14", "s15", "s16" -#define VFP_CLOBBER_S13_S17 "s13", "s14", "s15", "s16", "s17" -#define VFP_CLOBBER_S13_S18 "s13", "s14", "s15", "s16", "s17", "s18" -#define VFP_CLOBBER_S13_S19 "s13", "s14", "s15", "s16", "s17", "s18", "s19" -#define VFP_CLOBBER_S13_S20 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20" -#define VFP_CLOBBER_S13_S21 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21" -#define VFP_CLOBBER_S13_S22 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22" -#define VFP_CLOBBER_S13_S23 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23" -#define VFP_CLOBBER_S13_S24 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24" -#define VFP_CLOBBER_S13_S25 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S13_S26 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S13_S27 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S13_S28 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S13_S29 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S13_S30 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", \ - "s30" -#define VFP_CLOBBER_S13_S31 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ - "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", \ - "s30", "s31" -#define VFP_CLOBBER_S14_S15 "s14", "s15" -#define VFP_CLOBBER_S14_S16 "s14", "s15", "s16" -#define VFP_CLOBBER_S14_S17 "s14", "s15", "s16", "s17" -#define VFP_CLOBBER_S14_S18 "s14", "s15", "s16", "s17", "s18" -#define VFP_CLOBBER_S14_S19 "s14", "s15", "s16", "s17", "s18", "s19" -#define VFP_CLOBBER_S14_S20 "s14", "s15", "s16", "s17", "s18", "s19", "s20" -#define VFP_CLOBBER_S14_S21 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21" -#define VFP_CLOBBER_S14_S22 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S14_S23 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23" -#define VFP_CLOBBER_S14_S24 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24" -#define VFP_CLOBBER_S14_S25 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25" -#define VFP_CLOBBER_S14_S26 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S14_S27 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S14_S28 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S14_S29 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S14_S30 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S14_S31 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ - "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30", \ - "s31" -#define VFP_CLOBBER_S15_S16 "s15", "s16" -#define VFP_CLOBBER_S15_S17 "s15", "s16", "s17" -#define VFP_CLOBBER_S15_S18 "s15", "s16", "s17", "s18" -#define VFP_CLOBBER_S15_S19 "s15", "s16", "s17", "s18", "s19" -#define VFP_CLOBBER_S15_S20 "s15", "s16", "s17", "s18", "s19", "s20" -#define VFP_CLOBBER_S15_S21 "s15", "s16", "s17", "s18", "s19", "s20", "s21" -#define VFP_CLOBBER_S15_S22 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S15_S23 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S15_S24 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24" -#define VFP_CLOBBER_S15_S25 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25" -#define VFP_CLOBBER_S15_S26 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25", "s26" -#define VFP_CLOBBER_S15_S27 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S15_S28 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S15_S29 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S15_S30 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25", "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S15_S31 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ - "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S16_S17 "s16", "s17" -#define VFP_CLOBBER_S16_S18 "s16", "s17", "s18" -#define VFP_CLOBBER_S16_S19 "s16", "s17", "s18", "s19" -#define VFP_CLOBBER_S16_S20 "s16", "s17", "s18", "s19", "s20" -#define VFP_CLOBBER_S16_S21 "s16", "s17", "s18", "s19", "s20", "s21" -#define VFP_CLOBBER_S16_S22 "s16", "s17", "s18", "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S16_S23 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S16_S24 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S16_S25 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25" -#define VFP_CLOBBER_S16_S26 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26" -#define VFP_CLOBBER_S16_S27 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27" -#define VFP_CLOBBER_S16_S28 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S16_S29 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S16_S30 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S16_S31 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ - "s25", "s26", "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S17_S18 "s17", "s18" -#define VFP_CLOBBER_S17_S19 "s17", "s18", "s19" -#define VFP_CLOBBER_S17_S20 "s17", "s18", "s19", "s20" -#define VFP_CLOBBER_S17_S21 "s17", "s18", "s19", "s20", "s21" -#define VFP_CLOBBER_S17_S22 "s17", "s18", "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S17_S23 "s17", "s18", "s19", "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S17_S24 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S17_S25 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S17_S26 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26" -#define VFP_CLOBBER_S17_S27 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27" -#define VFP_CLOBBER_S17_S28 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27", "s28" -#define VFP_CLOBBER_S17_S29 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S17_S30 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S17_S31 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ - "s26", "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S18_S19 "s18", "s19" -#define VFP_CLOBBER_S18_S20 "s18", "s19", "s20" -#define VFP_CLOBBER_S18_S21 "s18", "s19", "s20", "s21" -#define VFP_CLOBBER_S18_S22 "s18", "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S18_S23 "s18", "s19", "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S18_S24 "s18", "s19", "s20", "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S18_S25 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S18_S26 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S18_S27 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27" -#define VFP_CLOBBER_S18_S28 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27", "s28" -#define VFP_CLOBBER_S18_S29 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27", "s28", "s29" -#define VFP_CLOBBER_S18_S30 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S18_S31 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ - "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S19_S20 "s19", "s20" -#define VFP_CLOBBER_S19_S21 "s19", "s20", "s21" -#define VFP_CLOBBER_S19_S22 "s19", "s20", "s21", "s22" -#define VFP_CLOBBER_S19_S23 "s19", "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S19_S24 "s19", "s20", "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S19_S25 "s19", "s20", "s21", "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S19_S26 "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S19_S27 "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S19_S28 "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ - "s28" -#define VFP_CLOBBER_S19_S29 "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ - "s28", "s29" -#define VFP_CLOBBER_S19_S30 "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ - "s28", "s29", "s30" -#define VFP_CLOBBER_S19_S31 "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ - "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S20_S21 "s20", "s21" -#define VFP_CLOBBER_S20_S22 "s20", "s21", "s22" -#define VFP_CLOBBER_S20_S23 "s20", "s21", "s22", "s23" -#define VFP_CLOBBER_S20_S24 "s20", "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S20_S25 "s20", "s21", "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S20_S26 "s20", "s21", "s22", "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S20_S27 "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S20_S28 "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S20_S29 "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ - "s29" -#define VFP_CLOBBER_S20_S30 "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ - "s29", "s30" -#define VFP_CLOBBER_S20_S31 "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ - "s29", "s30", "s31" -#define VFP_CLOBBER_S21_S22 "s21", "s22" -#define VFP_CLOBBER_S21_S23 "s21", "s22", "s23" -#define VFP_CLOBBER_S21_S24 "s21", "s22", "s23", "s24" -#define VFP_CLOBBER_S21_S25 "s21", "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S21_S26 "s21", "s22", "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S21_S27 "s21", "s22", "s23", "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S21_S28 "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S21_S29 "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S21_S30 "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", \ - "s30" -#define VFP_CLOBBER_S21_S31 "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", \ - "s30", "s31" -#define VFP_CLOBBER_S22_S23 "s22", "s23" -#define VFP_CLOBBER_S22_S24 "s22", "s23", "s24" -#define VFP_CLOBBER_S22_S25 "s22", "s23", "s24", "s25" -#define VFP_CLOBBER_S22_S26 "s22", "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S22_S27 "s22", "s23", "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S22_S28 "s22", "s23", "s24", "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S22_S29 "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S22_S30 "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S22_S31 "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30", \ - "s31" -#define VFP_CLOBBER_S23_S24 "s23", "s24" -#define VFP_CLOBBER_S23_S25 "s23", "s24", "s25" -#define VFP_CLOBBER_S23_S26 "s23", "s24", "s25", "s26" -#define VFP_CLOBBER_S23_S27 "s23", "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S23_S28 "s23", "s24", "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S23_S29 "s23", "s24", "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S23_S30 "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S23_S31 "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S24_S25 "s24", "s25" -#define VFP_CLOBBER_S24_S26 "s24", "s25", "s26" -#define VFP_CLOBBER_S24_S27 "s24", "s25", "s26", "s27" -#define VFP_CLOBBER_S24_S28 "s24", "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S24_S29 "s24", "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S24_S30 "s24", "s25", "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S24_S31 "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S25_S26 "s25", "s26" -#define VFP_CLOBBER_S25_S27 "s25", "s26", "s27" -#define VFP_CLOBBER_S25_S28 "s25", "s26", "s27", "s28" -#define VFP_CLOBBER_S25_S29 "s25", "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S25_S30 "s25", "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S25_S31 "s25", "s26", "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S26_S27 "s26", "s27" -#define VFP_CLOBBER_S26_S28 "s26", "s27", "s28" -#define VFP_CLOBBER_S26_S29 "s26", "s27", "s28", "s29" -#define VFP_CLOBBER_S26_S30 "s26", "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S26_S31 "s26", "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S27_S28 "s27", "s28" -#define VFP_CLOBBER_S27_S29 "s27", "s28", "s29" -#define VFP_CLOBBER_S27_S30 "s27", "s28", "s29", "s30" -#define VFP_CLOBBER_S27_S31 "s27", "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S28_S29 "s28", "s29" -#define VFP_CLOBBER_S28_S30 "s28", "s29", "s30" -#define VFP_CLOBBER_S28_S31 "s28", "s29", "s30", "s31" -#define VFP_CLOBBER_S29_S30 "s29", "s30" -#define VFP_CLOBBER_S29_S31 "s29", "s30", "s31" -#define VFP_CLOBBER_S30_S31 "s30", "s31" +/* + VFP math library for the iPhone / iPod touch + + Copyright (c) 2007-2008 Wolfgang Engel and Matthias Grundmann + http://code.google.com/p/vfpmathlibrary/ + + This software is provided 'as-is', without any express or implied warranty. + In no event will the authors be held liable for any damages arising + from the use of this software. + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it freely, + subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product documentation + would be appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source distribution. + */ + + +// VFP registers clobber list specified by intervals [s0, s31] +// Header file is created by the following snippet. + +/* +#include + +int main() { + int min_reg = 0; + int max_reg = 31; + + for (int i = min_reg; i < max_reg; ++i) { + for (int j = i+1; j <= max_reg; ++j) { + std::cout << "#define VFP_CLOBBER_S" << i << "_" + << "S" << j << " "; + for (int k = i; k <= j; ++k) { + std::cout << "\"s" << k << "\""; + if (k != j) { + std::cout << ", "; + if (k > i && (k-i) % 8 == 0) { + std::cout << " \\\n "; + } + } + } + + std::cout << "\n"; + } + } +} +*/ + +#define VFP_CLOBBER_S0_S1 "s0", "s1" +#define VFP_CLOBBER_S0_S2 "s0", "s1", "s2" +#define VFP_CLOBBER_S0_S3 "s0", "s1", "s2", "s3" +#define VFP_CLOBBER_S0_S4 "s0", "s1", "s2", "s3", "s4" +#define VFP_CLOBBER_S0_S5 "s0", "s1", "s2", "s3", "s4", "s5" +#define VFP_CLOBBER_S0_S6 "s0", "s1", "s2", "s3", "s4", "s5", "s6" +#define VFP_CLOBBER_S0_S7 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7" +#define VFP_CLOBBER_S0_S8 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8" +#define VFP_CLOBBER_S0_S9 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9" +#define VFP_CLOBBER_S0_S10 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10" +#define VFP_CLOBBER_S0_S11 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11" +#define VFP_CLOBBER_S0_S12 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12" +#define VFP_CLOBBER_S0_S13 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13" +#define VFP_CLOBBER_S0_S14 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14" +#define VFP_CLOBBER_S0_S15 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15" +#define VFP_CLOBBER_S0_S16 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16" +#define VFP_CLOBBER_S0_S17 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17" +#define VFP_CLOBBER_S0_S18 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18" +#define VFP_CLOBBER_S0_S19 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19" +#define VFP_CLOBBER_S0_S20 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20" +#define VFP_CLOBBER_S0_S21 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21" +#define VFP_CLOBBER_S0_S22 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S0_S23 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S0_S24 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S0_S25 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25" +#define VFP_CLOBBER_S0_S26 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26" +#define VFP_CLOBBER_S0_S27 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27" +#define VFP_CLOBBER_S0_S28 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S0_S29 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S0_S30 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S0_S31 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", \ + "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S1_S2 "s1", "s2" +#define VFP_CLOBBER_S1_S3 "s1", "s2", "s3" +#define VFP_CLOBBER_S1_S4 "s1", "s2", "s3", "s4" +#define VFP_CLOBBER_S1_S5 "s1", "s2", "s3", "s4", "s5" +#define VFP_CLOBBER_S1_S6 "s1", "s2", "s3", "s4", "s5", "s6" +#define VFP_CLOBBER_S1_S7 "s1", "s2", "s3", "s4", "s5", "s6", "s7" +#define VFP_CLOBBER_S1_S8 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8" +#define VFP_CLOBBER_S1_S9 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9" +#define VFP_CLOBBER_S1_S10 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10" +#define VFP_CLOBBER_S1_S11 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11" +#define VFP_CLOBBER_S1_S12 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12" +#define VFP_CLOBBER_S1_S13 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13" +#define VFP_CLOBBER_S1_S14 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14" +#define VFP_CLOBBER_S1_S15 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15" +#define VFP_CLOBBER_S1_S16 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16" +#define VFP_CLOBBER_S1_S17 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17" +#define VFP_CLOBBER_S1_S18 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18" +#define VFP_CLOBBER_S1_S19 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19" +#define VFP_CLOBBER_S1_S20 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20" +#define VFP_CLOBBER_S1_S21 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21" +#define VFP_CLOBBER_S1_S22 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S1_S23 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S1_S24 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S1_S25 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S1_S26 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26" +#define VFP_CLOBBER_S1_S27 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27" +#define VFP_CLOBBER_S1_S28 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27", "s28" +#define VFP_CLOBBER_S1_S29 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S1_S30 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S1_S31 "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", \ + "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S2_S3 "s2", "s3" +#define VFP_CLOBBER_S2_S4 "s2", "s3", "s4" +#define VFP_CLOBBER_S2_S5 "s2", "s3", "s4", "s5" +#define VFP_CLOBBER_S2_S6 "s2", "s3", "s4", "s5", "s6" +#define VFP_CLOBBER_S2_S7 "s2", "s3", "s4", "s5", "s6", "s7" +#define VFP_CLOBBER_S2_S8 "s2", "s3", "s4", "s5", "s6", "s7", "s8" +#define VFP_CLOBBER_S2_S9 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9" +#define VFP_CLOBBER_S2_S10 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10" +#define VFP_CLOBBER_S2_S11 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11" +#define VFP_CLOBBER_S2_S12 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12" +#define VFP_CLOBBER_S2_S13 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13" +#define VFP_CLOBBER_S2_S14 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14" +#define VFP_CLOBBER_S2_S15 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15" +#define VFP_CLOBBER_S2_S16 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16" +#define VFP_CLOBBER_S2_S17 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17" +#define VFP_CLOBBER_S2_S18 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18" +#define VFP_CLOBBER_S2_S19 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19" +#define VFP_CLOBBER_S2_S20 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20" +#define VFP_CLOBBER_S2_S21 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21" +#define VFP_CLOBBER_S2_S22 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S2_S23 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S2_S24 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S2_S25 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S2_S26 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S2_S27 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27" +#define VFP_CLOBBER_S2_S28 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27", "s28" +#define VFP_CLOBBER_S2_S29 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27", "s28", "s29" +#define VFP_CLOBBER_S2_S30 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S2_S31 "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", \ + "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S3_S4 "s3", "s4" +#define VFP_CLOBBER_S3_S5 "s3", "s4", "s5" +#define VFP_CLOBBER_S3_S6 "s3", "s4", "s5", "s6" +#define VFP_CLOBBER_S3_S7 "s3", "s4", "s5", "s6", "s7" +#define VFP_CLOBBER_S3_S8 "s3", "s4", "s5", "s6", "s7", "s8" +#define VFP_CLOBBER_S3_S9 "s3", "s4", "s5", "s6", "s7", "s8", "s9" +#define VFP_CLOBBER_S3_S10 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10" +#define VFP_CLOBBER_S3_S11 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11" +#define VFP_CLOBBER_S3_S12 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12" +#define VFP_CLOBBER_S3_S13 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13" +#define VFP_CLOBBER_S3_S14 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14" +#define VFP_CLOBBER_S3_S15 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15" +#define VFP_CLOBBER_S3_S16 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16" +#define VFP_CLOBBER_S3_S17 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17" +#define VFP_CLOBBER_S3_S18 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18" +#define VFP_CLOBBER_S3_S19 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19" +#define VFP_CLOBBER_S3_S20 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20" +#define VFP_CLOBBER_S3_S21 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21" +#define VFP_CLOBBER_S3_S22 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22" +#define VFP_CLOBBER_S3_S23 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S3_S24 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S3_S25 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S3_S26 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S3_S27 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S3_S28 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ + "s28" +#define VFP_CLOBBER_S3_S29 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ + "s28", "s29" +#define VFP_CLOBBER_S3_S30 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ + "s28", "s29", "s30" +#define VFP_CLOBBER_S3_S31 "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", \ + "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ + "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S4_S5 "s4", "s5" +#define VFP_CLOBBER_S4_S6 "s4", "s5", "s6" +#define VFP_CLOBBER_S4_S7 "s4", "s5", "s6", "s7" +#define VFP_CLOBBER_S4_S8 "s4", "s5", "s6", "s7", "s8" +#define VFP_CLOBBER_S4_S9 "s4", "s5", "s6", "s7", "s8", "s9" +#define VFP_CLOBBER_S4_S10 "s4", "s5", "s6", "s7", "s8", "s9", "s10" +#define VFP_CLOBBER_S4_S11 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11" +#define VFP_CLOBBER_S4_S12 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12" +#define VFP_CLOBBER_S4_S13 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13" +#define VFP_CLOBBER_S4_S14 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14" +#define VFP_CLOBBER_S4_S15 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15" +#define VFP_CLOBBER_S4_S16 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16" +#define VFP_CLOBBER_S4_S17 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17" +#define VFP_CLOBBER_S4_S18 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18" +#define VFP_CLOBBER_S4_S19 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18", "s19" +#define VFP_CLOBBER_S4_S20 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20" +#define VFP_CLOBBER_S4_S21 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21" +#define VFP_CLOBBER_S4_S22 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22" +#define VFP_CLOBBER_S4_S23 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23" +#define VFP_CLOBBER_S4_S24 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S4_S25 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S4_S26 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S4_S27 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S4_S28 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S4_S29 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ + "s29" +#define VFP_CLOBBER_S4_S30 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ + "s29", "s30" +#define VFP_CLOBBER_S4_S31 "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", \ + "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ + "s29", "s30", "s31" +#define VFP_CLOBBER_S5_S6 "s5", "s6" +#define VFP_CLOBBER_S5_S7 "s5", "s6", "s7" +#define VFP_CLOBBER_S5_S8 "s5", "s6", "s7", "s8" +#define VFP_CLOBBER_S5_S9 "s5", "s6", "s7", "s8", "s9" +#define VFP_CLOBBER_S5_S10 "s5", "s6", "s7", "s8", "s9", "s10" +#define VFP_CLOBBER_S5_S11 "s5", "s6", "s7", "s8", "s9", "s10", "s11" +#define VFP_CLOBBER_S5_S12 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12" +#define VFP_CLOBBER_S5_S13 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13" +#define VFP_CLOBBER_S5_S14 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14" +#define VFP_CLOBBER_S5_S15 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15" +#define VFP_CLOBBER_S5_S16 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16" +#define VFP_CLOBBER_S5_S17 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17" +#define VFP_CLOBBER_S5_S18 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18" +#define VFP_CLOBBER_S5_S19 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18", "s19" +#define VFP_CLOBBER_S5_S20 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18", "s19", "s20" +#define VFP_CLOBBER_S5_S21 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21" +#define VFP_CLOBBER_S5_S22 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22" +#define VFP_CLOBBER_S5_S23 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23" +#define VFP_CLOBBER_S5_S24 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24" +#define VFP_CLOBBER_S5_S25 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S5_S26 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S5_S27 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S5_S28 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S5_S29 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S5_S30 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", \ + "s30" +#define VFP_CLOBBER_S5_S31 "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", \ + "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", \ + "s30", "s31" +#define VFP_CLOBBER_S6_S7 "s6", "s7" +#define VFP_CLOBBER_S6_S8 "s6", "s7", "s8" +#define VFP_CLOBBER_S6_S9 "s6", "s7", "s8", "s9" +#define VFP_CLOBBER_S6_S10 "s6", "s7", "s8", "s9", "s10" +#define VFP_CLOBBER_S6_S11 "s6", "s7", "s8", "s9", "s10", "s11" +#define VFP_CLOBBER_S6_S12 "s6", "s7", "s8", "s9", "s10", "s11", "s12" +#define VFP_CLOBBER_S6_S13 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13" +#define VFP_CLOBBER_S6_S14 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14" +#define VFP_CLOBBER_S6_S15 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15" +#define VFP_CLOBBER_S6_S16 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16" +#define VFP_CLOBBER_S6_S17 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17" +#define VFP_CLOBBER_S6_S18 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18" +#define VFP_CLOBBER_S6_S19 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18", "s19" +#define VFP_CLOBBER_S6_S20 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18", "s19", "s20" +#define VFP_CLOBBER_S6_S21 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18", "s19", "s20", "s21" +#define VFP_CLOBBER_S6_S22 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S6_S23 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23" +#define VFP_CLOBBER_S6_S24 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24" +#define VFP_CLOBBER_S6_S25 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25" +#define VFP_CLOBBER_S6_S26 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S6_S27 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S6_S28 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S6_S29 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S6_S30 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S6_S31 "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", \ + "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30", \ + "s31" +#define VFP_CLOBBER_S7_S8 "s7", "s8" +#define VFP_CLOBBER_S7_S9 "s7", "s8", "s9" +#define VFP_CLOBBER_S7_S10 "s7", "s8", "s9", "s10" +#define VFP_CLOBBER_S7_S11 "s7", "s8", "s9", "s10", "s11" +#define VFP_CLOBBER_S7_S12 "s7", "s8", "s9", "s10", "s11", "s12" +#define VFP_CLOBBER_S7_S13 "s7", "s8", "s9", "s10", "s11", "s12", "s13" +#define VFP_CLOBBER_S7_S14 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14" +#define VFP_CLOBBER_S7_S15 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15" +#define VFP_CLOBBER_S7_S16 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16" +#define VFP_CLOBBER_S7_S17 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17" +#define VFP_CLOBBER_S7_S18 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18" +#define VFP_CLOBBER_S7_S19 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18", "s19" +#define VFP_CLOBBER_S7_S20 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18", "s19", "s20" +#define VFP_CLOBBER_S7_S21 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18", "s19", "s20", "s21" +#define VFP_CLOBBER_S7_S22 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18", "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S7_S23 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S7_S24 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24" +#define VFP_CLOBBER_S7_S25 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25" +#define VFP_CLOBBER_S7_S26 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25", "s26" +#define VFP_CLOBBER_S7_S27 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S7_S28 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S7_S29 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S7_S30 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25", "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S7_S31 "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", \ + "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S8_S9 "s8", "s9" +#define VFP_CLOBBER_S8_S10 "s8", "s9", "s10" +#define VFP_CLOBBER_S8_S11 "s8", "s9", "s10", "s11" +#define VFP_CLOBBER_S8_S12 "s8", "s9", "s10", "s11", "s12" +#define VFP_CLOBBER_S8_S13 "s8", "s9", "s10", "s11", "s12", "s13" +#define VFP_CLOBBER_S8_S14 "s8", "s9", "s10", "s11", "s12", "s13", "s14" +#define VFP_CLOBBER_S8_S15 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15" +#define VFP_CLOBBER_S8_S16 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16" +#define VFP_CLOBBER_S8_S17 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17" +#define VFP_CLOBBER_S8_S18 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18" +#define VFP_CLOBBER_S8_S19 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19" +#define VFP_CLOBBER_S8_S20 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20" +#define VFP_CLOBBER_S8_S21 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21" +#define VFP_CLOBBER_S8_S22 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S8_S23 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S8_S24 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S8_S25 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25" +#define VFP_CLOBBER_S8_S26 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26" +#define VFP_CLOBBER_S8_S27 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27" +#define VFP_CLOBBER_S8_S28 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S8_S29 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S8_S30 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S8_S31 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", \ + "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S9_S10 "s9", "s10" +#define VFP_CLOBBER_S9_S11 "s9", "s10", "s11" +#define VFP_CLOBBER_S9_S12 "s9", "s10", "s11", "s12" +#define VFP_CLOBBER_S9_S13 "s9", "s10", "s11", "s12", "s13" +#define VFP_CLOBBER_S9_S14 "s9", "s10", "s11", "s12", "s13", "s14" +#define VFP_CLOBBER_S9_S15 "s9", "s10", "s11", "s12", "s13", "s14", "s15" +#define VFP_CLOBBER_S9_S16 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16" +#define VFP_CLOBBER_S9_S17 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17" +#define VFP_CLOBBER_S9_S18 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18" +#define VFP_CLOBBER_S9_S19 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19" +#define VFP_CLOBBER_S9_S20 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20" +#define VFP_CLOBBER_S9_S21 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21" +#define VFP_CLOBBER_S9_S22 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S9_S23 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S9_S24 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S9_S25 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S9_S26 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26" +#define VFP_CLOBBER_S9_S27 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27" +#define VFP_CLOBBER_S9_S28 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27", "s28" +#define VFP_CLOBBER_S9_S29 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S9_S30 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S9_S31 "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", \ + "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S10_S11 "s10", "s11" +#define VFP_CLOBBER_S10_S12 "s10", "s11", "s12" +#define VFP_CLOBBER_S10_S13 "s10", "s11", "s12", "s13" +#define VFP_CLOBBER_S10_S14 "s10", "s11", "s12", "s13", "s14" +#define VFP_CLOBBER_S10_S15 "s10", "s11", "s12", "s13", "s14", "s15" +#define VFP_CLOBBER_S10_S16 "s10", "s11", "s12", "s13", "s14", "s15", "s16" +#define VFP_CLOBBER_S10_S17 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17" +#define VFP_CLOBBER_S10_S18 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18" +#define VFP_CLOBBER_S10_S19 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19" +#define VFP_CLOBBER_S10_S20 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20" +#define VFP_CLOBBER_S10_S21 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21" +#define VFP_CLOBBER_S10_S22 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S10_S23 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S10_S24 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S10_S25 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S10_S26 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S10_S27 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27" +#define VFP_CLOBBER_S10_S28 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27", "s28" +#define VFP_CLOBBER_S10_S29 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27", "s28", "s29" +#define VFP_CLOBBER_S10_S30 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S10_S31 "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", \ + "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S11_S12 "s11", "s12" +#define VFP_CLOBBER_S11_S13 "s11", "s12", "s13" +#define VFP_CLOBBER_S11_S14 "s11", "s12", "s13", "s14" +#define VFP_CLOBBER_S11_S15 "s11", "s12", "s13", "s14", "s15" +#define VFP_CLOBBER_S11_S16 "s11", "s12", "s13", "s14", "s15", "s16" +#define VFP_CLOBBER_S11_S17 "s11", "s12", "s13", "s14", "s15", "s16", "s17" +#define VFP_CLOBBER_S11_S18 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18" +#define VFP_CLOBBER_S11_S19 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19" +#define VFP_CLOBBER_S11_S20 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20" +#define VFP_CLOBBER_S11_S21 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21" +#define VFP_CLOBBER_S11_S22 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22" +#define VFP_CLOBBER_S11_S23 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S11_S24 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S11_S25 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S11_S26 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S11_S27 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S11_S28 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ + "s28" +#define VFP_CLOBBER_S11_S29 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ + "s28", "s29" +#define VFP_CLOBBER_S11_S30 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ + "s28", "s29", "s30" +#define VFP_CLOBBER_S11_S31 "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", \ + "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ + "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S12_S13 "s12", "s13" +#define VFP_CLOBBER_S12_S14 "s12", "s13", "s14" +#define VFP_CLOBBER_S12_S15 "s12", "s13", "s14", "s15" +#define VFP_CLOBBER_S12_S16 "s12", "s13", "s14", "s15", "s16" +#define VFP_CLOBBER_S12_S17 "s12", "s13", "s14", "s15", "s16", "s17" +#define VFP_CLOBBER_S12_S18 "s12", "s13", "s14", "s15", "s16", "s17", "s18" +#define VFP_CLOBBER_S12_S19 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19" +#define VFP_CLOBBER_S12_S20 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20" +#define VFP_CLOBBER_S12_S21 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21" +#define VFP_CLOBBER_S12_S22 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22" +#define VFP_CLOBBER_S12_S23 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23" +#define VFP_CLOBBER_S12_S24 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S12_S25 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S12_S26 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S12_S27 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S12_S28 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S12_S29 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ + "s29" +#define VFP_CLOBBER_S12_S30 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ + "s29", "s30" +#define VFP_CLOBBER_S12_S31 "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", \ + "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ + "s29", "s30", "s31" +#define VFP_CLOBBER_S13_S14 "s13", "s14" +#define VFP_CLOBBER_S13_S15 "s13", "s14", "s15" +#define VFP_CLOBBER_S13_S16 "s13", "s14", "s15", "s16" +#define VFP_CLOBBER_S13_S17 "s13", "s14", "s15", "s16", "s17" +#define VFP_CLOBBER_S13_S18 "s13", "s14", "s15", "s16", "s17", "s18" +#define VFP_CLOBBER_S13_S19 "s13", "s14", "s15", "s16", "s17", "s18", "s19" +#define VFP_CLOBBER_S13_S20 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20" +#define VFP_CLOBBER_S13_S21 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21" +#define VFP_CLOBBER_S13_S22 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22" +#define VFP_CLOBBER_S13_S23 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23" +#define VFP_CLOBBER_S13_S24 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24" +#define VFP_CLOBBER_S13_S25 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S13_S26 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S13_S27 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S13_S28 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S13_S29 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S13_S30 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", \ + "s30" +#define VFP_CLOBBER_S13_S31 "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", \ + "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", \ + "s30", "s31" +#define VFP_CLOBBER_S14_S15 "s14", "s15" +#define VFP_CLOBBER_S14_S16 "s14", "s15", "s16" +#define VFP_CLOBBER_S14_S17 "s14", "s15", "s16", "s17" +#define VFP_CLOBBER_S14_S18 "s14", "s15", "s16", "s17", "s18" +#define VFP_CLOBBER_S14_S19 "s14", "s15", "s16", "s17", "s18", "s19" +#define VFP_CLOBBER_S14_S20 "s14", "s15", "s16", "s17", "s18", "s19", "s20" +#define VFP_CLOBBER_S14_S21 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21" +#define VFP_CLOBBER_S14_S22 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S14_S23 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23" +#define VFP_CLOBBER_S14_S24 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24" +#define VFP_CLOBBER_S14_S25 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25" +#define VFP_CLOBBER_S14_S26 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S14_S27 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S14_S28 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S14_S29 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S14_S30 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S14_S31 "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", \ + "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30", \ + "s31" +#define VFP_CLOBBER_S15_S16 "s15", "s16" +#define VFP_CLOBBER_S15_S17 "s15", "s16", "s17" +#define VFP_CLOBBER_S15_S18 "s15", "s16", "s17", "s18" +#define VFP_CLOBBER_S15_S19 "s15", "s16", "s17", "s18", "s19" +#define VFP_CLOBBER_S15_S20 "s15", "s16", "s17", "s18", "s19", "s20" +#define VFP_CLOBBER_S15_S21 "s15", "s16", "s17", "s18", "s19", "s20", "s21" +#define VFP_CLOBBER_S15_S22 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S15_S23 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S15_S24 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24" +#define VFP_CLOBBER_S15_S25 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25" +#define VFP_CLOBBER_S15_S26 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25", "s26" +#define VFP_CLOBBER_S15_S27 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S15_S28 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S15_S29 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S15_S30 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25", "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S15_S31 "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", \ + "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S16_S17 "s16", "s17" +#define VFP_CLOBBER_S16_S18 "s16", "s17", "s18" +#define VFP_CLOBBER_S16_S19 "s16", "s17", "s18", "s19" +#define VFP_CLOBBER_S16_S20 "s16", "s17", "s18", "s19", "s20" +#define VFP_CLOBBER_S16_S21 "s16", "s17", "s18", "s19", "s20", "s21" +#define VFP_CLOBBER_S16_S22 "s16", "s17", "s18", "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S16_S23 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S16_S24 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S16_S25 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25" +#define VFP_CLOBBER_S16_S26 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26" +#define VFP_CLOBBER_S16_S27 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27" +#define VFP_CLOBBER_S16_S28 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S16_S29 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S16_S30 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S16_S31 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", \ + "s25", "s26", "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S17_S18 "s17", "s18" +#define VFP_CLOBBER_S17_S19 "s17", "s18", "s19" +#define VFP_CLOBBER_S17_S20 "s17", "s18", "s19", "s20" +#define VFP_CLOBBER_S17_S21 "s17", "s18", "s19", "s20", "s21" +#define VFP_CLOBBER_S17_S22 "s17", "s18", "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S17_S23 "s17", "s18", "s19", "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S17_S24 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S17_S25 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S17_S26 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26" +#define VFP_CLOBBER_S17_S27 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27" +#define VFP_CLOBBER_S17_S28 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27", "s28" +#define VFP_CLOBBER_S17_S29 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S17_S30 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S17_S31 "s17", "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", \ + "s26", "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S18_S19 "s18", "s19" +#define VFP_CLOBBER_S18_S20 "s18", "s19", "s20" +#define VFP_CLOBBER_S18_S21 "s18", "s19", "s20", "s21" +#define VFP_CLOBBER_S18_S22 "s18", "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S18_S23 "s18", "s19", "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S18_S24 "s18", "s19", "s20", "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S18_S25 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S18_S26 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S18_S27 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27" +#define VFP_CLOBBER_S18_S28 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27", "s28" +#define VFP_CLOBBER_S18_S29 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27", "s28", "s29" +#define VFP_CLOBBER_S18_S30 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S18_S31 "s18", "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", \ + "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S19_S20 "s19", "s20" +#define VFP_CLOBBER_S19_S21 "s19", "s20", "s21" +#define VFP_CLOBBER_S19_S22 "s19", "s20", "s21", "s22" +#define VFP_CLOBBER_S19_S23 "s19", "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S19_S24 "s19", "s20", "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S19_S25 "s19", "s20", "s21", "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S19_S26 "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S19_S27 "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S19_S28 "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ + "s28" +#define VFP_CLOBBER_S19_S29 "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ + "s28", "s29" +#define VFP_CLOBBER_S19_S30 "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ + "s28", "s29", "s30" +#define VFP_CLOBBER_S19_S31 "s19", "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", \ + "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S20_S21 "s20", "s21" +#define VFP_CLOBBER_S20_S22 "s20", "s21", "s22" +#define VFP_CLOBBER_S20_S23 "s20", "s21", "s22", "s23" +#define VFP_CLOBBER_S20_S24 "s20", "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S20_S25 "s20", "s21", "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S20_S26 "s20", "s21", "s22", "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S20_S27 "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S20_S28 "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S20_S29 "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ + "s29" +#define VFP_CLOBBER_S20_S30 "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ + "s29", "s30" +#define VFP_CLOBBER_S20_S31 "s20", "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", \ + "s29", "s30", "s31" +#define VFP_CLOBBER_S21_S22 "s21", "s22" +#define VFP_CLOBBER_S21_S23 "s21", "s22", "s23" +#define VFP_CLOBBER_S21_S24 "s21", "s22", "s23", "s24" +#define VFP_CLOBBER_S21_S25 "s21", "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S21_S26 "s21", "s22", "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S21_S27 "s21", "s22", "s23", "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S21_S28 "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S21_S29 "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S21_S30 "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", \ + "s30" +#define VFP_CLOBBER_S21_S31 "s21", "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", \ + "s30", "s31" +#define VFP_CLOBBER_S22_S23 "s22", "s23" +#define VFP_CLOBBER_S22_S24 "s22", "s23", "s24" +#define VFP_CLOBBER_S22_S25 "s22", "s23", "s24", "s25" +#define VFP_CLOBBER_S22_S26 "s22", "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S22_S27 "s22", "s23", "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S22_S28 "s22", "s23", "s24", "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S22_S29 "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S22_S30 "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S22_S31 "s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30", \ + "s31" +#define VFP_CLOBBER_S23_S24 "s23", "s24" +#define VFP_CLOBBER_S23_S25 "s23", "s24", "s25" +#define VFP_CLOBBER_S23_S26 "s23", "s24", "s25", "s26" +#define VFP_CLOBBER_S23_S27 "s23", "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S23_S28 "s23", "s24", "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S23_S29 "s23", "s24", "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S23_S30 "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S23_S31 "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S24_S25 "s24", "s25" +#define VFP_CLOBBER_S24_S26 "s24", "s25", "s26" +#define VFP_CLOBBER_S24_S27 "s24", "s25", "s26", "s27" +#define VFP_CLOBBER_S24_S28 "s24", "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S24_S29 "s24", "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S24_S30 "s24", "s25", "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S24_S31 "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S25_S26 "s25", "s26" +#define VFP_CLOBBER_S25_S27 "s25", "s26", "s27" +#define VFP_CLOBBER_S25_S28 "s25", "s26", "s27", "s28" +#define VFP_CLOBBER_S25_S29 "s25", "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S25_S30 "s25", "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S25_S31 "s25", "s26", "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S26_S27 "s26", "s27" +#define VFP_CLOBBER_S26_S28 "s26", "s27", "s28" +#define VFP_CLOBBER_S26_S29 "s26", "s27", "s28", "s29" +#define VFP_CLOBBER_S26_S30 "s26", "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S26_S31 "s26", "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S27_S28 "s27", "s28" +#define VFP_CLOBBER_S27_S29 "s27", "s28", "s29" +#define VFP_CLOBBER_S27_S30 "s27", "s28", "s29", "s30" +#define VFP_CLOBBER_S27_S31 "s27", "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S28_S29 "s28", "s29" +#define VFP_CLOBBER_S28_S30 "s28", "s29", "s30" +#define VFP_CLOBBER_S28_S31 "s28", "s29", "s30", "s31" +#define VFP_CLOBBER_S29_S30 "s29", "s30" +#define VFP_CLOBBER_S29_S31 "s29", "s30", "s31" +#define VFP_CLOBBER_S30_S31 "s30", "s31" diff --git a/vfpmathlibrary/vsinf.cpp b/vfpmathlibrary/vsinf.cpp index 19b195b..a986fb5 100644 --- a/vfpmathlibrary/vsinf.cpp +++ b/vfpmathlibrary/vsinf.cpp @@ -1,171 +1,171 @@ -/* - vsinf.cpp - - Created by damien on 8/03/09. - Copyright 2009 Damien Morton. All rights reserved. - - This software is provided 'as-is', without any express or implied warranty. - In no event will the authors be held liable for any damages arising - from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it freely, - subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product documentation - would be appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source distribution. - */ - -#include "vsinf.h" -#include - -float fast_sin(float x); - -inline float abs(float x) { return (x < 0) ? -x : x; } - -float fast_sin(float x) -{ - // fast sin function; maximum error is 0.001 - const float P = 0.225; - - x = x * M_1_PI; - int k = (int) round(x); - x = x - k; - - float y = (4 - 4 * abs(x)) * x; - - y = P * (y * abs(y) - y) + y; - - return (k&1) ? -y : y; -} - - -void vsinf(float *x, float *y, int n) // input x, output y, n multiple of 4 -{ - // source and destination arrays can be the same - const float P = 0.225; - float consts[4] = { M_1_PI, 1.0, 4.0, P}; - const float neg1 = -1.0; - - int a, b, c, d; - - b = (int) consts; - asm volatile ( - "bic %[n], %[n], #3 \n\t" // n has to be a multiple of 4 - lets enforce that (and avoid infinte loops) - "fldmias %[b], {s0-s3} \n\t" // load up our constants - "fldmias %[x]!, {s8-s11} \n\t" // v2 = x // our loop is a little bit overlapped - preload some stuff - - "fmrx %[a], fpscr \n\t" - "stmfd sp!, {%[a]} \n\t" // save fpscr to the stack (dont forget to restore it and the stack pointer) - "bic %[a], %[a], #0x001f \n\t" // for runfast - clear CumulativeException[4:0] bits - "bic %[a], %[a], #0x1f00 \n\t" // for runfast - clear ExceptionTrapEnable[12:8] bits - "orr %[a], %[a], #(0x3 << 24) \n\t" // for runfast - set DefaultNaN[25] and FushToZero[24] bits - "bic %[a], %[a], #(0x37 << 16) \n\t" // clear the vector stride[21:20] and len[18:16] bits - "orr %[a], %[a], #(0x03 << 16) \n\t" // set stride[21:20] to 1(0), vector len[18:16] to 4(3) - "fmxr fpscr, %[a] \n\t" - - "fmuls s8, s8, s0 \n\t" // v3: = x * (1/PI) - - "ftosis s12, s8 \n\t" // v3: k = round(x) - "ftosis s13, s9 \n\t" - "ftosis s14, s10 \n\t" - "ftosis s15, s11 \n\t" - - "fmrrs %[a],%[b], {s12,s13} \n\t" - "fsitos s12, s12 \n\t" // k = (float) k - "fsitos s13, s13 \n\t" - "fmrrs %[c],%[d], {s14,s15} \n\t" - "fsitos s14, s14 \n\t" - "fsitos s15, s15 \n\t" - - "1: \n\t" - - //OOO out of order instructions marked with OOO and are usually suffixed with the ne condition - - "fsubs s8, s8, s12 \n\t" // x = x - k - "fcpys s28, s1 \n\t" // v7 = 1111 - "fcpys s24, s2 \n\t" // OOO v6 = 4444 - - //float x = x * M_1_PI; - //int k = round(x); - //float x = x - k; - - "fstmiasne %[y]!, {s20-s23} \n\t" // OOO: from previous loop - - "tst %[a], #1 \n\t" // if odd(n) then negate result at end - "fmsrne s28, %[neg1] \n\t" // shove a -1 into the appropriate part of v7 - "tst %[b], #1 \n\t" // 4 tests, spread through code - result not needed till end - "fmsrne s29, %[neg1] \n\t" - - "fabss s16, s8 \n\t" // x' = abs(x) - // y = (4 - 4 * abs(x)) * x; - - "tst %[c], #1 \n\t" - "fmsrne s30, %[neg1] \n\t" - - "fnmacs s24, s16, s2 \n\t" // y' = 4 - 4*abs(x) - - "tst %[d], #1 \n\t" - "fmsrne s31, %[neg1] \n\t" - - - "fmuls s16, s24, s8 \n\t" // y' *= x - - "subs %[n], %[n], #4 \n\t" // testing early here - "fldmiasne %[x]!, {s8-s11} \n\t" // v2 = x // our loop is a little bit overlapped - preload some stuff - "pld [%[x],#64] \n\t" // In the ARM1176JZF-S processor, in Non-secure state, the PLD instruction behaves like a NOP. Dammit. - - // y += P * (y * abs(y) - y); - - "fabss s20, s16 \n\t" // v4 = abs(y) - "fcpys s24, s16 \n\t" - - "fmulsne s8, s8, s0 \n\t" // OOO v2 = x * (1/PI) - - "fmscs s16, s16, s20 \n\t" // v3 = -y + y*abs(y) - - "ftosisne s12, s8 \n\t" // OOO v3: k = round(x) - "ftosisne s13, s9 \n\t" - "ftosisne s14, s10 \n\t" - "ftosisne s15, s11 \n\t" - - "fmacs s24, s16, s3 \n\t" // y += P*v3 - - "fmrrsne %[a],%[b], {s12,s13} \n\t" - "fsitosne s12, s12 \n\t" // k = (float) k - "fsitosne s13, s13 \n\t" - "fmrrsne %[c],%[d], {s14,s15} \n\t" - "fsitosne s14, s14 \n\t" - "fsitosne s15, s15 \n\t" - - "fmuls s20, s28, s24 \n\t" // multiply result by +1/-1 according to oddness of n - "bne 1b \n\t" - - "fstmias %[y]!, {s20-s23} \n\t" - "ldmfd sp!, {%[b]} \n\t" // restore the fpscr - "fmxr fpscr, %[b] \n\t" - - - : [x] "+&r" (x), - [y] "+&r" (y), - [n] "+&r" (n), - [neg1] "+&r" (neg1), - [a] "+&r" (a), - [b] "+&r" (b), - [c] "+&r" (c), - [d] "+&r" (d) - : - : "memory", "cc", - "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", - "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", - "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", - "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31" - ); -} +/* + vsinf.cpp + + Created by damien on 8/03/09. + Copyright 2009 Damien Morton. All rights reserved. + + This software is provided 'as-is', without any express or implied warranty. + In no event will the authors be held liable for any damages arising + from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it freely, + subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product documentation + would be appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source distribution. + */ + +#include "vsinf.h" +#include + +float fast_sin(float x); + +inline float abs(float x) { return (x < 0) ? -x : x; } + +float fast_sin(float x) +{ + // fast sin function; maximum error is 0.001 + const float P = 0.225; + + x = x * M_1_PI; + int k = (int) round(x); + x = x - k; + + float y = (4 - 4 * abs(x)) * x; + + y = P * (y * abs(y) - y) + y; + + return (k&1) ? -y : y; +} + + +void vsinf(float *x, float *y, int n) // input x, output y, n multiple of 4 +{ + // source and destination arrays can be the same + const float P = 0.225; + float consts[4] = { M_1_PI, 1.0, 4.0, P}; + const float neg1 = -1.0; + + int a, b, c, d; + + b = (int) consts; + asm volatile ( + "bic %[n], %[n], #3 \n\t" // n has to be a multiple of 4 - lets enforce that (and avoid infinte loops) + "fldmias %[b], {s0-s3} \n\t" // load up our constants + "fldmias %[x]!, {s8-s11} \n\t" // v2 = x // our loop is a little bit overlapped - preload some stuff + + "fmrx %[a], fpscr \n\t" + "stmfd sp!, {%[a]} \n\t" // save fpscr to the stack (dont forget to restore it and the stack pointer) + "bic %[a], %[a], #0x001f \n\t" // for runfast - clear CumulativeException[4:0] bits + "bic %[a], %[a], #0x1f00 \n\t" // for runfast - clear ExceptionTrapEnable[12:8] bits + "orr %[a], %[a], #(0x3 << 24) \n\t" // for runfast - set DefaultNaN[25] and FushToZero[24] bits + "bic %[a], %[a], #(0x37 << 16) \n\t" // clear the vector stride[21:20] and len[18:16] bits + "orr %[a], %[a], #(0x03 << 16) \n\t" // set stride[21:20] to 1(0), vector len[18:16] to 4(3) + "fmxr fpscr, %[a] \n\t" + + "fmuls s8, s8, s0 \n\t" // v3: = x * (1/PI) + + "ftosis s12, s8 \n\t" // v3: k = round(x) + "ftosis s13, s9 \n\t" + "ftosis s14, s10 \n\t" + "ftosis s15, s11 \n\t" + + "fmrrs %[a],%[b], {s12,s13} \n\t" + "fsitos s12, s12 \n\t" // k = (float) k + "fsitos s13, s13 \n\t" + "fmrrs %[c],%[d], {s14,s15} \n\t" + "fsitos s14, s14 \n\t" + "fsitos s15, s15 \n\t" + + "1: \n\t" + + //OOO out of order instructions marked with OOO and are usually suffixed with the ne condition + + "fsubs s8, s8, s12 \n\t" // x = x - k + "fcpys s28, s1 \n\t" // v7 = 1111 + "fcpys s24, s2 \n\t" // OOO v6 = 4444 + + //float x = x * M_1_PI; + //int k = round(x); + //float x = x - k; + + "fstmiasne %[y]!, {s20-s23} \n\t" // OOO: from previous loop + + "tst %[a], #1 \n\t" // if odd(n) then negate result at end + "fmsrne s28, %[neg1] \n\t" // shove a -1 into the appropriate part of v7 + "tst %[b], #1 \n\t" // 4 tests, spread through code - result not needed till end + "fmsrne s29, %[neg1] \n\t" + + "fabss s16, s8 \n\t" // x' = abs(x) + // y = (4 - 4 * abs(x)) * x; + + "tst %[c], #1 \n\t" + "fmsrne s30, %[neg1] \n\t" + + "fnmacs s24, s16, s2 \n\t" // y' = 4 - 4*abs(x) + + "tst %[d], #1 \n\t" + "fmsrne s31, %[neg1] \n\t" + + + "fmuls s16, s24, s8 \n\t" // y' *= x + + "subs %[n], %[n], #4 \n\t" // testing early here + "fldmiasne %[x]!, {s8-s11} \n\t" // v2 = x // our loop is a little bit overlapped - preload some stuff + "pld [%[x],#64] \n\t" // In the ARM1176JZF-S processor, in Non-secure state, the PLD instruction behaves like a NOP. Dammit. + + // y += P * (y * abs(y) - y); + + "fabss s20, s16 \n\t" // v4 = abs(y) + "fcpys s24, s16 \n\t" + + "fmulsne s8, s8, s0 \n\t" // OOO v2 = x * (1/PI) + + "fmscs s16, s16, s20 \n\t" // v3 = -y + y*abs(y) + + "ftosisne s12, s8 \n\t" // OOO v3: k = round(x) + "ftosisne s13, s9 \n\t" + "ftosisne s14, s10 \n\t" + "ftosisne s15, s11 \n\t" + + "fmacs s24, s16, s3 \n\t" // y += P*v3 + + "fmrrsne %[a],%[b], {s12,s13} \n\t" + "fsitosne s12, s12 \n\t" // k = (float) k + "fsitosne s13, s13 \n\t" + "fmrrsne %[c],%[d], {s14,s15} \n\t" + "fsitosne s14, s14 \n\t" + "fsitosne s15, s15 \n\t" + + "fmuls s20, s28, s24 \n\t" // multiply result by +1/-1 according to oddness of n + "bne 1b \n\t" + + "fstmias %[y]!, {s20-s23} \n\t" + "ldmfd sp!, {%[b]} \n\t" // restore the fpscr + "fmxr fpscr, %[b] \n\t" + + + : [x] "+&r" (x), + [y] "+&r" (y), + [n] "+&r" (n), + [neg1] "+&r" (neg1), + [a] "+&r" (a), + [b] "+&r" (b), + [c] "+&r" (c), + [d] "+&r" (d) + : + : "memory", "cc", + "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", + "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", + "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", + "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31" + ); +} diff --git a/vfpmathlibrary/vsinf.h b/vfpmathlibrary/vsinf.h index 2e64e82..f32e047 100644 --- a/vfpmathlibrary/vsinf.h +++ b/vfpmathlibrary/vsinf.h @@ -1,20 +1,20 @@ -/* - * vsinf.h - * TestHarness - * - * Created by damien on 8/03/09. - * Copyright 2009 __MyCompanyName__. All rights reserved. - * - */ - - - -#ifdef __cplusplus -extern "C" { -#endif - - void vsinf(float *x, float *y, int n); - -#ifdef __cplusplus -} -#endif +/* + * vsinf.h + * TestHarness + * + * Created by damien on 8/03/09. + * Copyright 2009 __MyCompanyName__. All rights reserved. + * + */ + + + +#ifdef __cplusplus +extern "C" { +#endif + + void vsinf(float *x, float *y, int n); + +#ifdef __cplusplus +} +#endif diff --git a/vs/GLUT_Window_Template.cpp b/vs/GLUT_Window_Template.cpp index e2f136c..85ffe04 100644 --- a/vs/GLUT_Window_Template.cpp +++ b/vs/GLUT_Window_Template.cpp @@ -1,585 +1,586 @@ -//************************************************************************* -// -// File Name : GLUT Window Template -// Author : Ali BaderEddin -// Date : December 2003 -// -// Description : Openning an OpenGL window using GLUT library... -// -//************************************************************************* - -#include "SEMain.h" -#include "SESceneLoader.h" -#include - -#include "btBulletDynamicsCommon.h" -/* -btDefaultCollisionConfiguration* collisionConfiguration; -btCollisionDispatcher* dispatcher; -btBroadphaseInterface* overlappingPairCache; -btSequentialImpulseConstraintSolver* solver; -btDiscreteDynamicsWorld* dynamicsWorld; -*/ - - -using namespace std; - -// Include GLUT, OpenGL, and GLU libraries -#include - -// Standard Input\Output C Library -#include - -#define DEGREES_TO_RADIANS(__ANGLE__) ((__ANGLE__) / 180.0 * 3.14f) -#include - -vector> mass; - -// Initialization -void init (); - -// Callback functions -void display (void); -void reshape (int w, int h); -void mouse (int button, int state, int x, int y); -void motion (int x, int y); -void pmotion (int x, int y); -void keyboard (unsigned char key, int x, int y); -void special (int key, int x, int y); - -// Support Functions -void centerOnScreen (); -void drawObject (); - -// define the window position on screen -int window_x; -int window_y; - -// variables representing the window size -int window_width = 240; -int window_height = 240; - -// variable representing the window title -sechar *window_title = "GLUT Window Template"; - -// Tells whether to display the window full screen or not -// Press Alt + Esc to exit a full screen. -int full_screen = 0; - -//------------------------------------------------------------------------- -// Set OpenGL program initial state. -//------------------------------------------------------------------------- -void init () -{ - // Set the frame buffer clear color to black. - glClearColor (0.0, 0.0, 0.0, 0.0); - - SELoadDefaultOpenGLSettings(); -} - -//------------------------------------------------------------------------- -// This function is passed to glutDisplayFunc in order to display -// OpenGL contents on the window. -//------------------------------------------------------------------------- - -SEPhysicObjectPtr physicObject1; -SEPhysicObjectPtr physicObject2; - - -void display (void) -{ - SEGLAssert; - - // Clear the window or more specifically the frame buffer... - // This happens by replacing all the contents of the frame - // buffer by the clear color (black in our case) - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glLoadIdentity(); - glTranslatef(0,0,-10); - - - //for (int i=0;i<150;i++) - //{ - SEPhysicWorld::sharedInstance()->world()->stepSimulation(1.f/60.f,10); - - //print positions of all objects - /*for (int j= SEPhysicWorld::sharedInstance()->world()->getNumCollisionObjects()-1; j>=0 ;j--) - { - btCollisionObject* obj = SEPhysicWorld::sharedInstance()->world()->getCollisionObjectArray()[j]; - btRigidBody* body = btRigidBody::upcast(obj); - if (body && body->getMotionState()) - { - btTransform trans; - body->getMotionState()->getWorldTransform(trans); - - if( j == 0 ) - { - glTranslatef( trans.getOrigin().getX(), trans.getOrigin().getY(), trans.getOrigin().getZ() ); - drawObject(); - glTranslatef(-trans.getOrigin().getX(),-trans.getOrigin().getY(),-trans.getOrigin().getZ() ); - - }else if( j == 1 ) - { - glTranslatef( trans.getOrigin().getX(), trans.getOrigin().getY(), trans.getOrigin().getZ() ); - - btQuaternion quatern = trans.getRotation(); - btVector3 vec = quatern.getAxis(); - - float radToGrad = 180.0/3.14; - - //printf("world pos = %f,%f,%f\n",float(trans.getOrigin().getX()),float(trans.getOrigin().getY()),float(trans.getOrigin().getZ())); - printf("world rot = %f,%f,%f,%f\n",quatern.getAngle(),vec.x(), vec.y(), vec.z()); - - - glRotatef( quatern.getAngle()*radToGrad, vec.x(), vec.y(), vec.z() ); - drawObject(); - glRotatef( -quatern.getAngle()*radToGrad, vec.x(), vec.y(), vec.z() ); - - glTranslatef(-trans.getOrigin().getX(),-trans.getOrigin().getY(),-trans.getOrigin().getZ() ); - } - } - }*/ - //} - - // Draw object - - if( physicObject1.get() ) - physicObject1->Draw(); - - if( physicObject2.get() ) - physicObject2->Draw(); - - - glTranslatef(0,0,10); - - // Swap contents of backward and forward frame buffers - glutSwapBuffers (); - glFlush(); - glutPostRedisplay(); -} - -//------------------------------------------------------------------------- -// Draws our object. -//------------------------------------------------------------------------- -void drawObject () -{ - // Show when are displaying an object - //printf ("Displaying object...\n"); - - // Draw Icosahedron - //glutWireIcosahedron (); - - //SEMeshPtr mesh = SEObjectStore::sharedInstance()->GetMesh( "Plane" ); - - //static GLUquadric* quadr = gluNewQuadric(); - - //gluLookAt (0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0); - - //static float angle = 0; - //angle += 0.1f; - - - //static float z = -1; - //z += -0.01f; - - - //glRotatef(angle,1,1,0); - //gluSphere( quadr,5,10,10 ); - - //mesh->Draw(); - - //glRotatef(-angle,1,1,0); -} - -//------------------------------------------------------------------------- -// This function is passed to the glutReshapeFunc and is called -// whenever the window is resized. -//------------------------------------------------------------------------- -void reshape (int w, int h) -{ - // Stay updated with the window width and height - window_width = w; - window_height = h; - - // Reset viewport - glViewport(0, 0, window_width, window_height); - - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - //glOrtho(-10,10,10,-10,-10,10); - //glFrustum (-5.0, 5.0, -5.0, 5.0, 1.5, 200.0); - - -const GLfloat zNear = 0.1; -GLfloat zFar = 100.0; -GLfloat fieldOfView = 60.0; -GLfloat size; - -size = zNear * tanf(DEGREES_TO_RADIANS(fieldOfView) / 2.0); -glFrustum(-size, size, -size / (window_width / window_height), size / (window_width / window_height), zNear, zFar); - - - glMatrixMode (GL_MODELVIEW); - - // Print current width and height on the screen - printf ("Window Width: %d, Window Height: %d.\n", window_width, window_height); -} - -//------------------------------------------------------------------------- -// This function is passed to the glutMouseFunc and is called -// whenever the mouse is clicked. -//------------------------------------------------------------------------- -void mouse (int button, int state, int x, int y) -{ - switch (button) - { - // Left Button Clicked - case GLUT_LEFT_BUTTON: - - switch (state) - { - // Pressed - case GLUT_DOWN: - printf ("Mouse Left Button Pressed (Down)...\n"); - mass.push_back(100); - break; - // Released - case GLUT_UP: - printf ("Mouse Left Button Released (Up)...\n"); - break; - } - - break; - - // Middle Button clicked - case GLUT_MIDDLE_BUTTON: - - switch (state) - { - // Pressed - case GLUT_DOWN: - printf ("Mouse Middle Button Pressed (Down)...\n"); - break; - // Released - case GLUT_UP: - printf ("Mouse Middle Button Released (Up)...\n"); - break; - } - - break; - - // Right Button Clicked - case GLUT_RIGHT_BUTTON: - - switch (state) - { - // Pressed - case GLUT_DOWN: - printf ("Mouse Right Button Pressed (Down)...\n"); - break; - // Released - case GLUT_UP: - printf ("Mouse Right Button Released (Up)...\n"); - break; - } - - break; - - } -} - -//------------------------------------------------------------------------- -// This function is passed to the glutMotionFunc and is called -// whenever the mouse is dragged. -//------------------------------------------------------------------------- -void motion (int x, int y) -{ - // Print the mouse drag position - printf ("Mouse Drag Position: %d, %d.\n", x, y); -} - -//------------------------------------------------------------------------- -// This function is passed to the glutPassiveMotionFunc and is called -// whenever the mouse is moved. -//------------------------------------------------------------------------- -void pmotion (int x, int y) -{ - // Print mouse move positopn - printf ("Mouse Move Position: %d, %d.\n", x, y); -} - -//------------------------------------------------------------------------- -// This function is passed to the glutKeyboardFunc and is called -// whenever the user hits a key. -//------------------------------------------------------------------------- -void keyboard (unsigned char key, int x, int y) -{ - // Print what key the user is hitting - printf ("User is hitting the '%c' key.\n", key); - printf ("ASCII code is %d.\n", key); - - switch (key) - { - // User hits A key - case 'a': - - break; - - // User hits Shift + A key - case 'A': - - break; - - // User hits Enter - case '\r': - printf ("User is hitting the Return key.\n"); - break; - - // User hits Space - case ' ': - printf ("User is hitting the Space key.\n"); - break; - - // User hits back space - case 8: - printf ("User is hitting the Back Space key.\n"); - break; - - // User hits ESC key - case 27: - exit (1); - break; - } - - glutPostRedisplay (); -} - -//------------------------------------------------------------------------- -// This function is passed to the glutSpecialFunc and is called -// whenever the user hits a special key. -//------------------------------------------------------------------------- -void special (int key, int x, int y) -{ - switch (key) - { - case GLUT_KEY_F1 : - printf ("F1 function key.\n"); - break; - case GLUT_KEY_F2 : - printf ("F2 function key. \n"); - break; - case GLUT_KEY_F3 : - printf ("F3 function key. \n"); - break; - case GLUT_KEY_F4 : - printf ("F4 function key. \n"); - break; - case GLUT_KEY_F5 : - printf ("F5 function key. \n"); - break; - case GLUT_KEY_F6 : - printf ("F6 function key. \n"); - break; - case GLUT_KEY_F7 : - printf ("F7 function key. \n"); - break; - case GLUT_KEY_F8 : - printf ("F8 function key. \n"); - break; - case GLUT_KEY_F9 : - printf ("F9 function key. \n"); - break; - case GLUT_KEY_F10 : - printf ("F10 function key. \n"); - break; - case GLUT_KEY_F11 : - printf ("F11 function key. \n"); - break; - case GLUT_KEY_F12 : - printf ("F12 function key. \n"); - break; - case GLUT_KEY_LEFT : - printf ("Left directional key. \n"); - break; - case GLUT_KEY_UP : - printf ("Up directional key. \n"); - break; - case GLUT_KEY_RIGHT : - printf ("Right directional key. \n"); - break; - case GLUT_KEY_DOWN : - printf ("Down directional key. \n"); - break; - case GLUT_KEY_PAGE_UP : - printf ("Page up directional key. \n"); - break; - case GLUT_KEY_PAGE_DOWN : - printf ("Page down directional key. \n"); - break; - case GLUT_KEY_HOME : - printf ("Home directional key. \n"); - break; - case GLUT_KEY_END : - printf ("End directional key. \n"); - break; - case GLUT_KEY_INSERT : - printf ("Inset directional key. \n"); - break; - } - - glutPostRedisplay (); -} - -//------------------------------------------------------------------------- -// This function sets the window x and y coordinates -// such that the window becomes centered -//------------------------------------------------------------------------- -void centerOnScreen () -{ - window_x = (glutGet (GLUT_SCREEN_WIDTH) - window_width)/2; - window_y = (glutGet (GLUT_SCREEN_HEIGHT) - window_height)/2; -} - - -//------------------------------------------------------------------------- -// Program Main method. -//------------------------------------------------------------------------- -SETexturePtr objectTexture; - - - -void main (int argc, sechar **argv) -{ - mass.reserve(8); - - btCollisionConfigurationPtr collisionConfiguration = btCollisionConfigurationPtr( SENewObject() ); - btDispatcherPtr dispatcher = btDispatcherPtr ( SENewObject(collisionConfiguration.get()) ); - btBroadphaseInterfacePtr overlappingPairCache = btBroadphaseInterfacePtr( SENewObject() ); - btConstraintSolverPtr solver = btConstraintSolverPtr( SENewObject() ); - - SEPhysicWorld::sharedInstance()->InitDiscreteDynamicsWorld( dispatcher ,overlappingPairCache, solver, collisionConfiguration ); - SEPhysicWorld::sharedInstance()->world()->setGravity(btVector3(0,-5,0)); - - ///create a few basic rigid bodies - btCollisionShape* groundShape = SENewObject(btVector3(btScalar(1.0),btScalar(1.0),btScalar(1.0))); - - /* - btTriangleMesh* triangleMesh = new btTriangleMesh(); - triangleMesh->addTriangle( - - btCollisionShape = new btBvhTriangleMeshShape( triangleMesh, 1, 1 ); - */ - - - //SEPath* a = (SEPath*) malloc(sizeof(SEPath)); - //a = new(a) SEPath(); - //delete a; - - - // Set the window x and y coordinates such that the - // window becomes centered - centerOnScreen(); - - // Connect to the windowing system + create a window - // with the specified dimensions and position - // + set the display mode + specify the window title. - glutInit(&argc, argv); - glutInitWindowSize (window_width, window_height); - glutInitWindowPosition (window_x, window_y); - - glutInitDisplayMode (GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH); - glutCreateWindow (window_title); - - // View in full screen if the full_screen flag is on - if (full_screen) - glutFullScreen (); - - // Set OpenGL program initial state. - init(); - - // Set the callback functions - glutDisplayFunc (display); - glutReshapeFunc (reshape); - glutMouseFunc (mouse); - glutMotionFunc (motion); - glutPassiveMotionFunc (pmotion); - glutKeyboardFunc (keyboard); - glutSpecialFunc (special); - - - SESceneLoader loader; - SEPath currentPath; - SEPath::CurrentDirectory( ¤tPath ); - currentPath.AppendName( "objects" ); - loader.Load( ¤tPath ); - - - btTransform groundTransform; - groundTransform.setIdentity(); - groundTransform.setOrigin(btVector3(0,0,0)); - - { - btScalar mass(0.0); - - //rigidbody is dynamic if and only if mass is non zero, otherwise static - bool isDynamic = (mass != 0.f); - - btVector3 localInertia(0,0,0); - if (isDynamic) - groundShape->calculateLocalInertia(mass,localInertia); - - //using motionstate is recommended, it provides interpolation capabilities, and only synchronizes 'active' objects - btDefaultMotionState* myMotionState = SENewObject(groundTransform); - btRigidBody::btRigidBodyConstructionInfo rbInfo(mass,myMotionState,groundShape,localInertia); - //btRigidBody* body = new btRigidBody(rbInfo); - - SEMeshPtr mesh = SEObjectStore::sharedInstance()->GetMesh( "Plane" ); - - physicObject1 = SEPhysicObjectPtr(SENewObject()); - physicObject1->Init( mesh, rbInfo ); - - //add the body to the dynamics world - SEPhysicWorld::sharedInstance()->world()->addRigidBody( physicObject1->rigidBody().get() ); - } - - groundTransform.setOrigin(btVector3(0.0,5,1)); - - { - btScalar mass(0.1); - - //rigidbody is dynamic if and only if mass is non zero, otherwise static - bool isDynamic = (mass != 0.f); - - btVector3 localInertia(0,0,0); - if (isDynamic) - groundShape->calculateLocalInertia(mass,localInertia); - - //using motionstate is recommended, it provides interpolation capabilities, and only synchronizes 'active' objects - btDefaultMotionState* myMotionState = SENewObject(groundTransform); - btRigidBody::btRigidBodyConstructionInfo rbInfo(mass,myMotionState,groundShape,localInertia); - - SEMeshPtr mesh = SEObjectStore::sharedInstance()->GetMesh( "Plane" ); - - physicObject2 = SEPhysicObjectPtr(SENewObject()); - physicObject2->Init( mesh, rbInfo ); - - //add the body to the dynamics world - SEPhysicWorld::sharedInstance()->world()->addRigidBody( physicObject2->rigidBody().get() ); - } - - - //SEImageLoader imageLoader; - //SEImagePtr image = imageLoader.Load( "test.jpg" ); - - //SETexturePtr texture( new SETexture ); - //texture->Init( image ); - //texture->Use(); - //objectTexture = texture; - - // Start GLUT event processing loop - glutMainLoop(); - - -} - +//************************************************************************* +// +// File Name : GLUT Window Template +// Author : Ali BaderEddin +// Date : December 2003 +// +// Description : Openning an OpenGL window using GLUT library... +// +//************************************************************************* + +#include "SEMain.h" +#include "SESceneLoader.h" +#include + +#include "btBulletDynamicsCommon.h" +/* +btDefaultCollisionConfiguration* collisionConfiguration; +btCollisionDispatcher* dispatcher; +btBroadphaseInterface* overlappingPairCache; +btSequentialImpulseConstraintSolver* solver; +btDiscreteDynamicsWorld* dynamicsWorld; +*/ + + +using namespace std; + +// Include GLUT, OpenGL, and GLU libraries +#include + +// Standard Input\Output C Library +#include + +#define DEGREES_TO_RADIANS(__ANGLE__) ((__ANGLE__) / 180.0 * 3.14f) +#include + +vector> mass; + +// Initialization +void init (); + +// Callback functions +void display (void); +void reshape (int w, int h); +void mouse (int button, int state, int x, int y); +void motion (int x, int y); +void pmotion (int x, int y); +void keyboard (unsigned char key, int x, int y); +void special (int key, int x, int y); + +// Support Functions +void centerOnScreen (); +void drawObject (); + +// define the window position on screen +int window_x; +int window_y; + +// variables representing the window size +int window_width = 240; +int window_height = 240; + +// variable representing the window title +sechar *window_title = "GLUT Window Template"; + +// Tells whether to display the window full screen or not +// Press Alt + Esc to exit a full screen. +int full_screen = 0; + +//------------------------------------------------------------------------- +// Set OpenGL program initial state. +//------------------------------------------------------------------------- +void init () +{ + // Set the frame buffer clear color to black. + glClearColor (0.0, 0.0, 0.0, 0.0); + + SELoadDefaultOpenGLSettings(); +} + +//------------------------------------------------------------------------- +// This function is passed to glutDisplayFunc in order to display +// OpenGL contents on the window. +//------------------------------------------------------------------------- + +SEPhysicObjectPtr physicObject1; +SEPhysicObjectPtr physicObject2; + + +void display (void) +{ + SEGLAssert; + + // Clear the window or more specifically the frame buffer... + // This happens by replacing all the contents of the frame + // buffer by the clear color (black in our case) + glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glLoadIdentity(); + glTranslatef(0,0,-10); + + + //for (int i=0;i<150;i++) + //{ + SEPhysicWorld::sharedInstance()->world()->stepSimulation(1.f/60.f,10); + + //print positions of all objects + /*for (int j= SEPhysicWorld::sharedInstance()->world()->getNumCollisionObjects()-1; j>=0 ;j--) + { + btCollisionObject* obj = SEPhysicWorld::sharedInstance()->world()->getCollisionObjectArray()[j]; + btRigidBody* body = btRigidBody::upcast(obj); + if (body && body->getMotionState()) + { + btTransform trans; + body->getMotionState()->getWorldTransform(trans); + + if( j == 0 ) + { + glTranslatef( trans.getOrigin().getX(), trans.getOrigin().getY(), trans.getOrigin().getZ() ); + drawObject(); + glTranslatef(-trans.getOrigin().getX(),-trans.getOrigin().getY(),-trans.getOrigin().getZ() ); + + }else if( j == 1 ) + { + glTranslatef( trans.getOrigin().getX(), trans.getOrigin().getY(), trans.getOrigin().getZ() ); + + btQuaternion quatern = trans.getRotation(); + btVector3 vec = quatern.getAxis(); + + float radToGrad = 180.0/3.14; + + //printf("world pos = %f,%f,%f\n",float(trans.getOrigin().getX()),float(trans.getOrigin().getY()),float(trans.getOrigin().getZ())); + printf("world rot = %f,%f,%f,%f\n",quatern.getAngle(),vec.x(), vec.y(), vec.z()); + + + glRotatef( quatern.getAngle()*radToGrad, vec.x(), vec.y(), vec.z() ); + drawObject(); + glRotatef( -quatern.getAngle()*radToGrad, vec.x(), vec.y(), vec.z() ); + + glTranslatef(-trans.getOrigin().getX(),-trans.getOrigin().getY(),-trans.getOrigin().getZ() ); + } + } + }*/ + //} + + // Draw object + + if( physicObject1.get() ) + physicObject1->Draw(); + + if( physicObject2.get() ) + physicObject2->Draw(); + + + glTranslatef(0,0,10); + + // Swap contents of backward and forward frame buffers + glutSwapBuffers (); + glFlush(); + glutPostRedisplay(); +} + +//------------------------------------------------------------------------- +// Draws our object. +//------------------------------------------------------------------------- +void drawObject () +{ + // Show when are displaying an object + //printf ("Displaying object...\n"); + + // Draw Icosahedron + //glutWireIcosahedron (); + + //SEMeshPtr mesh = SEObjectStore::sharedInstance()->GetMesh( "Plane" ); + + //static GLUquadric* quadr = gluNewQuadric(); + + //gluLookAt (0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0); + + //static float angle = 0; + //angle += 0.1f; + + + //static float z = -1; + //z += -0.01f; + + + //glRotatef(angle,1,1,0); + //gluSphere( quadr,5,10,10 ); + + //mesh->Draw(); + + //glRotatef(-angle,1,1,0); +} + +//------------------------------------------------------------------------- +// This function is passed to the glutReshapeFunc and is called +// whenever the window is resized. +//------------------------------------------------------------------------- +void reshape (int w, int h) +{ + // Stay updated with the window width and height + window_width = w; + window_height = h; + + // Reset viewport + glViewport(0, 0, window_width, window_height); + + glMatrixMode (GL_PROJECTION); + glLoadIdentity (); + //glOrtho(-10,10,10,-10,-10,10); + //glFrustum (-5.0, 5.0, -5.0, 5.0, 1.5, 200.0); + + +const GLfloat zNear = 0.1; +GLfloat zFar = 100.0; +GLfloat fieldOfView = 60.0; +GLfloat size; + +size = zNear * tanf(DEGREES_TO_RADIANS(fieldOfView) / 2.0); +glFrustum(-size, size, -size / (window_width / window_height), size / (window_width / window_height), zNear, zFar); + + + glMatrixMode (GL_MODELVIEW); + + // Print current width and height on the screen + printf ("Window Width: %d, Window Height: %d.\n", window_width, window_height); +} + +//------------------------------------------------------------------------- +// This function is passed to the glutMouseFunc and is called +// whenever the mouse is clicked. +//------------------------------------------------------------------------- +void mouse (int button, int state, int x, int y) +{ + switch (button) + { + // Left Button Clicked + case GLUT_LEFT_BUTTON: + + switch (state) + { + // Pressed + case GLUT_DOWN: + printf ("Mouse Left Button Pressed (Down)...\n"); + mass.push_back(100); + break; + // Released + case GLUT_UP: + printf ("Mouse Left Button Released (Up)...\n"); + break; + } + + break; + + // Middle Button clicked + case GLUT_MIDDLE_BUTTON: + + switch (state) + { + // Pressed + case GLUT_DOWN: + printf ("Mouse Middle Button Pressed (Down)...\n"); + break; + // Released + case GLUT_UP: + printf ("Mouse Middle Button Released (Up)...\n"); + break; + } + + break; + + // Right Button Clicked + case GLUT_RIGHT_BUTTON: + + switch (state) + { + // Pressed + case GLUT_DOWN: + printf ("Mouse Right Button Pressed (Down)...\n"); + break; + // Released + case GLUT_UP: + printf ("Mouse Right Button Released (Up)...\n"); + break; + } + + break; + + } +} + +//------------------------------------------------------------------------- +// This function is passed to the glutMotionFunc and is called +// whenever the mouse is dragged. +//------------------------------------------------------------------------- +void motion (int x, int y) +{ + // Print the mouse drag position + printf ("Mouse Drag Position: %d, %d.\n", x, y); +} + +//------------------------------------------------------------------------- +// This function is passed to the glutPassiveMotionFunc and is called +// whenever the mouse is moved. +//------------------------------------------------------------------------- +void pmotion (int x, int y) +{ + // Print mouse move positopn + printf ("Mouse Move Position: %d, %d.\n", x, y); +} + +//------------------------------------------------------------------------- +// This function is passed to the glutKeyboardFunc and is called +// whenever the user hits a key. +//------------------------------------------------------------------------- +void keyboard (unsigned char key, int x, int y) +{ + // Print what key the user is hitting + printf ("User is hitting the '%c' key.\n", key); + printf ("ASCII code is %d.\n", key); + + switch (key) + { + // User hits A key + case 'a': + + break; + + // User hits Shift + A key + case 'A': + + break; + + // User hits Enter + case '\r': + printf ("User is hitting the Return key.\n"); + break; + + // User hits Space + case ' ': + printf ("User is hitting the Space key.\n"); + break; + + // User hits back space + case 8: + printf ("User is hitting the Back Space key.\n"); + break; + + // User hits ESC key + case 27: + exit (1); + break; + } + + glutPostRedisplay (); +} + +//------------------------------------------------------------------------- +// This function is passed to the glutSpecialFunc and is called +// whenever the user hits a special key. +//------------------------------------------------------------------------- +void special (int key, int x, int y) +{ + switch (key) + { + case GLUT_KEY_F1 : + printf ("F1 function key.\n"); + break; + case GLUT_KEY_F2 : + printf ("F2 function key. \n"); + break; + case GLUT_KEY_F3 : + printf ("F3 function key. \n"); + break; + case GLUT_KEY_F4 : + printf ("F4 function key. \n"); + break; + case GLUT_KEY_F5 : + printf ("F5 function key. \n"); + break; + case GLUT_KEY_F6 : + printf ("F6 function key. \n"); + break; + case GLUT_KEY_F7 : + printf ("F7 function key. \n"); + break; + case GLUT_KEY_F8 : + printf ("F8 function key. \n"); + break; + case GLUT_KEY_F9 : + printf ("F9 function key. \n"); + break; + case GLUT_KEY_F10 : + printf ("F10 function key. \n"); + break; + case GLUT_KEY_F11 : + printf ("F11 function key. \n"); + break; + case GLUT_KEY_F12 : + printf ("F12 function key. \n"); + break; + case GLUT_KEY_LEFT : + printf ("Left directional key. \n"); + break; + case GLUT_KEY_UP : + printf ("Up directional key. \n"); + break; + case GLUT_KEY_RIGHT : + printf ("Right directional key. \n"); + break; + case GLUT_KEY_DOWN : + printf ("Down directional key. \n"); + break; + case GLUT_KEY_PAGE_UP : + printf ("Page up directional key. \n"); + break; + case GLUT_KEY_PAGE_DOWN : + printf ("Page down directional key. \n"); + break; + case GLUT_KEY_HOME : + printf ("Home directional key. \n"); + break; + case GLUT_KEY_END : + printf ("End directional key. \n"); + break; + case GLUT_KEY_INSERT : + printf ("Inset directional key. \n"); + break; + } + + glutPostRedisplay (); +} + +//------------------------------------------------------------------------- +// This function sets the window x and y coordinates +// such that the window becomes centered +//------------------------------------------------------------------------- +void centerOnScreen () +{ + window_x = (glutGet (GLUT_SCREEN_WIDTH) - window_width)/2; + window_y = (glutGet (GLUT_SCREEN_HEIGHT) - window_height)/2; +} + + +//------------------------------------------------------------------------- +// Program Main method. +//------------------------------------------------------------------------- +SETexturePtr objectTexture; + + + +void main (int argc, sechar **argv) +{ + mass.reserve(8); + + btCollisionConfigurationPtr collisionConfiguration = btCollisionConfigurationPtr( SENewObject() ); + btDispatcherPtr dispatcher = btDispatcherPtr ( SENewObject(collisionConfiguration.get()) ); + btBroadphaseInterfacePtr overlappingPairCache = btBroadphaseInterfacePtr( SENewObject() ); + btConstraintSolverPtr solver = btConstraintSolverPtr( SENewObject() ); + + SEPhysicWorld::sharedInstance()->InitDiscreteDynamicsWorld( dispatcher ,overlappingPairCache, solver, collisionConfiguration ); + SEPhysicWorld::sharedInstance()->world()->setGravity(btVector3(0,-5,0)); + + /* + btTriangleMesh* triangleMesh = new btTriangleMesh(); + triangleMesh->addTriangle( + + btCollisionShape = new btBvhTriangleMeshShape( triangleMesh, 1, 1 ); + */ + + + //SEPath* a = (SEPath*) malloc(sizeof(SEPath)); + //a = new(a) SEPath(); + //delete a; + + + // Set the window x and y coordinates such that the + // window becomes centered + centerOnScreen(); + + // Connect to the windowing system + create a window + // with the specified dimensions and position + // + set the display mode + specify the window title. + glutInit(&argc, argv); + glutInitWindowSize (window_width, window_height); + glutInitWindowPosition (window_x, window_y); + + glutInitDisplayMode (GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH); + glutCreateWindow (window_title); + + // View in full screen if the full_screen flag is on + if (full_screen) + glutFullScreen (); + + // Set OpenGL program initial state. + init(); + + // Set the callback functions + glutDisplayFunc (display); + glutReshapeFunc (reshape); + glutMouseFunc (mouse); + glutMotionFunc (motion); + glutPassiveMotionFunc (pmotion); + glutKeyboardFunc (keyboard); + glutSpecialFunc (special); + + + SESceneLoader loader; + SEPath currentPath; + SEPath::CurrentDirectory( ¤tPath ); + currentPath.AppendName( "objects" ); + loader.Load( ¤tPath ); + + + ///create a few basic rigid bodies + btCollisionShape* groundShape = SENewObject(btVector3(btScalar(1.0),btScalar(1.0),btScalar(1.0))); + + + btTransform groundTransform; + groundTransform.setIdentity(); + groundTransform.setOrigin(btVector3(0,0,0)); + + { + btScalar mass(0.0); + + //rigidbody is dynamic if and only if mass is non zero, otherwise static + bool isDynamic = (mass != 0.f); + + btVector3 localInertia(0,0,0); + if (isDynamic) + groundShape->calculateLocalInertia(mass,localInertia); + + //using motionstate is recommended, it provides interpolation capabilities, and only synchronizes 'active' objects + btDefaultMotionState* myMotionState = SENewObject(groundTransform); + btRigidBody::btRigidBodyConstructionInfo rbInfo(mass,myMotionState,groundShape,localInertia); + //btRigidBody* body = new btRigidBody(rbInfo); + + SEMeshPtr mesh = SEObjectStore::sharedInstance()->GetMesh( "Plane" ); + + physicObject1 = SEPhysicObjectPtr(SENewObject()); + physicObject1->Init( mesh, rbInfo ); + + //add the body to the dynamics world + SEPhysicWorld::sharedInstance()->world()->addRigidBody( physicObject1->rigidBody().get() ); + } + + groundTransform.setOrigin(btVector3(0.0,5,1)); + + { + btScalar mass(0.1); + + //rigidbody is dynamic if and only if mass is non zero, otherwise static + bool isDynamic = (mass != 0.f); + + btVector3 localInertia(0,0,0); + if (isDynamic) + groundShape->calculateLocalInertia(mass,localInertia); + + //using motionstate is recommended, it provides interpolation capabilities, and only synchronizes 'active' objects + btDefaultMotionState* myMotionState = SENewObject(groundTransform); + btRigidBody::btRigidBodyConstructionInfo rbInfo(mass,myMotionState,groundShape,localInertia); + + SEMeshPtr mesh = SEObjectStore::sharedInstance()->GetMesh( "Plane" ); + + physicObject2 = SEPhysicObjectPtr(SENewObject()); + physicObject2->Init( mesh, rbInfo ); + + //add the body to the dynamics world + SEPhysicWorld::sharedInstance()->world()->addRigidBody( physicObject2->rigidBody().get() ); + } + + + //SEImageLoader imageLoader; + //SEImagePtr image = imageLoader.Load( "test.jpg" ); + + //SETexturePtr texture( new SETexture ); + //texture->Init( image ); + //texture->Use(); + //objectTexture = texture; + + // Start GLUT event processing loop + glutMainLoop(); + + +} + diff --git a/vs/GLUT_Window_Template.ncb b/vs/GLUT_Window_Template.ncb index 5a22666..7254781 100644 Binary files a/vs/GLUT_Window_Template.ncb and b/vs/GLUT_Window_Template.ncb differ diff --git a/vs/GLUT_Window_Template.suo b/vs/GLUT_Window_Template.suo index 45a2a66..7012616 100644 Binary files a/vs/GLUT_Window_Template.suo and b/vs/GLUT_Window_Template.suo differ diff --git a/vs/GLUT_Window_Template.vcproj b/vs/GLUT_Window_Template.vcproj index fc835ae..0623921 100644 --- a/vs/GLUT_Window_Template.vcproj +++ b/vs/GLUT_Window_Template.vcproj @@ -1,455 +1,455 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vs/GLUT_Window_Template.vcproj.YOUR-EF7235B5E4.ALEX.user b/vs/GLUT_Window_Template.vcproj.YOUR-EF7235B5E4.ALEX.user index de2d88b..483a70d 100644 --- a/vs/GLUT_Window_Template.vcproj.YOUR-EF7235B5E4.ALEX.user +++ b/vs/GLUT_Window_Template.vcproj.YOUR-EF7235B5E4.ALEX.user @@ -1,65 +1,65 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/vs/objects/materials/Material.002 b/vs/objects/materials/Material.002 index 8986b50..b5475f8 100644 --- a/vs/objects/materials/Material.002 +++ b/vs/objects/materials/Material.002 @@ -1,6 +1,6 @@ -type Material -name Material.002 -texture -path ..\images\test.jpg -end -end +type Material +name Material.002 +texture +path ..\images\test.jpg +end +end diff --git a/vs/objects/meshes/Plane b/vs/objects/meshes/Plane index d4685b8..9856557 100644 --- a/vs/objects/meshes/Plane +++ b/vs/objects/meshes/Plane @@ -1,910 +1,910 @@ -type Mesh -name Plane -vertexCount 236 -vert 0.500000 1.000000 0.000000 -vert 0.000000 1.000000 0.000000 -vert 0.500000 1.000000 0.500000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 0.999999 1.000000 -vert 0.500000 1.000000 -0.500000 -vert 0.000000 1.000000 -0.500000 -vert 0.000000 1.000000 -1.000000 -vert -0.500000 1.000000 -1.000000 -vert -1.000000 1.000000 -1.000000 -vert -0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 -1.000000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 1.000000 -1.000000 -vert 0.000000 1.000000 0.500000 -vert 0.000000 1.000000 1.000000 -vert 0.500000 1.000000 1.000000 -vert -0.500000 1.000000 0.000000 -vert -0.500000 1.000000 0.500000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 1.000000 1.000000 -vert -0.500000 1.000000 1.000000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 -0.500000 0.000000 -vert -1.000000 0.000000 0.000000 -vert -1.000000 -0.500000 -0.500000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 0.000000 -vert -1.000000 -1.000000 -1.000000 -vert -1.000000 -0.500000 0.500000 -vert -1.000000 0.000000 0.500000 -vert -1.000000 0.000000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 -1.000000 0.500000 -vert -1.000000 -1.000000 1.000000 -vert -1.000000 0.000000 -0.500000 -vert -1.000000 0.000000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -1.000000 0.500000 0.000000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 0.500000 -1.000000 -vert 0.500000 -1.000000 -0.500000 -vert -0.000000 -1.000000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 -1.000000 -vert 0.500000 -1.000000 0.000000 -vert -0.000000 -1.000000 -0.500000 -vert -0.000000 -1.000000 0.000000 -vert -0.500000 -1.000000 -0.500000 -vert -0.500000 -1.000000 -1.000000 -vert 0.499999 -1.000000 0.500000 -vert 1.000000 -1.000000 0.500000 -vert 0.999999 -1.000001 1.000000 -vert -0.000000 -1.000000 0.500000 -vert 0.499999 -1.000000 1.000000 -vert -0.000001 -1.000000 1.000000 -vert -0.500000 -1.000000 0.500000 -vert -0.500000 -1.000000 0.000000 -vert -0.500000 -1.000000 1.000000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 -0.000000 -1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 0.500000 0.000000 -vert 1.000000 -0.000000 -0.500000 -vert 1.000000 -0.000000 0.000000 -vert 1.000000 -0.500000 -0.500000 -vert 1.000000 -0.500000 -1.000000 -vert 1.000000 0.500000 0.500000 -vert 1.000000 -0.000000 0.500000 -vert 1.000000 0.499999 1.000000 -vert 1.000000 -0.000001 1.000000 -vert 1.000000 -0.500000 0.500000 -vert 1.000000 -0.500000 0.000000 -vert 1.000000 -0.500001 1.000000 -vert 0.500000 0.500000 1.000000 -vert -0.000000 0.500000 1.000000 -vert 0.500000 -0.000000 1.000000 -vert -0.000000 -0.000000 1.000000 -vert 0.500000 -0.500000 1.000000 -vert -0.500000 0.500000 1.000000 -vert -0.500000 -0.000000 1.000000 -vert -0.500000 -0.500000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert 0.500000 0.000000 -1.000000 -vert -0.000000 0.000000 -1.000000 -vert 0.500000 0.500000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert -0.000000 -0.500000 -1.000000 -vert -0.500000 -0.500000 -1.000000 -vert 0.000000 0.500000 -1.000000 -vert -0.500000 0.000000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert 0.500000 1.000000 0.000000 -vert 0.500000 1.000000 0.000000 -vert 0.500000 1.000000 0.000000 -vert 0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 -0.500000 -vert 0.500000 1.000000 0.500000 -vert 0.500000 1.000000 0.500000 -vert 0.500000 1.000000 0.500000 -vert -1.000000 1.000000 1.000000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 1.000000 -1.000000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 1.000000 -0.500000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 0.500000 -0.500000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 1.000000 0.000000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 1.000000 1.000000 -vert -1.000000 1.000000 0.500000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 0.500000 0.500000 -vert -1.000000 -1.000000 0.000000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 0.000000 -vert -1.000000 -1.000000 -0.500000 -vert -1.000000 -1.000000 0.500000 -vert -1.000000 -1.000000 0.000000 -vert -0.500000 -1.000000 0.500000 -vert -0.500000 -1.000000 0.500000 -vert -1.000000 -1.000000 0.500000 -vert -1.000000 -1.000000 0.500000 -vert -0.500000 -1.000000 0.500000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 1.000000 -1.000000 -vert 1.000000 1.000000 -0.500000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 0.500000 -0.500000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 0.999999 1.000000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 1.000000 0.500000 -vert 1.000000 1.000000 0.000000 -vert 1.000000 0.999999 1.000000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 -0.500000 -vert 1.000000 -1.000000 0.500000 -vert 1.000000 -1.000000 0.000000 -vert 1.000000 -1.000000 0.500000 -vert 1.000000 -1.000000 0.500000 -vert 1.000000 -0.000001 1.000000 -vert 1.000000 0.499999 1.000000 -vert 1.000000 0.499999 1.000000 -vert 0.500000 1.000000 1.000000 -vert 0.500000 1.000000 1.000000 -vert 0.500000 1.000000 1.000000 -vert 1.000000 0.499999 1.000000 -vert 0.500000 0.500000 1.000000 -vert 0.500000 0.500000 1.000000 -vert 1.000000 -0.000001 1.000000 -vert 0.500000 0.500000 1.000000 -vert 1.000000 -0.500001 1.000000 -vert 1.000000 -0.500001 1.000000 -vert 1.000000 -0.500001 1.000000 -vert 1.000000 -0.000001 1.000000 -vert -0.500000 1.000000 1.000000 -vert -0.500000 1.000000 1.000000 -vert -0.500000 1.000000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.000000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.500000 1.000000 -vert -1.000000 0.000000 1.000000 -vert 0.499999 -1.000000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert 0.499999 -1.000000 1.000000 -vert 0.499999 -1.000000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert -0.000000 -0.500000 1.000000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 -0.500000 1.000000 -vert -1.000000 0.000000 1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 -0.000000 -1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 0.500000 -1.000000 -vert 1.000000 -0.000000 -1.000000 -vert -0.000000 -1.000000 -1.000000 -vert -0.500000 -1.000000 -1.000000 -vert -1.000000 -1.000000 -1.000000 -vert -0.500000 -1.000000 -1.000000 -vert -0.000000 -1.000000 -1.000000 -vert -0.500000 -1.000000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert -0.000000 -1.000000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert 1.000000 -0.500000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert 1.000000 -1.000000 -1.000000 -vert 0.500000 -1.000000 -1.000000 -vert 1.000000 -0.500000 -1.000000 -vert 1.000000 -0.500000 -1.000000 -vert 0.500000 -0.500000 -1.000000 -vert 1.000000 -0.000000 -1.000000 -vert 0.500000 1.000000 -1.000000 -vert 0.500000 1.000000 -1.000000 -vert 0.500000 1.000000 -1.000000 -vert -1.000000 0.000000 -1.000000 -vert -1.000000 0.500000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert -1.000000 0.500000 -1.000000 -vert -1.000000 0.000000 -1.000000 -vert -1.000000 0.500000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert -0.500000 0.500000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -1.000000 0.000000 -1.000000 -vert -0.500000 -0.500000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -1.000000 -1.000000 -1.000000 -vert -1.000000 -0.500000 -1.000000 -vert -0.500000 -0.500000 -1.000000 -vert -0.500000 -0.500000 -1.000000 - -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.666646 0.666646 0.333323 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 0.707083 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm -0.408246 0.816492 -0.408246 -norm 0.000000 1.000000 0.000000 -norm 0.000000 0.707083 -0.707083 -norm 0.707083 0.707083 0.000000 -norm 0.408246 0.408246 -0.816492 -norm 0.000000 1.000000 0.000000 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.666646 0.333323 0.666646 -norm 0.000000 0.707083 0.707083 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.577349 -0.577349 -0.577349 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 0.707083 -norm -0.707083 -0.707083 0.000000 -norm -0.577349 -0.577349 0.577349 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.816492 -0.408246 -0.408246 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -1.000000 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.333323 -0.666646 0.666646 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -0.707083 0.707083 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 -0.707083 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm 0.000000 1.000000 0.000000 -norm -0.666646 0.333323 0.666646 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.408246 0.816492 -0.408246 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 0.707083 0.000000 -norm -0.666646 0.333323 0.666646 -norm -0.707083 0.707083 0.000000 -norm -1.000000 0.000000 0.000000 -norm -1.000000 0.000000 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.000000 -1.000000 0.000000 -norm -0.707083 -0.707083 0.000000 -norm -0.707083 -0.707083 0.000000 -norm 0.000000 -1.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.408246 0.408246 -0.816492 -norm 0.707083 0.707083 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 1.000000 0.000000 0.000000 -norm 1.000000 0.000000 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.666646 0.666646 0.333323 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.707083 0.707083 0.000000 -norm 0.666646 0.666646 0.333323 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 -0.707083 0.000000 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.707083 0.000000 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm 0.000000 0.707083 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 -0.707083 0.707083 -norm 0.000000 0.000000 1.000000 -norm 0.000000 0.000000 1.000000 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm -0.707083 0.000000 0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm -0.577349 -0.577349 -0.577349 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 -0.707083 -0.707083 -norm 0.816492 -0.408246 -0.408246 -norm 0.000000 -0.707083 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.707083 0.000000 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm 0.000000 0.707083 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm -0.707083 0.000000 -0.707083 -norm -0.577349 -0.577349 -0.577349 -norm -0.707083 0.000000 -0.707083 -norm 0.000000 0.000000 -1.000000 -norm 0.000000 0.000000 -1.000000 - -uv 0.437500 0.625000 -uv 0.375000 0.625000 -uv 0.437500 0.562500 -uv 0.500000 0.562500 -uv 0.500000 0.625000 -uv 0.500000 0.500000 -uv 0.437500 0.687500 -uv 0.375000 0.687500 -uv 0.375000 0.750000 -uv 0.312500 0.750000 -uv 0.250000 0.750000 -uv 0.312500 0.687500 -uv 0.437500 0.750000 -uv 0.500000 0.687500 -uv 0.500000 0.750000 -uv 0.375000 0.562500 -uv 0.375000 0.500000 -uv 0.437500 0.500000 -uv 0.312500 0.625000 -uv 0.312500 0.562500 -uv 0.250000 0.625000 -uv 0.249999 0.562500 -uv 0.249999 0.500000 -uv 0.312499 0.500000 -uv 0.250000 0.687500 -uv 0.187500 0.125000 -uv 0.125000 0.125000 -uv 0.187500 0.062500 -uv 0.250000 0.062500 -uv 0.250000 0.125000 -uv 0.250000 0.000000 -uv 0.187500 0.187500 -uv 0.125000 0.187500 -uv 0.125000 0.250000 -uv 0.062500 0.250000 -uv 0.062500 0.187500 -uv 0.187500 0.250000 -uv 0.249999 0.187500 -uv 0.249999 0.250000 -uv 0.125000 0.062500 -uv 0.125000 0.000000 -uv 0.187500 0.000000 -uv 0.062500 0.125000 -uv 0.062500 0.062500 -uv 0.062500 0.000000 -uv 0.437499 0.062500 -uv 0.374999 0.000000 -uv 0.437499 0.000000 -uv 0.499999 0.062500 -uv 0.499999 0.125000 -uv 0.499999 0.000000 -uv 0.437499 0.125000 -uv 0.374999 0.062500 -uv 0.374999 0.125000 -uv 0.312499 0.062500 -uv 0.312499 0.000000 -uv 0.437499 0.187500 -uv 0.499999 0.187500 -uv 0.499999 0.250000 -uv 0.374999 0.187500 -uv 0.437499 0.250000 -uv 0.374999 0.250000 -uv 0.312499 0.187500 -uv 0.312499 0.125000 -uv 0.312499 0.250000 -uv 0.687499 0.062500 -uv 0.624999 0.000000 -uv 0.687499 0.000000 -uv 0.687499 0.125000 -uv 0.624999 0.062500 -uv 0.624999 0.125000 -uv 0.562499 0.062500 -uv 0.562499 0.000000 -uv 0.687499 0.187500 -uv 0.624999 0.187500 -uv 0.687499 0.250000 -uv 0.624999 0.250000 -uv 0.562499 0.187500 -uv 0.562499 0.125000 -uv 0.562499 0.250000 -uv 0.437499 0.437500 -uv 0.374999 0.437500 -uv 0.437499 0.375000 -uv 0.374999 0.375000 -uv 0.437499 0.312500 -uv 0.312499 0.437500 -uv 0.312499 0.375000 -uv 0.312499 0.312500 -uv 0.374999 0.312500 -uv 0.437500 0.875000 -uv 0.375000 0.875000 -uv 0.437500 0.812500 -uv 0.437500 0.937500 -uv 0.375000 0.937500 -uv 0.312500 0.937500 -uv 0.375000 0.812500 -uv 0.312500 0.875000 -uv 0.312500 0.812500 -uv 0.437500 0.625000 -uv 0.437500 0.625000 -uv 0.437500 0.625000 -uv 0.437500 0.687500 -uv 0.437500 0.687500 -uv 0.437500 0.687500 -uv 0.437500 0.562500 -uv 0.437500 0.562500 -uv 0.437500 0.562500 -uv 0.000000 0.250000 -uv -0.000000 0.125000 -uv 0.000000 0.062500 -uv 0.000000 0.000000 -uv 0.062500 0.062500 -uv 0.000000 0.062500 -uv -0.000000 0.125000 -uv 0.000000 0.062500 -uv 0.062500 0.062500 -uv 0.062500 0.062500 -uv -0.000000 0.187500 -uv -0.000000 0.125000 -uv 0.062500 0.187500 -uv -0.000000 0.187500 -uv 0.000000 0.250000 -uv -0.000000 0.187500 -uv 0.062500 0.187500 -uv 0.062500 0.187500 -uv 0.249999 0.125000 -uv 0.249999 0.062500 -uv 0.249999 0.062500 -uv 0.249999 0.125000 -uv 0.249999 0.062500 -uv 0.249999 0.187500 -uv 0.249999 0.125000 -uv 0.312499 0.187500 -uv 0.312499 0.187500 -uv 0.249999 0.187500 -uv 0.249999 0.187500 -uv 0.312499 0.187500 -uv 0.749999 0.062500 -uv 0.749999 0.125000 -uv 0.749999 0.062500 -uv 0.749999 0.000000 -uv 0.749999 0.062500 -uv 0.687499 0.062500 -uv 0.749999 0.125000 -uv 0.687499 0.062500 -uv 0.687499 0.062500 -uv 0.749999 0.187500 -uv 0.749999 0.250000 -uv 0.749999 0.187500 -uv 0.749999 0.187500 -uv 0.749999 0.125000 -uv 0.749999 0.250000 -uv 0.499999 0.125000 -uv 0.499999 0.062500 -uv 0.499999 0.062500 -uv 0.499999 0.125000 -uv 0.499999 0.062500 -uv 0.499999 0.187500 -uv 0.499999 0.125000 -uv 0.499999 0.187500 -uv 0.499999 0.187500 -uv 0.499999 0.375000 -uv 0.500000 0.437500 -uv 0.500000 0.437500 -uv 0.437500 0.500000 -uv 0.437500 0.500000 -uv 0.437500 0.500000 -uv 0.500000 0.437500 -uv 0.437500 0.437500 -uv 0.437500 0.437500 -uv 0.499999 0.375000 -uv 0.437500 0.437500 -uv 0.499999 0.312500 -uv 0.499999 0.312500 -uv 0.499999 0.312500 -uv 0.499999 0.375000 -uv 0.312499 0.500000 -uv 0.312499 0.500000 -uv 0.312499 0.500000 -uv 0.249999 0.437500 -uv 0.249999 0.375000 -uv 0.249999 0.437500 -uv 0.249999 0.437500 -uv 0.249999 0.375000 -uv 0.437499 0.250000 -uv 0.374999 0.312500 -uv 0.437499 0.250000 -uv 0.437499 0.250000 -uv 0.374999 0.312500 -uv 0.374999 0.312500 -uv 0.249999 0.312500 -uv 0.249999 0.312500 -uv 0.249999 0.312500 -uv 0.249999 0.375000 -uv 0.500000 0.812500 -uv 0.500000 0.875000 -uv 0.500000 0.812500 -uv 0.500000 0.812500 -uv 0.500000 0.875000 -uv 0.375000 1.000000 -uv 0.312500 1.000000 -uv 0.250000 1.000000 -uv 0.312500 1.000000 -uv 0.375000 1.000000 -uv 0.312500 1.000000 -uv 0.437500 1.000000 -uv 0.375000 1.000000 -uv 0.437500 0.937500 -uv 0.437500 0.937500 -uv 0.500000 0.937500 -uv 0.437500 1.000000 -uv 0.500000 1.000000 -uv 0.437500 1.000000 -uv 0.500000 0.937500 -uv 0.500000 0.937500 -uv 0.437500 0.937500 -uv 0.500000 0.875000 -uv 0.437500 0.750000 -uv 0.437500 0.750000 -uv 0.437500 0.750000 -uv 0.250000 0.875000 -uv 0.250000 0.812500 -uv 0.312500 0.812500 -uv 0.250000 0.812500 -uv 0.250000 0.875000 -uv 0.250000 0.812500 -uv 0.312500 0.812500 -uv 0.312500 0.812500 -uv 0.250000 0.937500 -uv 0.250000 0.875000 -uv 0.312500 0.937500 -uv 0.250000 0.937500 -uv 0.250000 1.000000 -uv 0.250000 0.937500 -uv 0.312500 0.937500 -uv 0.312500 0.937500 -vertexGroup Group -vertexIndexCount 192 -face 0 1 2 -face 2 3 0 -face 4 0 3 -face 3 2 5 -face 98 4 6 -face 6 7 99 -face 1 100 7 -face 7 6 8 -face 9 10 11 -face 11 7 9 -face 8 9 7 -face 7 11 1 -face 12 8 101 -face 102 13 12 -face 14 12 13 -face 13 103 4 -face 15 16 17 -face 17 104 15 -face 1 15 105 -face 106 17 5 -face 15 1 18 -face 18 19 15 -face 16 15 19 -face 19 18 20 -face 21 22 23 -face 23 19 21 -face 20 21 19 -face 19 23 16 -face 24 20 18 -face 18 11 24 -face 10 24 11 -face 11 18 1 -face 25 26 27 -face 27 28 25 -face 29 25 28 -face 28 27 30 -face 25 29 31 -face 31 32 25 -face 26 25 32 -face 32 31 33 -face 34 107 35 -face 35 32 34 -face 33 34 32 -face 32 35 26 -face 36 33 31 -face 31 37 36 -face 38 36 37 -face 37 31 29 -face 39 40 41 -face 41 27 39 -face 26 39 27 -face 27 41 30 -face 39 26 42 -face 42 43 39 -face 40 39 43 -face 43 42 108 -face 109 110 44 -face 44 111 112 -face 113 114 115 -face 116 44 40 -face 117 118 42 -face 42 119 120 -face 121 122 123 -face 124 42 26 -face 45 46 47 -face 47 48 45 -face 49 45 48 -face 48 47 50 -face 45 49 51 -face 51 52 45 -face 46 45 52 -face 52 51 53 -face 54 30 55 -face 55 52 54 -face 53 54 52 -face 52 55 46 -face 56 53 51 -face 51 57 56 -face 58 56 57 -face 57 51 49 -face 59 53 56 -face 56 60 59 -face 61 59 60 -face 60 56 58 -face 59 61 62 -face 62 63 59 -face 53 59 63 -face 63 62 125 -face 126 30 54 -face 54 63 127 -face 128 129 63 -face 63 54 53 -face 130 131 132 -face 133 64 134 -face 38 135 64 -face 64 136 61 -face 65 66 67 -face 67 137 65 -face 138 65 139 -face 67 140 141 -face 142 143 68 -face 68 69 144 -face 66 145 69 -face 69 68 70 -face 71 50 72 -face 72 69 71 -face 70 71 69 -face 69 72 66 -face 73 70 68 -face 68 146 73 -face 147 73 148 -face 149 68 150 -face 74 70 73 -face 73 75 74 -face 76 74 75 -face 75 73 151 -face 74 76 77 -face 77 78 74 -face 70 74 78 -face 78 77 152 -face 153 50 71 -face 71 78 154 -face 155 156 78 -face 78 71 70 -face 157 158 77 -face 77 79 159 -face 58 160 79 -face 79 77 76 -face 80 161 162 -face 163 164 80 -face 16 80 165 -face 166 167 5 -face 168 16 81 -face 81 82 169 -face 170 171 82 -face 82 81 83 -face 84 58 172 -face 173 82 84 -face 83 84 82 -face 82 174 175 -face 85 83 81 -face 81 176 85 -face 22 85 177 -face 178 81 16 -face 86 83 85 -face 85 179 86 -face 180 86 181 -face 182 85 22 -face 86 183 87 -face 87 88 86 -face 83 86 88 -face 88 87 61 -face 184 58 84 -face 84 185 186 -face 61 187 188 -face 189 84 83 -face 64 61 87 -face 87 190 64 -face 38 64 191 -face 192 87 193 -face 89 90 91 -face 91 194 89 -face 195 89 196 -face 91 14 197 -face 89 198 92 -face 92 93 89 -face 90 89 93 -face 93 92 199 -face 200 201 94 -face 94 93 202 -face 203 204 93 -face 93 94 90 -face 205 206 207 -face 208 209 210 -face 211 212 213 -face 214 215 216 -face 95 8 217 -face 218 91 95 -face 90 95 91 -face 219 14 91 -face 95 90 96 -face 96 97 95 -face 8 95 97 -face 97 96 220 -face 221 10 9 -face 9 222 223 -face 224 225 226 -face 227 9 8 -face 228 229 96 -face 96 230 231 -face 232 233 234 -face 235 96 90 -material Material.002 -end -end +type Mesh +name Plane +vertexCount 236 +vert 0.500000 1.000000 0.000000 +vert 0.000000 1.000000 0.000000 +vert 0.500000 1.000000 0.500000 +vert 1.000000 1.000000 0.500000 +vert 1.000000 1.000000 0.000000 +vert 1.000000 0.999999 1.000000 +vert 0.500000 1.000000 -0.500000 +vert 0.000000 1.000000 -0.500000 +vert 0.000000 1.000000 -1.000000 +vert -0.500000 1.000000 -1.000000 +vert -1.000000 1.000000 -1.000000 +vert -0.500000 1.000000 -0.500000 +vert 0.500000 1.000000 -1.000000 +vert 1.000000 1.000000 -0.500000 +vert 1.000000 1.000000 -1.000000 +vert 0.000000 1.000000 0.500000 +vert 0.000000 1.000000 1.000000 +vert 0.500000 1.000000 1.000000 +vert -0.500000 1.000000 0.000000 +vert -0.500000 1.000000 0.500000 +vert -1.000000 1.000000 0.000000 +vert -1.000000 1.000000 0.500000 +vert -1.000000 1.000000 1.000000 +vert -0.500000 1.000000 1.000000 +vert -1.000000 1.000000 -0.500000 +vert -1.000000 -0.500000 0.000000 +vert -1.000000 0.000000 0.000000 +vert -1.000000 -0.500000 -0.500000 +vert -1.000000 -1.000000 -0.500000 +vert -1.000000 -1.000000 0.000000 +vert -1.000000 -1.000000 -1.000000 +vert -1.000000 -0.500000 0.500000 +vert -1.000000 0.000000 0.500000 +vert -1.000000 0.000000 1.000000 +vert -1.000000 0.500000 1.000000 +vert -1.000000 0.500000 0.500000 +vert -1.000000 -0.500000 1.000000 +vert -1.000000 -1.000000 0.500000 +vert -1.000000 -1.000000 1.000000 +vert -1.000000 0.000000 -0.500000 +vert -1.000000 0.000000 -1.000000 +vert -1.000000 -0.500000 -1.000000 +vert -1.000000 0.500000 0.000000 +vert -1.000000 0.500000 -0.500000 +vert -1.000000 0.500000 -1.000000 +vert 0.500000 -1.000000 -0.500000 +vert -0.000000 -1.000000 -1.000000 +vert 0.500000 -1.000000 -1.000000 +vert 1.000000 -1.000000 -0.500000 +vert 1.000000 -1.000000 0.000000 +vert 1.000000 -1.000000 -1.000000 +vert 0.500000 -1.000000 0.000000 +vert -0.000000 -1.000000 -0.500000 +vert -0.000000 -1.000000 0.000000 +vert -0.500000 -1.000000 -0.500000 +vert -0.500000 -1.000000 -1.000000 +vert 0.499999 -1.000000 0.500000 +vert 1.000000 -1.000000 0.500000 +vert 0.999999 -1.000001 1.000000 +vert -0.000000 -1.000000 0.500000 +vert 0.499999 -1.000000 1.000000 +vert -0.000001 -1.000000 1.000000 +vert -0.500000 -1.000000 0.500000 +vert -0.500000 -1.000000 0.000000 +vert -0.500000 -1.000000 1.000000 +vert 1.000000 0.500000 -0.500000 +vert 1.000000 -0.000000 -1.000000 +vert 1.000000 0.500000 -1.000000 +vert 1.000000 0.500000 0.000000 +vert 1.000000 -0.000000 -0.500000 +vert 1.000000 -0.000000 0.000000 +vert 1.000000 -0.500000 -0.500000 +vert 1.000000 -0.500000 -1.000000 +vert 1.000000 0.500000 0.500000 +vert 1.000000 -0.000000 0.500000 +vert 1.000000 0.499999 1.000000 +vert 1.000000 -0.000001 1.000000 +vert 1.000000 -0.500000 0.500000 +vert 1.000000 -0.500000 0.000000 +vert 1.000000 -0.500001 1.000000 +vert 0.500000 0.500000 1.000000 +vert -0.000000 0.500000 1.000000 +vert 0.500000 -0.000000 1.000000 +vert -0.000000 -0.000000 1.000000 +vert 0.500000 -0.500000 1.000000 +vert -0.500000 0.500000 1.000000 +vert -0.500000 -0.000000 1.000000 +vert -0.500000 -0.500000 1.000000 +vert -0.000000 -0.500000 1.000000 +vert 0.500000 0.000000 -1.000000 +vert -0.000000 0.000000 -1.000000 +vert 0.500000 0.500000 -1.000000 +vert 0.500000 -0.500000 -1.000000 +vert -0.000000 -0.500000 -1.000000 +vert -0.500000 -0.500000 -1.000000 +vert 0.000000 0.500000 -1.000000 +vert -0.500000 0.000000 -1.000000 +vert -0.500000 0.500000 -1.000000 +vert 0.500000 1.000000 0.000000 +vert 0.500000 1.000000 0.000000 +vert 0.500000 1.000000 0.000000 +vert 0.500000 1.000000 -0.500000 +vert 0.500000 1.000000 -0.500000 +vert 0.500000 1.000000 -0.500000 +vert 0.500000 1.000000 0.500000 +vert 0.500000 1.000000 0.500000 +vert 0.500000 1.000000 0.500000 +vert -1.000000 1.000000 1.000000 +vert -1.000000 1.000000 0.000000 +vert -1.000000 1.000000 -0.500000 +vert -1.000000 1.000000 -1.000000 +vert -1.000000 0.500000 -0.500000 +vert -1.000000 1.000000 -0.500000 +vert -1.000000 1.000000 0.000000 +vert -1.000000 1.000000 -0.500000 +vert -1.000000 0.500000 -0.500000 +vert -1.000000 0.500000 -0.500000 +vert -1.000000 1.000000 0.500000 +vert -1.000000 1.000000 0.000000 +vert -1.000000 0.500000 0.500000 +vert -1.000000 1.000000 0.500000 +vert -1.000000 1.000000 1.000000 +vert -1.000000 1.000000 0.500000 +vert -1.000000 0.500000 0.500000 +vert -1.000000 0.500000 0.500000 +vert -1.000000 -1.000000 0.000000 +vert -1.000000 -1.000000 -0.500000 +vert -1.000000 -1.000000 -0.500000 +vert -1.000000 -1.000000 0.000000 +vert -1.000000 -1.000000 -0.500000 +vert -1.000000 -1.000000 0.500000 +vert -1.000000 -1.000000 0.000000 +vert -0.500000 -1.000000 0.500000 +vert -0.500000 -1.000000 0.500000 +vert -1.000000 -1.000000 0.500000 +vert -1.000000 -1.000000 0.500000 +vert -0.500000 -1.000000 0.500000 +vert 1.000000 1.000000 -0.500000 +vert 1.000000 1.000000 0.000000 +vert 1.000000 1.000000 -0.500000 +vert 1.000000 1.000000 -1.000000 +vert 1.000000 1.000000 -0.500000 +vert 1.000000 0.500000 -0.500000 +vert 1.000000 1.000000 0.000000 +vert 1.000000 0.500000 -0.500000 +vert 1.000000 0.500000 -0.500000 +vert 1.000000 1.000000 0.500000 +vert 1.000000 0.999999 1.000000 +vert 1.000000 1.000000 0.500000 +vert 1.000000 1.000000 0.500000 +vert 1.000000 1.000000 0.000000 +vert 1.000000 0.999999 1.000000 +vert 1.000000 -1.000000 0.000000 +vert 1.000000 -1.000000 -0.500000 +vert 1.000000 -1.000000 -0.500000 +vert 1.000000 -1.000000 0.000000 +vert 1.000000 -1.000000 -0.500000 +vert 1.000000 -1.000000 0.500000 +vert 1.000000 -1.000000 0.000000 +vert 1.000000 -1.000000 0.500000 +vert 1.000000 -1.000000 0.500000 +vert 1.000000 -0.000001 1.000000 +vert 1.000000 0.499999 1.000000 +vert 1.000000 0.499999 1.000000 +vert 0.500000 1.000000 1.000000 +vert 0.500000 1.000000 1.000000 +vert 0.500000 1.000000 1.000000 +vert 1.000000 0.499999 1.000000 +vert 0.500000 0.500000 1.000000 +vert 0.500000 0.500000 1.000000 +vert 1.000000 -0.000001 1.000000 +vert 0.500000 0.500000 1.000000 +vert 1.000000 -0.500001 1.000000 +vert 1.000000 -0.500001 1.000000 +vert 1.000000 -0.500001 1.000000 +vert 1.000000 -0.000001 1.000000 +vert -0.500000 1.000000 1.000000 +vert -0.500000 1.000000 1.000000 +vert -0.500000 1.000000 1.000000 +vert -1.000000 0.500000 1.000000 +vert -1.000000 0.000000 1.000000 +vert -1.000000 0.500000 1.000000 +vert -1.000000 0.500000 1.000000 +vert -1.000000 0.000000 1.000000 +vert 0.499999 -1.000000 1.000000 +vert -0.000000 -0.500000 1.000000 +vert 0.499999 -1.000000 1.000000 +vert 0.499999 -1.000000 1.000000 +vert -0.000000 -0.500000 1.000000 +vert -0.000000 -0.500000 1.000000 +vert -1.000000 -0.500000 1.000000 +vert -1.000000 -0.500000 1.000000 +vert -1.000000 -0.500000 1.000000 +vert -1.000000 0.000000 1.000000 +vert 1.000000 0.500000 -1.000000 +vert 1.000000 -0.000000 -1.000000 +vert 1.000000 0.500000 -1.000000 +vert 1.000000 0.500000 -1.000000 +vert 1.000000 -0.000000 -1.000000 +vert -0.000000 -1.000000 -1.000000 +vert -0.500000 -1.000000 -1.000000 +vert -1.000000 -1.000000 -1.000000 +vert -0.500000 -1.000000 -1.000000 +vert -0.000000 -1.000000 -1.000000 +vert -0.500000 -1.000000 -1.000000 +vert 0.500000 -1.000000 -1.000000 +vert -0.000000 -1.000000 -1.000000 +vert 0.500000 -0.500000 -1.000000 +vert 0.500000 -0.500000 -1.000000 +vert 1.000000 -0.500000 -1.000000 +vert 0.500000 -1.000000 -1.000000 +vert 1.000000 -1.000000 -1.000000 +vert 0.500000 -1.000000 -1.000000 +vert 1.000000 -0.500000 -1.000000 +vert 1.000000 -0.500000 -1.000000 +vert 0.500000 -0.500000 -1.000000 +vert 1.000000 -0.000000 -1.000000 +vert 0.500000 1.000000 -1.000000 +vert 0.500000 1.000000 -1.000000 +vert 0.500000 1.000000 -1.000000 +vert -1.000000 0.000000 -1.000000 +vert -1.000000 0.500000 -1.000000 +vert -0.500000 0.500000 -1.000000 +vert -1.000000 0.500000 -1.000000 +vert -1.000000 0.000000 -1.000000 +vert -1.000000 0.500000 -1.000000 +vert -0.500000 0.500000 -1.000000 +vert -0.500000 0.500000 -1.000000 +vert -1.000000 -0.500000 -1.000000 +vert -1.000000 0.000000 -1.000000 +vert -0.500000 -0.500000 -1.000000 +vert -1.000000 -0.500000 -1.000000 +vert -1.000000 -1.000000 -1.000000 +vert -1.000000 -0.500000 -1.000000 +vert -0.500000 -0.500000 -1.000000 +vert -0.500000 -0.500000 -1.000000 + +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.666646 0.666646 0.333323 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 0.707083 -0.707083 +norm 0.000000 0.707083 -0.707083 +norm -0.408246 0.816492 -0.408246 +norm 0.000000 1.000000 0.000000 +norm 0.000000 0.707083 -0.707083 +norm 0.707083 0.707083 0.000000 +norm 0.408246 0.408246 -0.816492 +norm 0.000000 1.000000 0.000000 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.666646 0.333323 0.666646 +norm 0.000000 0.707083 0.707083 +norm -0.707083 0.707083 0.000000 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.577349 -0.577349 -0.577349 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.000000 0.707083 +norm -0.707083 -0.707083 0.000000 +norm -0.577349 -0.577349 0.577349 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.816492 -0.408246 -0.408246 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -1.000000 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.333323 -0.666646 0.666646 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -0.707083 0.707083 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.000000 -0.707083 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm 0.000000 1.000000 0.000000 +norm -0.666646 0.333323 0.666646 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.408246 0.816492 -0.408246 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.707083 0.707083 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 0.707083 0.000000 +norm -0.666646 0.333323 0.666646 +norm -0.707083 0.707083 0.000000 +norm -1.000000 0.000000 0.000000 +norm -1.000000 0.000000 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.000000 -1.000000 0.000000 +norm -0.707083 -0.707083 0.000000 +norm -0.707083 -0.707083 0.000000 +norm 0.000000 -1.000000 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.408246 0.408246 -0.816492 +norm 0.707083 0.707083 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.707083 0.000000 +norm 1.000000 0.000000 0.000000 +norm 1.000000 0.000000 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.666646 0.666646 0.333323 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.707083 0.707083 0.000000 +norm 0.666646 0.666646 0.333323 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 -0.707083 0.000000 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.707083 0.000000 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm 0.000000 0.707083 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 -0.707083 0.707083 +norm 0.000000 0.000000 1.000000 +norm 0.000000 0.000000 1.000000 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm -0.707083 0.000000 0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm -0.577349 -0.577349 -0.577349 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm 0.707083 0.000000 -0.707083 +norm 0.000000 -0.707083 -0.707083 +norm 0.816492 -0.408246 -0.408246 +norm 0.000000 -0.707083 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm 0.707083 0.000000 -0.707083 +norm 0.000000 0.707083 -0.707083 +norm 0.000000 0.707083 -0.707083 +norm 0.000000 0.707083 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 +norm -0.707083 0.000000 -0.707083 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm -0.707083 0.000000 -0.707083 +norm -0.577349 -0.577349 -0.577349 +norm -0.707083 0.000000 -0.707083 +norm 0.000000 0.000000 -1.000000 +norm 0.000000 0.000000 -1.000000 + +uv 0.437500 0.625000 +uv 0.375000 0.625000 +uv 0.437500 0.562500 +uv 0.500000 0.562500 +uv 0.500000 0.625000 +uv 0.500000 0.500000 +uv 0.437500 0.687500 +uv 0.375000 0.687500 +uv 0.375000 0.750000 +uv 0.312500 0.750000 +uv 0.250000 0.750000 +uv 0.312500 0.687500 +uv 0.437500 0.750000 +uv 0.500000 0.687500 +uv 0.500000 0.750000 +uv 0.375000 0.562500 +uv 0.375000 0.500000 +uv 0.437500 0.500000 +uv 0.312500 0.625000 +uv 0.312500 0.562500 +uv 0.250000 0.625000 +uv 0.249999 0.562500 +uv 0.249999 0.500000 +uv 0.312499 0.500000 +uv 0.250000 0.687500 +uv 0.187500 0.125000 +uv 0.125000 0.125000 +uv 0.187500 0.062500 +uv 0.250000 0.062500 +uv 0.250000 0.125000 +uv 0.250000 0.000000 +uv 0.187500 0.187500 +uv 0.125000 0.187500 +uv 0.125000 0.250000 +uv 0.062500 0.250000 +uv 0.062500 0.187500 +uv 0.187500 0.250000 +uv 0.249999 0.187500 +uv 0.249999 0.250000 +uv 0.125000 0.062500 +uv 0.125000 0.000000 +uv 0.187500 0.000000 +uv 0.062500 0.125000 +uv 0.062500 0.062500 +uv 0.062500 0.000000 +uv 0.437499 0.062500 +uv 0.374999 0.000000 +uv 0.437499 0.000000 +uv 0.499999 0.062500 +uv 0.499999 0.125000 +uv 0.499999 0.000000 +uv 0.437499 0.125000 +uv 0.374999 0.062500 +uv 0.374999 0.125000 +uv 0.312499 0.062500 +uv 0.312499 0.000000 +uv 0.437499 0.187500 +uv 0.499999 0.187500 +uv 0.499999 0.250000 +uv 0.374999 0.187500 +uv 0.437499 0.250000 +uv 0.374999 0.250000 +uv 0.312499 0.187500 +uv 0.312499 0.125000 +uv 0.312499 0.250000 +uv 0.687499 0.062500 +uv 0.624999 0.000000 +uv 0.687499 0.000000 +uv 0.687499 0.125000 +uv 0.624999 0.062500 +uv 0.624999 0.125000 +uv 0.562499 0.062500 +uv 0.562499 0.000000 +uv 0.687499 0.187500 +uv 0.624999 0.187500 +uv 0.687499 0.250000 +uv 0.624999 0.250000 +uv 0.562499 0.187500 +uv 0.562499 0.125000 +uv 0.562499 0.250000 +uv 0.437499 0.437500 +uv 0.374999 0.437500 +uv 0.437499 0.375000 +uv 0.374999 0.375000 +uv 0.437499 0.312500 +uv 0.312499 0.437500 +uv 0.312499 0.375000 +uv 0.312499 0.312500 +uv 0.374999 0.312500 +uv 0.437500 0.875000 +uv 0.375000 0.875000 +uv 0.437500 0.812500 +uv 0.437500 0.937500 +uv 0.375000 0.937500 +uv 0.312500 0.937500 +uv 0.375000 0.812500 +uv 0.312500 0.875000 +uv 0.312500 0.812500 +uv 0.437500 0.625000 +uv 0.437500 0.625000 +uv 0.437500 0.625000 +uv 0.437500 0.687500 +uv 0.437500 0.687500 +uv 0.437500 0.687500 +uv 0.437500 0.562500 +uv 0.437500 0.562500 +uv 0.437500 0.562500 +uv 0.000000 0.250000 +uv -0.000000 0.125000 +uv 0.000000 0.062500 +uv 0.000000 0.000000 +uv 0.062500 0.062500 +uv 0.000000 0.062500 +uv -0.000000 0.125000 +uv 0.000000 0.062500 +uv 0.062500 0.062500 +uv 0.062500 0.062500 +uv -0.000000 0.187500 +uv -0.000000 0.125000 +uv 0.062500 0.187500 +uv -0.000000 0.187500 +uv 0.000000 0.250000 +uv -0.000000 0.187500 +uv 0.062500 0.187500 +uv 0.062500 0.187500 +uv 0.249999 0.125000 +uv 0.249999 0.062500 +uv 0.249999 0.062500 +uv 0.249999 0.125000 +uv 0.249999 0.062500 +uv 0.249999 0.187500 +uv 0.249999 0.125000 +uv 0.312499 0.187500 +uv 0.312499 0.187500 +uv 0.249999 0.187500 +uv 0.249999 0.187500 +uv 0.312499 0.187500 +uv 0.749999 0.062500 +uv 0.749999 0.125000 +uv 0.749999 0.062500 +uv 0.749999 0.000000 +uv 0.749999 0.062500 +uv 0.687499 0.062500 +uv 0.749999 0.125000 +uv 0.687499 0.062500 +uv 0.687499 0.062500 +uv 0.749999 0.187500 +uv 0.749999 0.250000 +uv 0.749999 0.187500 +uv 0.749999 0.187500 +uv 0.749999 0.125000 +uv 0.749999 0.250000 +uv 0.499999 0.125000 +uv 0.499999 0.062500 +uv 0.499999 0.062500 +uv 0.499999 0.125000 +uv 0.499999 0.062500 +uv 0.499999 0.187500 +uv 0.499999 0.125000 +uv 0.499999 0.187500 +uv 0.499999 0.187500 +uv 0.499999 0.375000 +uv 0.500000 0.437500 +uv 0.500000 0.437500 +uv 0.437500 0.500000 +uv 0.437500 0.500000 +uv 0.437500 0.500000 +uv 0.500000 0.437500 +uv 0.437500 0.437500 +uv 0.437500 0.437500 +uv 0.499999 0.375000 +uv 0.437500 0.437500 +uv 0.499999 0.312500 +uv 0.499999 0.312500 +uv 0.499999 0.312500 +uv 0.499999 0.375000 +uv 0.312499 0.500000 +uv 0.312499 0.500000 +uv 0.312499 0.500000 +uv 0.249999 0.437500 +uv 0.249999 0.375000 +uv 0.249999 0.437500 +uv 0.249999 0.437500 +uv 0.249999 0.375000 +uv 0.437499 0.250000 +uv 0.374999 0.312500 +uv 0.437499 0.250000 +uv 0.437499 0.250000 +uv 0.374999 0.312500 +uv 0.374999 0.312500 +uv 0.249999 0.312500 +uv 0.249999 0.312500 +uv 0.249999 0.312500 +uv 0.249999 0.375000 +uv 0.500000 0.812500 +uv 0.500000 0.875000 +uv 0.500000 0.812500 +uv 0.500000 0.812500 +uv 0.500000 0.875000 +uv 0.375000 1.000000 +uv 0.312500 1.000000 +uv 0.250000 1.000000 +uv 0.312500 1.000000 +uv 0.375000 1.000000 +uv 0.312500 1.000000 +uv 0.437500 1.000000 +uv 0.375000 1.000000 +uv 0.437500 0.937500 +uv 0.437500 0.937500 +uv 0.500000 0.937500 +uv 0.437500 1.000000 +uv 0.500000 1.000000 +uv 0.437500 1.000000 +uv 0.500000 0.937500 +uv 0.500000 0.937500 +uv 0.437500 0.937500 +uv 0.500000 0.875000 +uv 0.437500 0.750000 +uv 0.437500 0.750000 +uv 0.437500 0.750000 +uv 0.250000 0.875000 +uv 0.250000 0.812500 +uv 0.312500 0.812500 +uv 0.250000 0.812500 +uv 0.250000 0.875000 +uv 0.250000 0.812500 +uv 0.312500 0.812500 +uv 0.312500 0.812500 +uv 0.250000 0.937500 +uv 0.250000 0.875000 +uv 0.312500 0.937500 +uv 0.250000 0.937500 +uv 0.250000 1.000000 +uv 0.250000 0.937500 +uv 0.312500 0.937500 +uv 0.312500 0.937500 +vertexGroup Group +vertexIndexCount 192 +face 0 1 2 +face 2 3 0 +face 4 0 3 +face 3 2 5 +face 98 4 6 +face 6 7 99 +face 1 100 7 +face 7 6 8 +face 9 10 11 +face 11 7 9 +face 8 9 7 +face 7 11 1 +face 12 8 101 +face 102 13 12 +face 14 12 13 +face 13 103 4 +face 15 16 17 +face 17 104 15 +face 1 15 105 +face 106 17 5 +face 15 1 18 +face 18 19 15 +face 16 15 19 +face 19 18 20 +face 21 22 23 +face 23 19 21 +face 20 21 19 +face 19 23 16 +face 24 20 18 +face 18 11 24 +face 10 24 11 +face 11 18 1 +face 25 26 27 +face 27 28 25 +face 29 25 28 +face 28 27 30 +face 25 29 31 +face 31 32 25 +face 26 25 32 +face 32 31 33 +face 34 107 35 +face 35 32 34 +face 33 34 32 +face 32 35 26 +face 36 33 31 +face 31 37 36 +face 38 36 37 +face 37 31 29 +face 39 40 41 +face 41 27 39 +face 26 39 27 +face 27 41 30 +face 39 26 42 +face 42 43 39 +face 40 39 43 +face 43 42 108 +face 109 110 44 +face 44 111 112 +face 113 114 115 +face 116 44 40 +face 117 118 42 +face 42 119 120 +face 121 122 123 +face 124 42 26 +face 45 46 47 +face 47 48 45 +face 49 45 48 +face 48 47 50 +face 45 49 51 +face 51 52 45 +face 46 45 52 +face 52 51 53 +face 54 30 55 +face 55 52 54 +face 53 54 52 +face 52 55 46 +face 56 53 51 +face 51 57 56 +face 58 56 57 +face 57 51 49 +face 59 53 56 +face 56 60 59 +face 61 59 60 +face 60 56 58 +face 59 61 62 +face 62 63 59 +face 53 59 63 +face 63 62 125 +face 126 30 54 +face 54 63 127 +face 128 129 63 +face 63 54 53 +face 130 131 132 +face 133 64 134 +face 38 135 64 +face 64 136 61 +face 65 66 67 +face 67 137 65 +face 138 65 139 +face 67 140 141 +face 142 143 68 +face 68 69 144 +face 66 145 69 +face 69 68 70 +face 71 50 72 +face 72 69 71 +face 70 71 69 +face 69 72 66 +face 73 70 68 +face 68 146 73 +face 147 73 148 +face 149 68 150 +face 74 70 73 +face 73 75 74 +face 76 74 75 +face 75 73 151 +face 74 76 77 +face 77 78 74 +face 70 74 78 +face 78 77 152 +face 153 50 71 +face 71 78 154 +face 155 156 78 +face 78 71 70 +face 157 158 77 +face 77 79 159 +face 58 160 79 +face 79 77 76 +face 80 161 162 +face 163 164 80 +face 16 80 165 +face 166 167 5 +face 168 16 81 +face 81 82 169 +face 170 171 82 +face 82 81 83 +face 84 58 172 +face 173 82 84 +face 83 84 82 +face 82 174 175 +face 85 83 81 +face 81 176 85 +face 22 85 177 +face 178 81 16 +face 86 83 85 +face 85 179 86 +face 180 86 181 +face 182 85 22 +face 86 183 87 +face 87 88 86 +face 83 86 88 +face 88 87 61 +face 184 58 84 +face 84 185 186 +face 61 187 188 +face 189 84 83 +face 64 61 87 +face 87 190 64 +face 38 64 191 +face 192 87 193 +face 89 90 91 +face 91 194 89 +face 195 89 196 +face 91 14 197 +face 89 198 92 +face 92 93 89 +face 90 89 93 +face 93 92 199 +face 200 201 94 +face 94 93 202 +face 203 204 93 +face 93 94 90 +face 205 206 207 +face 208 209 210 +face 211 212 213 +face 214 215 216 +face 95 8 217 +face 218 91 95 +face 90 95 91 +face 219 14 91 +face 95 90 96 +face 96 97 95 +face 8 95 97 +face 97 96 220 +face 221 10 9 +face 9 222 223 +face 224 225 226 +face 227 9 8 +face 228 229 96 +face 96 230 231 +face 232 233 234 +face 235 96 90 +material Material.002 +end +end