mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 20:47:28 +08:00
Re-fix mania conversion following new discoveries
This commit is contained in:
parent
07da9d95a9
commit
0fe2e1e8d6
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,132 +1,168 @@
|
|||||||
{
|
{
|
||||||
"Mappings": [{
|
"Mappings": [
|
||||||
"RandomW": 2659373485,
|
{
|
||||||
"RandomX": 3579807591,
|
"RandomW": 2659373485,
|
||||||
"RandomY": 273326509,
|
"RandomX": 3579807591,
|
||||||
"RandomZ": 272969173,
|
"RandomY": 273326509,
|
||||||
"StartTime": 500.0,
|
"RandomZ": 272969173,
|
||||||
"Objects": [{
|
"StartTime": 500.0,
|
||||||
"StartTime": 500.0,
|
"Objects": [
|
||||||
"EndTime": 2500.0,
|
{
|
||||||
"Column": 0
|
"StartTime": 500.0,
|
||||||
}, {
|
"EndTime": 2500.0,
|
||||||
"StartTime": 1500.0,
|
"Column": 0
|
||||||
"EndTime": 2500.0,
|
},
|
||||||
"Column": 1
|
{
|
||||||
}]
|
"StartTime": 1500.0,
|
||||||
}, {
|
"EndTime": 2500.0,
|
||||||
"RandomW": 3083803045,
|
"Column": 1
|
||||||
"RandomX": 273326509,
|
}
|
||||||
"RandomY": 272969173,
|
]
|
||||||
"RandomZ": 2659373485,
|
},
|
||||||
"StartTime": 3000.0,
|
{
|
||||||
"Objects": [{
|
"RandomW": 3083803045,
|
||||||
"StartTime": 3000.0,
|
"RandomX": 273326509,
|
||||||
"EndTime": 4000.0,
|
"RandomY": 272969173,
|
||||||
"Column": 2
|
"RandomZ": 2659373485,
|
||||||
}]
|
"StartTime": 3000.0,
|
||||||
}, {
|
"Objects": [
|
||||||
"RandomW": 4073554232,
|
{
|
||||||
"RandomX": 272969173,
|
"StartTime": 3000.0,
|
||||||
"RandomY": 2659373485,
|
"EndTime": 4000.0,
|
||||||
"RandomZ": 3083803045,
|
"Column": 2
|
||||||
"StartTime": 4500.0,
|
}
|
||||||
"Objects": [{
|
]
|
||||||
"StartTime": 4500.0,
|
},
|
||||||
"EndTime": 5500.0,
|
{
|
||||||
"Column": 4
|
"RandomW": 4073554232,
|
||||||
}]
|
"RandomX": 272969173,
|
||||||
}, {
|
"RandomY": 2659373485,
|
||||||
"RandomW": 3420401969,
|
"RandomZ": 3083803045,
|
||||||
"RandomX": 2659373485,
|
"StartTime": 4500.0,
|
||||||
"RandomY": 3083803045,
|
"Objects": [
|
||||||
"RandomZ": 4073554232,
|
{
|
||||||
"StartTime": 6000.0,
|
"StartTime": 4500.0,
|
||||||
"Objects": [{
|
"EndTime": 5500.0,
|
||||||
"StartTime": 6000.0,
|
"Column": 4
|
||||||
"EndTime": 6500.0,
|
}
|
||||||
"Column": 2
|
]
|
||||||
}]
|
},
|
||||||
}, {
|
{
|
||||||
"RandomW": 1129881182,
|
"RandomW": 3420401969,
|
||||||
"RandomX": 3083803045,
|
"RandomX": 2659373485,
|
||||||
"RandomY": 4073554232,
|
"RandomY": 3083803045,
|
||||||
"RandomZ": 3420401969,
|
"RandomZ": 4073554232,
|
||||||
"StartTime": 7000.0,
|
"StartTime": 6000.0,
|
||||||
"Objects": [{
|
"Objects": [
|
||||||
"StartTime": 7000.0,
|
{
|
||||||
"EndTime": 8000.0,
|
"StartTime": 6000.0,
|
||||||
"Column": 2
|
"EndTime": 6500.0,
|
||||||
}]
|
"Column": 2
|
||||||
}, {
|
}
|
||||||
"RandomW": 315568458,
|
]
|
||||||
"RandomX": 3420401969,
|
},
|
||||||
"RandomY": 1129881182,
|
{
|
||||||
"RandomZ": 2358617505,
|
"RandomW": 1129881182,
|
||||||
"StartTime": 8500.0,
|
"RandomX": 3083803045,
|
||||||
"Objects": [{
|
"RandomY": 4073554232,
|
||||||
"StartTime": 8500.0,
|
"RandomZ": 3420401969,
|
||||||
"EndTime": 11000.0,
|
"StartTime": 7000.0,
|
||||||
"Column": 0
|
"Objects": [
|
||||||
}]
|
{
|
||||||
}, {
|
"StartTime": 7000.0,
|
||||||
"RandomW": 548134043,
|
"EndTime": 8000.0,
|
||||||
"RandomX": 1129881182,
|
"Column": 2
|
||||||
"RandomY": 2358617505,
|
}
|
||||||
"RandomZ": 315568458,
|
]
|
||||||
"StartTime": 11500.0,
|
},
|
||||||
"Objects": [{
|
{
|
||||||
"StartTime": 11500.0,
|
"RandomW": 315568458,
|
||||||
"EndTime": 12000.0,
|
"RandomX": 3420401969,
|
||||||
"Column": 1
|
"RandomY": 1129881182,
|
||||||
}]
|
"RandomZ": 2358617505,
|
||||||
}, {
|
"StartTime": 8500.0,
|
||||||
"RandomW": 3979422122,
|
"Objects": [
|
||||||
"RandomX": 548134043,
|
{
|
||||||
"RandomY": 2810584254,
|
"StartTime": 8500.0,
|
||||||
"RandomZ": 2250186050,
|
"EndTime": 11000.0,
|
||||||
"StartTime": 12500.0,
|
"Column": 0
|
||||||
"Objects": [{
|
}
|
||||||
"StartTime": 12500.0,
|
]
|
||||||
"EndTime": 16500.0,
|
},
|
||||||
"Column": 4
|
{
|
||||||
}]
|
"RandomW": 548134043,
|
||||||
}, {
|
"RandomX": 1129881182,
|
||||||
"RandomW": 2466283411,
|
"RandomY": 2358617505,
|
||||||
"RandomX": 2810584254,
|
"RandomZ": 315568458,
|
||||||
"RandomY": 2250186050,
|
"StartTime": 11500.0,
|
||||||
"RandomZ": 3979422122,
|
"Objects": [
|
||||||
"StartTime": 17000.0,
|
{
|
||||||
"Objects": [{
|
"StartTime": 11500.0,
|
||||||
"StartTime": 17000.0,
|
"EndTime": 12000.0,
|
||||||
"EndTime": 18000.0,
|
"Column": 1
|
||||||
"Column": 2
|
}
|
||||||
}]
|
]
|
||||||
}, {
|
},
|
||||||
"RandomW": 83157665,
|
{
|
||||||
"RandomX": 2250186050,
|
"RandomW": 3979422122,
|
||||||
"RandomY": 3979422122,
|
"RandomX": 548134043,
|
||||||
"RandomZ": 2466283411,
|
"RandomY": 2810584254,
|
||||||
"StartTime": 18500.0,
|
"RandomZ": 2250186050,
|
||||||
"Objects": [{
|
"StartTime": 12500.0,
|
||||||
"StartTime": 18500.0,
|
"Objects": [
|
||||||
"EndTime": 19450.0,
|
{
|
||||||
"Column": 0
|
"StartTime": 12500.0,
|
||||||
}]
|
"EndTime": 16500.0,
|
||||||
}, {
|
"Column": 4
|
||||||
"RandomW": 2383087700,
|
}
|
||||||
"RandomX": 83157665,
|
]
|
||||||
"RandomY": 2055150192,
|
},
|
||||||
"RandomZ": 510071020,
|
{
|
||||||
"StartTime": 19875.0,
|
"RandomW": 2466283411,
|
||||||
"Objects": [{
|
"RandomX": 2810584254,
|
||||||
"StartTime": 19875.0,
|
"RandomY": 2250186050,
|
||||||
"EndTime": 23875.0,
|
"RandomZ": 3979422122,
|
||||||
"Column": 1
|
"StartTime": 17000.0,
|
||||||
}, {
|
"Objects": [
|
||||||
"StartTime": 19875.0,
|
{
|
||||||
"EndTime": 23875.0,
|
"StartTime": 17000.0,
|
||||||
"Column": 0
|
"EndTime": 18000.0,
|
||||||
}]
|
"Column": 2
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"RandomW": 83157665,
|
||||||
|
"RandomX": 2250186050,
|
||||||
|
"RandomY": 3979422122,
|
||||||
|
"RandomZ": 2466283411,
|
||||||
|
"StartTime": 18500.0,
|
||||||
|
"Objects": [
|
||||||
|
{
|
||||||
|
"StartTime": 18500.0,
|
||||||
|
"EndTime": 19450.0,
|
||||||
|
"Column": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"RandomW": 2383087700,
|
||||||
|
"RandomX": 83157665,
|
||||||
|
"RandomY": 2055150192,
|
||||||
|
"RandomZ": 510071020,
|
||||||
|
"StartTime": 19875.0,
|
||||||
|
"Objects": [
|
||||||
|
{
|
||||||
|
"StartTime": 19875.0,
|
||||||
|
"EndTime": 23875.0,
|
||||||
|
"Column": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"StartTime": 19875.0,
|
||||||
|
"EndTime": 23875.0,
|
||||||
|
"Column": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -1,14 +1,18 @@
|
|||||||
{
|
{
|
||||||
"Mappings": [{
|
"Mappings": [
|
||||||
"RandomW": 3083084786,
|
{
|
||||||
"RandomX": 273326509,
|
"RandomW": 3083084786,
|
||||||
"RandomY": 273553282,
|
"RandomX": 273326509,
|
||||||
"RandomZ": 2659838971,
|
"RandomY": 273553282,
|
||||||
"StartTime": 4836,
|
"RandomZ": 2659838971,
|
||||||
"Objects": [{
|
"StartTime": 4836.0,
|
||||||
"StartTime": 4836,
|
"Objects": [
|
||||||
"EndTime": 4836,
|
{
|
||||||
"Column": 0
|
"StartTime": 4836.0,
|
||||||
}]
|
"EndTime": 4836.0,
|
||||||
}]
|
"Column": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -52,18 +52,14 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
/// <returns>The column.</returns>
|
/// <returns>The column.</returns>
|
||||||
protected int GetColumn(float position, bool allowSpecial = false)
|
protected int GetColumn(float position, bool allowSpecial = false)
|
||||||
{
|
{
|
||||||
// Casts to doubles are present here because, although code is originally written as float division,
|
|
||||||
// the division actually appears to occur on doubles in osu!stable. This is likely a result of
|
|
||||||
// differences in optimisations between .NET versions due to the presence of the double parameter type of Math.Floor().
|
|
||||||
|
|
||||||
if (allowSpecial && TotalColumns == 8)
|
if (allowSpecial && TotalColumns == 8)
|
||||||
{
|
{
|
||||||
const float local_x_divisor = 512f / 7;
|
const float local_x_divisor = 512f / 7;
|
||||||
return Math.Clamp((int)Math.Floor((double)position / local_x_divisor), 0, 6) + 1;
|
return Math.Clamp((int)MathF.Floor(position / local_x_divisor), 0, 6) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
float localXDivisor = 512f / TotalColumns;
|
float localXDivisor = 512f / TotalColumns;
|
||||||
return Math.Clamp((int)Math.Floor((double)position / localXDivisor), 0, TotalColumns - 1);
|
return Math.Clamp((int)MathF.Floor(position / localXDivisor), 0, TotalColumns - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user