View Single Post
Old 10-11-11, 11:58 PM   #64
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

This will let you see what I'm doing so far: http://www.gamefront.com/files/20880...nny_SubSim_zip

This is a C# code file for my AntiGranny class. You can include it in a project of yours to use it and see what it does. You'll have to remove all my references to the GR2EditorViewer class as this source file is used in my GR2 editor/viewer app currently. The AntiGranny class currently has two functions - ReadData and WriteData. Both of those functions take a string that denotes the filepath to the GR2 file (the same string should be passed to both).

I've defined write pointer data at beginning of file so that the pointers read in will be written to a text file after you call ReadData and WriteData with the filepath of the GR2 file.

After the call to WriteData it will write a GR2 file composed of the info it read-in from the GR2 file specified. This GR2 file (and the pointer data text files) can be found in \app path\GR2Testing.

I'm looking for patterns currently in the pointers and some can be seen. There is some form of pointer that defines a new section. I'm also trying to understand what all the pointers do (some you'll see are just plain pointers and some are pointers to data). Of course how I've defined what a style of pointer is could be entirely wrong. I'm just looking for patterns/associations currently to understand the file structure.

You'll notice that some arttool info data is not written into the new GR2 file (DocumentContents, Headers, etc.). This is because I'm not sure how those ever get read in. There was no pointer to that data in the first section's pointers. There was one pointer to the start of that data and that pointer reads in 3D Studio MAX. How it reads the data after that I haven't a clue.

Hopefully this will spur more interest and maybe somebody will see something I'm totally overlooking/missing

Let's see if we can get some open source type thing going on here

There is some good info in that source file. I've figured out more of what's in the info header and in the sections header at the beginning of the GR2 files.

And yes I know the code file does not use properties for variable access and that one shouldn't pass every parameter to functions as references (ref) and so on and so forth. This was put together for information gathering/testing purposes and is in no way a final draft.

Last edited by TheDarkWraith; 10-12-11 at 12:41 AM.
TheDarkWraith is offline   Reply With Quote