Chat Log: Introduction to binary file contents

Listed in: Technical backgrounds
Date: 2000-05-07
Author: ali
12:42 Antimorph: Ali, what are prm files?
12:42 ali: WHAT?
12:48 Antimorph: hmm, I'm still curious. I mean does RV read them sequentially starting at bit 0 and working onwards, and if so how does the RV engine know what an x-coordinate is and what a why coordinate is and know the difference between these and a mapping coordinate
12:48 Antimorph: why = YY
12:49 ali: It does read them sequentially from start to end
12:49 ali: And, on how to know what is what:
12:50 ali: The file always starts with 32 bits that says how many polys are in the file. Then 32 bits for the number of vertices.
12:50 Antimorph: ok
12:51 ali: Then comes a list of polygons (exactly that many as were in the first number), from which every poly is like "first comes a 16-bit value with some flags. Then comes a 16-bit value with the texture sheet. Then " and so on
12:51 Antimorph: Ahh ok, I begin to understand
12:52 Antimorph: so a prm file is essentially a list of 1 and 0's in groups of specific length, the first two groups specify how interpretation should proceed.
12:53 ali: Yup.
12:53 ali: And now do it more general:
12:53 ali: Most file with a binary storage are essentially a list of 1 and 0's in groups of specific length and order, so that it's clear what is what.
12:54 Antimorph: ok
12:55 Antimorph: So if I learn how to write binary files to disk, the only thing stopping me creating a prm is knowing the length of each group, and what each group represents.
12:56 ali: Correct
12:56 ali: And, luckily that is already answered.
12:57 ali:

Back to: Technical backgrounds

Or Main Index