WeiWeiXinNet/Games/game3/js/other/gui.js
(开头部分) 18KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
var windowingInitialized = false;
var inFullscreen = false;
function windowingPreInitUnsafe() {
if (!windowingInitialized) {
windowingInitialized = true;
windowingInitialize();
}
}
function windowingPreInitSafe() {
if (typeof document.readyState == "undefined" || document.readyState == "complete") {
windowingPreInitUnsafe();
}
}
function windowingInitUnload() {
cout("In windowingInitUnload() : Unregistering window loading events.", 0);
removeEvent("DOMContentLoaded", document, windowingPreInitUnsafe);
removeEvent("readystatechange", document, windowingPreInitSafe);
removeEvent("load", document, windowingPreInitUnsafe);
}
function windowingInitialize() {
cout("windowingInitialize() called.", 0);
windowingInitUnload();
windowStacks[0] = windowCreate("GameBoy", true);
windowStacks[1] = windowCreate("terminal", false);
windowStacks[2] = windowCreate("about", false);
windowStacks[3] = windowCreate("settings", false);
windowStacks[4] = windowCreate("input_select", false);
windowStacks[5] = windowCreate("instructions", false);
try {
//Hook the GUI controls.
registerGUIEvents();
//Load any save states:
loadSaveStates();
}
catch (error) {
cout("Fatal windowing error: \"" + error.message + "\" file:" + error.fileName + " line: " + error.lineNumber, 2);
}
try {
try {
//Check for mozAudio
var audiohook = new Audio();
audiohook.mozSetup(2, 44100);
}
catch (error) {
//Check for the proposed standard Audio API's context object.
if (typeof AudioContext == "undefined") {
throw(new Error(""));
}
}
}
catch (error) {
//settings[0] = false; //Turn off audio by default
settings[1] = true; //Mono on non-native to speed it up.
//cout("Native audio sample writing support not found, audio turned off by default.", 1);
}
//Update the settings to the emulator's default:
document.getElementById("enable_sound").checked = settings[0];
document.getElementById("enable_mono_sound").checked = settings[1];
document.getElementById("disable_colors").checked = settings[2];
后面还有 410 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。