Sign in to follow this  
  • entries
    61
  • comments
    131
  • views
    31426

Untitled

Sign in to follow this  
Samsonite

236 views

This week has been quite fun. I worked from 00:30 PM to 04:30PM each day. It involved playing basketball, football and dodgeball with kids at school.

I've been trying to make a map loader which reads bytes from a file and uses that info for rendering the map(Using OpenGL). I thought reading each byte through fgetc() and then using those values directly would do the trick. But it didn't, partly because something is wrong with my code, so that I cannot get the size of the file I wish to read from, and therefore I cannot read the whole map file. I also have a rendering bug, which I am, from lack of any other screenshot, going to post here.

I'll probably end up rewriting the whole thing.
Sign in to follow this  


1 Comment


Recommended Comments

Yeah, getting the size of a file is icky. I only know two ways of doing it - the first is to explicitly put the information in there yourself, the second is by using _stat. I think _stat is going to be your best bet though.

Additionally, _stat is useful basically whenever you're working with files in matters other than simple read/write operations. Like for making a virtual file system or whatever. Hur hur :3

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now