修改rom路径
This commit is contained in:
parent
6fe4b3b196
commit
7a6063fd8c
@ -157,7 +157,7 @@ window.vm = {
|
||||
|
||||
function startGame(){
|
||||
var gameId = getParameter("id")
|
||||
var path = "../roms/" + gameId + ".nes"
|
||||
var path = "https://h5games-al.kingsome.cn/emulator-static/roms/" + gameId + ".nes"
|
||||
nes_load_url("screen", path)
|
||||
vm.initCtrl()
|
||||
|
||||
|
36
gba/dist/gbajs.min.js
vendored
36
gba/dist/gbajs.min.js
vendored
@ -7524,8 +7524,8 @@ function initAudioEvent() {
|
||||
|
||||
function loadRomByZipUrl(i, r) {
|
||||
// var s = (/192.168./.test(location.href) ? "http://192.168.42.80:8088/gba/" : "https://pub.hoh8.cn/files/game/gba/") + gameId + "/" + gameId + ".zip",
|
||||
//var s = "http://192.168.100.84/gba/roms/" + gameId + ".zip",
|
||||
var s = "http://h5games-al.kingsome.cn/emulator-static/roms/" + gameId + ".zip",
|
||||
// var s = "http://www.zhl.com:7008/roms/" + gameId + ".zip",
|
||||
var s = "https://h5games-al.kingsome.cn/emulator-static/roms/" + gameId + ".zip",
|
||||
n = "GBA_ROM_" + s;
|
||||
localforage.getItem(n, function(t, e) {
|
||||
e ? i(e) : zip.createReader(new zip.HttpReader(s, r), function(e) {
|
||||
@ -7554,36 +7554,8 @@ function run() {
|
||||
})
|
||||
}
|
||||
|
||||
function startGame(){
|
||||
initGBA(), $(".key-btn").bind("touchstart", initAudioEvent)
|
||||
}
|
||||
function checkSession_id(res){
|
||||
try{
|
||||
if(JSON.parse(res.target.response).errcode==0){
|
||||
startGame();
|
||||
}
|
||||
}catch(e){}
|
||||
}
|
||||
window.onload = function(){
|
||||
var account_id = getParameter("account_id")
|
||||
var session_id = getParameter("session_id")
|
||||
var url;
|
||||
if(getParameter("version")==="product"){
|
||||
url = "https://login.kingsome.cn/webapp/index.php?c=Login&a=sessionAuth"
|
||||
}
|
||||
else{
|
||||
url = "https://login-test.kingsome.cn/webapp/index.php?c=Login&a=sessionAuth"
|
||||
}
|
||||
url += "&account_id=";
|
||||
url += account_id;
|
||||
url += "&session_id=";
|
||||
url += session_id;
|
||||
|
||||
var ajax = new XMLHttpRequest();
|
||||
ajax.onload = checkSession_id;
|
||||
ajax.open("GET", url, true);
|
||||
ajax.send(null);
|
||||
|
||||
initGBA(), $(".key-btn").bind("touchstart", initAudioEvent)
|
||||
}
|
||||
|
||||
|
||||
@ -7682,7 +7654,7 @@ window.vm = {
|
||||
s.keyEvent(i, r ? "keydown" : "keyup", 0), e[r ? "addClass" : "removeClass"]("btn-on")
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
onCtrlDire: function(t, e) {
|
||||
this.onCtrlDire;
|
||||
var i ;//= Math.round((t + 180) / 45) % 8;
|
||||
|
@ -219,7 +219,8 @@ function downloadROM() {
|
||||
Iodine.pause();
|
||||
showTempString("Downloading");
|
||||
var gameId = getParameter("id")
|
||||
var path = "http://h5games-al.kingsome.cn/emulator-static/roms/" + gameId + ".zip"
|
||||
// var path = "http://www.zhl.com:7008/roms/" + gameId + ".zip"
|
||||
var path = "https://h5games-al.kingsome.cn/emulator-static/roms/" + gameId + ".zip"
|
||||
downloadFileRemote(path,registerROM2);
|
||||
// downloadFile("Binaries/" + gamename + ".gba", registerROM);
|
||||
}
|
||||
|
42
gulpfile.js
42
gulpfile.js
@ -8,7 +8,13 @@ var gulp = require('gulp'),
|
||||
cleanCSS = require('gulp-clean-css'),
|
||||
gutil = require('gulp-util');
|
||||
const javascriptObfuscator = require('gulp-javascript-obfuscator');
|
||||
|
||||
const obfuscatorOptions = {
|
||||
compact:true,
|
||||
sourceMap: false,
|
||||
debugProtection: true,
|
||||
disableConsoleOutput: true,
|
||||
domainLock: ['.kingsome.cn', '.zhl.com']
|
||||
};
|
||||
//检查js的语法错误
|
||||
gulp.task('jslint', function () {
|
||||
return gulp.src('fc/js/*.js')
|
||||
@ -38,12 +44,7 @@ const javascriptObfuscator = require('gulp-javascript-obfuscator');
|
||||
})
|
||||
gulp.task('distfcjs', function() {
|
||||
return gulp.src(['fc/js/*.js'])
|
||||
.pipe(javascriptObfuscator({
|
||||
compact:true,
|
||||
sourceMap: false,
|
||||
debugProtection: true,
|
||||
domainLock: ['kingsome.cn', '.zhl.com']
|
||||
}))
|
||||
.pipe(javascriptObfuscator(obfuscatorOptions))
|
||||
.pipe(stripDebug())
|
||||
.pipe(gulp.dest('dist/fc/js'));
|
||||
});
|
||||
@ -54,12 +55,7 @@ const javascriptObfuscator = require('gulp-javascript-obfuscator');
|
||||
// .pipe(concat('main.js'))
|
||||
// .pipe(rename({suffix: '.min'}))
|
||||
//https://github.com/mishoo/UglifyJS2
|
||||
.pipe(javascriptObfuscator({
|
||||
compact:true,
|
||||
sourceMap: false,
|
||||
debugProtection: true,
|
||||
domainLock: ['kingsome.cn', '.zhl.com']
|
||||
}))
|
||||
// .pipe(javascriptObfuscator(obfuscatorOptions))
|
||||
.pipe(stripDebug())
|
||||
.pipe(gulp.dest('dist/gba/dist'));
|
||||
});
|
||||
@ -82,12 +78,7 @@ const javascriptObfuscator = require('gulp-javascript-obfuscator');
|
||||
// .pipe(concat('main.js'))
|
||||
// .pipe(rename({suffix: '.min'}))
|
||||
//https://github.com/mishoo/UglifyJS2
|
||||
.pipe(javascriptObfuscator({
|
||||
compact:true,
|
||||
sourceMap: false,
|
||||
debugProtection: true,
|
||||
domainLock: ['kingsome.cn', '.zhl.com']
|
||||
}))
|
||||
.pipe(javascriptObfuscator(obfuscatorOptions))
|
||||
.pipe(stripDebug())
|
||||
.pipe(gulp.dest('dist/gba2/dist'));
|
||||
});
|
||||
@ -106,22 +97,11 @@ const javascriptObfuscator = require('gulp-javascript-obfuscator');
|
||||
})
|
||||
gulp.task('distgba2jscore', function() {
|
||||
return gulp.src(['gba2/IodineGBA/**/*'])
|
||||
.pipe(javascriptObfuscator({
|
||||
compact:true,
|
||||
sourceMap: false,
|
||||
debugProtection: true,
|
||||
domainLock: ['kingsome.cn', '.zhl.com']
|
||||
}))
|
||||
.pipe(gulp.dest('dist/gba2/IodineGBA'));
|
||||
})
|
||||
gulp.task('distgba2jsuser', function() {
|
||||
return gulp.src(['gba2/user_scripts/**/*'])
|
||||
.pipe(javascriptObfuscator({
|
||||
compact:true,
|
||||
sourceMap: false,
|
||||
debugProtection: true,
|
||||
domainLock: ['kingsome.cn', '.zhl.com']
|
||||
}))
|
||||
.pipe(javascriptObfuscator(obfuscatorOptions))
|
||||
.pipe(stripDebug())
|
||||
.pipe(gulp.dest('dist/gba2/user_scripts'));
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user