fix draw hold body inactive texture bug

If hold body, draw texture to the outside screen.
This commit is contained in:
A.C
2015-09-10 01:17:54 +09:00
parent 0d5a3fdfc1
commit 1d61989ccb
+6 -1
View File
@@ -756,7 +756,12 @@ void NoteDisplay::DrawHoldPart(vector<Sprite*> &vpSpr,
/* Only draw the section that's within the range specified. If a hold note is
* very long, don't process or draw the part outside of the range. Don't change
* part_args.y_top or part_args.y_bottom; they need to be left alone to calculate texture coordinates. */
const float y_start_pos = max(part_args.y_top, part_args.y_start_pos);
// If hold body, draw texture to the outside screen.(fix by A.C)
float y_start_pos = (part_type == hpt_body) ? part_args.y_top : max(part_args.y_top, part_args.y_start_pos);
if (part_args.y_top < part_args.y_start_pos - unzoomed_frame_height)
{
y_start_pos = fmod((y_start_pos - part_args.y_start_pos), unzoomed_frame_height) + part_args.y_start_pos;
}
float y_end_pos = min(part_args.y_bottom, part_args.y_end_pos);
const float color_scale= glow ? 1 : part_args.color_scale;
if(part_type == hpt_body)