/[gr2lib]/trunk/gr2lib_UnitTest/Program.cs
ViewVC logotype

Diff of /trunk/gr2lib_UnitTest/Program.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/gr2lib_UnitTest/Program.cs	2010/07/17 05:10:22	95
+++ trunk/gr2lib_UnitTest/Program.cs	2010/07/17 05:11:13	96
@@ -9,6 +9,7 @@
 using gr2lib.core.helpers;
 using gr2lib.core.coretypes.implementation;
 using System.Runtime.CompilerServices;
+using gr2lib.core.header;
 
 namespace gr2lib_UnitTest
 {
@@ -63,7 +64,36 @@
 
                 #region Read Granny2 Data
 
-                grnfileinfo info = grnfileinfo.ReadFromFile(GrannyFilename);
+                granny_file grn_file = granny_file.ReadFromFile(GrannyFilename);
+                //grnfileinfo info = grnfileinfo.GetFileInfo(grn_file);
+                grnfileinfo info = grn_file.GrannyFileInfo;
+
+
+                #region granny_file data
+                Console.WriteLine();
+                Console.WriteLine("grann_file data:");
+                Console.WriteLine("\tIs Byte Reversed: {0}", grn_file.IsByteReversed.ToString());
+                Console.WriteLine("\tHeader: ");
+                Console.WriteLine("\t\tHeader Version: 0x{0}", grn_file.Header.Version.ToString("X2"));
+                Console.WriteLine("\t\tHeader TotalSize: 0x{0}",grn_file.Header.TotalSize.ToString("X8"));
+                Console.WriteLine("\t\tHeader CRC: 0x{0}", grn_file.Header.CRC.ToString("X8"));
+                Console.WriteLine("\t\tHeader SectionArrayOffset: 0x{0}",grn_file.Header.SectionArrayOffset.ToString("X4"));
+                Console.WriteLine("\t\tHeader SectionArrayCount: 0x{0}", grn_file.Header.SectionArrayCount.ToString("X4"));
+
+                //Console.WriteLine("\t\tHeader RootObjectTypeDefinition:");
+                //Console.WriteLine("\t\t\tSectionIndex: " + grn_file.Header.RootObjectTypeDefinition.SectionIndex);
+                //Console.WriteLine("\t\t\tOffset: " + grn_file.Header.RootObjectTypeDefinition.Offset);
+                
+                //Console.WriteLine("\t\tHeader RootObject:");
+                //Console.WriteLine("\t\t\tSectionIndex: " + grn_file.Header.RootObject.SectionIndex);
+                //Console.WriteLine("\t\t\tOffset: " + grn_file.Header.RootObject.Offset);
+
+                Console.WriteLine("\t\tHeader TypeTag: 0x{0}",grn_file.Header.TypeTag.ToString("X8"));
+                Console.WriteLine("\t\tHeader ExtraTags: {0}", new arraytostring<int, int[]>(grn_file.Header.ExtraTags));
+                Console.WriteLine("\t\tHeader StringDatabaseCRC: 0x{0}", grn_file.Header.StringDatabaseCRC.ToString("X8"));
+                Console.WriteLine("\t\tHeader ReservedUnused: {0}",new arraytostring<int, int[]>(grn_file.Header.ReservedUnused));
+                Console.WriteLine("Press {ENTER} to Continue."); Console.ReadLine();
+                #endregion
 
                 #region Read FromFileName
                 Console.WriteLine();
@@ -73,7 +103,7 @@
                     Console.WriteLine("ExtendedData: " + info.ExtendedData);
                 }
                 else { Console.WriteLine("From File Name: " + "No From File Name Available"); }
-
+                Console.WriteLine("Press {ENTER} to Continue."); Console.ReadLine();
                 #endregion
 
                 #region Read ArtToolInfo
@@ -93,6 +123,7 @@
                     Console.WriteLine("\tTool ExtendedData: " + info.ArtToolInfo.ExtendedData);
                 }
                 else { Console.WriteLine("Art Tool Data: " + "No Art Tool Info Available"); }
+                Console.WriteLine("Press {ENTER} to Continue."); Console.ReadLine();
                 #endregion
 
                 #region Read ExporterInfo
@@ -112,6 +143,7 @@
                     Console.WriteLine("\tExporter ExtendedData: " + info.ExporterInfo.ExtendedData);
                 }
                 else { Console.WriteLine("Exporter Info: " + "No Exporter Info Available"); }
+                Console.WriteLine("Press {ENTER} to Continue."); Console.ReadLine();
                 #endregion
 
                 #region Read Textures
@@ -151,6 +183,7 @@
                     }
                 }
                 else { Console.WriteLine("Texture List: " + "No Textures Available"); }
+                Console.WriteLine("Press {ENTER} to Continue."); Console.ReadLine();
                 #endregion
 
                 #region Read Materials
@@ -201,6 +234,7 @@
                     }
                 }
                 else { Console.WriteLine("Material List: " + "No Materials Available"); }
+                Console.WriteLine("Press {ENTER} to Continue."); Console.ReadLine();
                 #endregion
 
 
@@ -231,7 +265,8 @@
                     }
 
                 }
-                else { Console.WriteLine("Skeleton List: " + "No Skeletons Available"); }            
+                else { Console.WriteLine("Skeleton List: " + "No Skeletons Available"); }
+                Console.WriteLine("Press {ENTER} to Continue."); Console.ReadLine();
                 #endregion
             }
                 #endregion
@@ -257,3 +292,4 @@
     }
 }
 
+

 

  ViewVC Help
Powered by ViewVC 1.1.22