![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
10-12-11, 10:59 AM
|
#1 |
|
Admiral
![]() Join Date: Jan 2006
Location: Russia ®
Posts: 2,481
Downloads: 122
Uploads: 1
|
I think no need to write about known things here.
... better to write personal messages... Your "fantasy" look pretty funny... Here we have to publish ready-made solutions - templates... i think. ![]() @privateer... you are right... but name must be more shortly. e.g.: enum Format : int {NoCompression = 0, Oodle1Compression = 2}; ... The names of the parent objects are complementing this short name. ... @ TDW... your verbosity is tedious and poorly translated.
__________________
Alex ® ![]() Moses said: "Don't create yourself an idol"... Last edited by Anvart; 10-13-11 at 02:35 AM. |
|
|
10-12-11, 11:53 AM
|
#2 | |
|
Black Magic
![]() |
Quote:
What known things are you talking about? You don't want to share information with everyone? The sharing of any information regarding the GR2 format will only benefit everyone. And what important information am I ignoring? Found a little interesting discovery: The first pointer in a GR2 file points to the first string in the embedded strings (which is usually 3D Studio MAX in SH5 GR2 files). I never found out how it reads the additional strings after that up to 'General'. But I think I found out how: the second pointer is an unknown of 0x6 and has an offsetinsectiondata of 0xA0. 0xA0 is 160 decimal. 160 decimal / 8 bytes = 20 and 20 is the exact amount of additional strings that need to be read in. Coincidence? Maybe but don't think so. Works on all SH5 GR2 files I've tried so far. With that piece solved I can now dynamically write out the strings in the GR2 file (allowing user to change the strings read in). |
|
|
|
10-12-11, 02:07 PM
|
#3 |
|
Black Magic
![]() |
ran into a little trip up.....was writing the embedded strings into the new GR2 file dynamically (vice from pointer info read in to allow user to change the strings read in) and ran into problem of when multiple strings are being referenced by one string. I was just blindly writing the embedded strings into the file from the pointer data but since changing to this dynamic nature it has exposed a problem. The problem is starting with pointer 62 and on from section 0 pointers the pointers aren't 'writing' embedded strings - they are attaching embedded string info to pointer locations in the file.....
|
|
|
10-12-11, 03:03 PM
|
#4 |
|
Black Magic
![]() |
fixed the problem. Needed to define a new pointer type that dealt with string references
A new version of the C# AntiGranny code file can be found at post #1
|
|
|
10-12-11, 03:06 PM
|
#5 | |
|
Sea Lord
![]() Join Date: Mar 2007
Posts: 1,897
Downloads: 172
Uploads: 0
|
Quote:
Amazing TheDarkWraith ![]()
__________________
What we do in life echoes in Eternity |
|
|
|
10-12-11, 03:12 PM
|
#6 |
|
Black Magic
![]() |
It's not close to anything near amazing. I'm struggling trying to figure this beast out....but god do I love a challenge
![]() The art tool section (with it's embedded strings) seems to be the hardest part of this beast to tackle so far. I'm halfway through the art tool section now As I'm writing it now it will be able to create new GR2 files from scratch. If I can write a new GR2 file from scratch then editing existing ones should be a walk in the park. When I say from scratch I mean you feed it a dat file and it creates a GR2 file from it. Look over my AntiGranny code file. Make changes to it, experiment with it. The only way to figure something out is to take it apart, make some assumptions, and test.... |
|
|
10-12-11, 03:53 PM
|
#7 | |
|
Grey Wolf
![]() Join Date: Jan 2009
Location: Finland
Posts: 857
Downloads: 174
Uploads: 0
|
Quote:
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
