1313
1414class Verifier ():
1515 def __init__ (self ,screen , score ,speed ,judgement_shown ,bpm ):
16- global fps
16+ global fps , high_quality_verifying_graphics
1717 self .screen = screen
1818 self .speed = speed
1919 self .score = score
2020 self .tiles_to_verify = []
2121 self .judgement_frames = fps // 2 #fps//2
2222 self .judgement_highest_pos = int ((self .judgement_frames ) * 0.7 )
2323 self .judgement_shown = judgement_shown
24+ self .high_quality_verifying_graphics = high_quality_verifying_graphics
2425
2526 self .frame_error = int (((10 / fps )* self .speed ) + 1 )
2627 self .song_bpm = bpm
@@ -89,6 +90,15 @@ def draw_guide_lines_node(self,nodes_on_screen,screen):
8990 [line_axes [node .line - 1 ] - line_width // 2 , node .y - judgement_half_size , line_width ,
9091 2 * judgement_half_size ],1 )
9192
93+
94+ def append_verification_tile (self ,tile_verification ):
95+ if self .high_quality_verifying_graphics :
96+ self .tiles_to_verify .append (tile_verification )
97+ else :
98+ time_added_verification = tile_verification + [pygame .time .get_ticks ()]
99+ self .tiles_to_verify .append (time_added_verification )
100+
101+
92102 def verify_judgement_node (self ,node ):
93103 result = ''
94104 detail = ''
@@ -115,6 +125,8 @@ def verify_judgement_node(self,node):
115125 # print result of Lost/Hit/Perfect on the screen
116126 #print(result)
117127 self .tiles_to_verify .append ([node ,(result ,detail ),self .judgement_frames ])
128+
129+
118130 self .score [0 ] += point
119131 if self .judgement_shown :
120132 print (round (human_error ))
@@ -209,16 +221,20 @@ def check_keep_pressing(self,hold,keys):
209221
210222
211223 def draw_judgement (self ):
212- for i in range (len (self .tiles_to_verify )- 1 ,- 1 ,- 1 ):
213- verification = self .tiles_to_verify [i ]
214- if verification [2 ] <= 1 :
215- self .tiles_to_verify .remove (verification )
216- else :
217- write_text (self .screen , line_axes [verification [0 ].line - 1 ], judgement_line - judgement_text * 3 + self .calc_pos (verification [2 ]), "%s" % (verification [1 ][0 ]), judgement_text , background_color [0 ], highlight_text_color )
218- write_text (self .screen , line_axes [verification [0 ].line - 1 ],
219- judgement_line - judgement_text * 3 + self .calc_pos (verification [2 ])+ judgement_text ,
220- "%s" % (verification [1 ][1 ]), detail_text , background_color [0 ], highlight_text_color )
221- verification [2 ] -= 1
224+ if self .high_quality_verifying_graphics :
225+ for i in range (len (self .tiles_to_verify )- 1 ,- 1 ,- 1 ):
226+ verification = self .tiles_to_verify [i ]
227+ if verification [2 ] <= 1 :
228+ self .tiles_to_verify .remove (verification )
229+ else :
230+
231+ write_text (self .screen , line_axes [verification [0 ].line - 1 ], judgement_line - judgement_text * 3 + self .calc_pos (verification [2 ]), "%s" % (verification [1 ][0 ]), judgement_text , background_color [0 ], highlight_text_color )
232+ write_text (self .screen , line_axes [verification [0 ].line - 1 ],
233+ judgement_line - judgement_text * 3 + self .calc_pos (verification [2 ])+ judgement_text ,
234+ "%s" % (verification [1 ][1 ]), detail_text , background_color [0 ], highlight_text_color )
235+ verification [2 ] -= 1
236+ else :
237+ pass
222238
223239 def calc_pos (self ,note_stage ):
224240 return (max (self .judgement_highest_pos , note_stage ) - self .judgement_highest_pos )
0 commit comments