Jump to content
  • Advertisement


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


file io and custom files

This topic is 6143 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

just a few questions, nothing direct. file loading. could someone please explain the concept behind loading any type of file, whether it be a sound, graphic, or whatever file. i mean like the process, like getting the file header (lets assume i would know about the file format - thats what wotsit.org is for ). and then, about making a custom 'paint' program. lets say i write a paint program (not that i can anyhow) that writes a custom file that first defines the image height and width and then the rgb values for each pixel... then write a function that will read that data and draw the each pixel on the screen with the correct rgb colors, thus loading my custom image. to me that sounds kinda right. have i got the right idea, or miles off? been kinda interested lately in fileI/O and custom files thanks for your time EDIT: damn typos Edited by - Bezzant on October 22, 2001 3:43:43 PM

Share this post

Link to post
Share on other sites

1.) Open the file.
2.) Read in the file header, which usually contains information about
file size, format, etc.
i.) Usually this requires you to know the header size (or just create
a header structure and read that in)
3.) Read in the rest of the file.

You''re generally on the right path.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!