forked from ListenerJubatus/hardline-noteskin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes.lua
More file actions
196 lines (196 loc) · 5.65 KB
/
notes.lua
File metadata and controls
196 lines (196 loc) · 5.65 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
local skin_name= Var("skin_name")
return function(button_list, stepstype)
local rots= {
Left= 90, Down= 0, Up= 180, Right= 270,
UpLeft= 90, UpRight= 180,
DownLeft= 0, DownRight= 270, Center= 0
}
local hold_flips= {
Left= "TexCoordFlipMode_None", Right= "TexCoordFlipMode_None",
Down= "TexCoordFlipMode_None", Up= "TexCoordFlipMode_None",
}
local roll_flips= {
Left= "TexCoordFlipMode_None", Right= "TexCoordFlipMode_None",
Down= "TexCoordFlipMode_None", Up= "TexCoordFlipMode_None",
}
local rev_hold_flips= {
Left= "TexCoordFlipMode_None", Right= "TexCoordFlipMode_None",
Down= "TexCoordFlipMode_None", Up= "TexCoordFlipMode_None",
}
local rev_roll_flips= {
Left= "TexCoordFlipMode_None", Right= "TexCoordFlipMode_None",
Down= "TexCoordFlipMode_None", Up= "TexCoordFlipMode_None",
}
local tap_redir= {
Left= "down", Right= "down", Down= "down", Up= "down",
UpLeft= "DownLeft", UpRight= "DownLeft", -- shared for dance and pump
DownLeft= "DownLeft", DownRight= "DownLeft", Center= "Center"
}
local tap_width= {
Left= 64, Down= 64, Up= 64, Right= 64,
UpLeft= 48, UpRight= 48,
DownLeft= 48, DownRight= 48, Center= 48
}
local hold_redir= {
Left= "down", Right= "down", Down= "down", Up= "down",
UpLeft= "Center", UpRight= "Center", -- shared for dance and pump
DownLeft= "Center", DownRight= "Center", Center= "Center"
}
local parts_per_beat= 48
local tap_state_map= {
parts_per_beat= parts_per_beat, quanta= {
{per_beat= 1, states= {1, 2, 3 ,4}}, -- 4th
{per_beat= 2, states= {5, 6, 7, 8}}, -- 8th
{per_beat= 3, states= {9, 10, 11, 12}}, -- 12th
{per_beat= 4, states= {13, 14, 15, 16}}, -- 16th
{per_beat= 6, states= {17, 18, 19, 20}}, -- 24th
{per_beat= 8, states= {21, 22, 23, 24}}, -- 32nd
{per_beat= 12, states= {25, 26, 27, 28}}, -- 48th
{per_beat= 16, states= {29, 30, 31, 32}}, -- 64th
},
}
local hold_state_map= {
parts_per_beat= parts_per_beat, quanta= {
{per_beat= 1, states= {2}}, -- 4th
{per_beat= 2, states= {4}}, -- 8th
{per_beat= 3, states= {6}}, -- 12th
{per_beat= 4, states= {8}}, -- 16th
{per_beat= 6, states= {10}}, -- 24th
{per_beat= 8, states= {12}}, -- 32nd
{per_beat= 12, states= {14}}, -- 48th
{per_beat= 16, states= {16}}, -- 64th
}
}
local activehold_state_map= {
parts_per_beat= parts_per_beat, quanta= {
{per_beat= 1, states= {1}}, -- 4th
{per_beat= 2, states= {3}}, -- 8th
{per_beat= 3, states= {5}}, -- 12th
{per_beat= 4, states= {7}}, -- 16th
{per_beat= 6, states= {9}}, -- 24th
{per_beat= 8, states= {11}}, -- 32nd
{per_beat= 12, states= {13}}, -- 48th
{per_beat= 16, states= {15}}, -- 64th
}
}
local lift_state_map= {
parts_per_beat= parts_per_beat, quanta= {
{per_beat= 1, states= {2}}, -- 4th
{per_beat= 2, states= {4}}, -- 8th
{per_beat= 3, states= {6}}, -- 12th
{per_beat= 4, states= {8}}, -- 16th
{per_beat= 6, states= {10}}, -- 24th
{per_beat= 8, states= {12}}, -- 32nd
{per_beat= 12, states= {14}}, -- 48th
{per_beat= 16, states= {16}}, -- 64th
},
}
local hold_length= {
start_note_offset= -.5,
end_note_offset= .5,
head_pixs= 32,
body_pixs= 64,
tail_pixs= 32
}
-- Mines only have a single frame in the graphics.
local mine_state_map= {
parts_per_beat= 1, quanta= {{per_beat= 1, states= {1}}}}
local active_state_map= {
parts_per_beat= parts_per_beat, quanta= {
{per_beat= 1, states= {1}},
},
}
local inactive_state_map= {
parts_per_beat= parts_per_beat, quanta= {
{per_beat= 1, states= {2}},
},
}
local columns= {}
for i, button in ipairs(button_list) do
local hold_tex= hold_redir[button].." hold 8x2 (doubleres).png"
local roll_tex= hold_redir[button].." roll 2x1.png"
columns[i]= {
width= tap_width[button],
anim_time= 1,
anim_uses_beats= true,
padding= 0,
taps= {
NewSkinTapPart_Tap= {
state_map= tap_state_map,
actor= Def.Sprite{Texture= tap_redir[button].." Tap Note 4x8.png",
InitCommand= function(self) self:rotationz(rots[button]) end}},
NewSkinTapPart_Mine= {
state_map= mine_state_map,
actor= Def.Sprite{Texture= "mine.png"}},
NewSkinTapPart_Lift= { -- fuck lifts
state_map= lift_state_map,
actor= Def.Sprite{Texture= tap_redir[button].." Tap Note 4x8.png",
InitCommand= function(self) self:rotationz(rots[button]) end}},
},
holds= {
TapNoteSubType_Hold= {
{
state_map= hold_state_map,
textures= {hold_tex},
flip= hold_flips[button],
length_data= hold_length,
},
{
state_map= activehold_state_map,
textures= {hold_tex},
flip= hold_flips[button],
length_data= hold_length,
},
},
TapNoteSubType_Roll= {
{
state_map= inactive_state_map,
textures= {roll_tex},
flip= roll_flips[button],
length_data= hold_length,
},
{
state_map= active_state_map,
textures= {roll_tex},
flip= roll_flips[button],
length_data= hold_length,
},
},
},
reverse_holds= {
TapNoteSubType_Hold= {
{
state_map= hold_state_map,
textures= {hold_tex},
flip= rev_hold_flips[button],
length_data= hold_length,
},
{
state_map= active_state_map,
textures= {hold_tex},
flip= rev_hold_flips[button],
length_data= hold_length,
},
},
TapNoteSubType_Roll= {
{
state_map= hold_state_map,
textures= {roll_tex},
flip= rev_roll_flips[button],
length_data= hold_length,
},
{
state_map= active_state_map,
textures= {roll_tex},
flip= rev_roll_flips[button],
length_data= hold_length,
},
},
},
}
end
return {
columns= columns,
vivid_operation= true, -- output 200%
}
end