-
Notifications
You must be signed in to change notification settings - Fork 0
/
ArcTapJumpShardTest.kt
72 lines (62 loc) · 2.79 KB
/
ArcTapJumpShardTest.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package io.sn.aetherium.implementations.shards
import com.tairitsu.compose.arcaea.ChartConfiguration
import com.tairitsu.compose.arcaea.generateString
import com.tairitsu.compose.arcaea.pos
import com.tairitsu.compose.arcaea.timing
import io.sn.aetherium.objects.ControllerBrand
import io.sn.aetherium.objects.ShardDigestion
import io.sn.aetherium.objects.TestOnlyApi
import io.sn.aetherium.utils.file
import kotlin.test.Test
class ArcTapJumpShardTest {
@OptIn(TestOnlyApi::class)
@Test
fun `test arctapjumpshard`() {
val shard = ArcTapJumpShard()
shard.testInit()
shard.feed(
ControllerBrand("ArcadePlus", "0.5.3"), mutableMapOf(
"globalOffset" to ShardDigestion.Union(260279L),
"fps" to ShardDigestion.Union(240),
"bpm" to ShardDigestion.Union(60.0),
"timingStart" to ShardDigestion.Union.Restriction.fromTiming(183333),
"timingEnd" to ShardDigestion.Union.Restriction.fromTiming(184285),
"positionStart" to ShardDigestion.Union.Restriction.fromPosition(0.25 pos 0.00),
"positionEnd" to ShardDigestion.Union.Restriction.fromPosition(0 pos 1),
"showFirstFrame" to ShardDigestion.Union(true),
"control" to ShardDigestion.Union("0:2000")
)
)
val jump1 = shard.generate(ChartConfiguration(-660, mutableListOf())) {
timing(0, 126, 4)
}
shard.feed(
ControllerBrand("ArcadePlus", "0.5.3"), mutableMapOf(
"globalOffset" to ShardDigestion.Union(260279L),
"fps" to ShardDigestion.Union(120),
"bpm" to ShardDigestion.Union(60.0),
"timingStart" to ShardDigestion.Union.Restriction.fromTiming(183333),
"timingEnd" to ShardDigestion.Union.Restriction.fromTiming(184285),
"positionStart" to ShardDigestion.Union.Restriction.fromPosition(0.75 pos 0.00),
"positionEnd" to ShardDigestion.Union.Restriction.fromPosition(1 pos 1),
"showFirstFrame" to ShardDigestion.Union(true),
"control" to ShardDigestion.Union("0:2000")
)
)
// only in testing units there is a need to append chart configuration and main timing command
val jump2 = shard.generate(ChartConfiguration(-660, mutableListOf())) {
timing(0, 126, 4)
}.chart
// append `jump2` to `jump1`
jump1.chart.subTiming.putAll(jump2.subTiming)
// directly save to file
/*
file(".", "result", "2.aff").let {
if (!it.exists()) file(".", "result").mkdirs()
it.writeText(jump1.generateString())
}
*/
// or print to console
println(jump1.generateString())
}
}