Well, here's my problem:

I'm fairly new to c++ and i'm the "learn as you go" type. I've done this for many other languages(visual basic, php etc.)

My problem is this:

I'm hopefully(in the end!) going to write a mac opengl client to a game which currently only has windows support.

Now this windows game uses .gpf files(Gravity Pack File) which contains all the information the client could ever need - server IPs, 3d models, textures, sprites, skins etc.

Decompressing this gpf file is no problem, and at the moment i have the contents extracted into a DATA/ folder.

Now in this folder, the main "beef" of the files are the graphic files. I have no problem with the sprites or textures, as they are all in recognisable formats. My problem is with the ".rsw", ".gat", ".rsm" and ".gnd"

Let me explain

I have discovered, from analysing the files that:

.rsw is the "global" file. It says which ".gnd" or ground 3d model to use, as well as the positioning and location for every 3d model on the map(trees, steps etc.)

.rsm is the 3d model file it's self. I believe it was created using 3d studio max then *something* was done to it. This i am unsure of.

.gnd is the ground 3d model. the same format as .rsm if i'm not mistaken.

.gat is the "boundry" file. It has information on where the clickable boundries are, so people can't simply walk into water or off the map. I believe it may also contain elevation information, so the client knows where to draw the character sprite. However this file is fairly unimportant at the moment.

I have source for Mac OS X and Windows(see bottom of thread). It appears the mac os x source is at a slightly later development stage than the windows code.

Now what i'm asking of you kind people is if you could read the source(its not a lot of source, and only a tiny amount is used to open these files) and basically give me the main "structure" of each file type. Basically this code, when compiled loads either a .rsw file(loads all the others related to it) or one of the others individually, and renders it.

What i need someone to do is take a quick look at the code and tell me what it does to the files to convert them from garbage(with a hint of 3d) into 3d models, ready to render using opengl. There appears to be a missing "link". For example, i can't import the models into 3d studio max(which they were created in), although from opening them up in a text editor, i can clearly see references to 3d files(names such as Cylinder01, and the paths to textures hidden among the gunk)

As this code is uncommented, its very hard for me to understand, being new to c++, and as the developer has split it among many different .cpp and .h files its very hard for me to follow, being new to all this.

I know if i had the file layout, I could then use opengl to render the models myself(without using any of his code) - It would just be a case of rendering the 3d parts, setting up textures etc.

But none of this can be done without working out the "layout" of the 3d model files. Some of the file must contain dimensions etc. while others must contain links to textures, or animation details.

From the source it surely is possible to work out how the files are structured, as the source its self does the conversion from .rsm/.rsw etc. format to 3d models and textures. And i'm pretty sure its only a few few lines(20-30) which handle this.

I know this is a lot to ask, but any help would be greatly appreciated. I asked the developer for the information on the file formats, and he refused to help - he just told me to look at the uncommented source and ask no more questions.

Of course i don't expect something for nothing. I'd gladly do an equal amount of design work for you in exchange for the amount of time you spent looking over the source.

If you can help that would be amazing. Here's link to the source files and sample data files. It would be really appreciated if you could help!

http://www.playrpg.com/storage/source.zip is the source code and binaries for windows and mac versions of the source i need looking at

http://www.playrpg.com/storage/files.rar (sorry about .rar, it seems .zip wouldn't work with korean file names) - this archive contains sample .rsw, .gat and .gnd files as well as some random model files(sorry i couldn't get the models that match - as the .rsw files will call many many model files to make up the map)

and again thanks!