@@ -39,9 +39,9 @@ bool WhiteDialogDetector::detect(const ImageViewRGB32& screen){
3939 ImageViewRGB32 right_image = extract_box_reference (screen, m_right_box);
4040 ImageViewRGB32 top_image = extract_box_reference (screen, m_top_box);
4141 ImageViewRGB32 bottom_image = extract_box_reference (screen, m_bottom_box);
42- if (is_solid (right_image, { 0.25 , 0.38 , 0.369 })
43- && is_solid (top_image, { 0.25 , 0.38 , 0.369 })
44- && is_solid (bottom_image, { 0.25 , 0.38 , 0.369 })
42+ if (is_solid (right_image, { 0.333333 , 0.333333 , 0.333333 })
43+ && is_solid (top_image, { 0.333333 , 0.333333 , 0.333333 })
44+ && is_solid (bottom_image, { 0.333333 , 0.333333 , 0.333333 })
4545 ){
4646 return true ;
4747 }
@@ -81,11 +81,11 @@ bool AdvanceWhiteDialogDetector::detect(const ImageViewRGB32& screen){
8181 ImageViewRGB32 top_image = extract_box_reference (screen, m_top_box);
8282 ImageViewRGB32 bottom_image = extract_box_reference (screen, m_bottom_box);
8383
84- if (is_solid (right_image, { 0.25 , 0.38 , 0.369 })
85- && is_solid (top_image, { 0.25 , 0.38 , 0.369 })
86- && is_solid (bottom_image, { 0.25 , 0.38 , 0.369 })
87- && (stats.average .r > stats.average .b + 200 )
88- && (stats.average .r > stats.average .g + 200 )
84+ if (is_solid (right_image, { 0.333333 , 0.333333 , 0.333333 })
85+ && is_solid (top_image, { 0.333333 , 0.333333 , 0.333333 })
86+ && is_solid (bottom_image, { 0.333333 , 0.333333 , 0.333333 })
87+ && (stats.average .r > stats.average .b + 180 )
88+ && (stats.average .r > stats.average .g + 180 )
8989 )
9090 {
9191 return true ;
@@ -110,10 +110,10 @@ bool SelectionDialogDetector::detect(const ImageViewRGB32& screen){
110110 ImageViewRGB32 top_image = extract_box_reference (screen, m_top_box);
111111 ImageViewRGB32 bottom_image = extract_box_reference (screen, m_bottom_box);
112112 ImageViewRGB32 selection_image = extract_box_reference (screen, m_selection_box);
113- if (is_solid (right_image, { 0.25 , 0.38 , 0.369 })
114- && is_solid (top_image, { 0.25 , 0.38 , 0.369 })
115- && is_solid (bottom_image, { 0.25 , 0.38 , 0.369 })
116- && is_solid (selection_image, { 0.25 , 0.38 , 0.369 })
113+ if (is_solid (right_image, { 0.333333 , 0.333333 , 0.333333 })
114+ && is_solid (top_image, { 0.333333 , 0.333333 , 0.333333 })
115+ && is_solid (bottom_image, { 0.333333 , 0.333333 , 0.333333 })
116+ && is_solid (selection_image, { 0.333333 , 0.333333 , 0.333333 })
117117 ){
118118 return true ;
119119 }
@@ -205,8 +205,8 @@ bool AdvanceBattleDialogDetector::detect(const ImageViewRGB32& screen){
205205
206206 if (is_solid (dialog_top_image, { 0.176 , 0.357 , 0.467 })
207207 && is_solid (dialog_right_image, { 0.176 , 0.357 , 0.467 })
208- && (stats.average .r > stats.average .b + 200 )
209- && (stats.average .r > stats.average .g + 200 )
208+ && (stats.average .r > stats.average .b + 180 )
209+ && (stats.average .r > stats.average .g + 180 )
210210 )
211211 {
212212 return true ;
0 commit comments