Advertisement

Advanced C++ file I/O

Started by March 05, 2001 02:51 AM
-1 comments, last by DrjonesDW3d 23 years, 11 months ago
I am writing a program that will extract information out of the Unreal Tournament .T3D map format and have a few questions. I''m not sure how advanced this really is but its certainly more detailed than my C++ books cover. The data looks something like this: Begin Brush Name=Brush Begin PolyList Begin Polygon Origin -00064.000000,-00064.000000,-00064.000000 Normal -00001.000000,+00000.000000,+00000.000000 TextureU +00000.000000,+00001.000000,+00000.000000 TextureV +00000.000000,+00000.000000,-00001.000000 Vertex -00064.000000,-00064.000000,-00064.000000 Vertex -00064.000000,-00064.000000,+00064.000000 Vertex -00064.000000,+00064.000000,+00064.000000 Vertex -00064.000000,+00064.000000,-00064.000000 End Polygon Begin Polygon Origin -00064.000000,+00064.000000,-00064.000000 Normal +00000.000000,+00001.000000,+00000.000000 TextureU +00001.000000,+00000.000000,+00000.000000 TextureV +00000.000000,+00000.000000,-00001.000000 Vertex -00064.000000,+00064.000000,-00064.000000 Vertex -00064.000000,+00064.000000,+00064.000000 Vertex +00064.000000,+00064.000000,+00064.000000 Vertex +00064.000000,+00064.000000,-00064.000000 End Polygon ... End PolyList End Brush I think i could go in there just reading the 1st string then checking it in a function to see what has to happen next, then if its a vertex or something read in the next point, convert it to a float and use it... but it seems like there would be an easier more elegant way then using lots of special cases. Dr. Jones

This topic is closed to new replies.

Advertisement