修改rom路径
This commit is contained in:
parent
6fe4b3b196
commit
7a6063fd8c
@ -157,7 +157,7 @@ window.vm = {
|
|||||||
|
|
||||||
function startGame(){
|
function startGame(){
|
||||||
var gameId = getParameter("id")
|
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)
|
nes_load_url("screen", path)
|
||||||
vm.initCtrl()
|
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) {
|
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 = (/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://www.zhl.com:7008/roms/" + gameId + ".zip",
|
||||||
var s = "http://h5games-al.kingsome.cn/emulator-static/roms/" + gameId + ".zip",
|
var s = "https://h5games-al.kingsome.cn/emulator-static/roms/" + gameId + ".zip",
|
||||||
n = "GBA_ROM_" + s;
|
n = "GBA_ROM_" + s;
|
||||||
localforage.getItem(n, function(t, e) {
|
localforage.getItem(n, function(t, e) {
|
||||||
e ? i(e) : zip.createReader(new zip.HttpReader(s, r), function(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(){
|
window.onload = function(){
|
||||||
var account_id = getParameter("account_id")
|
initGBA(), $(".key-btn").bind("touchstart", initAudioEvent)
|
||||||
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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -7682,7 +7654,7 @@ window.vm = {
|
|||||||
s.keyEvent(i, r ? "keydown" : "keyup", 0), e[r ? "addClass" : "removeClass"]("btn-on")
|
s.keyEvent(i, r ? "keydown" : "keyup", 0), e[r ? "addClass" : "removeClass"]("btn-on")
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onCtrlDire: function(t, e) {
|
onCtrlDire: function(t, e) {
|
||||||
this.onCtrlDire;
|
this.onCtrlDire;
|
||||||
var i ;//= Math.round((t + 180) / 45) % 8;
|
var i ;//= Math.round((t + 180) / 45) % 8;
|
||||||
|
@ -219,7 +219,8 @@ function downloadROM() {
|
|||||||
Iodine.pause();
|
Iodine.pause();
|
||||||
showTempString("Downloading");
|
showTempString("Downloading");
|
||||||
var gameId = getParameter("id")
|
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);
|
downloadFileRemote(path,registerROM2);
|
||||||
// downloadFile("Binaries/" + gamename + ".gba", registerROM);
|
// downloadFile("Binaries/" + gamename + ".gba", registerROM);
|
||||||
}
|
}
|
||||||
|
42
gulpfile.js
42
gulpfile.js
@ -8,7 +8,13 @@ var gulp = require('gulp'),
|
|||||||
cleanCSS = require('gulp-clean-css'),
|
cleanCSS = require('gulp-clean-css'),
|
||||||
gutil = require('gulp-util');
|
gutil = require('gulp-util');
|
||||||
const javascriptObfuscator = require('gulp-javascript-obfuscator');
|
const javascriptObfuscator = require('gulp-javascript-obfuscator');
|
||||||
|
const obfuscatorOptions = {
|
||||||
|
compact:true,
|
||||||
|
sourceMap: false,
|
||||||
|
debugProtection: true,
|
||||||
|
disableConsoleOutput: true,
|
||||||
|
domainLock: ['.kingsome.cn', '.zhl.com']
|
||||||
|
};
|
||||||
//检查js的语法错误
|
//检查js的语法错误
|
||||||
gulp.task('jslint', function () {
|
gulp.task('jslint', function () {
|
||||||
return gulp.src('fc/js/*.js')
|
return gulp.src('fc/js/*.js')
|
||||||
@ -38,12 +44,7 @@ const javascriptObfuscator = require('gulp-javascript-obfuscator');
|
|||||||
})
|
})
|
||||||
gulp.task('distfcjs', function() {
|
gulp.task('distfcjs', function() {
|
||||||
return gulp.src(['fc/js/*.js'])
|
return gulp.src(['fc/js/*.js'])
|
||||||
.pipe(javascriptObfuscator({
|
.pipe(javascriptObfuscator(obfuscatorOptions))
|
||||||
compact:true,
|
|
||||||
sourceMap: false,
|
|
||||||
debugProtection: true,
|
|
||||||
domainLock: ['kingsome.cn', '.zhl.com']
|
|
||||||
}))
|
|
||||||
.pipe(stripDebug())
|
.pipe(stripDebug())
|
||||||
.pipe(gulp.dest('dist/fc/js'));
|
.pipe(gulp.dest('dist/fc/js'));
|
||||||
});
|
});
|
||||||
@ -54,12 +55,7 @@ const javascriptObfuscator = require('gulp-javascript-obfuscator');
|
|||||||
// .pipe(concat('main.js'))
|
// .pipe(concat('main.js'))
|
||||||
// .pipe(rename({suffix: '.min'}))
|
// .pipe(rename({suffix: '.min'}))
|
||||||
//https://github.com/mishoo/UglifyJS2
|
//https://github.com/mishoo/UglifyJS2
|
||||||
.pipe(javascriptObfuscator({
|
// .pipe(javascriptObfuscator(obfuscatorOptions))
|
||||||
compact:true,
|
|
||||||
sourceMap: false,
|
|
||||||
debugProtection: true,
|
|
||||||
domainLock: ['kingsome.cn', '.zhl.com']
|
|
||||||
}))
|
|
||||||
.pipe(stripDebug())
|
.pipe(stripDebug())
|
||||||
.pipe(gulp.dest('dist/gba/dist'));
|
.pipe(gulp.dest('dist/gba/dist'));
|
||||||
});
|
});
|
||||||
@ -82,12 +78,7 @@ const javascriptObfuscator = require('gulp-javascript-obfuscator');
|
|||||||
// .pipe(concat('main.js'))
|
// .pipe(concat('main.js'))
|
||||||
// .pipe(rename({suffix: '.min'}))
|
// .pipe(rename({suffix: '.min'}))
|
||||||
//https://github.com/mishoo/UglifyJS2
|
//https://github.com/mishoo/UglifyJS2
|
||||||
.pipe(javascriptObfuscator({
|
.pipe(javascriptObfuscator(obfuscatorOptions))
|
||||||
compact:true,
|
|
||||||
sourceMap: false,
|
|
||||||
debugProtection: true,
|
|
||||||
domainLock: ['kingsome.cn', '.zhl.com']
|
|
||||||
}))
|
|
||||||
.pipe(stripDebug())
|
.pipe(stripDebug())
|
||||||
.pipe(gulp.dest('dist/gba2/dist'));
|
.pipe(gulp.dest('dist/gba2/dist'));
|
||||||
});
|
});
|
||||||
@ -106,22 +97,11 @@ const javascriptObfuscator = require('gulp-javascript-obfuscator');
|
|||||||
})
|
})
|
||||||
gulp.task('distgba2jscore', function() {
|
gulp.task('distgba2jscore', function() {
|
||||||
return gulp.src(['gba2/IodineGBA/**/*'])
|
return gulp.src(['gba2/IodineGBA/**/*'])
|
||||||
.pipe(javascriptObfuscator({
|
|
||||||
compact:true,
|
|
||||||
sourceMap: false,
|
|
||||||
debugProtection: true,
|
|
||||||
domainLock: ['kingsome.cn', '.zhl.com']
|
|
||||||
}))
|
|
||||||
.pipe(gulp.dest('dist/gba2/IodineGBA'));
|
.pipe(gulp.dest('dist/gba2/IodineGBA'));
|
||||||
})
|
})
|
||||||
gulp.task('distgba2jsuser', function() {
|
gulp.task('distgba2jsuser', function() {
|
||||||
return gulp.src(['gba2/user_scripts/**/*'])
|
return gulp.src(['gba2/user_scripts/**/*'])
|
||||||
.pipe(javascriptObfuscator({
|
.pipe(javascriptObfuscator(obfuscatorOptions))
|
||||||
compact:true,
|
|
||||||
sourceMap: false,
|
|
||||||
debugProtection: true,
|
|
||||||
domainLock: ['kingsome.cn', '.zhl.com']
|
|
||||||
}))
|
|
||||||
.pipe(stripDebug())
|
.pipe(stripDebug())
|
||||||
.pipe(gulp.dest('dist/gba2/user_scripts'));
|
.pipe(gulp.dest('dist/gba2/user_scripts'));
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user