-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathkshooteditor.hsp
17396 lines (17140 loc) · 540 KB
/
kshooteditor.hsp
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ライブラリの読み込み
#runtime "hsp3mt"
#packopt runtime "hsp3mt.hrt"
#packopt name "editor"
#include "src/bass.as"
#include "src/bassconv.as"
#include "src/bass_fx.as"
#include "src/bass_vst.as"
#include "src/winapi.as"
#include "src/ksmcore.as"
#include "src/kson.as"
#include "src/audio/key_sound.as"
#include "src/audio/laser_slam_sound.as"
#include "src/audio/fxdef.hsp"
#define FS_UTILS_REPLACE_CHDIR_WITH_SAFE_CHDIR
#include "src/filesystem_utils.as"
#include "d3m.hsp"
#include "third_party/a2d.hsp"
#include "third_party/bitmap.as"
#include "third_party/mod_encode.hsp"
#include "third_party/mod_string.hsp"
#include "third_party/gm_crlf.hsp"
#include "third_party/alib_hash.as"
//#include "hgimg3.as"
#include "llmod3/llmod3.hsp"
#include "llmod3/msgdlg.hsp"
#include "llmod3/winver.hsp"
#include "llmod3/about.hsp"
#include "llmod3/dragdrop.hsp"
#include "mod_menu.as"
#include "hspmath.as"
#include "hspext.as"
#include "mod_regexp.as"
#include "encode.as"
//#include "vAudio.as"
#const TBNUM (3+14+7) // ツールバーの画像数
#define selnum (selnotenum+selanalognum+selspinnum+selstpnum)
#define clipnum (clipnotenum+clipanalognum+clipspinnum+clipstpnum+cliptiltnum+clipztopnum+clipzbotnum+clipzsidenum)
#define DBGSW 0
#enum CMD_NEW = 1
#enum CMD_OPEN
#enum CMD_SAVE
#enum CMD_SAVEAS
#enum CMD_QUIT
#enum CMD_EXPORT
#enum CMD_EXPORT_RPP
#enum CMD_EXPORT_KSON
#enum CMD_EDIT_UNDO
#enum CMD_EDIT_RED
#enum CMD_EDIT_CUT
#enum CMD_EDIT_COPY
#enum CMD_EDIT_PASTE
#enum CMD_EDIT_DELETE
#enum CMD_EDIT_SELALL
#enum CMD_EDIT_CLEARSEL
#enum CMD_EDIT_SELFLIP
#enum CMD_EDIT_SELRANDOMIZE
#enum CMD_EDIT_LASER_COLOR_SELFLIP
#enum CMD_EDIT_REMOVEMEASURE
#enum CMD_EDIT_COPY_TILT
#enum CMD_EDIT_DELETE_TILT
#enum CMD_EDIT_COPY_ZOOM
#enum CMD_EDIT_DELETE_ZOOM
#enum CMD_EDIT_ADDBLANK
#enum CMD_EDIT_VIEWTIME
#enum CMD_EDIT_USE_CURSOR_TIME_FOR_SAMPLE
#enum CMD_EDIT_CLEARCOMMENT
#enum CMD_EDIT_CLEAR
#enum CMD_EDIT_SONGSETTINGS
#enum CMD_EDIT_SONGSETTINGS2
#enum CMD_TOOL_POINT
#enum CMD_TOOL_PENCIL
#enum CMD_TOOL_ERASE
#enum CMD_TOOL_POS
#enum CMD_TOOL_NOTE
#enum CMD_TOOL_NOTE2
#enum CMD_TOOL_LNOTE
#enum CMD_TOOL_LNOTE2
#enum CMD_TOOL_LNOTE2_SE
#enum CMD_TOOL_ANALOGL
#enum CMD_TOOL_ANALOGR
#enum CMD_TOOL_ANALOGPFILTER
#enum CMD_TOOL_ANALOGVOL
#enum CMD_TOOL_SPIN
#enum CMD_TOOL_ROTATE
#enum CMD_TOOL_ZOOMTOP
#enum CMD_TOOL_ZOOMBOTTOM
#enum CMD_TOOL_ZOOMSIDE
#enum CMD_TOOL_STOP
#enum CMD_TOOL_4
#enum CMD_TOOL_8
#enum CMD_TOOL_12
#enum CMD_TOOL_16
#enum CMD_TOOL_24
#enum CMD_TOOL_32
#enum CMD_TOOL_48
#enum CMD_TOOL_64
#enum CMD_TOOL_96
#enum CMD_TOOL_192
#enum CMD_TOOL_DISABLEANAN
#enum CMD_TOOL_DISABLEANMIN
#enum CMD_TOOL_ANARAN2XSTARTPOS
#enum CMD_VIEW_VSEPMINIMIZE
#enum CMD_VIEW_VSEPMAXIMIZE
#enum CMD_VIEW_2X
#enum CMD_VIEW_MAXIMIZE
#enum CMD_VIEW_ZOOMX
#enum CMD_VIEW_BARPERROW_2
#enum CMD_VIEW_BARPERROW_3
#enum CMD_VIEW_BARPERROW_4
#enum CMD_VIEW_BARPERROW_5
#enum CMD_VIEW_LINEBRIGHT
#enum CMD_VIEW_TRACE
#enum CMD_VIEW_TRACE_IMPORT
#enum CMD_VIEW_TRACE_SHIFTUP
#enum CMD_VIEW_TRACE_SHIFTDOWN
#enum CMD_VIEW_TRACE_SHIFTUPD
#enum CMD_VIEW_TRACE_SHIFTDOWND
#enum CMD_PLAY_PLAY
#enum CMD_PLAY_STOP
#enum CMD_PLAY_SYNCHRO
#enum CMD_PLAY_TICK
#enum CMD_PLAY_CHOKKAKU
#enum CMD_PLAY_VOL_100
#enum CMD_PLAY_VOL_75
#enum CMD_PLAY_VOL_50
#enum CMD_PLAY_VOL_25
#enum CMD_PLAY_VOL_0
#enum CMD_PLAY_BPMHALF
#enum CMD_PLAY_FX
#enum CMD_PLAY_LASER
#enum CMD_PLAY_LOOPPLAYBACK
#enum CMD_PLAY_SAMPLE
#enum CMD_PLAY_TESTPLAY
#enum CMD_PLAY_TESTPLAY_AUTO
#enum CMD_PLAY_TESTPLAY_CURSOR
#enum CMD_PLAY_TESTPLAY_AUTO_CURSOR
#enum CMD_TOOL_ANALOGDETAIL0
#enum CMD_TOOL_ANALOGDETAIL1
#enum CMD_TOOL_ANALOGDETAIL2
#enum CMD_TOOL_DIRECTCHARTEDITING
#enum MODE_POINT = 0
#enum MODE_PENCIL
#enum MODE_ERASE
#enum TARGET_POS = 0
#enum TARGET_NOTE
#enum TARGET_NOTE2
#enum TARGET_LNOTE2
#enum TARGET_LNOTE
#enum TARGET_ANALOGL
#enum TARGET_ANALOGR
#enum TARGET_ANALOGPFILTER
#enum TARGET_ANALOGVOL
#enum TARGET_SPIN
#enum TARGET_ROTATE
#enum TARGET_ZOOMTOP
#enum TARGET_ZOOMBOTTOM
#enum TARGET_ZOOMSIDE
#enum TARGET_STOP
#define aname "K-Shoot Editor"
#define aversion "1.75a"
#define atitle (aname+" v"+aversion)
#const CURRENT_KSH_VERSION 171 // ※譜面バージョンが上がった場合のみ更新
// 1小節あたりのカウント値
#define UNIT_MEASURE 192
#define BUF_ST 1
#define BUF_ST15X 2
#define BUF_NOTE 3
#define BUF_LNOTE 4
#define BUF_NOTE2 41
#define BUF_LNOTE2 42
#define BUF_LNOTE2_SE 47
#define BUF_ANALOG 5
#define BUF_CHOKKAKUSAMPLES 43
#define BUF_SPIN 8
#define BUF_STOP 9
#define BUF_TRACE 11
//#define BUF_FOREGROUND 11
#define BUF_TOOLS 20
#define BUF_TARGETS 21
#define BUF_QUANTIZE 22
#define BUF_KEYINFO 23
#define BUF_ZOOMTEMP 30
#define BUF_TOOLBAR 45
#define BUF_TOOLBARTMP 46
#define SIZE_TOOLBAR_H 32
#define SIZEOF_INT 4
#define UNDO_MAX 7
#define INPUT_LARGEWIDTH 1
#define DRAW_DARKENS_NOTE ((edittarget=TARGET_ZOOMTOP)|(edittarget=TARGET_ZOOMBOTTOM)|(edittarget=TARGET_ROTATE))
#undef pos
#define pos(%1,%2) if(ginfo_sel=0){pos@hsp %1,%2+SIZE_TOOLBAR_H}else{pos@hsp %1,%2}
#undef line
#define line(%1,%2,%3,%4) if(ginfo_sel=0){line@hsp %1,%2+SIZE_TOOLBAR_H,%3,%4+SIZE_TOOLBAR_H}else{line@hsp %1,%2,%3,%4}
#undef ginfo_cy
#define ginfo_cy (ginfo(23)-SIZE_TOOLBAR_H*(ginfo_sel=0))
#undef mousey
#define mousey (mousey@hsp-SIZE_TOOLBAR_H)
#undef picload
#module
#deffunc picload str filename
exist filename
if(strsize=-1){
dialog "Cannot open image \""+filename+"\""
}
picload@hsp filename
return
#global
#define _sjis_(%1) if(isutf8=1):%1=sjisenc(%1)
#define _utf8_(%1) if(isutf8=0):%1=utf8enc(%1)
#module
#defcfunc vzoom int value
return int(vzoomrate@*value)
#global
#define vyoko int(vyokor*(maximize*13+16)/16)
#define vyk (vyoko*14/(14+vzoomx*5)+(vzoomx=1)*(vsep=24))
#define vsp (vsep*3/(3-vzoomx)+vzoomx*((41+9*2)*2/5-2)-(vzoomx=1)*(vsep=24)*8)
#define topsep 18
#define laserdelay (max(min(t-ldelayresett,laserdelay1),0)+40)*(filtertype=0)
#define analogdetail2 (analogdetail+(ctrl_key+shift_key=2))
#define analogdetail3 (analogdetail+(analogparentran.(analogparent.stat1)=2))
dir_default=dir_cur
// 各種モジュールの初期化
initKeySoundModule dir_default
initLaserSlamSoundModule dir_default
sdim _kaigyobuf,768
sdim _kaigyobuf2,768
// 変数の初期化
dim note,131072,6
sdim notesefname,256,131072
clearKeySoundLibrary
dim analog,131072,6
dim spin,131072,6
dim tilt,131072,3
dim ztop,131072,3
dim zbot,131072,3
dim zside,131072,3
dim anaran,131072,3
dim bpml,131072,2
dim stp,131072,2
dim anagain,131072,3
dim anafil,131072,3
dim anvol,131072,3
dim anse,131072,2
dim beatl,131072,3
dim comment,8192
sdim commentstr,512,8192
ud_cnt=0
ud_cur=0
ud_redomax=0
dim ud_note,131072,6,UNDO_MAX
sdim ud_notesefname,256,131072,UNDO_MAX
dim ud_analog,131072,7,UNDO_MAX
dim ud_spin,131072,6,UNDO_MAX
dim ud_tilt,131072,3,UNDO_MAX
dim ud_ztop,131072,3,UNDO_MAX
dim ud_zbot,131072,3,UNDO_MAX
dim ud_zside,131072,3,UNDO_MAX
dim ud_bpml,131072,2,UNDO_MAX
dim ud_anagain,131072,2,UNDO_MAX
dim ud_anafil,131072,2,UNDO_MAX
dim ud_anvol,131072,2,UNDO_MAX
dim ud_anse,131072,2,UNDO_MAX
dim ud_beatl,131072,3,UNDO_MAX
dim ud_stp,131072,2,UNDO_MAX
dim ud_analogparent,131072,UNDO_MAX
dim ud_analogparentran,131072,UNDO_MAX
dim ud_comment,8192,UNDO_MAX
sdim ud_commentstr,512,8192,UNDO_MAX
dim ud_num,16,UNDO_MAX
dim div,131072
ddim dstat,1
sdim _headcmpstr,64
sdim bom,4
poke bom,0,0xEF
poke bom,1,0xBB
poke bom,2,0xBF
poke bom,3,0x00
sdim str_lr,1,2
str_lr.0="l"
str_lr.1="r"
randomize
acmd=-1
onwheelfl=0
movepos_wheel=0
movecnowf_wheel=0
cnowflen_wheel=0
editmode_wheel=0
edittarget_wheel=0
editdiv_wheel=0
notenum=0
dim analogparent,131072
dim analogparentran,131072
analognum=0
dim chiprate,131072,2
dim longrate,131072,2
dim laserrate,131072,2
chipratenum=0
longratenum=0
laserratenum=0
userfxnum=0
sdim userfx_name,16,256
ddim userfx_params,256,10
ddim userfx_params_enable,256,10
userfilternum=0
sdim userfilter_name,16,256
ddim userfilter_params,256,10
ddim userfilter_params_min,256,10
ddim userfilter_params_max,256,10
userchprmnum=0
ddim userchprm,4096,6
sdim swaudio,96,32
swaudionum=0
dim userfx_swaudiomid,256
fxdefbuf_fx=""
fxdefbuf_filter=""
sharpstr=""
commentnum=0
spinnum=0
divnum=0
bpmlnum=1
bpm=120000
beatlnum=1
beatl.0.0=0
beatl.0.1=4
beatl.0.2=4
tiltnum=0
ztopnum=0
zbotnum=0
zsidenum=0
anarannum=0
stpnum=0
anagainnum=1
anafilnum=1
anvolnum=1
ansenum=0
bpml.0.1=120000
anagain.0.1=50
anafil.0.1=0
anvol.0.1=50
beat=4
offset=0
editdiv=16
editmode=0
edittarget=0
disableanan=1
disableanmin=1
anaranadjpos=1
isDirectChartEditingEnabled = 0
vol=100
fname=""
isutf8=1
saveasstat=0
csongtitle=""
csongtitleimg=""
csongtitle_a=""
csongartist=""
csongartistimg=""
csongeffect=""
csongjacket=".jpg"
csongillustrator=""
csonginfo=""
csongicon=".png"
csongdifficulty=2
csonglevel=1
csongtotal=0
csongoftbpm=0
csongvol=75
csongver = "" + CURRENT_KSH_VERSION
csongver_int = CURRENT_KSH_VERSION
csongfile=".mp3"
csongv=""
csongvoffset=0
bgname="desert"
bgname_l="arrow"
poffset=0
plength=15000
laserdelay1=40
disableautoanvol=1
cnowf=0
cnowflen=0
chocnt=0
enowstat=0
inputnow=0
pstartfl=0
clickngt=d3timer()
is_kson_export=0
posnow=0
dim selnote,131072
dim selanalog,131072
dim selspin,131072
dim selstp,131072
gosub *selinit
dim clipnote,131072,6
clipnotenum=0
sdim clipnotesefname,256,131072
dim clipanalog,131072,7
clipanalognum=0
dim clipspin,131072,6
clipspinnum=0
dim clipstp,131072,2
clipstpnum=0
dim clipztop,131072,3
clipztopnum=0
dim clipzbot,131072,3
clipzbotnum=0
dim clipzside,131072,3
clipzsidenum=0
dim cliptilt,131072,3
cliptiltnum=0
tate=164
disabledd=0
ignoreconfirm=0
maximize=0
vtate=3
vyokor=8
vsep=24
linebright=0
ddim vzoomrate,1
vzoomrate=1.0f
vzoomx=0
vtrace=1
vUNIT_MEASURE=192
synchro=1
pendfl=-1
playingsample=0
drawall=0
redr=1
assisttick=0
preview_fx=1
preview_laser=1
assisttick=0
enablean=1
_bpmhalf=0
loopplayback=1
reducespacing=0
bufferlength=200
updateperiod=100
peffect=1
peffect2=1
pefftype=1
anadetail1=0,0,2,2,5,5,5,7,7,10,10,10,12,12,15,15,15,17,17,20,20,20,22,22,25,25,25,28,28,30,30,30,33,33,35,35,35,37,37,40,40,40,43,43,45,45,45,48,48,50,50
anadetail1next=2,2,5,5,7,7,7,10,10,12,12,12,15,15,15,17,17,20,20,22,22,22,25,25,28,28,28,30,30,33,33,33,35,35,37,37,37,40,40,43,43,43,45,45,48,48,48,50,50,50,50
anadetail1prev=0,0,0,0,2,2,2,5,5,7,7,7,10,10,10,12,12,15,15,17,17,17,20,20,22,22,22,25,25,28,28,28,30,30,33,33,33,35,35,37,37,37,40,40,43,43,43,45,45,48,48
clang="Japanese"
globaloffset=0
soundfx_delay=0
stat1=BASS_FX_GetVersion()
sdim confstr,256,1
exist "config.ini"
if(strsize>0){
notesel confs
noteload "config.ini"
split confs,"\n",confstr
repeat notemax
/*
if(StartsWith(confstr.cnt, "barmax=")){
stat1=int(strmid(confstr.cnt,7,3))
if(stat1>0):tate=stat1
}*/
if(StartsWith(confstr.cnt, "currentlang=")){
clang=strmid(confstr.cnt,12,64)
}
if(StartsWith(confstr.cnt, "globaloffset=")){
globaloffset=int(strmid(confstr.cnt,13,16))
}
if(StartsWith(confstr.cnt, "soundfx_delay=")){
soundfx_delay=int(strmid(confstr.cnt,14,16))
}
if(StartsWith(confstr.cnt, "editor_disabledd=")){
disabledd=int(strmid(confstr.cnt,17,1))
}
if(StartsWith(confstr.cnt, "editor_assisttick=")){
assisttick=int(strmid(confstr.cnt,18,1))
}
if(StartsWith(confstr.cnt, "editor_reducespacing=")){
reducespacing=int(strmid(confstr.cnt,21,2))
}
if(StartsWith(confstr.cnt, "editor_zoomlanex=")){
vzoomx=int(strmid(confstr.cnt,17,1))
}
if(StartsWith(confstr.cnt, "editor_increasewinsize=")){
maximize=int(strmid(confstr.cnt,23,1))
}
if(StartsWith(confstr.cnt, "editor_measurepercolumn=")){
vtate=int(strmid(confstr.cnt,24,1))
}/*
if(StartsWith(confstr.cnt, "pfiltermode=")){
pefftype=int(strmid(confstr.cnt,12,1))
}*/
if(StartsWith(confstr.cnt, "editor_linebrightness=")){
linebright=int(strmid(confstr.cnt,22,1))
}
if(StartsWith(confstr.cnt, "editor_loopplayback=")){
loopplayback=int(strmid(confstr.cnt,20,1))
}
if(strmid(confstr.cnt,0,14)="#bufferlength:"){
bufferlength=max(int(strmid(confstr.cnt,14,64)),6)
}
if(strmid(confstr.cnt,0,14)="#updateperiod:"){
updateperiod=max(int(strmid(confstr.cnt,14,64)),5)
}
loop
}
laserdelay0=bufferlength-globaloffset-soundfx_delay
chdir "./lang"
dirlist langliststr,"*.txt",1
split langliststr,"\n",langlist
exist clang+".txt"
if(strsize=-1){
clang="Japanese"
exist clang+".txt"
if((strsize=-1)&(length(langlist)=0)){
dialog "Language file does not exist.",0,"Error"
end
}else{
clang=langlist.0
exist clang+".txt"
if(strsize=-1){
dialog "Language file does not exist.",0,"Error"
end
}
}
}
sdim lang,256,11,96
langstr=""
notesel langstr
noteload clang+".txt"
conv_crlf langstr,TYPE_CRLF
repeat notemax
noteget stat1,cnt
split stat1,"|",langstat
if(length(langstat)<2):continue
if(strmid(langstat.0,0,1)="e"){
stat2=int(strmid(langstat.0,1,2))
stat3=int(strmid(langstat.0,4,3))
if((stat2<11)&(stat2>=0)&(stat3<96)&(stat3>=0)){
lang.(stat2).(stat3)=replace(langstat.1,"\\\\n","\n")
lang.(stat2).(stat3)=replace(lang.(stat2).(stat3),"\\\\t","\t")
}
}
loop
chdir ".."
fxfont="MS Gothic"
if(instr(lang.0.0,0,";")!=-1){
split lang.0.0,";",splitstat
lang.0.0=splitstat.0
fxfont=splitstat.1
}
exist "kson.dll"
if(strsize=-1):dialog "Cannot find the file kson.dll.",1,lang.0.2:end
if(KSON_GetVersion()<1750){
dialog "最新版のkson.dllをコピーする必要があります。\nMake sure to copy the latest version of kson.dll.",1,lang.0.2:end
}
exist "bassconv.dll"
if(strsize=-1):dialog lang.0.3,1,lang.0.2:end
exist "bass.dll"
if(strsize=-1):dialog lang.0.4,1,lang.0.2:end
BASS_Init -1,44100,,hwnd
if(stat!=1):dialog lang.0.5,1,lang.0.2:end
BASS_SetConfig 1,updateperiod
BASS_SetConfig 0,bufferlength
// ウィンドウ初期化
screen 0,1194,64+vtate*vUNIT_MEASURE+SIZE_TOOLBAR_H
width 660,64+vtate*vUNIT_MEASURE+SIZE_TOOLBAR_H
title atitle
// サブメニュー作成
//newmenu hfileexportmenu, 1
//addmenu hfileexportmenu, lang.1.30/*"REAPERプロジェクト(&E)...\tCtrl+Alt+R"*/, CMD_EXPORT_RPP
newmenu hfilemenu, 1
addmenu hfilemenu, lang.1.10/*"新規作成(&N)\tCtrl+N"*/, CMD_NEW
addmenu hfilemenu, lang.1.11/*"開く(&O)...\tCtrl+O"*/, CMD_OPEN
addmenu hfilemenu, "", 0, 0x0800
addmenu hfilemenu, lang.1.12/*"保存(&S)\tCtrl+S"*/, CMD_SAVE
addmenu hfilemenu, lang.1.13/*"名前を付けて保存(&A)...\tCtrl+Shift+S"*/, CMD_SAVEAS
addmenu hfilemenu, "", 0, 0x0800
newmenu hfileexportmenu, 1
addmenu hfileexportmenu, lang.1.30/*"REAPERプロジェクト書き出し(&E)...\tCtrl+Alt+R"*/, CMD_EXPORT_RPP
addmenu hfileexportmenu, lang.1.31/*"KSON形式で書き出し(&K)..."*/, CMD_EXPORT_KSON
addmenu hfilemenu, lang.1.16/*"エクスポート(&E)"*/, hfileexportmenu, 0x10
addmenu hfilemenu, "", 0, 0x0800
//if(DBGSW=1):addmenu hfilemenu, "RAW抽出(デバッグ用)(&S)", CMD_DEBUG, 0x00 : addmenu hfilemenu, "", 0, 0x0800
addmenu hfilemenu, lang.1.20/*"終了(&C)"*/, CMD_QUIT
newmenu heditmenu, 1
addmenu heditmenu, lang.2.10/*"元に戻す(&U)\tCtrl+Z"*/, CMD_EDIT_UNDO, 0x00
addmenu heditmenu, lang.2.11/*"やり直し(&R)\tCtrl+Y"*/, CMD_EDIT_REDO, 0x00
addmenu heditmenu, "", 0, 0x0800
addmenu heditmenu, lang.2.15/*"切り取り(&T)\tCtrl+X"*/, CMD_EDIT_CUT, 0x00
addmenu heditmenu, lang.2.16/*"コピー(&C)\tCtrl+C"*/, CMD_EDIT_COPY, 0x00
addmenu heditmenu, lang.2.17/*"貼り付け(&P)\tCtrl+V"*/, CMD_EDIT_PASTE, 0x00
addmenu heditmenu, lang.2.18/*"削除(&D)\tDelete"*/, CMD_EDIT_DELETE, 0x00
addmenu heditmenu, "", 0, 0x0800
addmenu heditmenu, lang.2.30/*"すべて選択(&A)\tCtrl+A"*/, CMD_EDIT_SELALL, 0x00
addmenu heditmenu, lang.2.31/*"選択を解除(&L)\tCtrl+D"*/, CMD_EDIT_CLEARSEL, 0x00
addmenu heditmenu, "", 0, 0x0800
addmenu heditmenu, lang.2.40/*"選択ノーツを左右反転(&F)\tCtrl+R"*/, CMD_EDIT_SELFLIP, 0x00
addmenu heditmenu, lang.2.41/*"選択ノーツのレーンをランダム入替(&R)\tCtrl+Shift+R"*/, CMD_EDIT_SELRANDOMIZE, 0x0
addmenu heditmenu, lang.2.54/*"選択中のLASERオブジェクトの色を反転(&W)"*/, CMD_EDIT_LASER_COLOR_SELFLIP, 0x00
addmenu heditmenu, "", 0, 0x0800
addmenu heditmenu, lang.2.55/*"選択範囲の傾きエフェクトをコピー(&I)"*/, CMD_EDIT_COPY_TILT, 0x00
addmenu heditmenu, lang.2.56/*"選択範囲の傾きエフェクトを削除(&N)"*/, CMD_EDIT_DELETE_TILT, 0x00
addmenu heditmenu, "", 0, 0x0800
addmenu heditmenu, lang.2.42/*"選択範囲のレーンの拡大をコピー\tCtrl+Shift+C"*/, CMD_EDIT_COPY_ZOOM, 0x00
addmenu heditmenu, lang.2.43/*"選択範囲のレーンの拡大を削除\tShift+Delete"*/, CMD_EDIT_DELETE_ZOOM, 0x00
addmenu heditmenu, "", 0, 0x0800
addmenu heditmenu, lang.2.45/*"選択範囲の領域を削除(&E)..."*/, CMD_EDIT_REMOVEMEASURE, 0x00
addmenu heditmenu, lang.2.46/*"カーソル位置に空白を挿入(&B)..."*/, CMD_EDIT_ADDBLANK, 0x00
addmenu heditmenu, lang.2.47/*"カーソル位置の時間を表示(&V)..."*/, CMD_EDIT_VIEWTIME, 0x00
addmenu heditmenu, lang.2.52/*"選曲プレビュー先頭をカーソル位置の時間に設定(&S)"*/, CMD_EDIT_USE_CURSOR_TIME_FOR_SAMPLE, 0x00
addmenu heditmenu, "", 0, 0x0800
addmenu heditmenu, lang.2.48/*"すべての注釈をクリア(&O)"*/, CMD_EDIT_CLEARCOMMENT, 0x00
addmenu heditmenu, lang.2.49/*"譜面内容をクリア(&H)..."*/, CMD_EDIT_CLEAR, 0x00
addmenu heditmenu, "", 0, 0x0800
addmenu heditmenu, lang.2.50/*"譜面に関する設定-全般(&T)...\tCtrl+T"*/, CMD_EDIT_SONGSETTINGS, 0x00
addmenu heditmenu, lang.2.51/*"譜面に関する設定-詳細(&T)...\tCtrl+Shift+T"*/, CMD_EDIT_SONGSETTINGS2, 0x00
newmenu hviewtracemenu, 1
addmenu hviewtracemenu, lang.3.30/*"トレースを表示(&V)\tCtrl+Alt+V"*/, CMD_VIEW_TRACE, 0x08
addmenu hviewtracemenu, "", 0, 0x0800
addmenu hviewtracemenu, lang.3.31/*"トレースの読み込み(&O)...\tCtrl+Alt+O"*/, CMD_VIEW_TRACE_IMPORT
addmenu hviewtracemenu, "", 0, 0x0800
addmenu hviewtracemenu, lang.3.32/*"トレース位置を初期化(&I)"*/, CMD_VIEW_TRACE_SHIFTINIT
addmenu hviewtracemenu, lang.3.33/*"トレース位置を上へずらす(&U)"*/, CMD_VIEW_TRACE_SHIFTUP
addmenu hviewtracemenu, lang.3.34/*"トレース位置を下へずらす(&D)"*/, CMD_VIEW_TRACE_SHIFTDOWN
addmenu hviewtracemenu, lang.3.35/*"トレース位置を上へ1小節ずらす(&P)"*/, CMD_VIEW_TRACE_SHIFTUPD
addmenu hviewtracemenu, lang.3.36/*"トレース位置を下へ1小節ずらす(&W)"*/, CMD_VIEW_TRACE_SHIFTDOWND
newmenu hviewbarperrowmenu, 1
addmenu hviewbarperrowmenu, lang.3.41/*"&2小節"*/, CMD_VIEW_BARPERROW_2, 0x00
addmenu hviewbarperrowmenu, lang.3.42/*"&3小節"*/, CMD_VIEW_BARPERROW_3, 0x00
addmenu hviewbarperrowmenu, lang.3.43/*"&4小節"*/, CMD_VIEW_BARPERROW_4, 0x00
addmenu hviewbarperrowmenu, lang.3.44/*"&5小節"*/, CMD_VIEW_BARPERROW_5, 0x00
newmenu hviewmenu, 1
addmenu hviewmenu, lang.3.10/*"トレース(&T)"*/, hviewtracemenu, 0x10
addmenu hviewmenu, "", 0, 0x0800
addmenu hviewmenu, lang.3.15/*"列の間隔を小さくする(&M)"*/, CMD_VIEW_VSEPMINIMIZE, 0x00
addmenu hviewmenu, lang.3.16/*"列の間隔を大きくする(&I)"*/, CMD_VIEW_VSEPMAXIMIZE, 0x00
addmenu hviewmenu, lang.3.21/*"ノーツ間隔を2倍表示する(&X)"*/, CMD_VIEW_2X, 0x00
addmenu hviewmenu, lang.3.17/*"横幅を拡大して表示する(&Z)"*/, CMD_VIEW_ZOOMX, 0x00
addmenu hviewmenu, lang.3.18/*"ウィンドウを大きくして表示範囲を広げる(&A)"*/, CMD_VIEW_MAXIMIZE, 0x00
addmenu hviewmenu, lang.3.19/*"拍線の色を明るくする(&H)"*/, CMD_VIEW_LINEBRIGHT, 0x00
addmenu hviewmenu, lang.3.20/*"列ごとの表示小節数(&N)"*/, hviewbarperrowmenu, 0x10
newmenu htoolmenu, 1
addmenu htoolmenu, lang.4.10/*"選択ツール(&P)\tP"*/, CMD_TOOL_POINT, 0x08
addmenu htoolmenu, lang.4.11/*"鉛筆ツール(&N)\tN"*/, CMD_TOOL_PENCIL, 0x00
addmenu htoolmenu, lang.4.12/*"消しゴムツール(&A)\tE"*/, CMD_TOOL_ERASE, 0x00
addmenu htoolmenu, "", 0, 0x0800
addmenu htoolmenu, lang.4.15/*"位置(&O)\tO"*/, CMD_TOOL_POS, 0x08
addmenu htoolmenu, lang.4.18/*"チップBTオブジェクト(&B)\tH"*/, CMD_TOOL_NOTE, 0x00
addmenu htoolmenu, lang.4.19/*"ロングBTオブジェクト(&T)\tJ"*/, CMD_TOOL_NOTE2, 0x00
addmenu htoolmenu, lang.4.20/*"チップFXオブジェクト(&F)\tK"*/, CMD_TOOL_LNOTE2, 0x00
addmenu htoolmenu, lang.4.21/*"ロングFXオブジェクト(&X)\tL"*/, CMD_TOOL_LNOTE, 0x00
addmenu htoolmenu, lang.4.25/*"左(青)LASERオブジェクト(&E)\tQ"*/, CMD_TOOL_ANALOGL, 0x00
addmenu htoolmenu, lang.4.26/*"右(赤)LASERオブジェクト(&R)\tW"*/, CMD_TOOL_ANALOGR, 0x00
addmenu htoolmenu, lang.4.27/*"LASER音声エフェクトの強さ(&G)\tM"*/, CMD_TOOL_ANALOGPFILTER, 0x00
addmenu htoolmenu, lang.4.28/*"LASER直角音の音量/種類(&S)\tV"*/, CMD_TOOL_ANALOGVOL, 0x00
addmenu htoolmenu, lang.4.30/*"回転エフェクト(&I)\tS"*/, CMD_TOOL_SPIN, 0x00
addmenu htoolmenu, lang.4.34/*"傾きエフェクトの種類(&L)\tR"*/, CMD_TOOL_ROTATE, 0x00
addmenu htoolmenu, lang.4.35/*"レーンの拡大(上部)(&Z)\tZ"*/, CMD_TOOL_ZOOMTOP, 0x00
addmenu htoolmenu, lang.4.36/*"レーンの拡大(下部)(&M)\tX"*/, CMD_TOOL_ZOOMBOTTOM, 0x00
addmenu htoolmenu, lang.4.37/*"レーンの左右移動(&D)\tC"*/, CMD_TOOL_ZOOMSIDE, 0x00
addmenu htoolmenu, lang.4.38/*"譜面停止(&F)\tF"*/, CMD_TOOL_STOP, 0x00
addmenu htoolmenu, "", 0, 0x0800
addmenu htoolmenu, lang.4.40/*"4分\tCtrl+4"*/, CMD_TOOL_4, 0x00
addmenu htoolmenu, lang.4.41/*"8分\tCtrl+8"*/, CMD_TOOL_8, 0x00
addmenu htoolmenu, lang.4.42/*"12分\tCtrl+2"*/, CMD_TOOL_12, 0x00
addmenu htoolmenu, lang.4.43/*"16分\tCtrl+6"*/, CMD_TOOL_16, 0x08
addmenu htoolmenu, lang.4.44/*"24分\tCtrl+Shift+4"*/, CMD_TOOL_24, 0x00
addmenu htoolmenu, lang.4.45/*"32分\tCtrl+Shift+2"*/, CMD_TOOL_32, 0x00
addmenu htoolmenu, lang.4.46/*"48分\tCtrl+Shift+8"*/, CMD_TOOL_48, 0x00
addmenu htoolmenu, lang.4.47/*"64分\tCtrl+Shift+6"*/, CMD_TOOL_64, 0x00
addmenu htoolmenu, lang.4.48/*"96分\tCtrl+Shift+9"*/, CMD_TOOL_96, 0x00
addmenu htoolmenu, lang.4.49/*"192分\tCtrl+Shift+1"*/, CMD_TOOL_192, 0x00
addmenu htoolmenu, "", 0, 0x0800
addmenu htoolmenu, lang.4.50/*"LASERオブジェクトの配置:標準"*/, CMD_TOOL_ANALOGDETAIL0, 0x08
addmenu htoolmenu, lang.4.51/*"LASERオブジェクトの配置:詳細"*/, CMD_TOOL_ANALOGDETAIL1, 0x00
addmenu htoolmenu, lang.4.52/*"LASERオブジェクトの配置:最も詳細"*/, CMD_TOOL_ANALOGDETAIL2, 0x00
addmenu htoolmenu, "", 0, 0x0800
addmenu htoolmenu, lang.4.55/*"16分挿入時に直角LASERの連続を避ける (推奨)"*/, CMD_TOOL_DISABLEANAN, 0x08
addmenu htoolmenu, lang.4.56/*"幅の小さい直角LASERの挿入を避ける (推奨)"*/, CMD_TOOL_DISABLEANMIN, 0x08
addmenu htoolmenu, lang.4.60/*"はみ出しLASER挿入時に始点位置を通常の標準位置にする"*/, CMD_TOOL_ANARAN2XSTARTPOS, 0x08
addmenu htoolmenu, lang.4.70/*"注釈による譜面ファイルの直接編集を有効にする"*/, CMD_TOOL_DIRECTCHARTEDITING, 0x08 * isDirectChartEditingEnabled
newmenu hplayvolmenu, 1
addmenu hplayvolmenu, lang.5.30/*"100%"*/, CMD_PLAY_VOL_100, 0x08
addmenu hplayvolmenu, lang.5.31/*" 75%"*/, CMD_PLAY_VOL_75, 0x00
addmenu hplayvolmenu, lang.5.32/*" 50%"*/, CMD_PLAY_VOL_50, 0x00
addmenu hplayvolmenu, lang.5.33/*" 25%"*/, CMD_PLAY_VOL_25, 0x00
addmenu hplayvolmenu, lang.5.34/*" 0%"*/, CMD_PLAY_VOL_0, 0x00
newmenu hplaymenu, 1
addmenu hplaymenu, lang.5.10/*"再生/停止(&P)\tSpace"*/, CMD_PLAY_PLAY, 0x00
addmenu hplaymenu, "", 0, 0x0800
addmenu hplaymenu, lang.5.23/*"選択範囲をループ再生する(&R)"*/, CMD_PLAY_LOOPPLAYBACK, 0x08*loopplayback
addmenu hplaymenu, lang.5.15/*"シンクロスクロールを有効にする(&Y)"*/, CMD_PLAY_SYNCHRO, 0x08
addmenu hplaymenu, lang.5.16/*"&ASSIST TICKを有効にする"*/, CMD_PLAY_TICK, 0x00
addmenu hplaymenu, lang.5.21/*"FXエフェクトを有効にする(REAPERでの書出が必要)(&F)"*/, CMD_PLAY_FX, 0x08
addmenu hplaymenu, lang.5.22/*"レーザーエフェクトを有効にする(&L)"*/, CMD_PLAY_LASER, 0x08
addmenu hplaymenu, lang.5.17/*"直角音の再生を有効にする(&C)"*/, CMD_PLAY_CHOKKAKU, 0x08
addmenu hplaymenu, lang.5.18/*"BPMを1/2倍して再生する(&H)"*/, CMD_PLAY_BPMHALF, 0x00
addmenu hplaymenu, lang.5.19/*"曲の再生ボリューム(&V)"*/, hplayvolmenu, 0x10
addmenu hplaymenu, "", 0, 0x0800
addmenu hplaymenu, lang.5.40/*"選曲画面プレビューの再生(&S)"*/, CMD_PLAY_SAMPLE, 0x00
addmenu hplaymenu, "", 0, 0x0800
addmenu hplaymenu, lang.5.50/*"テストプレイ(&T)...\tF5"*/, CMD_PLAY_TESTPLAY, 0x00
addmenu hplaymenu, lang.5.51/*"テストプレイ(オート) (&A)...\tF11"*/, CMD_PLAY_TESTPLAY_AUTO, 0x00
addmenu hplaymenu, lang.5.52/*"カーソル小節からテストプレイ(&E)...\tF6"*/, CMD_PLAY_TESTPLAY_CURSOR, 0x00
addmenu hplaymenu, lang.5.53/*"カーソル小節からテストプレイ(オート) (&U)...\tF12"*/, CMD_PLAY_TESTPLAY_AUTO_CURSOR, 0x00
// トップメニュー作成
newmenu hmenu, 0
addmenu hmenu, lang.1.0/*"ファイル(&F)"*/, hfilemenu, 0x10
addmenu hmenu, lang.2.0/*"編集(&E)"*/, heditmenu, 0x10
addmenu hmenu, lang.3.0/*"表示(&V)"*/, hviewmenu, 0x10
addmenu hmenu, lang.4.0/*"ツール(&T)"*/, htoolmenu, 0x10
addmenu hmenu, lang.5.0/*"再生(&P)"*/, hplaymenu, 0x10
applymenu hmenu
newmenu htooltargetmenu, 1
addmenu htooltargetmenu, lang.4.27/*"LASER音声エフェクトの強さ(&G)\tM"*/, CMD_TOOL_ANALOGPFILTER, 0x00
addmenu htooltargetmenu, lang.4.28/*"LASER直角音の音量/種類(&S)\tV"*/, CMD_TOOL_ANALOGVOL, 0x00
addmenu htooltargetmenu, lang.4.30/*"回転エフェクト(&I)\tS"*/, CMD_TOOL_SPIN, 0x00
addmenu htooltargetmenu, lang.4.34/*"傾きエフェクトの種類(&L)\tR"*/, CMD_TOOL_ROTATE, 0x00
addmenu htooltargetmenu, lang.4.35/*"レーンの拡大(上部)(&Z)\tZ"*/, CMD_TOOL_ZOOMTOP, 0x00
addmenu htooltargetmenu, lang.4.36/*"レーンの拡大(下部)(&M)\tX"*/, CMD_TOOL_ZOOMBOTTOM, 0x00
addmenu htooltargetmenu, lang.4.37/*"レーンの左右移動(&H)\tC"*/, CMD_TOOL_ZOOMSIDE, 0x00
addmenu htooltargetmenu, lang.4.38/*"譜面停止(&F)\tF"*/, CMD_TOOL_STOP, 0x00
; コモンコントロールライブラリの初期化
InitCommonControls
chdir "./se"
tickid=BASS_SampleLoad(0,"tick.wav",0,0,0,40,0)
tick2id=BASS_SampleLoad(0,"tick2.wav",0,0,0,30,0)
// 画像の読み込み
chdir "../imgs/editor"
buffer BUF_ST : picload "st.gif"
buffer BUF_NOTE : picload "note.gif"
buffer BUF_LNOTE : picload "lnote.gif"
buffer BUF_NOTE2 : picload "note2.gif"
buffer BUF_LNOTE2 : picload "lnote2.gif"
buffer BUF_LNOTE2_SE : picload "lnote2_se.gif"
buffer BUF_ANALOG : picload "laser.gif"
buffer BUF_SPIN : picload "spin.gif"
buffer BUF_CHOKKAKUSAMPLES : picload "chokkakusamples.gif"
buffer BUF_STOP : picload "stop.gif"
buffer BUF_TOOLS : picload "tools.gif"
buffer BUF_TARGETS : picload "targets.gif"
buffer BUF_QUANTIZE : picload "quantize.gif"
buffer BUF_KEYINFO : picload lang.0.50
buffer BUF_TOOLBAR,16*TBNUM,16
pos 0,0
gcopy BUF_TOOLS,0,0,16*3,16
pos 16*3,0
gcopy BUF_TARGETS,0,0,16*14,16
buffer BUF_TOOLBARTMP : picload "toolbar.gif"
gsel BUF_TOOLBAR
pos 16*17,0
gcopy BUF_TOOLBARTMP,0,0,16*7,16
htoolbarbmp = _CreateBitmap(0, 0, 16*TBNUM,16)
// 作業領域の確保
buffer 6,(41+9*2)*2,UNIT_MEASURE*vtate*vyoko+1
buffer 7 // 一時領域
buffer BUF_ZOOMTEMP,(41+9*2)*3,UNIT_MEASURE*tate+1
buffer BUF_TRACE,41+9*2,vUNIT_MEASURE*tate+1 // かぶせるやつ
pos 0,0
color 0,0,0
boxf
gsel 0
//buffer BUF_FOREGROUND,41+9*2,UNIT_MEASURE*tate+1 // かぶせるやつ その2
//pos 0,0
//color 0,0,0
//boxf
gosub *clipinit
if(dir_cmdline!=""){
stat1=dir_cmdline
stat1=strtrim(stat1,0,'"')
exist stat1
if(strsize>=0){
afname=stat1
acmd=CMD_OPEN
gosub *OnCommand
}
}
afname=""
getkey shift_key,16
getkey ctrl_key,17
getkey esc_key,27
if((shift_key+ctrl_key=2)&(esc_key=0)){
disabledd=min(max(1-disabledd,0),1)
}
oncmd gosub *OnCommand, WM_COMMAND ; メッセージ割り込み
oncmd gosub *OnNotify, WM_NOTIFY
onkey gosub *OnKeshu ; キー割り込み
onclick gosub *OnClick_ ; クリック時割り込み
oncmd gosub *OnWheel, 0x20A ; マウスホイール割り込み
oncmd gosub *OnWheel_H, 0x114 ; マウスホイール(横)割り込み
oncmd gosub *alt, 0x105 ; Altキー割り込み
onexit gosub *exit ; 終了時割り込み
if(disabledd=0):oncmd gosub *dd, 0x233 ; ドラッグ&ドロップ時割り込み
if(hspstat=0):onerror *error
alloc ddbuf,1024*64 ;ドラッグ&ドロップされたファイル名を入れる変数
gosub *draw
if(disabledd=0):dd_accept ddbuf,ddnum
if(assisttick=1){
assisttick=0
acmd=CMD_PLAY_TICK
gosub *OnCommand
acmd=-1
}
if(reducespacing=-1){
acmd=CMD_VIEW_VSEPMAXIMIZE
gosub *OnCommand
acmd=-1
}
if(reducespacing=1){
acmd=CMD_VIEW_VSEPMINIMIZE
gosub *OnCommand
acmd=-1
}
if(vzoomx=1){
vzoomx=0
acmd=CMD_VIEW_ZOOMX
gosub *OnCommand
acmd=-1
}
if(maximize=1){
maximize=0
acmd=CMD_VIEW_MAXIMIZE
gosub *OnCommand
acmd=-1
}
if(linebright=1){
linebright=0
acmd=CMD_VIEW_LINEBRIGHT
gosub *OnCommand
acmd=-1
}
; ツールバー作成
idTool=-1
gosub *createtoolbar
stop
*draw
if(pendfl=1):pendfl=-1
dstat=double(vUNIT_MEASURE)
dstat/=double(UNIT_MEASURE)
dstat*=100
rate=int(dstat)
buffer 6,(41+9*2)*2,vUNIT_MEASURE*vtate*vyoko+1
pos 0,0
color 0,0,0
boxf
gmode 0
if((edittarget=TARGET_ANALOGL)|(edittarget=TARGET_ANALOGR)){
repeat vyoko*vtate
color 34-(edittarget=TARGET_ANALOGL)*32,14+(edittarget=TARGET_ANALOGL)*10-(edittarget=TARGET_ANALOGR)*12,34-(edittarget=TARGET_ANALOGR)*6
if(vsep<72){
boxf (41+9*2)/2,cnt*vUNIT_MEASURE+1,(41+9*2)/2+41+9*2,(cnt+1)*vUNIT_MEASURE+1
}else{
boxf 4,cnt*vUNIT_MEASURE+1,(41+9*2)*2-5,(cnt+1)*vUNIT_MEASURE+1
}
loop
}
if(edittarget=TARGET_NOTE){
repeat vyoko*vtate
color 30,36,12
boxf (41+9*2)/2+9,cnt*vUNIT_MEASURE+1,(41+9*2)/2+41+9,(cnt+1)*vUNIT_MEASURE+1
loop
}
if(edittarget=TARGET_NOTE2){
repeat vyoko*vtate
color 30,36,24
boxf (41+9*2)/2+9,cnt*vUNIT_MEASURE+1,(41+9*2)/2+41+9,(cnt+1)*vUNIT_MEASURE+1
loop
}
if(edittarget=TARGET_LNOTE){
repeat vyoko*vtate
color 38,30,8
boxf (41+9*2)/2+9,cnt*vUNIT_MEASURE+1,(41+9*2)/2+41+9,(cnt+1)*vUNIT_MEASURE+1
loop
}
if(edittarget=TARGET_LNOTE2){
repeat vyoko*vtate
color 36,32,3
boxf (41+9*2)/2+9,cnt*vUNIT_MEASURE+1,(41+9*2)/2+41+9,(cnt+1)*vUNIT_MEASURE+1
loop
}
if(edittarget=TARGET_ANALOGPFILTER){
repeat vyoko*vtate
color 0,24,24
boxf (41+9*2)/2+9,cnt*vUNIT_MEASURE+1,(41+9*2)/2+41+9,(cnt+1)*vUNIT_MEASURE+1
loop
}
if(edittarget=TARGET_ANALOGVOL){
repeat vyoko*vtate
color 24,0,6
boxf (41+9*2)/2+9,cnt*vUNIT_MEASURE+1,(41+9*2)/2+41+9,(cnt+1)*vUNIT_MEASURE+1
loop
}
if(edittarget=TARGET_SPIN){
repeat vyoko*vtate
color 24,0,32
boxf (41+9*2)/2+9,cnt*vUNIT_MEASURE+1,(41+9*2)/2+41+9,(cnt+1)*vUNIT_MEASURE+1
loop
}