Skip to content

Commit

Permalink
提高镜牢入口识别准确率,并补充GUI的文字说明
Browse files Browse the repository at this point in the history
  • Loading branch information
HSLix committed Sep 21, 2023
1 parent 9b02b3d commit c0dad57
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

if __name__ == '__main__':
# 测试识图
# tryClick("./pic/mirror/previousClaimReward.png", "1", 0 , 0, 1, 1, 0.99)
# tryClick("./pic/mirror/mirror2/Mirror2Normal.png", "Mirror2Normal", 0, 0, 1, 1, 0.8)

# 互斥锁
mutex = CreateMutex(None, False, 'LALC.Running')
Expand Down
Binary file modified pic/mirror/mirror2/Mirror2Normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions src/common/picLocate.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,8 @@ def getSinCenXY(img_model_path, correctNum = 0.8):
for p in zip(*locations[::-1]):
x1, y1 = p[0], p[1]
center = (x1 + w/2,y1 + h/2)

existFlag = True
#print(f"左上坐标{x1}:{y1},右下坐标{x2}:{y2}, 中心坐标{center[0]}:{center[1]}")
#cv2.rectangle(img, (x1, y1), (x2, y2), (0,255,0), 2)
break
#cv2.imshow("image", img)
#cv2.waitKey()

# 内存释放
del img,template,match,locations
Expand Down Expand Up @@ -124,14 +119,9 @@ def getMulCenXY(img_model_path, correctNum = 0.8):

positionList.append(cx)
positionList.append(cy)

firstFlag = 0
existFlag = True
#print(f"左上坐标{x1}:{y1},右下坐标{x2}:{y2}, 中心坐标{center[0]}:{center[1]}")
#cv2.rectangle(img, (x1, y1), (x2, y2), (0,255,0), 2)

#cv2.imshow("image", img)
#cv2.waitKey()
# 内存释放
del img,template,match,locations
collect()
Expand Down
7 changes: 6 additions & 1 deletion src/gui/myGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ def showAboutPageFrame(self):
self.aboutText.insert("end", "* 若您遇到商家使用本软件进行代练并收费,可能是设备与时间等费用,产生的问题及后果与本软件无关。\n")
self.aboutText.insert("end", "* 获取管理员权限是为了确保运行顺利\n")
self.aboutText.insert("end", "* 该版本离线,只能到github自助更新\n\n")
self.aboutText.insert("end", "* 提交Issue反馈问题参考格式\n")
self.aboutText.insert("end", "* 时间 + 自己的配置,如电脑系统,屏幕缩放率等\n")
self.aboutText.insert("end", "* 出错时屏幕状况图片(要有程序和游戏界面)\n")
self.aboutText.insert("end", "* 程序正在处理的任务 + 日志文件\n\n")



Expand Down Expand Up @@ -172,7 +176,8 @@ def setMainPageRightFrame(self):
self.descriptionText.insert("end", "* 如遇到软件运行异常\nWhen error occur\n")
self.descriptionText.insert("end", "* 请点击\"Stop\"按钮获取软件运行情况\nClick the Stop Button\n")
self.descriptionText.insert("end", "* 保存好文件夹log内的日志文件\nSave the logs\n")
self.descriptionText.insert("end", "* 自行查看常见Q&A,如仍没能解决\nCheck Q&A\n")
self.descriptionText.insert("end", "* 自行查看Q&A,如仍没能解决\nCheck Q&A\n")
self.descriptionText.insert("end", "* 可以参考\"关于\"界面的Issue参考格式\nYou can refer to the Issue reference format\nof the \"关于\" page.\n")
self.descriptionText.insert("end", "* 请在GitHub的Issue里提交问题\nPlease send the Problem to the Issue in GitHub\n\n")
self.descriptionText.insert("end", "* 希望能减少游戏中有时间压力的部分\nHope you can have fun\n")
self.descriptionText.insert("end", "* 祝使用愉快 (-▽-)\nGood Luck~\n")
Expand Down
5 changes: 3 additions & 2 deletions src/script/classMir.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ def mirror1Prize(self):


def mirror1Cope(self):
'''处理镜牢2交互的各种情况'''
'''处理镜牢1交互的各种情况'''
result = False
getPic.winCap()
if(afc.autoFind("./pic/team/Announcer.png", "Announcer")):
Expand Down Expand Up @@ -864,6 +864,7 @@ def mirror1JudFullTeam(self,condition):
@checkAndExit
@beginAndFinishLog
def mirror1PrepareBattle(self):
'''镜牢1在战斗前的组队操作'''
i = 1
global notFullFlag
countFlag = 0
Expand Down Expand Up @@ -961,7 +962,7 @@ def mirror1BattlePart(self):
@checkAndExit
@beginAndFinishLog
def mirror1SinCoreFindWay(self):

'''镜牢1单进程寻路'''

result = False

Expand Down

0 comments on commit c0dad57

Please sign in to comment.