![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
01-15-12, 09:38 AM
|
#1 |
|
Chief
![]() Join Date: Jan 2008
Posts: 319
Downloads: 81
Uploads: 0
|
I really enjoy the detailed explanations you go trough, because it shows a path in troubleshooting/problems resolution that might come handy for me later in my life.
__________________
-Fighting is a lifestyle-
|
|
|
01-15-12, 11:27 AM
|
#2 | |
|
Sea Lord
![]() Join Date: Mar 2007
Posts: 1,897
Downloads: 172
Uploads: 0
|
I Agree
![]() Quote:
__________________
What we do in life echoes in Eternity |
|
|
|
01-15-12, 02:33 PM
|
#3 |
|
Black Magic
![]() |
Today I decided to be really bold and add extended data to the exporter info section in the GR2 file (I was going to let you see the original granny exporter version used). I wrote the necessary entries into the required section but now I'm having problems when an item goes to read it's extendeddata. Obviously I have a code bug somewhere or there's something I don't fully understand about the extended data...
|
|
|
01-15-12, 04:58 PM
|
#4 |
|
Black Magic
![]() |
found a source of my problem. Every section's pointers are located in section 6 (from what I've seen so far). I've only seen pointers for Section 0 and Section 6 defined also, no other sections. I added a new datatype definition so that a new menu entry would show in Granny Viewer for the exporter info's extendeddata (you'd be able to click on it and view the extended data in granny viewer). When I added the new datatype definition I adjusted the pointers in section 6 to reflect the size of the chunk I added to that section. What I did not do was update the PointersFileOffset and EndOfPointersFileOffset in all the sections prior to section 6
Thus all those sections went looking for their pointers and was reading incorrect data. That problem solved.Now I just have one little problem where some of section 6's section data isn't getting updated correctly. Tracking those down now and hopefully have this new menu entry ready for granny viewer here soon... |
|
|
01-15-12, 08:53 PM
|
#5 |
|
Black Magic
![]() |
This is a little funny...
I had everything coded in to show this new menu item in Granny Viewer for the exporter info. I hit Start Debugging in Visual Studio. I selected the lifeboat GR2 file. It started loading the file. Then a breakpoint was triggered...odd...new pointers found was the reason. Oh this is interesting Where did these come from? Hmm....okay let's account for them. I coded in a whole new set of pointers for this one section.Started debugging again. Selected lifeboat GR2 file. Started loading the file. Lifeboat appeared onscreen. Cool. Alright let's go check what these new pointers were (I had sentinel spit them out to a file). I opened them up and they looked very familiar. I checked another section and they were identical ![]() Looked in the DbgView output for both sections....yep pointer locations are different....wait...ah crap these pointers are the first sections pointers ![]() Time to watch a movie... |
|
|
01-15-12, 09:07 PM
|
#6 |
|
Ace of the deep .
|
I like to see these
![]() ![]() I dont like seeing these ![]()
|
|
|
01-16-12, 01:47 AM
|
#7 |
|
Black Magic
![]() |
Finally figured out what we were calling root object type and root object offset are in the InfoHeader: they deal with the ArtToolInfo section in Granny Viewer. The first (root object type) is the section. Root object offset is the offset in that section to find the data
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
