Advertisement
Guest User

184 vs 185

a guest
Oct 22nd, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /// 184 ///
  2. Runtime.prototype.tryLockOrientation = function ()
  3.     {
  4.         if (!this.autoLockOrientation || this.orientations === 0)
  5.             return;
  6.         var orientation = "portrait";
  7.         if (this.orientations === 2)
  8.             orientation = "landscape";
  9.         if (screen["lockOrientation"])
  10.             screen["lockOrientation"](orientation);
  11.         else if (screen["webkitLockOrientation"])
  12.             screen["webkitLockOrientation"](orientation);
  13.         else if (screen["mozLockOrientation"])
  14.             screen["mozLockOrientation"](orientation);
  15.         else if (screen["msLockOrientation"])
  16.             screen["msLockOrientation"](orientation);
  17.     };
  18.  
  19. /// 185 ///
  20. Runtime.prototype.tryLockOrientation = function ()
  21.     {
  22.         if (!this.autoLockOrientation || this.orientations === 0)
  23.             return;
  24.         var orientation = "portrait";
  25.         if (this.orientations === 2)
  26.             orientation = "landscape";
  27.         if (screen["orientation"] && screen["orientation"]["lock"])
  28.             screen["orientation"]["lock"](orientation);
  29.         else if (screen["lockOrientation"])
  30.             screen["lockOrientation"](orientation);
  31.         else if (screen["webkitLockOrientation"])
  32.             screen["webkitLockOrientation"](orientation);
  33.         else if (screen["mozLockOrientation"])
  34.             screen["mozLockOrientation"](orientation);
  35.         else if (screen["msLockOrientation"])
  36.             screen["msLockOrientation"](orientation);
  37.     };
  38.  
  39. /// 184 ///
  40. Runtime.prototype.waitForImageLoad = function (img_)
  41.     {
  42.         img_.onerror = function (e)
  43.         {
  44.             img_.c2error = true;
  45.             anyImageHadError = true;
  46.             if (console && console.error)
  47.                 console.error("Error loading image '" + img_.src + "': ", e);
  48.         };
  49.         this.wait_for_textures.push(img_);
  50.     };
  51.  
  52. /// 185 ///
  53. Runtime.prototype.waitForImageLoad = function (img_, src_)
  54. {
  55.     img_.onerror = function (e)
  56.     {
  57.         img_.c2error = true;
  58.         anyImageHadError = true;
  59.         if (console && console.error)
  60.             console.error("Error loading image '" + img_.src + "': ", e);
  61.     };
  62.     if (!img_.src)
  63.     {
  64.         if (typeof XAPKReader !== "undefined")
  65.         {
  66.             XAPKReader.get(src_, function (expanded_url)
  67.             {
  68.                 img_.src = expanded_url;
  69.             }, function (e)
  70.             {
  71.                 img_.c2error = true;
  72.                 anyImageHadError = true;
  73.                 if (console && console.error)
  74.                     console.error("Error extracting image '" + src_ + "' from expansion file: ", e);
  75.             });
  76.         }
  77.         else
  78.         {
  79.             img_.src = src_;
  80.         }
  81.     }
  82.     this.wait_for_textures.push(img_);
  83. };
  84.  
  85. /// 184 ///
  86. if (api === API_WEBAUDIO && context["createMediaElementSource"] && !audRuntime.isFirefox && !/wiiu/i.test(navigator.userAgent))
  87.  
  88. /// 185 ///
  89. if (api === API_WEBAUDIO && context["createMediaElementSource"] && !/wiiu/i.test(navigator.userAgent))
  90.  
  91. /// 184 ///
  92. else
  93.                 {
  94.                     frameobj.texture_img = new Image();
  95.                     frameobj.texture_img["idtkLoadDisposed"] = true;
  96.                     frameobj.texture_img.src = frame[0];
  97.                     frameobj.texture_img.cr_src = frame[0];
  98.                     frameobj.texture_img.cr_filesize = frame[1];
  99.                     frameobj.texture_img.c2webGL_texture = null;
  100.                     this.runtime.waitForImageLoad(frameobj.texture_img);
  101.                 }
  102.  
  103. /// 185 ///
  104. else
  105.                 {
  106.                     frameobj.texture_img = new Image();
  107.                     frameobj.texture_img.cr_src = frame[0];
  108.                     frameobj.texture_img.cr_filesize = frame[1];
  109.                     frameobj.texture_img.c2webGL_texture = null;
  110.                     this.runtime.waitForImageLoad(frameobj.texture_img, frame[0]);
  111.                 }
  112.  
  113. /// 184 ///
  114. typeProto.onCreate = function()
  115.     {
  116.         if (this.is_family)
  117.             return;
  118.         this.texture_img = new Image();
  119.         this.texture_img["idtkLoadDisposed"] = true;
  120.         this.texture_img.src = this.texture_file;
  121.         this.runtime.waitForImageLoad(this.texture_img);
  122.         this.webGL_texture = null;
  123.     };
  124.  
  125. /// 185 ///
  126. typeProto.onCreate = function()
  127.     {
  128.         if (this.is_family)
  129.             return;
  130.         this.texture_img = new Image();
  131.         this.runtime.waitForImageLoad(this.texture_img, this.texture_file);
  132.         this.webGL_texture = null;
  133.     };
  134.  
  135. /// 184 ///
  136. typeProto.onCreate = function()
  137.     {
  138.         if (this.is_family)
  139.             return;
  140.         this.texture_img = new Image();
  141.         this.texture_img["idtkLoadDisposed"] = true;
  142.         this.texture_img.src = this.texture_file;
  143.         this.texture_img.cr_filesize = this.texture_filesize;
  144.         this.runtime.waitForImageLoad(this.texture_img);
  145.         this.pattern = null;
  146.         this.webGL_texture = null;
  147.     };
  148.  
  149. /// 185 ///
  150. typeProto.onCreate = function()
  151.     {
  152.         if (this.is_family)
  153.             return;
  154.         this.texture_img = new Image();
  155.         this.texture_img.cr_filesize = this.texture_filesize;
  156.         this.runtime.waitForImageLoad(this.texture_img, this.texture_file);
  157.         this.pattern = null;
  158.         this.webGL_texture = null;
  159.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement