Advertisement

How do I re-size a binary file?

Started by November 01, 2015 05:27 AM
10 comments, last by SlashC++Programmer 9 years, 1 month ago

He said something about trying to put a riddler video in the place of a batman video, but "it was off by 8 places"


Oh, that's easy.

Most that do games package assets into a single archive, tend to have two sections: The directory index and the actual file data. You can generally just overwrite the existing content of the file, provided it's the same size or smaller. (And since it's a video, you'd need to check the video and audio codec.) Otherwise, you might be able to append the video file to the end of the archive, and update the directory index with the new location and size. Or you could rearrange everything and update every entry in the directory index...

Hi guys thanks. So I can't just load the whole thing in memory? Loading the whole thing in memory causes prolems? Yes I'm making a file.ty that has a lot of batman assets in it. The reason I hardcoded it at the top was to give you an idea what I'm facing.

This topic is closed to new replies.

Advertisement