Skip to content

Commit

Permalink
update 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed Mar 21, 2018
1 parent 1564096 commit 292358f
Show file tree
Hide file tree
Showing 18 changed files with 277 additions and 68 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
},
"rules": {
"eqeqeq": 0,
"no-irregular-whitespace": 0
"no-irregular-whitespace": 0,
"no-new": 0
},
"plugins": [
"html"
Expand Down
2 changes: 1 addition & 1 deletion build/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const option = {
electronVersion: packageJson.devDependencies.electron,
packDir: path.join(__dirname, '..'),
distDir: path.join(__dirname, '../dist'),
ignore: new RegExp(`node_modules|build|data|release|download|dist|src|screenshot|${'public/img/card'.replace(/\//g, '\\\\')}|${'public/asset/sound/live'.replace(/\//g, '\\\\')}|${'public/asset/sound/voice'.replace(/\//g, '\\\\')}|.gitignore|README|.eslintrc.json|config.json|package-lock.json|.git|.vscode`),
ignore: new RegExp(`node_modules|build|data|release|download|dist|src|screenshot|public/img/card|public/asset/sound/live|public/asset/sound/voice|public/asset/score|.gitignore|README|.eslintrc.json|config.json|package-lock.json|.git|.vscode`.replace(/\//g, '\\\\')),
versionString: {
icon: path.join(__dirname, '../src/res/icon/mishiro.ico'),
'file-version': packageJson.version,
Expand Down
98 changes: 49 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"pkg64": "npm run prod&&node ./build/pack.js x64",
"count": "node ./build/count.js",
"reb:hca-ia32": "cd ./src/cpp/hca&&node-gyp rebuild --target=%npm_package_devDependencies_electron% --arch=ia32 --dist-url=https://atom.io/download/electron",
"reb:hca-x64": "cd ./src/cpp/hca&&node-gyp rebuild --target=%npm_package_devDependencies_electron% --arch=x64 --dist-url=https://atom.io/download/electron"
"reb:hca-x64": "cd ./src/cpp/hca&&node-gyp rebuild --target=%npm_package_devDependencies_electron% --arch=x64 --dist-url=https://atom.io/download/electron",
"sql32": "npm install [email protected] --no-save --build-from-source --runtime=electron --target=%npm_package_devDependencies_electron% --target_arch=ia32 --dist-url=https://atom.io/download/electron",
"sql64": "npm install [email protected] --no-save --build-from-source --runtime=electron --target=%npm_package_devDependencies_electron% --target_arch=x64 --dist-url=https://atom.io/download/electron"
},
"repository": {
"type": "git",
Expand All @@ -35,7 +37,7 @@
"license": "MIT",
"devDependencies": {
"css-loader": "^0.28.7",
"electron": "1.8.2",
"electron": "1.8.4",
"eslint": "^4.16.0",
"eslint-config-standard": "^11.0.0-beta.0",
"eslint-plugin-html": "^3.2.2",
Expand Down
4 changes: 3 additions & 1 deletion src/js/i18n/ja-JP.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ export default {
live: 'ライブ',
noScore: 'この曲は譜面がないので、プレイできません。',
noAudio: 'MP3ファイルが見つかりませんでした。',
start: '決定'
start: '決定',
gameRunning: 'ライブ進行中です。',
liveResult: 'ライブ成績'
},
gacha: {
ikkai: '1回引く',
Expand Down
4 changes: 3 additions & 1 deletion src/js/i18n/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ export default {
live: 'LIVE',
noScore: '這首曲子没有譜面。',
noAudio: '未発現MP3文件。',
start: '開始'
start: '開始',
gameRunning: 'LIVE正在進行。',
liveResult: 'LIVE成績'
},
gacha: {
ikkai: '単抽',
Expand Down
1 change: 1 addition & 0 deletions src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import './main/ipc.js'
let mainWindow

function createWindow () {
// Menu.setApplicationMenu(null)
mainWindow = new BrowserWindow({
width: 1296,
height: 863,
Expand Down
7 changes: 6 additions & 1 deletion src/js/main/on-game.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export default async function (event, scoreFile, difficulty, bpm, src) {
let data = rows.filter(row => row.name === nameField)[0].data.toString()

let score = createScore(data, bpm)
let obj = { src, bpm, score }

let fullCombo = 0
for (let i = 0; i < score.length; i++) {
fullCombo += score[i][2] ? 2 : 1
}
let obj = { src, bpm, score, fullCombo }
event.sender.send('game', obj)
}
2 changes: 1 addition & 1 deletion src/js/main/resolve-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let config = (async function () {
let fix = {}
if (!config.latestResVer) {
let rv346 = await getResourceVersionFromMishiroLab()
fix.latestResVer = rv346 || 10036710
fix.latestResVer = rv346 || 10036950
}
if (config.language !== 'zh' && config.language !== 'ja') {
fix.language = 'zh'
Expand Down
5 changes: 3 additions & 2 deletions src/js/renderer-game.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Game from '../vue/MishiroGame.vue'
window.addEventListener('load', () => {
keyBind()
Note.CTX = document.getElementById('live').getContext('2d')
let ctxIconBar = document.getElementById('iconBar').getContext('2d')
let ctxIconBar = Note.BACK_CTX = document.getElementById('iconBar').getContext('2d')
let liveIcon = newImage('./img/img.asar/live_icon_857x114.png')
liveIcon.addEventListener('load', function () {
ctxIconBar.drawImage(this, 211.5, 586)
Expand All @@ -16,7 +16,8 @@ window.addEventListener('load', () => {

ipcRenderer.on('start', (event, song, fromWindowId) => {
let name = parse(song.src).name.split('-')[1]
document.getElementsByTagName('title')[0].innerHTML = name
document.getElementsByTagName('title')[0].innerHTML = liveResult.name = name
liveResult.fullCombo = song.fullCombo
let isCompleted = false
window.addEventListener('beforeunload', (e) => {
const fromWindow = remote.BrowserWindow.fromId(fromWindowId)
Expand Down
2 changes: 1 addition & 1 deletion src/js/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Vue.use(vueGlobal);
}
})

window.app = new Vue({
new Vue({
el: '#app',
i18n,
render: h => h(Mishiro)
Expand Down
Loading

0 comments on commit 292358f

Please sign in to comment.