Skip to content

Commit

Permalink
Fixed reverse arrow reversing wrong order
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilySunpy committed Dec 31, 2017
1 parent 51355dc commit e16e529
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 230 deletions.
3 changes: 0 additions & 3 deletions osu_parser/beatmap.py
Expand Up @@ -123,11 +123,8 @@ def handle_hitobject(self, line):

tick_distance = (100 * self.difficulty["SliderMultiplier"]) / self.difficulty["SliderTickRate"]
if self.version >= 8:
#tick_distance /= time_point["spm"]
tick_distance /= (mathhelper.clamp(-time_point["raw_spm"], 10, 1000) / 100)

#tick_distance /= time_point["spm"]

curve_split = split_object[5].split("|")
curve_points = []
for i in range(1, len(curve_split)):
Expand Down
2 changes: 1 addition & 1 deletion osu_parser/hitobject.py
Expand Up @@ -126,7 +126,7 @@ def calc_slider(self, calc_path = False):
repeat_ticks = copy.deepcopy(self.ticks)

if 1 & repeat_id: #We have to reverse the timing normalizer
#repeat_ticks = list(reversed(repeat_ticks))
repeat_ticks = list(reversed(repeat_ticks))
normalize_time_value = self.time + (self.duration / self.repeat)
else:
normalize_time_value = self.time
Expand Down
278 changes: 53 additions & 225 deletions test.osu
Expand Up @@ -3,253 +3,81 @@ osu file format v14
[General]
AudioFilename: audio.mp3
AudioLeadIn: 0
PreviewTime: 60661
Countdown: 0
SampleSet: Soft
PreviewTime: -1
Countdown: 1
SampleSet: Normal
StackLeniency: 0.7
Mode: 2
LetterboxInBreaks: 0
WidescreenStoryboard: 1

[Editor]
Bookmarks: 61036,90136
DistanceSpacing: 1
BeatDivisor: 6
GridSize: 4
TimelineZoom: 2.999999
DistanceSpacing: 1.1
BeatDivisor: 4
GridSize: 32
TimelineZoom: 1

[Metadata]
Title:On the FM
TitleUnicode:On the FM
Artist:C-Show
ArtistUnicode:C-Show
Creator:Ascendance
Version:DEBUG
Source:beatmania IIDX 23 copula
Tags:KONAMI BEMANI Kaitsuu! Tokotoko line 24 SINOBUZ PANIC HOLIC ZiRoX Spectator Emiru FoxyGrandpa Hareimu Sorcerer Tomthewizard CShow RADIO SHOWCASE 開通!とことこライン
BeatmapID:1391070
BeatmapSetID:609679
Title:test
TitleUnicode:test
Artist:test
ArtistUnicode:test
Creator:Sunpy
Version:TICKS
Source:test
Tags:test
BeatmapID:0
BeatmapSetID:-1

[Difficulty]
HPDrainRate:6
HPDrainRate:2
CircleSize:4
OverallDifficulty:9.2
ApproachRate:9.2
SliderMultiplier:1.95
SliderTickRate:2
OverallDifficulty:2
ApproachRate:6
SliderMultiplier:1.40000000596046
SliderTickRate:1

[Events]
//Background and Video events
0,0,"background.jpg",0,0
//Break Periods
2,1161,19291
//Storyboard Layer 0 (Background)
//Storyboard Layer 1 (Fail)
//Storyboard Layer 2 (Pass)
//Storyboard Layer 3 (Foreground)
//Storyboard Sound Samples

[TimingPoints]
1036,300,4,2,1,40,1,0
0,500,4,1,0,100,1,0
34000,-133.333333333333,4,1,0,100,0,0
34125,-100,4,1,0,100,0,0
34250,-66.6666666666667,4,1,0,100,0,0
36500,-200,4,1,0,100,0,0
36625,-133.333333333333,4,1,0,100,0,0
36750,-100,4,1,0,100,0,0
36875,-80,4,1,0,100,0,0
37000,-66.6666666666667,4,1,0,100,0,0
37125,-57.1428571428571,4,1,0,100,0,0
37225,-50,4,1,0,100,0,0
37375,-100,4,1,0,100,0,0
37500,-200,4,1,0,100,0,0
39500,750,4,1,0,100,1,0
39625,600,4,1,0,100,1,0
39750,500,4,1,0,100,1,0
39875,428.571428571429,4,1,0,100,1,0
40000,375,4,1,0,100,1,0
40125,333.333333333333,4,1,0,100,1,0
40250,300,4,1,0,100,1,0
42000,500,4,1,0,100,1,0
46000,-100,4,1,0,100,0,0
58000,50,4,1,0,100,1,0
61987,6,4,1,0,100,1,0
62012,-20000,4,1,0,100,0,0
62451,500,4,1,0,100,1,0
62951,600,4,1,0,100,1,0
63251,4000,4,1,0,100,1,0


[Colours]
Combo1 : 0,255,128
Combo2 : 255,128,0
Combo3 : 170,0,170

[HitObjects]
327,278,736,6,0,P|376:237|329:193,1,146.25,0|0,0:0|0:0,0:0:0:0:
121,272,19861,5,8,0:3:0:0:
371,278,19936,6,0,P|423:227|371:168,1,146.25,6|0,0:0|0:0,0:0:0:0:
128,132,20236,5,4,0:0:0:0:
79,158,20311,1,0,0:0:0:0:
52,199,20386,1,0,0:0:0:0:
45,247,20461,1,0,0:0:0:0:
57,294,20536,1,8,0:0:0:0:
87,332,20611,1,0,0:0:0:0:
143,335,20686,1,2,0:0:0:0:
454,157,20836,6,0,L|345:157,1,97.5,8|2,0:0|0:0,0:0:0:0:
344,204,21061,1,0,0:0:0:0:
356,157,21136,2,0,L|454:157,1,97.5,8|2,0:0|0:0,0:0:0:0:
155,157,21436,2,0,L|58:157,1,97.5,8|2,0:0|0:0,0:0:0:0:
194,157,21736,1,8,0:0:0:0:
58,157,21886,1,2,0:0:0:0:
301,226,22036,6,0,L|404:226,1,97.5,8|0,0:0|0:0,0:0:0:0:
106,223,22336,1,10,0:0:0:0:
65,195,22411,1,0,0:0:0:0:
72,146,22486,1,10,0:0:0:0:
128,132,22561,1,0,0:0:0:0:
384,132,22636,5,12,0:0:0:0:
433,158,22711,1,0,0:0:0:0:
460,199,22786,1,2,0:0:0:0:
467,247,22861,1,0,0:0:0:0:
455,294,22936,1,8,0:0:0:0:
425,332,23011,1,0,0:0:0:0:
369,335,23086,1,2,0:0:0:0:
86,280,23236,6,0,L|60:183,1,97.5,8|2,0:0|0:0,0:0:0:0:
197,180,23536,2,0,L|171:83,1,97.5,8|2,0:0|0:0,0:0:0:0:
308,83,23836,2,0,L|333:177,1,97.5,8|2,0:0|0:0,0:0:0:0:
86,280,24136,2,0,L|60:183,1,97.5,8|2,0:0|0:0,0:0:0:0:
305,192,24436,6,0,L|207:191,1,97.5,10|2,0:0|0:0,0:0:0:0:
426,280,24736,2,0,L|451:185,1,97.5,10|2,0:0|0:0,0:0:0:0:
128,132,25036,5,4,0:0:0:0:
115,179,25111,1,0,0:0:0:0:
128,132,25186,1,0,0:0:0:0:
169,106,25261,1,0,0:0:0:0:
227,106,25336,1,8,0:0:0:0:
179,106,25411,1,0,0:0:0:0:
131,106,25486,1,2,0:0:0:0:
467,253,25636,6,0,L|437:143,1,97.5,8|2,0:0|0:0,0:0:0:0:
305,166,25936,2,0,L|197:166,1,97.5,8|2,0:0|0:0,0:0:0:0:
344,301,26236,2,0,L|452:301,1,97.5,8|2,0:0|0:0,0:0:0:0:
305,301,26536,1,10,0:0:0:0:
441,301,26686,1,2,0:0:0:0:
207,166,26836,6,0,L|78:165,1,97.5,2|0,0:0|0:0,0:0:0:0:
353,164,27136,2,0,L|372:221,1,48.75,2|0,0:0|0:0,0:0:0:0:
171,238,27286,2,0,L|152:295,1,48.75,2|0,0:0|0:0,0:0:0:0:
353,288,27436,5,12,0:0:0:0:
401,288,27511,1,0,0:0:0:0:
449,288,27586,1,2,0:0:0:0:
203,100,27736,1,8,0:0:0:0:
155,100,27811,1,0,0:0:0:0:
203,100,27886,1,2,0:0:0:0:
446,100,28036,2,0,L|329:100,2,97.5,8|2|8,0:0|0:0|0:0,0:0:0:0:
130,100,28486,6,0,P|83:133|128:240,1,195,2|2,0:0|0:0,0:0:0:0:
185,240,28861,1,2,0:0:0:0:
380,233,28936,2,0,L|492:232,1,97.5,10|2,0:0|0:0,0:0:0:0:
428,233,29161,1,2,0:0:0:0:
208,110,29236,2,0,L|305:109,1,97.5,8|0,0:0|0:0,0:0:0:0:
354,108,29461,1,0,0:0:0:0:
132,233,29536,2,0,L|34:232,1,97.5,2|0,0:0|0:0,0:0:0:0:
402,119,29836,5,12,0:0:0:0:
451,145,29911,1,0,0:0:0:0:
478,186,29986,1,0,0:0:0:0:
485,234,30061,1,0,0:0:0:0:
473,281,30136,1,8,0:0:0:0:
443,319,30211,1,0,0:0:0:0:
387,322,30286,1,2,0:0:0:0:
275,285,30436,1,8,0:0:0:0:
26,318,30586,6,0,L|127:317,1,97.5,0|8,0:0|0:0,0:0:0:0:
387,62,30886,1,2,0:0:0:0:
275,99,31036,1,8,0:0:0:0:
26,66,31186,2,0,L|127:67,2,97.5,2|10|2,0:0|0:0|0:0,0:0:0:0:
269,317,31636,2,0,L|157:317,1,97.5,10|2,0:0|0:0,0:0:0:0:
415,223,31936,1,2,0:0:0:0:
456,195,32011,1,0,0:0:0:0:
449,146,32086,1,2,0:0:0:0:
393,132,32161,1,0,0:0:0:0:
110,119,32236,5,6,0:0:0:0:
61,145,32311,1,0,0:0:0:0:
34,186,32386,1,2,0:0:0:0:
27,234,32461,1,0,0:0:0:0:
39,281,32536,1,8,0:0:0:0:
69,319,32611,1,0,0:0:0:0:
125,322,32686,1,2,0:0:0:0:
237,289,32836,1,8,0:0:0:0:
486,318,32986,6,0,L|385:317,1,97.5,2|8,0:0|0:0,0:0:0:0:
125,62,33286,1,2,0:0:0:0:
237,95,33436,1,8,0:0:0:0:
486,66,33586,1,2,0:0:0:0:
223,323,33736,2,0,L|110:323,1,97.5,2|2,0:0|0:0,0:0:0:0:
369,207,34036,2,0,L|493:207,1,97.5,2|2,0:0|0:0,0:0:0:0:
330,207,34336,1,2,0:0:0:0:
466,207,34486,1,2,0:0:0:0:
110,119,34636,5,4,0:0:0:0:
61,119,34711,1,0,0:0:0:0:
110,119,34786,1,2,0:0:0:0:
158,264,34861,1,0,0:0:0:0:
110,265,34936,1,8,0:0:0:0:
61,265,35011,1,0,0:0:0:0:
110,265,35086,1,2,0:0:0:0:
207,265,35236,1,8,0:0:0:0:
450,121,35386,2,0,L|341:121,2,97.5,2|8|2,0:0|0:0|0:0,0:0:0:0:
206,121,35836,6,0,L|95:121,1,97.5,8|2,0:0|0:0,0:0:0:0:
323,235,36136,2,0,L|212:235,1,97.5,10|2,0:0|0:0,0:0:0:0:
440,120,36436,2,0,L|329:120,1,97.5,2|2,0:0|0:0,0:0:0:0:
97,223,36736,1,2,0:0:0:0:
56,195,36811,1,0,0:0:0:0:
63,146,36886,1,2,0:0:0:0:
119,132,36961,1,0,0:0:0:0:
402,119,37036,5,12,0:0:0:0:
450,120,37111,1,0,0:0:0:0:
402,265,37186,1,2,0:0:0:0:
353,265,37261,1,0,0:0:0:0:
402,119,37336,1,8,0:0:0:0:
450,119,37411,1,0,0:0:0:0:
402,119,37486,1,2,0:0:0:0:
85,115,37636,2,0,L|200:114,2,97.5,8|2|8,0:0|0:0|0:0,0:0:0:0:
402,119,38086,6,0,P|449:152|400:256,1,195,6|2,0:0|0:0,0:0:0:0:
350,257,38461,1,2,0:0:0:0:
155,257,38536,2,0,L|50:257,1,97.5,6|2,0:0|0:0,0:0:0:0:
106,127,38761,1,2,0:0:0:0:
305,131,38836,2,0,L|175:131,1,97.5,6|0,0:0|0:0,0:0:0:0:
158,131,39061,1,2,0:0:0:0:
357,257,39136,2,0,L|489:257,1,97.5,6|0,0:0|0:0,0:0:0:0:
57,127,39436,5,2,0:0:0:0:
50,175,39511,1,2,0:0:0:0:
42,223,39586,1,2,0:0:0:0:
178,223,39736,1,2,0:0:0:0:
129,223,39811,1,2,0:0:0:0:
80,223,39886,1,2,0:0:0:0:
216,151,40036,2,0,L|118:151,1,97.5,2|2,0:0|0:0,0:0:0:0:
255,233,40336,2,0,L|157:233,1,97.5,2|2,0:0|0:0,0:0:0:0:
450,156,40636,6,0,L|352:156,2,97.5,2|2|2,0:0|0:0|0:0,0:0:0:0:
235,155,41086,2,0,P|171:238|225:286,1,195,2|0,0:0|0:0,0:0:0:0:
438,290,41536,2,0,P|487:249|440:205,1,146.25,2|0,0:0|0:0,0:0:0:0:
239,202,41836,6,0,L|44:202,1,195,4|2,0:0|0:0,0:0:0:0:
337,213,42436,2,0,L|444:213,2,97.5,8|2|0,0:0|0:0|0:0,0:0:0:0:
123,209,42886,2,0,L|111:100,1,97.5,2|0,0:0|0:0,0:0:0:0:
328,116,43186,2,0,L|438:117,2,97.5,2|0|2,0:0|3:0|0:0,0:0:0:0:
84,265,43636,1,8,0:0:0:0:
220,264,43786,1,2,0:0:0:0:
84,265,43936,2,0,L|58:170,1,97.5,2|0,0:0|0:0,0:0:0:0:
273,202,44236,6,0,L|468:202,1,195,6|2,0:0|0:0,0:0:0:0:
370,202,44686,1,0,0:0:0:0:
142,198,44836,1,8,0:0:0:0:
239,200,44986,1,2,0:0:0:0:
336,200,45136,1,0,0:0:0:0:
121,200,45286,5,2,0:0:0:0:
218,202,45436,1,0,0:0:0:0:
315,202,45586,1,2,0:0:0:0:
47,74,45736,1,2,0:0:0:0:
144,74,45886,1,2,0:0:0:0:
358,74,46036,2,0,L|250:74,1,97.5,10|2,0:0|0:0,0:0:0:0:
474,71,46336,2,0,P|490:133|426:179,1,146.25,0|0,0:0|0:0,0:0:0:0:
237,157,46636,6,0,P|204:242|275:299,1,195,4|10,0:0|0:0,0:0:0:0:
374,298,47086,1,8,0:0:0:0:
106,241,47236,2,0,L|80:146,1,97.5,0|2,0:0|0:0,0:0:0:0:
296,147,47536,2,0,L|198:147,2,97.5,0|2|0,0:0|0:0|0:0,0:0:0:0:
80,146,47986,6,0,L|106:241,1,97.5,2|0,0:0|0:0,0:0:0:0:
242,240,48286,1,2,0:0:0:0:
457,241,48436,2,0,L|359:241,1,97.5,8|0,0:0|0:0,0:0:0:0:
55,143,48736,2,0,L|152:143,1,97.5,4|0,0:0|0:0,0:0:0:0:
456,143,49036,5,2,0:0:0:0:
339,143,49186,1,8,0:0:0:0:
327,190,49261,1,8,0:0:0:0:
339,143,49336,1,8,0:0:0:0:
456,143,49486,1,2,0:0:0:0:
188,221,49636,1,2,0:0:0:0:
305,221,49786,1,2,0:0:0:0:
256,220,49861,1,0,0:0:0:0:
207,220,49936,1,2,0:0:0:0:
324,220,50086,1,2,0:0:0:0:
56,143,50236,5,2,0:0:0:0:
173,143,50386,1,2,0:0:0:0:
222,143,50461,1,0,0:0:0:0:
56,143,50536,2,0,L|38:259,1,97.5,2|0,0:0|0:0,0:0:0:0:
398,279,50836,2,0,P|468:211|418:143,1,195,2|0,0:0|0:0,0:0:0:0:
60,142,51436,6,0,L|274:266,1,243.75,10|0,0:0|0:0,0:0:0:0:
271,263,51886,2,0,L|60:142,1,243.75,10|0,0:0|0:0,0:0:0:0:
60,142,52336,2,0,L|274:266,1,243.75,10|0,0:0|0:0,0:0:0:0:
271,263,52786,2,0,L|60:142,1,243.75,10|0,0:0|0:0,0:0:0:0:
257,165,53236,6,0,P|302:109|257:67,1,146.25,10|0,0:0|0:0,0:0:0:0:
56,73,53536,2,0,P|11:129|56:171,1,146.25,10|0,0:0|0:0,0:0:0:0:
251,267,53836,6,0,L|462:145,1,243.75,10|0,0:0|0:0,0:0:0:0:
462,145,54286,2,0,L|250:266,1,243.75,10|0,0:0|0:0,0:0:0:0:
251,267,54736,2,0,L|462:145,1,243.75,10|0,0:0|0:0,0:0:0:0:
462,145,55186,2,0,L|250:266,1,243.75,10|0,0:0|0:0,0:0:0:0:
202,266,55636,6,0,P|157:210|202:168,1,146.25,10|0,0:0|0:0,0:0:0:0:
448,82,55936,2,0,P|493:138|448:180,1,146.25,10|0,0:0|0:0,0:0:0:0:
200,139,56236,6,0,P|113:177|75:264,1,195,10|10,0:0|0:0,0:0:0:0:
312,139,56836,2,0,P|399:177|437:264,1,195,10|10,0:0|0:0,0:0:0:0:
32,32,60000,6,0,L|480:352,3,525.000002235172
448,96,61412,2,0,L|32:352,1,455.000001937149
32,32,62012,2,0,L|480:352,1,525.000002235172
2 changes: 1 addition & 1 deletion test_draw.py
Expand Up @@ -19,7 +19,7 @@
#for point in hitobject.path:
#tur.goto(point.x, -point.y)
#time.sleep(0.1)
print("time: {}, x: {}, y: {}, type: sliderStart, duration: {}".format(hitobject.time, hitobject.x, hitobject.y, hitobject.duration))
print("time: {}, x: {}, y: {}, type: sliderStart, duration: {}, repeat: {}, ticks: {}".format(hitobject.time, hitobject.x, hitobject.y, hitobject.duration, hitobject.repeat, len(hitobject.ticks)))

i = 0
for tick in hitobject.ticks:
Expand Down

0 comments on commit e16e529

Please sign in to comment.