/[gr2lib]/trunk/gr2lib/core/coretypes/implementation/Texture.cs
ViewVC logotype

Diff of /trunk/gr2lib/core/coretypes/implementation/Texture.cs

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

revision 185 by william, Fri Jul 23 23:55:52 2010 UTC revision 191 by william, Sat Jul 24 06:31:50 2010 UTC
# Line 51  namespace gr2lib.core.coretypes.implemen Line 51  namespace gr2lib.core.coretypes.implemen
51          public Texture()// : base("Textures")          public Texture()// : base("Textures")
52          {          {
53              this.FromFileName = "";              this.FromFileName = "";
54              this.TextureType = new NameValuePair<string, granny_texture_type>(coreapi.GetGrannyEnumTypeString<granny_texture_type>(granny_texture_type.GrannyColorMapTextureType), granny_texture_type.GrannyColorMapTextureType);              this.TextureType = new NameValuePair<string, granny_texture_type>(coreapi.EnumToStringSupport.GetGrannyEnumTypeString<granny_texture_type>(granny_texture_type.GrannyColorMapTextureType), granny_texture_type.GrannyColorMapTextureType);
55              this.Width = 0;              this.Width = 0;
56              this.Height = 0;              this.Height = 0;
57              this.Encoding = new NameValuePair<string, granny_texture_encoding>(coreapi.GetGrannyEnumTypeString<granny_texture_encoding>(granny_texture_encoding.GrannyBinkTextureEncoding), granny_texture_encoding.GrannyBinkTextureEncoding);              this.Encoding = new NameValuePair<string, granny_texture_encoding>(coreapi.EnumToStringSupport.GetGrannyEnumTypeString<granny_texture_encoding>(granny_texture_encoding.GrannyBinkTextureEncoding), granny_texture_encoding.GrannyBinkTextureEncoding);
58              this.SubFormat = new NameValuePair<string, granny_pixel_layout>(coreapi.GetGrannyEnumTypeString<granny_pixel_layout>(granny_pixel_layout.GrannyBGRA8888PixelFormat), granny_pixel_layout.GrannyBGRA8888PixelFormat);              this.SubFormat = new NameValuePair<string, granny_pixel_layout>(coreapi.EnumToStringSupport.GetGrannyEnumTypeString<granny_pixel_layout>(granny_pixel_layout.GrannyBGRA8888PixelFormat), granny_pixel_layout.GrannyBGRA8888PixelFormat);
59              this.Layout = new Layout();              this.Layout = new Layout();
60              this.Images = new List<Image>();              this.Images = new List<Image>();
61              //this.ExtendedData = new IntPtr();              //this.ExtendedData = new IntPtr();
# Line 69  namespace gr2lib.core.coretypes.implemen Line 69  namespace gr2lib.core.coretypes.implemen
69          public Texture(int index)          public Texture(int index)
70          {          {
71              this.FromFileName = "";              this.FromFileName = "";
72              this.TextureType = new NameValuePair<string, granny_texture_type>(coreapi.GetGrannyEnumTypeString<granny_texture_type>(granny_texture_type.GrannyColorMapTextureType), granny_texture_type.GrannyColorMapTextureType);              this.TextureType = new NameValuePair<string, granny_texture_type>(coreapi.EnumToStringSupport.GetGrannyEnumTypeString<granny_texture_type>(granny_texture_type.GrannyColorMapTextureType), granny_texture_type.GrannyColorMapTextureType);
73              this.Width = 0;              this.Width = 0;
74              this.Height = 0;              this.Height = 0;
75              this.Encoding = new NameValuePair<string, granny_texture_encoding>(coreapi.GetGrannyEnumTypeString<granny_texture_encoding>(granny_texture_encoding.GrannyBinkTextureEncoding), granny_texture_encoding.GrannyBinkTextureEncoding);              this.Encoding = new NameValuePair<string, granny_texture_encoding>(coreapi.EnumToStringSupport.GetGrannyEnumTypeString<granny_texture_encoding>(granny_texture_encoding.GrannyBinkTextureEncoding), granny_texture_encoding.GrannyBinkTextureEncoding);
76              this.SubFormat = new NameValuePair<string, granny_pixel_layout>(coreapi.GetGrannyEnumTypeString<granny_pixel_layout>(granny_pixel_layout.GrannyBGRA8888PixelFormat), granny_pixel_layout.GrannyBGRA8888PixelFormat);              this.SubFormat = new NameValuePair<string, granny_pixel_layout>(coreapi.EnumToStringSupport.GetGrannyEnumTypeString<granny_pixel_layout>(granny_pixel_layout.GrannyBGRA8888PixelFormat), granny_pixel_layout.GrannyBGRA8888PixelFormat);
77              this.Layout = new Layout();              this.Layout = new Layout();
78              this.Images = new List<Image>();              this.Images = new List<Image>();
79              //this.ExtendedData = new IntPtr();              //this.ExtendedData = new IntPtr();
# Line 125  namespace gr2lib.core.coretypes.implemen Line 125  namespace gr2lib.core.coretypes.implemen
125              {              {
126                  Texture managed = new Texture();                  Texture managed = new Texture();
127                  managed.FromFileName = native.FromFileName;                  managed.FromFileName = native.FromFileName;
128                  managed.TextureType = new NameValuePair<string, granny_texture_type>(coreapi.GetGrannyEnumTypeString<granny_texture_type>((granny_texture_type)native.TextureType), (granny_texture_type)native.TextureType);                  managed.TextureType = new NameValuePair<string, granny_texture_type>(coreapi.EnumToStringSupport.GetGrannyEnumTypeString<granny_texture_type>((granny_texture_type)native.TextureType), (granny_texture_type)native.TextureType);
129                  managed.Width = native.Width;                  managed.Width = native.Width;
130                  managed.Height = native.Height;                  managed.Height = native.Height;
131                  managed.Encoding = new NameValuePair<string, granny_texture_encoding>(coreapi.GetGrannyEnumTypeString<granny_texture_encoding>((granny_texture_encoding)native.Encoding), (granny_texture_encoding)native.Encoding);                  managed.Encoding = new NameValuePair<string, granny_texture_encoding>(coreapi.EnumToStringSupport.GetGrannyEnumTypeString<granny_texture_encoding>((granny_texture_encoding)native.Encoding), (granny_texture_encoding)native.Encoding);
132                  managed.SubFormat = new NameValuePair<string, granny_pixel_layout>(coreapi.GetGrannyEnumTypeString<granny_pixel_layout>((granny_pixel_layout)native.SubFormat), (granny_pixel_layout)native.SubFormat);                  managed.SubFormat = new NameValuePair<string, granny_pixel_layout>(coreapi.EnumToStringSupport.GetGrannyEnumTypeString<granny_pixel_layout>((granny_pixel_layout)native.SubFormat), (granny_pixel_layout)native.SubFormat);
133                  managed.Layout = Layout.ReadFromNative(native.Layout);                  managed.Layout = Layout.ReadFromNative(native.Layout);
134                  IntPtr[] images = Helpers.ReadPtrArrayFromMemory<native.Image>(native.Images);                  IntPtr[] images = Helpers.ReadPtrArrayFromMemory<native.Image>(native.Images);
135                  int length = images.Length;                  int length = images.Length;

Legend:
Removed from v.185  
changed lines
  Added in v.191

  ViewVC Help
Powered by ViewVC 1.1.22