Archived

This topic is now archived and is closed to further replies.

exporter problem...integer array

This topic is 5711 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am writing an exporter for Milkshape3D. I currently have a problem saving the triangle index information out as an array and wonder if anyone has ran across the problem or take a look at my source and see where the problem lies. You can download the source from here . It is in the download section marked as msNEMExporter. It is the part of the code that saves the triangle index information and it seems to only happen with the number ''10'' it saves it as ''0D 0A 00 00'' it is adding an extra byte that also throws off my reader. If you download the viewer you''ll see what I mean. To get the exported file format to work I open the file in a HEX editor and look for the occurences of ''10'' in the code and delete the ''0D'' byte. TIA for any help! HighEnd ---- "Becoming a game developer from scratch..." http://www.highendgaming.com

Share this post


Link to post
Share on other sites
I have not downloaded the source, but it looks an awful lot like someone, somewhere has a file opened as "text" and the libary is adding ''\r''(charrage return 0x0D) to your ''\n'' (line-feed/newline 0x0A). Perhaps the source was written for unix, and you have a very lazy port?

Share this post


Link to post
Share on other sites
your actually right. I got a response from CCCP over at MilkShape and he said the same thing. Again, this shows the value of having more than one eye look at your source code. You get so focused on something that you can not consider other possibilities.

But thanks for your input, you are correct in your assumption. I wish it was a lazy port, the only thing I copied over is the structure the rest is my code so I have to take the blame for it. I always thought that ofstream opened by binary by default.



HighEnd
----
"Becoming a game developer from scratch..."
http://www.highendgaming.com

Share this post


Link to post
Share on other sites