SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 01-15-12, 09:38 AM   #1
Will-Rommel
Chief
 
Join Date: Jan 2008
Posts: 319
Downloads: 81
Uploads: 0
Default

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-
Will-Rommel is offline   Reply With Quote
Old 01-15-12, 11:27 AM   #2
tonschk
Sea Lord
 
Join Date: Mar 2007
Posts: 1,897
Downloads: 172
Uploads: 0
Default

I Agree

Quote:
Originally Posted by TheDarkWraith
for any problem define the problem. Break problem down into steps. Break those steps into smaller steps. Keep reapeating until you get to manageable pieces/steps.
Quote:
Originally Posted by Will-Rommel View Post
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.
__________________
What we do in life echoes in Eternity
tonschk is offline   Reply With Quote
Old 01-15-12, 02:33 PM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

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...
TheDarkWraith is offline   Reply With Quote
Old 01-15-12, 04:58 PM   #4
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

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...
TheDarkWraith is offline   Reply With Quote
Old 01-15-12, 08:53 PM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

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 Wait a second...what's going on...
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...
TheDarkWraith is offline   Reply With Quote
Old 01-15-12, 09:07 PM   #6
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,153
Downloads: 901
Uploads: 73


Default

I like to see these
I dont like seeing these
THE_MASK is offline   Reply With Quote
Old 01-16-12, 01:47 AM   #7
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

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
TheDarkWraith is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:41 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 1995- 2026 Subsim®
"Subsim" is a registered trademark, all rights reserved.