Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
ButtonPusher
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Button Pusher
ButtonPusher
Commits
0ca9dc40
Commit
0ca9dc40
authored
Aug 25, 2017
by
16서원빈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated motion keys, short/long motion check, and fixed underflow issue
parent
bb48d3ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
22 deletions
+51
-22
ButtonPusherEditor.exe
ButtonPusherEditor.exe
+0
-0
Form1.cs
Form1.cs
+51
-22
No files found.
ButtonPusherEditor.exe
View file @
0ca9dc40
No preview for this file type
Form1.cs
View file @
0ca9dc40
...
...
@@ -24,20 +24,38 @@ namespace ButtonPusherEditor
///////////////////////////////////////// SMO
CP
=
0
b10000000000000000000000000000100
,
JP
=
0
b01000000000000000000000000000100
,
PU
=
0
b00100000000000000000000000000100
,
PI
=
0
b00010000000000000000000000000100
,
GD
=
0
b00001000000000000000000000000100
,
BP
=
0
b00100000000000000000000000000100
,
LP
=
0
b00010000000000000000000000000100
,
RP
=
0
b00001000000000000000000000000100
,
BK
=
0
b00000100000000000000000000000100
,
LK
=
0
b00000010000000000000000000000100
,
RK
=
0
b00000001000000000000000000000100
,
BI
=
0
b00000000100000000000000000000100
,
LI
=
0
b00000000010000000000000000000100
,
RI
=
0
b00000000001000000000000000000100
,
BG
=
0
b00000000000100000000000000000100
,
LG
=
0
b00000000000010000000000000000100
,
RG
=
0
b00000000000001000000000000000100
,
BL
=
0
b00000000000000100000000000000100
,
LL
=
0
b00000000000000010000000000000100
,
RL
=
0
b00000000000000001000000000000100
,
/////////////////////////////////////////L MO
HU
=
0
b00000000000000000000000100001000
,
HD
=
0
b00000000000000000000000010001000
,
JS
=
0
b00000000000000000000000001001000
,
HP
=
0
b00000000000000000000000000101000
,
BU
=
0
b00000000000000000100000000001000
,
LU
=
0
b00000000000000000010000000001000
,
RU
=
0
b00000000000000000001000000001000
,
BD
=
0
b00000000000000000000100000001000
,
LD
=
0
b00000000000000000000010000001000
,
RD
=
0
b00000000000000000000001000001000
,
JS
=
0
b00000000000000000000000100001000
,
BH
=
0
b00000000000000000000000010001000
,
LH
=
0
b00000000000000000000000001001000
,
RH
=
0
b00000000000000000000000000101000
,
OT
=
0
b00000000000000000000000000011000
,
// Reset ////SSSSSSSSSSSSSS
LLL
LLLLLLLLLLLCCCC
SMOReset
=
0
b00000000000000
111
111111111111011
,
LMOReset
=
0
b11111111111111
000
000000000000111
// Reset ////SSSSSSSSSSSSSS
SSS
LLLLLLLLLLLCCCC
SMOReset
=
0
b00000000000000
000
111111111111011
,
LMOReset
=
0
b11111111111111
111
000000000000111
}
public
partial
class
Form1
:
Form
...
...
@@ -117,14 +135,17 @@ namespace ButtonPusherEditor
DrawMeasures
();
}
private
void
SelectNote
(
bool
isMotion
,
int
posX
,
int
posEndX
=
-
1
)
private
void
SelectNote
(
bool
isMotion
,
int
posX
,
int
?
posEndX
=
null
)
{
if
(
posEndX
==
-
1
)
if
(
posEndX
==
null
)
posEndX
=
posX
;
else
if
(
posX
>
posEndX
)
else
if
(
posEndX
.
Value
<
0
)
posEndX
=
0
;
if
(
posX
>
posEndX
.
Value
)
{
int
tmp
=
posX
;
posX
=
posEndX
;
posX
=
posEndX
.
Value
;
posEndX
=
tmp
;
}
...
...
@@ -135,11 +156,12 @@ namespace ButtonPusherEditor
int
measureEnd
=
measure
;
int
beatEnd
=
beat
;
if
(
posEndX
!=
-
1
)
if
(
posEndX
.
Value
!=
posX
)
{
measureEnd
=
(
int
)(
posEndX
/
MeasureSize
);
beatEnd
=
(
int
)
Math
.
Round
((
posEndX
-
(
MeasureSize
*
measureEnd
))
*
npm
/
MeasureSize
);
beatEnd
=
(
int
)
Math
.
Round
(
(
posEndX
.
Value
-
(
MeasureSize
*
measureEnd
))
*
npm
/
MeasureSize
);
}
while
(
measureEnd
>=
measures
.
Count
)
...
...
@@ -155,8 +177,7 @@ namespace ButtonPusherEditor
Note
?
motion
=
null
;
if
(
isMotion
)
{
Func
<
string
>
MotionKeyDialog
=
delegate
()
string
res
=
new
Func
<
string
>(()
=>
{
Form
prompt
=
new
Form
()
{
...
...
@@ -186,9 +207,7 @@ namespace ButtonPusherEditor
return
prompt
.
ShowDialog
()
==
DialogResult
.
OK
?
textBox
.
Text
:
""
;
};
string
res
=
MotionKeyDialog
();
})();
motion
=
Enum
.
GetValues
(
typeof
(
Note
)).
OfType
<
Note
>()
.
Where
(
x
=>
x
.
ToString
()
==
res
.
Trim
())
...
...
@@ -199,6 +218,16 @@ namespace ButtonPusherEditor
MessageBox
.
Show
(
"Motion not found: "
+
res
);
return
;
}
else
if
(
posX
!=
posEndX
&&
(
motion
.
Value
&
~
Note
.
LMOReset
)
==
0
)
{
MessageBox
.
Show
(
res
+
" is short motion"
);
return
;
}
else
if
(
posX
==
posEndX
&&
(
motion
.
Value
&
~
Note
.
SMOReset
)
==
0
)
{
MessageBox
.
Show
(
res
+
" is long motion"
);
return
;
}
}
if
(
posX
==
posEndX
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment