Skip to content

Commit

Permalink
1.2.8rc2 修复软件资源释放时ICON资源文件名错误的bug Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Ginsakura committed Oct 29, 2024
1 parent 01d9ca7 commit 3caf84f
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22,062 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ SavAnalyze.json
*.sav
*.split
*.sfp
*.split
*.sql
*.sublime*
*.tmp
Expand Down
24 changes: 10 additions & 14 deletions AllHitAnalyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

from matplotlib.pyplot import MultipleLocator

class HitAnalyze(object):
class AllHitAnalyze(object):
"""docstring for HitAnalyze"""
def __init__(self):
super(HitAnalyze, self).__init__()
super(AllHitAnalyze, self).__init__()
db = sql.connect('./musync_data/HitDelayHistory_v2.db')
cur = db.cursor()
res = cur.execute('select HitMap from HitDelayHistory')
Expand Down Expand Up @@ -77,21 +77,18 @@ def __init__(self):
self.avgEx = sum([ids[0]*ids[1]/self.sumYnumEx for ids in zip(self.xAxis[61:240],self.yAxis[61:240])])
self.varEx = sum([(ids[1]/self.sumYnumEx)*((ids[0] - self.avgEx) ** 2) for ids in zip(self.xAxis[61:240],self.yAxis[61:240])])
self.stdEx = self.varEx**0.5

self.avgEX = sum([ids[0]*ids[1]/self.sumYnumEX for ids in zip(self.xAxis[106:195],self.yAxis[106:195])])
self.varEX = sum([(ids[1]/self.sumYnumEX)*((ids[0] - self.avgEX) ** 2) for ids in zip(self.xAxis[106:195],self.yAxis[106:195])])
self.stdEX = self.varEX**0.5
# del db,cur,hitMapA,hitMapB,res,idxAbs
print('All data: ',self.avg,self.var,self.std,self.sumYnum)
print('Exact rate:',self.avgEx,self.varEx,self.stdEx,self.sumYnumEx)
print('cyan Exact:',self.avgEX,self.varEX,self.stdEX,self.sumYnumEX)

def Show(self):
with open('./musync_data/ExtraFunction.cfg', 'r',encoding='utf8') as confFile:
config = json.load(confFile)
if config['EnablePDFofCyanExact']:
self.avgEX = sum([ids[0]*ids[1]/self.sumYnumEX for ids in zip(self.xAxis[106:195],self.yAxis[106:195])])
self.varEX = sum([(ids[1]/self.sumYnumEX)*((ids[0] - self.avgEX) ** 2) for ids in zip(self.xAxis[106:195],self.yAxis[106:195])])
self.stdEX = self.varEX**0.5
self.enablePDFofCyanExact = True
print('cyan Exact:',self.avgEX,self.varEX,self.stdEX,self.sumYnumEX)
else:
self.enablePDFofCyanExact = False

fig = plt.figure(f"HitAnalyze (Total:{self.sumYnum}, CyanEx:{self.rate[0]}, BlueEx:{self.rate[1]}, Great:{self.rate[2]}, Right:{self.rate[3]}, Miss:{self.rate[4]})", figsize=(16, 9))
fig.clear()
Expand Down Expand Up @@ -191,10 +188,9 @@ def PDFxEX(x):
ax1.plot(self.xAxis,pdfExAxis,linestyle='-',alpha=1,linewidth=1,color='black',
label=f'Fitting only on Exact rate\n(μ={self.avgEx}\n σ={self.stdEx})')

if self.enablePDFofCyanExact:
pdfEXAxis = [PDFxEX(i) for i in self.xAxis]
ax1.plot(self.xAxis,pdfEXAxis,linestyle='-',alpha=1,linewidth=1,color='blue',
label=f'Fitting only on Cyan Exact rate\n(μ={self.avgEX}\n σ={self.stdEX})')
pdfEXAxis = [PDFxEX(i) for i in self.xAxis]
ax1.plot(self.xAxis,pdfEXAxis,linestyle='-',alpha=1,linewidth=1,color='blue',
label=f'Fitting only on Cyan Exact rate\n(μ={self.avgEX}\n σ={self.stdEX})')


for i in range(len(self.xAxis)):
Expand Down
2 changes: 1 addition & 1 deletion FileExport.py
Original file line number Diff line number Diff line change
Expand Up @@ -3614,7 +3614,7 @@ def WriteIcon():
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
with open('./musync_data/Musync+.ico','wb+') as icon:
with open('./musync_data/Musync.ico','wb+') as icon:
icon.write(b64decode(iconData))
del icon,iconData
def WriteTTF():
Expand Down
3 changes: 2 additions & 1 deletion HitDelay.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
from hashlib import md5

import FileExport
from AllHitAnalyze_New import AllHitAnalyze
from AllHitAnalyze import AllHitAnalyze
# from AllHitAnalyze_New import AllHitAnalyze

uiauto.SetGlobalSearchTimeout(1)

Expand Down
4 changes: 2 additions & 2 deletions Launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import MainWindowOldStyle as OldStyle
# import MusyncSavDecodeGUI as NewStyle

version = '1.2.8rc1'
version = '1.2.8rc2'
isPreRelease = True
preVersion = "1.2.8pre4"
preVersion = "1.2.8pre5"
isPreRelease = False

def launcher():
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ HitDelay模块用法:启用DLL注入后,在本次游戏进行首次谱面游玩
1. xxx
-->
### Version 1.2.8
#### Release 2
2. 修复
1. ***修复新用户释放资源时,图标文件名称错误的bug***
#### Release 1
1. 更新
1. #### ***更新09月30日喵赛克新增曲目 (国庆节更新)***
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
9. 1.2.7 环境更新:`matplotlib 3.7.2->3.9.2`,`numpy 1.25.2->2.0.1`

### Version 1.2.8
#### Release 2
2. 修复
1. ***修复新用户释放资源时,图标文件名称错误的bug***
#### Release 1
1. 更新
1. #### ***更新09月30日喵赛克新增曲目 (国庆节更新)***
Expand Down
22,044 changes: 0 additions & 22,044 deletions musync_data/ttf.split

This file was deleted.

0 comments on commit 3caf84f

Please sign in to comment.