修改rom路径

This commit is contained in:
zhl 2019-03-26 20:55:59 +08:00
parent 6fe4b3b196
commit 7a6063fd8c
4 changed files with 18 additions and 65 deletions

View File

@ -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
View File

@ -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;

View File

@ -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);
}

View File

@ -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'));
})