Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// 184 ///
- Runtime.prototype.tryLockOrientation = function ()
- {
- if (!this.autoLockOrientation || this.orientations === 0)
- return;
- var orientation = "portrait";
- if (this.orientations === 2)
- orientation = "landscape";
- if (screen["lockOrientation"])
- screen["lockOrientation"](orientation);
- else if (screen["webkitLockOrientation"])
- screen["webkitLockOrientation"](orientation);
- else if (screen["mozLockOrientation"])
- screen["mozLockOrientation"](orientation);
- else if (screen["msLockOrientation"])
- screen["msLockOrientation"](orientation);
- };
- /// 185 ///
- Runtime.prototype.tryLockOrientation = function ()
- {
- if (!this.autoLockOrientation || this.orientations === 0)
- return;
- var orientation = "portrait";
- if (this.orientations === 2)
- orientation = "landscape";
- if (screen["orientation"] && screen["orientation"]["lock"])
- screen["orientation"]["lock"](orientation);
- else if (screen["lockOrientation"])
- screen["lockOrientation"](orientation);
- else if (screen["webkitLockOrientation"])
- screen["webkitLockOrientation"](orientation);
- else if (screen["mozLockOrientation"])
- screen["mozLockOrientation"](orientation);
- else if (screen["msLockOrientation"])
- screen["msLockOrientation"](orientation);
- };
- /// 184 ///
- Runtime.prototype.waitForImageLoad = function (img_)
- {
- img_.onerror = function (e)
- {
- img_.c2error = true;
- anyImageHadError = true;
- if (console && console.error)
- console.error("Error loading image '" + img_.src + "': ", e);
- };
- this.wait_for_textures.push(img_);
- };
- /// 185 ///
- Runtime.prototype.waitForImageLoad = function (img_, src_)
- {
- img_.onerror = function (e)
- {
- img_.c2error = true;
- anyImageHadError = true;
- if (console && console.error)
- console.error("Error loading image '" + img_.src + "': ", e);
- };
- if (!img_.src)
- {
- if (typeof XAPKReader !== "undefined")
- {
- XAPKReader.get(src_, function (expanded_url)
- {
- img_.src = expanded_url;
- }, function (e)
- {
- img_.c2error = true;
- anyImageHadError = true;
- if (console && console.error)
- console.error("Error extracting image '" + src_ + "' from expansion file: ", e);
- });
- }
- else
- {
- img_.src = src_;
- }
- }
- this.wait_for_textures.push(img_);
- };
- /// 184 ///
- if (api === API_WEBAUDIO && context["createMediaElementSource"] && !audRuntime.isFirefox && !/wiiu/i.test(navigator.userAgent))
- /// 185 ///
- if (api === API_WEBAUDIO && context["createMediaElementSource"] && !/wiiu/i.test(navigator.userAgent))
- /// 184 ///
- else
- {
- frameobj.texture_img = new Image();
- frameobj.texture_img["idtkLoadDisposed"] = true;
- frameobj.texture_img.src = frame[0];
- frameobj.texture_img.cr_src = frame[0];
- frameobj.texture_img.cr_filesize = frame[1];
- frameobj.texture_img.c2webGL_texture = null;
- this.runtime.waitForImageLoad(frameobj.texture_img);
- }
- /// 185 ///
- else
- {
- frameobj.texture_img = new Image();
- frameobj.texture_img.cr_src = frame[0];
- frameobj.texture_img.cr_filesize = frame[1];
- frameobj.texture_img.c2webGL_texture = null;
- this.runtime.waitForImageLoad(frameobj.texture_img, frame[0]);
- }
- /// 184 ///
- typeProto.onCreate = function()
- {
- if (this.is_family)
- return;
- this.texture_img = new Image();
- this.texture_img["idtkLoadDisposed"] = true;
- this.texture_img.src = this.texture_file;
- this.runtime.waitForImageLoad(this.texture_img);
- this.webGL_texture = null;
- };
- /// 185 ///
- typeProto.onCreate = function()
- {
- if (this.is_family)
- return;
- this.texture_img = new Image();
- this.runtime.waitForImageLoad(this.texture_img, this.texture_file);
- this.webGL_texture = null;
- };
- /// 184 ///
- typeProto.onCreate = function()
- {
- if (this.is_family)
- return;
- this.texture_img = new Image();
- this.texture_img["idtkLoadDisposed"] = true;
- this.texture_img.src = this.texture_file;
- this.texture_img.cr_filesize = this.texture_filesize;
- this.runtime.waitForImageLoad(this.texture_img);
- this.pattern = null;
- this.webGL_texture = null;
- };
- /// 185 ///
- typeProto.onCreate = function()
- {
- if (this.is_family)
- return;
- this.texture_img = new Image();
- this.texture_img.cr_filesize = this.texture_filesize;
- this.runtime.waitForImageLoad(this.texture_img, this.texture_file);
- this.pattern = null;
- this.webGL_texture = null;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement